From cf56912436b2f07cd7b128c4fa2779fa25e7fdae Mon Sep 17 00:00:00 2001 From: Trianta <56975502+Trimutex@users.noreply.github.com> Date: Fri, 8 Dec 2023 23:29:25 -0600 Subject: [PATCH] Fixed generation cutoff --- src/generator.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) 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; }