lexgroup

package
v1.2.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

package lexgroup creates lexical groups out of matched results from verification.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LexicalGroup

type LexicalGroup struct {
	// ID corresponds to ID of a matched name UUID v5.
	ID string

	// Name is the matched name.
	Name string

	// Score is the same as a sort score for a match.
	Score float64

	// NomCodes contains nomenclatural codes detected for this lexical group.
	NomCodes map[string]struct{}

	// AuthMatch is the score for author matching.
	AuthMatch float32

	// CanonicalFull is the full canonical form of the matched name.
	CanonicalFull string

	// LexicalVariants is a slice of all spellings compatible with this group.
	LexicalVariants []string

	// Data is a slice of all corresponding matched data.
	Data []*verifier.ResultData
}

LexicalGroup combines together name-strings which seem to belong to the same scientific name.

func NameToLexicalGroups

func NameToLexicalGroups(n verifier.Name) []LexicalGroup

NameToLexicalGroups takes verification results for a name and reorganizes the matching results into lexical groups. Note that if only best result exit only one lexical groups with one mamber is returned.

func New

New creates new LexicalGroup instance out of a *verifier.ResultData.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL