Skip to content

Commit

Permalink
Bug 1308021 - Replace "iw" with "he" in cld2 detectLanguage results. …
Browse files Browse the repository at this point in the history
…r=florian

I have a pull request for these changes upstream:
CLD2Owners/cld2#50

MozReview-Commit-ID: LUqrA4Genv0
  • Loading branch information
eeejay committed Oct 7, 2016
1 parent 6668691 commit 78fe5d0
Show file tree
Hide file tree
Showing 7 changed files with 91 additions and 122 deletions.
182 changes: 77 additions & 105 deletions browser/components/translation/cld2/cld-worker.js

Large diffs are not rendered by default.

Binary file modified browser/components/translation/cld2/cld-worker.js.mem
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ extern const short kAvgDeltaOctaScore[kAvgDeltaOctaScoreSize] = {
1306, 0, 0, 0, // 3 FINNISH fi
1033, 0, 0, 0, // 4 FRENCH fr
1306, 0, 0, 0, // 5 GERMAN de
0, 0, 0, 776, // 6 HEBREW iw
0, 0, 0, 776, // 6 HEBREW he
960, 0, 0, 0, // 7 ITALIAN it
0, 0, 0, 3100, // 8 Japanese ja
0, 0, 0, 3669, // 9 Korean ko
Expand Down Expand Up @@ -637,4 +637,3 @@ extern const short kAvgDeltaOctaScore[kAvgDeltaOctaScoreSize] = {
};

} // End namespace CLD2

Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ static const LangTagLookup kCLDLangTagsHintTable1[kCLDTable1Size] = {
{"haitian_creole", "ht", HAITIAN_CREOLE + W10, 0},
{"hausa", "ha", HAUSA + W10, 0},
{"hawaiian", "haw", HAWAIIAN + W10, 0},
{"hebrew", "iw", HEBREW + W10, 0},
{"hebrew", "he", HEBREW + W10, 0},
{"hindi", "hi", HINDI + W10, MARATHI - W4},
{"hn-in", "hi", HINDI + W10, MARATHI - W4},
{"hungarian", "hu", HUNGARIAN + W10, 0},
Expand Down Expand Up @@ -447,9 +447,9 @@ static const LangTagLookup kCLDLangTagsHintTable2[kCLDTable2Size] = {
{"ha", "ha", HAUSA + W10, 0},
{"hat", "ht", HAITIAN_CREOLE + W10, 0}, // Haiti
{"haw", "haw", HAWAIIAN + W10, 0},
{"hb", "iw", HEBREW + W10, 0},
{"he", "iw", HEBREW + W10, 0},
{"heb", "iw", HEBREW + W10, 0},
{"hb", "he", HEBREW + W10, 0},
{"he", "he", HEBREW + W10, 0},
{"heb", "he", HEBREW + W10, 0},
{"hi", "hi", HINDI + W10, MARATHI - W4},
{"hk", "zhT", CHINESE_T + W10, 0}, // Hong Kong
{"hr", "hr", CROATIAN + W10, 0},
Expand All @@ -473,7 +473,7 @@ static const LangTagLookup kCLDLangTagsHintTable2[kCLDTable2Size] = {
{"it", "it", ITALIAN + W10, 0},
{"ita", "it", ITALIAN + W10, 0},
{"iu", "iu,ik", INUKTITUT + W10, INUPIAK + W10}, // 1:2
{"iw", "iw", HEBREW + W10, 0},
{"iw", "he", HEBREW + W10, 0},

{"ja", "ja", JAPANESE + W10, 0},
{"jp", "ja", JAPANESE + W10, 0}, // Japan
Expand Down Expand Up @@ -1647,5 +1647,3 @@ string GetLangTagsFromHtml(const char* utf8_body, int32 utf8_body_len,
} // End namespace CLD2

//==============================================================================


Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ extern const char* const kLanguageToName[kLanguageToNameSize] = {
"FINNISH", // 3 fi
"FRENCH", // 4 fr
"GERMAN", // 5 de
"HEBREW", // 6 iw
"HEBREW", // 6 he
"ITALIAN", // 7 it
"Japanese", // 8 ja
"Korean", // 9 ko
Expand Down Expand Up @@ -651,7 +651,7 @@ extern const char* const kLanguageToCode[kLanguageToCodeSize] = {
"fi", // 3 FINNISH
"fr", // 4 FRENCH
"de", // 5 GERMAN
"iw", // 6 HEBREW
"he", // 6 HEBREW
"it", // 7 ITALIAN
"ja", // 8 Japanese
"ko", // 9 Korean
Expand Down Expand Up @@ -1270,7 +1270,7 @@ extern const char* const kLanguageToCName[kLanguageToCNameSize] = {
"FINNISH", // 3 fi
"FRENCH", // 4 fr
"GERMAN", // 5 de
"HEBREW", // 6 iw
"HEBREW", // 6 he
"ITALIAN", // 7 it
"JAPANESE", // 8 ja
"KOREAN", // 9 ko
Expand Down Expand Up @@ -1890,7 +1890,7 @@ extern const FourScripts kLanguageToScripts[kLanguageToScriptsSize] = {
{ULScript_Latin, None, None, None, }, // 3 fi
{ULScript_Latin, None, None, None, }, // 4 fr
{ULScript_Latin, None, None, None, }, // 5 de
{ULScript_Hebrew, None, None, None, }, // 6 iw
{ULScript_Hebrew, None, None, None, }, // 6 he
{ULScript_Latin, None, None, None, }, // 7 it
{ULScript_Hani, None, None, None, }, // 8 ja
{ULScript_Hani, None, None, None, }, // 9 ko
Expand Down Expand Up @@ -2510,7 +2510,7 @@ extern const uint8 kLanguageToPLang[kLanguageToPLangSize] = {
4, // 3 fi
5, // 4 fr
6, // 5 de
1, // 6 iw
1, // 6 he
7, // 7 it
2, // 8 ja
3, // 9 ko
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ typedef enum {
FINNISH = 3, // fi
FRENCH = 4, // fr
GERMAN = 5, // de
HEBREW = 6, // iw
HEBREW = 6, // he
ITALIAN = 7, // it
JAPANESE = 8, // ja
KOREAN = 9, // ko
Expand Down
4 changes: 2 additions & 2 deletions browser/components/translation/test/unit/test_cld2.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 78fe5d0

Please sign in to comment.