Versions in this module Expand all Collapse all v1 v1.2.1 Feb 25, 2018 Changes in this version + const SplitURL + func CombineURLs(urls ...string) string + func ExpandBraces(str string) ([]string, error) + func NormalizeString(str string, sourround bool) string + func WithEdges(cs ...*Concept) func(*Concept) + func WithID(id int) func(*Concept) + type Concept struct + Name string + func HandleAmbigsWithMerge(g *Graph, urls ...string) (*Concept, error) + func HandleAmbigsWithSplit(g *Graph, urls ...string) (*Concept, error) + func NewConcept(url string, cfs ...func(*Concept)) *Concept + func (c *Concept) Ambig() bool + func (c *Concept) EachEdge(f func(Edge)) + func (c *Concept) EdgeAt(i int) Edge + func (c *Concept) EdgesLen() int + func (c *Concept) FindEdge(p, o string) (Edge, bool) + func (c *Concept) GobDecode(bs []byte) error + func (c *Concept) GobEncode() ([]byte, error) + func (c *Concept) ID() int32 + func (c *Concept) MarshalJSON() ([]byte, error) + func (c *Concept) ShortName() string + func (c *Concept) ShortURL() string + func (c *Concept) String() string + func (c *Concept) URL() string + func (c *Concept) UnmarshalJSON(b []byte) error + func (c Concept) Edges() []Edge + type DFA struct + func NewDFA(d Dictionary, graph *Graph) DFA + func (d *DFA) GobDecode(bs []byte) error + func (d DFA) Delta(s sparsetable.State, c byte) sparsetable.State + func (d DFA) Final(s sparsetable.State) (*Concept, bool) + func (d DFA) GobEncode() ([]byte, error) + func (d DFA) Initial() sparsetable.State + type DFAMatcher struct + DFA DFA + func (m DFAMatcher) Match(str string) MatchPos + type Dictionary map[string]int32 + type Document interface + Path func() string + func NewFileDocument(path string) Document + func NewHTMLDocument(path string, r io.Reader) Document + func NewHTTPDocument(url string) Document + func NewReaderDocument(path string, r io.Reader) Document + func NewStringDocument(path, str string) Document + type Edge struct + L int + O *Concept + P *Concept + func (e Edge) String() string + type EdgeSet map[string]map[string]struct + func IntersectEdges(g *Graph, urls ...string) EdgeSet + type FileDocument struct + func (d *FileDocument) Close() error + func (d *FileDocument) Path() string + func (d *FileDocument) Read(b []byte) (int, error) + type FuzzyDFA struct + func NewFuzzyDFA(k int, dfa DFA) FuzzyDFA + func (d FuzzyDFA) Delta(s *sparsetable.FuzzyStack, f func(int, int, *Concept)) bool + func (d FuzzyDFA) Initial(str string) *sparsetable.FuzzyStack + func (d FuzzyDFA) MaxError() int + type FuzzyDFAMatcher struct + DFA FuzzyDFA + func (m FuzzyDFAMatcher) Match(str string) MatchPos + type Graph struct + func NewGraph() *Graph + func (g *Graph) Add(s, p, o string) (*Concept, *Concept, *Concept) + func (g *Graph) ConceptAt(i int) *Concept + func (g *Graph) ConceptsLen() int + func (g *Graph) FindByID(id int32) (*Concept, bool) + func (g *Graph) FindByURL(str string) (*Concept, bool) + func (g *Graph) Register(url string) *Concept + type HTTPDocument struct + func (d *HTTPDocument) Close() error + func (d *HTTPDocument) Path() string + func (d *HTTPDocument) Read(b []byte) (int, error) + type HandleAmbigsFunc func(*Graph, ...string) (*Concept, error) + type MatchPos struct + Begin int + Concept *Concept + End int + type Matcher interface + Match func(string) MatchPos + type Parser interface + Parse func(func(string, string, string) error) error + type ReaderDocument struct + func (ReaderDocument) Close() error + func (d ReaderDocument) Path() string + type RegexMatcher struct + Concept *Concept + Re *regexp.Regexp + func (m RegexMatcher) Match(str string) MatchPos + type Resource struct + DFA DFA + Dictionary Dictionary + Graph *Graph + Rules RulesDictionary + func NewResource(g *Graph, d Dictionary, r RulesDictionary) *Resource + func Parse(p Parser, t Traits) (*Resource, error) + func (r *Resource) GobDecode(bs []byte) error + func (r *Resource) GobEncode() ([]byte, error) + type RulesDictionary map[string]string + type Stream <-chan StreamToken + func Filter(ctx context.Context, s Stream) Stream + func Match(ctx context.Context, m Matcher, s Stream) Stream + func Normalize(ctx context.Context, s Stream) Stream + func Read(ctx context.Context, ds ...Document) Stream + type StreamToken struct + Err error + Token Token + func ReadStreamToken(d Document) StreamToken + type Token struct + Begin int + Concept *Concept + End int + Path string + Token string + func ReadToken(d Document) (Token, error) + func (t Token) String() string + type Traits interface + HandleAmbigs func() HandleAmbigsFunc + Ignore func(string) bool + IsAmbig func(string) bool + IsDistinct func(string) bool + IsInverted func(string) bool + IsName func(string) bool + IsRule func(string) bool + IsSymmetric func(string) bool + IsTransitive func(string) bool + type Triple struct + O *Concept + P *Concept + S *Concept + type URLRegister struct + func NewURLRegister() *URLRegister + func ReadURLRegister(path string) (*URLRegister, error) + func (r *URLRegister) GobDecode(bs []byte) error + func (r *URLRegister) GobEncode() ([]byte, error) + func (r *URLRegister) LookupID(id int) (string, bool) + func (r *URLRegister) LookupURL(url string) (int, bool) + func (r *URLRegister) Register(url string) int + func (r *URLRegister) Write(path string) error v1.2.0 Feb 24, 2018 v1.1.1 Feb 24, 2018 v1.1.0 Feb 24, 2018 v1.0.0 Feb 21, 2018 v0 v0.1.2 Feb 21, 2018 v0.1.1 Feb 21, 2018 v0.1.0 Feb 21, 2018