matcher

package
v1.1.12 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

package matcher is the central processing unit for matching name-strings to known scientific names.

Index

Constants

View Source
const (
	// MaxMaxNamesNum is the largest number of names that can be processed
	// per request. If input contains more names, it will be truncated.
	MaxNamesNum = 10_000
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Matcher

type Matcher interface {
	// Init loads data from cache on disk, and, if cache is empty, populates it
	// from gnames database.
	Init() error
	// MatchNames takes a slice of strings and returns back metadata
	// of the request and the matches of the strings to known scientific names.
	MatchNames(names []string, opt ...config.Option) mlib.Output
}

Matcher is the interface that enables matching strings to known scientific names.

func NewMatcher

NewMatcher returns Matcher object. It takes interfaces to ExactMatcher and FuzzyMatcher.

Jump to

Keyboard shortcuts

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