matcher

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2021 License: MIT Imports: 12 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 (
	// MaxNMaxNamesNum 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()
	// MatchNames takes a slice of strings and returns back matches of these
	// strings to known scientific names.
	MatchNames(names []string) []mlib.Match
}

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

func NewMatcher

func NewMatcher(em exact.ExactMatcher, fm fuzzy.FuzzyMatcher, j int) Matcher

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