usecase

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package usecase provide core usage of gnmatcher.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FuzzyMatcher added in v0.3.4

type FuzzyMatcher interface {
	// MatchStem takes a stemmed scientific name and max edit distance.
	// The search stops if current edit distance becomes bigger than edit
	// distance. The method returns 0 or more stems that did match the
	// input stem within the edit distance constraint.
	MatchStem(stem string, maxEditDistance int) []string
	// StemToCanonicals takes a stem and returns back canonicals
	// that correspond to that stem.
	StemToMatchItems(stem string) []entity.MatchItem
}

FuzzyMatcher describes methods needed for fuzzy matching

type Matcher

type Matcher interface {
	// Version sends current version and build timestamp of
	// gnmatcher.
	Version() entity.Version

	// MatchAry takes a list of strings and matches each of them
	// to known scientific names.
	MatchAry(names []string) []*entity.Match
}

Matcher describes methods required for matching name-strings to names.

Jump to

Keyboard shortcuts

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