extensions/universalchardet/src/base/LangCyrillicModel.cpp

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/extensions/universalchardet/src/base/LangCyrillicModel.cpp	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,323 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#include "nsSBCharSetProber.h"
    1.10 +
    1.11 +
    1.12 +
    1.13 +//KOI8-R language model
    1.14 +//Character Mapping Table:
    1.15 +static const unsigned char KOI8R_CharToOrderMap[] =
    1.16 +{
    1.17 +255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,  //00
    1.18 +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  //10
    1.19 ++253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,  //20
    1.20 +252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,  //30
    1.21 +253,142,143,144,145,146,147,148,149,150,151,152, 74,153, 75,154,  //40
    1.22 +155,156,157,158,159,160,161,162,163,164,165,253,253,253,253,253,  //50
    1.23 +253, 71,172, 66,173, 65,174, 76,175, 64,176,177, 77, 72,178, 69,  //60
    1.24 + 67,179, 78, 73,180,181, 79,182,183,184,185,253,253,253,253,253,  //70
    1.25 +191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,  //80
    1.26 +207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,  //90
    1.27 +223,224,225, 68,226,227,228,229,230,231,232,233,234,235,236,237,  //a0
    1.28 +238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,  //b0
    1.29 + 27,  3, 21, 28, 13,  2, 39, 19, 26,  4, 23, 11,  8, 12,  5,  1,  //c0
    1.30 + 15, 16,  9,  7,  6, 14, 24, 10, 17, 18, 20, 25, 30, 29, 22, 54,  //d0
    1.31 + 59, 37, 44, 58, 41, 48, 53, 46, 55, 42, 60, 36, 49, 38, 31, 34,  //e0
    1.32 + 35, 43, 45, 32, 40, 52, 56, 33, 61, 62, 51, 57, 47, 63, 50, 70,  //f0
    1.33 +};
    1.34 +
    1.35 +static const unsigned char win1251_CharToOrderMap[] =
    1.36 +{
    1.37 +255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,  //00
    1.38 +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  //10
    1.39 ++253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,  //20
    1.40 +252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,  //30
    1.41 +253,142,143,144,145,146,147,148,149,150,151,152, 74,153, 75,154,  //40
    1.42 +155,156,157,158,159,160,161,162,163,164,165,253,253,253,253,253,  //50
    1.43 +253, 71,172, 66,173, 65,174, 76,175, 64,176,177, 77, 72,178, 69,  //60
    1.44 + 67,179, 78, 73,180,181, 79,182,183,184,185,253,253,253,253,253,  //70
    1.45 +191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,
    1.46 +207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,
    1.47 +223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,
    1.48 +239,240,241,242,243,244,245,246, 68,247,248,249,250,251,252,253,
    1.49 + 37, 44, 33, 46, 41, 48, 56, 51, 42, 60, 36, 49, 38, 31, 34, 35,
    1.50 + 45, 32, 40, 52, 53, 55, 58, 50, 57, 63, 70, 62, 61, 47, 59, 43,
    1.51 +  3, 21, 10, 19, 13,  2, 24, 20,  4, 23, 11,  8, 12,  5,  1, 15,
    1.52 +  9,  7,  6, 14, 39, 26, 28, 22, 25, 29, 54, 18, 17, 30, 27, 16,
    1.53 +};
    1.54 +
    1.55 +static const unsigned char latin5_CharToOrderMap[] =
    1.56 +{
    1.57 +255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,  //00
    1.58 +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  //10
    1.59 ++253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,  //20
    1.60 +252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,  //30
    1.61 +253,142,143,144,145,146,147,148,149,150,151,152, 74,153, 75,154,  //40
    1.62 +155,156,157,158,159,160,161,162,163,164,165,253,253,253,253,253,  //50
    1.63 +253, 71,172, 66,173, 65,174, 76,175, 64,176,177, 77, 72,178, 69,  //60
    1.64 + 67,179, 78, 73,180,181, 79,182,183,184,185,253,253,253,253,253,  //70
    1.65 +191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,
    1.66 +207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,
    1.67 +223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,
    1.68 + 37, 44, 33, 46, 41, 48, 56, 51, 42, 60, 36, 49, 38, 31, 34, 35,
    1.69 + 45, 32, 40, 52, 53, 55, 58, 50, 57, 63, 70, 62, 61, 47, 59, 43,
    1.70 +  3, 21, 10, 19, 13,  2, 24, 20,  4, 23, 11,  8, 12,  5,  1, 15,
    1.71 +  9,  7,  6, 14, 39, 26, 28, 22, 25, 29, 54, 18, 17, 30, 27, 16,
    1.72 +239, 68,240,241,242,243,244,245,246,247,248,249,250,251,252,255,
    1.73 +};
    1.74 +
    1.75 +static const unsigned char macCyrillic_CharToOrderMap[] =
    1.76 +{
    1.77 +255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,  //00
    1.78 +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  //10
    1.79 ++253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,  //20
    1.80 +252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,  //30
    1.81 +253,142,143,144,145,146,147,148,149,150,151,152, 74,153, 75,154,  //40
    1.82 +155,156,157,158,159,160,161,162,163,164,165,253,253,253,253,253,  //50
    1.83 +253, 71,172, 66,173, 65,174, 76,175, 64,176,177, 77, 72,178, 69,  //60
    1.84 + 67,179, 78, 73,180,181, 79,182,183,184,185,253,253,253,253,253,  //70
    1.85 + 37, 44, 33, 46, 41, 48, 56, 51, 42, 60, 36, 49, 38, 31, 34, 35,
    1.86 + 45, 32, 40, 52, 53, 55, 58, 50, 57, 63, 70, 62, 61, 47, 59, 43,
    1.87 +191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,
    1.88 +207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,
    1.89 +223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,
    1.90 +239,240,241,242,243,244,245,246,247,248,249,250,251,252, 68, 16,
    1.91 +  3, 21, 10, 19, 13,  2, 24, 20,  4, 23, 11,  8, 12,  5,  1, 15,
    1.92 +  9,  7,  6, 14, 39, 26, 28, 22, 25, 29, 54, 18, 17, 30, 27,255,
    1.93 +};
    1.94 +
    1.95 +static const unsigned char IBM855_CharToOrderMap[] =
    1.96 +{
    1.97 +255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,  //00
    1.98 +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  //10
    1.99 ++253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,  //20
   1.100 +252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,  //30
   1.101 +253,142,143,144,145,146,147,148,149,150,151,152, 74,153, 75,154,  //40
   1.102 +155,156,157,158,159,160,161,162,163,164,165,253,253,253,253,253,  //50
   1.103 +253, 71,172, 66,173, 65,174, 76,175, 64,176,177, 77, 72,178, 69,  //60
   1.104 + 67,179, 78, 73,180,181, 79,182,183,184,185,253,253,253,253,253,  //70
   1.105 +191,192,193,194, 68,195,196,197,198,199,200,201,202,203,204,205,
   1.106 +206,207,208,209,210,211,212,213,214,215,216,217, 27, 59, 54, 70,
   1.107 +  3, 37, 21, 44, 28, 58, 13, 41,  2, 48, 39, 53, 19, 46,218,219,
   1.108 +220,221,222,223,224, 26, 55,  4, 42,225,226,227,228, 23, 60,229,
   1.109 +230,231,232,233,234,235, 11, 36,236,237,238,239,240,241,242,243,
   1.110 +  8, 49, 12, 38,  5, 31,  1, 34, 15,244,245,246,247, 35, 16,248,
   1.111 + 43,  9, 45,  7, 32,  6, 40, 14, 52, 24, 56, 10, 33, 17, 61,249,
   1.112 +250, 18, 62, 20, 51, 25, 57, 30, 47, 29, 63, 22, 50,251,252,255,
   1.113 +};
   1.114 +
   1.115 +static const unsigned char IBM866_CharToOrderMap[] =
   1.116 +{
   1.117 +255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,  //00
   1.118 +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  //10
   1.119 ++253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,  //20
   1.120 +252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,  //30
   1.121 +253,142,143,144,145,146,147,148,149,150,151,152, 74,153, 75,154,  //40
   1.122 +155,156,157,158,159,160,161,162,163,164,165,253,253,253,253,253,  //50
   1.123 +253, 71,172, 66,173, 65,174, 76,175, 64,176,177, 77, 72,178, 69,  //60
   1.124 + 67,179, 78, 73,180,181, 79,182,183,184,185,253,253,253,253,253,  //70
   1.125 + 37, 44, 33, 46, 41, 48, 56, 51, 42, 60, 36, 49, 38, 31, 34, 35,
   1.126 + 45, 32, 40, 52, 53, 55, 58, 50, 57, 63, 70, 62, 61, 47, 59, 43,
   1.127 +  3, 21, 10, 19, 13,  2, 24, 20,  4, 23, 11,  8, 12,  5,  1, 15,
   1.128 +191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,
   1.129 +207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,
   1.130 +223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,
   1.131 +  9,  7,  6, 14, 39, 26, 28, 22, 25, 29, 54, 18, 17, 30, 27, 16,
   1.132 +239, 68,240,241,242,243,244,245,246,247,248,249,250,251,252,255,
   1.133 +};
   1.134 +
   1.135 +//Model Table: 
   1.136 +//total sequences: 100%
   1.137 +//first 512 sequences: 97.6601%
   1.138 +//first 1024 sequences: 2.3389%
   1.139 +//rest  sequences:      0.1237%
   1.140 +//negative sequences:   0.0009% 
   1.141 +static const uint8_t RussianLangModel[] = 
   1.142 +{
   1.143 +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,
   1.144 +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,
   1.145 +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,
   1.146 +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,
   1.147 +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,
   1.148 +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,
   1.149 +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,
   1.150 +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,
   1.151 +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,
   1.152 +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,
   1.153 +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,
   1.154 +0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,
   1.155 +3,3,3,3,3,3,2,3,3,3,3,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,0,0,0,0,1,0,0,
   1.271 +};
   1.272 +
   1.273 +
   1.274 +const SequenceModel Koi8rModel = 
   1.275 +{
   1.276 +  KOI8R_CharToOrderMap,
   1.277 +  RussianLangModel,
   1.278 +  (float)0.976601,
   1.279 +  false,
   1.280 +  "KOI8-R"
   1.281 +};
   1.282 +
   1.283 +const SequenceModel Win1251Model = 
   1.284 +{
   1.285 +  win1251_CharToOrderMap,
   1.286 +  RussianLangModel,
   1.287 +  (float)0.976601,
   1.288 +  false,
   1.289 +  "windows-1251"
   1.290 +};
   1.291 +
   1.292 +const SequenceModel Latin5Model = 
   1.293 +{
   1.294 +  latin5_CharToOrderMap,
   1.295 +  RussianLangModel,
   1.296 +  (float)0.976601,
   1.297 +  false,
   1.298 +  "ISO-8859-5"
   1.299 +};
   1.300 +
   1.301 +const SequenceModel MacCyrillicModel = 
   1.302 +{
   1.303 +  macCyrillic_CharToOrderMap,
   1.304 +  RussianLangModel,
   1.305 +  (float)0.976601,
   1.306 +  false,
   1.307 +  "x-mac-cyrillic"
   1.308 +};
   1.309 +
   1.310 +const SequenceModel Ibm866Model = 
   1.311 +{
   1.312 +  IBM866_CharToOrderMap,
   1.313 +  RussianLangModel,
   1.314 +  (float)0.976601,
   1.315 +  false,
   1.316 +  "IBM866"
   1.317 +};
   1.318 +
   1.319 +const SequenceModel Ibm855Model = 
   1.320 +{
   1.321 +  IBM855_CharToOrderMap,
   1.322 +  RussianLangModel,
   1.323 +  (float)0.976601,
   1.324 +  false,
   1.325 +  "IBM855"
   1.326 +};

mercurial