diff --git a/src/generator.cpp b/src/generator.cpp index 2aaa27a..b832a7f 100644 --- a/src/generator.cpp +++ b/src/generator.cpp @@ -116,14 +116,7 @@ void Generator::Train(void) { std::cout << "[Setup - Info] Begin training" << std::endl; for (const auto& word : words) { - if (word.size() < setup.prefixLength) { - trie.Insert(word); - continue; - } else { - for (int i = 0; i < word.size() - setup.prefixLength; ++i) { - trie.Insert(word.substr(i, setup.prefixLength)); - } - } + trie.Insert(word); } std::cout << "[Setup - Info] Finished training" << std::endl; }