20 references to Throw
Microsoft.Extensions.AI.Evaluation.NLP (20)
BLEUEvaluator.cs (1)
49_ = Throw.IfNull(modelResponse);
Common\BLEUAlgorithm.cs (5)
62Throw.ArgumentOutOfRangeException(nameof(n), $"`{nameof(n)}` must be greater than zero."); 122Throw.ArgumentOutOfRangeException(nameof(n), $"'{nameof(n)}' must be greater than zero."); 144Throw.ArgumentNullException(nameof(references), $"'{nameof(references)}' cannot be null or empty."); 149Throw.ArgumentNullException(nameof(hypothesis), $"'{nameof(hypothesis)}' cannot be null or empty."); 159Throw.ArgumentNullException(nameof(weights), $"'{nameof(weights)}' cannot be empty.");
Common\F1Algorithm.cs (2)
19Throw.ArgumentNullException(nameof(groundTruth), $"'{nameof(groundTruth)}' cannot be null or empty."); 24Throw.ArgumentNullException(nameof(response), $"'{nameof(response)}' cannot be null or empty.");
Common\GLEUAlgorithm.cs (2)
20Throw.ArgumentNullException(nameof(references), $"'{nameof(references)}' cannot be null or empty."); 25Throw.ArgumentNullException(nameof(hypothesis), $"'{nameof(hypothesis)}' cannot be null or empty.");
Common\MatchCounter.cs (2)
27_ = Throw.IfNull(items, nameof(items)); 58_ = Throw.IfNull(other, nameof(other));
Common\NGram.cs (2)
26Values = Throw.IfNull(values, nameof(values)); 27_ = Throw.IfLessThan(values.Length, 1, nameof(values));
Common\NGramExtensions.cs (3)
30Throw.ArgumentOutOfRangeException(nameof(n), $"'{nameof(n)}' must be greater than zero."); 61_ = Throw.IfLessThanOrEqual(minN, 0, nameof(minN)); 69Throw.ArgumentOutOfRangeException(nameof(maxN), $"'{nameof(maxN)}' must be greater than or equal to '{nameof(minN)}'.");
Common\SimpleWordTokenizer.cs (1)
30_ = Throw.IfNull(text, nameof(text));
F1Evaluator.cs (1)
49_ = Throw.IfNull(modelResponse);
GLEUEvaluator.cs (1)
49_ = Throw.IfNull(modelResponse);