14 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)
27MatchCounter<NGram<string>> hypNGrams = new(hypothesis.CreateAllNGrams(minN, maxN)); 36MatchCounter<NGram<string>> refNGrams = new(reference.CreateAllNGrams(minN, maxN));
Common\MatchCounter.cs (1)
59var intersection = new MatchCounter<T>();
Microsoft.Extensions.AI.Evaluation.NLP.Tests (7)
MatchCounterTests.cs (7)
16var counter = new MatchCounter<int>(); 24var counter = new MatchCounter<string>(new[] { "a", "b", "a", "c", "b", "a" }); 35var counter = new MatchCounter<int>(); 48var counter = new MatchCounter<char>(); 61var counter = new MatchCounter<string>(new[] { "x", "y", "x" }); 70MatchCounter<int> counter1 = new(new[] { 1, 2, 2, 3 }); 71MatchCounter<int> counter2 = new(new[] { 2, 2, 4 });
19 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)
27MatchCounter<NGram<string>> hypNGrams = new(hypothesis.CreateAllNGrams(minN, maxN)); 36MatchCounter<NGram<string>> refNGrams = new(reference.CreateAllNGrams(minN, maxN)); 39MatchCounter<NGram<string>> overlapNGrams = hypNGrams.Intersect(refNGrams);
Common\MatchCounter.cs (3)
56public MatchCounter<T> Intersect(MatchCounter<T> other) 59var intersection = new MatchCounter<T>();
Microsoft.Extensions.AI.Evaluation.NLP.Tests (8)
MatchCounterTests.cs (8)
16var counter = new MatchCounter<int>(); 24var counter = new MatchCounter<string>(new[] { "a", "b", "a", "c", "b", "a" }); 35var counter = new MatchCounter<int>(); 48var counter = new MatchCounter<char>(); 61var counter = new MatchCounter<string>(new[] { "x", "y", "x" }); 70MatchCounter<int> counter1 = new(new[] { 1, 2, 2, 3 }); 71MatchCounter<int> counter2 = new(new[] { 2, 2, 4 }); 73MatchCounter<int> intersection = counter1.Intersect(counter2);