fix garbage filter bug

This commit is contained in:
Akash Mozumdar 2021-08-18 00:41:34 -06:00
parent fb9fb5d54a
commit c9ad8880fb

View File

@ -185,7 +185,7 @@ bool ProcessSentence(std::wstring& sentence, SentenceInfo sentenceInfo)
if (useFilter)
{
Trim(sentence);
sentence.erase(std::find_if(sentence.begin(), sentence.end(), [](wchar_t ch) { return ch < ' ' && ch != '\n'; }), sentence.end());
sentence.erase(std::remove_if(sentence.begin(), sentence.end(), [](wchar_t ch) { return ch < ' ' && ch != '\n'; }), sentence.end());
}
if (useCache)
{