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