Documentation
¶
Index ¶
- func Pretty(pretty bool) func(*Engine) error
- func Size(size int) func(*Engine) error
- type ApproxOutput
- type AuthGroupOutput
- type AuthorFinder
- type AuthorsOutput
- type AuthorshipOutput
- type BaseEngine
- type Canonical
- type Canonizer
- type ComparisonOutput
- type Engine
- func (t *Engine) AST() *node32
- func (t *Engine) Add(rule pegRule, begin, end, index uint32)
- func (p *Engine) AddWarn(w Warning)
- func (p *Engine) Execute()
- func (p *Engine) FullReset()
- func (p *Engine) Init(options ...func(*Engine) error) error
- func (p *Engine) IsBacteria(gen string)
- func (p *Engine) NewNotParsedScientificNameNode(pp *preprocess.Preprocessor)
- func (p *Engine) NewScientificNameNode()
- func (p *Engine) OutputAST()
- func (p *Engine) Parse(rule ...int) error
- func (p *Engine) ParsedName() string
- func (t *Engine) PrettyPrintSyntaxTree(buffer string)
- func (t *Engine) Print()
- func (p *Engine) PrintOutputSyntaxTree(w io.Writer)
- func (p *Engine) PrintSyntaxTree()
- func (p *Engine) Reset()
- func (t *Engine) Tokens() []token32
- func (t *Engine) Trim(length uint32)
- func (p *Engine) WriteSyntaxTree(w io.Writer)
- type InfraSpEpithetOutput
- type Name
- type Outputter
- type Pos
- type Poser
- type ScientificNameNode
- func (sn *ScientificNameNode) AddVerbatim(s string)
- func (sn *ScientificNameNode) Canonical() *Canonical
- func (sn *ScientificNameNode) Details() []interface{}
- func (sn *ScientificNameNode) LastAuthorship() *AuthorshipOutput
- func (sn *ScientificNameNode) Pos() []Pos
- func (sn *ScientificNameNode) Value() string
- type SpeciesOutput
- type UninomialOutput
- type Valuer
- type Warning
- type WordType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ApproxOutput ¶
type ApproxOutput struct {
Genus *genusOutput `json:"genus"`
SpecEpithet *specEpithetOutput `json:"specificEpithet,omitempty"`
Approx string `json:"annotationIdentification"`
Ignored *ignoredOutput `json:"ignored,omitempty"`
}
type AuthGroupOutput ¶ added in v0.9.0
type AuthGroupOutput struct {
Authors []string `json:"authors"`
Year *yearOutput `json:"year,omitempty"`
ExAuthors *AuthorsOutput `json:"exAuthors,omitempty"`
EmendAuthors *AuthorsOutput `json:"emendAuthors,omitempty"`
}
type AuthorFinder ¶
type AuthorFinder interface {
// contains filtered or unexported methods
}
type AuthorsOutput ¶ added in v0.9.0
type AuthorsOutput struct {
Authors []string `json:"authors"`
Year *yearOutput `json:"year,omitempty"`
}
type AuthorshipOutput ¶ added in v0.9.0
type AuthorshipOutput struct {
Value string `json:"value"`
Original *AuthGroupOutput `json:"basionymAuthorship,omitempty"`
Combination *AuthGroupOutput `json:"combinationAuthorship,omitempty"`
}
type BaseEngine ¶
type ComparisonOutput ¶
type ComparisonOutput struct {
Genus *genusOutput `json:"genus"`
SpecEpithet *specEpithetOutput `json:"specificEpithet"`
Comparison string `json:"annotationIdentification"`
}
type Engine ¶
type Engine struct {
BaseEngine
Buffer string
Pretty bool
// contains filtered or unexported fields
}
func (*Engine) IsBacteria ¶
func (*Engine) NewNotParsedScientificNameNode ¶
func (p *Engine) NewNotParsedScientificNameNode(pp *preprocess.Preprocessor)
func (*Engine) NewScientificNameNode ¶
func (p *Engine) NewScientificNameNode()
func (*Engine) ParsedName ¶
func (*Engine) PrettyPrintSyntaxTree ¶
func (t *Engine) PrettyPrintSyntaxTree(buffer string)
func (*Engine) PrintOutputSyntaxTree ¶
func (*Engine) PrintSyntaxTree ¶
func (p *Engine) PrintSyntaxTree()
func (*Engine) WriteSyntaxTree ¶
type InfraSpEpithetOutput ¶ added in v0.9.0
type InfraSpEpithetOutput struct {
Value string `json:"value"`
Rank string `json:"rank,omitempty"`
Authorship *AuthorshipOutput `json:"authorship,omitempty"`
}
type ScientificNameNode ¶
type ScientificNameNode struct {
Name
Verbatim string
VerbatimID string
Cardinality int
Hybrid bool
Virus bool
Bacteria bool
Surrogate bool
Tail string
ParserVersion string
Warnings []Warning
}
func (*ScientificNameNode) AddVerbatim ¶
func (sn *ScientificNameNode) AddVerbatim(s string)
func (*ScientificNameNode) Canonical ¶
func (sn *ScientificNameNode) Canonical() *Canonical
func (*ScientificNameNode) Details ¶
func (sn *ScientificNameNode) Details() []interface{}
func (*ScientificNameNode) LastAuthorship ¶
func (sn *ScientificNameNode) LastAuthorship() *AuthorshipOutput
func (*ScientificNameNode) Pos ¶
func (sn *ScientificNameNode) Pos() []Pos
func (*ScientificNameNode) Value ¶
func (sn *ScientificNameNode) Value() string
type SpeciesOutput ¶
type SpeciesOutput struct {
Genus *genusOutput `json:"genus"`
SpecEpithet *specEpithetOutput `json:"specificEpithet"`
SubGenus *subGenusOutput `json:"infragenericEpithet,omitempty"`
InfraSpecies []*InfraSpEpithetOutput `json:"infraspecificEpithets,omitempty"`
}
type UninomialOutput ¶
type UninomialOutput struct {
Uninomial *uniDetails `json:"uninomial"`
}
type Warning ¶
type Warning int
const ( TailWarn Warning = iota ApostrOtherWarn AuthAmbiguousFiliusWarn AuthDoubleParensWarn AuthExWarn AuthExWithDotWarn AuthEmendWarn AuthEmendWithoutDotWarn AuthMissingOneParensWarn AuthQuestionWarn AuthShortWarn AuthUnknownWarn AuthUpperCaseWarn BacteriaMaybeWarn BotanyAuthorNotSubgenWarn CanonicalApostropheWarn CapWordQuestionWarn CharBadWarn GenusAbbrWarn GenusUpperCharAfterDash GreekLetterInRank HTMLTagsEntitiesWarn HybridCharNoSpaceWarn HybridFormulaWarn HybridFormulaIncompleteWarn HybridFormulaProbIncompleteWarn HybridNamedWarn NameApproxWarn NameComparisonWarn RankUncommonWarn SpaceMultipleWarn SpaceNonStandardWarn SpanishAndAsSeparator SpeciesNumericWarn SuperSpeciesWarn UTF8ConvBadWarn UninomialComboWarn WhiteSpaceTrailWarn YearCharWarn YearDotWarn YearOrigMisplacedWarn YearPageWarn YearParensWarn YearQuestionWarn YearRangeWarn YearSqBraketsWarn )
Click to show internal directories.
Click to hide internal directories.