Commit 562ead7a authored by Moises Bensadon's avatar Moises Bensadon
Browse files

changed everything in trie to lowercase

parent 86ae8bd0
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -173,7 +173,7 @@ public class MainApp extends JFrame {
            if (isFile) {
                content = new String(Files.readAllBytes(Paths.get(text)));
            } else {
                content = text;
                content = text.toLowerCase();
            }

            // Assume content is already properly split into sentences here
@@ -273,7 +273,7 @@ public class MainApp extends JFrame {
            if (isFile) 
                content= new String(Files.readAllBytes(Paths.get(input)));
            else
                content = input;
                content = input.toLowerCase();
            Corrector corrector = new Corrector(languageFile);
            Consumer<String> outputCallback = output -> {
                resultArea.append(output);
+1 −1
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ public class TrieNode implements Serializable, Cloneable {
                continue;
            }
            past = current;
            current = current.children.computeIfAbsent(word, c -> new TrieNode());
            current = current.children.computeIfAbsent(word.toLowerCase(), c -> new TrieNode());
        }
        current.count += 1;
        past.childCounts += 1;