From ed65dcfb93406934d95d9eac35afda89bd74f92c Mon Sep 17 00:00:00 2001 From: 13xforever Date: Sat, 10 Aug 2019 20:24:28 +0500 Subject: [PATCH] misc fixes --- CompatBot/Commands/Misc.cs | 4 ++-- CompatBot/Utils/Extensions/StringUtils.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CompatBot/Commands/Misc.cs b/CompatBot/Commands/Misc.cs index d889d73c..eff07885 100644 --- a/CompatBot/Commands/Misc.cs +++ b/CompatBot/Commands/Misc.cs @@ -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"; diff --git a/CompatBot/Utils/Extensions/StringUtils.cs b/CompatBot/Utils/Extensions/StringUtils.cs index fff53f4c..416e5892 100644 --- a/CompatBot/Utils/Extensions/StringUtils.cs +++ b/CompatBot/Utils/Extensions/StringUtils.cs @@ -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;