am b30f7e4b: Merge "Check whether the word is OOV or not for amanatto update."
* commit 'b30f7e4bceefc4f30c7b942675cc6af5f6d8d852': Check whether the word is OOV or not for amanatto update.main
commit
de63718309
|
@ -365,6 +365,7 @@ public final class BinaryDictionary extends Dictionary {
|
|||
}
|
||||
|
||||
public static class LanguageModelParam {
|
||||
public final String mTargetWord;
|
||||
public final int[] mWord0;
|
||||
public final int[] mWord1;
|
||||
// TODO: this needs to be a list of shortcuts
|
||||
|
@ -379,6 +380,7 @@ public final class BinaryDictionary extends Dictionary {
|
|||
// Constructor for unigram. TODO: support shortcuts
|
||||
public LanguageModelParam(final String word, final int unigramProbability,
|
||||
final int timestamp) {
|
||||
mTargetWord = word;
|
||||
mWord0 = null;
|
||||
mWord1 = StringUtils.toCodePointArray(word);
|
||||
mShortcutTarget = null;
|
||||
|
@ -394,6 +396,7 @@ public final class BinaryDictionary extends Dictionary {
|
|||
public LanguageModelParam(final String word0, final String word1,
|
||||
final int unigramProbability, final int bigramProbability,
|
||||
final int timestamp) {
|
||||
mTargetWord = word1;
|
||||
mWord0 = StringUtils.toCodePointArray(word0);
|
||||
mWord1 = StringUtils.toCodePointArray(word1);
|
||||
mShortcutTarget = null;
|
||||
|
|
|
@ -42,6 +42,7 @@ const int ForgettingCurveUtils::DISCARD_LEVEL_ZERO_ENTRY_TIME_STEP_COUNT_THRESHO
|
|||
|
||||
const ForgettingCurveUtils::ProbabilityTable ForgettingCurveUtils::sProbabilityTable;
|
||||
|
||||
// TODO: Revise the logic to decide the initial probability depending on the given probability.
|
||||
/* static */ const HistoricalInfo ForgettingCurveUtils::createUpdatedHistoricalInfo(
|
||||
const HistoricalInfo *const originalHistoricalInfo,
|
||||
const int newProbability, const int timestamp) {
|
||||
|
|
|
@ -26,7 +26,6 @@ namespace latinime {
|
|||
|
||||
class DictionaryHeaderStructurePolicy;
|
||||
|
||||
// TODO: Quit using bigram probability to indicate the delta.
|
||||
class ForgettingCurveUtils {
|
||||
public:
|
||||
static const int MAX_UNIGRAM_COUNT;
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
namespace latinime {
|
||||
|
||||
// TODO: Quit using bigram probability to indicate the delta.
|
||||
class ProbabilityUtils {
|
||||
public:
|
||||
static AK_FORCE_INLINE int backoff(const int unigramProbability) {
|
||||
|
|
Loading…
Reference in New Issue