generated from Trianta/cpp-unity-template
Fixed generation cutoff
This commit is contained in:
parent
2eef3d36f4
commit
cf56912436
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user