destroy garbage sentences
This commit is contained in:
parent
b09783d111
commit
dad036083a
@ -188,7 +188,7 @@ bool ProcessSentence(std::wstring& sentence, SentenceInfo sentenceInfo)
|
||||
Trim(sentence);
|
||||
sentence.erase(std::remove_if(sentence.begin(), sentence.end(), [](wchar_t ch) { return ch < ' ' && ch != '\n'; }), sentence.end());
|
||||
}
|
||||
if (!std::regex_replace(sentence, std::wregex(L"\\s|\x200b"), L"").size()) return false;
|
||||
if (sentence.empty()) return true;
|
||||
if (useCache)
|
||||
{
|
||||
auto translationCache = ::translationCache.Acquire();
|
||||
|
Loading…
Reference in New Issue
Block a user