Documentation
¶
Overview ¶
Entity linking package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entity ¶
type Entity struct { // Title of target Wikipedia article. Target string `json:"target"` // Raw n-gram count estimate. NGramCount float64 `json:"ngramcount"` // Total number of links to Target in Wikipedia. LinkCount float64 `json:"linkcount"` Commonness float64 `json:"commonness"` Senseprob float64 `json:"senseprob"` // Offset of anchor in input string. Offset int `json:"offset"` // Length of anchor in input string. Length int `json:"length"` }
Represents a mention of an entity.
type Semanticizer ¶
type Semanticizer struct {
// contains filtered or unexported fields
}
func Load ¶
func Load(modelpath string) (sem *Semanticizer, settings *storage.Settings, err error)
Load a semanticizer (entity linker) from modelpath.
Also returns a settings object that represents the dumpparser settings used to generate the model.
func (Semanticizer) All ¶
func (sem Semanticizer) All(s string) (cands []Entity, err error)
Get all candidate entity mentions in the string s.
func (Semanticizer) ExactMatch ¶
func (sem Semanticizer) ExactMatch(s string) (cands []Entity, err error)
Get all candidate entity mentions for the string s.
A candidate entity's anchor text must be exactly s.
Click to show internal directories.
Click to hide internal directories.