Loading src/main/java/edu/bu/LanguageCorrection/TrieNode.java +3 −0 Original line number Diff line number Diff line Loading @@ -14,6 +14,9 @@ public class TrieNode implements Serializable, Cloneable { TrieNode current = this; TrieNode past = this; // Store the previous node for (String word : phrase) { if (word.length() == 0) { continue; } past = current; current = current.children.computeIfAbsent(word, c -> new TrieNode()); } Loading Loading
src/main/java/edu/bu/LanguageCorrection/TrieNode.java +3 −0 Original line number Diff line number Diff line Loading @@ -14,6 +14,9 @@ public class TrieNode implements Serializable, Cloneable { TrieNode current = this; TrieNode past = this; // Store the previous node for (String word : phrase) { if (word.length() == 0) { continue; } past = current; current = current.children.computeIfAbsent(word, c -> new TrieNode()); } Loading