Versions in this module Expand all Collapse all v0 v0.1.1 Jul 9, 2021 Changes in this version + type BaseDocument struct + Content string + Name DocumentID + func NewBaseDocument(id DocumentID, text string) BaseDocument + func (d BaseDocument) ID() string + func (d BaseDocument) Text() string + type Document interface + ID func() DocumentID + Text func() string + type DocumentData struct + Doc Document + Frequencies TermFrequency + TermsCount float64 + type DocumentID = string + type DocumentScore struct + Doc Document + Score float64 + func (ds DocumentScore) String() string + type FloatHeap []FloatHeapItem + func (h *FloatHeap) Pop() interface{} + func (h *FloatHeap) Push(x interface{}) + func (h FloatHeap) Len() int + func (h FloatHeap) Less(i, j int) bool + func (h FloatHeap) Swap(i, j int) + type FloatHeapItem struct + Key interface{} + Value float64 + type TermFrequency map[string]float64 + func NewTermFrequency(terms []string) TermFrequency + func (tf TermFrequency) Top(n int) []FloatHeapItem