11 references to Throw
Microsoft.Extensions.AI.Evaluation.NLP (11)
BLEUEvaluator.cs (1)
48_ = 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."); 141Throw.ArgumentNullException(nameof(references), $"'{nameof(references)}' cannot be null or empty."); 146Throw.ArgumentNullException(nameof(hypothesis), $"'{nameof(hypothesis)}' cannot be null or empty."); 156Throw.ArgumentNullException(nameof(weights), $"'{nameof(weights)}' cannot be empty.");
Common\MatchCounter.cs (1)
27_ = Throw.IfNull(items, nameof(items));
Common\NGram.cs (2)
26Values = Throw.IfNull(values, nameof(values)); 27_ = Throw.IfLessThan(values.Length, 1, nameof(values));
Common\NGramExtensions.cs (1)
27Throw.ArgumentOutOfRangeException(nameof(n), $"'{nameof(n)}' must be greater than zero.");
Common\SimpleWordTokenizer.cs (1)
30_ = Throw.IfNull(text, nameof(text));