Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Version = "v0.4.2+" Build string )
Functions ¶
func NewSimpleOutput ¶
func NewSimpleOutput(sn *grammar.ScientificNameNode) *simple
Types ¶
type Output ¶
type Output struct {
// Parsed is true if parsing of a name-string succeeded.
Parsed bool `json:"parsed"`
// Quality of parsing. 1 - no problems, 2 - some small problems,
// 3 - significant problems with a name-string.
Quality int `json:"quality"`
// Warnings generated by parsing. A warning contains a message and
// an associated with it quality of parsing. The largest quality number
// becomes an overal quality of parsing.
Warnings []Warning `json:"qualityWarnings,omitempty"`
// Verbatim input of a name-string.
Verbatim string `json:"verbatim"`
// Normalized is a cleaned-up version of a name.
Normalized string `json:"normalized,omitempty"`
// Cardinality is a number of main elements in a name. 0 - N/A, 1 - Uninomial,
// 2 - Binomial, 3 - Trinomial etc.
Cardinality int `json:"cardinality"`
// CanonicalName -- three versions of a canonical form of a name.
CanonicalName *canonical `json:"canonicalName,omitempty"`
// Authorship of a name-string, if available.
Authorship string `json:"authorship,omitempty"`
// Parsing details.
Details []interface{} `json:"details,omitempty"`
// Positions and a semantic meanings of words in the name-strings.
Positions []pos `json:"positions,omitempty"`
// Unofficial name-string label (for example names from BOLD project,
// names with annotations etc.).
Surrogate bool `json:"surrogate"`
// Name seem to be a virus, vector, prion etc.
Virus bool `json:"virus"`
// Hybrid is true if a name-string is classied as a hybrid.
Hybrid bool `json:"hybrid"`
// Bacteria is true if a name-string is classified as a bacteria.
Bacteria bool `json:"bacteria"`
// Tail is an unparseable tail of a name-string.
Tail string `json:"unparsedTail,omitempty"`
// NameStringID is a UUID v5 of a verbatim version of a name-string. This
// UUID uses globalnames.org DNS as a seed.
NameStringID string `json:"nameStringId"`
// ParserVersion is a version of the gnparser used to generate the output.
ParserVersion string `json:"parserVersion"`
}
Output is a result of parsing that can be returned in JSON or CSV formats.
func NewOutput ¶
func NewOutput(sn *grm.ScientificNameNode) *Output
Click to show internal directories.
Click to hide internal directories.