Infrastructure for lang= hint to suppress other languages in close sets
git-svn-id: https://cld2.googlecode.com/svn/trunk@13 b252ecd4-b096-bf77-eb8e-91563289f87e
This commit is contained in:
@@ -319,9 +319,11 @@ void CLD2_Debug(const char* text,
|
||||
// Score boosts for langprior and distinct tokens
|
||||
// Get boosts for current script
|
||||
const LangBoosts* langprior_boost = &scoringcontext->langprior_boost.latn;
|
||||
const LangBoosts* langprior_whack = &scoringcontext->langprior_whack.latn;
|
||||
const LangBoosts* distinct_boost = &scoringcontext->distinct_boost.latn;
|
||||
if (scoringcontext->ulscript != ULScript_Latin) {
|
||||
langprior_boost = &scoringcontext->langprior_boost.othr;
|
||||
langprior_whack = &scoringcontext->langprior_whack.othr;
|
||||
distinct_boost = &scoringcontext->distinct_boost.othr;
|
||||
}
|
||||
fprintf(df, "LangPrior_boost: ");
|
||||
@@ -332,6 +334,14 @@ void CLD2_Debug(const char* text,
|
||||
GetLangProbTxt(scoringcontext, langprob).c_str());
|
||||
}
|
||||
}
|
||||
fprintf(df, "LangPrior_whack: ");
|
||||
for (int k = 0; k < kMaxBoosts; ++k) {
|
||||
uint32 langprob = langprior_whack->langprob[k];
|
||||
if (langprob > 0) {
|
||||
fprintf(df, "%s ",
|
||||
GetLangProbTxt(scoringcontext, langprob).c_str());
|
||||
}
|
||||
}
|
||||
fprintf(df, "Distinct_boost: ");
|
||||
for (int k = 0; k < kMaxBoosts; ++k) {
|
||||
uint32 langprob = distinct_boost->langprob[k];
|
||||
|
Reference in New Issue
Block a user