Skip to content
Snippets Groups Projects
Commit 4fa1021e authored by Adam Blank's avatar Adam Blank
Browse files

Fixed arguments to spellchecker

parent 11adbbae
No related branches found
No related tags found
No related merge requests found
...@@ -14,7 +14,7 @@ import problems.EditDistanceProblem; ...@@ -14,7 +14,7 @@ import problems.EditDistanceProblem;
public class SpellChecker { public class SpellChecker {
private WordDictionary dictionary; private WordDictionary dictionary;
public SpellChecker(String filename) { public SpellChecker() {
this.dictionary = new SetDictionary("dictionary.txt"); this.dictionary = new SetDictionary("dictionary.txt");
} }
...@@ -38,7 +38,7 @@ public class SpellChecker { ...@@ -38,7 +38,7 @@ public class SpellChecker {
public static void main(String[] args) { public static void main(String[] args) {
System.out.println("Pre-Processing..."); System.out.println("Pre-Processing...");
SpellChecker sp = new SpellChecker("big.txt"); SpellChecker sp = new SpellChecker();
String[] words = new String[]{"hlelo", "actulay", "amke"}; String[] words = new String[]{"hlelo", "actulay", "amke"};
System.out.println("Starting Tests..."); System.out.println("Starting Tests...");
long start = System.currentTimeMillis(); long start = System.currentTimeMillis();
...@@ -51,4 +51,4 @@ public class SpellChecker { ...@@ -51,4 +51,4 @@ public class SpellChecker {
long end = System.currentTimeMillis(); long end = System.currentTimeMillis();
System.out.println("Took " + (end - start)); System.out.println("Took " + (end - start));
} }
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment