public override double CalculatePhraseSimilarity(IndexedItem <TKeyType> indexedItem, double intersections, IList <GroupedNGram> searchNgrams) { return(2 * intersections / (indexedItem.NgramCount + searchNgrams.Sum(x => x.TotalPhraseNGramCount))); }
private int AddItemToIndex(IndexedItem <TKeyType> cachedItem) { _itemList.Add(cachedItem); return(_itemList.Count - 1); }
public override double CalculatePhraseSimilarity(IndexedItem <TKeyType> indexedItem, double intersections, IList <GroupedNGram> searchNgrams) => intersections;
public abstract double CalculatePhraseSimilarity(IndexedItem <TKeyType> indexedItem, double intersections, IList <GroupedNGram> searchNGrams);