5 references to CreateAllNGrams
Microsoft.Extensions.AI.Evaluation.NLP (2)
Common\GLEUAlgorithm.cs (2)
27
MatchCounter<NGram<string>> hypNGrams = new(hypothesis.
CreateAllNGrams
(minN, maxN));
36
MatchCounter<NGram<string>> refNGrams = new(reference.
CreateAllNGrams
(minN, maxN));
Microsoft.Extensions.AI.Evaluation.NLP.Tests (3)
NGramTests.cs (3)
84
Assert.Throws<ArgumentOutOfRangeException>("minN", () => new int[0].
CreateAllNGrams
(-1).ToList());
86
Assert.Throws<ArgumentOutOfRangeException>("minN", () => new int[0].
CreateAllNGrams
(0).ToList());
88
Assert.Throws<ArgumentOutOfRangeException>("maxN", () => new int[0].
CreateAllNGrams
(1, 0).ToList());