public override double CalculatePhraseSimilarity(IndexedItem <TKeyType> indexedItem, double intersections, IList <GroupedNGram> searchNgrams)
 {
     return(2 * intersections / (indexedItem.NgramCount + searchNgrams.Sum(x => x.TotalPhraseNGramCount)));
 }
Exemple #2
0
 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;
Exemple #4
0
 public abstract double CalculatePhraseSimilarity(IndexedItem <TKeyType> indexedItem, double intersections, IList <GroupedNGram> searchNGrams);