2 instantiations of RationalNumber
Microsoft.Extensions.AI.Evaluation.NLP (2)
Common\BLEUAlgorithm.cs (1)
110
return new
RationalNumber
(numerator, denominator);
Common\RationalNumber.cs (1)
12
public static readonly RationalNumber Zero =
new
(0, 1);
12 references to RationalNumber
Microsoft.Extensions.AI.Evaluation.NLP (12)
Common\BLEUAlgorithm.cs (5)
58
internal static
RationalNumber
ModifiedPrecision(IEnumerable<IEnumerable<string>> references, IEnumerable<string> hypothesis, int n = 1)
67
return
RationalNumber
.Zero;
137
double[]? weights = null, Func<
RationalNumber
[], int, double[]>? smoothingFunction = null)
159
var precisionValues = new
RationalNumber
[weights.Length];
163
RationalNumber
prec = ModifiedPrecision(references, hypothesis, n);
Common\RationalNumber.cs (4)
10
internal readonly struct RationalNumber : IEquatable<
RationalNumber
>
12
public static readonly
RationalNumber
Zero = new(0, 1);
32
public bool Equals(
RationalNumber
other)
35
public override bool Equals(object? obj) => obj is
RationalNumber
other && Equals(other);
Common\SmoothingFunction.cs (3)
22
internal static double[] Method0(
RationalNumber
[] precisions, int hypLen)
50
internal static double[] Method4(
RationalNumber
[] precisions, int hypLen)
59
RationalNumber
p = precisions[i];