Fixed generation cutoff

This commit is contained in:
Trianta 2023-12-08 23:29:25 -06:00
parent 2eef3d36f4
commit cf56912436

View File

@ -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;
}