summaryrefslogtreecommitdiff
path: root/DiscoBot/Auxiliary
diff options
context:
space:
mode:
authorKobert <Kassian.Kobert@gmail.com>2018-04-09 15:42:46 +0200
committerKobert <Kassian.Kobert@gmail.com>2018-04-09 15:42:46 +0200
commitdb846b1eebf4ee35ea7f72024c0db753b73d0177 (patch)
treed84a8c06b42100e4c192e63948d8c182a716d7f7 /DiscoBot/Auxiliary
parent1069a9cb648429682fc59cdb6dbd3e8610e188ba (diff)
Better Spellcheck
Diffstat (limited to 'DiscoBot/Auxiliary')
-rw-r--r--DiscoBot/Auxiliary/SpellCorrect.cs16
1 files changed, 9 insertions, 7 deletions
diff --git a/DiscoBot/Auxiliary/SpellCorrect.cs b/DiscoBot/Auxiliary/SpellCorrect.cs
index 8c5741b..1b740e8 100644
--- a/DiscoBot/Auxiliary/SpellCorrect.cs
+++ b/DiscoBot/Auxiliary/SpellCorrect.cs
@@ -76,14 +76,16 @@
for (i = 1; i < s.Length; i++)
{
- matrix[i, 0] = 0.0;
+ // matrix[i, 0] = 0.0;
+ matrix[i, 0] = i * Gap;
}
for (i = 1; i < q.Length; i++)
{
- matrix[0, i] = 0.0;
+ matrix[0, i] = 0.0;
}
+
for (i = 1; i <= s.Length; i++)
{
for (j = 1; j <= q.Length; j++)
@@ -114,12 +116,12 @@
}
}
- if (score < 0)
- {
- score = 0;
- }
+ // if (score < 0)
+ // {
+ // score = 0;
+ // }
- if (max < score)
+ if (max < score && i == s.Length)
{
max = score;
}