am bd0ac979: Fix: native unit test.
* commit 'bd0ac97917284183ea7a59a084cd57b724a854c8': Fix: native unit test.main
commit
aadd46c2db
|
@ -107,15 +107,15 @@ TEST(LanguageModelDictContentTest, TestGetWordProbability) {
|
||||||
languageModelDictContent.setProbabilityEntry(prevWordIds[0], &probabilityEntry);
|
languageModelDictContent.setProbabilityEntry(prevWordIds[0], &probabilityEntry);
|
||||||
languageModelDictContent.setNgramProbabilityEntry(prevWordIds.limit(1), wordId,
|
languageModelDictContent.setNgramProbabilityEntry(prevWordIds.limit(1), wordId,
|
||||||
&bigramProbabilityEntry);
|
&bigramProbabilityEntry);
|
||||||
EXPECT_EQ(bigramProbability, languageModelDictContent.getWordProbability(prevWordIds, wordId,
|
EXPECT_EQ(bigramProbability, languageModelDictContent.getWordAttributes(prevWordIds, wordId,
|
||||||
nullptr /* headerPolicy */));
|
nullptr /* headerPolicy */).getProbability());
|
||||||
const ProbabilityEntry trigramProbabilityEntry(flag, trigramProbability);
|
const ProbabilityEntry trigramProbabilityEntry(flag, trigramProbability);
|
||||||
languageModelDictContent.setNgramProbabilityEntry(prevWordIds.limit(1),
|
languageModelDictContent.setNgramProbabilityEntry(prevWordIds.limit(1),
|
||||||
prevWordIds[1], &probabilityEntry);
|
prevWordIds[1], &probabilityEntry);
|
||||||
languageModelDictContent.setNgramProbabilityEntry(prevWordIds.limit(2), wordId,
|
languageModelDictContent.setNgramProbabilityEntry(prevWordIds.limit(2), wordId,
|
||||||
&trigramProbabilityEntry);
|
&trigramProbabilityEntry);
|
||||||
EXPECT_EQ(trigramProbability, languageModelDictContent.getWordProbability(prevWordIds, wordId,
|
EXPECT_EQ(trigramProbability, languageModelDictContent.getWordAttributes(prevWordIds, wordId,
|
||||||
nullptr /* headerPolicy */));
|
nullptr /* headerPolicy */).getProbability());
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
Loading…
Reference in New Issue