Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GNfinder ¶ added in v0.8.4
type GNfinder struct { // Language of the text Language lang.Language // Bayes flag forces to run Bayes name-finding on unknown languages Bayes bool // BayesOddsThreshold sets the limit of posterior odds. Everything bigger // that this limit will go to the names output. BayesOddsThreshold float64 // TextOdds captures "concentration" of names as it is found for the whole // text by heuristic name-finding. It should be close enough for real // number of names in text. We use it when we do not have local conentration // of names in a region of text. TextOdds bayes.LabelFreq // Verifier for scientific names Verifier *verifier.Verifier // Dict contains black, grey, and white list dictionaries Dict *dict.Dictionary }
GNfinder is responsible for name-finding operations
func NewGNfinder ¶ added in v0.8.4
NewGNfinder creates GNfinder object with default data, or with data coming from opts.
func (*GNfinder) FindNames ¶ added in v0.8.4
FindNames traverses a text and finds scientific names in it.
func (*GNfinder) FindNamesJSON ¶ added in v0.8.4
FindNamesJSON takes a text as bytes and returns JSON representation of scientific names found in the text
type Option ¶ added in v0.8.4
type Option func(*GNfinder)
Option type for changing GNfinder settings.
func OptBayes ¶ added in v0.8.4
OptBayes is an option that forces running bayes name-finding even when the language is not supported by training sets.
func OptBayesThreshold ¶ added in v0.8.4
OptBayesThreshold is an option for name finding, that sets new threshold for results from the Bayes name-finding. All the name candidates that have a higher threshold will appear in the resulting names output.
func OptDict ¶ added in v0.8.4
func OptDict(d *dict.Dictionary) Option
OptDict allows to set already created dictionary for GNfinder. It saves time, because then dictionary does not have to be loaded at the construction time.
func OptLanguage ¶ added in v0.8.4
OptLanguage sets a language of a text.
Directories ¶
Path | Synopsis |
---|---|
package dict contains dictionaries for finding scientific names
|
package dict contains dictionaries for finding scientific names |
scripts
|
|
Package statik contains static assets.
|
Package statik contains static assets. |
Package token deals with breaking a text into tokens.
|
Package token deals with breaking a text into tokens. |