Documentation
¶
Index ¶
- type ASCII
- type Document
- type Documenter
- type Matches
- type Option
- func WithConditionalMatchScore(f func(int, int) bool) Option
- func WithCustomRegexpTokenizer(t *tokenize.RegexpTokenizer) Option
- func WithHMTLParsing() Option
- func WithMinimumMatchScore(score int) Option
- func WithReplacer(pattern *regexp.Regexp, rep string) Option
- func WithSequentialEqualCharsRemoval() Option
- func WithSetLower() Option
- func WithSetUpper() Option
- func WithTransform(t Transformer) Option
- type Scanner
- type Transformer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Document ¶
func NewDocumentFromReader ¶
func (Document) CompareRune ¶
CompareRune compares one rune to another and returns true if there is a match. Besides checking equality by the standard form (==) it also applies some rules to check if the compared value might be the same as the reference but is masked somehow. Numbers and numerical info must match exactly. Also if both A and B are letters both should match as well. If the compared entities is not a letter, number or numerical info and the reference is not a number or numerical info, it will match.
func (Document) IsEqual ¶
IsEqual compares A and B and returns true if they probably are the same word and false otherwise. if A and B have different lengths it will return false. The A and B variables are not interchangeable as A represents the entities to be compared to B, the reference. IsEqual uses the minimumMatchScore to determine if the words are the same even if there are differences between then. Numbers, numericalInfo and letters should match exactly and the matches increase the counter for the minimumMatchScore, otherwise it returns false immediately.
func (Document) Scan ¶
func (d Document) Scan(docs ...Documenter) Matches
type Documenter ¶
type Option ¶
type Option func(*Document)
func WithCustomRegexpTokenizer ¶
func WithCustomRegexpTokenizer(t *tokenize.RegexpTokenizer) Option
func WithHMTLParsing ¶
func WithHMTLParsing() Option
func WithMinimumMatchScore ¶
func WithSequentialEqualCharsRemoval ¶
func WithSequentialEqualCharsRemoval() Option
func WithSetLower ¶
func WithSetLower() Option
func WithSetUpper ¶
func WithSetUpper() Option
func WithTransform ¶
func WithTransform(t Transformer) Option
type Scanner ¶
type Scanner interface {
Scan(docs ...Documenter) Matches
}