Documentation ¶
Overview ¶
Package util is where we place all utility funcs that can be used in every other packages
Index ¶
- func CreateWordSet(words []string) map[string]int
- func GetEnv(env string) string
- func SliceStringToInt64(ss []string) []int64
- func StringToInt64(s string) int64
- func Tokenize(s string, isUsingStopwordRemoval bool, stopwordSet map[string]int) map[string]int
- func WordsSetIntersection(ma, mb map[string]int) map[string]int
- func WordsSetSubtraction(ma, mb map[string]int) map[string]int
- func WordsSetUnion(ma, mb map[string]int) map[string]int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateWordSet ¶
CreateWordSet create a set of words from a slice of string
func SliceStringToInt64 ¶
SliceStringToInt64 converts a slice of string into a slice of int64
func Tokenize ¶
tokenize is a tokenizer function, basically to remove punctuations and (optional) to remove stopwords to a document name or a search term
func WordsSetIntersection ¶
WordsSetIntersection find the intersection between two sets (ma & mb)
func WordsSetSubtraction ¶
WordsSetSubtraction do a substraction between two sets ma - mb
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.