User data tolerance marking (no actual changes)

This commit is contained in:
ShikiSuen 2022-01-19 08:52:19 +08:00
parent 2309625aac
commit 7c1412cfd5
1 changed files with 2 additions and 2 deletions

View File

@ -63,9 +63,9 @@ bool UserPhrasesLM::open(const char *path)
KeyValueBlobReader::State state;
while ((state = reader.Next(&keyValue)) == KeyValueBlobReader::State::HAS_PAIR) {
// We invert the key and value, since in user phrases, "key" is the phrase value, and "value" is the BPMF reading.
keyRowMap[keyValue.value].emplace_back(keyValue.value, keyValue.key );
keyRowMap[keyValue.value].emplace_back(keyValue.value, keyValue.key);
}
// 下面這一段或許可以做成開關、來詢問是否對使用者語彙採取寬鬆策略(哪怕有行內容寫錯也會放行)
if (state == KeyValueBlobReader::State::ERROR) {
close();
return false;