Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Meta ¶
type Meta struct { // Date represents time when output was generated. Date time.Time `json:"date"` // FinderVersion the version of gnfinder FinderVersion string // Language inside name-finding algorithm Language string `json:"language"` // LanguageDetected automatically for the text LanguageDetected string `json:"language_detected"` // LanguageForced by language option DetectLanguage bool `json:"detect_language"` // TotalTokens is a number of 'normalized' words in the text TotalTokens int `json:"total_words"` // TotalNameCandidates is a number of words that might be a start of // a scientific name TotalNameCandidates int `json:"total_candidates"` // TotalNames is a number of scientific names found TotalNames int `json:"total_names"` // CurrentName (optional) is the index of the names array that designates a // "position of a cursor". It is used by programs like gntagger that allow // to work on the list of found names interactively. CurrentName int `json:"current_index,omitempty"` }
Meta contains meta-information of name-finding result.
type Name ¶
type Name struct { Type string `json:"type"` Verbatim string `json:"verbatim"` Name string `json:"name"` Odds float64 `json:"odds,omitempty"` OddsDetails token.OddsDetails `json:"odds_details,omitempty"` OffsetStart int `json:"start"` OffsetEnd int `json:"end"` Annotation string `json:"annotation"` Verification *verifier.Verification `json:"verification,omitempty"` }
Name represents one found name.
type OddsDatum ¶
OddsDatum is a simplified version of a name, that stores boolean decision (Name/NotName), and corresponding odds of the name.
type Output ¶
Output type is the result of name-finding.
func TokensToOutput ¶
func TokensToOutput(ts []token.Token, text []rune, l lang.Language, code string, version string) *Output
TokensToOutput takes tagged tokens and assembles output out of them.
func (*Output) MergeVerification ¶
MergeVerification takes a map with verified names and incorporates into output.
func (*Output) UniqueNameStrings ¶
UniqueNameStrings takes a list of names, and returns a list of unique name-strings
Click to show internal directories.
Click to hide internal directories.