From 89635a501f7131e13916ac69434b33e839f02fab Mon Sep 17 00:00:00 2001 From: Wolf Garbe Date: Tue, 25 Mar 2014 13:13:23 +0100 Subject: [PATCH] Update symspell.cs --- symspell.cs | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/symspell.cs b/symspell.cs index fc740ef..43159ff 100644 --- a/symspell.cs +++ b/symspell.cs @@ -59,8 +59,6 @@ private class editItem public string term = ""; public int distance = 0; - - public override bool Equals(object obj) { return Equals(term, ((editItem)obj).term); @@ -136,7 +134,6 @@ private static bool CreateDictionaryEntry(string key, string language) suggestion.term = key; suggestion.distance = delete.distance; - dictionaryItem value2; if (dictionary.TryGetValue(language+delete.term, out value2)) { @@ -195,7 +192,6 @@ private static List Edits(string word, int editDistance, bool recursio { editItem delete = new editItem(); delete.term=word.Remove(i, 1); - delete.distance=editDistance; if (!deletes.Contains(delete)) { @@ -217,17 +213,6 @@ private static List Edits(string word, int editDistance, bool recursio private static int TrueDistance(editItem dictionaryOriginal, editItem inputDelete, string inputOriginal) { - - - - - - - - - - - //We allow simultaneous edits (deletes) of editDistanceMax on on both the dictionary and the input term. //For replaces and adjacent transposes the resulting edit distance stays <= editDistanceMax. //For inserts and deletes the resulting edit distance might exceed editDistanceMax. @@ -335,7 +320,6 @@ private static void Correct(string input, string language) List suggestions = null; /* - //Benchmark: 1000 x Lookup Stopwatch stopWatch = new Stopwatch(); stopWatch.Start(); @@ -346,7 +330,6 @@ private static void Correct(string input, string language) stopWatch.Stop(); Console.WriteLine(stopWatch.ElapsedMilliseconds.ToString()); */ - //check in dictionary for existence and frequency; sort by edit distance, then by word frequency suggestions = Lookup(input, language, editDistanceMax);