7 instantiations of MatchCounter
Microsoft.Extensions.AI.Evaluation.NLP (7)
Common\BLEUAlgorithm.cs (2)
71MatchCounter<NGram<string>> hypCounts = new(hypGrams); 78MatchCounter<NGram<string>> refCounts = new(refGrams);
Common\F1Algorithm.cs (2)
27MatchCounter<string> referenceTokens = new(groundTruth); 28MatchCounter<string> predictionTokens = new(response);
Common\GLEUAlgorithm.cs (2)
28MatchCounter<NGram<string>> hypNGrams = new(hypothesis.CreateAllNGrams(minN, maxN)); 34MatchCounter<NGram<string>> refNGrams = new(reference.CreateAllNGrams(minN, maxN));
Common\MatchCounter.cs (1)
59var intersection = new MatchCounter<T>();
11 references to MatchCounter
Microsoft.Extensions.AI.Evaluation.NLP (11)
Common\BLEUAlgorithm.cs (2)
71MatchCounter<NGram<string>> hypCounts = new(hypGrams); 78MatchCounter<NGram<string>> refCounts = new(refGrams);
Common\F1Algorithm.cs (3)
27MatchCounter<string> referenceTokens = new(groundTruth); 28MatchCounter<string> predictionTokens = new(response); 29MatchCounter<string> commonTokens = referenceTokens.Intersect(predictionTokens);
Common\GLEUAlgorithm.cs (3)
28MatchCounter<NGram<string>> hypNGrams = new(hypothesis.CreateAllNGrams(minN, maxN)); 34MatchCounter<NGram<string>> refNGrams = new(reference.CreateAllNGrams(minN, maxN)); 37MatchCounter<NGram<string>> overlapNGrams = hypNGrams.Intersect(refNGrams);
Common\MatchCounter.cs (3)
56public MatchCounter<T> Intersect(MatchCounter<T> other) 59var intersection = new MatchCounter<T>();