Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CosineDistance ¶
CosineDistance calculates the cosine distance between two vectors
func FowlerNollVo32 ¶
Hash function using the FNV-1a algorithm https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function
func MakeWordFreq ¶
MakeWordFreq takes a text and returns a map of words to their frequencies
func SplitWords ¶
Split a text into words The delimiters used to split the text into words are defined in the function
Types ¶
type TextVec ¶
func (*TextVec) CalculateVector ¶
CalculateVector takes a text and calculates its vector representation The text is split into words using the SplitWords functionthen each the word frequencies are then used to calculate the vector representation of the text
Click to show internal directories.
Click to hide internal directories.