langcyrillicmodel.py 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  1. ######################## BEGIN LICENSE BLOCK ########################
  2. # The Original Code is Mozilla Communicator client code.
  3. #
  4. # The Initial Developer of the Original Code is
  5. # Netscape Communications Corporation.
  6. # Portions created by the Initial Developer are Copyright (C) 1998
  7. # the Initial Developer. All Rights Reserved.
  8. #
  9. # Contributor(s):
  10. # Mark Pilgrim - port to Python
  11. #
  12. # This library is free software; you can redistribute it and/or
  13. # modify it under the terms of the GNU Lesser General Public
  14. # License as published by the Free Software Foundation; either
  15. # version 2.1 of the License, or (at your option) any later version.
  16. #
  17. # This library is distributed in the hope that it will be useful,
  18. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  20. # Lesser General Public License for more details.
  21. #
  22. # You should have received a copy of the GNU Lesser General Public
  23. # License along with this library; if not, write to the Free Software
  24. # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  25. # 02110-1301 USA
  26. ######################### END LICENSE BLOCK #########################
  27. # KOI8-R language model
  28. # Character Mapping Table:
  29. KOI8R_CharToOrderMap = (
  30. 255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255, # 00
  31. 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, # 10
  32. 253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253, # 20
  33. 252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253, # 30
  34. 253,142,143,144,145,146,147,148,149,150,151,152, 74,153, 75,154, # 40
  35. 155,156,157,158,159,160,161,162,163,164,165,253,253,253,253,253, # 50
  36. 253, 71,172, 66,173, 65,174, 76,175, 64,176,177, 77, 72,178, 69, # 60
  37. 67,179, 78, 73,180,181, 79,182,183,184,185,253,253,253,253,253, # 70
  38. 191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206, # 80
  39. 207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222, # 90
  40. 223,224,225, 68,226,227,228,229,230,231,232,233,234,235,236,237, # a0
  41. 238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253, # b0
  42. 27, 3, 21, 28, 13, 2, 39, 19, 26, 4, 23, 11, 8, 12, 5, 1, # c0
  43. 15, 16, 9, 7, 6, 14, 24, 10, 17, 18, 20, 25, 30, 29, 22, 54, # d0
  44. 59, 37, 44, 58, 41, 48, 53, 46, 55, 42, 60, 36, 49, 38, 31, 34, # e0
  45. 35, 43, 45, 32, 40, 52, 56, 33, 61, 62, 51, 57, 47, 63, 50, 70, # f0
  46. )
  47. win1251_CharToOrderMap = (
  48. 255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255, # 00
  49. 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, # 10
  50. 253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253, # 20
  51. 252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253, # 30
  52. 253,142,143,144,145,146,147,148,149,150,151,152, 74,153, 75,154, # 40
  53. 155,156,157,158,159,160,161,162,163,164,165,253,253,253,253,253, # 50
  54. 253, 71,172, 66,173, 65,174, 76,175, 64,176,177, 77, 72,178, 69, # 60
  55. 67,179, 78, 73,180,181, 79,182,183,184,185,253,253,253,253,253, # 70
  56. 191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,
  57. 207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,
  58. 223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,
  59. 239,240,241,242,243,244,245,246, 68,247,248,249,250,251,252,253,
  60. 37, 44, 33, 46, 41, 48, 56, 51, 42, 60, 36, 49, 38, 31, 34, 35,
  61. 45, 32, 40, 52, 53, 55, 58, 50, 57, 63, 70, 62, 61, 47, 59, 43,
  62. 3, 21, 10, 19, 13, 2, 24, 20, 4, 23, 11, 8, 12, 5, 1, 15,
  63. 9, 7, 6, 14, 39, 26, 28, 22, 25, 29, 54, 18, 17, 30, 27, 16,
  64. )
  65. latin5_CharToOrderMap = (
  66. 255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255, # 00
  67. 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, # 10
  68. 253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253, # 20
  69. 252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253, # 30
  70. 253,142,143,144,145,146,147,148,149,150,151,152, 74,153, 75,154, # 40
  71. 155,156,157,158,159,160,161,162,163,164,165,253,253,253,253,253, # 50
  72. 253, 71,172, 66,173, 65,174, 76,175, 64,176,177, 77, 72,178, 69, # 60
  73. 67,179, 78, 73,180,181, 79,182,183,184,185,253,253,253,253,253, # 70
  74. 191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,
  75. 207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,
  76. 223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,
  77. 37, 44, 33, 46, 41, 48, 56, 51, 42, 60, 36, 49, 38, 31, 34, 35,
  78. 45, 32, 40, 52, 53, 55, 58, 50, 57, 63, 70, 62, 61, 47, 59, 43,
  79. 3, 21, 10, 19, 13, 2, 24, 20, 4, 23, 11, 8, 12, 5, 1, 15,
  80. 9, 7, 6, 14, 39, 26, 28, 22, 25, 29, 54, 18, 17, 30, 27, 16,
  81. 239, 68,240,241,242,243,244,245,246,247,248,249,250,251,252,255,
  82. )
  83. macCyrillic_CharToOrderMap = (
  84. 255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255, # 00
  85. 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, # 10
  86. 253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253, # 20
  87. 252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253, # 30
  88. 253,142,143,144,145,146,147,148,149,150,151,152, 74,153, 75,154, # 40
  89. 155,156,157,158,159,160,161,162,163,164,165,253,253,253,253,253, # 50
  90. 253, 71,172, 66,173, 65,174, 76,175, 64,176,177, 77, 72,178, 69, # 60
  91. 67,179, 78, 73,180,181, 79,182,183,184,185,253,253,253,253,253, # 70
  92. 37, 44, 33, 46, 41, 48, 56, 51, 42, 60, 36, 49, 38, 31, 34, 35,
  93. 45, 32, 40, 52, 53, 55, 58, 50, 57, 63, 70, 62, 61, 47, 59, 43,
  94. 191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,
  95. 207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,
  96. 223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,
  97. 239,240,241,242,243,244,245,246,247,248,249,250,251,252, 68, 16,
  98. 3, 21, 10, 19, 13, 2, 24, 20, 4, 23, 11, 8, 12, 5, 1, 15,
  99. 9, 7, 6, 14, 39, 26, 28, 22, 25, 29, 54, 18, 17, 30, 27,255,
  100. )
  101. IBM855_CharToOrderMap = (
  102. 255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255, # 00
  103. 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, # 10
  104. 253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253, # 20
  105. 252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253, # 30
  106. 253,142,143,144,145,146,147,148,149,150,151,152, 74,153, 75,154, # 40
  107. 155,156,157,158,159,160,161,162,163,164,165,253,253,253,253,253, # 50
  108. 253, 71,172, 66,173, 65,174, 76,175, 64,176,177, 77, 72,178, 69, # 60
  109. 67,179, 78, 73,180,181, 79,182,183,184,185,253,253,253,253,253, # 70
  110. 191,192,193,194, 68,195,196,197,198,199,200,201,202,203,204,205,
  111. 206,207,208,209,210,211,212,213,214,215,216,217, 27, 59, 54, 70,
  112. 3, 37, 21, 44, 28, 58, 13, 41, 2, 48, 39, 53, 19, 46,218,219,
  113. 220,221,222,223,224, 26, 55, 4, 42,225,226,227,228, 23, 60,229,
  114. 230,231,232,233,234,235, 11, 36,236,237,238,239,240,241,242,243,
  115. 8, 49, 12, 38, 5, 31, 1, 34, 15,244,245,246,247, 35, 16,248,
  116. 43, 9, 45, 7, 32, 6, 40, 14, 52, 24, 56, 10, 33, 17, 61,249,
  117. 250, 18, 62, 20, 51, 25, 57, 30, 47, 29, 63, 22, 50,251,252,255,
  118. )
  119. IBM866_CharToOrderMap = (
  120. 255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255, # 00
  121. 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, # 10
  122. 253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253, # 20
  123. 252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253, # 30
  124. 253,142,143,144,145,146,147,148,149,150,151,152, 74,153, 75,154, # 40
  125. 155,156,157,158,159,160,161,162,163,164,165,253,253,253,253,253, # 50
  126. 253, 71,172, 66,173, 65,174, 76,175, 64,176,177, 77, 72,178, 69, # 60
  127. 67,179, 78, 73,180,181, 79,182,183,184,185,253,253,253,253,253, # 70
  128. 37, 44, 33, 46, 41, 48, 56, 51, 42, 60, 36, 49, 38, 31, 34, 35,
  129. 45, 32, 40, 52, 53, 55, 58, 50, 57, 63, 70, 62, 61, 47, 59, 43,
  130. 3, 21, 10, 19, 13, 2, 24, 20, 4, 23, 11, 8, 12, 5, 1, 15,
  131. 191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,
  132. 207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,
  133. 223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,
  134. 9, 7, 6, 14, 39, 26, 28, 22, 25, 29, 54, 18, 17, 30, 27, 16,
  135. 239, 68,240,241,242,243,244,245,246,247,248,249,250,251,252,255,
  136. )
  137. # Model Table:
  138. # total sequences: 100%
  139. # first 512 sequences: 97.6601%
  140. # first 1024 sequences: 2.3389%
  141. # rest sequences: 0.1237%
  142. # negative sequences: 0.0009%
  143. RussianLangModel = (
  144. 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,
  145. 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,
  146. 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,
  147. 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,
  148. 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,
  149. 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,
  150. 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,
  151. 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,
  152. 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,
  153. 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,
  154. 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,
  155. 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,
  156. 3,3,3,3,3,3,2,3,3,3,3,3,2,2,3,2,3,3,3,2,1,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0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,
  261. 0,0,1,0,1,1,0,0,0,0,1,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,
  262. 1,0,0,0,0,2,0,1,2,1,0,1,1,1,0,1,0,0,0,1,0,1,0,0,1,0,1,0,0,0,0,1,
  263. 0,0,0,0,0,1,0,0,1,1,0,0,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,
  264. 2,2,1,0,0,0,0,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,
  265. 1,0,0,0,1,0,0,0,1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,1,0,0,0,0,0,
  266. 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,0,0,0,0,0,0,1,
  267. 1,1,1,0,1,0,1,0,0,1,1,1,1,0,0,0,1,0,0,0,0,1,0,0,0,1,0,1,0,0,0,0,
  268. 1,0,0,0,0,0,0,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,
  269. 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,
  270. 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,
  271. 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,
  272. )
  273. Koi8rModel = {
  274. 'charToOrderMap': KOI8R_CharToOrderMap,
  275. 'precedenceMatrix': RussianLangModel,
  276. 'mTypicalPositiveRatio': 0.976601,
  277. 'keepEnglishLetter': False,
  278. 'charsetName': "KOI8-R"
  279. }
  280. Win1251CyrillicModel = {
  281. 'charToOrderMap': win1251_CharToOrderMap,
  282. 'precedenceMatrix': RussianLangModel,
  283. 'mTypicalPositiveRatio': 0.976601,
  284. 'keepEnglishLetter': False,
  285. 'charsetName': "windows-1251"
  286. }
  287. Latin5CyrillicModel = {
  288. 'charToOrderMap': latin5_CharToOrderMap,
  289. 'precedenceMatrix': RussianLangModel,
  290. 'mTypicalPositiveRatio': 0.976601,
  291. 'keepEnglishLetter': False,
  292. 'charsetName': "ISO-8859-5"
  293. }
  294. MacCyrillicModel = {
  295. 'charToOrderMap': macCyrillic_CharToOrderMap,
  296. 'precedenceMatrix': RussianLangModel,
  297. 'mTypicalPositiveRatio': 0.976601,
  298. 'keepEnglishLetter': False,
  299. 'charsetName': "MacCyrillic"
  300. };
  301. Ibm866Model = {
  302. 'charToOrderMap': IBM866_CharToOrderMap,
  303. 'precedenceMatrix': RussianLangModel,
  304. 'mTypicalPositiveRatio': 0.976601,
  305. 'keepEnglishLetter': False,
  306. 'charsetName': "IBM866"
  307. }
  308. Ibm855Model = {
  309. 'charToOrderMap': IBM855_CharToOrderMap,
  310. 'precedenceMatrix': RussianLangModel,
  311. 'mTypicalPositiveRatio': 0.976601,
  312. 'keepEnglishLetter': False,
  313. 'charsetName': "IBM855"
  314. }
  315. # flake8: noqa