Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
GNUUID = uuid.NewV5(uuid.NamespaceDNS, "globalnames.org")
)
Functions ¶
Types ¶
type Matcher ¶
func NewMatcher ¶
func (Matcher) MatchFuzzy ¶
func (Matcher) MatchPartial ¶
func (Matcher) MatchVirus ¶
func (m Matcher) MatchVirus(ns NameString) *protob.Result
type Multinomial ¶
type NameString ¶
type NameString struct {
// ID is UUID v5 generated from the verbatim name-string.
ID string
// Name is a verbatim name-string.
Name string
// Cardinality is the apparent number of elemenents in a name. Uninomial
// corresponds to cardinality 1, bionmial to 2, trinomial to 3 etc.
Cardinality int
// Canonical is the simplest most common version of a canonical form of
// a name string.
Canonical string
// CanonicalID is UUID v5 generated from the Canonical field.
CanonicalID string
// CanonicalFull is a canonical form that also contains infraspecific ranks
// and hybrid signes for named hybrids names.
CanonicalFull string
// CanonicalFullID is UUID v5 generated from the CanonicalFullID field.
CanonicalFullID string
// Canonical Stem is version of the Canonical field with suffixes removed
// and characters substituted according to rules of Latin grammar.
CanonicalStem string
// Partial contains truncated versions of Canonical form. It is important
// for matching names that could not be matched for all specific epithets.
Partial *Partial
}
NameString stores input data for doing exact, fuzzy, exact partial, and fuzzy partial matching. It is created by parsing a name-string and storing its semantic elements.
func NewNameString ¶
NewNameString creates a new instance of NameString.
type Partial ¶
type Partial struct {
// Genus is a truncated canonical form with all specific epithets removed.
Genus string
// Multinomials are truncated canonical forms where one or more specific
// epithets removed.
Multinomials []Multinomial
}
Partial stores truncated version of a 'canonical' name-string.
Click to show internal directories.
Click to hide internal directories.