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