generated from Trianta/cpp-unity-template
Final Changes #13
@ -116,14 +116,7 @@ void Generator::Train(void) {
|
|||||||
|
|
||||||
std::cout << "[Setup - Info] Begin training" << std::endl;
|
std::cout << "[Setup - Info] Begin training" << std::endl;
|
||||||
for (const auto& word : words) {
|
for (const auto& word : words) {
|
||||||
if (word.size() < setup.prefixLength) {
|
trie.Insert(word);
|
||||||
trie.Insert(word);
|
|
||||||
continue;
|
|
||||||
} else {
|
|
||||||
for (int i = 0; i < word.size() - setup.prefixLength; ++i) {
|
|
||||||
trie.Insert(word.substr(i, setup.prefixLength));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
std::cout << "[Setup - Info] Finished training" << std::endl;
|
std::cout << "[Setup - Info] Finished training" << std::endl;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user