20 references to Throw
Microsoft.Extensions.AI.Evaluation.NLP (20)
BLEUEvaluator.cs (1)
49
_ =
Throw
.IfNull(modelResponse);
Common\BLEUAlgorithm.cs (5)
62
Throw
.ArgumentOutOfRangeException(nameof(n), $"`{nameof(n)}` must be greater than zero.");
122
Throw
.ArgumentOutOfRangeException(nameof(n), $"'{nameof(n)}' must be greater than zero.");
144
Throw
.ArgumentNullException(nameof(references), $"'{nameof(references)}' cannot be null or empty.");
149
Throw
.ArgumentNullException(nameof(hypothesis), $"'{nameof(hypothesis)}' cannot be null or empty.");
159
Throw
.ArgumentNullException(nameof(weights), $"'{nameof(weights)}' cannot be empty.");
Common\F1Algorithm.cs (2)
19
Throw
.ArgumentNullException(nameof(groundTruth), $"'{nameof(groundTruth)}' cannot be null or empty.");
24
Throw
.ArgumentNullException(nameof(response), $"'{nameof(response)}' cannot be null or empty.");
Common\GLEUAlgorithm.cs (2)
20
Throw
.ArgumentNullException(nameof(references), $"'{nameof(references)}' cannot be null or empty.");
25
Throw
.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)
26
Values =
Throw
.IfNull(values, nameof(values));
27
_ =
Throw
.IfLessThan(values.Length, 1, nameof(values));
Common\NGramExtensions.cs (3)
30
Throw
.ArgumentOutOfRangeException(nameof(n), $"'{nameof(n)}' must be greater than zero.");
61
_ =
Throw
.IfLessThanOrEqual(minN, 0, nameof(minN));
69
Throw
.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);