extensions/universalchardet/src/base/LangCyrillicModel.cpp

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
michael@0 2 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 5
michael@0 6 #include "nsSBCharSetProber.h"
michael@0 7
michael@0 8
michael@0 9
michael@0 10 //KOI8-R language model
michael@0 11 //Character Mapping Table:
michael@0 12 static const unsigned char KOI8R_CharToOrderMap[] =
michael@0 13 {
michael@0 14 255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255, //00
michael@0 15 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, //10
michael@0 16 +253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253, //20
michael@0 17 252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253, //30
michael@0 18 253,142,143,144,145,146,147,148,149,150,151,152, 74,153, 75,154, //40
michael@0 19 155,156,157,158,159,160,161,162,163,164,165,253,253,253,253,253, //50
michael@0 20 253, 71,172, 66,173, 65,174, 76,175, 64,176,177, 77, 72,178, 69, //60
michael@0 21 67,179, 78, 73,180,181, 79,182,183,184,185,253,253,253,253,253, //70
michael@0 22 191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206, //80
michael@0 23 207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222, //90
michael@0 24 223,224,225, 68,226,227,228,229,230,231,232,233,234,235,236,237, //a0
michael@0 25 238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253, //b0
michael@0 26 27, 3, 21, 28, 13, 2, 39, 19, 26, 4, 23, 11, 8, 12, 5, 1, //c0
michael@0 27 15, 16, 9, 7, 6, 14, 24, 10, 17, 18, 20, 25, 30, 29, 22, 54, //d0
michael@0 28 59, 37, 44, 58, 41, 48, 53, 46, 55, 42, 60, 36, 49, 38, 31, 34, //e0
michael@0 29 35, 43, 45, 32, 40, 52, 56, 33, 61, 62, 51, 57, 47, 63, 50, 70, //f0
michael@0 30 };
michael@0 31
michael@0 32 static const unsigned char win1251_CharToOrderMap[] =
michael@0 33 {
michael@0 34 255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255, //00
michael@0 35 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, //10
michael@0 36 +253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253, //20
michael@0 37 252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253, //30
michael@0 38 253,142,143,144,145,146,147,148,149,150,151,152, 74,153, 75,154, //40
michael@0 39 155,156,157,158,159,160,161,162,163,164,165,253,253,253,253,253, //50
michael@0 40 253, 71,172, 66,173, 65,174, 76,175, 64,176,177, 77, 72,178, 69, //60
michael@0 41 67,179, 78, 73,180,181, 79,182,183,184,185,253,253,253,253,253, //70
michael@0 42 191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,
michael@0 43 207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,
michael@0 44 223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,
michael@0 45 239,240,241,242,243,244,245,246, 68,247,248,249,250,251,252,253,
michael@0 46 37, 44, 33, 46, 41, 48, 56, 51, 42, 60, 36, 49, 38, 31, 34, 35,
michael@0 47 45, 32, 40, 52, 53, 55, 58, 50, 57, 63, 70, 62, 61, 47, 59, 43,
michael@0 48 3, 21, 10, 19, 13, 2, 24, 20, 4, 23, 11, 8, 12, 5, 1, 15,
michael@0 49 9, 7, 6, 14, 39, 26, 28, 22, 25, 29, 54, 18, 17, 30, 27, 16,
michael@0 50 };
michael@0 51
michael@0 52 static const unsigned char latin5_CharToOrderMap[] =
michael@0 53 {
michael@0 54 255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255, //00
michael@0 55 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, //10
michael@0 56 +253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253, //20
michael@0 57 252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253, //30
michael@0 58 253,142,143,144,145,146,147,148,149,150,151,152, 74,153, 75,154, //40
michael@0 59 155,156,157,158,159,160,161,162,163,164,165,253,253,253,253,253, //50
michael@0 60 253, 71,172, 66,173, 65,174, 76,175, 64,176,177, 77, 72,178, 69, //60
michael@0 61 67,179, 78, 73,180,181, 79,182,183,184,185,253,253,253,253,253, //70
michael@0 62 191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,
michael@0 63 207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,
michael@0 64 223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,
michael@0 65 37, 44, 33, 46, 41, 48, 56, 51, 42, 60, 36, 49, 38, 31, 34, 35,
michael@0 66 45, 32, 40, 52, 53, 55, 58, 50, 57, 63, 70, 62, 61, 47, 59, 43,
michael@0 67 3, 21, 10, 19, 13, 2, 24, 20, 4, 23, 11, 8, 12, 5, 1, 15,
michael@0 68 9, 7, 6, 14, 39, 26, 28, 22, 25, 29, 54, 18, 17, 30, 27, 16,
michael@0 69 239, 68,240,241,242,243,244,245,246,247,248,249,250,251,252,255,
michael@0 70 };
michael@0 71
michael@0 72 static const unsigned char macCyrillic_CharToOrderMap[] =
michael@0 73 {
michael@0 74 255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255, //00
michael@0 75 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, //10
michael@0 76 +253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253, //20
michael@0 77 252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253, //30
michael@0 78 253,142,143,144,145,146,147,148,149,150,151,152, 74,153, 75,154, //40
michael@0 79 155,156,157,158,159,160,161,162,163,164,165,253,253,253,253,253, //50
michael@0 80 253, 71,172, 66,173, 65,174, 76,175, 64,176,177, 77, 72,178, 69, //60
michael@0 81 67,179, 78, 73,180,181, 79,182,183,184,185,253,253,253,253,253, //70
michael@0 82 37, 44, 33, 46, 41, 48, 56, 51, 42, 60, 36, 49, 38, 31, 34, 35,
michael@0 83 45, 32, 40, 52, 53, 55, 58, 50, 57, 63, 70, 62, 61, 47, 59, 43,
michael@0 84 191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,
michael@0 85 207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,
michael@0 86 223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,
michael@0 87 239,240,241,242,243,244,245,246,247,248,249,250,251,252, 68, 16,
michael@0 88 3, 21, 10, 19, 13, 2, 24, 20, 4, 23, 11, 8, 12, 5, 1, 15,
michael@0 89 9, 7, 6, 14, 39, 26, 28, 22, 25, 29, 54, 18, 17, 30, 27,255,
michael@0 90 };
michael@0 91
michael@0 92 static const unsigned char IBM855_CharToOrderMap[] =
michael@0 93 {
michael@0 94 255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255, //00
michael@0 95 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, //10
michael@0 96 +253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253, //20
michael@0 97 252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253, //30
michael@0 98 253,142,143,144,145,146,147,148,149,150,151,152, 74,153, 75,154, //40
michael@0 99 155,156,157,158,159,160,161,162,163,164,165,253,253,253,253,253, //50
michael@0 100 253, 71,172, 66,173, 65,174, 76,175, 64,176,177, 77, 72,178, 69, //60
michael@0 101 67,179, 78, 73,180,181, 79,182,183,184,185,253,253,253,253,253, //70
michael@0 102 191,192,193,194, 68,195,196,197,198,199,200,201,202,203,204,205,
michael@0 103 206,207,208,209,210,211,212,213,214,215,216,217, 27, 59, 54, 70,
michael@0 104 3, 37, 21, 44, 28, 58, 13, 41, 2, 48, 39, 53, 19, 46,218,219,
michael@0 105 220,221,222,223,224, 26, 55, 4, 42,225,226,227,228, 23, 60,229,
michael@0 106 230,231,232,233,234,235, 11, 36,236,237,238,239,240,241,242,243,
michael@0 107 8, 49, 12, 38, 5, 31, 1, 34, 15,244,245,246,247, 35, 16,248,
michael@0 108 43, 9, 45, 7, 32, 6, 40, 14, 52, 24, 56, 10, 33, 17, 61,249,
michael@0 109 250, 18, 62, 20, 51, 25, 57, 30, 47, 29, 63, 22, 50,251,252,255,
michael@0 110 };
michael@0 111
michael@0 112 static const unsigned char IBM866_CharToOrderMap[] =
michael@0 113 {
michael@0 114 255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255, //00
michael@0 115 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, //10
michael@0 116 +253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253, //20
michael@0 117 252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253, //30
michael@0 118 253,142,143,144,145,146,147,148,149,150,151,152, 74,153, 75,154, //40
michael@0 119 155,156,157,158,159,160,161,162,163,164,165,253,253,253,253,253, //50
michael@0 120 253, 71,172, 66,173, 65,174, 76,175, 64,176,177, 77, 72,178, 69, //60
michael@0 121 67,179, 78, 73,180,181, 79,182,183,184,185,253,253,253,253,253, //70
michael@0 122 37, 44, 33, 46, 41, 48, 56, 51, 42, 60, 36, 49, 38, 31, 34, 35,
michael@0 123 45, 32, 40, 52, 53, 55, 58, 50, 57, 63, 70, 62, 61, 47, 59, 43,
michael@0 124 3, 21, 10, 19, 13, 2, 24, 20, 4, 23, 11, 8, 12, 5, 1, 15,
michael@0 125 191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,
michael@0 126 207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,
michael@0 127 223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,
michael@0 128 9, 7, 6, 14, 39, 26, 28, 22, 25, 29, 54, 18, 17, 30, 27, 16,
michael@0 129 239, 68,240,241,242,243,244,245,246,247,248,249,250,251,252,255,
michael@0 130 };
michael@0 131
michael@0 132 //Model Table:
michael@0 133 //total sequences: 100%
michael@0 134 //first 512 sequences: 97.6601%
michael@0 135 //first 1024 sequences: 2.3389%
michael@0 136 //rest sequences: 0.1237%
michael@0 137 //negative sequences: 0.0009%
michael@0 138 static const uint8_t RussianLangModel[] =
michael@0 139 {
michael@0 140 0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,1,3,3,3,3,1,3,3,3,2,3,2,3,3,
michael@0 141 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,3,2,2,2,2,2,0,0,2,
michael@0 142 3,3,3,2,3,3,3,3,3,3,3,3,3,3,2,3,3,0,0,3,3,3,3,3,3,3,3,3,2,3,2,0,
michael@0 143 0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
michael@0 144 3,3,3,2,2,3,3,3,3,3,3,3,3,3,2,3,3,0,0,3,3,3,3,3,3,3,3,2,3,3,1,0,
michael@0 145 0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
michael@0 146 3,2,3,2,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,3,3,3,3,3,3,3,3,3,3,3,2,1,
michael@0 147 0,0,0,0,0,0,0,2,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
michael@0 148 3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,0,0,3,3,3,3,3,3,3,3,3,3,3,2,1,
michael@0 149 0,0,0,0,0,1,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
michael@0 150 3,3,3,3,3,3,3,3,2,2,2,3,1,3,3,1,3,3,3,3,2,2,3,0,2,2,2,3,3,2,1,0,
michael@0 151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,
michael@0 208 2,0,0,1,0,3,2,2,2,2,1,2,1,2,1,2,0,0,0,2,1,2,2,1,1,2,2,0,1,1,0,2,
michael@0 209 1,1,1,1,1,0,1,1,1,2,1,1,1,2,1,0,1,2,1,1,1,1,0,1,1,1,0,0,1,0,0,1,
michael@0 210 1,3,2,2,2,1,1,1,2,3,0,0,0,0,2,0,2,2,1,0,0,0,0,0,0,1,0,0,0,0,1,1,
michael@0 211 1,0,1,1,0,1,0,1,1,0,1,1,0,2,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,1,1,0,
michael@0 212 2,3,2,3,2,1,2,2,2,2,1,0,0,0,2,0,0,1,1,0,0,0,0,0,0,0,1,1,0,0,2,1,
michael@0 213 1,1,2,1,0,2,0,0,1,0,1,0,0,1,0,0,1,1,0,1,1,0,0,0,0,0,1,0,0,0,0,0,
michael@0 214 3,0,0,1,0,2,2,2,3,2,2,2,2,2,2,2,0,0,0,2,1,2,1,1,1,2,2,0,0,0,1,2,
michael@0 215 1,1,1,1,1,0,1,2,1,1,1,1,1,1,1,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0,0,1,
michael@0 216 2,3,2,3,3,2,0,1,1,1,0,0,1,0,2,0,1,1,3,1,0,0,0,0,0,0,0,1,0,0,2,1,
michael@0 217 1,1,1,1,1,1,1,0,1,0,1,1,1,1,0,1,1,1,0,0,1,1,0,1,0,0,0,0,0,0,1,0,
michael@0 218 2,3,3,3,3,1,2,2,2,2,0,1,1,0,2,1,1,1,2,1,0,1,1,0,0,1,0,1,0,0,2,0,
michael@0 219 0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
michael@0 220 2,3,3,3,2,0,0,1,1,2,2,1,0,0,2,0,1,1,3,0,0,1,0,0,0,0,0,1,0,1,2,1,
michael@0 221 1,1,2,0,1,1,1,0,1,0,1,1,0,1,0,1,1,1,1,0,1,0,0,0,0,0,0,1,0,1,1,0,
michael@0 222 1,3,2,3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,0,0,0,1,
michael@0 265 1,1,0,1,1,0,1,0,1,0,0,0,0,1,1,0,1,1,0,0,0,0,0,1,0,1,1,0,1,0,0,0,
michael@0 266 0,1,1,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
michael@0 267 0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,
michael@0 268 };
michael@0 269
michael@0 270
michael@0 271 const SequenceModel Koi8rModel =
michael@0 272 {
michael@0 273 KOI8R_CharToOrderMap,
michael@0 274 RussianLangModel,
michael@0 275 (float)0.976601,
michael@0 276 false,
michael@0 277 "KOI8-R"
michael@0 278 };
michael@0 279
michael@0 280 const SequenceModel Win1251Model =
michael@0 281 {
michael@0 282 win1251_CharToOrderMap,
michael@0 283 RussianLangModel,
michael@0 284 (float)0.976601,
michael@0 285 false,
michael@0 286 "windows-1251"
michael@0 287 };
michael@0 288
michael@0 289 const SequenceModel Latin5Model =
michael@0 290 {
michael@0 291 latin5_CharToOrderMap,
michael@0 292 RussianLangModel,
michael@0 293 (float)0.976601,
michael@0 294 false,
michael@0 295 "ISO-8859-5"
michael@0 296 };
michael@0 297
michael@0 298 const SequenceModel MacCyrillicModel =
michael@0 299 {
michael@0 300 macCyrillic_CharToOrderMap,
michael@0 301 RussianLangModel,
michael@0 302 (float)0.976601,
michael@0 303 false,
michael@0 304 "x-mac-cyrillic"
michael@0 305 };
michael@0 306
michael@0 307 const SequenceModel Ibm866Model =
michael@0 308 {
michael@0 309 IBM866_CharToOrderMap,
michael@0 310 RussianLangModel,
michael@0 311 (float)0.976601,
michael@0 312 false,
michael@0 313 "IBM866"
michael@0 314 };
michael@0 315
michael@0 316 const SequenceModel Ibm855Model =
michael@0 317 {
michael@0 318 IBM855_CharToOrderMap,
michael@0 319 RussianLangModel,
michael@0 320 (float)0.976601,
michael@0 321 false,
michael@0 322 "IBM855"
michael@0 323 };

mercurial