matcher

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2020 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFuzzyMatcher added in v0.3.5

func NewFuzzyMatcher(t *levenshtein.MinTree, kv *badger.DB) fuzzyMatcher

Creates new a struct compatible with FuzzyMatcher interface.

Types

type MatchResult added in v0.3.0

type MatchResult struct {
	Index int
	Match *mlib.Match
}

type MatchTask added in v0.3.0

type MatchTask struct {
	Index int
	Name  string
}

MatchTask contains a name to be matched and an index where it should be located in an array.

type Matcher

type Matcher struct {
	Config  config.Config
	Filters *bloom.Filters
	KeyVal  *badger.DB
	mlib.FuzzyMatcher
}

Matcher contains data and functions necessary for exact, fuzzy and partial matching of scientific names.

func NewMatcher

func NewMatcher(cnf config.Config) Matcher

NewMatcher creates a new instance of Matcher struct.

func (Matcher) MatchWorker added in v0.3.0

func (m Matcher) MatchWorker(chIn <-chan MatchTask,
	chOut chan<- MatchResult, wg *sync.WaitGroup)

MatchWorker takes name-strings from chIn channel, matches them and sends results to chOut channel.

Jump to

Keyboard shortcuts

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