Documentation ¶
Index ¶
- Constants
- func Bigrams(s string) set.Strings
- func CompleteString(pool []string, prefix string) []string
- func HammingDistance(a, b string) (int, error)
- func JaccardSets(a, b set.Strings) float64
- func JaroDistance(a, b string) (float64, error)
- func JaroWinklerDistance(a, b string, boostThreshold float64, prefixSize int) (float64, error)
- func LevenshteinDistance(s, t string) (int, error)
- func NgramDistance(s, t string) (float64, error)
- func NgramDistanceSize(s, t string, n int) (float64, error)
- func Ngrams(s string, n int) set.Strings
- func RecordGenerator(c *cli.Context) chan *Record
- func RecordGeneratorFile(reader io.ReadCloser, c *ColumnSpec) chan *Record
- func RecordGeneratorFileDelimiter(reader io.ReadCloser, c *ColumnSpec, delim string) chan *Record
- func SorensenDiceDistance(a, b string) (float64, error)
- func Trigrams(s string) set.Strings
- func Unigrams(s string) set.Strings
- type ColumnSpec
- type Record
Constants ¶
const Version = "0.1.1"
Version of the application
Variables ¶
This section is empty.
Functions ¶
func CompleteString ¶
CompleteString returns all strings from pool that have a given prefix
func HammingDistance ¶
HammingDistance computes the Hamming distance for two strings of equals length
func JaccardSets ¶
JaccardSets measure Jaccard distance of two sets
func JaroDistance ¶
JaroDistance computes the Jaro distance for two strings From: https://github.com/xrash/smetrics
func JaroWinklerDistance ¶
JaroWinklerDistance computes the Jaro-Winkler distance for two strings From: https://github.com/xrash/smetrics
func LevenshteinDistance ¶
LevenshteinDistance computes the Levenshtein distance for two strings
func NgramDistance ¶
NgramDistance computes the trigram/Jaccard measure
func NgramDistanceSize ¶
NgramDistanceSize computes the ngram/Jaccard measure for a given n
func RecordGenerator ¶
RecordGenerator abstracts from the way the strings are specified, e.g. via stdin a file or directly on the command line
func RecordGeneratorFile ¶
func RecordGeneratorFile(reader io.ReadCloser, c *ColumnSpec) chan *Record
RecordGeneratorFile will produce pair values, that are extracted according to a given column specification and tab delimiter.
func RecordGeneratorFileDelimiter ¶
func RecordGeneratorFileDelimiter(reader io.ReadCloser, c *ColumnSpec, delim string) chan *Record
RecordGeneratorFileDelimiter will produce pair values, that are extracted according to a given column specification and a custom field delimiter
func SorensenDiceDistance ¶
Types ¶
type ColumnSpec ¶
type ColumnSpec struct {
// contains filtered or unexported fields
}
ColumnSpec contains two column indexes
func ParseColumnSpec ¶
func ParseColumnSpec(s string) (*ColumnSpec, error)
ParseColumnSpec parses a string like "2,3" into a ColumnSpec struct