misc fixes

This commit is contained in:
13xforever
2019-08-10 20:24:28 +05:00
parent 0e39f94549
commit ed65dcfb93
2 changed files with 3 additions and 3 deletions

View File

@@ -221,8 +221,8 @@ namespace CompatBot.Commands
var unit = EightBallTimeUnits[crng.Next(EightBallTimeUnits.Count)];
if (number > 1)
{
if (unit.EndsWith('y'))
unit = unit.Substring(0, unit.Length - 1) + "ie";
if (unit.EndsWith("ry"))
unit = unit.Substring(0, unit.Length - 1) + "rie";
unit += "s";
if (unit == "millenniums")
unit = "millennia";

View File

@@ -307,7 +307,7 @@ namespace CompatBot.Utils
{
StrA = strA,
StrB = strB,
Coefficient = Normalizer.ToCanonicalForm(strA).GetScoreWithAcronym(Normalizer.ToCanonicalForm(strB)),
Coefficient = strA.ToCanonicalForm().GetScoreWithAcronym(strB.ToCanonicalForm()),
};
FuzzyPairCache.Set(cacheKey, match);
return match.Coefficient;