code
string | repo_name
string | path
string | language
string | license
string | size
int64 |
---|---|---|---|---|---|
######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301 USA
######################### END LICENSE BLOCK #########################
# Sampling from about 20M text materials include literature and computer technology
#
# Japanese frequency table, applied to both S-JIS and EUC-JP
# They are sorted in order.
# 128 --> 0.77094
# 256 --> 0.85710
# 512 --> 0.92635
# 1024 --> 0.97130
# 2048 --> 0.99431
#
# Ideal Distribution Ratio = 0.92635 / (1-0.92635) = 12.58
# Random Distribution Ration = 512 / (2965+62+83+86-512) = 0.191
#
# Typical Distribution Ratio, 25% of IDR
JIS_TYPICAL_DISTRIBUTION_RATIO = 3.0
# Char to FreqOrder table ,
JIS_TABLE_SIZE = 4368
# fmt: off
JIS_CHAR_TO_FREQ_ORDER = (
40, 1, 6, 182, 152, 180, 295,2127, 285, 381,3295,4304,3068,4606,3165,3510, # 16
3511,1822,2785,4607,1193,2226,5070,4608, 171,2996,1247, 18, 179,5071, 856,1661, # 32
1262,5072, 619, 127,3431,3512,3230,1899,1700, 232, 228,1294,1298, 284, 283,2041, # 48
2042,1061,1062, 48, 49, 44, 45, 433, 434,1040,1041, 996, 787,2997,1255,4305, # 64
2108,4609,1684,1648,5073,5074,5075,5076,5077,5078,3687,5079,4610,5080,3927,3928, # 80
5081,3296,3432, 290,2285,1471,2187,5082,2580,2825,1303,2140,1739,1445,2691,3375, # 96
1691,3297,4306,4307,4611, 452,3376,1182,2713,3688,3069,4308,5083,5084,5085,5086, # 112
5087,5088,5089,5090,5091,5092,5093,5094,5095,5096,5097,5098,5099,5100,5101,5102, # 128
5103,5104,5105,5106,5107,5108,5109,5110,5111,5112,4097,5113,5114,5115,5116,5117, # 144
5118,5119,5120,5121,5122,5123,5124,5125,5126,5127,5128,5129,5130,5131,5132,5133, # 160
5134,5135,5136,5137,5138,5139,5140,5141,5142,5143,5144,5145,5146,5147,5148,5149, # 176
5150,5151,5152,4612,5153,5154,5155,5156,5157,5158,5159,5160,5161,5162,5163,5164, # 192
5165,5166,5167,5168,5169,5170,5171,5172,5173,5174,5175,1472, 598, 618, 820,1205, # 208
1309,1412,1858,1307,1692,5176,5177,5178,5179,5180,5181,5182,1142,1452,1234,1172, # 224
1875,2043,2149,1793,1382,2973, 925,2404,1067,1241, 960,1377,2935,1491, 919,1217, # 240
1865,2030,1406,1499,2749,4098,5183,5184,5185,5186,5187,5188,2561,4099,3117,1804, # 256
2049,3689,4309,3513,1663,5189,3166,3118,3298,1587,1561,3433,5190,3119,1625,2998, # 272
3299,4613,1766,3690,2786,4614,5191,5192,5193,5194,2161, 26,3377, 2,3929, 20, # 288
3691, 47,4100, 50, 17, 16, 35, 268, 27, 243, 42, 155, 24, 154, 29, 184, # 304
4, 91, 14, 92, 53, 396, 33, 289, 9, 37, 64, 620, 21, 39, 321, 5, # 320
12, 11, 52, 13, 3, 208, 138, 0, 7, 60, 526, 141, 151,1069, 181, 275, # 336
1591, 83, 132,1475, 126, 331, 829, 15, 69, 160, 59, 22, 157, 55,1079, 312, # 352
109, 38, 23, 25, 10, 19, 79,5195, 61, 382,1124, 8, 30,5196,5197,5198, # 368
5199,5200,5201,5202,5203,5204,5205,5206, 89, 62, 74, 34,2416, 112, 139, 196, # 384
271, 149, 84, 607, 131, 765, 46, 88, 153, 683, 76, 874, 101, 258, 57, 80, # 400
32, 364, 121,1508, 169,1547, 68, 235, 145,2999, 41, 360,3027, 70, 63, 31, # 416
43, 259, 262,1383, 99, 533, 194, 66, 93, 846, 217, 192, 56, 106, 58, 565, # 432
280, 272, 311, 256, 146, 82, 308, 71, 100, 128, 214, 655, 110, 261, 104,1140, # 448
54, 51, 36, 87, 67,3070, 185,2618,2936,2020, 28,1066,2390,2059,5207,5208, # 464
5209,5210,5211,5212,5213,5214,5215,5216,4615,5217,5218,5219,5220,5221,5222,5223, # 480
5224,5225,5226,5227,5228,5229,5230,5231,5232,5233,5234,5235,5236,3514,5237,5238, # 496
5239,5240,5241,5242,5243,5244,2297,2031,4616,4310,3692,5245,3071,5246,3598,5247, # 512
4617,3231,3515,5248,4101,4311,4618,3808,4312,4102,5249,4103,4104,3599,5250,5251, # 528
5252,5253,5254,5255,5256,5257,5258,5259,5260,5261,5262,5263,5264,5265,5266,5267, # 544
5268,5269,5270,5271,5272,5273,5274,5275,5276,5277,5278,5279,5280,5281,5282,5283, # 560
5284,5285,5286,5287,5288,5289,5290,5291,5292,5293,5294,5295,5296,5297,5298,5299, # 576
5300,5301,5302,5303,5304,5305,5306,5307,5308,5309,5310,5311,5312,5313,5314,5315, # 592
5316,5317,5318,5319,5320,5321,5322,5323,5324,5325,5326,5327,5328,5329,5330,5331, # 608
5332,5333,5334,5335,5336,5337,5338,5339,5340,5341,5342,5343,5344,5345,5346,5347, # 624
5348,5349,5350,5351,5352,5353,5354,5355,5356,5357,5358,5359,5360,5361,5362,5363, # 640
5364,5365,5366,5367,5368,5369,5370,5371,5372,5373,5374,5375,5376,5377,5378,5379, # 656
5380,5381, 363, 642,2787,2878,2788,2789,2316,3232,2317,3434,2011, 165,1942,3930, # 672
3931,3932,3933,5382,4619,5383,4620,5384,5385,5386,5387,5388,5389,5390,5391,5392, # 688
5393,5394,5395,5396,5397,5398,5399,5400,5401,5402,5403,5404,5405,5406,5407,5408, # 704
5409,5410,5411,5412,5413,5414,5415,5416,5417,5418,5419,5420,5421,5422,5423,5424, # 720
5425,5426,5427,5428,5429,5430,5431,5432,5433,5434,5435,5436,5437,5438,5439,5440, # 736
5441,5442,5443,5444,5445,5446,5447,5448,5449,5450,5451,5452,5453,5454,5455,5456, # 752
5457,5458,5459,5460,5461,5462,5463,5464,5465,5466,5467,5468,5469,5470,5471,5472, # 768
5473,5474,5475,5476,5477,5478,5479,5480,5481,5482,5483,5484,5485,5486,5487,5488, # 784
5489,5490,5491,5492,5493,5494,5495,5496,5497,5498,5499,5500,5501,5502,5503,5504, # 800
5505,5506,5507,5508,5509,5510,5511,5512,5513,5514,5515,5516,5517,5518,5519,5520, # 816
5521,5522,5523,5524,5525,5526,5527,5528,5529,5530,5531,5532,5533,5534,5535,5536, # 832
5537,5538,5539,5540,5541,5542,5543,5544,5545,5546,5547,5548,5549,5550,5551,5552, # 848
5553,5554,5555,5556,5557,5558,5559,5560,5561,5562,5563,5564,5565,5566,5567,5568, # 864
5569,5570,5571,5572,5573,5574,5575,5576,5577,5578,5579,5580,5581,5582,5583,5584, # 880
5585,5586,5587,5588,5589,5590,5591,5592,5593,5594,5595,5596,5597,5598,5599,5600, # 896
5601,5602,5603,5604,5605,5606,5607,5608,5609,5610,5611,5612,5613,5614,5615,5616, # 912
5617,5618,5619,5620,5621,5622,5623,5624,5625,5626,5627,5628,5629,5630,5631,5632, # 928
5633,5634,5635,5636,5637,5638,5639,5640,5641,5642,5643,5644,5645,5646,5647,5648, # 944
5649,5650,5651,5652,5653,5654,5655,5656,5657,5658,5659,5660,5661,5662,5663,5664, # 960
5665,5666,5667,5668,5669,5670,5671,5672,5673,5674,5675,5676,5677,5678,5679,5680, # 976
5681,5682,5683,5684,5685,5686,5687,5688,5689,5690,5691,5692,5693,5694,5695,5696, # 992
5697,5698,5699,5700,5701,5702,5703,5704,5705,5706,5707,5708,5709,5710,5711,5712, # 1008
5713,5714,5715,5716,5717,5718,5719,5720,5721,5722,5723,5724,5725,5726,5727,5728, # 1024
5729,5730,5731,5732,5733,5734,5735,5736,5737,5738,5739,5740,5741,5742,5743,5744, # 1040
5745,5746,5747,5748,5749,5750,5751,5752,5753,5754,5755,5756,5757,5758,5759,5760, # 1056
5761,5762,5763,5764,5765,5766,5767,5768,5769,5770,5771,5772,5773,5774,5775,5776, # 1072
5777,5778,5779,5780,5781,5782,5783,5784,5785,5786,5787,5788,5789,5790,5791,5792, # 1088
5793,5794,5795,5796,5797,5798,5799,5800,5801,5802,5803,5804,5805,5806,5807,5808, # 1104
5809,5810,5811,5812,5813,5814,5815,5816,5817,5818,5819,5820,5821,5822,5823,5824, # 1120
5825,5826,5827,5828,5829,5830,5831,5832,5833,5834,5835,5836,5837,5838,5839,5840, # 1136
5841,5842,5843,5844,5845,5846,5847,5848,5849,5850,5851,5852,5853,5854,5855,5856, # 1152
5857,5858,5859,5860,5861,5862,5863,5864,5865,5866,5867,5868,5869,5870,5871,5872, # 1168
5873,5874,5875,5876,5877,5878,5879,5880,5881,5882,5883,5884,5885,5886,5887,5888, # 1184
5889,5890,5891,5892,5893,5894,5895,5896,5897,5898,5899,5900,5901,5902,5903,5904, # 1200
5905,5906,5907,5908,5909,5910,5911,5912,5913,5914,5915,5916,5917,5918,5919,5920, # 1216
5921,5922,5923,5924,5925,5926,5927,5928,5929,5930,5931,5932,5933,5934,5935,5936, # 1232
5937,5938,5939,5940,5941,5942,5943,5944,5945,5946,5947,5948,5949,5950,5951,5952, # 1248
5953,5954,5955,5956,5957,5958,5959,5960,5961,5962,5963,5964,5965,5966,5967,5968, # 1264
5969,5970,5971,5972,5973,5974,5975,5976,5977,5978,5979,5980,5981,5982,5983,5984, # 1280
5985,5986,5987,5988,5989,5990,5991,5992,5993,5994,5995,5996,5997,5998,5999,6000, # 1296
6001,6002,6003,6004,6005,6006,6007,6008,6009,6010,6011,6012,6013,6014,6015,6016, # 1312
6017,6018,6019,6020,6021,6022,6023,6024,6025,6026,6027,6028,6029,6030,6031,6032, # 1328
6033,6034,6035,6036,6037,6038,6039,6040,6041,6042,6043,6044,6045,6046,6047,6048, # 1344
6049,6050,6051,6052,6053,6054,6055,6056,6057,6058,6059,6060,6061,6062,6063,6064, # 1360
6065,6066,6067,6068,6069,6070,6071,6072,6073,6074,6075,6076,6077,6078,6079,6080, # 1376
6081,6082,6083,6084,6085,6086,6087,6088,6089,6090,6091,6092,6093,6094,6095,6096, # 1392
6097,6098,6099,6100,6101,6102,6103,6104,6105,6106,6107,6108,6109,6110,6111,6112, # 1408
6113,6114,2044,2060,4621, 997,1235, 473,1186,4622, 920,3378,6115,6116, 379,1108, # 1424
4313,2657,2735,3934,6117,3809, 636,3233, 573,1026,3693,3435,2974,3300,2298,4105, # 1440
854,2937,2463, 393,2581,2417, 539, 752,1280,2750,2480, 140,1161, 440, 708,1569, # 1456
665,2497,1746,1291,1523,3000, 164,1603, 847,1331, 537,1997, 486, 508,1693,2418, # 1472
1970,2227, 878,1220, 299,1030, 969, 652,2751, 624,1137,3301,2619, 65,3302,2045, # 1488
1761,1859,3120,1930,3694,3516, 663,1767, 852, 835,3695, 269, 767,2826,2339,1305, # 1504
896,1150, 770,1616,6118, 506,1502,2075,1012,2519, 775,2520,2975,2340,2938,4314, # 1520
3028,2086,1224,1943,2286,6119,3072,4315,2240,1273,1987,3935,1557, 175, 597, 985, # 1536
3517,2419,2521,1416,3029, 585, 938,1931,1007,1052,1932,1685,6120,3379,4316,4623, # 1552
804, 599,3121,1333,2128,2539,1159,1554,2032,3810, 687,2033,2904, 952, 675,1467, # 1568
3436,6121,2241,1096,1786,2440,1543,1924, 980,1813,2228, 781,2692,1879, 728,1918, # 1584
3696,4624, 548,1950,4625,1809,1088,1356,3303,2522,1944, 502, 972, 373, 513,2827, # 1600
586,2377,2391,1003,1976,1631,6122,2464,1084, 648,1776,4626,2141, 324, 962,2012, # 1616
2177,2076,1384, 742,2178,1448,1173,1810, 222, 102, 301, 445, 125,2420, 662,2498, # 1632
277, 200,1476,1165,1068, 224,2562,1378,1446, 450,1880, 659, 791, 582,4627,2939, # 1648
3936,1516,1274, 555,2099,3697,1020,1389,1526,3380,1762,1723,1787,2229, 412,2114, # 1664
1900,2392,3518, 512,2597, 427,1925,2341,3122,1653,1686,2465,2499, 697, 330, 273, # 1680
380,2162, 951, 832, 780, 991,1301,3073, 965,2270,3519, 668,2523,2636,1286, 535, # 1696
1407, 518, 671, 957,2658,2378, 267, 611,2197,3030,6123, 248,2299, 967,1799,2356, # 1712
850,1418,3437,1876,1256,1480,2828,1718,6124,6125,1755,1664,2405,6126,4628,2879, # 1728
2829, 499,2179, 676,4629, 557,2329,2214,2090, 325,3234, 464, 811,3001, 992,2342, # 1744
2481,1232,1469, 303,2242, 466,1070,2163, 603,1777,2091,4630,2752,4631,2714, 322, # 1760
2659,1964,1768, 481,2188,1463,2330,2857,3600,2092,3031,2421,4632,2318,2070,1849, # 1776
2598,4633,1302,2254,1668,1701,2422,3811,2905,3032,3123,2046,4106,1763,1694,4634, # 1792
1604, 943,1724,1454, 917, 868,2215,1169,2940, 552,1145,1800,1228,1823,1955, 316, # 1808
1080,2510, 361,1807,2830,4107,2660,3381,1346,1423,1134,4108,6127, 541,1263,1229, # 1824
1148,2540, 545, 465,1833,2880,3438,1901,3074,2482, 816,3937, 713,1788,2500, 122, # 1840
1575, 195,1451,2501,1111,6128, 859, 374,1225,2243,2483,4317, 390,1033,3439,3075, # 1856
2524,1687, 266, 793,1440,2599, 946, 779, 802, 507, 897,1081, 528,2189,1292, 711, # 1872
1866,1725,1167,1640, 753, 398,2661,1053, 246, 348,4318, 137,1024,3440,1600,2077, # 1888
2129, 825,4319, 698, 238, 521, 187,2300,1157,2423,1641,1605,1464,1610,1097,2541, # 1904
1260,1436, 759,2255,1814,2150, 705,3235, 409,2563,3304, 561,3033,2005,2564, 726, # 1920
1956,2343,3698,4109, 949,3812,3813,3520,1669, 653,1379,2525, 881,2198, 632,2256, # 1936
1027, 778,1074, 733,1957, 514,1481,2466, 554,2180, 702,3938,1606,1017,1398,6129, # 1952
1380,3521, 921, 993,1313, 594, 449,1489,1617,1166, 768,1426,1360, 495,1794,3601, # 1968
1177,3602,1170,4320,2344, 476, 425,3167,4635,3168,1424, 401,2662,1171,3382,1998, # 1984
1089,4110, 477,3169, 474,6130,1909, 596,2831,1842, 494, 693,1051,1028,1207,3076, # 2000
606,2115, 727,2790,1473,1115, 743,3522, 630, 805,1532,4321,2021, 366,1057, 838, # 2016
684,1114,2142,4322,2050,1492,1892,1808,2271,3814,2424,1971,1447,1373,3305,1090, # 2032
1536,3939,3523,3306,1455,2199, 336, 369,2331,1035, 584,2393, 902, 718,2600,6131, # 2048
2753, 463,2151,1149,1611,2467, 715,1308,3124,1268, 343,1413,3236,1517,1347,2663, # 2064
2093,3940,2022,1131,1553,2100,2941,1427,3441,2942,1323,2484,6132,1980, 872,2368, # 2080
2441,2943, 320,2369,2116,1082, 679,1933,3941,2791,3815, 625,1143,2023, 422,2200, # 2096
3816,6133, 730,1695, 356,2257,1626,2301,2858,2637,1627,1778, 937, 883,2906,2693, # 2112
3002,1769,1086, 400,1063,1325,3307,2792,4111,3077, 456,2345,1046, 747,6134,1524, # 2128
884,1094,3383,1474,2164,1059, 974,1688,2181,2258,1047, 345,1665,1187, 358, 875, # 2144
3170, 305, 660,3524,2190,1334,1135,3171,1540,1649,2542,1527, 927, 968,2793, 885, # 2160
1972,1850, 482, 500,2638,1218,1109,1085,2543,1654,2034, 876, 78,2287,1482,1277, # 2176
861,1675,1083,1779, 724,2754, 454, 397,1132,1612,2332, 893, 672,1237, 257,2259, # 2192
2370, 135,3384, 337,2244, 547, 352, 340, 709,2485,1400, 788,1138,2511, 540, 772, # 2208
1682,2260,2272,2544,2013,1843,1902,4636,1999,1562,2288,4637,2201,1403,1533, 407, # 2224
576,3308,1254,2071, 978,3385, 170, 136,1201,3125,2664,3172,2394, 213, 912, 873, # 2240
3603,1713,2202, 699,3604,3699, 813,3442, 493, 531,1054, 468,2907,1483, 304, 281, # 2256
4112,1726,1252,2094, 339,2319,2130,2639, 756,1563,2944, 748, 571,2976,1588,2425, # 2272
2715,1851,1460,2426,1528,1392,1973,3237, 288,3309, 685,3386, 296, 892,2716,2216, # 2288
1570,2245, 722,1747,2217, 905,3238,1103,6135,1893,1441,1965, 251,1805,2371,3700, # 2304
2601,1919,1078, 75,2182,1509,1592,1270,2640,4638,2152,6136,3310,3817, 524, 706, # 2320
1075, 292,3818,1756,2602, 317, 98,3173,3605,3525,1844,2218,3819,2502, 814, 567, # 2336
385,2908,1534,6137, 534,1642,3239, 797,6138,1670,1529, 953,4323, 188,1071, 538, # 2352
178, 729,3240,2109,1226,1374,2000,2357,2977, 731,2468,1116,2014,2051,6139,1261, # 2368
1593, 803,2859,2736,3443, 556, 682, 823,1541,6140,1369,2289,1706,2794, 845, 462, # 2384
2603,2665,1361, 387, 162,2358,1740, 739,1770,1720,1304,1401,3241,1049, 627,1571, # 2400
2427,3526,1877,3942,1852,1500, 431,1910,1503, 677, 297,2795, 286,1433,1038,1198, # 2416
2290,1133,1596,4113,4639,2469,1510,1484,3943,6141,2442, 108, 712,4640,2372, 866, # 2432
3701,2755,3242,1348, 834,1945,1408,3527,2395,3243,1811, 824, 994,1179,2110,1548, # 2448
1453, 790,3003, 690,4324,4325,2832,2909,3820,1860,3821, 225,1748, 310, 346,1780, # 2464
2470, 821,1993,2717,2796, 828, 877,3528,2860,2471,1702,2165,2910,2486,1789, 453, # 2480
359,2291,1676, 73,1164,1461,1127,3311, 421, 604, 314,1037, 589, 116,2487, 737, # 2496
837,1180, 111, 244, 735,6142,2261,1861,1362, 986, 523, 418, 581,2666,3822, 103, # 2512
855, 503,1414,1867,2488,1091, 657,1597, 979, 605,1316,4641,1021,2443,2078,2001, # 2528
1209, 96, 587,2166,1032, 260,1072,2153, 173, 94, 226,3244, 819,2006,4642,4114, # 2544
2203, 231,1744, 782, 97,2667, 786,3387, 887, 391, 442,2219,4326,1425,6143,2694, # 2560
633,1544,1202, 483,2015, 592,2052,1958,2472,1655, 419, 129,4327,3444,3312,1714, # 2576
1257,3078,4328,1518,1098, 865,1310,1019,1885,1512,1734, 469,2444, 148, 773, 436, # 2592
1815,1868,1128,1055,4329,1245,2756,3445,2154,1934,1039,4643, 579,1238, 932,2320, # 2608
353, 205, 801, 115,2428, 944,2321,1881, 399,2565,1211, 678, 766,3944, 335,2101, # 2624
1459,1781,1402,3945,2737,2131,1010, 844, 981,1326,1013, 550,1816,1545,2620,1335, # 2640
1008, 371,2881, 936,1419,1613,3529,1456,1395,2273,1834,2604,1317,2738,2503, 416, # 2656
1643,4330, 806,1126, 229, 591,3946,1314,1981,1576,1837,1666, 347,1790, 977,3313, # 2672
764,2861,1853, 688,2429,1920,1462, 77, 595, 415,2002,3034, 798,1192,4115,6144, # 2688
2978,4331,3035,2695,2582,2072,2566, 430,2430,1727, 842,1396,3947,3702, 613, 377, # 2704
278, 236,1417,3388,3314,3174, 757,1869, 107,3530,6145,1194, 623,2262, 207,1253, # 2720
2167,3446,3948, 492,1117,1935, 536,1838,2757,1246,4332, 696,2095,2406,1393,1572, # 2736
3175,1782, 583, 190, 253,1390,2230, 830,3126,3389, 934,3245,1703,1749,2979,1870, # 2752
2545,1656,2204, 869,2346,4116,3176,1817, 496,1764,4644, 942,1504, 404,1903,1122, # 2768
1580,3606,2945,1022, 515, 372,1735, 955,2431,3036,6146,2797,1110,2302,2798, 617, # 2784
6147, 441, 762,1771,3447,3607,3608,1904, 840,3037, 86, 939,1385, 572,1370,2445, # 2800
1336, 114,3703, 898, 294, 203,3315, 703,1583,2274, 429, 961,4333,1854,1951,3390, # 2816
2373,3704,4334,1318,1381, 966,1911,2322,1006,1155, 309, 989, 458,2718,1795,1372, # 2832
1203, 252,1689,1363,3177, 517,1936, 168,1490, 562, 193,3823,1042,4117,1835, 551, # 2848
470,4645, 395, 489,3448,1871,1465,2583,2641, 417,1493, 279,1295, 511,1236,1119, # 2864
72,1231,1982,1812,3004, 871,1564, 984,3449,1667,2696,2096,4646,2347,2833,1673, # 2880
3609, 695,3246,2668, 807,1183,4647, 890, 388,2333,1801,1457,2911,1765,1477,1031, # 2896
3316,3317,1278,3391,2799,2292,2526, 163,3450,4335,2669,1404,1802,6148,2323,2407, # 2912
1584,1728,1494,1824,1269, 298, 909,3318,1034,1632, 375, 776,1683,2061, 291, 210, # 2928
1123, 809,1249,1002,2642,3038, 206,1011,2132, 144, 975, 882,1565, 342, 667, 754, # 2944
1442,2143,1299,2303,2062, 447, 626,2205,1221,2739,2912,1144,1214,2206,2584, 760, # 2960
1715, 614, 950,1281,2670,2621, 810, 577,1287,2546,4648, 242,2168, 250,2643, 691, # 2976
123,2644, 647, 313,1029, 689,1357,2946,1650, 216, 771,1339,1306, 808,2063, 549, # 2992
913,1371,2913,2914,6149,1466,1092,1174,1196,1311,2605,2396,1783,1796,3079, 406, # 3008
2671,2117,3949,4649, 487,1825,2220,6150,2915, 448,2348,1073,6151,2397,1707, 130, # 3024
900,1598, 329, 176,1959,2527,1620,6152,2275,4336,3319,1983,2191,3705,3610,2155, # 3040
3706,1912,1513,1614,6153,1988, 646, 392,2304,1589,3320,3039,1826,1239,1352,1340, # 3056
2916, 505,2567,1709,1437,2408,2547, 906,6154,2672, 384,1458,1594,1100,1329, 710, # 3072
423,3531,2064,2231,2622,1989,2673,1087,1882, 333, 841,3005,1296,2882,2379, 580, # 3088
1937,1827,1293,2585, 601, 574, 249,1772,4118,2079,1120, 645, 901,1176,1690, 795, # 3104
2207, 478,1434, 516,1190,1530, 761,2080, 930,1264, 355, 435,1552, 644,1791, 987, # 3120
220,1364,1163,1121,1538, 306,2169,1327,1222, 546,2645, 218, 241, 610,1704,3321, # 3136
1984,1839,1966,2528, 451,6155,2586,3707,2568, 907,3178, 254,2947, 186,1845,4650, # 3152
745, 432,1757, 428,1633, 888,2246,2221,2489,3611,2118,1258,1265, 956,3127,1784, # 3168
4337,2490, 319, 510, 119, 457,3612, 274,2035,2007,4651,1409,3128, 970,2758, 590, # 3184
2800, 661,2247,4652,2008,3950,1420,1549,3080,3322,3951,1651,1375,2111, 485,2491, # 3200
1429,1156,6156,2548,2183,1495, 831,1840,2529,2446, 501,1657, 307,1894,3247,1341, # 3216
666, 899,2156,1539,2549,1559, 886, 349,2208,3081,2305,1736,3824,2170,2759,1014, # 3232
1913,1386, 542,1397,2948, 490, 368, 716, 362, 159, 282,2569,1129,1658,1288,1750, # 3248
2674, 276, 649,2016, 751,1496, 658,1818,1284,1862,2209,2087,2512,3451, 622,2834, # 3264
376, 117,1060,2053,1208,1721,1101,1443, 247,1250,3179,1792,3952,2760,2398,3953, # 3280
6157,2144,3708, 446,2432,1151,2570,3452,2447,2761,2835,1210,2448,3082, 424,2222, # 3296
1251,2449,2119,2836, 504,1581,4338, 602, 817, 857,3825,2349,2306, 357,3826,1470, # 3312
1883,2883, 255, 958, 929,2917,3248, 302,4653,1050,1271,1751,2307,1952,1430,2697, # 3328
2719,2359, 354,3180, 777, 158,2036,4339,1659,4340,4654,2308,2949,2248,1146,2232, # 3344
3532,2720,1696,2623,3827,6158,3129,1550,2698,1485,1297,1428, 637, 931,2721,2145, # 3360
914,2550,2587, 81,2450, 612, 827,2646,1242,4655,1118,2884, 472,1855,3181,3533, # 3376
3534, 569,1353,2699,1244,1758,2588,4119,2009,2762,2171,3709,1312,1531,6159,1152, # 3392
1938, 134,1830, 471,3710,2276,1112,1535,3323,3453,3535, 982,1337,2950, 488, 826, # 3408
674,1058,1628,4120,2017, 522,2399, 211, 568,1367,3454, 350, 293,1872,1139,3249, # 3424
1399,1946,3006,1300,2360,3324, 588, 736,6160,2606, 744, 669,3536,3828,6161,1358, # 3440
199, 723, 848, 933, 851,1939,1505,1514,1338,1618,1831,4656,1634,3613, 443,2740, # 3456
3829, 717,1947, 491,1914,6162,2551,1542,4121,1025,6163,1099,1223, 198,3040,2722, # 3472
370, 410,1905,2589, 998,1248,3182,2380, 519,1449,4122,1710, 947, 928,1153,4341, # 3488
2277, 344,2624,1511, 615, 105, 161,1212,1076,1960,3130,2054,1926,1175,1906,2473, # 3504
414,1873,2801,6164,2309, 315,1319,3325, 318,2018,2146,2157, 963, 631, 223,4342, # 3520
4343,2675, 479,3711,1197,2625,3712,2676,2361,6165,4344,4123,6166,2451,3183,1886, # 3536
2184,1674,1330,1711,1635,1506, 799, 219,3250,3083,3954,1677,3713,3326,2081,3614, # 3552
1652,2073,4657,1147,3041,1752, 643,1961, 147,1974,3955,6167,1716,2037, 918,3007, # 3568
1994, 120,1537, 118, 609,3184,4345, 740,3455,1219, 332,1615,3830,6168,1621,2980, # 3584
1582, 783, 212, 553,2350,3714,1349,2433,2082,4124, 889,6169,2310,1275,1410, 973, # 3600
166,1320,3456,1797,1215,3185,2885,1846,2590,2763,4658, 629, 822,3008, 763, 940, # 3616
1990,2862, 439,2409,1566,1240,1622, 926,1282,1907,2764, 654,2210,1607, 327,1130, # 3632
3956,1678,1623,6170,2434,2192, 686, 608,3831,3715, 903,3957,3042,6171,2741,1522, # 3648
1915,1105,1555,2552,1359, 323,3251,4346,3457, 738,1354,2553,2311,2334,1828,2003, # 3664
3832,1753,2351,1227,6172,1887,4125,1478,6173,2410,1874,1712,1847, 520,1204,2607, # 3680
264,4659, 836,2677,2102, 600,4660,3833,2278,3084,6174,4347,3615,1342, 640, 532, # 3696
543,2608,1888,2400,2591,1009,4348,1497, 341,1737,3616,2723,1394, 529,3252,1321, # 3712
983,4661,1515,2120, 971,2592, 924, 287,1662,3186,4349,2700,4350,1519, 908,1948, # 3728
2452, 156, 796,1629,1486,2223,2055, 694,4126,1259,1036,3392,1213,2249,2742,1889, # 3744
1230,3958,1015, 910, 408, 559,3617,4662, 746, 725, 935,4663,3959,3009,1289, 563, # 3760
867,4664,3960,1567,2981,2038,2626, 988,2263,2381,4351, 143,2374, 704,1895,6175, # 3776
1188,3716,2088, 673,3085,2362,4352, 484,1608,1921,2765,2918, 215, 904,3618,3537, # 3792
894, 509, 976,3043,2701,3961,4353,2837,2982, 498,6176,6177,1102,3538,1332,3393, # 3808
1487,1636,1637, 233, 245,3962, 383, 650, 995,3044, 460,1520,1206,2352, 749,3327, # 3824
530, 700, 389,1438,1560,1773,3963,2264, 719,2951,2724,3834, 870,1832,1644,1000, # 3840
839,2474,3717, 197,1630,3394, 365,2886,3964,1285,2133, 734, 922, 818,1106, 732, # 3856
480,2083,1774,3458, 923,2279,1350, 221,3086, 85,2233,2234,3835,1585,3010,2147, # 3872
1387,1705,2382,1619,2475, 133, 239,2802,1991,1016,2084,2383, 411,2838,1113, 651, # 3888
1985,1160,3328, 990,1863,3087,1048,1276,2647, 265,2627,1599,3253,2056, 150, 638, # 3904
2019, 656, 853, 326,1479, 680,1439,4354,1001,1759, 413,3459,3395,2492,1431, 459, # 3920
4355,1125,3329,2265,1953,1450,2065,2863, 849, 351,2678,3131,3254,3255,1104,1577, # 3936
227,1351,1645,2453,2193,1421,2887, 812,2121, 634, 95,2435, 201,2312,4665,1646, # 3952
1671,2743,1601,2554,2702,2648,2280,1315,1366,2089,3132,1573,3718,3965,1729,1189, # 3968
328,2679,1077,1940,1136, 558,1283, 964,1195, 621,2074,1199,1743,3460,3619,1896, # 3984
1916,1890,3836,2952,1154,2112,1064, 862, 378,3011,2066,2113,2803,1568,2839,6178, # 4000
3088,2919,1941,1660,2004,1992,2194, 142, 707,1590,1708,1624,1922,1023,1836,1233, # 4016
1004,2313, 789, 741,3620,6179,1609,2411,1200,4127,3719,3720,4666,2057,3721, 593, # 4032
2840, 367,2920,1878,6180,3461,1521, 628,1168, 692,2211,2649, 300, 720,2067,2571, # 4048
2953,3396, 959,2504,3966,3539,3462,1977, 701,6181, 954,1043, 800, 681, 183,3722, # 4064
1803,1730,3540,4128,2103, 815,2314, 174, 467, 230,2454,1093,2134, 755,3541,3397, # 4080
1141,1162,6182,1738,2039, 270,3256,2513,1005,1647,2185,3837, 858,1679,1897,1719, # 4096
2954,2324,1806, 402, 670, 167,4129,1498,2158,2104, 750,6183, 915, 189,1680,1551, # 4112
455,4356,1501,2455, 405,1095,2955, 338,1586,1266,1819, 570, 641,1324, 237,1556, # 4128
2650,1388,3723,6184,1368,2384,1343,1978,3089,2436, 879,3724, 792,1191, 758,3012, # 4144
1411,2135,1322,4357, 240,4667,1848,3725,1574,6185, 420,3045,1546,1391, 714,4358, # 4160
1967, 941,1864, 863, 664, 426, 560,1731,2680,1785,2864,1949,2363, 403,3330,1415, # 4176
1279,2136,1697,2335, 204, 721,2097,3838, 90,6186,2085,2505, 191,3967, 124,2148, # 4192
1376,1798,1178,1107,1898,1405, 860,4359,1243,1272,2375,2983,1558,2456,1638, 113, # 4208
3621, 578,1923,2609, 880, 386,4130, 784,2186,2266,1422,2956,2172,1722, 497, 263, # 4224
2514,1267,2412,2610, 177,2703,3542, 774,1927,1344, 616,1432,1595,1018, 172,4360, # 4240
2325, 911,4361, 438,1468,3622, 794,3968,2024,2173,1681,1829,2957, 945, 895,3090, # 4256
575,2212,2476, 475,2401,2681, 785,2744,1745,2293,2555,1975,3133,2865, 394,4668, # 4272
3839, 635,4131, 639, 202,1507,2195,2766,1345,1435,2572,3726,1908,1184,1181,2457, # 4288
3727,3134,4362, 843,2611, 437, 916,4669, 234, 769,1884,3046,3047,3623, 833,6187, # 4304
1639,2250,2402,1355,1185,2010,2047, 999, 525,1732,1290,1488,2612, 948,1578,3728, # 4320
2413,2477,1216,2725,2159, 334,3840,1328,3624,2921,1525,4132, 564,1056, 891,4363, # 4336
1444,1698,2385,2251,3729,1365,2281,2235,1717,6188, 864,3841,2515, 444, 527,2767, # 4352
2922,3625, 544, 461,6189, 566, 209,2437,3398,2098,1065,2068,3331,3626,3257,2137, # 4368 #last 512
)
# fmt: on
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/chardet/jisfreq.py
|
Python
|
mit
| 25,796 |
######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301 USA
######################### END LICENSE BLOCK #########################
# The frequency data itself is the same as euc-kr.
# This is just a mapping table to euc-kr.
JOHAB_TO_EUCKR_ORDER_TABLE = {
0x8861: 0,
0x8862: 1,
0x8865: 2,
0x8868: 3,
0x8869: 4,
0x886A: 5,
0x886B: 6,
0x8871: 7,
0x8873: 8,
0x8874: 9,
0x8875: 10,
0x8876: 11,
0x8877: 12,
0x8878: 13,
0x8879: 14,
0x887B: 15,
0x887C: 16,
0x887D: 17,
0x8881: 18,
0x8882: 19,
0x8885: 20,
0x8889: 21,
0x8891: 22,
0x8893: 23,
0x8895: 24,
0x8896: 25,
0x8897: 26,
0x88A1: 27,
0x88A2: 28,
0x88A5: 29,
0x88A9: 30,
0x88B5: 31,
0x88B7: 32,
0x88C1: 33,
0x88C5: 34,
0x88C9: 35,
0x88E1: 36,
0x88E2: 37,
0x88E5: 38,
0x88E8: 39,
0x88E9: 40,
0x88EB: 41,
0x88F1: 42,
0x88F3: 43,
0x88F5: 44,
0x88F6: 45,
0x88F7: 46,
0x88F8: 47,
0x88FB: 48,
0x88FC: 49,
0x88FD: 50,
0x8941: 51,
0x8945: 52,
0x8949: 53,
0x8951: 54,
0x8953: 55,
0x8955: 56,
0x8956: 57,
0x8957: 58,
0x8961: 59,
0x8962: 60,
0x8963: 61,
0x8965: 62,
0x8968: 63,
0x8969: 64,
0x8971: 65,
0x8973: 66,
0x8975: 67,
0x8976: 68,
0x8977: 69,
0x897B: 70,
0x8981: 71,
0x8985: 72,
0x8989: 73,
0x8993: 74,
0x8995: 75,
0x89A1: 76,
0x89A2: 77,
0x89A5: 78,
0x89A8: 79,
0x89A9: 80,
0x89AB: 81,
0x89AD: 82,
0x89B0: 83,
0x89B1: 84,
0x89B3: 85,
0x89B5: 86,
0x89B7: 87,
0x89B8: 88,
0x89C1: 89,
0x89C2: 90,
0x89C5: 91,
0x89C9: 92,
0x89CB: 93,
0x89D1: 94,
0x89D3: 95,
0x89D5: 96,
0x89D7: 97,
0x89E1: 98,
0x89E5: 99,
0x89E9: 100,
0x89F3: 101,
0x89F6: 102,
0x89F7: 103,
0x8A41: 104,
0x8A42: 105,
0x8A45: 106,
0x8A49: 107,
0x8A51: 108,
0x8A53: 109,
0x8A55: 110,
0x8A57: 111,
0x8A61: 112,
0x8A65: 113,
0x8A69: 114,
0x8A73: 115,
0x8A75: 116,
0x8A81: 117,
0x8A82: 118,
0x8A85: 119,
0x8A88: 120,
0x8A89: 121,
0x8A8A: 122,
0x8A8B: 123,
0x8A90: 124,
0x8A91: 125,
0x8A93: 126,
0x8A95: 127,
0x8A97: 128,
0x8A98: 129,
0x8AA1: 130,
0x8AA2: 131,
0x8AA5: 132,
0x8AA9: 133,
0x8AB6: 134,
0x8AB7: 135,
0x8AC1: 136,
0x8AD5: 137,
0x8AE1: 138,
0x8AE2: 139,
0x8AE5: 140,
0x8AE9: 141,
0x8AF1: 142,
0x8AF3: 143,
0x8AF5: 144,
0x8B41: 145,
0x8B45: 146,
0x8B49: 147,
0x8B61: 148,
0x8B62: 149,
0x8B65: 150,
0x8B68: 151,
0x8B69: 152,
0x8B6A: 153,
0x8B71: 154,
0x8B73: 155,
0x8B75: 156,
0x8B77: 157,
0x8B81: 158,
0x8BA1: 159,
0x8BA2: 160,
0x8BA5: 161,
0x8BA8: 162,
0x8BA9: 163,
0x8BAB: 164,
0x8BB1: 165,
0x8BB3: 166,
0x8BB5: 167,
0x8BB7: 168,
0x8BB8: 169,
0x8BBC: 170,
0x8C61: 171,
0x8C62: 172,
0x8C63: 173,
0x8C65: 174,
0x8C69: 175,
0x8C6B: 176,
0x8C71: 177,
0x8C73: 178,
0x8C75: 179,
0x8C76: 180,
0x8C77: 181,
0x8C7B: 182,
0x8C81: 183,
0x8C82: 184,
0x8C85: 185,
0x8C89: 186,
0x8C91: 187,
0x8C93: 188,
0x8C95: 189,
0x8C96: 190,
0x8C97: 191,
0x8CA1: 192,
0x8CA2: 193,
0x8CA9: 194,
0x8CE1: 195,
0x8CE2: 196,
0x8CE3: 197,
0x8CE5: 198,
0x8CE9: 199,
0x8CF1: 200,
0x8CF3: 201,
0x8CF5: 202,
0x8CF6: 203,
0x8CF7: 204,
0x8D41: 205,
0x8D42: 206,
0x8D45: 207,
0x8D51: 208,
0x8D55: 209,
0x8D57: 210,
0x8D61: 211,
0x8D65: 212,
0x8D69: 213,
0x8D75: 214,
0x8D76: 215,
0x8D7B: 216,
0x8D81: 217,
0x8DA1: 218,
0x8DA2: 219,
0x8DA5: 220,
0x8DA7: 221,
0x8DA9: 222,
0x8DB1: 223,
0x8DB3: 224,
0x8DB5: 225,
0x8DB7: 226,
0x8DB8: 227,
0x8DB9: 228,
0x8DC1: 229,
0x8DC2: 230,
0x8DC9: 231,
0x8DD6: 232,
0x8DD7: 233,
0x8DE1: 234,
0x8DE2: 235,
0x8DF7: 236,
0x8E41: 237,
0x8E45: 238,
0x8E49: 239,
0x8E51: 240,
0x8E53: 241,
0x8E57: 242,
0x8E61: 243,
0x8E81: 244,
0x8E82: 245,
0x8E85: 246,
0x8E89: 247,
0x8E90: 248,
0x8E91: 249,
0x8E93: 250,
0x8E95: 251,
0x8E97: 252,
0x8E98: 253,
0x8EA1: 254,
0x8EA9: 255,
0x8EB6: 256,
0x8EB7: 257,
0x8EC1: 258,
0x8EC2: 259,
0x8EC5: 260,
0x8EC9: 261,
0x8ED1: 262,
0x8ED3: 263,
0x8ED6: 264,
0x8EE1: 265,
0x8EE5: 266,
0x8EE9: 267,
0x8EF1: 268,
0x8EF3: 269,
0x8F41: 270,
0x8F61: 271,
0x8F62: 272,
0x8F65: 273,
0x8F67: 274,
0x8F69: 275,
0x8F6B: 276,
0x8F70: 277,
0x8F71: 278,
0x8F73: 279,
0x8F75: 280,
0x8F77: 281,
0x8F7B: 282,
0x8FA1: 283,
0x8FA2: 284,
0x8FA5: 285,
0x8FA9: 286,
0x8FB1: 287,
0x8FB3: 288,
0x8FB5: 289,
0x8FB7: 290,
0x9061: 291,
0x9062: 292,
0x9063: 293,
0x9065: 294,
0x9068: 295,
0x9069: 296,
0x906A: 297,
0x906B: 298,
0x9071: 299,
0x9073: 300,
0x9075: 301,
0x9076: 302,
0x9077: 303,
0x9078: 304,
0x9079: 305,
0x907B: 306,
0x907D: 307,
0x9081: 308,
0x9082: 309,
0x9085: 310,
0x9089: 311,
0x9091: 312,
0x9093: 313,
0x9095: 314,
0x9096: 315,
0x9097: 316,
0x90A1: 317,
0x90A2: 318,
0x90A5: 319,
0x90A9: 320,
0x90B1: 321,
0x90B7: 322,
0x90E1: 323,
0x90E2: 324,
0x90E4: 325,
0x90E5: 326,
0x90E9: 327,
0x90EB: 328,
0x90EC: 329,
0x90F1: 330,
0x90F3: 331,
0x90F5: 332,
0x90F6: 333,
0x90F7: 334,
0x90FD: 335,
0x9141: 336,
0x9142: 337,
0x9145: 338,
0x9149: 339,
0x9151: 340,
0x9153: 341,
0x9155: 342,
0x9156: 343,
0x9157: 344,
0x9161: 345,
0x9162: 346,
0x9165: 347,
0x9169: 348,
0x9171: 349,
0x9173: 350,
0x9176: 351,
0x9177: 352,
0x917A: 353,
0x9181: 354,
0x9185: 355,
0x91A1: 356,
0x91A2: 357,
0x91A5: 358,
0x91A9: 359,
0x91AB: 360,
0x91B1: 361,
0x91B3: 362,
0x91B5: 363,
0x91B7: 364,
0x91BC: 365,
0x91BD: 366,
0x91C1: 367,
0x91C5: 368,
0x91C9: 369,
0x91D6: 370,
0x9241: 371,
0x9245: 372,
0x9249: 373,
0x9251: 374,
0x9253: 375,
0x9255: 376,
0x9261: 377,
0x9262: 378,
0x9265: 379,
0x9269: 380,
0x9273: 381,
0x9275: 382,
0x9277: 383,
0x9281: 384,
0x9282: 385,
0x9285: 386,
0x9288: 387,
0x9289: 388,
0x9291: 389,
0x9293: 390,
0x9295: 391,
0x9297: 392,
0x92A1: 393,
0x92B6: 394,
0x92C1: 395,
0x92E1: 396,
0x92E5: 397,
0x92E9: 398,
0x92F1: 399,
0x92F3: 400,
0x9341: 401,
0x9342: 402,
0x9349: 403,
0x9351: 404,
0x9353: 405,
0x9357: 406,
0x9361: 407,
0x9362: 408,
0x9365: 409,
0x9369: 410,
0x936A: 411,
0x936B: 412,
0x9371: 413,
0x9373: 414,
0x9375: 415,
0x9377: 416,
0x9378: 417,
0x937C: 418,
0x9381: 419,
0x9385: 420,
0x9389: 421,
0x93A1: 422,
0x93A2: 423,
0x93A5: 424,
0x93A9: 425,
0x93AB: 426,
0x93B1: 427,
0x93B3: 428,
0x93B5: 429,
0x93B7: 430,
0x93BC: 431,
0x9461: 432,
0x9462: 433,
0x9463: 434,
0x9465: 435,
0x9468: 436,
0x9469: 437,
0x946A: 438,
0x946B: 439,
0x946C: 440,
0x9470: 441,
0x9471: 442,
0x9473: 443,
0x9475: 444,
0x9476: 445,
0x9477: 446,
0x9478: 447,
0x9479: 448,
0x947D: 449,
0x9481: 450,
0x9482: 451,
0x9485: 452,
0x9489: 453,
0x9491: 454,
0x9493: 455,
0x9495: 456,
0x9496: 457,
0x9497: 458,
0x94A1: 459,
0x94E1: 460,
0x94E2: 461,
0x94E3: 462,
0x94E5: 463,
0x94E8: 464,
0x94E9: 465,
0x94EB: 466,
0x94EC: 467,
0x94F1: 468,
0x94F3: 469,
0x94F5: 470,
0x94F7: 471,
0x94F9: 472,
0x94FC: 473,
0x9541: 474,
0x9542: 475,
0x9545: 476,
0x9549: 477,
0x9551: 478,
0x9553: 479,
0x9555: 480,
0x9556: 481,
0x9557: 482,
0x9561: 483,
0x9565: 484,
0x9569: 485,
0x9576: 486,
0x9577: 487,
0x9581: 488,
0x9585: 489,
0x95A1: 490,
0x95A2: 491,
0x95A5: 492,
0x95A8: 493,
0x95A9: 494,
0x95AB: 495,
0x95AD: 496,
0x95B1: 497,
0x95B3: 498,
0x95B5: 499,
0x95B7: 500,
0x95B9: 501,
0x95BB: 502,
0x95C1: 503,
0x95C5: 504,
0x95C9: 505,
0x95E1: 506,
0x95F6: 507,
0x9641: 508,
0x9645: 509,
0x9649: 510,
0x9651: 511,
0x9653: 512,
0x9655: 513,
0x9661: 514,
0x9681: 515,
0x9682: 516,
0x9685: 517,
0x9689: 518,
0x9691: 519,
0x9693: 520,
0x9695: 521,
0x9697: 522,
0x96A1: 523,
0x96B6: 524,
0x96C1: 525,
0x96D7: 526,
0x96E1: 527,
0x96E5: 528,
0x96E9: 529,
0x96F3: 530,
0x96F5: 531,
0x96F7: 532,
0x9741: 533,
0x9745: 534,
0x9749: 535,
0x9751: 536,
0x9757: 537,
0x9761: 538,
0x9762: 539,
0x9765: 540,
0x9768: 541,
0x9769: 542,
0x976B: 543,
0x9771: 544,
0x9773: 545,
0x9775: 546,
0x9777: 547,
0x9781: 548,
0x97A1: 549,
0x97A2: 550,
0x97A5: 551,
0x97A8: 552,
0x97A9: 553,
0x97B1: 554,
0x97B3: 555,
0x97B5: 556,
0x97B6: 557,
0x97B7: 558,
0x97B8: 559,
0x9861: 560,
0x9862: 561,
0x9865: 562,
0x9869: 563,
0x9871: 564,
0x9873: 565,
0x9875: 566,
0x9876: 567,
0x9877: 568,
0x987D: 569,
0x9881: 570,
0x9882: 571,
0x9885: 572,
0x9889: 573,
0x9891: 574,
0x9893: 575,
0x9895: 576,
0x9896: 577,
0x9897: 578,
0x98E1: 579,
0x98E2: 580,
0x98E5: 581,
0x98E9: 582,
0x98EB: 583,
0x98EC: 584,
0x98F1: 585,
0x98F3: 586,
0x98F5: 587,
0x98F6: 588,
0x98F7: 589,
0x98FD: 590,
0x9941: 591,
0x9942: 592,
0x9945: 593,
0x9949: 594,
0x9951: 595,
0x9953: 596,
0x9955: 597,
0x9956: 598,
0x9957: 599,
0x9961: 600,
0x9976: 601,
0x99A1: 602,
0x99A2: 603,
0x99A5: 604,
0x99A9: 605,
0x99B7: 606,
0x99C1: 607,
0x99C9: 608,
0x99E1: 609,
0x9A41: 610,
0x9A45: 611,
0x9A81: 612,
0x9A82: 613,
0x9A85: 614,
0x9A89: 615,
0x9A90: 616,
0x9A91: 617,
0x9A97: 618,
0x9AC1: 619,
0x9AE1: 620,
0x9AE5: 621,
0x9AE9: 622,
0x9AF1: 623,
0x9AF3: 624,
0x9AF7: 625,
0x9B61: 626,
0x9B62: 627,
0x9B65: 628,
0x9B68: 629,
0x9B69: 630,
0x9B71: 631,
0x9B73: 632,
0x9B75: 633,
0x9B81: 634,
0x9B85: 635,
0x9B89: 636,
0x9B91: 637,
0x9B93: 638,
0x9BA1: 639,
0x9BA5: 640,
0x9BA9: 641,
0x9BB1: 642,
0x9BB3: 643,
0x9BB5: 644,
0x9BB7: 645,
0x9C61: 646,
0x9C62: 647,
0x9C65: 648,
0x9C69: 649,
0x9C71: 650,
0x9C73: 651,
0x9C75: 652,
0x9C76: 653,
0x9C77: 654,
0x9C78: 655,
0x9C7C: 656,
0x9C7D: 657,
0x9C81: 658,
0x9C82: 659,
0x9C85: 660,
0x9C89: 661,
0x9C91: 662,
0x9C93: 663,
0x9C95: 664,
0x9C96: 665,
0x9C97: 666,
0x9CA1: 667,
0x9CA2: 668,
0x9CA5: 669,
0x9CB5: 670,
0x9CB7: 671,
0x9CE1: 672,
0x9CE2: 673,
0x9CE5: 674,
0x9CE9: 675,
0x9CF1: 676,
0x9CF3: 677,
0x9CF5: 678,
0x9CF6: 679,
0x9CF7: 680,
0x9CFD: 681,
0x9D41: 682,
0x9D42: 683,
0x9D45: 684,
0x9D49: 685,
0x9D51: 686,
0x9D53: 687,
0x9D55: 688,
0x9D57: 689,
0x9D61: 690,
0x9D62: 691,
0x9D65: 692,
0x9D69: 693,
0x9D71: 694,
0x9D73: 695,
0x9D75: 696,
0x9D76: 697,
0x9D77: 698,
0x9D81: 699,
0x9D85: 700,
0x9D93: 701,
0x9D95: 702,
0x9DA1: 703,
0x9DA2: 704,
0x9DA5: 705,
0x9DA9: 706,
0x9DB1: 707,
0x9DB3: 708,
0x9DB5: 709,
0x9DB7: 710,
0x9DC1: 711,
0x9DC5: 712,
0x9DD7: 713,
0x9DF6: 714,
0x9E41: 715,
0x9E45: 716,
0x9E49: 717,
0x9E51: 718,
0x9E53: 719,
0x9E55: 720,
0x9E57: 721,
0x9E61: 722,
0x9E65: 723,
0x9E69: 724,
0x9E73: 725,
0x9E75: 726,
0x9E77: 727,
0x9E81: 728,
0x9E82: 729,
0x9E85: 730,
0x9E89: 731,
0x9E91: 732,
0x9E93: 733,
0x9E95: 734,
0x9E97: 735,
0x9EA1: 736,
0x9EB6: 737,
0x9EC1: 738,
0x9EE1: 739,
0x9EE2: 740,
0x9EE5: 741,
0x9EE9: 742,
0x9EF1: 743,
0x9EF5: 744,
0x9EF7: 745,
0x9F41: 746,
0x9F42: 747,
0x9F45: 748,
0x9F49: 749,
0x9F51: 750,
0x9F53: 751,
0x9F55: 752,
0x9F57: 753,
0x9F61: 754,
0x9F62: 755,
0x9F65: 756,
0x9F69: 757,
0x9F71: 758,
0x9F73: 759,
0x9F75: 760,
0x9F77: 761,
0x9F78: 762,
0x9F7B: 763,
0x9F7C: 764,
0x9FA1: 765,
0x9FA2: 766,
0x9FA5: 767,
0x9FA9: 768,
0x9FB1: 769,
0x9FB3: 770,
0x9FB5: 771,
0x9FB7: 772,
0xA061: 773,
0xA062: 774,
0xA065: 775,
0xA067: 776,
0xA068: 777,
0xA069: 778,
0xA06A: 779,
0xA06B: 780,
0xA071: 781,
0xA073: 782,
0xA075: 783,
0xA077: 784,
0xA078: 785,
0xA07B: 786,
0xA07D: 787,
0xA081: 788,
0xA082: 789,
0xA085: 790,
0xA089: 791,
0xA091: 792,
0xA093: 793,
0xA095: 794,
0xA096: 795,
0xA097: 796,
0xA098: 797,
0xA0A1: 798,
0xA0A2: 799,
0xA0A9: 800,
0xA0B7: 801,
0xA0E1: 802,
0xA0E2: 803,
0xA0E5: 804,
0xA0E9: 805,
0xA0EB: 806,
0xA0F1: 807,
0xA0F3: 808,
0xA0F5: 809,
0xA0F7: 810,
0xA0F8: 811,
0xA0FD: 812,
0xA141: 813,
0xA142: 814,
0xA145: 815,
0xA149: 816,
0xA151: 817,
0xA153: 818,
0xA155: 819,
0xA156: 820,
0xA157: 821,
0xA161: 822,
0xA162: 823,
0xA165: 824,
0xA169: 825,
0xA175: 826,
0xA176: 827,
0xA177: 828,
0xA179: 829,
0xA181: 830,
0xA1A1: 831,
0xA1A2: 832,
0xA1A4: 833,
0xA1A5: 834,
0xA1A9: 835,
0xA1AB: 836,
0xA1B1: 837,
0xA1B3: 838,
0xA1B5: 839,
0xA1B7: 840,
0xA1C1: 841,
0xA1C5: 842,
0xA1D6: 843,
0xA1D7: 844,
0xA241: 845,
0xA245: 846,
0xA249: 847,
0xA253: 848,
0xA255: 849,
0xA257: 850,
0xA261: 851,
0xA265: 852,
0xA269: 853,
0xA273: 854,
0xA275: 855,
0xA281: 856,
0xA282: 857,
0xA283: 858,
0xA285: 859,
0xA288: 860,
0xA289: 861,
0xA28A: 862,
0xA28B: 863,
0xA291: 864,
0xA293: 865,
0xA295: 866,
0xA297: 867,
0xA29B: 868,
0xA29D: 869,
0xA2A1: 870,
0xA2A5: 871,
0xA2A9: 872,
0xA2B3: 873,
0xA2B5: 874,
0xA2C1: 875,
0xA2E1: 876,
0xA2E5: 877,
0xA2E9: 878,
0xA341: 879,
0xA345: 880,
0xA349: 881,
0xA351: 882,
0xA355: 883,
0xA361: 884,
0xA365: 885,
0xA369: 886,
0xA371: 887,
0xA375: 888,
0xA3A1: 889,
0xA3A2: 890,
0xA3A5: 891,
0xA3A8: 892,
0xA3A9: 893,
0xA3AB: 894,
0xA3B1: 895,
0xA3B3: 896,
0xA3B5: 897,
0xA3B6: 898,
0xA3B7: 899,
0xA3B9: 900,
0xA3BB: 901,
0xA461: 902,
0xA462: 903,
0xA463: 904,
0xA464: 905,
0xA465: 906,
0xA468: 907,
0xA469: 908,
0xA46A: 909,
0xA46B: 910,
0xA46C: 911,
0xA471: 912,
0xA473: 913,
0xA475: 914,
0xA477: 915,
0xA47B: 916,
0xA481: 917,
0xA482: 918,
0xA485: 919,
0xA489: 920,
0xA491: 921,
0xA493: 922,
0xA495: 923,
0xA496: 924,
0xA497: 925,
0xA49B: 926,
0xA4A1: 927,
0xA4A2: 928,
0xA4A5: 929,
0xA4B3: 930,
0xA4E1: 931,
0xA4E2: 932,
0xA4E5: 933,
0xA4E8: 934,
0xA4E9: 935,
0xA4EB: 936,
0xA4F1: 937,
0xA4F3: 938,
0xA4F5: 939,
0xA4F7: 940,
0xA4F8: 941,
0xA541: 942,
0xA542: 943,
0xA545: 944,
0xA548: 945,
0xA549: 946,
0xA551: 947,
0xA553: 948,
0xA555: 949,
0xA556: 950,
0xA557: 951,
0xA561: 952,
0xA562: 953,
0xA565: 954,
0xA569: 955,
0xA573: 956,
0xA575: 957,
0xA576: 958,
0xA577: 959,
0xA57B: 960,
0xA581: 961,
0xA585: 962,
0xA5A1: 963,
0xA5A2: 964,
0xA5A3: 965,
0xA5A5: 966,
0xA5A9: 967,
0xA5B1: 968,
0xA5B3: 969,
0xA5B5: 970,
0xA5B7: 971,
0xA5C1: 972,
0xA5C5: 973,
0xA5D6: 974,
0xA5E1: 975,
0xA5F6: 976,
0xA641: 977,
0xA642: 978,
0xA645: 979,
0xA649: 980,
0xA651: 981,
0xA653: 982,
0xA661: 983,
0xA665: 984,
0xA681: 985,
0xA682: 986,
0xA685: 987,
0xA688: 988,
0xA689: 989,
0xA68A: 990,
0xA68B: 991,
0xA691: 992,
0xA693: 993,
0xA695: 994,
0xA697: 995,
0xA69B: 996,
0xA69C: 997,
0xA6A1: 998,
0xA6A9: 999,
0xA6B6: 1000,
0xA6C1: 1001,
0xA6E1: 1002,
0xA6E2: 1003,
0xA6E5: 1004,
0xA6E9: 1005,
0xA6F7: 1006,
0xA741: 1007,
0xA745: 1008,
0xA749: 1009,
0xA751: 1010,
0xA755: 1011,
0xA757: 1012,
0xA761: 1013,
0xA762: 1014,
0xA765: 1015,
0xA769: 1016,
0xA771: 1017,
0xA773: 1018,
0xA775: 1019,
0xA7A1: 1020,
0xA7A2: 1021,
0xA7A5: 1022,
0xA7A9: 1023,
0xA7AB: 1024,
0xA7B1: 1025,
0xA7B3: 1026,
0xA7B5: 1027,
0xA7B7: 1028,
0xA7B8: 1029,
0xA7B9: 1030,
0xA861: 1031,
0xA862: 1032,
0xA865: 1033,
0xA869: 1034,
0xA86B: 1035,
0xA871: 1036,
0xA873: 1037,
0xA875: 1038,
0xA876: 1039,
0xA877: 1040,
0xA87D: 1041,
0xA881: 1042,
0xA882: 1043,
0xA885: 1044,
0xA889: 1045,
0xA891: 1046,
0xA893: 1047,
0xA895: 1048,
0xA896: 1049,
0xA897: 1050,
0xA8A1: 1051,
0xA8A2: 1052,
0xA8B1: 1053,
0xA8E1: 1054,
0xA8E2: 1055,
0xA8E5: 1056,
0xA8E8: 1057,
0xA8E9: 1058,
0xA8F1: 1059,
0xA8F5: 1060,
0xA8F6: 1061,
0xA8F7: 1062,
0xA941: 1063,
0xA957: 1064,
0xA961: 1065,
0xA962: 1066,
0xA971: 1067,
0xA973: 1068,
0xA975: 1069,
0xA976: 1070,
0xA977: 1071,
0xA9A1: 1072,
0xA9A2: 1073,
0xA9A5: 1074,
0xA9A9: 1075,
0xA9B1: 1076,
0xA9B3: 1077,
0xA9B7: 1078,
0xAA41: 1079,
0xAA61: 1080,
0xAA77: 1081,
0xAA81: 1082,
0xAA82: 1083,
0xAA85: 1084,
0xAA89: 1085,
0xAA91: 1086,
0xAA95: 1087,
0xAA97: 1088,
0xAB41: 1089,
0xAB57: 1090,
0xAB61: 1091,
0xAB65: 1092,
0xAB69: 1093,
0xAB71: 1094,
0xAB73: 1095,
0xABA1: 1096,
0xABA2: 1097,
0xABA5: 1098,
0xABA9: 1099,
0xABB1: 1100,
0xABB3: 1101,
0xABB5: 1102,
0xABB7: 1103,
0xAC61: 1104,
0xAC62: 1105,
0xAC64: 1106,
0xAC65: 1107,
0xAC68: 1108,
0xAC69: 1109,
0xAC6A: 1110,
0xAC6B: 1111,
0xAC71: 1112,
0xAC73: 1113,
0xAC75: 1114,
0xAC76: 1115,
0xAC77: 1116,
0xAC7B: 1117,
0xAC81: 1118,
0xAC82: 1119,
0xAC85: 1120,
0xAC89: 1121,
0xAC91: 1122,
0xAC93: 1123,
0xAC95: 1124,
0xAC96: 1125,
0xAC97: 1126,
0xACA1: 1127,
0xACA2: 1128,
0xACA5: 1129,
0xACA9: 1130,
0xACB1: 1131,
0xACB3: 1132,
0xACB5: 1133,
0xACB7: 1134,
0xACC1: 1135,
0xACC5: 1136,
0xACC9: 1137,
0xACD1: 1138,
0xACD7: 1139,
0xACE1: 1140,
0xACE2: 1141,
0xACE3: 1142,
0xACE4: 1143,
0xACE5: 1144,
0xACE8: 1145,
0xACE9: 1146,
0xACEB: 1147,
0xACEC: 1148,
0xACF1: 1149,
0xACF3: 1150,
0xACF5: 1151,
0xACF6: 1152,
0xACF7: 1153,
0xACFC: 1154,
0xAD41: 1155,
0xAD42: 1156,
0xAD45: 1157,
0xAD49: 1158,
0xAD51: 1159,
0xAD53: 1160,
0xAD55: 1161,
0xAD56: 1162,
0xAD57: 1163,
0xAD61: 1164,
0xAD62: 1165,
0xAD65: 1166,
0xAD69: 1167,
0xAD71: 1168,
0xAD73: 1169,
0xAD75: 1170,
0xAD76: 1171,
0xAD77: 1172,
0xAD81: 1173,
0xAD85: 1174,
0xAD89: 1175,
0xAD97: 1176,
0xADA1: 1177,
0xADA2: 1178,
0xADA3: 1179,
0xADA5: 1180,
0xADA9: 1181,
0xADAB: 1182,
0xADB1: 1183,
0xADB3: 1184,
0xADB5: 1185,
0xADB7: 1186,
0xADBB: 1187,
0xADC1: 1188,
0xADC2: 1189,
0xADC5: 1190,
0xADC9: 1191,
0xADD7: 1192,
0xADE1: 1193,
0xADE5: 1194,
0xADE9: 1195,
0xADF1: 1196,
0xADF5: 1197,
0xADF6: 1198,
0xAE41: 1199,
0xAE45: 1200,
0xAE49: 1201,
0xAE51: 1202,
0xAE53: 1203,
0xAE55: 1204,
0xAE61: 1205,
0xAE62: 1206,
0xAE65: 1207,
0xAE69: 1208,
0xAE71: 1209,
0xAE73: 1210,
0xAE75: 1211,
0xAE77: 1212,
0xAE81: 1213,
0xAE82: 1214,
0xAE85: 1215,
0xAE88: 1216,
0xAE89: 1217,
0xAE91: 1218,
0xAE93: 1219,
0xAE95: 1220,
0xAE97: 1221,
0xAE99: 1222,
0xAE9B: 1223,
0xAE9C: 1224,
0xAEA1: 1225,
0xAEB6: 1226,
0xAEC1: 1227,
0xAEC2: 1228,
0xAEC5: 1229,
0xAEC9: 1230,
0xAED1: 1231,
0xAED7: 1232,
0xAEE1: 1233,
0xAEE2: 1234,
0xAEE5: 1235,
0xAEE9: 1236,
0xAEF1: 1237,
0xAEF3: 1238,
0xAEF5: 1239,
0xAEF7: 1240,
0xAF41: 1241,
0xAF42: 1242,
0xAF49: 1243,
0xAF51: 1244,
0xAF55: 1245,
0xAF57: 1246,
0xAF61: 1247,
0xAF62: 1248,
0xAF65: 1249,
0xAF69: 1250,
0xAF6A: 1251,
0xAF71: 1252,
0xAF73: 1253,
0xAF75: 1254,
0xAF77: 1255,
0xAFA1: 1256,
0xAFA2: 1257,
0xAFA5: 1258,
0xAFA8: 1259,
0xAFA9: 1260,
0xAFB0: 1261,
0xAFB1: 1262,
0xAFB3: 1263,
0xAFB5: 1264,
0xAFB7: 1265,
0xAFBC: 1266,
0xB061: 1267,
0xB062: 1268,
0xB064: 1269,
0xB065: 1270,
0xB069: 1271,
0xB071: 1272,
0xB073: 1273,
0xB076: 1274,
0xB077: 1275,
0xB07D: 1276,
0xB081: 1277,
0xB082: 1278,
0xB085: 1279,
0xB089: 1280,
0xB091: 1281,
0xB093: 1282,
0xB096: 1283,
0xB097: 1284,
0xB0B7: 1285,
0xB0E1: 1286,
0xB0E2: 1287,
0xB0E5: 1288,
0xB0E9: 1289,
0xB0EB: 1290,
0xB0F1: 1291,
0xB0F3: 1292,
0xB0F6: 1293,
0xB0F7: 1294,
0xB141: 1295,
0xB145: 1296,
0xB149: 1297,
0xB185: 1298,
0xB1A1: 1299,
0xB1A2: 1300,
0xB1A5: 1301,
0xB1A8: 1302,
0xB1A9: 1303,
0xB1AB: 1304,
0xB1B1: 1305,
0xB1B3: 1306,
0xB1B7: 1307,
0xB1C1: 1308,
0xB1C2: 1309,
0xB1C5: 1310,
0xB1D6: 1311,
0xB1E1: 1312,
0xB1F6: 1313,
0xB241: 1314,
0xB245: 1315,
0xB249: 1316,
0xB251: 1317,
0xB253: 1318,
0xB261: 1319,
0xB281: 1320,
0xB282: 1321,
0xB285: 1322,
0xB289: 1323,
0xB291: 1324,
0xB293: 1325,
0xB297: 1326,
0xB2A1: 1327,
0xB2B6: 1328,
0xB2C1: 1329,
0xB2E1: 1330,
0xB2E5: 1331,
0xB357: 1332,
0xB361: 1333,
0xB362: 1334,
0xB365: 1335,
0xB369: 1336,
0xB36B: 1337,
0xB370: 1338,
0xB371: 1339,
0xB373: 1340,
0xB381: 1341,
0xB385: 1342,
0xB389: 1343,
0xB391: 1344,
0xB3A1: 1345,
0xB3A2: 1346,
0xB3A5: 1347,
0xB3A9: 1348,
0xB3B1: 1349,
0xB3B3: 1350,
0xB3B5: 1351,
0xB3B7: 1352,
0xB461: 1353,
0xB462: 1354,
0xB465: 1355,
0xB466: 1356,
0xB467: 1357,
0xB469: 1358,
0xB46A: 1359,
0xB46B: 1360,
0xB470: 1361,
0xB471: 1362,
0xB473: 1363,
0xB475: 1364,
0xB476: 1365,
0xB477: 1366,
0xB47B: 1367,
0xB47C: 1368,
0xB481: 1369,
0xB482: 1370,
0xB485: 1371,
0xB489: 1372,
0xB491: 1373,
0xB493: 1374,
0xB495: 1375,
0xB496: 1376,
0xB497: 1377,
0xB4A1: 1378,
0xB4A2: 1379,
0xB4A5: 1380,
0xB4A9: 1381,
0xB4AC: 1382,
0xB4B1: 1383,
0xB4B3: 1384,
0xB4B5: 1385,
0xB4B7: 1386,
0xB4BB: 1387,
0xB4BD: 1388,
0xB4C1: 1389,
0xB4C5: 1390,
0xB4C9: 1391,
0xB4D3: 1392,
0xB4E1: 1393,
0xB4E2: 1394,
0xB4E5: 1395,
0xB4E6: 1396,
0xB4E8: 1397,
0xB4E9: 1398,
0xB4EA: 1399,
0xB4EB: 1400,
0xB4F1: 1401,
0xB4F3: 1402,
0xB4F4: 1403,
0xB4F5: 1404,
0xB4F6: 1405,
0xB4F7: 1406,
0xB4F8: 1407,
0xB4FA: 1408,
0xB4FC: 1409,
0xB541: 1410,
0xB542: 1411,
0xB545: 1412,
0xB549: 1413,
0xB551: 1414,
0xB553: 1415,
0xB555: 1416,
0xB557: 1417,
0xB561: 1418,
0xB562: 1419,
0xB563: 1420,
0xB565: 1421,
0xB569: 1422,
0xB56B: 1423,
0xB56C: 1424,
0xB571: 1425,
0xB573: 1426,
0xB574: 1427,
0xB575: 1428,
0xB576: 1429,
0xB577: 1430,
0xB57B: 1431,
0xB57C: 1432,
0xB57D: 1433,
0xB581: 1434,
0xB585: 1435,
0xB589: 1436,
0xB591: 1437,
0xB593: 1438,
0xB595: 1439,
0xB596: 1440,
0xB5A1: 1441,
0xB5A2: 1442,
0xB5A5: 1443,
0xB5A9: 1444,
0xB5AA: 1445,
0xB5AB: 1446,
0xB5AD: 1447,
0xB5B0: 1448,
0xB5B1: 1449,
0xB5B3: 1450,
0xB5B5: 1451,
0xB5B7: 1452,
0xB5B9: 1453,
0xB5C1: 1454,
0xB5C2: 1455,
0xB5C5: 1456,
0xB5C9: 1457,
0xB5D1: 1458,
0xB5D3: 1459,
0xB5D5: 1460,
0xB5D6: 1461,
0xB5D7: 1462,
0xB5E1: 1463,
0xB5E2: 1464,
0xB5E5: 1465,
0xB5F1: 1466,
0xB5F5: 1467,
0xB5F7: 1468,
0xB641: 1469,
0xB642: 1470,
0xB645: 1471,
0xB649: 1472,
0xB651: 1473,
0xB653: 1474,
0xB655: 1475,
0xB657: 1476,
0xB661: 1477,
0xB662: 1478,
0xB665: 1479,
0xB669: 1480,
0xB671: 1481,
0xB673: 1482,
0xB675: 1483,
0xB677: 1484,
0xB681: 1485,
0xB682: 1486,
0xB685: 1487,
0xB689: 1488,
0xB68A: 1489,
0xB68B: 1490,
0xB691: 1491,
0xB693: 1492,
0xB695: 1493,
0xB697: 1494,
0xB6A1: 1495,
0xB6A2: 1496,
0xB6A5: 1497,
0xB6A9: 1498,
0xB6B1: 1499,
0xB6B3: 1500,
0xB6B6: 1501,
0xB6B7: 1502,
0xB6C1: 1503,
0xB6C2: 1504,
0xB6C5: 1505,
0xB6C9: 1506,
0xB6D1: 1507,
0xB6D3: 1508,
0xB6D7: 1509,
0xB6E1: 1510,
0xB6E2: 1511,
0xB6E5: 1512,
0xB6E9: 1513,
0xB6F1: 1514,
0xB6F3: 1515,
0xB6F5: 1516,
0xB6F7: 1517,
0xB741: 1518,
0xB742: 1519,
0xB745: 1520,
0xB749: 1521,
0xB751: 1522,
0xB753: 1523,
0xB755: 1524,
0xB757: 1525,
0xB759: 1526,
0xB761: 1527,
0xB762: 1528,
0xB765: 1529,
0xB769: 1530,
0xB76F: 1531,
0xB771: 1532,
0xB773: 1533,
0xB775: 1534,
0xB777: 1535,
0xB778: 1536,
0xB779: 1537,
0xB77A: 1538,
0xB77B: 1539,
0xB77C: 1540,
0xB77D: 1541,
0xB781: 1542,
0xB785: 1543,
0xB789: 1544,
0xB791: 1545,
0xB795: 1546,
0xB7A1: 1547,
0xB7A2: 1548,
0xB7A5: 1549,
0xB7A9: 1550,
0xB7AA: 1551,
0xB7AB: 1552,
0xB7B0: 1553,
0xB7B1: 1554,
0xB7B3: 1555,
0xB7B5: 1556,
0xB7B6: 1557,
0xB7B7: 1558,
0xB7B8: 1559,
0xB7BC: 1560,
0xB861: 1561,
0xB862: 1562,
0xB865: 1563,
0xB867: 1564,
0xB868: 1565,
0xB869: 1566,
0xB86B: 1567,
0xB871: 1568,
0xB873: 1569,
0xB875: 1570,
0xB876: 1571,
0xB877: 1572,
0xB878: 1573,
0xB881: 1574,
0xB882: 1575,
0xB885: 1576,
0xB889: 1577,
0xB891: 1578,
0xB893: 1579,
0xB895: 1580,
0xB896: 1581,
0xB897: 1582,
0xB8A1: 1583,
0xB8A2: 1584,
0xB8A5: 1585,
0xB8A7: 1586,
0xB8A9: 1587,
0xB8B1: 1588,
0xB8B7: 1589,
0xB8C1: 1590,
0xB8C5: 1591,
0xB8C9: 1592,
0xB8E1: 1593,
0xB8E2: 1594,
0xB8E5: 1595,
0xB8E9: 1596,
0xB8EB: 1597,
0xB8F1: 1598,
0xB8F3: 1599,
0xB8F5: 1600,
0xB8F7: 1601,
0xB8F8: 1602,
0xB941: 1603,
0xB942: 1604,
0xB945: 1605,
0xB949: 1606,
0xB951: 1607,
0xB953: 1608,
0xB955: 1609,
0xB957: 1610,
0xB961: 1611,
0xB965: 1612,
0xB969: 1613,
0xB971: 1614,
0xB973: 1615,
0xB976: 1616,
0xB977: 1617,
0xB981: 1618,
0xB9A1: 1619,
0xB9A2: 1620,
0xB9A5: 1621,
0xB9A9: 1622,
0xB9AB: 1623,
0xB9B1: 1624,
0xB9B3: 1625,
0xB9B5: 1626,
0xB9B7: 1627,
0xB9B8: 1628,
0xB9B9: 1629,
0xB9BD: 1630,
0xB9C1: 1631,
0xB9C2: 1632,
0xB9C9: 1633,
0xB9D3: 1634,
0xB9D5: 1635,
0xB9D7: 1636,
0xB9E1: 1637,
0xB9F6: 1638,
0xB9F7: 1639,
0xBA41: 1640,
0xBA45: 1641,
0xBA49: 1642,
0xBA51: 1643,
0xBA53: 1644,
0xBA55: 1645,
0xBA57: 1646,
0xBA61: 1647,
0xBA62: 1648,
0xBA65: 1649,
0xBA77: 1650,
0xBA81: 1651,
0xBA82: 1652,
0xBA85: 1653,
0xBA89: 1654,
0xBA8A: 1655,
0xBA8B: 1656,
0xBA91: 1657,
0xBA93: 1658,
0xBA95: 1659,
0xBA97: 1660,
0xBAA1: 1661,
0xBAB6: 1662,
0xBAC1: 1663,
0xBAE1: 1664,
0xBAE2: 1665,
0xBAE5: 1666,
0xBAE9: 1667,
0xBAF1: 1668,
0xBAF3: 1669,
0xBAF5: 1670,
0xBB41: 1671,
0xBB45: 1672,
0xBB49: 1673,
0xBB51: 1674,
0xBB61: 1675,
0xBB62: 1676,
0xBB65: 1677,
0xBB69: 1678,
0xBB71: 1679,
0xBB73: 1680,
0xBB75: 1681,
0xBB77: 1682,
0xBBA1: 1683,
0xBBA2: 1684,
0xBBA5: 1685,
0xBBA8: 1686,
0xBBA9: 1687,
0xBBAB: 1688,
0xBBB1: 1689,
0xBBB3: 1690,
0xBBB5: 1691,
0xBBB7: 1692,
0xBBB8: 1693,
0xBBBB: 1694,
0xBBBC: 1695,
0xBC61: 1696,
0xBC62: 1697,
0xBC65: 1698,
0xBC67: 1699,
0xBC69: 1700,
0xBC6C: 1701,
0xBC71: 1702,
0xBC73: 1703,
0xBC75: 1704,
0xBC76: 1705,
0xBC77: 1706,
0xBC81: 1707,
0xBC82: 1708,
0xBC85: 1709,
0xBC89: 1710,
0xBC91: 1711,
0xBC93: 1712,
0xBC95: 1713,
0xBC96: 1714,
0xBC97: 1715,
0xBCA1: 1716,
0xBCA5: 1717,
0xBCB7: 1718,
0xBCE1: 1719,
0xBCE2: 1720,
0xBCE5: 1721,
0xBCE9: 1722,
0xBCF1: 1723,
0xBCF3: 1724,
0xBCF5: 1725,
0xBCF6: 1726,
0xBCF7: 1727,
0xBD41: 1728,
0xBD57: 1729,
0xBD61: 1730,
0xBD76: 1731,
0xBDA1: 1732,
0xBDA2: 1733,
0xBDA5: 1734,
0xBDA9: 1735,
0xBDB1: 1736,
0xBDB3: 1737,
0xBDB5: 1738,
0xBDB7: 1739,
0xBDB9: 1740,
0xBDC1: 1741,
0xBDC2: 1742,
0xBDC9: 1743,
0xBDD6: 1744,
0xBDE1: 1745,
0xBDF6: 1746,
0xBE41: 1747,
0xBE45: 1748,
0xBE49: 1749,
0xBE51: 1750,
0xBE53: 1751,
0xBE77: 1752,
0xBE81: 1753,
0xBE82: 1754,
0xBE85: 1755,
0xBE89: 1756,
0xBE91: 1757,
0xBE93: 1758,
0xBE97: 1759,
0xBEA1: 1760,
0xBEB6: 1761,
0xBEB7: 1762,
0xBEE1: 1763,
0xBF41: 1764,
0xBF61: 1765,
0xBF71: 1766,
0xBF75: 1767,
0xBF77: 1768,
0xBFA1: 1769,
0xBFA2: 1770,
0xBFA5: 1771,
0xBFA9: 1772,
0xBFB1: 1773,
0xBFB3: 1774,
0xBFB7: 1775,
0xBFB8: 1776,
0xBFBD: 1777,
0xC061: 1778,
0xC062: 1779,
0xC065: 1780,
0xC067: 1781,
0xC069: 1782,
0xC071: 1783,
0xC073: 1784,
0xC075: 1785,
0xC076: 1786,
0xC077: 1787,
0xC078: 1788,
0xC081: 1789,
0xC082: 1790,
0xC085: 1791,
0xC089: 1792,
0xC091: 1793,
0xC093: 1794,
0xC095: 1795,
0xC096: 1796,
0xC097: 1797,
0xC0A1: 1798,
0xC0A5: 1799,
0xC0A7: 1800,
0xC0A9: 1801,
0xC0B1: 1802,
0xC0B7: 1803,
0xC0E1: 1804,
0xC0E2: 1805,
0xC0E5: 1806,
0xC0E9: 1807,
0xC0F1: 1808,
0xC0F3: 1809,
0xC0F5: 1810,
0xC0F6: 1811,
0xC0F7: 1812,
0xC141: 1813,
0xC142: 1814,
0xC145: 1815,
0xC149: 1816,
0xC151: 1817,
0xC153: 1818,
0xC155: 1819,
0xC157: 1820,
0xC161: 1821,
0xC165: 1822,
0xC176: 1823,
0xC181: 1824,
0xC185: 1825,
0xC197: 1826,
0xC1A1: 1827,
0xC1A2: 1828,
0xC1A5: 1829,
0xC1A9: 1830,
0xC1B1: 1831,
0xC1B3: 1832,
0xC1B5: 1833,
0xC1B7: 1834,
0xC1C1: 1835,
0xC1C5: 1836,
0xC1C9: 1837,
0xC1D7: 1838,
0xC241: 1839,
0xC245: 1840,
0xC249: 1841,
0xC251: 1842,
0xC253: 1843,
0xC255: 1844,
0xC257: 1845,
0xC261: 1846,
0xC271: 1847,
0xC281: 1848,
0xC282: 1849,
0xC285: 1850,
0xC289: 1851,
0xC291: 1852,
0xC293: 1853,
0xC295: 1854,
0xC297: 1855,
0xC2A1: 1856,
0xC2B6: 1857,
0xC2C1: 1858,
0xC2C5: 1859,
0xC2E1: 1860,
0xC2E5: 1861,
0xC2E9: 1862,
0xC2F1: 1863,
0xC2F3: 1864,
0xC2F5: 1865,
0xC2F7: 1866,
0xC341: 1867,
0xC345: 1868,
0xC349: 1869,
0xC351: 1870,
0xC357: 1871,
0xC361: 1872,
0xC362: 1873,
0xC365: 1874,
0xC369: 1875,
0xC371: 1876,
0xC373: 1877,
0xC375: 1878,
0xC377: 1879,
0xC3A1: 1880,
0xC3A2: 1881,
0xC3A5: 1882,
0xC3A8: 1883,
0xC3A9: 1884,
0xC3AA: 1885,
0xC3B1: 1886,
0xC3B3: 1887,
0xC3B5: 1888,
0xC3B7: 1889,
0xC461: 1890,
0xC462: 1891,
0xC465: 1892,
0xC469: 1893,
0xC471: 1894,
0xC473: 1895,
0xC475: 1896,
0xC477: 1897,
0xC481: 1898,
0xC482: 1899,
0xC485: 1900,
0xC489: 1901,
0xC491: 1902,
0xC493: 1903,
0xC495: 1904,
0xC496: 1905,
0xC497: 1906,
0xC4A1: 1907,
0xC4A2: 1908,
0xC4B7: 1909,
0xC4E1: 1910,
0xC4E2: 1911,
0xC4E5: 1912,
0xC4E8: 1913,
0xC4E9: 1914,
0xC4F1: 1915,
0xC4F3: 1916,
0xC4F5: 1917,
0xC4F6: 1918,
0xC4F7: 1919,
0xC541: 1920,
0xC542: 1921,
0xC545: 1922,
0xC549: 1923,
0xC551: 1924,
0xC553: 1925,
0xC555: 1926,
0xC557: 1927,
0xC561: 1928,
0xC565: 1929,
0xC569: 1930,
0xC571: 1931,
0xC573: 1932,
0xC575: 1933,
0xC576: 1934,
0xC577: 1935,
0xC581: 1936,
0xC5A1: 1937,
0xC5A2: 1938,
0xC5A5: 1939,
0xC5A9: 1940,
0xC5B1: 1941,
0xC5B3: 1942,
0xC5B5: 1943,
0xC5B7: 1944,
0xC5C1: 1945,
0xC5C2: 1946,
0xC5C5: 1947,
0xC5C9: 1948,
0xC5D1: 1949,
0xC5D7: 1950,
0xC5E1: 1951,
0xC5F7: 1952,
0xC641: 1953,
0xC649: 1954,
0xC661: 1955,
0xC681: 1956,
0xC682: 1957,
0xC685: 1958,
0xC689: 1959,
0xC691: 1960,
0xC693: 1961,
0xC695: 1962,
0xC697: 1963,
0xC6A1: 1964,
0xC6A5: 1965,
0xC6A9: 1966,
0xC6B7: 1967,
0xC6C1: 1968,
0xC6D7: 1969,
0xC6E1: 1970,
0xC6E2: 1971,
0xC6E5: 1972,
0xC6E9: 1973,
0xC6F1: 1974,
0xC6F3: 1975,
0xC6F5: 1976,
0xC6F7: 1977,
0xC741: 1978,
0xC745: 1979,
0xC749: 1980,
0xC751: 1981,
0xC761: 1982,
0xC762: 1983,
0xC765: 1984,
0xC769: 1985,
0xC771: 1986,
0xC773: 1987,
0xC777: 1988,
0xC7A1: 1989,
0xC7A2: 1990,
0xC7A5: 1991,
0xC7A9: 1992,
0xC7B1: 1993,
0xC7B3: 1994,
0xC7B5: 1995,
0xC7B7: 1996,
0xC861: 1997,
0xC862: 1998,
0xC865: 1999,
0xC869: 2000,
0xC86A: 2001,
0xC871: 2002,
0xC873: 2003,
0xC875: 2004,
0xC876: 2005,
0xC877: 2006,
0xC881: 2007,
0xC882: 2008,
0xC885: 2009,
0xC889: 2010,
0xC891: 2011,
0xC893: 2012,
0xC895: 2013,
0xC896: 2014,
0xC897: 2015,
0xC8A1: 2016,
0xC8B7: 2017,
0xC8E1: 2018,
0xC8E2: 2019,
0xC8E5: 2020,
0xC8E9: 2021,
0xC8EB: 2022,
0xC8F1: 2023,
0xC8F3: 2024,
0xC8F5: 2025,
0xC8F6: 2026,
0xC8F7: 2027,
0xC941: 2028,
0xC942: 2029,
0xC945: 2030,
0xC949: 2031,
0xC951: 2032,
0xC953: 2033,
0xC955: 2034,
0xC957: 2035,
0xC961: 2036,
0xC965: 2037,
0xC976: 2038,
0xC981: 2039,
0xC985: 2040,
0xC9A1: 2041,
0xC9A2: 2042,
0xC9A5: 2043,
0xC9A9: 2044,
0xC9B1: 2045,
0xC9B3: 2046,
0xC9B5: 2047,
0xC9B7: 2048,
0xC9BC: 2049,
0xC9C1: 2050,
0xC9C5: 2051,
0xC9E1: 2052,
0xCA41: 2053,
0xCA45: 2054,
0xCA55: 2055,
0xCA57: 2056,
0xCA61: 2057,
0xCA81: 2058,
0xCA82: 2059,
0xCA85: 2060,
0xCA89: 2061,
0xCA91: 2062,
0xCA93: 2063,
0xCA95: 2064,
0xCA97: 2065,
0xCAA1: 2066,
0xCAB6: 2067,
0xCAC1: 2068,
0xCAE1: 2069,
0xCAE2: 2070,
0xCAE5: 2071,
0xCAE9: 2072,
0xCAF1: 2073,
0xCAF3: 2074,
0xCAF7: 2075,
0xCB41: 2076,
0xCB45: 2077,
0xCB49: 2078,
0xCB51: 2079,
0xCB57: 2080,
0xCB61: 2081,
0xCB62: 2082,
0xCB65: 2083,
0xCB68: 2084,
0xCB69: 2085,
0xCB6B: 2086,
0xCB71: 2087,
0xCB73: 2088,
0xCB75: 2089,
0xCB81: 2090,
0xCB85: 2091,
0xCB89: 2092,
0xCB91: 2093,
0xCB93: 2094,
0xCBA1: 2095,
0xCBA2: 2096,
0xCBA5: 2097,
0xCBA9: 2098,
0xCBB1: 2099,
0xCBB3: 2100,
0xCBB5: 2101,
0xCBB7: 2102,
0xCC61: 2103,
0xCC62: 2104,
0xCC63: 2105,
0xCC65: 2106,
0xCC69: 2107,
0xCC6B: 2108,
0xCC71: 2109,
0xCC73: 2110,
0xCC75: 2111,
0xCC76: 2112,
0xCC77: 2113,
0xCC7B: 2114,
0xCC81: 2115,
0xCC82: 2116,
0xCC85: 2117,
0xCC89: 2118,
0xCC91: 2119,
0xCC93: 2120,
0xCC95: 2121,
0xCC96: 2122,
0xCC97: 2123,
0xCCA1: 2124,
0xCCA2: 2125,
0xCCE1: 2126,
0xCCE2: 2127,
0xCCE5: 2128,
0xCCE9: 2129,
0xCCF1: 2130,
0xCCF3: 2131,
0xCCF5: 2132,
0xCCF6: 2133,
0xCCF7: 2134,
0xCD41: 2135,
0xCD42: 2136,
0xCD45: 2137,
0xCD49: 2138,
0xCD51: 2139,
0xCD53: 2140,
0xCD55: 2141,
0xCD57: 2142,
0xCD61: 2143,
0xCD65: 2144,
0xCD69: 2145,
0xCD71: 2146,
0xCD73: 2147,
0xCD76: 2148,
0xCD77: 2149,
0xCD81: 2150,
0xCD89: 2151,
0xCD93: 2152,
0xCD95: 2153,
0xCDA1: 2154,
0xCDA2: 2155,
0xCDA5: 2156,
0xCDA9: 2157,
0xCDB1: 2158,
0xCDB3: 2159,
0xCDB5: 2160,
0xCDB7: 2161,
0xCDC1: 2162,
0xCDD7: 2163,
0xCE41: 2164,
0xCE45: 2165,
0xCE61: 2166,
0xCE65: 2167,
0xCE69: 2168,
0xCE73: 2169,
0xCE75: 2170,
0xCE81: 2171,
0xCE82: 2172,
0xCE85: 2173,
0xCE88: 2174,
0xCE89: 2175,
0xCE8B: 2176,
0xCE91: 2177,
0xCE93: 2178,
0xCE95: 2179,
0xCE97: 2180,
0xCEA1: 2181,
0xCEB7: 2182,
0xCEE1: 2183,
0xCEE5: 2184,
0xCEE9: 2185,
0xCEF1: 2186,
0xCEF5: 2187,
0xCF41: 2188,
0xCF45: 2189,
0xCF49: 2190,
0xCF51: 2191,
0xCF55: 2192,
0xCF57: 2193,
0xCF61: 2194,
0xCF65: 2195,
0xCF69: 2196,
0xCF71: 2197,
0xCF73: 2198,
0xCF75: 2199,
0xCFA1: 2200,
0xCFA2: 2201,
0xCFA5: 2202,
0xCFA9: 2203,
0xCFB1: 2204,
0xCFB3: 2205,
0xCFB5: 2206,
0xCFB7: 2207,
0xD061: 2208,
0xD062: 2209,
0xD065: 2210,
0xD069: 2211,
0xD06E: 2212,
0xD071: 2213,
0xD073: 2214,
0xD075: 2215,
0xD077: 2216,
0xD081: 2217,
0xD082: 2218,
0xD085: 2219,
0xD089: 2220,
0xD091: 2221,
0xD093: 2222,
0xD095: 2223,
0xD096: 2224,
0xD097: 2225,
0xD0A1: 2226,
0xD0B7: 2227,
0xD0E1: 2228,
0xD0E2: 2229,
0xD0E5: 2230,
0xD0E9: 2231,
0xD0EB: 2232,
0xD0F1: 2233,
0xD0F3: 2234,
0xD0F5: 2235,
0xD0F7: 2236,
0xD141: 2237,
0xD142: 2238,
0xD145: 2239,
0xD149: 2240,
0xD151: 2241,
0xD153: 2242,
0xD155: 2243,
0xD157: 2244,
0xD161: 2245,
0xD162: 2246,
0xD165: 2247,
0xD169: 2248,
0xD171: 2249,
0xD173: 2250,
0xD175: 2251,
0xD176: 2252,
0xD177: 2253,
0xD181: 2254,
0xD185: 2255,
0xD189: 2256,
0xD193: 2257,
0xD1A1: 2258,
0xD1A2: 2259,
0xD1A5: 2260,
0xD1A9: 2261,
0xD1AE: 2262,
0xD1B1: 2263,
0xD1B3: 2264,
0xD1B5: 2265,
0xD1B7: 2266,
0xD1BB: 2267,
0xD1C1: 2268,
0xD1C2: 2269,
0xD1C5: 2270,
0xD1C9: 2271,
0xD1D5: 2272,
0xD1D7: 2273,
0xD1E1: 2274,
0xD1E2: 2275,
0xD1E5: 2276,
0xD1F5: 2277,
0xD1F7: 2278,
0xD241: 2279,
0xD242: 2280,
0xD245: 2281,
0xD249: 2282,
0xD253: 2283,
0xD255: 2284,
0xD257: 2285,
0xD261: 2286,
0xD265: 2287,
0xD269: 2288,
0xD273: 2289,
0xD275: 2290,
0xD281: 2291,
0xD282: 2292,
0xD285: 2293,
0xD289: 2294,
0xD28E: 2295,
0xD291: 2296,
0xD295: 2297,
0xD297: 2298,
0xD2A1: 2299,
0xD2A5: 2300,
0xD2A9: 2301,
0xD2B1: 2302,
0xD2B7: 2303,
0xD2C1: 2304,
0xD2C2: 2305,
0xD2C5: 2306,
0xD2C9: 2307,
0xD2D7: 2308,
0xD2E1: 2309,
0xD2E2: 2310,
0xD2E5: 2311,
0xD2E9: 2312,
0xD2F1: 2313,
0xD2F3: 2314,
0xD2F5: 2315,
0xD2F7: 2316,
0xD341: 2317,
0xD342: 2318,
0xD345: 2319,
0xD349: 2320,
0xD351: 2321,
0xD355: 2322,
0xD357: 2323,
0xD361: 2324,
0xD362: 2325,
0xD365: 2326,
0xD367: 2327,
0xD368: 2328,
0xD369: 2329,
0xD36A: 2330,
0xD371: 2331,
0xD373: 2332,
0xD375: 2333,
0xD377: 2334,
0xD37B: 2335,
0xD381: 2336,
0xD385: 2337,
0xD389: 2338,
0xD391: 2339,
0xD393: 2340,
0xD397: 2341,
0xD3A1: 2342,
0xD3A2: 2343,
0xD3A5: 2344,
0xD3A9: 2345,
0xD3B1: 2346,
0xD3B3: 2347,
0xD3B5: 2348,
0xD3B7: 2349,
}
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/chardet/johabfreq.py
|
Python
|
mit
| 42,498 |
######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301 USA
######################### END LICENSE BLOCK #########################
from .chardistribution import JOHABDistributionAnalysis
from .codingstatemachine import CodingStateMachine
from .mbcharsetprober import MultiByteCharSetProber
from .mbcssm import JOHAB_SM_MODEL
class JOHABProber(MultiByteCharSetProber):
def __init__(self):
super().__init__()
self.coding_sm = CodingStateMachine(JOHAB_SM_MODEL)
self.distribution_analyzer = JOHABDistributionAnalysis()
self.reset()
@property
def charset_name(self):
return "Johab"
@property
def language(self):
return "Korean"
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/chardet/johabprober.py
|
Python
|
mit
| 1,730 |
######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301 USA
######################### END LICENSE BLOCK #########################
# This is hiragana 2-char sequence table, the number in each cell represents its frequency category
# fmt: off
jp2_char_context = (
(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, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1),
(2, 4, 0, 4, 0, 3, 0, 4, 0, 3, 4, 4, 4, 2, 4, 3, 3, 4, 3, 2, 3, 3, 4, 2, 3, 3, 3, 2, 4, 1, 4, 3, 3, 1, 5, 4, 3, 4, 3, 4, 3, 5, 3, 0, 3, 5, 4, 2, 0, 3, 1, 0, 3, 3, 0, 3, 3, 0, 1, 1, 0, 4, 3, 0, 3, 3, 0, 4, 0, 2, 0, 3, 5, 5, 5, 5, 4, 0, 4, 1, 0, 3, 4),
(0, 0, 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, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2),
(0, 4, 0, 5, 0, 5, 0, 4, 0, 4, 5, 4, 4, 3, 5, 3, 5, 1, 5, 3, 4, 3, 4, 4, 3, 4, 3, 3, 4, 3, 5, 4, 4, 3, 5, 5, 3, 5, 5, 5, 3, 5, 5, 3, 4, 5, 5, 3, 1, 3, 2, 0, 3, 4, 0, 4, 2, 0, 4, 2, 1, 5, 3, 2, 3, 5, 0, 4, 0, 2, 0, 5, 4, 4, 5, 4, 5, 0, 4, 0, 0, 4, 4),
(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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(0, 3, 0, 4, 0, 3, 0, 3, 0, 4, 5, 4, 3, 3, 3, 3, 4, 3, 5, 4, 4, 3, 5, 4, 4, 3, 4, 3, 4, 4, 4, 4, 5, 3, 4, 4, 3, 4, 5, 5, 4, 5, 5, 1, 4, 5, 4, 3, 0, 3, 3, 1, 3, 3, 0, 4, 4, 0, 3, 3, 1, 5, 3, 3, 3, 5, 0, 4, 0, 3, 0, 4, 4, 3, 4, 3, 3, 0, 4, 1, 1, 3, 4),
(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, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(0, 4, 0, 3, 0, 3, 0, 4, 0, 3, 4, 4, 3, 2, 2, 1, 2, 1, 3, 1, 3, 3, 3, 3, 3, 4, 3, 1, 3, 3, 5, 3, 3, 0, 4, 3, 0, 5, 4, 3, 3, 5, 4, 4, 3, 4, 4, 5, 0, 1, 2, 0, 1, 2, 0, 2, 2, 0, 1, 0, 0, 5, 2, 2, 1, 4, 0, 3, 0, 1, 0, 4, 4, 3, 5, 4, 3, 0, 2, 1, 0, 4, 3),
(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, 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, 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, 3, 0, 5, 0, 4, 0, 2, 1, 4, 4, 2, 4, 1, 4, 2, 4, 2, 4, 3, 3, 3, 4, 3, 3, 3, 3, 1, 4, 2, 3, 3, 3, 1, 4, 4, 1, 1, 1, 4, 3, 3, 2, 0, 2, 4, 3, 2, 0, 3, 3, 0, 3, 1, 1, 0, 0, 0, 3, 3, 0, 4, 2, 2, 3, 4, 0, 4, 0, 3, 0, 4, 4, 5, 3, 4, 4, 0, 3, 0, 0, 1, 4),
(1, 4, 0, 4, 0, 4, 0, 4, 0, 3, 5, 4, 4, 3, 4, 3, 5, 4, 3, 3, 4, 3, 5, 4, 4, 4, 4, 3, 4, 2, 4, 3, 3, 1, 5, 4, 3, 2, 4, 5, 4, 5, 5, 4, 4, 5, 4, 4, 0, 3, 2, 2, 3, 3, 0, 4, 3, 1, 3, 2, 1, 4, 3, 3, 4, 5, 0, 3, 0, 2, 0, 4, 5, 5, 4, 5, 4, 0, 4, 0, 0, 5, 4),
(0, 5, 0, 5, 0, 4, 0, 3, 0, 4, 4, 3, 4, 3, 3, 3, 4, 0, 4, 4, 4, 3, 4, 3, 4, 3, 3, 1, 4, 2, 4, 3, 4, 0, 5, 4, 1, 4, 5, 4, 4, 5, 3, 2, 4, 3, 4, 3, 2, 4, 1, 3, 3, 3, 2, 3, 2, 0, 4, 3, 3, 4, 3, 3, 3, 4, 0, 4, 0, 3, 0, 4, 5, 4, 4, 4, 3, 0, 4, 1, 0, 1, 3),
(0, 3, 1, 4, 0, 3, 0, 2, 0, 3, 4, 4, 3, 1, 4, 2, 3, 3, 4, 3, 4, 3, 4, 3, 4, 4, 3, 2, 3, 1, 5, 4, 4, 1, 4, 4, 3, 5, 4, 4, 3, 5, 5, 4, 3, 4, 4, 3, 1, 2, 3, 1, 2, 2, 0, 3, 2, 0, 3, 1, 0, 5, 3, 3, 3, 4, 3, 3, 3, 3, 4, 4, 4, 4, 5, 4, 2, 0, 3, 3, 2, 4, 3),
(0, 2, 0, 3, 0, 1, 0, 1, 0, 0, 3, 2, 0, 0, 2, 0, 1, 0, 2, 1, 3, 3, 3, 1, 2, 3, 1, 0, 1, 0, 4, 2, 1, 1, 3, 3, 0, 4, 3, 3, 1, 4, 3, 3, 0, 3, 3, 2, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 4, 1, 0, 2, 3, 2, 2, 2, 1, 3, 3, 3, 4, 4, 3, 2, 0, 3, 1, 0, 3, 3),
(0, 4, 0, 4, 0, 3, 0, 3, 0, 4, 4, 4, 3, 3, 3, 3, 3, 3, 4, 3, 4, 2, 4, 3, 4, 3, 3, 2, 4, 3, 4, 5, 4, 1, 4, 5, 3, 5, 4, 5, 3, 5, 4, 0, 3, 5, 5, 3, 1, 3, 3, 2, 2, 3, 0, 3, 4, 1, 3, 3, 2, 4, 3, 3, 3, 4, 0, 4, 0, 3, 0, 4, 5, 4, 4, 5, 3, 0, 4, 1, 0, 3, 4),
(0, 2, 0, 3, 0, 3, 0, 0, 0, 2, 2, 2, 1, 0, 1, 0, 0, 0, 3, 0, 3, 0, 3, 0, 1, 3, 1, 0, 3, 1, 3, 3, 3, 1, 3, 3, 3, 0, 1, 3, 1, 3, 4, 0, 0, 3, 1, 1, 0, 3, 2, 0, 0, 0, 0, 1, 3, 0, 1, 0, 0, 3, 3, 2, 0, 3, 0, 0, 0, 0, 0, 3, 4, 3, 4, 3, 3, 0, 3, 0, 0, 2, 3),
(2, 3, 0, 3, 0, 2, 0, 1, 0, 3, 3, 4, 3, 1, 3, 1, 1, 1, 3, 1, 4, 3, 4, 3, 3, 3, 0, 0, 3, 1, 5, 4, 3, 1, 4, 3, 2, 5, 5, 4, 4, 4, 4, 3, 3, 4, 4, 4, 0, 2, 1, 1, 3, 2, 0, 1, 2, 0, 0, 1, 0, 4, 1, 3, 3, 3, 0, 3, 0, 1, 0, 4, 4, 4, 5, 5, 3, 0, 2, 0, 0, 4, 4),
(0, 2, 0, 1, 0, 3, 1, 3, 0, 2, 3, 3, 3, 0, 3, 1, 0, 0, 3, 0, 3, 2, 3, 1, 3, 2, 1, 1, 0, 0, 4, 2, 1, 0, 2, 3, 1, 4, 3, 2, 0, 4, 4, 3, 1, 3, 1, 3, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 4, 1, 1, 1, 2, 0, 3, 0, 0, 0, 3, 4, 2, 4, 3, 2, 0, 1, 0, 0, 3, 3),
(0, 1, 0, 4, 0, 5, 0, 4, 0, 2, 4, 4, 2, 3, 3, 2, 3, 3, 5, 3, 3, 3, 4, 3, 4, 2, 3, 0, 4, 3, 3, 3, 4, 1, 4, 3, 2, 1, 5, 5, 3, 4, 5, 1, 3, 5, 4, 2, 0, 3, 3, 0, 1, 3, 0, 4, 2, 0, 1, 3, 1, 4, 3, 3, 3, 3, 0, 3, 0, 1, 0, 3, 4, 4, 4, 5, 5, 0, 3, 0, 1, 4, 5),
(0, 2, 0, 3, 0, 3, 0, 0, 0, 2, 3, 1, 3, 0, 4, 0, 1, 1, 3, 0, 3, 4, 3, 2, 3, 1, 0, 3, 3, 2, 3, 1, 3, 0, 2, 3, 0, 2, 1, 4, 1, 2, 2, 0, 0, 3, 3, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 2, 2, 0, 3, 2, 1, 3, 3, 0, 2, 0, 2, 0, 0, 3, 3, 1, 2, 4, 0, 3, 0, 2, 2, 3),
(2, 4, 0, 5, 0, 4, 0, 4, 0, 2, 4, 4, 4, 3, 4, 3, 3, 3, 1, 2, 4, 3, 4, 3, 4, 4, 5, 0, 3, 3, 3, 3, 2, 0, 4, 3, 1, 4, 3, 4, 1, 4, 4, 3, 3, 4, 4, 3, 1, 2, 3, 0, 4, 2, 0, 4, 1, 0, 3, 3, 0, 4, 3, 3, 3, 4, 0, 4, 0, 2, 0, 3, 5, 3, 4, 5, 2, 0, 3, 0, 0, 4, 5),
(0, 3, 0, 4, 0, 1, 0, 1, 0, 1, 3, 2, 2, 1, 3, 0, 3, 0, 2, 0, 2, 0, 3, 0, 2, 0, 0, 0, 1, 0, 1, 1, 0, 0, 3, 1, 0, 0, 0, 4, 0, 3, 1, 0, 2, 1, 3, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 4, 2, 2, 3, 1, 0, 3, 0, 0, 0, 1, 4, 4, 4, 3, 0, 0, 4, 0, 0, 1, 4),
(1, 4, 1, 5, 0, 3, 0, 3, 0, 4, 5, 4, 4, 3, 5, 3, 3, 4, 4, 3, 4, 1, 3, 3, 3, 3, 2, 1, 4, 1, 5, 4, 3, 1, 4, 4, 3, 5, 4, 4, 3, 5, 4, 3, 3, 4, 4, 4, 0, 3, 3, 1, 2, 3, 0, 3, 1, 0, 3, 3, 0, 5, 4, 4, 4, 4, 4, 4, 3, 3, 5, 4, 4, 3, 3, 5, 4, 0, 3, 2, 0, 4, 4),
(0, 2, 0, 3, 0, 1, 0, 0, 0, 1, 3, 3, 3, 2, 4, 1, 3, 0, 3, 1, 3, 0, 2, 2, 1, 1, 0, 0, 2, 0, 4, 3, 1, 0, 4, 3, 0, 4, 4, 4, 1, 4, 3, 1, 1, 3, 3, 1, 0, 2, 0, 0, 1, 3, 0, 0, 0, 0, 2, 0, 0, 4, 3, 2, 4, 3, 5, 4, 3, 3, 3, 4, 3, 3, 4, 3, 3, 0, 2, 1, 0, 3, 3),
(0, 2, 0, 4, 0, 3, 0, 2, 0, 2, 5, 5, 3, 4, 4, 4, 4, 1, 4, 3, 3, 0, 4, 3, 4, 3, 1, 3, 3, 2, 4, 3, 0, 3, 4, 3, 0, 3, 4, 4, 2, 4, 4, 0, 4, 5, 3, 3, 2, 2, 1, 1, 1, 2, 0, 1, 5, 0, 3, 3, 2, 4, 3, 3, 3, 4, 0, 3, 0, 2, 0, 4, 4, 3, 5, 5, 0, 0, 3, 0, 2, 3, 3),
(0, 3, 0, 4, 0, 3, 0, 1, 0, 3, 4, 3, 3, 1, 3, 3, 3, 0, 3, 1, 3, 0, 4, 3, 3, 1, 1, 0, 3, 0, 3, 3, 0, 0, 4, 4, 0, 1, 5, 4, 3, 3, 5, 0, 3, 3, 4, 3, 0, 2, 0, 1, 1, 1, 0, 1, 3, 0, 1, 2, 1, 3, 3, 2, 3, 3, 0, 3, 0, 1, 0, 1, 3, 3, 4, 4, 1, 0, 1, 2, 2, 1, 3),
(0, 1, 0, 4, 0, 4, 0, 3, 0, 1, 3, 3, 3, 2, 3, 1, 1, 0, 3, 0, 3, 3, 4, 3, 2, 4, 2, 0, 1, 0, 4, 3, 2, 0, 4, 3, 0, 5, 3, 3, 2, 4, 4, 4, 3, 3, 3, 4, 0, 1, 3, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 4, 2, 3, 3, 3, 0, 3, 0, 0, 0, 4, 4, 4, 5, 3, 2, 0, 3, 3, 0, 3, 5),
(0, 2, 0, 3, 0, 0, 0, 3, 0, 1, 3, 0, 2, 0, 0, 0, 1, 0, 3, 1, 1, 3, 3, 0, 0, 3, 0, 0, 3, 0, 2, 3, 1, 0, 3, 1, 0, 3, 3, 2, 0, 4, 2, 2, 0, 2, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 2, 0, 1, 0, 1, 0, 0, 0, 1, 3, 1, 2, 0, 0, 0, 1, 0, 0, 1, 4),
(0, 3, 0, 3, 0, 5, 0, 1, 0, 2, 4, 3, 1, 3, 3, 2, 1, 1, 5, 2, 1, 0, 5, 1, 2, 0, 0, 0, 3, 3, 2, 2, 3, 2, 4, 3, 0, 0, 3, 3, 1, 3, 3, 0, 2, 5, 3, 4, 0, 3, 3, 0, 1, 2, 0, 2, 2, 0, 3, 2, 0, 2, 2, 3, 3, 3, 0, 2, 0, 1, 0, 3, 4, 4, 2, 5, 4, 0, 3, 0, 0, 3, 5),
(0, 3, 0, 3, 0, 3, 0, 1, 0, 3, 3, 3, 3, 0, 3, 0, 2, 0, 2, 1, 1, 0, 2, 0, 1, 0, 0, 0, 2, 1, 0, 0, 1, 0, 3, 2, 0, 0, 3, 3, 1, 2, 3, 1, 0, 3, 3, 0, 0, 1, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 3, 1, 2, 3, 0, 3, 0, 1, 0, 3, 2, 1, 0, 4, 3, 0, 1, 1, 0, 3, 3),
(0, 4, 0, 5, 0, 3, 0, 3, 0, 4, 5, 5, 4, 3, 5, 3, 4, 3, 5, 3, 3, 2, 5, 3, 4, 4, 4, 3, 4, 3, 4, 5, 5, 3, 4, 4, 3, 4, 4, 5, 4, 4, 4, 3, 4, 5, 5, 4, 2, 3, 4, 2, 3, 4, 0, 3, 3, 1, 4, 3, 2, 4, 3, 3, 5, 5, 0, 3, 0, 3, 0, 5, 5, 5, 5, 4, 4, 0, 4, 0, 1, 4, 4),
(0, 4, 0, 4, 0, 3, 0, 3, 0, 3, 5, 4, 4, 2, 3, 2, 5, 1, 3, 2, 5, 1, 4, 2, 3, 2, 3, 3, 4, 3, 3, 3, 3, 2, 5, 4, 1, 3, 3, 5, 3, 4, 4, 0, 4, 4, 3, 1, 1, 3, 1, 0, 2, 3, 0, 2, 3, 0, 3, 0, 0, 4, 3, 1, 3, 4, 0, 3, 0, 2, 0, 4, 4, 4, 3, 4, 5, 0, 4, 0, 0, 3, 4),
(0, 3, 0, 3, 0, 3, 1, 2, 0, 3, 4, 4, 3, 3, 3, 0, 2, 2, 4, 3, 3, 1, 3, 3, 3, 1, 1, 0, 3, 1, 4, 3, 2, 3, 4, 4, 2, 4, 4, 4, 3, 4, 4, 3, 2, 4, 4, 3, 1, 3, 3, 1, 3, 3, 0, 4, 1, 0, 2, 2, 1, 4, 3, 2, 3, 3, 5, 4, 3, 3, 5, 4, 4, 3, 3, 0, 4, 0, 3, 2, 2, 4, 4),
(0, 2, 0, 1, 0, 0, 0, 0, 0, 1, 2, 1, 3, 0, 0, 0, 0, 0, 2, 0, 1, 2, 1, 0, 0, 1, 0, 0, 0, 0, 3, 0, 0, 1, 0, 1, 1, 3, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 0, 3, 4, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1),
(0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 4, 0, 4, 1, 4, 0, 3, 0, 4, 0, 3, 0, 4, 0, 3, 0, 3, 0, 4, 1, 5, 1, 4, 0, 0, 3, 0, 5, 0, 5, 2, 0, 1, 0, 0, 0, 2, 1, 4, 0, 1, 3, 0, 0, 3, 0, 0, 3, 1, 1, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0),
(1, 4, 0, 5, 0, 3, 0, 2, 0, 3, 5, 4, 4, 3, 4, 3, 5, 3, 4, 3, 3, 0, 4, 3, 3, 3, 3, 3, 3, 2, 4, 4, 3, 1, 3, 4, 4, 5, 4, 4, 3, 4, 4, 1, 3, 5, 4, 3, 3, 3, 1, 2, 2, 3, 3, 1, 3, 1, 3, 3, 3, 5, 3, 3, 4, 5, 0, 3, 0, 3, 0, 3, 4, 3, 4, 4, 3, 0, 3, 0, 2, 4, 3),
(0, 1, 0, 4, 0, 0, 0, 0, 0, 1, 4, 0, 4, 1, 4, 2, 4, 0, 3, 0, 1, 0, 1, 0, 0, 0, 0, 0, 2, 0, 3, 1, 1, 1, 0, 3, 0, 0, 0, 1, 2, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 3, 0, 0, 0, 0, 3, 2, 0, 2, 2, 0, 1, 0, 0, 0, 2, 3, 2, 3, 3, 0, 0, 0, 0, 2, 1, 0),
(0, 5, 1, 5, 0, 3, 0, 3, 0, 5, 4, 4, 5, 1, 5, 3, 3, 0, 4, 3, 4, 3, 5, 3, 4, 3, 3, 2, 4, 3, 4, 3, 3, 0, 3, 3, 1, 4, 4, 3, 4, 4, 4, 3, 4, 5, 5, 3, 2, 3, 1, 1, 3, 3, 1, 3, 1, 1, 3, 3, 2, 4, 5, 3, 3, 5, 0, 4, 0, 3, 0, 4, 4, 3, 5, 3, 3, 0, 3, 4, 0, 4, 3),
(0, 5, 0, 5, 0, 3, 0, 2, 0, 4, 4, 3, 5, 2, 4, 3, 3, 3, 4, 4, 4, 3, 5, 3, 5, 3, 3, 1, 4, 0, 4, 3, 3, 0, 3, 3, 0, 4, 4, 4, 4, 5, 4, 3, 3, 5, 5, 3, 2, 3, 1, 2, 3, 2, 0, 1, 0, 0, 3, 2, 2, 4, 4, 3, 1, 5, 0, 4, 0, 3, 0, 4, 3, 1, 3, 2, 1, 0, 3, 3, 0, 3, 3),
(0, 4, 0, 5, 0, 5, 0, 4, 0, 4, 5, 5, 5, 3, 4, 3, 3, 2, 5, 4, 4, 3, 5, 3, 5, 3, 4, 0, 4, 3, 4, 4, 3, 2, 4, 4, 3, 4, 5, 4, 4, 5, 5, 0, 3, 5, 5, 4, 1, 3, 3, 2, 3, 3, 1, 3, 1, 0, 4, 3, 1, 4, 4, 3, 4, 5, 0, 4, 0, 2, 0, 4, 3, 4, 4, 3, 3, 0, 4, 0, 0, 5, 5),
(0, 4, 0, 4, 0, 5, 0, 1, 1, 3, 3, 4, 4, 3, 4, 1, 3, 0, 5, 1, 3, 0, 3, 1, 3, 1, 1, 0, 3, 0, 3, 3, 4, 0, 4, 3, 0, 4, 4, 4, 3, 4, 4, 0, 3, 5, 4, 1, 0, 3, 0, 0, 2, 3, 0, 3, 1, 0, 3, 1, 0, 3, 2, 1, 3, 5, 0, 3, 0, 1, 0, 3, 2, 3, 3, 4, 4, 0, 2, 2, 0, 4, 4),
(2, 4, 0, 5, 0, 4, 0, 3, 0, 4, 5, 5, 4, 3, 5, 3, 5, 3, 5, 3, 5, 2, 5, 3, 4, 3, 3, 4, 3, 4, 5, 3, 2, 1, 5, 4, 3, 2, 3, 4, 5, 3, 4, 1, 2, 5, 4, 3, 0, 3, 3, 0, 3, 2, 0, 2, 3, 0, 4, 1, 0, 3, 4, 3, 3, 5, 0, 3, 0, 1, 0, 4, 5, 5, 5, 4, 3, 0, 4, 2, 0, 3, 5),
(0, 5, 0, 4, 0, 4, 0, 2, 0, 5, 4, 3, 4, 3, 4, 3, 3, 3, 4, 3, 4, 2, 5, 3, 5, 3, 4, 1, 4, 3, 4, 4, 4, 0, 3, 5, 0, 4, 4, 4, 4, 5, 3, 1, 3, 4, 5, 3, 3, 3, 3, 3, 3, 3, 0, 2, 2, 0, 3, 3, 2, 4, 3, 3, 3, 5, 3, 4, 1, 3, 3, 5, 3, 2, 0, 0, 0, 0, 4, 3, 1, 3, 3),
(0, 1, 0, 3, 0, 3, 0, 1, 0, 1, 3, 3, 3, 2, 3, 3, 3, 0, 3, 0, 0, 0, 3, 1, 3, 0, 0, 0, 2, 2, 2, 3, 0, 0, 3, 2, 0, 1, 2, 4, 1, 3, 3, 0, 0, 3, 3, 3, 0, 1, 0, 0, 2, 1, 0, 0, 3, 0, 3, 1, 0, 3, 0, 0, 1, 3, 0, 2, 0, 1, 0, 3, 3, 1, 3, 3, 0, 0, 1, 1, 0, 3, 3),
(0, 2, 0, 3, 0, 2, 1, 4, 0, 2, 2, 3, 1, 1, 3, 1, 1, 0, 2, 0, 3, 1, 2, 3, 1, 3, 0, 0, 1, 0, 4, 3, 2, 3, 3, 3, 1, 4, 2, 3, 3, 3, 3, 1, 0, 3, 1, 4, 0, 1, 1, 0, 1, 2, 0, 1, 1, 0, 1, 1, 0, 3, 1, 3, 2, 2, 0, 1, 0, 0, 0, 2, 3, 3, 3, 1, 0, 0, 0, 0, 0, 2, 3),
(0, 5, 0, 4, 0, 5, 0, 2, 0, 4, 5, 5, 3, 3, 4, 3, 3, 1, 5, 4, 4, 2, 4, 4, 4, 3, 4, 2, 4, 3, 5, 5, 4, 3, 3, 4, 3, 3, 5, 5, 4, 5, 5, 1, 3, 4, 5, 3, 1, 4, 3, 1, 3, 3, 0, 3, 3, 1, 4, 3, 1, 4, 5, 3, 3, 5, 0, 4, 0, 3, 0, 5, 3, 3, 1, 4, 3, 0, 4, 0, 1, 5, 3),
(0, 5, 0, 5, 0, 4, 0, 2, 0, 4, 4, 3, 4, 3, 3, 3, 3, 3, 5, 4, 4, 4, 4, 4, 4, 5, 3, 3, 5, 2, 4, 4, 4, 3, 4, 4, 3, 3, 4, 4, 5, 5, 3, 3, 4, 3, 4, 3, 3, 4, 3, 3, 3, 3, 1, 2, 2, 1, 4, 3, 3, 5, 4, 4, 3, 4, 0, 4, 0, 3, 0, 4, 4, 4, 4, 4, 1, 0, 4, 2, 0, 2, 4),
(0, 4, 0, 4, 0, 3, 0, 1, 0, 3, 5, 2, 3, 0, 3, 0, 2, 1, 4, 2, 3, 3, 4, 1, 4, 3, 3, 2, 4, 1, 3, 3, 3, 0, 3, 3, 0, 0, 3, 3, 3, 5, 3, 3, 3, 3, 3, 2, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 1, 0, 0, 3, 1, 2, 2, 3, 0, 3, 0, 2, 0, 4, 4, 3, 3, 4, 1, 0, 3, 0, 0, 2, 4),
(0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 2, 0, 0, 0, 0, 0, 1, 0, 2, 0, 1, 0, 0, 0, 0, 0, 3, 1, 3, 0, 3, 2, 0, 0, 0, 1, 0, 3, 2, 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, 0, 0, 3, 4, 0, 2, 0, 0, 0, 0, 0, 0, 2),
(0, 2, 1, 3, 0, 2, 0, 2, 0, 3, 3, 3, 3, 1, 3, 1, 3, 3, 3, 3, 3, 3, 4, 2, 2, 1, 2, 1, 4, 0, 4, 3, 1, 3, 3, 3, 2, 4, 3, 5, 4, 3, 3, 3, 3, 3, 3, 3, 0, 1, 3, 0, 2, 0, 0, 1, 0, 0, 1, 0, 0, 4, 2, 0, 2, 3, 0, 3, 3, 0, 3, 3, 4, 2, 3, 1, 4, 0, 1, 2, 0, 2, 3),
(0, 3, 0, 3, 0, 1, 0, 3, 0, 2, 3, 3, 3, 0, 3, 1, 2, 0, 3, 3, 2, 3, 3, 2, 3, 2, 3, 1, 3, 0, 4, 3, 2, 0, 3, 3, 1, 4, 3, 3, 2, 3, 4, 3, 1, 3, 3, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 4, 1, 1, 0, 3, 0, 3, 1, 0, 2, 3, 3, 3, 3, 3, 1, 0, 0, 2, 0, 3, 3),
(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 2, 0, 3, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 3, 0, 3, 0, 3, 1, 0, 1, 0, 1, 0, 0, 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, 3, 0, 2, 0, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 3),
(0, 2, 0, 3, 1, 3, 0, 3, 0, 2, 3, 3, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 1, 3, 0, 2, 3, 1, 1, 4, 3, 3, 2, 3, 3, 1, 2, 2, 4, 1, 3, 3, 0, 1, 4, 2, 3, 0, 1, 3, 0, 3, 0, 0, 1, 3, 0, 2, 0, 0, 3, 3, 2, 1, 3, 0, 3, 0, 2, 0, 3, 4, 4, 4, 3, 1, 0, 3, 0, 0, 3, 3),
(0, 2, 0, 1, 0, 2, 0, 0, 0, 1, 3, 2, 2, 1, 3, 0, 1, 1, 3, 0, 3, 2, 3, 1, 2, 0, 2, 0, 1, 1, 3, 3, 3, 0, 3, 3, 1, 1, 2, 3, 2, 3, 3, 1, 2, 3, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 3, 0, 1, 0, 0, 2, 1, 2, 1, 3, 0, 3, 0, 0, 0, 3, 4, 4, 4, 3, 2, 0, 2, 0, 0, 2, 4),
(0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 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, 1, 0, 0, 0, 0, 1, 3, 1, 0, 0, 0, 0, 0, 0, 0, 3),
(0, 3, 0, 3, 0, 2, 0, 3, 0, 3, 3, 3, 2, 3, 2, 2, 2, 0, 3, 1, 3, 3, 3, 2, 3, 3, 0, 0, 3, 0, 3, 2, 2, 0, 2, 3, 1, 4, 3, 4, 3, 3, 2, 3, 1, 5, 4, 4, 0, 3, 1, 2, 1, 3, 0, 3, 1, 1, 2, 0, 2, 3, 1, 3, 1, 3, 0, 3, 0, 1, 0, 3, 3, 4, 4, 2, 1, 0, 2, 1, 0, 2, 4),
(0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 4, 2, 5, 1, 4, 0, 2, 0, 2, 1, 3, 1, 4, 0, 2, 1, 0, 0, 2, 1, 4, 1, 1, 0, 3, 3, 0, 5, 1, 3, 2, 3, 3, 1, 0, 3, 2, 3, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 4, 0, 1, 0, 3, 0, 2, 0, 1, 0, 3, 3, 3, 4, 3, 3, 0, 0, 0, 0, 2, 3),
(0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 2, 1, 0, 0, 1, 0, 0, 0, 0, 0, 3),
(0, 1, 0, 3, 0, 4, 0, 3, 0, 2, 4, 3, 1, 0, 3, 2, 2, 1, 3, 1, 2, 2, 3, 1, 1, 1, 2, 1, 3, 0, 1, 2, 0, 1, 3, 2, 1, 3, 0, 5, 5, 1, 0, 0, 1, 3, 2, 1, 0, 3, 0, 0, 1, 0, 0, 0, 0, 0, 3, 4, 0, 1, 1, 1, 3, 2, 0, 2, 0, 1, 0, 2, 3, 3, 1, 2, 3, 0, 1, 0, 1, 0, 4),
(0, 0, 0, 1, 0, 3, 0, 3, 0, 2, 2, 1, 0, 0, 4, 0, 3, 0, 3, 1, 3, 0, 3, 0, 3, 0, 1, 0, 3, 0, 3, 1, 3, 0, 3, 3, 0, 0, 1, 2, 1, 1, 1, 0, 1, 2, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 1, 2, 0, 0, 2, 0, 0, 0, 0, 2, 3, 3, 3, 3, 0, 0, 0, 0, 1, 4),
(0, 0, 0, 3, 0, 3, 0, 0, 0, 0, 3, 1, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 3, 0, 2, 0, 2, 3, 0, 0, 2, 2, 3, 1, 2, 0, 0, 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, 3, 0, 0, 2, 0, 0, 0, 0, 2, 3),
(2, 4, 0, 5, 0, 5, 0, 4, 0, 3, 4, 3, 3, 3, 4, 3, 3, 3, 4, 3, 4, 4, 5, 4, 5, 5, 5, 2, 3, 0, 5, 5, 4, 1, 5, 4, 3, 1, 5, 4, 3, 4, 4, 3, 3, 4, 3, 3, 0, 3, 2, 0, 2, 3, 0, 3, 0, 0, 3, 3, 0, 5, 3, 2, 3, 3, 0, 3, 0, 3, 0, 3, 4, 5, 4, 5, 3, 0, 4, 3, 0, 3, 4),
(0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 3, 4, 3, 2, 3, 2, 3, 0, 4, 3, 3, 3, 3, 3, 3, 3, 3, 0, 3, 2, 4, 3, 3, 1, 3, 4, 3, 4, 4, 4, 3, 4, 4, 3, 2, 4, 4, 1, 0, 2, 0, 0, 1, 1, 0, 2, 0, 0, 3, 1, 0, 5, 3, 2, 1, 3, 0, 3, 0, 1, 2, 4, 3, 2, 4, 3, 3, 0, 3, 2, 0, 4, 4),
(0, 3, 0, 3, 0, 1, 0, 0, 0, 1, 4, 3, 3, 2, 3, 1, 3, 1, 4, 2, 3, 2, 4, 2, 3, 4, 3, 0, 2, 2, 3, 3, 3, 0, 3, 3, 3, 0, 3, 4, 1, 3, 3, 0, 3, 4, 3, 3, 0, 1, 1, 0, 1, 0, 0, 0, 4, 0, 3, 0, 0, 3, 1, 2, 1, 3, 0, 4, 0, 1, 0, 4, 3, 3, 4, 3, 3, 0, 2, 0, 0, 3, 3),
(0, 3, 0, 4, 0, 1, 0, 3, 0, 3, 4, 3, 3, 0, 3, 3, 3, 1, 3, 1, 3, 3, 4, 3, 3, 3, 0, 0, 3, 1, 5, 3, 3, 1, 3, 3, 2, 5, 4, 3, 3, 4, 5, 3, 2, 5, 3, 4, 0, 1, 0, 0, 0, 0, 0, 2, 0, 0, 1, 1, 0, 4, 2, 2, 1, 3, 0, 3, 0, 2, 0, 4, 4, 3, 5, 3, 2, 0, 1, 1, 0, 3, 4),
(0, 5, 0, 4, 0, 5, 0, 2, 0, 4, 4, 3, 3, 2, 3, 3, 3, 1, 4, 3, 4, 1, 5, 3, 4, 3, 4, 0, 4, 2, 4, 3, 4, 1, 5, 4, 0, 4, 4, 4, 4, 5, 4, 1, 3, 5, 4, 2, 1, 4, 1, 1, 3, 2, 0, 3, 1, 0, 3, 2, 1, 4, 3, 3, 3, 4, 0, 4, 0, 3, 0, 4, 4, 4, 3, 3, 3, 0, 4, 2, 0, 3, 4),
(1, 4, 0, 4, 0, 3, 0, 1, 0, 3, 3, 3, 1, 1, 3, 3, 2, 2, 3, 3, 1, 0, 3, 2, 2, 1, 2, 0, 3, 1, 2, 1, 2, 0, 3, 2, 0, 2, 2, 3, 3, 4, 3, 0, 3, 3, 1, 2, 0, 1, 1, 3, 1, 2, 0, 0, 3, 0, 1, 1, 0, 3, 2, 2, 3, 3, 0, 3, 0, 0, 0, 2, 3, 3, 4, 3, 3, 0, 1, 0, 0, 1, 4),
(0, 4, 0, 4, 0, 4, 0, 0, 0, 3, 4, 4, 3, 1, 4, 2, 3, 2, 3, 3, 3, 1, 4, 3, 4, 0, 3, 0, 4, 2, 3, 3, 2, 2, 5, 4, 2, 1, 3, 4, 3, 4, 3, 1, 3, 3, 4, 2, 0, 2, 1, 0, 3, 3, 0, 0, 2, 0, 3, 1, 0, 4, 4, 3, 4, 3, 0, 4, 0, 1, 0, 2, 4, 4, 4, 4, 4, 0, 3, 2, 0, 3, 3),
(0, 0, 0, 1, 0, 4, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 3, 2, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 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, 1, 0, 0, 0, 0, 0, 2),
(0, 2, 0, 3, 0, 4, 0, 4, 0, 1, 3, 3, 3, 0, 4, 0, 2, 1, 2, 1, 1, 1, 2, 0, 3, 1, 1, 0, 1, 0, 3, 1, 0, 0, 3, 3, 2, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 2, 0, 2, 2, 0, 3, 1, 0, 0, 1, 0, 1, 1, 0, 1, 2, 0, 3, 0, 0, 0, 0, 1, 0, 0, 3, 3, 4, 3, 1, 0, 1, 0, 3, 0, 2),
(0, 0, 0, 3, 0, 5, 0, 0, 0, 0, 1, 0, 2, 0, 3, 1, 0, 1, 3, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 4, 0, 0, 0, 2, 3, 0, 1, 4, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 3, 0, 0, 0, 0, 0, 3),
(0, 2, 0, 5, 0, 5, 0, 1, 0, 2, 4, 3, 3, 2, 5, 1, 3, 2, 3, 3, 3, 0, 4, 1, 2, 0, 3, 0, 4, 0, 2, 2, 1, 1, 5, 3, 0, 0, 1, 4, 2, 3, 2, 0, 3, 3, 3, 2, 0, 2, 4, 1, 1, 2, 0, 1, 1, 0, 3, 1, 0, 1, 3, 1, 2, 3, 0, 2, 0, 0, 0, 1, 3, 5, 4, 4, 4, 0, 3, 0, 0, 1, 3),
(0, 4, 0, 5, 0, 4, 0, 4, 0, 4, 5, 4, 3, 3, 4, 3, 3, 3, 4, 3, 4, 4, 5, 3, 4, 5, 4, 2, 4, 2, 3, 4, 3, 1, 4, 4, 1, 3, 5, 4, 4, 5, 5, 4, 4, 5, 5, 5, 2, 3, 3, 1, 4, 3, 1, 3, 3, 0, 3, 3, 1, 4, 3, 4, 4, 4, 0, 3, 0, 4, 0, 3, 3, 4, 4, 5, 0, 0, 4, 3, 0, 4, 5),
(0, 4, 0, 4, 0, 3, 0, 3, 0, 3, 4, 4, 4, 3, 3, 2, 4, 3, 4, 3, 4, 3, 5, 3, 4, 3, 2, 1, 4, 2, 4, 4, 3, 1, 3, 4, 2, 4, 5, 5, 3, 4, 5, 4, 1, 5, 4, 3, 0, 3, 2, 2, 3, 2, 1, 3, 1, 0, 3, 3, 3, 5, 3, 3, 3, 5, 4, 4, 2, 3, 3, 4, 3, 3, 3, 2, 1, 0, 3, 2, 1, 4, 3),
(0, 4, 0, 5, 0, 4, 0, 3, 0, 3, 5, 5, 3, 2, 4, 3, 4, 0, 5, 4, 4, 1, 4, 4, 4, 3, 3, 3, 4, 3, 5, 5, 2, 3, 3, 4, 1, 2, 5, 5, 3, 5, 5, 2, 3, 5, 5, 4, 0, 3, 2, 0, 3, 3, 1, 1, 5, 1, 4, 1, 0, 4, 3, 2, 3, 5, 0, 4, 0, 3, 0, 5, 4, 3, 4, 3, 0, 0, 4, 1, 0, 4, 4),
(1, 3, 0, 4, 0, 2, 0, 2, 0, 2, 5, 5, 3, 3, 3, 3, 3, 0, 4, 2, 3, 4, 4, 4, 3, 4, 0, 0, 3, 4, 5, 4, 3, 3, 3, 3, 2, 5, 5, 4, 5, 5, 5, 4, 3, 5, 5, 5, 1, 3, 1, 0, 1, 0, 0, 3, 2, 0, 4, 2, 0, 5, 2, 3, 2, 4, 1, 3, 0, 3, 0, 4, 5, 4, 5, 4, 3, 0, 4, 2, 0, 5, 4),
(0, 3, 0, 4, 0, 5, 0, 3, 0, 3, 4, 4, 3, 2, 3, 2, 3, 3, 3, 3, 3, 2, 4, 3, 3, 2, 2, 0, 3, 3, 3, 3, 3, 1, 3, 3, 3, 0, 4, 4, 3, 4, 4, 1, 1, 4, 4, 2, 0, 3, 1, 0, 1, 1, 0, 4, 1, 0, 2, 3, 1, 3, 3, 1, 3, 4, 0, 3, 0, 1, 0, 3, 1, 3, 0, 0, 1, 0, 2, 0, 0, 4, 4),
(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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(0, 3, 0, 3, 0, 2, 0, 3, 0, 1, 5, 4, 3, 3, 3, 1, 4, 2, 1, 2, 3, 4, 4, 2, 4, 4, 5, 0, 3, 1, 4, 3, 4, 0, 4, 3, 3, 3, 2, 3, 2, 5, 3, 4, 3, 2, 2, 3, 0, 0, 3, 0, 2, 1, 0, 1, 2, 0, 0, 0, 0, 2, 1, 1, 3, 1, 0, 2, 0, 4, 0, 3, 4, 4, 4, 5, 2, 0, 2, 0, 0, 1, 3),
(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 4, 2, 1, 1, 0, 1, 0, 3, 2, 0, 0, 3, 1, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 4, 0, 4, 2, 1, 0, 0, 0, 0, 0, 1),
(0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 2, 0, 2, 1, 0, 0, 1, 2, 1, 0, 1, 1, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 1, 0, 0, 0, 0, 0, 1, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2),
(0, 4, 0, 4, 0, 4, 0, 3, 0, 4, 4, 3, 4, 2, 4, 3, 2, 0, 4, 4, 4, 3, 5, 3, 5, 3, 3, 2, 4, 2, 4, 3, 4, 3, 1, 4, 0, 2, 3, 4, 4, 4, 3, 3, 3, 4, 4, 4, 3, 4, 1, 3, 4, 3, 2, 1, 2, 1, 3, 3, 3, 4, 4, 3, 3, 5, 0, 4, 0, 3, 0, 4, 3, 3, 3, 2, 1, 0, 3, 0, 0, 3, 3),
(0, 4, 0, 3, 0, 3, 0, 3, 0, 3, 5, 5, 3, 3, 3, 3, 4, 3, 4, 3, 3, 3, 4, 4, 4, 3, 3, 3, 3, 4, 3, 5, 3, 3, 1, 3, 2, 4, 5, 5, 5, 5, 4, 3, 4, 5, 5, 3, 2, 2, 3, 3, 3, 3, 2, 3, 3, 1, 2, 3, 2, 4, 3, 3, 3, 4, 0, 4, 0, 2, 0, 4, 3, 2, 2, 1, 2, 0, 3, 0, 0, 4, 1),
)
# fmt: on
class JapaneseContextAnalysis:
NUM_OF_CATEGORY = 6
DONT_KNOW = -1
ENOUGH_REL_THRESHOLD = 100
MAX_REL_THRESHOLD = 1000
MINIMUM_DATA_THRESHOLD = 4
def __init__(self):
self._total_rel = None
self._rel_sample = None
self._need_to_skip_char_num = None
self._last_char_order = None
self._done = None
self.reset()
def reset(self):
self._total_rel = 0 # total sequence received
# category counters, each integer counts sequence in its category
self._rel_sample = [0] * self.NUM_OF_CATEGORY
# if last byte in current buffer is not the last byte of a character,
# we need to know how many bytes to skip in next buffer
self._need_to_skip_char_num = 0
self._last_char_order = -1 # The order of previous char
# If this flag is set to True, detection is done and conclusion has
# been made
self._done = False
def feed(self, byte_str, num_bytes):
if self._done:
return
# The buffer we got is byte oriented, and a character may span in more than one
# buffers. In case the last one or two byte in last buffer is not
# complete, we record how many byte needed to complete that character
# and skip these bytes here. We can choose to record those bytes as
# well and analyse the character once it is complete, but since a
# character will not make much difference, by simply skipping
# this character will simply our logic and improve performance.
i = self._need_to_skip_char_num
while i < num_bytes:
order, char_len = self.get_order(byte_str[i : i + 2])
i += char_len
if i > num_bytes:
self._need_to_skip_char_num = i - num_bytes
self._last_char_order = -1
else:
if (order != -1) and (self._last_char_order != -1):
self._total_rel += 1
if self._total_rel > self.MAX_REL_THRESHOLD:
self._done = True
break
self._rel_sample[
jp2_char_context[self._last_char_order][order]
] += 1
self._last_char_order = order
def got_enough_data(self):
return self._total_rel > self.ENOUGH_REL_THRESHOLD
def get_confidence(self):
# This is just one way to calculate confidence. It works well for me.
if self._total_rel > self.MINIMUM_DATA_THRESHOLD:
return (self._total_rel - self._rel_sample[0]) / self._total_rel
return self.DONT_KNOW
def get_order(self, _):
return -1, 1
class SJISContextAnalysis(JapaneseContextAnalysis):
def __init__(self):
super().__init__()
self._charset_name = "SHIFT_JIS"
@property
def charset_name(self):
return self._charset_name
def get_order(self, byte_str):
if not byte_str:
return -1, 1
# find out current char's byte length
first_char = byte_str[0]
if (0x81 <= first_char <= 0x9F) or (0xE0 <= first_char <= 0xFC):
char_len = 2
if (first_char == 0x87) or (0xFA <= first_char <= 0xFC):
self._charset_name = "CP932"
else:
char_len = 1
# return its order if it is hiragana
if len(byte_str) > 1:
second_char = byte_str[1]
if (first_char == 202) and (0x9F <= second_char <= 0xF1):
return second_char - 0x9F, char_len
return -1, char_len
class EUCJPContextAnalysis(JapaneseContextAnalysis):
def get_order(self, byte_str):
if not byte_str:
return -1, 1
# find out current char's byte length
first_char = byte_str[0]
if (first_char == 0x8E) or (0xA1 <= first_char <= 0xFE):
char_len = 2
elif first_char == 0x8F:
char_len = 3
else:
char_len = 1
# return its order if it is hiragana
if len(byte_str) > 1:
second_char = byte_str[1]
if (first_char == 0xA4) and (0xA1 <= second_char <= 0xF3):
return second_char - 0xA1, char_len
return -1, char_len
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/chardet/jpcntx.py
|
Python
|
mit
| 26,797 |
from pip._vendor.chardet.sbcharsetprober import SingleByteCharSetModel
# 3: Positive
# 2: Likely
# 1: Unlikely
# 0: Negative
BULGARIAN_LANG_MODEL = {
63: { # 'e'
63: 1, # 'e'
45: 0, # '\xad'
31: 0, # 'А'
32: 0, # 'Б'
35: 0, # 'В'
43: 0, # 'Г'
37: 0, # 'Д'
44: 0, # 'Е'
55: 0, # 'Ж'
47: 0, # 'З'
40: 0, # 'И'
59: 0, # 'Й'
33: 0, # 'К'
46: 0, # 'Л'
38: 0, # 'М'
36: 0, # 'Н'
41: 0, # 'О'
30: 0, # 'П'
39: 0, # 'Р'
28: 0, # 'С'
34: 0, # 'Т'
51: 0, # 'У'
48: 0, # 'Ф'
49: 0, # 'Х'
53: 0, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 0, # 'Я'
1: 0, # 'а'
18: 1, # 'б'
9: 1, # 'в'
20: 1, # 'г'
11: 1, # 'д'
3: 1, # 'е'
23: 1, # 'ж'
15: 1, # 'з'
2: 0, # 'и'
26: 1, # 'й'
12: 1, # 'к'
10: 1, # 'л'
14: 1, # 'м'
6: 1, # 'н'
4: 1, # 'о'
13: 1, # 'п'
7: 1, # 'р'
8: 1, # 'с'
5: 1, # 'т'
19: 0, # 'у'
29: 1, # 'ф'
25: 1, # 'х'
22: 0, # 'ц'
21: 1, # 'ч'
27: 1, # 'ш'
24: 1, # 'щ'
17: 0, # 'ъ'
52: 0, # 'ь'
42: 0, # 'ю'
16: 1, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
45: { # '\xad'
63: 0, # 'e'
45: 0, # '\xad'
31: 0, # 'А'
32: 1, # 'Б'
35: 1, # 'В'
43: 0, # 'Г'
37: 1, # 'Д'
44: 0, # 'Е'
55: 0, # 'Ж'
47: 0, # 'З'
40: 1, # 'И'
59: 0, # 'Й'
33: 1, # 'К'
46: 0, # 'Л'
38: 1, # 'М'
36: 0, # 'Н'
41: 1, # 'О'
30: 1, # 'П'
39: 1, # 'Р'
28: 1, # 'С'
34: 0, # 'Т'
51: 0, # 'У'
48: 0, # 'Ф'
49: 1, # 'Х'
53: 0, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 0, # 'Я'
1: 0, # 'а'
18: 0, # 'б'
9: 0, # 'в'
20: 0, # 'г'
11: 0, # 'д'
3: 0, # 'е'
23: 0, # 'ж'
15: 0, # 'з'
2: 0, # 'и'
26: 0, # 'й'
12: 0, # 'к'
10: 0, # 'л'
14: 0, # 'м'
6: 0, # 'н'
4: 0, # 'о'
13: 0, # 'п'
7: 0, # 'р'
8: 0, # 'с'
5: 0, # 'т'
19: 0, # 'у'
29: 0, # 'ф'
25: 0, # 'х'
22: 0, # 'ц'
21: 0, # 'ч'
27: 0, # 'ш'
24: 0, # 'щ'
17: 0, # 'ъ'
52: 0, # 'ь'
42: 0, # 'ю'
16: 0, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
31: { # 'А'
63: 0, # 'e'
45: 1, # '\xad'
31: 1, # 'А'
32: 1, # 'Б'
35: 2, # 'В'
43: 1, # 'Г'
37: 2, # 'Д'
44: 2, # 'Е'
55: 1, # 'Ж'
47: 2, # 'З'
40: 1, # 'И'
59: 1, # 'Й'
33: 1, # 'К'
46: 2, # 'Л'
38: 1, # 'М'
36: 2, # 'Н'
41: 1, # 'О'
30: 2, # 'П'
39: 2, # 'Р'
28: 2, # 'С'
34: 2, # 'Т'
51: 1, # 'У'
48: 2, # 'Ф'
49: 1, # 'Х'
53: 1, # 'Ц'
50: 1, # 'Ч'
54: 1, # 'Ш'
57: 2, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 1, # 'Я'
1: 1, # 'а'
18: 2, # 'б'
9: 2, # 'в'
20: 2, # 'г'
11: 2, # 'д'
3: 1, # 'е'
23: 1, # 'ж'
15: 2, # 'з'
2: 0, # 'и'
26: 2, # 'й'
12: 2, # 'к'
10: 3, # 'л'
14: 2, # 'м'
6: 3, # 'н'
4: 0, # 'о'
13: 2, # 'п'
7: 2, # 'р'
8: 2, # 'с'
5: 2, # 'т'
19: 1, # 'у'
29: 2, # 'ф'
25: 1, # 'х'
22: 1, # 'ц'
21: 1, # 'ч'
27: 1, # 'ш'
24: 0, # 'щ'
17: 0, # 'ъ'
52: 0, # 'ь'
42: 0, # 'ю'
16: 1, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
32: { # 'Б'
63: 0, # 'e'
45: 0, # '\xad'
31: 2, # 'А'
32: 2, # 'Б'
35: 1, # 'В'
43: 1, # 'Г'
37: 2, # 'Д'
44: 1, # 'Е'
55: 1, # 'Ж'
47: 2, # 'З'
40: 1, # 'И'
59: 0, # 'Й'
33: 1, # 'К'
46: 1, # 'Л'
38: 1, # 'М'
36: 2, # 'Н'
41: 2, # 'О'
30: 1, # 'П'
39: 1, # 'Р'
28: 2, # 'С'
34: 2, # 'Т'
51: 1, # 'У'
48: 2, # 'Ф'
49: 1, # 'Х'
53: 1, # 'Ц'
50: 1, # 'Ч'
54: 0, # 'Ш'
57: 1, # 'Щ'
61: 2, # 'Ъ'
60: 1, # 'Ю'
56: 1, # 'Я'
1: 3, # 'а'
18: 0, # 'б'
9: 0, # 'в'
20: 0, # 'г'
11: 1, # 'д'
3: 3, # 'е'
23: 0, # 'ж'
15: 0, # 'з'
2: 2, # 'и'
26: 0, # 'й'
12: 0, # 'к'
10: 2, # 'л'
14: 0, # 'м'
6: 0, # 'н'
4: 3, # 'о'
13: 0, # 'п'
7: 2, # 'р'
8: 1, # 'с'
5: 0, # 'т'
19: 2, # 'у'
29: 0, # 'ф'
25: 1, # 'х'
22: 0, # 'ц'
21: 0, # 'ч'
27: 0, # 'ш'
24: 0, # 'щ'
17: 3, # 'ъ'
52: 1, # 'ь'
42: 1, # 'ю'
16: 2, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
35: { # 'В'
63: 0, # 'e'
45: 0, # '\xad'
31: 2, # 'А'
32: 1, # 'Б'
35: 1, # 'В'
43: 0, # 'Г'
37: 1, # 'Д'
44: 2, # 'Е'
55: 0, # 'Ж'
47: 0, # 'З'
40: 2, # 'И'
59: 0, # 'Й'
33: 1, # 'К'
46: 1, # 'Л'
38: 1, # 'М'
36: 1, # 'Н'
41: 1, # 'О'
30: 1, # 'П'
39: 2, # 'Р'
28: 2, # 'С'
34: 1, # 'Т'
51: 1, # 'У'
48: 2, # 'Ф'
49: 0, # 'Х'
53: 1, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 1, # 'Ъ'
60: 1, # 'Ю'
56: 2, # 'Я'
1: 3, # 'а'
18: 1, # 'б'
9: 0, # 'в'
20: 0, # 'г'
11: 1, # 'д'
3: 3, # 'е'
23: 1, # 'ж'
15: 2, # 'з'
2: 3, # 'и'
26: 0, # 'й'
12: 1, # 'к'
10: 2, # 'л'
14: 1, # 'м'
6: 2, # 'н'
4: 2, # 'о'
13: 1, # 'п'
7: 2, # 'р'
8: 2, # 'с'
5: 2, # 'т'
19: 1, # 'у'
29: 0, # 'ф'
25: 1, # 'х'
22: 0, # 'ц'
21: 2, # 'ч'
27: 0, # 'ш'
24: 0, # 'щ'
17: 2, # 'ъ'
52: 1, # 'ь'
42: 1, # 'ю'
16: 1, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
43: { # 'Г'
63: 0, # 'e'
45: 0, # '\xad'
31: 2, # 'А'
32: 1, # 'Б'
35: 0, # 'В'
43: 0, # 'Г'
37: 1, # 'Д'
44: 2, # 'Е'
55: 0, # 'Ж'
47: 1, # 'З'
40: 1, # 'И'
59: 0, # 'Й'
33: 1, # 'К'
46: 1, # 'Л'
38: 0, # 'М'
36: 1, # 'Н'
41: 1, # 'О'
30: 0, # 'П'
39: 1, # 'Р'
28: 1, # 'С'
34: 0, # 'Т'
51: 1, # 'У'
48: 1, # 'Ф'
49: 0, # 'Х'
53: 0, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 1, # 'Щ'
61: 1, # 'Ъ'
60: 0, # 'Ю'
56: 0, # 'Я'
1: 2, # 'а'
18: 1, # 'б'
9: 1, # 'в'
20: 0, # 'г'
11: 1, # 'д'
3: 3, # 'е'
23: 1, # 'ж'
15: 0, # 'з'
2: 2, # 'и'
26: 0, # 'й'
12: 1, # 'к'
10: 2, # 'л'
14: 1, # 'м'
6: 1, # 'н'
4: 2, # 'о'
13: 0, # 'п'
7: 2, # 'р'
8: 0, # 'с'
5: 0, # 'т'
19: 2, # 'у'
29: 0, # 'ф'
25: 0, # 'х'
22: 0, # 'ц'
21: 0, # 'ч'
27: 0, # 'ш'
24: 1, # 'щ'
17: 2, # 'ъ'
52: 1, # 'ь'
42: 1, # 'ю'
16: 1, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
37: { # 'Д'
63: 0, # 'e'
45: 0, # '\xad'
31: 2, # 'А'
32: 1, # 'Б'
35: 2, # 'В'
43: 1, # 'Г'
37: 2, # 'Д'
44: 2, # 'Е'
55: 2, # 'Ж'
47: 1, # 'З'
40: 2, # 'И'
59: 0, # 'Й'
33: 1, # 'К'
46: 1, # 'Л'
38: 1, # 'М'
36: 1, # 'Н'
41: 2, # 'О'
30: 2, # 'П'
39: 1, # 'Р'
28: 2, # 'С'
34: 1, # 'Т'
51: 1, # 'У'
48: 1, # 'Ф'
49: 0, # 'Х'
53: 1, # 'Ц'
50: 1, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 1, # 'Ъ'
60: 1, # 'Ю'
56: 1, # 'Я'
1: 3, # 'а'
18: 0, # 'б'
9: 2, # 'в'
20: 0, # 'г'
11: 0, # 'д'
3: 3, # 'е'
23: 3, # 'ж'
15: 1, # 'з'
2: 3, # 'и'
26: 0, # 'й'
12: 0, # 'к'
10: 1, # 'л'
14: 1, # 'м'
6: 2, # 'н'
4: 3, # 'о'
13: 0, # 'п'
7: 2, # 'р'
8: 0, # 'с'
5: 0, # 'т'
19: 2, # 'у'
29: 0, # 'ф'
25: 0, # 'х'
22: 0, # 'ц'
21: 0, # 'ч'
27: 0, # 'ш'
24: 0, # 'щ'
17: 2, # 'ъ'
52: 1, # 'ь'
42: 2, # 'ю'
16: 1, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
44: { # 'Е'
63: 0, # 'e'
45: 0, # '\xad'
31: 1, # 'А'
32: 1, # 'Б'
35: 2, # 'В'
43: 1, # 'Г'
37: 1, # 'Д'
44: 1, # 'Е'
55: 1, # 'Ж'
47: 1, # 'З'
40: 1, # 'И'
59: 1, # 'Й'
33: 2, # 'К'
46: 2, # 'Л'
38: 1, # 'М'
36: 2, # 'Н'
41: 2, # 'О'
30: 1, # 'П'
39: 2, # 'Р'
28: 2, # 'С'
34: 2, # 'Т'
51: 1, # 'У'
48: 2, # 'Ф'
49: 1, # 'Х'
53: 2, # 'Ц'
50: 1, # 'Ч'
54: 1, # 'Ш'
57: 1, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 1, # 'Я'
1: 0, # 'а'
18: 1, # 'б'
9: 2, # 'в'
20: 1, # 'г'
11: 2, # 'д'
3: 0, # 'е'
23: 1, # 'ж'
15: 1, # 'з'
2: 0, # 'и'
26: 1, # 'й'
12: 2, # 'к'
10: 2, # 'л'
14: 2, # 'м'
6: 2, # 'н'
4: 0, # 'о'
13: 1, # 'п'
7: 2, # 'р'
8: 2, # 'с'
5: 1, # 'т'
19: 1, # 'у'
29: 1, # 'ф'
25: 1, # 'х'
22: 0, # 'ц'
21: 1, # 'ч'
27: 1, # 'ш'
24: 1, # 'щ'
17: 1, # 'ъ'
52: 0, # 'ь'
42: 1, # 'ю'
16: 1, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
55: { # 'Ж'
63: 0, # 'e'
45: 0, # '\xad'
31: 1, # 'А'
32: 0, # 'Б'
35: 1, # 'В'
43: 0, # 'Г'
37: 1, # 'Д'
44: 1, # 'Е'
55: 0, # 'Ж'
47: 0, # 'З'
40: 1, # 'И'
59: 0, # 'Й'
33: 1, # 'К'
46: 0, # 'Л'
38: 0, # 'М'
36: 1, # 'Н'
41: 1, # 'О'
30: 0, # 'П'
39: 0, # 'Р'
28: 0, # 'С'
34: 0, # 'Т'
51: 1, # 'У'
48: 0, # 'Ф'
49: 0, # 'Х'
53: 0, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 0, # 'Я'
1: 2, # 'а'
18: 0, # 'б'
9: 0, # 'в'
20: 0, # 'г'
11: 1, # 'д'
3: 2, # 'е'
23: 0, # 'ж'
15: 0, # 'з'
2: 2, # 'и'
26: 0, # 'й'
12: 0, # 'к'
10: 0, # 'л'
14: 0, # 'м'
6: 0, # 'н'
4: 2, # 'о'
13: 1, # 'п'
7: 1, # 'р'
8: 0, # 'с'
5: 0, # 'т'
19: 1, # 'у'
29: 0, # 'ф'
25: 0, # 'х'
22: 0, # 'ц'
21: 0, # 'ч'
27: 0, # 'ш'
24: 0, # 'щ'
17: 1, # 'ъ'
52: 1, # 'ь'
42: 1, # 'ю'
16: 0, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
47: { # 'З'
63: 0, # 'e'
45: 0, # '\xad'
31: 2, # 'А'
32: 1, # 'Б'
35: 1, # 'В'
43: 1, # 'Г'
37: 1, # 'Д'
44: 1, # 'Е'
55: 0, # 'Ж'
47: 1, # 'З'
40: 1, # 'И'
59: 0, # 'Й'
33: 1, # 'К'
46: 1, # 'Л'
38: 1, # 'М'
36: 2, # 'Н'
41: 1, # 'О'
30: 1, # 'П'
39: 1, # 'Р'
28: 1, # 'С'
34: 1, # 'Т'
51: 1, # 'У'
48: 0, # 'Ф'
49: 1, # 'Х'
53: 1, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 1, # 'Ъ'
60: 0, # 'Ю'
56: 1, # 'Я'
1: 3, # 'а'
18: 1, # 'б'
9: 2, # 'в'
20: 1, # 'г'
11: 2, # 'д'
3: 2, # 'е'
23: 0, # 'ж'
15: 0, # 'з'
2: 1, # 'и'
26: 0, # 'й'
12: 0, # 'к'
10: 2, # 'л'
14: 1, # 'м'
6: 1, # 'н'
4: 1, # 'о'
13: 0, # 'п'
7: 1, # 'р'
8: 0, # 'с'
5: 0, # 'т'
19: 1, # 'у'
29: 0, # 'ф'
25: 0, # 'х'
22: 0, # 'ц'
21: 0, # 'ч'
27: 0, # 'ш'
24: 0, # 'щ'
17: 1, # 'ъ'
52: 0, # 'ь'
42: 1, # 'ю'
16: 0, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
40: { # 'И'
63: 0, # 'e'
45: 1, # '\xad'
31: 1, # 'А'
32: 1, # 'Б'
35: 1, # 'В'
43: 1, # 'Г'
37: 1, # 'Д'
44: 2, # 'Е'
55: 1, # 'Ж'
47: 2, # 'З'
40: 1, # 'И'
59: 1, # 'Й'
33: 2, # 'К'
46: 2, # 'Л'
38: 2, # 'М'
36: 2, # 'Н'
41: 1, # 'О'
30: 1, # 'П'
39: 2, # 'Р'
28: 2, # 'С'
34: 2, # 'Т'
51: 0, # 'У'
48: 1, # 'Ф'
49: 1, # 'Х'
53: 1, # 'Ц'
50: 1, # 'Ч'
54: 1, # 'Ш'
57: 1, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 2, # 'Я'
1: 1, # 'а'
18: 1, # 'б'
9: 3, # 'в'
20: 2, # 'г'
11: 1, # 'д'
3: 1, # 'е'
23: 0, # 'ж'
15: 3, # 'з'
2: 0, # 'и'
26: 1, # 'й'
12: 1, # 'к'
10: 2, # 'л'
14: 2, # 'м'
6: 2, # 'н'
4: 0, # 'о'
13: 1, # 'п'
7: 2, # 'р'
8: 2, # 'с'
5: 2, # 'т'
19: 0, # 'у'
29: 1, # 'ф'
25: 1, # 'х'
22: 1, # 'ц'
21: 1, # 'ч'
27: 1, # 'ш'
24: 1, # 'щ'
17: 0, # 'ъ'
52: 0, # 'ь'
42: 0, # 'ю'
16: 0, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
59: { # 'Й'
63: 0, # 'e'
45: 0, # '\xad'
31: 0, # 'А'
32: 0, # 'Б'
35: 0, # 'В'
43: 0, # 'Г'
37: 1, # 'Д'
44: 1, # 'Е'
55: 0, # 'Ж'
47: 0, # 'З'
40: 0, # 'И'
59: 0, # 'Й'
33: 1, # 'К'
46: 1, # 'Л'
38: 1, # 'М'
36: 1, # 'Н'
41: 1, # 'О'
30: 0, # 'П'
39: 0, # 'Р'
28: 1, # 'С'
34: 1, # 'Т'
51: 0, # 'У'
48: 0, # 'Ф'
49: 0, # 'Х'
53: 0, # 'Ц'
50: 1, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 1, # 'Я'
1: 0, # 'а'
18: 0, # 'б'
9: 0, # 'в'
20: 0, # 'г'
11: 0, # 'д'
3: 1, # 'е'
23: 0, # 'ж'
15: 0, # 'з'
2: 0, # 'и'
26: 0, # 'й'
12: 0, # 'к'
10: 0, # 'л'
14: 0, # 'м'
6: 0, # 'н'
4: 2, # 'о'
13: 0, # 'п'
7: 0, # 'р'
8: 0, # 'с'
5: 0, # 'т'
19: 0, # 'у'
29: 0, # 'ф'
25: 0, # 'х'
22: 0, # 'ц'
21: 0, # 'ч'
27: 0, # 'ш'
24: 0, # 'щ'
17: 1, # 'ъ'
52: 0, # 'ь'
42: 0, # 'ю'
16: 0, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
33: { # 'К'
63: 0, # 'e'
45: 1, # '\xad'
31: 2, # 'А'
32: 1, # 'Б'
35: 1, # 'В'
43: 1, # 'Г'
37: 1, # 'Д'
44: 1, # 'Е'
55: 0, # 'Ж'
47: 1, # 'З'
40: 2, # 'И'
59: 0, # 'Й'
33: 1, # 'К'
46: 1, # 'Л'
38: 0, # 'М'
36: 2, # 'Н'
41: 2, # 'О'
30: 2, # 'П'
39: 1, # 'Р'
28: 2, # 'С'
34: 1, # 'Т'
51: 1, # 'У'
48: 1, # 'Ф'
49: 1, # 'Х'
53: 1, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 1, # 'Ъ'
60: 1, # 'Ю'
56: 0, # 'Я'
1: 3, # 'а'
18: 0, # 'б'
9: 1, # 'в'
20: 0, # 'г'
11: 0, # 'д'
3: 2, # 'е'
23: 1, # 'ж'
15: 0, # 'з'
2: 2, # 'и'
26: 0, # 'й'
12: 0, # 'к'
10: 2, # 'л'
14: 1, # 'м'
6: 2, # 'н'
4: 3, # 'о'
13: 0, # 'п'
7: 3, # 'р'
8: 1, # 'с'
5: 0, # 'т'
19: 2, # 'у'
29: 0, # 'ф'
25: 1, # 'х'
22: 0, # 'ц'
21: 0, # 'ч'
27: 1, # 'ш'
24: 0, # 'щ'
17: 2, # 'ъ'
52: 1, # 'ь'
42: 2, # 'ю'
16: 0, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
46: { # 'Л'
63: 1, # 'e'
45: 0, # '\xad'
31: 2, # 'А'
32: 1, # 'Б'
35: 1, # 'В'
43: 2, # 'Г'
37: 1, # 'Д'
44: 2, # 'Е'
55: 0, # 'Ж'
47: 1, # 'З'
40: 2, # 'И'
59: 0, # 'Й'
33: 1, # 'К'
46: 1, # 'Л'
38: 0, # 'М'
36: 1, # 'Н'
41: 2, # 'О'
30: 1, # 'П'
39: 0, # 'Р'
28: 1, # 'С'
34: 1, # 'Т'
51: 1, # 'У'
48: 0, # 'Ф'
49: 1, # 'Х'
53: 1, # 'Ц'
50: 1, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 1, # 'Ъ'
60: 1, # 'Ю'
56: 1, # 'Я'
1: 2, # 'а'
18: 0, # 'б'
9: 1, # 'в'
20: 0, # 'г'
11: 0, # 'д'
3: 3, # 'е'
23: 0, # 'ж'
15: 0, # 'з'
2: 2, # 'и'
26: 0, # 'й'
12: 0, # 'к'
10: 0, # 'л'
14: 0, # 'м'
6: 0, # 'н'
4: 2, # 'о'
13: 0, # 'п'
7: 0, # 'р'
8: 0, # 'с'
5: 0, # 'т'
19: 2, # 'у'
29: 0, # 'ф'
25: 0, # 'х'
22: 0, # 'ц'
21: 0, # 'ч'
27: 0, # 'ш'
24: 0, # 'щ'
17: 1, # 'ъ'
52: 1, # 'ь'
42: 2, # 'ю'
16: 1, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
38: { # 'М'
63: 0, # 'e'
45: 0, # '\xad'
31: 2, # 'А'
32: 1, # 'Б'
35: 2, # 'В'
43: 0, # 'Г'
37: 1, # 'Д'
44: 1, # 'Е'
55: 0, # 'Ж'
47: 1, # 'З'
40: 2, # 'И'
59: 0, # 'Й'
33: 1, # 'К'
46: 1, # 'Л'
38: 1, # 'М'
36: 1, # 'Н'
41: 2, # 'О'
30: 1, # 'П'
39: 1, # 'Р'
28: 2, # 'С'
34: 1, # 'Т'
51: 1, # 'У'
48: 1, # 'Ф'
49: 0, # 'Х'
53: 1, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 1, # 'Ъ'
60: 0, # 'Ю'
56: 1, # 'Я'
1: 3, # 'а'
18: 0, # 'б'
9: 0, # 'в'
20: 0, # 'г'
11: 0, # 'д'
3: 3, # 'е'
23: 0, # 'ж'
15: 0, # 'з'
2: 3, # 'и'
26: 0, # 'й'
12: 0, # 'к'
10: 2, # 'л'
14: 0, # 'м'
6: 2, # 'н'
4: 3, # 'о'
13: 0, # 'п'
7: 1, # 'р'
8: 0, # 'с'
5: 0, # 'т'
19: 2, # 'у'
29: 0, # 'ф'
25: 0, # 'х'
22: 0, # 'ц'
21: 0, # 'ч'
27: 0, # 'ш'
24: 0, # 'щ'
17: 2, # 'ъ'
52: 1, # 'ь'
42: 2, # 'ю'
16: 1, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
36: { # 'Н'
63: 0, # 'e'
45: 0, # '\xad'
31: 2, # 'А'
32: 2, # 'Б'
35: 1, # 'В'
43: 1, # 'Г'
37: 2, # 'Д'
44: 2, # 'Е'
55: 1, # 'Ж'
47: 1, # 'З'
40: 2, # 'И'
59: 1, # 'Й'
33: 2, # 'К'
46: 1, # 'Л'
38: 1, # 'М'
36: 1, # 'Н'
41: 2, # 'О'
30: 1, # 'П'
39: 1, # 'Р'
28: 2, # 'С'
34: 2, # 'Т'
51: 1, # 'У'
48: 1, # 'Ф'
49: 1, # 'Х'
53: 1, # 'Ц'
50: 1, # 'Ч'
54: 1, # 'Ш'
57: 0, # 'Щ'
61: 1, # 'Ъ'
60: 1, # 'Ю'
56: 1, # 'Я'
1: 3, # 'а'
18: 0, # 'б'
9: 0, # 'в'
20: 1, # 'г'
11: 0, # 'д'
3: 3, # 'е'
23: 0, # 'ж'
15: 0, # 'з'
2: 3, # 'и'
26: 0, # 'й'
12: 0, # 'к'
10: 0, # 'л'
14: 0, # 'м'
6: 0, # 'н'
4: 3, # 'о'
13: 0, # 'п'
7: 0, # 'р'
8: 0, # 'с'
5: 1, # 'т'
19: 1, # 'у'
29: 0, # 'ф'
25: 0, # 'х'
22: 0, # 'ц'
21: 0, # 'ч'
27: 1, # 'ш'
24: 0, # 'щ'
17: 0, # 'ъ'
52: 0, # 'ь'
42: 2, # 'ю'
16: 2, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
41: { # 'О'
63: 0, # 'e'
45: 0, # '\xad'
31: 1, # 'А'
32: 1, # 'Б'
35: 2, # 'В'
43: 1, # 'Г'
37: 2, # 'Д'
44: 1, # 'Е'
55: 1, # 'Ж'
47: 1, # 'З'
40: 1, # 'И'
59: 1, # 'Й'
33: 2, # 'К'
46: 2, # 'Л'
38: 2, # 'М'
36: 2, # 'Н'
41: 2, # 'О'
30: 1, # 'П'
39: 2, # 'Р'
28: 2, # 'С'
34: 2, # 'Т'
51: 1, # 'У'
48: 1, # 'Ф'
49: 1, # 'Х'
53: 0, # 'Ц'
50: 1, # 'Ч'
54: 1, # 'Ш'
57: 1, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 1, # 'Я'
1: 1, # 'а'
18: 2, # 'б'
9: 2, # 'в'
20: 2, # 'г'
11: 1, # 'д'
3: 1, # 'е'
23: 1, # 'ж'
15: 1, # 'з'
2: 0, # 'и'
26: 1, # 'й'
12: 2, # 'к'
10: 2, # 'л'
14: 1, # 'м'
6: 1, # 'н'
4: 0, # 'о'
13: 2, # 'п'
7: 2, # 'р'
8: 2, # 'с'
5: 3, # 'т'
19: 1, # 'у'
29: 1, # 'ф'
25: 1, # 'х'
22: 1, # 'ц'
21: 2, # 'ч'
27: 0, # 'ш'
24: 2, # 'щ'
17: 0, # 'ъ'
52: 0, # 'ь'
42: 0, # 'ю'
16: 1, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
30: { # 'П'
63: 0, # 'e'
45: 1, # '\xad'
31: 2, # 'А'
32: 1, # 'Б'
35: 1, # 'В'
43: 1, # 'Г'
37: 1, # 'Д'
44: 1, # 'Е'
55: 0, # 'Ж'
47: 1, # 'З'
40: 2, # 'И'
59: 0, # 'Й'
33: 1, # 'К'
46: 1, # 'Л'
38: 1, # 'М'
36: 1, # 'Н'
41: 2, # 'О'
30: 2, # 'П'
39: 2, # 'Р'
28: 2, # 'С'
34: 1, # 'Т'
51: 2, # 'У'
48: 1, # 'Ф'
49: 0, # 'Х'
53: 1, # 'Ц'
50: 1, # 'Ч'
54: 1, # 'Ш'
57: 0, # 'Щ'
61: 1, # 'Ъ'
60: 1, # 'Ю'
56: 0, # 'Я'
1: 3, # 'а'
18: 0, # 'б'
9: 0, # 'в'
20: 0, # 'г'
11: 2, # 'д'
3: 3, # 'е'
23: 0, # 'ж'
15: 0, # 'з'
2: 2, # 'и'
26: 0, # 'й'
12: 1, # 'к'
10: 3, # 'л'
14: 0, # 'м'
6: 1, # 'н'
4: 3, # 'о'
13: 0, # 'п'
7: 3, # 'р'
8: 1, # 'с'
5: 1, # 'т'
19: 2, # 'у'
29: 1, # 'ф'
25: 1, # 'х'
22: 0, # 'ц'
21: 1, # 'ч'
27: 1, # 'ш'
24: 0, # 'щ'
17: 2, # 'ъ'
52: 1, # 'ь'
42: 1, # 'ю'
16: 1, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
39: { # 'Р'
63: 0, # 'e'
45: 1, # '\xad'
31: 2, # 'А'
32: 1, # 'Б'
35: 1, # 'В'
43: 2, # 'Г'
37: 2, # 'Д'
44: 2, # 'Е'
55: 0, # 'Ж'
47: 1, # 'З'
40: 2, # 'И'
59: 0, # 'Й'
33: 1, # 'К'
46: 0, # 'Л'
38: 1, # 'М'
36: 1, # 'Н'
41: 2, # 'О'
30: 2, # 'П'
39: 1, # 'Р'
28: 1, # 'С'
34: 1, # 'Т'
51: 1, # 'У'
48: 1, # 'Ф'
49: 1, # 'Х'
53: 1, # 'Ц'
50: 1, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 1, # 'Ъ'
60: 1, # 'Ю'
56: 1, # 'Я'
1: 3, # 'а'
18: 0, # 'б'
9: 0, # 'в'
20: 0, # 'г'
11: 0, # 'д'
3: 2, # 'е'
23: 0, # 'ж'
15: 0, # 'з'
2: 2, # 'и'
26: 0, # 'й'
12: 0, # 'к'
10: 0, # 'л'
14: 0, # 'м'
6: 1, # 'н'
4: 3, # 'о'
13: 0, # 'п'
7: 0, # 'р'
8: 1, # 'с'
5: 0, # 'т'
19: 3, # 'у'
29: 0, # 'ф'
25: 0, # 'х'
22: 0, # 'ц'
21: 0, # 'ч'
27: 0, # 'ш'
24: 0, # 'щ'
17: 1, # 'ъ'
52: 0, # 'ь'
42: 1, # 'ю'
16: 1, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
28: { # 'С'
63: 1, # 'e'
45: 0, # '\xad'
31: 3, # 'А'
32: 2, # 'Б'
35: 2, # 'В'
43: 1, # 'Г'
37: 2, # 'Д'
44: 2, # 'Е'
55: 1, # 'Ж'
47: 1, # 'З'
40: 2, # 'И'
59: 0, # 'Й'
33: 2, # 'К'
46: 1, # 'Л'
38: 1, # 'М'
36: 1, # 'Н'
41: 2, # 'О'
30: 2, # 'П'
39: 1, # 'Р'
28: 2, # 'С'
34: 2, # 'Т'
51: 1, # 'У'
48: 1, # 'Ф'
49: 0, # 'Х'
53: 0, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 1, # 'Ъ'
60: 1, # 'Ю'
56: 1, # 'Я'
1: 3, # 'а'
18: 1, # 'б'
9: 2, # 'в'
20: 1, # 'г'
11: 1, # 'д'
3: 3, # 'е'
23: 0, # 'ж'
15: 0, # 'з'
2: 3, # 'и'
26: 0, # 'й'
12: 2, # 'к'
10: 3, # 'л'
14: 2, # 'м'
6: 1, # 'н'
4: 3, # 'о'
13: 3, # 'п'
7: 2, # 'р'
8: 0, # 'с'
5: 3, # 'т'
19: 2, # 'у'
29: 2, # 'ф'
25: 1, # 'х'
22: 1, # 'ц'
21: 1, # 'ч'
27: 0, # 'ш'
24: 0, # 'щ'
17: 3, # 'ъ'
52: 1, # 'ь'
42: 1, # 'ю'
16: 1, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
34: { # 'Т'
63: 0, # 'e'
45: 0, # '\xad'
31: 2, # 'А'
32: 2, # 'Б'
35: 1, # 'В'
43: 0, # 'Г'
37: 1, # 'Д'
44: 2, # 'Е'
55: 0, # 'Ж'
47: 0, # 'З'
40: 2, # 'И'
59: 0, # 'Й'
33: 2, # 'К'
46: 1, # 'Л'
38: 1, # 'М'
36: 1, # 'Н'
41: 2, # 'О'
30: 1, # 'П'
39: 2, # 'Р'
28: 2, # 'С'
34: 1, # 'Т'
51: 1, # 'У'
48: 1, # 'Ф'
49: 0, # 'Х'
53: 1, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 1, # 'Ъ'
60: 0, # 'Ю'
56: 1, # 'Я'
1: 3, # 'а'
18: 1, # 'б'
9: 1, # 'в'
20: 0, # 'г'
11: 0, # 'д'
3: 3, # 'е'
23: 0, # 'ж'
15: 0, # 'з'
2: 2, # 'и'
26: 0, # 'й'
12: 1, # 'к'
10: 1, # 'л'
14: 0, # 'м'
6: 0, # 'н'
4: 3, # 'о'
13: 0, # 'п'
7: 3, # 'р'
8: 0, # 'с'
5: 0, # 'т'
19: 2, # 'у'
29: 0, # 'ф'
25: 0, # 'х'
22: 0, # 'ц'
21: 0, # 'ч'
27: 0, # 'ш'
24: 0, # 'щ'
17: 2, # 'ъ'
52: 0, # 'ь'
42: 1, # 'ю'
16: 2, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
51: { # 'У'
63: 0, # 'e'
45: 1, # '\xad'
31: 1, # 'А'
32: 1, # 'Б'
35: 1, # 'В'
43: 1, # 'Г'
37: 1, # 'Д'
44: 2, # 'Е'
55: 1, # 'Ж'
47: 1, # 'З'
40: 1, # 'И'
59: 0, # 'Й'
33: 1, # 'К'
46: 1, # 'Л'
38: 1, # 'М'
36: 1, # 'Н'
41: 0, # 'О'
30: 1, # 'П'
39: 1, # 'Р'
28: 1, # 'С'
34: 2, # 'Т'
51: 0, # 'У'
48: 1, # 'Ф'
49: 1, # 'Х'
53: 1, # 'Ц'
50: 1, # 'Ч'
54: 1, # 'Ш'
57: 0, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 0, # 'Я'
1: 1, # 'а'
18: 1, # 'б'
9: 2, # 'в'
20: 1, # 'г'
11: 1, # 'д'
3: 2, # 'е'
23: 1, # 'ж'
15: 1, # 'з'
2: 2, # 'и'
26: 1, # 'й'
12: 2, # 'к'
10: 1, # 'л'
14: 1, # 'м'
6: 2, # 'н'
4: 2, # 'о'
13: 1, # 'п'
7: 1, # 'р'
8: 2, # 'с'
5: 1, # 'т'
19: 1, # 'у'
29: 0, # 'ф'
25: 1, # 'х'
22: 0, # 'ц'
21: 2, # 'ч'
27: 1, # 'ш'
24: 0, # 'щ'
17: 1, # 'ъ'
52: 0, # 'ь'
42: 0, # 'ю'
16: 0, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
48: { # 'Ф'
63: 0, # 'e'
45: 0, # '\xad'
31: 2, # 'А'
32: 1, # 'Б'
35: 1, # 'В'
43: 0, # 'Г'
37: 0, # 'Д'
44: 1, # 'Е'
55: 0, # 'Ж'
47: 0, # 'З'
40: 2, # 'И'
59: 0, # 'Й'
33: 1, # 'К'
46: 1, # 'Л'
38: 0, # 'М'
36: 1, # 'Н'
41: 1, # 'О'
30: 2, # 'П'
39: 1, # 'Р'
28: 2, # 'С'
34: 1, # 'Т'
51: 1, # 'У'
48: 0, # 'Ф'
49: 0, # 'Х'
53: 0, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 0, # 'Я'
1: 2, # 'а'
18: 0, # 'б'
9: 0, # 'в'
20: 0, # 'г'
11: 0, # 'д'
3: 2, # 'е'
23: 0, # 'ж'
15: 0, # 'з'
2: 2, # 'и'
26: 0, # 'й'
12: 0, # 'к'
10: 2, # 'л'
14: 0, # 'м'
6: 0, # 'н'
4: 2, # 'о'
13: 0, # 'п'
7: 2, # 'р'
8: 0, # 'с'
5: 0, # 'т'
19: 1, # 'у'
29: 0, # 'ф'
25: 0, # 'х'
22: 0, # 'ц'
21: 0, # 'ч'
27: 0, # 'ш'
24: 0, # 'щ'
17: 1, # 'ъ'
52: 1, # 'ь'
42: 1, # 'ю'
16: 0, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
49: { # 'Х'
63: 0, # 'e'
45: 0, # '\xad'
31: 1, # 'А'
32: 0, # 'Б'
35: 1, # 'В'
43: 1, # 'Г'
37: 1, # 'Д'
44: 1, # 'Е'
55: 0, # 'Ж'
47: 0, # 'З'
40: 1, # 'И'
59: 0, # 'Й'
33: 0, # 'К'
46: 1, # 'Л'
38: 1, # 'М'
36: 1, # 'Н'
41: 1, # 'О'
30: 1, # 'П'
39: 1, # 'Р'
28: 0, # 'С'
34: 0, # 'Т'
51: 0, # 'У'
48: 0, # 'Ф'
49: 1, # 'Х'
53: 0, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 0, # 'Я'
1: 2, # 'а'
18: 0, # 'б'
9: 1, # 'в'
20: 0, # 'г'
11: 0, # 'д'
3: 2, # 'е'
23: 0, # 'ж'
15: 0, # 'з'
2: 2, # 'и'
26: 0, # 'й'
12: 0, # 'к'
10: 1, # 'л'
14: 1, # 'м'
6: 0, # 'н'
4: 2, # 'о'
13: 0, # 'п'
7: 2, # 'р'
8: 0, # 'с'
5: 0, # 'т'
19: 2, # 'у'
29: 0, # 'ф'
25: 0, # 'х'
22: 0, # 'ц'
21: 0, # 'ч'
27: 0, # 'ш'
24: 0, # 'щ'
17: 2, # 'ъ'
52: 1, # 'ь'
42: 1, # 'ю'
16: 0, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
53: { # 'Ц'
63: 0, # 'e'
45: 0, # '\xad'
31: 1, # 'А'
32: 0, # 'Б'
35: 1, # 'В'
43: 0, # 'Г'
37: 0, # 'Д'
44: 1, # 'Е'
55: 0, # 'Ж'
47: 0, # 'З'
40: 2, # 'И'
59: 0, # 'Й'
33: 2, # 'К'
46: 1, # 'Л'
38: 1, # 'М'
36: 0, # 'Н'
41: 0, # 'О'
30: 0, # 'П'
39: 1, # 'Р'
28: 2, # 'С'
34: 0, # 'Т'
51: 1, # 'У'
48: 0, # 'Ф'
49: 0, # 'Х'
53: 0, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 0, # 'Я'
1: 2, # 'а'
18: 0, # 'б'
9: 2, # 'в'
20: 0, # 'г'
11: 0, # 'д'
3: 2, # 'е'
23: 0, # 'ж'
15: 1, # 'з'
2: 2, # 'и'
26: 0, # 'й'
12: 0, # 'к'
10: 0, # 'л'
14: 0, # 'м'
6: 0, # 'н'
4: 1, # 'о'
13: 0, # 'п'
7: 1, # 'р'
8: 0, # 'с'
5: 0, # 'т'
19: 1, # 'у'
29: 0, # 'ф'
25: 0, # 'х'
22: 0, # 'ц'
21: 0, # 'ч'
27: 0, # 'ш'
24: 0, # 'щ'
17: 1, # 'ъ'
52: 0, # 'ь'
42: 1, # 'ю'
16: 1, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
50: { # 'Ч'
63: 0, # 'e'
45: 0, # '\xad'
31: 2, # 'А'
32: 1, # 'Б'
35: 0, # 'В'
43: 0, # 'Г'
37: 0, # 'Д'
44: 1, # 'Е'
55: 0, # 'Ж'
47: 1, # 'З'
40: 1, # 'И'
59: 0, # 'Й'
33: 1, # 'К'
46: 1, # 'Л'
38: 0, # 'М'
36: 1, # 'Н'
41: 1, # 'О'
30: 0, # 'П'
39: 0, # 'Р'
28: 0, # 'С'
34: 0, # 'Т'
51: 1, # 'У'
48: 0, # 'Ф'
49: 0, # 'Х'
53: 0, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 0, # 'Я'
1: 2, # 'а'
18: 0, # 'б'
9: 0, # 'в'
20: 0, # 'г'
11: 0, # 'д'
3: 3, # 'е'
23: 1, # 'ж'
15: 0, # 'з'
2: 2, # 'и'
26: 0, # 'й'
12: 0, # 'к'
10: 1, # 'л'
14: 0, # 'м'
6: 0, # 'н'
4: 2, # 'о'
13: 0, # 'п'
7: 1, # 'р'
8: 0, # 'с'
5: 0, # 'т'
19: 2, # 'у'
29: 0, # 'ф'
25: 0, # 'х'
22: 0, # 'ц'
21: 0, # 'ч'
27: 0, # 'ш'
24: 0, # 'щ'
17: 1, # 'ъ'
52: 1, # 'ь'
42: 0, # 'ю'
16: 0, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
54: { # 'Ш'
63: 0, # 'e'
45: 0, # '\xad'
31: 1, # 'А'
32: 0, # 'Б'
35: 0, # 'В'
43: 0, # 'Г'
37: 0, # 'Д'
44: 1, # 'Е'
55: 0, # 'Ж'
47: 1, # 'З'
40: 1, # 'И'
59: 0, # 'Й'
33: 1, # 'К'
46: 0, # 'Л'
38: 0, # 'М'
36: 1, # 'Н'
41: 1, # 'О'
30: 0, # 'П'
39: 0, # 'Р'
28: 0, # 'С'
34: 0, # 'Т'
51: 1, # 'У'
48: 0, # 'Ф'
49: 0, # 'Х'
53: 0, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 0, # 'Я'
1: 2, # 'а'
18: 0, # 'б'
9: 2, # 'в'
20: 0, # 'г'
11: 0, # 'д'
3: 2, # 'е'
23: 0, # 'ж'
15: 0, # 'з'
2: 2, # 'и'
26: 0, # 'й'
12: 1, # 'к'
10: 1, # 'л'
14: 1, # 'м'
6: 1, # 'н'
4: 2, # 'о'
13: 1, # 'п'
7: 1, # 'р'
8: 0, # 'с'
5: 0, # 'т'
19: 2, # 'у'
29: 0, # 'ф'
25: 0, # 'х'
22: 0, # 'ц'
21: 1, # 'ч'
27: 0, # 'ш'
24: 0, # 'щ'
17: 1, # 'ъ'
52: 1, # 'ь'
42: 0, # 'ю'
16: 0, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
57: { # 'Щ'
63: 0, # 'e'
45: 0, # '\xad'
31: 1, # 'А'
32: 0, # 'Б'
35: 0, # 'В'
43: 0, # 'Г'
37: 0, # 'Д'
44: 1, # 'Е'
55: 0, # 'Ж'
47: 0, # 'З'
40: 1, # 'И'
59: 0, # 'Й'
33: 0, # 'К'
46: 0, # 'Л'
38: 0, # 'М'
36: 0, # 'Н'
41: 1, # 'О'
30: 0, # 'П'
39: 0, # 'Р'
28: 0, # 'С'
34: 0, # 'Т'
51: 0, # 'У'
48: 0, # 'Ф'
49: 0, # 'Х'
53: 0, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 0, # 'Я'
1: 2, # 'а'
18: 0, # 'б'
9: 0, # 'в'
20: 0, # 'г'
11: 0, # 'д'
3: 2, # 'е'
23: 0, # 'ж'
15: 0, # 'з'
2: 1, # 'и'
26: 0, # 'й'
12: 0, # 'к'
10: 0, # 'л'
14: 0, # 'м'
6: 0, # 'н'
4: 1, # 'о'
13: 0, # 'п'
7: 1, # 'р'
8: 0, # 'с'
5: 0, # 'т'
19: 1, # 'у'
29: 0, # 'ф'
25: 0, # 'х'
22: 0, # 'ц'
21: 0, # 'ч'
27: 0, # 'ш'
24: 0, # 'щ'
17: 1, # 'ъ'
52: 0, # 'ь'
42: 0, # 'ю'
16: 1, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
61: { # 'Ъ'
63: 0, # 'e'
45: 0, # '\xad'
31: 0, # 'А'
32: 1, # 'Б'
35: 1, # 'В'
43: 0, # 'Г'
37: 1, # 'Д'
44: 0, # 'Е'
55: 1, # 'Ж'
47: 1, # 'З'
40: 0, # 'И'
59: 0, # 'Й'
33: 1, # 'К'
46: 2, # 'Л'
38: 1, # 'М'
36: 1, # 'Н'
41: 0, # 'О'
30: 1, # 'П'
39: 2, # 'Р'
28: 1, # 'С'
34: 1, # 'Т'
51: 0, # 'У'
48: 0, # 'Ф'
49: 1, # 'Х'
53: 1, # 'Ц'
50: 1, # 'Ч'
54: 1, # 'Ш'
57: 1, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 0, # 'Я'
1: 0, # 'а'
18: 0, # 'б'
9: 0, # 'в'
20: 0, # 'г'
11: 0, # 'д'
3: 0, # 'е'
23: 0, # 'ж'
15: 0, # 'з'
2: 0, # 'и'
26: 0, # 'й'
12: 0, # 'к'
10: 1, # 'л'
14: 0, # 'м'
6: 1, # 'н'
4: 0, # 'о'
13: 0, # 'п'
7: 1, # 'р'
8: 0, # 'с'
5: 0, # 'т'
19: 0, # 'у'
29: 0, # 'ф'
25: 0, # 'х'
22: 0, # 'ц'
21: 0, # 'ч'
27: 0, # 'ш'
24: 0, # 'щ'
17: 0, # 'ъ'
52: 0, # 'ь'
42: 0, # 'ю'
16: 0, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
60: { # 'Ю'
63: 0, # 'e'
45: 0, # '\xad'
31: 1, # 'А'
32: 1, # 'Б'
35: 0, # 'В'
43: 1, # 'Г'
37: 1, # 'Д'
44: 0, # 'Е'
55: 1, # 'Ж'
47: 0, # 'З'
40: 0, # 'И'
59: 0, # 'Й'
33: 1, # 'К'
46: 1, # 'Л'
38: 0, # 'М'
36: 1, # 'Н'
41: 0, # 'О'
30: 0, # 'П'
39: 1, # 'Р'
28: 1, # 'С'
34: 0, # 'Т'
51: 0, # 'У'
48: 0, # 'Ф'
49: 0, # 'Х'
53: 0, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 0, # 'Я'
1: 0, # 'а'
18: 1, # 'б'
9: 1, # 'в'
20: 2, # 'г'
11: 1, # 'д'
3: 0, # 'е'
23: 2, # 'ж'
15: 1, # 'з'
2: 1, # 'и'
26: 0, # 'й'
12: 1, # 'к'
10: 1, # 'л'
14: 1, # 'м'
6: 1, # 'н'
4: 0, # 'о'
13: 1, # 'п'
7: 1, # 'р'
8: 1, # 'с'
5: 1, # 'т'
19: 0, # 'у'
29: 0, # 'ф'
25: 1, # 'х'
22: 0, # 'ц'
21: 0, # 'ч'
27: 0, # 'ш'
24: 0, # 'щ'
17: 0, # 'ъ'
52: 0, # 'ь'
42: 0, # 'ю'
16: 0, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
56: { # 'Я'
63: 0, # 'e'
45: 0, # '\xad'
31: 0, # 'А'
32: 1, # 'Б'
35: 1, # 'В'
43: 1, # 'Г'
37: 1, # 'Д'
44: 0, # 'Е'
55: 0, # 'Ж'
47: 0, # 'З'
40: 0, # 'И'
59: 0, # 'Й'
33: 1, # 'К'
46: 1, # 'Л'
38: 1, # 'М'
36: 1, # 'Н'
41: 0, # 'О'
30: 0, # 'П'
39: 0, # 'Р'
28: 1, # 'С'
34: 2, # 'Т'
51: 0, # 'У'
48: 0, # 'Ф'
49: 0, # 'Х'
53: 0, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 0, # 'Я'
1: 0, # 'а'
18: 1, # 'б'
9: 1, # 'в'
20: 1, # 'г'
11: 1, # 'д'
3: 0, # 'е'
23: 0, # 'ж'
15: 1, # 'з'
2: 1, # 'и'
26: 1, # 'й'
12: 1, # 'к'
10: 1, # 'л'
14: 2, # 'м'
6: 2, # 'н'
4: 0, # 'о'
13: 2, # 'п'
7: 1, # 'р'
8: 1, # 'с'
5: 1, # 'т'
19: 0, # 'у'
29: 0, # 'ф'
25: 1, # 'х'
22: 0, # 'ц'
21: 0, # 'ч'
27: 1, # 'ш'
24: 0, # 'щ'
17: 0, # 'ъ'
52: 0, # 'ь'
42: 1, # 'ю'
16: 0, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
1: { # 'а'
63: 1, # 'e'
45: 1, # '\xad'
31: 1, # 'А'
32: 0, # 'Б'
35: 0, # 'В'
43: 0, # 'Г'
37: 0, # 'Д'
44: 1, # 'Е'
55: 0, # 'Ж'
47: 0, # 'З'
40: 0, # 'И'
59: 0, # 'Й'
33: 0, # 'К'
46: 0, # 'Л'
38: 0, # 'М'
36: 0, # 'Н'
41: 0, # 'О'
30: 0, # 'П'
39: 0, # 'Р'
28: 0, # 'С'
34: 0, # 'Т'
51: 0, # 'У'
48: 0, # 'Ф'
49: 0, # 'Х'
53: 0, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 0, # 'Я'
1: 1, # 'а'
18: 3, # 'б'
9: 3, # 'в'
20: 3, # 'г'
11: 3, # 'д'
3: 3, # 'е'
23: 3, # 'ж'
15: 3, # 'з'
2: 3, # 'и'
26: 3, # 'й'
12: 3, # 'к'
10: 3, # 'л'
14: 3, # 'м'
6: 3, # 'н'
4: 2, # 'о'
13: 3, # 'п'
7: 3, # 'р'
8: 3, # 'с'
5: 3, # 'т'
19: 3, # 'у'
29: 3, # 'ф'
25: 3, # 'х'
22: 3, # 'ц'
21: 3, # 'ч'
27: 3, # 'ш'
24: 3, # 'щ'
17: 0, # 'ъ'
52: 0, # 'ь'
42: 1, # 'ю'
16: 3, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
18: { # 'б'
63: 1, # 'e'
45: 0, # '\xad'
31: 0, # 'А'
32: 0, # 'Б'
35: 0, # 'В'
43: 0, # 'Г'
37: 0, # 'Д'
44: 0, # 'Е'
55: 0, # 'Ж'
47: 0, # 'З'
40: 0, # 'И'
59: 0, # 'Й'
33: 0, # 'К'
46: 0, # 'Л'
38: 0, # 'М'
36: 0, # 'Н'
41: 0, # 'О'
30: 0, # 'П'
39: 0, # 'Р'
28: 0, # 'С'
34: 0, # 'Т'
51: 0, # 'У'
48: 0, # 'Ф'
49: 0, # 'Х'
53: 0, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 0, # 'Я'
1: 3, # 'а'
18: 0, # 'б'
9: 3, # 'в'
20: 1, # 'г'
11: 2, # 'д'
3: 3, # 'е'
23: 1, # 'ж'
15: 1, # 'з'
2: 3, # 'и'
26: 0, # 'й'
12: 1, # 'к'
10: 3, # 'л'
14: 2, # 'м'
6: 3, # 'н'
4: 3, # 'о'
13: 1, # 'п'
7: 3, # 'р'
8: 3, # 'с'
5: 0, # 'т'
19: 3, # 'у'
29: 0, # 'ф'
25: 2, # 'х'
22: 1, # 'ц'
21: 1, # 'ч'
27: 1, # 'ш'
24: 3, # 'щ'
17: 3, # 'ъ'
52: 1, # 'ь'
42: 2, # 'ю'
16: 3, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
9: { # 'в'
63: 1, # 'e'
45: 1, # '\xad'
31: 0, # 'А'
32: 1, # 'Б'
35: 0, # 'В'
43: 0, # 'Г'
37: 0, # 'Д'
44: 0, # 'Е'
55: 0, # 'Ж'
47: 0, # 'З'
40: 0, # 'И'
59: 0, # 'Й'
33: 0, # 'К'
46: 0, # 'Л'
38: 0, # 'М'
36: 0, # 'Н'
41: 0, # 'О'
30: 0, # 'П'
39: 0, # 'Р'
28: 0, # 'С'
34: 0, # 'Т'
51: 0, # 'У'
48: 1, # 'Ф'
49: 0, # 'Х'
53: 0, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 0, # 'Я'
1: 3, # 'а'
18: 1, # 'б'
9: 0, # 'в'
20: 2, # 'г'
11: 3, # 'д'
3: 3, # 'е'
23: 1, # 'ж'
15: 3, # 'з'
2: 3, # 'и'
26: 0, # 'й'
12: 3, # 'к'
10: 3, # 'л'
14: 2, # 'м'
6: 3, # 'н'
4: 3, # 'о'
13: 2, # 'п'
7: 3, # 'р'
8: 3, # 'с'
5: 3, # 'т'
19: 2, # 'у'
29: 0, # 'ф'
25: 2, # 'х'
22: 2, # 'ц'
21: 3, # 'ч'
27: 2, # 'ш'
24: 1, # 'щ'
17: 3, # 'ъ'
52: 1, # 'ь'
42: 2, # 'ю'
16: 3, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
20: { # 'г'
63: 0, # 'e'
45: 0, # '\xad'
31: 0, # 'А'
32: 0, # 'Б'
35: 0, # 'В'
43: 0, # 'Г'
37: 0, # 'Д'
44: 0, # 'Е'
55: 0, # 'Ж'
47: 0, # 'З'
40: 0, # 'И'
59: 0, # 'Й'
33: 0, # 'К'
46: 0, # 'Л'
38: 0, # 'М'
36: 0, # 'Н'
41: 0, # 'О'
30: 0, # 'П'
39: 0, # 'Р'
28: 0, # 'С'
34: 0, # 'Т'
51: 0, # 'У'
48: 0, # 'Ф'
49: 0, # 'Х'
53: 0, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 0, # 'Я'
1: 3, # 'а'
18: 1, # 'б'
9: 2, # 'в'
20: 1, # 'г'
11: 2, # 'д'
3: 3, # 'е'
23: 0, # 'ж'
15: 1, # 'з'
2: 3, # 'и'
26: 0, # 'й'
12: 1, # 'к'
10: 3, # 'л'
14: 1, # 'м'
6: 3, # 'н'
4: 3, # 'о'
13: 1, # 'п'
7: 3, # 'р'
8: 2, # 'с'
5: 2, # 'т'
19: 3, # 'у'
29: 1, # 'ф'
25: 1, # 'х'
22: 0, # 'ц'
21: 1, # 'ч'
27: 0, # 'ш'
24: 0, # 'щ'
17: 3, # 'ъ'
52: 1, # 'ь'
42: 1, # 'ю'
16: 1, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
11: { # 'д'
63: 1, # 'e'
45: 0, # '\xad'
31: 0, # 'А'
32: 0, # 'Б'
35: 0, # 'В'
43: 0, # 'Г'
37: 0, # 'Д'
44: 0, # 'Е'
55: 0, # 'Ж'
47: 0, # 'З'
40: 0, # 'И'
59: 0, # 'Й'
33: 0, # 'К'
46: 0, # 'Л'
38: 0, # 'М'
36: 0, # 'Н'
41: 0, # 'О'
30: 0, # 'П'
39: 0, # 'Р'
28: 0, # 'С'
34: 0, # 'Т'
51: 0, # 'У'
48: 0, # 'Ф'
49: 0, # 'Х'
53: 0, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 0, # 'Я'
1: 3, # 'а'
18: 2, # 'б'
9: 3, # 'в'
20: 2, # 'г'
11: 2, # 'д'
3: 3, # 'е'
23: 3, # 'ж'
15: 2, # 'з'
2: 3, # 'и'
26: 0, # 'й'
12: 3, # 'к'
10: 3, # 'л'
14: 3, # 'м'
6: 3, # 'н'
4: 3, # 'о'
13: 3, # 'п'
7: 3, # 'р'
8: 3, # 'с'
5: 1, # 'т'
19: 3, # 'у'
29: 1, # 'ф'
25: 2, # 'х'
22: 2, # 'ц'
21: 2, # 'ч'
27: 1, # 'ш'
24: 1, # 'щ'
17: 3, # 'ъ'
52: 1, # 'ь'
42: 1, # 'ю'
16: 3, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
3: { # 'е'
63: 0, # 'e'
45: 1, # '\xad'
31: 0, # 'А'
32: 0, # 'Б'
35: 0, # 'В'
43: 0, # 'Г'
37: 0, # 'Д'
44: 0, # 'Е'
55: 0, # 'Ж'
47: 0, # 'З'
40: 0, # 'И'
59: 0, # 'Й'
33: 0, # 'К'
46: 0, # 'Л'
38: 0, # 'М'
36: 0, # 'Н'
41: 0, # 'О'
30: 0, # 'П'
39: 0, # 'Р'
28: 0, # 'С'
34: 0, # 'Т'
51: 0, # 'У'
48: 0, # 'Ф'
49: 0, # 'Х'
53: 0, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 0, # 'Я'
1: 2, # 'а'
18: 3, # 'б'
9: 3, # 'в'
20: 3, # 'г'
11: 3, # 'д'
3: 2, # 'е'
23: 3, # 'ж'
15: 3, # 'з'
2: 2, # 'и'
26: 3, # 'й'
12: 3, # 'к'
10: 3, # 'л'
14: 3, # 'м'
6: 3, # 'н'
4: 3, # 'о'
13: 3, # 'п'
7: 3, # 'р'
8: 3, # 'с'
5: 3, # 'т'
19: 2, # 'у'
29: 3, # 'ф'
25: 3, # 'х'
22: 3, # 'ц'
21: 3, # 'ч'
27: 3, # 'ш'
24: 3, # 'щ'
17: 1, # 'ъ'
52: 0, # 'ь'
42: 1, # 'ю'
16: 3, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
23: { # 'ж'
63: 0, # 'e'
45: 0, # '\xad'
31: 0, # 'А'
32: 0, # 'Б'
35: 0, # 'В'
43: 0, # 'Г'
37: 0, # 'Д'
44: 0, # 'Е'
55: 0, # 'Ж'
47: 0, # 'З'
40: 0, # 'И'
59: 0, # 'Й'
33: 0, # 'К'
46: 0, # 'Л'
38: 0, # 'М'
36: 0, # 'Н'
41: 0, # 'О'
30: 0, # 'П'
39: 0, # 'Р'
28: 0, # 'С'
34: 0, # 'Т'
51: 0, # 'У'
48: 0, # 'Ф'
49: 0, # 'Х'
53: 0, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 0, # 'Я'
1: 3, # 'а'
18: 3, # 'б'
9: 2, # 'в'
20: 1, # 'г'
11: 3, # 'д'
3: 3, # 'е'
23: 0, # 'ж'
15: 0, # 'з'
2: 3, # 'и'
26: 0, # 'й'
12: 2, # 'к'
10: 1, # 'л'
14: 1, # 'м'
6: 3, # 'н'
4: 2, # 'о'
13: 1, # 'п'
7: 1, # 'р'
8: 1, # 'с'
5: 1, # 'т'
19: 2, # 'у'
29: 0, # 'ф'
25: 0, # 'х'
22: 1, # 'ц'
21: 1, # 'ч'
27: 0, # 'ш'
24: 0, # 'щ'
17: 2, # 'ъ'
52: 0, # 'ь'
42: 0, # 'ю'
16: 1, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
15: { # 'з'
63: 1, # 'e'
45: 0, # '\xad'
31: 0, # 'А'
32: 0, # 'Б'
35: 0, # 'В'
43: 0, # 'Г'
37: 0, # 'Д'
44: 0, # 'Е'
55: 0, # 'Ж'
47: 0, # 'З'
40: 0, # 'И'
59: 0, # 'Й'
33: 0, # 'К'
46: 0, # 'Л'
38: 0, # 'М'
36: 0, # 'Н'
41: 0, # 'О'
30: 0, # 'П'
39: 0, # 'Р'
28: 0, # 'С'
34: 0, # 'Т'
51: 0, # 'У'
48: 0, # 'Ф'
49: 0, # 'Х'
53: 0, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 0, # 'Я'
1: 3, # 'а'
18: 3, # 'б'
9: 3, # 'в'
20: 3, # 'г'
11: 3, # 'д'
3: 3, # 'е'
23: 1, # 'ж'
15: 1, # 'з'
2: 3, # 'и'
26: 0, # 'й'
12: 3, # 'к'
10: 3, # 'л'
14: 3, # 'м'
6: 3, # 'н'
4: 3, # 'о'
13: 3, # 'п'
7: 3, # 'р'
8: 3, # 'с'
5: 3, # 'т'
19: 3, # 'у'
29: 1, # 'ф'
25: 2, # 'х'
22: 2, # 'ц'
21: 2, # 'ч'
27: 2, # 'ш'
24: 1, # 'щ'
17: 2, # 'ъ'
52: 1, # 'ь'
42: 1, # 'ю'
16: 2, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
2: { # 'и'
63: 1, # 'e'
45: 1, # '\xad'
31: 0, # 'А'
32: 0, # 'Б'
35: 0, # 'В'
43: 1, # 'Г'
37: 0, # 'Д'
44: 0, # 'Е'
55: 0, # 'Ж'
47: 0, # 'З'
40: 0, # 'И'
59: 0, # 'Й'
33: 1, # 'К'
46: 0, # 'Л'
38: 0, # 'М'
36: 0, # 'Н'
41: 0, # 'О'
30: 1, # 'П'
39: 0, # 'Р'
28: 0, # 'С'
34: 0, # 'Т'
51: 0, # 'У'
48: 1, # 'Ф'
49: 0, # 'Х'
53: 0, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 0, # 'Я'
1: 3, # 'а'
18: 3, # 'б'
9: 3, # 'в'
20: 3, # 'г'
11: 3, # 'д'
3: 3, # 'е'
23: 3, # 'ж'
15: 3, # 'з'
2: 3, # 'и'
26: 3, # 'й'
12: 3, # 'к'
10: 3, # 'л'
14: 3, # 'м'
6: 3, # 'н'
4: 3, # 'о'
13: 3, # 'п'
7: 3, # 'р'
8: 3, # 'с'
5: 3, # 'т'
19: 2, # 'у'
29: 3, # 'ф'
25: 3, # 'х'
22: 3, # 'ц'
21: 3, # 'ч'
27: 3, # 'ш'
24: 3, # 'щ'
17: 2, # 'ъ'
52: 0, # 'ь'
42: 1, # 'ю'
16: 3, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
26: { # 'й'
63: 0, # 'e'
45: 0, # '\xad'
31: 0, # 'А'
32: 0, # 'Б'
35: 0, # 'В'
43: 0, # 'Г'
37: 0, # 'Д'
44: 0, # 'Е'
55: 0, # 'Ж'
47: 0, # 'З'
40: 0, # 'И'
59: 0, # 'Й'
33: 0, # 'К'
46: 0, # 'Л'
38: 0, # 'М'
36: 0, # 'Н'
41: 0, # 'О'
30: 0, # 'П'
39: 0, # 'Р'
28: 0, # 'С'
34: 0, # 'Т'
51: 0, # 'У'
48: 0, # 'Ф'
49: 0, # 'Х'
53: 0, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 0, # 'Я'
1: 1, # 'а'
18: 2, # 'б'
9: 2, # 'в'
20: 1, # 'г'
11: 2, # 'д'
3: 2, # 'е'
23: 0, # 'ж'
15: 2, # 'з'
2: 1, # 'и'
26: 0, # 'й'
12: 3, # 'к'
10: 2, # 'л'
14: 2, # 'м'
6: 3, # 'н'
4: 2, # 'о'
13: 1, # 'п'
7: 2, # 'р'
8: 3, # 'с'
5: 3, # 'т'
19: 1, # 'у'
29: 2, # 'ф'
25: 1, # 'х'
22: 2, # 'ц'
21: 2, # 'ч'
27: 1, # 'ш'
24: 1, # 'щ'
17: 1, # 'ъ'
52: 0, # 'ь'
42: 0, # 'ю'
16: 1, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
12: { # 'к'
63: 1, # 'e'
45: 0, # '\xad'
31: 0, # 'А'
32: 0, # 'Б'
35: 1, # 'В'
43: 0, # 'Г'
37: 0, # 'Д'
44: 0, # 'Е'
55: 0, # 'Ж'
47: 0, # 'З'
40: 1, # 'И'
59: 0, # 'Й'
33: 0, # 'К'
46: 0, # 'Л'
38: 0, # 'М'
36: 0, # 'Н'
41: 0, # 'О'
30: 0, # 'П'
39: 0, # 'Р'
28: 0, # 'С'
34: 0, # 'Т'
51: 0, # 'У'
48: 0, # 'Ф'
49: 0, # 'Х'
53: 0, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 0, # 'Я'
1: 3, # 'а'
18: 1, # 'б'
9: 3, # 'в'
20: 2, # 'г'
11: 1, # 'д'
3: 3, # 'е'
23: 0, # 'ж'
15: 2, # 'з'
2: 3, # 'и'
26: 0, # 'й'
12: 1, # 'к'
10: 3, # 'л'
14: 2, # 'м'
6: 3, # 'н'
4: 3, # 'о'
13: 1, # 'п'
7: 3, # 'р'
8: 3, # 'с'
5: 3, # 'т'
19: 3, # 'у'
29: 1, # 'ф'
25: 1, # 'х'
22: 3, # 'ц'
21: 2, # 'ч'
27: 1, # 'ш'
24: 0, # 'щ'
17: 3, # 'ъ'
52: 1, # 'ь'
42: 2, # 'ю'
16: 1, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
10: { # 'л'
63: 1, # 'e'
45: 1, # '\xad'
31: 0, # 'А'
32: 0, # 'Б'
35: 0, # 'В'
43: 0, # 'Г'
37: 0, # 'Д'
44: 0, # 'Е'
55: 0, # 'Ж'
47: 0, # 'З'
40: 0, # 'И'
59: 0, # 'Й'
33: 0, # 'К'
46: 0, # 'Л'
38: 0, # 'М'
36: 0, # 'Н'
41: 0, # 'О'
30: 0, # 'П'
39: 0, # 'Р'
28: 1, # 'С'
34: 0, # 'Т'
51: 0, # 'У'
48: 0, # 'Ф'
49: 0, # 'Х'
53: 0, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 0, # 'Я'
1: 3, # 'а'
18: 3, # 'б'
9: 3, # 'в'
20: 3, # 'г'
11: 2, # 'д'
3: 3, # 'е'
23: 3, # 'ж'
15: 2, # 'з'
2: 3, # 'и'
26: 0, # 'й'
12: 3, # 'к'
10: 1, # 'л'
14: 2, # 'м'
6: 3, # 'н'
4: 3, # 'о'
13: 2, # 'п'
7: 2, # 'р'
8: 3, # 'с'
5: 3, # 'т'
19: 3, # 'у'
29: 2, # 'ф'
25: 2, # 'х'
22: 2, # 'ц'
21: 2, # 'ч'
27: 2, # 'ш'
24: 1, # 'щ'
17: 3, # 'ъ'
52: 2, # 'ь'
42: 3, # 'ю'
16: 3, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
14: { # 'м'
63: 1, # 'e'
45: 0, # '\xad'
31: 1, # 'А'
32: 0, # 'Б'
35: 0, # 'В'
43: 0, # 'Г'
37: 0, # 'Д'
44: 0, # 'Е'
55: 0, # 'Ж'
47: 0, # 'З'
40: 0, # 'И'
59: 0, # 'Й'
33: 0, # 'К'
46: 0, # 'Л'
38: 0, # 'М'
36: 0, # 'Н'
41: 0, # 'О'
30: 0, # 'П'
39: 0, # 'Р'
28: 0, # 'С'
34: 0, # 'Т'
51: 0, # 'У'
48: 0, # 'Ф'
49: 0, # 'Х'
53: 0, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 0, # 'Я'
1: 3, # 'а'
18: 3, # 'б'
9: 3, # 'в'
20: 1, # 'г'
11: 1, # 'д'
3: 3, # 'е'
23: 1, # 'ж'
15: 1, # 'з'
2: 3, # 'и'
26: 0, # 'й'
12: 2, # 'к'
10: 3, # 'л'
14: 1, # 'м'
6: 3, # 'н'
4: 3, # 'о'
13: 3, # 'п'
7: 2, # 'р'
8: 2, # 'с'
5: 1, # 'т'
19: 3, # 'у'
29: 2, # 'ф'
25: 1, # 'х'
22: 2, # 'ц'
21: 2, # 'ч'
27: 2, # 'ш'
24: 1, # 'щ'
17: 3, # 'ъ'
52: 1, # 'ь'
42: 2, # 'ю'
16: 3, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
6: { # 'н'
63: 1, # 'e'
45: 0, # '\xad'
31: 0, # 'А'
32: 0, # 'Б'
35: 0, # 'В'
43: 0, # 'Г'
37: 0, # 'Д'
44: 0, # 'Е'
55: 0, # 'Ж'
47: 0, # 'З'
40: 0, # 'И'
59: 0, # 'Й'
33: 0, # 'К'
46: 0, # 'Л'
38: 0, # 'М'
36: 0, # 'Н'
41: 0, # 'О'
30: 0, # 'П'
39: 1, # 'Р'
28: 0, # 'С'
34: 0, # 'Т'
51: 0, # 'У'
48: 0, # 'Ф'
49: 0, # 'Х'
53: 0, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 0, # 'Я'
1: 3, # 'а'
18: 2, # 'б'
9: 2, # 'в'
20: 3, # 'г'
11: 3, # 'д'
3: 3, # 'е'
23: 2, # 'ж'
15: 2, # 'з'
2: 3, # 'и'
26: 0, # 'й'
12: 3, # 'к'
10: 2, # 'л'
14: 1, # 'м'
6: 3, # 'н'
4: 3, # 'о'
13: 1, # 'п'
7: 2, # 'р'
8: 3, # 'с'
5: 3, # 'т'
19: 3, # 'у'
29: 3, # 'ф'
25: 2, # 'х'
22: 3, # 'ц'
21: 3, # 'ч'
27: 2, # 'ш'
24: 1, # 'щ'
17: 3, # 'ъ'
52: 2, # 'ь'
42: 2, # 'ю'
16: 3, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
4: { # 'о'
63: 0, # 'e'
45: 1, # '\xad'
31: 0, # 'А'
32: 0, # 'Б'
35: 0, # 'В'
43: 0, # 'Г'
37: 0, # 'Д'
44: 0, # 'Е'
55: 0, # 'Ж'
47: 0, # 'З'
40: 0, # 'И'
59: 0, # 'Й'
33: 0, # 'К'
46: 0, # 'Л'
38: 0, # 'М'
36: 0, # 'Н'
41: 0, # 'О'
30: 0, # 'П'
39: 0, # 'Р'
28: 0, # 'С'
34: 0, # 'Т'
51: 0, # 'У'
48: 0, # 'Ф'
49: 0, # 'Х'
53: 0, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 0, # 'Я'
1: 2, # 'а'
18: 3, # 'б'
9: 3, # 'в'
20: 3, # 'г'
11: 3, # 'д'
3: 3, # 'е'
23: 3, # 'ж'
15: 3, # 'з'
2: 3, # 'и'
26: 3, # 'й'
12: 3, # 'к'
10: 3, # 'л'
14: 3, # 'м'
6: 3, # 'н'
4: 2, # 'о'
13: 3, # 'п'
7: 3, # 'р'
8: 3, # 'с'
5: 3, # 'т'
19: 2, # 'у'
29: 3, # 'ф'
25: 3, # 'х'
22: 3, # 'ц'
21: 3, # 'ч'
27: 3, # 'ш'
24: 3, # 'щ'
17: 1, # 'ъ'
52: 0, # 'ь'
42: 1, # 'ю'
16: 3, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
13: { # 'п'
63: 1, # 'e'
45: 0, # '\xad'
31: 0, # 'А'
32: 0, # 'Б'
35: 0, # 'В'
43: 0, # 'Г'
37: 0, # 'Д'
44: 0, # 'Е'
55: 0, # 'Ж'
47: 0, # 'З'
40: 0, # 'И'
59: 0, # 'Й'
33: 0, # 'К'
46: 0, # 'Л'
38: 0, # 'М'
36: 0, # 'Н'
41: 0, # 'О'
30: 0, # 'П'
39: 0, # 'Р'
28: 0, # 'С'
34: 0, # 'Т'
51: 0, # 'У'
48: 0, # 'Ф'
49: 0, # 'Х'
53: 0, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 0, # 'Я'
1: 3, # 'а'
18: 1, # 'б'
9: 2, # 'в'
20: 1, # 'г'
11: 1, # 'д'
3: 3, # 'е'
23: 0, # 'ж'
15: 1, # 'з'
2: 3, # 'и'
26: 1, # 'й'
12: 2, # 'к'
10: 3, # 'л'
14: 1, # 'м'
6: 2, # 'н'
4: 3, # 'о'
13: 1, # 'п'
7: 3, # 'р'
8: 2, # 'с'
5: 2, # 'т'
19: 3, # 'у'
29: 1, # 'ф'
25: 1, # 'х'
22: 2, # 'ц'
21: 2, # 'ч'
27: 1, # 'ш'
24: 1, # 'щ'
17: 3, # 'ъ'
52: 1, # 'ь'
42: 2, # 'ю'
16: 2, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
7: { # 'р'
63: 1, # 'e'
45: 0, # '\xad'
31: 0, # 'А'
32: 0, # 'Б'
35: 0, # 'В'
43: 0, # 'Г'
37: 0, # 'Д'
44: 0, # 'Е'
55: 0, # 'Ж'
47: 0, # 'З'
40: 0, # 'И'
59: 0, # 'Й'
33: 0, # 'К'
46: 0, # 'Л'
38: 0, # 'М'
36: 0, # 'Н'
41: 0, # 'О'
30: 0, # 'П'
39: 0, # 'Р'
28: 0, # 'С'
34: 0, # 'Т'
51: 0, # 'У'
48: 0, # 'Ф'
49: 0, # 'Х'
53: 0, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 0, # 'Я'
1: 3, # 'а'
18: 3, # 'б'
9: 3, # 'в'
20: 3, # 'г'
11: 3, # 'д'
3: 3, # 'е'
23: 3, # 'ж'
15: 2, # 'з'
2: 3, # 'и'
26: 0, # 'й'
12: 3, # 'к'
10: 3, # 'л'
14: 3, # 'м'
6: 3, # 'н'
4: 3, # 'о'
13: 2, # 'п'
7: 1, # 'р'
8: 3, # 'с'
5: 3, # 'т'
19: 3, # 'у'
29: 2, # 'ф'
25: 3, # 'х'
22: 3, # 'ц'
21: 2, # 'ч'
27: 3, # 'ш'
24: 1, # 'щ'
17: 3, # 'ъ'
52: 1, # 'ь'
42: 2, # 'ю'
16: 3, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
8: { # 'с'
63: 1, # 'e'
45: 0, # '\xad'
31: 0, # 'А'
32: 0, # 'Б'
35: 0, # 'В'
43: 0, # 'Г'
37: 0, # 'Д'
44: 0, # 'Е'
55: 0, # 'Ж'
47: 0, # 'З'
40: 0, # 'И'
59: 0, # 'Й'
33: 0, # 'К'
46: 0, # 'Л'
38: 0, # 'М'
36: 0, # 'Н'
41: 0, # 'О'
30: 0, # 'П'
39: 0, # 'Р'
28: 0, # 'С'
34: 0, # 'Т'
51: 0, # 'У'
48: 0, # 'Ф'
49: 0, # 'Х'
53: 0, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 0, # 'Я'
1: 3, # 'а'
18: 2, # 'б'
9: 3, # 'в'
20: 2, # 'г'
11: 2, # 'д'
3: 3, # 'е'
23: 0, # 'ж'
15: 1, # 'з'
2: 3, # 'и'
26: 0, # 'й'
12: 3, # 'к'
10: 3, # 'л'
14: 3, # 'м'
6: 3, # 'н'
4: 3, # 'о'
13: 3, # 'п'
7: 3, # 'р'
8: 1, # 'с'
5: 3, # 'т'
19: 3, # 'у'
29: 2, # 'ф'
25: 2, # 'х'
22: 2, # 'ц'
21: 2, # 'ч'
27: 2, # 'ш'
24: 0, # 'щ'
17: 3, # 'ъ'
52: 2, # 'ь'
42: 2, # 'ю'
16: 3, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
5: { # 'т'
63: 1, # 'e'
45: 0, # '\xad'
31: 0, # 'А'
32: 0, # 'Б'
35: 0, # 'В'
43: 0, # 'Г'
37: 0, # 'Д'
44: 0, # 'Е'
55: 0, # 'Ж'
47: 0, # 'З'
40: 0, # 'И'
59: 0, # 'Й'
33: 0, # 'К'
46: 0, # 'Л'
38: 0, # 'М'
36: 0, # 'Н'
41: 0, # 'О'
30: 0, # 'П'
39: 0, # 'Р'
28: 0, # 'С'
34: 0, # 'Т'
51: 0, # 'У'
48: 0, # 'Ф'
49: 0, # 'Х'
53: 0, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 0, # 'Я'
1: 3, # 'а'
18: 3, # 'б'
9: 3, # 'в'
20: 2, # 'г'
11: 2, # 'д'
3: 3, # 'е'
23: 1, # 'ж'
15: 1, # 'з'
2: 3, # 'и'
26: 0, # 'й'
12: 3, # 'к'
10: 3, # 'л'
14: 2, # 'м'
6: 3, # 'н'
4: 3, # 'о'
13: 2, # 'п'
7: 3, # 'р'
8: 3, # 'с'
5: 3, # 'т'
19: 3, # 'у'
29: 1, # 'ф'
25: 2, # 'х'
22: 2, # 'ц'
21: 2, # 'ч'
27: 1, # 'ш'
24: 1, # 'щ'
17: 3, # 'ъ'
52: 2, # 'ь'
42: 2, # 'ю'
16: 3, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
19: { # 'у'
63: 0, # 'e'
45: 0, # '\xad'
31: 0, # 'А'
32: 0, # 'Б'
35: 0, # 'В'
43: 0, # 'Г'
37: 0, # 'Д'
44: 0, # 'Е'
55: 0, # 'Ж'
47: 0, # 'З'
40: 0, # 'И'
59: 0, # 'Й'
33: 0, # 'К'
46: 0, # 'Л'
38: 0, # 'М'
36: 0, # 'Н'
41: 0, # 'О'
30: 0, # 'П'
39: 0, # 'Р'
28: 0, # 'С'
34: 0, # 'Т'
51: 0, # 'У'
48: 0, # 'Ф'
49: 0, # 'Х'
53: 0, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 0, # 'Я'
1: 3, # 'а'
18: 3, # 'б'
9: 3, # 'в'
20: 3, # 'г'
11: 3, # 'д'
3: 2, # 'е'
23: 3, # 'ж'
15: 3, # 'з'
2: 2, # 'и'
26: 2, # 'й'
12: 3, # 'к'
10: 3, # 'л'
14: 3, # 'м'
6: 3, # 'н'
4: 2, # 'о'
13: 3, # 'п'
7: 3, # 'р'
8: 3, # 'с'
5: 3, # 'т'
19: 1, # 'у'
29: 2, # 'ф'
25: 2, # 'х'
22: 2, # 'ц'
21: 3, # 'ч'
27: 3, # 'ш'
24: 2, # 'щ'
17: 1, # 'ъ'
52: 0, # 'ь'
42: 1, # 'ю'
16: 1, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
29: { # 'ф'
63: 1, # 'e'
45: 0, # '\xad'
31: 0, # 'А'
32: 0, # 'Б'
35: 0, # 'В'
43: 0, # 'Г'
37: 0, # 'Д'
44: 0, # 'Е'
55: 0, # 'Ж'
47: 0, # 'З'
40: 0, # 'И'
59: 0, # 'Й'
33: 0, # 'К'
46: 0, # 'Л'
38: 0, # 'М'
36: 0, # 'Н'
41: 0, # 'О'
30: 0, # 'П'
39: 0, # 'Р'
28: 0, # 'С'
34: 0, # 'Т'
51: 0, # 'У'
48: 0, # 'Ф'
49: 0, # 'Х'
53: 0, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 0, # 'Я'
1: 3, # 'а'
18: 1, # 'б'
9: 1, # 'в'
20: 1, # 'г'
11: 0, # 'д'
3: 3, # 'е'
23: 0, # 'ж'
15: 0, # 'з'
2: 3, # 'и'
26: 0, # 'й'
12: 2, # 'к'
10: 2, # 'л'
14: 1, # 'м'
6: 1, # 'н'
4: 3, # 'о'
13: 0, # 'п'
7: 2, # 'р'
8: 2, # 'с'
5: 2, # 'т'
19: 2, # 'у'
29: 0, # 'ф'
25: 1, # 'х'
22: 0, # 'ц'
21: 1, # 'ч'
27: 1, # 'ш'
24: 0, # 'щ'
17: 2, # 'ъ'
52: 2, # 'ь'
42: 1, # 'ю'
16: 1, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
25: { # 'х'
63: 0, # 'e'
45: 0, # '\xad'
31: 0, # 'А'
32: 0, # 'Б'
35: 0, # 'В'
43: 0, # 'Г'
37: 0, # 'Д'
44: 0, # 'Е'
55: 0, # 'Ж'
47: 0, # 'З'
40: 0, # 'И'
59: 0, # 'Й'
33: 0, # 'К'
46: 0, # 'Л'
38: 0, # 'М'
36: 0, # 'Н'
41: 0, # 'О'
30: 0, # 'П'
39: 0, # 'Р'
28: 0, # 'С'
34: 0, # 'Т'
51: 0, # 'У'
48: 0, # 'Ф'
49: 0, # 'Х'
53: 0, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 0, # 'Я'
1: 3, # 'а'
18: 1, # 'б'
9: 3, # 'в'
20: 0, # 'г'
11: 1, # 'д'
3: 2, # 'е'
23: 0, # 'ж'
15: 1, # 'з'
2: 3, # 'и'
26: 0, # 'й'
12: 1, # 'к'
10: 2, # 'л'
14: 2, # 'м'
6: 3, # 'н'
4: 3, # 'о'
13: 1, # 'п'
7: 3, # 'р'
8: 1, # 'с'
5: 2, # 'т'
19: 3, # 'у'
29: 0, # 'ф'
25: 1, # 'х'
22: 0, # 'ц'
21: 1, # 'ч'
27: 0, # 'ш'
24: 0, # 'щ'
17: 2, # 'ъ'
52: 0, # 'ь'
42: 1, # 'ю'
16: 1, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
22: { # 'ц'
63: 1, # 'e'
45: 0, # '\xad'
31: 0, # 'А'
32: 0, # 'Б'
35: 0, # 'В'
43: 0, # 'Г'
37: 0, # 'Д'
44: 0, # 'Е'
55: 0, # 'Ж'
47: 0, # 'З'
40: 0, # 'И'
59: 0, # 'Й'
33: 0, # 'К'
46: 0, # 'Л'
38: 0, # 'М'
36: 0, # 'Н'
41: 0, # 'О'
30: 0, # 'П'
39: 0, # 'Р'
28: 0, # 'С'
34: 0, # 'Т'
51: 0, # 'У'
48: 0, # 'Ф'
49: 0, # 'Х'
53: 0, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 0, # 'Я'
1: 3, # 'а'
18: 1, # 'б'
9: 2, # 'в'
20: 1, # 'г'
11: 1, # 'д'
3: 3, # 'е'
23: 0, # 'ж'
15: 1, # 'з'
2: 3, # 'и'
26: 0, # 'й'
12: 2, # 'к'
10: 1, # 'л'
14: 1, # 'м'
6: 1, # 'н'
4: 2, # 'о'
13: 1, # 'п'
7: 1, # 'р'
8: 1, # 'с'
5: 1, # 'т'
19: 2, # 'у'
29: 1, # 'ф'
25: 1, # 'х'
22: 1, # 'ц'
21: 1, # 'ч'
27: 1, # 'ш'
24: 1, # 'щ'
17: 2, # 'ъ'
52: 1, # 'ь'
42: 0, # 'ю'
16: 2, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
21: { # 'ч'
63: 1, # 'e'
45: 0, # '\xad'
31: 0, # 'А'
32: 0, # 'Б'
35: 0, # 'В'
43: 0, # 'Г'
37: 0, # 'Д'
44: 0, # 'Е'
55: 0, # 'Ж'
47: 0, # 'З'
40: 0, # 'И'
59: 0, # 'Й'
33: 0, # 'К'
46: 0, # 'Л'
38: 0, # 'М'
36: 0, # 'Н'
41: 0, # 'О'
30: 0, # 'П'
39: 0, # 'Р'
28: 0, # 'С'
34: 0, # 'Т'
51: 0, # 'У'
48: 0, # 'Ф'
49: 0, # 'Х'
53: 0, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 0, # 'Я'
1: 3, # 'а'
18: 1, # 'б'
9: 3, # 'в'
20: 1, # 'г'
11: 0, # 'д'
3: 3, # 'е'
23: 1, # 'ж'
15: 0, # 'з'
2: 3, # 'и'
26: 0, # 'й'
12: 3, # 'к'
10: 2, # 'л'
14: 2, # 'м'
6: 3, # 'н'
4: 3, # 'о'
13: 0, # 'п'
7: 2, # 'р'
8: 0, # 'с'
5: 2, # 'т'
19: 3, # 'у'
29: 0, # 'ф'
25: 0, # 'х'
22: 0, # 'ц'
21: 0, # 'ч'
27: 1, # 'ш'
24: 0, # 'щ'
17: 2, # 'ъ'
52: 0, # 'ь'
42: 1, # 'ю'
16: 0, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
27: { # 'ш'
63: 1, # 'e'
45: 0, # '\xad'
31: 0, # 'А'
32: 0, # 'Б'
35: 0, # 'В'
43: 0, # 'Г'
37: 0, # 'Д'
44: 0, # 'Е'
55: 0, # 'Ж'
47: 0, # 'З'
40: 0, # 'И'
59: 0, # 'Й'
33: 0, # 'К'
46: 0, # 'Л'
38: 0, # 'М'
36: 0, # 'Н'
41: 0, # 'О'
30: 0, # 'П'
39: 0, # 'Р'
28: 0, # 'С'
34: 0, # 'Т'
51: 0, # 'У'
48: 0, # 'Ф'
49: 0, # 'Х'
53: 0, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 0, # 'Я'
1: 3, # 'а'
18: 0, # 'б'
9: 2, # 'в'
20: 0, # 'г'
11: 1, # 'д'
3: 3, # 'е'
23: 0, # 'ж'
15: 0, # 'з'
2: 3, # 'и'
26: 0, # 'й'
12: 3, # 'к'
10: 2, # 'л'
14: 1, # 'м'
6: 3, # 'н'
4: 2, # 'о'
13: 2, # 'п'
7: 1, # 'р'
8: 0, # 'с'
5: 1, # 'т'
19: 2, # 'у'
29: 1, # 'ф'
25: 0, # 'х'
22: 0, # 'ц'
21: 1, # 'ч'
27: 0, # 'ш'
24: 0, # 'щ'
17: 2, # 'ъ'
52: 1, # 'ь'
42: 1, # 'ю'
16: 0, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
24: { # 'щ'
63: 1, # 'e'
45: 0, # '\xad'
31: 0, # 'А'
32: 0, # 'Б'
35: 0, # 'В'
43: 0, # 'Г'
37: 0, # 'Д'
44: 0, # 'Е'
55: 0, # 'Ж'
47: 0, # 'З'
40: 0, # 'И'
59: 0, # 'Й'
33: 0, # 'К'
46: 0, # 'Л'
38: 0, # 'М'
36: 0, # 'Н'
41: 0, # 'О'
30: 0, # 'П'
39: 0, # 'Р'
28: 0, # 'С'
34: 0, # 'Т'
51: 0, # 'У'
48: 0, # 'Ф'
49: 0, # 'Х'
53: 0, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 0, # 'Я'
1: 3, # 'а'
18: 0, # 'б'
9: 1, # 'в'
20: 0, # 'г'
11: 0, # 'д'
3: 3, # 'е'
23: 0, # 'ж'
15: 0, # 'з'
2: 3, # 'и'
26: 0, # 'й'
12: 1, # 'к'
10: 0, # 'л'
14: 0, # 'м'
6: 2, # 'н'
4: 3, # 'о'
13: 0, # 'п'
7: 1, # 'р'
8: 0, # 'с'
5: 2, # 'т'
19: 3, # 'у'
29: 0, # 'ф'
25: 0, # 'х'
22: 1, # 'ц'
21: 0, # 'ч'
27: 0, # 'ш'
24: 0, # 'щ'
17: 1, # 'ъ'
52: 0, # 'ь'
42: 0, # 'ю'
16: 2, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
17: { # 'ъ'
63: 0, # 'e'
45: 0, # '\xad'
31: 0, # 'А'
32: 0, # 'Б'
35: 0, # 'В'
43: 0, # 'Г'
37: 0, # 'Д'
44: 0, # 'Е'
55: 0, # 'Ж'
47: 0, # 'З'
40: 0, # 'И'
59: 0, # 'Й'
33: 0, # 'К'
46: 0, # 'Л'
38: 0, # 'М'
36: 0, # 'Н'
41: 0, # 'О'
30: 0, # 'П'
39: 0, # 'Р'
28: 0, # 'С'
34: 0, # 'Т'
51: 0, # 'У'
48: 0, # 'Ф'
49: 0, # 'Х'
53: 0, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 0, # 'Я'
1: 1, # 'а'
18: 3, # 'б'
9: 3, # 'в'
20: 3, # 'г'
11: 3, # 'д'
3: 2, # 'е'
23: 3, # 'ж'
15: 3, # 'з'
2: 1, # 'и'
26: 2, # 'й'
12: 3, # 'к'
10: 3, # 'л'
14: 3, # 'м'
6: 3, # 'н'
4: 3, # 'о'
13: 3, # 'п'
7: 3, # 'р'
8: 3, # 'с'
5: 3, # 'т'
19: 1, # 'у'
29: 1, # 'ф'
25: 2, # 'х'
22: 2, # 'ц'
21: 3, # 'ч'
27: 2, # 'ш'
24: 3, # 'щ'
17: 0, # 'ъ'
52: 0, # 'ь'
42: 2, # 'ю'
16: 0, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
52: { # 'ь'
63: 0, # 'e'
45: 0, # '\xad'
31: 0, # 'А'
32: 0, # 'Б'
35: 0, # 'В'
43: 0, # 'Г'
37: 0, # 'Д'
44: 0, # 'Е'
55: 0, # 'Ж'
47: 0, # 'З'
40: 0, # 'И'
59: 0, # 'Й'
33: 0, # 'К'
46: 0, # 'Л'
38: 0, # 'М'
36: 0, # 'Н'
41: 0, # 'О'
30: 0, # 'П'
39: 0, # 'Р'
28: 0, # 'С'
34: 0, # 'Т'
51: 0, # 'У'
48: 0, # 'Ф'
49: 0, # 'Х'
53: 0, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 0, # 'Я'
1: 0, # 'а'
18: 0, # 'б'
9: 0, # 'в'
20: 0, # 'г'
11: 0, # 'д'
3: 1, # 'е'
23: 0, # 'ж'
15: 0, # 'з'
2: 0, # 'и'
26: 0, # 'й'
12: 1, # 'к'
10: 0, # 'л'
14: 0, # 'м'
6: 1, # 'н'
4: 3, # 'о'
13: 0, # 'п'
7: 0, # 'р'
8: 0, # 'с'
5: 1, # 'т'
19: 0, # 'у'
29: 0, # 'ф'
25: 0, # 'х'
22: 1, # 'ц'
21: 0, # 'ч'
27: 0, # 'ш'
24: 0, # 'щ'
17: 0, # 'ъ'
52: 0, # 'ь'
42: 1, # 'ю'
16: 0, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
42: { # 'ю'
63: 0, # 'e'
45: 0, # '\xad'
31: 0, # 'А'
32: 0, # 'Б'
35: 0, # 'В'
43: 0, # 'Г'
37: 0, # 'Д'
44: 0, # 'Е'
55: 0, # 'Ж'
47: 0, # 'З'
40: 0, # 'И'
59: 0, # 'Й'
33: 0, # 'К'
46: 0, # 'Л'
38: 0, # 'М'
36: 0, # 'Н'
41: 0, # 'О'
30: 0, # 'П'
39: 0, # 'Р'
28: 0, # 'С'
34: 0, # 'Т'
51: 0, # 'У'
48: 0, # 'Ф'
49: 0, # 'Х'
53: 0, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 0, # 'Я'
1: 1, # 'а'
18: 2, # 'б'
9: 1, # 'в'
20: 2, # 'г'
11: 2, # 'д'
3: 1, # 'е'
23: 2, # 'ж'
15: 2, # 'з'
2: 1, # 'и'
26: 1, # 'й'
12: 2, # 'к'
10: 2, # 'л'
14: 2, # 'м'
6: 2, # 'н'
4: 1, # 'о'
13: 1, # 'п'
7: 2, # 'р'
8: 2, # 'с'
5: 2, # 'т'
19: 1, # 'у'
29: 1, # 'ф'
25: 1, # 'х'
22: 2, # 'ц'
21: 3, # 'ч'
27: 1, # 'ш'
24: 1, # 'щ'
17: 1, # 'ъ'
52: 0, # 'ь'
42: 0, # 'ю'
16: 1, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
16: { # 'я'
63: 0, # 'e'
45: 1, # '\xad'
31: 0, # 'А'
32: 0, # 'Б'
35: 0, # 'В'
43: 0, # 'Г'
37: 0, # 'Д'
44: 0, # 'Е'
55: 0, # 'Ж'
47: 0, # 'З'
40: 0, # 'И'
59: 0, # 'Й'
33: 0, # 'К'
46: 0, # 'Л'
38: 0, # 'М'
36: 0, # 'Н'
41: 0, # 'О'
30: 0, # 'П'
39: 0, # 'Р'
28: 0, # 'С'
34: 0, # 'Т'
51: 0, # 'У'
48: 0, # 'Ф'
49: 0, # 'Х'
53: 0, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 0, # 'Я'
1: 0, # 'а'
18: 3, # 'б'
9: 3, # 'в'
20: 2, # 'г'
11: 3, # 'д'
3: 2, # 'е'
23: 1, # 'ж'
15: 2, # 'з'
2: 1, # 'и'
26: 2, # 'й'
12: 3, # 'к'
10: 3, # 'л'
14: 3, # 'м'
6: 3, # 'н'
4: 1, # 'о'
13: 2, # 'п'
7: 2, # 'р'
8: 3, # 'с'
5: 3, # 'т'
19: 1, # 'у'
29: 1, # 'ф'
25: 3, # 'х'
22: 2, # 'ц'
21: 1, # 'ч'
27: 1, # 'ш'
24: 2, # 'щ'
17: 0, # 'ъ'
52: 0, # 'ь'
42: 0, # 'ю'
16: 1, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
58: { # 'є'
63: 0, # 'e'
45: 0, # '\xad'
31: 0, # 'А'
32: 0, # 'Б'
35: 0, # 'В'
43: 0, # 'Г'
37: 0, # 'Д'
44: 0, # 'Е'
55: 0, # 'Ж'
47: 0, # 'З'
40: 0, # 'И'
59: 0, # 'Й'
33: 0, # 'К'
46: 0, # 'Л'
38: 0, # 'М'
36: 0, # 'Н'
41: 0, # 'О'
30: 0, # 'П'
39: 0, # 'Р'
28: 0, # 'С'
34: 0, # 'Т'
51: 0, # 'У'
48: 0, # 'Ф'
49: 0, # 'Х'
53: 0, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 0, # 'Я'
1: 0, # 'а'
18: 0, # 'б'
9: 0, # 'в'
20: 0, # 'г'
11: 0, # 'д'
3: 0, # 'е'
23: 0, # 'ж'
15: 0, # 'з'
2: 0, # 'и'
26: 0, # 'й'
12: 0, # 'к'
10: 0, # 'л'
14: 0, # 'м'
6: 0, # 'н'
4: 0, # 'о'
13: 0, # 'п'
7: 0, # 'р'
8: 0, # 'с'
5: 0, # 'т'
19: 0, # 'у'
29: 0, # 'ф'
25: 0, # 'х'
22: 0, # 'ц'
21: 0, # 'ч'
27: 0, # 'ш'
24: 0, # 'щ'
17: 0, # 'ъ'
52: 0, # 'ь'
42: 0, # 'ю'
16: 0, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
62: { # '№'
63: 0, # 'e'
45: 0, # '\xad'
31: 0, # 'А'
32: 0, # 'Б'
35: 0, # 'В'
43: 0, # 'Г'
37: 0, # 'Д'
44: 0, # 'Е'
55: 0, # 'Ж'
47: 0, # 'З'
40: 0, # 'И'
59: 0, # 'Й'
33: 0, # 'К'
46: 0, # 'Л'
38: 0, # 'М'
36: 0, # 'Н'
41: 0, # 'О'
30: 0, # 'П'
39: 0, # 'Р'
28: 0, # 'С'
34: 0, # 'Т'
51: 0, # 'У'
48: 0, # 'Ф'
49: 0, # 'Х'
53: 0, # 'Ц'
50: 0, # 'Ч'
54: 0, # 'Ш'
57: 0, # 'Щ'
61: 0, # 'Ъ'
60: 0, # 'Ю'
56: 0, # 'Я'
1: 0, # 'а'
18: 0, # 'б'
9: 0, # 'в'
20: 0, # 'г'
11: 0, # 'д'
3: 0, # 'е'
23: 0, # 'ж'
15: 0, # 'з'
2: 0, # 'и'
26: 0, # 'й'
12: 0, # 'к'
10: 0, # 'л'
14: 0, # 'м'
6: 0, # 'н'
4: 0, # 'о'
13: 0, # 'п'
7: 0, # 'р'
8: 0, # 'с'
5: 0, # 'т'
19: 0, # 'у'
29: 0, # 'ф'
25: 0, # 'х'
22: 0, # 'ц'
21: 0, # 'ч'
27: 0, # 'ш'
24: 0, # 'щ'
17: 0, # 'ъ'
52: 0, # 'ь'
42: 0, # 'ю'
16: 0, # 'я'
58: 0, # 'є'
62: 0, # '№'
},
}
# 255: Undefined characters that did not exist in training text
# 254: Carriage/Return
# 253: symbol (punctuation) that does not belong to word
# 252: 0 - 9
# 251: Control characters
# Character Mapping Table(s):
ISO_8859_5_BULGARIAN_CHAR_TO_ORDER = {
0: 255, # '\x00'
1: 255, # '\x01'
2: 255, # '\x02'
3: 255, # '\x03'
4: 255, # '\x04'
5: 255, # '\x05'
6: 255, # '\x06'
7: 255, # '\x07'
8: 255, # '\x08'
9: 255, # '\t'
10: 254, # '\n'
11: 255, # '\x0b'
12: 255, # '\x0c'
13: 254, # '\r'
14: 255, # '\x0e'
15: 255, # '\x0f'
16: 255, # '\x10'
17: 255, # '\x11'
18: 255, # '\x12'
19: 255, # '\x13'
20: 255, # '\x14'
21: 255, # '\x15'
22: 255, # '\x16'
23: 255, # '\x17'
24: 255, # '\x18'
25: 255, # '\x19'
26: 255, # '\x1a'
27: 255, # '\x1b'
28: 255, # '\x1c'
29: 255, # '\x1d'
30: 255, # '\x1e'
31: 255, # '\x1f'
32: 253, # ' '
33: 253, # '!'
34: 253, # '"'
35: 253, # '#'
36: 253, # '$'
37: 253, # '%'
38: 253, # '&'
39: 253, # "'"
40: 253, # '('
41: 253, # ')'
42: 253, # '*'
43: 253, # '+'
44: 253, # ','
45: 253, # '-'
46: 253, # '.'
47: 253, # '/'
48: 252, # '0'
49: 252, # '1'
50: 252, # '2'
51: 252, # '3'
52: 252, # '4'
53: 252, # '5'
54: 252, # '6'
55: 252, # '7'
56: 252, # '8'
57: 252, # '9'
58: 253, # ':'
59: 253, # ';'
60: 253, # '<'
61: 253, # '='
62: 253, # '>'
63: 253, # '?'
64: 253, # '@'
65: 77, # 'A'
66: 90, # 'B'
67: 99, # 'C'
68: 100, # 'D'
69: 72, # 'E'
70: 109, # 'F'
71: 107, # 'G'
72: 101, # 'H'
73: 79, # 'I'
74: 185, # 'J'
75: 81, # 'K'
76: 102, # 'L'
77: 76, # 'M'
78: 94, # 'N'
79: 82, # 'O'
80: 110, # 'P'
81: 186, # 'Q'
82: 108, # 'R'
83: 91, # 'S'
84: 74, # 'T'
85: 119, # 'U'
86: 84, # 'V'
87: 96, # 'W'
88: 111, # 'X'
89: 187, # 'Y'
90: 115, # 'Z'
91: 253, # '['
92: 253, # '\\'
93: 253, # ']'
94: 253, # '^'
95: 253, # '_'
96: 253, # '`'
97: 65, # 'a'
98: 69, # 'b'
99: 70, # 'c'
100: 66, # 'd'
101: 63, # 'e'
102: 68, # 'f'
103: 112, # 'g'
104: 103, # 'h'
105: 92, # 'i'
106: 194, # 'j'
107: 104, # 'k'
108: 95, # 'l'
109: 86, # 'm'
110: 87, # 'n'
111: 71, # 'o'
112: 116, # 'p'
113: 195, # 'q'
114: 85, # 'r'
115: 93, # 's'
116: 97, # 't'
117: 113, # 'u'
118: 196, # 'v'
119: 197, # 'w'
120: 198, # 'x'
121: 199, # 'y'
122: 200, # 'z'
123: 253, # '{'
124: 253, # '|'
125: 253, # '}'
126: 253, # '~'
127: 253, # '\x7f'
128: 194, # '\x80'
129: 195, # '\x81'
130: 196, # '\x82'
131: 197, # '\x83'
132: 198, # '\x84'
133: 199, # '\x85'
134: 200, # '\x86'
135: 201, # '\x87'
136: 202, # '\x88'
137: 203, # '\x89'
138: 204, # '\x8a'
139: 205, # '\x8b'
140: 206, # '\x8c'
141: 207, # '\x8d'
142: 208, # '\x8e'
143: 209, # '\x8f'
144: 210, # '\x90'
145: 211, # '\x91'
146: 212, # '\x92'
147: 213, # '\x93'
148: 214, # '\x94'
149: 215, # '\x95'
150: 216, # '\x96'
151: 217, # '\x97'
152: 218, # '\x98'
153: 219, # '\x99'
154: 220, # '\x9a'
155: 221, # '\x9b'
156: 222, # '\x9c'
157: 223, # '\x9d'
158: 224, # '\x9e'
159: 225, # '\x9f'
160: 81, # '\xa0'
161: 226, # 'Ё'
162: 227, # 'Ђ'
163: 228, # 'Ѓ'
164: 229, # 'Є'
165: 230, # 'Ѕ'
166: 105, # 'І'
167: 231, # 'Ї'
168: 232, # 'Ј'
169: 233, # 'Љ'
170: 234, # 'Њ'
171: 235, # 'Ћ'
172: 236, # 'Ќ'
173: 45, # '\xad'
174: 237, # 'Ў'
175: 238, # 'Џ'
176: 31, # 'А'
177: 32, # 'Б'
178: 35, # 'В'
179: 43, # 'Г'
180: 37, # 'Д'
181: 44, # 'Е'
182: 55, # 'Ж'
183: 47, # 'З'
184: 40, # 'И'
185: 59, # 'Й'
186: 33, # 'К'
187: 46, # 'Л'
188: 38, # 'М'
189: 36, # 'Н'
190: 41, # 'О'
191: 30, # 'П'
192: 39, # 'Р'
193: 28, # 'С'
194: 34, # 'Т'
195: 51, # 'У'
196: 48, # 'Ф'
197: 49, # 'Х'
198: 53, # 'Ц'
199: 50, # 'Ч'
200: 54, # 'Ш'
201: 57, # 'Щ'
202: 61, # 'Ъ'
203: 239, # 'Ы'
204: 67, # 'Ь'
205: 240, # 'Э'
206: 60, # 'Ю'
207: 56, # 'Я'
208: 1, # 'а'
209: 18, # 'б'
210: 9, # 'в'
211: 20, # 'г'
212: 11, # 'д'
213: 3, # 'е'
214: 23, # 'ж'
215: 15, # 'з'
216: 2, # 'и'
217: 26, # 'й'
218: 12, # 'к'
219: 10, # 'л'
220: 14, # 'м'
221: 6, # 'н'
222: 4, # 'о'
223: 13, # 'п'
224: 7, # 'р'
225: 8, # 'с'
226: 5, # 'т'
227: 19, # 'у'
228: 29, # 'ф'
229: 25, # 'х'
230: 22, # 'ц'
231: 21, # 'ч'
232: 27, # 'ш'
233: 24, # 'щ'
234: 17, # 'ъ'
235: 75, # 'ы'
236: 52, # 'ь'
237: 241, # 'э'
238: 42, # 'ю'
239: 16, # 'я'
240: 62, # '№'
241: 242, # 'ё'
242: 243, # 'ђ'
243: 244, # 'ѓ'
244: 58, # 'є'
245: 245, # 'ѕ'
246: 98, # 'і'
247: 246, # 'ї'
248: 247, # 'ј'
249: 248, # 'љ'
250: 249, # 'њ'
251: 250, # 'ћ'
252: 251, # 'ќ'
253: 91, # '§'
254: 252, # 'ў'
255: 253, # 'џ'
}
ISO_8859_5_BULGARIAN_MODEL = SingleByteCharSetModel(
charset_name="ISO-8859-5",
language="Bulgarian",
char_to_order_map=ISO_8859_5_BULGARIAN_CHAR_TO_ORDER,
language_model=BULGARIAN_LANG_MODEL,
typical_positive_ratio=0.969392,
keep_ascii_letters=False,
alphabet="АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЬЮЯабвгдежзийклмнопрстуфхцчшщъьюя",
)
WINDOWS_1251_BULGARIAN_CHAR_TO_ORDER = {
0: 255, # '\x00'
1: 255, # '\x01'
2: 255, # '\x02'
3: 255, # '\x03'
4: 255, # '\x04'
5: 255, # '\x05'
6: 255, # '\x06'
7: 255, # '\x07'
8: 255, # '\x08'
9: 255, # '\t'
10: 254, # '\n'
11: 255, # '\x0b'
12: 255, # '\x0c'
13: 254, # '\r'
14: 255, # '\x0e'
15: 255, # '\x0f'
16: 255, # '\x10'
17: 255, # '\x11'
18: 255, # '\x12'
19: 255, # '\x13'
20: 255, # '\x14'
21: 255, # '\x15'
22: 255, # '\x16'
23: 255, # '\x17'
24: 255, # '\x18'
25: 255, # '\x19'
26: 255, # '\x1a'
27: 255, # '\x1b'
28: 255, # '\x1c'
29: 255, # '\x1d'
30: 255, # '\x1e'
31: 255, # '\x1f'
32: 253, # ' '
33: 253, # '!'
34: 253, # '"'
35: 253, # '#'
36: 253, # '$'
37: 253, # '%'
38: 253, # '&'
39: 253, # "'"
40: 253, # '('
41: 253, # ')'
42: 253, # '*'
43: 253, # '+'
44: 253, # ','
45: 253, # '-'
46: 253, # '.'
47: 253, # '/'
48: 252, # '0'
49: 252, # '1'
50: 252, # '2'
51: 252, # '3'
52: 252, # '4'
53: 252, # '5'
54: 252, # '6'
55: 252, # '7'
56: 252, # '8'
57: 252, # '9'
58: 253, # ':'
59: 253, # ';'
60: 253, # '<'
61: 253, # '='
62: 253, # '>'
63: 253, # '?'
64: 253, # '@'
65: 77, # 'A'
66: 90, # 'B'
67: 99, # 'C'
68: 100, # 'D'
69: 72, # 'E'
70: 109, # 'F'
71: 107, # 'G'
72: 101, # 'H'
73: 79, # 'I'
74: 185, # 'J'
75: 81, # 'K'
76: 102, # 'L'
77: 76, # 'M'
78: 94, # 'N'
79: 82, # 'O'
80: 110, # 'P'
81: 186, # 'Q'
82: 108, # 'R'
83: 91, # 'S'
84: 74, # 'T'
85: 119, # 'U'
86: 84, # 'V'
87: 96, # 'W'
88: 111, # 'X'
89: 187, # 'Y'
90: 115, # 'Z'
91: 253, # '['
92: 253, # '\\'
93: 253, # ']'
94: 253, # '^'
95: 253, # '_'
96: 253, # '`'
97: 65, # 'a'
98: 69, # 'b'
99: 70, # 'c'
100: 66, # 'd'
101: 63, # 'e'
102: 68, # 'f'
103: 112, # 'g'
104: 103, # 'h'
105: 92, # 'i'
106: 194, # 'j'
107: 104, # 'k'
108: 95, # 'l'
109: 86, # 'm'
110: 87, # 'n'
111: 71, # 'o'
112: 116, # 'p'
113: 195, # 'q'
114: 85, # 'r'
115: 93, # 's'
116: 97, # 't'
117: 113, # 'u'
118: 196, # 'v'
119: 197, # 'w'
120: 198, # 'x'
121: 199, # 'y'
122: 200, # 'z'
123: 253, # '{'
124: 253, # '|'
125: 253, # '}'
126: 253, # '~'
127: 253, # '\x7f'
128: 206, # 'Ђ'
129: 207, # 'Ѓ'
130: 208, # '‚'
131: 209, # 'ѓ'
132: 210, # '„'
133: 211, # '…'
134: 212, # '†'
135: 213, # '‡'
136: 120, # '€'
137: 214, # '‰'
138: 215, # 'Љ'
139: 216, # '‹'
140: 217, # 'Њ'
141: 218, # 'Ќ'
142: 219, # 'Ћ'
143: 220, # 'Џ'
144: 221, # 'ђ'
145: 78, # '‘'
146: 64, # '’'
147: 83, # '“'
148: 121, # '”'
149: 98, # '•'
150: 117, # '–'
151: 105, # '—'
152: 222, # None
153: 223, # '™'
154: 224, # 'љ'
155: 225, # '›'
156: 226, # 'њ'
157: 227, # 'ќ'
158: 228, # 'ћ'
159: 229, # 'џ'
160: 88, # '\xa0'
161: 230, # 'Ў'
162: 231, # 'ў'
163: 232, # 'Ј'
164: 233, # '¤'
165: 122, # 'Ґ'
166: 89, # '¦'
167: 106, # '§'
168: 234, # 'Ё'
169: 235, # '©'
170: 236, # 'Є'
171: 237, # '«'
172: 238, # '¬'
173: 45, # '\xad'
174: 239, # '®'
175: 240, # 'Ї'
176: 73, # '°'
177: 80, # '±'
178: 118, # 'І'
179: 114, # 'і'
180: 241, # 'ґ'
181: 242, # 'µ'
182: 243, # '¶'
183: 244, # '·'
184: 245, # 'ё'
185: 62, # '№'
186: 58, # 'є'
187: 246, # '»'
188: 247, # 'ј'
189: 248, # 'Ѕ'
190: 249, # 'ѕ'
191: 250, # 'ї'
192: 31, # 'А'
193: 32, # 'Б'
194: 35, # 'В'
195: 43, # 'Г'
196: 37, # 'Д'
197: 44, # 'Е'
198: 55, # 'Ж'
199: 47, # 'З'
200: 40, # 'И'
201: 59, # 'Й'
202: 33, # 'К'
203: 46, # 'Л'
204: 38, # 'М'
205: 36, # 'Н'
206: 41, # 'О'
207: 30, # 'П'
208: 39, # 'Р'
209: 28, # 'С'
210: 34, # 'Т'
211: 51, # 'У'
212: 48, # 'Ф'
213: 49, # 'Х'
214: 53, # 'Ц'
215: 50, # 'Ч'
216: 54, # 'Ш'
217: 57, # 'Щ'
218: 61, # 'Ъ'
219: 251, # 'Ы'
220: 67, # 'Ь'
221: 252, # 'Э'
222: 60, # 'Ю'
223: 56, # 'Я'
224: 1, # 'а'
225: 18, # 'б'
226: 9, # 'в'
227: 20, # 'г'
228: 11, # 'д'
229: 3, # 'е'
230: 23, # 'ж'
231: 15, # 'з'
232: 2, # 'и'
233: 26, # 'й'
234: 12, # 'к'
235: 10, # 'л'
236: 14, # 'м'
237: 6, # 'н'
238: 4, # 'о'
239: 13, # 'п'
240: 7, # 'р'
241: 8, # 'с'
242: 5, # 'т'
243: 19, # 'у'
244: 29, # 'ф'
245: 25, # 'х'
246: 22, # 'ц'
247: 21, # 'ч'
248: 27, # 'ш'
249: 24, # 'щ'
250: 17, # 'ъ'
251: 75, # 'ы'
252: 52, # 'ь'
253: 253, # 'э'
254: 42, # 'ю'
255: 16, # 'я'
}
WINDOWS_1251_BULGARIAN_MODEL = SingleByteCharSetModel(
charset_name="windows-1251",
language="Bulgarian",
char_to_order_map=WINDOWS_1251_BULGARIAN_CHAR_TO_ORDER,
language_model=BULGARIAN_LANG_MODEL,
typical_positive_ratio=0.969392,
keep_ascii_letters=False,
alphabet="АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЬЮЯабвгдежзийклмнопрстуфхцчшщъьюя",
)
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/chardet/langbulgarianmodel.py
|
Python
|
mit
| 104,562 |
from pip._vendor.chardet.sbcharsetprober import SingleByteCharSetModel
# 3: Positive
# 2: Likely
# 1: Unlikely
# 0: Negative
GREEK_LANG_MODEL = {
60: { # 'e'
60: 2, # 'e'
55: 1, # 'o'
58: 2, # 't'
36: 1, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 0, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 0, # 'Ε'
40: 0, # 'Η'
52: 0, # 'Θ'
47: 0, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 0, # 'Ο'
35: 0, # 'Π'
48: 0, # 'Ρ'
37: 0, # 'Σ'
33: 0, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 1, # 'Χ'
57: 0, # 'Ω'
17: 0, # 'ά'
18: 0, # 'έ'
22: 0, # 'ή'
15: 0, # 'ί'
1: 0, # 'α'
29: 0, # 'β'
20: 0, # 'γ'
21: 0, # 'δ'
3: 0, # 'ε'
32: 0, # 'ζ'
13: 0, # 'η'
25: 0, # 'θ'
5: 0, # 'ι'
11: 0, # 'κ'
16: 0, # 'λ'
10: 0, # 'μ'
6: 0, # 'ν'
30: 0, # 'ξ'
4: 0, # 'ο'
9: 0, # 'π'
8: 0, # 'ρ'
14: 0, # 'ς'
7: 0, # 'σ'
2: 0, # 'τ'
12: 0, # 'υ'
28: 0, # 'φ'
23: 0, # 'χ'
42: 0, # 'ψ'
24: 0, # 'ω'
19: 0, # 'ό'
26: 0, # 'ύ'
27: 0, # 'ώ'
},
55: { # 'o'
60: 0, # 'e'
55: 2, # 'o'
58: 2, # 't'
36: 1, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 0, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 0, # 'Ε'
40: 0, # 'Η'
52: 0, # 'Θ'
47: 0, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 0, # 'Ο'
35: 0, # 'Π'
48: 0, # 'Ρ'
37: 0, # 'Σ'
33: 0, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 0, # 'Ω'
17: 0, # 'ά'
18: 0, # 'έ'
22: 0, # 'ή'
15: 0, # 'ί'
1: 0, # 'α'
29: 0, # 'β'
20: 0, # 'γ'
21: 0, # 'δ'
3: 0, # 'ε'
32: 0, # 'ζ'
13: 0, # 'η'
25: 0, # 'θ'
5: 0, # 'ι'
11: 0, # 'κ'
16: 0, # 'λ'
10: 0, # 'μ'
6: 1, # 'ν'
30: 0, # 'ξ'
4: 0, # 'ο'
9: 0, # 'π'
8: 0, # 'ρ'
14: 0, # 'ς'
7: 0, # 'σ'
2: 0, # 'τ'
12: 1, # 'υ'
28: 0, # 'φ'
23: 0, # 'χ'
42: 0, # 'ψ'
24: 0, # 'ω'
19: 0, # 'ό'
26: 0, # 'ύ'
27: 0, # 'ώ'
},
58: { # 't'
60: 2, # 'e'
55: 1, # 'o'
58: 1, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 0, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 0, # 'Ε'
40: 0, # 'Η'
52: 0, # 'Θ'
47: 0, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 0, # 'Ο'
35: 0, # 'Π'
48: 0, # 'Ρ'
37: 0, # 'Σ'
33: 0, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 0, # 'Ω'
17: 2, # 'ά'
18: 0, # 'έ'
22: 0, # 'ή'
15: 0, # 'ί'
1: 0, # 'α'
29: 0, # 'β'
20: 0, # 'γ'
21: 0, # 'δ'
3: 0, # 'ε'
32: 0, # 'ζ'
13: 0, # 'η'
25: 0, # 'θ'
5: 0, # 'ι'
11: 0, # 'κ'
16: 0, # 'λ'
10: 0, # 'μ'
6: 0, # 'ν'
30: 0, # 'ξ'
4: 1, # 'ο'
9: 0, # 'π'
8: 0, # 'ρ'
14: 0, # 'ς'
7: 0, # 'σ'
2: 0, # 'τ'
12: 0, # 'υ'
28: 0, # 'φ'
23: 0, # 'χ'
42: 0, # 'ψ'
24: 0, # 'ω'
19: 0, # 'ό'
26: 0, # 'ύ'
27: 0, # 'ώ'
},
36: { # '·'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 0, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 0, # 'Ε'
40: 0, # 'Η'
52: 0, # 'Θ'
47: 0, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 0, # 'Ο'
35: 0, # 'Π'
48: 0, # 'Ρ'
37: 0, # 'Σ'
33: 0, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 0, # 'Ω'
17: 0, # 'ά'
18: 0, # 'έ'
22: 0, # 'ή'
15: 0, # 'ί'
1: 0, # 'α'
29: 0, # 'β'
20: 0, # 'γ'
21: 0, # 'δ'
3: 0, # 'ε'
32: 0, # 'ζ'
13: 0, # 'η'
25: 0, # 'θ'
5: 0, # 'ι'
11: 0, # 'κ'
16: 0, # 'λ'
10: 0, # 'μ'
6: 0, # 'ν'
30: 0, # 'ξ'
4: 0, # 'ο'
9: 0, # 'π'
8: 0, # 'ρ'
14: 0, # 'ς'
7: 0, # 'σ'
2: 0, # 'τ'
12: 0, # 'υ'
28: 0, # 'φ'
23: 0, # 'χ'
42: 0, # 'ψ'
24: 0, # 'ω'
19: 0, # 'ό'
26: 0, # 'ύ'
27: 0, # 'ώ'
},
61: { # 'Ά'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 0, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 0, # 'Ε'
40: 0, # 'Η'
52: 0, # 'Θ'
47: 0, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 0, # 'Ο'
35: 0, # 'Π'
48: 0, # 'Ρ'
37: 0, # 'Σ'
33: 0, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 0, # 'Ω'
17: 0, # 'ά'
18: 0, # 'έ'
22: 0, # 'ή'
15: 0, # 'ί'
1: 0, # 'α'
29: 0, # 'β'
20: 1, # 'γ'
21: 2, # 'δ'
3: 0, # 'ε'
32: 0, # 'ζ'
13: 0, # 'η'
25: 0, # 'θ'
5: 0, # 'ι'
11: 0, # 'κ'
16: 2, # 'λ'
10: 0, # 'μ'
6: 0, # 'ν'
30: 0, # 'ξ'
4: 0, # 'ο'
9: 1, # 'π'
8: 2, # 'ρ'
14: 0, # 'ς'
7: 0, # 'σ'
2: 0, # 'τ'
12: 0, # 'υ'
28: 0, # 'φ'
23: 0, # 'χ'
42: 0, # 'ψ'
24: 0, # 'ω'
19: 0, # 'ό'
26: 0, # 'ύ'
27: 0, # 'ώ'
},
46: { # 'Έ'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 0, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 0, # 'Ε'
40: 0, # 'Η'
52: 0, # 'Θ'
47: 0, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 0, # 'Ο'
35: 0, # 'Π'
48: 0, # 'Ρ'
37: 0, # 'Σ'
33: 0, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 0, # 'Ω'
17: 0, # 'ά'
18: 0, # 'έ'
22: 0, # 'ή'
15: 0, # 'ί'
1: 0, # 'α'
29: 2, # 'β'
20: 2, # 'γ'
21: 0, # 'δ'
3: 0, # 'ε'
32: 0, # 'ζ'
13: 0, # 'η'
25: 0, # 'θ'
5: 0, # 'ι'
11: 2, # 'κ'
16: 2, # 'λ'
10: 0, # 'μ'
6: 3, # 'ν'
30: 2, # 'ξ'
4: 0, # 'ο'
9: 2, # 'π'
8: 2, # 'ρ'
14: 0, # 'ς'
7: 1, # 'σ'
2: 2, # 'τ'
12: 0, # 'υ'
28: 2, # 'φ'
23: 3, # 'χ'
42: 0, # 'ψ'
24: 0, # 'ω'
19: 0, # 'ό'
26: 0, # 'ύ'
27: 0, # 'ώ'
},
54: { # 'Ό'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 0, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 0, # 'Ε'
40: 0, # 'Η'
52: 0, # 'Θ'
47: 0, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 0, # 'Ο'
35: 0, # 'Π'
48: 0, # 'Ρ'
37: 0, # 'Σ'
33: 0, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 0, # 'Ω'
17: 0, # 'ά'
18: 0, # 'έ'
22: 0, # 'ή'
15: 0, # 'ί'
1: 0, # 'α'
29: 0, # 'β'
20: 0, # 'γ'
21: 0, # 'δ'
3: 0, # 'ε'
32: 0, # 'ζ'
13: 0, # 'η'
25: 0, # 'θ'
5: 0, # 'ι'
11: 0, # 'κ'
16: 2, # 'λ'
10: 2, # 'μ'
6: 2, # 'ν'
30: 0, # 'ξ'
4: 0, # 'ο'
9: 2, # 'π'
8: 0, # 'ρ'
14: 0, # 'ς'
7: 2, # 'σ'
2: 3, # 'τ'
12: 0, # 'υ'
28: 0, # 'φ'
23: 2, # 'χ'
42: 0, # 'ψ'
24: 0, # 'ω'
19: 0, # 'ό'
26: 0, # 'ύ'
27: 0, # 'ώ'
},
31: { # 'Α'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 0, # 'Α'
51: 2, # 'Β'
43: 2, # 'Γ'
41: 1, # 'Δ'
34: 0, # 'Ε'
40: 0, # 'Η'
52: 2, # 'Θ'
47: 2, # 'Ι'
44: 2, # 'Κ'
53: 2, # 'Λ'
38: 2, # 'Μ'
49: 2, # 'Ν'
59: 1, # 'Ξ'
39: 0, # 'Ο'
35: 2, # 'Π'
48: 2, # 'Ρ'
37: 2, # 'Σ'
33: 2, # 'Τ'
45: 2, # 'Υ'
56: 2, # 'Φ'
50: 0, # 'Χ'
57: 0, # 'Ω'
17: 0, # 'ά'
18: 0, # 'έ'
22: 0, # 'ή'
15: 0, # 'ί'
1: 0, # 'α'
29: 0, # 'β'
20: 2, # 'γ'
21: 0, # 'δ'
3: 0, # 'ε'
32: 0, # 'ζ'
13: 0, # 'η'
25: 1, # 'θ'
5: 0, # 'ι'
11: 2, # 'κ'
16: 3, # 'λ'
10: 2, # 'μ'
6: 3, # 'ν'
30: 2, # 'ξ'
4: 0, # 'ο'
9: 3, # 'π'
8: 3, # 'ρ'
14: 2, # 'ς'
7: 2, # 'σ'
2: 0, # 'τ'
12: 3, # 'υ'
28: 2, # 'φ'
23: 0, # 'χ'
42: 0, # 'ψ'
24: 0, # 'ω'
19: 0, # 'ό'
26: 2, # 'ύ'
27: 0, # 'ώ'
},
51: { # 'Β'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 2, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 1, # 'Ε'
40: 1, # 'Η'
52: 0, # 'Θ'
47: 1, # 'Ι'
44: 0, # 'Κ'
53: 1, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 2, # 'Ο'
35: 0, # 'Π'
48: 0, # 'Ρ'
37: 0, # 'Σ'
33: 0, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 0, # 'Ω'
17: 2, # 'ά'
18: 2, # 'έ'
22: 2, # 'ή'
15: 0, # 'ί'
1: 2, # 'α'
29: 0, # 'β'
20: 0, # 'γ'
21: 0, # 'δ'
3: 2, # 'ε'
32: 0, # 'ζ'
13: 0, # 'η'
25: 0, # 'θ'
5: 2, # 'ι'
11: 0, # 'κ'
16: 2, # 'λ'
10: 0, # 'μ'
6: 0, # 'ν'
30: 0, # 'ξ'
4: 2, # 'ο'
9: 0, # 'π'
8: 2, # 'ρ'
14: 0, # 'ς'
7: 0, # 'σ'
2: 0, # 'τ'
12: 0, # 'υ'
28: 0, # 'φ'
23: 0, # 'χ'
42: 0, # 'ψ'
24: 0, # 'ω'
19: 0, # 'ό'
26: 0, # 'ύ'
27: 0, # 'ώ'
},
43: { # 'Γ'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 1, # 'Α'
51: 0, # 'Β'
43: 2, # 'Γ'
41: 0, # 'Δ'
34: 2, # 'Ε'
40: 1, # 'Η'
52: 0, # 'Θ'
47: 2, # 'Ι'
44: 1, # 'Κ'
53: 1, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 1, # 'Ο'
35: 0, # 'Π'
48: 2, # 'Ρ'
37: 0, # 'Σ'
33: 0, # 'Τ'
45: 2, # 'Υ'
56: 0, # 'Φ'
50: 1, # 'Χ'
57: 2, # 'Ω'
17: 0, # 'ά'
18: 0, # 'έ'
22: 0, # 'ή'
15: 2, # 'ί'
1: 2, # 'α'
29: 0, # 'β'
20: 0, # 'γ'
21: 0, # 'δ'
3: 2, # 'ε'
32: 0, # 'ζ'
13: 0, # 'η'
25: 0, # 'θ'
5: 3, # 'ι'
11: 0, # 'κ'
16: 2, # 'λ'
10: 0, # 'μ'
6: 2, # 'ν'
30: 0, # 'ξ'
4: 0, # 'ο'
9: 0, # 'π'
8: 2, # 'ρ'
14: 0, # 'ς'
7: 0, # 'σ'
2: 0, # 'τ'
12: 0, # 'υ'
28: 0, # 'φ'
23: 0, # 'χ'
42: 0, # 'ψ'
24: 0, # 'ω'
19: 0, # 'ό'
26: 0, # 'ύ'
27: 0, # 'ώ'
},
41: { # 'Δ'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 0, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 2, # 'Ε'
40: 2, # 'Η'
52: 0, # 'Θ'
47: 2, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 2, # 'Ο'
35: 0, # 'Π'
48: 0, # 'Ρ'
37: 0, # 'Σ'
33: 0, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 2, # 'Ω'
17: 0, # 'ά'
18: 0, # 'έ'
22: 2, # 'ή'
15: 2, # 'ί'
1: 0, # 'α'
29: 0, # 'β'
20: 0, # 'γ'
21: 0, # 'δ'
3: 3, # 'ε'
32: 0, # 'ζ'
13: 2, # 'η'
25: 0, # 'θ'
5: 3, # 'ι'
11: 0, # 'κ'
16: 0, # 'λ'
10: 0, # 'μ'
6: 0, # 'ν'
30: 0, # 'ξ'
4: 2, # 'ο'
9: 0, # 'π'
8: 2, # 'ρ'
14: 0, # 'ς'
7: 0, # 'σ'
2: 0, # 'τ'
12: 2, # 'υ'
28: 0, # 'φ'
23: 0, # 'χ'
42: 0, # 'ψ'
24: 2, # 'ω'
19: 1, # 'ό'
26: 2, # 'ύ'
27: 2, # 'ώ'
},
34: { # 'Ε'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 2, # 'Α'
51: 0, # 'Β'
43: 2, # 'Γ'
41: 2, # 'Δ'
34: 0, # 'Ε'
40: 0, # 'Η'
52: 0, # 'Θ'
47: 2, # 'Ι'
44: 2, # 'Κ'
53: 2, # 'Λ'
38: 2, # 'Μ'
49: 2, # 'Ν'
59: 1, # 'Ξ'
39: 0, # 'Ο'
35: 2, # 'Π'
48: 2, # 'Ρ'
37: 2, # 'Σ'
33: 2, # 'Τ'
45: 2, # 'Υ'
56: 0, # 'Φ'
50: 2, # 'Χ'
57: 2, # 'Ω'
17: 3, # 'ά'
18: 0, # 'έ'
22: 0, # 'ή'
15: 3, # 'ί'
1: 0, # 'α'
29: 0, # 'β'
20: 3, # 'γ'
21: 2, # 'δ'
3: 1, # 'ε'
32: 0, # 'ζ'
13: 0, # 'η'
25: 1, # 'θ'
5: 2, # 'ι'
11: 3, # 'κ'
16: 3, # 'λ'
10: 2, # 'μ'
6: 3, # 'ν'
30: 2, # 'ξ'
4: 0, # 'ο'
9: 3, # 'π'
8: 2, # 'ρ'
14: 0, # 'ς'
7: 2, # 'σ'
2: 2, # 'τ'
12: 2, # 'υ'
28: 2, # 'φ'
23: 0, # 'χ'
42: 0, # 'ψ'
24: 0, # 'ω'
19: 0, # 'ό'
26: 1, # 'ύ'
27: 0, # 'ώ'
},
40: { # 'Η'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 0, # 'Α'
51: 0, # 'Β'
43: 1, # 'Γ'
41: 0, # 'Δ'
34: 0, # 'Ε'
40: 0, # 'Η'
52: 2, # 'Θ'
47: 0, # 'Ι'
44: 2, # 'Κ'
53: 0, # 'Λ'
38: 2, # 'Μ'
49: 2, # 'Ν'
59: 0, # 'Ξ'
39: 0, # 'Ο'
35: 2, # 'Π'
48: 2, # 'Ρ'
37: 2, # 'Σ'
33: 2, # 'Τ'
45: 1, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 0, # 'Ω'
17: 0, # 'ά'
18: 0, # 'έ'
22: 0, # 'ή'
15: 0, # 'ί'
1: 0, # 'α'
29: 0, # 'β'
20: 0, # 'γ'
21: 0, # 'δ'
3: 0, # 'ε'
32: 0, # 'ζ'
13: 0, # 'η'
25: 0, # 'θ'
5: 0, # 'ι'
11: 0, # 'κ'
16: 2, # 'λ'
10: 0, # 'μ'
6: 1, # 'ν'
30: 0, # 'ξ'
4: 0, # 'ο'
9: 0, # 'π'
8: 0, # 'ρ'
14: 0, # 'ς'
7: 0, # 'σ'
2: 0, # 'τ'
12: 0, # 'υ'
28: 0, # 'φ'
23: 1, # 'χ'
42: 0, # 'ψ'
24: 0, # 'ω'
19: 0, # 'ό'
26: 0, # 'ύ'
27: 0, # 'ώ'
},
52: { # 'Θ'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 2, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 2, # 'Ε'
40: 2, # 'Η'
52: 0, # 'Θ'
47: 0, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 2, # 'Ο'
35: 0, # 'Π'
48: 1, # 'Ρ'
37: 0, # 'Σ'
33: 0, # 'Τ'
45: 1, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 0, # 'Ω'
17: 0, # 'ά'
18: 2, # 'έ'
22: 0, # 'ή'
15: 0, # 'ί'
1: 3, # 'α'
29: 0, # 'β'
20: 0, # 'γ'
21: 0, # 'δ'
3: 2, # 'ε'
32: 0, # 'ζ'
13: 0, # 'η'
25: 0, # 'θ'
5: 0, # 'ι'
11: 0, # 'κ'
16: 0, # 'λ'
10: 0, # 'μ'
6: 0, # 'ν'
30: 0, # 'ξ'
4: 0, # 'ο'
9: 0, # 'π'
8: 0, # 'ρ'
14: 0, # 'ς'
7: 0, # 'σ'
2: 0, # 'τ'
12: 2, # 'υ'
28: 0, # 'φ'
23: 0, # 'χ'
42: 0, # 'ψ'
24: 0, # 'ω'
19: 0, # 'ό'
26: 2, # 'ύ'
27: 0, # 'ώ'
},
47: { # 'Ι'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 2, # 'Α'
51: 1, # 'Β'
43: 1, # 'Γ'
41: 2, # 'Δ'
34: 2, # 'Ε'
40: 2, # 'Η'
52: 0, # 'Θ'
47: 0, # 'Ι'
44: 2, # 'Κ'
53: 2, # 'Λ'
38: 2, # 'Μ'
49: 2, # 'Ν'
59: 0, # 'Ξ'
39: 2, # 'Ο'
35: 0, # 'Π'
48: 2, # 'Ρ'
37: 2, # 'Σ'
33: 2, # 'Τ'
45: 0, # 'Υ'
56: 2, # 'Φ'
50: 0, # 'Χ'
57: 2, # 'Ω'
17: 0, # 'ά'
18: 0, # 'έ'
22: 0, # 'ή'
15: 0, # 'ί'
1: 2, # 'α'
29: 0, # 'β'
20: 0, # 'γ'
21: 2, # 'δ'
3: 0, # 'ε'
32: 0, # 'ζ'
13: 0, # 'η'
25: 0, # 'θ'
5: 0, # 'ι'
11: 0, # 'κ'
16: 0, # 'λ'
10: 0, # 'μ'
6: 1, # 'ν'
30: 0, # 'ξ'
4: 2, # 'ο'
9: 0, # 'π'
8: 0, # 'ρ'
14: 0, # 'ς'
7: 2, # 'σ'
2: 1, # 'τ'
12: 0, # 'υ'
28: 0, # 'φ'
23: 0, # 'χ'
42: 0, # 'ψ'
24: 1, # 'ω'
19: 0, # 'ό'
26: 0, # 'ύ'
27: 0, # 'ώ'
},
44: { # 'Κ'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 2, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 1, # 'Δ'
34: 2, # 'Ε'
40: 2, # 'Η'
52: 0, # 'Θ'
47: 0, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 1, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 2, # 'Ο'
35: 0, # 'Π'
48: 2, # 'Ρ'
37: 0, # 'Σ'
33: 1, # 'Τ'
45: 2, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 1, # 'Ω'
17: 3, # 'ά'
18: 0, # 'έ'
22: 0, # 'ή'
15: 0, # 'ί'
1: 3, # 'α'
29: 0, # 'β'
20: 0, # 'γ'
21: 0, # 'δ'
3: 2, # 'ε'
32: 0, # 'ζ'
13: 0, # 'η'
25: 0, # 'θ'
5: 2, # 'ι'
11: 0, # 'κ'
16: 2, # 'λ'
10: 0, # 'μ'
6: 0, # 'ν'
30: 0, # 'ξ'
4: 2, # 'ο'
9: 0, # 'π'
8: 2, # 'ρ'
14: 0, # 'ς'
7: 0, # 'σ'
2: 0, # 'τ'
12: 2, # 'υ'
28: 0, # 'φ'
23: 0, # 'χ'
42: 0, # 'ψ'
24: 0, # 'ω'
19: 2, # 'ό'
26: 2, # 'ύ'
27: 2, # 'ώ'
},
53: { # 'Λ'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 2, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 2, # 'Ε'
40: 2, # 'Η'
52: 0, # 'Θ'
47: 2, # 'Ι'
44: 0, # 'Κ'
53: 2, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 2, # 'Ο'
35: 0, # 'Π'
48: 0, # 'Ρ'
37: 2, # 'Σ'
33: 0, # 'Τ'
45: 2, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 2, # 'Ω'
17: 2, # 'ά'
18: 2, # 'έ'
22: 0, # 'ή'
15: 2, # 'ί'
1: 2, # 'α'
29: 0, # 'β'
20: 0, # 'γ'
21: 0, # 'δ'
3: 2, # 'ε'
32: 0, # 'ζ'
13: 0, # 'η'
25: 0, # 'θ'
5: 1, # 'ι'
11: 0, # 'κ'
16: 0, # 'λ'
10: 0, # 'μ'
6: 0, # 'ν'
30: 0, # 'ξ'
4: 2, # 'ο'
9: 0, # 'π'
8: 0, # 'ρ'
14: 0, # 'ς'
7: 0, # 'σ'
2: 0, # 'τ'
12: 2, # 'υ'
28: 0, # 'φ'
23: 0, # 'χ'
42: 0, # 'ψ'
24: 0, # 'ω'
19: 2, # 'ό'
26: 2, # 'ύ'
27: 0, # 'ώ'
},
38: { # 'Μ'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 2, # 'Α'
51: 2, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 2, # 'Ε'
40: 2, # 'Η'
52: 0, # 'Θ'
47: 2, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 2, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 2, # 'Ο'
35: 2, # 'Π'
48: 0, # 'Ρ'
37: 0, # 'Σ'
33: 0, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 0, # 'Ω'
17: 2, # 'ά'
18: 2, # 'έ'
22: 2, # 'ή'
15: 2, # 'ί'
1: 2, # 'α'
29: 0, # 'β'
20: 0, # 'γ'
21: 0, # 'δ'
3: 3, # 'ε'
32: 0, # 'ζ'
13: 2, # 'η'
25: 0, # 'θ'
5: 3, # 'ι'
11: 0, # 'κ'
16: 0, # 'λ'
10: 0, # 'μ'
6: 0, # 'ν'
30: 0, # 'ξ'
4: 2, # 'ο'
9: 3, # 'π'
8: 0, # 'ρ'
14: 0, # 'ς'
7: 0, # 'σ'
2: 0, # 'τ'
12: 2, # 'υ'
28: 0, # 'φ'
23: 0, # 'χ'
42: 0, # 'ψ'
24: 0, # 'ω'
19: 2, # 'ό'
26: 0, # 'ύ'
27: 0, # 'ώ'
},
49: { # 'Ν'
60: 2, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 2, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 2, # 'Ε'
40: 2, # 'Η'
52: 0, # 'Θ'
47: 2, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 2, # 'Ο'
35: 0, # 'Π'
48: 0, # 'Ρ'
37: 0, # 'Σ'
33: 2, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 2, # 'Ω'
17: 0, # 'ά'
18: 2, # 'έ'
22: 0, # 'ή'
15: 2, # 'ί'
1: 2, # 'α'
29: 0, # 'β'
20: 0, # 'γ'
21: 0, # 'δ'
3: 1, # 'ε'
32: 0, # 'ζ'
13: 0, # 'η'
25: 0, # 'θ'
5: 0, # 'ι'
11: 0, # 'κ'
16: 0, # 'λ'
10: 0, # 'μ'
6: 0, # 'ν'
30: 0, # 'ξ'
4: 2, # 'ο'
9: 0, # 'π'
8: 0, # 'ρ'
14: 0, # 'ς'
7: 0, # 'σ'
2: 0, # 'τ'
12: 0, # 'υ'
28: 0, # 'φ'
23: 0, # 'χ'
42: 0, # 'ψ'
24: 1, # 'ω'
19: 2, # 'ό'
26: 0, # 'ύ'
27: 0, # 'ώ'
},
59: { # 'Ξ'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 0, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 1, # 'Ε'
40: 1, # 'Η'
52: 0, # 'Θ'
47: 0, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 1, # 'Ο'
35: 0, # 'Π'
48: 0, # 'Ρ'
37: 0, # 'Σ'
33: 0, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 0, # 'Ω'
17: 0, # 'ά'
18: 2, # 'έ'
22: 0, # 'ή'
15: 0, # 'ί'
1: 2, # 'α'
29: 0, # 'β'
20: 0, # 'γ'
21: 0, # 'δ'
3: 2, # 'ε'
32: 0, # 'ζ'
13: 0, # 'η'
25: 0, # 'θ'
5: 0, # 'ι'
11: 0, # 'κ'
16: 0, # 'λ'
10: 0, # 'μ'
6: 0, # 'ν'
30: 0, # 'ξ'
4: 0, # 'ο'
9: 0, # 'π'
8: 0, # 'ρ'
14: 0, # 'ς'
7: 0, # 'σ'
2: 0, # 'τ'
12: 0, # 'υ'
28: 0, # 'φ'
23: 0, # 'χ'
42: 0, # 'ψ'
24: 0, # 'ω'
19: 0, # 'ό'
26: 0, # 'ύ'
27: 0, # 'ώ'
},
39: { # 'Ο'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 0, # 'Α'
51: 1, # 'Β'
43: 2, # 'Γ'
41: 2, # 'Δ'
34: 2, # 'Ε'
40: 1, # 'Η'
52: 2, # 'Θ'
47: 2, # 'Ι'
44: 2, # 'Κ'
53: 2, # 'Λ'
38: 2, # 'Μ'
49: 2, # 'Ν'
59: 0, # 'Ξ'
39: 0, # 'Ο'
35: 2, # 'Π'
48: 2, # 'Ρ'
37: 2, # 'Σ'
33: 2, # 'Τ'
45: 2, # 'Υ'
56: 2, # 'Φ'
50: 2, # 'Χ'
57: 0, # 'Ω'
17: 0, # 'ά'
18: 0, # 'έ'
22: 0, # 'ή'
15: 0, # 'ί'
1: 0, # 'α'
29: 0, # 'β'
20: 0, # 'γ'
21: 2, # 'δ'
3: 0, # 'ε'
32: 0, # 'ζ'
13: 0, # 'η'
25: 0, # 'θ'
5: 3, # 'ι'
11: 2, # 'κ'
16: 2, # 'λ'
10: 2, # 'μ'
6: 2, # 'ν'
30: 0, # 'ξ'
4: 0, # 'ο'
9: 2, # 'π'
8: 2, # 'ρ'
14: 0, # 'ς'
7: 0, # 'σ'
2: 2, # 'τ'
12: 2, # 'υ'
28: 1, # 'φ'
23: 1, # 'χ'
42: 0, # 'ψ'
24: 0, # 'ω'
19: 0, # 'ό'
26: 2, # 'ύ'
27: 0, # 'ώ'
},
35: { # 'Π'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 2, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 2, # 'Ε'
40: 0, # 'Η'
52: 0, # 'Θ'
47: 2, # 'Ι'
44: 0, # 'Κ'
53: 2, # 'Λ'
38: 1, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 2, # 'Ο'
35: 0, # 'Π'
48: 2, # 'Ρ'
37: 0, # 'Σ'
33: 1, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 1, # 'Χ'
57: 2, # 'Ω'
17: 2, # 'ά'
18: 1, # 'έ'
22: 1, # 'ή'
15: 2, # 'ί'
1: 3, # 'α'
29: 0, # 'β'
20: 0, # 'γ'
21: 0, # 'δ'
3: 3, # 'ε'
32: 0, # 'ζ'
13: 2, # 'η'
25: 0, # 'θ'
5: 2, # 'ι'
11: 0, # 'κ'
16: 2, # 'λ'
10: 0, # 'μ'
6: 2, # 'ν'
30: 0, # 'ξ'
4: 3, # 'ο'
9: 0, # 'π'
8: 3, # 'ρ'
14: 0, # 'ς'
7: 0, # 'σ'
2: 0, # 'τ'
12: 2, # 'υ'
28: 0, # 'φ'
23: 2, # 'χ'
42: 0, # 'ψ'
24: 2, # 'ω'
19: 2, # 'ό'
26: 0, # 'ύ'
27: 3, # 'ώ'
},
48: { # 'Ρ'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 2, # 'Α'
51: 0, # 'Β'
43: 1, # 'Γ'
41: 1, # 'Δ'
34: 2, # 'Ε'
40: 2, # 'Η'
52: 0, # 'Θ'
47: 2, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 0, # 'Μ'
49: 2, # 'Ν'
59: 0, # 'Ξ'
39: 2, # 'Ο'
35: 0, # 'Π'
48: 2, # 'Ρ'
37: 0, # 'Σ'
33: 1, # 'Τ'
45: 1, # 'Υ'
56: 0, # 'Φ'
50: 1, # 'Χ'
57: 1, # 'Ω'
17: 0, # 'ά'
18: 0, # 'έ'
22: 0, # 'ή'
15: 2, # 'ί'
1: 0, # 'α'
29: 0, # 'β'
20: 0, # 'γ'
21: 0, # 'δ'
3: 0, # 'ε'
32: 0, # 'ζ'
13: 0, # 'η'
25: 0, # 'θ'
5: 0, # 'ι'
11: 0, # 'κ'
16: 0, # 'λ'
10: 0, # 'μ'
6: 0, # 'ν'
30: 0, # 'ξ'
4: 1, # 'ο'
9: 0, # 'π'
8: 0, # 'ρ'
14: 0, # 'ς'
7: 0, # 'σ'
2: 0, # 'τ'
12: 3, # 'υ'
28: 0, # 'φ'
23: 0, # 'χ'
42: 0, # 'ψ'
24: 2, # 'ω'
19: 0, # 'ό'
26: 2, # 'ύ'
27: 0, # 'ώ'
},
37: { # 'Σ'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 2, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 1, # 'Δ'
34: 2, # 'Ε'
40: 2, # 'Η'
52: 0, # 'Θ'
47: 2, # 'Ι'
44: 2, # 'Κ'
53: 0, # 'Λ'
38: 2, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 2, # 'Ο'
35: 0, # 'Π'
48: 0, # 'Ρ'
37: 2, # 'Σ'
33: 2, # 'Τ'
45: 2, # 'Υ'
56: 0, # 'Φ'
50: 2, # 'Χ'
57: 2, # 'Ω'
17: 0, # 'ά'
18: 0, # 'έ'
22: 2, # 'ή'
15: 2, # 'ί'
1: 2, # 'α'
29: 2, # 'β'
20: 0, # 'γ'
21: 0, # 'δ'
3: 3, # 'ε'
32: 0, # 'ζ'
13: 3, # 'η'
25: 0, # 'θ'
5: 2, # 'ι'
11: 2, # 'κ'
16: 0, # 'λ'
10: 0, # 'μ'
6: 0, # 'ν'
30: 0, # 'ξ'
4: 2, # 'ο'
9: 2, # 'π'
8: 0, # 'ρ'
14: 0, # 'ς'
7: 0, # 'σ'
2: 3, # 'τ'
12: 3, # 'υ'
28: 0, # 'φ'
23: 2, # 'χ'
42: 0, # 'ψ'
24: 2, # 'ω'
19: 0, # 'ό'
26: 2, # 'ύ'
27: 2, # 'ώ'
},
33: { # 'Τ'
60: 0, # 'e'
55: 1, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 2, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 2, # 'Ε'
40: 2, # 'Η'
52: 0, # 'Θ'
47: 2, # 'Ι'
44: 2, # 'Κ'
53: 0, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 2, # 'Ο'
35: 0, # 'Π'
48: 2, # 'Ρ'
37: 0, # 'Σ'
33: 1, # 'Τ'
45: 1, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 2, # 'Ω'
17: 2, # 'ά'
18: 2, # 'έ'
22: 0, # 'ή'
15: 2, # 'ί'
1: 3, # 'α'
29: 0, # 'β'
20: 0, # 'γ'
21: 0, # 'δ'
3: 2, # 'ε'
32: 0, # 'ζ'
13: 2, # 'η'
25: 0, # 'θ'
5: 2, # 'ι'
11: 0, # 'κ'
16: 0, # 'λ'
10: 2, # 'μ'
6: 0, # 'ν'
30: 0, # 'ξ'
4: 3, # 'ο'
9: 0, # 'π'
8: 2, # 'ρ'
14: 0, # 'ς'
7: 2, # 'σ'
2: 0, # 'τ'
12: 2, # 'υ'
28: 0, # 'φ'
23: 0, # 'χ'
42: 0, # 'ψ'
24: 0, # 'ω'
19: 2, # 'ό'
26: 2, # 'ύ'
27: 3, # 'ώ'
},
45: { # 'Υ'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 0, # 'Α'
51: 0, # 'Β'
43: 2, # 'Γ'
41: 0, # 'Δ'
34: 1, # 'Ε'
40: 2, # 'Η'
52: 2, # 'Θ'
47: 0, # 'Ι'
44: 0, # 'Κ'
53: 1, # 'Λ'
38: 2, # 'Μ'
49: 2, # 'Ν'
59: 0, # 'Ξ'
39: 0, # 'Ο'
35: 2, # 'Π'
48: 1, # 'Ρ'
37: 2, # 'Σ'
33: 2, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 1, # 'Χ'
57: 0, # 'Ω'
17: 0, # 'ά'
18: 0, # 'έ'
22: 0, # 'ή'
15: 0, # 'ί'
1: 0, # 'α'
29: 0, # 'β'
20: 0, # 'γ'
21: 0, # 'δ'
3: 0, # 'ε'
32: 0, # 'ζ'
13: 0, # 'η'
25: 0, # 'θ'
5: 0, # 'ι'
11: 0, # 'κ'
16: 2, # 'λ'
10: 0, # 'μ'
6: 0, # 'ν'
30: 0, # 'ξ'
4: 0, # 'ο'
9: 3, # 'π'
8: 0, # 'ρ'
14: 0, # 'ς'
7: 0, # 'σ'
2: 0, # 'τ'
12: 0, # 'υ'
28: 0, # 'φ'
23: 0, # 'χ'
42: 0, # 'ψ'
24: 0, # 'ω'
19: 0, # 'ό'
26: 0, # 'ύ'
27: 0, # 'ώ'
},
56: { # 'Φ'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 1, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 0, # 'Ε'
40: 1, # 'Η'
52: 0, # 'Θ'
47: 2, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 2, # 'Ο'
35: 0, # 'Π'
48: 0, # 'Ρ'
37: 0, # 'Σ'
33: 0, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 0, # 'Ω'
17: 0, # 'ά'
18: 0, # 'έ'
22: 0, # 'ή'
15: 0, # 'ί'
1: 2, # 'α'
29: 0, # 'β'
20: 0, # 'γ'
21: 0, # 'δ'
3: 2, # 'ε'
32: 0, # 'ζ'
13: 0, # 'η'
25: 0, # 'θ'
5: 2, # 'ι'
11: 0, # 'κ'
16: 0, # 'λ'
10: 0, # 'μ'
6: 0, # 'ν'
30: 0, # 'ξ'
4: 2, # 'ο'
9: 0, # 'π'
8: 0, # 'ρ'
14: 0, # 'ς'
7: 0, # 'σ'
2: 2, # 'τ'
12: 2, # 'υ'
28: 0, # 'φ'
23: 0, # 'χ'
42: 0, # 'ψ'
24: 0, # 'ω'
19: 0, # 'ό'
26: 1, # 'ύ'
27: 1, # 'ώ'
},
50: { # 'Χ'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 1, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 2, # 'Ε'
40: 2, # 'Η'
52: 0, # 'Θ'
47: 2, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 0, # 'Μ'
49: 1, # 'Ν'
59: 0, # 'Ξ'
39: 1, # 'Ο'
35: 0, # 'Π'
48: 2, # 'Ρ'
37: 0, # 'Σ'
33: 0, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 1, # 'Χ'
57: 1, # 'Ω'
17: 2, # 'ά'
18: 0, # 'έ'
22: 0, # 'ή'
15: 0, # 'ί'
1: 2, # 'α'
29: 0, # 'β'
20: 0, # 'γ'
21: 0, # 'δ'
3: 2, # 'ε'
32: 0, # 'ζ'
13: 0, # 'η'
25: 0, # 'θ'
5: 0, # 'ι'
11: 0, # 'κ'
16: 0, # 'λ'
10: 0, # 'μ'
6: 0, # 'ν'
30: 0, # 'ξ'
4: 2, # 'ο'
9: 0, # 'π'
8: 3, # 'ρ'
14: 0, # 'ς'
7: 0, # 'σ'
2: 2, # 'τ'
12: 0, # 'υ'
28: 0, # 'φ'
23: 0, # 'χ'
42: 0, # 'ψ'
24: 2, # 'ω'
19: 0, # 'ό'
26: 0, # 'ύ'
27: 0, # 'ώ'
},
57: { # 'Ω'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 0, # 'Α'
51: 0, # 'Β'
43: 1, # 'Γ'
41: 0, # 'Δ'
34: 0, # 'Ε'
40: 0, # 'Η'
52: 0, # 'Θ'
47: 0, # 'Ι'
44: 0, # 'Κ'
53: 1, # 'Λ'
38: 0, # 'Μ'
49: 2, # 'Ν'
59: 0, # 'Ξ'
39: 0, # 'Ο'
35: 0, # 'Π'
48: 2, # 'Ρ'
37: 2, # 'Σ'
33: 2, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 0, # 'Ω'
17: 0, # 'ά'
18: 0, # 'έ'
22: 0, # 'ή'
15: 0, # 'ί'
1: 0, # 'α'
29: 0, # 'β'
20: 0, # 'γ'
21: 0, # 'δ'
3: 0, # 'ε'
32: 0, # 'ζ'
13: 0, # 'η'
25: 0, # 'θ'
5: 0, # 'ι'
11: 0, # 'κ'
16: 0, # 'λ'
10: 0, # 'μ'
6: 0, # 'ν'
30: 0, # 'ξ'
4: 0, # 'ο'
9: 0, # 'π'
8: 2, # 'ρ'
14: 2, # 'ς'
7: 2, # 'σ'
2: 0, # 'τ'
12: 0, # 'υ'
28: 0, # 'φ'
23: 1, # 'χ'
42: 0, # 'ψ'
24: 0, # 'ω'
19: 0, # 'ό'
26: 0, # 'ύ'
27: 0, # 'ώ'
},
17: { # 'ά'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 2, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 0, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 0, # 'Ε'
40: 0, # 'Η'
52: 0, # 'Θ'
47: 0, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 0, # 'Ο'
35: 0, # 'Π'
48: 0, # 'Ρ'
37: 0, # 'Σ'
33: 0, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 0, # 'Ω'
17: 0, # 'ά'
18: 0, # 'έ'
22: 0, # 'ή'
15: 0, # 'ί'
1: 0, # 'α'
29: 3, # 'β'
20: 3, # 'γ'
21: 3, # 'δ'
3: 3, # 'ε'
32: 3, # 'ζ'
13: 0, # 'η'
25: 3, # 'θ'
5: 2, # 'ι'
11: 3, # 'κ'
16: 3, # 'λ'
10: 3, # 'μ'
6: 3, # 'ν'
30: 3, # 'ξ'
4: 0, # 'ο'
9: 3, # 'π'
8: 3, # 'ρ'
14: 3, # 'ς'
7: 3, # 'σ'
2: 3, # 'τ'
12: 0, # 'υ'
28: 3, # 'φ'
23: 3, # 'χ'
42: 3, # 'ψ'
24: 2, # 'ω'
19: 0, # 'ό'
26: 0, # 'ύ'
27: 0, # 'ώ'
},
18: { # 'έ'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 0, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 0, # 'Ε'
40: 0, # 'Η'
52: 0, # 'Θ'
47: 0, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 0, # 'Ο'
35: 0, # 'Π'
48: 0, # 'Ρ'
37: 0, # 'Σ'
33: 0, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 0, # 'Ω'
17: 0, # 'ά'
18: 0, # 'έ'
22: 0, # 'ή'
15: 0, # 'ί'
1: 3, # 'α'
29: 2, # 'β'
20: 3, # 'γ'
21: 2, # 'δ'
3: 3, # 'ε'
32: 2, # 'ζ'
13: 0, # 'η'
25: 3, # 'θ'
5: 0, # 'ι'
11: 3, # 'κ'
16: 3, # 'λ'
10: 3, # 'μ'
6: 3, # 'ν'
30: 3, # 'ξ'
4: 3, # 'ο'
9: 3, # 'π'
8: 3, # 'ρ'
14: 3, # 'ς'
7: 3, # 'σ'
2: 3, # 'τ'
12: 0, # 'υ'
28: 3, # 'φ'
23: 3, # 'χ'
42: 3, # 'ψ'
24: 2, # 'ω'
19: 0, # 'ό'
26: 0, # 'ύ'
27: 0, # 'ώ'
},
22: { # 'ή'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 1, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 0, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 0, # 'Ε'
40: 0, # 'Η'
52: 0, # 'Θ'
47: 0, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 0, # 'Ο'
35: 0, # 'Π'
48: 0, # 'Ρ'
37: 0, # 'Σ'
33: 0, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 0, # 'Ω'
17: 0, # 'ά'
18: 0, # 'έ'
22: 0, # 'ή'
15: 0, # 'ί'
1: 0, # 'α'
29: 0, # 'β'
20: 3, # 'γ'
21: 3, # 'δ'
3: 0, # 'ε'
32: 0, # 'ζ'
13: 0, # 'η'
25: 3, # 'θ'
5: 0, # 'ι'
11: 3, # 'κ'
16: 2, # 'λ'
10: 3, # 'μ'
6: 3, # 'ν'
30: 2, # 'ξ'
4: 0, # 'ο'
9: 3, # 'π'
8: 3, # 'ρ'
14: 3, # 'ς'
7: 3, # 'σ'
2: 3, # 'τ'
12: 0, # 'υ'
28: 2, # 'φ'
23: 3, # 'χ'
42: 2, # 'ψ'
24: 0, # 'ω'
19: 0, # 'ό'
26: 0, # 'ύ'
27: 0, # 'ώ'
},
15: { # 'ί'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 0, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 0, # 'Ε'
40: 0, # 'Η'
52: 0, # 'Θ'
47: 0, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 0, # 'Ο'
35: 0, # 'Π'
48: 0, # 'Ρ'
37: 0, # 'Σ'
33: 0, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 0, # 'Ω'
17: 0, # 'ά'
18: 0, # 'έ'
22: 0, # 'ή'
15: 0, # 'ί'
1: 3, # 'α'
29: 2, # 'β'
20: 3, # 'γ'
21: 3, # 'δ'
3: 3, # 'ε'
32: 3, # 'ζ'
13: 3, # 'η'
25: 3, # 'θ'
5: 0, # 'ι'
11: 3, # 'κ'
16: 3, # 'λ'
10: 3, # 'μ'
6: 3, # 'ν'
30: 3, # 'ξ'
4: 3, # 'ο'
9: 3, # 'π'
8: 3, # 'ρ'
14: 3, # 'ς'
7: 3, # 'σ'
2: 3, # 'τ'
12: 0, # 'υ'
28: 1, # 'φ'
23: 3, # 'χ'
42: 2, # 'ψ'
24: 3, # 'ω'
19: 0, # 'ό'
26: 0, # 'ύ'
27: 0, # 'ώ'
},
1: { # 'α'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 2, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 0, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 0, # 'Ε'
40: 0, # 'Η'
52: 0, # 'Θ'
47: 0, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 0, # 'Ο'
35: 0, # 'Π'
48: 0, # 'Ρ'
37: 0, # 'Σ'
33: 0, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 0, # 'Ω'
17: 0, # 'ά'
18: 2, # 'έ'
22: 0, # 'ή'
15: 3, # 'ί'
1: 0, # 'α'
29: 3, # 'β'
20: 3, # 'γ'
21: 3, # 'δ'
3: 2, # 'ε'
32: 3, # 'ζ'
13: 1, # 'η'
25: 3, # 'θ'
5: 3, # 'ι'
11: 3, # 'κ'
16: 3, # 'λ'
10: 3, # 'μ'
6: 3, # 'ν'
30: 3, # 'ξ'
4: 2, # 'ο'
9: 3, # 'π'
8: 3, # 'ρ'
14: 3, # 'ς'
7: 3, # 'σ'
2: 3, # 'τ'
12: 3, # 'υ'
28: 3, # 'φ'
23: 3, # 'χ'
42: 2, # 'ψ'
24: 0, # 'ω'
19: 2, # 'ό'
26: 2, # 'ύ'
27: 0, # 'ώ'
},
29: { # 'β'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 0, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 0, # 'Ε'
40: 0, # 'Η'
52: 0, # 'Θ'
47: 0, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 0, # 'Ο'
35: 0, # 'Π'
48: 0, # 'Ρ'
37: 0, # 'Σ'
33: 0, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 0, # 'Ω'
17: 3, # 'ά'
18: 2, # 'έ'
22: 3, # 'ή'
15: 2, # 'ί'
1: 3, # 'α'
29: 0, # 'β'
20: 2, # 'γ'
21: 2, # 'δ'
3: 3, # 'ε'
32: 0, # 'ζ'
13: 2, # 'η'
25: 0, # 'θ'
5: 3, # 'ι'
11: 0, # 'κ'
16: 3, # 'λ'
10: 0, # 'μ'
6: 0, # 'ν'
30: 0, # 'ξ'
4: 3, # 'ο'
9: 0, # 'π'
8: 3, # 'ρ'
14: 0, # 'ς'
7: 0, # 'σ'
2: 0, # 'τ'
12: 0, # 'υ'
28: 0, # 'φ'
23: 0, # 'χ'
42: 0, # 'ψ'
24: 2, # 'ω'
19: 2, # 'ό'
26: 2, # 'ύ'
27: 2, # 'ώ'
},
20: { # 'γ'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 0, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 0, # 'Ε'
40: 0, # 'Η'
52: 0, # 'Θ'
47: 0, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 0, # 'Ο'
35: 0, # 'Π'
48: 0, # 'Ρ'
37: 0, # 'Σ'
33: 0, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 0, # 'Ω'
17: 3, # 'ά'
18: 3, # 'έ'
22: 3, # 'ή'
15: 3, # 'ί'
1: 3, # 'α'
29: 0, # 'β'
20: 3, # 'γ'
21: 0, # 'δ'
3: 3, # 'ε'
32: 0, # 'ζ'
13: 3, # 'η'
25: 0, # 'θ'
5: 3, # 'ι'
11: 3, # 'κ'
16: 3, # 'λ'
10: 3, # 'μ'
6: 3, # 'ν'
30: 3, # 'ξ'
4: 3, # 'ο'
9: 0, # 'π'
8: 3, # 'ρ'
14: 0, # 'ς'
7: 0, # 'σ'
2: 0, # 'τ'
12: 2, # 'υ'
28: 0, # 'φ'
23: 3, # 'χ'
42: 0, # 'ψ'
24: 3, # 'ω'
19: 3, # 'ό'
26: 2, # 'ύ'
27: 3, # 'ώ'
},
21: { # 'δ'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 0, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 0, # 'Ε'
40: 0, # 'Η'
52: 0, # 'Θ'
47: 0, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 0, # 'Ο'
35: 0, # 'Π'
48: 0, # 'Ρ'
37: 0, # 'Σ'
33: 0, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 0, # 'Ω'
17: 2, # 'ά'
18: 3, # 'έ'
22: 3, # 'ή'
15: 3, # 'ί'
1: 3, # 'α'
29: 0, # 'β'
20: 0, # 'γ'
21: 0, # 'δ'
3: 3, # 'ε'
32: 0, # 'ζ'
13: 3, # 'η'
25: 0, # 'θ'
5: 3, # 'ι'
11: 0, # 'κ'
16: 0, # 'λ'
10: 0, # 'μ'
6: 0, # 'ν'
30: 0, # 'ξ'
4: 3, # 'ο'
9: 0, # 'π'
8: 3, # 'ρ'
14: 0, # 'ς'
7: 0, # 'σ'
2: 0, # 'τ'
12: 3, # 'υ'
28: 0, # 'φ'
23: 0, # 'χ'
42: 0, # 'ψ'
24: 3, # 'ω'
19: 3, # 'ό'
26: 3, # 'ύ'
27: 3, # 'ώ'
},
3: { # 'ε'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 2, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 0, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 0, # 'Ε'
40: 0, # 'Η'
52: 0, # 'Θ'
47: 0, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 0, # 'Ο'
35: 0, # 'Π'
48: 0, # 'Ρ'
37: 0, # 'Σ'
33: 0, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 0, # 'Ω'
17: 3, # 'ά'
18: 0, # 'έ'
22: 0, # 'ή'
15: 3, # 'ί'
1: 2, # 'α'
29: 3, # 'β'
20: 3, # 'γ'
21: 3, # 'δ'
3: 2, # 'ε'
32: 2, # 'ζ'
13: 0, # 'η'
25: 3, # 'θ'
5: 3, # 'ι'
11: 3, # 'κ'
16: 3, # 'λ'
10: 3, # 'μ'
6: 3, # 'ν'
30: 3, # 'ξ'
4: 2, # 'ο'
9: 3, # 'π'
8: 3, # 'ρ'
14: 3, # 'ς'
7: 3, # 'σ'
2: 3, # 'τ'
12: 3, # 'υ'
28: 3, # 'φ'
23: 3, # 'χ'
42: 2, # 'ψ'
24: 3, # 'ω'
19: 2, # 'ό'
26: 3, # 'ύ'
27: 2, # 'ώ'
},
32: { # 'ζ'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 0, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 0, # 'Ε'
40: 0, # 'Η'
52: 0, # 'Θ'
47: 0, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 0, # 'Ο'
35: 0, # 'Π'
48: 0, # 'Ρ'
37: 0, # 'Σ'
33: 0, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 0, # 'Ω'
17: 2, # 'ά'
18: 2, # 'έ'
22: 2, # 'ή'
15: 2, # 'ί'
1: 2, # 'α'
29: 0, # 'β'
20: 0, # 'γ'
21: 0, # 'δ'
3: 3, # 'ε'
32: 0, # 'ζ'
13: 3, # 'η'
25: 0, # 'θ'
5: 2, # 'ι'
11: 0, # 'κ'
16: 0, # 'λ'
10: 0, # 'μ'
6: 0, # 'ν'
30: 0, # 'ξ'
4: 3, # 'ο'
9: 0, # 'π'
8: 0, # 'ρ'
14: 0, # 'ς'
7: 0, # 'σ'
2: 0, # 'τ'
12: 1, # 'υ'
28: 0, # 'φ'
23: 0, # 'χ'
42: 0, # 'ψ'
24: 3, # 'ω'
19: 2, # 'ό'
26: 0, # 'ύ'
27: 2, # 'ώ'
},
13: { # 'η'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 2, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 0, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 0, # 'Ε'
40: 0, # 'Η'
52: 0, # 'Θ'
47: 0, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 0, # 'Ο'
35: 0, # 'Π'
48: 0, # 'Ρ'
37: 0, # 'Σ'
33: 0, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 0, # 'Ω'
17: 0, # 'ά'
18: 0, # 'έ'
22: 0, # 'ή'
15: 0, # 'ί'
1: 0, # 'α'
29: 0, # 'β'
20: 3, # 'γ'
21: 2, # 'δ'
3: 0, # 'ε'
32: 0, # 'ζ'
13: 0, # 'η'
25: 3, # 'θ'
5: 0, # 'ι'
11: 3, # 'κ'
16: 3, # 'λ'
10: 3, # 'μ'
6: 3, # 'ν'
30: 2, # 'ξ'
4: 0, # 'ο'
9: 2, # 'π'
8: 3, # 'ρ'
14: 3, # 'ς'
7: 3, # 'σ'
2: 3, # 'τ'
12: 0, # 'υ'
28: 2, # 'φ'
23: 3, # 'χ'
42: 2, # 'ψ'
24: 0, # 'ω'
19: 0, # 'ό'
26: 0, # 'ύ'
27: 0, # 'ώ'
},
25: { # 'θ'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 0, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 0, # 'Ε'
40: 0, # 'Η'
52: 0, # 'Θ'
47: 0, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 0, # 'Ο'
35: 0, # 'Π'
48: 0, # 'Ρ'
37: 0, # 'Σ'
33: 0, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 0, # 'Ω'
17: 2, # 'ά'
18: 3, # 'έ'
22: 3, # 'ή'
15: 2, # 'ί'
1: 3, # 'α'
29: 0, # 'β'
20: 0, # 'γ'
21: 0, # 'δ'
3: 3, # 'ε'
32: 0, # 'ζ'
13: 3, # 'η'
25: 0, # 'θ'
5: 3, # 'ι'
11: 0, # 'κ'
16: 1, # 'λ'
10: 3, # 'μ'
6: 2, # 'ν'
30: 0, # 'ξ'
4: 3, # 'ο'
9: 0, # 'π'
8: 3, # 'ρ'
14: 0, # 'ς'
7: 0, # 'σ'
2: 0, # 'τ'
12: 3, # 'υ'
28: 0, # 'φ'
23: 0, # 'χ'
42: 0, # 'ψ'
24: 3, # 'ω'
19: 3, # 'ό'
26: 3, # 'ύ'
27: 3, # 'ώ'
},
5: { # 'ι'
60: 0, # 'e'
55: 1, # 'o'
58: 0, # 't'
36: 2, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 0, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 1, # 'Ε'
40: 0, # 'Η'
52: 0, # 'Θ'
47: 0, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 0, # 'Ο'
35: 0, # 'Π'
48: 0, # 'Ρ'
37: 0, # 'Σ'
33: 0, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 0, # 'Ω'
17: 3, # 'ά'
18: 3, # 'έ'
22: 3, # 'ή'
15: 0, # 'ί'
1: 3, # 'α'
29: 3, # 'β'
20: 3, # 'γ'
21: 3, # 'δ'
3: 3, # 'ε'
32: 2, # 'ζ'
13: 3, # 'η'
25: 3, # 'θ'
5: 0, # 'ι'
11: 3, # 'κ'
16: 3, # 'λ'
10: 3, # 'μ'
6: 3, # 'ν'
30: 3, # 'ξ'
4: 3, # 'ο'
9: 3, # 'π'
8: 3, # 'ρ'
14: 3, # 'ς'
7: 3, # 'σ'
2: 3, # 'τ'
12: 0, # 'υ'
28: 2, # 'φ'
23: 3, # 'χ'
42: 2, # 'ψ'
24: 3, # 'ω'
19: 3, # 'ό'
26: 0, # 'ύ'
27: 3, # 'ώ'
},
11: { # 'κ'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 0, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 0, # 'Ε'
40: 0, # 'Η'
52: 0, # 'Θ'
47: 0, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 0, # 'Ο'
35: 0, # 'Π'
48: 0, # 'Ρ'
37: 0, # 'Σ'
33: 0, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 0, # 'Ω'
17: 3, # 'ά'
18: 3, # 'έ'
22: 3, # 'ή'
15: 3, # 'ί'
1: 3, # 'α'
29: 0, # 'β'
20: 0, # 'γ'
21: 3, # 'δ'
3: 3, # 'ε'
32: 0, # 'ζ'
13: 3, # 'η'
25: 2, # 'θ'
5: 3, # 'ι'
11: 3, # 'κ'
16: 3, # 'λ'
10: 3, # 'μ'
6: 2, # 'ν'
30: 0, # 'ξ'
4: 3, # 'ο'
9: 2, # 'π'
8: 3, # 'ρ'
14: 0, # 'ς'
7: 0, # 'σ'
2: 3, # 'τ'
12: 3, # 'υ'
28: 2, # 'φ'
23: 2, # 'χ'
42: 0, # 'ψ'
24: 3, # 'ω'
19: 3, # 'ό'
26: 3, # 'ύ'
27: 3, # 'ώ'
},
16: { # 'λ'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 0, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 0, # 'Ε'
40: 0, # 'Η'
52: 0, # 'Θ'
47: 0, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 0, # 'Ο'
35: 0, # 'Π'
48: 0, # 'Ρ'
37: 0, # 'Σ'
33: 0, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 0, # 'Ω'
17: 3, # 'ά'
18: 3, # 'έ'
22: 3, # 'ή'
15: 3, # 'ί'
1: 3, # 'α'
29: 1, # 'β'
20: 2, # 'γ'
21: 1, # 'δ'
3: 3, # 'ε'
32: 0, # 'ζ'
13: 3, # 'η'
25: 2, # 'θ'
5: 3, # 'ι'
11: 2, # 'κ'
16: 3, # 'λ'
10: 2, # 'μ'
6: 2, # 'ν'
30: 0, # 'ξ'
4: 3, # 'ο'
9: 3, # 'π'
8: 0, # 'ρ'
14: 0, # 'ς'
7: 0, # 'σ'
2: 3, # 'τ'
12: 3, # 'υ'
28: 2, # 'φ'
23: 0, # 'χ'
42: 0, # 'ψ'
24: 3, # 'ω'
19: 3, # 'ό'
26: 3, # 'ύ'
27: 3, # 'ώ'
},
10: { # 'μ'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 0, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 1, # 'Ε'
40: 0, # 'Η'
52: 0, # 'Θ'
47: 0, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 0, # 'Ο'
35: 0, # 'Π'
48: 0, # 'Ρ'
37: 0, # 'Σ'
33: 0, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 0, # 'Ω'
17: 3, # 'ά'
18: 3, # 'έ'
22: 3, # 'ή'
15: 3, # 'ί'
1: 3, # 'α'
29: 3, # 'β'
20: 0, # 'γ'
21: 0, # 'δ'
3: 3, # 'ε'
32: 0, # 'ζ'
13: 3, # 'η'
25: 0, # 'θ'
5: 3, # 'ι'
11: 0, # 'κ'
16: 0, # 'λ'
10: 3, # 'μ'
6: 3, # 'ν'
30: 0, # 'ξ'
4: 3, # 'ο'
9: 3, # 'π'
8: 0, # 'ρ'
14: 0, # 'ς'
7: 0, # 'σ'
2: 0, # 'τ'
12: 2, # 'υ'
28: 3, # 'φ'
23: 0, # 'χ'
42: 2, # 'ψ'
24: 3, # 'ω'
19: 3, # 'ό'
26: 2, # 'ύ'
27: 2, # 'ώ'
},
6: { # 'ν'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 2, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 0, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 0, # 'Ε'
40: 0, # 'Η'
52: 0, # 'Θ'
47: 0, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 0, # 'Ο'
35: 0, # 'Π'
48: 0, # 'Ρ'
37: 0, # 'Σ'
33: 0, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 0, # 'Ω'
17: 3, # 'ά'
18: 3, # 'έ'
22: 3, # 'ή'
15: 3, # 'ί'
1: 3, # 'α'
29: 0, # 'β'
20: 0, # 'γ'
21: 3, # 'δ'
3: 3, # 'ε'
32: 2, # 'ζ'
13: 3, # 'η'
25: 3, # 'θ'
5: 3, # 'ι'
11: 0, # 'κ'
16: 1, # 'λ'
10: 0, # 'μ'
6: 2, # 'ν'
30: 0, # 'ξ'
4: 3, # 'ο'
9: 0, # 'π'
8: 0, # 'ρ'
14: 0, # 'ς'
7: 3, # 'σ'
2: 3, # 'τ'
12: 3, # 'υ'
28: 0, # 'φ'
23: 0, # 'χ'
42: 0, # 'ψ'
24: 3, # 'ω'
19: 3, # 'ό'
26: 3, # 'ύ'
27: 3, # 'ώ'
},
30: { # 'ξ'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 0, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 0, # 'Ε'
40: 0, # 'Η'
52: 0, # 'Θ'
47: 0, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 0, # 'Ο'
35: 0, # 'Π'
48: 0, # 'Ρ'
37: 0, # 'Σ'
33: 0, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 0, # 'Ω'
17: 2, # 'ά'
18: 3, # 'έ'
22: 3, # 'ή'
15: 2, # 'ί'
1: 3, # 'α'
29: 0, # 'β'
20: 0, # 'γ'
21: 0, # 'δ'
3: 3, # 'ε'
32: 0, # 'ζ'
13: 3, # 'η'
25: 0, # 'θ'
5: 2, # 'ι'
11: 0, # 'κ'
16: 0, # 'λ'
10: 0, # 'μ'
6: 0, # 'ν'
30: 0, # 'ξ'
4: 3, # 'ο'
9: 0, # 'π'
8: 0, # 'ρ'
14: 0, # 'ς'
7: 0, # 'σ'
2: 3, # 'τ'
12: 2, # 'υ'
28: 0, # 'φ'
23: 0, # 'χ'
42: 0, # 'ψ'
24: 3, # 'ω'
19: 2, # 'ό'
26: 3, # 'ύ'
27: 1, # 'ώ'
},
4: { # 'ο'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 2, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 0, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 0, # 'Ε'
40: 0, # 'Η'
52: 0, # 'Θ'
47: 0, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 0, # 'Ο'
35: 0, # 'Π'
48: 0, # 'Ρ'
37: 0, # 'Σ'
33: 0, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 0, # 'Ω'
17: 0, # 'ά'
18: 2, # 'έ'
22: 3, # 'ή'
15: 3, # 'ί'
1: 2, # 'α'
29: 3, # 'β'
20: 3, # 'γ'
21: 3, # 'δ'
3: 3, # 'ε'
32: 0, # 'ζ'
13: 3, # 'η'
25: 3, # 'θ'
5: 3, # 'ι'
11: 3, # 'κ'
16: 3, # 'λ'
10: 3, # 'μ'
6: 3, # 'ν'
30: 2, # 'ξ'
4: 2, # 'ο'
9: 3, # 'π'
8: 3, # 'ρ'
14: 3, # 'ς'
7: 3, # 'σ'
2: 3, # 'τ'
12: 3, # 'υ'
28: 3, # 'φ'
23: 3, # 'χ'
42: 2, # 'ψ'
24: 2, # 'ω'
19: 1, # 'ό'
26: 3, # 'ύ'
27: 2, # 'ώ'
},
9: { # 'π'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 0, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 0, # 'Ε'
40: 0, # 'Η'
52: 0, # 'Θ'
47: 0, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 0, # 'Ο'
35: 0, # 'Π'
48: 0, # 'Ρ'
37: 0, # 'Σ'
33: 0, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 0, # 'Ω'
17: 3, # 'ά'
18: 3, # 'έ'
22: 3, # 'ή'
15: 3, # 'ί'
1: 3, # 'α'
29: 0, # 'β'
20: 0, # 'γ'
21: 0, # 'δ'
3: 3, # 'ε'
32: 0, # 'ζ'
13: 3, # 'η'
25: 0, # 'θ'
5: 3, # 'ι'
11: 0, # 'κ'
16: 3, # 'λ'
10: 0, # 'μ'
6: 2, # 'ν'
30: 0, # 'ξ'
4: 3, # 'ο'
9: 0, # 'π'
8: 3, # 'ρ'
14: 2, # 'ς'
7: 0, # 'σ'
2: 3, # 'τ'
12: 3, # 'υ'
28: 0, # 'φ'
23: 2, # 'χ'
42: 0, # 'ψ'
24: 3, # 'ω'
19: 3, # 'ό'
26: 2, # 'ύ'
27: 3, # 'ώ'
},
8: { # 'ρ'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 0, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 0, # 'Ε'
40: 0, # 'Η'
52: 0, # 'Θ'
47: 0, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 0, # 'Ο'
35: 0, # 'Π'
48: 0, # 'Ρ'
37: 0, # 'Σ'
33: 0, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 0, # 'Ω'
17: 3, # 'ά'
18: 3, # 'έ'
22: 3, # 'ή'
15: 3, # 'ί'
1: 3, # 'α'
29: 2, # 'β'
20: 3, # 'γ'
21: 2, # 'δ'
3: 3, # 'ε'
32: 0, # 'ζ'
13: 3, # 'η'
25: 3, # 'θ'
5: 3, # 'ι'
11: 3, # 'κ'
16: 1, # 'λ'
10: 3, # 'μ'
6: 3, # 'ν'
30: 2, # 'ξ'
4: 3, # 'ο'
9: 2, # 'π'
8: 2, # 'ρ'
14: 0, # 'ς'
7: 2, # 'σ'
2: 3, # 'τ'
12: 3, # 'υ'
28: 3, # 'φ'
23: 3, # 'χ'
42: 0, # 'ψ'
24: 3, # 'ω'
19: 3, # 'ό'
26: 3, # 'ύ'
27: 3, # 'ώ'
},
14: { # 'ς'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 2, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 0, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 0, # 'Ε'
40: 0, # 'Η'
52: 0, # 'Θ'
47: 0, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 0, # 'Ο'
35: 0, # 'Π'
48: 0, # 'Ρ'
37: 0, # 'Σ'
33: 0, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 0, # 'Ω'
17: 0, # 'ά'
18: 0, # 'έ'
22: 0, # 'ή'
15: 0, # 'ί'
1: 0, # 'α'
29: 0, # 'β'
20: 0, # 'γ'
21: 0, # 'δ'
3: 0, # 'ε'
32: 0, # 'ζ'
13: 0, # 'η'
25: 0, # 'θ'
5: 0, # 'ι'
11: 0, # 'κ'
16: 0, # 'λ'
10: 0, # 'μ'
6: 0, # 'ν'
30: 0, # 'ξ'
4: 0, # 'ο'
9: 0, # 'π'
8: 0, # 'ρ'
14: 0, # 'ς'
7: 0, # 'σ'
2: 0, # 'τ'
12: 0, # 'υ'
28: 0, # 'φ'
23: 0, # 'χ'
42: 0, # 'ψ'
24: 0, # 'ω'
19: 0, # 'ό'
26: 0, # 'ύ'
27: 0, # 'ώ'
},
7: { # 'σ'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 0, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 0, # 'Ε'
40: 0, # 'Η'
52: 0, # 'Θ'
47: 0, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 0, # 'Ο'
35: 0, # 'Π'
48: 0, # 'Ρ'
37: 0, # 'Σ'
33: 0, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 0, # 'Ω'
17: 2, # 'ά'
18: 2, # 'έ'
22: 3, # 'ή'
15: 3, # 'ί'
1: 3, # 'α'
29: 3, # 'β'
20: 0, # 'γ'
21: 2, # 'δ'
3: 3, # 'ε'
32: 0, # 'ζ'
13: 3, # 'η'
25: 3, # 'θ'
5: 3, # 'ι'
11: 3, # 'κ'
16: 2, # 'λ'
10: 3, # 'μ'
6: 0, # 'ν'
30: 0, # 'ξ'
4: 3, # 'ο'
9: 3, # 'π'
8: 0, # 'ρ'
14: 0, # 'ς'
7: 3, # 'σ'
2: 3, # 'τ'
12: 3, # 'υ'
28: 3, # 'φ'
23: 3, # 'χ'
42: 0, # 'ψ'
24: 3, # 'ω'
19: 3, # 'ό'
26: 3, # 'ύ'
27: 2, # 'ώ'
},
2: { # 'τ'
60: 0, # 'e'
55: 2, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 0, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 0, # 'Ε'
40: 0, # 'Η'
52: 0, # 'Θ'
47: 0, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 0, # 'Ο'
35: 0, # 'Π'
48: 0, # 'Ρ'
37: 0, # 'Σ'
33: 0, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 0, # 'Ω'
17: 3, # 'ά'
18: 3, # 'έ'
22: 3, # 'ή'
15: 3, # 'ί'
1: 3, # 'α'
29: 0, # 'β'
20: 0, # 'γ'
21: 0, # 'δ'
3: 3, # 'ε'
32: 2, # 'ζ'
13: 3, # 'η'
25: 0, # 'θ'
5: 3, # 'ι'
11: 2, # 'κ'
16: 2, # 'λ'
10: 3, # 'μ'
6: 0, # 'ν'
30: 0, # 'ξ'
4: 3, # 'ο'
9: 0, # 'π'
8: 3, # 'ρ'
14: 0, # 'ς'
7: 3, # 'σ'
2: 3, # 'τ'
12: 3, # 'υ'
28: 2, # 'φ'
23: 0, # 'χ'
42: 0, # 'ψ'
24: 3, # 'ω'
19: 3, # 'ό'
26: 3, # 'ύ'
27: 3, # 'ώ'
},
12: { # 'υ'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 0, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 0, # 'Ε'
40: 0, # 'Η'
52: 0, # 'Θ'
47: 0, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 0, # 'Ο'
35: 0, # 'Π'
48: 0, # 'Ρ'
37: 0, # 'Σ'
33: 0, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 0, # 'Ω'
17: 2, # 'ά'
18: 2, # 'έ'
22: 3, # 'ή'
15: 2, # 'ί'
1: 3, # 'α'
29: 2, # 'β'
20: 3, # 'γ'
21: 2, # 'δ'
3: 2, # 'ε'
32: 2, # 'ζ'
13: 2, # 'η'
25: 3, # 'θ'
5: 2, # 'ι'
11: 3, # 'κ'
16: 3, # 'λ'
10: 3, # 'μ'
6: 3, # 'ν'
30: 3, # 'ξ'
4: 3, # 'ο'
9: 3, # 'π'
8: 3, # 'ρ'
14: 3, # 'ς'
7: 3, # 'σ'
2: 3, # 'τ'
12: 0, # 'υ'
28: 2, # 'φ'
23: 3, # 'χ'
42: 2, # 'ψ'
24: 2, # 'ω'
19: 2, # 'ό'
26: 0, # 'ύ'
27: 2, # 'ώ'
},
28: { # 'φ'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 0, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 0, # 'Ε'
40: 0, # 'Η'
52: 0, # 'Θ'
47: 0, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 0, # 'Ο'
35: 0, # 'Π'
48: 0, # 'Ρ'
37: 0, # 'Σ'
33: 0, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 0, # 'Ω'
17: 3, # 'ά'
18: 3, # 'έ'
22: 3, # 'ή'
15: 3, # 'ί'
1: 3, # 'α'
29: 0, # 'β'
20: 0, # 'γ'
21: 0, # 'δ'
3: 3, # 'ε'
32: 0, # 'ζ'
13: 2, # 'η'
25: 2, # 'θ'
5: 3, # 'ι'
11: 0, # 'κ'
16: 2, # 'λ'
10: 0, # 'μ'
6: 1, # 'ν'
30: 0, # 'ξ'
4: 3, # 'ο'
9: 0, # 'π'
8: 3, # 'ρ'
14: 0, # 'ς'
7: 0, # 'σ'
2: 3, # 'τ'
12: 3, # 'υ'
28: 1, # 'φ'
23: 0, # 'χ'
42: 0, # 'ψ'
24: 3, # 'ω'
19: 3, # 'ό'
26: 2, # 'ύ'
27: 2, # 'ώ'
},
23: { # 'χ'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 0, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 0, # 'Ε'
40: 0, # 'Η'
52: 0, # 'Θ'
47: 0, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 0, # 'Ο'
35: 0, # 'Π'
48: 0, # 'Ρ'
37: 0, # 'Σ'
33: 0, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 0, # 'Ω'
17: 3, # 'ά'
18: 2, # 'έ'
22: 3, # 'ή'
15: 3, # 'ί'
1: 3, # 'α'
29: 0, # 'β'
20: 0, # 'γ'
21: 0, # 'δ'
3: 3, # 'ε'
32: 0, # 'ζ'
13: 2, # 'η'
25: 2, # 'θ'
5: 3, # 'ι'
11: 0, # 'κ'
16: 2, # 'λ'
10: 2, # 'μ'
6: 3, # 'ν'
30: 0, # 'ξ'
4: 3, # 'ο'
9: 0, # 'π'
8: 3, # 'ρ'
14: 0, # 'ς'
7: 0, # 'σ'
2: 3, # 'τ'
12: 3, # 'υ'
28: 0, # 'φ'
23: 2, # 'χ'
42: 0, # 'ψ'
24: 3, # 'ω'
19: 3, # 'ό'
26: 3, # 'ύ'
27: 3, # 'ώ'
},
42: { # 'ψ'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 0, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 0, # 'Ε'
40: 0, # 'Η'
52: 0, # 'Θ'
47: 0, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 0, # 'Ο'
35: 0, # 'Π'
48: 0, # 'Ρ'
37: 0, # 'Σ'
33: 0, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 0, # 'Ω'
17: 2, # 'ά'
18: 2, # 'έ'
22: 1, # 'ή'
15: 2, # 'ί'
1: 2, # 'α'
29: 0, # 'β'
20: 0, # 'γ'
21: 0, # 'δ'
3: 3, # 'ε'
32: 0, # 'ζ'
13: 3, # 'η'
25: 0, # 'θ'
5: 2, # 'ι'
11: 0, # 'κ'
16: 0, # 'λ'
10: 0, # 'μ'
6: 0, # 'ν'
30: 0, # 'ξ'
4: 2, # 'ο'
9: 0, # 'π'
8: 0, # 'ρ'
14: 0, # 'ς'
7: 0, # 'σ'
2: 2, # 'τ'
12: 1, # 'υ'
28: 0, # 'φ'
23: 0, # 'χ'
42: 0, # 'ψ'
24: 2, # 'ω'
19: 0, # 'ό'
26: 0, # 'ύ'
27: 0, # 'ώ'
},
24: { # 'ω'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 0, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 0, # 'Ε'
40: 0, # 'Η'
52: 0, # 'Θ'
47: 0, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 0, # 'Ο'
35: 0, # 'Π'
48: 0, # 'Ρ'
37: 0, # 'Σ'
33: 0, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 0, # 'Ω'
17: 1, # 'ά'
18: 0, # 'έ'
22: 2, # 'ή'
15: 0, # 'ί'
1: 0, # 'α'
29: 2, # 'β'
20: 3, # 'γ'
21: 2, # 'δ'
3: 0, # 'ε'
32: 0, # 'ζ'
13: 0, # 'η'
25: 3, # 'θ'
5: 2, # 'ι'
11: 0, # 'κ'
16: 2, # 'λ'
10: 3, # 'μ'
6: 3, # 'ν'
30: 0, # 'ξ'
4: 0, # 'ο'
9: 3, # 'π'
8: 3, # 'ρ'
14: 3, # 'ς'
7: 3, # 'σ'
2: 3, # 'τ'
12: 0, # 'υ'
28: 2, # 'φ'
23: 2, # 'χ'
42: 0, # 'ψ'
24: 0, # 'ω'
19: 0, # 'ό'
26: 0, # 'ύ'
27: 0, # 'ώ'
},
19: { # 'ό'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 0, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 0, # 'Ε'
40: 0, # 'Η'
52: 0, # 'Θ'
47: 0, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 0, # 'Ο'
35: 0, # 'Π'
48: 0, # 'Ρ'
37: 0, # 'Σ'
33: 0, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 0, # 'Ω'
17: 0, # 'ά'
18: 0, # 'έ'
22: 0, # 'ή'
15: 0, # 'ί'
1: 0, # 'α'
29: 3, # 'β'
20: 3, # 'γ'
21: 3, # 'δ'
3: 1, # 'ε'
32: 2, # 'ζ'
13: 2, # 'η'
25: 2, # 'θ'
5: 2, # 'ι'
11: 3, # 'κ'
16: 3, # 'λ'
10: 3, # 'μ'
6: 3, # 'ν'
30: 1, # 'ξ'
4: 2, # 'ο'
9: 3, # 'π'
8: 3, # 'ρ'
14: 3, # 'ς'
7: 3, # 'σ'
2: 3, # 'τ'
12: 0, # 'υ'
28: 2, # 'φ'
23: 3, # 'χ'
42: 2, # 'ψ'
24: 0, # 'ω'
19: 0, # 'ό'
26: 0, # 'ύ'
27: 0, # 'ώ'
},
26: { # 'ύ'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 0, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 0, # 'Ε'
40: 0, # 'Η'
52: 0, # 'Θ'
47: 0, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 0, # 'Ο'
35: 0, # 'Π'
48: 0, # 'Ρ'
37: 0, # 'Σ'
33: 0, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 0, # 'Ω'
17: 0, # 'ά'
18: 0, # 'έ'
22: 0, # 'ή'
15: 0, # 'ί'
1: 2, # 'α'
29: 2, # 'β'
20: 2, # 'γ'
21: 1, # 'δ'
3: 3, # 'ε'
32: 0, # 'ζ'
13: 2, # 'η'
25: 3, # 'θ'
5: 0, # 'ι'
11: 3, # 'κ'
16: 3, # 'λ'
10: 3, # 'μ'
6: 3, # 'ν'
30: 2, # 'ξ'
4: 3, # 'ο'
9: 3, # 'π'
8: 3, # 'ρ'
14: 3, # 'ς'
7: 3, # 'σ'
2: 3, # 'τ'
12: 0, # 'υ'
28: 2, # 'φ'
23: 2, # 'χ'
42: 2, # 'ψ'
24: 2, # 'ω'
19: 0, # 'ό'
26: 0, # 'ύ'
27: 0, # 'ώ'
},
27: { # 'ώ'
60: 0, # 'e'
55: 0, # 'o'
58: 0, # 't'
36: 0, # '·'
61: 0, # 'Ά'
46: 0, # 'Έ'
54: 0, # 'Ό'
31: 0, # 'Α'
51: 0, # 'Β'
43: 0, # 'Γ'
41: 0, # 'Δ'
34: 0, # 'Ε'
40: 0, # 'Η'
52: 0, # 'Θ'
47: 0, # 'Ι'
44: 0, # 'Κ'
53: 0, # 'Λ'
38: 0, # 'Μ'
49: 0, # 'Ν'
59: 0, # 'Ξ'
39: 0, # 'Ο'
35: 0, # 'Π'
48: 0, # 'Ρ'
37: 0, # 'Σ'
33: 0, # 'Τ'
45: 0, # 'Υ'
56: 0, # 'Φ'
50: 0, # 'Χ'
57: 0, # 'Ω'
17: 0, # 'ά'
18: 0, # 'έ'
22: 0, # 'ή'
15: 0, # 'ί'
1: 0, # 'α'
29: 1, # 'β'
20: 0, # 'γ'
21: 3, # 'δ'
3: 0, # 'ε'
32: 0, # 'ζ'
13: 1, # 'η'
25: 2, # 'θ'
5: 2, # 'ι'
11: 0, # 'κ'
16: 2, # 'λ'
10: 3, # 'μ'
6: 3, # 'ν'
30: 1, # 'ξ'
4: 0, # 'ο'
9: 2, # 'π'
8: 3, # 'ρ'
14: 3, # 'ς'
7: 3, # 'σ'
2: 3, # 'τ'
12: 0, # 'υ'
28: 1, # 'φ'
23: 1, # 'χ'
42: 0, # 'ψ'
24: 0, # 'ω'
19: 0, # 'ό'
26: 0, # 'ύ'
27: 0, # 'ώ'
},
}
# 255: Undefined characters that did not exist in training text
# 254: Carriage/Return
# 253: symbol (punctuation) that does not belong to word
# 252: 0 - 9
# 251: Control characters
# Character Mapping Table(s):
WINDOWS_1253_GREEK_CHAR_TO_ORDER = {
0: 255, # '\x00'
1: 255, # '\x01'
2: 255, # '\x02'
3: 255, # '\x03'
4: 255, # '\x04'
5: 255, # '\x05'
6: 255, # '\x06'
7: 255, # '\x07'
8: 255, # '\x08'
9: 255, # '\t'
10: 254, # '\n'
11: 255, # '\x0b'
12: 255, # '\x0c'
13: 254, # '\r'
14: 255, # '\x0e'
15: 255, # '\x0f'
16: 255, # '\x10'
17: 255, # '\x11'
18: 255, # '\x12'
19: 255, # '\x13'
20: 255, # '\x14'
21: 255, # '\x15'
22: 255, # '\x16'
23: 255, # '\x17'
24: 255, # '\x18'
25: 255, # '\x19'
26: 255, # '\x1a'
27: 255, # '\x1b'
28: 255, # '\x1c'
29: 255, # '\x1d'
30: 255, # '\x1e'
31: 255, # '\x1f'
32: 253, # ' '
33: 253, # '!'
34: 253, # '"'
35: 253, # '#'
36: 253, # '$'
37: 253, # '%'
38: 253, # '&'
39: 253, # "'"
40: 253, # '('
41: 253, # ')'
42: 253, # '*'
43: 253, # '+'
44: 253, # ','
45: 253, # '-'
46: 253, # '.'
47: 253, # '/'
48: 252, # '0'
49: 252, # '1'
50: 252, # '2'
51: 252, # '3'
52: 252, # '4'
53: 252, # '5'
54: 252, # '6'
55: 252, # '7'
56: 252, # '8'
57: 252, # '9'
58: 253, # ':'
59: 253, # ';'
60: 253, # '<'
61: 253, # '='
62: 253, # '>'
63: 253, # '?'
64: 253, # '@'
65: 82, # 'A'
66: 100, # 'B'
67: 104, # 'C'
68: 94, # 'D'
69: 98, # 'E'
70: 101, # 'F'
71: 116, # 'G'
72: 102, # 'H'
73: 111, # 'I'
74: 187, # 'J'
75: 117, # 'K'
76: 92, # 'L'
77: 88, # 'M'
78: 113, # 'N'
79: 85, # 'O'
80: 79, # 'P'
81: 118, # 'Q'
82: 105, # 'R'
83: 83, # 'S'
84: 67, # 'T'
85: 114, # 'U'
86: 119, # 'V'
87: 95, # 'W'
88: 99, # 'X'
89: 109, # 'Y'
90: 188, # 'Z'
91: 253, # '['
92: 253, # '\\'
93: 253, # ']'
94: 253, # '^'
95: 253, # '_'
96: 253, # '`'
97: 72, # 'a'
98: 70, # 'b'
99: 80, # 'c'
100: 81, # 'd'
101: 60, # 'e'
102: 96, # 'f'
103: 93, # 'g'
104: 89, # 'h'
105: 68, # 'i'
106: 120, # 'j'
107: 97, # 'k'
108: 77, # 'l'
109: 86, # 'm'
110: 69, # 'n'
111: 55, # 'o'
112: 78, # 'p'
113: 115, # 'q'
114: 65, # 'r'
115: 66, # 's'
116: 58, # 't'
117: 76, # 'u'
118: 106, # 'v'
119: 103, # 'w'
120: 87, # 'x'
121: 107, # 'y'
122: 112, # 'z'
123: 253, # '{'
124: 253, # '|'
125: 253, # '}'
126: 253, # '~'
127: 253, # '\x7f'
128: 255, # '€'
129: 255, # None
130: 255, # '‚'
131: 255, # 'ƒ'
132: 255, # '„'
133: 255, # '…'
134: 255, # '†'
135: 255, # '‡'
136: 255, # None
137: 255, # '‰'
138: 255, # None
139: 255, # '‹'
140: 255, # None
141: 255, # None
142: 255, # None
143: 255, # None
144: 255, # None
145: 255, # '‘'
146: 255, # '’'
147: 255, # '“'
148: 255, # '”'
149: 255, # '•'
150: 255, # '–'
151: 255, # '—'
152: 255, # None
153: 255, # '™'
154: 255, # None
155: 255, # '›'
156: 255, # None
157: 255, # None
158: 255, # None
159: 255, # None
160: 253, # '\xa0'
161: 233, # '΅'
162: 61, # 'Ά'
163: 253, # '£'
164: 253, # '¤'
165: 253, # '¥'
166: 253, # '¦'
167: 253, # '§'
168: 253, # '¨'
169: 253, # '©'
170: 253, # None
171: 253, # '«'
172: 253, # '¬'
173: 74, # '\xad'
174: 253, # '®'
175: 253, # '―'
176: 253, # '°'
177: 253, # '±'
178: 253, # '²'
179: 253, # '³'
180: 247, # '΄'
181: 253, # 'µ'
182: 253, # '¶'
183: 36, # '·'
184: 46, # 'Έ'
185: 71, # 'Ή'
186: 73, # 'Ί'
187: 253, # '»'
188: 54, # 'Ό'
189: 253, # '½'
190: 108, # 'Ύ'
191: 123, # 'Ώ'
192: 110, # 'ΐ'
193: 31, # 'Α'
194: 51, # 'Β'
195: 43, # 'Γ'
196: 41, # 'Δ'
197: 34, # 'Ε'
198: 91, # 'Ζ'
199: 40, # 'Η'
200: 52, # 'Θ'
201: 47, # 'Ι'
202: 44, # 'Κ'
203: 53, # 'Λ'
204: 38, # 'Μ'
205: 49, # 'Ν'
206: 59, # 'Ξ'
207: 39, # 'Ο'
208: 35, # 'Π'
209: 48, # 'Ρ'
210: 250, # None
211: 37, # 'Σ'
212: 33, # 'Τ'
213: 45, # 'Υ'
214: 56, # 'Φ'
215: 50, # 'Χ'
216: 84, # 'Ψ'
217: 57, # 'Ω'
218: 120, # 'Ϊ'
219: 121, # 'Ϋ'
220: 17, # 'ά'
221: 18, # 'έ'
222: 22, # 'ή'
223: 15, # 'ί'
224: 124, # 'ΰ'
225: 1, # 'α'
226: 29, # 'β'
227: 20, # 'γ'
228: 21, # 'δ'
229: 3, # 'ε'
230: 32, # 'ζ'
231: 13, # 'η'
232: 25, # 'θ'
233: 5, # 'ι'
234: 11, # 'κ'
235: 16, # 'λ'
236: 10, # 'μ'
237: 6, # 'ν'
238: 30, # 'ξ'
239: 4, # 'ο'
240: 9, # 'π'
241: 8, # 'ρ'
242: 14, # 'ς'
243: 7, # 'σ'
244: 2, # 'τ'
245: 12, # 'υ'
246: 28, # 'φ'
247: 23, # 'χ'
248: 42, # 'ψ'
249: 24, # 'ω'
250: 64, # 'ϊ'
251: 75, # 'ϋ'
252: 19, # 'ό'
253: 26, # 'ύ'
254: 27, # 'ώ'
255: 253, # None
}
WINDOWS_1253_GREEK_MODEL = SingleByteCharSetModel(
charset_name="windows-1253",
language="Greek",
char_to_order_map=WINDOWS_1253_GREEK_CHAR_TO_ORDER,
language_model=GREEK_LANG_MODEL,
typical_positive_ratio=0.982851,
keep_ascii_letters=False,
alphabet="ΆΈΉΊΌΎΏΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩάέήίαβγδεζηθικλμνξοπρςστυφχψωόύώ",
)
ISO_8859_7_GREEK_CHAR_TO_ORDER = {
0: 255, # '\x00'
1: 255, # '\x01'
2: 255, # '\x02'
3: 255, # '\x03'
4: 255, # '\x04'
5: 255, # '\x05'
6: 255, # '\x06'
7: 255, # '\x07'
8: 255, # '\x08'
9: 255, # '\t'
10: 254, # '\n'
11: 255, # '\x0b'
12: 255, # '\x0c'
13: 254, # '\r'
14: 255, # '\x0e'
15: 255, # '\x0f'
16: 255, # '\x10'
17: 255, # '\x11'
18: 255, # '\x12'
19: 255, # '\x13'
20: 255, # '\x14'
21: 255, # '\x15'
22: 255, # '\x16'
23: 255, # '\x17'
24: 255, # '\x18'
25: 255, # '\x19'
26: 255, # '\x1a'
27: 255, # '\x1b'
28: 255, # '\x1c'
29: 255, # '\x1d'
30: 255, # '\x1e'
31: 255, # '\x1f'
32: 253, # ' '
33: 253, # '!'
34: 253, # '"'
35: 253, # '#'
36: 253, # '$'
37: 253, # '%'
38: 253, # '&'
39: 253, # "'"
40: 253, # '('
41: 253, # ')'
42: 253, # '*'
43: 253, # '+'
44: 253, # ','
45: 253, # '-'
46: 253, # '.'
47: 253, # '/'
48: 252, # '0'
49: 252, # '1'
50: 252, # '2'
51: 252, # '3'
52: 252, # '4'
53: 252, # '5'
54: 252, # '6'
55: 252, # '7'
56: 252, # '8'
57: 252, # '9'
58: 253, # ':'
59: 253, # ';'
60: 253, # '<'
61: 253, # '='
62: 253, # '>'
63: 253, # '?'
64: 253, # '@'
65: 82, # 'A'
66: 100, # 'B'
67: 104, # 'C'
68: 94, # 'D'
69: 98, # 'E'
70: 101, # 'F'
71: 116, # 'G'
72: 102, # 'H'
73: 111, # 'I'
74: 187, # 'J'
75: 117, # 'K'
76: 92, # 'L'
77: 88, # 'M'
78: 113, # 'N'
79: 85, # 'O'
80: 79, # 'P'
81: 118, # 'Q'
82: 105, # 'R'
83: 83, # 'S'
84: 67, # 'T'
85: 114, # 'U'
86: 119, # 'V'
87: 95, # 'W'
88: 99, # 'X'
89: 109, # 'Y'
90: 188, # 'Z'
91: 253, # '['
92: 253, # '\\'
93: 253, # ']'
94: 253, # '^'
95: 253, # '_'
96: 253, # '`'
97: 72, # 'a'
98: 70, # 'b'
99: 80, # 'c'
100: 81, # 'd'
101: 60, # 'e'
102: 96, # 'f'
103: 93, # 'g'
104: 89, # 'h'
105: 68, # 'i'
106: 120, # 'j'
107: 97, # 'k'
108: 77, # 'l'
109: 86, # 'm'
110: 69, # 'n'
111: 55, # 'o'
112: 78, # 'p'
113: 115, # 'q'
114: 65, # 'r'
115: 66, # 's'
116: 58, # 't'
117: 76, # 'u'
118: 106, # 'v'
119: 103, # 'w'
120: 87, # 'x'
121: 107, # 'y'
122: 112, # 'z'
123: 253, # '{'
124: 253, # '|'
125: 253, # '}'
126: 253, # '~'
127: 253, # '\x7f'
128: 255, # '\x80'
129: 255, # '\x81'
130: 255, # '\x82'
131: 255, # '\x83'
132: 255, # '\x84'
133: 255, # '\x85'
134: 255, # '\x86'
135: 255, # '\x87'
136: 255, # '\x88'
137: 255, # '\x89'
138: 255, # '\x8a'
139: 255, # '\x8b'
140: 255, # '\x8c'
141: 255, # '\x8d'
142: 255, # '\x8e'
143: 255, # '\x8f'
144: 255, # '\x90'
145: 255, # '\x91'
146: 255, # '\x92'
147: 255, # '\x93'
148: 255, # '\x94'
149: 255, # '\x95'
150: 255, # '\x96'
151: 255, # '\x97'
152: 255, # '\x98'
153: 255, # '\x99'
154: 255, # '\x9a'
155: 255, # '\x9b'
156: 255, # '\x9c'
157: 255, # '\x9d'
158: 255, # '\x9e'
159: 255, # '\x9f'
160: 253, # '\xa0'
161: 233, # '‘'
162: 90, # '’'
163: 253, # '£'
164: 253, # '€'
165: 253, # '₯'
166: 253, # '¦'
167: 253, # '§'
168: 253, # '¨'
169: 253, # '©'
170: 253, # 'ͺ'
171: 253, # '«'
172: 253, # '¬'
173: 74, # '\xad'
174: 253, # None
175: 253, # '―'
176: 253, # '°'
177: 253, # '±'
178: 253, # '²'
179: 253, # '³'
180: 247, # '΄'
181: 248, # '΅'
182: 61, # 'Ά'
183: 36, # '·'
184: 46, # 'Έ'
185: 71, # 'Ή'
186: 73, # 'Ί'
187: 253, # '»'
188: 54, # 'Ό'
189: 253, # '½'
190: 108, # 'Ύ'
191: 123, # 'Ώ'
192: 110, # 'ΐ'
193: 31, # 'Α'
194: 51, # 'Β'
195: 43, # 'Γ'
196: 41, # 'Δ'
197: 34, # 'Ε'
198: 91, # 'Ζ'
199: 40, # 'Η'
200: 52, # 'Θ'
201: 47, # 'Ι'
202: 44, # 'Κ'
203: 53, # 'Λ'
204: 38, # 'Μ'
205: 49, # 'Ν'
206: 59, # 'Ξ'
207: 39, # 'Ο'
208: 35, # 'Π'
209: 48, # 'Ρ'
210: 250, # None
211: 37, # 'Σ'
212: 33, # 'Τ'
213: 45, # 'Υ'
214: 56, # 'Φ'
215: 50, # 'Χ'
216: 84, # 'Ψ'
217: 57, # 'Ω'
218: 120, # 'Ϊ'
219: 121, # 'Ϋ'
220: 17, # 'ά'
221: 18, # 'έ'
222: 22, # 'ή'
223: 15, # 'ί'
224: 124, # 'ΰ'
225: 1, # 'α'
226: 29, # 'β'
227: 20, # 'γ'
228: 21, # 'δ'
229: 3, # 'ε'
230: 32, # 'ζ'
231: 13, # 'η'
232: 25, # 'θ'
233: 5, # 'ι'
234: 11, # 'κ'
235: 16, # 'λ'
236: 10, # 'μ'
237: 6, # 'ν'
238: 30, # 'ξ'
239: 4, # 'ο'
240: 9, # 'π'
241: 8, # 'ρ'
242: 14, # 'ς'
243: 7, # 'σ'
244: 2, # 'τ'
245: 12, # 'υ'
246: 28, # 'φ'
247: 23, # 'χ'
248: 42, # 'ψ'
249: 24, # 'ω'
250: 64, # 'ϊ'
251: 75, # 'ϋ'
252: 19, # 'ό'
253: 26, # 'ύ'
254: 27, # 'ώ'
255: 253, # None
}
ISO_8859_7_GREEK_MODEL = SingleByteCharSetModel(
charset_name="ISO-8859-7",
language="Greek",
char_to_order_map=ISO_8859_7_GREEK_CHAR_TO_ORDER,
language_model=GREEK_LANG_MODEL,
typical_positive_ratio=0.982851,
keep_ascii_letters=False,
alphabet="ΆΈΉΊΌΎΏΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩάέήίαβγδεζηθικλμνξοπρςστυφχψωόύώ",
)
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/chardet/langgreekmodel.py
|
Python
|
mit
| 98,484 |
from pip._vendor.chardet.sbcharsetprober import SingleByteCharSetModel
# 3: Positive
# 2: Likely
# 1: Unlikely
# 0: Negative
HEBREW_LANG_MODEL = {
50: { # 'a'
50: 0, # 'a'
60: 1, # 'c'
61: 1, # 'd'
42: 1, # 'e'
53: 1, # 'i'
56: 2, # 'l'
54: 2, # 'n'
49: 0, # 'o'
51: 2, # 'r'
43: 1, # 's'
44: 2, # 't'
63: 1, # 'u'
34: 0, # '\xa0'
55: 0, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 0, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 0, # 'ִ'
37: 0, # 'ֵ'
36: 0, # 'ֶ'
31: 0, # 'ַ'
29: 0, # 'ָ'
35: 0, # 'ֹ'
62: 0, # 'ֻ'
28: 0, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 0, # 'א'
8: 0, # 'ב'
20: 0, # 'ג'
16: 0, # 'ד'
3: 1, # 'ה'
2: 0, # 'ו'
24: 0, # 'ז'
14: 0, # 'ח'
22: 0, # 'ט'
1: 0, # 'י'
25: 0, # 'ך'
15: 0, # 'כ'
4: 0, # 'ל'
11: 0, # 'ם'
6: 1, # 'מ'
23: 0, # 'ן'
12: 0, # 'נ'
19: 0, # 'ס'
13: 0, # 'ע'
26: 0, # 'ף'
18: 0, # 'פ'
27: 0, # 'ץ'
21: 0, # 'צ'
17: 1, # 'ק'
7: 0, # 'ר'
10: 1, # 'ש'
5: 0, # 'ת'
32: 0, # '–'
52: 1, # '’'
47: 0, # '“'
46: 1, # '”'
58: 0, # '†'
40: 1, # '…'
},
60: { # 'c'
50: 1, # 'a'
60: 1, # 'c'
61: 0, # 'd'
42: 1, # 'e'
53: 1, # 'i'
56: 1, # 'l'
54: 0, # 'n'
49: 1, # 'o'
51: 1, # 'r'
43: 1, # 's'
44: 2, # 't'
63: 1, # 'u'
34: 0, # '\xa0'
55: 0, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 0, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 0, # 'ִ'
37: 0, # 'ֵ'
36: 0, # 'ֶ'
31: 0, # 'ַ'
29: 0, # 'ָ'
35: 0, # 'ֹ'
62: 0, # 'ֻ'
28: 0, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 1, # 'א'
8: 0, # 'ב'
20: 0, # 'ג'
16: 0, # 'ד'
3: 1, # 'ה'
2: 0, # 'ו'
24: 0, # 'ז'
14: 0, # 'ח'
22: 0, # 'ט'
1: 0, # 'י'
25: 0, # 'ך'
15: 0, # 'כ'
4: 0, # 'ל'
11: 0, # 'ם'
6: 1, # 'מ'
23: 0, # 'ן'
12: 1, # 'נ'
19: 0, # 'ס'
13: 0, # 'ע'
26: 0, # 'ף'
18: 0, # 'פ'
27: 0, # 'ץ'
21: 0, # 'צ'
17: 0, # 'ק'
7: 0, # 'ר'
10: 0, # 'ש'
5: 0, # 'ת'
32: 0, # '–'
52: 0, # '’'
47: 0, # '“'
46: 1, # '”'
58: 0, # '†'
40: 1, # '…'
},
61: { # 'd'
50: 1, # 'a'
60: 0, # 'c'
61: 1, # 'd'
42: 1, # 'e'
53: 1, # 'i'
56: 1, # 'l'
54: 1, # 'n'
49: 2, # 'o'
51: 1, # 'r'
43: 1, # 's'
44: 0, # 't'
63: 1, # 'u'
34: 0, # '\xa0'
55: 0, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 0, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 0, # 'ִ'
37: 0, # 'ֵ'
36: 0, # 'ֶ'
31: 0, # 'ַ'
29: 0, # 'ָ'
35: 0, # 'ֹ'
62: 0, # 'ֻ'
28: 0, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 0, # 'א'
8: 0, # 'ב'
20: 0, # 'ג'
16: 0, # 'ד'
3: 1, # 'ה'
2: 0, # 'ו'
24: 0, # 'ז'
14: 0, # 'ח'
22: 0, # 'ט'
1: 0, # 'י'
25: 0, # 'ך'
15: 0, # 'כ'
4: 0, # 'ל'
11: 0, # 'ם'
6: 0, # 'מ'
23: 0, # 'ן'
12: 0, # 'נ'
19: 0, # 'ס'
13: 0, # 'ע'
26: 0, # 'ף'
18: 0, # 'פ'
27: 0, # 'ץ'
21: 0, # 'צ'
17: 0, # 'ק'
7: 0, # 'ר'
10: 0, # 'ש'
5: 0, # 'ת'
32: 1, # '–'
52: 1, # '’'
47: 0, # '“'
46: 1, # '”'
58: 0, # '†'
40: 1, # '…'
},
42: { # 'e'
50: 1, # 'a'
60: 1, # 'c'
61: 2, # 'd'
42: 1, # 'e'
53: 1, # 'i'
56: 2, # 'l'
54: 2, # 'n'
49: 1, # 'o'
51: 2, # 'r'
43: 2, # 's'
44: 2, # 't'
63: 1, # 'u'
34: 1, # '\xa0'
55: 0, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 0, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 0, # 'ִ'
37: 0, # 'ֵ'
36: 0, # 'ֶ'
31: 0, # 'ַ'
29: 0, # 'ָ'
35: 0, # 'ֹ'
62: 0, # 'ֻ'
28: 0, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 0, # 'א'
8: 0, # 'ב'
20: 0, # 'ג'
16: 0, # 'ד'
3: 0, # 'ה'
2: 0, # 'ו'
24: 0, # 'ז'
14: 0, # 'ח'
22: 0, # 'ט'
1: 0, # 'י'
25: 0, # 'ך'
15: 0, # 'כ'
4: 0, # 'ל'
11: 0, # 'ם'
6: 0, # 'מ'
23: 0, # 'ן'
12: 0, # 'נ'
19: 0, # 'ס'
13: 0, # 'ע'
26: 0, # 'ף'
18: 1, # 'פ'
27: 0, # 'ץ'
21: 0, # 'צ'
17: 0, # 'ק'
7: 0, # 'ר'
10: 0, # 'ש'
5: 0, # 'ת'
32: 1, # '–'
52: 2, # '’'
47: 0, # '“'
46: 1, # '”'
58: 0, # '†'
40: 1, # '…'
},
53: { # 'i'
50: 1, # 'a'
60: 2, # 'c'
61: 1, # 'd'
42: 1, # 'e'
53: 0, # 'i'
56: 1, # 'l'
54: 2, # 'n'
49: 2, # 'o'
51: 1, # 'r'
43: 2, # 's'
44: 2, # 't'
63: 1, # 'u'
34: 0, # '\xa0'
55: 1, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 0, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 0, # 'ִ'
37: 0, # 'ֵ'
36: 0, # 'ֶ'
31: 0, # 'ַ'
29: 0, # 'ָ'
35: 0, # 'ֹ'
62: 0, # 'ֻ'
28: 0, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 0, # 'א'
8: 0, # 'ב'
20: 0, # 'ג'
16: 0, # 'ד'
3: 0, # 'ה'
2: 0, # 'ו'
24: 0, # 'ז'
14: 0, # 'ח'
22: 0, # 'ט'
1: 0, # 'י'
25: 0, # 'ך'
15: 0, # 'כ'
4: 0, # 'ל'
11: 0, # 'ם'
6: 0, # 'מ'
23: 0, # 'ן'
12: 0, # 'נ'
19: 0, # 'ס'
13: 0, # 'ע'
26: 0, # 'ף'
18: 0, # 'פ'
27: 0, # 'ץ'
21: 0, # 'צ'
17: 0, # 'ק'
7: 0, # 'ר'
10: 0, # 'ש'
5: 0, # 'ת'
32: 0, # '–'
52: 1, # '’'
47: 0, # '“'
46: 0, # '”'
58: 0, # '†'
40: 0, # '…'
},
56: { # 'l'
50: 1, # 'a'
60: 1, # 'c'
61: 1, # 'd'
42: 2, # 'e'
53: 2, # 'i'
56: 2, # 'l'
54: 1, # 'n'
49: 1, # 'o'
51: 0, # 'r'
43: 1, # 's'
44: 1, # 't'
63: 1, # 'u'
34: 0, # '\xa0'
55: 0, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 0, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 0, # 'ִ'
37: 0, # 'ֵ'
36: 0, # 'ֶ'
31: 0, # 'ַ'
29: 0, # 'ָ'
35: 0, # 'ֹ'
62: 0, # 'ֻ'
28: 0, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 0, # 'א'
8: 0, # 'ב'
20: 0, # 'ג'
16: 0, # 'ד'
3: 0, # 'ה'
2: 0, # 'ו'
24: 0, # 'ז'
14: 0, # 'ח'
22: 0, # 'ט'
1: 0, # 'י'
25: 0, # 'ך'
15: 0, # 'כ'
4: 0, # 'ל'
11: 0, # 'ם'
6: 0, # 'מ'
23: 0, # 'ן'
12: 0, # 'נ'
19: 0, # 'ס'
13: 0, # 'ע'
26: 0, # 'ף'
18: 0, # 'פ'
27: 0, # 'ץ'
21: 0, # 'צ'
17: 0, # 'ק'
7: 0, # 'ר'
10: 0, # 'ש'
5: 0, # 'ת'
32: 0, # '–'
52: 1, # '’'
47: 0, # '“'
46: 1, # '”'
58: 0, # '†'
40: 1, # '…'
},
54: { # 'n'
50: 1, # 'a'
60: 1, # 'c'
61: 1, # 'd'
42: 1, # 'e'
53: 1, # 'i'
56: 1, # 'l'
54: 1, # 'n'
49: 1, # 'o'
51: 0, # 'r'
43: 1, # 's'
44: 2, # 't'
63: 1, # 'u'
34: 0, # '\xa0'
55: 0, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 0, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 0, # 'ִ'
37: 0, # 'ֵ'
36: 0, # 'ֶ'
31: 0, # 'ַ'
29: 0, # 'ָ'
35: 0, # 'ֹ'
62: 0, # 'ֻ'
28: 0, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 0, # 'א'
8: 0, # 'ב'
20: 0, # 'ג'
16: 0, # 'ד'
3: 1, # 'ה'
2: 0, # 'ו'
24: 0, # 'ז'
14: 0, # 'ח'
22: 0, # 'ט'
1: 0, # 'י'
25: 0, # 'ך'
15: 0, # 'כ'
4: 0, # 'ל'
11: 0, # 'ם'
6: 0, # 'מ'
23: 0, # 'ן'
12: 0, # 'נ'
19: 0, # 'ס'
13: 0, # 'ע'
26: 0, # 'ף'
18: 0, # 'פ'
27: 0, # 'ץ'
21: 0, # 'צ'
17: 0, # 'ק'
7: 0, # 'ר'
10: 0, # 'ש'
5: 0, # 'ת'
32: 0, # '–'
52: 2, # '’'
47: 0, # '“'
46: 1, # '”'
58: 0, # '†'
40: 1, # '…'
},
49: { # 'o'
50: 1, # 'a'
60: 1, # 'c'
61: 1, # 'd'
42: 1, # 'e'
53: 1, # 'i'
56: 1, # 'l'
54: 2, # 'n'
49: 1, # 'o'
51: 2, # 'r'
43: 1, # 's'
44: 1, # 't'
63: 1, # 'u'
34: 0, # '\xa0'
55: 0, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 0, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 0, # 'ִ'
37: 0, # 'ֵ'
36: 0, # 'ֶ'
31: 0, # 'ַ'
29: 0, # 'ָ'
35: 0, # 'ֹ'
62: 0, # 'ֻ'
28: 0, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 0, # 'א'
8: 0, # 'ב'
20: 0, # 'ג'
16: 0, # 'ד'
3: 0, # 'ה'
2: 0, # 'ו'
24: 0, # 'ז'
14: 0, # 'ח'
22: 0, # 'ט'
1: 0, # 'י'
25: 0, # 'ך'
15: 0, # 'כ'
4: 0, # 'ל'
11: 0, # 'ם'
6: 0, # 'מ'
23: 0, # 'ן'
12: 0, # 'נ'
19: 0, # 'ס'
13: 0, # 'ע'
26: 0, # 'ף'
18: 0, # 'פ'
27: 0, # 'ץ'
21: 0, # 'צ'
17: 0, # 'ק'
7: 0, # 'ר'
10: 0, # 'ש'
5: 0, # 'ת'
32: 0, # '–'
52: 1, # '’'
47: 0, # '“'
46: 1, # '”'
58: 0, # '†'
40: 1, # '…'
},
51: { # 'r'
50: 2, # 'a'
60: 1, # 'c'
61: 1, # 'd'
42: 2, # 'e'
53: 1, # 'i'
56: 1, # 'l'
54: 1, # 'n'
49: 2, # 'o'
51: 1, # 'r'
43: 1, # 's'
44: 1, # 't'
63: 1, # 'u'
34: 0, # '\xa0'
55: 0, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 0, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 0, # 'ִ'
37: 0, # 'ֵ'
36: 0, # 'ֶ'
31: 0, # 'ַ'
29: 0, # 'ָ'
35: 0, # 'ֹ'
62: 0, # 'ֻ'
28: 0, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 0, # 'א'
8: 0, # 'ב'
20: 0, # 'ג'
16: 0, # 'ד'
3: 0, # 'ה'
2: 0, # 'ו'
24: 0, # 'ז'
14: 0, # 'ח'
22: 0, # 'ט'
1: 0, # 'י'
25: 0, # 'ך'
15: 0, # 'כ'
4: 0, # 'ל'
11: 0, # 'ם'
6: 0, # 'מ'
23: 0, # 'ן'
12: 0, # 'נ'
19: 0, # 'ס'
13: 0, # 'ע'
26: 0, # 'ף'
18: 0, # 'פ'
27: 0, # 'ץ'
21: 0, # 'צ'
17: 0, # 'ק'
7: 0, # 'ר'
10: 0, # 'ש'
5: 0, # 'ת'
32: 0, # '–'
52: 2, # '’'
47: 0, # '“'
46: 1, # '”'
58: 0, # '†'
40: 1, # '…'
},
43: { # 's'
50: 1, # 'a'
60: 1, # 'c'
61: 0, # 'd'
42: 2, # 'e'
53: 1, # 'i'
56: 1, # 'l'
54: 1, # 'n'
49: 1, # 'o'
51: 1, # 'r'
43: 1, # 's'
44: 2, # 't'
63: 1, # 'u'
34: 0, # '\xa0'
55: 0, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 0, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 0, # 'ִ'
37: 0, # 'ֵ'
36: 0, # 'ֶ'
31: 0, # 'ַ'
29: 0, # 'ָ'
35: 0, # 'ֹ'
62: 0, # 'ֻ'
28: 0, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 0, # 'א'
8: 0, # 'ב'
20: 0, # 'ג'
16: 0, # 'ד'
3: 0, # 'ה'
2: 0, # 'ו'
24: 0, # 'ז'
14: 0, # 'ח'
22: 0, # 'ט'
1: 0, # 'י'
25: 0, # 'ך'
15: 0, # 'כ'
4: 0, # 'ל'
11: 0, # 'ם'
6: 0, # 'מ'
23: 0, # 'ן'
12: 0, # 'נ'
19: 0, # 'ס'
13: 0, # 'ע'
26: 0, # 'ף'
18: 0, # 'פ'
27: 0, # 'ץ'
21: 0, # 'צ'
17: 0, # 'ק'
7: 0, # 'ר'
10: 0, # 'ש'
5: 0, # 'ת'
32: 0, # '–'
52: 1, # '’'
47: 0, # '“'
46: 2, # '”'
58: 0, # '†'
40: 2, # '…'
},
44: { # 't'
50: 1, # 'a'
60: 1, # 'c'
61: 0, # 'd'
42: 2, # 'e'
53: 2, # 'i'
56: 1, # 'l'
54: 0, # 'n'
49: 1, # 'o'
51: 1, # 'r'
43: 1, # 's'
44: 1, # 't'
63: 1, # 'u'
34: 1, # '\xa0'
55: 0, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 0, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 0, # 'ִ'
37: 0, # 'ֵ'
36: 0, # 'ֶ'
31: 0, # 'ַ'
29: 0, # 'ָ'
35: 0, # 'ֹ'
62: 0, # 'ֻ'
28: 0, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 0, # 'א'
8: 0, # 'ב'
20: 0, # 'ג'
16: 0, # 'ד'
3: 0, # 'ה'
2: 0, # 'ו'
24: 0, # 'ז'
14: 0, # 'ח'
22: 0, # 'ט'
1: 0, # 'י'
25: 0, # 'ך'
15: 0, # 'כ'
4: 0, # 'ל'
11: 0, # 'ם'
6: 0, # 'מ'
23: 0, # 'ן'
12: 0, # 'נ'
19: 0, # 'ס'
13: 0, # 'ע'
26: 0, # 'ף'
18: 0, # 'פ'
27: 0, # 'ץ'
21: 0, # 'צ'
17: 0, # 'ק'
7: 0, # 'ר'
10: 0, # 'ש'
5: 0, # 'ת'
32: 0, # '–'
52: 2, # '’'
47: 0, # '“'
46: 1, # '”'
58: 0, # '†'
40: 1, # '…'
},
63: { # 'u'
50: 1, # 'a'
60: 1, # 'c'
61: 1, # 'd'
42: 1, # 'e'
53: 1, # 'i'
56: 1, # 'l'
54: 1, # 'n'
49: 0, # 'o'
51: 1, # 'r'
43: 2, # 's'
44: 1, # 't'
63: 0, # 'u'
34: 0, # '\xa0'
55: 0, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 0, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 0, # 'ִ'
37: 0, # 'ֵ'
36: 0, # 'ֶ'
31: 0, # 'ַ'
29: 0, # 'ָ'
35: 0, # 'ֹ'
62: 0, # 'ֻ'
28: 0, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 0, # 'א'
8: 0, # 'ב'
20: 0, # 'ג'
16: 0, # 'ד'
3: 0, # 'ה'
2: 0, # 'ו'
24: 0, # 'ז'
14: 0, # 'ח'
22: 0, # 'ט'
1: 0, # 'י'
25: 0, # 'ך'
15: 0, # 'כ'
4: 0, # 'ל'
11: 0, # 'ם'
6: 0, # 'מ'
23: 0, # 'ן'
12: 0, # 'נ'
19: 0, # 'ס'
13: 0, # 'ע'
26: 0, # 'ף'
18: 0, # 'פ'
27: 0, # 'ץ'
21: 0, # 'צ'
17: 0, # 'ק'
7: 0, # 'ר'
10: 0, # 'ש'
5: 0, # 'ת'
32: 0, # '–'
52: 1, # '’'
47: 0, # '“'
46: 0, # '”'
58: 0, # '†'
40: 0, # '…'
},
34: { # '\xa0'
50: 1, # 'a'
60: 0, # 'c'
61: 1, # 'd'
42: 0, # 'e'
53: 1, # 'i'
56: 0, # 'l'
54: 1, # 'n'
49: 1, # 'o'
51: 0, # 'r'
43: 1, # 's'
44: 1, # 't'
63: 0, # 'u'
34: 2, # '\xa0'
55: 0, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 0, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 0, # 'ִ'
37: 0, # 'ֵ'
36: 0, # 'ֶ'
31: 0, # 'ַ'
29: 0, # 'ָ'
35: 0, # 'ֹ'
62: 0, # 'ֻ'
28: 0, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 2, # 'א'
8: 1, # 'ב'
20: 1, # 'ג'
16: 1, # 'ד'
3: 1, # 'ה'
2: 1, # 'ו'
24: 1, # 'ז'
14: 1, # 'ח'
22: 1, # 'ט'
1: 2, # 'י'
25: 0, # 'ך'
15: 1, # 'כ'
4: 1, # 'ל'
11: 0, # 'ם'
6: 2, # 'מ'
23: 0, # 'ן'
12: 1, # 'נ'
19: 1, # 'ס'
13: 1, # 'ע'
26: 0, # 'ף'
18: 1, # 'פ'
27: 0, # 'ץ'
21: 1, # 'צ'
17: 1, # 'ק'
7: 1, # 'ר'
10: 1, # 'ש'
5: 1, # 'ת'
32: 0, # '–'
52: 0, # '’'
47: 0, # '“'
46: 0, # '”'
58: 0, # '†'
40: 0, # '…'
},
55: { # '´'
50: 0, # 'a'
60: 0, # 'c'
61: 0, # 'd'
42: 0, # 'e'
53: 0, # 'i'
56: 0, # 'l'
54: 0, # 'n'
49: 0, # 'o'
51: 0, # 'r'
43: 1, # 's'
44: 0, # 't'
63: 0, # 'u'
34: 0, # '\xa0'
55: 0, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 0, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 0, # 'ִ'
37: 0, # 'ֵ'
36: 0, # 'ֶ'
31: 0, # 'ַ'
29: 0, # 'ָ'
35: 0, # 'ֹ'
62: 0, # 'ֻ'
28: 0, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 1, # 'א'
8: 0, # 'ב'
20: 0, # 'ג'
16: 0, # 'ד'
3: 1, # 'ה'
2: 1, # 'ו'
24: 0, # 'ז'
14: 0, # 'ח'
22: 0, # 'ט'
1: 2, # 'י'
25: 0, # 'ך'
15: 0, # 'כ'
4: 1, # 'ל'
11: 0, # 'ם'
6: 1, # 'מ'
23: 1, # 'ן'
12: 1, # 'נ'
19: 1, # 'ס'
13: 0, # 'ע'
26: 0, # 'ף'
18: 0, # 'פ'
27: 0, # 'ץ'
21: 0, # 'צ'
17: 0, # 'ק'
7: 1, # 'ר'
10: 1, # 'ש'
5: 0, # 'ת'
32: 0, # '–'
52: 0, # '’'
47: 0, # '“'
46: 0, # '”'
58: 0, # '†'
40: 0, # '…'
},
48: { # '¼'
50: 0, # 'a'
60: 0, # 'c'
61: 0, # 'd'
42: 0, # 'e'
53: 0, # 'i'
56: 0, # 'l'
54: 0, # 'n'
49: 0, # 'o'
51: 0, # 'r'
43: 0, # 's'
44: 0, # 't'
63: 0, # 'u'
34: 0, # '\xa0'
55: 0, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 0, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 0, # 'ִ'
37: 0, # 'ֵ'
36: 0, # 'ֶ'
31: 0, # 'ַ'
29: 0, # 'ָ'
35: 0, # 'ֹ'
62: 0, # 'ֻ'
28: 0, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 1, # 'א'
8: 0, # 'ב'
20: 0, # 'ג'
16: 0, # 'ד'
3: 0, # 'ה'
2: 1, # 'ו'
24: 0, # 'ז'
14: 0, # 'ח'
22: 0, # 'ט'
1: 0, # 'י'
25: 0, # 'ך'
15: 1, # 'כ'
4: 1, # 'ל'
11: 0, # 'ם'
6: 1, # 'מ'
23: 0, # 'ן'
12: 0, # 'נ'
19: 0, # 'ס'
13: 0, # 'ע'
26: 0, # 'ף'
18: 0, # 'פ'
27: 0, # 'ץ'
21: 0, # 'צ'
17: 0, # 'ק'
7: 0, # 'ר'
10: 0, # 'ש'
5: 0, # 'ת'
32: 0, # '–'
52: 0, # '’'
47: 0, # '“'
46: 0, # '”'
58: 0, # '†'
40: 0, # '…'
},
39: { # '½'
50: 0, # 'a'
60: 0, # 'c'
61: 0, # 'd'
42: 0, # 'e'
53: 0, # 'i'
56: 0, # 'l'
54: 0, # 'n'
49: 0, # 'o'
51: 0, # 'r'
43: 0, # 's'
44: 0, # 't'
63: 0, # 'u'
34: 0, # '\xa0'
55: 0, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 0, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 0, # 'ִ'
37: 0, # 'ֵ'
36: 0, # 'ֶ'
31: 0, # 'ַ'
29: 0, # 'ָ'
35: 0, # 'ֹ'
62: 0, # 'ֻ'
28: 0, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 0, # 'א'
8: 0, # 'ב'
20: 0, # 'ג'
16: 0, # 'ד'
3: 0, # 'ה'
2: 0, # 'ו'
24: 0, # 'ז'
14: 0, # 'ח'
22: 0, # 'ט'
1: 0, # 'י'
25: 0, # 'ך'
15: 1, # 'כ'
4: 1, # 'ל'
11: 0, # 'ם'
6: 0, # 'מ'
23: 0, # 'ן'
12: 0, # 'נ'
19: 0, # 'ס'
13: 0, # 'ע'
26: 0, # 'ף'
18: 0, # 'פ'
27: 0, # 'ץ'
21: 1, # 'צ'
17: 1, # 'ק'
7: 0, # 'ר'
10: 0, # 'ש'
5: 0, # 'ת'
32: 0, # '–'
52: 0, # '’'
47: 0, # '“'
46: 0, # '”'
58: 0, # '†'
40: 0, # '…'
},
57: { # '¾'
50: 0, # 'a'
60: 0, # 'c'
61: 0, # 'd'
42: 0, # 'e'
53: 0, # 'i'
56: 0, # 'l'
54: 0, # 'n'
49: 0, # 'o'
51: 0, # 'r'
43: 0, # 's'
44: 0, # 't'
63: 0, # 'u'
34: 0, # '\xa0'
55: 0, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 0, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 0, # 'ִ'
37: 0, # 'ֵ'
36: 0, # 'ֶ'
31: 0, # 'ַ'
29: 0, # 'ָ'
35: 0, # 'ֹ'
62: 0, # 'ֻ'
28: 0, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 0, # 'א'
8: 0, # 'ב'
20: 0, # 'ג'
16: 0, # 'ד'
3: 0, # 'ה'
2: 0, # 'ו'
24: 0, # 'ז'
14: 0, # 'ח'
22: 0, # 'ט'
1: 0, # 'י'
25: 0, # 'ך'
15: 0, # 'כ'
4: 0, # 'ל'
11: 0, # 'ם'
6: 0, # 'מ'
23: 0, # 'ן'
12: 0, # 'נ'
19: 0, # 'ס'
13: 0, # 'ע'
26: 0, # 'ף'
18: 0, # 'פ'
27: 0, # 'ץ'
21: 0, # 'צ'
17: 0, # 'ק'
7: 0, # 'ר'
10: 0, # 'ש'
5: 0, # 'ת'
32: 0, # '–'
52: 0, # '’'
47: 0, # '“'
46: 0, # '”'
58: 0, # '†'
40: 0, # '…'
},
30: { # 'ְ'
50: 0, # 'a'
60: 0, # 'c'
61: 0, # 'd'
42: 0, # 'e'
53: 0, # 'i'
56: 0, # 'l'
54: 0, # 'n'
49: 0, # 'o'
51: 0, # 'r'
43: 0, # 's'
44: 0, # 't'
63: 0, # 'u'
34: 0, # '\xa0'
55: 0, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 0, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 0, # 'ִ'
37: 0, # 'ֵ'
36: 1, # 'ֶ'
31: 0, # 'ַ'
29: 0, # 'ָ'
35: 1, # 'ֹ'
62: 0, # 'ֻ'
28: 0, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 2, # 'א'
8: 2, # 'ב'
20: 2, # 'ג'
16: 2, # 'ד'
3: 2, # 'ה'
2: 2, # 'ו'
24: 2, # 'ז'
14: 2, # 'ח'
22: 2, # 'ט'
1: 2, # 'י'
25: 2, # 'ך'
15: 2, # 'כ'
4: 2, # 'ל'
11: 1, # 'ם'
6: 2, # 'מ'
23: 0, # 'ן'
12: 2, # 'נ'
19: 2, # 'ס'
13: 2, # 'ע'
26: 0, # 'ף'
18: 2, # 'פ'
27: 0, # 'ץ'
21: 2, # 'צ'
17: 2, # 'ק'
7: 2, # 'ר'
10: 2, # 'ש'
5: 2, # 'ת'
32: 0, # '–'
52: 0, # '’'
47: 0, # '“'
46: 0, # '”'
58: 0, # '†'
40: 0, # '…'
},
59: { # 'ֱ'
50: 0, # 'a'
60: 0, # 'c'
61: 0, # 'd'
42: 0, # 'e'
53: 0, # 'i'
56: 0, # 'l'
54: 0, # 'n'
49: 0, # 'o'
51: 0, # 'r'
43: 0, # 's'
44: 0, # 't'
63: 0, # 'u'
34: 0, # '\xa0'
55: 0, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 1, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 0, # 'ִ'
37: 0, # 'ֵ'
36: 0, # 'ֶ'
31: 0, # 'ַ'
29: 0, # 'ָ'
35: 0, # 'ֹ'
62: 0, # 'ֻ'
28: 0, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 0, # 'א'
8: 1, # 'ב'
20: 1, # 'ג'
16: 0, # 'ד'
3: 0, # 'ה'
2: 0, # 'ו'
24: 1, # 'ז'
14: 0, # 'ח'
22: 0, # 'ט'
1: 1, # 'י'
25: 0, # 'ך'
15: 1, # 'כ'
4: 2, # 'ל'
11: 0, # 'ם'
6: 2, # 'מ'
23: 0, # 'ן'
12: 1, # 'נ'
19: 0, # 'ס'
13: 0, # 'ע'
26: 0, # 'ף'
18: 0, # 'פ'
27: 0, # 'ץ'
21: 0, # 'צ'
17: 0, # 'ק'
7: 1, # 'ר'
10: 1, # 'ש'
5: 0, # 'ת'
32: 0, # '–'
52: 0, # '’'
47: 0, # '“'
46: 0, # '”'
58: 0, # '†'
40: 0, # '…'
},
41: { # 'ֲ'
50: 0, # 'a'
60: 0, # 'c'
61: 0, # 'd'
42: 0, # 'e'
53: 0, # 'i'
56: 0, # 'l'
54: 0, # 'n'
49: 0, # 'o'
51: 0, # 'r'
43: 0, # 's'
44: 0, # 't'
63: 0, # 'u'
34: 0, # '\xa0'
55: 0, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 0, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 0, # 'ִ'
37: 0, # 'ֵ'
36: 0, # 'ֶ'
31: 0, # 'ַ'
29: 0, # 'ָ'
35: 0, # 'ֹ'
62: 0, # 'ֻ'
28: 0, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 0, # 'א'
8: 2, # 'ב'
20: 1, # 'ג'
16: 2, # 'ד'
3: 1, # 'ה'
2: 1, # 'ו'
24: 1, # 'ז'
14: 1, # 'ח'
22: 1, # 'ט'
1: 1, # 'י'
25: 1, # 'ך'
15: 1, # 'כ'
4: 2, # 'ל'
11: 0, # 'ם'
6: 2, # 'מ'
23: 0, # 'ן'
12: 2, # 'נ'
19: 1, # 'ס'
13: 0, # 'ע'
26: 0, # 'ף'
18: 1, # 'פ'
27: 0, # 'ץ'
21: 2, # 'צ'
17: 1, # 'ק'
7: 2, # 'ר'
10: 2, # 'ש'
5: 1, # 'ת'
32: 0, # '–'
52: 0, # '’'
47: 0, # '“'
46: 0, # '”'
58: 0, # '†'
40: 0, # '…'
},
33: { # 'ִ'
50: 0, # 'a'
60: 0, # 'c'
61: 0, # 'd'
42: 0, # 'e'
53: 0, # 'i'
56: 0, # 'l'
54: 0, # 'n'
49: 0, # 'o'
51: 0, # 'r'
43: 0, # 's'
44: 0, # 't'
63: 0, # 'u'
34: 0, # '\xa0'
55: 0, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 1, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 1, # 'ִ'
37: 0, # 'ֵ'
36: 1, # 'ֶ'
31: 0, # 'ַ'
29: 1, # 'ָ'
35: 0, # 'ֹ'
62: 0, # 'ֻ'
28: 1, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 1, # 'א'
8: 2, # 'ב'
20: 2, # 'ג'
16: 2, # 'ד'
3: 1, # 'ה'
2: 1, # 'ו'
24: 2, # 'ז'
14: 1, # 'ח'
22: 1, # 'ט'
1: 3, # 'י'
25: 1, # 'ך'
15: 2, # 'כ'
4: 2, # 'ל'
11: 2, # 'ם'
6: 2, # 'מ'
23: 2, # 'ן'
12: 2, # 'נ'
19: 2, # 'ס'
13: 1, # 'ע'
26: 0, # 'ף'
18: 2, # 'פ'
27: 1, # 'ץ'
21: 2, # 'צ'
17: 2, # 'ק'
7: 2, # 'ר'
10: 2, # 'ש'
5: 2, # 'ת'
32: 0, # '–'
52: 0, # '’'
47: 0, # '“'
46: 0, # '”'
58: 0, # '†'
40: 0, # '…'
},
37: { # 'ֵ'
50: 0, # 'a'
60: 0, # 'c'
61: 0, # 'd'
42: 0, # 'e'
53: 0, # 'i'
56: 0, # 'l'
54: 0, # 'n'
49: 0, # 'o'
51: 0, # 'r'
43: 0, # 's'
44: 0, # 't'
63: 0, # 'u'
34: 0, # '\xa0'
55: 0, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 0, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 0, # 'ִ'
37: 0, # 'ֵ'
36: 1, # 'ֶ'
31: 1, # 'ַ'
29: 1, # 'ָ'
35: 0, # 'ֹ'
62: 0, # 'ֻ'
28: 0, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 2, # 'א'
8: 2, # 'ב'
20: 1, # 'ג'
16: 2, # 'ד'
3: 2, # 'ה'
2: 1, # 'ו'
24: 1, # 'ז'
14: 2, # 'ח'
22: 1, # 'ט'
1: 3, # 'י'
25: 2, # 'ך'
15: 1, # 'כ'
4: 2, # 'ל'
11: 2, # 'ם'
6: 1, # 'מ'
23: 2, # 'ן'
12: 2, # 'נ'
19: 1, # 'ס'
13: 2, # 'ע'
26: 1, # 'ף'
18: 1, # 'פ'
27: 1, # 'ץ'
21: 1, # 'צ'
17: 1, # 'ק'
7: 2, # 'ר'
10: 2, # 'ש'
5: 2, # 'ת'
32: 0, # '–'
52: 0, # '’'
47: 0, # '“'
46: 0, # '”'
58: 0, # '†'
40: 0, # '…'
},
36: { # 'ֶ'
50: 0, # 'a'
60: 0, # 'c'
61: 0, # 'd'
42: 0, # 'e'
53: 0, # 'i'
56: 0, # 'l'
54: 0, # 'n'
49: 0, # 'o'
51: 0, # 'r'
43: 0, # 's'
44: 0, # 't'
63: 0, # 'u'
34: 0, # '\xa0'
55: 0, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 0, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 0, # 'ִ'
37: 0, # 'ֵ'
36: 1, # 'ֶ'
31: 1, # 'ַ'
29: 1, # 'ָ'
35: 0, # 'ֹ'
62: 0, # 'ֻ'
28: 0, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 2, # 'א'
8: 2, # 'ב'
20: 1, # 'ג'
16: 2, # 'ד'
3: 2, # 'ה'
2: 1, # 'ו'
24: 1, # 'ז'
14: 2, # 'ח'
22: 1, # 'ט'
1: 2, # 'י'
25: 2, # 'ך'
15: 1, # 'כ'
4: 2, # 'ל'
11: 2, # 'ם'
6: 2, # 'מ'
23: 2, # 'ן'
12: 2, # 'נ'
19: 2, # 'ס'
13: 1, # 'ע'
26: 1, # 'ף'
18: 1, # 'פ'
27: 2, # 'ץ'
21: 1, # 'צ'
17: 1, # 'ק'
7: 2, # 'ר'
10: 2, # 'ש'
5: 2, # 'ת'
32: 0, # '–'
52: 0, # '’'
47: 0, # '“'
46: 0, # '”'
58: 0, # '†'
40: 0, # '…'
},
31: { # 'ַ'
50: 0, # 'a'
60: 0, # 'c'
61: 0, # 'd'
42: 0, # 'e'
53: 0, # 'i'
56: 0, # 'l'
54: 0, # 'n'
49: 0, # 'o'
51: 0, # 'r'
43: 0, # 's'
44: 0, # 't'
63: 0, # 'u'
34: 0, # '\xa0'
55: 0, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 1, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 0, # 'ִ'
37: 0, # 'ֵ'
36: 1, # 'ֶ'
31: 0, # 'ַ'
29: 2, # 'ָ'
35: 0, # 'ֹ'
62: 0, # 'ֻ'
28: 0, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 2, # 'א'
8: 2, # 'ב'
20: 2, # 'ג'
16: 2, # 'ד'
3: 2, # 'ה'
2: 1, # 'ו'
24: 2, # 'ז'
14: 2, # 'ח'
22: 2, # 'ט'
1: 3, # 'י'
25: 1, # 'ך'
15: 2, # 'כ'
4: 2, # 'ל'
11: 2, # 'ם'
6: 2, # 'מ'
23: 2, # 'ן'
12: 2, # 'נ'
19: 2, # 'ס'
13: 2, # 'ע'
26: 2, # 'ף'
18: 2, # 'פ'
27: 1, # 'ץ'
21: 2, # 'צ'
17: 2, # 'ק'
7: 2, # 'ר'
10: 2, # 'ש'
5: 2, # 'ת'
32: 0, # '–'
52: 0, # '’'
47: 0, # '“'
46: 0, # '”'
58: 0, # '†'
40: 0, # '…'
},
29: { # 'ָ'
50: 0, # 'a'
60: 0, # 'c'
61: 0, # 'd'
42: 0, # 'e'
53: 0, # 'i'
56: 0, # 'l'
54: 0, # 'n'
49: 0, # 'o'
51: 0, # 'r'
43: 0, # 's'
44: 0, # 't'
63: 0, # 'u'
34: 0, # '\xa0'
55: 0, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 0, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 0, # 'ִ'
37: 0, # 'ֵ'
36: 0, # 'ֶ'
31: 1, # 'ַ'
29: 2, # 'ָ'
35: 0, # 'ֹ'
62: 0, # 'ֻ'
28: 1, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 2, # 'א'
8: 2, # 'ב'
20: 2, # 'ג'
16: 2, # 'ד'
3: 3, # 'ה'
2: 2, # 'ו'
24: 2, # 'ז'
14: 2, # 'ח'
22: 1, # 'ט'
1: 2, # 'י'
25: 2, # 'ך'
15: 2, # 'כ'
4: 2, # 'ל'
11: 2, # 'ם'
6: 2, # 'מ'
23: 2, # 'ן'
12: 2, # 'נ'
19: 1, # 'ס'
13: 2, # 'ע'
26: 1, # 'ף'
18: 2, # 'פ'
27: 1, # 'ץ'
21: 2, # 'צ'
17: 2, # 'ק'
7: 2, # 'ר'
10: 2, # 'ש'
5: 2, # 'ת'
32: 0, # '–'
52: 0, # '’'
47: 0, # '“'
46: 0, # '”'
58: 0, # '†'
40: 0, # '…'
},
35: { # 'ֹ'
50: 0, # 'a'
60: 0, # 'c'
61: 0, # 'd'
42: 0, # 'e'
53: 0, # 'i'
56: 0, # 'l'
54: 0, # 'n'
49: 0, # 'o'
51: 0, # 'r'
43: 0, # 's'
44: 0, # 't'
63: 0, # 'u'
34: 0, # '\xa0'
55: 0, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 0, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 0, # 'ִ'
37: 0, # 'ֵ'
36: 0, # 'ֶ'
31: 0, # 'ַ'
29: 0, # 'ָ'
35: 1, # 'ֹ'
62: 0, # 'ֻ'
28: 0, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 2, # 'א'
8: 2, # 'ב'
20: 1, # 'ג'
16: 2, # 'ד'
3: 2, # 'ה'
2: 1, # 'ו'
24: 1, # 'ז'
14: 1, # 'ח'
22: 1, # 'ט'
1: 1, # 'י'
25: 1, # 'ך'
15: 2, # 'כ'
4: 2, # 'ל'
11: 2, # 'ם'
6: 2, # 'מ'
23: 2, # 'ן'
12: 2, # 'נ'
19: 2, # 'ס'
13: 2, # 'ע'
26: 1, # 'ף'
18: 2, # 'פ'
27: 1, # 'ץ'
21: 2, # 'צ'
17: 2, # 'ק'
7: 2, # 'ר'
10: 2, # 'ש'
5: 2, # 'ת'
32: 0, # '–'
52: 0, # '’'
47: 0, # '“'
46: 0, # '”'
58: 0, # '†'
40: 0, # '…'
},
62: { # 'ֻ'
50: 0, # 'a'
60: 0, # 'c'
61: 0, # 'd'
42: 0, # 'e'
53: 0, # 'i'
56: 0, # 'l'
54: 0, # 'n'
49: 0, # 'o'
51: 0, # 'r'
43: 0, # 's'
44: 0, # 't'
63: 0, # 'u'
34: 0, # '\xa0'
55: 0, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 0, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 0, # 'ִ'
37: 0, # 'ֵ'
36: 0, # 'ֶ'
31: 0, # 'ַ'
29: 0, # 'ָ'
35: 0, # 'ֹ'
62: 0, # 'ֻ'
28: 0, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 0, # 'א'
8: 1, # 'ב'
20: 1, # 'ג'
16: 1, # 'ד'
3: 1, # 'ה'
2: 1, # 'ו'
24: 1, # 'ז'
14: 1, # 'ח'
22: 0, # 'ט'
1: 1, # 'י'
25: 0, # 'ך'
15: 1, # 'כ'
4: 2, # 'ל'
11: 1, # 'ם'
6: 1, # 'מ'
23: 1, # 'ן'
12: 1, # 'נ'
19: 1, # 'ס'
13: 1, # 'ע'
26: 0, # 'ף'
18: 1, # 'פ'
27: 0, # 'ץ'
21: 1, # 'צ'
17: 1, # 'ק'
7: 1, # 'ר'
10: 1, # 'ש'
5: 1, # 'ת'
32: 0, # '–'
52: 0, # '’'
47: 0, # '“'
46: 0, # '”'
58: 0, # '†'
40: 0, # '…'
},
28: { # 'ּ'
50: 0, # 'a'
60: 0, # 'c'
61: 0, # 'd'
42: 0, # 'e'
53: 0, # 'i'
56: 0, # 'l'
54: 0, # 'n'
49: 0, # 'o'
51: 0, # 'r'
43: 0, # 's'
44: 0, # 't'
63: 0, # 'u'
34: 0, # '\xa0'
55: 0, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 3, # 'ְ'
59: 0, # 'ֱ'
41: 1, # 'ֲ'
33: 3, # 'ִ'
37: 2, # 'ֵ'
36: 2, # 'ֶ'
31: 3, # 'ַ'
29: 3, # 'ָ'
35: 2, # 'ֹ'
62: 1, # 'ֻ'
28: 0, # 'ּ'
38: 2, # 'ׁ'
45: 1, # 'ׂ'
9: 2, # 'א'
8: 2, # 'ב'
20: 1, # 'ג'
16: 2, # 'ד'
3: 1, # 'ה'
2: 2, # 'ו'
24: 1, # 'ז'
14: 1, # 'ח'
22: 1, # 'ט'
1: 2, # 'י'
25: 2, # 'ך'
15: 2, # 'כ'
4: 2, # 'ל'
11: 1, # 'ם'
6: 2, # 'מ'
23: 1, # 'ן'
12: 2, # 'נ'
19: 1, # 'ס'
13: 2, # 'ע'
26: 1, # 'ף'
18: 1, # 'פ'
27: 1, # 'ץ'
21: 1, # 'צ'
17: 1, # 'ק'
7: 2, # 'ר'
10: 2, # 'ש'
5: 2, # 'ת'
32: 0, # '–'
52: 0, # '’'
47: 0, # '“'
46: 0, # '”'
58: 0, # '†'
40: 0, # '…'
},
38: { # 'ׁ'
50: 0, # 'a'
60: 0, # 'c'
61: 0, # 'd'
42: 0, # 'e'
53: 0, # 'i'
56: 0, # 'l'
54: 0, # 'n'
49: 0, # 'o'
51: 0, # 'r'
43: 0, # 's'
44: 0, # 't'
63: 0, # 'u'
34: 0, # '\xa0'
55: 0, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 2, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 2, # 'ִ'
37: 2, # 'ֵ'
36: 2, # 'ֶ'
31: 2, # 'ַ'
29: 2, # 'ָ'
35: 1, # 'ֹ'
62: 1, # 'ֻ'
28: 0, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 0, # 'א'
8: 0, # 'ב'
20: 0, # 'ג'
16: 0, # 'ד'
3: 0, # 'ה'
2: 2, # 'ו'
24: 0, # 'ז'
14: 0, # 'ח'
22: 0, # 'ט'
1: 1, # 'י'
25: 0, # 'ך'
15: 0, # 'כ'
4: 0, # 'ל'
11: 0, # 'ם'
6: 0, # 'מ'
23: 0, # 'ן'
12: 0, # 'נ'
19: 0, # 'ס'
13: 1, # 'ע'
26: 0, # 'ף'
18: 0, # 'פ'
27: 0, # 'ץ'
21: 0, # 'צ'
17: 0, # 'ק'
7: 0, # 'ר'
10: 0, # 'ש'
5: 0, # 'ת'
32: 0, # '–'
52: 0, # '’'
47: 0, # '“'
46: 0, # '”'
58: 0, # '†'
40: 0, # '…'
},
45: { # 'ׂ'
50: 0, # 'a'
60: 0, # 'c'
61: 0, # 'd'
42: 0, # 'e'
53: 0, # 'i'
56: 0, # 'l'
54: 0, # 'n'
49: 0, # 'o'
51: 0, # 'r'
43: 0, # 's'
44: 0, # 't'
63: 0, # 'u'
34: 0, # '\xa0'
55: 0, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 2, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 2, # 'ִ'
37: 1, # 'ֵ'
36: 2, # 'ֶ'
31: 1, # 'ַ'
29: 2, # 'ָ'
35: 1, # 'ֹ'
62: 0, # 'ֻ'
28: 0, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 1, # 'א'
8: 0, # 'ב'
20: 1, # 'ג'
16: 0, # 'ד'
3: 1, # 'ה'
2: 2, # 'ו'
24: 0, # 'ז'
14: 1, # 'ח'
22: 0, # 'ט'
1: 1, # 'י'
25: 0, # 'ך'
15: 0, # 'כ'
4: 0, # 'ל'
11: 1, # 'ם'
6: 1, # 'מ'
23: 0, # 'ן'
12: 1, # 'נ'
19: 0, # 'ס'
13: 1, # 'ע'
26: 0, # 'ף'
18: 1, # 'פ'
27: 0, # 'ץ'
21: 0, # 'צ'
17: 0, # 'ק'
7: 1, # 'ר'
10: 0, # 'ש'
5: 1, # 'ת'
32: 0, # '–'
52: 0, # '’'
47: 0, # '“'
46: 0, # '”'
58: 0, # '†'
40: 0, # '…'
},
9: { # 'א'
50: 0, # 'a'
60: 0, # 'c'
61: 0, # 'd'
42: 0, # 'e'
53: 0, # 'i'
56: 0, # 'l'
54: 0, # 'n'
49: 0, # 'o'
51: 0, # 'r'
43: 0, # 's'
44: 0, # 't'
63: 0, # 'u'
34: 1, # '\xa0'
55: 1, # '´'
48: 1, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 0, # 'ְ'
59: 2, # 'ֱ'
41: 2, # 'ֲ'
33: 2, # 'ִ'
37: 2, # 'ֵ'
36: 2, # 'ֶ'
31: 2, # 'ַ'
29: 2, # 'ָ'
35: 2, # 'ֹ'
62: 1, # 'ֻ'
28: 0, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 2, # 'א'
8: 3, # 'ב'
20: 3, # 'ג'
16: 3, # 'ד'
3: 3, # 'ה'
2: 3, # 'ו'
24: 3, # 'ז'
14: 3, # 'ח'
22: 3, # 'ט'
1: 3, # 'י'
25: 3, # 'ך'
15: 3, # 'כ'
4: 3, # 'ל'
11: 3, # 'ם'
6: 3, # 'מ'
23: 3, # 'ן'
12: 3, # 'נ'
19: 3, # 'ס'
13: 2, # 'ע'
26: 3, # 'ף'
18: 3, # 'פ'
27: 1, # 'ץ'
21: 3, # 'צ'
17: 3, # 'ק'
7: 3, # 'ר'
10: 3, # 'ש'
5: 3, # 'ת'
32: 0, # '–'
52: 0, # '’'
47: 0, # '“'
46: 1, # '”'
58: 0, # '†'
40: 1, # '…'
},
8: { # 'ב'
50: 0, # 'a'
60: 0, # 'c'
61: 1, # 'd'
42: 0, # 'e'
53: 0, # 'i'
56: 0, # 'l'
54: 0, # 'n'
49: 0, # 'o'
51: 0, # 'r'
43: 0, # 's'
44: 0, # 't'
63: 0, # 'u'
34: 1, # '\xa0'
55: 1, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 2, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 2, # 'ִ'
37: 2, # 'ֵ'
36: 2, # 'ֶ'
31: 2, # 'ַ'
29: 2, # 'ָ'
35: 2, # 'ֹ'
62: 1, # 'ֻ'
28: 3, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 3, # 'א'
8: 3, # 'ב'
20: 3, # 'ג'
16: 3, # 'ד'
3: 3, # 'ה'
2: 3, # 'ו'
24: 3, # 'ז'
14: 3, # 'ח'
22: 3, # 'ט'
1: 3, # 'י'
25: 2, # 'ך'
15: 3, # 'כ'
4: 3, # 'ל'
11: 2, # 'ם'
6: 3, # 'מ'
23: 3, # 'ן'
12: 3, # 'נ'
19: 3, # 'ס'
13: 3, # 'ע'
26: 1, # 'ף'
18: 3, # 'פ'
27: 2, # 'ץ'
21: 3, # 'צ'
17: 3, # 'ק'
7: 3, # 'ר'
10: 3, # 'ש'
5: 3, # 'ת'
32: 1, # '–'
52: 0, # '’'
47: 0, # '“'
46: 1, # '”'
58: 0, # '†'
40: 1, # '…'
},
20: { # 'ג'
50: 0, # 'a'
60: 0, # 'c'
61: 0, # 'd'
42: 0, # 'e'
53: 0, # 'i'
56: 0, # 'l'
54: 0, # 'n'
49: 0, # 'o'
51: 0, # 'r'
43: 0, # 's'
44: 0, # 't'
63: 0, # 'u'
34: 1, # '\xa0'
55: 2, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 2, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 1, # 'ִ'
37: 1, # 'ֵ'
36: 1, # 'ֶ'
31: 2, # 'ַ'
29: 2, # 'ָ'
35: 1, # 'ֹ'
62: 0, # 'ֻ'
28: 2, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 2, # 'א'
8: 3, # 'ב'
20: 2, # 'ג'
16: 3, # 'ד'
3: 3, # 'ה'
2: 3, # 'ו'
24: 3, # 'ז'
14: 2, # 'ח'
22: 2, # 'ט'
1: 3, # 'י'
25: 1, # 'ך'
15: 1, # 'כ'
4: 3, # 'ל'
11: 3, # 'ם'
6: 3, # 'מ'
23: 3, # 'ן'
12: 3, # 'נ'
19: 2, # 'ס'
13: 3, # 'ע'
26: 2, # 'ף'
18: 2, # 'פ'
27: 1, # 'ץ'
21: 1, # 'צ'
17: 1, # 'ק'
7: 3, # 'ר'
10: 3, # 'ש'
5: 3, # 'ת'
32: 0, # '–'
52: 1, # '’'
47: 0, # '“'
46: 1, # '”'
58: 0, # '†'
40: 0, # '…'
},
16: { # 'ד'
50: 0, # 'a'
60: 0, # 'c'
61: 0, # 'd'
42: 0, # 'e'
53: 0, # 'i'
56: 0, # 'l'
54: 0, # 'n'
49: 0, # 'o'
51: 0, # 'r'
43: 0, # 's'
44: 0, # 't'
63: 0, # 'u'
34: 0, # '\xa0'
55: 0, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 2, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 2, # 'ִ'
37: 2, # 'ֵ'
36: 2, # 'ֶ'
31: 2, # 'ַ'
29: 2, # 'ָ'
35: 2, # 'ֹ'
62: 1, # 'ֻ'
28: 2, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 3, # 'א'
8: 3, # 'ב'
20: 3, # 'ג'
16: 3, # 'ד'
3: 3, # 'ה'
2: 3, # 'ו'
24: 1, # 'ז'
14: 2, # 'ח'
22: 2, # 'ט'
1: 3, # 'י'
25: 2, # 'ך'
15: 2, # 'כ'
4: 3, # 'ל'
11: 3, # 'ם'
6: 3, # 'מ'
23: 2, # 'ן'
12: 3, # 'נ'
19: 2, # 'ס'
13: 3, # 'ע'
26: 2, # 'ף'
18: 3, # 'פ'
27: 0, # 'ץ'
21: 2, # 'צ'
17: 3, # 'ק'
7: 3, # 'ר'
10: 3, # 'ש'
5: 3, # 'ת'
32: 0, # '–'
52: 0, # '’'
47: 0, # '“'
46: 1, # '”'
58: 0, # '†'
40: 1, # '…'
},
3: { # 'ה'
50: 0, # 'a'
60: 0, # 'c'
61: 1, # 'd'
42: 0, # 'e'
53: 0, # 'i'
56: 0, # 'l'
54: 0, # 'n'
49: 0, # 'o'
51: 0, # 'r'
43: 0, # 's'
44: 0, # 't'
63: 0, # 'u'
34: 1, # '\xa0'
55: 0, # '´'
48: 1, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 1, # 'ְ'
59: 1, # 'ֱ'
41: 2, # 'ֲ'
33: 2, # 'ִ'
37: 2, # 'ֵ'
36: 2, # 'ֶ'
31: 3, # 'ַ'
29: 2, # 'ָ'
35: 1, # 'ֹ'
62: 1, # 'ֻ'
28: 2, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 3, # 'א'
8: 3, # 'ב'
20: 3, # 'ג'
16: 3, # 'ד'
3: 3, # 'ה'
2: 3, # 'ו'
24: 3, # 'ז'
14: 3, # 'ח'
22: 3, # 'ט'
1: 3, # 'י'
25: 1, # 'ך'
15: 3, # 'כ'
4: 3, # 'ל'
11: 3, # 'ם'
6: 3, # 'מ'
23: 3, # 'ן'
12: 3, # 'נ'
19: 3, # 'ס'
13: 3, # 'ע'
26: 0, # 'ף'
18: 3, # 'פ'
27: 1, # 'ץ'
21: 3, # 'צ'
17: 3, # 'ק'
7: 3, # 'ר'
10: 3, # 'ש'
5: 3, # 'ת'
32: 1, # '–'
52: 1, # '’'
47: 0, # '“'
46: 1, # '”'
58: 0, # '†'
40: 2, # '…'
},
2: { # 'ו'
50: 0, # 'a'
60: 0, # 'c'
61: 0, # 'd'
42: 0, # 'e'
53: 0, # 'i'
56: 0, # 'l'
54: 0, # 'n'
49: 0, # 'o'
51: 0, # 'r'
43: 0, # 's'
44: 1, # 't'
63: 0, # 'u'
34: 1, # '\xa0'
55: 1, # '´'
48: 1, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 2, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 2, # 'ִ'
37: 1, # 'ֵ'
36: 1, # 'ֶ'
31: 2, # 'ַ'
29: 2, # 'ָ'
35: 3, # 'ֹ'
62: 0, # 'ֻ'
28: 3, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 3, # 'א'
8: 3, # 'ב'
20: 3, # 'ג'
16: 3, # 'ד'
3: 3, # 'ה'
2: 3, # 'ו'
24: 3, # 'ז'
14: 3, # 'ח'
22: 3, # 'ט'
1: 3, # 'י'
25: 3, # 'ך'
15: 3, # 'כ'
4: 3, # 'ל'
11: 3, # 'ם'
6: 3, # 'מ'
23: 3, # 'ן'
12: 3, # 'נ'
19: 3, # 'ס'
13: 3, # 'ע'
26: 3, # 'ף'
18: 3, # 'פ'
27: 3, # 'ץ'
21: 3, # 'צ'
17: 3, # 'ק'
7: 3, # 'ר'
10: 3, # 'ש'
5: 3, # 'ת'
32: 1, # '–'
52: 0, # '’'
47: 0, # '“'
46: 1, # '”'
58: 0, # '†'
40: 2, # '…'
},
24: { # 'ז'
50: 0, # 'a'
60: 0, # 'c'
61: 0, # 'd'
42: 0, # 'e'
53: 0, # 'i'
56: 0, # 'l'
54: 0, # 'n'
49: 0, # 'o'
51: 0, # 'r'
43: 0, # 's'
44: 0, # 't'
63: 0, # 'u'
34: 0, # '\xa0'
55: 1, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 2, # 'ְ'
59: 0, # 'ֱ'
41: 1, # 'ֲ'
33: 1, # 'ִ'
37: 2, # 'ֵ'
36: 2, # 'ֶ'
31: 2, # 'ַ'
29: 2, # 'ָ'
35: 1, # 'ֹ'
62: 1, # 'ֻ'
28: 2, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 3, # 'א'
8: 2, # 'ב'
20: 2, # 'ג'
16: 2, # 'ד'
3: 3, # 'ה'
2: 3, # 'ו'
24: 2, # 'ז'
14: 2, # 'ח'
22: 1, # 'ט'
1: 3, # 'י'
25: 1, # 'ך'
15: 3, # 'כ'
4: 3, # 'ל'
11: 2, # 'ם'
6: 3, # 'מ'
23: 2, # 'ן'
12: 2, # 'נ'
19: 1, # 'ס'
13: 2, # 'ע'
26: 1, # 'ף'
18: 1, # 'פ'
27: 0, # 'ץ'
21: 2, # 'צ'
17: 3, # 'ק'
7: 3, # 'ר'
10: 1, # 'ש'
5: 2, # 'ת'
32: 0, # '–'
52: 0, # '’'
47: 0, # '“'
46: 0, # '”'
58: 0, # '†'
40: 1, # '…'
},
14: { # 'ח'
50: 0, # 'a'
60: 0, # 'c'
61: 0, # 'd'
42: 0, # 'e'
53: 0, # 'i'
56: 0, # 'l'
54: 0, # 'n'
49: 0, # 'o'
51: 0, # 'r'
43: 0, # 's'
44: 0, # 't'
63: 0, # 'u'
34: 1, # '\xa0'
55: 1, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 2, # 'ְ'
59: 1, # 'ֱ'
41: 2, # 'ֲ'
33: 2, # 'ִ'
37: 2, # 'ֵ'
36: 2, # 'ֶ'
31: 2, # 'ַ'
29: 2, # 'ָ'
35: 2, # 'ֹ'
62: 1, # 'ֻ'
28: 0, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 2, # 'א'
8: 3, # 'ב'
20: 2, # 'ג'
16: 3, # 'ד'
3: 3, # 'ה'
2: 3, # 'ו'
24: 3, # 'ז'
14: 2, # 'ח'
22: 2, # 'ט'
1: 3, # 'י'
25: 1, # 'ך'
15: 2, # 'כ'
4: 3, # 'ל'
11: 3, # 'ם'
6: 3, # 'מ'
23: 2, # 'ן'
12: 3, # 'נ'
19: 3, # 'ס'
13: 1, # 'ע'
26: 2, # 'ף'
18: 2, # 'פ'
27: 2, # 'ץ'
21: 3, # 'צ'
17: 3, # 'ק'
7: 3, # 'ר'
10: 3, # 'ש'
5: 3, # 'ת'
32: 0, # '–'
52: 1, # '’'
47: 0, # '“'
46: 1, # '”'
58: 0, # '†'
40: 1, # '…'
},
22: { # 'ט'
50: 0, # 'a'
60: 0, # 'c'
61: 0, # 'd'
42: 0, # 'e'
53: 0, # 'i'
56: 0, # 'l'
54: 0, # 'n'
49: 0, # 'o'
51: 0, # 'r'
43: 0, # 's'
44: 0, # 't'
63: 0, # 'u'
34: 1, # '\xa0'
55: 0, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 2, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 2, # 'ִ'
37: 1, # 'ֵ'
36: 1, # 'ֶ'
31: 2, # 'ַ'
29: 1, # 'ָ'
35: 1, # 'ֹ'
62: 1, # 'ֻ'
28: 1, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 3, # 'א'
8: 3, # 'ב'
20: 3, # 'ג'
16: 1, # 'ד'
3: 3, # 'ה'
2: 3, # 'ו'
24: 2, # 'ז'
14: 3, # 'ח'
22: 2, # 'ט'
1: 3, # 'י'
25: 1, # 'ך'
15: 2, # 'כ'
4: 3, # 'ל'
11: 2, # 'ם'
6: 2, # 'מ'
23: 2, # 'ן'
12: 3, # 'נ'
19: 2, # 'ס'
13: 3, # 'ע'
26: 2, # 'ף'
18: 3, # 'פ'
27: 1, # 'ץ'
21: 2, # 'צ'
17: 2, # 'ק'
7: 3, # 'ר'
10: 2, # 'ש'
5: 3, # 'ת'
32: 0, # '–'
52: 0, # '’'
47: 0, # '“'
46: 0, # '”'
58: 0, # '†'
40: 1, # '…'
},
1: { # 'י'
50: 0, # 'a'
60: 0, # 'c'
61: 0, # 'd'
42: 0, # 'e'
53: 0, # 'i'
56: 0, # 'l'
54: 0, # 'n'
49: 0, # 'o'
51: 0, # 'r'
43: 0, # 's'
44: 0, # 't'
63: 0, # 'u'
34: 1, # '\xa0'
55: 1, # '´'
48: 1, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 2, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 2, # 'ִ'
37: 2, # 'ֵ'
36: 1, # 'ֶ'
31: 2, # 'ַ'
29: 2, # 'ָ'
35: 2, # 'ֹ'
62: 1, # 'ֻ'
28: 2, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 3, # 'א'
8: 3, # 'ב'
20: 3, # 'ג'
16: 3, # 'ד'
3: 3, # 'ה'
2: 3, # 'ו'
24: 3, # 'ז'
14: 3, # 'ח'
22: 3, # 'ט'
1: 3, # 'י'
25: 3, # 'ך'
15: 3, # 'כ'
4: 3, # 'ל'
11: 3, # 'ם'
6: 3, # 'מ'
23: 3, # 'ן'
12: 3, # 'נ'
19: 3, # 'ס'
13: 3, # 'ע'
26: 3, # 'ף'
18: 3, # 'פ'
27: 3, # 'ץ'
21: 3, # 'צ'
17: 3, # 'ק'
7: 3, # 'ר'
10: 3, # 'ש'
5: 3, # 'ת'
32: 1, # '–'
52: 0, # '’'
47: 0, # '“'
46: 1, # '”'
58: 0, # '†'
40: 2, # '…'
},
25: { # 'ך'
50: 0, # 'a'
60: 0, # 'c'
61: 0, # 'd'
42: 0, # 'e'
53: 0, # 'i'
56: 0, # 'l'
54: 0, # 'n'
49: 0, # 'o'
51: 0, # 'r'
43: 0, # 's'
44: 0, # 't'
63: 0, # 'u'
34: 0, # '\xa0'
55: 0, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 2, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 0, # 'ִ'
37: 0, # 'ֵ'
36: 0, # 'ֶ'
31: 0, # 'ַ'
29: 2, # 'ָ'
35: 0, # 'ֹ'
62: 0, # 'ֻ'
28: 1, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 1, # 'א'
8: 0, # 'ב'
20: 0, # 'ג'
16: 0, # 'ד'
3: 1, # 'ה'
2: 0, # 'ו'
24: 0, # 'ז'
14: 1, # 'ח'
22: 0, # 'ט'
1: 0, # 'י'
25: 0, # 'ך'
15: 0, # 'כ'
4: 1, # 'ל'
11: 0, # 'ם'
6: 1, # 'מ'
23: 0, # 'ן'
12: 0, # 'נ'
19: 0, # 'ס'
13: 0, # 'ע'
26: 0, # 'ף'
18: 0, # 'פ'
27: 0, # 'ץ'
21: 0, # 'צ'
17: 0, # 'ק'
7: 0, # 'ר'
10: 1, # 'ש'
5: 0, # 'ת'
32: 0, # '–'
52: 0, # '’'
47: 0, # '“'
46: 0, # '”'
58: 0, # '†'
40: 1, # '…'
},
15: { # 'כ'
50: 0, # 'a'
60: 0, # 'c'
61: 0, # 'd'
42: 0, # 'e'
53: 0, # 'i'
56: 0, # 'l'
54: 0, # 'n'
49: 0, # 'o'
51: 0, # 'r'
43: 0, # 's'
44: 0, # 't'
63: 0, # 'u'
34: 0, # '\xa0'
55: 0, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 2, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 2, # 'ִ'
37: 2, # 'ֵ'
36: 2, # 'ֶ'
31: 2, # 'ַ'
29: 2, # 'ָ'
35: 1, # 'ֹ'
62: 1, # 'ֻ'
28: 3, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 3, # 'א'
8: 3, # 'ב'
20: 2, # 'ג'
16: 3, # 'ד'
3: 3, # 'ה'
2: 3, # 'ו'
24: 3, # 'ז'
14: 3, # 'ח'
22: 2, # 'ט'
1: 3, # 'י'
25: 3, # 'ך'
15: 3, # 'כ'
4: 3, # 'ל'
11: 3, # 'ם'
6: 3, # 'מ'
23: 3, # 'ן'
12: 3, # 'נ'
19: 3, # 'ס'
13: 2, # 'ע'
26: 3, # 'ף'
18: 3, # 'פ'
27: 1, # 'ץ'
21: 2, # 'צ'
17: 2, # 'ק'
7: 3, # 'ר'
10: 3, # 'ש'
5: 3, # 'ת'
32: 0, # '–'
52: 0, # '’'
47: 0, # '“'
46: 0, # '”'
58: 0, # '†'
40: 0, # '…'
},
4: { # 'ל'
50: 0, # 'a'
60: 0, # 'c'
61: 0, # 'd'
42: 0, # 'e'
53: 0, # 'i'
56: 0, # 'l'
54: 0, # 'n'
49: 0, # 'o'
51: 0, # 'r'
43: 0, # 's'
44: 0, # 't'
63: 0, # 'u'
34: 1, # '\xa0'
55: 1, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 3, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 2, # 'ִ'
37: 2, # 'ֵ'
36: 2, # 'ֶ'
31: 2, # 'ַ'
29: 2, # 'ָ'
35: 2, # 'ֹ'
62: 1, # 'ֻ'
28: 2, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 3, # 'א'
8: 3, # 'ב'
20: 3, # 'ג'
16: 3, # 'ד'
3: 3, # 'ה'
2: 3, # 'ו'
24: 3, # 'ז'
14: 3, # 'ח'
22: 3, # 'ט'
1: 3, # 'י'
25: 3, # 'ך'
15: 3, # 'כ'
4: 3, # 'ל'
11: 3, # 'ם'
6: 3, # 'מ'
23: 2, # 'ן'
12: 3, # 'נ'
19: 3, # 'ס'
13: 3, # 'ע'
26: 2, # 'ף'
18: 3, # 'פ'
27: 2, # 'ץ'
21: 3, # 'צ'
17: 3, # 'ק'
7: 3, # 'ר'
10: 3, # 'ש'
5: 3, # 'ת'
32: 1, # '–'
52: 0, # '’'
47: 0, # '“'
46: 1, # '”'
58: 0, # '†'
40: 1, # '…'
},
11: { # 'ם'
50: 0, # 'a'
60: 0, # 'c'
61: 0, # 'd'
42: 0, # 'e'
53: 0, # 'i'
56: 0, # 'l'
54: 0, # 'n'
49: 0, # 'o'
51: 0, # 'r'
43: 0, # 's'
44: 0, # 't'
63: 0, # 'u'
34: 1, # '\xa0'
55: 0, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 0, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 0, # 'ִ'
37: 0, # 'ֵ'
36: 0, # 'ֶ'
31: 0, # 'ַ'
29: 0, # 'ָ'
35: 0, # 'ֹ'
62: 0, # 'ֻ'
28: 0, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 1, # 'א'
8: 1, # 'ב'
20: 1, # 'ג'
16: 0, # 'ד'
3: 1, # 'ה'
2: 1, # 'ו'
24: 1, # 'ז'
14: 1, # 'ח'
22: 0, # 'ט'
1: 1, # 'י'
25: 0, # 'ך'
15: 1, # 'כ'
4: 1, # 'ל'
11: 1, # 'ם'
6: 1, # 'מ'
23: 0, # 'ן'
12: 1, # 'נ'
19: 0, # 'ס'
13: 1, # 'ע'
26: 0, # 'ף'
18: 1, # 'פ'
27: 1, # 'ץ'
21: 1, # 'צ'
17: 1, # 'ק'
7: 1, # 'ר'
10: 1, # 'ש'
5: 1, # 'ת'
32: 0, # '–'
52: 0, # '’'
47: 0, # '“'
46: 1, # '”'
58: 0, # '†'
40: 2, # '…'
},
6: { # 'מ'
50: 0, # 'a'
60: 0, # 'c'
61: 0, # 'd'
42: 0, # 'e'
53: 0, # 'i'
56: 0, # 'l'
54: 0, # 'n'
49: 0, # 'o'
51: 0, # 'r'
43: 0, # 's'
44: 0, # 't'
63: 0, # 'u'
34: 0, # '\xa0'
55: 1, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 2, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 2, # 'ִ'
37: 2, # 'ֵ'
36: 2, # 'ֶ'
31: 2, # 'ַ'
29: 2, # 'ָ'
35: 2, # 'ֹ'
62: 1, # 'ֻ'
28: 2, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 3, # 'א'
8: 3, # 'ב'
20: 3, # 'ג'
16: 3, # 'ד'
3: 3, # 'ה'
2: 3, # 'ו'
24: 3, # 'ז'
14: 3, # 'ח'
22: 3, # 'ט'
1: 3, # 'י'
25: 2, # 'ך'
15: 3, # 'כ'
4: 3, # 'ל'
11: 3, # 'ם'
6: 3, # 'מ'
23: 3, # 'ן'
12: 3, # 'נ'
19: 3, # 'ס'
13: 3, # 'ע'
26: 0, # 'ף'
18: 3, # 'פ'
27: 2, # 'ץ'
21: 3, # 'צ'
17: 3, # 'ק'
7: 3, # 'ר'
10: 3, # 'ש'
5: 3, # 'ת'
32: 0, # '–'
52: 0, # '’'
47: 0, # '“'
46: 0, # '”'
58: 0, # '†'
40: 1, # '…'
},
23: { # 'ן'
50: 0, # 'a'
60: 0, # 'c'
61: 0, # 'd'
42: 0, # 'e'
53: 0, # 'i'
56: 0, # 'l'
54: 0, # 'n'
49: 0, # 'o'
51: 0, # 'r'
43: 0, # 's'
44: 0, # 't'
63: 0, # 'u'
34: 1, # '\xa0'
55: 0, # '´'
48: 1, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 0, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 0, # 'ִ'
37: 0, # 'ֵ'
36: 0, # 'ֶ'
31: 0, # 'ַ'
29: 0, # 'ָ'
35: 0, # 'ֹ'
62: 0, # 'ֻ'
28: 0, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 1, # 'א'
8: 1, # 'ב'
20: 1, # 'ג'
16: 1, # 'ד'
3: 1, # 'ה'
2: 1, # 'ו'
24: 0, # 'ז'
14: 1, # 'ח'
22: 1, # 'ט'
1: 1, # 'י'
25: 0, # 'ך'
15: 1, # 'כ'
4: 1, # 'ל'
11: 1, # 'ם'
6: 1, # 'מ'
23: 0, # 'ן'
12: 1, # 'נ'
19: 1, # 'ס'
13: 1, # 'ע'
26: 1, # 'ף'
18: 1, # 'פ'
27: 0, # 'ץ'
21: 0, # 'צ'
17: 1, # 'ק'
7: 1, # 'ר'
10: 1, # 'ש'
5: 1, # 'ת'
32: 1, # '–'
52: 0, # '’'
47: 0, # '“'
46: 1, # '”'
58: 0, # '†'
40: 2, # '…'
},
12: { # 'נ'
50: 0, # 'a'
60: 0, # 'c'
61: 0, # 'd'
42: 0, # 'e'
53: 0, # 'i'
56: 0, # 'l'
54: 0, # 'n'
49: 0, # 'o'
51: 0, # 'r'
43: 0, # 's'
44: 0, # 't'
63: 0, # 'u'
34: 0, # '\xa0'
55: 0, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 2, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 2, # 'ִ'
37: 2, # 'ֵ'
36: 2, # 'ֶ'
31: 2, # 'ַ'
29: 2, # 'ָ'
35: 1, # 'ֹ'
62: 1, # 'ֻ'
28: 2, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 3, # 'א'
8: 3, # 'ב'
20: 3, # 'ג'
16: 3, # 'ד'
3: 3, # 'ה'
2: 3, # 'ו'
24: 3, # 'ז'
14: 3, # 'ח'
22: 3, # 'ט'
1: 3, # 'י'
25: 2, # 'ך'
15: 3, # 'כ'
4: 3, # 'ל'
11: 3, # 'ם'
6: 3, # 'מ'
23: 3, # 'ן'
12: 3, # 'נ'
19: 3, # 'ס'
13: 3, # 'ע'
26: 2, # 'ף'
18: 3, # 'פ'
27: 2, # 'ץ'
21: 3, # 'צ'
17: 3, # 'ק'
7: 3, # 'ר'
10: 3, # 'ש'
5: 3, # 'ת'
32: 0, # '–'
52: 0, # '’'
47: 0, # '“'
46: 0, # '”'
58: 0, # '†'
40: 0, # '…'
},
19: { # 'ס'
50: 0, # 'a'
60: 0, # 'c'
61: 0, # 'd'
42: 0, # 'e'
53: 0, # 'i'
56: 0, # 'l'
54: 0, # 'n'
49: 0, # 'o'
51: 0, # 'r'
43: 0, # 's'
44: 0, # 't'
63: 0, # 'u'
34: 1, # '\xa0'
55: 1, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 2, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 2, # 'ִ'
37: 1, # 'ֵ'
36: 2, # 'ֶ'
31: 2, # 'ַ'
29: 1, # 'ָ'
35: 1, # 'ֹ'
62: 2, # 'ֻ'
28: 2, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 2, # 'א'
8: 3, # 'ב'
20: 3, # 'ג'
16: 3, # 'ד'
3: 3, # 'ה'
2: 3, # 'ו'
24: 1, # 'ז'
14: 3, # 'ח'
22: 3, # 'ט'
1: 3, # 'י'
25: 2, # 'ך'
15: 3, # 'כ'
4: 3, # 'ל'
11: 2, # 'ם'
6: 3, # 'מ'
23: 2, # 'ן'
12: 3, # 'נ'
19: 2, # 'ס'
13: 3, # 'ע'
26: 3, # 'ף'
18: 3, # 'פ'
27: 0, # 'ץ'
21: 2, # 'צ'
17: 3, # 'ק'
7: 3, # 'ר'
10: 1, # 'ש'
5: 3, # 'ת'
32: 0, # '–'
52: 0, # '’'
47: 0, # '“'
46: 1, # '”'
58: 0, # '†'
40: 1, # '…'
},
13: { # 'ע'
50: 0, # 'a'
60: 0, # 'c'
61: 0, # 'd'
42: 0, # 'e'
53: 0, # 'i'
56: 0, # 'l'
54: 0, # 'n'
49: 0, # 'o'
51: 0, # 'r'
43: 0, # 's'
44: 0, # 't'
63: 0, # 'u'
34: 0, # '\xa0'
55: 0, # '´'
48: 1, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 1, # 'ְ'
59: 1, # 'ֱ'
41: 2, # 'ֲ'
33: 2, # 'ִ'
37: 2, # 'ֵ'
36: 2, # 'ֶ'
31: 2, # 'ַ'
29: 2, # 'ָ'
35: 2, # 'ֹ'
62: 1, # 'ֻ'
28: 0, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 2, # 'א'
8: 3, # 'ב'
20: 3, # 'ג'
16: 3, # 'ד'
3: 3, # 'ה'
2: 3, # 'ו'
24: 3, # 'ז'
14: 1, # 'ח'
22: 3, # 'ט'
1: 3, # 'י'
25: 2, # 'ך'
15: 2, # 'כ'
4: 3, # 'ל'
11: 3, # 'ם'
6: 3, # 'מ'
23: 2, # 'ן'
12: 3, # 'נ'
19: 3, # 'ס'
13: 2, # 'ע'
26: 1, # 'ף'
18: 2, # 'פ'
27: 2, # 'ץ'
21: 3, # 'צ'
17: 3, # 'ק'
7: 3, # 'ר'
10: 3, # 'ש'
5: 3, # 'ת'
32: 0, # '–'
52: 0, # '’'
47: 0, # '“'
46: 1, # '”'
58: 0, # '†'
40: 1, # '…'
},
26: { # 'ף'
50: 0, # 'a'
60: 0, # 'c'
61: 0, # 'd'
42: 0, # 'e'
53: 0, # 'i'
56: 0, # 'l'
54: 0, # 'n'
49: 0, # 'o'
51: 0, # 'r'
43: 0, # 's'
44: 0, # 't'
63: 0, # 'u'
34: 0, # '\xa0'
55: 0, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 0, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 0, # 'ִ'
37: 0, # 'ֵ'
36: 0, # 'ֶ'
31: 0, # 'ַ'
29: 0, # 'ָ'
35: 0, # 'ֹ'
62: 0, # 'ֻ'
28: 0, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 1, # 'א'
8: 0, # 'ב'
20: 0, # 'ג'
16: 0, # 'ד'
3: 0, # 'ה'
2: 1, # 'ו'
24: 0, # 'ז'
14: 1, # 'ח'
22: 0, # 'ט'
1: 0, # 'י'
25: 0, # 'ך'
15: 1, # 'כ'
4: 1, # 'ל'
11: 0, # 'ם'
6: 1, # 'מ'
23: 0, # 'ן'
12: 0, # 'נ'
19: 1, # 'ס'
13: 0, # 'ע'
26: 1, # 'ף'
18: 1, # 'פ'
27: 0, # 'ץ'
21: 0, # 'צ'
17: 1, # 'ק'
7: 1, # 'ר'
10: 1, # 'ש'
5: 0, # 'ת'
32: 0, # '–'
52: 0, # '’'
47: 0, # '“'
46: 0, # '”'
58: 0, # '†'
40: 1, # '…'
},
18: { # 'פ'
50: 0, # 'a'
60: 0, # 'c'
61: 0, # 'd'
42: 0, # 'e'
53: 0, # 'i'
56: 0, # 'l'
54: 0, # 'n'
49: 0, # 'o'
51: 0, # 'r'
43: 0, # 's'
44: 0, # 't'
63: 0, # 'u'
34: 0, # '\xa0'
55: 1, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 2, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 2, # 'ִ'
37: 1, # 'ֵ'
36: 2, # 'ֶ'
31: 1, # 'ַ'
29: 2, # 'ָ'
35: 1, # 'ֹ'
62: 1, # 'ֻ'
28: 2, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 3, # 'א'
8: 2, # 'ב'
20: 3, # 'ג'
16: 2, # 'ד'
3: 3, # 'ה'
2: 3, # 'ו'
24: 2, # 'ז'
14: 3, # 'ח'
22: 3, # 'ט'
1: 3, # 'י'
25: 2, # 'ך'
15: 3, # 'כ'
4: 3, # 'ל'
11: 2, # 'ם'
6: 2, # 'מ'
23: 3, # 'ן'
12: 3, # 'נ'
19: 3, # 'ס'
13: 3, # 'ע'
26: 2, # 'ף'
18: 2, # 'פ'
27: 2, # 'ץ'
21: 3, # 'צ'
17: 3, # 'ק'
7: 3, # 'ר'
10: 3, # 'ש'
5: 3, # 'ת'
32: 0, # '–'
52: 0, # '’'
47: 0, # '“'
46: 1, # '”'
58: 0, # '†'
40: 0, # '…'
},
27: { # 'ץ'
50: 0, # 'a'
60: 0, # 'c'
61: 0, # 'd'
42: 0, # 'e'
53: 0, # 'i'
56: 0, # 'l'
54: 0, # 'n'
49: 0, # 'o'
51: 0, # 'r'
43: 0, # 's'
44: 0, # 't'
63: 0, # 'u'
34: 0, # '\xa0'
55: 1, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 0, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 0, # 'ִ'
37: 0, # 'ֵ'
36: 0, # 'ֶ'
31: 0, # 'ַ'
29: 0, # 'ָ'
35: 0, # 'ֹ'
62: 0, # 'ֻ'
28: 0, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 1, # 'א'
8: 0, # 'ב'
20: 0, # 'ג'
16: 0, # 'ד'
3: 0, # 'ה'
2: 0, # 'ו'
24: 0, # 'ז'
14: 0, # 'ח'
22: 0, # 'ט'
1: 0, # 'י'
25: 0, # 'ך'
15: 0, # 'כ'
4: 1, # 'ל'
11: 0, # 'ם'
6: 0, # 'מ'
23: 0, # 'ן'
12: 0, # 'נ'
19: 1, # 'ס'
13: 0, # 'ע'
26: 0, # 'ף'
18: 0, # 'פ'
27: 0, # 'ץ'
21: 0, # 'צ'
17: 0, # 'ק'
7: 1, # 'ר'
10: 0, # 'ש'
5: 1, # 'ת'
32: 0, # '–'
52: 0, # '’'
47: 0, # '“'
46: 0, # '”'
58: 0, # '†'
40: 1, # '…'
},
21: { # 'צ'
50: 0, # 'a'
60: 0, # 'c'
61: 0, # 'd'
42: 0, # 'e'
53: 0, # 'i'
56: 0, # 'l'
54: 0, # 'n'
49: 0, # 'o'
51: 0, # 'r'
43: 0, # 's'
44: 0, # 't'
63: 0, # 'u'
34: 0, # '\xa0'
55: 1, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 2, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 2, # 'ִ'
37: 2, # 'ֵ'
36: 1, # 'ֶ'
31: 2, # 'ַ'
29: 2, # 'ָ'
35: 1, # 'ֹ'
62: 1, # 'ֻ'
28: 2, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 3, # 'א'
8: 3, # 'ב'
20: 2, # 'ג'
16: 3, # 'ד'
3: 3, # 'ה'
2: 3, # 'ו'
24: 1, # 'ז'
14: 3, # 'ח'
22: 2, # 'ט'
1: 3, # 'י'
25: 1, # 'ך'
15: 1, # 'כ'
4: 3, # 'ל'
11: 2, # 'ם'
6: 3, # 'מ'
23: 2, # 'ן'
12: 3, # 'נ'
19: 1, # 'ס'
13: 3, # 'ע'
26: 2, # 'ף'
18: 3, # 'פ'
27: 2, # 'ץ'
21: 2, # 'צ'
17: 3, # 'ק'
7: 3, # 'ר'
10: 0, # 'ש'
5: 3, # 'ת'
32: 0, # '–'
52: 0, # '’'
47: 0, # '“'
46: 0, # '”'
58: 0, # '†'
40: 0, # '…'
},
17: { # 'ק'
50: 0, # 'a'
60: 0, # 'c'
61: 0, # 'd'
42: 0, # 'e'
53: 0, # 'i'
56: 0, # 'l'
54: 0, # 'n'
49: 0, # 'o'
51: 0, # 'r'
43: 0, # 's'
44: 0, # 't'
63: 0, # 'u'
34: 1, # '\xa0'
55: 1, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 2, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 2, # 'ִ'
37: 2, # 'ֵ'
36: 1, # 'ֶ'
31: 2, # 'ַ'
29: 2, # 'ָ'
35: 2, # 'ֹ'
62: 1, # 'ֻ'
28: 2, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 3, # 'א'
8: 3, # 'ב'
20: 2, # 'ג'
16: 3, # 'ד'
3: 3, # 'ה'
2: 3, # 'ו'
24: 2, # 'ז'
14: 3, # 'ח'
22: 3, # 'ט'
1: 3, # 'י'
25: 1, # 'ך'
15: 1, # 'כ'
4: 3, # 'ל'
11: 2, # 'ם'
6: 3, # 'מ'
23: 2, # 'ן'
12: 3, # 'נ'
19: 3, # 'ס'
13: 3, # 'ע'
26: 2, # 'ף'
18: 3, # 'פ'
27: 2, # 'ץ'
21: 3, # 'צ'
17: 2, # 'ק'
7: 3, # 'ר'
10: 3, # 'ש'
5: 3, # 'ת'
32: 0, # '–'
52: 1, # '’'
47: 0, # '“'
46: 1, # '”'
58: 0, # '†'
40: 1, # '…'
},
7: { # 'ר'
50: 0, # 'a'
60: 0, # 'c'
61: 0, # 'd'
42: 0, # 'e'
53: 0, # 'i'
56: 0, # 'l'
54: 0, # 'n'
49: 0, # 'o'
51: 0, # 'r'
43: 0, # 's'
44: 0, # 't'
63: 0, # 'u'
34: 1, # '\xa0'
55: 2, # '´'
48: 1, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 2, # 'ְ'
59: 0, # 'ֱ'
41: 1, # 'ֲ'
33: 2, # 'ִ'
37: 2, # 'ֵ'
36: 2, # 'ֶ'
31: 2, # 'ַ'
29: 2, # 'ָ'
35: 2, # 'ֹ'
62: 1, # 'ֻ'
28: 0, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 3, # 'א'
8: 3, # 'ב'
20: 3, # 'ג'
16: 3, # 'ד'
3: 3, # 'ה'
2: 3, # 'ו'
24: 3, # 'ז'
14: 3, # 'ח'
22: 3, # 'ט'
1: 3, # 'י'
25: 3, # 'ך'
15: 3, # 'כ'
4: 3, # 'ל'
11: 3, # 'ם'
6: 3, # 'מ'
23: 3, # 'ן'
12: 3, # 'נ'
19: 3, # 'ס'
13: 3, # 'ע'
26: 2, # 'ף'
18: 3, # 'פ'
27: 3, # 'ץ'
21: 3, # 'צ'
17: 3, # 'ק'
7: 3, # 'ר'
10: 3, # 'ש'
5: 3, # 'ת'
32: 0, # '–'
52: 0, # '’'
47: 0, # '“'
46: 1, # '”'
58: 0, # '†'
40: 2, # '…'
},
10: { # 'ש'
50: 0, # 'a'
60: 0, # 'c'
61: 0, # 'd'
42: 0, # 'e'
53: 0, # 'i'
56: 0, # 'l'
54: 0, # 'n'
49: 0, # 'o'
51: 0, # 'r'
43: 0, # 's'
44: 0, # 't'
63: 0, # 'u'
34: 1, # '\xa0'
55: 0, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 1, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 1, # 'ִ'
37: 1, # 'ֵ'
36: 1, # 'ֶ'
31: 1, # 'ַ'
29: 1, # 'ָ'
35: 1, # 'ֹ'
62: 1, # 'ֻ'
28: 2, # 'ּ'
38: 3, # 'ׁ'
45: 2, # 'ׂ'
9: 3, # 'א'
8: 3, # 'ב'
20: 3, # 'ג'
16: 3, # 'ד'
3: 3, # 'ה'
2: 3, # 'ו'
24: 2, # 'ז'
14: 3, # 'ח'
22: 3, # 'ט'
1: 3, # 'י'
25: 3, # 'ך'
15: 3, # 'כ'
4: 3, # 'ל'
11: 3, # 'ם'
6: 3, # 'מ'
23: 2, # 'ן'
12: 3, # 'נ'
19: 2, # 'ס'
13: 3, # 'ע'
26: 2, # 'ף'
18: 3, # 'פ'
27: 1, # 'ץ'
21: 2, # 'צ'
17: 3, # 'ק'
7: 3, # 'ר'
10: 3, # 'ש'
5: 3, # 'ת'
32: 0, # '–'
52: 0, # '’'
47: 0, # '“'
46: 1, # '”'
58: 0, # '†'
40: 1, # '…'
},
5: { # 'ת'
50: 0, # 'a'
60: 0, # 'c'
61: 0, # 'd'
42: 0, # 'e'
53: 0, # 'i'
56: 0, # 'l'
54: 0, # 'n'
49: 0, # 'o'
51: 0, # 'r'
43: 0, # 's'
44: 0, # 't'
63: 0, # 'u'
34: 1, # '\xa0'
55: 0, # '´'
48: 1, # '¼'
39: 1, # '½'
57: 0, # '¾'
30: 2, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 2, # 'ִ'
37: 2, # 'ֵ'
36: 2, # 'ֶ'
31: 2, # 'ַ'
29: 2, # 'ָ'
35: 1, # 'ֹ'
62: 1, # 'ֻ'
28: 2, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 3, # 'א'
8: 3, # 'ב'
20: 3, # 'ג'
16: 2, # 'ד'
3: 3, # 'ה'
2: 3, # 'ו'
24: 2, # 'ז'
14: 3, # 'ח'
22: 2, # 'ט'
1: 3, # 'י'
25: 2, # 'ך'
15: 3, # 'כ'
4: 3, # 'ל'
11: 3, # 'ם'
6: 3, # 'מ'
23: 3, # 'ן'
12: 3, # 'נ'
19: 2, # 'ס'
13: 3, # 'ע'
26: 2, # 'ף'
18: 3, # 'פ'
27: 1, # 'ץ'
21: 2, # 'צ'
17: 3, # 'ק'
7: 3, # 'ר'
10: 3, # 'ש'
5: 3, # 'ת'
32: 1, # '–'
52: 1, # '’'
47: 0, # '“'
46: 0, # '”'
58: 0, # '†'
40: 2, # '…'
},
32: { # '–'
50: 0, # 'a'
60: 0, # 'c'
61: 0, # 'd'
42: 0, # 'e'
53: 0, # 'i'
56: 0, # 'l'
54: 1, # 'n'
49: 0, # 'o'
51: 0, # 'r'
43: 0, # 's'
44: 0, # 't'
63: 0, # 'u'
34: 0, # '\xa0'
55: 0, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 0, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 0, # 'ִ'
37: 0, # 'ֵ'
36: 0, # 'ֶ'
31: 0, # 'ַ'
29: 0, # 'ָ'
35: 0, # 'ֹ'
62: 0, # 'ֻ'
28: 0, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 1, # 'א'
8: 1, # 'ב'
20: 1, # 'ג'
16: 1, # 'ד'
3: 1, # 'ה'
2: 1, # 'ו'
24: 0, # 'ז'
14: 1, # 'ח'
22: 0, # 'ט'
1: 1, # 'י'
25: 0, # 'ך'
15: 1, # 'כ'
4: 1, # 'ל'
11: 0, # 'ם'
6: 1, # 'מ'
23: 0, # 'ן'
12: 0, # 'נ'
19: 1, # 'ס'
13: 1, # 'ע'
26: 0, # 'ף'
18: 1, # 'פ'
27: 0, # 'ץ'
21: 1, # 'צ'
17: 0, # 'ק'
7: 1, # 'ר'
10: 1, # 'ש'
5: 1, # 'ת'
32: 0, # '–'
52: 0, # '’'
47: 0, # '“'
46: 0, # '”'
58: 0, # '†'
40: 0, # '…'
},
52: { # '’'
50: 1, # 'a'
60: 0, # 'c'
61: 1, # 'd'
42: 1, # 'e'
53: 1, # 'i'
56: 1, # 'l'
54: 0, # 'n'
49: 0, # 'o'
51: 1, # 'r'
43: 2, # 's'
44: 2, # 't'
63: 1, # 'u'
34: 0, # '\xa0'
55: 0, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 0, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 0, # 'ִ'
37: 0, # 'ֵ'
36: 0, # 'ֶ'
31: 0, # 'ַ'
29: 0, # 'ָ'
35: 0, # 'ֹ'
62: 0, # 'ֻ'
28: 0, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 0, # 'א'
8: 0, # 'ב'
20: 0, # 'ג'
16: 0, # 'ד'
3: 0, # 'ה'
2: 1, # 'ו'
24: 0, # 'ז'
14: 0, # 'ח'
22: 0, # 'ט'
1: 0, # 'י'
25: 0, # 'ך'
15: 0, # 'כ'
4: 0, # 'ל'
11: 0, # 'ם'
6: 1, # 'מ'
23: 0, # 'ן'
12: 0, # 'נ'
19: 0, # 'ס'
13: 0, # 'ע'
26: 0, # 'ף'
18: 0, # 'פ'
27: 0, # 'ץ'
21: 0, # 'צ'
17: 0, # 'ק'
7: 0, # 'ר'
10: 0, # 'ש'
5: 1, # 'ת'
32: 0, # '–'
52: 0, # '’'
47: 0, # '“'
46: 0, # '”'
58: 0, # '†'
40: 0, # '…'
},
47: { # '“'
50: 1, # 'a'
60: 1, # 'c'
61: 1, # 'd'
42: 1, # 'e'
53: 1, # 'i'
56: 1, # 'l'
54: 1, # 'n'
49: 1, # 'o'
51: 1, # 'r'
43: 1, # 's'
44: 1, # 't'
63: 1, # 'u'
34: 0, # '\xa0'
55: 0, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 0, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 0, # 'ִ'
37: 0, # 'ֵ'
36: 0, # 'ֶ'
31: 0, # 'ַ'
29: 0, # 'ָ'
35: 0, # 'ֹ'
62: 0, # 'ֻ'
28: 0, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 2, # 'א'
8: 1, # 'ב'
20: 1, # 'ג'
16: 1, # 'ד'
3: 1, # 'ה'
2: 1, # 'ו'
24: 1, # 'ז'
14: 1, # 'ח'
22: 1, # 'ט'
1: 1, # 'י'
25: 0, # 'ך'
15: 1, # 'כ'
4: 1, # 'ל'
11: 0, # 'ם'
6: 1, # 'מ'
23: 0, # 'ן'
12: 1, # 'נ'
19: 1, # 'ס'
13: 1, # 'ע'
26: 0, # 'ף'
18: 1, # 'פ'
27: 0, # 'ץ'
21: 1, # 'צ'
17: 1, # 'ק'
7: 1, # 'ר'
10: 1, # 'ש'
5: 1, # 'ת'
32: 0, # '–'
52: 0, # '’'
47: 0, # '“'
46: 0, # '”'
58: 0, # '†'
40: 0, # '…'
},
46: { # '”'
50: 0, # 'a'
60: 0, # 'c'
61: 0, # 'd'
42: 0, # 'e'
53: 0, # 'i'
56: 0, # 'l'
54: 0, # 'n'
49: 0, # 'o'
51: 0, # 'r'
43: 0, # 's'
44: 1, # 't'
63: 0, # 'u'
34: 0, # '\xa0'
55: 0, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 0, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 0, # 'ִ'
37: 0, # 'ֵ'
36: 0, # 'ֶ'
31: 0, # 'ַ'
29: 0, # 'ָ'
35: 0, # 'ֹ'
62: 0, # 'ֻ'
28: 0, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 1, # 'א'
8: 1, # 'ב'
20: 1, # 'ג'
16: 0, # 'ד'
3: 0, # 'ה'
2: 0, # 'ו'
24: 0, # 'ז'
14: 0, # 'ח'
22: 0, # 'ט'
1: 1, # 'י'
25: 0, # 'ך'
15: 1, # 'כ'
4: 1, # 'ל'
11: 0, # 'ם'
6: 1, # 'מ'
23: 0, # 'ן'
12: 0, # 'נ'
19: 0, # 'ס'
13: 0, # 'ע'
26: 0, # 'ף'
18: 0, # 'פ'
27: 0, # 'ץ'
21: 1, # 'צ'
17: 0, # 'ק'
7: 1, # 'ר'
10: 0, # 'ש'
5: 0, # 'ת'
32: 0, # '–'
52: 0, # '’'
47: 0, # '“'
46: 0, # '”'
58: 0, # '†'
40: 0, # '…'
},
58: { # '†'
50: 0, # 'a'
60: 0, # 'c'
61: 0, # 'd'
42: 0, # 'e'
53: 0, # 'i'
56: 0, # 'l'
54: 0, # 'n'
49: 0, # 'o'
51: 0, # 'r'
43: 0, # 's'
44: 0, # 't'
63: 0, # 'u'
34: 0, # '\xa0'
55: 0, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 0, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 0, # 'ִ'
37: 0, # 'ֵ'
36: 0, # 'ֶ'
31: 0, # 'ַ'
29: 0, # 'ָ'
35: 0, # 'ֹ'
62: 0, # 'ֻ'
28: 0, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 0, # 'א'
8: 0, # 'ב'
20: 0, # 'ג'
16: 0, # 'ד'
3: 0, # 'ה'
2: 0, # 'ו'
24: 0, # 'ז'
14: 0, # 'ח'
22: 0, # 'ט'
1: 0, # 'י'
25: 0, # 'ך'
15: 0, # 'כ'
4: 0, # 'ל'
11: 0, # 'ם'
6: 0, # 'מ'
23: 0, # 'ן'
12: 0, # 'נ'
19: 0, # 'ס'
13: 0, # 'ע'
26: 0, # 'ף'
18: 0, # 'פ'
27: 0, # 'ץ'
21: 0, # 'צ'
17: 0, # 'ק'
7: 0, # 'ר'
10: 0, # 'ש'
5: 0, # 'ת'
32: 0, # '–'
52: 0, # '’'
47: 0, # '“'
46: 0, # '”'
58: 2, # '†'
40: 0, # '…'
},
40: { # '…'
50: 1, # 'a'
60: 1, # 'c'
61: 1, # 'd'
42: 1, # 'e'
53: 1, # 'i'
56: 0, # 'l'
54: 1, # 'n'
49: 0, # 'o'
51: 1, # 'r'
43: 1, # 's'
44: 1, # 't'
63: 0, # 'u'
34: 0, # '\xa0'
55: 0, # '´'
48: 0, # '¼'
39: 0, # '½'
57: 0, # '¾'
30: 0, # 'ְ'
59: 0, # 'ֱ'
41: 0, # 'ֲ'
33: 0, # 'ִ'
37: 0, # 'ֵ'
36: 0, # 'ֶ'
31: 0, # 'ַ'
29: 0, # 'ָ'
35: 0, # 'ֹ'
62: 0, # 'ֻ'
28: 0, # 'ּ'
38: 0, # 'ׁ'
45: 0, # 'ׂ'
9: 1, # 'א'
8: 0, # 'ב'
20: 0, # 'ג'
16: 0, # 'ד'
3: 1, # 'ה'
2: 1, # 'ו'
24: 1, # 'ז'
14: 0, # 'ח'
22: 0, # 'ט'
1: 1, # 'י'
25: 0, # 'ך'
15: 1, # 'כ'
4: 1, # 'ל'
11: 0, # 'ם'
6: 1, # 'מ'
23: 0, # 'ן'
12: 1, # 'נ'
19: 0, # 'ס'
13: 0, # 'ע'
26: 0, # 'ף'
18: 1, # 'פ'
27: 0, # 'ץ'
21: 0, # 'צ'
17: 0, # 'ק'
7: 1, # 'ר'
10: 1, # 'ש'
5: 1, # 'ת'
32: 0, # '–'
52: 0, # '’'
47: 0, # '“'
46: 1, # '”'
58: 0, # '†'
40: 2, # '…'
},
}
# 255: Undefined characters that did not exist in training text
# 254: Carriage/Return
# 253: symbol (punctuation) that does not belong to word
# 252: 0 - 9
# 251: Control characters
# Character Mapping Table(s):
WINDOWS_1255_HEBREW_CHAR_TO_ORDER = {
0: 255, # '\x00'
1: 255, # '\x01'
2: 255, # '\x02'
3: 255, # '\x03'
4: 255, # '\x04'
5: 255, # '\x05'
6: 255, # '\x06'
7: 255, # '\x07'
8: 255, # '\x08'
9: 255, # '\t'
10: 254, # '\n'
11: 255, # '\x0b'
12: 255, # '\x0c'
13: 254, # '\r'
14: 255, # '\x0e'
15: 255, # '\x0f'
16: 255, # '\x10'
17: 255, # '\x11'
18: 255, # '\x12'
19: 255, # '\x13'
20: 255, # '\x14'
21: 255, # '\x15'
22: 255, # '\x16'
23: 255, # '\x17'
24: 255, # '\x18'
25: 255, # '\x19'
26: 255, # '\x1a'
27: 255, # '\x1b'
28: 255, # '\x1c'
29: 255, # '\x1d'
30: 255, # '\x1e'
31: 255, # '\x1f'
32: 253, # ' '
33: 253, # '!'
34: 253, # '"'
35: 253, # '#'
36: 253, # '$'
37: 253, # '%'
38: 253, # '&'
39: 253, # "'"
40: 253, # '('
41: 253, # ')'
42: 253, # '*'
43: 253, # '+'
44: 253, # ','
45: 253, # '-'
46: 253, # '.'
47: 253, # '/'
48: 252, # '0'
49: 252, # '1'
50: 252, # '2'
51: 252, # '3'
52: 252, # '4'
53: 252, # '5'
54: 252, # '6'
55: 252, # '7'
56: 252, # '8'
57: 252, # '9'
58: 253, # ':'
59: 253, # ';'
60: 253, # '<'
61: 253, # '='
62: 253, # '>'
63: 253, # '?'
64: 253, # '@'
65: 69, # 'A'
66: 91, # 'B'
67: 79, # 'C'
68: 80, # 'D'
69: 92, # 'E'
70: 89, # 'F'
71: 97, # 'G'
72: 90, # 'H'
73: 68, # 'I'
74: 111, # 'J'
75: 112, # 'K'
76: 82, # 'L'
77: 73, # 'M'
78: 95, # 'N'
79: 85, # 'O'
80: 78, # 'P'
81: 121, # 'Q'
82: 86, # 'R'
83: 71, # 'S'
84: 67, # 'T'
85: 102, # 'U'
86: 107, # 'V'
87: 84, # 'W'
88: 114, # 'X'
89: 103, # 'Y'
90: 115, # 'Z'
91: 253, # '['
92: 253, # '\\'
93: 253, # ']'
94: 253, # '^'
95: 253, # '_'
96: 253, # '`'
97: 50, # 'a'
98: 74, # 'b'
99: 60, # 'c'
100: 61, # 'd'
101: 42, # 'e'
102: 76, # 'f'
103: 70, # 'g'
104: 64, # 'h'
105: 53, # 'i'
106: 105, # 'j'
107: 93, # 'k'
108: 56, # 'l'
109: 65, # 'm'
110: 54, # 'n'
111: 49, # 'o'
112: 66, # 'p'
113: 110, # 'q'
114: 51, # 'r'
115: 43, # 's'
116: 44, # 't'
117: 63, # 'u'
118: 81, # 'v'
119: 77, # 'w'
120: 98, # 'x'
121: 75, # 'y'
122: 108, # 'z'
123: 253, # '{'
124: 253, # '|'
125: 253, # '}'
126: 253, # '~'
127: 253, # '\x7f'
128: 124, # '€'
129: 202, # None
130: 203, # '‚'
131: 204, # 'ƒ'
132: 205, # '„'
133: 40, # '…'
134: 58, # '†'
135: 206, # '‡'
136: 207, # 'ˆ'
137: 208, # '‰'
138: 209, # None
139: 210, # '‹'
140: 211, # None
141: 212, # None
142: 213, # None
143: 214, # None
144: 215, # None
145: 83, # '‘'
146: 52, # '’'
147: 47, # '“'
148: 46, # '”'
149: 72, # '•'
150: 32, # '–'
151: 94, # '—'
152: 216, # '˜'
153: 113, # '™'
154: 217, # None
155: 109, # '›'
156: 218, # None
157: 219, # None
158: 220, # None
159: 221, # None
160: 34, # '\xa0'
161: 116, # '¡'
162: 222, # '¢'
163: 118, # '£'
164: 100, # '₪'
165: 223, # '¥'
166: 224, # '¦'
167: 117, # '§'
168: 119, # '¨'
169: 104, # '©'
170: 125, # '×'
171: 225, # '«'
172: 226, # '¬'
173: 87, # '\xad'
174: 99, # '®'
175: 227, # '¯'
176: 106, # '°'
177: 122, # '±'
178: 123, # '²'
179: 228, # '³'
180: 55, # '´'
181: 229, # 'µ'
182: 230, # '¶'
183: 101, # '·'
184: 231, # '¸'
185: 232, # '¹'
186: 120, # '÷'
187: 233, # '»'
188: 48, # '¼'
189: 39, # '½'
190: 57, # '¾'
191: 234, # '¿'
192: 30, # 'ְ'
193: 59, # 'ֱ'
194: 41, # 'ֲ'
195: 88, # 'ֳ'
196: 33, # 'ִ'
197: 37, # 'ֵ'
198: 36, # 'ֶ'
199: 31, # 'ַ'
200: 29, # 'ָ'
201: 35, # 'ֹ'
202: 235, # None
203: 62, # 'ֻ'
204: 28, # 'ּ'
205: 236, # 'ֽ'
206: 126, # '־'
207: 237, # 'ֿ'
208: 238, # '׀'
209: 38, # 'ׁ'
210: 45, # 'ׂ'
211: 239, # '׃'
212: 240, # 'װ'
213: 241, # 'ױ'
214: 242, # 'ײ'
215: 243, # '׳'
216: 127, # '״'
217: 244, # None
218: 245, # None
219: 246, # None
220: 247, # None
221: 248, # None
222: 249, # None
223: 250, # None
224: 9, # 'א'
225: 8, # 'ב'
226: 20, # 'ג'
227: 16, # 'ד'
228: 3, # 'ה'
229: 2, # 'ו'
230: 24, # 'ז'
231: 14, # 'ח'
232: 22, # 'ט'
233: 1, # 'י'
234: 25, # 'ך'
235: 15, # 'כ'
236: 4, # 'ל'
237: 11, # 'ם'
238: 6, # 'מ'
239: 23, # 'ן'
240: 12, # 'נ'
241: 19, # 'ס'
242: 13, # 'ע'
243: 26, # 'ף'
244: 18, # 'פ'
245: 27, # 'ץ'
246: 21, # 'צ'
247: 17, # 'ק'
248: 7, # 'ר'
249: 10, # 'ש'
250: 5, # 'ת'
251: 251, # None
252: 252, # None
253: 128, # '\u200e'
254: 96, # '\u200f'
255: 253, # None
}
WINDOWS_1255_HEBREW_MODEL = SingleByteCharSetModel(
charset_name="windows-1255",
language="Hebrew",
char_to_order_map=WINDOWS_1255_HEBREW_CHAR_TO_ORDER,
language_model=HEBREW_LANG_MODEL,
typical_positive_ratio=0.984004,
keep_ascii_letters=False,
alphabet="אבגדהוזחטיךכלםמןנסעףפץצקרשתװױײ",
)
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/chardet/langhebrewmodel.py
|
Python
|
mit
| 98,196 |
from pip._vendor.chardet.sbcharsetprober import SingleByteCharSetModel
# 3: Positive
# 2: Likely
# 1: Unlikely
# 0: Negative
HUNGARIAN_LANG_MODEL = {
28: { # 'A'
28: 0, # 'A'
40: 1, # 'B'
54: 1, # 'C'
45: 2, # 'D'
32: 1, # 'E'
50: 1, # 'F'
49: 2, # 'G'
38: 1, # 'H'
39: 2, # 'I'
53: 1, # 'J'
36: 2, # 'K'
41: 2, # 'L'
34: 1, # 'M'
35: 2, # 'N'
47: 1, # 'O'
46: 2, # 'P'
43: 2, # 'R'
33: 2, # 'S'
37: 2, # 'T'
57: 1, # 'U'
48: 1, # 'V'
55: 1, # 'Y'
52: 2, # 'Z'
2: 0, # 'a'
18: 1, # 'b'
26: 1, # 'c'
17: 2, # 'd'
1: 1, # 'e'
27: 1, # 'f'
12: 1, # 'g'
20: 1, # 'h'
9: 1, # 'i'
22: 1, # 'j'
7: 2, # 'k'
6: 2, # 'l'
13: 2, # 'm'
4: 2, # 'n'
8: 0, # 'o'
23: 2, # 'p'
10: 2, # 'r'
5: 1, # 's'
3: 1, # 't'
21: 1, # 'u'
19: 1, # 'v'
62: 1, # 'x'
16: 0, # 'y'
11: 3, # 'z'
51: 1, # 'Á'
44: 0, # 'É'
61: 1, # 'Í'
58: 0, # 'Ó'
59: 0, # 'Ö'
60: 0, # 'Ú'
63: 0, # 'Ü'
14: 0, # 'á'
15: 0, # 'é'
30: 0, # 'í'
25: 0, # 'ó'
24: 0, # 'ö'
31: 0, # 'ú'
29: 0, # 'ü'
42: 0, # 'ő'
56: 0, # 'ű'
},
40: { # 'B'
28: 2, # 'A'
40: 1, # 'B'
54: 1, # 'C'
45: 1, # 'D'
32: 2, # 'E'
50: 0, # 'F'
49: 0, # 'G'
38: 0, # 'H'
39: 1, # 'I'
53: 1, # 'J'
36: 1, # 'K'
41: 1, # 'L'
34: 0, # 'M'
35: 1, # 'N'
47: 2, # 'O'
46: 0, # 'P'
43: 1, # 'R'
33: 1, # 'S'
37: 1, # 'T'
57: 1, # 'U'
48: 1, # 'V'
55: 0, # 'Y'
52: 0, # 'Z'
2: 2, # 'a'
18: 0, # 'b'
26: 0, # 'c'
17: 0, # 'd'
1: 3, # 'e'
27: 0, # 'f'
12: 0, # 'g'
20: 0, # 'h'
9: 2, # 'i'
22: 1, # 'j'
7: 0, # 'k'
6: 1, # 'l'
13: 0, # 'm'
4: 0, # 'n'
8: 2, # 'o'
23: 1, # 'p'
10: 2, # 'r'
5: 0, # 's'
3: 0, # 't'
21: 3, # 'u'
19: 0, # 'v'
62: 0, # 'x'
16: 1, # 'y'
11: 0, # 'z'
51: 1, # 'Á'
44: 1, # 'É'
61: 1, # 'Í'
58: 1, # 'Ó'
59: 1, # 'Ö'
60: 1, # 'Ú'
63: 1, # 'Ü'
14: 2, # 'á'
15: 2, # 'é'
30: 1, # 'í'
25: 1, # 'ó'
24: 1, # 'ö'
31: 1, # 'ú'
29: 1, # 'ü'
42: 1, # 'ő'
56: 1, # 'ű'
},
54: { # 'C'
28: 1, # 'A'
40: 1, # 'B'
54: 1, # 'C'
45: 1, # 'D'
32: 1, # 'E'
50: 0, # 'F'
49: 0, # 'G'
38: 1, # 'H'
39: 2, # 'I'
53: 1, # 'J'
36: 1, # 'K'
41: 1, # 'L'
34: 1, # 'M'
35: 0, # 'N'
47: 1, # 'O'
46: 1, # 'P'
43: 1, # 'R'
33: 2, # 'S'
37: 1, # 'T'
57: 1, # 'U'
48: 0, # 'V'
55: 1, # 'Y'
52: 1, # 'Z'
2: 2, # 'a'
18: 0, # 'b'
26: 0, # 'c'
17: 0, # 'd'
1: 1, # 'e'
27: 0, # 'f'
12: 0, # 'g'
20: 1, # 'h'
9: 1, # 'i'
22: 0, # 'j'
7: 0, # 'k'
6: 1, # 'l'
13: 0, # 'm'
4: 0, # 'n'
8: 2, # 'o'
23: 0, # 'p'
10: 1, # 'r'
5: 3, # 's'
3: 0, # 't'
21: 1, # 'u'
19: 0, # 'v'
62: 0, # 'x'
16: 1, # 'y'
11: 1, # 'z'
51: 1, # 'Á'
44: 1, # 'É'
61: 1, # 'Í'
58: 0, # 'Ó'
59: 0, # 'Ö'
60: 0, # 'Ú'
63: 0, # 'Ü'
14: 1, # 'á'
15: 1, # 'é'
30: 1, # 'í'
25: 1, # 'ó'
24: 0, # 'ö'
31: 0, # 'ú'
29: 0, # 'ü'
42: 0, # 'ő'
56: 0, # 'ű'
},
45: { # 'D'
28: 2, # 'A'
40: 1, # 'B'
54: 0, # 'C'
45: 1, # 'D'
32: 2, # 'E'
50: 1, # 'F'
49: 1, # 'G'
38: 1, # 'H'
39: 2, # 'I'
53: 1, # 'J'
36: 1, # 'K'
41: 0, # 'L'
34: 1, # 'M'
35: 1, # 'N'
47: 2, # 'O'
46: 0, # 'P'
43: 1, # 'R'
33: 1, # 'S'
37: 1, # 'T'
57: 1, # 'U'
48: 1, # 'V'
55: 1, # 'Y'
52: 1, # 'Z'
2: 2, # 'a'
18: 0, # 'b'
26: 0, # 'c'
17: 0, # 'd'
1: 3, # 'e'
27: 0, # 'f'
12: 0, # 'g'
20: 0, # 'h'
9: 1, # 'i'
22: 0, # 'j'
7: 0, # 'k'
6: 0, # 'l'
13: 0, # 'm'
4: 0, # 'n'
8: 1, # 'o'
23: 0, # 'p'
10: 2, # 'r'
5: 0, # 's'
3: 0, # 't'
21: 2, # 'u'
19: 0, # 'v'
62: 0, # 'x'
16: 1, # 'y'
11: 1, # 'z'
51: 1, # 'Á'
44: 1, # 'É'
61: 1, # 'Í'
58: 1, # 'Ó'
59: 1, # 'Ö'
60: 1, # 'Ú'
63: 1, # 'Ü'
14: 1, # 'á'
15: 1, # 'é'
30: 1, # 'í'
25: 1, # 'ó'
24: 1, # 'ö'
31: 1, # 'ú'
29: 1, # 'ü'
42: 1, # 'ő'
56: 0, # 'ű'
},
32: { # 'E'
28: 1, # 'A'
40: 1, # 'B'
54: 1, # 'C'
45: 1, # 'D'
32: 1, # 'E'
50: 1, # 'F'
49: 2, # 'G'
38: 1, # 'H'
39: 1, # 'I'
53: 1, # 'J'
36: 2, # 'K'
41: 2, # 'L'
34: 2, # 'M'
35: 2, # 'N'
47: 1, # 'O'
46: 1, # 'P'
43: 2, # 'R'
33: 2, # 'S'
37: 2, # 'T'
57: 1, # 'U'
48: 1, # 'V'
55: 1, # 'Y'
52: 1, # 'Z'
2: 1, # 'a'
18: 1, # 'b'
26: 1, # 'c'
17: 2, # 'd'
1: 1, # 'e'
27: 1, # 'f'
12: 3, # 'g'
20: 1, # 'h'
9: 1, # 'i'
22: 1, # 'j'
7: 1, # 'k'
6: 2, # 'l'
13: 2, # 'm'
4: 2, # 'n'
8: 0, # 'o'
23: 1, # 'p'
10: 2, # 'r'
5: 2, # 's'
3: 1, # 't'
21: 2, # 'u'
19: 1, # 'v'
62: 1, # 'x'
16: 0, # 'y'
11: 3, # 'z'
51: 1, # 'Á'
44: 1, # 'É'
61: 0, # 'Í'
58: 1, # 'Ó'
59: 1, # 'Ö'
60: 0, # 'Ú'
63: 1, # 'Ü'
14: 0, # 'á'
15: 0, # 'é'
30: 0, # 'í'
25: 0, # 'ó'
24: 1, # 'ö'
31: 0, # 'ú'
29: 0, # 'ü'
42: 0, # 'ő'
56: 0, # 'ű'
},
50: { # 'F'
28: 1, # 'A'
40: 0, # 'B'
54: 0, # 'C'
45: 0, # 'D'
32: 1, # 'E'
50: 1, # 'F'
49: 0, # 'G'
38: 1, # 'H'
39: 1, # 'I'
53: 1, # 'J'
36: 1, # 'K'
41: 1, # 'L'
34: 1, # 'M'
35: 1, # 'N'
47: 1, # 'O'
46: 0, # 'P'
43: 1, # 'R'
33: 0, # 'S'
37: 1, # 'T'
57: 1, # 'U'
48: 0, # 'V'
55: 1, # 'Y'
52: 0, # 'Z'
2: 2, # 'a'
18: 0, # 'b'
26: 0, # 'c'
17: 0, # 'd'
1: 2, # 'e'
27: 1, # 'f'
12: 0, # 'g'
20: 0, # 'h'
9: 2, # 'i'
22: 1, # 'j'
7: 0, # 'k'
6: 1, # 'l'
13: 0, # 'm'
4: 0, # 'n'
8: 2, # 'o'
23: 0, # 'p'
10: 2, # 'r'
5: 0, # 's'
3: 0, # 't'
21: 1, # 'u'
19: 0, # 'v'
62: 0, # 'x'
16: 0, # 'y'
11: 0, # 'z'
51: 1, # 'Á'
44: 1, # 'É'
61: 0, # 'Í'
58: 1, # 'Ó'
59: 1, # 'Ö'
60: 0, # 'Ú'
63: 1, # 'Ü'
14: 1, # 'á'
15: 1, # 'é'
30: 0, # 'í'
25: 0, # 'ó'
24: 2, # 'ö'
31: 1, # 'ú'
29: 1, # 'ü'
42: 1, # 'ő'
56: 1, # 'ű'
},
49: { # 'G'
28: 2, # 'A'
40: 1, # 'B'
54: 1, # 'C'
45: 1, # 'D'
32: 2, # 'E'
50: 1, # 'F'
49: 1, # 'G'
38: 1, # 'H'
39: 1, # 'I'
53: 1, # 'J'
36: 1, # 'K'
41: 1, # 'L'
34: 1, # 'M'
35: 1, # 'N'
47: 1, # 'O'
46: 1, # 'P'
43: 1, # 'R'
33: 1, # 'S'
37: 1, # 'T'
57: 1, # 'U'
48: 1, # 'V'
55: 2, # 'Y'
52: 1, # 'Z'
2: 2, # 'a'
18: 0, # 'b'
26: 0, # 'c'
17: 0, # 'd'
1: 2, # 'e'
27: 0, # 'f'
12: 0, # 'g'
20: 0, # 'h'
9: 1, # 'i'
22: 0, # 'j'
7: 0, # 'k'
6: 1, # 'l'
13: 0, # 'm'
4: 0, # 'n'
8: 2, # 'o'
23: 0, # 'p'
10: 2, # 'r'
5: 0, # 's'
3: 0, # 't'
21: 1, # 'u'
19: 0, # 'v'
62: 0, # 'x'
16: 2, # 'y'
11: 0, # 'z'
51: 1, # 'Á'
44: 1, # 'É'
61: 1, # 'Í'
58: 1, # 'Ó'
59: 1, # 'Ö'
60: 1, # 'Ú'
63: 1, # 'Ü'
14: 1, # 'á'
15: 1, # 'é'
30: 0, # 'í'
25: 1, # 'ó'
24: 1, # 'ö'
31: 1, # 'ú'
29: 1, # 'ü'
42: 1, # 'ő'
56: 0, # 'ű'
},
38: { # 'H'
28: 2, # 'A'
40: 1, # 'B'
54: 1, # 'C'
45: 0, # 'D'
32: 1, # 'E'
50: 0, # 'F'
49: 0, # 'G'
38: 0, # 'H'
39: 1, # 'I'
53: 0, # 'J'
36: 0, # 'K'
41: 1, # 'L'
34: 0, # 'M'
35: 0, # 'N'
47: 1, # 'O'
46: 0, # 'P'
43: 1, # 'R'
33: 1, # 'S'
37: 1, # 'T'
57: 1, # 'U'
48: 0, # 'V'
55: 1, # 'Y'
52: 0, # 'Z'
2: 3, # 'a'
18: 0, # 'b'
26: 0, # 'c'
17: 0, # 'd'
1: 2, # 'e'
27: 0, # 'f'
12: 0, # 'g'
20: 0, # 'h'
9: 2, # 'i'
22: 1, # 'j'
7: 0, # 'k'
6: 1, # 'l'
13: 1, # 'm'
4: 0, # 'n'
8: 3, # 'o'
23: 0, # 'p'
10: 1, # 'r'
5: 0, # 's'
3: 0, # 't'
21: 2, # 'u'
19: 0, # 'v'
62: 0, # 'x'
16: 1, # 'y'
11: 0, # 'z'
51: 2, # 'Á'
44: 2, # 'É'
61: 1, # 'Í'
58: 1, # 'Ó'
59: 1, # 'Ö'
60: 1, # 'Ú'
63: 1, # 'Ü'
14: 2, # 'á'
15: 1, # 'é'
30: 2, # 'í'
25: 1, # 'ó'
24: 1, # 'ö'
31: 1, # 'ú'
29: 1, # 'ü'
42: 1, # 'ő'
56: 1, # 'ű'
},
39: { # 'I'
28: 2, # 'A'
40: 1, # 'B'
54: 1, # 'C'
45: 1, # 'D'
32: 1, # 'E'
50: 1, # 'F'
49: 1, # 'G'
38: 1, # 'H'
39: 2, # 'I'
53: 1, # 'J'
36: 2, # 'K'
41: 2, # 'L'
34: 1, # 'M'
35: 2, # 'N'
47: 1, # 'O'
46: 1, # 'P'
43: 1, # 'R'
33: 2, # 'S'
37: 1, # 'T'
57: 1, # 'U'
48: 1, # 'V'
55: 0, # 'Y'
52: 2, # 'Z'
2: 0, # 'a'
18: 1, # 'b'
26: 1, # 'c'
17: 2, # 'd'
1: 0, # 'e'
27: 1, # 'f'
12: 2, # 'g'
20: 1, # 'h'
9: 0, # 'i'
22: 1, # 'j'
7: 1, # 'k'
6: 2, # 'l'
13: 2, # 'm'
4: 1, # 'n'
8: 0, # 'o'
23: 1, # 'p'
10: 2, # 'r'
5: 2, # 's'
3: 2, # 't'
21: 0, # 'u'
19: 1, # 'v'
62: 0, # 'x'
16: 0, # 'y'
11: 1, # 'z'
51: 1, # 'Á'
44: 1, # 'É'
61: 0, # 'Í'
58: 1, # 'Ó'
59: 1, # 'Ö'
60: 1, # 'Ú'
63: 1, # 'Ü'
14: 0, # 'á'
15: 0, # 'é'
30: 0, # 'í'
25: 0, # 'ó'
24: 0, # 'ö'
31: 0, # 'ú'
29: 0, # 'ü'
42: 0, # 'ő'
56: 0, # 'ű'
},
53: { # 'J'
28: 2, # 'A'
40: 0, # 'B'
54: 1, # 'C'
45: 1, # 'D'
32: 2, # 'E'
50: 0, # 'F'
49: 0, # 'G'
38: 1, # 'H'
39: 1, # 'I'
53: 1, # 'J'
36: 1, # 'K'
41: 1, # 'L'
34: 1, # 'M'
35: 1, # 'N'
47: 1, # 'O'
46: 0, # 'P'
43: 0, # 'R'
33: 1, # 'S'
37: 1, # 'T'
57: 1, # 'U'
48: 0, # 'V'
55: 0, # 'Y'
52: 1, # 'Z'
2: 2, # 'a'
18: 0, # 'b'
26: 0, # 'c'
17: 0, # 'd'
1: 2, # 'e'
27: 0, # 'f'
12: 0, # 'g'
20: 0, # 'h'
9: 1, # 'i'
22: 0, # 'j'
7: 0, # 'k'
6: 0, # 'l'
13: 0, # 'm'
4: 0, # 'n'
8: 1, # 'o'
23: 0, # 'p'
10: 0, # 'r'
5: 0, # 's'
3: 0, # 't'
21: 2, # 'u'
19: 0, # 'v'
62: 0, # 'x'
16: 0, # 'y'
11: 0, # 'z'
51: 1, # 'Á'
44: 1, # 'É'
61: 0, # 'Í'
58: 1, # 'Ó'
59: 1, # 'Ö'
60: 1, # 'Ú'
63: 1, # 'Ü'
14: 2, # 'á'
15: 1, # 'é'
30: 0, # 'í'
25: 2, # 'ó'
24: 2, # 'ö'
31: 1, # 'ú'
29: 0, # 'ü'
42: 1, # 'ő'
56: 0, # 'ű'
},
36: { # 'K'
28: 2, # 'A'
40: 1, # 'B'
54: 1, # 'C'
45: 1, # 'D'
32: 2, # 'E'
50: 1, # 'F'
49: 0, # 'G'
38: 1, # 'H'
39: 2, # 'I'
53: 1, # 'J'
36: 1, # 'K'
41: 1, # 'L'
34: 1, # 'M'
35: 1, # 'N'
47: 2, # 'O'
46: 0, # 'P'
43: 1, # 'R'
33: 1, # 'S'
37: 1, # 'T'
57: 1, # 'U'
48: 1, # 'V'
55: 1, # 'Y'
52: 0, # 'Z'
2: 2, # 'a'
18: 0, # 'b'
26: 0, # 'c'
17: 0, # 'd'
1: 2, # 'e'
27: 1, # 'f'
12: 0, # 'g'
20: 1, # 'h'
9: 3, # 'i'
22: 0, # 'j'
7: 0, # 'k'
6: 1, # 'l'
13: 1, # 'm'
4: 1, # 'n'
8: 2, # 'o'
23: 0, # 'p'
10: 2, # 'r'
5: 0, # 's'
3: 0, # 't'
21: 1, # 'u'
19: 1, # 'v'
62: 0, # 'x'
16: 1, # 'y'
11: 0, # 'z'
51: 1, # 'Á'
44: 1, # 'É'
61: 1, # 'Í'
58: 1, # 'Ó'
59: 2, # 'Ö'
60: 1, # 'Ú'
63: 1, # 'Ü'
14: 2, # 'á'
15: 2, # 'é'
30: 1, # 'í'
25: 1, # 'ó'
24: 2, # 'ö'
31: 1, # 'ú'
29: 2, # 'ü'
42: 1, # 'ő'
56: 0, # 'ű'
},
41: { # 'L'
28: 2, # 'A'
40: 1, # 'B'
54: 1, # 'C'
45: 1, # 'D'
32: 2, # 'E'
50: 1, # 'F'
49: 1, # 'G'
38: 1, # 'H'
39: 2, # 'I'
53: 1, # 'J'
36: 1, # 'K'
41: 2, # 'L'
34: 1, # 'M'
35: 1, # 'N'
47: 2, # 'O'
46: 0, # 'P'
43: 1, # 'R'
33: 1, # 'S'
37: 2, # 'T'
57: 1, # 'U'
48: 1, # 'V'
55: 1, # 'Y'
52: 1, # 'Z'
2: 2, # 'a'
18: 0, # 'b'
26: 0, # 'c'
17: 0, # 'd'
1: 3, # 'e'
27: 0, # 'f'
12: 0, # 'g'
20: 0, # 'h'
9: 2, # 'i'
22: 1, # 'j'
7: 0, # 'k'
6: 1, # 'l'
13: 0, # 'm'
4: 0, # 'n'
8: 2, # 'o'
23: 0, # 'p'
10: 0, # 'r'
5: 0, # 's'
3: 0, # 't'
21: 2, # 'u'
19: 0, # 'v'
62: 0, # 'x'
16: 1, # 'y'
11: 0, # 'z'
51: 2, # 'Á'
44: 1, # 'É'
61: 1, # 'Í'
58: 1, # 'Ó'
59: 1, # 'Ö'
60: 1, # 'Ú'
63: 1, # 'Ü'
14: 2, # 'á'
15: 1, # 'é'
30: 1, # 'í'
25: 1, # 'ó'
24: 1, # 'ö'
31: 0, # 'ú'
29: 1, # 'ü'
42: 0, # 'ő'
56: 0, # 'ű'
},
34: { # 'M'
28: 2, # 'A'
40: 1, # 'B'
54: 0, # 'C'
45: 0, # 'D'
32: 2, # 'E'
50: 1, # 'F'
49: 0, # 'G'
38: 1, # 'H'
39: 2, # 'I'
53: 1, # 'J'
36: 1, # 'K'
41: 1, # 'L'
34: 1, # 'M'
35: 1, # 'N'
47: 1, # 'O'
46: 1, # 'P'
43: 1, # 'R'
33: 1, # 'S'
37: 1, # 'T'
57: 1, # 'U'
48: 1, # 'V'
55: 1, # 'Y'
52: 1, # 'Z'
2: 3, # 'a'
18: 0, # 'b'
26: 1, # 'c'
17: 0, # 'd'
1: 3, # 'e'
27: 0, # 'f'
12: 0, # 'g'
20: 0, # 'h'
9: 3, # 'i'
22: 0, # 'j'
7: 0, # 'k'
6: 0, # 'l'
13: 1, # 'm'
4: 1, # 'n'
8: 3, # 'o'
23: 0, # 'p'
10: 1, # 'r'
5: 0, # 's'
3: 0, # 't'
21: 2, # 'u'
19: 0, # 'v'
62: 0, # 'x'
16: 1, # 'y'
11: 0, # 'z'
51: 2, # 'Á'
44: 1, # 'É'
61: 1, # 'Í'
58: 1, # 'Ó'
59: 1, # 'Ö'
60: 1, # 'Ú'
63: 1, # 'Ü'
14: 2, # 'á'
15: 2, # 'é'
30: 1, # 'í'
25: 1, # 'ó'
24: 1, # 'ö'
31: 1, # 'ú'
29: 1, # 'ü'
42: 0, # 'ő'
56: 1, # 'ű'
},
35: { # 'N'
28: 2, # 'A'
40: 1, # 'B'
54: 1, # 'C'
45: 2, # 'D'
32: 2, # 'E'
50: 1, # 'F'
49: 1, # 'G'
38: 1, # 'H'
39: 1, # 'I'
53: 1, # 'J'
36: 1, # 'K'
41: 1, # 'L'
34: 1, # 'M'
35: 1, # 'N'
47: 1, # 'O'
46: 1, # 'P'
43: 1, # 'R'
33: 1, # 'S'
37: 2, # 'T'
57: 1, # 'U'
48: 1, # 'V'
55: 2, # 'Y'
52: 1, # 'Z'
2: 3, # 'a'
18: 0, # 'b'
26: 0, # 'c'
17: 0, # 'd'
1: 3, # 'e'
27: 0, # 'f'
12: 0, # 'g'
20: 0, # 'h'
9: 2, # 'i'
22: 0, # 'j'
7: 0, # 'k'
6: 0, # 'l'
13: 0, # 'm'
4: 1, # 'n'
8: 2, # 'o'
23: 0, # 'p'
10: 0, # 'r'
5: 0, # 's'
3: 0, # 't'
21: 1, # 'u'
19: 0, # 'v'
62: 0, # 'x'
16: 2, # 'y'
11: 0, # 'z'
51: 1, # 'Á'
44: 1, # 'É'
61: 1, # 'Í'
58: 1, # 'Ó'
59: 1, # 'Ö'
60: 1, # 'Ú'
63: 1, # 'Ü'
14: 1, # 'á'
15: 2, # 'é'
30: 1, # 'í'
25: 1, # 'ó'
24: 1, # 'ö'
31: 0, # 'ú'
29: 0, # 'ü'
42: 1, # 'ő'
56: 0, # 'ű'
},
47: { # 'O'
28: 1, # 'A'
40: 1, # 'B'
54: 1, # 'C'
45: 1, # 'D'
32: 1, # 'E'
50: 1, # 'F'
49: 1, # 'G'
38: 1, # 'H'
39: 1, # 'I'
53: 1, # 'J'
36: 2, # 'K'
41: 2, # 'L'
34: 2, # 'M'
35: 2, # 'N'
47: 1, # 'O'
46: 1, # 'P'
43: 2, # 'R'
33: 2, # 'S'
37: 2, # 'T'
57: 1, # 'U'
48: 1, # 'V'
55: 1, # 'Y'
52: 1, # 'Z'
2: 0, # 'a'
18: 1, # 'b'
26: 1, # 'c'
17: 1, # 'd'
1: 1, # 'e'
27: 1, # 'f'
12: 1, # 'g'
20: 1, # 'h'
9: 1, # 'i'
22: 1, # 'j'
7: 2, # 'k'
6: 2, # 'l'
13: 1, # 'm'
4: 1, # 'n'
8: 1, # 'o'
23: 1, # 'p'
10: 2, # 'r'
5: 1, # 's'
3: 2, # 't'
21: 1, # 'u'
19: 0, # 'v'
62: 1, # 'x'
16: 0, # 'y'
11: 1, # 'z'
51: 1, # 'Á'
44: 1, # 'É'
61: 0, # 'Í'
58: 1, # 'Ó'
59: 0, # 'Ö'
60: 0, # 'Ú'
63: 0, # 'Ü'
14: 0, # 'á'
15: 0, # 'é'
30: 0, # 'í'
25: 0, # 'ó'
24: 0, # 'ö'
31: 0, # 'ú'
29: 0, # 'ü'
42: 0, # 'ő'
56: 0, # 'ű'
},
46: { # 'P'
28: 1, # 'A'
40: 1, # 'B'
54: 1, # 'C'
45: 1, # 'D'
32: 1, # 'E'
50: 1, # 'F'
49: 1, # 'G'
38: 1, # 'H'
39: 1, # 'I'
53: 1, # 'J'
36: 1, # 'K'
41: 1, # 'L'
34: 0, # 'M'
35: 1, # 'N'
47: 1, # 'O'
46: 1, # 'P'
43: 2, # 'R'
33: 1, # 'S'
37: 1, # 'T'
57: 1, # 'U'
48: 1, # 'V'
55: 0, # 'Y'
52: 1, # 'Z'
2: 2, # 'a'
18: 0, # 'b'
26: 0, # 'c'
17: 0, # 'd'
1: 2, # 'e'
27: 1, # 'f'
12: 0, # 'g'
20: 1, # 'h'
9: 2, # 'i'
22: 0, # 'j'
7: 0, # 'k'
6: 1, # 'l'
13: 0, # 'm'
4: 1, # 'n'
8: 2, # 'o'
23: 0, # 'p'
10: 2, # 'r'
5: 1, # 's'
3: 0, # 't'
21: 1, # 'u'
19: 0, # 'v'
62: 0, # 'x'
16: 1, # 'y'
11: 0, # 'z'
51: 2, # 'Á'
44: 1, # 'É'
61: 1, # 'Í'
58: 1, # 'Ó'
59: 1, # 'Ö'
60: 0, # 'Ú'
63: 1, # 'Ü'
14: 3, # 'á'
15: 2, # 'é'
30: 0, # 'í'
25: 1, # 'ó'
24: 1, # 'ö'
31: 0, # 'ú'
29: 1, # 'ü'
42: 1, # 'ő'
56: 0, # 'ű'
},
43: { # 'R'
28: 2, # 'A'
40: 1, # 'B'
54: 1, # 'C'
45: 1, # 'D'
32: 2, # 'E'
50: 1, # 'F'
49: 1, # 'G'
38: 1, # 'H'
39: 2, # 'I'
53: 1, # 'J'
36: 1, # 'K'
41: 1, # 'L'
34: 1, # 'M'
35: 1, # 'N'
47: 2, # 'O'
46: 1, # 'P'
43: 1, # 'R'
33: 2, # 'S'
37: 2, # 'T'
57: 1, # 'U'
48: 1, # 'V'
55: 1, # 'Y'
52: 1, # 'Z'
2: 2, # 'a'
18: 0, # 'b'
26: 0, # 'c'
17: 0, # 'd'
1: 2, # 'e'
27: 0, # 'f'
12: 0, # 'g'
20: 1, # 'h'
9: 2, # 'i'
22: 0, # 'j'
7: 0, # 'k'
6: 0, # 'l'
13: 0, # 'm'
4: 0, # 'n'
8: 2, # 'o'
23: 0, # 'p'
10: 0, # 'r'
5: 0, # 's'
3: 0, # 't'
21: 1, # 'u'
19: 0, # 'v'
62: 0, # 'x'
16: 1, # 'y'
11: 0, # 'z'
51: 2, # 'Á'
44: 1, # 'É'
61: 1, # 'Í'
58: 2, # 'Ó'
59: 1, # 'Ö'
60: 1, # 'Ú'
63: 1, # 'Ü'
14: 2, # 'á'
15: 2, # 'é'
30: 1, # 'í'
25: 2, # 'ó'
24: 1, # 'ö'
31: 1, # 'ú'
29: 1, # 'ü'
42: 0, # 'ő'
56: 0, # 'ű'
},
33: { # 'S'
28: 2, # 'A'
40: 1, # 'B'
54: 1, # 'C'
45: 1, # 'D'
32: 2, # 'E'
50: 1, # 'F'
49: 1, # 'G'
38: 1, # 'H'
39: 2, # 'I'
53: 1, # 'J'
36: 1, # 'K'
41: 1, # 'L'
34: 1, # 'M'
35: 1, # 'N'
47: 2, # 'O'
46: 1, # 'P'
43: 1, # 'R'
33: 2, # 'S'
37: 2, # 'T'
57: 1, # 'U'
48: 1, # 'V'
55: 1, # 'Y'
52: 3, # 'Z'
2: 2, # 'a'
18: 0, # 'b'
26: 1, # 'c'
17: 0, # 'd'
1: 2, # 'e'
27: 0, # 'f'
12: 0, # 'g'
20: 1, # 'h'
9: 2, # 'i'
22: 0, # 'j'
7: 1, # 'k'
6: 1, # 'l'
13: 1, # 'm'
4: 0, # 'n'
8: 2, # 'o'
23: 1, # 'p'
10: 0, # 'r'
5: 0, # 's'
3: 1, # 't'
21: 1, # 'u'
19: 1, # 'v'
62: 0, # 'x'
16: 1, # 'y'
11: 3, # 'z'
51: 2, # 'Á'
44: 1, # 'É'
61: 1, # 'Í'
58: 1, # 'Ó'
59: 1, # 'Ö'
60: 1, # 'Ú'
63: 1, # 'Ü'
14: 2, # 'á'
15: 1, # 'é'
30: 1, # 'í'
25: 1, # 'ó'
24: 1, # 'ö'
31: 1, # 'ú'
29: 1, # 'ü'
42: 1, # 'ő'
56: 1, # 'ű'
},
37: { # 'T'
28: 2, # 'A'
40: 1, # 'B'
54: 1, # 'C'
45: 1, # 'D'
32: 2, # 'E'
50: 1, # 'F'
49: 1, # 'G'
38: 1, # 'H'
39: 2, # 'I'
53: 1, # 'J'
36: 1, # 'K'
41: 1, # 'L'
34: 1, # 'M'
35: 1, # 'N'
47: 2, # 'O'
46: 1, # 'P'
43: 2, # 'R'
33: 1, # 'S'
37: 2, # 'T'
57: 1, # 'U'
48: 1, # 'V'
55: 1, # 'Y'
52: 1, # 'Z'
2: 2, # 'a'
18: 0, # 'b'
26: 0, # 'c'
17: 0, # 'd'
1: 2, # 'e'
27: 0, # 'f'
12: 0, # 'g'
20: 1, # 'h'
9: 2, # 'i'
22: 0, # 'j'
7: 0, # 'k'
6: 0, # 'l'
13: 0, # 'm'
4: 0, # 'n'
8: 2, # 'o'
23: 0, # 'p'
10: 1, # 'r'
5: 1, # 's'
3: 0, # 't'
21: 2, # 'u'
19: 0, # 'v'
62: 0, # 'x'
16: 1, # 'y'
11: 1, # 'z'
51: 2, # 'Á'
44: 2, # 'É'
61: 1, # 'Í'
58: 1, # 'Ó'
59: 1, # 'Ö'
60: 1, # 'Ú'
63: 1, # 'Ü'
14: 2, # 'á'
15: 1, # 'é'
30: 1, # 'í'
25: 1, # 'ó'
24: 2, # 'ö'
31: 1, # 'ú'
29: 1, # 'ü'
42: 1, # 'ő'
56: 1, # 'ű'
},
57: { # 'U'
28: 1, # 'A'
40: 1, # 'B'
54: 1, # 'C'
45: 1, # 'D'
32: 1, # 'E'
50: 1, # 'F'
49: 1, # 'G'
38: 1, # 'H'
39: 1, # 'I'
53: 1, # 'J'
36: 1, # 'K'
41: 1, # 'L'
34: 1, # 'M'
35: 1, # 'N'
47: 1, # 'O'
46: 1, # 'P'
43: 1, # 'R'
33: 2, # 'S'
37: 1, # 'T'
57: 0, # 'U'
48: 1, # 'V'
55: 0, # 'Y'
52: 1, # 'Z'
2: 0, # 'a'
18: 1, # 'b'
26: 1, # 'c'
17: 1, # 'd'
1: 1, # 'e'
27: 0, # 'f'
12: 2, # 'g'
20: 0, # 'h'
9: 0, # 'i'
22: 1, # 'j'
7: 1, # 'k'
6: 1, # 'l'
13: 1, # 'm'
4: 1, # 'n'
8: 0, # 'o'
23: 1, # 'p'
10: 1, # 'r'
5: 1, # 's'
3: 1, # 't'
21: 0, # 'u'
19: 0, # 'v'
62: 0, # 'x'
16: 0, # 'y'
11: 1, # 'z'
51: 0, # 'Á'
44: 0, # 'É'
61: 1, # 'Í'
58: 0, # 'Ó'
59: 0, # 'Ö'
60: 0, # 'Ú'
63: 0, # 'Ü'
14: 0, # 'á'
15: 0, # 'é'
30: 0, # 'í'
25: 0, # 'ó'
24: 0, # 'ö'
31: 0, # 'ú'
29: 0, # 'ü'
42: 0, # 'ő'
56: 0, # 'ű'
},
48: { # 'V'
28: 2, # 'A'
40: 0, # 'B'
54: 0, # 'C'
45: 1, # 'D'
32: 2, # 'E'
50: 1, # 'F'
49: 0, # 'G'
38: 0, # 'H'
39: 2, # 'I'
53: 1, # 'J'
36: 1, # 'K'
41: 0, # 'L'
34: 1, # 'M'
35: 1, # 'N'
47: 1, # 'O'
46: 1, # 'P'
43: 1, # 'R'
33: 1, # 'S'
37: 1, # 'T'
57: 1, # 'U'
48: 1, # 'V'
55: 1, # 'Y'
52: 0, # 'Z'
2: 3, # 'a'
18: 0, # 'b'
26: 0, # 'c'
17: 0, # 'd'
1: 2, # 'e'
27: 0, # 'f'
12: 0, # 'g'
20: 0, # 'h'
9: 2, # 'i'
22: 0, # 'j'
7: 0, # 'k'
6: 1, # 'l'
13: 0, # 'm'
4: 0, # 'n'
8: 2, # 'o'
23: 0, # 'p'
10: 0, # 'r'
5: 0, # 's'
3: 0, # 't'
21: 1, # 'u'
19: 0, # 'v'
62: 0, # 'x'
16: 0, # 'y'
11: 0, # 'z'
51: 2, # 'Á'
44: 2, # 'É'
61: 1, # 'Í'
58: 1, # 'Ó'
59: 1, # 'Ö'
60: 0, # 'Ú'
63: 1, # 'Ü'
14: 2, # 'á'
15: 2, # 'é'
30: 1, # 'í'
25: 0, # 'ó'
24: 1, # 'ö'
31: 0, # 'ú'
29: 0, # 'ü'
42: 0, # 'ő'
56: 0, # 'ű'
},
55: { # 'Y'
28: 2, # 'A'
40: 1, # 'B'
54: 1, # 'C'
45: 1, # 'D'
32: 2, # 'E'
50: 1, # 'F'
49: 1, # 'G'
38: 1, # 'H'
39: 1, # 'I'
53: 1, # 'J'
36: 1, # 'K'
41: 1, # 'L'
34: 1, # 'M'
35: 1, # 'N'
47: 1, # 'O'
46: 1, # 'P'
43: 1, # 'R'
33: 1, # 'S'
37: 1, # 'T'
57: 1, # 'U'
48: 1, # 'V'
55: 0, # 'Y'
52: 2, # 'Z'
2: 1, # 'a'
18: 0, # 'b'
26: 0, # 'c'
17: 1, # 'd'
1: 1, # 'e'
27: 0, # 'f'
12: 0, # 'g'
20: 0, # 'h'
9: 0, # 'i'
22: 0, # 'j'
7: 0, # 'k'
6: 0, # 'l'
13: 0, # 'm'
4: 0, # 'n'
8: 1, # 'o'
23: 1, # 'p'
10: 0, # 'r'
5: 0, # 's'
3: 0, # 't'
21: 0, # 'u'
19: 1, # 'v'
62: 0, # 'x'
16: 0, # 'y'
11: 0, # 'z'
51: 1, # 'Á'
44: 1, # 'É'
61: 1, # 'Í'
58: 1, # 'Ó'
59: 1, # 'Ö'
60: 1, # 'Ú'
63: 1, # 'Ü'
14: 0, # 'á'
15: 0, # 'é'
30: 0, # 'í'
25: 0, # 'ó'
24: 0, # 'ö'
31: 0, # 'ú'
29: 0, # 'ü'
42: 0, # 'ő'
56: 0, # 'ű'
},
52: { # 'Z'
28: 2, # 'A'
40: 1, # 'B'
54: 0, # 'C'
45: 1, # 'D'
32: 2, # 'E'
50: 1, # 'F'
49: 1, # 'G'
38: 1, # 'H'
39: 2, # 'I'
53: 1, # 'J'
36: 1, # 'K'
41: 1, # 'L'
34: 1, # 'M'
35: 1, # 'N'
47: 2, # 'O'
46: 1, # 'P'
43: 1, # 'R'
33: 2, # 'S'
37: 1, # 'T'
57: 1, # 'U'
48: 1, # 'V'
55: 1, # 'Y'
52: 1, # 'Z'
2: 1, # 'a'
18: 0, # 'b'
26: 0, # 'c'
17: 0, # 'd'
1: 1, # 'e'
27: 0, # 'f'
12: 0, # 'g'
20: 0, # 'h'
9: 1, # 'i'
22: 0, # 'j'
7: 0, # 'k'
6: 0, # 'l'
13: 0, # 'm'
4: 1, # 'n'
8: 1, # 'o'
23: 0, # 'p'
10: 1, # 'r'
5: 2, # 's'
3: 0, # 't'
21: 1, # 'u'
19: 0, # 'v'
62: 0, # 'x'
16: 0, # 'y'
11: 0, # 'z'
51: 2, # 'Á'
44: 1, # 'É'
61: 1, # 'Í'
58: 1, # 'Ó'
59: 1, # 'Ö'
60: 1, # 'Ú'
63: 1, # 'Ü'
14: 1, # 'á'
15: 1, # 'é'
30: 0, # 'í'
25: 0, # 'ó'
24: 1, # 'ö'
31: 1, # 'ú'
29: 1, # 'ü'
42: 0, # 'ő'
56: 0, # 'ű'
},
2: { # 'a'
28: 0, # 'A'
40: 0, # 'B'
54: 0, # 'C'
45: 0, # 'D'
32: 0, # 'E'
50: 0, # 'F'
49: 0, # 'G'
38: 0, # 'H'
39: 0, # 'I'
53: 0, # 'J'
36: 0, # 'K'
41: 0, # 'L'
34: 0, # 'M'
35: 0, # 'N'
47: 0, # 'O'
46: 0, # 'P'
43: 0, # 'R'
33: 0, # 'S'
37: 0, # 'T'
57: 0, # 'U'
48: 0, # 'V'
55: 0, # 'Y'
52: 0, # 'Z'
2: 1, # 'a'
18: 3, # 'b'
26: 3, # 'c'
17: 3, # 'd'
1: 2, # 'e'
27: 2, # 'f'
12: 3, # 'g'
20: 3, # 'h'
9: 3, # 'i'
22: 3, # 'j'
7: 3, # 'k'
6: 3, # 'l'
13: 3, # 'm'
4: 3, # 'n'
8: 2, # 'o'
23: 3, # 'p'
10: 3, # 'r'
5: 3, # 's'
3: 3, # 't'
21: 3, # 'u'
19: 3, # 'v'
62: 1, # 'x'
16: 2, # 'y'
11: 3, # 'z'
51: 0, # 'Á'
44: 0, # 'É'
61: 0, # 'Í'
58: 0, # 'Ó'
59: 0, # 'Ö'
60: 0, # 'Ú'
63: 0, # 'Ü'
14: 1, # 'á'
15: 1, # 'é'
30: 1, # 'í'
25: 1, # 'ó'
24: 1, # 'ö'
31: 1, # 'ú'
29: 1, # 'ü'
42: 0, # 'ő'
56: 0, # 'ű'
},
18: { # 'b'
28: 0, # 'A'
40: 0, # 'B'
54: 0, # 'C'
45: 0, # 'D'
32: 0, # 'E'
50: 0, # 'F'
49: 0, # 'G'
38: 0, # 'H'
39: 0, # 'I'
53: 0, # 'J'
36: 0, # 'K'
41: 0, # 'L'
34: 0, # 'M'
35: 0, # 'N'
47: 0, # 'O'
46: 0, # 'P'
43: 0, # 'R'
33: 0, # 'S'
37: 0, # 'T'
57: 0, # 'U'
48: 0, # 'V'
55: 0, # 'Y'
52: 0, # 'Z'
2: 3, # 'a'
18: 3, # 'b'
26: 1, # 'c'
17: 1, # 'd'
1: 3, # 'e'
27: 1, # 'f'
12: 1, # 'g'
20: 1, # 'h'
9: 3, # 'i'
22: 2, # 'j'
7: 2, # 'k'
6: 2, # 'l'
13: 1, # 'm'
4: 2, # 'n'
8: 3, # 'o'
23: 1, # 'p'
10: 3, # 'r'
5: 2, # 's'
3: 1, # 't'
21: 3, # 'u'
19: 1, # 'v'
62: 0, # 'x'
16: 1, # 'y'
11: 1, # 'z'
51: 0, # 'Á'
44: 0, # 'É'
61: 0, # 'Í'
58: 0, # 'Ó'
59: 0, # 'Ö'
60: 0, # 'Ú'
63: 0, # 'Ü'
14: 3, # 'á'
15: 3, # 'é'
30: 2, # 'í'
25: 3, # 'ó'
24: 2, # 'ö'
31: 2, # 'ú'
29: 2, # 'ü'
42: 2, # 'ő'
56: 1, # 'ű'
},
26: { # 'c'
28: 0, # 'A'
40: 0, # 'B'
54: 1, # 'C'
45: 0, # 'D'
32: 0, # 'E'
50: 0, # 'F'
49: 1, # 'G'
38: 0, # 'H'
39: 0, # 'I'
53: 0, # 'J'
36: 0, # 'K'
41: 0, # 'L'
34: 0, # 'M'
35: 0, # 'N'
47: 0, # 'O'
46: 0, # 'P'
43: 0, # 'R'
33: 0, # 'S'
37: 0, # 'T'
57: 0, # 'U'
48: 0, # 'V'
55: 0, # 'Y'
52: 0, # 'Z'
2: 2, # 'a'
18: 1, # 'b'
26: 2, # 'c'
17: 1, # 'd'
1: 3, # 'e'
27: 1, # 'f'
12: 1, # 'g'
20: 3, # 'h'
9: 3, # 'i'
22: 1, # 'j'
7: 2, # 'k'
6: 1, # 'l'
13: 1, # 'm'
4: 1, # 'n'
8: 3, # 'o'
23: 1, # 'p'
10: 2, # 'r'
5: 3, # 's'
3: 2, # 't'
21: 2, # 'u'
19: 1, # 'v'
62: 0, # 'x'
16: 1, # 'y'
11: 2, # 'z'
51: 0, # 'Á'
44: 0, # 'É'
61: 0, # 'Í'
58: 0, # 'Ó'
59: 0, # 'Ö'
60: 0, # 'Ú'
63: 0, # 'Ü'
14: 2, # 'á'
15: 2, # 'é'
30: 2, # 'í'
25: 1, # 'ó'
24: 1, # 'ö'
31: 1, # 'ú'
29: 1, # 'ü'
42: 0, # 'ő'
56: 0, # 'ű'
},
17: { # 'd'
28: 0, # 'A'
40: 0, # 'B'
54: 0, # 'C'
45: 0, # 'D'
32: 0, # 'E'
50: 0, # 'F'
49: 0, # 'G'
38: 0, # 'H'
39: 0, # 'I'
53: 0, # 'J'
36: 0, # 'K'
41: 0, # 'L'
34: 0, # 'M'
35: 0, # 'N'
47: 0, # 'O'
46: 0, # 'P'
43: 0, # 'R'
33: 0, # 'S'
37: 0, # 'T'
57: 0, # 'U'
48: 0, # 'V'
55: 0, # 'Y'
52: 0, # 'Z'
2: 3, # 'a'
18: 2, # 'b'
26: 1, # 'c'
17: 2, # 'd'
1: 3, # 'e'
27: 1, # 'f'
12: 1, # 'g'
20: 2, # 'h'
9: 3, # 'i'
22: 3, # 'j'
7: 2, # 'k'
6: 1, # 'l'
13: 2, # 'm'
4: 3, # 'n'
8: 3, # 'o'
23: 1, # 'p'
10: 3, # 'r'
5: 3, # 's'
3: 3, # 't'
21: 3, # 'u'
19: 3, # 'v'
62: 0, # 'x'
16: 2, # 'y'
11: 2, # 'z'
51: 0, # 'Á'
44: 0, # 'É'
61: 0, # 'Í'
58: 0, # 'Ó'
59: 0, # 'Ö'
60: 0, # 'Ú'
63: 0, # 'Ü'
14: 3, # 'á'
15: 3, # 'é'
30: 3, # 'í'
25: 3, # 'ó'
24: 3, # 'ö'
31: 2, # 'ú'
29: 2, # 'ü'
42: 2, # 'ő'
56: 1, # 'ű'
},
1: { # 'e'
28: 0, # 'A'
40: 0, # 'B'
54: 0, # 'C'
45: 0, # 'D'
32: 0, # 'E'
50: 0, # 'F'
49: 0, # 'G'
38: 0, # 'H'
39: 0, # 'I'
53: 0, # 'J'
36: 0, # 'K'
41: 0, # 'L'
34: 0, # 'M'
35: 0, # 'N'
47: 0, # 'O'
46: 0, # 'P'
43: 0, # 'R'
33: 0, # 'S'
37: 0, # 'T'
57: 0, # 'U'
48: 0, # 'V'
55: 0, # 'Y'
52: 0, # 'Z'
2: 2, # 'a'
18: 3, # 'b'
26: 3, # 'c'
17: 3, # 'd'
1: 2, # 'e'
27: 3, # 'f'
12: 3, # 'g'
20: 3, # 'h'
9: 3, # 'i'
22: 3, # 'j'
7: 3, # 'k'
6: 3, # 'l'
13: 3, # 'm'
4: 3, # 'n'
8: 2, # 'o'
23: 3, # 'p'
10: 3, # 'r'
5: 3, # 's'
3: 3, # 't'
21: 2, # 'u'
19: 3, # 'v'
62: 2, # 'x'
16: 2, # 'y'
11: 3, # 'z'
51: 0, # 'Á'
44: 0, # 'É'
61: 0, # 'Í'
58: 0, # 'Ó'
59: 0, # 'Ö'
60: 0, # 'Ú'
63: 0, # 'Ü'
14: 3, # 'á'
15: 1, # 'é'
30: 1, # 'í'
25: 1, # 'ó'
24: 1, # 'ö'
31: 1, # 'ú'
29: 1, # 'ü'
42: 0, # 'ő'
56: 0, # 'ű'
},
27: { # 'f'
28: 0, # 'A'
40: 0, # 'B'
54: 0, # 'C'
45: 0, # 'D'
32: 0, # 'E'
50: 0, # 'F'
49: 0, # 'G'
38: 0, # 'H'
39: 0, # 'I'
53: 0, # 'J'
36: 0, # 'K'
41: 0, # 'L'
34: 0, # 'M'
35: 0, # 'N'
47: 0, # 'O'
46: 0, # 'P'
43: 0, # 'R'
33: 0, # 'S'
37: 0, # 'T'
57: 0, # 'U'
48: 0, # 'V'
55: 0, # 'Y'
52: 0, # 'Z'
2: 3, # 'a'
18: 1, # 'b'
26: 1, # 'c'
17: 1, # 'd'
1: 3, # 'e'
27: 2, # 'f'
12: 1, # 'g'
20: 1, # 'h'
9: 3, # 'i'
22: 2, # 'j'
7: 1, # 'k'
6: 1, # 'l'
13: 1, # 'm'
4: 1, # 'n'
8: 3, # 'o'
23: 0, # 'p'
10: 3, # 'r'
5: 1, # 's'
3: 1, # 't'
21: 2, # 'u'
19: 1, # 'v'
62: 0, # 'x'
16: 1, # 'y'
11: 0, # 'z'
51: 0, # 'Á'
44: 0, # 'É'
61: 0, # 'Í'
58: 0, # 'Ó'
59: 0, # 'Ö'
60: 0, # 'Ú'
63: 0, # 'Ü'
14: 3, # 'á'
15: 3, # 'é'
30: 1, # 'í'
25: 1, # 'ó'
24: 3, # 'ö'
31: 1, # 'ú'
29: 2, # 'ü'
42: 1, # 'ő'
56: 1, # 'ű'
},
12: { # 'g'
28: 0, # 'A'
40: 0, # 'B'
54: 0, # 'C'
45: 0, # 'D'
32: 0, # 'E'
50: 0, # 'F'
49: 0, # 'G'
38: 0, # 'H'
39: 0, # 'I'
53: 0, # 'J'
36: 0, # 'K'
41: 0, # 'L'
34: 0, # 'M'
35: 0, # 'N'
47: 0, # 'O'
46: 0, # 'P'
43: 0, # 'R'
33: 0, # 'S'
37: 0, # 'T'
57: 0, # 'U'
48: 0, # 'V'
55: 0, # 'Y'
52: 0, # 'Z'
2: 3, # 'a'
18: 3, # 'b'
26: 2, # 'c'
17: 2, # 'd'
1: 3, # 'e'
27: 2, # 'f'
12: 3, # 'g'
20: 3, # 'h'
9: 3, # 'i'
22: 3, # 'j'
7: 2, # 'k'
6: 3, # 'l'
13: 2, # 'm'
4: 3, # 'n'
8: 3, # 'o'
23: 1, # 'p'
10: 3, # 'r'
5: 3, # 's'
3: 3, # 't'
21: 3, # 'u'
19: 3, # 'v'
62: 0, # 'x'
16: 3, # 'y'
11: 2, # 'z'
51: 0, # 'Á'
44: 0, # 'É'
61: 0, # 'Í'
58: 0, # 'Ó'
59: 0, # 'Ö'
60: 0, # 'Ú'
63: 0, # 'Ü'
14: 3, # 'á'
15: 3, # 'é'
30: 2, # 'í'
25: 3, # 'ó'
24: 2, # 'ö'
31: 2, # 'ú'
29: 2, # 'ü'
42: 2, # 'ő'
56: 1, # 'ű'
},
20: { # 'h'
28: 0, # 'A'
40: 0, # 'B'
54: 0, # 'C'
45: 0, # 'D'
32: 0, # 'E'
50: 0, # 'F'
49: 0, # 'G'
38: 0, # 'H'
39: 0, # 'I'
53: 0, # 'J'
36: 0, # 'K'
41: 0, # 'L'
34: 0, # 'M'
35: 0, # 'N'
47: 0, # 'O'
46: 0, # 'P'
43: 0, # 'R'
33: 0, # 'S'
37: 0, # 'T'
57: 0, # 'U'
48: 0, # 'V'
55: 0, # 'Y'
52: 0, # 'Z'
2: 3, # 'a'
18: 1, # 'b'
26: 1, # 'c'
17: 0, # 'd'
1: 3, # 'e'
27: 0, # 'f'
12: 1, # 'g'
20: 2, # 'h'
9: 3, # 'i'
22: 1, # 'j'
7: 1, # 'k'
6: 1, # 'l'
13: 1, # 'm'
4: 1, # 'n'
8: 3, # 'o'
23: 0, # 'p'
10: 1, # 'r'
5: 2, # 's'
3: 1, # 't'
21: 3, # 'u'
19: 1, # 'v'
62: 0, # 'x'
16: 2, # 'y'
11: 0, # 'z'
51: 0, # 'Á'
44: 0, # 'É'
61: 0, # 'Í'
58: 0, # 'Ó'
59: 0, # 'Ö'
60: 0, # 'Ú'
63: 0, # 'Ü'
14: 3, # 'á'
15: 3, # 'é'
30: 3, # 'í'
25: 2, # 'ó'
24: 2, # 'ö'
31: 2, # 'ú'
29: 1, # 'ü'
42: 1, # 'ő'
56: 1, # 'ű'
},
9: { # 'i'
28: 0, # 'A'
40: 0, # 'B'
54: 0, # 'C'
45: 0, # 'D'
32: 0, # 'E'
50: 0, # 'F'
49: 0, # 'G'
38: 0, # 'H'
39: 0, # 'I'
53: 0, # 'J'
36: 0, # 'K'
41: 0, # 'L'
34: 0, # 'M'
35: 0, # 'N'
47: 0, # 'O'
46: 0, # 'P'
43: 0, # 'R'
33: 0, # 'S'
37: 0, # 'T'
57: 0, # 'U'
48: 0, # 'V'
55: 0, # 'Y'
52: 0, # 'Z'
2: 3, # 'a'
18: 3, # 'b'
26: 3, # 'c'
17: 3, # 'd'
1: 3, # 'e'
27: 3, # 'f'
12: 3, # 'g'
20: 3, # 'h'
9: 2, # 'i'
22: 2, # 'j'
7: 3, # 'k'
6: 3, # 'l'
13: 3, # 'm'
4: 3, # 'n'
8: 2, # 'o'
23: 2, # 'p'
10: 3, # 'r'
5: 3, # 's'
3: 3, # 't'
21: 3, # 'u'
19: 3, # 'v'
62: 1, # 'x'
16: 1, # 'y'
11: 3, # 'z'
51: 0, # 'Á'
44: 0, # 'É'
61: 0, # 'Í'
58: 0, # 'Ó'
59: 0, # 'Ö'
60: 0, # 'Ú'
63: 0, # 'Ü'
14: 3, # 'á'
15: 2, # 'é'
30: 1, # 'í'
25: 3, # 'ó'
24: 1, # 'ö'
31: 2, # 'ú'
29: 1, # 'ü'
42: 0, # 'ő'
56: 1, # 'ű'
},
22: { # 'j'
28: 0, # 'A'
40: 0, # 'B'
54: 0, # 'C'
45: 0, # 'D'
32: 0, # 'E'
50: 0, # 'F'
49: 0, # 'G'
38: 0, # 'H'
39: 0, # 'I'
53: 0, # 'J'
36: 0, # 'K'
41: 0, # 'L'
34: 0, # 'M'
35: 0, # 'N'
47: 0, # 'O'
46: 0, # 'P'
43: 0, # 'R'
33: 0, # 'S'
37: 0, # 'T'
57: 0, # 'U'
48: 0, # 'V'
55: 0, # 'Y'
52: 0, # 'Z'
2: 3, # 'a'
18: 2, # 'b'
26: 1, # 'c'
17: 3, # 'd'
1: 3, # 'e'
27: 1, # 'f'
12: 1, # 'g'
20: 2, # 'h'
9: 1, # 'i'
22: 2, # 'j'
7: 2, # 'k'
6: 2, # 'l'
13: 1, # 'm'
4: 2, # 'n'
8: 3, # 'o'
23: 1, # 'p'
10: 2, # 'r'
5: 2, # 's'
3: 3, # 't'
21: 3, # 'u'
19: 1, # 'v'
62: 0, # 'x'
16: 0, # 'y'
11: 2, # 'z'
51: 0, # 'Á'
44: 0, # 'É'
61: 0, # 'Í'
58: 0, # 'Ó'
59: 0, # 'Ö'
60: 0, # 'Ú'
63: 0, # 'Ü'
14: 3, # 'á'
15: 3, # 'é'
30: 1, # 'í'
25: 3, # 'ó'
24: 3, # 'ö'
31: 3, # 'ú'
29: 2, # 'ü'
42: 1, # 'ő'
56: 1, # 'ű'
},
7: { # 'k'
28: 0, # 'A'
40: 0, # 'B'
54: 0, # 'C'
45: 0, # 'D'
32: 0, # 'E'
50: 0, # 'F'
49: 0, # 'G'
38: 0, # 'H'
39: 0, # 'I'
53: 0, # 'J'
36: 0, # 'K'
41: 0, # 'L'
34: 0, # 'M'
35: 0, # 'N'
47: 0, # 'O'
46: 0, # 'P'
43: 0, # 'R'
33: 0, # 'S'
37: 0, # 'T'
57: 0, # 'U'
48: 0, # 'V'
55: 0, # 'Y'
52: 0, # 'Z'
2: 3, # 'a'
18: 3, # 'b'
26: 2, # 'c'
17: 1, # 'd'
1: 3, # 'e'
27: 1, # 'f'
12: 1, # 'g'
20: 2, # 'h'
9: 3, # 'i'
22: 2, # 'j'
7: 3, # 'k'
6: 3, # 'l'
13: 1, # 'm'
4: 3, # 'n'
8: 3, # 'o'
23: 1, # 'p'
10: 3, # 'r'
5: 3, # 's'
3: 3, # 't'
21: 3, # 'u'
19: 2, # 'v'
62: 0, # 'x'
16: 2, # 'y'
11: 1, # 'z'
51: 0, # 'Á'
44: 0, # 'É'
61: 0, # 'Í'
58: 0, # 'Ó'
59: 0, # 'Ö'
60: 0, # 'Ú'
63: 0, # 'Ü'
14: 3, # 'á'
15: 3, # 'é'
30: 3, # 'í'
25: 2, # 'ó'
24: 3, # 'ö'
31: 1, # 'ú'
29: 3, # 'ü'
42: 1, # 'ő'
56: 1, # 'ű'
},
6: { # 'l'
28: 0, # 'A'
40: 0, # 'B'
54: 0, # 'C'
45: 0, # 'D'
32: 0, # 'E'
50: 0, # 'F'
49: 0, # 'G'
38: 0, # 'H'
39: 0, # 'I'
53: 0, # 'J'
36: 1, # 'K'
41: 0, # 'L'
34: 0, # 'M'
35: 1, # 'N'
47: 0, # 'O'
46: 0, # 'P'
43: 0, # 'R'
33: 0, # 'S'
37: 0, # 'T'
57: 0, # 'U'
48: 0, # 'V'
55: 0, # 'Y'
52: 0, # 'Z'
2: 3, # 'a'
18: 2, # 'b'
26: 3, # 'c'
17: 3, # 'd'
1: 3, # 'e'
27: 3, # 'f'
12: 3, # 'g'
20: 3, # 'h'
9: 3, # 'i'
22: 3, # 'j'
7: 3, # 'k'
6: 3, # 'l'
13: 3, # 'm'
4: 3, # 'n'
8: 3, # 'o'
23: 2, # 'p'
10: 2, # 'r'
5: 3, # 's'
3: 3, # 't'
21: 3, # 'u'
19: 3, # 'v'
62: 0, # 'x'
16: 3, # 'y'
11: 2, # 'z'
51: 0, # 'Á'
44: 0, # 'É'
61: 0, # 'Í'
58: 0, # 'Ó'
59: 0, # 'Ö'
60: 0, # 'Ú'
63: 0, # 'Ü'
14: 3, # 'á'
15: 3, # 'é'
30: 3, # 'í'
25: 3, # 'ó'
24: 3, # 'ö'
31: 2, # 'ú'
29: 2, # 'ü'
42: 3, # 'ő'
56: 1, # 'ű'
},
13: { # 'm'
28: 0, # 'A'
40: 0, # 'B'
54: 0, # 'C'
45: 0, # 'D'
32: 0, # 'E'
50: 0, # 'F'
49: 0, # 'G'
38: 0, # 'H'
39: 0, # 'I'
53: 0, # 'J'
36: 0, # 'K'
41: 0, # 'L'
34: 0, # 'M'
35: 0, # 'N'
47: 0, # 'O'
46: 0, # 'P'
43: 0, # 'R'
33: 0, # 'S'
37: 0, # 'T'
57: 0, # 'U'
48: 0, # 'V'
55: 0, # 'Y'
52: 0, # 'Z'
2: 3, # 'a'
18: 3, # 'b'
26: 2, # 'c'
17: 1, # 'd'
1: 3, # 'e'
27: 1, # 'f'
12: 1, # 'g'
20: 2, # 'h'
9: 3, # 'i'
22: 2, # 'j'
7: 1, # 'k'
6: 3, # 'l'
13: 3, # 'm'
4: 2, # 'n'
8: 3, # 'o'
23: 3, # 'p'
10: 2, # 'r'
5: 2, # 's'
3: 2, # 't'
21: 3, # 'u'
19: 1, # 'v'
62: 0, # 'x'
16: 1, # 'y'
11: 2, # 'z'
51: 0, # 'Á'
44: 0, # 'É'
61: 0, # 'Í'
58: 0, # 'Ó'
59: 0, # 'Ö'
60: 0, # 'Ú'
63: 0, # 'Ü'
14: 3, # 'á'
15: 3, # 'é'
30: 2, # 'í'
25: 2, # 'ó'
24: 2, # 'ö'
31: 2, # 'ú'
29: 2, # 'ü'
42: 1, # 'ő'
56: 2, # 'ű'
},
4: { # 'n'
28: 0, # 'A'
40: 0, # 'B'
54: 0, # 'C'
45: 0, # 'D'
32: 0, # 'E'
50: 0, # 'F'
49: 0, # 'G'
38: 0, # 'H'
39: 0, # 'I'
53: 0, # 'J'
36: 0, # 'K'
41: 0, # 'L'
34: 0, # 'M'
35: 0, # 'N'
47: 0, # 'O'
46: 0, # 'P'
43: 0, # 'R'
33: 0, # 'S'
37: 0, # 'T'
57: 0, # 'U'
48: 0, # 'V'
55: 0, # 'Y'
52: 0, # 'Z'
2: 3, # 'a'
18: 3, # 'b'
26: 3, # 'c'
17: 3, # 'd'
1: 3, # 'e'
27: 2, # 'f'
12: 3, # 'g'
20: 3, # 'h'
9: 3, # 'i'
22: 2, # 'j'
7: 3, # 'k'
6: 2, # 'l'
13: 2, # 'm'
4: 3, # 'n'
8: 3, # 'o'
23: 2, # 'p'
10: 2, # 'r'
5: 3, # 's'
3: 3, # 't'
21: 3, # 'u'
19: 2, # 'v'
62: 1, # 'x'
16: 3, # 'y'
11: 3, # 'z'
51: 0, # 'Á'
44: 0, # 'É'
61: 0, # 'Í'
58: 0, # 'Ó'
59: 0, # 'Ö'
60: 0, # 'Ú'
63: 0, # 'Ü'
14: 3, # 'á'
15: 3, # 'é'
30: 2, # 'í'
25: 2, # 'ó'
24: 3, # 'ö'
31: 2, # 'ú'
29: 3, # 'ü'
42: 2, # 'ő'
56: 1, # 'ű'
},
8: { # 'o'
28: 0, # 'A'
40: 0, # 'B'
54: 0, # 'C'
45: 0, # 'D'
32: 0, # 'E'
50: 0, # 'F'
49: 0, # 'G'
38: 0, # 'H'
39: 0, # 'I'
53: 0, # 'J'
36: 0, # 'K'
41: 0, # 'L'
34: 0, # 'M'
35: 0, # 'N'
47: 1, # 'O'
46: 0, # 'P'
43: 0, # 'R'
33: 0, # 'S'
37: 0, # 'T'
57: 0, # 'U'
48: 0, # 'V'
55: 0, # 'Y'
52: 0, # 'Z'
2: 2, # 'a'
18: 3, # 'b'
26: 3, # 'c'
17: 3, # 'd'
1: 2, # 'e'
27: 2, # 'f'
12: 3, # 'g'
20: 3, # 'h'
9: 2, # 'i'
22: 2, # 'j'
7: 3, # 'k'
6: 3, # 'l'
13: 3, # 'm'
4: 3, # 'n'
8: 1, # 'o'
23: 3, # 'p'
10: 3, # 'r'
5: 3, # 's'
3: 3, # 't'
21: 2, # 'u'
19: 3, # 'v'
62: 1, # 'x'
16: 1, # 'y'
11: 3, # 'z'
51: 0, # 'Á'
44: 0, # 'É'
61: 0, # 'Í'
58: 0, # 'Ó'
59: 0, # 'Ö'
60: 0, # 'Ú'
63: 0, # 'Ü'
14: 1, # 'á'
15: 2, # 'é'
30: 1, # 'í'
25: 1, # 'ó'
24: 1, # 'ö'
31: 1, # 'ú'
29: 1, # 'ü'
42: 0, # 'ő'
56: 0, # 'ű'
},
23: { # 'p'
28: 0, # 'A'
40: 0, # 'B'
54: 0, # 'C'
45: 0, # 'D'
32: 0, # 'E'
50: 0, # 'F'
49: 0, # 'G'
38: 0, # 'H'
39: 0, # 'I'
53: 0, # 'J'
36: 0, # 'K'
41: 0, # 'L'
34: 0, # 'M'
35: 0, # 'N'
47: 0, # 'O'
46: 0, # 'P'
43: 0, # 'R'
33: 0, # 'S'
37: 0, # 'T'
57: 0, # 'U'
48: 0, # 'V'
55: 0, # 'Y'
52: 0, # 'Z'
2: 3, # 'a'
18: 1, # 'b'
26: 2, # 'c'
17: 1, # 'd'
1: 3, # 'e'
27: 1, # 'f'
12: 1, # 'g'
20: 2, # 'h'
9: 3, # 'i'
22: 2, # 'j'
7: 2, # 'k'
6: 3, # 'l'
13: 1, # 'm'
4: 2, # 'n'
8: 3, # 'o'
23: 3, # 'p'
10: 3, # 'r'
5: 2, # 's'
3: 2, # 't'
21: 3, # 'u'
19: 2, # 'v'
62: 0, # 'x'
16: 1, # 'y'
11: 2, # 'z'
51: 0, # 'Á'
44: 0, # 'É'
61: 0, # 'Í'
58: 0, # 'Ó'
59: 0, # 'Ö'
60: 0, # 'Ú'
63: 0, # 'Ü'
14: 3, # 'á'
15: 3, # 'é'
30: 2, # 'í'
25: 2, # 'ó'
24: 2, # 'ö'
31: 1, # 'ú'
29: 2, # 'ü'
42: 1, # 'ő'
56: 1, # 'ű'
},
10: { # 'r'
28: 0, # 'A'
40: 0, # 'B'
54: 0, # 'C'
45: 0, # 'D'
32: 0, # 'E'
50: 0, # 'F'
49: 0, # 'G'
38: 0, # 'H'
39: 0, # 'I'
53: 0, # 'J'
36: 0, # 'K'
41: 0, # 'L'
34: 0, # 'M'
35: 0, # 'N'
47: 0, # 'O'
46: 0, # 'P'
43: 0, # 'R'
33: 0, # 'S'
37: 0, # 'T'
57: 0, # 'U'
48: 0, # 'V'
55: 0, # 'Y'
52: 0, # 'Z'
2: 3, # 'a'
18: 3, # 'b'
26: 3, # 'c'
17: 3, # 'd'
1: 3, # 'e'
27: 2, # 'f'
12: 3, # 'g'
20: 2, # 'h'
9: 3, # 'i'
22: 3, # 'j'
7: 3, # 'k'
6: 3, # 'l'
13: 3, # 'm'
4: 3, # 'n'
8: 3, # 'o'
23: 2, # 'p'
10: 3, # 'r'
5: 3, # 's'
3: 3, # 't'
21: 3, # 'u'
19: 3, # 'v'
62: 1, # 'x'
16: 2, # 'y'
11: 3, # 'z'
51: 0, # 'Á'
44: 0, # 'É'
61: 0, # 'Í'
58: 0, # 'Ó'
59: 0, # 'Ö'
60: 0, # 'Ú'
63: 0, # 'Ü'
14: 3, # 'á'
15: 3, # 'é'
30: 2, # 'í'
25: 3, # 'ó'
24: 3, # 'ö'
31: 3, # 'ú'
29: 3, # 'ü'
42: 2, # 'ő'
56: 2, # 'ű'
},
5: { # 's'
28: 0, # 'A'
40: 0, # 'B'
54: 0, # 'C'
45: 0, # 'D'
32: 0, # 'E'
50: 0, # 'F'
49: 0, # 'G'
38: 0, # 'H'
39: 0, # 'I'
53: 0, # 'J'
36: 0, # 'K'
41: 0, # 'L'
34: 0, # 'M'
35: 0, # 'N'
47: 0, # 'O'
46: 0, # 'P'
43: 0, # 'R'
33: 0, # 'S'
37: 0, # 'T'
57: 0, # 'U'
48: 0, # 'V'
55: 0, # 'Y'
52: 0, # 'Z'
2: 3, # 'a'
18: 3, # 'b'
26: 2, # 'c'
17: 2, # 'd'
1: 3, # 'e'
27: 2, # 'f'
12: 2, # 'g'
20: 2, # 'h'
9: 3, # 'i'
22: 1, # 'j'
7: 3, # 'k'
6: 2, # 'l'
13: 3, # 'm'
4: 3, # 'n'
8: 3, # 'o'
23: 2, # 'p'
10: 3, # 'r'
5: 3, # 's'
3: 3, # 't'
21: 3, # 'u'
19: 2, # 'v'
62: 0, # 'x'
16: 1, # 'y'
11: 3, # 'z'
51: 0, # 'Á'
44: 0, # 'É'
61: 0, # 'Í'
58: 0, # 'Ó'
59: 0, # 'Ö'
60: 0, # 'Ú'
63: 0, # 'Ü'
14: 3, # 'á'
15: 3, # 'é'
30: 3, # 'í'
25: 3, # 'ó'
24: 3, # 'ö'
31: 3, # 'ú'
29: 3, # 'ü'
42: 2, # 'ő'
56: 1, # 'ű'
},
3: { # 't'
28: 0, # 'A'
40: 0, # 'B'
54: 0, # 'C'
45: 0, # 'D'
32: 0, # 'E'
50: 0, # 'F'
49: 0, # 'G'
38: 0, # 'H'
39: 0, # 'I'
53: 0, # 'J'
36: 0, # 'K'
41: 0, # 'L'
34: 0, # 'M'
35: 0, # 'N'
47: 0, # 'O'
46: 0, # 'P'
43: 0, # 'R'
33: 0, # 'S'
37: 0, # 'T'
57: 0, # 'U'
48: 0, # 'V'
55: 0, # 'Y'
52: 0, # 'Z'
2: 3, # 'a'
18: 3, # 'b'
26: 2, # 'c'
17: 1, # 'd'
1: 3, # 'e'
27: 2, # 'f'
12: 1, # 'g'
20: 3, # 'h'
9: 3, # 'i'
22: 3, # 'j'
7: 3, # 'k'
6: 3, # 'l'
13: 2, # 'm'
4: 3, # 'n'
8: 3, # 'o'
23: 1, # 'p'
10: 3, # 'r'
5: 3, # 's'
3: 3, # 't'
21: 3, # 'u'
19: 3, # 'v'
62: 0, # 'x'
16: 3, # 'y'
11: 1, # 'z'
51: 0, # 'Á'
44: 0, # 'É'
61: 0, # 'Í'
58: 0, # 'Ó'
59: 0, # 'Ö'
60: 0, # 'Ú'
63: 0, # 'Ü'
14: 3, # 'á'
15: 3, # 'é'
30: 2, # 'í'
25: 3, # 'ó'
24: 3, # 'ö'
31: 3, # 'ú'
29: 3, # 'ü'
42: 3, # 'ő'
56: 2, # 'ű'
},
21: { # 'u'
28: 0, # 'A'
40: 0, # 'B'
54: 0, # 'C'
45: 0, # 'D'
32: 0, # 'E'
50: 0, # 'F'
49: 0, # 'G'
38: 0, # 'H'
39: 0, # 'I'
53: 0, # 'J'
36: 0, # 'K'
41: 0, # 'L'
34: 0, # 'M'
35: 0, # 'N'
47: 0, # 'O'
46: 0, # 'P'
43: 0, # 'R'
33: 0, # 'S'
37: 0, # 'T'
57: 0, # 'U'
48: 0, # 'V'
55: 0, # 'Y'
52: 0, # 'Z'
2: 1, # 'a'
18: 2, # 'b'
26: 2, # 'c'
17: 3, # 'd'
1: 2, # 'e'
27: 1, # 'f'
12: 3, # 'g'
20: 2, # 'h'
9: 2, # 'i'
22: 2, # 'j'
7: 3, # 'k'
6: 3, # 'l'
13: 3, # 'm'
4: 3, # 'n'
8: 1, # 'o'
23: 2, # 'p'
10: 3, # 'r'
5: 3, # 's'
3: 3, # 't'
21: 1, # 'u'
19: 3, # 'v'
62: 1, # 'x'
16: 1, # 'y'
11: 2, # 'z'
51: 0, # 'Á'
44: 0, # 'É'
61: 0, # 'Í'
58: 0, # 'Ó'
59: 0, # 'Ö'
60: 0, # 'Ú'
63: 0, # 'Ü'
14: 2, # 'á'
15: 1, # 'é'
30: 1, # 'í'
25: 1, # 'ó'
24: 0, # 'ö'
31: 1, # 'ú'
29: 0, # 'ü'
42: 0, # 'ő'
56: 0, # 'ű'
},
19: { # 'v'
28: 0, # 'A'
40: 0, # 'B'
54: 0, # 'C'
45: 0, # 'D'
32: 0, # 'E'
50: 0, # 'F'
49: 0, # 'G'
38: 0, # 'H'
39: 0, # 'I'
53: 0, # 'J'
36: 0, # 'K'
41: 0, # 'L'
34: 0, # 'M'
35: 0, # 'N'
47: 0, # 'O'
46: 0, # 'P'
43: 0, # 'R'
33: 0, # 'S'
37: 0, # 'T'
57: 0, # 'U'
48: 0, # 'V'
55: 0, # 'Y'
52: 0, # 'Z'
2: 3, # 'a'
18: 2, # 'b'
26: 1, # 'c'
17: 1, # 'd'
1: 3, # 'e'
27: 1, # 'f'
12: 1, # 'g'
20: 1, # 'h'
9: 3, # 'i'
22: 1, # 'j'
7: 1, # 'k'
6: 1, # 'l'
13: 1, # 'm'
4: 1, # 'n'
8: 3, # 'o'
23: 1, # 'p'
10: 1, # 'r'
5: 2, # 's'
3: 2, # 't'
21: 2, # 'u'
19: 2, # 'v'
62: 0, # 'x'
16: 1, # 'y'
11: 1, # 'z'
51: 0, # 'Á'
44: 0, # 'É'
61: 0, # 'Í'
58: 0, # 'Ó'
59: 0, # 'Ö'
60: 0, # 'Ú'
63: 0, # 'Ü'
14: 3, # 'á'
15: 3, # 'é'
30: 2, # 'í'
25: 2, # 'ó'
24: 2, # 'ö'
31: 1, # 'ú'
29: 2, # 'ü'
42: 1, # 'ő'
56: 1, # 'ű'
},
62: { # 'x'
28: 0, # 'A'
40: 0, # 'B'
54: 0, # 'C'
45: 0, # 'D'
32: 0, # 'E'
50: 0, # 'F'
49: 0, # 'G'
38: 0, # 'H'
39: 0, # 'I'
53: 0, # 'J'
36: 0, # 'K'
41: 0, # 'L'
34: 0, # 'M'
35: 0, # 'N'
47: 0, # 'O'
46: 0, # 'P'
43: 0, # 'R'
33: 0, # 'S'
37: 0, # 'T'
57: 0, # 'U'
48: 0, # 'V'
55: 0, # 'Y'
52: 0, # 'Z'
2: 1, # 'a'
18: 1, # 'b'
26: 1, # 'c'
17: 0, # 'd'
1: 1, # 'e'
27: 1, # 'f'
12: 0, # 'g'
20: 0, # 'h'
9: 1, # 'i'
22: 0, # 'j'
7: 1, # 'k'
6: 1, # 'l'
13: 1, # 'm'
4: 1, # 'n'
8: 1, # 'o'
23: 1, # 'p'
10: 1, # 'r'
5: 1, # 's'
3: 1, # 't'
21: 1, # 'u'
19: 0, # 'v'
62: 0, # 'x'
16: 0, # 'y'
11: 0, # 'z'
51: 0, # 'Á'
44: 0, # 'É'
61: 0, # 'Í'
58: 0, # 'Ó'
59: 0, # 'Ö'
60: 0, # 'Ú'
63: 0, # 'Ü'
14: 1, # 'á'
15: 1, # 'é'
30: 1, # 'í'
25: 1, # 'ó'
24: 0, # 'ö'
31: 0, # 'ú'
29: 0, # 'ü'
42: 0, # 'ő'
56: 0, # 'ű'
},
16: { # 'y'
28: 0, # 'A'
40: 0, # 'B'
54: 0, # 'C'
45: 0, # 'D'
32: 0, # 'E'
50: 0, # 'F'
49: 0, # 'G'
38: 0, # 'H'
39: 0, # 'I'
53: 0, # 'J'
36: 0, # 'K'
41: 0, # 'L'
34: 0, # 'M'
35: 0, # 'N'
47: 0, # 'O'
46: 0, # 'P'
43: 0, # 'R'
33: 0, # 'S'
37: 0, # 'T'
57: 0, # 'U'
48: 0, # 'V'
55: 0, # 'Y'
52: 0, # 'Z'
2: 3, # 'a'
18: 2, # 'b'
26: 1, # 'c'
17: 1, # 'd'
1: 3, # 'e'
27: 2, # 'f'
12: 2, # 'g'
20: 2, # 'h'
9: 3, # 'i'
22: 2, # 'j'
7: 2, # 'k'
6: 2, # 'l'
13: 2, # 'm'
4: 3, # 'n'
8: 3, # 'o'
23: 2, # 'p'
10: 2, # 'r'
5: 3, # 's'
3: 3, # 't'
21: 3, # 'u'
19: 3, # 'v'
62: 0, # 'x'
16: 0, # 'y'
11: 2, # 'z'
51: 0, # 'Á'
44: 0, # 'É'
61: 0, # 'Í'
58: 0, # 'Ó'
59: 0, # 'Ö'
60: 0, # 'Ú'
63: 0, # 'Ü'
14: 3, # 'á'
15: 3, # 'é'
30: 2, # 'í'
25: 2, # 'ó'
24: 3, # 'ö'
31: 2, # 'ú'
29: 2, # 'ü'
42: 1, # 'ő'
56: 2, # 'ű'
},
11: { # 'z'
28: 0, # 'A'
40: 0, # 'B'
54: 0, # 'C'
45: 0, # 'D'
32: 0, # 'E'
50: 0, # 'F'
49: 0, # 'G'
38: 0, # 'H'
39: 0, # 'I'
53: 0, # 'J'
36: 0, # 'K'
41: 0, # 'L'
34: 0, # 'M'
35: 0, # 'N'
47: 0, # 'O'
46: 0, # 'P'
43: 0, # 'R'
33: 0, # 'S'
37: 0, # 'T'
57: 0, # 'U'
48: 0, # 'V'
55: 0, # 'Y'
52: 0, # 'Z'
2: 3, # 'a'
18: 2, # 'b'
26: 1, # 'c'
17: 3, # 'd'
1: 3, # 'e'
27: 1, # 'f'
12: 2, # 'g'
20: 2, # 'h'
9: 3, # 'i'
22: 1, # 'j'
7: 3, # 'k'
6: 2, # 'l'
13: 3, # 'm'
4: 3, # 'n'
8: 3, # 'o'
23: 1, # 'p'
10: 2, # 'r'
5: 3, # 's'
3: 3, # 't'
21: 3, # 'u'
19: 2, # 'v'
62: 0, # 'x'
16: 1, # 'y'
11: 3, # 'z'
51: 0, # 'Á'
44: 0, # 'É'
61: 0, # 'Í'
58: 0, # 'Ó'
59: 0, # 'Ö'
60: 0, # 'Ú'
63: 0, # 'Ü'
14: 3, # 'á'
15: 3, # 'é'
30: 3, # 'í'
25: 3, # 'ó'
24: 3, # 'ö'
31: 2, # 'ú'
29: 3, # 'ü'
42: 2, # 'ő'
56: 1, # 'ű'
},
51: { # 'Á'
28: 0, # 'A'
40: 1, # 'B'
54: 1, # 'C'
45: 1, # 'D'
32: 0, # 'E'
50: 1, # 'F'
49: 2, # 'G'
38: 1, # 'H'
39: 1, # 'I'
53: 1, # 'J'
36: 1, # 'K'
41: 2, # 'L'
34: 1, # 'M'
35: 2, # 'N'
47: 0, # 'O'
46: 1, # 'P'
43: 2, # 'R'
33: 2, # 'S'
37: 1, # 'T'
57: 0, # 'U'
48: 1, # 'V'
55: 0, # 'Y'
52: 1, # 'Z'
2: 0, # 'a'
18: 1, # 'b'
26: 1, # 'c'
17: 1, # 'd'
1: 0, # 'e'
27: 0, # 'f'
12: 1, # 'g'
20: 1, # 'h'
9: 0, # 'i'
22: 1, # 'j'
7: 1, # 'k'
6: 2, # 'l'
13: 2, # 'm'
4: 0, # 'n'
8: 0, # 'o'
23: 1, # 'p'
10: 1, # 'r'
5: 1, # 's'
3: 1, # 't'
21: 0, # 'u'
19: 0, # 'v'
62: 0, # 'x'
16: 0, # 'y'
11: 1, # 'z'
51: 0, # 'Á'
44: 0, # 'É'
61: 1, # 'Í'
58: 0, # 'Ó'
59: 0, # 'Ö'
60: 0, # 'Ú'
63: 0, # 'Ü'
14: 0, # 'á'
15: 0, # 'é'
30: 0, # 'í'
25: 0, # 'ó'
24: 0, # 'ö'
31: 0, # 'ú'
29: 0, # 'ü'
42: 0, # 'ő'
56: 0, # 'ű'
},
44: { # 'É'
28: 0, # 'A'
40: 1, # 'B'
54: 1, # 'C'
45: 1, # 'D'
32: 1, # 'E'
50: 0, # 'F'
49: 2, # 'G'
38: 1, # 'H'
39: 1, # 'I'
53: 1, # 'J'
36: 1, # 'K'
41: 2, # 'L'
34: 1, # 'M'
35: 2, # 'N'
47: 0, # 'O'
46: 1, # 'P'
43: 2, # 'R'
33: 2, # 'S'
37: 2, # 'T'
57: 0, # 'U'
48: 1, # 'V'
55: 0, # 'Y'
52: 1, # 'Z'
2: 0, # 'a'
18: 1, # 'b'
26: 1, # 'c'
17: 1, # 'd'
1: 0, # 'e'
27: 0, # 'f'
12: 1, # 'g'
20: 1, # 'h'
9: 0, # 'i'
22: 1, # 'j'
7: 1, # 'k'
6: 2, # 'l'
13: 1, # 'm'
4: 2, # 'n'
8: 0, # 'o'
23: 1, # 'p'
10: 2, # 'r'
5: 3, # 's'
3: 1, # 't'
21: 0, # 'u'
19: 1, # 'v'
62: 0, # 'x'
16: 0, # 'y'
11: 0, # 'z'
51: 0, # 'Á'
44: 1, # 'É'
61: 0, # 'Í'
58: 0, # 'Ó'
59: 0, # 'Ö'
60: 0, # 'Ú'
63: 0, # 'Ü'
14: 0, # 'á'
15: 0, # 'é'
30: 0, # 'í'
25: 0, # 'ó'
24: 0, # 'ö'
31: 0, # 'ú'
29: 0, # 'ü'
42: 0, # 'ő'
56: 0, # 'ű'
},
61: { # 'Í'
28: 0, # 'A'
40: 1, # 'B'
54: 1, # 'C'
45: 1, # 'D'
32: 0, # 'E'
50: 1, # 'F'
49: 1, # 'G'
38: 0, # 'H'
39: 0, # 'I'
53: 1, # 'J'
36: 0, # 'K'
41: 1, # 'L'
34: 1, # 'M'
35: 1, # 'N'
47: 0, # 'O'
46: 1, # 'P'
43: 1, # 'R'
33: 1, # 'S'
37: 1, # 'T'
57: 0, # 'U'
48: 1, # 'V'
55: 0, # 'Y'
52: 1, # 'Z'
2: 0, # 'a'
18: 0, # 'b'
26: 0, # 'c'
17: 0, # 'd'
1: 0, # 'e'
27: 0, # 'f'
12: 2, # 'g'
20: 0, # 'h'
9: 0, # 'i'
22: 0, # 'j'
7: 0, # 'k'
6: 0, # 'l'
13: 1, # 'm'
4: 0, # 'n'
8: 0, # 'o'
23: 0, # 'p'
10: 1, # 'r'
5: 0, # 's'
3: 1, # 't'
21: 0, # 'u'
19: 0, # 'v'
62: 0, # 'x'
16: 0, # 'y'
11: 1, # 'z'
51: 0, # 'Á'
44: 0, # 'É'
61: 0, # 'Í'
58: 0, # 'Ó'
59: 0, # 'Ö'
60: 0, # 'Ú'
63: 0, # 'Ü'
14: 0, # 'á'
15: 0, # 'é'
30: 0, # 'í'
25: 0, # 'ó'
24: 0, # 'ö'
31: 0, # 'ú'
29: 0, # 'ü'
42: 0, # 'ő'
56: 0, # 'ű'
},
58: { # 'Ó'
28: 1, # 'A'
40: 1, # 'B'
54: 1, # 'C'
45: 1, # 'D'
32: 0, # 'E'
50: 1, # 'F'
49: 1, # 'G'
38: 1, # 'H'
39: 1, # 'I'
53: 1, # 'J'
36: 1, # 'K'
41: 2, # 'L'
34: 1, # 'M'
35: 1, # 'N'
47: 0, # 'O'
46: 1, # 'P'
43: 1, # 'R'
33: 1, # 'S'
37: 1, # 'T'
57: 0, # 'U'
48: 1, # 'V'
55: 0, # 'Y'
52: 1, # 'Z'
2: 0, # 'a'
18: 1, # 'b'
26: 1, # 'c'
17: 1, # 'd'
1: 0, # 'e'
27: 0, # 'f'
12: 0, # 'g'
20: 2, # 'h'
9: 0, # 'i'
22: 0, # 'j'
7: 1, # 'k'
6: 1, # 'l'
13: 0, # 'm'
4: 1, # 'n'
8: 0, # 'o'
23: 1, # 'p'
10: 1, # 'r'
5: 1, # 's'
3: 0, # 't'
21: 0, # 'u'
19: 1, # 'v'
62: 0, # 'x'
16: 0, # 'y'
11: 1, # 'z'
51: 0, # 'Á'
44: 1, # 'É'
61: 0, # 'Í'
58: 0, # 'Ó'
59: 0, # 'Ö'
60: 0, # 'Ú'
63: 0, # 'Ü'
14: 0, # 'á'
15: 0, # 'é'
30: 0, # 'í'
25: 0, # 'ó'
24: 0, # 'ö'
31: 0, # 'ú'
29: 0, # 'ü'
42: 0, # 'ő'
56: 0, # 'ű'
},
59: { # 'Ö'
28: 0, # 'A'
40: 1, # 'B'
54: 1, # 'C'
45: 1, # 'D'
32: 0, # 'E'
50: 0, # 'F'
49: 1, # 'G'
38: 1, # 'H'
39: 0, # 'I'
53: 1, # 'J'
36: 1, # 'K'
41: 1, # 'L'
34: 1, # 'M'
35: 1, # 'N'
47: 0, # 'O'
46: 1, # 'P'
43: 1, # 'R'
33: 1, # 'S'
37: 1, # 'T'
57: 0, # 'U'
48: 1, # 'V'
55: 0, # 'Y'
52: 1, # 'Z'
2: 0, # 'a'
18: 0, # 'b'
26: 1, # 'c'
17: 1, # 'd'
1: 0, # 'e'
27: 0, # 'f'
12: 0, # 'g'
20: 0, # 'h'
9: 0, # 'i'
22: 0, # 'j'
7: 1, # 'k'
6: 1, # 'l'
13: 1, # 'm'
4: 1, # 'n'
8: 0, # 'o'
23: 0, # 'p'
10: 2, # 'r'
5: 1, # 's'
3: 1, # 't'
21: 0, # 'u'
19: 1, # 'v'
62: 0, # 'x'
16: 0, # 'y'
11: 1, # 'z'
51: 0, # 'Á'
44: 0, # 'É'
61: 0, # 'Í'
58: 0, # 'Ó'
59: 0, # 'Ö'
60: 0, # 'Ú'
63: 0, # 'Ü'
14: 0, # 'á'
15: 0, # 'é'
30: 0, # 'í'
25: 0, # 'ó'
24: 0, # 'ö'
31: 0, # 'ú'
29: 0, # 'ü'
42: 0, # 'ő'
56: 0, # 'ű'
},
60: { # 'Ú'
28: 0, # 'A'
40: 1, # 'B'
54: 1, # 'C'
45: 1, # 'D'
32: 0, # 'E'
50: 1, # 'F'
49: 1, # 'G'
38: 0, # 'H'
39: 0, # 'I'
53: 1, # 'J'
36: 1, # 'K'
41: 1, # 'L'
34: 1, # 'M'
35: 1, # 'N'
47: 0, # 'O'
46: 0, # 'P'
43: 1, # 'R'
33: 1, # 'S'
37: 1, # 'T'
57: 0, # 'U'
48: 1, # 'V'
55: 0, # 'Y'
52: 1, # 'Z'
2: 0, # 'a'
18: 0, # 'b'
26: 0, # 'c'
17: 0, # 'd'
1: 0, # 'e'
27: 0, # 'f'
12: 2, # 'g'
20: 0, # 'h'
9: 0, # 'i'
22: 2, # 'j'
7: 0, # 'k'
6: 0, # 'l'
13: 0, # 'm'
4: 1, # 'n'
8: 0, # 'o'
23: 0, # 'p'
10: 1, # 'r'
5: 1, # 's'
3: 1, # 't'
21: 0, # 'u'
19: 0, # 'v'
62: 0, # 'x'
16: 0, # 'y'
11: 0, # 'z'
51: 0, # 'Á'
44: 0, # 'É'
61: 0, # 'Í'
58: 0, # 'Ó'
59: 0, # 'Ö'
60: 0, # 'Ú'
63: 0, # 'Ü'
14: 0, # 'á'
15: 0, # 'é'
30: 0, # 'í'
25: 0, # 'ó'
24: 0, # 'ö'
31: 0, # 'ú'
29: 0, # 'ü'
42: 0, # 'ő'
56: 0, # 'ű'
},
63: { # 'Ü'
28: 0, # 'A'
40: 1, # 'B'
54: 0, # 'C'
45: 1, # 'D'
32: 0, # 'E'
50: 0, # 'F'
49: 1, # 'G'
38: 1, # 'H'
39: 0, # 'I'
53: 1, # 'J'
36: 1, # 'K'
41: 1, # 'L'
34: 1, # 'M'
35: 1, # 'N'
47: 0, # 'O'
46: 0, # 'P'
43: 1, # 'R'
33: 1, # 'S'
37: 1, # 'T'
57: 0, # 'U'
48: 1, # 'V'
55: 0, # 'Y'
52: 1, # 'Z'
2: 0, # 'a'
18: 1, # 'b'
26: 0, # 'c'
17: 1, # 'd'
1: 0, # 'e'
27: 0, # 'f'
12: 1, # 'g'
20: 0, # 'h'
9: 0, # 'i'
22: 0, # 'j'
7: 0, # 'k'
6: 1, # 'l'
13: 0, # 'm'
4: 1, # 'n'
8: 0, # 'o'
23: 0, # 'p'
10: 1, # 'r'
5: 1, # 's'
3: 1, # 't'
21: 0, # 'u'
19: 1, # 'v'
62: 0, # 'x'
16: 0, # 'y'
11: 1, # 'z'
51: 0, # 'Á'
44: 0, # 'É'
61: 0, # 'Í'
58: 0, # 'Ó'
59: 0, # 'Ö'
60: 0, # 'Ú'
63: 0, # 'Ü'
14: 0, # 'á'
15: 0, # 'é'
30: 0, # 'í'
25: 0, # 'ó'
24: 0, # 'ö'
31: 0, # 'ú'
29: 0, # 'ü'
42: 0, # 'ő'
56: 0, # 'ű'
},
14: { # 'á'
28: 0, # 'A'
40: 0, # 'B'
54: 0, # 'C'
45: 0, # 'D'
32: 0, # 'E'
50: 0, # 'F'
49: 0, # 'G'
38: 0, # 'H'
39: 0, # 'I'
53: 0, # 'J'
36: 0, # 'K'
41: 0, # 'L'
34: 0, # 'M'
35: 0, # 'N'
47: 0, # 'O'
46: 0, # 'P'
43: 0, # 'R'
33: 0, # 'S'
37: 0, # 'T'
57: 0, # 'U'
48: 0, # 'V'
55: 0, # 'Y'
52: 0, # 'Z'
2: 1, # 'a'
18: 3, # 'b'
26: 3, # 'c'
17: 3, # 'd'
1: 1, # 'e'
27: 2, # 'f'
12: 3, # 'g'
20: 2, # 'h'
9: 2, # 'i'
22: 3, # 'j'
7: 3, # 'k'
6: 3, # 'l'
13: 3, # 'm'
4: 3, # 'n'
8: 1, # 'o'
23: 2, # 'p'
10: 3, # 'r'
5: 3, # 's'
3: 3, # 't'
21: 2, # 'u'
19: 3, # 'v'
62: 0, # 'x'
16: 1, # 'y'
11: 3, # 'z'
51: 0, # 'Á'
44: 0, # 'É'
61: 0, # 'Í'
58: 0, # 'Ó'
59: 0, # 'Ö'
60: 0, # 'Ú'
63: 0, # 'Ü'
14: 1, # 'á'
15: 2, # 'é'
30: 1, # 'í'
25: 0, # 'ó'
24: 1, # 'ö'
31: 0, # 'ú'
29: 1, # 'ü'
42: 0, # 'ő'
56: 0, # 'ű'
},
15: { # 'é'
28: 0, # 'A'
40: 0, # 'B'
54: 0, # 'C'
45: 0, # 'D'
32: 0, # 'E'
50: 0, # 'F'
49: 0, # 'G'
38: 0, # 'H'
39: 0, # 'I'
53: 0, # 'J'
36: 0, # 'K'
41: 0, # 'L'
34: 0, # 'M'
35: 0, # 'N'
47: 0, # 'O'
46: 0, # 'P'
43: 0, # 'R'
33: 0, # 'S'
37: 0, # 'T'
57: 0, # 'U'
48: 0, # 'V'
55: 0, # 'Y'
52: 0, # 'Z'
2: 1, # 'a'
18: 3, # 'b'
26: 2, # 'c'
17: 3, # 'd'
1: 1, # 'e'
27: 1, # 'f'
12: 3, # 'g'
20: 3, # 'h'
9: 2, # 'i'
22: 2, # 'j'
7: 3, # 'k'
6: 3, # 'l'
13: 3, # 'm'
4: 3, # 'n'
8: 1, # 'o'
23: 3, # 'p'
10: 3, # 'r'
5: 3, # 's'
3: 3, # 't'
21: 0, # 'u'
19: 3, # 'v'
62: 0, # 'x'
16: 0, # 'y'
11: 3, # 'z'
51: 0, # 'Á'
44: 0, # 'É'
61: 0, # 'Í'
58: 0, # 'Ó'
59: 0, # 'Ö'
60: 0, # 'Ú'
63: 0, # 'Ü'
14: 1, # 'á'
15: 1, # 'é'
30: 0, # 'í'
25: 0, # 'ó'
24: 0, # 'ö'
31: 0, # 'ú'
29: 1, # 'ü'
42: 0, # 'ő'
56: 0, # 'ű'
},
30: { # 'í'
28: 0, # 'A'
40: 0, # 'B'
54: 0, # 'C'
45: 0, # 'D'
32: 0, # 'E'
50: 0, # 'F'
49: 0, # 'G'
38: 0, # 'H'
39: 0, # 'I'
53: 0, # 'J'
36: 0, # 'K'
41: 0, # 'L'
34: 0, # 'M'
35: 0, # 'N'
47: 0, # 'O'
46: 0, # 'P'
43: 0, # 'R'
33: 0, # 'S'
37: 0, # 'T'
57: 0, # 'U'
48: 0, # 'V'
55: 0, # 'Y'
52: 0, # 'Z'
2: 0, # 'a'
18: 1, # 'b'
26: 2, # 'c'
17: 1, # 'd'
1: 0, # 'e'
27: 1, # 'f'
12: 3, # 'g'
20: 0, # 'h'
9: 0, # 'i'
22: 1, # 'j'
7: 1, # 'k'
6: 2, # 'l'
13: 2, # 'm'
4: 3, # 'n'
8: 0, # 'o'
23: 1, # 'p'
10: 3, # 'r'
5: 2, # 's'
3: 3, # 't'
21: 0, # 'u'
19: 3, # 'v'
62: 0, # 'x'
16: 0, # 'y'
11: 2, # 'z'
51: 0, # 'Á'
44: 0, # 'É'
61: 0, # 'Í'
58: 0, # 'Ó'
59: 0, # 'Ö'
60: 0, # 'Ú'
63: 0, # 'Ü'
14: 0, # 'á'
15: 0, # 'é'
30: 0, # 'í'
25: 0, # 'ó'
24: 0, # 'ö'
31: 0, # 'ú'
29: 0, # 'ü'
42: 0, # 'ő'
56: 0, # 'ű'
},
25: { # 'ó'
28: 0, # 'A'
40: 0, # 'B'
54: 0, # 'C'
45: 0, # 'D'
32: 0, # 'E'
50: 0, # 'F'
49: 0, # 'G'
38: 0, # 'H'
39: 0, # 'I'
53: 0, # 'J'
36: 0, # 'K'
41: 0, # 'L'
34: 0, # 'M'
35: 0, # 'N'
47: 0, # 'O'
46: 0, # 'P'
43: 0, # 'R'
33: 0, # 'S'
37: 0, # 'T'
57: 0, # 'U'
48: 0, # 'V'
55: 0, # 'Y'
52: 0, # 'Z'
2: 2, # 'a'
18: 3, # 'b'
26: 2, # 'c'
17: 3, # 'd'
1: 1, # 'e'
27: 2, # 'f'
12: 2, # 'g'
20: 2, # 'h'
9: 2, # 'i'
22: 2, # 'j'
7: 3, # 'k'
6: 3, # 'l'
13: 2, # 'm'
4: 3, # 'n'
8: 1, # 'o'
23: 2, # 'p'
10: 3, # 'r'
5: 3, # 's'
3: 3, # 't'
21: 1, # 'u'
19: 2, # 'v'
62: 0, # 'x'
16: 0, # 'y'
11: 3, # 'z'
51: 0, # 'Á'
44: 0, # 'É'
61: 0, # 'Í'
58: 0, # 'Ó'
59: 0, # 'Ö'
60: 0, # 'Ú'
63: 0, # 'Ü'
14: 1, # 'á'
15: 1, # 'é'
30: 1, # 'í'
25: 0, # 'ó'
24: 1, # 'ö'
31: 1, # 'ú'
29: 1, # 'ü'
42: 0, # 'ő'
56: 0, # 'ű'
},
24: { # 'ö'
28: 0, # 'A'
40: 0, # 'B'
54: 0, # 'C'
45: 0, # 'D'
32: 0, # 'E'
50: 0, # 'F'
49: 0, # 'G'
38: 0, # 'H'
39: 0, # 'I'
53: 0, # 'J'
36: 0, # 'K'
41: 0, # 'L'
34: 0, # 'M'
35: 0, # 'N'
47: 0, # 'O'
46: 0, # 'P'
43: 0, # 'R'
33: 0, # 'S'
37: 0, # 'T'
57: 0, # 'U'
48: 0, # 'V'
55: 0, # 'Y'
52: 0, # 'Z'
2: 0, # 'a'
18: 3, # 'b'
26: 1, # 'c'
17: 2, # 'd'
1: 0, # 'e'
27: 1, # 'f'
12: 2, # 'g'
20: 1, # 'h'
9: 0, # 'i'
22: 1, # 'j'
7: 3, # 'k'
6: 3, # 'l'
13: 3, # 'm'
4: 3, # 'n'
8: 0, # 'o'
23: 2, # 'p'
10: 3, # 'r'
5: 3, # 's'
3: 3, # 't'
21: 0, # 'u'
19: 3, # 'v'
62: 0, # 'x'
16: 0, # 'y'
11: 3, # 'z'
51: 0, # 'Á'
44: 0, # 'É'
61: 0, # 'Í'
58: 0, # 'Ó'
59: 0, # 'Ö'
60: 0, # 'Ú'
63: 0, # 'Ü'
14: 0, # 'á'
15: 0, # 'é'
30: 0, # 'í'
25: 0, # 'ó'
24: 0, # 'ö'
31: 0, # 'ú'
29: 0, # 'ü'
42: 0, # 'ő'
56: 0, # 'ű'
},
31: { # 'ú'
28: 0, # 'A'
40: 0, # 'B'
54: 0, # 'C'
45: 0, # 'D'
32: 0, # 'E'
50: 0, # 'F'
49: 0, # 'G'
38: 0, # 'H'
39: 0, # 'I'
53: 0, # 'J'
36: 0, # 'K'
41: 0, # 'L'
34: 0, # 'M'
35: 0, # 'N'
47: 0, # 'O'
46: 0, # 'P'
43: 0, # 'R'
33: 0, # 'S'
37: 0, # 'T'
57: 0, # 'U'
48: 0, # 'V'
55: 0, # 'Y'
52: 0, # 'Z'
2: 1, # 'a'
18: 1, # 'b'
26: 2, # 'c'
17: 1, # 'd'
1: 1, # 'e'
27: 2, # 'f'
12: 3, # 'g'
20: 1, # 'h'
9: 1, # 'i'
22: 3, # 'j'
7: 1, # 'k'
6: 3, # 'l'
13: 1, # 'm'
4: 2, # 'n'
8: 0, # 'o'
23: 1, # 'p'
10: 3, # 'r'
5: 3, # 's'
3: 2, # 't'
21: 1, # 'u'
19: 1, # 'v'
62: 0, # 'x'
16: 0, # 'y'
11: 2, # 'z'
51: 0, # 'Á'
44: 0, # 'É'
61: 0, # 'Í'
58: 0, # 'Ó'
59: 0, # 'Ö'
60: 0, # 'Ú'
63: 0, # 'Ü'
14: 1, # 'á'
15: 1, # 'é'
30: 0, # 'í'
25: 0, # 'ó'
24: 0, # 'ö'
31: 0, # 'ú'
29: 0, # 'ü'
42: 0, # 'ő'
56: 0, # 'ű'
},
29: { # 'ü'
28: 0, # 'A'
40: 0, # 'B'
54: 0, # 'C'
45: 0, # 'D'
32: 0, # 'E'
50: 0, # 'F'
49: 0, # 'G'
38: 0, # 'H'
39: 0, # 'I'
53: 0, # 'J'
36: 0, # 'K'
41: 0, # 'L'
34: 0, # 'M'
35: 0, # 'N'
47: 0, # 'O'
46: 0, # 'P'
43: 0, # 'R'
33: 0, # 'S'
37: 0, # 'T'
57: 0, # 'U'
48: 0, # 'V'
55: 0, # 'Y'
52: 0, # 'Z'
2: 1, # 'a'
18: 1, # 'b'
26: 1, # 'c'
17: 2, # 'd'
1: 1, # 'e'
27: 1, # 'f'
12: 3, # 'g'
20: 2, # 'h'
9: 1, # 'i'
22: 1, # 'j'
7: 3, # 'k'
6: 3, # 'l'
13: 1, # 'm'
4: 3, # 'n'
8: 0, # 'o'
23: 1, # 'p'
10: 2, # 'r'
5: 2, # 's'
3: 2, # 't'
21: 0, # 'u'
19: 2, # 'v'
62: 0, # 'x'
16: 0, # 'y'
11: 2, # 'z'
51: 0, # 'Á'
44: 0, # 'É'
61: 0, # 'Í'
58: 0, # 'Ó'
59: 0, # 'Ö'
60: 0, # 'Ú'
63: 0, # 'Ü'
14: 0, # 'á'
15: 1, # 'é'
30: 0, # 'í'
25: 0, # 'ó'
24: 0, # 'ö'
31: 0, # 'ú'
29: 0, # 'ü'
42: 0, # 'ő'
56: 0, # 'ű'
},
42: { # 'ő'
28: 0, # 'A'
40: 0, # 'B'
54: 0, # 'C'
45: 0, # 'D'
32: 0, # 'E'
50: 0, # 'F'
49: 0, # 'G'
38: 0, # 'H'
39: 0, # 'I'
53: 0, # 'J'
36: 0, # 'K'
41: 0, # 'L'
34: 0, # 'M'
35: 0, # 'N'
47: 0, # 'O'
46: 0, # 'P'
43: 0, # 'R'
33: 0, # 'S'
37: 0, # 'T'
57: 0, # 'U'
48: 0, # 'V'
55: 0, # 'Y'
52: 0, # 'Z'
2: 1, # 'a'
18: 2, # 'b'
26: 1, # 'c'
17: 2, # 'd'
1: 1, # 'e'
27: 1, # 'f'
12: 1, # 'g'
20: 1, # 'h'
9: 1, # 'i'
22: 1, # 'j'
7: 2, # 'k'
6: 3, # 'l'
13: 1, # 'm'
4: 2, # 'n'
8: 1, # 'o'
23: 1, # 'p'
10: 2, # 'r'
5: 2, # 's'
3: 2, # 't'
21: 1, # 'u'
19: 1, # 'v'
62: 0, # 'x'
16: 0, # 'y'
11: 2, # 'z'
51: 0, # 'Á'
44: 0, # 'É'
61: 0, # 'Í'
58: 0, # 'Ó'
59: 0, # 'Ö'
60: 0, # 'Ú'
63: 0, # 'Ü'
14: 0, # 'á'
15: 1, # 'é'
30: 1, # 'í'
25: 0, # 'ó'
24: 0, # 'ö'
31: 0, # 'ú'
29: 1, # 'ü'
42: 0, # 'ő'
56: 0, # 'ű'
},
56: { # 'ű'
28: 0, # 'A'
40: 0, # 'B'
54: 0, # 'C'
45: 0, # 'D'
32: 0, # 'E'
50: 0, # 'F'
49: 0, # 'G'
38: 0, # 'H'
39: 0, # 'I'
53: 0, # 'J'
36: 0, # 'K'
41: 0, # 'L'
34: 0, # 'M'
35: 0, # 'N'
47: 0, # 'O'
46: 0, # 'P'
43: 0, # 'R'
33: 0, # 'S'
37: 0, # 'T'
57: 0, # 'U'
48: 0, # 'V'
55: 0, # 'Y'
52: 0, # 'Z'
2: 1, # 'a'
18: 1, # 'b'
26: 0, # 'c'
17: 1, # 'd'
1: 1, # 'e'
27: 1, # 'f'
12: 1, # 'g'
20: 1, # 'h'
9: 1, # 'i'
22: 1, # 'j'
7: 1, # 'k'
6: 1, # 'l'
13: 0, # 'm'
4: 2, # 'n'
8: 0, # 'o'
23: 0, # 'p'
10: 1, # 'r'
5: 1, # 's'
3: 1, # 't'
21: 0, # 'u'
19: 1, # 'v'
62: 0, # 'x'
16: 0, # 'y'
11: 2, # 'z'
51: 0, # 'Á'
44: 0, # 'É'
61: 0, # 'Í'
58: 0, # 'Ó'
59: 0, # 'Ö'
60: 0, # 'Ú'
63: 0, # 'Ü'
14: 0, # 'á'
15: 0, # 'é'
30: 0, # 'í'
25: 0, # 'ó'
24: 0, # 'ö'
31: 0, # 'ú'
29: 0, # 'ü'
42: 0, # 'ő'
56: 0, # 'ű'
},
}
# 255: Undefined characters that did not exist in training text
# 254: Carriage/Return
# 253: symbol (punctuation) that does not belong to word
# 252: 0 - 9
# 251: Control characters
# Character Mapping Table(s):
WINDOWS_1250_HUNGARIAN_CHAR_TO_ORDER = {
0: 255, # '\x00'
1: 255, # '\x01'
2: 255, # '\x02'
3: 255, # '\x03'
4: 255, # '\x04'
5: 255, # '\x05'
6: 255, # '\x06'
7: 255, # '\x07'
8: 255, # '\x08'
9: 255, # '\t'
10: 254, # '\n'
11: 255, # '\x0b'
12: 255, # '\x0c'
13: 254, # '\r'
14: 255, # '\x0e'
15: 255, # '\x0f'
16: 255, # '\x10'
17: 255, # '\x11'
18: 255, # '\x12'
19: 255, # '\x13'
20: 255, # '\x14'
21: 255, # '\x15'
22: 255, # '\x16'
23: 255, # '\x17'
24: 255, # '\x18'
25: 255, # '\x19'
26: 255, # '\x1a'
27: 255, # '\x1b'
28: 255, # '\x1c'
29: 255, # '\x1d'
30: 255, # '\x1e'
31: 255, # '\x1f'
32: 253, # ' '
33: 253, # '!'
34: 253, # '"'
35: 253, # '#'
36: 253, # '$'
37: 253, # '%'
38: 253, # '&'
39: 253, # "'"
40: 253, # '('
41: 253, # ')'
42: 253, # '*'
43: 253, # '+'
44: 253, # ','
45: 253, # '-'
46: 253, # '.'
47: 253, # '/'
48: 252, # '0'
49: 252, # '1'
50: 252, # '2'
51: 252, # '3'
52: 252, # '4'
53: 252, # '5'
54: 252, # '6'
55: 252, # '7'
56: 252, # '8'
57: 252, # '9'
58: 253, # ':'
59: 253, # ';'
60: 253, # '<'
61: 253, # '='
62: 253, # '>'
63: 253, # '?'
64: 253, # '@'
65: 28, # 'A'
66: 40, # 'B'
67: 54, # 'C'
68: 45, # 'D'
69: 32, # 'E'
70: 50, # 'F'
71: 49, # 'G'
72: 38, # 'H'
73: 39, # 'I'
74: 53, # 'J'
75: 36, # 'K'
76: 41, # 'L'
77: 34, # 'M'
78: 35, # 'N'
79: 47, # 'O'
80: 46, # 'P'
81: 72, # 'Q'
82: 43, # 'R'
83: 33, # 'S'
84: 37, # 'T'
85: 57, # 'U'
86: 48, # 'V'
87: 64, # 'W'
88: 68, # 'X'
89: 55, # 'Y'
90: 52, # 'Z'
91: 253, # '['
92: 253, # '\\'
93: 253, # ']'
94: 253, # '^'
95: 253, # '_'
96: 253, # '`'
97: 2, # 'a'
98: 18, # 'b'
99: 26, # 'c'
100: 17, # 'd'
101: 1, # 'e'
102: 27, # 'f'
103: 12, # 'g'
104: 20, # 'h'
105: 9, # 'i'
106: 22, # 'j'
107: 7, # 'k'
108: 6, # 'l'
109: 13, # 'm'
110: 4, # 'n'
111: 8, # 'o'
112: 23, # 'p'
113: 67, # 'q'
114: 10, # 'r'
115: 5, # 's'
116: 3, # 't'
117: 21, # 'u'
118: 19, # 'v'
119: 65, # 'w'
120: 62, # 'x'
121: 16, # 'y'
122: 11, # 'z'
123: 253, # '{'
124: 253, # '|'
125: 253, # '}'
126: 253, # '~'
127: 253, # '\x7f'
128: 161, # '€'
129: 162, # None
130: 163, # '‚'
131: 164, # None
132: 165, # '„'
133: 166, # '…'
134: 167, # '†'
135: 168, # '‡'
136: 169, # None
137: 170, # '‰'
138: 171, # 'Š'
139: 172, # '‹'
140: 173, # 'Ś'
141: 174, # 'Ť'
142: 175, # 'Ž'
143: 176, # 'Ź'
144: 177, # None
145: 178, # '‘'
146: 179, # '’'
147: 180, # '“'
148: 78, # '”'
149: 181, # '•'
150: 69, # '–'
151: 182, # '—'
152: 183, # None
153: 184, # '™'
154: 185, # 'š'
155: 186, # '›'
156: 187, # 'ś'
157: 188, # 'ť'
158: 189, # 'ž'
159: 190, # 'ź'
160: 191, # '\xa0'
161: 192, # 'ˇ'
162: 193, # '˘'
163: 194, # 'Ł'
164: 195, # '¤'
165: 196, # 'Ą'
166: 197, # '¦'
167: 76, # '§'
168: 198, # '¨'
169: 199, # '©'
170: 200, # 'Ş'
171: 201, # '«'
172: 202, # '¬'
173: 203, # '\xad'
174: 204, # '®'
175: 205, # 'Ż'
176: 81, # '°'
177: 206, # '±'
178: 207, # '˛'
179: 208, # 'ł'
180: 209, # '´'
181: 210, # 'µ'
182: 211, # '¶'
183: 212, # '·'
184: 213, # '¸'
185: 214, # 'ą'
186: 215, # 'ş'
187: 216, # '»'
188: 217, # 'Ľ'
189: 218, # '˝'
190: 219, # 'ľ'
191: 220, # 'ż'
192: 221, # 'Ŕ'
193: 51, # 'Á'
194: 83, # 'Â'
195: 222, # 'Ă'
196: 80, # 'Ä'
197: 223, # 'Ĺ'
198: 224, # 'Ć'
199: 225, # 'Ç'
200: 226, # 'Č'
201: 44, # 'É'
202: 227, # 'Ę'
203: 228, # 'Ë'
204: 229, # 'Ě'
205: 61, # 'Í'
206: 230, # 'Î'
207: 231, # 'Ď'
208: 232, # 'Đ'
209: 233, # 'Ń'
210: 234, # 'Ň'
211: 58, # 'Ó'
212: 235, # 'Ô'
213: 66, # 'Ő'
214: 59, # 'Ö'
215: 236, # '×'
216: 237, # 'Ř'
217: 238, # 'Ů'
218: 60, # 'Ú'
219: 70, # 'Ű'
220: 63, # 'Ü'
221: 239, # 'Ý'
222: 240, # 'Ţ'
223: 241, # 'ß'
224: 84, # 'ŕ'
225: 14, # 'á'
226: 75, # 'â'
227: 242, # 'ă'
228: 71, # 'ä'
229: 82, # 'ĺ'
230: 243, # 'ć'
231: 73, # 'ç'
232: 244, # 'č'
233: 15, # 'é'
234: 85, # 'ę'
235: 79, # 'ë'
236: 86, # 'ě'
237: 30, # 'í'
238: 77, # 'î'
239: 87, # 'ď'
240: 245, # 'đ'
241: 246, # 'ń'
242: 247, # 'ň'
243: 25, # 'ó'
244: 74, # 'ô'
245: 42, # 'ő'
246: 24, # 'ö'
247: 248, # '÷'
248: 249, # 'ř'
249: 250, # 'ů'
250: 31, # 'ú'
251: 56, # 'ű'
252: 29, # 'ü'
253: 251, # 'ý'
254: 252, # 'ţ'
255: 253, # '˙'
}
WINDOWS_1250_HUNGARIAN_MODEL = SingleByteCharSetModel(
charset_name="windows-1250",
language="Hungarian",
char_to_order_map=WINDOWS_1250_HUNGARIAN_CHAR_TO_ORDER,
language_model=HUNGARIAN_LANG_MODEL,
typical_positive_ratio=0.947368,
keep_ascii_letters=True,
alphabet="ABCDEFGHIJKLMNOPRSTUVZabcdefghijklmnoprstuvzÁÉÍÓÖÚÜáéíóöúüŐőŰű",
)
ISO_8859_2_HUNGARIAN_CHAR_TO_ORDER = {
0: 255, # '\x00'
1: 255, # '\x01'
2: 255, # '\x02'
3: 255, # '\x03'
4: 255, # '\x04'
5: 255, # '\x05'
6: 255, # '\x06'
7: 255, # '\x07'
8: 255, # '\x08'
9: 255, # '\t'
10: 254, # '\n'
11: 255, # '\x0b'
12: 255, # '\x0c'
13: 254, # '\r'
14: 255, # '\x0e'
15: 255, # '\x0f'
16: 255, # '\x10'
17: 255, # '\x11'
18: 255, # '\x12'
19: 255, # '\x13'
20: 255, # '\x14'
21: 255, # '\x15'
22: 255, # '\x16'
23: 255, # '\x17'
24: 255, # '\x18'
25: 255, # '\x19'
26: 255, # '\x1a'
27: 255, # '\x1b'
28: 255, # '\x1c'
29: 255, # '\x1d'
30: 255, # '\x1e'
31: 255, # '\x1f'
32: 253, # ' '
33: 253, # '!'
34: 253, # '"'
35: 253, # '#'
36: 253, # '$'
37: 253, # '%'
38: 253, # '&'
39: 253, # "'"
40: 253, # '('
41: 253, # ')'
42: 253, # '*'
43: 253, # '+'
44: 253, # ','
45: 253, # '-'
46: 253, # '.'
47: 253, # '/'
48: 252, # '0'
49: 252, # '1'
50: 252, # '2'
51: 252, # '3'
52: 252, # '4'
53: 252, # '5'
54: 252, # '6'
55: 252, # '7'
56: 252, # '8'
57: 252, # '9'
58: 253, # ':'
59: 253, # ';'
60: 253, # '<'
61: 253, # '='
62: 253, # '>'
63: 253, # '?'
64: 253, # '@'
65: 28, # 'A'
66: 40, # 'B'
67: 54, # 'C'
68: 45, # 'D'
69: 32, # 'E'
70: 50, # 'F'
71: 49, # 'G'
72: 38, # 'H'
73: 39, # 'I'
74: 53, # 'J'
75: 36, # 'K'
76: 41, # 'L'
77: 34, # 'M'
78: 35, # 'N'
79: 47, # 'O'
80: 46, # 'P'
81: 71, # 'Q'
82: 43, # 'R'
83: 33, # 'S'
84: 37, # 'T'
85: 57, # 'U'
86: 48, # 'V'
87: 64, # 'W'
88: 68, # 'X'
89: 55, # 'Y'
90: 52, # 'Z'
91: 253, # '['
92: 253, # '\\'
93: 253, # ']'
94: 253, # '^'
95: 253, # '_'
96: 253, # '`'
97: 2, # 'a'
98: 18, # 'b'
99: 26, # 'c'
100: 17, # 'd'
101: 1, # 'e'
102: 27, # 'f'
103: 12, # 'g'
104: 20, # 'h'
105: 9, # 'i'
106: 22, # 'j'
107: 7, # 'k'
108: 6, # 'l'
109: 13, # 'm'
110: 4, # 'n'
111: 8, # 'o'
112: 23, # 'p'
113: 67, # 'q'
114: 10, # 'r'
115: 5, # 's'
116: 3, # 't'
117: 21, # 'u'
118: 19, # 'v'
119: 65, # 'w'
120: 62, # 'x'
121: 16, # 'y'
122: 11, # 'z'
123: 253, # '{'
124: 253, # '|'
125: 253, # '}'
126: 253, # '~'
127: 253, # '\x7f'
128: 159, # '\x80'
129: 160, # '\x81'
130: 161, # '\x82'
131: 162, # '\x83'
132: 163, # '\x84'
133: 164, # '\x85'
134: 165, # '\x86'
135: 166, # '\x87'
136: 167, # '\x88'
137: 168, # '\x89'
138: 169, # '\x8a'
139: 170, # '\x8b'
140: 171, # '\x8c'
141: 172, # '\x8d'
142: 173, # '\x8e'
143: 174, # '\x8f'
144: 175, # '\x90'
145: 176, # '\x91'
146: 177, # '\x92'
147: 178, # '\x93'
148: 179, # '\x94'
149: 180, # '\x95'
150: 181, # '\x96'
151: 182, # '\x97'
152: 183, # '\x98'
153: 184, # '\x99'
154: 185, # '\x9a'
155: 186, # '\x9b'
156: 187, # '\x9c'
157: 188, # '\x9d'
158: 189, # '\x9e'
159: 190, # '\x9f'
160: 191, # '\xa0'
161: 192, # 'Ą'
162: 193, # '˘'
163: 194, # 'Ł'
164: 195, # '¤'
165: 196, # 'Ľ'
166: 197, # 'Ś'
167: 75, # '§'
168: 198, # '¨'
169: 199, # 'Š'
170: 200, # 'Ş'
171: 201, # 'Ť'
172: 202, # 'Ź'
173: 203, # '\xad'
174: 204, # 'Ž'
175: 205, # 'Ż'
176: 79, # '°'
177: 206, # 'ą'
178: 207, # '˛'
179: 208, # 'ł'
180: 209, # '´'
181: 210, # 'ľ'
182: 211, # 'ś'
183: 212, # 'ˇ'
184: 213, # '¸'
185: 214, # 'š'
186: 215, # 'ş'
187: 216, # 'ť'
188: 217, # 'ź'
189: 218, # '˝'
190: 219, # 'ž'
191: 220, # 'ż'
192: 221, # 'Ŕ'
193: 51, # 'Á'
194: 81, # 'Â'
195: 222, # 'Ă'
196: 78, # 'Ä'
197: 223, # 'Ĺ'
198: 224, # 'Ć'
199: 225, # 'Ç'
200: 226, # 'Č'
201: 44, # 'É'
202: 227, # 'Ę'
203: 228, # 'Ë'
204: 229, # 'Ě'
205: 61, # 'Í'
206: 230, # 'Î'
207: 231, # 'Ď'
208: 232, # 'Đ'
209: 233, # 'Ń'
210: 234, # 'Ň'
211: 58, # 'Ó'
212: 235, # 'Ô'
213: 66, # 'Ő'
214: 59, # 'Ö'
215: 236, # '×'
216: 237, # 'Ř'
217: 238, # 'Ů'
218: 60, # 'Ú'
219: 69, # 'Ű'
220: 63, # 'Ü'
221: 239, # 'Ý'
222: 240, # 'Ţ'
223: 241, # 'ß'
224: 82, # 'ŕ'
225: 14, # 'á'
226: 74, # 'â'
227: 242, # 'ă'
228: 70, # 'ä'
229: 80, # 'ĺ'
230: 243, # 'ć'
231: 72, # 'ç'
232: 244, # 'č'
233: 15, # 'é'
234: 83, # 'ę'
235: 77, # 'ë'
236: 84, # 'ě'
237: 30, # 'í'
238: 76, # 'î'
239: 85, # 'ď'
240: 245, # 'đ'
241: 246, # 'ń'
242: 247, # 'ň'
243: 25, # 'ó'
244: 73, # 'ô'
245: 42, # 'ő'
246: 24, # 'ö'
247: 248, # '÷'
248: 249, # 'ř'
249: 250, # 'ů'
250: 31, # 'ú'
251: 56, # 'ű'
252: 29, # 'ü'
253: 251, # 'ý'
254: 252, # 'ţ'
255: 253, # '˙'
}
ISO_8859_2_HUNGARIAN_MODEL = SingleByteCharSetModel(
charset_name="ISO-8859-2",
language="Hungarian",
char_to_order_map=ISO_8859_2_HUNGARIAN_CHAR_TO_ORDER,
language_model=HUNGARIAN_LANG_MODEL,
typical_positive_ratio=0.947368,
keep_ascii_letters=True,
alphabet="ABCDEFGHIJKLMNOPRSTUVZabcdefghijklmnoprstuvzÁÉÍÓÖÚÜáéíóöúüŐőŰű",
)
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/chardet/langhungarianmodel.py
|
Python
|
mit
| 101,363 |
from pip._vendor.chardet.sbcharsetprober import SingleByteCharSetModel
# 3: Positive
# 2: Likely
# 1: Unlikely
# 0: Negative
RUSSIAN_LANG_MODEL = {
37: { # 'А'
37: 0, # 'А'
44: 1, # 'Б'
33: 1, # 'В'
46: 1, # 'Г'
41: 1, # 'Д'
48: 1, # 'Е'
56: 1, # 'Ж'
51: 1, # 'З'
42: 1, # 'И'
60: 1, # 'Й'
36: 1, # 'К'
49: 1, # 'Л'
38: 1, # 'М'
31: 2, # 'Н'
34: 1, # 'О'
35: 1, # 'П'
45: 1, # 'Р'
32: 1, # 'С'
40: 1, # 'Т'
52: 1, # 'У'
53: 1, # 'Ф'
55: 1, # 'Х'
58: 1, # 'Ц'
50: 1, # 'Ч'
57: 1, # 'Ш'
63: 1, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 1, # 'Ю'
43: 1, # 'Я'
3: 1, # 'а'
21: 2, # 'б'
10: 2, # 'в'
19: 2, # 'г'
13: 2, # 'д'
2: 0, # 'е'
24: 1, # 'ж'
20: 1, # 'з'
4: 0, # 'и'
23: 1, # 'й'
11: 2, # 'к'
8: 3, # 'л'
12: 2, # 'м'
5: 2, # 'н'
1: 0, # 'о'
15: 2, # 'п'
9: 2, # 'р'
7: 2, # 'с'
6: 2, # 'т'
14: 2, # 'у'
39: 2, # 'ф'
26: 2, # 'х'
28: 0, # 'ц'
22: 1, # 'ч'
25: 2, # 'ш'
29: 0, # 'щ'
54: 0, # 'ъ'
18: 0, # 'ы'
17: 0, # 'ь'
30: 1, # 'э'
27: 0, # 'ю'
16: 0, # 'я'
},
44: { # 'Б'
37: 1, # 'А'
44: 0, # 'Б'
33: 1, # 'В'
46: 1, # 'Г'
41: 0, # 'Д'
48: 1, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 1, # 'И'
60: 0, # 'Й'
36: 0, # 'К'
49: 1, # 'Л'
38: 1, # 'М'
31: 1, # 'Н'
34: 1, # 'О'
35: 0, # 'П'
45: 1, # 'Р'
32: 0, # 'С'
40: 0, # 'Т'
52: 1, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 0, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 1, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 1, # 'Я'
3: 2, # 'а'
21: 0, # 'б'
10: 0, # 'в'
19: 0, # 'г'
13: 1, # 'д'
2: 3, # 'е'
24: 0, # 'ж'
20: 0, # 'з'
4: 2, # 'и'
23: 0, # 'й'
11: 0, # 'к'
8: 2, # 'л'
12: 0, # 'м'
5: 0, # 'н'
1: 3, # 'о'
15: 0, # 'п'
9: 2, # 'р'
7: 0, # 'с'
6: 0, # 'т'
14: 2, # 'у'
39: 0, # 'ф'
26: 0, # 'х'
28: 0, # 'ц'
22: 0, # 'ч'
25: 0, # 'ш'
29: 0, # 'щ'
54: 0, # 'ъ'
18: 2, # 'ы'
17: 1, # 'ь'
30: 2, # 'э'
27: 1, # 'ю'
16: 1, # 'я'
},
33: { # 'В'
37: 2, # 'А'
44: 0, # 'Б'
33: 1, # 'В'
46: 0, # 'Г'
41: 1, # 'Д'
48: 1, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 1, # 'И'
60: 0, # 'Й'
36: 1, # 'К'
49: 1, # 'Л'
38: 1, # 'М'
31: 1, # 'Н'
34: 1, # 'О'
35: 1, # 'П'
45: 1, # 'Р'
32: 1, # 'С'
40: 1, # 'Т'
52: 1, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 0, # 'Ч'
57: 1, # 'Ш'
63: 0, # 'Щ'
62: 1, # 'Ы'
61: 1, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 1, # 'Я'
3: 2, # 'а'
21: 1, # 'б'
10: 1, # 'в'
19: 1, # 'г'
13: 2, # 'д'
2: 3, # 'е'
24: 0, # 'ж'
20: 2, # 'з'
4: 2, # 'и'
23: 0, # 'й'
11: 1, # 'к'
8: 2, # 'л'
12: 2, # 'м'
5: 2, # 'н'
1: 3, # 'о'
15: 2, # 'п'
9: 2, # 'р'
7: 3, # 'с'
6: 2, # 'т'
14: 2, # 'у'
39: 0, # 'ф'
26: 1, # 'х'
28: 1, # 'ц'
22: 2, # 'ч'
25: 1, # 'ш'
29: 0, # 'щ'
54: 1, # 'ъ'
18: 3, # 'ы'
17: 1, # 'ь'
30: 2, # 'э'
27: 0, # 'ю'
16: 1, # 'я'
},
46: { # 'Г'
37: 1, # 'А'
44: 1, # 'Б'
33: 0, # 'В'
46: 0, # 'Г'
41: 1, # 'Д'
48: 1, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 1, # 'И'
60: 0, # 'Й'
36: 0, # 'К'
49: 1, # 'Л'
38: 1, # 'М'
31: 1, # 'Н'
34: 1, # 'О'
35: 1, # 'П'
45: 1, # 'Р'
32: 0, # 'С'
40: 0, # 'Т'
52: 1, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 0, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 0, # 'Я'
3: 2, # 'а'
21: 0, # 'б'
10: 1, # 'в'
19: 0, # 'г'
13: 2, # 'д'
2: 2, # 'е'
24: 0, # 'ж'
20: 0, # 'з'
4: 2, # 'и'
23: 0, # 'й'
11: 0, # 'к'
8: 2, # 'л'
12: 1, # 'м'
5: 1, # 'н'
1: 3, # 'о'
15: 0, # 'п'
9: 2, # 'р'
7: 0, # 'с'
6: 0, # 'т'
14: 2, # 'у'
39: 0, # 'ф'
26: 0, # 'х'
28: 0, # 'ц'
22: 0, # 'ч'
25: 0, # 'ш'
29: 0, # 'щ'
54: 0, # 'ъ'
18: 0, # 'ы'
17: 1, # 'ь'
30: 1, # 'э'
27: 1, # 'ю'
16: 0, # 'я'
},
41: { # 'Д'
37: 1, # 'А'
44: 0, # 'Б'
33: 1, # 'В'
46: 0, # 'Г'
41: 0, # 'Д'
48: 2, # 'Е'
56: 1, # 'Ж'
51: 0, # 'З'
42: 1, # 'И'
60: 0, # 'Й'
36: 1, # 'К'
49: 1, # 'Л'
38: 0, # 'М'
31: 1, # 'Н'
34: 1, # 'О'
35: 0, # 'П'
45: 1, # 'Р'
32: 1, # 'С'
40: 0, # 'Т'
52: 1, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 1, # 'Ц'
50: 1, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 1, # 'Ы'
61: 1, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 1, # 'Я'
3: 3, # 'а'
21: 0, # 'б'
10: 2, # 'в'
19: 0, # 'г'
13: 0, # 'д'
2: 2, # 'е'
24: 3, # 'ж'
20: 1, # 'з'
4: 2, # 'и'
23: 0, # 'й'
11: 0, # 'к'
8: 2, # 'л'
12: 1, # 'м'
5: 1, # 'н'
1: 3, # 'о'
15: 0, # 'п'
9: 2, # 'р'
7: 0, # 'с'
6: 0, # 'т'
14: 2, # 'у'
39: 0, # 'ф'
26: 1, # 'х'
28: 0, # 'ц'
22: 0, # 'ч'
25: 0, # 'ш'
29: 0, # 'щ'
54: 0, # 'ъ'
18: 1, # 'ы'
17: 1, # 'ь'
30: 2, # 'э'
27: 1, # 'ю'
16: 1, # 'я'
},
48: { # 'Е'
37: 1, # 'А'
44: 1, # 'Б'
33: 1, # 'В'
46: 1, # 'Г'
41: 1, # 'Д'
48: 1, # 'Е'
56: 1, # 'Ж'
51: 1, # 'З'
42: 1, # 'И'
60: 1, # 'Й'
36: 1, # 'К'
49: 1, # 'Л'
38: 1, # 'М'
31: 2, # 'Н'
34: 1, # 'О'
35: 1, # 'П'
45: 2, # 'Р'
32: 2, # 'С'
40: 1, # 'Т'
52: 0, # 'У'
53: 0, # 'Ф'
55: 1, # 'Х'
58: 1, # 'Ц'
50: 1, # 'Ч'
57: 1, # 'Ш'
63: 1, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 1, # 'Я'
3: 0, # 'а'
21: 0, # 'б'
10: 2, # 'в'
19: 2, # 'г'
13: 2, # 'д'
2: 2, # 'е'
24: 1, # 'ж'
20: 1, # 'з'
4: 0, # 'и'
23: 2, # 'й'
11: 1, # 'к'
8: 2, # 'л'
12: 2, # 'м'
5: 1, # 'н'
1: 0, # 'о'
15: 1, # 'п'
9: 1, # 'р'
7: 3, # 'с'
6: 0, # 'т'
14: 0, # 'у'
39: 1, # 'ф'
26: 1, # 'х'
28: 0, # 'ц'
22: 0, # 'ч'
25: 1, # 'ш'
29: 2, # 'щ'
54: 0, # 'ъ'
18: 0, # 'ы'
17: 0, # 'ь'
30: 0, # 'э'
27: 1, # 'ю'
16: 0, # 'я'
},
56: { # 'Ж'
37: 1, # 'А'
44: 0, # 'Б'
33: 0, # 'В'
46: 0, # 'Г'
41: 1, # 'Д'
48: 1, # 'Е'
56: 0, # 'Ж'
51: 1, # 'З'
42: 1, # 'И'
60: 0, # 'Й'
36: 0, # 'К'
49: 0, # 'Л'
38: 0, # 'М'
31: 1, # 'Н'
34: 1, # 'О'
35: 0, # 'П'
45: 0, # 'Р'
32: 0, # 'С'
40: 0, # 'Т'
52: 1, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 0, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 0, # 'Я'
3: 2, # 'а'
21: 1, # 'б'
10: 0, # 'в'
19: 1, # 'г'
13: 1, # 'д'
2: 2, # 'е'
24: 1, # 'ж'
20: 0, # 'з'
4: 2, # 'и'
23: 0, # 'й'
11: 0, # 'к'
8: 0, # 'л'
12: 1, # 'м'
5: 0, # 'н'
1: 2, # 'о'
15: 0, # 'п'
9: 1, # 'р'
7: 0, # 'с'
6: 0, # 'т'
14: 2, # 'у'
39: 0, # 'ф'
26: 0, # 'х'
28: 0, # 'ц'
22: 0, # 'ч'
25: 0, # 'ш'
29: 0, # 'щ'
54: 0, # 'ъ'
18: 0, # 'ы'
17: 0, # 'ь'
30: 0, # 'э'
27: 2, # 'ю'
16: 0, # 'я'
},
51: { # 'З'
37: 1, # 'А'
44: 0, # 'Б'
33: 1, # 'В'
46: 1, # 'Г'
41: 1, # 'Д'
48: 1, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 1, # 'И'
60: 0, # 'Й'
36: 0, # 'К'
49: 1, # 'Л'
38: 1, # 'М'
31: 1, # 'Н'
34: 1, # 'О'
35: 0, # 'П'
45: 1, # 'Р'
32: 0, # 'С'
40: 0, # 'Т'
52: 1, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 0, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 1, # 'Ы'
61: 1, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 0, # 'Я'
3: 3, # 'а'
21: 1, # 'б'
10: 2, # 'в'
19: 0, # 'г'
13: 2, # 'д'
2: 2, # 'е'
24: 0, # 'ж'
20: 0, # 'з'
4: 2, # 'и'
23: 0, # 'й'
11: 0, # 'к'
8: 1, # 'л'
12: 1, # 'м'
5: 2, # 'н'
1: 2, # 'о'
15: 0, # 'п'
9: 1, # 'р'
7: 0, # 'с'
6: 0, # 'т'
14: 1, # 'у'
39: 0, # 'ф'
26: 0, # 'х'
28: 0, # 'ц'
22: 0, # 'ч'
25: 0, # 'ш'
29: 0, # 'щ'
54: 0, # 'ъ'
18: 1, # 'ы'
17: 0, # 'ь'
30: 0, # 'э'
27: 0, # 'ю'
16: 1, # 'я'
},
42: { # 'И'
37: 1, # 'А'
44: 1, # 'Б'
33: 1, # 'В'
46: 1, # 'Г'
41: 1, # 'Д'
48: 2, # 'Е'
56: 1, # 'Ж'
51: 1, # 'З'
42: 1, # 'И'
60: 1, # 'Й'
36: 1, # 'К'
49: 1, # 'Л'
38: 1, # 'М'
31: 1, # 'Н'
34: 1, # 'О'
35: 1, # 'П'
45: 1, # 'Р'
32: 2, # 'С'
40: 1, # 'Т'
52: 0, # 'У'
53: 1, # 'Ф'
55: 1, # 'Х'
58: 1, # 'Ц'
50: 1, # 'Ч'
57: 0, # 'Ш'
63: 1, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 1, # 'Ю'
43: 1, # 'Я'
3: 1, # 'а'
21: 2, # 'б'
10: 2, # 'в'
19: 2, # 'г'
13: 2, # 'д'
2: 2, # 'е'
24: 0, # 'ж'
20: 2, # 'з'
4: 1, # 'и'
23: 0, # 'й'
11: 1, # 'к'
8: 2, # 'л'
12: 2, # 'м'
5: 2, # 'н'
1: 1, # 'о'
15: 1, # 'п'
9: 2, # 'р'
7: 2, # 'с'
6: 2, # 'т'
14: 1, # 'у'
39: 1, # 'ф'
26: 2, # 'х'
28: 0, # 'ц'
22: 0, # 'ч'
25: 1, # 'ш'
29: 1, # 'щ'
54: 0, # 'ъ'
18: 0, # 'ы'
17: 0, # 'ь'
30: 0, # 'э'
27: 1, # 'ю'
16: 0, # 'я'
},
60: { # 'Й'
37: 0, # 'А'
44: 0, # 'Б'
33: 0, # 'В'
46: 0, # 'Г'
41: 1, # 'Д'
48: 0, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 0, # 'И'
60: 0, # 'Й'
36: 1, # 'К'
49: 1, # 'Л'
38: 0, # 'М'
31: 1, # 'Н'
34: 0, # 'О'
35: 0, # 'П'
45: 0, # 'Р'
32: 1, # 'С'
40: 1, # 'Т'
52: 0, # 'У'
53: 0, # 'Ф'
55: 1, # 'Х'
58: 1, # 'Ц'
50: 0, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 0, # 'Я'
3: 0, # 'а'
21: 0, # 'б'
10: 0, # 'в'
19: 0, # 'г'
13: 0, # 'д'
2: 1, # 'е'
24: 0, # 'ж'
20: 0, # 'з'
4: 0, # 'и'
23: 0, # 'й'
11: 0, # 'к'
8: 0, # 'л'
12: 0, # 'м'
5: 0, # 'н'
1: 2, # 'о'
15: 0, # 'п'
9: 0, # 'р'
7: 0, # 'с'
6: 0, # 'т'
14: 0, # 'у'
39: 0, # 'ф'
26: 0, # 'х'
28: 0, # 'ц'
22: 0, # 'ч'
25: 0, # 'ш'
29: 0, # 'щ'
54: 0, # 'ъ'
18: 0, # 'ы'
17: 0, # 'ь'
30: 0, # 'э'
27: 0, # 'ю'
16: 0, # 'я'
},
36: { # 'К'
37: 2, # 'А'
44: 0, # 'Б'
33: 1, # 'В'
46: 0, # 'Г'
41: 0, # 'Д'
48: 1, # 'Е'
56: 0, # 'Ж'
51: 1, # 'З'
42: 1, # 'И'
60: 0, # 'Й'
36: 0, # 'К'
49: 1, # 'Л'
38: 0, # 'М'
31: 1, # 'Н'
34: 2, # 'О'
35: 1, # 'П'
45: 1, # 'Р'
32: 1, # 'С'
40: 1, # 'Т'
52: 1, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 1, # 'Ц'
50: 0, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 0, # 'Я'
3: 3, # 'а'
21: 0, # 'б'
10: 1, # 'в'
19: 0, # 'г'
13: 0, # 'д'
2: 2, # 'е'
24: 0, # 'ж'
20: 0, # 'з'
4: 2, # 'и'
23: 0, # 'й'
11: 0, # 'к'
8: 2, # 'л'
12: 0, # 'м'
5: 1, # 'н'
1: 3, # 'о'
15: 0, # 'п'
9: 2, # 'р'
7: 2, # 'с'
6: 2, # 'т'
14: 2, # 'у'
39: 0, # 'ф'
26: 1, # 'х'
28: 0, # 'ц'
22: 0, # 'ч'
25: 0, # 'ш'
29: 0, # 'щ'
54: 0, # 'ъ'
18: 1, # 'ы'
17: 1, # 'ь'
30: 2, # 'э'
27: 1, # 'ю'
16: 0, # 'я'
},
49: { # 'Л'
37: 2, # 'А'
44: 0, # 'Б'
33: 0, # 'В'
46: 1, # 'Г'
41: 0, # 'Д'
48: 1, # 'Е'
56: 1, # 'Ж'
51: 0, # 'З'
42: 1, # 'И'
60: 0, # 'Й'
36: 1, # 'К'
49: 1, # 'Л'
38: 1, # 'М'
31: 0, # 'Н'
34: 1, # 'О'
35: 1, # 'П'
45: 0, # 'Р'
32: 1, # 'С'
40: 1, # 'Т'
52: 1, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 1, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 1, # 'Ы'
61: 1, # 'Ь'
47: 0, # 'Э'
59: 1, # 'Ю'
43: 1, # 'Я'
3: 2, # 'а'
21: 0, # 'б'
10: 0, # 'в'
19: 1, # 'г'
13: 0, # 'д'
2: 2, # 'е'
24: 1, # 'ж'
20: 0, # 'з'
4: 2, # 'и'
23: 0, # 'й'
11: 0, # 'к'
8: 1, # 'л'
12: 0, # 'м'
5: 1, # 'н'
1: 2, # 'о'
15: 0, # 'п'
9: 0, # 'р'
7: 0, # 'с'
6: 0, # 'т'
14: 2, # 'у'
39: 0, # 'ф'
26: 1, # 'х'
28: 0, # 'ц'
22: 0, # 'ч'
25: 0, # 'ш'
29: 0, # 'щ'
54: 0, # 'ъ'
18: 1, # 'ы'
17: 1, # 'ь'
30: 2, # 'э'
27: 2, # 'ю'
16: 1, # 'я'
},
38: { # 'М'
37: 1, # 'А'
44: 1, # 'Б'
33: 1, # 'В'
46: 0, # 'Г'
41: 0, # 'Д'
48: 1, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 1, # 'И'
60: 0, # 'Й'
36: 1, # 'К'
49: 1, # 'Л'
38: 1, # 'М'
31: 1, # 'Н'
34: 1, # 'О'
35: 1, # 'П'
45: 1, # 'Р'
32: 1, # 'С'
40: 1, # 'Т'
52: 1, # 'У'
53: 1, # 'Ф'
55: 1, # 'Х'
58: 0, # 'Ц'
50: 0, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 1, # 'Ы'
61: 0, # 'Ь'
47: 1, # 'Э'
59: 0, # 'Ю'
43: 1, # 'Я'
3: 3, # 'а'
21: 0, # 'б'
10: 0, # 'в'
19: 1, # 'г'
13: 0, # 'д'
2: 2, # 'е'
24: 0, # 'ж'
20: 0, # 'з'
4: 3, # 'и'
23: 0, # 'й'
11: 0, # 'к'
8: 1, # 'л'
12: 1, # 'м'
5: 2, # 'н'
1: 3, # 'о'
15: 0, # 'п'
9: 1, # 'р'
7: 1, # 'с'
6: 0, # 'т'
14: 2, # 'у'
39: 0, # 'ф'
26: 0, # 'х'
28: 0, # 'ц'
22: 0, # 'ч'
25: 0, # 'ш'
29: 0, # 'щ'
54: 0, # 'ъ'
18: 3, # 'ы'
17: 1, # 'ь'
30: 2, # 'э'
27: 1, # 'ю'
16: 1, # 'я'
},
31: { # 'Н'
37: 2, # 'А'
44: 0, # 'Б'
33: 0, # 'В'
46: 1, # 'Г'
41: 1, # 'Д'
48: 1, # 'Е'
56: 0, # 'Ж'
51: 1, # 'З'
42: 2, # 'И'
60: 0, # 'Й'
36: 1, # 'К'
49: 0, # 'Л'
38: 0, # 'М'
31: 1, # 'Н'
34: 1, # 'О'
35: 0, # 'П'
45: 1, # 'Р'
32: 1, # 'С'
40: 1, # 'Т'
52: 1, # 'У'
53: 1, # 'Ф'
55: 1, # 'Х'
58: 1, # 'Ц'
50: 1, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 1, # 'Ы'
61: 1, # 'Ь'
47: 1, # 'Э'
59: 0, # 'Ю'
43: 1, # 'Я'
3: 3, # 'а'
21: 0, # 'б'
10: 0, # 'в'
19: 0, # 'г'
13: 0, # 'д'
2: 3, # 'е'
24: 0, # 'ж'
20: 0, # 'з'
4: 3, # 'и'
23: 0, # 'й'
11: 0, # 'к'
8: 0, # 'л'
12: 0, # 'м'
5: 0, # 'н'
1: 3, # 'о'
15: 0, # 'п'
9: 1, # 'р'
7: 0, # 'с'
6: 0, # 'т'
14: 3, # 'у'
39: 0, # 'ф'
26: 1, # 'х'
28: 0, # 'ц'
22: 0, # 'ч'
25: 0, # 'ш'
29: 0, # 'щ'
54: 0, # 'ъ'
18: 1, # 'ы'
17: 2, # 'ь'
30: 1, # 'э'
27: 1, # 'ю'
16: 1, # 'я'
},
34: { # 'О'
37: 0, # 'А'
44: 1, # 'Б'
33: 1, # 'В'
46: 1, # 'Г'
41: 2, # 'Д'
48: 1, # 'Е'
56: 1, # 'Ж'
51: 1, # 'З'
42: 1, # 'И'
60: 1, # 'Й'
36: 1, # 'К'
49: 2, # 'Л'
38: 1, # 'М'
31: 2, # 'Н'
34: 1, # 'О'
35: 1, # 'П'
45: 2, # 'Р'
32: 1, # 'С'
40: 1, # 'Т'
52: 1, # 'У'
53: 1, # 'Ф'
55: 1, # 'Х'
58: 0, # 'Ц'
50: 1, # 'Ч'
57: 1, # 'Ш'
63: 1, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 1, # 'Я'
3: 1, # 'а'
21: 2, # 'б'
10: 1, # 'в'
19: 2, # 'г'
13: 2, # 'д'
2: 0, # 'е'
24: 1, # 'ж'
20: 1, # 'з'
4: 0, # 'и'
23: 1, # 'й'
11: 2, # 'к'
8: 2, # 'л'
12: 1, # 'м'
5: 3, # 'н'
1: 0, # 'о'
15: 2, # 'п'
9: 2, # 'р'
7: 2, # 'с'
6: 2, # 'т'
14: 1, # 'у'
39: 1, # 'ф'
26: 2, # 'х'
28: 1, # 'ц'
22: 2, # 'ч'
25: 2, # 'ш'
29: 1, # 'щ'
54: 0, # 'ъ'
18: 0, # 'ы'
17: 0, # 'ь'
30: 0, # 'э'
27: 0, # 'ю'
16: 0, # 'я'
},
35: { # 'П'
37: 1, # 'А'
44: 0, # 'Б'
33: 0, # 'В'
46: 0, # 'Г'
41: 0, # 'Д'
48: 1, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 1, # 'И'
60: 0, # 'Й'
36: 0, # 'К'
49: 1, # 'Л'
38: 0, # 'М'
31: 1, # 'Н'
34: 1, # 'О'
35: 1, # 'П'
45: 2, # 'Р'
32: 1, # 'С'
40: 1, # 'Т'
52: 1, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 0, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 1, # 'Ы'
61: 1, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 1, # 'Я'
3: 2, # 'а'
21: 0, # 'б'
10: 0, # 'в'
19: 0, # 'г'
13: 0, # 'д'
2: 2, # 'е'
24: 0, # 'ж'
20: 0, # 'з'
4: 2, # 'и'
23: 0, # 'й'
11: 0, # 'к'
8: 2, # 'л'
12: 0, # 'м'
5: 1, # 'н'
1: 3, # 'о'
15: 0, # 'п'
9: 3, # 'р'
7: 1, # 'с'
6: 1, # 'т'
14: 2, # 'у'
39: 1, # 'ф'
26: 0, # 'х'
28: 0, # 'ц'
22: 0, # 'ч'
25: 1, # 'ш'
29: 0, # 'щ'
54: 0, # 'ъ'
18: 1, # 'ы'
17: 2, # 'ь'
30: 1, # 'э'
27: 0, # 'ю'
16: 2, # 'я'
},
45: { # 'Р'
37: 2, # 'А'
44: 1, # 'Б'
33: 1, # 'В'
46: 1, # 'Г'
41: 1, # 'Д'
48: 2, # 'Е'
56: 1, # 'Ж'
51: 0, # 'З'
42: 2, # 'И'
60: 0, # 'Й'
36: 1, # 'К'
49: 1, # 'Л'
38: 1, # 'М'
31: 1, # 'Н'
34: 2, # 'О'
35: 0, # 'П'
45: 1, # 'Р'
32: 1, # 'С'
40: 1, # 'Т'
52: 1, # 'У'
53: 0, # 'Ф'
55: 1, # 'Х'
58: 1, # 'Ц'
50: 1, # 'Ч'
57: 1, # 'Ш'
63: 0, # 'Щ'
62: 1, # 'Ы'
61: 1, # 'Ь'
47: 1, # 'Э'
59: 1, # 'Ю'
43: 1, # 'Я'
3: 3, # 'а'
21: 0, # 'б'
10: 1, # 'в'
19: 0, # 'г'
13: 0, # 'д'
2: 2, # 'е'
24: 1, # 'ж'
20: 0, # 'з'
4: 2, # 'и'
23: 0, # 'й'
11: 0, # 'к'
8: 0, # 'л'
12: 0, # 'м'
5: 0, # 'н'
1: 3, # 'о'
15: 0, # 'п'
9: 1, # 'р'
7: 0, # 'с'
6: 0, # 'т'
14: 2, # 'у'
39: 0, # 'ф'
26: 0, # 'х'
28: 0, # 'ц'
22: 0, # 'ч'
25: 0, # 'ш'
29: 0, # 'щ'
54: 0, # 'ъ'
18: 2, # 'ы'
17: 0, # 'ь'
30: 1, # 'э'
27: 1, # 'ю'
16: 2, # 'я'
},
32: { # 'С'
37: 1, # 'А'
44: 1, # 'Б'
33: 1, # 'В'
46: 1, # 'Г'
41: 1, # 'Д'
48: 1, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 1, # 'И'
60: 0, # 'Й'
36: 1, # 'К'
49: 1, # 'Л'
38: 1, # 'М'
31: 1, # 'Н'
34: 1, # 'О'
35: 1, # 'П'
45: 1, # 'Р'
32: 1, # 'С'
40: 2, # 'Т'
52: 1, # 'У'
53: 0, # 'Ф'
55: 1, # 'Х'
58: 1, # 'Ц'
50: 1, # 'Ч'
57: 1, # 'Ш'
63: 0, # 'Щ'
62: 1, # 'Ы'
61: 1, # 'Ь'
47: 1, # 'Э'
59: 1, # 'Ю'
43: 1, # 'Я'
3: 2, # 'а'
21: 1, # 'б'
10: 2, # 'в'
19: 1, # 'г'
13: 2, # 'д'
2: 3, # 'е'
24: 1, # 'ж'
20: 1, # 'з'
4: 2, # 'и'
23: 0, # 'й'
11: 2, # 'к'
8: 2, # 'л'
12: 2, # 'м'
5: 2, # 'н'
1: 2, # 'о'
15: 2, # 'п'
9: 2, # 'р'
7: 1, # 'с'
6: 3, # 'т'
14: 2, # 'у'
39: 1, # 'ф'
26: 1, # 'х'
28: 1, # 'ц'
22: 1, # 'ч'
25: 0, # 'ш'
29: 0, # 'щ'
54: 1, # 'ъ'
18: 1, # 'ы'
17: 1, # 'ь'
30: 2, # 'э'
27: 1, # 'ю'
16: 1, # 'я'
},
40: { # 'Т'
37: 1, # 'А'
44: 0, # 'Б'
33: 1, # 'В'
46: 0, # 'Г'
41: 0, # 'Д'
48: 1, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 1, # 'И'
60: 0, # 'Й'
36: 1, # 'К'
49: 1, # 'Л'
38: 1, # 'М'
31: 1, # 'Н'
34: 2, # 'О'
35: 0, # 'П'
45: 1, # 'Р'
32: 1, # 'С'
40: 1, # 'Т'
52: 1, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 1, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 1, # 'Ы'
61: 1, # 'Ь'
47: 1, # 'Э'
59: 1, # 'Ю'
43: 1, # 'Я'
3: 3, # 'а'
21: 1, # 'б'
10: 2, # 'в'
19: 0, # 'г'
13: 0, # 'д'
2: 3, # 'е'
24: 0, # 'ж'
20: 0, # 'з'
4: 2, # 'и'
23: 0, # 'й'
11: 1, # 'к'
8: 1, # 'л'
12: 0, # 'м'
5: 0, # 'н'
1: 3, # 'о'
15: 0, # 'п'
9: 2, # 'р'
7: 1, # 'с'
6: 0, # 'т'
14: 2, # 'у'
39: 0, # 'ф'
26: 0, # 'х'
28: 0, # 'ц'
22: 0, # 'ч'
25: 0, # 'ш'
29: 1, # 'щ'
54: 0, # 'ъ'
18: 3, # 'ы'
17: 1, # 'ь'
30: 2, # 'э'
27: 1, # 'ю'
16: 1, # 'я'
},
52: { # 'У'
37: 1, # 'А'
44: 1, # 'Б'
33: 1, # 'В'
46: 1, # 'Г'
41: 1, # 'Д'
48: 1, # 'Е'
56: 1, # 'Ж'
51: 0, # 'З'
42: 0, # 'И'
60: 1, # 'Й'
36: 1, # 'К'
49: 1, # 'Л'
38: 1, # 'М'
31: 1, # 'Н'
34: 1, # 'О'
35: 1, # 'П'
45: 1, # 'Р'
32: 1, # 'С'
40: 1, # 'Т'
52: 0, # 'У'
53: 0, # 'Ф'
55: 1, # 'Х'
58: 0, # 'Ц'
50: 1, # 'Ч'
57: 1, # 'Ш'
63: 1, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 1, # 'Ю'
43: 0, # 'Я'
3: 1, # 'а'
21: 2, # 'б'
10: 2, # 'в'
19: 1, # 'г'
13: 2, # 'д'
2: 1, # 'е'
24: 2, # 'ж'
20: 2, # 'з'
4: 2, # 'и'
23: 1, # 'й'
11: 1, # 'к'
8: 2, # 'л'
12: 2, # 'м'
5: 1, # 'н'
1: 2, # 'о'
15: 1, # 'п'
9: 2, # 'р'
7: 2, # 'с'
6: 2, # 'т'
14: 0, # 'у'
39: 1, # 'ф'
26: 1, # 'х'
28: 1, # 'ц'
22: 2, # 'ч'
25: 1, # 'ш'
29: 1, # 'щ'
54: 0, # 'ъ'
18: 0, # 'ы'
17: 0, # 'ь'
30: 2, # 'э'
27: 1, # 'ю'
16: 0, # 'я'
},
53: { # 'Ф'
37: 1, # 'А'
44: 1, # 'Б'
33: 0, # 'В'
46: 0, # 'Г'
41: 0, # 'Д'
48: 1, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 1, # 'И'
60: 0, # 'Й'
36: 0, # 'К'
49: 1, # 'Л'
38: 0, # 'М'
31: 0, # 'Н'
34: 1, # 'О'
35: 0, # 'П'
45: 1, # 'Р'
32: 0, # 'С'
40: 0, # 'Т'
52: 1, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 0, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 0, # 'Я'
3: 2, # 'а'
21: 0, # 'б'
10: 0, # 'в'
19: 0, # 'г'
13: 0, # 'д'
2: 2, # 'е'
24: 0, # 'ж'
20: 0, # 'з'
4: 2, # 'и'
23: 0, # 'й'
11: 0, # 'к'
8: 2, # 'л'
12: 0, # 'м'
5: 0, # 'н'
1: 2, # 'о'
15: 0, # 'п'
9: 2, # 'р'
7: 0, # 'с'
6: 1, # 'т'
14: 2, # 'у'
39: 0, # 'ф'
26: 0, # 'х'
28: 0, # 'ц'
22: 0, # 'ч'
25: 0, # 'ш'
29: 0, # 'щ'
54: 0, # 'ъ'
18: 0, # 'ы'
17: 1, # 'ь'
30: 2, # 'э'
27: 0, # 'ю'
16: 0, # 'я'
},
55: { # 'Х'
37: 1, # 'А'
44: 0, # 'Б'
33: 1, # 'В'
46: 0, # 'Г'
41: 0, # 'Д'
48: 0, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 1, # 'И'
60: 0, # 'Й'
36: 0, # 'К'
49: 1, # 'Л'
38: 1, # 'М'
31: 1, # 'Н'
34: 1, # 'О'
35: 0, # 'П'
45: 0, # 'Р'
32: 0, # 'С'
40: 0, # 'Т'
52: 0, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 0, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 0, # 'Я'
3: 2, # 'а'
21: 0, # 'б'
10: 2, # 'в'
19: 0, # 'г'
13: 0, # 'д'
2: 2, # 'е'
24: 0, # 'ж'
20: 0, # 'з'
4: 2, # 'и'
23: 0, # 'й'
11: 0, # 'к'
8: 2, # 'л'
12: 1, # 'м'
5: 0, # 'н'
1: 2, # 'о'
15: 0, # 'п'
9: 2, # 'р'
7: 0, # 'с'
6: 0, # 'т'
14: 1, # 'у'
39: 0, # 'ф'
26: 0, # 'х'
28: 0, # 'ц'
22: 0, # 'ч'
25: 0, # 'ш'
29: 0, # 'щ'
54: 0, # 'ъ'
18: 0, # 'ы'
17: 1, # 'ь'
30: 1, # 'э'
27: 0, # 'ю'
16: 0, # 'я'
},
58: { # 'Ц'
37: 1, # 'А'
44: 0, # 'Б'
33: 0, # 'В'
46: 0, # 'Г'
41: 0, # 'Д'
48: 1, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 1, # 'И'
60: 0, # 'Й'
36: 1, # 'К'
49: 0, # 'Л'
38: 0, # 'М'
31: 0, # 'Н'
34: 1, # 'О'
35: 0, # 'П'
45: 0, # 'Р'
32: 0, # 'С'
40: 0, # 'Т'
52: 1, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 0, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 1, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 0, # 'Я'
3: 1, # 'а'
21: 0, # 'б'
10: 1, # 'в'
19: 0, # 'г'
13: 0, # 'д'
2: 2, # 'е'
24: 0, # 'ж'
20: 0, # 'з'
4: 2, # 'и'
23: 0, # 'й'
11: 0, # 'к'
8: 0, # 'л'
12: 0, # 'м'
5: 0, # 'н'
1: 0, # 'о'
15: 0, # 'п'
9: 0, # 'р'
7: 0, # 'с'
6: 0, # 'т'
14: 1, # 'у'
39: 0, # 'ф'
26: 0, # 'х'
28: 0, # 'ц'
22: 0, # 'ч'
25: 0, # 'ш'
29: 0, # 'щ'
54: 0, # 'ъ'
18: 1, # 'ы'
17: 0, # 'ь'
30: 0, # 'э'
27: 1, # 'ю'
16: 0, # 'я'
},
50: { # 'Ч'
37: 1, # 'А'
44: 0, # 'Б'
33: 0, # 'В'
46: 0, # 'Г'
41: 0, # 'Д'
48: 1, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 1, # 'И'
60: 0, # 'Й'
36: 1, # 'К'
49: 0, # 'Л'
38: 0, # 'М'
31: 1, # 'Н'
34: 0, # 'О'
35: 1, # 'П'
45: 0, # 'Р'
32: 0, # 'С'
40: 1, # 'Т'
52: 1, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 0, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 0, # 'Ы'
61: 1, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 0, # 'Я'
3: 2, # 'а'
21: 0, # 'б'
10: 0, # 'в'
19: 0, # 'г'
13: 0, # 'д'
2: 2, # 'е'
24: 0, # 'ж'
20: 0, # 'з'
4: 2, # 'и'
23: 0, # 'й'
11: 0, # 'к'
8: 1, # 'л'
12: 0, # 'м'
5: 0, # 'н'
1: 1, # 'о'
15: 0, # 'п'
9: 1, # 'р'
7: 0, # 'с'
6: 3, # 'т'
14: 2, # 'у'
39: 0, # 'ф'
26: 0, # 'х'
28: 0, # 'ц'
22: 0, # 'ч'
25: 0, # 'ш'
29: 0, # 'щ'
54: 0, # 'ъ'
18: 0, # 'ы'
17: 1, # 'ь'
30: 0, # 'э'
27: 0, # 'ю'
16: 0, # 'я'
},
57: { # 'Ш'
37: 1, # 'А'
44: 0, # 'Б'
33: 0, # 'В'
46: 0, # 'Г'
41: 0, # 'Д'
48: 1, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 1, # 'И'
60: 0, # 'Й'
36: 1, # 'К'
49: 1, # 'Л'
38: 0, # 'М'
31: 1, # 'Н'
34: 1, # 'О'
35: 0, # 'П'
45: 0, # 'Р'
32: 0, # 'С'
40: 0, # 'Т'
52: 1, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 0, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 0, # 'Я'
3: 2, # 'а'
21: 0, # 'б'
10: 1, # 'в'
19: 0, # 'г'
13: 0, # 'д'
2: 2, # 'е'
24: 0, # 'ж'
20: 0, # 'з'
4: 1, # 'и'
23: 0, # 'й'
11: 1, # 'к'
8: 2, # 'л'
12: 1, # 'м'
5: 1, # 'н'
1: 2, # 'о'
15: 2, # 'п'
9: 1, # 'р'
7: 0, # 'с'
6: 2, # 'т'
14: 2, # 'у'
39: 0, # 'ф'
26: 1, # 'х'
28: 0, # 'ц'
22: 0, # 'ч'
25: 1, # 'ш'
29: 0, # 'щ'
54: 0, # 'ъ'
18: 0, # 'ы'
17: 0, # 'ь'
30: 1, # 'э'
27: 0, # 'ю'
16: 0, # 'я'
},
63: { # 'Щ'
37: 1, # 'А'
44: 0, # 'Б'
33: 0, # 'В'
46: 0, # 'Г'
41: 0, # 'Д'
48: 1, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 1, # 'И'
60: 0, # 'Й'
36: 0, # 'К'
49: 0, # 'Л'
38: 0, # 'М'
31: 0, # 'Н'
34: 0, # 'О'
35: 0, # 'П'
45: 0, # 'Р'
32: 0, # 'С'
40: 0, # 'Т'
52: 0, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 0, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 0, # 'Ы'
61: 1, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 0, # 'Я'
3: 1, # 'а'
21: 0, # 'б'
10: 0, # 'в'
19: 0, # 'г'
13: 0, # 'д'
2: 1, # 'е'
24: 0, # 'ж'
20: 0, # 'з'
4: 1, # 'и'
23: 0, # 'й'
11: 0, # 'к'
8: 0, # 'л'
12: 0, # 'м'
5: 0, # 'н'
1: 1, # 'о'
15: 0, # 'п'
9: 0, # 'р'
7: 0, # 'с'
6: 0, # 'т'
14: 1, # 'у'
39: 0, # 'ф'
26: 0, # 'х'
28: 0, # 'ц'
22: 0, # 'ч'
25: 0, # 'ш'
29: 0, # 'щ'
54: 0, # 'ъ'
18: 0, # 'ы'
17: 0, # 'ь'
30: 0, # 'э'
27: 0, # 'ю'
16: 0, # 'я'
},
62: { # 'Ы'
37: 0, # 'А'
44: 0, # 'Б'
33: 1, # 'В'
46: 1, # 'Г'
41: 0, # 'Д'
48: 1, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 0, # 'И'
60: 1, # 'Й'
36: 1, # 'К'
49: 1, # 'Л'
38: 1, # 'М'
31: 1, # 'Н'
34: 0, # 'О'
35: 1, # 'П'
45: 1, # 'Р'
32: 1, # 'С'
40: 1, # 'Т'
52: 0, # 'У'
53: 0, # 'Ф'
55: 1, # 'Х'
58: 1, # 'Ц'
50: 0, # 'Ч'
57: 1, # 'Ш'
63: 0, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 0, # 'Я'
3: 0, # 'а'
21: 0, # 'б'
10: 0, # 'в'
19: 0, # 'г'
13: 0, # 'д'
2: 0, # 'е'
24: 0, # 'ж'
20: 0, # 'з'
4: 0, # 'и'
23: 0, # 'й'
11: 0, # 'к'
8: 0, # 'л'
12: 0, # 'м'
5: 0, # 'н'
1: 0, # 'о'
15: 0, # 'п'
9: 0, # 'р'
7: 0, # 'с'
6: 0, # 'т'
14: 0, # 'у'
39: 0, # 'ф'
26: 0, # 'х'
28: 0, # 'ц'
22: 0, # 'ч'
25: 0, # 'ш'
29: 0, # 'щ'
54: 0, # 'ъ'
18: 0, # 'ы'
17: 0, # 'ь'
30: 0, # 'э'
27: 0, # 'ю'
16: 0, # 'я'
},
61: { # 'Ь'
37: 0, # 'А'
44: 1, # 'Б'
33: 1, # 'В'
46: 0, # 'Г'
41: 1, # 'Д'
48: 1, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 1, # 'И'
60: 0, # 'Й'
36: 1, # 'К'
49: 0, # 'Л'
38: 1, # 'М'
31: 1, # 'Н'
34: 1, # 'О'
35: 0, # 'П'
45: 0, # 'Р'
32: 1, # 'С'
40: 0, # 'Т'
52: 0, # 'У'
53: 1, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 0, # 'Ч'
57: 1, # 'Ш'
63: 0, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 1, # 'Ю'
43: 1, # 'Я'
3: 0, # 'а'
21: 0, # 'б'
10: 0, # 'в'
19: 0, # 'г'
13: 0, # 'д'
2: 0, # 'е'
24: 0, # 'ж'
20: 0, # 'з'
4: 0, # 'и'
23: 0, # 'й'
11: 0, # 'к'
8: 0, # 'л'
12: 0, # 'м'
5: 0, # 'н'
1: 0, # 'о'
15: 0, # 'п'
9: 0, # 'р'
7: 0, # 'с'
6: 0, # 'т'
14: 0, # 'у'
39: 0, # 'ф'
26: 0, # 'х'
28: 0, # 'ц'
22: 0, # 'ч'
25: 0, # 'ш'
29: 0, # 'щ'
54: 0, # 'ъ'
18: 0, # 'ы'
17: 0, # 'ь'
30: 0, # 'э'
27: 0, # 'ю'
16: 0, # 'я'
},
47: { # 'Э'
37: 0, # 'А'
44: 0, # 'Б'
33: 1, # 'В'
46: 0, # 'Г'
41: 1, # 'Д'
48: 0, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 0, # 'И'
60: 1, # 'Й'
36: 1, # 'К'
49: 1, # 'Л'
38: 1, # 'М'
31: 1, # 'Н'
34: 0, # 'О'
35: 1, # 'П'
45: 1, # 'Р'
32: 1, # 'С'
40: 1, # 'Т'
52: 0, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 0, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 0, # 'Я'
3: 1, # 'а'
21: 1, # 'б'
10: 2, # 'в'
19: 1, # 'г'
13: 2, # 'д'
2: 0, # 'е'
24: 1, # 'ж'
20: 0, # 'з'
4: 0, # 'и'
23: 2, # 'й'
11: 2, # 'к'
8: 2, # 'л'
12: 2, # 'м'
5: 2, # 'н'
1: 0, # 'о'
15: 1, # 'п'
9: 2, # 'р'
7: 1, # 'с'
6: 3, # 'т'
14: 1, # 'у'
39: 1, # 'ф'
26: 1, # 'х'
28: 0, # 'ц'
22: 0, # 'ч'
25: 1, # 'ш'
29: 0, # 'щ'
54: 0, # 'ъ'
18: 0, # 'ы'
17: 0, # 'ь'
30: 0, # 'э'
27: 0, # 'ю'
16: 0, # 'я'
},
59: { # 'Ю'
37: 1, # 'А'
44: 1, # 'Б'
33: 0, # 'В'
46: 0, # 'Г'
41: 1, # 'Д'
48: 0, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 0, # 'И'
60: 0, # 'Й'
36: 0, # 'К'
49: 0, # 'Л'
38: 0, # 'М'
31: 1, # 'Н'
34: 0, # 'О'
35: 0, # 'П'
45: 1, # 'Р'
32: 0, # 'С'
40: 1, # 'Т'
52: 0, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 1, # 'Ч'
57: 0, # 'Ш'
63: 1, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 0, # 'Я'
3: 0, # 'а'
21: 1, # 'б'
10: 0, # 'в'
19: 1, # 'г'
13: 1, # 'д'
2: 0, # 'е'
24: 1, # 'ж'
20: 0, # 'з'
4: 0, # 'и'
23: 0, # 'й'
11: 1, # 'к'
8: 2, # 'л'
12: 1, # 'м'
5: 2, # 'н'
1: 0, # 'о'
15: 1, # 'п'
9: 1, # 'р'
7: 1, # 'с'
6: 0, # 'т'
14: 0, # 'у'
39: 0, # 'ф'
26: 1, # 'х'
28: 0, # 'ц'
22: 0, # 'ч'
25: 0, # 'ш'
29: 0, # 'щ'
54: 0, # 'ъ'
18: 0, # 'ы'
17: 0, # 'ь'
30: 0, # 'э'
27: 0, # 'ю'
16: 0, # 'я'
},
43: { # 'Я'
37: 0, # 'А'
44: 0, # 'Б'
33: 1, # 'В'
46: 1, # 'Г'
41: 0, # 'Д'
48: 1, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 1, # 'И'
60: 0, # 'Й'
36: 1, # 'К'
49: 0, # 'Л'
38: 0, # 'М'
31: 1, # 'Н'
34: 0, # 'О'
35: 0, # 'П'
45: 0, # 'Р'
32: 1, # 'С'
40: 1, # 'Т'
52: 0, # 'У'
53: 0, # 'Ф'
55: 1, # 'Х'
58: 0, # 'Ц'
50: 1, # 'Ч'
57: 0, # 'Ш'
63: 1, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 1, # 'Ю'
43: 1, # 'Я'
3: 0, # 'а'
21: 1, # 'б'
10: 1, # 'в'
19: 1, # 'г'
13: 1, # 'д'
2: 0, # 'е'
24: 0, # 'ж'
20: 1, # 'з'
4: 0, # 'и'
23: 1, # 'й'
11: 1, # 'к'
8: 1, # 'л'
12: 1, # 'м'
5: 2, # 'н'
1: 0, # 'о'
15: 1, # 'п'
9: 1, # 'р'
7: 1, # 'с'
6: 0, # 'т'
14: 0, # 'у'
39: 0, # 'ф'
26: 1, # 'х'
28: 0, # 'ц'
22: 0, # 'ч'
25: 1, # 'ш'
29: 1, # 'щ'
54: 0, # 'ъ'
18: 0, # 'ы'
17: 0, # 'ь'
30: 0, # 'э'
27: 0, # 'ю'
16: 0, # 'я'
},
3: { # 'а'
37: 0, # 'А'
44: 0, # 'Б'
33: 0, # 'В'
46: 0, # 'Г'
41: 0, # 'Д'
48: 0, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 1, # 'И'
60: 0, # 'Й'
36: 0, # 'К'
49: 0, # 'Л'
38: 0, # 'М'
31: 1, # 'Н'
34: 0, # 'О'
35: 0, # 'П'
45: 0, # 'Р'
32: 0, # 'С'
40: 0, # 'Т'
52: 0, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 0, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 0, # 'Я'
3: 2, # 'а'
21: 3, # 'б'
10: 3, # 'в'
19: 3, # 'г'
13: 3, # 'д'
2: 3, # 'е'
24: 3, # 'ж'
20: 3, # 'з'
4: 3, # 'и'
23: 3, # 'й'
11: 3, # 'к'
8: 3, # 'л'
12: 3, # 'м'
5: 3, # 'н'
1: 2, # 'о'
15: 3, # 'п'
9: 3, # 'р'
7: 3, # 'с'
6: 3, # 'т'
14: 3, # 'у'
39: 2, # 'ф'
26: 3, # 'х'
28: 3, # 'ц'
22: 3, # 'ч'
25: 3, # 'ш'
29: 3, # 'щ'
54: 0, # 'ъ'
18: 0, # 'ы'
17: 0, # 'ь'
30: 2, # 'э'
27: 3, # 'ю'
16: 3, # 'я'
},
21: { # 'б'
37: 0, # 'А'
44: 0, # 'Б'
33: 0, # 'В'
46: 0, # 'Г'
41: 0, # 'Д'
48: 0, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 0, # 'И'
60: 0, # 'Й'
36: 1, # 'К'
49: 0, # 'Л'
38: 0, # 'М'
31: 0, # 'Н'
34: 0, # 'О'
35: 0, # 'П'
45: 0, # 'Р'
32: 0, # 'С'
40: 0, # 'Т'
52: 0, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 0, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 0, # 'Я'
3: 3, # 'а'
21: 2, # 'б'
10: 2, # 'в'
19: 1, # 'г'
13: 2, # 'д'
2: 3, # 'е'
24: 2, # 'ж'
20: 1, # 'з'
4: 3, # 'и'
23: 0, # 'й'
11: 2, # 'к'
8: 3, # 'л'
12: 2, # 'м'
5: 3, # 'н'
1: 3, # 'о'
15: 1, # 'п'
9: 3, # 'р'
7: 3, # 'с'
6: 2, # 'т'
14: 3, # 'у'
39: 0, # 'ф'
26: 2, # 'х'
28: 1, # 'ц'
22: 1, # 'ч'
25: 2, # 'ш'
29: 3, # 'щ'
54: 2, # 'ъ'
18: 3, # 'ы'
17: 2, # 'ь'
30: 1, # 'э'
27: 2, # 'ю'
16: 3, # 'я'
},
10: { # 'в'
37: 0, # 'А'
44: 0, # 'Б'
33: 0, # 'В'
46: 0, # 'Г'
41: 0, # 'Д'
48: 0, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 0, # 'И'
60: 0, # 'Й'
36: 0, # 'К'
49: 0, # 'Л'
38: 0, # 'М'
31: 0, # 'Н'
34: 0, # 'О'
35: 0, # 'П'
45: 0, # 'Р'
32: 0, # 'С'
40: 0, # 'Т'
52: 0, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 0, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 0, # 'Я'
3: 3, # 'а'
21: 2, # 'б'
10: 2, # 'в'
19: 2, # 'г'
13: 3, # 'д'
2: 3, # 'е'
24: 1, # 'ж'
20: 3, # 'з'
4: 3, # 'и'
23: 0, # 'й'
11: 3, # 'к'
8: 3, # 'л'
12: 2, # 'м'
5: 3, # 'н'
1: 3, # 'о'
15: 3, # 'п'
9: 3, # 'р'
7: 3, # 'с'
6: 3, # 'т'
14: 3, # 'у'
39: 1, # 'ф'
26: 2, # 'х'
28: 2, # 'ц'
22: 2, # 'ч'
25: 3, # 'ш'
29: 2, # 'щ'
54: 2, # 'ъ'
18: 3, # 'ы'
17: 3, # 'ь'
30: 1, # 'э'
27: 1, # 'ю'
16: 3, # 'я'
},
19: { # 'г'
37: 0, # 'А'
44: 0, # 'Б'
33: 0, # 'В'
46: 0, # 'Г'
41: 0, # 'Д'
48: 0, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 0, # 'И'
60: 0, # 'Й'
36: 0, # 'К'
49: 0, # 'Л'
38: 0, # 'М'
31: 0, # 'Н'
34: 0, # 'О'
35: 0, # 'П'
45: 0, # 'Р'
32: 0, # 'С'
40: 0, # 'Т'
52: 0, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 0, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 0, # 'Я'
3: 3, # 'а'
21: 1, # 'б'
10: 2, # 'в'
19: 1, # 'г'
13: 3, # 'д'
2: 3, # 'е'
24: 0, # 'ж'
20: 1, # 'з'
4: 3, # 'и'
23: 0, # 'й'
11: 2, # 'к'
8: 3, # 'л'
12: 2, # 'м'
5: 3, # 'н'
1: 3, # 'о'
15: 0, # 'п'
9: 3, # 'р'
7: 2, # 'с'
6: 2, # 'т'
14: 3, # 'у'
39: 1, # 'ф'
26: 1, # 'х'
28: 1, # 'ц'
22: 2, # 'ч'
25: 1, # 'ш'
29: 0, # 'щ'
54: 0, # 'ъ'
18: 1, # 'ы'
17: 1, # 'ь'
30: 1, # 'э'
27: 1, # 'ю'
16: 0, # 'я'
},
13: { # 'д'
37: 0, # 'А'
44: 0, # 'Б'
33: 0, # 'В'
46: 0, # 'Г'
41: 0, # 'Д'
48: 0, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 0, # 'И'
60: 0, # 'Й'
36: 0, # 'К'
49: 0, # 'Л'
38: 0, # 'М'
31: 0, # 'Н'
34: 0, # 'О'
35: 0, # 'П'
45: 0, # 'Р'
32: 0, # 'С'
40: 0, # 'Т'
52: 0, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 0, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 0, # 'Я'
3: 3, # 'а'
21: 2, # 'б'
10: 3, # 'в'
19: 2, # 'г'
13: 2, # 'д'
2: 3, # 'е'
24: 2, # 'ж'
20: 2, # 'з'
4: 3, # 'и'
23: 0, # 'й'
11: 3, # 'к'
8: 3, # 'л'
12: 2, # 'м'
5: 3, # 'н'
1: 3, # 'о'
15: 2, # 'п'
9: 3, # 'р'
7: 3, # 'с'
6: 3, # 'т'
14: 3, # 'у'
39: 1, # 'ф'
26: 2, # 'х'
28: 3, # 'ц'
22: 2, # 'ч'
25: 2, # 'ш'
29: 1, # 'щ'
54: 2, # 'ъ'
18: 3, # 'ы'
17: 3, # 'ь'
30: 1, # 'э'
27: 2, # 'ю'
16: 3, # 'я'
},
2: { # 'е'
37: 0, # 'А'
44: 0, # 'Б'
33: 0, # 'В'
46: 0, # 'Г'
41: 0, # 'Д'
48: 0, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 0, # 'И'
60: 0, # 'Й'
36: 0, # 'К'
49: 0, # 'Л'
38: 0, # 'М'
31: 0, # 'Н'
34: 0, # 'О'
35: 0, # 'П'
45: 0, # 'Р'
32: 0, # 'С'
40: 0, # 'Т'
52: 0, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 0, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 0, # 'Я'
3: 2, # 'а'
21: 3, # 'б'
10: 3, # 'в'
19: 3, # 'г'
13: 3, # 'д'
2: 3, # 'е'
24: 3, # 'ж'
20: 3, # 'з'
4: 2, # 'и'
23: 3, # 'й'
11: 3, # 'к'
8: 3, # 'л'
12: 3, # 'м'
5: 3, # 'н'
1: 3, # 'о'
15: 3, # 'п'
9: 3, # 'р'
7: 3, # 'с'
6: 3, # 'т'
14: 2, # 'у'
39: 2, # 'ф'
26: 3, # 'х'
28: 3, # 'ц'
22: 3, # 'ч'
25: 3, # 'ш'
29: 3, # 'щ'
54: 0, # 'ъ'
18: 0, # 'ы'
17: 0, # 'ь'
30: 1, # 'э'
27: 2, # 'ю'
16: 3, # 'я'
},
24: { # 'ж'
37: 0, # 'А'
44: 0, # 'Б'
33: 0, # 'В'
46: 0, # 'Г'
41: 0, # 'Д'
48: 0, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 0, # 'И'
60: 0, # 'Й'
36: 0, # 'К'
49: 0, # 'Л'
38: 0, # 'М'
31: 0, # 'Н'
34: 0, # 'О'
35: 0, # 'П'
45: 0, # 'Р'
32: 0, # 'С'
40: 0, # 'Т'
52: 0, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 0, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 0, # 'Я'
3: 3, # 'а'
21: 2, # 'б'
10: 1, # 'в'
19: 2, # 'г'
13: 3, # 'д'
2: 3, # 'е'
24: 2, # 'ж'
20: 1, # 'з'
4: 3, # 'и'
23: 0, # 'й'
11: 2, # 'к'
8: 2, # 'л'
12: 1, # 'м'
5: 3, # 'н'
1: 2, # 'о'
15: 1, # 'п'
9: 2, # 'р'
7: 2, # 'с'
6: 1, # 'т'
14: 3, # 'у'
39: 1, # 'ф'
26: 0, # 'х'
28: 1, # 'ц'
22: 2, # 'ч'
25: 0, # 'ш'
29: 0, # 'щ'
54: 0, # 'ъ'
18: 1, # 'ы'
17: 2, # 'ь'
30: 1, # 'э'
27: 1, # 'ю'
16: 1, # 'я'
},
20: { # 'з'
37: 0, # 'А'
44: 0, # 'Б'
33: 0, # 'В'
46: 0, # 'Г'
41: 0, # 'Д'
48: 0, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 0, # 'И'
60: 0, # 'Й'
36: 0, # 'К'
49: 0, # 'Л'
38: 0, # 'М'
31: 0, # 'Н'
34: 0, # 'О'
35: 0, # 'П'
45: 0, # 'Р'
32: 0, # 'С'
40: 0, # 'Т'
52: 0, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 0, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 0, # 'Я'
3: 3, # 'а'
21: 3, # 'б'
10: 3, # 'в'
19: 3, # 'г'
13: 3, # 'д'
2: 3, # 'е'
24: 2, # 'ж'
20: 2, # 'з'
4: 3, # 'и'
23: 0, # 'й'
11: 3, # 'к'
8: 3, # 'л'
12: 3, # 'м'
5: 3, # 'н'
1: 3, # 'о'
15: 0, # 'п'
9: 3, # 'р'
7: 2, # 'с'
6: 2, # 'т'
14: 3, # 'у'
39: 0, # 'ф'
26: 0, # 'х'
28: 1, # 'ц'
22: 2, # 'ч'
25: 1, # 'ш'
29: 0, # 'щ'
54: 2, # 'ъ'
18: 3, # 'ы'
17: 2, # 'ь'
30: 1, # 'э'
27: 1, # 'ю'
16: 3, # 'я'
},
4: { # 'и'
37: 1, # 'А'
44: 0, # 'Б'
33: 0, # 'В'
46: 0, # 'Г'
41: 0, # 'Д'
48: 0, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 0, # 'И'
60: 0, # 'Й'
36: 0, # 'К'
49: 0, # 'Л'
38: 0, # 'М'
31: 1, # 'Н'
34: 0, # 'О'
35: 0, # 'П'
45: 0, # 'Р'
32: 0, # 'С'
40: 0, # 'Т'
52: 0, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 0, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 0, # 'Я'
3: 3, # 'а'
21: 3, # 'б'
10: 3, # 'в'
19: 3, # 'г'
13: 3, # 'д'
2: 3, # 'е'
24: 3, # 'ж'
20: 3, # 'з'
4: 3, # 'и'
23: 3, # 'й'
11: 3, # 'к'
8: 3, # 'л'
12: 3, # 'м'
5: 3, # 'н'
1: 3, # 'о'
15: 3, # 'п'
9: 3, # 'р'
7: 3, # 'с'
6: 3, # 'т'
14: 2, # 'у'
39: 2, # 'ф'
26: 3, # 'х'
28: 3, # 'ц'
22: 3, # 'ч'
25: 3, # 'ш'
29: 3, # 'щ'
54: 0, # 'ъ'
18: 0, # 'ы'
17: 0, # 'ь'
30: 2, # 'э'
27: 3, # 'ю'
16: 3, # 'я'
},
23: { # 'й'
37: 0, # 'А'
44: 0, # 'Б'
33: 0, # 'В'
46: 0, # 'Г'
41: 0, # 'Д'
48: 0, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 0, # 'И'
60: 0, # 'Й'
36: 0, # 'К'
49: 0, # 'Л'
38: 0, # 'М'
31: 0, # 'Н'
34: 0, # 'О'
35: 0, # 'П'
45: 0, # 'Р'
32: 0, # 'С'
40: 0, # 'Т'
52: 0, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 0, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 0, # 'Я'
3: 1, # 'а'
21: 1, # 'б'
10: 1, # 'в'
19: 2, # 'г'
13: 3, # 'д'
2: 2, # 'е'
24: 0, # 'ж'
20: 2, # 'з'
4: 1, # 'и'
23: 0, # 'й'
11: 2, # 'к'
8: 2, # 'л'
12: 2, # 'м'
5: 3, # 'н'
1: 2, # 'о'
15: 1, # 'п'
9: 2, # 'р'
7: 3, # 'с'
6: 3, # 'т'
14: 1, # 'у'
39: 2, # 'ф'
26: 1, # 'х'
28: 2, # 'ц'
22: 3, # 'ч'
25: 2, # 'ш'
29: 1, # 'щ'
54: 0, # 'ъ'
18: 0, # 'ы'
17: 0, # 'ь'
30: 1, # 'э'
27: 1, # 'ю'
16: 2, # 'я'
},
11: { # 'к'
37: 0, # 'А'
44: 0, # 'Б'
33: 0, # 'В'
46: 0, # 'Г'
41: 0, # 'Д'
48: 0, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 0, # 'И'
60: 0, # 'Й'
36: 0, # 'К'
49: 0, # 'Л'
38: 0, # 'М'
31: 0, # 'Н'
34: 0, # 'О'
35: 0, # 'П'
45: 0, # 'Р'
32: 0, # 'С'
40: 0, # 'Т'
52: 0, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 0, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 0, # 'Я'
3: 3, # 'а'
21: 1, # 'б'
10: 3, # 'в'
19: 1, # 'г'
13: 1, # 'д'
2: 3, # 'е'
24: 2, # 'ж'
20: 2, # 'з'
4: 3, # 'и'
23: 0, # 'й'
11: 2, # 'к'
8: 3, # 'л'
12: 1, # 'м'
5: 3, # 'н'
1: 3, # 'о'
15: 0, # 'п'
9: 3, # 'р'
7: 3, # 'с'
6: 3, # 'т'
14: 3, # 'у'
39: 1, # 'ф'
26: 2, # 'х'
28: 2, # 'ц'
22: 1, # 'ч'
25: 2, # 'ш'
29: 0, # 'щ'
54: 0, # 'ъ'
18: 1, # 'ы'
17: 1, # 'ь'
30: 1, # 'э'
27: 1, # 'ю'
16: 1, # 'я'
},
8: { # 'л'
37: 0, # 'А'
44: 0, # 'Б'
33: 0, # 'В'
46: 0, # 'Г'
41: 0, # 'Д'
48: 0, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 0, # 'И'
60: 0, # 'Й'
36: 0, # 'К'
49: 0, # 'Л'
38: 0, # 'М'
31: 0, # 'Н'
34: 0, # 'О'
35: 0, # 'П'
45: 0, # 'Р'
32: 0, # 'С'
40: 0, # 'Т'
52: 0, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 0, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 0, # 'Я'
3: 3, # 'а'
21: 2, # 'б'
10: 2, # 'в'
19: 3, # 'г'
13: 2, # 'д'
2: 3, # 'е'
24: 3, # 'ж'
20: 2, # 'з'
4: 3, # 'и'
23: 0, # 'й'
11: 3, # 'к'
8: 3, # 'л'
12: 2, # 'м'
5: 3, # 'н'
1: 3, # 'о'
15: 2, # 'п'
9: 1, # 'р'
7: 3, # 'с'
6: 2, # 'т'
14: 3, # 'у'
39: 2, # 'ф'
26: 2, # 'х'
28: 1, # 'ц'
22: 3, # 'ч'
25: 2, # 'ш'
29: 1, # 'щ'
54: 0, # 'ъ'
18: 3, # 'ы'
17: 3, # 'ь'
30: 1, # 'э'
27: 3, # 'ю'
16: 3, # 'я'
},
12: { # 'м'
37: 0, # 'А'
44: 0, # 'Б'
33: 0, # 'В'
46: 0, # 'Г'
41: 0, # 'Д'
48: 0, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 0, # 'И'
60: 0, # 'Й'
36: 0, # 'К'
49: 0, # 'Л'
38: 0, # 'М'
31: 0, # 'Н'
34: 0, # 'О'
35: 0, # 'П'
45: 0, # 'Р'
32: 0, # 'С'
40: 0, # 'Т'
52: 0, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 0, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 0, # 'Я'
3: 3, # 'а'
21: 2, # 'б'
10: 2, # 'в'
19: 2, # 'г'
13: 1, # 'д'
2: 3, # 'е'
24: 1, # 'ж'
20: 1, # 'з'
4: 3, # 'и'
23: 0, # 'й'
11: 2, # 'к'
8: 3, # 'л'
12: 2, # 'м'
5: 3, # 'н'
1: 3, # 'о'
15: 2, # 'п'
9: 2, # 'р'
7: 3, # 'с'
6: 2, # 'т'
14: 3, # 'у'
39: 2, # 'ф'
26: 2, # 'х'
28: 2, # 'ц'
22: 2, # 'ч'
25: 1, # 'ш'
29: 1, # 'щ'
54: 0, # 'ъ'
18: 3, # 'ы'
17: 2, # 'ь'
30: 2, # 'э'
27: 1, # 'ю'
16: 3, # 'я'
},
5: { # 'н'
37: 0, # 'А'
44: 0, # 'Б'
33: 0, # 'В'
46: 0, # 'Г'
41: 0, # 'Д'
48: 0, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 0, # 'И'
60: 0, # 'Й'
36: 0, # 'К'
49: 0, # 'Л'
38: 0, # 'М'
31: 0, # 'Н'
34: 0, # 'О'
35: 0, # 'П'
45: 0, # 'Р'
32: 0, # 'С'
40: 0, # 'Т'
52: 0, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 0, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 0, # 'Я'
3: 3, # 'а'
21: 2, # 'б'
10: 2, # 'в'
19: 3, # 'г'
13: 3, # 'д'
2: 3, # 'е'
24: 2, # 'ж'
20: 2, # 'з'
4: 3, # 'и'
23: 0, # 'й'
11: 3, # 'к'
8: 2, # 'л'
12: 1, # 'м'
5: 3, # 'н'
1: 3, # 'о'
15: 1, # 'п'
9: 2, # 'р'
7: 3, # 'с'
6: 3, # 'т'
14: 3, # 'у'
39: 2, # 'ф'
26: 2, # 'х'
28: 3, # 'ц'
22: 3, # 'ч'
25: 2, # 'ш'
29: 2, # 'щ'
54: 1, # 'ъ'
18: 3, # 'ы'
17: 3, # 'ь'
30: 1, # 'э'
27: 3, # 'ю'
16: 3, # 'я'
},
1: { # 'о'
37: 0, # 'А'
44: 0, # 'Б'
33: 0, # 'В'
46: 0, # 'Г'
41: 0, # 'Д'
48: 0, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 0, # 'И'
60: 0, # 'Й'
36: 0, # 'К'
49: 0, # 'Л'
38: 0, # 'М'
31: 0, # 'Н'
34: 0, # 'О'
35: 0, # 'П'
45: 0, # 'Р'
32: 0, # 'С'
40: 0, # 'Т'
52: 0, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 0, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 0, # 'Я'
3: 2, # 'а'
21: 3, # 'б'
10: 3, # 'в'
19: 3, # 'г'
13: 3, # 'д'
2: 3, # 'е'
24: 3, # 'ж'
20: 3, # 'з'
4: 3, # 'и'
23: 3, # 'й'
11: 3, # 'к'
8: 3, # 'л'
12: 3, # 'м'
5: 3, # 'н'
1: 3, # 'о'
15: 3, # 'п'
9: 3, # 'р'
7: 3, # 'с'
6: 3, # 'т'
14: 2, # 'у'
39: 2, # 'ф'
26: 3, # 'х'
28: 2, # 'ц'
22: 3, # 'ч'
25: 3, # 'ш'
29: 3, # 'щ'
54: 0, # 'ъ'
18: 0, # 'ы'
17: 0, # 'ь'
30: 2, # 'э'
27: 3, # 'ю'
16: 3, # 'я'
},
15: { # 'п'
37: 0, # 'А'
44: 0, # 'Б'
33: 0, # 'В'
46: 0, # 'Г'
41: 0, # 'Д'
48: 0, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 0, # 'И'
60: 0, # 'Й'
36: 0, # 'К'
49: 0, # 'Л'
38: 0, # 'М'
31: 0, # 'Н'
34: 0, # 'О'
35: 0, # 'П'
45: 0, # 'Р'
32: 0, # 'С'
40: 0, # 'Т'
52: 0, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 0, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 0, # 'Я'
3: 3, # 'а'
21: 1, # 'б'
10: 0, # 'в'
19: 0, # 'г'
13: 0, # 'д'
2: 3, # 'е'
24: 0, # 'ж'
20: 0, # 'з'
4: 3, # 'и'
23: 0, # 'й'
11: 2, # 'к'
8: 3, # 'л'
12: 1, # 'м'
5: 3, # 'н'
1: 3, # 'о'
15: 2, # 'п'
9: 3, # 'р'
7: 2, # 'с'
6: 2, # 'т'
14: 3, # 'у'
39: 1, # 'ф'
26: 0, # 'х'
28: 2, # 'ц'
22: 2, # 'ч'
25: 1, # 'ш'
29: 1, # 'щ'
54: 0, # 'ъ'
18: 3, # 'ы'
17: 2, # 'ь'
30: 1, # 'э'
27: 1, # 'ю'
16: 3, # 'я'
},
9: { # 'р'
37: 0, # 'А'
44: 0, # 'Б'
33: 0, # 'В'
46: 0, # 'Г'
41: 0, # 'Д'
48: 0, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 0, # 'И'
60: 0, # 'Й'
36: 0, # 'К'
49: 0, # 'Л'
38: 0, # 'М'
31: 0, # 'Н'
34: 0, # 'О'
35: 0, # 'П'
45: 0, # 'Р'
32: 0, # 'С'
40: 0, # 'Т'
52: 0, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 0, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 0, # 'Я'
3: 3, # 'а'
21: 2, # 'б'
10: 3, # 'в'
19: 3, # 'г'
13: 3, # 'д'
2: 3, # 'е'
24: 3, # 'ж'
20: 2, # 'з'
4: 3, # 'и'
23: 0, # 'й'
11: 3, # 'к'
8: 2, # 'л'
12: 3, # 'м'
5: 3, # 'н'
1: 3, # 'о'
15: 2, # 'п'
9: 2, # 'р'
7: 3, # 'с'
6: 3, # 'т'
14: 3, # 'у'
39: 2, # 'ф'
26: 3, # 'х'
28: 2, # 'ц'
22: 2, # 'ч'
25: 3, # 'ш'
29: 2, # 'щ'
54: 0, # 'ъ'
18: 3, # 'ы'
17: 3, # 'ь'
30: 2, # 'э'
27: 2, # 'ю'
16: 3, # 'я'
},
7: { # 'с'
37: 0, # 'А'
44: 0, # 'Б'
33: 0, # 'В'
46: 0, # 'Г'
41: 0, # 'Д'
48: 0, # 'Е'
56: 0, # 'Ж'
51: 1, # 'З'
42: 0, # 'И'
60: 0, # 'Й'
36: 0, # 'К'
49: 0, # 'Л'
38: 0, # 'М'
31: 0, # 'Н'
34: 0, # 'О'
35: 0, # 'П'
45: 0, # 'Р'
32: 0, # 'С'
40: 0, # 'Т'
52: 0, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 0, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 0, # 'Я'
3: 3, # 'а'
21: 2, # 'б'
10: 3, # 'в'
19: 2, # 'г'
13: 3, # 'д'
2: 3, # 'е'
24: 2, # 'ж'
20: 2, # 'з'
4: 3, # 'и'
23: 0, # 'й'
11: 3, # 'к'
8: 3, # 'л'
12: 3, # 'м'
5: 3, # 'н'
1: 3, # 'о'
15: 3, # 'п'
9: 3, # 'р'
7: 3, # 'с'
6: 3, # 'т'
14: 3, # 'у'
39: 2, # 'ф'
26: 3, # 'х'
28: 2, # 'ц'
22: 3, # 'ч'
25: 2, # 'ш'
29: 1, # 'щ'
54: 2, # 'ъ'
18: 3, # 'ы'
17: 3, # 'ь'
30: 2, # 'э'
27: 3, # 'ю'
16: 3, # 'я'
},
6: { # 'т'
37: 0, # 'А'
44: 0, # 'Б'
33: 0, # 'В'
46: 0, # 'Г'
41: 0, # 'Д'
48: 0, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 0, # 'И'
60: 0, # 'Й'
36: 0, # 'К'
49: 0, # 'Л'
38: 0, # 'М'
31: 0, # 'Н'
34: 0, # 'О'
35: 0, # 'П'
45: 0, # 'Р'
32: 0, # 'С'
40: 0, # 'Т'
52: 0, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 0, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 0, # 'Я'
3: 3, # 'а'
21: 2, # 'б'
10: 3, # 'в'
19: 2, # 'г'
13: 2, # 'д'
2: 3, # 'е'
24: 1, # 'ж'
20: 1, # 'з'
4: 3, # 'и'
23: 0, # 'й'
11: 3, # 'к'
8: 3, # 'л'
12: 2, # 'м'
5: 3, # 'н'
1: 3, # 'о'
15: 2, # 'п'
9: 3, # 'р'
7: 3, # 'с'
6: 2, # 'т'
14: 3, # 'у'
39: 2, # 'ф'
26: 2, # 'х'
28: 2, # 'ц'
22: 2, # 'ч'
25: 2, # 'ш'
29: 2, # 'щ'
54: 2, # 'ъ'
18: 3, # 'ы'
17: 3, # 'ь'
30: 2, # 'э'
27: 2, # 'ю'
16: 3, # 'я'
},
14: { # 'у'
37: 0, # 'А'
44: 0, # 'Б'
33: 0, # 'В'
46: 0, # 'Г'
41: 0, # 'Д'
48: 0, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 0, # 'И'
60: 0, # 'Й'
36: 0, # 'К'
49: 0, # 'Л'
38: 0, # 'М'
31: 0, # 'Н'
34: 0, # 'О'
35: 0, # 'П'
45: 0, # 'Р'
32: 0, # 'С'
40: 0, # 'Т'
52: 0, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 0, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 0, # 'Я'
3: 2, # 'а'
21: 3, # 'б'
10: 3, # 'в'
19: 3, # 'г'
13: 3, # 'д'
2: 3, # 'е'
24: 3, # 'ж'
20: 3, # 'з'
4: 2, # 'и'
23: 2, # 'й'
11: 3, # 'к'
8: 3, # 'л'
12: 3, # 'м'
5: 3, # 'н'
1: 2, # 'о'
15: 3, # 'п'
9: 3, # 'р'
7: 3, # 'с'
6: 3, # 'т'
14: 1, # 'у'
39: 2, # 'ф'
26: 3, # 'х'
28: 2, # 'ц'
22: 3, # 'ч'
25: 3, # 'ш'
29: 3, # 'щ'
54: 0, # 'ъ'
18: 0, # 'ы'
17: 0, # 'ь'
30: 2, # 'э'
27: 3, # 'ю'
16: 2, # 'я'
},
39: { # 'ф'
37: 0, # 'А'
44: 0, # 'Б'
33: 0, # 'В'
46: 0, # 'Г'
41: 0, # 'Д'
48: 0, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 0, # 'И'
60: 0, # 'Й'
36: 0, # 'К'
49: 0, # 'Л'
38: 0, # 'М'
31: 0, # 'Н'
34: 0, # 'О'
35: 0, # 'П'
45: 0, # 'Р'
32: 0, # 'С'
40: 0, # 'Т'
52: 0, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 0, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 0, # 'Я'
3: 3, # 'а'
21: 1, # 'б'
10: 0, # 'в'
19: 1, # 'г'
13: 0, # 'д'
2: 3, # 'е'
24: 0, # 'ж'
20: 0, # 'з'
4: 3, # 'и'
23: 0, # 'й'
11: 1, # 'к'
8: 2, # 'л'
12: 1, # 'м'
5: 1, # 'н'
1: 3, # 'о'
15: 1, # 'п'
9: 2, # 'р'
7: 2, # 'с'
6: 2, # 'т'
14: 2, # 'у'
39: 2, # 'ф'
26: 0, # 'х'
28: 0, # 'ц'
22: 1, # 'ч'
25: 1, # 'ш'
29: 0, # 'щ'
54: 0, # 'ъ'
18: 2, # 'ы'
17: 1, # 'ь'
30: 2, # 'э'
27: 1, # 'ю'
16: 1, # 'я'
},
26: { # 'х'
37: 0, # 'А'
44: 0, # 'Б'
33: 0, # 'В'
46: 0, # 'Г'
41: 0, # 'Д'
48: 0, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 0, # 'И'
60: 0, # 'Й'
36: 0, # 'К'
49: 0, # 'Л'
38: 0, # 'М'
31: 0, # 'Н'
34: 0, # 'О'
35: 0, # 'П'
45: 0, # 'Р'
32: 0, # 'С'
40: 0, # 'Т'
52: 0, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 0, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 0, # 'Я'
3: 3, # 'а'
21: 0, # 'б'
10: 3, # 'в'
19: 1, # 'г'
13: 1, # 'д'
2: 2, # 'е'
24: 0, # 'ж'
20: 1, # 'з'
4: 3, # 'и'
23: 0, # 'й'
11: 1, # 'к'
8: 2, # 'л'
12: 2, # 'м'
5: 3, # 'н'
1: 3, # 'о'
15: 1, # 'п'
9: 3, # 'р'
7: 2, # 'с'
6: 2, # 'т'
14: 2, # 'у'
39: 1, # 'ф'
26: 1, # 'х'
28: 1, # 'ц'
22: 1, # 'ч'
25: 2, # 'ш'
29: 0, # 'щ'
54: 1, # 'ъ'
18: 0, # 'ы'
17: 1, # 'ь'
30: 1, # 'э'
27: 1, # 'ю'
16: 0, # 'я'
},
28: { # 'ц'
37: 0, # 'А'
44: 0, # 'Б'
33: 0, # 'В'
46: 0, # 'Г'
41: 0, # 'Д'
48: 0, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 0, # 'И'
60: 0, # 'Й'
36: 0, # 'К'
49: 0, # 'Л'
38: 0, # 'М'
31: 0, # 'Н'
34: 0, # 'О'
35: 0, # 'П'
45: 0, # 'Р'
32: 0, # 'С'
40: 0, # 'Т'
52: 0, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 0, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 0, # 'Я'
3: 3, # 'а'
21: 1, # 'б'
10: 2, # 'в'
19: 1, # 'г'
13: 1, # 'д'
2: 3, # 'е'
24: 0, # 'ж'
20: 1, # 'з'
4: 3, # 'и'
23: 0, # 'й'
11: 2, # 'к'
8: 1, # 'л'
12: 1, # 'м'
5: 1, # 'н'
1: 3, # 'о'
15: 0, # 'п'
9: 1, # 'р'
7: 0, # 'с'
6: 1, # 'т'
14: 3, # 'у'
39: 0, # 'ф'
26: 0, # 'х'
28: 1, # 'ц'
22: 0, # 'ч'
25: 1, # 'ш'
29: 0, # 'щ'
54: 0, # 'ъ'
18: 3, # 'ы'
17: 1, # 'ь'
30: 0, # 'э'
27: 1, # 'ю'
16: 0, # 'я'
},
22: { # 'ч'
37: 0, # 'А'
44: 0, # 'Б'
33: 0, # 'В'
46: 0, # 'Г'
41: 0, # 'Д'
48: 0, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 0, # 'И'
60: 0, # 'Й'
36: 0, # 'К'
49: 0, # 'Л'
38: 0, # 'М'
31: 0, # 'Н'
34: 0, # 'О'
35: 0, # 'П'
45: 0, # 'Р'
32: 0, # 'С'
40: 0, # 'Т'
52: 0, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 0, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 0, # 'Я'
3: 3, # 'а'
21: 1, # 'б'
10: 1, # 'в'
19: 0, # 'г'
13: 0, # 'д'
2: 3, # 'е'
24: 1, # 'ж'
20: 0, # 'з'
4: 3, # 'и'
23: 0, # 'й'
11: 3, # 'к'
8: 2, # 'л'
12: 1, # 'м'
5: 3, # 'н'
1: 2, # 'о'
15: 0, # 'п'
9: 2, # 'р'
7: 1, # 'с'
6: 3, # 'т'
14: 3, # 'у'
39: 1, # 'ф'
26: 1, # 'х'
28: 0, # 'ц'
22: 1, # 'ч'
25: 2, # 'ш'
29: 0, # 'щ'
54: 0, # 'ъ'
18: 0, # 'ы'
17: 3, # 'ь'
30: 0, # 'э'
27: 0, # 'ю'
16: 0, # 'я'
},
25: { # 'ш'
37: 0, # 'А'
44: 0, # 'Б'
33: 0, # 'В'
46: 0, # 'Г'
41: 0, # 'Д'
48: 0, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 0, # 'И'
60: 0, # 'Й'
36: 0, # 'К'
49: 0, # 'Л'
38: 0, # 'М'
31: 0, # 'Н'
34: 0, # 'О'
35: 0, # 'П'
45: 0, # 'Р'
32: 0, # 'С'
40: 0, # 'Т'
52: 0, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 0, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 0, # 'Я'
3: 3, # 'а'
21: 1, # 'б'
10: 2, # 'в'
19: 1, # 'г'
13: 0, # 'д'
2: 3, # 'е'
24: 0, # 'ж'
20: 0, # 'з'
4: 3, # 'и'
23: 0, # 'й'
11: 3, # 'к'
8: 3, # 'л'
12: 2, # 'м'
5: 3, # 'н'
1: 3, # 'о'
15: 2, # 'п'
9: 2, # 'р'
7: 1, # 'с'
6: 2, # 'т'
14: 3, # 'у'
39: 2, # 'ф'
26: 1, # 'х'
28: 1, # 'ц'
22: 1, # 'ч'
25: 1, # 'ш'
29: 0, # 'щ'
54: 0, # 'ъ'
18: 0, # 'ы'
17: 3, # 'ь'
30: 1, # 'э'
27: 1, # 'ю'
16: 0, # 'я'
},
29: { # 'щ'
37: 0, # 'А'
44: 0, # 'Б'
33: 0, # 'В'
46: 0, # 'Г'
41: 0, # 'Д'
48: 0, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 0, # 'И'
60: 0, # 'Й'
36: 0, # 'К'
49: 0, # 'Л'
38: 0, # 'М'
31: 0, # 'Н'
34: 0, # 'О'
35: 0, # 'П'
45: 0, # 'Р'
32: 0, # 'С'
40: 0, # 'Т'
52: 0, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 0, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 0, # 'Я'
3: 3, # 'а'
21: 0, # 'б'
10: 1, # 'в'
19: 0, # 'г'
13: 0, # 'д'
2: 3, # 'е'
24: 0, # 'ж'
20: 0, # 'з'
4: 3, # 'и'
23: 0, # 'й'
11: 0, # 'к'
8: 0, # 'л'
12: 1, # 'м'
5: 2, # 'н'
1: 1, # 'о'
15: 0, # 'п'
9: 2, # 'р'
7: 0, # 'с'
6: 0, # 'т'
14: 2, # 'у'
39: 0, # 'ф'
26: 0, # 'х'
28: 0, # 'ц'
22: 0, # 'ч'
25: 0, # 'ш'
29: 0, # 'щ'
54: 0, # 'ъ'
18: 0, # 'ы'
17: 2, # 'ь'
30: 0, # 'э'
27: 0, # 'ю'
16: 0, # 'я'
},
54: { # 'ъ'
37: 0, # 'А'
44: 0, # 'Б'
33: 0, # 'В'
46: 0, # 'Г'
41: 0, # 'Д'
48: 0, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 0, # 'И'
60: 0, # 'Й'
36: 0, # 'К'
49: 0, # 'Л'
38: 0, # 'М'
31: 0, # 'Н'
34: 0, # 'О'
35: 0, # 'П'
45: 0, # 'Р'
32: 0, # 'С'
40: 0, # 'Т'
52: 0, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 0, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 0, # 'Я'
3: 0, # 'а'
21: 0, # 'б'
10: 0, # 'в'
19: 0, # 'г'
13: 0, # 'д'
2: 2, # 'е'
24: 0, # 'ж'
20: 0, # 'з'
4: 0, # 'и'
23: 0, # 'й'
11: 0, # 'к'
8: 0, # 'л'
12: 0, # 'м'
5: 0, # 'н'
1: 0, # 'о'
15: 0, # 'п'
9: 0, # 'р'
7: 0, # 'с'
6: 0, # 'т'
14: 0, # 'у'
39: 0, # 'ф'
26: 0, # 'х'
28: 0, # 'ц'
22: 0, # 'ч'
25: 0, # 'ш'
29: 0, # 'щ'
54: 0, # 'ъ'
18: 0, # 'ы'
17: 0, # 'ь'
30: 0, # 'э'
27: 1, # 'ю'
16: 2, # 'я'
},
18: { # 'ы'
37: 0, # 'А'
44: 0, # 'Б'
33: 0, # 'В'
46: 0, # 'Г'
41: 0, # 'Д'
48: 0, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 0, # 'И'
60: 0, # 'Й'
36: 0, # 'К'
49: 0, # 'Л'
38: 0, # 'М'
31: 0, # 'Н'
34: 0, # 'О'
35: 0, # 'П'
45: 0, # 'Р'
32: 0, # 'С'
40: 0, # 'Т'
52: 0, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 0, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 0, # 'Я'
3: 0, # 'а'
21: 3, # 'б'
10: 3, # 'в'
19: 2, # 'г'
13: 2, # 'д'
2: 3, # 'е'
24: 2, # 'ж'
20: 2, # 'з'
4: 2, # 'и'
23: 3, # 'й'
11: 3, # 'к'
8: 3, # 'л'
12: 3, # 'м'
5: 3, # 'н'
1: 1, # 'о'
15: 3, # 'п'
9: 3, # 'р'
7: 3, # 'с'
6: 3, # 'т'
14: 1, # 'у'
39: 0, # 'ф'
26: 3, # 'х'
28: 2, # 'ц'
22: 3, # 'ч'
25: 3, # 'ш'
29: 2, # 'щ'
54: 0, # 'ъ'
18: 0, # 'ы'
17: 0, # 'ь'
30: 0, # 'э'
27: 0, # 'ю'
16: 2, # 'я'
},
17: { # 'ь'
37: 0, # 'А'
44: 0, # 'Б'
33: 0, # 'В'
46: 0, # 'Г'
41: 0, # 'Д'
48: 0, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 0, # 'И'
60: 0, # 'Й'
36: 0, # 'К'
49: 0, # 'Л'
38: 0, # 'М'
31: 0, # 'Н'
34: 0, # 'О'
35: 0, # 'П'
45: 0, # 'Р'
32: 0, # 'С'
40: 0, # 'Т'
52: 0, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 0, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 0, # 'Я'
3: 0, # 'а'
21: 2, # 'б'
10: 2, # 'в'
19: 2, # 'г'
13: 2, # 'д'
2: 3, # 'е'
24: 1, # 'ж'
20: 3, # 'з'
4: 2, # 'и'
23: 0, # 'й'
11: 3, # 'к'
8: 0, # 'л'
12: 3, # 'м'
5: 3, # 'н'
1: 2, # 'о'
15: 2, # 'п'
9: 1, # 'р'
7: 3, # 'с'
6: 2, # 'т'
14: 0, # 'у'
39: 2, # 'ф'
26: 1, # 'х'
28: 2, # 'ц'
22: 2, # 'ч'
25: 3, # 'ш'
29: 2, # 'щ'
54: 0, # 'ъ'
18: 0, # 'ы'
17: 0, # 'ь'
30: 1, # 'э'
27: 3, # 'ю'
16: 3, # 'я'
},
30: { # 'э'
37: 0, # 'А'
44: 0, # 'Б'
33: 0, # 'В'
46: 0, # 'Г'
41: 0, # 'Д'
48: 0, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 0, # 'И'
60: 0, # 'Й'
36: 0, # 'К'
49: 0, # 'Л'
38: 1, # 'М'
31: 1, # 'Н'
34: 0, # 'О'
35: 0, # 'П'
45: 1, # 'Р'
32: 1, # 'С'
40: 0, # 'Т'
52: 0, # 'У'
53: 1, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 0, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 0, # 'Я'
3: 0, # 'а'
21: 1, # 'б'
10: 1, # 'в'
19: 1, # 'г'
13: 2, # 'д'
2: 1, # 'е'
24: 0, # 'ж'
20: 1, # 'з'
4: 0, # 'и'
23: 2, # 'й'
11: 2, # 'к'
8: 2, # 'л'
12: 2, # 'м'
5: 2, # 'н'
1: 0, # 'о'
15: 2, # 'п'
9: 2, # 'р'
7: 2, # 'с'
6: 3, # 'т'
14: 1, # 'у'
39: 2, # 'ф'
26: 1, # 'х'
28: 0, # 'ц'
22: 0, # 'ч'
25: 1, # 'ш'
29: 0, # 'щ'
54: 0, # 'ъ'
18: 0, # 'ы'
17: 0, # 'ь'
30: 1, # 'э'
27: 1, # 'ю'
16: 1, # 'я'
},
27: { # 'ю'
37: 0, # 'А'
44: 0, # 'Б'
33: 0, # 'В'
46: 0, # 'Г'
41: 0, # 'Д'
48: 0, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 0, # 'И'
60: 0, # 'Й'
36: 0, # 'К'
49: 0, # 'Л'
38: 0, # 'М'
31: 0, # 'Н'
34: 0, # 'О'
35: 0, # 'П'
45: 0, # 'Р'
32: 0, # 'С'
40: 0, # 'Т'
52: 0, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 0, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 0, # 'Я'
3: 2, # 'а'
21: 3, # 'б'
10: 1, # 'в'
19: 2, # 'г'
13: 3, # 'д'
2: 1, # 'е'
24: 2, # 'ж'
20: 2, # 'з'
4: 1, # 'и'
23: 1, # 'й'
11: 2, # 'к'
8: 2, # 'л'
12: 2, # 'м'
5: 2, # 'н'
1: 1, # 'о'
15: 2, # 'п'
9: 2, # 'р'
7: 3, # 'с'
6: 3, # 'т'
14: 0, # 'у'
39: 1, # 'ф'
26: 2, # 'х'
28: 2, # 'ц'
22: 2, # 'ч'
25: 2, # 'ш'
29: 3, # 'щ'
54: 0, # 'ъ'
18: 0, # 'ы'
17: 0, # 'ь'
30: 1, # 'э'
27: 2, # 'ю'
16: 1, # 'я'
},
16: { # 'я'
37: 0, # 'А'
44: 0, # 'Б'
33: 0, # 'В'
46: 0, # 'Г'
41: 0, # 'Д'
48: 0, # 'Е'
56: 0, # 'Ж'
51: 0, # 'З'
42: 0, # 'И'
60: 0, # 'Й'
36: 0, # 'К'
49: 0, # 'Л'
38: 0, # 'М'
31: 0, # 'Н'
34: 0, # 'О'
35: 0, # 'П'
45: 0, # 'Р'
32: 0, # 'С'
40: 0, # 'Т'
52: 0, # 'У'
53: 0, # 'Ф'
55: 0, # 'Х'
58: 0, # 'Ц'
50: 0, # 'Ч'
57: 0, # 'Ш'
63: 0, # 'Щ'
62: 0, # 'Ы'
61: 0, # 'Ь'
47: 0, # 'Э'
59: 0, # 'Ю'
43: 0, # 'Я'
3: 0, # 'а'
21: 2, # 'б'
10: 3, # 'в'
19: 2, # 'г'
13: 3, # 'д'
2: 3, # 'е'
24: 3, # 'ж'
20: 3, # 'з'
4: 2, # 'и'
23: 2, # 'й'
11: 3, # 'к'
8: 3, # 'л'
12: 3, # 'м'
5: 3, # 'н'
1: 0, # 'о'
15: 2, # 'п'
9: 2, # 'р'
7: 3, # 'с'
6: 3, # 'т'
14: 1, # 'у'
39: 1, # 'ф'
26: 3, # 'х'
28: 2, # 'ц'
22: 2, # 'ч'
25: 2, # 'ш'
29: 3, # 'щ'
54: 0, # 'ъ'
18: 0, # 'ы'
17: 0, # 'ь'
30: 0, # 'э'
27: 2, # 'ю'
16: 2, # 'я'
},
}
# 255: Undefined characters that did not exist in training text
# 254: Carriage/Return
# 253: symbol (punctuation) that does not belong to word
# 252: 0 - 9
# 251: Control characters
# Character Mapping Table(s):
IBM866_RUSSIAN_CHAR_TO_ORDER = {
0: 255, # '\x00'
1: 255, # '\x01'
2: 255, # '\x02'
3: 255, # '\x03'
4: 255, # '\x04'
5: 255, # '\x05'
6: 255, # '\x06'
7: 255, # '\x07'
8: 255, # '\x08'
9: 255, # '\t'
10: 254, # '\n'
11: 255, # '\x0b'
12: 255, # '\x0c'
13: 254, # '\r'
14: 255, # '\x0e'
15: 255, # '\x0f'
16: 255, # '\x10'
17: 255, # '\x11'
18: 255, # '\x12'
19: 255, # '\x13'
20: 255, # '\x14'
21: 255, # '\x15'
22: 255, # '\x16'
23: 255, # '\x17'
24: 255, # '\x18'
25: 255, # '\x19'
26: 255, # '\x1a'
27: 255, # '\x1b'
28: 255, # '\x1c'
29: 255, # '\x1d'
30: 255, # '\x1e'
31: 255, # '\x1f'
32: 253, # ' '
33: 253, # '!'
34: 253, # '"'
35: 253, # '#'
36: 253, # '$'
37: 253, # '%'
38: 253, # '&'
39: 253, # "'"
40: 253, # '('
41: 253, # ')'
42: 253, # '*'
43: 253, # '+'
44: 253, # ','
45: 253, # '-'
46: 253, # '.'
47: 253, # '/'
48: 252, # '0'
49: 252, # '1'
50: 252, # '2'
51: 252, # '3'
52: 252, # '4'
53: 252, # '5'
54: 252, # '6'
55: 252, # '7'
56: 252, # '8'
57: 252, # '9'
58: 253, # ':'
59: 253, # ';'
60: 253, # '<'
61: 253, # '='
62: 253, # '>'
63: 253, # '?'
64: 253, # '@'
65: 142, # 'A'
66: 143, # 'B'
67: 144, # 'C'
68: 145, # 'D'
69: 146, # 'E'
70: 147, # 'F'
71: 148, # 'G'
72: 149, # 'H'
73: 150, # 'I'
74: 151, # 'J'
75: 152, # 'K'
76: 74, # 'L'
77: 153, # 'M'
78: 75, # 'N'
79: 154, # 'O'
80: 155, # 'P'
81: 156, # 'Q'
82: 157, # 'R'
83: 158, # 'S'
84: 159, # 'T'
85: 160, # 'U'
86: 161, # 'V'
87: 162, # 'W'
88: 163, # 'X'
89: 164, # 'Y'
90: 165, # 'Z'
91: 253, # '['
92: 253, # '\\'
93: 253, # ']'
94: 253, # '^'
95: 253, # '_'
96: 253, # '`'
97: 71, # 'a'
98: 172, # 'b'
99: 66, # 'c'
100: 173, # 'd'
101: 65, # 'e'
102: 174, # 'f'
103: 76, # 'g'
104: 175, # 'h'
105: 64, # 'i'
106: 176, # 'j'
107: 177, # 'k'
108: 77, # 'l'
109: 72, # 'm'
110: 178, # 'n'
111: 69, # 'o'
112: 67, # 'p'
113: 179, # 'q'
114: 78, # 'r'
115: 73, # 's'
116: 180, # 't'
117: 181, # 'u'
118: 79, # 'v'
119: 182, # 'w'
120: 183, # 'x'
121: 184, # 'y'
122: 185, # 'z'
123: 253, # '{'
124: 253, # '|'
125: 253, # '}'
126: 253, # '~'
127: 253, # '\x7f'
128: 37, # 'А'
129: 44, # 'Б'
130: 33, # 'В'
131: 46, # 'Г'
132: 41, # 'Д'
133: 48, # 'Е'
134: 56, # 'Ж'
135: 51, # 'З'
136: 42, # 'И'
137: 60, # 'Й'
138: 36, # 'К'
139: 49, # 'Л'
140: 38, # 'М'
141: 31, # 'Н'
142: 34, # 'О'
143: 35, # 'П'
144: 45, # 'Р'
145: 32, # 'С'
146: 40, # 'Т'
147: 52, # 'У'
148: 53, # 'Ф'
149: 55, # 'Х'
150: 58, # 'Ц'
151: 50, # 'Ч'
152: 57, # 'Ш'
153: 63, # 'Щ'
154: 70, # 'Ъ'
155: 62, # 'Ы'
156: 61, # 'Ь'
157: 47, # 'Э'
158: 59, # 'Ю'
159: 43, # 'Я'
160: 3, # 'а'
161: 21, # 'б'
162: 10, # 'в'
163: 19, # 'г'
164: 13, # 'д'
165: 2, # 'е'
166: 24, # 'ж'
167: 20, # 'з'
168: 4, # 'и'
169: 23, # 'й'
170: 11, # 'к'
171: 8, # 'л'
172: 12, # 'м'
173: 5, # 'н'
174: 1, # 'о'
175: 15, # 'п'
176: 191, # '░'
177: 192, # '▒'
178: 193, # '▓'
179: 194, # '│'
180: 195, # '┤'
181: 196, # '╡'
182: 197, # '╢'
183: 198, # '╖'
184: 199, # '╕'
185: 200, # '╣'
186: 201, # '║'
187: 202, # '╗'
188: 203, # '╝'
189: 204, # '╜'
190: 205, # '╛'
191: 206, # '┐'
192: 207, # '└'
193: 208, # '┴'
194: 209, # '┬'
195: 210, # '├'
196: 211, # '─'
197: 212, # '┼'
198: 213, # '╞'
199: 214, # '╟'
200: 215, # '╚'
201: 216, # '╔'
202: 217, # '╩'
203: 218, # '╦'
204: 219, # '╠'
205: 220, # '═'
206: 221, # '╬'
207: 222, # '╧'
208: 223, # '╨'
209: 224, # '╤'
210: 225, # '╥'
211: 226, # '╙'
212: 227, # '╘'
213: 228, # '╒'
214: 229, # '╓'
215: 230, # '╫'
216: 231, # '╪'
217: 232, # '┘'
218: 233, # '┌'
219: 234, # '█'
220: 235, # '▄'
221: 236, # '▌'
222: 237, # '▐'
223: 238, # '▀'
224: 9, # 'р'
225: 7, # 'с'
226: 6, # 'т'
227: 14, # 'у'
228: 39, # 'ф'
229: 26, # 'х'
230: 28, # 'ц'
231: 22, # 'ч'
232: 25, # 'ш'
233: 29, # 'щ'
234: 54, # 'ъ'
235: 18, # 'ы'
236: 17, # 'ь'
237: 30, # 'э'
238: 27, # 'ю'
239: 16, # 'я'
240: 239, # 'Ё'
241: 68, # 'ё'
242: 240, # 'Є'
243: 241, # 'є'
244: 242, # 'Ї'
245: 243, # 'ї'
246: 244, # 'Ў'
247: 245, # 'ў'
248: 246, # '°'
249: 247, # '∙'
250: 248, # '·'
251: 249, # '√'
252: 250, # '№'
253: 251, # '¤'
254: 252, # '■'
255: 255, # '\xa0'
}
IBM866_RUSSIAN_MODEL = SingleByteCharSetModel(
charset_name="IBM866",
language="Russian",
char_to_order_map=IBM866_RUSSIAN_CHAR_TO_ORDER,
language_model=RUSSIAN_LANG_MODEL,
typical_positive_ratio=0.976601,
keep_ascii_letters=False,
alphabet="ЁАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюяё",
)
WINDOWS_1251_RUSSIAN_CHAR_TO_ORDER = {
0: 255, # '\x00'
1: 255, # '\x01'
2: 255, # '\x02'
3: 255, # '\x03'
4: 255, # '\x04'
5: 255, # '\x05'
6: 255, # '\x06'
7: 255, # '\x07'
8: 255, # '\x08'
9: 255, # '\t'
10: 254, # '\n'
11: 255, # '\x0b'
12: 255, # '\x0c'
13: 254, # '\r'
14: 255, # '\x0e'
15: 255, # '\x0f'
16: 255, # '\x10'
17: 255, # '\x11'
18: 255, # '\x12'
19: 255, # '\x13'
20: 255, # '\x14'
21: 255, # '\x15'
22: 255, # '\x16'
23: 255, # '\x17'
24: 255, # '\x18'
25: 255, # '\x19'
26: 255, # '\x1a'
27: 255, # '\x1b'
28: 255, # '\x1c'
29: 255, # '\x1d'
30: 255, # '\x1e'
31: 255, # '\x1f'
32: 253, # ' '
33: 253, # '!'
34: 253, # '"'
35: 253, # '#'
36: 253, # '$'
37: 253, # '%'
38: 253, # '&'
39: 253, # "'"
40: 253, # '('
41: 253, # ')'
42: 253, # '*'
43: 253, # '+'
44: 253, # ','
45: 253, # '-'
46: 253, # '.'
47: 253, # '/'
48: 252, # '0'
49: 252, # '1'
50: 252, # '2'
51: 252, # '3'
52: 252, # '4'
53: 252, # '5'
54: 252, # '6'
55: 252, # '7'
56: 252, # '8'
57: 252, # '9'
58: 253, # ':'
59: 253, # ';'
60: 253, # '<'
61: 253, # '='
62: 253, # '>'
63: 253, # '?'
64: 253, # '@'
65: 142, # 'A'
66: 143, # 'B'
67: 144, # 'C'
68: 145, # 'D'
69: 146, # 'E'
70: 147, # 'F'
71: 148, # 'G'
72: 149, # 'H'
73: 150, # 'I'
74: 151, # 'J'
75: 152, # 'K'
76: 74, # 'L'
77: 153, # 'M'
78: 75, # 'N'
79: 154, # 'O'
80: 155, # 'P'
81: 156, # 'Q'
82: 157, # 'R'
83: 158, # 'S'
84: 159, # 'T'
85: 160, # 'U'
86: 161, # 'V'
87: 162, # 'W'
88: 163, # 'X'
89: 164, # 'Y'
90: 165, # 'Z'
91: 253, # '['
92: 253, # '\\'
93: 253, # ']'
94: 253, # '^'
95: 253, # '_'
96: 253, # '`'
97: 71, # 'a'
98: 172, # 'b'
99: 66, # 'c'
100: 173, # 'd'
101: 65, # 'e'
102: 174, # 'f'
103: 76, # 'g'
104: 175, # 'h'
105: 64, # 'i'
106: 176, # 'j'
107: 177, # 'k'
108: 77, # 'l'
109: 72, # 'm'
110: 178, # 'n'
111: 69, # 'o'
112: 67, # 'p'
113: 179, # 'q'
114: 78, # 'r'
115: 73, # 's'
116: 180, # 't'
117: 181, # 'u'
118: 79, # 'v'
119: 182, # 'w'
120: 183, # 'x'
121: 184, # 'y'
122: 185, # 'z'
123: 253, # '{'
124: 253, # '|'
125: 253, # '}'
126: 253, # '~'
127: 253, # '\x7f'
128: 191, # 'Ђ'
129: 192, # 'Ѓ'
130: 193, # '‚'
131: 194, # 'ѓ'
132: 195, # '„'
133: 196, # '…'
134: 197, # '†'
135: 198, # '‡'
136: 199, # '€'
137: 200, # '‰'
138: 201, # 'Љ'
139: 202, # '‹'
140: 203, # 'Њ'
141: 204, # 'Ќ'
142: 205, # 'Ћ'
143: 206, # 'Џ'
144: 207, # 'ђ'
145: 208, # '‘'
146: 209, # '’'
147: 210, # '“'
148: 211, # '”'
149: 212, # '•'
150: 213, # '–'
151: 214, # '—'
152: 215, # None
153: 216, # '™'
154: 217, # 'љ'
155: 218, # '›'
156: 219, # 'њ'
157: 220, # 'ќ'
158: 221, # 'ћ'
159: 222, # 'џ'
160: 223, # '\xa0'
161: 224, # 'Ў'
162: 225, # 'ў'
163: 226, # 'Ј'
164: 227, # '¤'
165: 228, # 'Ґ'
166: 229, # '¦'
167: 230, # '§'
168: 231, # 'Ё'
169: 232, # '©'
170: 233, # 'Є'
171: 234, # '«'
172: 235, # '¬'
173: 236, # '\xad'
174: 237, # '®'
175: 238, # 'Ї'
176: 239, # '°'
177: 240, # '±'
178: 241, # 'І'
179: 242, # 'і'
180: 243, # 'ґ'
181: 244, # 'µ'
182: 245, # '¶'
183: 246, # '·'
184: 68, # 'ё'
185: 247, # '№'
186: 248, # 'є'
187: 249, # '»'
188: 250, # 'ј'
189: 251, # 'Ѕ'
190: 252, # 'ѕ'
191: 253, # 'ї'
192: 37, # 'А'
193: 44, # 'Б'
194: 33, # 'В'
195: 46, # 'Г'
196: 41, # 'Д'
197: 48, # 'Е'
198: 56, # 'Ж'
199: 51, # 'З'
200: 42, # 'И'
201: 60, # 'Й'
202: 36, # 'К'
203: 49, # 'Л'
204: 38, # 'М'
205: 31, # 'Н'
206: 34, # 'О'
207: 35, # 'П'
208: 45, # 'Р'
209: 32, # 'С'
210: 40, # 'Т'
211: 52, # 'У'
212: 53, # 'Ф'
213: 55, # 'Х'
214: 58, # 'Ц'
215: 50, # 'Ч'
216: 57, # 'Ш'
217: 63, # 'Щ'
218: 70, # 'Ъ'
219: 62, # 'Ы'
220: 61, # 'Ь'
221: 47, # 'Э'
222: 59, # 'Ю'
223: 43, # 'Я'
224: 3, # 'а'
225: 21, # 'б'
226: 10, # 'в'
227: 19, # 'г'
228: 13, # 'д'
229: 2, # 'е'
230: 24, # 'ж'
231: 20, # 'з'
232: 4, # 'и'
233: 23, # 'й'
234: 11, # 'к'
235: 8, # 'л'
236: 12, # 'м'
237: 5, # 'н'
238: 1, # 'о'
239: 15, # 'п'
240: 9, # 'р'
241: 7, # 'с'
242: 6, # 'т'
243: 14, # 'у'
244: 39, # 'ф'
245: 26, # 'х'
246: 28, # 'ц'
247: 22, # 'ч'
248: 25, # 'ш'
249: 29, # 'щ'
250: 54, # 'ъ'
251: 18, # 'ы'
252: 17, # 'ь'
253: 30, # 'э'
254: 27, # 'ю'
255: 16, # 'я'
}
WINDOWS_1251_RUSSIAN_MODEL = SingleByteCharSetModel(
charset_name="windows-1251",
language="Russian",
char_to_order_map=WINDOWS_1251_RUSSIAN_CHAR_TO_ORDER,
language_model=RUSSIAN_LANG_MODEL,
typical_positive_ratio=0.976601,
keep_ascii_letters=False,
alphabet="ЁАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюяё",
)
IBM855_RUSSIAN_CHAR_TO_ORDER = {
0: 255, # '\x00'
1: 255, # '\x01'
2: 255, # '\x02'
3: 255, # '\x03'
4: 255, # '\x04'
5: 255, # '\x05'
6: 255, # '\x06'
7: 255, # '\x07'
8: 255, # '\x08'
9: 255, # '\t'
10: 254, # '\n'
11: 255, # '\x0b'
12: 255, # '\x0c'
13: 254, # '\r'
14: 255, # '\x0e'
15: 255, # '\x0f'
16: 255, # '\x10'
17: 255, # '\x11'
18: 255, # '\x12'
19: 255, # '\x13'
20: 255, # '\x14'
21: 255, # '\x15'
22: 255, # '\x16'
23: 255, # '\x17'
24: 255, # '\x18'
25: 255, # '\x19'
26: 255, # '\x1a'
27: 255, # '\x1b'
28: 255, # '\x1c'
29: 255, # '\x1d'
30: 255, # '\x1e'
31: 255, # '\x1f'
32: 253, # ' '
33: 253, # '!'
34: 253, # '"'
35: 253, # '#'
36: 253, # '$'
37: 253, # '%'
38: 253, # '&'
39: 253, # "'"
40: 253, # '('
41: 253, # ')'
42: 253, # '*'
43: 253, # '+'
44: 253, # ','
45: 253, # '-'
46: 253, # '.'
47: 253, # '/'
48: 252, # '0'
49: 252, # '1'
50: 252, # '2'
51: 252, # '3'
52: 252, # '4'
53: 252, # '5'
54: 252, # '6'
55: 252, # '7'
56: 252, # '8'
57: 252, # '9'
58: 253, # ':'
59: 253, # ';'
60: 253, # '<'
61: 253, # '='
62: 253, # '>'
63: 253, # '?'
64: 253, # '@'
65: 142, # 'A'
66: 143, # 'B'
67: 144, # 'C'
68: 145, # 'D'
69: 146, # 'E'
70: 147, # 'F'
71: 148, # 'G'
72: 149, # 'H'
73: 150, # 'I'
74: 151, # 'J'
75: 152, # 'K'
76: 74, # 'L'
77: 153, # 'M'
78: 75, # 'N'
79: 154, # 'O'
80: 155, # 'P'
81: 156, # 'Q'
82: 157, # 'R'
83: 158, # 'S'
84: 159, # 'T'
85: 160, # 'U'
86: 161, # 'V'
87: 162, # 'W'
88: 163, # 'X'
89: 164, # 'Y'
90: 165, # 'Z'
91: 253, # '['
92: 253, # '\\'
93: 253, # ']'
94: 253, # '^'
95: 253, # '_'
96: 253, # '`'
97: 71, # 'a'
98: 172, # 'b'
99: 66, # 'c'
100: 173, # 'd'
101: 65, # 'e'
102: 174, # 'f'
103: 76, # 'g'
104: 175, # 'h'
105: 64, # 'i'
106: 176, # 'j'
107: 177, # 'k'
108: 77, # 'l'
109: 72, # 'm'
110: 178, # 'n'
111: 69, # 'o'
112: 67, # 'p'
113: 179, # 'q'
114: 78, # 'r'
115: 73, # 's'
116: 180, # 't'
117: 181, # 'u'
118: 79, # 'v'
119: 182, # 'w'
120: 183, # 'x'
121: 184, # 'y'
122: 185, # 'z'
123: 253, # '{'
124: 253, # '|'
125: 253, # '}'
126: 253, # '~'
127: 253, # '\x7f'
128: 191, # 'ђ'
129: 192, # 'Ђ'
130: 193, # 'ѓ'
131: 194, # 'Ѓ'
132: 68, # 'ё'
133: 195, # 'Ё'
134: 196, # 'є'
135: 197, # 'Є'
136: 198, # 'ѕ'
137: 199, # 'Ѕ'
138: 200, # 'і'
139: 201, # 'І'
140: 202, # 'ї'
141: 203, # 'Ї'
142: 204, # 'ј'
143: 205, # 'Ј'
144: 206, # 'љ'
145: 207, # 'Љ'
146: 208, # 'њ'
147: 209, # 'Њ'
148: 210, # 'ћ'
149: 211, # 'Ћ'
150: 212, # 'ќ'
151: 213, # 'Ќ'
152: 214, # 'ў'
153: 215, # 'Ў'
154: 216, # 'џ'
155: 217, # 'Џ'
156: 27, # 'ю'
157: 59, # 'Ю'
158: 54, # 'ъ'
159: 70, # 'Ъ'
160: 3, # 'а'
161: 37, # 'А'
162: 21, # 'б'
163: 44, # 'Б'
164: 28, # 'ц'
165: 58, # 'Ц'
166: 13, # 'д'
167: 41, # 'Д'
168: 2, # 'е'
169: 48, # 'Е'
170: 39, # 'ф'
171: 53, # 'Ф'
172: 19, # 'г'
173: 46, # 'Г'
174: 218, # '«'
175: 219, # '»'
176: 220, # '░'
177: 221, # '▒'
178: 222, # '▓'
179: 223, # '│'
180: 224, # '┤'
181: 26, # 'х'
182: 55, # 'Х'
183: 4, # 'и'
184: 42, # 'И'
185: 225, # '╣'
186: 226, # '║'
187: 227, # '╗'
188: 228, # '╝'
189: 23, # 'й'
190: 60, # 'Й'
191: 229, # '┐'
192: 230, # '└'
193: 231, # '┴'
194: 232, # '┬'
195: 233, # '├'
196: 234, # '─'
197: 235, # '┼'
198: 11, # 'к'
199: 36, # 'К'
200: 236, # '╚'
201: 237, # '╔'
202: 238, # '╩'
203: 239, # '╦'
204: 240, # '╠'
205: 241, # '═'
206: 242, # '╬'
207: 243, # '¤'
208: 8, # 'л'
209: 49, # 'Л'
210: 12, # 'м'
211: 38, # 'М'
212: 5, # 'н'
213: 31, # 'Н'
214: 1, # 'о'
215: 34, # 'О'
216: 15, # 'п'
217: 244, # '┘'
218: 245, # '┌'
219: 246, # '█'
220: 247, # '▄'
221: 35, # 'П'
222: 16, # 'я'
223: 248, # '▀'
224: 43, # 'Я'
225: 9, # 'р'
226: 45, # 'Р'
227: 7, # 'с'
228: 32, # 'С'
229: 6, # 'т'
230: 40, # 'Т'
231: 14, # 'у'
232: 52, # 'У'
233: 24, # 'ж'
234: 56, # 'Ж'
235: 10, # 'в'
236: 33, # 'В'
237: 17, # 'ь'
238: 61, # 'Ь'
239: 249, # '№'
240: 250, # '\xad'
241: 18, # 'ы'
242: 62, # 'Ы'
243: 20, # 'з'
244: 51, # 'З'
245: 25, # 'ш'
246: 57, # 'Ш'
247: 30, # 'э'
248: 47, # 'Э'
249: 29, # 'щ'
250: 63, # 'Щ'
251: 22, # 'ч'
252: 50, # 'Ч'
253: 251, # '§'
254: 252, # '■'
255: 255, # '\xa0'
}
IBM855_RUSSIAN_MODEL = SingleByteCharSetModel(
charset_name="IBM855",
language="Russian",
char_to_order_map=IBM855_RUSSIAN_CHAR_TO_ORDER,
language_model=RUSSIAN_LANG_MODEL,
typical_positive_ratio=0.976601,
keep_ascii_letters=False,
alphabet="ЁАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюяё",
)
KOI8_R_RUSSIAN_CHAR_TO_ORDER = {
0: 255, # '\x00'
1: 255, # '\x01'
2: 255, # '\x02'
3: 255, # '\x03'
4: 255, # '\x04'
5: 255, # '\x05'
6: 255, # '\x06'
7: 255, # '\x07'
8: 255, # '\x08'
9: 255, # '\t'
10: 254, # '\n'
11: 255, # '\x0b'
12: 255, # '\x0c'
13: 254, # '\r'
14: 255, # '\x0e'
15: 255, # '\x0f'
16: 255, # '\x10'
17: 255, # '\x11'
18: 255, # '\x12'
19: 255, # '\x13'
20: 255, # '\x14'
21: 255, # '\x15'
22: 255, # '\x16'
23: 255, # '\x17'
24: 255, # '\x18'
25: 255, # '\x19'
26: 255, # '\x1a'
27: 255, # '\x1b'
28: 255, # '\x1c'
29: 255, # '\x1d'
30: 255, # '\x1e'
31: 255, # '\x1f'
32: 253, # ' '
33: 253, # '!'
34: 253, # '"'
35: 253, # '#'
36: 253, # '$'
37: 253, # '%'
38: 253, # '&'
39: 253, # "'"
40: 253, # '('
41: 253, # ')'
42: 253, # '*'
43: 253, # '+'
44: 253, # ','
45: 253, # '-'
46: 253, # '.'
47: 253, # '/'
48: 252, # '0'
49: 252, # '1'
50: 252, # '2'
51: 252, # '3'
52: 252, # '4'
53: 252, # '5'
54: 252, # '6'
55: 252, # '7'
56: 252, # '8'
57: 252, # '9'
58: 253, # ':'
59: 253, # ';'
60: 253, # '<'
61: 253, # '='
62: 253, # '>'
63: 253, # '?'
64: 253, # '@'
65: 142, # 'A'
66: 143, # 'B'
67: 144, # 'C'
68: 145, # 'D'
69: 146, # 'E'
70: 147, # 'F'
71: 148, # 'G'
72: 149, # 'H'
73: 150, # 'I'
74: 151, # 'J'
75: 152, # 'K'
76: 74, # 'L'
77: 153, # 'M'
78: 75, # 'N'
79: 154, # 'O'
80: 155, # 'P'
81: 156, # 'Q'
82: 157, # 'R'
83: 158, # 'S'
84: 159, # 'T'
85: 160, # 'U'
86: 161, # 'V'
87: 162, # 'W'
88: 163, # 'X'
89: 164, # 'Y'
90: 165, # 'Z'
91: 253, # '['
92: 253, # '\\'
93: 253, # ']'
94: 253, # '^'
95: 253, # '_'
96: 253, # '`'
97: 71, # 'a'
98: 172, # 'b'
99: 66, # 'c'
100: 173, # 'd'
101: 65, # 'e'
102: 174, # 'f'
103: 76, # 'g'
104: 175, # 'h'
105: 64, # 'i'
106: 176, # 'j'
107: 177, # 'k'
108: 77, # 'l'
109: 72, # 'm'
110: 178, # 'n'
111: 69, # 'o'
112: 67, # 'p'
113: 179, # 'q'
114: 78, # 'r'
115: 73, # 's'
116: 180, # 't'
117: 181, # 'u'
118: 79, # 'v'
119: 182, # 'w'
120: 183, # 'x'
121: 184, # 'y'
122: 185, # 'z'
123: 253, # '{'
124: 253, # '|'
125: 253, # '}'
126: 253, # '~'
127: 253, # '\x7f'
128: 191, # '─'
129: 192, # '│'
130: 193, # '┌'
131: 194, # '┐'
132: 195, # '└'
133: 196, # '┘'
134: 197, # '├'
135: 198, # '┤'
136: 199, # '┬'
137: 200, # '┴'
138: 201, # '┼'
139: 202, # '▀'
140: 203, # '▄'
141: 204, # '█'
142: 205, # '▌'
143: 206, # '▐'
144: 207, # '░'
145: 208, # '▒'
146: 209, # '▓'
147: 210, # '⌠'
148: 211, # '■'
149: 212, # '∙'
150: 213, # '√'
151: 214, # '≈'
152: 215, # '≤'
153: 216, # '≥'
154: 217, # '\xa0'
155: 218, # '⌡'
156: 219, # '°'
157: 220, # '²'
158: 221, # '·'
159: 222, # '÷'
160: 223, # '═'
161: 224, # '║'
162: 225, # '╒'
163: 68, # 'ё'
164: 226, # '╓'
165: 227, # '╔'
166: 228, # '╕'
167: 229, # '╖'
168: 230, # '╗'
169: 231, # '╘'
170: 232, # '╙'
171: 233, # '╚'
172: 234, # '╛'
173: 235, # '╜'
174: 236, # '╝'
175: 237, # '╞'
176: 238, # '╟'
177: 239, # '╠'
178: 240, # '╡'
179: 241, # 'Ё'
180: 242, # '╢'
181: 243, # '╣'
182: 244, # '╤'
183: 245, # '╥'
184: 246, # '╦'
185: 247, # '╧'
186: 248, # '╨'
187: 249, # '╩'
188: 250, # '╪'
189: 251, # '╫'
190: 252, # '╬'
191: 253, # '©'
192: 27, # 'ю'
193: 3, # 'а'
194: 21, # 'б'
195: 28, # 'ц'
196: 13, # 'д'
197: 2, # 'е'
198: 39, # 'ф'
199: 19, # 'г'
200: 26, # 'х'
201: 4, # 'и'
202: 23, # 'й'
203: 11, # 'к'
204: 8, # 'л'
205: 12, # 'м'
206: 5, # 'н'
207: 1, # 'о'
208: 15, # 'п'
209: 16, # 'я'
210: 9, # 'р'
211: 7, # 'с'
212: 6, # 'т'
213: 14, # 'у'
214: 24, # 'ж'
215: 10, # 'в'
216: 17, # 'ь'
217: 18, # 'ы'
218: 20, # 'з'
219: 25, # 'ш'
220: 30, # 'э'
221: 29, # 'щ'
222: 22, # 'ч'
223: 54, # 'ъ'
224: 59, # 'Ю'
225: 37, # 'А'
226: 44, # 'Б'
227: 58, # 'Ц'
228: 41, # 'Д'
229: 48, # 'Е'
230: 53, # 'Ф'
231: 46, # 'Г'
232: 55, # 'Х'
233: 42, # 'И'
234: 60, # 'Й'
235: 36, # 'К'
236: 49, # 'Л'
237: 38, # 'М'
238: 31, # 'Н'
239: 34, # 'О'
240: 35, # 'П'
241: 43, # 'Я'
242: 45, # 'Р'
243: 32, # 'С'
244: 40, # 'Т'
245: 52, # 'У'
246: 56, # 'Ж'
247: 33, # 'В'
248: 61, # 'Ь'
249: 62, # 'Ы'
250: 51, # 'З'
251: 57, # 'Ш'
252: 47, # 'Э'
253: 63, # 'Щ'
254: 50, # 'Ч'
255: 70, # 'Ъ'
}
KOI8_R_RUSSIAN_MODEL = SingleByteCharSetModel(
charset_name="KOI8-R",
language="Russian",
char_to_order_map=KOI8_R_RUSSIAN_CHAR_TO_ORDER,
language_model=RUSSIAN_LANG_MODEL,
typical_positive_ratio=0.976601,
keep_ascii_letters=False,
alphabet="ЁАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюяё",
)
MACCYRILLIC_RUSSIAN_CHAR_TO_ORDER = {
0: 255, # '\x00'
1: 255, # '\x01'
2: 255, # '\x02'
3: 255, # '\x03'
4: 255, # '\x04'
5: 255, # '\x05'
6: 255, # '\x06'
7: 255, # '\x07'
8: 255, # '\x08'
9: 255, # '\t'
10: 254, # '\n'
11: 255, # '\x0b'
12: 255, # '\x0c'
13: 254, # '\r'
14: 255, # '\x0e'
15: 255, # '\x0f'
16: 255, # '\x10'
17: 255, # '\x11'
18: 255, # '\x12'
19: 255, # '\x13'
20: 255, # '\x14'
21: 255, # '\x15'
22: 255, # '\x16'
23: 255, # '\x17'
24: 255, # '\x18'
25: 255, # '\x19'
26: 255, # '\x1a'
27: 255, # '\x1b'
28: 255, # '\x1c'
29: 255, # '\x1d'
30: 255, # '\x1e'
31: 255, # '\x1f'
32: 253, # ' '
33: 253, # '!'
34: 253, # '"'
35: 253, # '#'
36: 253, # '$'
37: 253, # '%'
38: 253, # '&'
39: 253, # "'"
40: 253, # '('
41: 253, # ')'
42: 253, # '*'
43: 253, # '+'
44: 253, # ','
45: 253, # '-'
46: 253, # '.'
47: 253, # '/'
48: 252, # '0'
49: 252, # '1'
50: 252, # '2'
51: 252, # '3'
52: 252, # '4'
53: 252, # '5'
54: 252, # '6'
55: 252, # '7'
56: 252, # '8'
57: 252, # '9'
58: 253, # ':'
59: 253, # ';'
60: 253, # '<'
61: 253, # '='
62: 253, # '>'
63: 253, # '?'
64: 253, # '@'
65: 142, # 'A'
66: 143, # 'B'
67: 144, # 'C'
68: 145, # 'D'
69: 146, # 'E'
70: 147, # 'F'
71: 148, # 'G'
72: 149, # 'H'
73: 150, # 'I'
74: 151, # 'J'
75: 152, # 'K'
76: 74, # 'L'
77: 153, # 'M'
78: 75, # 'N'
79: 154, # 'O'
80: 155, # 'P'
81: 156, # 'Q'
82: 157, # 'R'
83: 158, # 'S'
84: 159, # 'T'
85: 160, # 'U'
86: 161, # 'V'
87: 162, # 'W'
88: 163, # 'X'
89: 164, # 'Y'
90: 165, # 'Z'
91: 253, # '['
92: 253, # '\\'
93: 253, # ']'
94: 253, # '^'
95: 253, # '_'
96: 253, # '`'
97: 71, # 'a'
98: 172, # 'b'
99: 66, # 'c'
100: 173, # 'd'
101: 65, # 'e'
102: 174, # 'f'
103: 76, # 'g'
104: 175, # 'h'
105: 64, # 'i'
106: 176, # 'j'
107: 177, # 'k'
108: 77, # 'l'
109: 72, # 'm'
110: 178, # 'n'
111: 69, # 'o'
112: 67, # 'p'
113: 179, # 'q'
114: 78, # 'r'
115: 73, # 's'
116: 180, # 't'
117: 181, # 'u'
118: 79, # 'v'
119: 182, # 'w'
120: 183, # 'x'
121: 184, # 'y'
122: 185, # 'z'
123: 253, # '{'
124: 253, # '|'
125: 253, # '}'
126: 253, # '~'
127: 253, # '\x7f'
128: 37, # 'А'
129: 44, # 'Б'
130: 33, # 'В'
131: 46, # 'Г'
132: 41, # 'Д'
133: 48, # 'Е'
134: 56, # 'Ж'
135: 51, # 'З'
136: 42, # 'И'
137: 60, # 'Й'
138: 36, # 'К'
139: 49, # 'Л'
140: 38, # 'М'
141: 31, # 'Н'
142: 34, # 'О'
143: 35, # 'П'
144: 45, # 'Р'
145: 32, # 'С'
146: 40, # 'Т'
147: 52, # 'У'
148: 53, # 'Ф'
149: 55, # 'Х'
150: 58, # 'Ц'
151: 50, # 'Ч'
152: 57, # 'Ш'
153: 63, # 'Щ'
154: 70, # 'Ъ'
155: 62, # 'Ы'
156: 61, # 'Ь'
157: 47, # 'Э'
158: 59, # 'Ю'
159: 43, # 'Я'
160: 191, # '†'
161: 192, # '°'
162: 193, # 'Ґ'
163: 194, # '£'
164: 195, # '§'
165: 196, # '•'
166: 197, # '¶'
167: 198, # 'І'
168: 199, # '®'
169: 200, # '©'
170: 201, # '™'
171: 202, # 'Ђ'
172: 203, # 'ђ'
173: 204, # '≠'
174: 205, # 'Ѓ'
175: 206, # 'ѓ'
176: 207, # '∞'
177: 208, # '±'
178: 209, # '≤'
179: 210, # '≥'
180: 211, # 'і'
181: 212, # 'µ'
182: 213, # 'ґ'
183: 214, # 'Ј'
184: 215, # 'Є'
185: 216, # 'є'
186: 217, # 'Ї'
187: 218, # 'ї'
188: 219, # 'Љ'
189: 220, # 'љ'
190: 221, # 'Њ'
191: 222, # 'њ'
192: 223, # 'ј'
193: 224, # 'Ѕ'
194: 225, # '¬'
195: 226, # '√'
196: 227, # 'ƒ'
197: 228, # '≈'
198: 229, # '∆'
199: 230, # '«'
200: 231, # '»'
201: 232, # '…'
202: 233, # '\xa0'
203: 234, # 'Ћ'
204: 235, # 'ћ'
205: 236, # 'Ќ'
206: 237, # 'ќ'
207: 238, # 'ѕ'
208: 239, # '–'
209: 240, # '—'
210: 241, # '“'
211: 242, # '”'
212: 243, # '‘'
213: 244, # '’'
214: 245, # '÷'
215: 246, # '„'
216: 247, # 'Ў'
217: 248, # 'ў'
218: 249, # 'Џ'
219: 250, # 'џ'
220: 251, # '№'
221: 252, # 'Ё'
222: 68, # 'ё'
223: 16, # 'я'
224: 3, # 'а'
225: 21, # 'б'
226: 10, # 'в'
227: 19, # 'г'
228: 13, # 'д'
229: 2, # 'е'
230: 24, # 'ж'
231: 20, # 'з'
232: 4, # 'и'
233: 23, # 'й'
234: 11, # 'к'
235: 8, # 'л'
236: 12, # 'м'
237: 5, # 'н'
238: 1, # 'о'
239: 15, # 'п'
240: 9, # 'р'
241: 7, # 'с'
242: 6, # 'т'
243: 14, # 'у'
244: 39, # 'ф'
245: 26, # 'х'
246: 28, # 'ц'
247: 22, # 'ч'
248: 25, # 'ш'
249: 29, # 'щ'
250: 54, # 'ъ'
251: 18, # 'ы'
252: 17, # 'ь'
253: 30, # 'э'
254: 27, # 'ю'
255: 255, # '€'
}
MACCYRILLIC_RUSSIAN_MODEL = SingleByteCharSetModel(
charset_name="MacCyrillic",
language="Russian",
char_to_order_map=MACCYRILLIC_RUSSIAN_CHAR_TO_ORDER,
language_model=RUSSIAN_LANG_MODEL,
typical_positive_ratio=0.976601,
keep_ascii_letters=False,
alphabet="ЁАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюяё",
)
ISO_8859_5_RUSSIAN_CHAR_TO_ORDER = {
0: 255, # '\x00'
1: 255, # '\x01'
2: 255, # '\x02'
3: 255, # '\x03'
4: 255, # '\x04'
5: 255, # '\x05'
6: 255, # '\x06'
7: 255, # '\x07'
8: 255, # '\x08'
9: 255, # '\t'
10: 254, # '\n'
11: 255, # '\x0b'
12: 255, # '\x0c'
13: 254, # '\r'
14: 255, # '\x0e'
15: 255, # '\x0f'
16: 255, # '\x10'
17: 255, # '\x11'
18: 255, # '\x12'
19: 255, # '\x13'
20: 255, # '\x14'
21: 255, # '\x15'
22: 255, # '\x16'
23: 255, # '\x17'
24: 255, # '\x18'
25: 255, # '\x19'
26: 255, # '\x1a'
27: 255, # '\x1b'
28: 255, # '\x1c'
29: 255, # '\x1d'
30: 255, # '\x1e'
31: 255, # '\x1f'
32: 253, # ' '
33: 253, # '!'
34: 253, # '"'
35: 253, # '#'
36: 253, # '$'
37: 253, # '%'
38: 253, # '&'
39: 253, # "'"
40: 253, # '('
41: 253, # ')'
42: 253, # '*'
43: 253, # '+'
44: 253, # ','
45: 253, # '-'
46: 253, # '.'
47: 253, # '/'
48: 252, # '0'
49: 252, # '1'
50: 252, # '2'
51: 252, # '3'
52: 252, # '4'
53: 252, # '5'
54: 252, # '6'
55: 252, # '7'
56: 252, # '8'
57: 252, # '9'
58: 253, # ':'
59: 253, # ';'
60: 253, # '<'
61: 253, # '='
62: 253, # '>'
63: 253, # '?'
64: 253, # '@'
65: 142, # 'A'
66: 143, # 'B'
67: 144, # 'C'
68: 145, # 'D'
69: 146, # 'E'
70: 147, # 'F'
71: 148, # 'G'
72: 149, # 'H'
73: 150, # 'I'
74: 151, # 'J'
75: 152, # 'K'
76: 74, # 'L'
77: 153, # 'M'
78: 75, # 'N'
79: 154, # 'O'
80: 155, # 'P'
81: 156, # 'Q'
82: 157, # 'R'
83: 158, # 'S'
84: 159, # 'T'
85: 160, # 'U'
86: 161, # 'V'
87: 162, # 'W'
88: 163, # 'X'
89: 164, # 'Y'
90: 165, # 'Z'
91: 253, # '['
92: 253, # '\\'
93: 253, # ']'
94: 253, # '^'
95: 253, # '_'
96: 253, # '`'
97: 71, # 'a'
98: 172, # 'b'
99: 66, # 'c'
100: 173, # 'd'
101: 65, # 'e'
102: 174, # 'f'
103: 76, # 'g'
104: 175, # 'h'
105: 64, # 'i'
106: 176, # 'j'
107: 177, # 'k'
108: 77, # 'l'
109: 72, # 'm'
110: 178, # 'n'
111: 69, # 'o'
112: 67, # 'p'
113: 179, # 'q'
114: 78, # 'r'
115: 73, # 's'
116: 180, # 't'
117: 181, # 'u'
118: 79, # 'v'
119: 182, # 'w'
120: 183, # 'x'
121: 184, # 'y'
122: 185, # 'z'
123: 253, # '{'
124: 253, # '|'
125: 253, # '}'
126: 253, # '~'
127: 253, # '\x7f'
128: 191, # '\x80'
129: 192, # '\x81'
130: 193, # '\x82'
131: 194, # '\x83'
132: 195, # '\x84'
133: 196, # '\x85'
134: 197, # '\x86'
135: 198, # '\x87'
136: 199, # '\x88'
137: 200, # '\x89'
138: 201, # '\x8a'
139: 202, # '\x8b'
140: 203, # '\x8c'
141: 204, # '\x8d'
142: 205, # '\x8e'
143: 206, # '\x8f'
144: 207, # '\x90'
145: 208, # '\x91'
146: 209, # '\x92'
147: 210, # '\x93'
148: 211, # '\x94'
149: 212, # '\x95'
150: 213, # '\x96'
151: 214, # '\x97'
152: 215, # '\x98'
153: 216, # '\x99'
154: 217, # '\x9a'
155: 218, # '\x9b'
156: 219, # '\x9c'
157: 220, # '\x9d'
158: 221, # '\x9e'
159: 222, # '\x9f'
160: 223, # '\xa0'
161: 224, # 'Ё'
162: 225, # 'Ђ'
163: 226, # 'Ѓ'
164: 227, # 'Є'
165: 228, # 'Ѕ'
166: 229, # 'І'
167: 230, # 'Ї'
168: 231, # 'Ј'
169: 232, # 'Љ'
170: 233, # 'Њ'
171: 234, # 'Ћ'
172: 235, # 'Ќ'
173: 236, # '\xad'
174: 237, # 'Ў'
175: 238, # 'Џ'
176: 37, # 'А'
177: 44, # 'Б'
178: 33, # 'В'
179: 46, # 'Г'
180: 41, # 'Д'
181: 48, # 'Е'
182: 56, # 'Ж'
183: 51, # 'З'
184: 42, # 'И'
185: 60, # 'Й'
186: 36, # 'К'
187: 49, # 'Л'
188: 38, # 'М'
189: 31, # 'Н'
190: 34, # 'О'
191: 35, # 'П'
192: 45, # 'Р'
193: 32, # 'С'
194: 40, # 'Т'
195: 52, # 'У'
196: 53, # 'Ф'
197: 55, # 'Х'
198: 58, # 'Ц'
199: 50, # 'Ч'
200: 57, # 'Ш'
201: 63, # 'Щ'
202: 70, # 'Ъ'
203: 62, # 'Ы'
204: 61, # 'Ь'
205: 47, # 'Э'
206: 59, # 'Ю'
207: 43, # 'Я'
208: 3, # 'а'
209: 21, # 'б'
210: 10, # 'в'
211: 19, # 'г'
212: 13, # 'д'
213: 2, # 'е'
214: 24, # 'ж'
215: 20, # 'з'
216: 4, # 'и'
217: 23, # 'й'
218: 11, # 'к'
219: 8, # 'л'
220: 12, # 'м'
221: 5, # 'н'
222: 1, # 'о'
223: 15, # 'п'
224: 9, # 'р'
225: 7, # 'с'
226: 6, # 'т'
227: 14, # 'у'
228: 39, # 'ф'
229: 26, # 'х'
230: 28, # 'ц'
231: 22, # 'ч'
232: 25, # 'ш'
233: 29, # 'щ'
234: 54, # 'ъ'
235: 18, # 'ы'
236: 17, # 'ь'
237: 30, # 'э'
238: 27, # 'ю'
239: 16, # 'я'
240: 239, # '№'
241: 68, # 'ё'
242: 240, # 'ђ'
243: 241, # 'ѓ'
244: 242, # 'є'
245: 243, # 'ѕ'
246: 244, # 'і'
247: 245, # 'ї'
248: 246, # 'ј'
249: 247, # 'љ'
250: 248, # 'њ'
251: 249, # 'ћ'
252: 250, # 'ќ'
253: 251, # '§'
254: 252, # 'ў'
255: 255, # 'џ'
}
ISO_8859_5_RUSSIAN_MODEL = SingleByteCharSetModel(
charset_name="ISO-8859-5",
language="Russian",
char_to_order_map=ISO_8859_5_RUSSIAN_CHAR_TO_ORDER,
language_model=RUSSIAN_LANG_MODEL,
typical_positive_ratio=0.976601,
keep_ascii_letters=False,
alphabet="ЁАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюяё",
)
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/chardet/langrussianmodel.py
|
Python
|
mit
| 128,035 |
from pip._vendor.chardet.sbcharsetprober import SingleByteCharSetModel
# 3: Positive
# 2: Likely
# 1: Unlikely
# 0: Negative
THAI_LANG_MODEL = {
5: { # 'ก'
5: 2, # 'ก'
30: 2, # 'ข'
24: 2, # 'ค'
8: 2, # 'ง'
26: 2, # 'จ'
52: 0, # 'ฉ'
34: 1, # 'ช'
51: 1, # 'ซ'
47: 0, # 'ญ'
58: 3, # 'ฎ'
57: 2, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 2, # 'ณ'
20: 2, # 'ด'
19: 3, # 'ต'
44: 0, # 'ถ'
14: 2, # 'ท'
48: 0, # 'ธ'
3: 2, # 'น'
17: 1, # 'บ'
25: 2, # 'ป'
39: 1, # 'ผ'
62: 1, # 'ฝ'
31: 1, # 'พ'
54: 0, # 'ฟ'
45: 1, # 'ภ'
9: 2, # 'ม'
16: 1, # 'ย'
2: 3, # 'ร'
61: 2, # 'ฤ'
15: 3, # 'ล'
12: 3, # 'ว'
42: 2, # 'ศ'
46: 3, # 'ษ'
18: 2, # 'ส'
21: 2, # 'ห'
4: 3, # 'อ'
63: 1, # 'ฯ'
22: 2, # 'ะ'
10: 3, # 'ั'
1: 3, # 'า'
36: 3, # 'ำ'
23: 3, # 'ิ'
13: 3, # 'ี'
40: 0, # 'ึ'
27: 2, # 'ื'
32: 2, # 'ุ'
35: 1, # 'ู'
11: 2, # 'เ'
28: 2, # 'แ'
41: 1, # 'โ'
29: 1, # 'ใ'
33: 2, # 'ไ'
50: 1, # 'ๆ'
37: 3, # '็'
6: 3, # '่'
7: 3, # '้'
38: 2, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
30: { # 'ข'
5: 1, # 'ก'
30: 0, # 'ข'
24: 1, # 'ค'
8: 1, # 'ง'
26: 1, # 'จ'
52: 0, # 'ฉ'
34: 0, # 'ช'
51: 0, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 2, # 'ณ'
20: 0, # 'ด'
19: 2, # 'ต'
44: 0, # 'ถ'
14: 1, # 'ท'
48: 0, # 'ธ'
3: 2, # 'น'
17: 1, # 'บ'
25: 1, # 'ป'
39: 0, # 'ผ'
62: 0, # 'ฝ'
31: 0, # 'พ'
54: 0, # 'ฟ'
45: 0, # 'ภ'
9: 0, # 'ม'
16: 2, # 'ย'
2: 1, # 'ร'
61: 0, # 'ฤ'
15: 0, # 'ล'
12: 2, # 'ว'
42: 0, # 'ศ'
46: 0, # 'ษ'
18: 1, # 'ส'
21: 1, # 'ห'
4: 3, # 'อ'
63: 0, # 'ฯ'
22: 0, # 'ะ'
10: 3, # 'ั'
1: 3, # 'า'
36: 0, # 'ำ'
23: 0, # 'ิ'
13: 2, # 'ี'
40: 3, # 'ึ'
27: 1, # 'ื'
32: 1, # 'ุ'
35: 0, # 'ู'
11: 0, # 'เ'
28: 0, # 'แ'
41: 0, # 'โ'
29: 1, # 'ใ'
33: 0, # 'ไ'
50: 0, # 'ๆ'
37: 1, # '็'
6: 2, # '่'
7: 3, # '้'
38: 1, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
24: { # 'ค'
5: 0, # 'ก'
30: 0, # 'ข'
24: 2, # 'ค'
8: 2, # 'ง'
26: 0, # 'จ'
52: 0, # 'ฉ'
34: 0, # 'ช'
51: 0, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 2, # 'ณ'
20: 2, # 'ด'
19: 2, # 'ต'
44: 0, # 'ถ'
14: 1, # 'ท'
48: 0, # 'ธ'
3: 3, # 'น'
17: 0, # 'บ'
25: 1, # 'ป'
39: 0, # 'ผ'
62: 0, # 'ฝ'
31: 0, # 'พ'
54: 0, # 'ฟ'
45: 0, # 'ภ'
9: 2, # 'ม'
16: 2, # 'ย'
2: 3, # 'ร'
61: 0, # 'ฤ'
15: 3, # 'ล'
12: 3, # 'ว'
42: 0, # 'ศ'
46: 0, # 'ษ'
18: 1, # 'ส'
21: 0, # 'ห'
4: 2, # 'อ'
63: 0, # 'ฯ'
22: 2, # 'ะ'
10: 3, # 'ั'
1: 2, # 'า'
36: 3, # 'ำ'
23: 3, # 'ิ'
13: 2, # 'ี'
40: 0, # 'ึ'
27: 3, # 'ื'
32: 3, # 'ุ'
35: 2, # 'ู'
11: 1, # 'เ'
28: 0, # 'แ'
41: 3, # 'โ'
29: 0, # 'ใ'
33: 0, # 'ไ'
50: 0, # 'ๆ'
37: 1, # '็'
6: 3, # '่'
7: 3, # '้'
38: 3, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
8: { # 'ง'
5: 3, # 'ก'
30: 2, # 'ข'
24: 3, # 'ค'
8: 2, # 'ง'
26: 2, # 'จ'
52: 1, # 'ฉ'
34: 2, # 'ช'
51: 1, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 2, # 'ด'
19: 2, # 'ต'
44: 1, # 'ถ'
14: 3, # 'ท'
48: 1, # 'ธ'
3: 3, # 'น'
17: 2, # 'บ'
25: 2, # 'ป'
39: 2, # 'ผ'
62: 1, # 'ฝ'
31: 2, # 'พ'
54: 0, # 'ฟ'
45: 1, # 'ภ'
9: 2, # 'ม'
16: 1, # 'ย'
2: 2, # 'ร'
61: 0, # 'ฤ'
15: 2, # 'ล'
12: 2, # 'ว'
42: 2, # 'ศ'
46: 1, # 'ษ'
18: 3, # 'ส'
21: 3, # 'ห'
4: 2, # 'อ'
63: 0, # 'ฯ'
22: 0, # 'ะ'
10: 1, # 'ั'
1: 3, # 'า'
36: 0, # 'ำ'
23: 2, # 'ิ'
13: 1, # 'ี'
40: 0, # 'ึ'
27: 1, # 'ื'
32: 1, # 'ุ'
35: 0, # 'ู'
11: 3, # 'เ'
28: 2, # 'แ'
41: 1, # 'โ'
29: 2, # 'ใ'
33: 2, # 'ไ'
50: 3, # 'ๆ'
37: 0, # '็'
6: 2, # '่'
7: 0, # '้'
38: 0, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
26: { # 'จ'
5: 2, # 'ก'
30: 1, # 'ข'
24: 0, # 'ค'
8: 2, # 'ง'
26: 3, # 'จ'
52: 0, # 'ฉ'
34: 0, # 'ช'
51: 0, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 2, # 'ด'
19: 1, # 'ต'
44: 1, # 'ถ'
14: 2, # 'ท'
48: 0, # 'ธ'
3: 3, # 'น'
17: 1, # 'บ'
25: 0, # 'ป'
39: 0, # 'ผ'
62: 0, # 'ฝ'
31: 1, # 'พ'
54: 0, # 'ฟ'
45: 0, # 'ภ'
9: 1, # 'ม'
16: 1, # 'ย'
2: 3, # 'ร'
61: 0, # 'ฤ'
15: 0, # 'ล'
12: 1, # 'ว'
42: 0, # 'ศ'
46: 0, # 'ษ'
18: 2, # 'ส'
21: 1, # 'ห'
4: 2, # 'อ'
63: 0, # 'ฯ'
22: 3, # 'ะ'
10: 3, # 'ั'
1: 3, # 'า'
36: 3, # 'ำ'
23: 2, # 'ิ'
13: 1, # 'ี'
40: 3, # 'ึ'
27: 1, # 'ื'
32: 3, # 'ุ'
35: 2, # 'ู'
11: 1, # 'เ'
28: 1, # 'แ'
41: 0, # 'โ'
29: 1, # 'ใ'
33: 1, # 'ไ'
50: 0, # 'ๆ'
37: 0, # '็'
6: 2, # '่'
7: 2, # '้'
38: 0, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
52: { # 'ฉ'
5: 0, # 'ก'
30: 0, # 'ข'
24: 0, # 'ค'
8: 0, # 'ง'
26: 0, # 'จ'
52: 0, # 'ฉ'
34: 0, # 'ช'
51: 0, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 0, # 'ด'
19: 0, # 'ต'
44: 0, # 'ถ'
14: 0, # 'ท'
48: 0, # 'ธ'
3: 0, # 'น'
17: 3, # 'บ'
25: 0, # 'ป'
39: 0, # 'ผ'
62: 0, # 'ฝ'
31: 3, # 'พ'
54: 0, # 'ฟ'
45: 0, # 'ภ'
9: 1, # 'ม'
16: 1, # 'ย'
2: 0, # 'ร'
61: 0, # 'ฤ'
15: 2, # 'ล'
12: 1, # 'ว'
42: 0, # 'ศ'
46: 0, # 'ษ'
18: 0, # 'ส'
21: 0, # 'ห'
4: 0, # 'อ'
63: 0, # 'ฯ'
22: 1, # 'ะ'
10: 1, # 'ั'
1: 1, # 'า'
36: 0, # 'ำ'
23: 1, # 'ิ'
13: 1, # 'ี'
40: 0, # 'ึ'
27: 0, # 'ื'
32: 1, # 'ุ'
35: 0, # 'ู'
11: 0, # 'เ'
28: 0, # 'แ'
41: 0, # 'โ'
29: 0, # 'ใ'
33: 0, # 'ไ'
50: 0, # 'ๆ'
37: 0, # '็'
6: 0, # '่'
7: 0, # '้'
38: 0, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
34: { # 'ช'
5: 1, # 'ก'
30: 0, # 'ข'
24: 0, # 'ค'
8: 1, # 'ง'
26: 0, # 'จ'
52: 0, # 'ฉ'
34: 0, # 'ช'
51: 0, # 'ซ'
47: 1, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 0, # 'ด'
19: 0, # 'ต'
44: 0, # 'ถ'
14: 1, # 'ท'
48: 0, # 'ธ'
3: 3, # 'น'
17: 2, # 'บ'
25: 0, # 'ป'
39: 0, # 'ผ'
62: 0, # 'ฝ'
31: 0, # 'พ'
54: 0, # 'ฟ'
45: 0, # 'ภ'
9: 2, # 'ม'
16: 1, # 'ย'
2: 1, # 'ร'
61: 0, # 'ฤ'
15: 0, # 'ล'
12: 1, # 'ว'
42: 0, # 'ศ'
46: 0, # 'ษ'
18: 0, # 'ส'
21: 0, # 'ห'
4: 2, # 'อ'
63: 0, # 'ฯ'
22: 0, # 'ะ'
10: 2, # 'ั'
1: 3, # 'า'
36: 1, # 'ำ'
23: 3, # 'ิ'
13: 2, # 'ี'
40: 0, # 'ึ'
27: 3, # 'ื'
32: 3, # 'ุ'
35: 1, # 'ู'
11: 0, # 'เ'
28: 0, # 'แ'
41: 0, # 'โ'
29: 0, # 'ใ'
33: 0, # 'ไ'
50: 0, # 'ๆ'
37: 1, # '็'
6: 3, # '่'
7: 3, # '้'
38: 0, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
51: { # 'ซ'
5: 0, # 'ก'
30: 0, # 'ข'
24: 0, # 'ค'
8: 0, # 'ง'
26: 0, # 'จ'
52: 0, # 'ฉ'
34: 0, # 'ช'
51: 0, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 0, # 'ด'
19: 0, # 'ต'
44: 0, # 'ถ'
14: 0, # 'ท'
48: 0, # 'ธ'
3: 1, # 'น'
17: 0, # 'บ'
25: 0, # 'ป'
39: 0, # 'ผ'
62: 0, # 'ฝ'
31: 0, # 'พ'
54: 0, # 'ฟ'
45: 0, # 'ภ'
9: 0, # 'ม'
16: 0, # 'ย'
2: 0, # 'ร'
61: 0, # 'ฤ'
15: 1, # 'ล'
12: 0, # 'ว'
42: 0, # 'ศ'
46: 0, # 'ษ'
18: 1, # 'ส'
21: 0, # 'ห'
4: 2, # 'อ'
63: 0, # 'ฯ'
22: 0, # 'ะ'
10: 1, # 'ั'
1: 1, # 'า'
36: 0, # 'ำ'
23: 1, # 'ิ'
13: 2, # 'ี'
40: 3, # 'ึ'
27: 2, # 'ื'
32: 1, # 'ุ'
35: 1, # 'ู'
11: 1, # 'เ'
28: 0, # 'แ'
41: 0, # 'โ'
29: 0, # 'ใ'
33: 0, # 'ไ'
50: 0, # 'ๆ'
37: 1, # '็'
6: 1, # '่'
7: 2, # '้'
38: 1, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
47: { # 'ญ'
5: 1, # 'ก'
30: 1, # 'ข'
24: 0, # 'ค'
8: 0, # 'ง'
26: 0, # 'จ'
52: 0, # 'ฉ'
34: 1, # 'ช'
51: 0, # 'ซ'
47: 3, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 0, # 'ด'
19: 0, # 'ต'
44: 0, # 'ถ'
14: 1, # 'ท'
48: 0, # 'ธ'
3: 0, # 'น'
17: 1, # 'บ'
25: 1, # 'ป'
39: 0, # 'ผ'
62: 0, # 'ฝ'
31: 0, # 'พ'
54: 0, # 'ฟ'
45: 0, # 'ภ'
9: 1, # 'ม'
16: 0, # 'ย'
2: 0, # 'ร'
61: 0, # 'ฤ'
15: 1, # 'ล'
12: 0, # 'ว'
42: 0, # 'ศ'
46: 0, # 'ษ'
18: 1, # 'ส'
21: 2, # 'ห'
4: 1, # 'อ'
63: 0, # 'ฯ'
22: 1, # 'ะ'
10: 2, # 'ั'
1: 3, # 'า'
36: 0, # 'ำ'
23: 1, # 'ิ'
13: 1, # 'ี'
40: 0, # 'ึ'
27: 0, # 'ื'
32: 0, # 'ุ'
35: 0, # 'ู'
11: 1, # 'เ'
28: 1, # 'แ'
41: 0, # 'โ'
29: 1, # 'ใ'
33: 0, # 'ไ'
50: 1, # 'ๆ'
37: 0, # '็'
6: 2, # '่'
7: 0, # '้'
38: 0, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
58: { # 'ฎ'
5: 2, # 'ก'
30: 0, # 'ข'
24: 0, # 'ค'
8: 0, # 'ง'
26: 0, # 'จ'
52: 0, # 'ฉ'
34: 0, # 'ช'
51: 0, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 0, # 'ด'
19: 0, # 'ต'
44: 0, # 'ถ'
14: 0, # 'ท'
48: 0, # 'ธ'
3: 0, # 'น'
17: 0, # 'บ'
25: 0, # 'ป'
39: 0, # 'ผ'
62: 0, # 'ฝ'
31: 0, # 'พ'
54: 0, # 'ฟ'
45: 0, # 'ภ'
9: 0, # 'ม'
16: 0, # 'ย'
2: 0, # 'ร'
61: 0, # 'ฤ'
15: 0, # 'ล'
12: 0, # 'ว'
42: 0, # 'ศ'
46: 0, # 'ษ'
18: 0, # 'ส'
21: 1, # 'ห'
4: 0, # 'อ'
63: 0, # 'ฯ'
22: 0, # 'ะ'
10: 0, # 'ั'
1: 0, # 'า'
36: 0, # 'ำ'
23: 1, # 'ิ'
13: 2, # 'ี'
40: 0, # 'ึ'
27: 0, # 'ื'
32: 0, # 'ุ'
35: 0, # 'ู'
11: 0, # 'เ'
28: 0, # 'แ'
41: 0, # 'โ'
29: 0, # 'ใ'
33: 0, # 'ไ'
50: 0, # 'ๆ'
37: 0, # '็'
6: 0, # '่'
7: 0, # '้'
38: 0, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
57: { # 'ฏ'
5: 0, # 'ก'
30: 0, # 'ข'
24: 0, # 'ค'
8: 0, # 'ง'
26: 0, # 'จ'
52: 0, # 'ฉ'
34: 0, # 'ช'
51: 0, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 0, # 'ด'
19: 0, # 'ต'
44: 0, # 'ถ'
14: 0, # 'ท'
48: 0, # 'ธ'
3: 0, # 'น'
17: 0, # 'บ'
25: 0, # 'ป'
39: 0, # 'ผ'
62: 0, # 'ฝ'
31: 0, # 'พ'
54: 0, # 'ฟ'
45: 0, # 'ภ'
9: 0, # 'ม'
16: 0, # 'ย'
2: 0, # 'ร'
61: 0, # 'ฤ'
15: 0, # 'ล'
12: 0, # 'ว'
42: 0, # 'ศ'
46: 0, # 'ษ'
18: 0, # 'ส'
21: 0, # 'ห'
4: 0, # 'อ'
63: 0, # 'ฯ'
22: 0, # 'ะ'
10: 0, # 'ั'
1: 0, # 'า'
36: 0, # 'ำ'
23: 3, # 'ิ'
13: 1, # 'ี'
40: 0, # 'ึ'
27: 0, # 'ื'
32: 0, # 'ุ'
35: 0, # 'ู'
11: 0, # 'เ'
28: 0, # 'แ'
41: 0, # 'โ'
29: 0, # 'ใ'
33: 0, # 'ไ'
50: 0, # 'ๆ'
37: 0, # '็'
6: 0, # '่'
7: 0, # '้'
38: 0, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
49: { # 'ฐ'
5: 1, # 'ก'
30: 0, # 'ข'
24: 0, # 'ค'
8: 0, # 'ง'
26: 0, # 'จ'
52: 0, # 'ฉ'
34: 0, # 'ช'
51: 0, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 0, # 'ด'
19: 0, # 'ต'
44: 0, # 'ถ'
14: 0, # 'ท'
48: 0, # 'ธ'
3: 0, # 'น'
17: 2, # 'บ'
25: 0, # 'ป'
39: 0, # 'ผ'
62: 0, # 'ฝ'
31: 0, # 'พ'
54: 0, # 'ฟ'
45: 0, # 'ภ'
9: 2, # 'ม'
16: 0, # 'ย'
2: 0, # 'ร'
61: 0, # 'ฤ'
15: 0, # 'ล'
12: 0, # 'ว'
42: 1, # 'ศ'
46: 0, # 'ษ'
18: 0, # 'ส'
21: 0, # 'ห'
4: 1, # 'อ'
63: 0, # 'ฯ'
22: 0, # 'ะ'
10: 0, # 'ั'
1: 3, # 'า'
36: 0, # 'ำ'
23: 0, # 'ิ'
13: 0, # 'ี'
40: 0, # 'ึ'
27: 0, # 'ื'
32: 0, # 'ุ'
35: 0, # 'ู'
11: 0, # 'เ'
28: 0, # 'แ'
41: 0, # 'โ'
29: 0, # 'ใ'
33: 0, # 'ไ'
50: 0, # 'ๆ'
37: 0, # '็'
6: 0, # '่'
7: 0, # '้'
38: 1, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
53: { # 'ฑ'
5: 0, # 'ก'
30: 0, # 'ข'
24: 0, # 'ค'
8: 0, # 'ง'
26: 0, # 'จ'
52: 0, # 'ฉ'
34: 0, # 'ช'
51: 0, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 0, # 'ด'
19: 0, # 'ต'
44: 0, # 'ถ'
14: 0, # 'ท'
48: 0, # 'ธ'
3: 0, # 'น'
17: 0, # 'บ'
25: 0, # 'ป'
39: 0, # 'ผ'
62: 0, # 'ฝ'
31: 0, # 'พ'
54: 0, # 'ฟ'
45: 0, # 'ภ'
9: 0, # 'ม'
16: 0, # 'ย'
2: 0, # 'ร'
61: 0, # 'ฤ'
15: 0, # 'ล'
12: 0, # 'ว'
42: 0, # 'ศ'
46: 0, # 'ษ'
18: 0, # 'ส'
21: 0, # 'ห'
4: 0, # 'อ'
63: 0, # 'ฯ'
22: 0, # 'ะ'
10: 0, # 'ั'
1: 0, # 'า'
36: 0, # 'ำ'
23: 2, # 'ิ'
13: 0, # 'ี'
40: 0, # 'ึ'
27: 0, # 'ื'
32: 0, # 'ุ'
35: 0, # 'ู'
11: 0, # 'เ'
28: 0, # 'แ'
41: 0, # 'โ'
29: 0, # 'ใ'
33: 0, # 'ไ'
50: 0, # 'ๆ'
37: 0, # '็'
6: 0, # '่'
7: 0, # '้'
38: 3, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
55: { # 'ฒ'
5: 0, # 'ก'
30: 0, # 'ข'
24: 0, # 'ค'
8: 0, # 'ง'
26: 0, # 'จ'
52: 0, # 'ฉ'
34: 0, # 'ช'
51: 0, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 0, # 'ด'
19: 0, # 'ต'
44: 0, # 'ถ'
14: 0, # 'ท'
48: 0, # 'ธ'
3: 3, # 'น'
17: 0, # 'บ'
25: 0, # 'ป'
39: 0, # 'ผ'
62: 0, # 'ฝ'
31: 1, # 'พ'
54: 0, # 'ฟ'
45: 0, # 'ภ'
9: 0, # 'ม'
16: 0, # 'ย'
2: 0, # 'ร'
61: 0, # 'ฤ'
15: 0, # 'ล'
12: 0, # 'ว'
42: 0, # 'ศ'
46: 0, # 'ษ'
18: 0, # 'ส'
21: 0, # 'ห'
4: 0, # 'อ'
63: 0, # 'ฯ'
22: 0, # 'ะ'
10: 0, # 'ั'
1: 0, # 'า'
36: 0, # 'ำ'
23: 1, # 'ิ'
13: 0, # 'ี'
40: 0, # 'ึ'
27: 0, # 'ื'
32: 0, # 'ุ'
35: 0, # 'ู'
11: 0, # 'เ'
28: 0, # 'แ'
41: 0, # 'โ'
29: 0, # 'ใ'
33: 0, # 'ไ'
50: 0, # 'ๆ'
37: 0, # '็'
6: 0, # '่'
7: 0, # '้'
38: 0, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
43: { # 'ณ'
5: 1, # 'ก'
30: 0, # 'ข'
24: 0, # 'ค'
8: 0, # 'ง'
26: 0, # 'จ'
52: 0, # 'ฉ'
34: 0, # 'ช'
51: 0, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 3, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 0, # 'ด'
19: 0, # 'ต'
44: 0, # 'ถ'
14: 0, # 'ท'
48: 0, # 'ธ'
3: 0, # 'น'
17: 0, # 'บ'
25: 0, # 'ป'
39: 0, # 'ผ'
62: 0, # 'ฝ'
31: 0, # 'พ'
54: 0, # 'ฟ'
45: 3, # 'ภ'
9: 0, # 'ม'
16: 0, # 'ย'
2: 1, # 'ร'
61: 0, # 'ฤ'
15: 0, # 'ล'
12: 1, # 'ว'
42: 0, # 'ศ'
46: 0, # 'ษ'
18: 1, # 'ส'
21: 1, # 'ห'
4: 0, # 'อ'
63: 0, # 'ฯ'
22: 3, # 'ะ'
10: 0, # 'ั'
1: 3, # 'า'
36: 0, # 'ำ'
23: 1, # 'ิ'
13: 2, # 'ี'
40: 0, # 'ึ'
27: 0, # 'ื'
32: 0, # 'ุ'
35: 0, # 'ู'
11: 1, # 'เ'
28: 1, # 'แ'
41: 0, # 'โ'
29: 1, # 'ใ'
33: 1, # 'ไ'
50: 0, # 'ๆ'
37: 0, # '็'
6: 0, # '่'
7: 0, # '้'
38: 3, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
20: { # 'ด'
5: 2, # 'ก'
30: 2, # 'ข'
24: 2, # 'ค'
8: 3, # 'ง'
26: 2, # 'จ'
52: 0, # 'ฉ'
34: 1, # 'ช'
51: 0, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 1, # 'ด'
19: 2, # 'ต'
44: 1, # 'ถ'
14: 2, # 'ท'
48: 0, # 'ธ'
3: 1, # 'น'
17: 1, # 'บ'
25: 1, # 'ป'
39: 1, # 'ผ'
62: 0, # 'ฝ'
31: 1, # 'พ'
54: 0, # 'ฟ'
45: 1, # 'ภ'
9: 2, # 'ม'
16: 3, # 'ย'
2: 2, # 'ร'
61: 0, # 'ฤ'
15: 2, # 'ล'
12: 2, # 'ว'
42: 0, # 'ศ'
46: 0, # 'ษ'
18: 2, # 'ส'
21: 2, # 'ห'
4: 1, # 'อ'
63: 0, # 'ฯ'
22: 0, # 'ะ'
10: 3, # 'ั'
1: 2, # 'า'
36: 2, # 'ำ'
23: 3, # 'ิ'
13: 3, # 'ี'
40: 1, # 'ึ'
27: 2, # 'ื'
32: 3, # 'ุ'
35: 2, # 'ู'
11: 2, # 'เ'
28: 2, # 'แ'
41: 1, # 'โ'
29: 2, # 'ใ'
33: 2, # 'ไ'
50: 2, # 'ๆ'
37: 2, # '็'
6: 1, # '่'
7: 3, # '้'
38: 1, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
19: { # 'ต'
5: 2, # 'ก'
30: 1, # 'ข'
24: 1, # 'ค'
8: 0, # 'ง'
26: 1, # 'จ'
52: 0, # 'ฉ'
34: 1, # 'ช'
51: 0, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 1, # 'ด'
19: 1, # 'ต'
44: 2, # 'ถ'
14: 1, # 'ท'
48: 0, # 'ธ'
3: 2, # 'น'
17: 1, # 'บ'
25: 1, # 'ป'
39: 1, # 'ผ'
62: 0, # 'ฝ'
31: 1, # 'พ'
54: 0, # 'ฟ'
45: 2, # 'ภ'
9: 1, # 'ม'
16: 1, # 'ย'
2: 3, # 'ร'
61: 0, # 'ฤ'
15: 2, # 'ล'
12: 1, # 'ว'
42: 0, # 'ศ'
46: 0, # 'ษ'
18: 3, # 'ส'
21: 0, # 'ห'
4: 3, # 'อ'
63: 1, # 'ฯ'
22: 2, # 'ะ'
10: 3, # 'ั'
1: 3, # 'า'
36: 2, # 'ำ'
23: 3, # 'ิ'
13: 2, # 'ี'
40: 1, # 'ึ'
27: 1, # 'ื'
32: 3, # 'ุ'
35: 2, # 'ู'
11: 1, # 'เ'
28: 1, # 'แ'
41: 1, # 'โ'
29: 1, # 'ใ'
33: 1, # 'ไ'
50: 0, # 'ๆ'
37: 2, # '็'
6: 3, # '่'
7: 3, # '้'
38: 2, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
44: { # 'ถ'
5: 1, # 'ก'
30: 0, # 'ข'
24: 1, # 'ค'
8: 0, # 'ง'
26: 1, # 'จ'
52: 0, # 'ฉ'
34: 0, # 'ช'
51: 0, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 0, # 'ด'
19: 1, # 'ต'
44: 0, # 'ถ'
14: 1, # 'ท'
48: 0, # 'ธ'
3: 1, # 'น'
17: 2, # 'บ'
25: 0, # 'ป'
39: 0, # 'ผ'
62: 0, # 'ฝ'
31: 1, # 'พ'
54: 0, # 'ฟ'
45: 0, # 'ภ'
9: 0, # 'ม'
16: 0, # 'ย'
2: 1, # 'ร'
61: 0, # 'ฤ'
15: 1, # 'ล'
12: 1, # 'ว'
42: 0, # 'ศ'
46: 0, # 'ษ'
18: 1, # 'ส'
21: 0, # 'ห'
4: 1, # 'อ'
63: 0, # 'ฯ'
22: 0, # 'ะ'
10: 2, # 'ั'
1: 3, # 'า'
36: 0, # 'ำ'
23: 2, # 'ิ'
13: 1, # 'ี'
40: 3, # 'ึ'
27: 2, # 'ื'
32: 2, # 'ุ'
35: 3, # 'ู'
11: 1, # 'เ'
28: 1, # 'แ'
41: 0, # 'โ'
29: 1, # 'ใ'
33: 1, # 'ไ'
50: 0, # 'ๆ'
37: 0, # '็'
6: 2, # '่'
7: 3, # '้'
38: 0, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
14: { # 'ท'
5: 1, # 'ก'
30: 1, # 'ข'
24: 3, # 'ค'
8: 1, # 'ง'
26: 1, # 'จ'
52: 0, # 'ฉ'
34: 0, # 'ช'
51: 0, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 2, # 'ด'
19: 1, # 'ต'
44: 0, # 'ถ'
14: 1, # 'ท'
48: 3, # 'ธ'
3: 3, # 'น'
17: 2, # 'บ'
25: 2, # 'ป'
39: 1, # 'ผ'
62: 0, # 'ฝ'
31: 2, # 'พ'
54: 0, # 'ฟ'
45: 0, # 'ภ'
9: 1, # 'ม'
16: 3, # 'ย'
2: 3, # 'ร'
61: 1, # 'ฤ'
15: 1, # 'ล'
12: 2, # 'ว'
42: 3, # 'ศ'
46: 1, # 'ษ'
18: 1, # 'ส'
21: 0, # 'ห'
4: 2, # 'อ'
63: 0, # 'ฯ'
22: 2, # 'ะ'
10: 3, # 'ั'
1: 3, # 'า'
36: 3, # 'ำ'
23: 2, # 'ิ'
13: 3, # 'ี'
40: 2, # 'ึ'
27: 1, # 'ื'
32: 3, # 'ุ'
35: 1, # 'ู'
11: 0, # 'เ'
28: 1, # 'แ'
41: 0, # 'โ'
29: 1, # 'ใ'
33: 0, # 'ไ'
50: 0, # 'ๆ'
37: 1, # '็'
6: 3, # '่'
7: 3, # '้'
38: 2, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
48: { # 'ธ'
5: 0, # 'ก'
30: 0, # 'ข'
24: 0, # 'ค'
8: 1, # 'ง'
26: 0, # 'จ'
52: 0, # 'ฉ'
34: 0, # 'ช'
51: 0, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 0, # 'ด'
19: 0, # 'ต'
44: 0, # 'ถ'
14: 0, # 'ท'
48: 0, # 'ธ'
3: 1, # 'น'
17: 0, # 'บ'
25: 0, # 'ป'
39: 0, # 'ผ'
62: 0, # 'ฝ'
31: 0, # 'พ'
54: 0, # 'ฟ'
45: 0, # 'ภ'
9: 0, # 'ม'
16: 0, # 'ย'
2: 2, # 'ร'
61: 0, # 'ฤ'
15: 0, # 'ล'
12: 0, # 'ว'
42: 0, # 'ศ'
46: 0, # 'ษ'
18: 0, # 'ส'
21: 0, # 'ห'
4: 0, # 'อ'
63: 0, # 'ฯ'
22: 0, # 'ะ'
10: 0, # 'ั'
1: 2, # 'า'
36: 0, # 'ำ'
23: 3, # 'ิ'
13: 3, # 'ี'
40: 0, # 'ึ'
27: 0, # 'ื'
32: 2, # 'ุ'
35: 0, # 'ู'
11: 0, # 'เ'
28: 0, # 'แ'
41: 0, # 'โ'
29: 0, # 'ใ'
33: 0, # 'ไ'
50: 0, # 'ๆ'
37: 0, # '็'
6: 0, # '่'
7: 0, # '้'
38: 3, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
3: { # 'น'
5: 3, # 'ก'
30: 2, # 'ข'
24: 3, # 'ค'
8: 1, # 'ง'
26: 2, # 'จ'
52: 0, # 'ฉ'
34: 1, # 'ช'
51: 1, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 1, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 3, # 'ด'
19: 3, # 'ต'
44: 2, # 'ถ'
14: 3, # 'ท'
48: 3, # 'ธ'
3: 2, # 'น'
17: 2, # 'บ'
25: 2, # 'ป'
39: 2, # 'ผ'
62: 0, # 'ฝ'
31: 2, # 'พ'
54: 1, # 'ฟ'
45: 1, # 'ภ'
9: 2, # 'ม'
16: 2, # 'ย'
2: 2, # 'ร'
61: 1, # 'ฤ'
15: 2, # 'ล'
12: 3, # 'ว'
42: 1, # 'ศ'
46: 0, # 'ษ'
18: 2, # 'ส'
21: 2, # 'ห'
4: 3, # 'อ'
63: 1, # 'ฯ'
22: 2, # 'ะ'
10: 3, # 'ั'
1: 3, # 'า'
36: 3, # 'ำ'
23: 3, # 'ิ'
13: 3, # 'ี'
40: 3, # 'ึ'
27: 3, # 'ื'
32: 3, # 'ุ'
35: 2, # 'ู'
11: 3, # 'เ'
28: 2, # 'แ'
41: 3, # 'โ'
29: 3, # 'ใ'
33: 3, # 'ไ'
50: 2, # 'ๆ'
37: 1, # '็'
6: 3, # '่'
7: 3, # '้'
38: 2, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
17: { # 'บ'
5: 3, # 'ก'
30: 2, # 'ข'
24: 2, # 'ค'
8: 1, # 'ง'
26: 1, # 'จ'
52: 1, # 'ฉ'
34: 1, # 'ช'
51: 1, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 1, # 'ด'
19: 2, # 'ต'
44: 1, # 'ถ'
14: 3, # 'ท'
48: 0, # 'ธ'
3: 3, # 'น'
17: 3, # 'บ'
25: 2, # 'ป'
39: 2, # 'ผ'
62: 0, # 'ฝ'
31: 1, # 'พ'
54: 1, # 'ฟ'
45: 1, # 'ภ'
9: 1, # 'ม'
16: 0, # 'ย'
2: 3, # 'ร'
61: 0, # 'ฤ'
15: 2, # 'ล'
12: 3, # 'ว'
42: 0, # 'ศ'
46: 0, # 'ษ'
18: 2, # 'ส'
21: 2, # 'ห'
4: 2, # 'อ'
63: 1, # 'ฯ'
22: 0, # 'ะ'
10: 3, # 'ั'
1: 3, # 'า'
36: 2, # 'ำ'
23: 2, # 'ิ'
13: 2, # 'ี'
40: 0, # 'ึ'
27: 2, # 'ื'
32: 3, # 'ุ'
35: 2, # 'ู'
11: 2, # 'เ'
28: 2, # 'แ'
41: 1, # 'โ'
29: 2, # 'ใ'
33: 2, # 'ไ'
50: 0, # 'ๆ'
37: 1, # '็'
6: 2, # '่'
7: 2, # '้'
38: 0, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
25: { # 'ป'
5: 2, # 'ก'
30: 0, # 'ข'
24: 1, # 'ค'
8: 0, # 'ง'
26: 1, # 'จ'
52: 0, # 'ฉ'
34: 0, # 'ช'
51: 1, # 'ซ'
47: 0, # 'ญ'
58: 1, # 'ฎ'
57: 3, # 'ฏ'
49: 1, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 1, # 'ด'
19: 1, # 'ต'
44: 1, # 'ถ'
14: 1, # 'ท'
48: 0, # 'ธ'
3: 2, # 'น'
17: 0, # 'บ'
25: 1, # 'ป'
39: 1, # 'ผ'
62: 1, # 'ฝ'
31: 1, # 'พ'
54: 0, # 'ฟ'
45: 0, # 'ภ'
9: 1, # 'ม'
16: 0, # 'ย'
2: 3, # 'ร'
61: 0, # 'ฤ'
15: 3, # 'ล'
12: 1, # 'ว'
42: 0, # 'ศ'
46: 1, # 'ษ'
18: 2, # 'ส'
21: 1, # 'ห'
4: 2, # 'อ'
63: 0, # 'ฯ'
22: 1, # 'ะ'
10: 3, # 'ั'
1: 1, # 'า'
36: 0, # 'ำ'
23: 2, # 'ิ'
13: 3, # 'ี'
40: 0, # 'ึ'
27: 0, # 'ื'
32: 1, # 'ุ'
35: 0, # 'ู'
11: 1, # 'เ'
28: 2, # 'แ'
41: 0, # 'โ'
29: 1, # 'ใ'
33: 2, # 'ไ'
50: 0, # 'ๆ'
37: 3, # '็'
6: 1, # '่'
7: 2, # '้'
38: 1, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
39: { # 'ผ'
5: 1, # 'ก'
30: 0, # 'ข'
24: 0, # 'ค'
8: 1, # 'ง'
26: 0, # 'จ'
52: 0, # 'ฉ'
34: 0, # 'ช'
51: 0, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 0, # 'ด'
19: 0, # 'ต'
44: 0, # 'ถ'
14: 0, # 'ท'
48: 0, # 'ธ'
3: 2, # 'น'
17: 0, # 'บ'
25: 0, # 'ป'
39: 0, # 'ผ'
62: 0, # 'ฝ'
31: 0, # 'พ'
54: 0, # 'ฟ'
45: 0, # 'ภ'
9: 1, # 'ม'
16: 2, # 'ย'
2: 0, # 'ร'
61: 0, # 'ฤ'
15: 3, # 'ล'
12: 0, # 'ว'
42: 0, # 'ศ'
46: 0, # 'ษ'
18: 1, # 'ส'
21: 0, # 'ห'
4: 0, # 'อ'
63: 0, # 'ฯ'
22: 1, # 'ะ'
10: 1, # 'ั'
1: 0, # 'า'
36: 0, # 'ำ'
23: 2, # 'ิ'
13: 0, # 'ี'
40: 0, # 'ึ'
27: 1, # 'ื'
32: 0, # 'ุ'
35: 3, # 'ู'
11: 0, # 'เ'
28: 0, # 'แ'
41: 0, # 'โ'
29: 0, # 'ใ'
33: 0, # 'ไ'
50: 0, # 'ๆ'
37: 0, # '็'
6: 3, # '่'
7: 1, # '้'
38: 0, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
62: { # 'ฝ'
5: 0, # 'ก'
30: 0, # 'ข'
24: 0, # 'ค'
8: 0, # 'ง'
26: 0, # 'จ'
52: 0, # 'ฉ'
34: 0, # 'ช'
51: 0, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 0, # 'ด'
19: 0, # 'ต'
44: 0, # 'ถ'
14: 0, # 'ท'
48: 0, # 'ธ'
3: 1, # 'น'
17: 0, # 'บ'
25: 0, # 'ป'
39: 0, # 'ผ'
62: 0, # 'ฝ'
31: 0, # 'พ'
54: 0, # 'ฟ'
45: 0, # 'ภ'
9: 0, # 'ม'
16: 0, # 'ย'
2: 1, # 'ร'
61: 0, # 'ฤ'
15: 0, # 'ล'
12: 0, # 'ว'
42: 0, # 'ศ'
46: 0, # 'ษ'
18: 0, # 'ส'
21: 0, # 'ห'
4: 0, # 'อ'
63: 0, # 'ฯ'
22: 0, # 'ะ'
10: 1, # 'ั'
1: 0, # 'า'
36: 0, # 'ำ'
23: 0, # 'ิ'
13: 1, # 'ี'
40: 2, # 'ึ'
27: 0, # 'ื'
32: 0, # 'ุ'
35: 0, # 'ู'
11: 0, # 'เ'
28: 0, # 'แ'
41: 0, # 'โ'
29: 0, # 'ใ'
33: 0, # 'ไ'
50: 0, # 'ๆ'
37: 0, # '็'
6: 2, # '่'
7: 1, # '้'
38: 0, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
31: { # 'พ'
5: 1, # 'ก'
30: 1, # 'ข'
24: 1, # 'ค'
8: 1, # 'ง'
26: 1, # 'จ'
52: 0, # 'ฉ'
34: 0, # 'ช'
51: 0, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 1, # 'ณ'
20: 1, # 'ด'
19: 1, # 'ต'
44: 0, # 'ถ'
14: 2, # 'ท'
48: 1, # 'ธ'
3: 3, # 'น'
17: 2, # 'บ'
25: 0, # 'ป'
39: 1, # 'ผ'
62: 0, # 'ฝ'
31: 1, # 'พ'
54: 0, # 'ฟ'
45: 0, # 'ภ'
9: 1, # 'ม'
16: 2, # 'ย'
2: 3, # 'ร'
61: 2, # 'ฤ'
15: 2, # 'ล'
12: 2, # 'ว'
42: 0, # 'ศ'
46: 0, # 'ษ'
18: 1, # 'ส'
21: 1, # 'ห'
4: 2, # 'อ'
63: 1, # 'ฯ'
22: 0, # 'ะ'
10: 3, # 'ั'
1: 3, # 'า'
36: 0, # 'ำ'
23: 3, # 'ิ'
13: 2, # 'ี'
40: 1, # 'ึ'
27: 3, # 'ื'
32: 1, # 'ุ'
35: 2, # 'ู'
11: 1, # 'เ'
28: 1, # 'แ'
41: 0, # 'โ'
29: 1, # 'ใ'
33: 1, # 'ไ'
50: 0, # 'ๆ'
37: 1, # '็'
6: 0, # '่'
7: 1, # '้'
38: 3, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
54: { # 'ฟ'
5: 0, # 'ก'
30: 0, # 'ข'
24: 0, # 'ค'
8: 0, # 'ง'
26: 0, # 'จ'
52: 0, # 'ฉ'
34: 1, # 'ช'
51: 0, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 0, # 'ด'
19: 1, # 'ต'
44: 0, # 'ถ'
14: 1, # 'ท'
48: 0, # 'ธ'
3: 0, # 'น'
17: 0, # 'บ'
25: 0, # 'ป'
39: 0, # 'ผ'
62: 0, # 'ฝ'
31: 0, # 'พ'
54: 2, # 'ฟ'
45: 0, # 'ภ'
9: 0, # 'ม'
16: 0, # 'ย'
2: 1, # 'ร'
61: 0, # 'ฤ'
15: 2, # 'ล'
12: 0, # 'ว'
42: 0, # 'ศ'
46: 0, # 'ษ'
18: 1, # 'ส'
21: 0, # 'ห'
4: 1, # 'อ'
63: 0, # 'ฯ'
22: 0, # 'ะ'
10: 2, # 'ั'
1: 0, # 'า'
36: 0, # 'ำ'
23: 1, # 'ิ'
13: 1, # 'ี'
40: 0, # 'ึ'
27: 1, # 'ื'
32: 1, # 'ุ'
35: 0, # 'ู'
11: 0, # 'เ'
28: 1, # 'แ'
41: 0, # 'โ'
29: 0, # 'ใ'
33: 0, # 'ไ'
50: 0, # 'ๆ'
37: 0, # '็'
6: 0, # '่'
7: 2, # '้'
38: 0, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
45: { # 'ภ'
5: 0, # 'ก'
30: 0, # 'ข'
24: 1, # 'ค'
8: 0, # 'ง'
26: 0, # 'จ'
52: 0, # 'ฉ'
34: 0, # 'ช'
51: 0, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 0, # 'ด'
19: 0, # 'ต'
44: 0, # 'ถ'
14: 3, # 'ท'
48: 0, # 'ธ'
3: 0, # 'น'
17: 0, # 'บ'
25: 0, # 'ป'
39: 0, # 'ผ'
62: 0, # 'ฝ'
31: 1, # 'พ'
54: 0, # 'ฟ'
45: 0, # 'ภ'
9: 0, # 'ม'
16: 0, # 'ย'
2: 1, # 'ร'
61: 0, # 'ฤ'
15: 0, # 'ล'
12: 0, # 'ว'
42: 0, # 'ศ'
46: 0, # 'ษ'
18: 0, # 'ส'
21: 0, # 'ห'
4: 0, # 'อ'
63: 0, # 'ฯ'
22: 0, # 'ะ'
10: 3, # 'ั'
1: 3, # 'า'
36: 0, # 'ำ'
23: 1, # 'ิ'
13: 0, # 'ี'
40: 0, # 'ึ'
27: 0, # 'ื'
32: 0, # 'ุ'
35: 2, # 'ู'
11: 0, # 'เ'
28: 0, # 'แ'
41: 0, # 'โ'
29: 0, # 'ใ'
33: 0, # 'ไ'
50: 0, # 'ๆ'
37: 0, # '็'
6: 0, # '่'
7: 0, # '้'
38: 1, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
9: { # 'ม'
5: 2, # 'ก'
30: 2, # 'ข'
24: 2, # 'ค'
8: 2, # 'ง'
26: 2, # 'จ'
52: 0, # 'ฉ'
34: 1, # 'ช'
51: 1, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 1, # 'ณ'
20: 2, # 'ด'
19: 2, # 'ต'
44: 1, # 'ถ'
14: 2, # 'ท'
48: 1, # 'ธ'
3: 3, # 'น'
17: 2, # 'บ'
25: 2, # 'ป'
39: 1, # 'ผ'
62: 0, # 'ฝ'
31: 3, # 'พ'
54: 0, # 'ฟ'
45: 1, # 'ภ'
9: 2, # 'ม'
16: 1, # 'ย'
2: 2, # 'ร'
61: 2, # 'ฤ'
15: 2, # 'ล'
12: 2, # 'ว'
42: 1, # 'ศ'
46: 1, # 'ษ'
18: 3, # 'ส'
21: 3, # 'ห'
4: 3, # 'อ'
63: 0, # 'ฯ'
22: 1, # 'ะ'
10: 3, # 'ั'
1: 3, # 'า'
36: 0, # 'ำ'
23: 3, # 'ิ'
13: 3, # 'ี'
40: 0, # 'ึ'
27: 3, # 'ื'
32: 3, # 'ุ'
35: 3, # 'ู'
11: 2, # 'เ'
28: 2, # 'แ'
41: 2, # 'โ'
29: 2, # 'ใ'
33: 2, # 'ไ'
50: 1, # 'ๆ'
37: 1, # '็'
6: 3, # '่'
7: 2, # '้'
38: 1, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
16: { # 'ย'
5: 3, # 'ก'
30: 1, # 'ข'
24: 2, # 'ค'
8: 3, # 'ง'
26: 2, # 'จ'
52: 0, # 'ฉ'
34: 2, # 'ช'
51: 0, # 'ซ'
47: 2, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 2, # 'ด'
19: 2, # 'ต'
44: 1, # 'ถ'
14: 2, # 'ท'
48: 1, # 'ธ'
3: 3, # 'น'
17: 3, # 'บ'
25: 1, # 'ป'
39: 1, # 'ผ'
62: 0, # 'ฝ'
31: 1, # 'พ'
54: 0, # 'ฟ'
45: 1, # 'ภ'
9: 2, # 'ม'
16: 0, # 'ย'
2: 2, # 'ร'
61: 0, # 'ฤ'
15: 1, # 'ล'
12: 3, # 'ว'
42: 1, # 'ศ'
46: 0, # 'ษ'
18: 2, # 'ส'
21: 1, # 'ห'
4: 2, # 'อ'
63: 0, # 'ฯ'
22: 2, # 'ะ'
10: 3, # 'ั'
1: 3, # 'า'
36: 0, # 'ำ'
23: 2, # 'ิ'
13: 3, # 'ี'
40: 1, # 'ึ'
27: 2, # 'ื'
32: 2, # 'ุ'
35: 3, # 'ู'
11: 2, # 'เ'
28: 1, # 'แ'
41: 1, # 'โ'
29: 2, # 'ใ'
33: 2, # 'ไ'
50: 2, # 'ๆ'
37: 1, # '็'
6: 3, # '่'
7: 2, # '้'
38: 3, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
2: { # 'ร'
5: 3, # 'ก'
30: 2, # 'ข'
24: 2, # 'ค'
8: 3, # 'ง'
26: 2, # 'จ'
52: 0, # 'ฉ'
34: 2, # 'ช'
51: 1, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 3, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 3, # 'ณ'
20: 2, # 'ด'
19: 2, # 'ต'
44: 3, # 'ถ'
14: 3, # 'ท'
48: 1, # 'ธ'
3: 2, # 'น'
17: 2, # 'บ'
25: 3, # 'ป'
39: 2, # 'ผ'
62: 1, # 'ฝ'
31: 2, # 'พ'
54: 1, # 'ฟ'
45: 1, # 'ภ'
9: 3, # 'ม'
16: 2, # 'ย'
2: 3, # 'ร'
61: 0, # 'ฤ'
15: 2, # 'ล'
12: 3, # 'ว'
42: 2, # 'ศ'
46: 2, # 'ษ'
18: 2, # 'ส'
21: 2, # 'ห'
4: 3, # 'อ'
63: 1, # 'ฯ'
22: 3, # 'ะ'
10: 3, # 'ั'
1: 3, # 'า'
36: 0, # 'ำ'
23: 3, # 'ิ'
13: 3, # 'ี'
40: 2, # 'ึ'
27: 3, # 'ื'
32: 3, # 'ุ'
35: 3, # 'ู'
11: 3, # 'เ'
28: 3, # 'แ'
41: 1, # 'โ'
29: 2, # 'ใ'
33: 1, # 'ไ'
50: 0, # 'ๆ'
37: 3, # '็'
6: 3, # '่'
7: 3, # '้'
38: 3, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
61: { # 'ฤ'
5: 0, # 'ก'
30: 0, # 'ข'
24: 0, # 'ค'
8: 0, # 'ง'
26: 0, # 'จ'
52: 0, # 'ฉ'
34: 0, # 'ช'
51: 0, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 0, # 'ด'
19: 2, # 'ต'
44: 0, # 'ถ'
14: 2, # 'ท'
48: 0, # 'ธ'
3: 0, # 'น'
17: 0, # 'บ'
25: 0, # 'ป'
39: 0, # 'ผ'
62: 0, # 'ฝ'
31: 0, # 'พ'
54: 0, # 'ฟ'
45: 0, # 'ภ'
9: 1, # 'ม'
16: 0, # 'ย'
2: 0, # 'ร'
61: 0, # 'ฤ'
15: 0, # 'ล'
12: 0, # 'ว'
42: 0, # 'ศ'
46: 2, # 'ษ'
18: 0, # 'ส'
21: 0, # 'ห'
4: 0, # 'อ'
63: 0, # 'ฯ'
22: 0, # 'ะ'
10: 0, # 'ั'
1: 0, # 'า'
36: 0, # 'ำ'
23: 0, # 'ิ'
13: 0, # 'ี'
40: 0, # 'ึ'
27: 0, # 'ื'
32: 0, # 'ุ'
35: 0, # 'ู'
11: 0, # 'เ'
28: 0, # 'แ'
41: 0, # 'โ'
29: 0, # 'ใ'
33: 0, # 'ไ'
50: 0, # 'ๆ'
37: 0, # '็'
6: 0, # '่'
7: 0, # '้'
38: 0, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
15: { # 'ล'
5: 2, # 'ก'
30: 3, # 'ข'
24: 1, # 'ค'
8: 3, # 'ง'
26: 1, # 'จ'
52: 0, # 'ฉ'
34: 1, # 'ช'
51: 0, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 2, # 'ด'
19: 2, # 'ต'
44: 1, # 'ถ'
14: 2, # 'ท'
48: 0, # 'ธ'
3: 1, # 'น'
17: 2, # 'บ'
25: 2, # 'ป'
39: 1, # 'ผ'
62: 0, # 'ฝ'
31: 0, # 'พ'
54: 0, # 'ฟ'
45: 1, # 'ภ'
9: 1, # 'ม'
16: 3, # 'ย'
2: 1, # 'ร'
61: 0, # 'ฤ'
15: 1, # 'ล'
12: 1, # 'ว'
42: 0, # 'ศ'
46: 0, # 'ษ'
18: 2, # 'ส'
21: 1, # 'ห'
4: 3, # 'อ'
63: 2, # 'ฯ'
22: 3, # 'ะ'
10: 3, # 'ั'
1: 3, # 'า'
36: 2, # 'ำ'
23: 3, # 'ิ'
13: 3, # 'ี'
40: 2, # 'ึ'
27: 3, # 'ื'
32: 2, # 'ุ'
35: 3, # 'ู'
11: 2, # 'เ'
28: 1, # 'แ'
41: 1, # 'โ'
29: 2, # 'ใ'
33: 1, # 'ไ'
50: 0, # 'ๆ'
37: 2, # '็'
6: 3, # '่'
7: 3, # '้'
38: 2, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
12: { # 'ว'
5: 3, # 'ก'
30: 2, # 'ข'
24: 1, # 'ค'
8: 3, # 'ง'
26: 2, # 'จ'
52: 0, # 'ฉ'
34: 1, # 'ช'
51: 1, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 1, # 'ณ'
20: 2, # 'ด'
19: 1, # 'ต'
44: 1, # 'ถ'
14: 1, # 'ท'
48: 0, # 'ธ'
3: 3, # 'น'
17: 2, # 'บ'
25: 1, # 'ป'
39: 1, # 'ผ'
62: 0, # 'ฝ'
31: 1, # 'พ'
54: 1, # 'ฟ'
45: 0, # 'ภ'
9: 3, # 'ม'
16: 3, # 'ย'
2: 3, # 'ร'
61: 0, # 'ฤ'
15: 3, # 'ล'
12: 1, # 'ว'
42: 0, # 'ศ'
46: 0, # 'ษ'
18: 2, # 'ส'
21: 2, # 'ห'
4: 2, # 'อ'
63: 0, # 'ฯ'
22: 2, # 'ะ'
10: 3, # 'ั'
1: 3, # 'า'
36: 0, # 'ำ'
23: 3, # 'ิ'
13: 2, # 'ี'
40: 0, # 'ึ'
27: 0, # 'ื'
32: 2, # 'ุ'
35: 0, # 'ู'
11: 3, # 'เ'
28: 2, # 'แ'
41: 1, # 'โ'
29: 1, # 'ใ'
33: 2, # 'ไ'
50: 1, # 'ๆ'
37: 0, # '็'
6: 3, # '่'
7: 3, # '้'
38: 1, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
42: { # 'ศ'
5: 1, # 'ก'
30: 0, # 'ข'
24: 1, # 'ค'
8: 0, # 'ง'
26: 1, # 'จ'
52: 0, # 'ฉ'
34: 0, # 'ช'
51: 0, # 'ซ'
47: 1, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 0, # 'ด'
19: 1, # 'ต'
44: 0, # 'ถ'
14: 1, # 'ท'
48: 0, # 'ธ'
3: 2, # 'น'
17: 0, # 'บ'
25: 0, # 'ป'
39: 0, # 'ผ'
62: 0, # 'ฝ'
31: 0, # 'พ'
54: 0, # 'ฟ'
45: 0, # 'ภ'
9: 0, # 'ม'
16: 0, # 'ย'
2: 2, # 'ร'
61: 0, # 'ฤ'
15: 0, # 'ล'
12: 2, # 'ว'
42: 1, # 'ศ'
46: 2, # 'ษ'
18: 1, # 'ส'
21: 0, # 'ห'
4: 0, # 'อ'
63: 0, # 'ฯ'
22: 0, # 'ะ'
10: 2, # 'ั'
1: 3, # 'า'
36: 0, # 'ำ'
23: 2, # 'ิ'
13: 0, # 'ี'
40: 3, # 'ึ'
27: 0, # 'ื'
32: 0, # 'ุ'
35: 2, # 'ู'
11: 0, # 'เ'
28: 1, # 'แ'
41: 0, # 'โ'
29: 1, # 'ใ'
33: 1, # 'ไ'
50: 0, # 'ๆ'
37: 0, # '็'
6: 0, # '่'
7: 0, # '้'
38: 1, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
46: { # 'ษ'
5: 0, # 'ก'
30: 0, # 'ข'
24: 0, # 'ค'
8: 0, # 'ง'
26: 0, # 'จ'
52: 0, # 'ฉ'
34: 0, # 'ช'
51: 0, # 'ซ'
47: 0, # 'ญ'
58: 2, # 'ฎ'
57: 1, # 'ฏ'
49: 2, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 3, # 'ณ'
20: 0, # 'ด'
19: 1, # 'ต'
44: 0, # 'ถ'
14: 1, # 'ท'
48: 0, # 'ธ'
3: 0, # 'น'
17: 0, # 'บ'
25: 0, # 'ป'
39: 0, # 'ผ'
62: 0, # 'ฝ'
31: 0, # 'พ'
54: 0, # 'ฟ'
45: 1, # 'ภ'
9: 1, # 'ม'
16: 2, # 'ย'
2: 2, # 'ร'
61: 0, # 'ฤ'
15: 0, # 'ล'
12: 0, # 'ว'
42: 1, # 'ศ'
46: 0, # 'ษ'
18: 0, # 'ส'
21: 0, # 'ห'
4: 0, # 'อ'
63: 0, # 'ฯ'
22: 2, # 'ะ'
10: 2, # 'ั'
1: 3, # 'า'
36: 0, # 'ำ'
23: 0, # 'ิ'
13: 1, # 'ี'
40: 0, # 'ึ'
27: 0, # 'ื'
32: 0, # 'ุ'
35: 0, # 'ู'
11: 1, # 'เ'
28: 0, # 'แ'
41: 0, # 'โ'
29: 0, # 'ใ'
33: 0, # 'ไ'
50: 0, # 'ๆ'
37: 0, # '็'
6: 0, # '่'
7: 0, # '้'
38: 2, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
18: { # 'ส'
5: 2, # 'ก'
30: 0, # 'ข'
24: 0, # 'ค'
8: 2, # 'ง'
26: 1, # 'จ'
52: 0, # 'ฉ'
34: 0, # 'ช'
51: 0, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 3, # 'ด'
19: 3, # 'ต'
44: 3, # 'ถ'
14: 0, # 'ท'
48: 0, # 'ธ'
3: 3, # 'น'
17: 2, # 'บ'
25: 1, # 'ป'
39: 0, # 'ผ'
62: 0, # 'ฝ'
31: 0, # 'พ'
54: 0, # 'ฟ'
45: 2, # 'ภ'
9: 3, # 'ม'
16: 1, # 'ย'
2: 3, # 'ร'
61: 0, # 'ฤ'
15: 1, # 'ล'
12: 2, # 'ว'
42: 0, # 'ศ'
46: 0, # 'ษ'
18: 0, # 'ส'
21: 2, # 'ห'
4: 3, # 'อ'
63: 0, # 'ฯ'
22: 2, # 'ะ'
10: 3, # 'ั'
1: 3, # 'า'
36: 3, # 'ำ'
23: 3, # 'ิ'
13: 3, # 'ี'
40: 2, # 'ึ'
27: 3, # 'ื'
32: 3, # 'ุ'
35: 3, # 'ู'
11: 2, # 'เ'
28: 0, # 'แ'
41: 1, # 'โ'
29: 0, # 'ใ'
33: 1, # 'ไ'
50: 0, # 'ๆ'
37: 0, # '็'
6: 3, # '่'
7: 1, # '้'
38: 2, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
21: { # 'ห'
5: 3, # 'ก'
30: 0, # 'ข'
24: 0, # 'ค'
8: 1, # 'ง'
26: 0, # 'จ'
52: 0, # 'ฉ'
34: 0, # 'ช'
51: 0, # 'ซ'
47: 2, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 1, # 'ด'
19: 3, # 'ต'
44: 0, # 'ถ'
14: 0, # 'ท'
48: 0, # 'ธ'
3: 3, # 'น'
17: 0, # 'บ'
25: 1, # 'ป'
39: 0, # 'ผ'
62: 0, # 'ฝ'
31: 1, # 'พ'
54: 0, # 'ฟ'
45: 0, # 'ภ'
9: 3, # 'ม'
16: 2, # 'ย'
2: 3, # 'ร'
61: 0, # 'ฤ'
15: 3, # 'ล'
12: 2, # 'ว'
42: 0, # 'ศ'
46: 0, # 'ษ'
18: 0, # 'ส'
21: 0, # 'ห'
4: 3, # 'อ'
63: 0, # 'ฯ'
22: 1, # 'ะ'
10: 3, # 'ั'
1: 3, # 'า'
36: 0, # 'ำ'
23: 1, # 'ิ'
13: 1, # 'ี'
40: 0, # 'ึ'
27: 0, # 'ื'
32: 1, # 'ุ'
35: 1, # 'ู'
11: 0, # 'เ'
28: 0, # 'แ'
41: 0, # 'โ'
29: 0, # 'ใ'
33: 0, # 'ไ'
50: 0, # 'ๆ'
37: 3, # '็'
6: 3, # '่'
7: 3, # '้'
38: 2, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
4: { # 'อ'
5: 3, # 'ก'
30: 1, # 'ข'
24: 2, # 'ค'
8: 3, # 'ง'
26: 1, # 'จ'
52: 0, # 'ฉ'
34: 1, # 'ช'
51: 0, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 3, # 'ด'
19: 2, # 'ต'
44: 1, # 'ถ'
14: 2, # 'ท'
48: 1, # 'ธ'
3: 3, # 'น'
17: 3, # 'บ'
25: 1, # 'ป'
39: 1, # 'ผ'
62: 0, # 'ฝ'
31: 1, # 'พ'
54: 1, # 'ฟ'
45: 1, # 'ภ'
9: 3, # 'ม'
16: 3, # 'ย'
2: 3, # 'ร'
61: 0, # 'ฤ'
15: 2, # 'ล'
12: 2, # 'ว'
42: 1, # 'ศ'
46: 0, # 'ษ'
18: 2, # 'ส'
21: 2, # 'ห'
4: 3, # 'อ'
63: 0, # 'ฯ'
22: 2, # 'ะ'
10: 3, # 'ั'
1: 3, # 'า'
36: 2, # 'ำ'
23: 2, # 'ิ'
13: 3, # 'ี'
40: 0, # 'ึ'
27: 3, # 'ื'
32: 3, # 'ุ'
35: 0, # 'ู'
11: 3, # 'เ'
28: 1, # 'แ'
41: 1, # 'โ'
29: 2, # 'ใ'
33: 2, # 'ไ'
50: 1, # 'ๆ'
37: 1, # '็'
6: 2, # '่'
7: 2, # '้'
38: 0, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
63: { # 'ฯ'
5: 0, # 'ก'
30: 0, # 'ข'
24: 0, # 'ค'
8: 0, # 'ง'
26: 0, # 'จ'
52: 0, # 'ฉ'
34: 0, # 'ช'
51: 0, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 0, # 'ด'
19: 0, # 'ต'
44: 0, # 'ถ'
14: 0, # 'ท'
48: 0, # 'ธ'
3: 0, # 'น'
17: 0, # 'บ'
25: 0, # 'ป'
39: 0, # 'ผ'
62: 0, # 'ฝ'
31: 0, # 'พ'
54: 0, # 'ฟ'
45: 0, # 'ภ'
9: 0, # 'ม'
16: 0, # 'ย'
2: 0, # 'ร'
61: 0, # 'ฤ'
15: 2, # 'ล'
12: 0, # 'ว'
42: 0, # 'ศ'
46: 0, # 'ษ'
18: 0, # 'ส'
21: 0, # 'ห'
4: 0, # 'อ'
63: 0, # 'ฯ'
22: 0, # 'ะ'
10: 0, # 'ั'
1: 0, # 'า'
36: 0, # 'ำ'
23: 0, # 'ิ'
13: 0, # 'ี'
40: 0, # 'ึ'
27: 0, # 'ื'
32: 0, # 'ุ'
35: 0, # 'ู'
11: 0, # 'เ'
28: 0, # 'แ'
41: 0, # 'โ'
29: 0, # 'ใ'
33: 0, # 'ไ'
50: 0, # 'ๆ'
37: 0, # '็'
6: 0, # '่'
7: 0, # '้'
38: 0, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
22: { # 'ะ'
5: 3, # 'ก'
30: 1, # 'ข'
24: 2, # 'ค'
8: 1, # 'ง'
26: 2, # 'จ'
52: 0, # 'ฉ'
34: 3, # 'ช'
51: 0, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 3, # 'ด'
19: 3, # 'ต'
44: 1, # 'ถ'
14: 3, # 'ท'
48: 1, # 'ธ'
3: 2, # 'น'
17: 3, # 'บ'
25: 2, # 'ป'
39: 1, # 'ผ'
62: 0, # 'ฝ'
31: 2, # 'พ'
54: 0, # 'ฟ'
45: 1, # 'ภ'
9: 3, # 'ม'
16: 2, # 'ย'
2: 2, # 'ร'
61: 0, # 'ฤ'
15: 2, # 'ล'
12: 2, # 'ว'
42: 0, # 'ศ'
46: 0, # 'ษ'
18: 3, # 'ส'
21: 3, # 'ห'
4: 2, # 'อ'
63: 1, # 'ฯ'
22: 1, # 'ะ'
10: 0, # 'ั'
1: 0, # 'า'
36: 0, # 'ำ'
23: 0, # 'ิ'
13: 0, # 'ี'
40: 0, # 'ึ'
27: 0, # 'ื'
32: 0, # 'ุ'
35: 0, # 'ู'
11: 3, # 'เ'
28: 2, # 'แ'
41: 1, # 'โ'
29: 2, # 'ใ'
33: 2, # 'ไ'
50: 0, # 'ๆ'
37: 0, # '็'
6: 0, # '่'
7: 0, # '้'
38: 0, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
10: { # 'ั'
5: 3, # 'ก'
30: 0, # 'ข'
24: 1, # 'ค'
8: 3, # 'ง'
26: 3, # 'จ'
52: 0, # 'ฉ'
34: 1, # 'ช'
51: 0, # 'ซ'
47: 3, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 2, # 'ฐ'
53: 0, # 'ฑ'
55: 3, # 'ฒ'
43: 3, # 'ณ'
20: 3, # 'ด'
19: 3, # 'ต'
44: 0, # 'ถ'
14: 2, # 'ท'
48: 0, # 'ธ'
3: 3, # 'น'
17: 3, # 'บ'
25: 1, # 'ป'
39: 0, # 'ผ'
62: 0, # 'ฝ'
31: 2, # 'พ'
54: 0, # 'ฟ'
45: 0, # 'ภ'
9: 3, # 'ม'
16: 3, # 'ย'
2: 0, # 'ร'
61: 0, # 'ฤ'
15: 2, # 'ล'
12: 3, # 'ว'
42: 2, # 'ศ'
46: 0, # 'ษ'
18: 3, # 'ส'
21: 0, # 'ห'
4: 0, # 'อ'
63: 0, # 'ฯ'
22: 0, # 'ะ'
10: 0, # 'ั'
1: 0, # 'า'
36: 0, # 'ำ'
23: 0, # 'ิ'
13: 0, # 'ี'
40: 0, # 'ึ'
27: 0, # 'ื'
32: 0, # 'ุ'
35: 0, # 'ู'
11: 0, # 'เ'
28: 0, # 'แ'
41: 0, # 'โ'
29: 0, # 'ใ'
33: 0, # 'ไ'
50: 0, # 'ๆ'
37: 0, # '็'
6: 3, # '่'
7: 3, # '้'
38: 0, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
1: { # 'า'
5: 3, # 'ก'
30: 2, # 'ข'
24: 3, # 'ค'
8: 3, # 'ง'
26: 3, # 'จ'
52: 0, # 'ฉ'
34: 3, # 'ช'
51: 1, # 'ซ'
47: 2, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 3, # 'ณ'
20: 3, # 'ด'
19: 3, # 'ต'
44: 1, # 'ถ'
14: 3, # 'ท'
48: 2, # 'ธ'
3: 3, # 'น'
17: 3, # 'บ'
25: 2, # 'ป'
39: 1, # 'ผ'
62: 1, # 'ฝ'
31: 3, # 'พ'
54: 1, # 'ฟ'
45: 1, # 'ภ'
9: 3, # 'ม'
16: 3, # 'ย'
2: 3, # 'ร'
61: 0, # 'ฤ'
15: 3, # 'ล'
12: 3, # 'ว'
42: 2, # 'ศ'
46: 3, # 'ษ'
18: 3, # 'ส'
21: 3, # 'ห'
4: 2, # 'อ'
63: 1, # 'ฯ'
22: 3, # 'ะ'
10: 0, # 'ั'
1: 0, # 'า'
36: 0, # 'ำ'
23: 0, # 'ิ'
13: 0, # 'ี'
40: 0, # 'ึ'
27: 0, # 'ื'
32: 0, # 'ุ'
35: 0, # 'ู'
11: 3, # 'เ'
28: 2, # 'แ'
41: 1, # 'โ'
29: 2, # 'ใ'
33: 2, # 'ไ'
50: 1, # 'ๆ'
37: 0, # '็'
6: 0, # '่'
7: 0, # '้'
38: 0, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
36: { # 'ำ'
5: 2, # 'ก'
30: 1, # 'ข'
24: 3, # 'ค'
8: 2, # 'ง'
26: 1, # 'จ'
52: 0, # 'ฉ'
34: 0, # 'ช'
51: 0, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 1, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 1, # 'ด'
19: 1, # 'ต'
44: 1, # 'ถ'
14: 1, # 'ท'
48: 0, # 'ธ'
3: 3, # 'น'
17: 1, # 'บ'
25: 1, # 'ป'
39: 1, # 'ผ'
62: 0, # 'ฝ'
31: 1, # 'พ'
54: 0, # 'ฟ'
45: 1, # 'ภ'
9: 1, # 'ม'
16: 0, # 'ย'
2: 2, # 'ร'
61: 0, # 'ฤ'
15: 2, # 'ล'
12: 1, # 'ว'
42: 0, # 'ศ'
46: 0, # 'ษ'
18: 1, # 'ส'
21: 3, # 'ห'
4: 1, # 'อ'
63: 0, # 'ฯ'
22: 0, # 'ะ'
10: 0, # 'ั'
1: 0, # 'า'
36: 0, # 'ำ'
23: 0, # 'ิ'
13: 0, # 'ี'
40: 0, # 'ึ'
27: 0, # 'ื'
32: 0, # 'ุ'
35: 0, # 'ู'
11: 3, # 'เ'
28: 2, # 'แ'
41: 1, # 'โ'
29: 2, # 'ใ'
33: 2, # 'ไ'
50: 0, # 'ๆ'
37: 0, # '็'
6: 0, # '่'
7: 0, # '้'
38: 0, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
23: { # 'ิ'
5: 3, # 'ก'
30: 1, # 'ข'
24: 2, # 'ค'
8: 3, # 'ง'
26: 3, # 'จ'
52: 0, # 'ฉ'
34: 3, # 'ช'
51: 0, # 'ซ'
47: 2, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 3, # 'ด'
19: 3, # 'ต'
44: 1, # 'ถ'
14: 3, # 'ท'
48: 3, # 'ธ'
3: 3, # 'น'
17: 3, # 'บ'
25: 2, # 'ป'
39: 2, # 'ผ'
62: 0, # 'ฝ'
31: 3, # 'พ'
54: 1, # 'ฟ'
45: 2, # 'ภ'
9: 3, # 'ม'
16: 2, # 'ย'
2: 2, # 'ร'
61: 0, # 'ฤ'
15: 2, # 'ล'
12: 3, # 'ว'
42: 3, # 'ศ'
46: 2, # 'ษ'
18: 2, # 'ส'
21: 3, # 'ห'
4: 1, # 'อ'
63: 1, # 'ฯ'
22: 0, # 'ะ'
10: 0, # 'ั'
1: 0, # 'า'
36: 0, # 'ำ'
23: 0, # 'ิ'
13: 0, # 'ี'
40: 0, # 'ึ'
27: 0, # 'ื'
32: 0, # 'ุ'
35: 0, # 'ู'
11: 3, # 'เ'
28: 1, # 'แ'
41: 1, # 'โ'
29: 1, # 'ใ'
33: 0, # 'ไ'
50: 0, # 'ๆ'
37: 0, # '็'
6: 3, # '่'
7: 2, # '้'
38: 2, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
13: { # 'ี'
5: 3, # 'ก'
30: 2, # 'ข'
24: 2, # 'ค'
8: 0, # 'ง'
26: 1, # 'จ'
52: 0, # 'ฉ'
34: 1, # 'ช'
51: 0, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 2, # 'ด'
19: 1, # 'ต'
44: 0, # 'ถ'
14: 2, # 'ท'
48: 0, # 'ธ'
3: 1, # 'น'
17: 2, # 'บ'
25: 2, # 'ป'
39: 1, # 'ผ'
62: 0, # 'ฝ'
31: 2, # 'พ'
54: 0, # 'ฟ'
45: 0, # 'ภ'
9: 2, # 'ม'
16: 3, # 'ย'
2: 2, # 'ร'
61: 0, # 'ฤ'
15: 1, # 'ล'
12: 2, # 'ว'
42: 1, # 'ศ'
46: 0, # 'ษ'
18: 2, # 'ส'
21: 1, # 'ห'
4: 2, # 'อ'
63: 0, # 'ฯ'
22: 0, # 'ะ'
10: 0, # 'ั'
1: 0, # 'า'
36: 0, # 'ำ'
23: 0, # 'ิ'
13: 0, # 'ี'
40: 0, # 'ึ'
27: 0, # 'ื'
32: 0, # 'ุ'
35: 0, # 'ู'
11: 2, # 'เ'
28: 2, # 'แ'
41: 1, # 'โ'
29: 1, # 'ใ'
33: 1, # 'ไ'
50: 1, # 'ๆ'
37: 0, # '็'
6: 3, # '่'
7: 3, # '้'
38: 0, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
40: { # 'ึ'
5: 3, # 'ก'
30: 0, # 'ข'
24: 0, # 'ค'
8: 3, # 'ง'
26: 0, # 'จ'
52: 0, # 'ฉ'
34: 0, # 'ช'
51: 0, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 1, # 'ด'
19: 0, # 'ต'
44: 0, # 'ถ'
14: 0, # 'ท'
48: 0, # 'ธ'
3: 0, # 'น'
17: 0, # 'บ'
25: 0, # 'ป'
39: 0, # 'ผ'
62: 0, # 'ฝ'
31: 0, # 'พ'
54: 0, # 'ฟ'
45: 0, # 'ภ'
9: 1, # 'ม'
16: 0, # 'ย'
2: 0, # 'ร'
61: 0, # 'ฤ'
15: 0, # 'ล'
12: 0, # 'ว'
42: 0, # 'ศ'
46: 0, # 'ษ'
18: 0, # 'ส'
21: 0, # 'ห'
4: 0, # 'อ'
63: 0, # 'ฯ'
22: 0, # 'ะ'
10: 0, # 'ั'
1: 0, # 'า'
36: 0, # 'ำ'
23: 0, # 'ิ'
13: 0, # 'ี'
40: 0, # 'ึ'
27: 0, # 'ื'
32: 0, # 'ุ'
35: 0, # 'ู'
11: 0, # 'เ'
28: 0, # 'แ'
41: 0, # 'โ'
29: 0, # 'ใ'
33: 0, # 'ไ'
50: 0, # 'ๆ'
37: 0, # '็'
6: 3, # '่'
7: 3, # '้'
38: 0, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
27: { # 'ื'
5: 0, # 'ก'
30: 0, # 'ข'
24: 0, # 'ค'
8: 0, # 'ง'
26: 0, # 'จ'
52: 0, # 'ฉ'
34: 1, # 'ช'
51: 0, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 1, # 'ด'
19: 0, # 'ต'
44: 0, # 'ถ'
14: 0, # 'ท'
48: 0, # 'ธ'
3: 2, # 'น'
17: 3, # 'บ'
25: 0, # 'ป'
39: 0, # 'ผ'
62: 0, # 'ฝ'
31: 0, # 'พ'
54: 0, # 'ฟ'
45: 0, # 'ภ'
9: 2, # 'ม'
16: 0, # 'ย'
2: 0, # 'ร'
61: 0, # 'ฤ'
15: 0, # 'ล'
12: 0, # 'ว'
42: 0, # 'ศ'
46: 0, # 'ษ'
18: 0, # 'ส'
21: 0, # 'ห'
4: 3, # 'อ'
63: 0, # 'ฯ'
22: 0, # 'ะ'
10: 0, # 'ั'
1: 0, # 'า'
36: 0, # 'ำ'
23: 0, # 'ิ'
13: 0, # 'ี'
40: 0, # 'ึ'
27: 0, # 'ื'
32: 0, # 'ุ'
35: 0, # 'ู'
11: 0, # 'เ'
28: 0, # 'แ'
41: 0, # 'โ'
29: 0, # 'ใ'
33: 0, # 'ไ'
50: 0, # 'ๆ'
37: 0, # '็'
6: 3, # '่'
7: 3, # '้'
38: 0, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
32: { # 'ุ'
5: 3, # 'ก'
30: 2, # 'ข'
24: 3, # 'ค'
8: 3, # 'ง'
26: 0, # 'จ'
52: 0, # 'ฉ'
34: 0, # 'ช'
51: 0, # 'ซ'
47: 2, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 1, # 'ฒ'
43: 3, # 'ณ'
20: 3, # 'ด'
19: 3, # 'ต'
44: 1, # 'ถ'
14: 2, # 'ท'
48: 1, # 'ธ'
3: 2, # 'น'
17: 2, # 'บ'
25: 2, # 'ป'
39: 2, # 'ผ'
62: 0, # 'ฝ'
31: 1, # 'พ'
54: 0, # 'ฟ'
45: 1, # 'ภ'
9: 3, # 'ม'
16: 1, # 'ย'
2: 2, # 'ร'
61: 0, # 'ฤ'
15: 2, # 'ล'
12: 1, # 'ว'
42: 1, # 'ศ'
46: 2, # 'ษ'
18: 1, # 'ส'
21: 1, # 'ห'
4: 1, # 'อ'
63: 0, # 'ฯ'
22: 0, # 'ะ'
10: 0, # 'ั'
1: 0, # 'า'
36: 0, # 'ำ'
23: 0, # 'ิ'
13: 0, # 'ี'
40: 0, # 'ึ'
27: 0, # 'ื'
32: 0, # 'ุ'
35: 0, # 'ู'
11: 1, # 'เ'
28: 0, # 'แ'
41: 1, # 'โ'
29: 0, # 'ใ'
33: 1, # 'ไ'
50: 0, # 'ๆ'
37: 0, # '็'
6: 3, # '่'
7: 2, # '้'
38: 1, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
35: { # 'ู'
5: 3, # 'ก'
30: 0, # 'ข'
24: 0, # 'ค'
8: 2, # 'ง'
26: 1, # 'จ'
52: 0, # 'ฉ'
34: 0, # 'ช'
51: 0, # 'ซ'
47: 2, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 1, # 'ณ'
20: 2, # 'ด'
19: 2, # 'ต'
44: 0, # 'ถ'
14: 1, # 'ท'
48: 0, # 'ธ'
3: 2, # 'น'
17: 0, # 'บ'
25: 3, # 'ป'
39: 0, # 'ผ'
62: 0, # 'ฝ'
31: 0, # 'พ'
54: 0, # 'ฟ'
45: 0, # 'ภ'
9: 2, # 'ม'
16: 0, # 'ย'
2: 1, # 'ร'
61: 0, # 'ฤ'
15: 3, # 'ล'
12: 1, # 'ว'
42: 0, # 'ศ'
46: 0, # 'ษ'
18: 0, # 'ส'
21: 0, # 'ห'
4: 0, # 'อ'
63: 0, # 'ฯ'
22: 0, # 'ะ'
10: 0, # 'ั'
1: 0, # 'า'
36: 0, # 'ำ'
23: 0, # 'ิ'
13: 0, # 'ี'
40: 0, # 'ึ'
27: 0, # 'ื'
32: 0, # 'ุ'
35: 0, # 'ู'
11: 1, # 'เ'
28: 1, # 'แ'
41: 1, # 'โ'
29: 0, # 'ใ'
33: 0, # 'ไ'
50: 0, # 'ๆ'
37: 0, # '็'
6: 3, # '่'
7: 3, # '้'
38: 0, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
11: { # 'เ'
5: 3, # 'ก'
30: 3, # 'ข'
24: 3, # 'ค'
8: 2, # 'ง'
26: 3, # 'จ'
52: 3, # 'ฉ'
34: 3, # 'ช'
51: 2, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 1, # 'ณ'
20: 3, # 'ด'
19: 3, # 'ต'
44: 1, # 'ถ'
14: 3, # 'ท'
48: 1, # 'ธ'
3: 3, # 'น'
17: 3, # 'บ'
25: 3, # 'ป'
39: 2, # 'ผ'
62: 1, # 'ฝ'
31: 3, # 'พ'
54: 1, # 'ฟ'
45: 3, # 'ภ'
9: 3, # 'ม'
16: 2, # 'ย'
2: 3, # 'ร'
61: 0, # 'ฤ'
15: 3, # 'ล'
12: 3, # 'ว'
42: 2, # 'ศ'
46: 0, # 'ษ'
18: 3, # 'ส'
21: 3, # 'ห'
4: 3, # 'อ'
63: 0, # 'ฯ'
22: 0, # 'ะ'
10: 0, # 'ั'
1: 0, # 'า'
36: 0, # 'ำ'
23: 0, # 'ิ'
13: 0, # 'ี'
40: 0, # 'ึ'
27: 0, # 'ื'
32: 0, # 'ุ'
35: 0, # 'ู'
11: 0, # 'เ'
28: 0, # 'แ'
41: 0, # 'โ'
29: 0, # 'ใ'
33: 0, # 'ไ'
50: 0, # 'ๆ'
37: 0, # '็'
6: 0, # '่'
7: 0, # '้'
38: 0, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
28: { # 'แ'
5: 3, # 'ก'
30: 2, # 'ข'
24: 2, # 'ค'
8: 1, # 'ง'
26: 2, # 'จ'
52: 0, # 'ฉ'
34: 1, # 'ช'
51: 0, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 2, # 'ด'
19: 3, # 'ต'
44: 2, # 'ถ'
14: 3, # 'ท'
48: 0, # 'ธ'
3: 3, # 'น'
17: 3, # 'บ'
25: 2, # 'ป'
39: 3, # 'ผ'
62: 0, # 'ฝ'
31: 2, # 'พ'
54: 2, # 'ฟ'
45: 0, # 'ภ'
9: 2, # 'ม'
16: 2, # 'ย'
2: 2, # 'ร'
61: 0, # 'ฤ'
15: 3, # 'ล'
12: 2, # 'ว'
42: 0, # 'ศ'
46: 0, # 'ษ'
18: 3, # 'ส'
21: 3, # 'ห'
4: 1, # 'อ'
63: 0, # 'ฯ'
22: 0, # 'ะ'
10: 0, # 'ั'
1: 0, # 'า'
36: 0, # 'ำ'
23: 0, # 'ิ'
13: 0, # 'ี'
40: 0, # 'ึ'
27: 0, # 'ื'
32: 0, # 'ุ'
35: 0, # 'ู'
11: 0, # 'เ'
28: 0, # 'แ'
41: 0, # 'โ'
29: 0, # 'ใ'
33: 0, # 'ไ'
50: 0, # 'ๆ'
37: 0, # '็'
6: 0, # '่'
7: 0, # '้'
38: 0, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
41: { # 'โ'
5: 2, # 'ก'
30: 1, # 'ข'
24: 2, # 'ค'
8: 0, # 'ง'
26: 1, # 'จ'
52: 1, # 'ฉ'
34: 1, # 'ช'
51: 1, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 3, # 'ด'
19: 2, # 'ต'
44: 0, # 'ถ'
14: 2, # 'ท'
48: 0, # 'ธ'
3: 3, # 'น'
17: 1, # 'บ'
25: 3, # 'ป'
39: 0, # 'ผ'
62: 0, # 'ฝ'
31: 1, # 'พ'
54: 1, # 'ฟ'
45: 1, # 'ภ'
9: 1, # 'ม'
16: 2, # 'ย'
2: 2, # 'ร'
61: 0, # 'ฤ'
15: 3, # 'ล'
12: 0, # 'ว'
42: 1, # 'ศ'
46: 0, # 'ษ'
18: 2, # 'ส'
21: 0, # 'ห'
4: 2, # 'อ'
63: 0, # 'ฯ'
22: 0, # 'ะ'
10: 0, # 'ั'
1: 0, # 'า'
36: 0, # 'ำ'
23: 0, # 'ิ'
13: 0, # 'ี'
40: 0, # 'ึ'
27: 0, # 'ื'
32: 0, # 'ุ'
35: 0, # 'ู'
11: 0, # 'เ'
28: 0, # 'แ'
41: 0, # 'โ'
29: 0, # 'ใ'
33: 0, # 'ไ'
50: 0, # 'ๆ'
37: 0, # '็'
6: 0, # '่'
7: 0, # '้'
38: 0, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
29: { # 'ใ'
5: 2, # 'ก'
30: 0, # 'ข'
24: 1, # 'ค'
8: 0, # 'ง'
26: 3, # 'จ'
52: 0, # 'ฉ'
34: 3, # 'ช'
51: 0, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 3, # 'ด'
19: 1, # 'ต'
44: 0, # 'ถ'
14: 0, # 'ท'
48: 0, # 'ธ'
3: 3, # 'น'
17: 2, # 'บ'
25: 0, # 'ป'
39: 0, # 'ผ'
62: 0, # 'ฝ'
31: 0, # 'พ'
54: 0, # 'ฟ'
45: 0, # 'ภ'
9: 0, # 'ม'
16: 1, # 'ย'
2: 0, # 'ร'
61: 0, # 'ฤ'
15: 0, # 'ล'
12: 0, # 'ว'
42: 0, # 'ศ'
46: 0, # 'ษ'
18: 3, # 'ส'
21: 3, # 'ห'
4: 0, # 'อ'
63: 0, # 'ฯ'
22: 0, # 'ะ'
10: 0, # 'ั'
1: 0, # 'า'
36: 0, # 'ำ'
23: 0, # 'ิ'
13: 0, # 'ี'
40: 0, # 'ึ'
27: 0, # 'ื'
32: 0, # 'ุ'
35: 0, # 'ู'
11: 0, # 'เ'
28: 0, # 'แ'
41: 0, # 'โ'
29: 0, # 'ใ'
33: 0, # 'ไ'
50: 0, # 'ๆ'
37: 0, # '็'
6: 0, # '่'
7: 0, # '้'
38: 0, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
33: { # 'ไ'
5: 1, # 'ก'
30: 2, # 'ข'
24: 0, # 'ค'
8: 0, # 'ง'
26: 0, # 'จ'
52: 0, # 'ฉ'
34: 1, # 'ช'
51: 1, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 3, # 'ด'
19: 1, # 'ต'
44: 0, # 'ถ'
14: 3, # 'ท'
48: 0, # 'ธ'
3: 0, # 'น'
17: 1, # 'บ'
25: 3, # 'ป'
39: 0, # 'ผ'
62: 0, # 'ฝ'
31: 0, # 'พ'
54: 2, # 'ฟ'
45: 0, # 'ภ'
9: 3, # 'ม'
16: 0, # 'ย'
2: 3, # 'ร'
61: 0, # 'ฤ'
15: 1, # 'ล'
12: 3, # 'ว'
42: 0, # 'ศ'
46: 0, # 'ษ'
18: 1, # 'ส'
21: 2, # 'ห'
4: 0, # 'อ'
63: 0, # 'ฯ'
22: 0, # 'ะ'
10: 0, # 'ั'
1: 0, # 'า'
36: 0, # 'ำ'
23: 0, # 'ิ'
13: 0, # 'ี'
40: 0, # 'ึ'
27: 0, # 'ื'
32: 0, # 'ุ'
35: 0, # 'ู'
11: 0, # 'เ'
28: 0, # 'แ'
41: 0, # 'โ'
29: 0, # 'ใ'
33: 0, # 'ไ'
50: 0, # 'ๆ'
37: 0, # '็'
6: 0, # '่'
7: 0, # '้'
38: 0, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
50: { # 'ๆ'
5: 0, # 'ก'
30: 0, # 'ข'
24: 0, # 'ค'
8: 0, # 'ง'
26: 0, # 'จ'
52: 0, # 'ฉ'
34: 0, # 'ช'
51: 0, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 0, # 'ด'
19: 0, # 'ต'
44: 0, # 'ถ'
14: 0, # 'ท'
48: 0, # 'ธ'
3: 0, # 'น'
17: 0, # 'บ'
25: 0, # 'ป'
39: 0, # 'ผ'
62: 0, # 'ฝ'
31: 0, # 'พ'
54: 0, # 'ฟ'
45: 0, # 'ภ'
9: 0, # 'ม'
16: 0, # 'ย'
2: 0, # 'ร'
61: 0, # 'ฤ'
15: 0, # 'ล'
12: 0, # 'ว'
42: 0, # 'ศ'
46: 0, # 'ษ'
18: 0, # 'ส'
21: 0, # 'ห'
4: 0, # 'อ'
63: 0, # 'ฯ'
22: 0, # 'ะ'
10: 0, # 'ั'
1: 0, # 'า'
36: 0, # 'ำ'
23: 0, # 'ิ'
13: 0, # 'ี'
40: 0, # 'ึ'
27: 0, # 'ื'
32: 0, # 'ุ'
35: 0, # 'ู'
11: 0, # 'เ'
28: 0, # 'แ'
41: 0, # 'โ'
29: 0, # 'ใ'
33: 0, # 'ไ'
50: 0, # 'ๆ'
37: 0, # '็'
6: 0, # '่'
7: 0, # '้'
38: 0, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
37: { # '็'
5: 2, # 'ก'
30: 1, # 'ข'
24: 2, # 'ค'
8: 2, # 'ง'
26: 3, # 'จ'
52: 0, # 'ฉ'
34: 0, # 'ช'
51: 0, # 'ซ'
47: 1, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 1, # 'ด'
19: 2, # 'ต'
44: 0, # 'ถ'
14: 1, # 'ท'
48: 0, # 'ธ'
3: 3, # 'น'
17: 3, # 'บ'
25: 0, # 'ป'
39: 0, # 'ผ'
62: 0, # 'ฝ'
31: 0, # 'พ'
54: 0, # 'ฟ'
45: 0, # 'ภ'
9: 2, # 'ม'
16: 1, # 'ย'
2: 0, # 'ร'
61: 0, # 'ฤ'
15: 0, # 'ล'
12: 2, # 'ว'
42: 0, # 'ศ'
46: 0, # 'ษ'
18: 1, # 'ส'
21: 0, # 'ห'
4: 1, # 'อ'
63: 0, # 'ฯ'
22: 0, # 'ะ'
10: 0, # 'ั'
1: 0, # 'า'
36: 0, # 'ำ'
23: 0, # 'ิ'
13: 0, # 'ี'
40: 0, # 'ึ'
27: 0, # 'ื'
32: 0, # 'ุ'
35: 0, # 'ู'
11: 1, # 'เ'
28: 0, # 'แ'
41: 0, # 'โ'
29: 0, # 'ใ'
33: 1, # 'ไ'
50: 0, # 'ๆ'
37: 0, # '็'
6: 0, # '่'
7: 0, # '้'
38: 0, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
6: { # '่'
5: 2, # 'ก'
30: 1, # 'ข'
24: 2, # 'ค'
8: 3, # 'ง'
26: 2, # 'จ'
52: 0, # 'ฉ'
34: 1, # 'ช'
51: 1, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 1, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 1, # 'ด'
19: 2, # 'ต'
44: 1, # 'ถ'
14: 2, # 'ท'
48: 1, # 'ธ'
3: 3, # 'น'
17: 1, # 'บ'
25: 2, # 'ป'
39: 2, # 'ผ'
62: 1, # 'ฝ'
31: 1, # 'พ'
54: 0, # 'ฟ'
45: 0, # 'ภ'
9: 3, # 'ม'
16: 3, # 'ย'
2: 2, # 'ร'
61: 0, # 'ฤ'
15: 2, # 'ล'
12: 3, # 'ว'
42: 0, # 'ศ'
46: 0, # 'ษ'
18: 2, # 'ส'
21: 1, # 'ห'
4: 3, # 'อ'
63: 0, # 'ฯ'
22: 1, # 'ะ'
10: 0, # 'ั'
1: 3, # 'า'
36: 2, # 'ำ'
23: 0, # 'ิ'
13: 0, # 'ี'
40: 0, # 'ึ'
27: 0, # 'ื'
32: 0, # 'ุ'
35: 0, # 'ู'
11: 3, # 'เ'
28: 2, # 'แ'
41: 1, # 'โ'
29: 2, # 'ใ'
33: 2, # 'ไ'
50: 1, # 'ๆ'
37: 0, # '็'
6: 0, # '่'
7: 0, # '้'
38: 0, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
7: { # '้'
5: 2, # 'ก'
30: 1, # 'ข'
24: 2, # 'ค'
8: 3, # 'ง'
26: 2, # 'จ'
52: 0, # 'ฉ'
34: 1, # 'ช'
51: 1, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 1, # 'ด'
19: 2, # 'ต'
44: 1, # 'ถ'
14: 2, # 'ท'
48: 0, # 'ธ'
3: 3, # 'น'
17: 2, # 'บ'
25: 2, # 'ป'
39: 2, # 'ผ'
62: 0, # 'ฝ'
31: 1, # 'พ'
54: 1, # 'ฟ'
45: 0, # 'ภ'
9: 3, # 'ม'
16: 2, # 'ย'
2: 2, # 'ร'
61: 0, # 'ฤ'
15: 1, # 'ล'
12: 3, # 'ว'
42: 1, # 'ศ'
46: 0, # 'ษ'
18: 2, # 'ส'
21: 2, # 'ห'
4: 3, # 'อ'
63: 0, # 'ฯ'
22: 0, # 'ะ'
10: 0, # 'ั'
1: 3, # 'า'
36: 2, # 'ำ'
23: 0, # 'ิ'
13: 0, # 'ี'
40: 0, # 'ึ'
27: 0, # 'ื'
32: 0, # 'ุ'
35: 0, # 'ู'
11: 2, # 'เ'
28: 2, # 'แ'
41: 1, # 'โ'
29: 2, # 'ใ'
33: 2, # 'ไ'
50: 0, # 'ๆ'
37: 0, # '็'
6: 0, # '่'
7: 0, # '้'
38: 0, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
38: { # '์'
5: 2, # 'ก'
30: 1, # 'ข'
24: 1, # 'ค'
8: 0, # 'ง'
26: 1, # 'จ'
52: 0, # 'ฉ'
34: 1, # 'ช'
51: 0, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 2, # 'ด'
19: 1, # 'ต'
44: 1, # 'ถ'
14: 1, # 'ท'
48: 0, # 'ธ'
3: 1, # 'น'
17: 1, # 'บ'
25: 1, # 'ป'
39: 0, # 'ผ'
62: 0, # 'ฝ'
31: 1, # 'พ'
54: 1, # 'ฟ'
45: 0, # 'ภ'
9: 2, # 'ม'
16: 0, # 'ย'
2: 1, # 'ร'
61: 1, # 'ฤ'
15: 1, # 'ล'
12: 1, # 'ว'
42: 0, # 'ศ'
46: 0, # 'ษ'
18: 1, # 'ส'
21: 1, # 'ห'
4: 2, # 'อ'
63: 1, # 'ฯ'
22: 0, # 'ะ'
10: 0, # 'ั'
1: 0, # 'า'
36: 0, # 'ำ'
23: 0, # 'ิ'
13: 0, # 'ี'
40: 0, # 'ึ'
27: 0, # 'ื'
32: 0, # 'ุ'
35: 0, # 'ู'
11: 2, # 'เ'
28: 2, # 'แ'
41: 1, # 'โ'
29: 1, # 'ใ'
33: 1, # 'ไ'
50: 0, # 'ๆ'
37: 0, # '็'
6: 0, # '่'
7: 0, # '้'
38: 0, # '์'
56: 0, # '๑'
59: 0, # '๒'
60: 0, # '๕'
},
56: { # '๑'
5: 0, # 'ก'
30: 0, # 'ข'
24: 0, # 'ค'
8: 0, # 'ง'
26: 0, # 'จ'
52: 0, # 'ฉ'
34: 0, # 'ช'
51: 0, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 0, # 'ด'
19: 0, # 'ต'
44: 0, # 'ถ'
14: 0, # 'ท'
48: 0, # 'ธ'
3: 0, # 'น'
17: 0, # 'บ'
25: 0, # 'ป'
39: 0, # 'ผ'
62: 0, # 'ฝ'
31: 0, # 'พ'
54: 0, # 'ฟ'
45: 0, # 'ภ'
9: 0, # 'ม'
16: 0, # 'ย'
2: 0, # 'ร'
61: 0, # 'ฤ'
15: 0, # 'ล'
12: 0, # 'ว'
42: 0, # 'ศ'
46: 0, # 'ษ'
18: 0, # 'ส'
21: 0, # 'ห'
4: 0, # 'อ'
63: 0, # 'ฯ'
22: 0, # 'ะ'
10: 0, # 'ั'
1: 0, # 'า'
36: 0, # 'ำ'
23: 0, # 'ิ'
13: 0, # 'ี'
40: 0, # 'ึ'
27: 0, # 'ื'
32: 0, # 'ุ'
35: 0, # 'ู'
11: 0, # 'เ'
28: 0, # 'แ'
41: 0, # 'โ'
29: 0, # 'ใ'
33: 0, # 'ไ'
50: 0, # 'ๆ'
37: 0, # '็'
6: 0, # '่'
7: 0, # '้'
38: 0, # '์'
56: 2, # '๑'
59: 1, # '๒'
60: 1, # '๕'
},
59: { # '๒'
5: 0, # 'ก'
30: 0, # 'ข'
24: 0, # 'ค'
8: 0, # 'ง'
26: 0, # 'จ'
52: 0, # 'ฉ'
34: 0, # 'ช'
51: 0, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 0, # 'ด'
19: 0, # 'ต'
44: 0, # 'ถ'
14: 0, # 'ท'
48: 0, # 'ธ'
3: 0, # 'น'
17: 0, # 'บ'
25: 0, # 'ป'
39: 0, # 'ผ'
62: 0, # 'ฝ'
31: 0, # 'พ'
54: 0, # 'ฟ'
45: 0, # 'ภ'
9: 0, # 'ม'
16: 0, # 'ย'
2: 0, # 'ร'
61: 0, # 'ฤ'
15: 0, # 'ล'
12: 0, # 'ว'
42: 0, # 'ศ'
46: 0, # 'ษ'
18: 0, # 'ส'
21: 0, # 'ห'
4: 0, # 'อ'
63: 0, # 'ฯ'
22: 0, # 'ะ'
10: 0, # 'ั'
1: 0, # 'า'
36: 0, # 'ำ'
23: 0, # 'ิ'
13: 0, # 'ี'
40: 0, # 'ึ'
27: 0, # 'ื'
32: 0, # 'ุ'
35: 0, # 'ู'
11: 0, # 'เ'
28: 0, # 'แ'
41: 0, # 'โ'
29: 0, # 'ใ'
33: 0, # 'ไ'
50: 0, # 'ๆ'
37: 0, # '็'
6: 0, # '่'
7: 0, # '้'
38: 0, # '์'
56: 1, # '๑'
59: 1, # '๒'
60: 3, # '๕'
},
60: { # '๕'
5: 0, # 'ก'
30: 0, # 'ข'
24: 0, # 'ค'
8: 0, # 'ง'
26: 0, # 'จ'
52: 0, # 'ฉ'
34: 0, # 'ช'
51: 0, # 'ซ'
47: 0, # 'ญ'
58: 0, # 'ฎ'
57: 0, # 'ฏ'
49: 0, # 'ฐ'
53: 0, # 'ฑ'
55: 0, # 'ฒ'
43: 0, # 'ณ'
20: 0, # 'ด'
19: 0, # 'ต'
44: 0, # 'ถ'
14: 0, # 'ท'
48: 0, # 'ธ'
3: 0, # 'น'
17: 0, # 'บ'
25: 0, # 'ป'
39: 0, # 'ผ'
62: 0, # 'ฝ'
31: 0, # 'พ'
54: 0, # 'ฟ'
45: 0, # 'ภ'
9: 0, # 'ม'
16: 0, # 'ย'
2: 0, # 'ร'
61: 0, # 'ฤ'
15: 0, # 'ล'
12: 0, # 'ว'
42: 0, # 'ศ'
46: 0, # 'ษ'
18: 0, # 'ส'
21: 0, # 'ห'
4: 0, # 'อ'
63: 0, # 'ฯ'
22: 0, # 'ะ'
10: 0, # 'ั'
1: 0, # 'า'
36: 0, # 'ำ'
23: 0, # 'ิ'
13: 0, # 'ี'
40: 0, # 'ึ'
27: 0, # 'ื'
32: 0, # 'ุ'
35: 0, # 'ู'
11: 0, # 'เ'
28: 0, # 'แ'
41: 0, # 'โ'
29: 0, # 'ใ'
33: 0, # 'ไ'
50: 0, # 'ๆ'
37: 0, # '็'
6: 0, # '่'
7: 0, # '้'
38: 0, # '์'
56: 2, # '๑'
59: 1, # '๒'
60: 0, # '๕'
},
}
# 255: Undefined characters that did not exist in training text
# 254: Carriage/Return
# 253: symbol (punctuation) that does not belong to word
# 252: 0 - 9
# 251: Control characters
# Character Mapping Table(s):
TIS_620_THAI_CHAR_TO_ORDER = {
0: 255, # '\x00'
1: 255, # '\x01'
2: 255, # '\x02'
3: 255, # '\x03'
4: 255, # '\x04'
5: 255, # '\x05'
6: 255, # '\x06'
7: 255, # '\x07'
8: 255, # '\x08'
9: 255, # '\t'
10: 254, # '\n'
11: 255, # '\x0b'
12: 255, # '\x0c'
13: 254, # '\r'
14: 255, # '\x0e'
15: 255, # '\x0f'
16: 255, # '\x10'
17: 255, # '\x11'
18: 255, # '\x12'
19: 255, # '\x13'
20: 255, # '\x14'
21: 255, # '\x15'
22: 255, # '\x16'
23: 255, # '\x17'
24: 255, # '\x18'
25: 255, # '\x19'
26: 255, # '\x1a'
27: 255, # '\x1b'
28: 255, # '\x1c'
29: 255, # '\x1d'
30: 255, # '\x1e'
31: 255, # '\x1f'
32: 253, # ' '
33: 253, # '!'
34: 253, # '"'
35: 253, # '#'
36: 253, # '$'
37: 253, # '%'
38: 253, # '&'
39: 253, # "'"
40: 253, # '('
41: 253, # ')'
42: 253, # '*'
43: 253, # '+'
44: 253, # ','
45: 253, # '-'
46: 253, # '.'
47: 253, # '/'
48: 252, # '0'
49: 252, # '1'
50: 252, # '2'
51: 252, # '3'
52: 252, # '4'
53: 252, # '5'
54: 252, # '6'
55: 252, # '7'
56: 252, # '8'
57: 252, # '9'
58: 253, # ':'
59: 253, # ';'
60: 253, # '<'
61: 253, # '='
62: 253, # '>'
63: 253, # '?'
64: 253, # '@'
65: 182, # 'A'
66: 106, # 'B'
67: 107, # 'C'
68: 100, # 'D'
69: 183, # 'E'
70: 184, # 'F'
71: 185, # 'G'
72: 101, # 'H'
73: 94, # 'I'
74: 186, # 'J'
75: 187, # 'K'
76: 108, # 'L'
77: 109, # 'M'
78: 110, # 'N'
79: 111, # 'O'
80: 188, # 'P'
81: 189, # 'Q'
82: 190, # 'R'
83: 89, # 'S'
84: 95, # 'T'
85: 112, # 'U'
86: 113, # 'V'
87: 191, # 'W'
88: 192, # 'X'
89: 193, # 'Y'
90: 194, # 'Z'
91: 253, # '['
92: 253, # '\\'
93: 253, # ']'
94: 253, # '^'
95: 253, # '_'
96: 253, # '`'
97: 64, # 'a'
98: 72, # 'b'
99: 73, # 'c'
100: 114, # 'd'
101: 74, # 'e'
102: 115, # 'f'
103: 116, # 'g'
104: 102, # 'h'
105: 81, # 'i'
106: 201, # 'j'
107: 117, # 'k'
108: 90, # 'l'
109: 103, # 'm'
110: 78, # 'n'
111: 82, # 'o'
112: 96, # 'p'
113: 202, # 'q'
114: 91, # 'r'
115: 79, # 's'
116: 84, # 't'
117: 104, # 'u'
118: 105, # 'v'
119: 97, # 'w'
120: 98, # 'x'
121: 92, # 'y'
122: 203, # 'z'
123: 253, # '{'
124: 253, # '|'
125: 253, # '}'
126: 253, # '~'
127: 253, # '\x7f'
128: 209, # '\x80'
129: 210, # '\x81'
130: 211, # '\x82'
131: 212, # '\x83'
132: 213, # '\x84'
133: 88, # '\x85'
134: 214, # '\x86'
135: 215, # '\x87'
136: 216, # '\x88'
137: 217, # '\x89'
138: 218, # '\x8a'
139: 219, # '\x8b'
140: 220, # '\x8c'
141: 118, # '\x8d'
142: 221, # '\x8e'
143: 222, # '\x8f'
144: 223, # '\x90'
145: 224, # '\x91'
146: 99, # '\x92'
147: 85, # '\x93'
148: 83, # '\x94'
149: 225, # '\x95'
150: 226, # '\x96'
151: 227, # '\x97'
152: 228, # '\x98'
153: 229, # '\x99'
154: 230, # '\x9a'
155: 231, # '\x9b'
156: 232, # '\x9c'
157: 233, # '\x9d'
158: 234, # '\x9e'
159: 235, # '\x9f'
160: 236, # None
161: 5, # 'ก'
162: 30, # 'ข'
163: 237, # 'ฃ'
164: 24, # 'ค'
165: 238, # 'ฅ'
166: 75, # 'ฆ'
167: 8, # 'ง'
168: 26, # 'จ'
169: 52, # 'ฉ'
170: 34, # 'ช'
171: 51, # 'ซ'
172: 119, # 'ฌ'
173: 47, # 'ญ'
174: 58, # 'ฎ'
175: 57, # 'ฏ'
176: 49, # 'ฐ'
177: 53, # 'ฑ'
178: 55, # 'ฒ'
179: 43, # 'ณ'
180: 20, # 'ด'
181: 19, # 'ต'
182: 44, # 'ถ'
183: 14, # 'ท'
184: 48, # 'ธ'
185: 3, # 'น'
186: 17, # 'บ'
187: 25, # 'ป'
188: 39, # 'ผ'
189: 62, # 'ฝ'
190: 31, # 'พ'
191: 54, # 'ฟ'
192: 45, # 'ภ'
193: 9, # 'ม'
194: 16, # 'ย'
195: 2, # 'ร'
196: 61, # 'ฤ'
197: 15, # 'ล'
198: 239, # 'ฦ'
199: 12, # 'ว'
200: 42, # 'ศ'
201: 46, # 'ษ'
202: 18, # 'ส'
203: 21, # 'ห'
204: 76, # 'ฬ'
205: 4, # 'อ'
206: 66, # 'ฮ'
207: 63, # 'ฯ'
208: 22, # 'ะ'
209: 10, # 'ั'
210: 1, # 'า'
211: 36, # 'ำ'
212: 23, # 'ิ'
213: 13, # 'ี'
214: 40, # 'ึ'
215: 27, # 'ื'
216: 32, # 'ุ'
217: 35, # 'ู'
218: 86, # 'ฺ'
219: 240, # None
220: 241, # None
221: 242, # None
222: 243, # None
223: 244, # '฿'
224: 11, # 'เ'
225: 28, # 'แ'
226: 41, # 'โ'
227: 29, # 'ใ'
228: 33, # 'ไ'
229: 245, # 'ๅ'
230: 50, # 'ๆ'
231: 37, # '็'
232: 6, # '่'
233: 7, # '้'
234: 67, # '๊'
235: 77, # '๋'
236: 38, # '์'
237: 93, # 'ํ'
238: 246, # '๎'
239: 247, # '๏'
240: 68, # '๐'
241: 56, # '๑'
242: 59, # '๒'
243: 65, # '๓'
244: 69, # '๔'
245: 60, # '๕'
246: 70, # '๖'
247: 80, # '๗'
248: 71, # '๘'
249: 87, # '๙'
250: 248, # '๚'
251: 249, # '๛'
252: 250, # None
253: 251, # None
254: 252, # None
255: 253, # None
}
TIS_620_THAI_MODEL = SingleByteCharSetModel(
charset_name="TIS-620",
language="Thai",
char_to_order_map=TIS_620_THAI_CHAR_TO_ORDER,
language_model=THAI_LANG_MODEL,
typical_positive_ratio=0.926386,
keep_ascii_letters=False,
alphabet="กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛",
)
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/chardet/langthaimodel.py
|
Python
|
mit
| 102,774 |
from pip._vendor.chardet.sbcharsetprober import SingleByteCharSetModel
# 3: Positive
# 2: Likely
# 1: Unlikely
# 0: Negative
TURKISH_LANG_MODEL = {
23: { # 'A'
23: 0, # 'A'
37: 0, # 'B'
47: 0, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 0, # 'F'
36: 0, # 'G'
45: 0, # 'H'
53: 0, # 'I'
60: 0, # 'J'
16: 0, # 'K'
49: 0, # 'L'
20: 0, # 'M'
46: 0, # 'N'
42: 0, # 'O'
48: 0, # 'P'
44: 0, # 'R'
35: 0, # 'S'
31: 0, # 'T'
51: 0, # 'U'
38: 0, # 'V'
62: 0, # 'W'
43: 0, # 'Y'
56: 0, # 'Z'
1: 3, # 'a'
21: 0, # 'b'
28: 0, # 'c'
12: 2, # 'd'
2: 3, # 'e'
18: 0, # 'f'
27: 1, # 'g'
25: 1, # 'h'
3: 1, # 'i'
24: 0, # 'j'
10: 2, # 'k'
5: 1, # 'l'
13: 1, # 'm'
4: 1, # 'n'
15: 0, # 'o'
26: 0, # 'p'
7: 1, # 'r'
8: 1, # 's'
9: 1, # 't'
14: 1, # 'u'
32: 0, # 'v'
57: 0, # 'w'
58: 0, # 'x'
11: 3, # 'y'
22: 0, # 'z'
63: 0, # '·'
54: 0, # 'Ç'
50: 0, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 1, # 'ç'
61: 0, # 'î'
34: 0, # 'ö'
17: 0, # 'ü'
30: 0, # 'ğ'
41: 0, # 'İ'
6: 0, # 'ı'
40: 0, # 'Ş'
19: 0, # 'ş'
},
37: { # 'B'
23: 0, # 'A'
37: 0, # 'B'
47: 2, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 2, # 'F'
36: 0, # 'G'
45: 0, # 'H'
53: 0, # 'I'
60: 0, # 'J'
16: 1, # 'K'
49: 0, # 'L'
20: 0, # 'M'
46: 0, # 'N'
42: 0, # 'O'
48: 1, # 'P'
44: 0, # 'R'
35: 1, # 'S'
31: 0, # 'T'
51: 0, # 'U'
38: 1, # 'V'
62: 0, # 'W'
43: 1, # 'Y'
56: 0, # 'Z'
1: 2, # 'a'
21: 0, # 'b'
28: 2, # 'c'
12: 0, # 'd'
2: 3, # 'e'
18: 0, # 'f'
27: 0, # 'g'
25: 0, # 'h'
3: 0, # 'i'
24: 0, # 'j'
10: 0, # 'k'
5: 0, # 'l'
13: 1, # 'm'
4: 1, # 'n'
15: 0, # 'o'
26: 0, # 'p'
7: 0, # 'r'
8: 0, # 's'
9: 0, # 't'
14: 2, # 'u'
32: 0, # 'v'
57: 0, # 'w'
58: 0, # 'x'
11: 0, # 'y'
22: 1, # 'z'
63: 0, # '·'
54: 0, # 'Ç'
50: 1, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 0, # 'ç'
61: 0, # 'î'
34: 1, # 'ö'
17: 0, # 'ü'
30: 0, # 'ğ'
41: 0, # 'İ'
6: 0, # 'ı'
40: 1, # 'Ş'
19: 1, # 'ş'
},
47: { # 'C'
23: 0, # 'A'
37: 0, # 'B'
47: 0, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 1, # 'F'
36: 0, # 'G'
45: 0, # 'H'
53: 0, # 'I'
60: 0, # 'J'
16: 0, # 'K'
49: 1, # 'L'
20: 0, # 'M'
46: 1, # 'N'
42: 0, # 'O'
48: 1, # 'P'
44: 1, # 'R'
35: 0, # 'S'
31: 0, # 'T'
51: 0, # 'U'
38: 1, # 'V'
62: 0, # 'W'
43: 1, # 'Y'
56: 0, # 'Z'
1: 3, # 'a'
21: 0, # 'b'
28: 2, # 'c'
12: 0, # 'd'
2: 3, # 'e'
18: 0, # 'f'
27: 0, # 'g'
25: 0, # 'h'
3: 0, # 'i'
24: 2, # 'j'
10: 1, # 'k'
5: 2, # 'l'
13: 2, # 'm'
4: 2, # 'n'
15: 1, # 'o'
26: 0, # 'p'
7: 2, # 'r'
8: 0, # 's'
9: 0, # 't'
14: 3, # 'u'
32: 0, # 'v'
57: 0, # 'w'
58: 0, # 'x'
11: 0, # 'y'
22: 2, # 'z'
63: 0, # '·'
54: 0, # 'Ç'
50: 1, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 1, # 'ç'
61: 0, # 'î'
34: 1, # 'ö'
17: 0, # 'ü'
30: 0, # 'ğ'
41: 1, # 'İ'
6: 3, # 'ı'
40: 0, # 'Ş'
19: 0, # 'ş'
},
39: { # 'D'
23: 0, # 'A'
37: 0, # 'B'
47: 0, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 1, # 'F'
36: 0, # 'G'
45: 0, # 'H'
53: 0, # 'I'
60: 0, # 'J'
16: 1, # 'K'
49: 0, # 'L'
20: 0, # 'M'
46: 0, # 'N'
42: 0, # 'O'
48: 1, # 'P'
44: 0, # 'R'
35: 0, # 'S'
31: 0, # 'T'
51: 0, # 'U'
38: 0, # 'V'
62: 0, # 'W'
43: 0, # 'Y'
56: 0, # 'Z'
1: 2, # 'a'
21: 0, # 'b'
28: 2, # 'c'
12: 0, # 'd'
2: 2, # 'e'
18: 0, # 'f'
27: 0, # 'g'
25: 0, # 'h'
3: 0, # 'i'
24: 0, # 'j'
10: 0, # 'k'
5: 1, # 'l'
13: 3, # 'm'
4: 0, # 'n'
15: 1, # 'o'
26: 0, # 'p'
7: 0, # 'r'
8: 0, # 's'
9: 0, # 't'
14: 1, # 'u'
32: 0, # 'v'
57: 0, # 'w'
58: 0, # 'x'
11: 0, # 'y'
22: 1, # 'z'
63: 0, # '·'
54: 1, # 'Ç'
50: 0, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 1, # 'ç'
61: 0, # 'î'
34: 0, # 'ö'
17: 0, # 'ü'
30: 1, # 'ğ'
41: 0, # 'İ'
6: 1, # 'ı'
40: 1, # 'Ş'
19: 0, # 'ş'
},
29: { # 'E'
23: 0, # 'A'
37: 0, # 'B'
47: 0, # 'C'
39: 0, # 'D'
29: 1, # 'E'
52: 0, # 'F'
36: 0, # 'G'
45: 0, # 'H'
53: 0, # 'I'
60: 0, # 'J'
16: 3, # 'K'
49: 0, # 'L'
20: 1, # 'M'
46: 0, # 'N'
42: 0, # 'O'
48: 0, # 'P'
44: 0, # 'R'
35: 0, # 'S'
31: 0, # 'T'
51: 0, # 'U'
38: 0, # 'V'
62: 0, # 'W'
43: 0, # 'Y'
56: 0, # 'Z'
1: 3, # 'a'
21: 0, # 'b'
28: 0, # 'c'
12: 2, # 'd'
2: 3, # 'e'
18: 0, # 'f'
27: 1, # 'g'
25: 0, # 'h'
3: 1, # 'i'
24: 1, # 'j'
10: 0, # 'k'
5: 3, # 'l'
13: 3, # 'm'
4: 3, # 'n'
15: 0, # 'o'
26: 0, # 'p'
7: 0, # 'r'
8: 1, # 's'
9: 1, # 't'
14: 1, # 'u'
32: 1, # 'v'
57: 0, # 'w'
58: 0, # 'x'
11: 2, # 'y'
22: 0, # 'z'
63: 0, # '·'
54: 0, # 'Ç'
50: 0, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 0, # 'ç'
61: 0, # 'î'
34: 0, # 'ö'
17: 0, # 'ü'
30: 0, # 'ğ'
41: 0, # 'İ'
6: 3, # 'ı'
40: 0, # 'Ş'
19: 0, # 'ş'
},
52: { # 'F'
23: 0, # 'A'
37: 1, # 'B'
47: 1, # 'C'
39: 1, # 'D'
29: 1, # 'E'
52: 2, # 'F'
36: 0, # 'G'
45: 2, # 'H'
53: 1, # 'I'
60: 0, # 'J'
16: 0, # 'K'
49: 0, # 'L'
20: 1, # 'M'
46: 1, # 'N'
42: 1, # 'O'
48: 2, # 'P'
44: 1, # 'R'
35: 1, # 'S'
31: 1, # 'T'
51: 1, # 'U'
38: 1, # 'V'
62: 0, # 'W'
43: 2, # 'Y'
56: 0, # 'Z'
1: 0, # 'a'
21: 1, # 'b'
28: 1, # 'c'
12: 1, # 'd'
2: 0, # 'e'
18: 1, # 'f'
27: 0, # 'g'
25: 0, # 'h'
3: 2, # 'i'
24: 1, # 'j'
10: 0, # 'k'
5: 0, # 'l'
13: 1, # 'm'
4: 2, # 'n'
15: 1, # 'o'
26: 0, # 'p'
7: 2, # 'r'
8: 1, # 's'
9: 1, # 't'
14: 1, # 'u'
32: 0, # 'v'
57: 0, # 'w'
58: 0, # 'x'
11: 1, # 'y'
22: 1, # 'z'
63: 0, # '·'
54: 0, # 'Ç'
50: 1, # 'Ö'
55: 2, # 'Ü'
59: 0, # 'â'
33: 0, # 'ç'
61: 0, # 'î'
34: 2, # 'ö'
17: 0, # 'ü'
30: 1, # 'ğ'
41: 1, # 'İ'
6: 2, # 'ı'
40: 0, # 'Ş'
19: 2, # 'ş'
},
36: { # 'G'
23: 1, # 'A'
37: 0, # 'B'
47: 1, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 1, # 'F'
36: 2, # 'G'
45: 0, # 'H'
53: 0, # 'I'
60: 0, # 'J'
16: 2, # 'K'
49: 0, # 'L'
20: 0, # 'M'
46: 2, # 'N'
42: 1, # 'O'
48: 1, # 'P'
44: 1, # 'R'
35: 1, # 'S'
31: 0, # 'T'
51: 1, # 'U'
38: 2, # 'V'
62: 0, # 'W'
43: 0, # 'Y'
56: 0, # 'Z'
1: 3, # 'a'
21: 0, # 'b'
28: 1, # 'c'
12: 0, # 'd'
2: 3, # 'e'
18: 0, # 'f'
27: 0, # 'g'
25: 0, # 'h'
3: 0, # 'i'
24: 1, # 'j'
10: 1, # 'k'
5: 0, # 'l'
13: 3, # 'm'
4: 2, # 'n'
15: 0, # 'o'
26: 1, # 'p'
7: 0, # 'r'
8: 1, # 's'
9: 1, # 't'
14: 3, # 'u'
32: 0, # 'v'
57: 0, # 'w'
58: 1, # 'x'
11: 0, # 'y'
22: 2, # 'z'
63: 0, # '·'
54: 1, # 'Ç'
50: 2, # 'Ö'
55: 0, # 'Ü'
59: 1, # 'â'
33: 2, # 'ç'
61: 0, # 'î'
34: 0, # 'ö'
17: 0, # 'ü'
30: 1, # 'ğ'
41: 1, # 'İ'
6: 2, # 'ı'
40: 2, # 'Ş'
19: 1, # 'ş'
},
45: { # 'H'
23: 0, # 'A'
37: 1, # 'B'
47: 0, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 2, # 'F'
36: 2, # 'G'
45: 1, # 'H'
53: 1, # 'I'
60: 0, # 'J'
16: 2, # 'K'
49: 1, # 'L'
20: 0, # 'M'
46: 1, # 'N'
42: 1, # 'O'
48: 1, # 'P'
44: 0, # 'R'
35: 2, # 'S'
31: 0, # 'T'
51: 1, # 'U'
38: 2, # 'V'
62: 0, # 'W'
43: 0, # 'Y'
56: 0, # 'Z'
1: 3, # 'a'
21: 0, # 'b'
28: 2, # 'c'
12: 0, # 'd'
2: 3, # 'e'
18: 0, # 'f'
27: 0, # 'g'
25: 0, # 'h'
3: 2, # 'i'
24: 0, # 'j'
10: 1, # 'k'
5: 0, # 'l'
13: 2, # 'm'
4: 0, # 'n'
15: 1, # 'o'
26: 1, # 'p'
7: 1, # 'r'
8: 0, # 's'
9: 0, # 't'
14: 3, # 'u'
32: 0, # 'v'
57: 0, # 'w'
58: 0, # 'x'
11: 0, # 'y'
22: 2, # 'z'
63: 0, # '·'
54: 1, # 'Ç'
50: 1, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 1, # 'ç'
61: 0, # 'î'
34: 1, # 'ö'
17: 0, # 'ü'
30: 2, # 'ğ'
41: 1, # 'İ'
6: 0, # 'ı'
40: 2, # 'Ş'
19: 1, # 'ş'
},
53: { # 'I'
23: 0, # 'A'
37: 0, # 'B'
47: 0, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 1, # 'F'
36: 0, # 'G'
45: 0, # 'H'
53: 0, # 'I'
60: 0, # 'J'
16: 2, # 'K'
49: 0, # 'L'
20: 0, # 'M'
46: 0, # 'N'
42: 0, # 'O'
48: 1, # 'P'
44: 0, # 'R'
35: 0, # 'S'
31: 0, # 'T'
51: 0, # 'U'
38: 0, # 'V'
62: 0, # 'W'
43: 0, # 'Y'
56: 0, # 'Z'
1: 2, # 'a'
21: 0, # 'b'
28: 2, # 'c'
12: 0, # 'd'
2: 2, # 'e'
18: 0, # 'f'
27: 0, # 'g'
25: 0, # 'h'
3: 0, # 'i'
24: 0, # 'j'
10: 0, # 'k'
5: 2, # 'l'
13: 2, # 'm'
4: 0, # 'n'
15: 0, # 'o'
26: 0, # 'p'
7: 0, # 'r'
8: 0, # 's'
9: 0, # 't'
14: 2, # 'u'
32: 0, # 'v'
57: 0, # 'w'
58: 0, # 'x'
11: 0, # 'y'
22: 2, # 'z'
63: 0, # '·'
54: 1, # 'Ç'
50: 0, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 2, # 'ç'
61: 0, # 'î'
34: 1, # 'ö'
17: 0, # 'ü'
30: 0, # 'ğ'
41: 0, # 'İ'
6: 0, # 'ı'
40: 1, # 'Ş'
19: 1, # 'ş'
},
60: { # 'J'
23: 0, # 'A'
37: 0, # 'B'
47: 0, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 0, # 'F'
36: 0, # 'G'
45: 0, # 'H'
53: 0, # 'I'
60: 0, # 'J'
16: 0, # 'K'
49: 0, # 'L'
20: 1, # 'M'
46: 0, # 'N'
42: 0, # 'O'
48: 0, # 'P'
44: 0, # 'R'
35: 0, # 'S'
31: 0, # 'T'
51: 0, # 'U'
38: 0, # 'V'
62: 0, # 'W'
43: 0, # 'Y'
56: 0, # 'Z'
1: 0, # 'a'
21: 1, # 'b'
28: 0, # 'c'
12: 1, # 'd'
2: 0, # 'e'
18: 0, # 'f'
27: 0, # 'g'
25: 0, # 'h'
3: 1, # 'i'
24: 0, # 'j'
10: 0, # 'k'
5: 0, # 'l'
13: 0, # 'm'
4: 1, # 'n'
15: 0, # 'o'
26: 0, # 'p'
7: 0, # 'r'
8: 1, # 's'
9: 0, # 't'
14: 0, # 'u'
32: 0, # 'v'
57: 0, # 'w'
58: 0, # 'x'
11: 0, # 'y'
22: 0, # 'z'
63: 0, # '·'
54: 0, # 'Ç'
50: 0, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 0, # 'ç'
61: 0, # 'î'
34: 0, # 'ö'
17: 0, # 'ü'
30: 0, # 'ğ'
41: 0, # 'İ'
6: 0, # 'ı'
40: 0, # 'Ş'
19: 0, # 'ş'
},
16: { # 'K'
23: 0, # 'A'
37: 0, # 'B'
47: 0, # 'C'
39: 0, # 'D'
29: 3, # 'E'
52: 0, # 'F'
36: 0, # 'G'
45: 0, # 'H'
53: 0, # 'I'
60: 0, # 'J'
16: 0, # 'K'
49: 0, # 'L'
20: 2, # 'M'
46: 0, # 'N'
42: 0, # 'O'
48: 0, # 'P'
44: 0, # 'R'
35: 0, # 'S'
31: 2, # 'T'
51: 0, # 'U'
38: 0, # 'V'
62: 0, # 'W'
43: 0, # 'Y'
56: 0, # 'Z'
1: 2, # 'a'
21: 3, # 'b'
28: 0, # 'c'
12: 3, # 'd'
2: 1, # 'e'
18: 3, # 'f'
27: 3, # 'g'
25: 3, # 'h'
3: 3, # 'i'
24: 2, # 'j'
10: 3, # 'k'
5: 0, # 'l'
13: 0, # 'm'
4: 3, # 'n'
15: 0, # 'o'
26: 1, # 'p'
7: 3, # 'r'
8: 3, # 's'
9: 3, # 't'
14: 0, # 'u'
32: 3, # 'v'
57: 0, # 'w'
58: 0, # 'x'
11: 2, # 'y'
22: 1, # 'z'
63: 0, # '·'
54: 0, # 'Ç'
50: 0, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 0, # 'ç'
61: 0, # 'î'
34: 0, # 'ö'
17: 2, # 'ü'
30: 0, # 'ğ'
41: 1, # 'İ'
6: 3, # 'ı'
40: 0, # 'Ş'
19: 0, # 'ş'
},
49: { # 'L'
23: 0, # 'A'
37: 0, # 'B'
47: 0, # 'C'
39: 0, # 'D'
29: 2, # 'E'
52: 0, # 'F'
36: 1, # 'G'
45: 1, # 'H'
53: 0, # 'I'
60: 0, # 'J'
16: 0, # 'K'
49: 0, # 'L'
20: 1, # 'M'
46: 0, # 'N'
42: 2, # 'O'
48: 0, # 'P'
44: 0, # 'R'
35: 0, # 'S'
31: 0, # 'T'
51: 0, # 'U'
38: 0, # 'V'
62: 0, # 'W'
43: 1, # 'Y'
56: 0, # 'Z'
1: 0, # 'a'
21: 3, # 'b'
28: 0, # 'c'
12: 2, # 'd'
2: 0, # 'e'
18: 0, # 'f'
27: 0, # 'g'
25: 0, # 'h'
3: 2, # 'i'
24: 0, # 'j'
10: 1, # 'k'
5: 0, # 'l'
13: 0, # 'm'
4: 2, # 'n'
15: 1, # 'o'
26: 1, # 'p'
7: 1, # 'r'
8: 1, # 's'
9: 1, # 't'
14: 0, # 'u'
32: 0, # 'v'
57: 0, # 'w'
58: 0, # 'x'
11: 2, # 'y'
22: 0, # 'z'
63: 0, # '·'
54: 0, # 'Ç'
50: 0, # 'Ö'
55: 2, # 'Ü'
59: 0, # 'â'
33: 0, # 'ç'
61: 0, # 'î'
34: 1, # 'ö'
17: 1, # 'ü'
30: 1, # 'ğ'
41: 0, # 'İ'
6: 2, # 'ı'
40: 0, # 'Ş'
19: 0, # 'ş'
},
20: { # 'M'
23: 1, # 'A'
37: 0, # 'B'
47: 0, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 0, # 'F'
36: 0, # 'G'
45: 0, # 'H'
53: 0, # 'I'
60: 1, # 'J'
16: 3, # 'K'
49: 0, # 'L'
20: 2, # 'M'
46: 0, # 'N'
42: 0, # 'O'
48: 0, # 'P'
44: 0, # 'R'
35: 0, # 'S'
31: 1, # 'T'
51: 0, # 'U'
38: 0, # 'V'
62: 0, # 'W'
43: 0, # 'Y'
56: 0, # 'Z'
1: 3, # 'a'
21: 2, # 'b'
28: 0, # 'c'
12: 3, # 'd'
2: 3, # 'e'
18: 0, # 'f'
27: 1, # 'g'
25: 1, # 'h'
3: 2, # 'i'
24: 2, # 'j'
10: 2, # 'k'
5: 2, # 'l'
13: 3, # 'm'
4: 3, # 'n'
15: 0, # 'o'
26: 1, # 'p'
7: 3, # 'r'
8: 0, # 's'
9: 2, # 't'
14: 3, # 'u'
32: 0, # 'v'
57: 0, # 'w'
58: 0, # 'x'
11: 2, # 'y'
22: 0, # 'z'
63: 0, # '·'
54: 0, # 'Ç'
50: 0, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 3, # 'ç'
61: 0, # 'î'
34: 0, # 'ö'
17: 0, # 'ü'
30: 0, # 'ğ'
41: 0, # 'İ'
6: 3, # 'ı'
40: 0, # 'Ş'
19: 0, # 'ş'
},
46: { # 'N'
23: 0, # 'A'
37: 1, # 'B'
47: 0, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 1, # 'F'
36: 1, # 'G'
45: 1, # 'H'
53: 0, # 'I'
60: 0, # 'J'
16: 2, # 'K'
49: 0, # 'L'
20: 0, # 'M'
46: 1, # 'N'
42: 0, # 'O'
48: 0, # 'P'
44: 1, # 'R'
35: 1, # 'S'
31: 0, # 'T'
51: 1, # 'U'
38: 2, # 'V'
62: 0, # 'W'
43: 1, # 'Y'
56: 0, # 'Z'
1: 3, # 'a'
21: 0, # 'b'
28: 2, # 'c'
12: 0, # 'd'
2: 3, # 'e'
18: 0, # 'f'
27: 1, # 'g'
25: 0, # 'h'
3: 0, # 'i'
24: 2, # 'j'
10: 1, # 'k'
5: 1, # 'l'
13: 3, # 'm'
4: 2, # 'n'
15: 1, # 'o'
26: 1, # 'p'
7: 1, # 'r'
8: 0, # 's'
9: 0, # 't'
14: 3, # 'u'
32: 0, # 'v'
57: 0, # 'w'
58: 1, # 'x'
11: 1, # 'y'
22: 2, # 'z'
63: 0, # '·'
54: 1, # 'Ç'
50: 1, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 0, # 'ç'
61: 0, # 'î'
34: 1, # 'ö'
17: 0, # 'ü'
30: 0, # 'ğ'
41: 1, # 'İ'
6: 2, # 'ı'
40: 1, # 'Ş'
19: 1, # 'ş'
},
42: { # 'O'
23: 0, # 'A'
37: 0, # 'B'
47: 0, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 1, # 'F'
36: 0, # 'G'
45: 1, # 'H'
53: 0, # 'I'
60: 0, # 'J'
16: 2, # 'K'
49: 1, # 'L'
20: 0, # 'M'
46: 0, # 'N'
42: 0, # 'O'
48: 2, # 'P'
44: 1, # 'R'
35: 1, # 'S'
31: 0, # 'T'
51: 1, # 'U'
38: 1, # 'V'
62: 0, # 'W'
43: 0, # 'Y'
56: 0, # 'Z'
1: 3, # 'a'
21: 0, # 'b'
28: 2, # 'c'
12: 0, # 'd'
2: 2, # 'e'
18: 0, # 'f'
27: 0, # 'g'
25: 0, # 'h'
3: 0, # 'i'
24: 0, # 'j'
10: 0, # 'k'
5: 3, # 'l'
13: 3, # 'm'
4: 0, # 'n'
15: 1, # 'o'
26: 0, # 'p'
7: 0, # 'r'
8: 0, # 's'
9: 0, # 't'
14: 2, # 'u'
32: 0, # 'v'
57: 0, # 'w'
58: 0, # 'x'
11: 0, # 'y'
22: 2, # 'z'
63: 0, # '·'
54: 2, # 'Ç'
50: 1, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 2, # 'ç'
61: 0, # 'î'
34: 1, # 'ö'
17: 0, # 'ü'
30: 1, # 'ğ'
41: 2, # 'İ'
6: 1, # 'ı'
40: 1, # 'Ş'
19: 1, # 'ş'
},
48: { # 'P'
23: 0, # 'A'
37: 0, # 'B'
47: 2, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 2, # 'F'
36: 1, # 'G'
45: 1, # 'H'
53: 0, # 'I'
60: 0, # 'J'
16: 2, # 'K'
49: 0, # 'L'
20: 0, # 'M'
46: 1, # 'N'
42: 1, # 'O'
48: 1, # 'P'
44: 0, # 'R'
35: 1, # 'S'
31: 0, # 'T'
51: 0, # 'U'
38: 1, # 'V'
62: 0, # 'W'
43: 0, # 'Y'
56: 0, # 'Z'
1: 2, # 'a'
21: 0, # 'b'
28: 2, # 'c'
12: 0, # 'd'
2: 3, # 'e'
18: 0, # 'f'
27: 0, # 'g'
25: 0, # 'h'
3: 0, # 'i'
24: 0, # 'j'
10: 1, # 'k'
5: 0, # 'l'
13: 2, # 'm'
4: 0, # 'n'
15: 2, # 'o'
26: 0, # 'p'
7: 0, # 'r'
8: 0, # 's'
9: 0, # 't'
14: 2, # 'u'
32: 0, # 'v'
57: 0, # 'w'
58: 2, # 'x'
11: 0, # 'y'
22: 2, # 'z'
63: 0, # '·'
54: 1, # 'Ç'
50: 2, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 0, # 'ç'
61: 0, # 'î'
34: 2, # 'ö'
17: 0, # 'ü'
30: 1, # 'ğ'
41: 1, # 'İ'
6: 0, # 'ı'
40: 2, # 'Ş'
19: 1, # 'ş'
},
44: { # 'R'
23: 0, # 'A'
37: 0, # 'B'
47: 1, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 1, # 'F'
36: 0, # 'G'
45: 0, # 'H'
53: 0, # 'I'
60: 0, # 'J'
16: 3, # 'K'
49: 0, # 'L'
20: 0, # 'M'
46: 0, # 'N'
42: 0, # 'O'
48: 1, # 'P'
44: 0, # 'R'
35: 0, # 'S'
31: 0, # 'T'
51: 0, # 'U'
38: 0, # 'V'
62: 0, # 'W'
43: 1, # 'Y'
56: 0, # 'Z'
1: 3, # 'a'
21: 1, # 'b'
28: 1, # 'c'
12: 0, # 'd'
2: 2, # 'e'
18: 0, # 'f'
27: 0, # 'g'
25: 0, # 'h'
3: 0, # 'i'
24: 0, # 'j'
10: 1, # 'k'
5: 2, # 'l'
13: 2, # 'm'
4: 0, # 'n'
15: 1, # 'o'
26: 0, # 'p'
7: 0, # 'r'
8: 0, # 's'
9: 0, # 't'
14: 2, # 'u'
32: 0, # 'v'
57: 0, # 'w'
58: 0, # 'x'
11: 1, # 'y'
22: 2, # 'z'
63: 0, # '·'
54: 0, # 'Ç'
50: 1, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 1, # 'ç'
61: 0, # 'î'
34: 1, # 'ö'
17: 1, # 'ü'
30: 1, # 'ğ'
41: 0, # 'İ'
6: 2, # 'ı'
40: 1, # 'Ş'
19: 1, # 'ş'
},
35: { # 'S'
23: 0, # 'A'
37: 0, # 'B'
47: 1, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 1, # 'F'
36: 1, # 'G'
45: 1, # 'H'
53: 0, # 'I'
60: 0, # 'J'
16: 3, # 'K'
49: 1, # 'L'
20: 1, # 'M'
46: 0, # 'N'
42: 0, # 'O'
48: 1, # 'P'
44: 0, # 'R'
35: 0, # 'S'
31: 0, # 'T'
51: 1, # 'U'
38: 1, # 'V'
62: 0, # 'W'
43: 1, # 'Y'
56: 0, # 'Z'
1: 3, # 'a'
21: 0, # 'b'
28: 2, # 'c'
12: 0, # 'd'
2: 3, # 'e'
18: 0, # 'f'
27: 0, # 'g'
25: 0, # 'h'
3: 0, # 'i'
24: 0, # 'j'
10: 1, # 'k'
5: 1, # 'l'
13: 2, # 'm'
4: 1, # 'n'
15: 0, # 'o'
26: 0, # 'p'
7: 0, # 'r'
8: 0, # 's'
9: 1, # 't'
14: 2, # 'u'
32: 0, # 'v'
57: 0, # 'w'
58: 0, # 'x'
11: 0, # 'y'
22: 1, # 'z'
63: 0, # '·'
54: 2, # 'Ç'
50: 2, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 3, # 'ç'
61: 0, # 'î'
34: 1, # 'ö'
17: 0, # 'ü'
30: 0, # 'ğ'
41: 0, # 'İ'
6: 3, # 'ı'
40: 2, # 'Ş'
19: 1, # 'ş'
},
31: { # 'T'
23: 0, # 'A'
37: 0, # 'B'
47: 0, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 0, # 'F'
36: 0, # 'G'
45: 0, # 'H'
53: 0, # 'I'
60: 1, # 'J'
16: 2, # 'K'
49: 0, # 'L'
20: 1, # 'M'
46: 0, # 'N'
42: 0, # 'O'
48: 0, # 'P'
44: 0, # 'R'
35: 0, # 'S'
31: 2, # 'T'
51: 0, # 'U'
38: 0, # 'V'
62: 0, # 'W'
43: 0, # 'Y'
56: 0, # 'Z'
1: 3, # 'a'
21: 2, # 'b'
28: 0, # 'c'
12: 1, # 'd'
2: 3, # 'e'
18: 2, # 'f'
27: 2, # 'g'
25: 0, # 'h'
3: 1, # 'i'
24: 1, # 'j'
10: 2, # 'k'
5: 2, # 'l'
13: 3, # 'm'
4: 3, # 'n'
15: 0, # 'o'
26: 2, # 'p'
7: 2, # 'r'
8: 0, # 's'
9: 2, # 't'
14: 2, # 'u'
32: 1, # 'v'
57: 1, # 'w'
58: 1, # 'x'
11: 2, # 'y'
22: 0, # 'z'
63: 0, # '·'
54: 0, # 'Ç'
50: 0, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 0, # 'ç'
61: 0, # 'î'
34: 0, # 'ö'
17: 1, # 'ü'
30: 0, # 'ğ'
41: 0, # 'İ'
6: 3, # 'ı'
40: 0, # 'Ş'
19: 0, # 'ş'
},
51: { # 'U'
23: 0, # 'A'
37: 0, # 'B'
47: 0, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 1, # 'F'
36: 1, # 'G'
45: 0, # 'H'
53: 0, # 'I'
60: 0, # 'J'
16: 1, # 'K'
49: 0, # 'L'
20: 0, # 'M'
46: 1, # 'N'
42: 0, # 'O'
48: 1, # 'P'
44: 0, # 'R'
35: 0, # 'S'
31: 0, # 'T'
51: 1, # 'U'
38: 1, # 'V'
62: 0, # 'W'
43: 0, # 'Y'
56: 0, # 'Z'
1: 3, # 'a'
21: 0, # 'b'
28: 1, # 'c'
12: 0, # 'd'
2: 3, # 'e'
18: 0, # 'f'
27: 2, # 'g'
25: 0, # 'h'
3: 0, # 'i'
24: 0, # 'j'
10: 1, # 'k'
5: 1, # 'l'
13: 3, # 'm'
4: 2, # 'n'
15: 0, # 'o'
26: 1, # 'p'
7: 0, # 'r'
8: 0, # 's'
9: 0, # 't'
14: 2, # 'u'
32: 0, # 'v'
57: 0, # 'w'
58: 0, # 'x'
11: 0, # 'y'
22: 2, # 'z'
63: 0, # '·'
54: 1, # 'Ç'
50: 1, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 0, # 'ç'
61: 0, # 'î'
34: 0, # 'ö'
17: 0, # 'ü'
30: 1, # 'ğ'
41: 1, # 'İ'
6: 2, # 'ı'
40: 0, # 'Ş'
19: 1, # 'ş'
},
38: { # 'V'
23: 1, # 'A'
37: 1, # 'B'
47: 1, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 2, # 'F'
36: 0, # 'G'
45: 0, # 'H'
53: 0, # 'I'
60: 0, # 'J'
16: 3, # 'K'
49: 0, # 'L'
20: 3, # 'M'
46: 0, # 'N'
42: 0, # 'O'
48: 1, # 'P'
44: 1, # 'R'
35: 0, # 'S'
31: 0, # 'T'
51: 1, # 'U'
38: 1, # 'V'
62: 0, # 'W'
43: 0, # 'Y'
56: 0, # 'Z'
1: 3, # 'a'
21: 0, # 'b'
28: 2, # 'c'
12: 0, # 'd'
2: 3, # 'e'
18: 0, # 'f'
27: 0, # 'g'
25: 0, # 'h'
3: 0, # 'i'
24: 0, # 'j'
10: 0, # 'k'
5: 2, # 'l'
13: 2, # 'm'
4: 0, # 'n'
15: 2, # 'o'
26: 0, # 'p'
7: 0, # 'r'
8: 0, # 's'
9: 1, # 't'
14: 3, # 'u'
32: 0, # 'v'
57: 0, # 'w'
58: 0, # 'x'
11: 1, # 'y'
22: 2, # 'z'
63: 0, # '·'
54: 1, # 'Ç'
50: 1, # 'Ö'
55: 0, # 'Ü'
59: 1, # 'â'
33: 2, # 'ç'
61: 0, # 'î'
34: 1, # 'ö'
17: 0, # 'ü'
30: 1, # 'ğ'
41: 1, # 'İ'
6: 3, # 'ı'
40: 2, # 'Ş'
19: 1, # 'ş'
},
62: { # 'W'
23: 0, # 'A'
37: 0, # 'B'
47: 0, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 0, # 'F'
36: 0, # 'G'
45: 0, # 'H'
53: 0, # 'I'
60: 0, # 'J'
16: 0, # 'K'
49: 0, # 'L'
20: 0, # 'M'
46: 0, # 'N'
42: 0, # 'O'
48: 0, # 'P'
44: 0, # 'R'
35: 0, # 'S'
31: 0, # 'T'
51: 0, # 'U'
38: 0, # 'V'
62: 0, # 'W'
43: 0, # 'Y'
56: 0, # 'Z'
1: 0, # 'a'
21: 0, # 'b'
28: 0, # 'c'
12: 0, # 'd'
2: 0, # 'e'
18: 0, # 'f'
27: 0, # 'g'
25: 0, # 'h'
3: 0, # 'i'
24: 0, # 'j'
10: 0, # 'k'
5: 0, # 'l'
13: 0, # 'm'
4: 0, # 'n'
15: 0, # 'o'
26: 0, # 'p'
7: 0, # 'r'
8: 0, # 's'
9: 0, # 't'
14: 0, # 'u'
32: 0, # 'v'
57: 0, # 'w'
58: 0, # 'x'
11: 0, # 'y'
22: 0, # 'z'
63: 0, # '·'
54: 0, # 'Ç'
50: 0, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 0, # 'ç'
61: 0, # 'î'
34: 0, # 'ö'
17: 0, # 'ü'
30: 0, # 'ğ'
41: 0, # 'İ'
6: 0, # 'ı'
40: 0, # 'Ş'
19: 0, # 'ş'
},
43: { # 'Y'
23: 0, # 'A'
37: 0, # 'B'
47: 1, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 2, # 'F'
36: 0, # 'G'
45: 1, # 'H'
53: 1, # 'I'
60: 0, # 'J'
16: 2, # 'K'
49: 0, # 'L'
20: 0, # 'M'
46: 2, # 'N'
42: 0, # 'O'
48: 2, # 'P'
44: 1, # 'R'
35: 1, # 'S'
31: 0, # 'T'
51: 1, # 'U'
38: 2, # 'V'
62: 0, # 'W'
43: 0, # 'Y'
56: 0, # 'Z'
1: 3, # 'a'
21: 0, # 'b'
28: 2, # 'c'
12: 0, # 'd'
2: 2, # 'e'
18: 0, # 'f'
27: 0, # 'g'
25: 0, # 'h'
3: 0, # 'i'
24: 1, # 'j'
10: 1, # 'k'
5: 1, # 'l'
13: 3, # 'm'
4: 0, # 'n'
15: 2, # 'o'
26: 0, # 'p'
7: 0, # 'r'
8: 0, # 's'
9: 0, # 't'
14: 3, # 'u'
32: 0, # 'v'
57: 0, # 'w'
58: 1, # 'x'
11: 0, # 'y'
22: 2, # 'z'
63: 0, # '·'
54: 1, # 'Ç'
50: 2, # 'Ö'
55: 1, # 'Ü'
59: 1, # 'â'
33: 0, # 'ç'
61: 0, # 'î'
34: 1, # 'ö'
17: 0, # 'ü'
30: 1, # 'ğ'
41: 1, # 'İ'
6: 0, # 'ı'
40: 2, # 'Ş'
19: 1, # 'ş'
},
56: { # 'Z'
23: 0, # 'A'
37: 0, # 'B'
47: 0, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 0, # 'F'
36: 0, # 'G'
45: 0, # 'H'
53: 0, # 'I'
60: 0, # 'J'
16: 0, # 'K'
49: 0, # 'L'
20: 0, # 'M'
46: 0, # 'N'
42: 0, # 'O'
48: 0, # 'P'
44: 0, # 'R'
35: 0, # 'S'
31: 0, # 'T'
51: 0, # 'U'
38: 0, # 'V'
62: 0, # 'W'
43: 0, # 'Y'
56: 2, # 'Z'
1: 2, # 'a'
21: 1, # 'b'
28: 0, # 'c'
12: 0, # 'd'
2: 2, # 'e'
18: 0, # 'f'
27: 0, # 'g'
25: 0, # 'h'
3: 2, # 'i'
24: 1, # 'j'
10: 0, # 'k'
5: 0, # 'l'
13: 1, # 'm'
4: 1, # 'n'
15: 0, # 'o'
26: 0, # 'p'
7: 1, # 'r'
8: 1, # 's'
9: 0, # 't'
14: 2, # 'u'
32: 0, # 'v'
57: 0, # 'w'
58: 0, # 'x'
11: 0, # 'y'
22: 0, # 'z'
63: 0, # '·'
54: 0, # 'Ç'
50: 0, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 0, # 'ç'
61: 0, # 'î'
34: 0, # 'ö'
17: 1, # 'ü'
30: 0, # 'ğ'
41: 0, # 'İ'
6: 1, # 'ı'
40: 0, # 'Ş'
19: 0, # 'ş'
},
1: { # 'a'
23: 3, # 'A'
37: 0, # 'B'
47: 1, # 'C'
39: 0, # 'D'
29: 3, # 'E'
52: 0, # 'F'
36: 1, # 'G'
45: 1, # 'H'
53: 0, # 'I'
60: 0, # 'J'
16: 0, # 'K'
49: 0, # 'L'
20: 3, # 'M'
46: 1, # 'N'
42: 0, # 'O'
48: 1, # 'P'
44: 0, # 'R'
35: 0, # 'S'
31: 3, # 'T'
51: 0, # 'U'
38: 1, # 'V'
62: 0, # 'W'
43: 0, # 'Y'
56: 2, # 'Z'
1: 2, # 'a'
21: 3, # 'b'
28: 0, # 'c'
12: 3, # 'd'
2: 2, # 'e'
18: 3, # 'f'
27: 3, # 'g'
25: 3, # 'h'
3: 3, # 'i'
24: 3, # 'j'
10: 3, # 'k'
5: 0, # 'l'
13: 2, # 'm'
4: 3, # 'n'
15: 1, # 'o'
26: 3, # 'p'
7: 3, # 'r'
8: 3, # 's'
9: 3, # 't'
14: 3, # 'u'
32: 3, # 'v'
57: 2, # 'w'
58: 0, # 'x'
11: 3, # 'y'
22: 0, # 'z'
63: 1, # '·'
54: 0, # 'Ç'
50: 0, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 1, # 'ç'
61: 1, # 'î'
34: 1, # 'ö'
17: 3, # 'ü'
30: 0, # 'ğ'
41: 0, # 'İ'
6: 3, # 'ı'
40: 0, # 'Ş'
19: 1, # 'ş'
},
21: { # 'b'
23: 0, # 'A'
37: 0, # 'B'
47: 0, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 0, # 'F'
36: 1, # 'G'
45: 0, # 'H'
53: 0, # 'I'
60: 1, # 'J'
16: 2, # 'K'
49: 0, # 'L'
20: 2, # 'M'
46: 0, # 'N'
42: 0, # 'O'
48: 0, # 'P'
44: 0, # 'R'
35: 0, # 'S'
31: 1, # 'T'
51: 0, # 'U'
38: 0, # 'V'
62: 0, # 'W'
43: 1, # 'Y'
56: 0, # 'Z'
1: 3, # 'a'
21: 2, # 'b'
28: 0, # 'c'
12: 3, # 'd'
2: 3, # 'e'
18: 0, # 'f'
27: 3, # 'g'
25: 1, # 'h'
3: 3, # 'i'
24: 2, # 'j'
10: 3, # 'k'
5: 3, # 'l'
13: 3, # 'm'
4: 3, # 'n'
15: 0, # 'o'
26: 3, # 'p'
7: 1, # 'r'
8: 2, # 's'
9: 2, # 't'
14: 2, # 'u'
32: 1, # 'v'
57: 0, # 'w'
58: 1, # 'x'
11: 3, # 'y'
22: 0, # 'z'
63: 0, # '·'
54: 0, # 'Ç'
50: 0, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 1, # 'ç'
61: 0, # 'î'
34: 0, # 'ö'
17: 0, # 'ü'
30: 1, # 'ğ'
41: 0, # 'İ'
6: 2, # 'ı'
40: 0, # 'Ş'
19: 0, # 'ş'
},
28: { # 'c'
23: 0, # 'A'
37: 1, # 'B'
47: 1, # 'C'
39: 1, # 'D'
29: 2, # 'E'
52: 0, # 'F'
36: 2, # 'G'
45: 2, # 'H'
53: 1, # 'I'
60: 0, # 'J'
16: 0, # 'K'
49: 0, # 'L'
20: 2, # 'M'
46: 1, # 'N'
42: 1, # 'O'
48: 2, # 'P'
44: 1, # 'R'
35: 1, # 'S'
31: 2, # 'T'
51: 2, # 'U'
38: 2, # 'V'
62: 0, # 'W'
43: 3, # 'Y'
56: 0, # 'Z'
1: 1, # 'a'
21: 1, # 'b'
28: 2, # 'c'
12: 2, # 'd'
2: 1, # 'e'
18: 1, # 'f'
27: 2, # 'g'
25: 2, # 'h'
3: 3, # 'i'
24: 1, # 'j'
10: 3, # 'k'
5: 0, # 'l'
13: 2, # 'm'
4: 3, # 'n'
15: 2, # 'o'
26: 2, # 'p'
7: 3, # 'r'
8: 3, # 's'
9: 3, # 't'
14: 1, # 'u'
32: 0, # 'v'
57: 1, # 'w'
58: 0, # 'x'
11: 2, # 'y'
22: 1, # 'z'
63: 1, # '·'
54: 0, # 'Ç'
50: 0, # 'Ö'
55: 1, # 'Ü'
59: 0, # 'â'
33: 0, # 'ç'
61: 1, # 'î'
34: 2, # 'ö'
17: 2, # 'ü'
30: 2, # 'ğ'
41: 1, # 'İ'
6: 3, # 'ı'
40: 0, # 'Ş'
19: 2, # 'ş'
},
12: { # 'd'
23: 1, # 'A'
37: 0, # 'B'
47: 0, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 0, # 'F'
36: 0, # 'G'
45: 0, # 'H'
53: 0, # 'I'
60: 2, # 'J'
16: 3, # 'K'
49: 0, # 'L'
20: 3, # 'M'
46: 0, # 'N'
42: 0, # 'O'
48: 0, # 'P'
44: 0, # 'R'
35: 1, # 'S'
31: 1, # 'T'
51: 0, # 'U'
38: 0, # 'V'
62: 0, # 'W'
43: 0, # 'Y'
56: 0, # 'Z'
1: 3, # 'a'
21: 2, # 'b'
28: 1, # 'c'
12: 3, # 'd'
2: 3, # 'e'
18: 1, # 'f'
27: 3, # 'g'
25: 3, # 'h'
3: 2, # 'i'
24: 3, # 'j'
10: 2, # 'k'
5: 3, # 'l'
13: 3, # 'm'
4: 3, # 'n'
15: 1, # 'o'
26: 2, # 'p'
7: 3, # 'r'
8: 2, # 's'
9: 2, # 't'
14: 3, # 'u'
32: 1, # 'v'
57: 0, # 'w'
58: 1, # 'x'
11: 3, # 'y'
22: 1, # 'z'
63: 1, # '·'
54: 0, # 'Ç'
50: 0, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 0, # 'ç'
61: 0, # 'î'
34: 0, # 'ö'
17: 1, # 'ü'
30: 0, # 'ğ'
41: 0, # 'İ'
6: 2, # 'ı'
40: 0, # 'Ş'
19: 0, # 'ş'
},
2: { # 'e'
23: 2, # 'A'
37: 0, # 'B'
47: 2, # 'C'
39: 0, # 'D'
29: 3, # 'E'
52: 1, # 'F'
36: 0, # 'G'
45: 0, # 'H'
53: 0, # 'I'
60: 0, # 'J'
16: 1, # 'K'
49: 0, # 'L'
20: 3, # 'M'
46: 1, # 'N'
42: 0, # 'O'
48: 1, # 'P'
44: 1, # 'R'
35: 0, # 'S'
31: 3, # 'T'
51: 0, # 'U'
38: 1, # 'V'
62: 0, # 'W'
43: 1, # 'Y'
56: 0, # 'Z'
1: 3, # 'a'
21: 3, # 'b'
28: 0, # 'c'
12: 3, # 'd'
2: 2, # 'e'
18: 3, # 'f'
27: 3, # 'g'
25: 3, # 'h'
3: 3, # 'i'
24: 3, # 'j'
10: 3, # 'k'
5: 0, # 'l'
13: 2, # 'm'
4: 3, # 'n'
15: 1, # 'o'
26: 3, # 'p'
7: 3, # 'r'
8: 3, # 's'
9: 3, # 't'
14: 3, # 'u'
32: 3, # 'v'
57: 2, # 'w'
58: 0, # 'x'
11: 3, # 'y'
22: 1, # 'z'
63: 1, # '·'
54: 0, # 'Ç'
50: 0, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 1, # 'ç'
61: 0, # 'î'
34: 1, # 'ö'
17: 3, # 'ü'
30: 0, # 'ğ'
41: 0, # 'İ'
6: 3, # 'ı'
40: 0, # 'Ş'
19: 0, # 'ş'
},
18: { # 'f'
23: 0, # 'A'
37: 0, # 'B'
47: 0, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 0, # 'F'
36: 0, # 'G'
45: 0, # 'H'
53: 0, # 'I'
60: 0, # 'J'
16: 2, # 'K'
49: 0, # 'L'
20: 2, # 'M'
46: 0, # 'N'
42: 0, # 'O'
48: 0, # 'P'
44: 0, # 'R'
35: 0, # 'S'
31: 2, # 'T'
51: 0, # 'U'
38: 0, # 'V'
62: 0, # 'W'
43: 0, # 'Y'
56: 0, # 'Z'
1: 3, # 'a'
21: 1, # 'b'
28: 0, # 'c'
12: 3, # 'd'
2: 3, # 'e'
18: 2, # 'f'
27: 1, # 'g'
25: 1, # 'h'
3: 1, # 'i'
24: 1, # 'j'
10: 1, # 'k'
5: 3, # 'l'
13: 3, # 'm'
4: 3, # 'n'
15: 0, # 'o'
26: 2, # 'p'
7: 1, # 'r'
8: 3, # 's'
9: 3, # 't'
14: 1, # 'u'
32: 2, # 'v'
57: 0, # 'w'
58: 0, # 'x'
11: 1, # 'y'
22: 0, # 'z'
63: 0, # '·'
54: 0, # 'Ç'
50: 0, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 1, # 'ç'
61: 0, # 'î'
34: 0, # 'ö'
17: 1, # 'ü'
30: 0, # 'ğ'
41: 0, # 'İ'
6: 1, # 'ı'
40: 0, # 'Ş'
19: 0, # 'ş'
},
27: { # 'g'
23: 0, # 'A'
37: 0, # 'B'
47: 0, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 0, # 'F'
36: 0, # 'G'
45: 0, # 'H'
53: 0, # 'I'
60: 0, # 'J'
16: 3, # 'K'
49: 0, # 'L'
20: 0, # 'M'
46: 0, # 'N'
42: 0, # 'O'
48: 0, # 'P'
44: 0, # 'R'
35: 1, # 'S'
31: 1, # 'T'
51: 0, # 'U'
38: 2, # 'V'
62: 0, # 'W'
43: 0, # 'Y'
56: 0, # 'Z'
1: 3, # 'a'
21: 1, # 'b'
28: 0, # 'c'
12: 1, # 'd'
2: 3, # 'e'
18: 0, # 'f'
27: 2, # 'g'
25: 1, # 'h'
3: 2, # 'i'
24: 3, # 'j'
10: 2, # 'k'
5: 3, # 'l'
13: 3, # 'm'
4: 2, # 'n'
15: 0, # 'o'
26: 1, # 'p'
7: 2, # 'r'
8: 2, # 's'
9: 3, # 't'
14: 3, # 'u'
32: 1, # 'v'
57: 0, # 'w'
58: 0, # 'x'
11: 1, # 'y'
22: 0, # 'z'
63: 1, # '·'
54: 0, # 'Ç'
50: 0, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 0, # 'ç'
61: 0, # 'î'
34: 0, # 'ö'
17: 0, # 'ü'
30: 0, # 'ğ'
41: 0, # 'İ'
6: 2, # 'ı'
40: 0, # 'Ş'
19: 0, # 'ş'
},
25: { # 'h'
23: 0, # 'A'
37: 0, # 'B'
47: 0, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 0, # 'F'
36: 0, # 'G'
45: 0, # 'H'
53: 0, # 'I'
60: 0, # 'J'
16: 2, # 'K'
49: 0, # 'L'
20: 0, # 'M'
46: 0, # 'N'
42: 0, # 'O'
48: 0, # 'P'
44: 0, # 'R'
35: 0, # 'S'
31: 0, # 'T'
51: 0, # 'U'
38: 0, # 'V'
62: 0, # 'W'
43: 0, # 'Y'
56: 0, # 'Z'
1: 3, # 'a'
21: 0, # 'b'
28: 0, # 'c'
12: 2, # 'd'
2: 3, # 'e'
18: 0, # 'f'
27: 1, # 'g'
25: 2, # 'h'
3: 2, # 'i'
24: 3, # 'j'
10: 3, # 'k'
5: 3, # 'l'
13: 3, # 'm'
4: 3, # 'n'
15: 1, # 'o'
26: 1, # 'p'
7: 3, # 'r'
8: 3, # 's'
9: 2, # 't'
14: 3, # 'u'
32: 2, # 'v'
57: 1, # 'w'
58: 0, # 'x'
11: 1, # 'y'
22: 0, # 'z'
63: 0, # '·'
54: 0, # 'Ç'
50: 0, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 0, # 'ç'
61: 0, # 'î'
34: 0, # 'ö'
17: 0, # 'ü'
30: 0, # 'ğ'
41: 0, # 'İ'
6: 3, # 'ı'
40: 0, # 'Ş'
19: 0, # 'ş'
},
3: { # 'i'
23: 2, # 'A'
37: 0, # 'B'
47: 0, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 0, # 'F'
36: 0, # 'G'
45: 0, # 'H'
53: 0, # 'I'
60: 1, # 'J'
16: 3, # 'K'
49: 0, # 'L'
20: 3, # 'M'
46: 0, # 'N'
42: 1, # 'O'
48: 0, # 'P'
44: 0, # 'R'
35: 1, # 'S'
31: 2, # 'T'
51: 0, # 'U'
38: 1, # 'V'
62: 0, # 'W'
43: 0, # 'Y'
56: 0, # 'Z'
1: 3, # 'a'
21: 2, # 'b'
28: 0, # 'c'
12: 3, # 'd'
2: 3, # 'e'
18: 2, # 'f'
27: 3, # 'g'
25: 1, # 'h'
3: 3, # 'i'
24: 2, # 'j'
10: 3, # 'k'
5: 3, # 'l'
13: 3, # 'm'
4: 3, # 'n'
15: 1, # 'o'
26: 3, # 'p'
7: 3, # 'r'
8: 3, # 's'
9: 3, # 't'
14: 3, # 'u'
32: 2, # 'v'
57: 1, # 'w'
58: 1, # 'x'
11: 3, # 'y'
22: 1, # 'z'
63: 1, # '·'
54: 0, # 'Ç'
50: 0, # 'Ö'
55: 1, # 'Ü'
59: 0, # 'â'
33: 2, # 'ç'
61: 0, # 'î'
34: 0, # 'ö'
17: 3, # 'ü'
30: 0, # 'ğ'
41: 1, # 'İ'
6: 2, # 'ı'
40: 0, # 'Ş'
19: 0, # 'ş'
},
24: { # 'j'
23: 0, # 'A'
37: 0, # 'B'
47: 0, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 0, # 'F'
36: 0, # 'G'
45: 0, # 'H'
53: 0, # 'I'
60: 1, # 'J'
16: 2, # 'K'
49: 0, # 'L'
20: 2, # 'M'
46: 0, # 'N'
42: 0, # 'O'
48: 1, # 'P'
44: 0, # 'R'
35: 0, # 'S'
31: 1, # 'T'
51: 0, # 'U'
38: 0, # 'V'
62: 0, # 'W'
43: 0, # 'Y'
56: 1, # 'Z'
1: 3, # 'a'
21: 1, # 'b'
28: 1, # 'c'
12: 3, # 'd'
2: 3, # 'e'
18: 2, # 'f'
27: 1, # 'g'
25: 1, # 'h'
3: 2, # 'i'
24: 1, # 'j'
10: 2, # 'k'
5: 2, # 'l'
13: 3, # 'm'
4: 2, # 'n'
15: 0, # 'o'
26: 1, # 'p'
7: 2, # 'r'
8: 3, # 's'
9: 2, # 't'
14: 3, # 'u'
32: 2, # 'v'
57: 0, # 'w'
58: 2, # 'x'
11: 1, # 'y'
22: 0, # 'z'
63: 0, # '·'
54: 0, # 'Ç'
50: 0, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 1, # 'ç'
61: 0, # 'î'
34: 0, # 'ö'
17: 1, # 'ü'
30: 0, # 'ğ'
41: 0, # 'İ'
6: 3, # 'ı'
40: 0, # 'Ş'
19: 0, # 'ş'
},
10: { # 'k'
23: 0, # 'A'
37: 0, # 'B'
47: 0, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 0, # 'F'
36: 0, # 'G'
45: 0, # 'H'
53: 0, # 'I'
60: 0, # 'J'
16: 3, # 'K'
49: 0, # 'L'
20: 2, # 'M'
46: 0, # 'N'
42: 0, # 'O'
48: 0, # 'P'
44: 0, # 'R'
35: 0, # 'S'
31: 3, # 'T'
51: 0, # 'U'
38: 1, # 'V'
62: 0, # 'W'
43: 0, # 'Y'
56: 1, # 'Z'
1: 3, # 'a'
21: 2, # 'b'
28: 0, # 'c'
12: 2, # 'd'
2: 3, # 'e'
18: 1, # 'f'
27: 2, # 'g'
25: 2, # 'h'
3: 3, # 'i'
24: 2, # 'j'
10: 2, # 'k'
5: 3, # 'l'
13: 3, # 'm'
4: 3, # 'n'
15: 0, # 'o'
26: 3, # 'p'
7: 2, # 'r'
8: 2, # 's'
9: 2, # 't'
14: 3, # 'u'
32: 0, # 'v'
57: 0, # 'w'
58: 1, # 'x'
11: 3, # 'y'
22: 0, # 'z'
63: 1, # '·'
54: 0, # 'Ç'
50: 0, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 3, # 'ç'
61: 0, # 'î'
34: 1, # 'ö'
17: 3, # 'ü'
30: 1, # 'ğ'
41: 0, # 'İ'
6: 3, # 'ı'
40: 0, # 'Ş'
19: 1, # 'ş'
},
5: { # 'l'
23: 0, # 'A'
37: 0, # 'B'
47: 0, # 'C'
39: 0, # 'D'
29: 3, # 'E'
52: 0, # 'F'
36: 0, # 'G'
45: 0, # 'H'
53: 0, # 'I'
60: 0, # 'J'
16: 0, # 'K'
49: 0, # 'L'
20: 2, # 'M'
46: 0, # 'N'
42: 0, # 'O'
48: 0, # 'P'
44: 0, # 'R'
35: 0, # 'S'
31: 1, # 'T'
51: 0, # 'U'
38: 0, # 'V'
62: 0, # 'W'
43: 0, # 'Y'
56: 0, # 'Z'
1: 0, # 'a'
21: 3, # 'b'
28: 0, # 'c'
12: 3, # 'd'
2: 1, # 'e'
18: 3, # 'f'
27: 3, # 'g'
25: 2, # 'h'
3: 3, # 'i'
24: 2, # 'j'
10: 3, # 'k'
5: 1, # 'l'
13: 1, # 'm'
4: 3, # 'n'
15: 0, # 'o'
26: 2, # 'p'
7: 3, # 'r'
8: 3, # 's'
9: 3, # 't'
14: 2, # 'u'
32: 2, # 'v'
57: 0, # 'w'
58: 0, # 'x'
11: 3, # 'y'
22: 0, # 'z'
63: 0, # '·'
54: 0, # 'Ç'
50: 0, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 1, # 'ç'
61: 0, # 'î'
34: 0, # 'ö'
17: 2, # 'ü'
30: 0, # 'ğ'
41: 0, # 'İ'
6: 3, # 'ı'
40: 0, # 'Ş'
19: 0, # 'ş'
},
13: { # 'm'
23: 1, # 'A'
37: 0, # 'B'
47: 0, # 'C'
39: 0, # 'D'
29: 3, # 'E'
52: 0, # 'F'
36: 0, # 'G'
45: 0, # 'H'
53: 0, # 'I'
60: 0, # 'J'
16: 0, # 'K'
49: 0, # 'L'
20: 3, # 'M'
46: 0, # 'N'
42: 0, # 'O'
48: 0, # 'P'
44: 0, # 'R'
35: 0, # 'S'
31: 3, # 'T'
51: 0, # 'U'
38: 0, # 'V'
62: 0, # 'W'
43: 1, # 'Y'
56: 0, # 'Z'
1: 2, # 'a'
21: 3, # 'b'
28: 0, # 'c'
12: 3, # 'd'
2: 2, # 'e'
18: 3, # 'f'
27: 3, # 'g'
25: 3, # 'h'
3: 3, # 'i'
24: 3, # 'j'
10: 3, # 'k'
5: 0, # 'l'
13: 2, # 'm'
4: 3, # 'n'
15: 1, # 'o'
26: 2, # 'p'
7: 3, # 'r'
8: 3, # 's'
9: 3, # 't'
14: 2, # 'u'
32: 2, # 'v'
57: 1, # 'w'
58: 0, # 'x'
11: 3, # 'y'
22: 0, # 'z'
63: 0, # '·'
54: 0, # 'Ç'
50: 0, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 0, # 'ç'
61: 0, # 'î'
34: 0, # 'ö'
17: 3, # 'ü'
30: 0, # 'ğ'
41: 0, # 'İ'
6: 3, # 'ı'
40: 0, # 'Ş'
19: 1, # 'ş'
},
4: { # 'n'
23: 1, # 'A'
37: 0, # 'B'
47: 0, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 0, # 'F'
36: 0, # 'G'
45: 1, # 'H'
53: 0, # 'I'
60: 2, # 'J'
16: 3, # 'K'
49: 0, # 'L'
20: 3, # 'M'
46: 0, # 'N'
42: 0, # 'O'
48: 0, # 'P'
44: 0, # 'R'
35: 0, # 'S'
31: 2, # 'T'
51: 0, # 'U'
38: 0, # 'V'
62: 0, # 'W'
43: 0, # 'Y'
56: 0, # 'Z'
1: 3, # 'a'
21: 2, # 'b'
28: 1, # 'c'
12: 3, # 'd'
2: 3, # 'e'
18: 1, # 'f'
27: 2, # 'g'
25: 3, # 'h'
3: 2, # 'i'
24: 2, # 'j'
10: 3, # 'k'
5: 3, # 'l'
13: 3, # 'm'
4: 3, # 'n'
15: 1, # 'o'
26: 3, # 'p'
7: 2, # 'r'
8: 3, # 's'
9: 3, # 't'
14: 3, # 'u'
32: 2, # 'v'
57: 0, # 'w'
58: 2, # 'x'
11: 3, # 'y'
22: 0, # 'z'
63: 0, # '·'
54: 0, # 'Ç'
50: 0, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 1, # 'ç'
61: 0, # 'î'
34: 0, # 'ö'
17: 2, # 'ü'
30: 0, # 'ğ'
41: 0, # 'İ'
6: 1, # 'ı'
40: 0, # 'Ş'
19: 0, # 'ş'
},
15: { # 'o'
23: 0, # 'A'
37: 0, # 'B'
47: 1, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 2, # 'F'
36: 1, # 'G'
45: 1, # 'H'
53: 1, # 'I'
60: 0, # 'J'
16: 3, # 'K'
49: 2, # 'L'
20: 0, # 'M'
46: 2, # 'N'
42: 1, # 'O'
48: 2, # 'P'
44: 1, # 'R'
35: 0, # 'S'
31: 0, # 'T'
51: 0, # 'U'
38: 0, # 'V'
62: 0, # 'W'
43: 0, # 'Y'
56: 0, # 'Z'
1: 3, # 'a'
21: 0, # 'b'
28: 2, # 'c'
12: 0, # 'd'
2: 3, # 'e'
18: 0, # 'f'
27: 0, # 'g'
25: 0, # 'h'
3: 1, # 'i'
24: 2, # 'j'
10: 1, # 'k'
5: 3, # 'l'
13: 3, # 'm'
4: 2, # 'n'
15: 2, # 'o'
26: 0, # 'p'
7: 1, # 'r'
8: 0, # 's'
9: 0, # 't'
14: 3, # 'u'
32: 0, # 'v'
57: 0, # 'w'
58: 2, # 'x'
11: 0, # 'y'
22: 2, # 'z'
63: 0, # '·'
54: 1, # 'Ç'
50: 2, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 3, # 'ç'
61: 0, # 'î'
34: 1, # 'ö'
17: 0, # 'ü'
30: 2, # 'ğ'
41: 2, # 'İ'
6: 3, # 'ı'
40: 2, # 'Ş'
19: 2, # 'ş'
},
26: { # 'p'
23: 0, # 'A'
37: 0, # 'B'
47: 0, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 0, # 'F'
36: 0, # 'G'
45: 0, # 'H'
53: 0, # 'I'
60: 0, # 'J'
16: 3, # 'K'
49: 0, # 'L'
20: 1, # 'M'
46: 0, # 'N'
42: 0, # 'O'
48: 0, # 'P'
44: 0, # 'R'
35: 0, # 'S'
31: 0, # 'T'
51: 0, # 'U'
38: 0, # 'V'
62: 0, # 'W'
43: 0, # 'Y'
56: 0, # 'Z'
1: 3, # 'a'
21: 1, # 'b'
28: 0, # 'c'
12: 1, # 'd'
2: 3, # 'e'
18: 0, # 'f'
27: 1, # 'g'
25: 1, # 'h'
3: 2, # 'i'
24: 3, # 'j'
10: 1, # 'k'
5: 3, # 'l'
13: 3, # 'm'
4: 2, # 'n'
15: 0, # 'o'
26: 2, # 'p'
7: 2, # 'r'
8: 1, # 's'
9: 1, # 't'
14: 3, # 'u'
32: 0, # 'v'
57: 0, # 'w'
58: 1, # 'x'
11: 1, # 'y'
22: 0, # 'z'
63: 0, # '·'
54: 0, # 'Ç'
50: 0, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 3, # 'ç'
61: 0, # 'î'
34: 0, # 'ö'
17: 1, # 'ü'
30: 0, # 'ğ'
41: 0, # 'İ'
6: 3, # 'ı'
40: 0, # 'Ş'
19: 0, # 'ş'
},
7: { # 'r'
23: 0, # 'A'
37: 0, # 'B'
47: 0, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 1, # 'F'
36: 0, # 'G'
45: 0, # 'H'
53: 0, # 'I'
60: 2, # 'J'
16: 3, # 'K'
49: 0, # 'L'
20: 2, # 'M'
46: 0, # 'N'
42: 0, # 'O'
48: 0, # 'P'
44: 0, # 'R'
35: 0, # 'S'
31: 2, # 'T'
51: 1, # 'U'
38: 0, # 'V'
62: 0, # 'W'
43: 0, # 'Y'
56: 1, # 'Z'
1: 3, # 'a'
21: 1, # 'b'
28: 0, # 'c'
12: 3, # 'd'
2: 3, # 'e'
18: 0, # 'f'
27: 2, # 'g'
25: 3, # 'h'
3: 2, # 'i'
24: 2, # 'j'
10: 3, # 'k'
5: 3, # 'l'
13: 3, # 'm'
4: 3, # 'n'
15: 0, # 'o'
26: 2, # 'p'
7: 3, # 'r'
8: 3, # 's'
9: 3, # 't'
14: 3, # 'u'
32: 2, # 'v'
57: 0, # 'w'
58: 1, # 'x'
11: 2, # 'y'
22: 0, # 'z'
63: 1, # '·'
54: 0, # 'Ç'
50: 0, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 2, # 'ç'
61: 0, # 'î'
34: 0, # 'ö'
17: 3, # 'ü'
30: 0, # 'ğ'
41: 0, # 'İ'
6: 2, # 'ı'
40: 0, # 'Ş'
19: 0, # 'ş'
},
8: { # 's'
23: 1, # 'A'
37: 0, # 'B'
47: 0, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 0, # 'F'
36: 1, # 'G'
45: 0, # 'H'
53: 0, # 'I'
60: 0, # 'J'
16: 3, # 'K'
49: 0, # 'L'
20: 3, # 'M'
46: 0, # 'N'
42: 0, # 'O'
48: 0, # 'P'
44: 0, # 'R'
35: 0, # 'S'
31: 2, # 'T'
51: 0, # 'U'
38: 0, # 'V'
62: 0, # 'W'
43: 0, # 'Y'
56: 1, # 'Z'
1: 3, # 'a'
21: 2, # 'b'
28: 1, # 'c'
12: 3, # 'd'
2: 3, # 'e'
18: 0, # 'f'
27: 2, # 'g'
25: 2, # 'h'
3: 2, # 'i'
24: 3, # 'j'
10: 3, # 'k'
5: 3, # 'l'
13: 3, # 'm'
4: 3, # 'n'
15: 0, # 'o'
26: 3, # 'p'
7: 3, # 'r'
8: 3, # 's'
9: 3, # 't'
14: 3, # 'u'
32: 2, # 'v'
57: 0, # 'w'
58: 1, # 'x'
11: 2, # 'y'
22: 1, # 'z'
63: 0, # '·'
54: 0, # 'Ç'
50: 0, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 2, # 'ç'
61: 0, # 'î'
34: 0, # 'ö'
17: 2, # 'ü'
30: 0, # 'ğ'
41: 0, # 'İ'
6: 3, # 'ı'
40: 0, # 'Ş'
19: 1, # 'ş'
},
9: { # 't'
23: 0, # 'A'
37: 0, # 'B'
47: 0, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 0, # 'F'
36: 0, # 'G'
45: 0, # 'H'
53: 0, # 'I'
60: 1, # 'J'
16: 3, # 'K'
49: 0, # 'L'
20: 2, # 'M'
46: 0, # 'N'
42: 0, # 'O'
48: 0, # 'P'
44: 0, # 'R'
35: 0, # 'S'
31: 2, # 'T'
51: 0, # 'U'
38: 0, # 'V'
62: 0, # 'W'
43: 0, # 'Y'
56: 1, # 'Z'
1: 3, # 'a'
21: 3, # 'b'
28: 0, # 'c'
12: 3, # 'd'
2: 3, # 'e'
18: 2, # 'f'
27: 2, # 'g'
25: 2, # 'h'
3: 2, # 'i'
24: 2, # 'j'
10: 3, # 'k'
5: 3, # 'l'
13: 3, # 'm'
4: 3, # 'n'
15: 0, # 'o'
26: 2, # 'p'
7: 3, # 'r'
8: 3, # 's'
9: 3, # 't'
14: 3, # 'u'
32: 3, # 'v'
57: 0, # 'w'
58: 2, # 'x'
11: 2, # 'y'
22: 0, # 'z'
63: 0, # '·'
54: 0, # 'Ç'
50: 0, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 3, # 'ç'
61: 0, # 'î'
34: 0, # 'ö'
17: 2, # 'ü'
30: 0, # 'ğ'
41: 0, # 'İ'
6: 3, # 'ı'
40: 0, # 'Ş'
19: 0, # 'ş'
},
14: { # 'u'
23: 3, # 'A'
37: 0, # 'B'
47: 0, # 'C'
39: 0, # 'D'
29: 3, # 'E'
52: 0, # 'F'
36: 0, # 'G'
45: 1, # 'H'
53: 0, # 'I'
60: 1, # 'J'
16: 0, # 'K'
49: 0, # 'L'
20: 3, # 'M'
46: 2, # 'N'
42: 0, # 'O'
48: 1, # 'P'
44: 0, # 'R'
35: 0, # 'S'
31: 3, # 'T'
51: 0, # 'U'
38: 0, # 'V'
62: 0, # 'W'
43: 1, # 'Y'
56: 2, # 'Z'
1: 2, # 'a'
21: 3, # 'b'
28: 0, # 'c'
12: 3, # 'd'
2: 2, # 'e'
18: 2, # 'f'
27: 3, # 'g'
25: 3, # 'h'
3: 3, # 'i'
24: 2, # 'j'
10: 3, # 'k'
5: 0, # 'l'
13: 3, # 'm'
4: 3, # 'n'
15: 0, # 'o'
26: 3, # 'p'
7: 3, # 'r'
8: 3, # 's'
9: 3, # 't'
14: 3, # 'u'
32: 2, # 'v'
57: 2, # 'w'
58: 0, # 'x'
11: 3, # 'y'
22: 0, # 'z'
63: 1, # '·'
54: 0, # 'Ç'
50: 0, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 0, # 'ç'
61: 0, # 'î'
34: 0, # 'ö'
17: 3, # 'ü'
30: 1, # 'ğ'
41: 0, # 'İ'
6: 3, # 'ı'
40: 0, # 'Ş'
19: 0, # 'ş'
},
32: { # 'v'
23: 0, # 'A'
37: 0, # 'B'
47: 0, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 0, # 'F'
36: 0, # 'G'
45: 0, # 'H'
53: 0, # 'I'
60: 0, # 'J'
16: 3, # 'K'
49: 0, # 'L'
20: 1, # 'M'
46: 0, # 'N'
42: 0, # 'O'
48: 0, # 'P'
44: 0, # 'R'
35: 0, # 'S'
31: 0, # 'T'
51: 0, # 'U'
38: 0, # 'V'
62: 0, # 'W'
43: 0, # 'Y'
56: 0, # 'Z'
1: 3, # 'a'
21: 0, # 'b'
28: 0, # 'c'
12: 3, # 'd'
2: 3, # 'e'
18: 0, # 'f'
27: 0, # 'g'
25: 0, # 'h'
3: 0, # 'i'
24: 1, # 'j'
10: 1, # 'k'
5: 3, # 'l'
13: 2, # 'm'
4: 3, # 'n'
15: 0, # 'o'
26: 1, # 'p'
7: 1, # 'r'
8: 2, # 's'
9: 3, # 't'
14: 3, # 'u'
32: 1, # 'v'
57: 0, # 'w'
58: 0, # 'x'
11: 0, # 'y'
22: 0, # 'z'
63: 0, # '·'
54: 0, # 'Ç'
50: 0, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 2, # 'ç'
61: 0, # 'î'
34: 0, # 'ö'
17: 0, # 'ü'
30: 0, # 'ğ'
41: 0, # 'İ'
6: 1, # 'ı'
40: 0, # 'Ş'
19: 0, # 'ş'
},
57: { # 'w'
23: 0, # 'A'
37: 0, # 'B'
47: 0, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 0, # 'F'
36: 0, # 'G'
45: 0, # 'H'
53: 0, # 'I'
60: 0, # 'J'
16: 0, # 'K'
49: 0, # 'L'
20: 0, # 'M'
46: 0, # 'N'
42: 0, # 'O'
48: 0, # 'P'
44: 0, # 'R'
35: 0, # 'S'
31: 0, # 'T'
51: 1, # 'U'
38: 0, # 'V'
62: 0, # 'W'
43: 0, # 'Y'
56: 0, # 'Z'
1: 1, # 'a'
21: 0, # 'b'
28: 0, # 'c'
12: 0, # 'd'
2: 2, # 'e'
18: 0, # 'f'
27: 0, # 'g'
25: 1, # 'h'
3: 0, # 'i'
24: 0, # 'j'
10: 1, # 'k'
5: 0, # 'l'
13: 0, # 'm'
4: 1, # 'n'
15: 0, # 'o'
26: 0, # 'p'
7: 0, # 'r'
8: 1, # 's'
9: 0, # 't'
14: 1, # 'u'
32: 0, # 'v'
57: 2, # 'w'
58: 0, # 'x'
11: 0, # 'y'
22: 0, # 'z'
63: 1, # '·'
54: 0, # 'Ç'
50: 0, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 0, # 'ç'
61: 0, # 'î'
34: 0, # 'ö'
17: 1, # 'ü'
30: 0, # 'ğ'
41: 0, # 'İ'
6: 0, # 'ı'
40: 0, # 'Ş'
19: 0, # 'ş'
},
58: { # 'x'
23: 0, # 'A'
37: 0, # 'B'
47: 0, # 'C'
39: 0, # 'D'
29: 1, # 'E'
52: 0, # 'F'
36: 0, # 'G'
45: 0, # 'H'
53: 0, # 'I'
60: 1, # 'J'
16: 0, # 'K'
49: 0, # 'L'
20: 1, # 'M'
46: 0, # 'N'
42: 0, # 'O'
48: 0, # 'P'
44: 0, # 'R'
35: 0, # 'S'
31: 0, # 'T'
51: 0, # 'U'
38: 0, # 'V'
62: 0, # 'W'
43: 0, # 'Y'
56: 0, # 'Z'
1: 0, # 'a'
21: 1, # 'b'
28: 0, # 'c'
12: 2, # 'd'
2: 1, # 'e'
18: 0, # 'f'
27: 0, # 'g'
25: 0, # 'h'
3: 2, # 'i'
24: 2, # 'j'
10: 1, # 'k'
5: 0, # 'l'
13: 0, # 'm'
4: 2, # 'n'
15: 0, # 'o'
26: 0, # 'p'
7: 1, # 'r'
8: 2, # 's'
9: 1, # 't'
14: 0, # 'u'
32: 0, # 'v'
57: 0, # 'w'
58: 0, # 'x'
11: 2, # 'y'
22: 0, # 'z'
63: 0, # '·'
54: 0, # 'Ç'
50: 0, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 0, # 'ç'
61: 0, # 'î'
34: 0, # 'ö'
17: 1, # 'ü'
30: 0, # 'ğ'
41: 0, # 'İ'
6: 2, # 'ı'
40: 0, # 'Ş'
19: 0, # 'ş'
},
11: { # 'y'
23: 1, # 'A'
37: 0, # 'B'
47: 0, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 0, # 'F'
36: 0, # 'G'
45: 0, # 'H'
53: 0, # 'I'
60: 1, # 'J'
16: 3, # 'K'
49: 0, # 'L'
20: 1, # 'M'
46: 0, # 'N'
42: 0, # 'O'
48: 0, # 'P'
44: 0, # 'R'
35: 0, # 'S'
31: 1, # 'T'
51: 0, # 'U'
38: 0, # 'V'
62: 0, # 'W'
43: 1, # 'Y'
56: 1, # 'Z'
1: 3, # 'a'
21: 1, # 'b'
28: 0, # 'c'
12: 2, # 'd'
2: 3, # 'e'
18: 0, # 'f'
27: 2, # 'g'
25: 2, # 'h'
3: 2, # 'i'
24: 1, # 'j'
10: 2, # 'k'
5: 3, # 'l'
13: 3, # 'm'
4: 3, # 'n'
15: 0, # 'o'
26: 1, # 'p'
7: 2, # 'r'
8: 1, # 's'
9: 2, # 't'
14: 3, # 'u'
32: 0, # 'v'
57: 0, # 'w'
58: 1, # 'x'
11: 3, # 'y'
22: 0, # 'z'
63: 0, # '·'
54: 0, # 'Ç'
50: 0, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 3, # 'ç'
61: 0, # 'î'
34: 0, # 'ö'
17: 2, # 'ü'
30: 0, # 'ğ'
41: 0, # 'İ'
6: 3, # 'ı'
40: 0, # 'Ş'
19: 0, # 'ş'
},
22: { # 'z'
23: 2, # 'A'
37: 2, # 'B'
47: 1, # 'C'
39: 2, # 'D'
29: 3, # 'E'
52: 1, # 'F'
36: 2, # 'G'
45: 2, # 'H'
53: 1, # 'I'
60: 0, # 'J'
16: 0, # 'K'
49: 0, # 'L'
20: 3, # 'M'
46: 2, # 'N'
42: 2, # 'O'
48: 2, # 'P'
44: 1, # 'R'
35: 1, # 'S'
31: 3, # 'T'
51: 2, # 'U'
38: 2, # 'V'
62: 0, # 'W'
43: 2, # 'Y'
56: 1, # 'Z'
1: 1, # 'a'
21: 2, # 'b'
28: 1, # 'c'
12: 2, # 'd'
2: 2, # 'e'
18: 3, # 'f'
27: 2, # 'g'
25: 2, # 'h'
3: 3, # 'i'
24: 2, # 'j'
10: 3, # 'k'
5: 0, # 'l'
13: 2, # 'm'
4: 3, # 'n'
15: 2, # 'o'
26: 2, # 'p'
7: 3, # 'r'
8: 3, # 's'
9: 3, # 't'
14: 0, # 'u'
32: 2, # 'v'
57: 0, # 'w'
58: 0, # 'x'
11: 3, # 'y'
22: 2, # 'z'
63: 1, # '·'
54: 0, # 'Ç'
50: 0, # 'Ö'
55: 2, # 'Ü'
59: 1, # 'â'
33: 0, # 'ç'
61: 0, # 'î'
34: 2, # 'ö'
17: 2, # 'ü'
30: 2, # 'ğ'
41: 1, # 'İ'
6: 3, # 'ı'
40: 1, # 'Ş'
19: 2, # 'ş'
},
63: { # '·'
23: 0, # 'A'
37: 0, # 'B'
47: 0, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 0, # 'F'
36: 0, # 'G'
45: 0, # 'H'
53: 0, # 'I'
60: 0, # 'J'
16: 0, # 'K'
49: 0, # 'L'
20: 0, # 'M'
46: 0, # 'N'
42: 0, # 'O'
48: 0, # 'P'
44: 0, # 'R'
35: 0, # 'S'
31: 0, # 'T'
51: 0, # 'U'
38: 0, # 'V'
62: 0, # 'W'
43: 0, # 'Y'
56: 0, # 'Z'
1: 0, # 'a'
21: 0, # 'b'
28: 0, # 'c'
12: 0, # 'd'
2: 1, # 'e'
18: 0, # 'f'
27: 0, # 'g'
25: 0, # 'h'
3: 0, # 'i'
24: 0, # 'j'
10: 0, # 'k'
5: 0, # 'l'
13: 2, # 'm'
4: 0, # 'n'
15: 0, # 'o'
26: 0, # 'p'
7: 0, # 'r'
8: 0, # 's'
9: 0, # 't'
14: 2, # 'u'
32: 0, # 'v'
57: 0, # 'w'
58: 0, # 'x'
11: 0, # 'y'
22: 0, # 'z'
63: 0, # '·'
54: 0, # 'Ç'
50: 0, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 0, # 'ç'
61: 0, # 'î'
34: 0, # 'ö'
17: 0, # 'ü'
30: 0, # 'ğ'
41: 0, # 'İ'
6: 0, # 'ı'
40: 0, # 'Ş'
19: 0, # 'ş'
},
54: { # 'Ç'
23: 0, # 'A'
37: 0, # 'B'
47: 1, # 'C'
39: 1, # 'D'
29: 0, # 'E'
52: 0, # 'F'
36: 1, # 'G'
45: 1, # 'H'
53: 1, # 'I'
60: 0, # 'J'
16: 0, # 'K'
49: 0, # 'L'
20: 0, # 'M'
46: 0, # 'N'
42: 1, # 'O'
48: 1, # 'P'
44: 0, # 'R'
35: 0, # 'S'
31: 0, # 'T'
51: 1, # 'U'
38: 1, # 'V'
62: 0, # 'W'
43: 2, # 'Y'
56: 0, # 'Z'
1: 0, # 'a'
21: 1, # 'b'
28: 0, # 'c'
12: 1, # 'd'
2: 0, # 'e'
18: 0, # 'f'
27: 1, # 'g'
25: 0, # 'h'
3: 3, # 'i'
24: 0, # 'j'
10: 1, # 'k'
5: 0, # 'l'
13: 0, # 'm'
4: 2, # 'n'
15: 1, # 'o'
26: 0, # 'p'
7: 2, # 'r'
8: 0, # 's'
9: 1, # 't'
14: 0, # 'u'
32: 2, # 'v'
57: 0, # 'w'
58: 0, # 'x'
11: 0, # 'y'
22: 0, # 'z'
63: 0, # '·'
54: 0, # 'Ç'
50: 0, # 'Ö'
55: 2, # 'Ü'
59: 0, # 'â'
33: 0, # 'ç'
61: 0, # 'î'
34: 1, # 'ö'
17: 0, # 'ü'
30: 0, # 'ğ'
41: 0, # 'İ'
6: 2, # 'ı'
40: 0, # 'Ş'
19: 1, # 'ş'
},
50: { # 'Ö'
23: 0, # 'A'
37: 0, # 'B'
47: 1, # 'C'
39: 1, # 'D'
29: 2, # 'E'
52: 0, # 'F'
36: 1, # 'G'
45: 2, # 'H'
53: 0, # 'I'
60: 0, # 'J'
16: 0, # 'K'
49: 0, # 'L'
20: 1, # 'M'
46: 1, # 'N'
42: 2, # 'O'
48: 2, # 'P'
44: 1, # 'R'
35: 0, # 'S'
31: 0, # 'T'
51: 1, # 'U'
38: 1, # 'V'
62: 0, # 'W'
43: 2, # 'Y'
56: 0, # 'Z'
1: 0, # 'a'
21: 2, # 'b'
28: 1, # 'c'
12: 2, # 'd'
2: 0, # 'e'
18: 1, # 'f'
27: 1, # 'g'
25: 1, # 'h'
3: 2, # 'i'
24: 0, # 'j'
10: 2, # 'k'
5: 0, # 'l'
13: 0, # 'm'
4: 3, # 'n'
15: 2, # 'o'
26: 2, # 'p'
7: 3, # 'r'
8: 1, # 's'
9: 2, # 't'
14: 0, # 'u'
32: 1, # 'v'
57: 0, # 'w'
58: 0, # 'x'
11: 0, # 'y'
22: 1, # 'z'
63: 0, # '·'
54: 0, # 'Ç'
50: 0, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 0, # 'ç'
61: 0, # 'î'
34: 2, # 'ö'
17: 2, # 'ü'
30: 1, # 'ğ'
41: 0, # 'İ'
6: 2, # 'ı'
40: 0, # 'Ş'
19: 1, # 'ş'
},
55: { # 'Ü'
23: 0, # 'A'
37: 0, # 'B'
47: 0, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 2, # 'F'
36: 0, # 'G'
45: 0, # 'H'
53: 0, # 'I'
60: 0, # 'J'
16: 1, # 'K'
49: 0, # 'L'
20: 0, # 'M'
46: 0, # 'N'
42: 0, # 'O'
48: 1, # 'P'
44: 0, # 'R'
35: 0, # 'S'
31: 0, # 'T'
51: 0, # 'U'
38: 1, # 'V'
62: 0, # 'W'
43: 0, # 'Y'
56: 0, # 'Z'
1: 2, # 'a'
21: 0, # 'b'
28: 2, # 'c'
12: 0, # 'd'
2: 2, # 'e'
18: 0, # 'f'
27: 1, # 'g'
25: 0, # 'h'
3: 0, # 'i'
24: 0, # 'j'
10: 0, # 'k'
5: 1, # 'l'
13: 1, # 'm'
4: 1, # 'n'
15: 0, # 'o'
26: 0, # 'p'
7: 0, # 'r'
8: 0, # 's'
9: 1, # 't'
14: 2, # 'u'
32: 0, # 'v'
57: 0, # 'w'
58: 0, # 'x'
11: 0, # 'y'
22: 1, # 'z'
63: 0, # '·'
54: 0, # 'Ç'
50: 1, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 0, # 'ç'
61: 0, # 'î'
34: 1, # 'ö'
17: 0, # 'ü'
30: 1, # 'ğ'
41: 1, # 'İ'
6: 0, # 'ı'
40: 0, # 'Ş'
19: 1, # 'ş'
},
59: { # 'â'
23: 0, # 'A'
37: 0, # 'B'
47: 0, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 0, # 'F'
36: 1, # 'G'
45: 0, # 'H'
53: 0, # 'I'
60: 0, # 'J'
16: 1, # 'K'
49: 0, # 'L'
20: 0, # 'M'
46: 0, # 'N'
42: 0, # 'O'
48: 0, # 'P'
44: 0, # 'R'
35: 0, # 'S'
31: 0, # 'T'
51: 0, # 'U'
38: 0, # 'V'
62: 0, # 'W'
43: 0, # 'Y'
56: 0, # 'Z'
1: 2, # 'a'
21: 0, # 'b'
28: 0, # 'c'
12: 0, # 'd'
2: 2, # 'e'
18: 0, # 'f'
27: 0, # 'g'
25: 0, # 'h'
3: 0, # 'i'
24: 0, # 'j'
10: 0, # 'k'
5: 0, # 'l'
13: 2, # 'm'
4: 0, # 'n'
15: 1, # 'o'
26: 0, # 'p'
7: 0, # 'r'
8: 0, # 's'
9: 0, # 't'
14: 2, # 'u'
32: 0, # 'v'
57: 0, # 'w'
58: 0, # 'x'
11: 0, # 'y'
22: 1, # 'z'
63: 0, # '·'
54: 0, # 'Ç'
50: 0, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 0, # 'ç'
61: 0, # 'î'
34: 0, # 'ö'
17: 0, # 'ü'
30: 0, # 'ğ'
41: 0, # 'İ'
6: 1, # 'ı'
40: 1, # 'Ş'
19: 0, # 'ş'
},
33: { # 'ç'
23: 0, # 'A'
37: 0, # 'B'
47: 0, # 'C'
39: 0, # 'D'
29: 3, # 'E'
52: 0, # 'F'
36: 0, # 'G'
45: 0, # 'H'
53: 0, # 'I'
60: 0, # 'J'
16: 0, # 'K'
49: 0, # 'L'
20: 1, # 'M'
46: 0, # 'N'
42: 0, # 'O'
48: 0, # 'P'
44: 0, # 'R'
35: 0, # 'S'
31: 2, # 'T'
51: 0, # 'U'
38: 1, # 'V'
62: 0, # 'W'
43: 0, # 'Y'
56: 0, # 'Z'
1: 0, # 'a'
21: 3, # 'b'
28: 0, # 'c'
12: 2, # 'd'
2: 0, # 'e'
18: 2, # 'f'
27: 1, # 'g'
25: 3, # 'h'
3: 3, # 'i'
24: 0, # 'j'
10: 3, # 'k'
5: 0, # 'l'
13: 0, # 'm'
4: 3, # 'n'
15: 0, # 'o'
26: 1, # 'p'
7: 3, # 'r'
8: 2, # 's'
9: 3, # 't'
14: 0, # 'u'
32: 2, # 'v'
57: 0, # 'w'
58: 0, # 'x'
11: 2, # 'y'
22: 0, # 'z'
63: 0, # '·'
54: 0, # 'Ç'
50: 0, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 0, # 'ç'
61: 0, # 'î'
34: 0, # 'ö'
17: 1, # 'ü'
30: 0, # 'ğ'
41: 0, # 'İ'
6: 3, # 'ı'
40: 0, # 'Ş'
19: 0, # 'ş'
},
61: { # 'î'
23: 0, # 'A'
37: 0, # 'B'
47: 0, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 0, # 'F'
36: 0, # 'G'
45: 0, # 'H'
53: 0, # 'I'
60: 0, # 'J'
16: 0, # 'K'
49: 0, # 'L'
20: 0, # 'M'
46: 0, # 'N'
42: 0, # 'O'
48: 0, # 'P'
44: 0, # 'R'
35: 0, # 'S'
31: 0, # 'T'
51: 0, # 'U'
38: 0, # 'V'
62: 0, # 'W'
43: 0, # 'Y'
56: 1, # 'Z'
1: 2, # 'a'
21: 0, # 'b'
28: 0, # 'c'
12: 0, # 'd'
2: 2, # 'e'
18: 0, # 'f'
27: 0, # 'g'
25: 0, # 'h'
3: 0, # 'i'
24: 1, # 'j'
10: 0, # 'k'
5: 0, # 'l'
13: 1, # 'm'
4: 1, # 'n'
15: 0, # 'o'
26: 0, # 'p'
7: 0, # 'r'
8: 0, # 's'
9: 0, # 't'
14: 1, # 'u'
32: 0, # 'v'
57: 0, # 'w'
58: 0, # 'x'
11: 0, # 'y'
22: 1, # 'z'
63: 0, # '·'
54: 0, # 'Ç'
50: 0, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 0, # 'ç'
61: 1, # 'î'
34: 0, # 'ö'
17: 0, # 'ü'
30: 0, # 'ğ'
41: 0, # 'İ'
6: 1, # 'ı'
40: 0, # 'Ş'
19: 0, # 'ş'
},
34: { # 'ö'
23: 0, # 'A'
37: 1, # 'B'
47: 1, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 2, # 'F'
36: 1, # 'G'
45: 1, # 'H'
53: 0, # 'I'
60: 0, # 'J'
16: 3, # 'K'
49: 1, # 'L'
20: 0, # 'M'
46: 1, # 'N'
42: 1, # 'O'
48: 2, # 'P'
44: 1, # 'R'
35: 1, # 'S'
31: 1, # 'T'
51: 1, # 'U'
38: 1, # 'V'
62: 0, # 'W'
43: 0, # 'Y'
56: 1, # 'Z'
1: 3, # 'a'
21: 1, # 'b'
28: 2, # 'c'
12: 1, # 'd'
2: 3, # 'e'
18: 0, # 'f'
27: 2, # 'g'
25: 2, # 'h'
3: 1, # 'i'
24: 2, # 'j'
10: 1, # 'k'
5: 2, # 'l'
13: 3, # 'm'
4: 2, # 'n'
15: 2, # 'o'
26: 0, # 'p'
7: 0, # 'r'
8: 3, # 's'
9: 1, # 't'
14: 3, # 'u'
32: 0, # 'v'
57: 0, # 'w'
58: 0, # 'x'
11: 1, # 'y'
22: 2, # 'z'
63: 0, # '·'
54: 1, # 'Ç'
50: 2, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 2, # 'ç'
61: 0, # 'î'
34: 2, # 'ö'
17: 0, # 'ü'
30: 2, # 'ğ'
41: 1, # 'İ'
6: 1, # 'ı'
40: 2, # 'Ş'
19: 1, # 'ş'
},
17: { # 'ü'
23: 0, # 'A'
37: 0, # 'B'
47: 1, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 0, # 'F'
36: 0, # 'G'
45: 0, # 'H'
53: 0, # 'I'
60: 1, # 'J'
16: 1, # 'K'
49: 0, # 'L'
20: 1, # 'M'
46: 0, # 'N'
42: 0, # 'O'
48: 0, # 'P'
44: 0, # 'R'
35: 0, # 'S'
31: 1, # 'T'
51: 0, # 'U'
38: 0, # 'V'
62: 0, # 'W'
43: 0, # 'Y'
56: 1, # 'Z'
1: 3, # 'a'
21: 0, # 'b'
28: 0, # 'c'
12: 1, # 'd'
2: 3, # 'e'
18: 1, # 'f'
27: 2, # 'g'
25: 0, # 'h'
3: 1, # 'i'
24: 1, # 'j'
10: 2, # 'k'
5: 3, # 'l'
13: 2, # 'm'
4: 3, # 'n'
15: 0, # 'o'
26: 2, # 'p'
7: 2, # 'r'
8: 3, # 's'
9: 2, # 't'
14: 3, # 'u'
32: 1, # 'v'
57: 1, # 'w'
58: 0, # 'x'
11: 0, # 'y'
22: 0, # 'z'
63: 0, # '·'
54: 0, # 'Ç'
50: 0, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 1, # 'ç'
61: 0, # 'î'
34: 0, # 'ö'
17: 2, # 'ü'
30: 0, # 'ğ'
41: 0, # 'İ'
6: 2, # 'ı'
40: 0, # 'Ş'
19: 0, # 'ş'
},
30: { # 'ğ'
23: 0, # 'A'
37: 2, # 'B'
47: 1, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 2, # 'F'
36: 1, # 'G'
45: 0, # 'H'
53: 1, # 'I'
60: 0, # 'J'
16: 3, # 'K'
49: 0, # 'L'
20: 1, # 'M'
46: 2, # 'N'
42: 2, # 'O'
48: 1, # 'P'
44: 1, # 'R'
35: 0, # 'S'
31: 1, # 'T'
51: 0, # 'U'
38: 2, # 'V'
62: 0, # 'W'
43: 2, # 'Y'
56: 0, # 'Z'
1: 3, # 'a'
21: 0, # 'b'
28: 2, # 'c'
12: 0, # 'd'
2: 2, # 'e'
18: 0, # 'f'
27: 0, # 'g'
25: 0, # 'h'
3: 0, # 'i'
24: 3, # 'j'
10: 1, # 'k'
5: 2, # 'l'
13: 3, # 'm'
4: 0, # 'n'
15: 1, # 'o'
26: 0, # 'p'
7: 1, # 'r'
8: 0, # 's'
9: 0, # 't'
14: 3, # 'u'
32: 0, # 'v'
57: 0, # 'w'
58: 0, # 'x'
11: 0, # 'y'
22: 2, # 'z'
63: 0, # '·'
54: 2, # 'Ç'
50: 2, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 1, # 'ç'
61: 0, # 'î'
34: 2, # 'ö'
17: 0, # 'ü'
30: 1, # 'ğ'
41: 2, # 'İ'
6: 2, # 'ı'
40: 2, # 'Ş'
19: 1, # 'ş'
},
41: { # 'İ'
23: 0, # 'A'
37: 0, # 'B'
47: 1, # 'C'
39: 1, # 'D'
29: 1, # 'E'
52: 0, # 'F'
36: 2, # 'G'
45: 2, # 'H'
53: 0, # 'I'
60: 0, # 'J'
16: 0, # 'K'
49: 0, # 'L'
20: 2, # 'M'
46: 1, # 'N'
42: 1, # 'O'
48: 2, # 'P'
44: 0, # 'R'
35: 1, # 'S'
31: 1, # 'T'
51: 1, # 'U'
38: 1, # 'V'
62: 0, # 'W'
43: 2, # 'Y'
56: 0, # 'Z'
1: 1, # 'a'
21: 2, # 'b'
28: 1, # 'c'
12: 2, # 'd'
2: 1, # 'e'
18: 0, # 'f'
27: 3, # 'g'
25: 2, # 'h'
3: 2, # 'i'
24: 2, # 'j'
10: 2, # 'k'
5: 0, # 'l'
13: 1, # 'm'
4: 3, # 'n'
15: 1, # 'o'
26: 1, # 'p'
7: 3, # 'r'
8: 3, # 's'
9: 2, # 't'
14: 0, # 'u'
32: 0, # 'v'
57: 1, # 'w'
58: 0, # 'x'
11: 2, # 'y'
22: 0, # 'z'
63: 0, # '·'
54: 0, # 'Ç'
50: 0, # 'Ö'
55: 1, # 'Ü'
59: 1, # 'â'
33: 0, # 'ç'
61: 0, # 'î'
34: 1, # 'ö'
17: 1, # 'ü'
30: 2, # 'ğ'
41: 0, # 'İ'
6: 3, # 'ı'
40: 0, # 'Ş'
19: 1, # 'ş'
},
6: { # 'ı'
23: 2, # 'A'
37: 0, # 'B'
47: 0, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 0, # 'F'
36: 1, # 'G'
45: 0, # 'H'
53: 0, # 'I'
60: 2, # 'J'
16: 3, # 'K'
49: 0, # 'L'
20: 3, # 'M'
46: 1, # 'N'
42: 0, # 'O'
48: 0, # 'P'
44: 0, # 'R'
35: 0, # 'S'
31: 2, # 'T'
51: 0, # 'U'
38: 0, # 'V'
62: 0, # 'W'
43: 2, # 'Y'
56: 1, # 'Z'
1: 3, # 'a'
21: 2, # 'b'
28: 1, # 'c'
12: 3, # 'd'
2: 3, # 'e'
18: 3, # 'f'
27: 3, # 'g'
25: 2, # 'h'
3: 3, # 'i'
24: 3, # 'j'
10: 3, # 'k'
5: 3, # 'l'
13: 3, # 'm'
4: 3, # 'n'
15: 0, # 'o'
26: 3, # 'p'
7: 3, # 'r'
8: 3, # 's'
9: 3, # 't'
14: 3, # 'u'
32: 3, # 'v'
57: 1, # 'w'
58: 1, # 'x'
11: 3, # 'y'
22: 0, # 'z'
63: 1, # '·'
54: 0, # 'Ç'
50: 0, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 2, # 'ç'
61: 0, # 'î'
34: 0, # 'ö'
17: 3, # 'ü'
30: 0, # 'ğ'
41: 0, # 'İ'
6: 3, # 'ı'
40: 0, # 'Ş'
19: 0, # 'ş'
},
40: { # 'Ş'
23: 0, # 'A'
37: 0, # 'B'
47: 1, # 'C'
39: 1, # 'D'
29: 1, # 'E'
52: 0, # 'F'
36: 1, # 'G'
45: 2, # 'H'
53: 1, # 'I'
60: 0, # 'J'
16: 0, # 'K'
49: 0, # 'L'
20: 2, # 'M'
46: 1, # 'N'
42: 1, # 'O'
48: 2, # 'P'
44: 2, # 'R'
35: 1, # 'S'
31: 1, # 'T'
51: 0, # 'U'
38: 1, # 'V'
62: 0, # 'W'
43: 2, # 'Y'
56: 1, # 'Z'
1: 0, # 'a'
21: 2, # 'b'
28: 0, # 'c'
12: 2, # 'd'
2: 0, # 'e'
18: 3, # 'f'
27: 0, # 'g'
25: 2, # 'h'
3: 3, # 'i'
24: 2, # 'j'
10: 1, # 'k'
5: 0, # 'l'
13: 1, # 'm'
4: 3, # 'n'
15: 2, # 'o'
26: 0, # 'p'
7: 3, # 'r'
8: 2, # 's'
9: 2, # 't'
14: 1, # 'u'
32: 3, # 'v'
57: 0, # 'w'
58: 0, # 'x'
11: 2, # 'y'
22: 0, # 'z'
63: 0, # '·'
54: 0, # 'Ç'
50: 0, # 'Ö'
55: 1, # 'Ü'
59: 0, # 'â'
33: 0, # 'ç'
61: 0, # 'î'
34: 2, # 'ö'
17: 1, # 'ü'
30: 2, # 'ğ'
41: 0, # 'İ'
6: 2, # 'ı'
40: 1, # 'Ş'
19: 2, # 'ş'
},
19: { # 'ş'
23: 0, # 'A'
37: 0, # 'B'
47: 1, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 2, # 'F'
36: 1, # 'G'
45: 0, # 'H'
53: 0, # 'I'
60: 0, # 'J'
16: 3, # 'K'
49: 2, # 'L'
20: 0, # 'M'
46: 1, # 'N'
42: 1, # 'O'
48: 1, # 'P'
44: 1, # 'R'
35: 1, # 'S'
31: 0, # 'T'
51: 1, # 'U'
38: 1, # 'V'
62: 0, # 'W'
43: 1, # 'Y'
56: 0, # 'Z'
1: 3, # 'a'
21: 1, # 'b'
28: 2, # 'c'
12: 0, # 'd'
2: 3, # 'e'
18: 0, # 'f'
27: 2, # 'g'
25: 1, # 'h'
3: 1, # 'i'
24: 0, # 'j'
10: 2, # 'k'
5: 2, # 'l'
13: 3, # 'm'
4: 0, # 'n'
15: 0, # 'o'
26: 1, # 'p'
7: 3, # 'r'
8: 0, # 's'
9: 0, # 't'
14: 3, # 'u'
32: 0, # 'v'
57: 0, # 'w'
58: 0, # 'x'
11: 0, # 'y'
22: 2, # 'z'
63: 0, # '·'
54: 1, # 'Ç'
50: 2, # 'Ö'
55: 0, # 'Ü'
59: 0, # 'â'
33: 1, # 'ç'
61: 1, # 'î'
34: 2, # 'ö'
17: 0, # 'ü'
30: 1, # 'ğ'
41: 1, # 'İ'
6: 1, # 'ı'
40: 1, # 'Ş'
19: 1, # 'ş'
},
}
# 255: Undefined characters that did not exist in training text
# 254: Carriage/Return
# 253: symbol (punctuation) that does not belong to word
# 252: 0 - 9
# 251: Control characters
# Character Mapping Table(s):
ISO_8859_9_TURKISH_CHAR_TO_ORDER = {
0: 255, # '\x00'
1: 255, # '\x01'
2: 255, # '\x02'
3: 255, # '\x03'
4: 255, # '\x04'
5: 255, # '\x05'
6: 255, # '\x06'
7: 255, # '\x07'
8: 255, # '\x08'
9: 255, # '\t'
10: 255, # '\n'
11: 255, # '\x0b'
12: 255, # '\x0c'
13: 255, # '\r'
14: 255, # '\x0e'
15: 255, # '\x0f'
16: 255, # '\x10'
17: 255, # '\x11'
18: 255, # '\x12'
19: 255, # '\x13'
20: 255, # '\x14'
21: 255, # '\x15'
22: 255, # '\x16'
23: 255, # '\x17'
24: 255, # '\x18'
25: 255, # '\x19'
26: 255, # '\x1a'
27: 255, # '\x1b'
28: 255, # '\x1c'
29: 255, # '\x1d'
30: 255, # '\x1e'
31: 255, # '\x1f'
32: 255, # ' '
33: 255, # '!'
34: 255, # '"'
35: 255, # '#'
36: 255, # '$'
37: 255, # '%'
38: 255, # '&'
39: 255, # "'"
40: 255, # '('
41: 255, # ')'
42: 255, # '*'
43: 255, # '+'
44: 255, # ','
45: 255, # '-'
46: 255, # '.'
47: 255, # '/'
48: 255, # '0'
49: 255, # '1'
50: 255, # '2'
51: 255, # '3'
52: 255, # '4'
53: 255, # '5'
54: 255, # '6'
55: 255, # '7'
56: 255, # '8'
57: 255, # '9'
58: 255, # ':'
59: 255, # ';'
60: 255, # '<'
61: 255, # '='
62: 255, # '>'
63: 255, # '?'
64: 255, # '@'
65: 23, # 'A'
66: 37, # 'B'
67: 47, # 'C'
68: 39, # 'D'
69: 29, # 'E'
70: 52, # 'F'
71: 36, # 'G'
72: 45, # 'H'
73: 53, # 'I'
74: 60, # 'J'
75: 16, # 'K'
76: 49, # 'L'
77: 20, # 'M'
78: 46, # 'N'
79: 42, # 'O'
80: 48, # 'P'
81: 69, # 'Q'
82: 44, # 'R'
83: 35, # 'S'
84: 31, # 'T'
85: 51, # 'U'
86: 38, # 'V'
87: 62, # 'W'
88: 65, # 'X'
89: 43, # 'Y'
90: 56, # 'Z'
91: 255, # '['
92: 255, # '\\'
93: 255, # ']'
94: 255, # '^'
95: 255, # '_'
96: 255, # '`'
97: 1, # 'a'
98: 21, # 'b'
99: 28, # 'c'
100: 12, # 'd'
101: 2, # 'e'
102: 18, # 'f'
103: 27, # 'g'
104: 25, # 'h'
105: 3, # 'i'
106: 24, # 'j'
107: 10, # 'k'
108: 5, # 'l'
109: 13, # 'm'
110: 4, # 'n'
111: 15, # 'o'
112: 26, # 'p'
113: 64, # 'q'
114: 7, # 'r'
115: 8, # 's'
116: 9, # 't'
117: 14, # 'u'
118: 32, # 'v'
119: 57, # 'w'
120: 58, # 'x'
121: 11, # 'y'
122: 22, # 'z'
123: 255, # '{'
124: 255, # '|'
125: 255, # '}'
126: 255, # '~'
127: 255, # '\x7f'
128: 180, # '\x80'
129: 179, # '\x81'
130: 178, # '\x82'
131: 177, # '\x83'
132: 176, # '\x84'
133: 175, # '\x85'
134: 174, # '\x86'
135: 173, # '\x87'
136: 172, # '\x88'
137: 171, # '\x89'
138: 170, # '\x8a'
139: 169, # '\x8b'
140: 168, # '\x8c'
141: 167, # '\x8d'
142: 166, # '\x8e'
143: 165, # '\x8f'
144: 164, # '\x90'
145: 163, # '\x91'
146: 162, # '\x92'
147: 161, # '\x93'
148: 160, # '\x94'
149: 159, # '\x95'
150: 101, # '\x96'
151: 158, # '\x97'
152: 157, # '\x98'
153: 156, # '\x99'
154: 155, # '\x9a'
155: 154, # '\x9b'
156: 153, # '\x9c'
157: 152, # '\x9d'
158: 151, # '\x9e'
159: 106, # '\x9f'
160: 150, # '\xa0'
161: 149, # '¡'
162: 148, # '¢'
163: 147, # '£'
164: 146, # '¤'
165: 145, # '¥'
166: 144, # '¦'
167: 100, # '§'
168: 143, # '¨'
169: 142, # '©'
170: 141, # 'ª'
171: 140, # '«'
172: 139, # '¬'
173: 138, # '\xad'
174: 137, # '®'
175: 136, # '¯'
176: 94, # '°'
177: 80, # '±'
178: 93, # '²'
179: 135, # '³'
180: 105, # '´'
181: 134, # 'µ'
182: 133, # '¶'
183: 63, # '·'
184: 132, # '¸'
185: 131, # '¹'
186: 130, # 'º'
187: 129, # '»'
188: 128, # '¼'
189: 127, # '½'
190: 126, # '¾'
191: 125, # '¿'
192: 124, # 'À'
193: 104, # 'Á'
194: 73, # 'Â'
195: 99, # 'Ã'
196: 79, # 'Ä'
197: 85, # 'Å'
198: 123, # 'Æ'
199: 54, # 'Ç'
200: 122, # 'È'
201: 98, # 'É'
202: 92, # 'Ê'
203: 121, # 'Ë'
204: 120, # 'Ì'
205: 91, # 'Í'
206: 103, # 'Î'
207: 119, # 'Ï'
208: 68, # 'Ğ'
209: 118, # 'Ñ'
210: 117, # 'Ò'
211: 97, # 'Ó'
212: 116, # 'Ô'
213: 115, # 'Õ'
214: 50, # 'Ö'
215: 90, # '×'
216: 114, # 'Ø'
217: 113, # 'Ù'
218: 112, # 'Ú'
219: 111, # 'Û'
220: 55, # 'Ü'
221: 41, # 'İ'
222: 40, # 'Ş'
223: 86, # 'ß'
224: 89, # 'à'
225: 70, # 'á'
226: 59, # 'â'
227: 78, # 'ã'
228: 71, # 'ä'
229: 82, # 'å'
230: 88, # 'æ'
231: 33, # 'ç'
232: 77, # 'è'
233: 66, # 'é'
234: 84, # 'ê'
235: 83, # 'ë'
236: 110, # 'ì'
237: 75, # 'í'
238: 61, # 'î'
239: 96, # 'ï'
240: 30, # 'ğ'
241: 67, # 'ñ'
242: 109, # 'ò'
243: 74, # 'ó'
244: 87, # 'ô'
245: 102, # 'õ'
246: 34, # 'ö'
247: 95, # '÷'
248: 81, # 'ø'
249: 108, # 'ù'
250: 76, # 'ú'
251: 72, # 'û'
252: 17, # 'ü'
253: 6, # 'ı'
254: 19, # 'ş'
255: 107, # 'ÿ'
}
ISO_8859_9_TURKISH_MODEL = SingleByteCharSetModel(
charset_name="ISO-8859-9",
language="Turkish",
char_to_order_map=ISO_8859_9_TURKISH_CHAR_TO_ORDER,
language_model=TURKISH_LANG_MODEL,
typical_positive_ratio=0.97029,
keep_ascii_letters=True,
alphabet="ABCDEFGHIJKLMNOPRSTUVYZabcdefghijklmnoprstuvyzÂÇÎÖÛÜâçîöûüĞğİıŞş",
)
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/chardet/langturkishmodel.py
|
Python
|
mit
| 95,372 |
######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Mark Pilgrim - port to Python
# Shy Shalom - original C code
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301 USA
######################### END LICENSE BLOCK #########################
from .charsetprober import CharSetProber
from .enums import ProbingState
FREQ_CAT_NUM = 4
UDF = 0 # undefined
OTH = 1 # other
ASC = 2 # ascii capital letter
ASS = 3 # ascii small letter
ACV = 4 # accent capital vowel
ACO = 5 # accent capital other
ASV = 6 # accent small vowel
ASO = 7 # accent small other
CLASS_NUM = 8 # total classes
# fmt: off
Latin1_CharToClass = (
OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # 00 - 07
OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # 08 - 0F
OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # 10 - 17
OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # 18 - 1F
OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # 20 - 27
OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # 28 - 2F
OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # 30 - 37
OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # 38 - 3F
OTH, ASC, ASC, ASC, ASC, ASC, ASC, ASC, # 40 - 47
ASC, ASC, ASC, ASC, ASC, ASC, ASC, ASC, # 48 - 4F
ASC, ASC, ASC, ASC, ASC, ASC, ASC, ASC, # 50 - 57
ASC, ASC, ASC, OTH, OTH, OTH, OTH, OTH, # 58 - 5F
OTH, ASS, ASS, ASS, ASS, ASS, ASS, ASS, # 60 - 67
ASS, ASS, ASS, ASS, ASS, ASS, ASS, ASS, # 68 - 6F
ASS, ASS, ASS, ASS, ASS, ASS, ASS, ASS, # 70 - 77
ASS, ASS, ASS, OTH, OTH, OTH, OTH, OTH, # 78 - 7F
OTH, UDF, OTH, ASO, OTH, OTH, OTH, OTH, # 80 - 87
OTH, OTH, ACO, OTH, ACO, UDF, ACO, UDF, # 88 - 8F
UDF, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # 90 - 97
OTH, OTH, ASO, OTH, ASO, UDF, ASO, ACO, # 98 - 9F
OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # A0 - A7
OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # A8 - AF
OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # B0 - B7
OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # B8 - BF
ACV, ACV, ACV, ACV, ACV, ACV, ACO, ACO, # C0 - C7
ACV, ACV, ACV, ACV, ACV, ACV, ACV, ACV, # C8 - CF
ACO, ACO, ACV, ACV, ACV, ACV, ACV, OTH, # D0 - D7
ACV, ACV, ACV, ACV, ACV, ACO, ACO, ACO, # D8 - DF
ASV, ASV, ASV, ASV, ASV, ASV, ASO, ASO, # E0 - E7
ASV, ASV, ASV, ASV, ASV, ASV, ASV, ASV, # E8 - EF
ASO, ASO, ASV, ASV, ASV, ASV, ASV, OTH, # F0 - F7
ASV, ASV, ASV, ASV, ASV, ASO, ASO, ASO, # F8 - FF
)
# 0 : illegal
# 1 : very unlikely
# 2 : normal
# 3 : very likely
Latin1ClassModel = (
# UDF OTH ASC ASS ACV ACO ASV ASO
0, 0, 0, 0, 0, 0, 0, 0, # UDF
0, 3, 3, 3, 3, 3, 3, 3, # OTH
0, 3, 3, 3, 3, 3, 3, 3, # ASC
0, 3, 3, 3, 1, 1, 3, 3, # ASS
0, 3, 3, 3, 1, 2, 1, 2, # ACV
0, 3, 3, 3, 3, 3, 3, 3, # ACO
0, 3, 1, 3, 1, 1, 1, 3, # ASV
0, 3, 1, 3, 1, 1, 3, 3, # ASO
)
# fmt: on
class Latin1Prober(CharSetProber):
def __init__(self):
super().__init__()
self._last_char_class = None
self._freq_counter = None
self.reset()
def reset(self):
self._last_char_class = OTH
self._freq_counter = [0] * FREQ_CAT_NUM
super().reset()
@property
def charset_name(self):
return "ISO-8859-1"
@property
def language(self):
return ""
def feed(self, byte_str):
byte_str = self.remove_xml_tags(byte_str)
for c in byte_str:
char_class = Latin1_CharToClass[c]
freq = Latin1ClassModel[(self._last_char_class * CLASS_NUM) + char_class]
if freq == 0:
self._state = ProbingState.NOT_ME
break
self._freq_counter[freq] += 1
self._last_char_class = char_class
return self.state
def get_confidence(self):
if self.state == ProbingState.NOT_ME:
return 0.01
total = sum(self._freq_counter)
confidence = (
0.0
if total < 0.01
else (self._freq_counter[3] - self._freq_counter[1] * 20.0) / total
)
confidence = max(confidence, 0.0)
# lower the confidence of latin1 so that other more accurate
# detector can take priority.
confidence *= 0.73
return confidence
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/chardet/latin1prober.py
|
Python
|
mit
| 5,260 |
######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Mark Pilgrim - port to Python
# Shy Shalom - original C code
# Proofpoint, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301 USA
######################### END LICENSE BLOCK #########################
from .charsetprober import CharSetProber
from .enums import MachineState, ProbingState
class MultiByteCharSetProber(CharSetProber):
"""
MultiByteCharSetProber
"""
def __init__(self, lang_filter=None):
super().__init__(lang_filter=lang_filter)
self.distribution_analyzer = None
self.coding_sm = None
self._last_char = [0, 0]
def reset(self):
super().reset()
if self.coding_sm:
self.coding_sm.reset()
if self.distribution_analyzer:
self.distribution_analyzer.reset()
self._last_char = [0, 0]
@property
def charset_name(self):
raise NotImplementedError
@property
def language(self):
raise NotImplementedError
def feed(self, byte_str):
for i, byte in enumerate(byte_str):
coding_state = self.coding_sm.next_state(byte)
if coding_state == MachineState.ERROR:
self.logger.debug(
"%s %s prober hit error at byte %s",
self.charset_name,
self.language,
i,
)
self._state = ProbingState.NOT_ME
break
if coding_state == MachineState.ITS_ME:
self._state = ProbingState.FOUND_IT
break
if coding_state == MachineState.START:
char_len = self.coding_sm.get_current_charlen()
if i == 0:
self._last_char[1] = byte
self.distribution_analyzer.feed(self._last_char, char_len)
else:
self.distribution_analyzer.feed(byte_str[i - 1 : i + 1], char_len)
self._last_char[0] = byte_str[-1]
if self.state == ProbingState.DETECTING:
if self.distribution_analyzer.got_enough_data() and (
self.get_confidence() > self.SHORTCUT_THRESHOLD
):
self._state = ProbingState.FOUND_IT
return self.state
def get_confidence(self):
return self.distribution_analyzer.get_confidence()
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/chardet/mbcharsetprober.py
|
Python
|
mit
| 3,367 |
######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Mark Pilgrim - port to Python
# Shy Shalom - original C code
# Proofpoint, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301 USA
######################### END LICENSE BLOCK #########################
from .big5prober import Big5Prober
from .charsetgroupprober import CharSetGroupProber
from .cp949prober import CP949Prober
from .eucjpprober import EUCJPProber
from .euckrprober import EUCKRProber
from .euctwprober import EUCTWProber
from .gb2312prober import GB2312Prober
from .johabprober import JOHABProber
from .sjisprober import SJISProber
from .utf8prober import UTF8Prober
class MBCSGroupProber(CharSetGroupProber):
def __init__(self, lang_filter=None):
super().__init__(lang_filter=lang_filter)
self.probers = [
UTF8Prober(),
SJISProber(),
EUCJPProber(),
GB2312Prober(),
EUCKRProber(),
CP949Prober(),
Big5Prober(),
EUCTWProber(),
JOHABProber(),
]
self.reset()
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/chardet/mbcsgroupprober.py
|
Python
|
mit
| 2,056 |
######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301 USA
######################### END LICENSE BLOCK #########################
from .enums import MachineState
# BIG5
# fmt: off
BIG5_CLS = (
1, 1, 1, 1, 1, 1, 1, 1, # 00 - 07 #allow 0x00 as legal value
1, 1, 1, 1, 1, 1, 0, 0, # 08 - 0f
1, 1, 1, 1, 1, 1, 1, 1, # 10 - 17
1, 1, 1, 0, 1, 1, 1, 1, # 18 - 1f
1, 1, 1, 1, 1, 1, 1, 1, # 20 - 27
1, 1, 1, 1, 1, 1, 1, 1, # 28 - 2f
1, 1, 1, 1, 1, 1, 1, 1, # 30 - 37
1, 1, 1, 1, 1, 1, 1, 1, # 38 - 3f
2, 2, 2, 2, 2, 2, 2, 2, # 40 - 47
2, 2, 2, 2, 2, 2, 2, 2, # 48 - 4f
2, 2, 2, 2, 2, 2, 2, 2, # 50 - 57
2, 2, 2, 2, 2, 2, 2, 2, # 58 - 5f
2, 2, 2, 2, 2, 2, 2, 2, # 60 - 67
2, 2, 2, 2, 2, 2, 2, 2, # 68 - 6f
2, 2, 2, 2, 2, 2, 2, 2, # 70 - 77
2, 2, 2, 2, 2, 2, 2, 1, # 78 - 7f
4, 4, 4, 4, 4, 4, 4, 4, # 80 - 87
4, 4, 4, 4, 4, 4, 4, 4, # 88 - 8f
4, 4, 4, 4, 4, 4, 4, 4, # 90 - 97
4, 4, 4, 4, 4, 4, 4, 4, # 98 - 9f
4, 3, 3, 3, 3, 3, 3, 3, # a0 - a7
3, 3, 3, 3, 3, 3, 3, 3, # a8 - af
3, 3, 3, 3, 3, 3, 3, 3, # b0 - b7
3, 3, 3, 3, 3, 3, 3, 3, # b8 - bf
3, 3, 3, 3, 3, 3, 3, 3, # c0 - c7
3, 3, 3, 3, 3, 3, 3, 3, # c8 - cf
3, 3, 3, 3, 3, 3, 3, 3, # d0 - d7
3, 3, 3, 3, 3, 3, 3, 3, # d8 - df
3, 3, 3, 3, 3, 3, 3, 3, # e0 - e7
3, 3, 3, 3, 3, 3, 3, 3, # e8 - ef
3, 3, 3, 3, 3, 3, 3, 3, # f0 - f7
3, 3, 3, 3, 3, 3, 3, 0 # f8 - ff
)
BIG5_ST = (
MachineState.ERROR,MachineState.START,MachineState.START, 3,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,#00-07
MachineState.ERROR,MachineState.ERROR,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ERROR,#08-0f
MachineState.ERROR,MachineState.START,MachineState.START,MachineState.START,MachineState.START,MachineState.START,MachineState.START,MachineState.START#10-17
)
# fmt: on
BIG5_CHAR_LEN_TABLE = (0, 1, 1, 2, 0)
BIG5_SM_MODEL = {
"class_table": BIG5_CLS,
"class_factor": 5,
"state_table": BIG5_ST,
"char_len_table": BIG5_CHAR_LEN_TABLE,
"name": "Big5",
}
# CP949
# fmt: off
CP949_CLS = (
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, # 00 - 0f
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, # 10 - 1f
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, # 20 - 2f
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, # 30 - 3f
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, # 40 - 4f
4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 1, 1, 1, 1, 1, # 50 - 5f
1, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, # 60 - 6f
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 1, 1, 1, 1, 1, # 70 - 7f
0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, # 80 - 8f
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, # 90 - 9f
6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, # a0 - af
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, # b0 - bf
7, 7, 7, 7, 7, 7, 9, 2, 2, 3, 2, 2, 2, 2, 2, 2, # c0 - cf
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, # d0 - df
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, # e0 - ef
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, # f0 - ff
)
CP949_ST = (
#cls= 0 1 2 3 4 5 6 7 8 9 # previous state =
MachineState.ERROR,MachineState.START, 3,MachineState.ERROR,MachineState.START,MachineState.START, 4, 5,MachineState.ERROR, 6, # MachineState.START
MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR, # MachineState.ERROR
MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME, # MachineState.ITS_ME
MachineState.ERROR,MachineState.ERROR,MachineState.START,MachineState.START,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.START,MachineState.START,MachineState.START, # 3
MachineState.ERROR,MachineState.ERROR,MachineState.START,MachineState.START,MachineState.START,MachineState.START,MachineState.START,MachineState.START,MachineState.START,MachineState.START, # 4
MachineState.ERROR,MachineState.START,MachineState.START,MachineState.START,MachineState.START,MachineState.START,MachineState.START,MachineState.START,MachineState.START,MachineState.START, # 5
MachineState.ERROR,MachineState.START,MachineState.START,MachineState.START,MachineState.START,MachineState.ERROR,MachineState.ERROR,MachineState.START,MachineState.START,MachineState.START, # 6
)
# fmt: on
CP949_CHAR_LEN_TABLE = (0, 1, 2, 0, 1, 1, 2, 2, 0, 2)
CP949_SM_MODEL = {
"class_table": CP949_CLS,
"class_factor": 10,
"state_table": CP949_ST,
"char_len_table": CP949_CHAR_LEN_TABLE,
"name": "CP949",
}
# EUC-JP
# fmt: off
EUCJP_CLS = (
4, 4, 4, 4, 4, 4, 4, 4, # 00 - 07
4, 4, 4, 4, 4, 4, 5, 5, # 08 - 0f
4, 4, 4, 4, 4, 4, 4, 4, # 10 - 17
4, 4, 4, 5, 4, 4, 4, 4, # 18 - 1f
4, 4, 4, 4, 4, 4, 4, 4, # 20 - 27
4, 4, 4, 4, 4, 4, 4, 4, # 28 - 2f
4, 4, 4, 4, 4, 4, 4, 4, # 30 - 37
4, 4, 4, 4, 4, 4, 4, 4, # 38 - 3f
4, 4, 4, 4, 4, 4, 4, 4, # 40 - 47
4, 4, 4, 4, 4, 4, 4, 4, # 48 - 4f
4, 4, 4, 4, 4, 4, 4, 4, # 50 - 57
4, 4, 4, 4, 4, 4, 4, 4, # 58 - 5f
4, 4, 4, 4, 4, 4, 4, 4, # 60 - 67
4, 4, 4, 4, 4, 4, 4, 4, # 68 - 6f
4, 4, 4, 4, 4, 4, 4, 4, # 70 - 77
4, 4, 4, 4, 4, 4, 4, 4, # 78 - 7f
5, 5, 5, 5, 5, 5, 5, 5, # 80 - 87
5, 5, 5, 5, 5, 5, 1, 3, # 88 - 8f
5, 5, 5, 5, 5, 5, 5, 5, # 90 - 97
5, 5, 5, 5, 5, 5, 5, 5, # 98 - 9f
5, 2, 2, 2, 2, 2, 2, 2, # a0 - a7
2, 2, 2, 2, 2, 2, 2, 2, # a8 - af
2, 2, 2, 2, 2, 2, 2, 2, # b0 - b7
2, 2, 2, 2, 2, 2, 2, 2, # b8 - bf
2, 2, 2, 2, 2, 2, 2, 2, # c0 - c7
2, 2, 2, 2, 2, 2, 2, 2, # c8 - cf
2, 2, 2, 2, 2, 2, 2, 2, # d0 - d7
2, 2, 2, 2, 2, 2, 2, 2, # d8 - df
0, 0, 0, 0, 0, 0, 0, 0, # e0 - e7
0, 0, 0, 0, 0, 0, 0, 0, # e8 - ef
0, 0, 0, 0, 0, 0, 0, 0, # f0 - f7
0, 0, 0, 0, 0, 0, 0, 5 # f8 - ff
)
EUCJP_ST = (
3, 4, 3, 5,MachineState.START,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,#00-07
MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,#08-0f
MachineState.ITS_ME,MachineState.ITS_ME,MachineState.START,MachineState.ERROR,MachineState.START,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,#10-17
MachineState.ERROR,MachineState.ERROR,MachineState.START,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR, 3,MachineState.ERROR,#18-1f
3,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.START,MachineState.START,MachineState.START,MachineState.START#20-27
)
# fmt: on
EUCJP_CHAR_LEN_TABLE = (2, 2, 2, 3, 1, 0)
EUCJP_SM_MODEL = {
"class_table": EUCJP_CLS,
"class_factor": 6,
"state_table": EUCJP_ST,
"char_len_table": EUCJP_CHAR_LEN_TABLE,
"name": "EUC-JP",
}
# EUC-KR
# fmt: off
EUCKR_CLS = (
1, 1, 1, 1, 1, 1, 1, 1, # 00 - 07
1, 1, 1, 1, 1, 1, 0, 0, # 08 - 0f
1, 1, 1, 1, 1, 1, 1, 1, # 10 - 17
1, 1, 1, 0, 1, 1, 1, 1, # 18 - 1f
1, 1, 1, 1, 1, 1, 1, 1, # 20 - 27
1, 1, 1, 1, 1, 1, 1, 1, # 28 - 2f
1, 1, 1, 1, 1, 1, 1, 1, # 30 - 37
1, 1, 1, 1, 1, 1, 1, 1, # 38 - 3f
1, 1, 1, 1, 1, 1, 1, 1, # 40 - 47
1, 1, 1, 1, 1, 1, 1, 1, # 48 - 4f
1, 1, 1, 1, 1, 1, 1, 1, # 50 - 57
1, 1, 1, 1, 1, 1, 1, 1, # 58 - 5f
1, 1, 1, 1, 1, 1, 1, 1, # 60 - 67
1, 1, 1, 1, 1, 1, 1, 1, # 68 - 6f
1, 1, 1, 1, 1, 1, 1, 1, # 70 - 77
1, 1, 1, 1, 1, 1, 1, 1, # 78 - 7f
0, 0, 0, 0, 0, 0, 0, 0, # 80 - 87
0, 0, 0, 0, 0, 0, 0, 0, # 88 - 8f
0, 0, 0, 0, 0, 0, 0, 0, # 90 - 97
0, 0, 0, 0, 0, 0, 0, 0, # 98 - 9f
0, 2, 2, 2, 2, 2, 2, 2, # a0 - a7
2, 2, 2, 2, 2, 3, 3, 3, # a8 - af
2, 2, 2, 2, 2, 2, 2, 2, # b0 - b7
2, 2, 2, 2, 2, 2, 2, 2, # b8 - bf
2, 2, 2, 2, 2, 2, 2, 2, # c0 - c7
2, 3, 2, 2, 2, 2, 2, 2, # c8 - cf
2, 2, 2, 2, 2, 2, 2, 2, # d0 - d7
2, 2, 2, 2, 2, 2, 2, 2, # d8 - df
2, 2, 2, 2, 2, 2, 2, 2, # e0 - e7
2, 2, 2, 2, 2, 2, 2, 2, # e8 - ef
2, 2, 2, 2, 2, 2, 2, 2, # f0 - f7
2, 2, 2, 2, 2, 2, 2, 0 # f8 - ff
)
EUCKR_ST = (
MachineState.ERROR,MachineState.START, 3,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,#00-07
MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ERROR,MachineState.ERROR,MachineState.START,MachineState.START #08-0f
)
# fmt: on
EUCKR_CHAR_LEN_TABLE = (0, 1, 2, 0)
EUCKR_SM_MODEL = {
"class_table": EUCKR_CLS,
"class_factor": 4,
"state_table": EUCKR_ST,
"char_len_table": EUCKR_CHAR_LEN_TABLE,
"name": "EUC-KR",
}
# JOHAB
# fmt: off
JOHAB_CLS = (
4,4,4,4,4,4,4,4, # 00 - 07
4,4,4,4,4,4,0,0, # 08 - 0f
4,4,4,4,4,4,4,4, # 10 - 17
4,4,4,0,4,4,4,4, # 18 - 1f
4,4,4,4,4,4,4,4, # 20 - 27
4,4,4,4,4,4,4,4, # 28 - 2f
4,3,3,3,3,3,3,3, # 30 - 37
3,3,3,3,3,3,3,3, # 38 - 3f
3,1,1,1,1,1,1,1, # 40 - 47
1,1,1,1,1,1,1,1, # 48 - 4f
1,1,1,1,1,1,1,1, # 50 - 57
1,1,1,1,1,1,1,1, # 58 - 5f
1,1,1,1,1,1,1,1, # 60 - 67
1,1,1,1,1,1,1,1, # 68 - 6f
1,1,1,1,1,1,1,1, # 70 - 77
1,1,1,1,1,1,1,2, # 78 - 7f
6,6,6,6,8,8,8,8, # 80 - 87
8,8,8,8,8,8,8,8, # 88 - 8f
8,7,7,7,7,7,7,7, # 90 - 97
7,7,7,7,7,7,7,7, # 98 - 9f
7,7,7,7,7,7,7,7, # a0 - a7
7,7,7,7,7,7,7,7, # a8 - af
7,7,7,7,7,7,7,7, # b0 - b7
7,7,7,7,7,7,7,7, # b8 - bf
7,7,7,7,7,7,7,7, # c0 - c7
7,7,7,7,7,7,7,7, # c8 - cf
7,7,7,7,5,5,5,5, # d0 - d7
5,9,9,9,9,9,9,5, # d8 - df
9,9,9,9,9,9,9,9, # e0 - e7
9,9,9,9,9,9,9,9, # e8 - ef
9,9,9,9,9,9,9,9, # f0 - f7
9,9,5,5,5,5,5,0 # f8 - ff
)
JOHAB_ST = (
# cls = 0 1 2 3 4 5 6 7 8 9
MachineState.ERROR ,MachineState.START ,MachineState.START ,MachineState.START ,MachineState.START ,MachineState.ERROR ,MachineState.ERROR ,3 ,3 ,4 , # MachineState.START
MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME, # MachineState.ITS_ME
MachineState.ERROR ,MachineState.ERROR ,MachineState.ERROR ,MachineState.ERROR ,MachineState.ERROR ,MachineState.ERROR ,MachineState.ERROR ,MachineState.ERROR ,MachineState.ERROR ,MachineState.ERROR , # MachineState.ERROR
MachineState.ERROR ,MachineState.START ,MachineState.START ,MachineState.ERROR ,MachineState.ERROR ,MachineState.START ,MachineState.START ,MachineState.START ,MachineState.START ,MachineState.START , # 3
MachineState.ERROR ,MachineState.START ,MachineState.ERROR ,MachineState.START ,MachineState.ERROR ,MachineState.START ,MachineState.ERROR ,MachineState.START ,MachineState.ERROR ,MachineState.START , # 4
)
# fmt: on
JOHAB_CHAR_LEN_TABLE = (0, 1, 1, 1, 1, 0, 0, 2, 2, 2)
JOHAB_SM_MODEL = {
"class_table": JOHAB_CLS,
"class_factor": 10,
"state_table": JOHAB_ST,
"char_len_table": JOHAB_CHAR_LEN_TABLE,
"name": "Johab",
}
# EUC-TW
# fmt: off
EUCTW_CLS = (
2, 2, 2, 2, 2, 2, 2, 2, # 00 - 07
2, 2, 2, 2, 2, 2, 0, 0, # 08 - 0f
2, 2, 2, 2, 2, 2, 2, 2, # 10 - 17
2, 2, 2, 0, 2, 2, 2, 2, # 18 - 1f
2, 2, 2, 2, 2, 2, 2, 2, # 20 - 27
2, 2, 2, 2, 2, 2, 2, 2, # 28 - 2f
2, 2, 2, 2, 2, 2, 2, 2, # 30 - 37
2, 2, 2, 2, 2, 2, 2, 2, # 38 - 3f
2, 2, 2, 2, 2, 2, 2, 2, # 40 - 47
2, 2, 2, 2, 2, 2, 2, 2, # 48 - 4f
2, 2, 2, 2, 2, 2, 2, 2, # 50 - 57
2, 2, 2, 2, 2, 2, 2, 2, # 58 - 5f
2, 2, 2, 2, 2, 2, 2, 2, # 60 - 67
2, 2, 2, 2, 2, 2, 2, 2, # 68 - 6f
2, 2, 2, 2, 2, 2, 2, 2, # 70 - 77
2, 2, 2, 2, 2, 2, 2, 2, # 78 - 7f
0, 0, 0, 0, 0, 0, 0, 0, # 80 - 87
0, 0, 0, 0, 0, 0, 6, 0, # 88 - 8f
0, 0, 0, 0, 0, 0, 0, 0, # 90 - 97
0, 0, 0, 0, 0, 0, 0, 0, # 98 - 9f
0, 3, 4, 4, 4, 4, 4, 4, # a0 - a7
5, 5, 1, 1, 1, 1, 1, 1, # a8 - af
1, 1, 1, 1, 1, 1, 1, 1, # b0 - b7
1, 1, 1, 1, 1, 1, 1, 1, # b8 - bf
1, 1, 3, 1, 3, 3, 3, 3, # c0 - c7
3, 3, 3, 3, 3, 3, 3, 3, # c8 - cf
3, 3, 3, 3, 3, 3, 3, 3, # d0 - d7
3, 3, 3, 3, 3, 3, 3, 3, # d8 - df
3, 3, 3, 3, 3, 3, 3, 3, # e0 - e7
3, 3, 3, 3, 3, 3, 3, 3, # e8 - ef
3, 3, 3, 3, 3, 3, 3, 3, # f0 - f7
3, 3, 3, 3, 3, 3, 3, 0 # f8 - ff
)
EUCTW_ST = (
MachineState.ERROR,MachineState.ERROR,MachineState.START, 3, 3, 3, 4,MachineState.ERROR,#00-07
MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ITS_ME,MachineState.ITS_ME,#08-0f
MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ERROR,MachineState.START,MachineState.ERROR,#10-17
MachineState.START,MachineState.START,MachineState.START,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,#18-1f
5,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.START,MachineState.ERROR,MachineState.START,MachineState.START,#20-27
MachineState.START,MachineState.ERROR,MachineState.START,MachineState.START,MachineState.START,MachineState.START,MachineState.START,MachineState.START #28-2f
)
# fmt: on
EUCTW_CHAR_LEN_TABLE = (0, 0, 1, 2, 2, 2, 3)
EUCTW_SM_MODEL = {
"class_table": EUCTW_CLS,
"class_factor": 7,
"state_table": EUCTW_ST,
"char_len_table": EUCTW_CHAR_LEN_TABLE,
"name": "x-euc-tw",
}
# GB2312
# fmt: off
GB2312_CLS = (
1, 1, 1, 1, 1, 1, 1, 1, # 00 - 07
1, 1, 1, 1, 1, 1, 0, 0, # 08 - 0f
1, 1, 1, 1, 1, 1, 1, 1, # 10 - 17
1, 1, 1, 0, 1, 1, 1, 1, # 18 - 1f
1, 1, 1, 1, 1, 1, 1, 1, # 20 - 27
1, 1, 1, 1, 1, 1, 1, 1, # 28 - 2f
3, 3, 3, 3, 3, 3, 3, 3, # 30 - 37
3, 3, 1, 1, 1, 1, 1, 1, # 38 - 3f
2, 2, 2, 2, 2, 2, 2, 2, # 40 - 47
2, 2, 2, 2, 2, 2, 2, 2, # 48 - 4f
2, 2, 2, 2, 2, 2, 2, 2, # 50 - 57
2, 2, 2, 2, 2, 2, 2, 2, # 58 - 5f
2, 2, 2, 2, 2, 2, 2, 2, # 60 - 67
2, 2, 2, 2, 2, 2, 2, 2, # 68 - 6f
2, 2, 2, 2, 2, 2, 2, 2, # 70 - 77
2, 2, 2, 2, 2, 2, 2, 4, # 78 - 7f
5, 6, 6, 6, 6, 6, 6, 6, # 80 - 87
6, 6, 6, 6, 6, 6, 6, 6, # 88 - 8f
6, 6, 6, 6, 6, 6, 6, 6, # 90 - 97
6, 6, 6, 6, 6, 6, 6, 6, # 98 - 9f
6, 6, 6, 6, 6, 6, 6, 6, # a0 - a7
6, 6, 6, 6, 6, 6, 6, 6, # a8 - af
6, 6, 6, 6, 6, 6, 6, 6, # b0 - b7
6, 6, 6, 6, 6, 6, 6, 6, # b8 - bf
6, 6, 6, 6, 6, 6, 6, 6, # c0 - c7
6, 6, 6, 6, 6, 6, 6, 6, # c8 - cf
6, 6, 6, 6, 6, 6, 6, 6, # d0 - d7
6, 6, 6, 6, 6, 6, 6, 6, # d8 - df
6, 6, 6, 6, 6, 6, 6, 6, # e0 - e7
6, 6, 6, 6, 6, 6, 6, 6, # e8 - ef
6, 6, 6, 6, 6, 6, 6, 6, # f0 - f7
6, 6, 6, 6, 6, 6, 6, 0 # f8 - ff
)
GB2312_ST = (
MachineState.ERROR,MachineState.START,MachineState.START,MachineState.START,MachineState.START,MachineState.START, 3,MachineState.ERROR,#00-07
MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ITS_ME,MachineState.ITS_ME,#08-0f
MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ERROR,MachineState.ERROR,MachineState.START,#10-17
4,MachineState.ERROR,MachineState.START,MachineState.START,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,#18-1f
MachineState.ERROR,MachineState.ERROR, 5,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ITS_ME,MachineState.ERROR,#20-27
MachineState.ERROR,MachineState.ERROR,MachineState.START,MachineState.START,MachineState.START,MachineState.START,MachineState.START,MachineState.START #28-2f
)
# fmt: on
# To be accurate, the length of class 6 can be either 2 or 4.
# But it is not necessary to discriminate between the two since
# it is used for frequency analysis only, and we are validating
# each code range there as well. So it is safe to set it to be
# 2 here.
GB2312_CHAR_LEN_TABLE = (0, 1, 1, 1, 1, 1, 2)
GB2312_SM_MODEL = {
"class_table": GB2312_CLS,
"class_factor": 7,
"state_table": GB2312_ST,
"char_len_table": GB2312_CHAR_LEN_TABLE,
"name": "GB2312",
}
# Shift_JIS
# fmt: off
SJIS_CLS = (
1, 1, 1, 1, 1, 1, 1, 1, # 00 - 07
1, 1, 1, 1, 1, 1, 0, 0, # 08 - 0f
1, 1, 1, 1, 1, 1, 1, 1, # 10 - 17
1, 1, 1, 0, 1, 1, 1, 1, # 18 - 1f
1, 1, 1, 1, 1, 1, 1, 1, # 20 - 27
1, 1, 1, 1, 1, 1, 1, 1, # 28 - 2f
1, 1, 1, 1, 1, 1, 1, 1, # 30 - 37
1, 1, 1, 1, 1, 1, 1, 1, # 38 - 3f
2, 2, 2, 2, 2, 2, 2, 2, # 40 - 47
2, 2, 2, 2, 2, 2, 2, 2, # 48 - 4f
2, 2, 2, 2, 2, 2, 2, 2, # 50 - 57
2, 2, 2, 2, 2, 2, 2, 2, # 58 - 5f
2, 2, 2, 2, 2, 2, 2, 2, # 60 - 67
2, 2, 2, 2, 2, 2, 2, 2, # 68 - 6f
2, 2, 2, 2, 2, 2, 2, 2, # 70 - 77
2, 2, 2, 2, 2, 2, 2, 1, # 78 - 7f
3, 3, 3, 3, 3, 2, 2, 3, # 80 - 87
3, 3, 3, 3, 3, 3, 3, 3, # 88 - 8f
3, 3, 3, 3, 3, 3, 3, 3, # 90 - 97
3, 3, 3, 3, 3, 3, 3, 3, # 98 - 9f
#0xa0 is illegal in sjis encoding, but some pages does
#contain such byte. We need to be more error forgiven.
2, 2, 2, 2, 2, 2, 2, 2, # a0 - a7
2, 2, 2, 2, 2, 2, 2, 2, # a8 - af
2, 2, 2, 2, 2, 2, 2, 2, # b0 - b7
2, 2, 2, 2, 2, 2, 2, 2, # b8 - bf
2, 2, 2, 2, 2, 2, 2, 2, # c0 - c7
2, 2, 2, 2, 2, 2, 2, 2, # c8 - cf
2, 2, 2, 2, 2, 2, 2, 2, # d0 - d7
2, 2, 2, 2, 2, 2, 2, 2, # d8 - df
3, 3, 3, 3, 3, 3, 3, 3, # e0 - e7
3, 3, 3, 3, 3, 4, 4, 4, # e8 - ef
3, 3, 3, 3, 3, 3, 3, 3, # f0 - f7
3, 3, 3, 3, 3, 0, 0, 0, # f8 - ff
)
SJIS_ST = (
MachineState.ERROR,MachineState.START,MachineState.START, 3,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,#00-07
MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,#08-0f
MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ERROR,MachineState.ERROR,MachineState.START,MachineState.START,MachineState.START,MachineState.START #10-17
)
# fmt: on
SJIS_CHAR_LEN_TABLE = (0, 1, 1, 2, 0, 0)
SJIS_SM_MODEL = {
"class_table": SJIS_CLS,
"class_factor": 6,
"state_table": SJIS_ST,
"char_len_table": SJIS_CHAR_LEN_TABLE,
"name": "Shift_JIS",
}
# UCS2-BE
# fmt: off
UCS2BE_CLS = (
0, 0, 0, 0, 0, 0, 0, 0, # 00 - 07
0, 0, 1, 0, 0, 2, 0, 0, # 08 - 0f
0, 0, 0, 0, 0, 0, 0, 0, # 10 - 17
0, 0, 0, 3, 0, 0, 0, 0, # 18 - 1f
0, 0, 0, 0, 0, 0, 0, 0, # 20 - 27
0, 3, 3, 3, 3, 3, 0, 0, # 28 - 2f
0, 0, 0, 0, 0, 0, 0, 0, # 30 - 37
0, 0, 0, 0, 0, 0, 0, 0, # 38 - 3f
0, 0, 0, 0, 0, 0, 0, 0, # 40 - 47
0, 0, 0, 0, 0, 0, 0, 0, # 48 - 4f
0, 0, 0, 0, 0, 0, 0, 0, # 50 - 57
0, 0, 0, 0, 0, 0, 0, 0, # 58 - 5f
0, 0, 0, 0, 0, 0, 0, 0, # 60 - 67
0, 0, 0, 0, 0, 0, 0, 0, # 68 - 6f
0, 0, 0, 0, 0, 0, 0, 0, # 70 - 77
0, 0, 0, 0, 0, 0, 0, 0, # 78 - 7f
0, 0, 0, 0, 0, 0, 0, 0, # 80 - 87
0, 0, 0, 0, 0, 0, 0, 0, # 88 - 8f
0, 0, 0, 0, 0, 0, 0, 0, # 90 - 97
0, 0, 0, 0, 0, 0, 0, 0, # 98 - 9f
0, 0, 0, 0, 0, 0, 0, 0, # a0 - a7
0, 0, 0, 0, 0, 0, 0, 0, # a8 - af
0, 0, 0, 0, 0, 0, 0, 0, # b0 - b7
0, 0, 0, 0, 0, 0, 0, 0, # b8 - bf
0, 0, 0, 0, 0, 0, 0, 0, # c0 - c7
0, 0, 0, 0, 0, 0, 0, 0, # c8 - cf
0, 0, 0, 0, 0, 0, 0, 0, # d0 - d7
0, 0, 0, 0, 0, 0, 0, 0, # d8 - df
0, 0, 0, 0, 0, 0, 0, 0, # e0 - e7
0, 0, 0, 0, 0, 0, 0, 0, # e8 - ef
0, 0, 0, 0, 0, 0, 0, 0, # f0 - f7
0, 0, 0, 0, 0, 0, 4, 5 # f8 - ff
)
UCS2BE_ST = (
5, 7, 7,MachineState.ERROR, 4, 3,MachineState.ERROR,MachineState.ERROR,#00-07
MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,#08-0f
MachineState.ITS_ME,MachineState.ITS_ME, 6, 6, 6, 6,MachineState.ERROR,MachineState.ERROR,#10-17
6, 6, 6, 6, 6,MachineState.ITS_ME, 6, 6,#18-1f
6, 6, 6, 6, 5, 7, 7,MachineState.ERROR,#20-27
5, 8, 6, 6,MachineState.ERROR, 6, 6, 6,#28-2f
6, 6, 6, 6,MachineState.ERROR,MachineState.ERROR,MachineState.START,MachineState.START #30-37
)
# fmt: on
UCS2BE_CHAR_LEN_TABLE = (2, 2, 2, 0, 2, 2)
UCS2BE_SM_MODEL = {
"class_table": UCS2BE_CLS,
"class_factor": 6,
"state_table": UCS2BE_ST,
"char_len_table": UCS2BE_CHAR_LEN_TABLE,
"name": "UTF-16BE",
}
# UCS2-LE
# fmt: off
UCS2LE_CLS = (
0, 0, 0, 0, 0, 0, 0, 0, # 00 - 07
0, 0, 1, 0, 0, 2, 0, 0, # 08 - 0f
0, 0, 0, 0, 0, 0, 0, 0, # 10 - 17
0, 0, 0, 3, 0, 0, 0, 0, # 18 - 1f
0, 0, 0, 0, 0, 0, 0, 0, # 20 - 27
0, 3, 3, 3, 3, 3, 0, 0, # 28 - 2f
0, 0, 0, 0, 0, 0, 0, 0, # 30 - 37
0, 0, 0, 0, 0, 0, 0, 0, # 38 - 3f
0, 0, 0, 0, 0, 0, 0, 0, # 40 - 47
0, 0, 0, 0, 0, 0, 0, 0, # 48 - 4f
0, 0, 0, 0, 0, 0, 0, 0, # 50 - 57
0, 0, 0, 0, 0, 0, 0, 0, # 58 - 5f
0, 0, 0, 0, 0, 0, 0, 0, # 60 - 67
0, 0, 0, 0, 0, 0, 0, 0, # 68 - 6f
0, 0, 0, 0, 0, 0, 0, 0, # 70 - 77
0, 0, 0, 0, 0, 0, 0, 0, # 78 - 7f
0, 0, 0, 0, 0, 0, 0, 0, # 80 - 87
0, 0, 0, 0, 0, 0, 0, 0, # 88 - 8f
0, 0, 0, 0, 0, 0, 0, 0, # 90 - 97
0, 0, 0, 0, 0, 0, 0, 0, # 98 - 9f
0, 0, 0, 0, 0, 0, 0, 0, # a0 - a7
0, 0, 0, 0, 0, 0, 0, 0, # a8 - af
0, 0, 0, 0, 0, 0, 0, 0, # b0 - b7
0, 0, 0, 0, 0, 0, 0, 0, # b8 - bf
0, 0, 0, 0, 0, 0, 0, 0, # c0 - c7
0, 0, 0, 0, 0, 0, 0, 0, # c8 - cf
0, 0, 0, 0, 0, 0, 0, 0, # d0 - d7
0, 0, 0, 0, 0, 0, 0, 0, # d8 - df
0, 0, 0, 0, 0, 0, 0, 0, # e0 - e7
0, 0, 0, 0, 0, 0, 0, 0, # e8 - ef
0, 0, 0, 0, 0, 0, 0, 0, # f0 - f7
0, 0, 0, 0, 0, 0, 4, 5 # f8 - ff
)
UCS2LE_ST = (
6, 6, 7, 6, 4, 3,MachineState.ERROR,MachineState.ERROR,#00-07
MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,#08-0f
MachineState.ITS_ME,MachineState.ITS_ME, 5, 5, 5,MachineState.ERROR,MachineState.ITS_ME,MachineState.ERROR,#10-17
5, 5, 5,MachineState.ERROR, 5,MachineState.ERROR, 6, 6,#18-1f
7, 6, 8, 8, 5, 5, 5,MachineState.ERROR,#20-27
5, 5, 5,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR, 5, 5,#28-2f
5, 5, 5,MachineState.ERROR, 5,MachineState.ERROR,MachineState.START,MachineState.START #30-37
)
# fmt: on
UCS2LE_CHAR_LEN_TABLE = (2, 2, 2, 2, 2, 2)
UCS2LE_SM_MODEL = {
"class_table": UCS2LE_CLS,
"class_factor": 6,
"state_table": UCS2LE_ST,
"char_len_table": UCS2LE_CHAR_LEN_TABLE,
"name": "UTF-16LE",
}
# UTF-8
# fmt: off
UTF8_CLS = (
1, 1, 1, 1, 1, 1, 1, 1, # 00 - 07 #allow 0x00 as a legal value
1, 1, 1, 1, 1, 1, 0, 0, # 08 - 0f
1, 1, 1, 1, 1, 1, 1, 1, # 10 - 17
1, 1, 1, 0, 1, 1, 1, 1, # 18 - 1f
1, 1, 1, 1, 1, 1, 1, 1, # 20 - 27
1, 1, 1, 1, 1, 1, 1, 1, # 28 - 2f
1, 1, 1, 1, 1, 1, 1, 1, # 30 - 37
1, 1, 1, 1, 1, 1, 1, 1, # 38 - 3f
1, 1, 1, 1, 1, 1, 1, 1, # 40 - 47
1, 1, 1, 1, 1, 1, 1, 1, # 48 - 4f
1, 1, 1, 1, 1, 1, 1, 1, # 50 - 57
1, 1, 1, 1, 1, 1, 1, 1, # 58 - 5f
1, 1, 1, 1, 1, 1, 1, 1, # 60 - 67
1, 1, 1, 1, 1, 1, 1, 1, # 68 - 6f
1, 1, 1, 1, 1, 1, 1, 1, # 70 - 77
1, 1, 1, 1, 1, 1, 1, 1, # 78 - 7f
2, 2, 2, 2, 3, 3, 3, 3, # 80 - 87
4, 4, 4, 4, 4, 4, 4, 4, # 88 - 8f
4, 4, 4, 4, 4, 4, 4, 4, # 90 - 97
4, 4, 4, 4, 4, 4, 4, 4, # 98 - 9f
5, 5, 5, 5, 5, 5, 5, 5, # a0 - a7
5, 5, 5, 5, 5, 5, 5, 5, # a8 - af
5, 5, 5, 5, 5, 5, 5, 5, # b0 - b7
5, 5, 5, 5, 5, 5, 5, 5, # b8 - bf
0, 0, 6, 6, 6, 6, 6, 6, # c0 - c7
6, 6, 6, 6, 6, 6, 6, 6, # c8 - cf
6, 6, 6, 6, 6, 6, 6, 6, # d0 - d7
6, 6, 6, 6, 6, 6, 6, 6, # d8 - df
7, 8, 8, 8, 8, 8, 8, 8, # e0 - e7
8, 8, 8, 8, 8, 9, 8, 8, # e8 - ef
10, 11, 11, 11, 11, 11, 11, 11, # f0 - f7
12, 13, 13, 13, 14, 15, 0, 0 # f8 - ff
)
UTF8_ST = (
MachineState.ERROR,MachineState.START,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR, 12, 10,#00-07
9, 11, 8, 7, 6, 5, 4, 3,#08-0f
MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,#10-17
MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,#18-1f
MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,#20-27
MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,#28-2f
MachineState.ERROR,MachineState.ERROR, 5, 5, 5, 5,MachineState.ERROR,MachineState.ERROR,#30-37
MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,#38-3f
MachineState.ERROR,MachineState.ERROR,MachineState.ERROR, 5, 5, 5,MachineState.ERROR,MachineState.ERROR,#40-47
MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,#48-4f
MachineState.ERROR,MachineState.ERROR, 7, 7, 7, 7,MachineState.ERROR,MachineState.ERROR,#50-57
MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,#58-5f
MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR, 7, 7,MachineState.ERROR,MachineState.ERROR,#60-67
MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,#68-6f
MachineState.ERROR,MachineState.ERROR, 9, 9, 9, 9,MachineState.ERROR,MachineState.ERROR,#70-77
MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,#78-7f
MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR, 9,MachineState.ERROR,MachineState.ERROR,#80-87
MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,#88-8f
MachineState.ERROR,MachineState.ERROR, 12, 12, 12, 12,MachineState.ERROR,MachineState.ERROR,#90-97
MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,#98-9f
MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR, 12,MachineState.ERROR,MachineState.ERROR,#a0-a7
MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,#a8-af
MachineState.ERROR,MachineState.ERROR, 12, 12, 12,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,#b0-b7
MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,#b8-bf
MachineState.ERROR,MachineState.ERROR,MachineState.START,MachineState.START,MachineState.START,MachineState.START,MachineState.ERROR,MachineState.ERROR,#c0-c7
MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR #c8-cf
)
# fmt: on
UTF8_CHAR_LEN_TABLE = (0, 1, 0, 0, 0, 0, 2, 3, 3, 3, 4, 4, 5, 5, 6, 6)
UTF8_SM_MODEL = {
"class_table": UTF8_CLS,
"class_factor": 16,
"state_table": UTF8_ST,
"char_len_table": UTF8_CHAR_LEN_TABLE,
"name": "UTF-8",
}
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/chardet/mbcssm.py
|
Python
|
mit
| 30,068 |
castiel248/Convert
|
Lib/site-packages/pip/_vendor/chardet/metadata/__init__.py
|
Python
|
mit
| 0 |
|
"""
Metadata about languages used by our model training code for our
SingleByteCharSetProbers. Could be used for other things in the future.
This code is based on the language metadata from the uchardet project.
"""
from string import ascii_letters
# TODO: Add Ukrainian (KOI8-U)
class Language:
"""Metadata about a language useful for training models
:ivar name: The human name for the language, in English.
:type name: str
:ivar iso_code: 2-letter ISO 639-1 if possible, 3-letter ISO code otherwise,
or use another catalog as a last resort.
:type iso_code: str
:ivar use_ascii: Whether or not ASCII letters should be included in trained
models.
:type use_ascii: bool
:ivar charsets: The charsets we want to support and create data for.
:type charsets: list of str
:ivar alphabet: The characters in the language's alphabet. If `use_ascii` is
`True`, you only need to add those not in the ASCII set.
:type alphabet: str
:ivar wiki_start_pages: The Wikipedia pages to start from if we're crawling
Wikipedia for training data.
:type wiki_start_pages: list of str
"""
def __init__(
self,
name=None,
iso_code=None,
use_ascii=True,
charsets=None,
alphabet=None,
wiki_start_pages=None,
):
super().__init__()
self.name = name
self.iso_code = iso_code
self.use_ascii = use_ascii
self.charsets = charsets
if self.use_ascii:
if alphabet:
alphabet += ascii_letters
else:
alphabet = ascii_letters
elif not alphabet:
raise ValueError("Must supply alphabet if use_ascii is False")
self.alphabet = "".join(sorted(set(alphabet))) if alphabet else None
self.wiki_start_pages = wiki_start_pages
def __repr__(self):
param_str = ", ".join(
f"{k}={v!r}" for k, v in self.__dict__.items() if not k.startswith("_")
)
return f"{self.__class__.__name__}({param_str})"
LANGUAGES = {
"Arabic": Language(
name="Arabic",
iso_code="ar",
use_ascii=False,
# We only support encodings that use isolated
# forms, because the current recommendation is
# that the rendering system handles presentation
# forms. This means we purposefully skip IBM864.
charsets=["ISO-8859-6", "WINDOWS-1256", "CP720", "CP864"],
alphabet="ءآأؤإئابةتثجحخدذرزسشصضطظعغػؼؽؾؿـفقكلمنهوىيًٌٍَُِّ",
wiki_start_pages=["الصفحة_الرئيسية"],
),
"Belarusian": Language(
name="Belarusian",
iso_code="be",
use_ascii=False,
charsets=["ISO-8859-5", "WINDOWS-1251", "IBM866", "MacCyrillic"],
alphabet="АБВГДЕЁЖЗІЙКЛМНОПРСТУЎФХЦЧШЫЬЭЮЯабвгдеёжзійклмнопрстуўфхцчшыьэюяʼ",
wiki_start_pages=["Галоўная_старонка"],
),
"Bulgarian": Language(
name="Bulgarian",
iso_code="bg",
use_ascii=False,
charsets=["ISO-8859-5", "WINDOWS-1251", "IBM855"],
alphabet="АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЬЮЯабвгдежзийклмнопрстуфхцчшщъьюя",
wiki_start_pages=["Начална_страница"],
),
"Czech": Language(
name="Czech",
iso_code="cz",
use_ascii=True,
charsets=["ISO-8859-2", "WINDOWS-1250"],
alphabet="áčďéěíňóřšťúůýžÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ",
wiki_start_pages=["Hlavní_strana"],
),
"Danish": Language(
name="Danish",
iso_code="da",
use_ascii=True,
charsets=["ISO-8859-1", "ISO-8859-15", "WINDOWS-1252"],
alphabet="æøåÆØÅ",
wiki_start_pages=["Forside"],
),
"German": Language(
name="German",
iso_code="de",
use_ascii=True,
charsets=["ISO-8859-1", "WINDOWS-1252"],
alphabet="äöüßÄÖÜ",
wiki_start_pages=["Wikipedia:Hauptseite"],
),
"Greek": Language(
name="Greek",
iso_code="el",
use_ascii=False,
charsets=["ISO-8859-7", "WINDOWS-1253"],
alphabet="αβγδεζηθικλμνξοπρσςτυφχψωάέήίόύώΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΣΤΥΦΧΨΩΆΈΉΊΌΎΏ",
wiki_start_pages=["Πύλη:Κύρια"],
),
"English": Language(
name="English",
iso_code="en",
use_ascii=True,
charsets=["ISO-8859-1", "WINDOWS-1252"],
wiki_start_pages=["Main_Page"],
),
"Esperanto": Language(
name="Esperanto",
iso_code="eo",
# Q, W, X, and Y not used at all
use_ascii=False,
charsets=["ISO-8859-3"],
alphabet="abcĉdefgĝhĥijĵklmnoprsŝtuŭvzABCĈDEFGĜHĤIJĴKLMNOPRSŜTUŬVZ",
wiki_start_pages=["Vikipedio:Ĉefpaĝo"],
),
"Spanish": Language(
name="Spanish",
iso_code="es",
use_ascii=True,
charsets=["ISO-8859-1", "ISO-8859-15", "WINDOWS-1252"],
alphabet="ñáéíóúüÑÁÉÍÓÚÜ",
wiki_start_pages=["Wikipedia:Portada"],
),
"Estonian": Language(
name="Estonian",
iso_code="et",
use_ascii=False,
charsets=["ISO-8859-4", "ISO-8859-13", "WINDOWS-1257"],
# C, F, Š, Q, W, X, Y, Z, Ž are only for
# loanwords
alphabet="ABDEGHIJKLMNOPRSTUVÕÄÖÜabdeghijklmnoprstuvõäöü",
wiki_start_pages=["Esileht"],
),
"Finnish": Language(
name="Finnish",
iso_code="fi",
use_ascii=True,
charsets=["ISO-8859-1", "ISO-8859-15", "WINDOWS-1252"],
alphabet="ÅÄÖŠŽåäöšž",
wiki_start_pages=["Wikipedia:Etusivu"],
),
"French": Language(
name="French",
iso_code="fr",
use_ascii=True,
charsets=["ISO-8859-1", "ISO-8859-15", "WINDOWS-1252"],
alphabet="œàâçèéîïùûêŒÀÂÇÈÉÎÏÙÛÊ",
wiki_start_pages=["Wikipédia:Accueil_principal", "Bœuf (animal)"],
),
"Hebrew": Language(
name="Hebrew",
iso_code="he",
use_ascii=False,
charsets=["ISO-8859-8", "WINDOWS-1255"],
alphabet="אבגדהוזחטיךכלםמןנסעףפץצקרשתװױײ",
wiki_start_pages=["עמוד_ראשי"],
),
"Croatian": Language(
name="Croatian",
iso_code="hr",
# Q, W, X, Y are only used for foreign words.
use_ascii=False,
charsets=["ISO-8859-2", "WINDOWS-1250"],
alphabet="abcčćdđefghijklmnoprsštuvzžABCČĆDĐEFGHIJKLMNOPRSŠTUVZŽ",
wiki_start_pages=["Glavna_stranica"],
),
"Hungarian": Language(
name="Hungarian",
iso_code="hu",
# Q, W, X, Y are only used for foreign words.
use_ascii=False,
charsets=["ISO-8859-2", "WINDOWS-1250"],
alphabet="abcdefghijklmnoprstuvzáéíóöőúüűABCDEFGHIJKLMNOPRSTUVZÁÉÍÓÖŐÚÜŰ",
wiki_start_pages=["Kezdőlap"],
),
"Italian": Language(
name="Italian",
iso_code="it",
use_ascii=True,
charsets=["ISO-8859-1", "ISO-8859-15", "WINDOWS-1252"],
alphabet="ÀÈÉÌÒÓÙàèéìòóù",
wiki_start_pages=["Pagina_principale"],
),
"Lithuanian": Language(
name="Lithuanian",
iso_code="lt",
use_ascii=False,
charsets=["ISO-8859-13", "WINDOWS-1257", "ISO-8859-4"],
# Q, W, and X not used at all
alphabet="AĄBCČDEĘĖFGHIĮYJKLMNOPRSŠTUŲŪVZŽaąbcčdeęėfghiįyjklmnoprsštuųūvzž",
wiki_start_pages=["Pagrindinis_puslapis"],
),
"Latvian": Language(
name="Latvian",
iso_code="lv",
use_ascii=False,
charsets=["ISO-8859-13", "WINDOWS-1257", "ISO-8859-4"],
# Q, W, X, Y are only for loanwords
alphabet="AĀBCČDEĒFGĢHIĪJKĶLĻMNŅOPRSŠTUŪVZŽaābcčdeēfgģhiījkķlļmnņoprsštuūvzž",
wiki_start_pages=["Sākumlapa"],
),
"Macedonian": Language(
name="Macedonian",
iso_code="mk",
use_ascii=False,
charsets=["ISO-8859-5", "WINDOWS-1251", "MacCyrillic", "IBM855"],
alphabet="АБВГДЃЕЖЗЅИЈКЛЉМНЊОПРСТЌУФХЦЧЏШабвгдѓежзѕијклљмнњопрстќуфхцчџш",
wiki_start_pages=["Главна_страница"],
),
"Dutch": Language(
name="Dutch",
iso_code="nl",
use_ascii=True,
charsets=["ISO-8859-1", "WINDOWS-1252"],
wiki_start_pages=["Hoofdpagina"],
),
"Polish": Language(
name="Polish",
iso_code="pl",
# Q and X are only used for foreign words.
use_ascii=False,
charsets=["ISO-8859-2", "WINDOWS-1250"],
alphabet="AĄBCĆDEĘFGHIJKLŁMNŃOÓPRSŚTUWYZŹŻaąbcćdeęfghijklłmnńoóprsśtuwyzźż",
wiki_start_pages=["Wikipedia:Strona_główna"],
),
"Portuguese": Language(
name="Portuguese",
iso_code="pt",
use_ascii=True,
charsets=["ISO-8859-1", "ISO-8859-15", "WINDOWS-1252"],
alphabet="ÁÂÃÀÇÉÊÍÓÔÕÚáâãàçéêíóôõú",
wiki_start_pages=["Wikipédia:Página_principal"],
),
"Romanian": Language(
name="Romanian",
iso_code="ro",
use_ascii=True,
charsets=["ISO-8859-2", "WINDOWS-1250"],
alphabet="ăâîșțĂÂÎȘȚ",
wiki_start_pages=["Pagina_principală"],
),
"Russian": Language(
name="Russian",
iso_code="ru",
use_ascii=False,
charsets=[
"ISO-8859-5",
"WINDOWS-1251",
"KOI8-R",
"MacCyrillic",
"IBM866",
"IBM855",
],
alphabet="абвгдеёжзийклмнопрстуфхцчшщъыьэюяАБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ",
wiki_start_pages=["Заглавная_страница"],
),
"Slovak": Language(
name="Slovak",
iso_code="sk",
use_ascii=True,
charsets=["ISO-8859-2", "WINDOWS-1250"],
alphabet="áäčďéíĺľňóôŕšťúýžÁÄČĎÉÍĹĽŇÓÔŔŠŤÚÝŽ",
wiki_start_pages=["Hlavná_stránka"],
),
"Slovene": Language(
name="Slovene",
iso_code="sl",
# Q, W, X, Y are only used for foreign words.
use_ascii=False,
charsets=["ISO-8859-2", "WINDOWS-1250"],
alphabet="abcčdefghijklmnoprsštuvzžABCČDEFGHIJKLMNOPRSŠTUVZŽ",
wiki_start_pages=["Glavna_stran"],
),
# Serbian can be written in both Latin and Cyrillic, but there's no
# simple way to get the Latin alphabet pages from Wikipedia through
# the API, so for now we just support Cyrillic.
"Serbian": Language(
name="Serbian",
iso_code="sr",
alphabet="АБВГДЂЕЖЗИЈКЛЉМНЊОПРСТЋУФХЦЧЏШабвгдђежзијклљмнњопрстћуфхцчџш",
charsets=["ISO-8859-5", "WINDOWS-1251", "MacCyrillic", "IBM855"],
wiki_start_pages=["Главна_страна"],
),
"Thai": Language(
name="Thai",
iso_code="th",
use_ascii=False,
charsets=["ISO-8859-11", "TIS-620", "CP874"],
alphabet="กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛",
wiki_start_pages=["หน้าหลัก"],
),
"Turkish": Language(
name="Turkish",
iso_code="tr",
# Q, W, and X are not used by Turkish
use_ascii=False,
charsets=["ISO-8859-3", "ISO-8859-9", "WINDOWS-1254"],
alphabet="abcçdefgğhıijklmnoöprsştuüvyzâîûABCÇDEFGĞHIİJKLMNOÖPRSŞTUÜVYZÂÎÛ",
wiki_start_pages=["Ana_Sayfa"],
),
"Vietnamese": Language(
name="Vietnamese",
iso_code="vi",
use_ascii=False,
# Windows-1258 is the only common 8-bit
# Vietnamese encoding supported by Python.
# From Wikipedia:
# For systems that lack support for Unicode,
# dozens of 8-bit Vietnamese code pages are
# available.[1] The most common are VISCII
# (TCVN 5712:1993), VPS, and Windows-1258.[3]
# Where ASCII is required, such as when
# ensuring readability in plain text e-mail,
# Vietnamese letters are often encoded
# according to Vietnamese Quoted-Readable
# (VIQR) or VSCII Mnemonic (VSCII-MNEM),[4]
# though usage of either variable-width
# scheme has declined dramatically following
# the adoption of Unicode on the World Wide
# Web.
charsets=["WINDOWS-1258"],
alphabet="aăâbcdđeêghiklmnoôơpqrstuưvxyAĂÂBCDĐEÊGHIKLMNOÔƠPQRSTUƯVXY",
wiki_start_pages=["Chữ_Quốc_ngữ"],
),
}
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/chardet/metadata/languages.py
|
Python
|
mit
| 13,280 |
######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Mark Pilgrim - port to Python
# Shy Shalom - original C code
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301 USA
######################### END LICENSE BLOCK #########################
from collections import namedtuple
from .charsetprober import CharSetProber
from .enums import CharacterCategory, ProbingState, SequenceLikelihood
SingleByteCharSetModel = namedtuple(
"SingleByteCharSetModel",
[
"charset_name",
"language",
"char_to_order_map",
"language_model",
"typical_positive_ratio",
"keep_ascii_letters",
"alphabet",
],
)
class SingleByteCharSetProber(CharSetProber):
SAMPLE_SIZE = 64
SB_ENOUGH_REL_THRESHOLD = 1024 # 0.25 * SAMPLE_SIZE^2
POSITIVE_SHORTCUT_THRESHOLD = 0.95
NEGATIVE_SHORTCUT_THRESHOLD = 0.05
def __init__(self, model, is_reversed=False, name_prober=None):
super().__init__()
self._model = model
# TRUE if we need to reverse every pair in the model lookup
self._reversed = is_reversed
# Optional auxiliary prober for name decision
self._name_prober = name_prober
self._last_order = None
self._seq_counters = None
self._total_seqs = None
self._total_char = None
self._control_char = None
self._freq_char = None
self.reset()
def reset(self):
super().reset()
# char order of last character
self._last_order = 255
self._seq_counters = [0] * SequenceLikelihood.get_num_categories()
self._total_seqs = 0
self._total_char = 0
self._control_char = 0
# characters that fall in our sampling range
self._freq_char = 0
@property
def charset_name(self):
if self._name_prober:
return self._name_prober.charset_name
return self._model.charset_name
@property
def language(self):
if self._name_prober:
return self._name_prober.language
return self._model.language
def feed(self, byte_str):
# TODO: Make filter_international_words keep things in self.alphabet
if not self._model.keep_ascii_letters:
byte_str = self.filter_international_words(byte_str)
else:
byte_str = self.remove_xml_tags(byte_str)
if not byte_str:
return self.state
char_to_order_map = self._model.char_to_order_map
language_model = self._model.language_model
for char in byte_str:
order = char_to_order_map.get(char, CharacterCategory.UNDEFINED)
# XXX: This was SYMBOL_CAT_ORDER before, with a value of 250, but
# CharacterCategory.SYMBOL is actually 253, so we use CONTROL
# to make it closer to the original intent. The only difference
# is whether or not we count digits and control characters for
# _total_char purposes.
if order < CharacterCategory.CONTROL:
self._total_char += 1
if order < self.SAMPLE_SIZE:
self._freq_char += 1
if self._last_order < self.SAMPLE_SIZE:
self._total_seqs += 1
if not self._reversed:
lm_cat = language_model[self._last_order][order]
else:
lm_cat = language_model[order][self._last_order]
self._seq_counters[lm_cat] += 1
self._last_order = order
charset_name = self._model.charset_name
if self.state == ProbingState.DETECTING:
if self._total_seqs > self.SB_ENOUGH_REL_THRESHOLD:
confidence = self.get_confidence()
if confidence > self.POSITIVE_SHORTCUT_THRESHOLD:
self.logger.debug(
"%s confidence = %s, we have a winner", charset_name, confidence
)
self._state = ProbingState.FOUND_IT
elif confidence < self.NEGATIVE_SHORTCUT_THRESHOLD:
self.logger.debug(
"%s confidence = %s, below negative shortcut threshold %s",
charset_name,
confidence,
self.NEGATIVE_SHORTCUT_THRESHOLD,
)
self._state = ProbingState.NOT_ME
return self.state
def get_confidence(self):
r = 0.01
if self._total_seqs > 0:
r = (
(
self._seq_counters[SequenceLikelihood.POSITIVE]
+ 0.25 * self._seq_counters[SequenceLikelihood.LIKELY]
)
/ self._total_seqs
/ self._model.typical_positive_ratio
)
# The more control characters (proportionnaly to the size
# of the text), the less confident we become in the current
# charset.
r = r * (self._total_char - self._control_char) / self._total_char
r = r * self._freq_char / self._total_char
if r >= 1.0:
r = 0.99
return r
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/chardet/sbcharsetprober.py
|
Python
|
mit
| 6,199 |
######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Mark Pilgrim - port to Python
# Shy Shalom - original C code
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301 USA
######################### END LICENSE BLOCK #########################
from .charsetgroupprober import CharSetGroupProber
from .hebrewprober import HebrewProber
from .langbulgarianmodel import ISO_8859_5_BULGARIAN_MODEL, WINDOWS_1251_BULGARIAN_MODEL
from .langgreekmodel import ISO_8859_7_GREEK_MODEL, WINDOWS_1253_GREEK_MODEL
from .langhebrewmodel import WINDOWS_1255_HEBREW_MODEL
# from .langhungarianmodel import (ISO_8859_2_HUNGARIAN_MODEL,
# WINDOWS_1250_HUNGARIAN_MODEL)
from .langrussianmodel import (
IBM855_RUSSIAN_MODEL,
IBM866_RUSSIAN_MODEL,
ISO_8859_5_RUSSIAN_MODEL,
KOI8_R_RUSSIAN_MODEL,
MACCYRILLIC_RUSSIAN_MODEL,
WINDOWS_1251_RUSSIAN_MODEL,
)
from .langthaimodel import TIS_620_THAI_MODEL
from .langturkishmodel import ISO_8859_9_TURKISH_MODEL
from .sbcharsetprober import SingleByteCharSetProber
class SBCSGroupProber(CharSetGroupProber):
def __init__(self):
super().__init__()
hebrew_prober = HebrewProber()
logical_hebrew_prober = SingleByteCharSetProber(
WINDOWS_1255_HEBREW_MODEL, is_reversed=False, name_prober=hebrew_prober
)
# TODO: See if using ISO-8859-8 Hebrew model works better here, since
# it's actually the visual one
visual_hebrew_prober = SingleByteCharSetProber(
WINDOWS_1255_HEBREW_MODEL, is_reversed=True, name_prober=hebrew_prober
)
hebrew_prober.set_model_probers(logical_hebrew_prober, visual_hebrew_prober)
# TODO: ORDER MATTERS HERE. I changed the order vs what was in master
# and several tests failed that did not before. Some thought
# should be put into the ordering, and we should consider making
# order not matter here, because that is very counter-intuitive.
self.probers = [
SingleByteCharSetProber(WINDOWS_1251_RUSSIAN_MODEL),
SingleByteCharSetProber(KOI8_R_RUSSIAN_MODEL),
SingleByteCharSetProber(ISO_8859_5_RUSSIAN_MODEL),
SingleByteCharSetProber(MACCYRILLIC_RUSSIAN_MODEL),
SingleByteCharSetProber(IBM866_RUSSIAN_MODEL),
SingleByteCharSetProber(IBM855_RUSSIAN_MODEL),
SingleByteCharSetProber(ISO_8859_7_GREEK_MODEL),
SingleByteCharSetProber(WINDOWS_1253_GREEK_MODEL),
SingleByteCharSetProber(ISO_8859_5_BULGARIAN_MODEL),
SingleByteCharSetProber(WINDOWS_1251_BULGARIAN_MODEL),
# TODO: Restore Hungarian encodings (iso-8859-2 and windows-1250)
# after we retrain model.
# SingleByteCharSetProber(ISO_8859_2_HUNGARIAN_MODEL),
# SingleByteCharSetProber(WINDOWS_1250_HUNGARIAN_MODEL),
SingleByteCharSetProber(TIS_620_THAI_MODEL),
SingleByteCharSetProber(ISO_8859_9_TURKISH_MODEL),
hebrew_prober,
logical_hebrew_prober,
visual_hebrew_prober,
]
self.reset()
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/chardet/sbcsgroupprober.py
|
Python
|
mit
| 4,129 |
######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301 USA
######################### END LICENSE BLOCK #########################
from .chardistribution import SJISDistributionAnalysis
from .codingstatemachine import CodingStateMachine
from .enums import MachineState, ProbingState
from .jpcntx import SJISContextAnalysis
from .mbcharsetprober import MultiByteCharSetProber
from .mbcssm import SJIS_SM_MODEL
class SJISProber(MultiByteCharSetProber):
def __init__(self):
super().__init__()
self.coding_sm = CodingStateMachine(SJIS_SM_MODEL)
self.distribution_analyzer = SJISDistributionAnalysis()
self.context_analyzer = SJISContextAnalysis()
self.reset()
def reset(self):
super().reset()
self.context_analyzer.reset()
@property
def charset_name(self):
return self.context_analyzer.charset_name
@property
def language(self):
return "Japanese"
def feed(self, byte_str):
for i, byte in enumerate(byte_str):
coding_state = self.coding_sm.next_state(byte)
if coding_state == MachineState.ERROR:
self.logger.debug(
"%s %s prober hit error at byte %s",
self.charset_name,
self.language,
i,
)
self._state = ProbingState.NOT_ME
break
if coding_state == MachineState.ITS_ME:
self._state = ProbingState.FOUND_IT
break
if coding_state == MachineState.START:
char_len = self.coding_sm.get_current_charlen()
if i == 0:
self._last_char[1] = byte
self.context_analyzer.feed(
self._last_char[2 - char_len :], char_len
)
self.distribution_analyzer.feed(self._last_char, char_len)
else:
self.context_analyzer.feed(
byte_str[i + 1 - char_len : i + 3 - char_len], char_len
)
self.distribution_analyzer.feed(byte_str[i - 1 : i + 1], char_len)
self._last_char[0] = byte_str[-1]
if self.state == ProbingState.DETECTING:
if self.context_analyzer.got_enough_data() and (
self.get_confidence() > self.SHORTCUT_THRESHOLD
):
self._state = ProbingState.FOUND_IT
return self.state
def get_confidence(self):
context_conf = self.context_analyzer.get_confidence()
distrib_conf = self.distribution_analyzer.get_confidence()
return max(context_conf, distrib_conf)
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/chardet/sjisprober.py
|
Python
|
mit
| 3,749 |
######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Mark Pilgrim - port to Python
# Shy Shalom - original C code
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301 USA
######################### END LICENSE BLOCK #########################
"""
Module containing the UniversalDetector detector class, which is the primary
class a user of ``chardet`` should use.
:author: Mark Pilgrim (initial port to Python)
:author: Shy Shalom (original C code)
:author: Dan Blanchard (major refactoring for 3.0)
:author: Ian Cordasco
"""
import codecs
import logging
import re
from .charsetgroupprober import CharSetGroupProber
from .enums import InputState, LanguageFilter, ProbingState
from .escprober import EscCharSetProber
from .latin1prober import Latin1Prober
from .mbcsgroupprober import MBCSGroupProber
from .sbcsgroupprober import SBCSGroupProber
from .utf1632prober import UTF1632Prober
class UniversalDetector:
"""
The ``UniversalDetector`` class underlies the ``chardet.detect`` function
and coordinates all of the different charset probers.
To get a ``dict`` containing an encoding and its confidence, you can simply
run:
.. code::
u = UniversalDetector()
u.feed(some_bytes)
u.close()
detected = u.result
"""
MINIMUM_THRESHOLD = 0.20
HIGH_BYTE_DETECTOR = re.compile(b"[\x80-\xFF]")
ESC_DETECTOR = re.compile(b"(\033|~{)")
WIN_BYTE_DETECTOR = re.compile(b"[\x80-\x9F]")
ISO_WIN_MAP = {
"iso-8859-1": "Windows-1252",
"iso-8859-2": "Windows-1250",
"iso-8859-5": "Windows-1251",
"iso-8859-6": "Windows-1256",
"iso-8859-7": "Windows-1253",
"iso-8859-8": "Windows-1255",
"iso-8859-9": "Windows-1254",
"iso-8859-13": "Windows-1257",
}
def __init__(self, lang_filter=LanguageFilter.ALL):
self._esc_charset_prober = None
self._utf1632_prober = None
self._charset_probers = []
self.result = None
self.done = None
self._got_data = None
self._input_state = None
self._last_char = None
self.lang_filter = lang_filter
self.logger = logging.getLogger(__name__)
self._has_win_bytes = None
self.reset()
@property
def input_state(self):
return self._input_state
@property
def has_win_bytes(self):
return self._has_win_bytes
@property
def charset_probers(self):
return self._charset_probers
def reset(self):
"""
Reset the UniversalDetector and all of its probers back to their
initial states. This is called by ``__init__``, so you only need to
call this directly in between analyses of different documents.
"""
self.result = {"encoding": None, "confidence": 0.0, "language": None}
self.done = False
self._got_data = False
self._has_win_bytes = False
self._input_state = InputState.PURE_ASCII
self._last_char = b""
if self._esc_charset_prober:
self._esc_charset_prober.reset()
if self._utf1632_prober:
self._utf1632_prober.reset()
for prober in self._charset_probers:
prober.reset()
def feed(self, byte_str):
"""
Takes a chunk of a document and feeds it through all of the relevant
charset probers.
After calling ``feed``, you can check the value of the ``done``
attribute to see if you need to continue feeding the
``UniversalDetector`` more data, or if it has made a prediction
(in the ``result`` attribute).
.. note::
You should always call ``close`` when you're done feeding in your
document if ``done`` is not already ``True``.
"""
if self.done:
return
if not byte_str:
return
if not isinstance(byte_str, bytearray):
byte_str = bytearray(byte_str)
# First check for known BOMs, since these are guaranteed to be correct
if not self._got_data:
# If the data starts with BOM, we know it is UTF
if byte_str.startswith(codecs.BOM_UTF8):
# EF BB BF UTF-8 with BOM
self.result = {
"encoding": "UTF-8-SIG",
"confidence": 1.0,
"language": "",
}
elif byte_str.startswith((codecs.BOM_UTF32_LE, codecs.BOM_UTF32_BE)):
# FF FE 00 00 UTF-32, little-endian BOM
# 00 00 FE FF UTF-32, big-endian BOM
self.result = {"encoding": "UTF-32", "confidence": 1.0, "language": ""}
elif byte_str.startswith(b"\xFE\xFF\x00\x00"):
# FE FF 00 00 UCS-4, unusual octet order BOM (3412)
self.result = {
"encoding": "X-ISO-10646-UCS-4-3412",
"confidence": 1.0,
"language": "",
}
elif byte_str.startswith(b"\x00\x00\xFF\xFE"):
# 00 00 FF FE UCS-4, unusual octet order BOM (2143)
self.result = {
"encoding": "X-ISO-10646-UCS-4-2143",
"confidence": 1.0,
"language": "",
}
elif byte_str.startswith((codecs.BOM_LE, codecs.BOM_BE)):
# FF FE UTF-16, little endian BOM
# FE FF UTF-16, big endian BOM
self.result = {"encoding": "UTF-16", "confidence": 1.0, "language": ""}
self._got_data = True
if self.result["encoding"] is not None:
self.done = True
return
# If none of those matched and we've only see ASCII so far, check
# for high bytes and escape sequences
if self._input_state == InputState.PURE_ASCII:
if self.HIGH_BYTE_DETECTOR.search(byte_str):
self._input_state = InputState.HIGH_BYTE
elif (
self._input_state == InputState.PURE_ASCII
and self.ESC_DETECTOR.search(self._last_char + byte_str)
):
self._input_state = InputState.ESC_ASCII
self._last_char = byte_str[-1:]
# next we will look to see if it is appears to be either a UTF-16 or
# UTF-32 encoding
if not self._utf1632_prober:
self._utf1632_prober = UTF1632Prober()
if self._utf1632_prober.state == ProbingState.DETECTING:
if self._utf1632_prober.feed(byte_str) == ProbingState.FOUND_IT:
self.result = {
"encoding": self._utf1632_prober.charset_name,
"confidence": self._utf1632_prober.get_confidence(),
"language": "",
}
self.done = True
return
# If we've seen escape sequences, use the EscCharSetProber, which
# uses a simple state machine to check for known escape sequences in
# HZ and ISO-2022 encodings, since those are the only encodings that
# use such sequences.
if self._input_state == InputState.ESC_ASCII:
if not self._esc_charset_prober:
self._esc_charset_prober = EscCharSetProber(self.lang_filter)
if self._esc_charset_prober.feed(byte_str) == ProbingState.FOUND_IT:
self.result = {
"encoding": self._esc_charset_prober.charset_name,
"confidence": self._esc_charset_prober.get_confidence(),
"language": self._esc_charset_prober.language,
}
self.done = True
# If we've seen high bytes (i.e., those with values greater than 127),
# we need to do more complicated checks using all our multi-byte and
# single-byte probers that are left. The single-byte probers
# use character bigram distributions to determine the encoding, whereas
# the multi-byte probers use a combination of character unigram and
# bigram distributions.
elif self._input_state == InputState.HIGH_BYTE:
if not self._charset_probers:
self._charset_probers = [MBCSGroupProber(self.lang_filter)]
# If we're checking non-CJK encodings, use single-byte prober
if self.lang_filter & LanguageFilter.NON_CJK:
self._charset_probers.append(SBCSGroupProber())
self._charset_probers.append(Latin1Prober())
for prober in self._charset_probers:
if prober.feed(byte_str) == ProbingState.FOUND_IT:
self.result = {
"encoding": prober.charset_name,
"confidence": prober.get_confidence(),
"language": prober.language,
}
self.done = True
break
if self.WIN_BYTE_DETECTOR.search(byte_str):
self._has_win_bytes = True
def close(self):
"""
Stop analyzing the current document and come up with a final
prediction.
:returns: The ``result`` attribute, a ``dict`` with the keys
`encoding`, `confidence`, and `language`.
"""
# Don't bother with checks if we're already done
if self.done:
return self.result
self.done = True
if not self._got_data:
self.logger.debug("no data received!")
# Default to ASCII if it is all we've seen so far
elif self._input_state == InputState.PURE_ASCII:
self.result = {"encoding": "ascii", "confidence": 1.0, "language": ""}
# If we have seen non-ASCII, return the best that met MINIMUM_THRESHOLD
elif self._input_state == InputState.HIGH_BYTE:
prober_confidence = None
max_prober_confidence = 0.0
max_prober = None
for prober in self._charset_probers:
if not prober:
continue
prober_confidence = prober.get_confidence()
if prober_confidence > max_prober_confidence:
max_prober_confidence = prober_confidence
max_prober = prober
if max_prober and (max_prober_confidence > self.MINIMUM_THRESHOLD):
charset_name = max_prober.charset_name
lower_charset_name = max_prober.charset_name.lower()
confidence = max_prober.get_confidence()
# Use Windows encoding name instead of ISO-8859 if we saw any
# extra Windows-specific bytes
if lower_charset_name.startswith("iso-8859"):
if self._has_win_bytes:
charset_name = self.ISO_WIN_MAP.get(
lower_charset_name, charset_name
)
self.result = {
"encoding": charset_name,
"confidence": confidence,
"language": max_prober.language,
}
# Log all prober confidences if none met MINIMUM_THRESHOLD
if self.logger.getEffectiveLevel() <= logging.DEBUG:
if self.result["encoding"] is None:
self.logger.debug("no probers hit minimum threshold")
for group_prober in self._charset_probers:
if not group_prober:
continue
if isinstance(group_prober, CharSetGroupProber):
for prober in group_prober.probers:
self.logger.debug(
"%s %s confidence = %s",
prober.charset_name,
prober.language,
prober.get_confidence(),
)
else:
self.logger.debug(
"%s %s confidence = %s",
group_prober.charset_name,
group_prober.language,
group_prober.get_confidence(),
)
return self.result
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/chardet/universaldetector.py
|
Python
|
mit
| 13,288 |
######################## BEGIN LICENSE BLOCK ########################
#
# Contributor(s):
# Jason Zavaglia
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301 USA
######################### END LICENSE BLOCK #########################
from .charsetprober import CharSetProber
from .enums import ProbingState
class UTF1632Prober(CharSetProber):
"""
This class simply looks for occurrences of zero bytes, and infers
whether the file is UTF16 or UTF32 (low-endian or big-endian)
For instance, files looking like ( \0 \0 \0 [nonzero] )+
have a good probability to be UTF32BE. Files looking like ( \0 [nonzero] )+
may be guessed to be UTF16BE, and inversely for little-endian varieties.
"""
# how many logical characters to scan before feeling confident of prediction
MIN_CHARS_FOR_DETECTION = 20
# a fixed constant ratio of expected zeros or non-zeros in modulo-position.
EXPECTED_RATIO = 0.94
def __init__(self):
super().__init__()
self.position = 0
self.zeros_at_mod = [0] * 4
self.nonzeros_at_mod = [0] * 4
self._state = ProbingState.DETECTING
self.quad = [0, 0, 0, 0]
self.invalid_utf16be = False
self.invalid_utf16le = False
self.invalid_utf32be = False
self.invalid_utf32le = False
self.first_half_surrogate_pair_detected_16be = False
self.first_half_surrogate_pair_detected_16le = False
self.reset()
def reset(self):
super().reset()
self.position = 0
self.zeros_at_mod = [0] * 4
self.nonzeros_at_mod = [0] * 4
self._state = ProbingState.DETECTING
self.invalid_utf16be = False
self.invalid_utf16le = False
self.invalid_utf32be = False
self.invalid_utf32le = False
self.first_half_surrogate_pair_detected_16be = False
self.first_half_surrogate_pair_detected_16le = False
self.quad = [0, 0, 0, 0]
@property
def charset_name(self):
if self.is_likely_utf32be():
return "utf-32be"
if self.is_likely_utf32le():
return "utf-32le"
if self.is_likely_utf16be():
return "utf-16be"
if self.is_likely_utf16le():
return "utf-16le"
# default to something valid
return "utf-16"
@property
def language(self):
return ""
def approx_32bit_chars(self):
return max(1.0, self.position / 4.0)
def approx_16bit_chars(self):
return max(1.0, self.position / 2.0)
def is_likely_utf32be(self):
approx_chars = self.approx_32bit_chars()
return approx_chars >= self.MIN_CHARS_FOR_DETECTION and (
self.zeros_at_mod[0] / approx_chars > self.EXPECTED_RATIO
and self.zeros_at_mod[1] / approx_chars > self.EXPECTED_RATIO
and self.zeros_at_mod[2] / approx_chars > self.EXPECTED_RATIO
and self.nonzeros_at_mod[3] / approx_chars > self.EXPECTED_RATIO
and not self.invalid_utf32be
)
def is_likely_utf32le(self):
approx_chars = self.approx_32bit_chars()
return approx_chars >= self.MIN_CHARS_FOR_DETECTION and (
self.nonzeros_at_mod[0] / approx_chars > self.EXPECTED_RATIO
and self.zeros_at_mod[1] / approx_chars > self.EXPECTED_RATIO
and self.zeros_at_mod[2] / approx_chars > self.EXPECTED_RATIO
and self.zeros_at_mod[3] / approx_chars > self.EXPECTED_RATIO
and not self.invalid_utf32le
)
def is_likely_utf16be(self):
approx_chars = self.approx_16bit_chars()
return approx_chars >= self.MIN_CHARS_FOR_DETECTION and (
(self.nonzeros_at_mod[1] + self.nonzeros_at_mod[3]) / approx_chars
> self.EXPECTED_RATIO
and (self.zeros_at_mod[0] + self.zeros_at_mod[2]) / approx_chars
> self.EXPECTED_RATIO
and not self.invalid_utf16be
)
def is_likely_utf16le(self):
approx_chars = self.approx_16bit_chars()
return approx_chars >= self.MIN_CHARS_FOR_DETECTION and (
(self.nonzeros_at_mod[0] + self.nonzeros_at_mod[2]) / approx_chars
> self.EXPECTED_RATIO
and (self.zeros_at_mod[1] + self.zeros_at_mod[3]) / approx_chars
> self.EXPECTED_RATIO
and not self.invalid_utf16le
)
def validate_utf32_characters(self, quad):
"""
Validate if the quad of bytes is valid UTF-32.
UTF-32 is valid in the range 0x00000000 - 0x0010FFFF
excluding 0x0000D800 - 0x0000DFFF
https://en.wikipedia.org/wiki/UTF-32
"""
if (
quad[0] != 0
or quad[1] > 0x10
or (quad[0] == 0 and quad[1] == 0 and 0xD8 <= quad[2] <= 0xDF)
):
self.invalid_utf32be = True
if (
quad[3] != 0
or quad[2] > 0x10
or (quad[3] == 0 and quad[2] == 0 and 0xD8 <= quad[1] <= 0xDF)
):
self.invalid_utf32le = True
def validate_utf16_characters(self, pair):
"""
Validate if the pair of bytes is valid UTF-16.
UTF-16 is valid in the range 0x0000 - 0xFFFF excluding 0xD800 - 0xFFFF
with an exception for surrogate pairs, which must be in the range
0xD800-0xDBFF followed by 0xDC00-0xDFFF
https://en.wikipedia.org/wiki/UTF-16
"""
if not self.first_half_surrogate_pair_detected_16be:
if 0xD8 <= pair[0] <= 0xDB:
self.first_half_surrogate_pair_detected_16be = True
elif 0xDC <= pair[0] <= 0xDF:
self.invalid_utf16be = True
else:
if 0xDC <= pair[0] <= 0xDF:
self.first_half_surrogate_pair_detected_16be = False
else:
self.invalid_utf16be = True
if not self.first_half_surrogate_pair_detected_16le:
if 0xD8 <= pair[1] <= 0xDB:
self.first_half_surrogate_pair_detected_16le = True
elif 0xDC <= pair[1] <= 0xDF:
self.invalid_utf16le = True
else:
if 0xDC <= pair[1] <= 0xDF:
self.first_half_surrogate_pair_detected_16le = False
else:
self.invalid_utf16le = True
def feed(self, byte_str):
for c in byte_str:
mod4 = self.position % 4
self.quad[mod4] = c
if mod4 == 3:
self.validate_utf32_characters(self.quad)
self.validate_utf16_characters(self.quad[0:2])
self.validate_utf16_characters(self.quad[2:4])
if c == 0:
self.zeros_at_mod[mod4] += 1
else:
self.nonzeros_at_mod[mod4] += 1
self.position += 1
return self.state
@property
def state(self):
if self._state in {ProbingState.NOT_ME, ProbingState.FOUND_IT}:
# terminal, decided states
return self._state
if self.get_confidence() > 0.80:
self._state = ProbingState.FOUND_IT
elif self.position > 4 * 1024:
# if we get to 4kb into the file, and we can't conclude it's UTF,
# let's give up
self._state = ProbingState.NOT_ME
return self._state
def get_confidence(self):
return (
0.85
if (
self.is_likely_utf16le()
or self.is_likely_utf16be()
or self.is_likely_utf32le()
or self.is_likely_utf32be()
)
else 0.00
)
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/chardet/utf1632prober.py
|
Python
|
mit
| 8,289 |
######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301 USA
######################### END LICENSE BLOCK #########################
from .charsetprober import CharSetProber
from .codingstatemachine import CodingStateMachine
from .enums import MachineState, ProbingState
from .mbcssm import UTF8_SM_MODEL
class UTF8Prober(CharSetProber):
ONE_CHAR_PROB = 0.5
def __init__(self):
super().__init__()
self.coding_sm = CodingStateMachine(UTF8_SM_MODEL)
self._num_mb_chars = None
self.reset()
def reset(self):
super().reset()
self.coding_sm.reset()
self._num_mb_chars = 0
@property
def charset_name(self):
return "utf-8"
@property
def language(self):
return ""
def feed(self, byte_str):
for c in byte_str:
coding_state = self.coding_sm.next_state(c)
if coding_state == MachineState.ERROR:
self._state = ProbingState.NOT_ME
break
if coding_state == MachineState.ITS_ME:
self._state = ProbingState.FOUND_IT
break
if coding_state == MachineState.START:
if self.coding_sm.get_current_charlen() >= 2:
self._num_mb_chars += 1
if self.state == ProbingState.DETECTING:
if self.get_confidence() > self.SHORTCUT_THRESHOLD:
self._state = ProbingState.FOUND_IT
return self.state
def get_confidence(self):
unlike = 0.99
if self._num_mb_chars < 6:
unlike *= self.ONE_CHAR_PROB**self._num_mb_chars
return 1.0 - unlike
return unlike
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/chardet/utf8prober.py
|
Python
|
mit
| 2,709 |
"""
This module exists only to simplify retrieving the version number of chardet
from within setup.py and from chardet subpackages.
:author: Dan Blanchard (dan.blanchard@gmail.com)
"""
__version__ = "5.0.0"
VERSION = __version__.split(".")
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/chardet/version.py
|
Python
|
mit
| 242 |
# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
from .initialise import init, deinit, reinit, colorama_text
from .ansi import Fore, Back, Style, Cursor
from .ansitowin32 import AnsiToWin32
__version__ = '0.4.5'
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/colorama/__init__.py
|
Python
|
mit
| 239 |
# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
'''
This module generates ANSI character codes to printing colors to terminals.
See: http://en.wikipedia.org/wiki/ANSI_escape_code
'''
CSI = '\033['
OSC = '\033]'
BEL = '\a'
def code_to_chars(code):
return CSI + str(code) + 'm'
def set_title(title):
return OSC + '2;' + title + BEL
def clear_screen(mode=2):
return CSI + str(mode) + 'J'
def clear_line(mode=2):
return CSI + str(mode) + 'K'
class AnsiCodes(object):
def __init__(self):
# the subclasses declare class attributes which are numbers.
# Upon instantiation we define instance attributes, which are the same
# as the class attributes but wrapped with the ANSI escape sequence
for name in dir(self):
if not name.startswith('_'):
value = getattr(self, name)
setattr(self, name, code_to_chars(value))
class AnsiCursor(object):
def UP(self, n=1):
return CSI + str(n) + 'A'
def DOWN(self, n=1):
return CSI + str(n) + 'B'
def FORWARD(self, n=1):
return CSI + str(n) + 'C'
def BACK(self, n=1):
return CSI + str(n) + 'D'
def POS(self, x=1, y=1):
return CSI + str(y) + ';' + str(x) + 'H'
class AnsiFore(AnsiCodes):
BLACK = 30
RED = 31
GREEN = 32
YELLOW = 33
BLUE = 34
MAGENTA = 35
CYAN = 36
WHITE = 37
RESET = 39
# These are fairly well supported, but not part of the standard.
LIGHTBLACK_EX = 90
LIGHTRED_EX = 91
LIGHTGREEN_EX = 92
LIGHTYELLOW_EX = 93
LIGHTBLUE_EX = 94
LIGHTMAGENTA_EX = 95
LIGHTCYAN_EX = 96
LIGHTWHITE_EX = 97
class AnsiBack(AnsiCodes):
BLACK = 40
RED = 41
GREEN = 42
YELLOW = 43
BLUE = 44
MAGENTA = 45
CYAN = 46
WHITE = 47
RESET = 49
# These are fairly well supported, but not part of the standard.
LIGHTBLACK_EX = 100
LIGHTRED_EX = 101
LIGHTGREEN_EX = 102
LIGHTYELLOW_EX = 103
LIGHTBLUE_EX = 104
LIGHTMAGENTA_EX = 105
LIGHTCYAN_EX = 106
LIGHTWHITE_EX = 107
class AnsiStyle(AnsiCodes):
BRIGHT = 1
DIM = 2
NORMAL = 22
RESET_ALL = 0
Fore = AnsiFore()
Back = AnsiBack()
Style = AnsiStyle()
Cursor = AnsiCursor()
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/colorama/ansi.py
|
Python
|
mit
| 2,522 |
# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
import re
import sys
import os
from .ansi import AnsiFore, AnsiBack, AnsiStyle, Style, BEL
from .winterm import WinTerm, WinColor, WinStyle
from .win32 import windll, winapi_test
winterm = None
if windll is not None:
winterm = WinTerm()
class StreamWrapper(object):
'''
Wraps a stream (such as stdout), acting as a transparent proxy for all
attribute access apart from method 'write()', which is delegated to our
Converter instance.
'''
def __init__(self, wrapped, converter):
# double-underscore everything to prevent clashes with names of
# attributes on the wrapped stream object.
self.__wrapped = wrapped
self.__convertor = converter
def __getattr__(self, name):
return getattr(self.__wrapped, name)
def __enter__(self, *args, **kwargs):
# special method lookup bypasses __getattr__/__getattribute__, see
# https://stackoverflow.com/questions/12632894/why-doesnt-getattr-work-with-exit
# thus, contextlib magic methods are not proxied via __getattr__
return self.__wrapped.__enter__(*args, **kwargs)
def __exit__(self, *args, **kwargs):
return self.__wrapped.__exit__(*args, **kwargs)
def __setstate__(self, state):
self.__dict__ = state
def __getstate__(self):
return self.__dict__
def write(self, text):
self.__convertor.write(text)
def isatty(self):
stream = self.__wrapped
if 'PYCHARM_HOSTED' in os.environ:
if stream is not None and (stream is sys.__stdout__ or stream is sys.__stderr__):
return True
try:
stream_isatty = stream.isatty
except AttributeError:
return False
else:
return stream_isatty()
@property
def closed(self):
stream = self.__wrapped
try:
return stream.closed
# AttributeError in the case that the stream doesn't support being closed
# ValueError for the case that the stream has already been detached when atexit runs
except (AttributeError, ValueError):
return True
class AnsiToWin32(object):
'''
Implements a 'write()' method which, on Windows, will strip ANSI character
sequences from the text, and if outputting to a tty, will convert them into
win32 function calls.
'''
ANSI_CSI_RE = re.compile('\001?\033\\[((?:\\d|;)*)([a-zA-Z])\002?') # Control Sequence Introducer
ANSI_OSC_RE = re.compile('\001?\033\\]([^\a]*)(\a)\002?') # Operating System Command
def __init__(self, wrapped, convert=None, strip=None, autoreset=False):
# The wrapped stream (normally sys.stdout or sys.stderr)
self.wrapped = wrapped
# should we reset colors to defaults after every .write()
self.autoreset = autoreset
# create the proxy wrapping our output stream
self.stream = StreamWrapper(wrapped, self)
on_windows = os.name == 'nt'
# We test if the WinAPI works, because even if we are on Windows
# we may be using a terminal that doesn't support the WinAPI
# (e.g. Cygwin Terminal). In this case it's up to the terminal
# to support the ANSI codes.
conversion_supported = on_windows and winapi_test()
# should we strip ANSI sequences from our output?
if strip is None:
strip = conversion_supported or (not self.stream.closed and not self.stream.isatty())
self.strip = strip
# should we should convert ANSI sequences into win32 calls?
if convert is None:
convert = conversion_supported and not self.stream.closed and self.stream.isatty()
self.convert = convert
# dict of ansi codes to win32 functions and parameters
self.win32_calls = self.get_win32_calls()
# are we wrapping stderr?
self.on_stderr = self.wrapped is sys.stderr
def should_wrap(self):
'''
True if this class is actually needed. If false, then the output
stream will not be affected, nor will win32 calls be issued, so
wrapping stdout is not actually required. This will generally be
False on non-Windows platforms, unless optional functionality like
autoreset has been requested using kwargs to init()
'''
return self.convert or self.strip or self.autoreset
def get_win32_calls(self):
if self.convert and winterm:
return {
AnsiStyle.RESET_ALL: (winterm.reset_all, ),
AnsiStyle.BRIGHT: (winterm.style, WinStyle.BRIGHT),
AnsiStyle.DIM: (winterm.style, WinStyle.NORMAL),
AnsiStyle.NORMAL: (winterm.style, WinStyle.NORMAL),
AnsiFore.BLACK: (winterm.fore, WinColor.BLACK),
AnsiFore.RED: (winterm.fore, WinColor.RED),
AnsiFore.GREEN: (winterm.fore, WinColor.GREEN),
AnsiFore.YELLOW: (winterm.fore, WinColor.YELLOW),
AnsiFore.BLUE: (winterm.fore, WinColor.BLUE),
AnsiFore.MAGENTA: (winterm.fore, WinColor.MAGENTA),
AnsiFore.CYAN: (winterm.fore, WinColor.CYAN),
AnsiFore.WHITE: (winterm.fore, WinColor.GREY),
AnsiFore.RESET: (winterm.fore, ),
AnsiFore.LIGHTBLACK_EX: (winterm.fore, WinColor.BLACK, True),
AnsiFore.LIGHTRED_EX: (winterm.fore, WinColor.RED, True),
AnsiFore.LIGHTGREEN_EX: (winterm.fore, WinColor.GREEN, True),
AnsiFore.LIGHTYELLOW_EX: (winterm.fore, WinColor.YELLOW, True),
AnsiFore.LIGHTBLUE_EX: (winterm.fore, WinColor.BLUE, True),
AnsiFore.LIGHTMAGENTA_EX: (winterm.fore, WinColor.MAGENTA, True),
AnsiFore.LIGHTCYAN_EX: (winterm.fore, WinColor.CYAN, True),
AnsiFore.LIGHTWHITE_EX: (winterm.fore, WinColor.GREY, True),
AnsiBack.BLACK: (winterm.back, WinColor.BLACK),
AnsiBack.RED: (winterm.back, WinColor.RED),
AnsiBack.GREEN: (winterm.back, WinColor.GREEN),
AnsiBack.YELLOW: (winterm.back, WinColor.YELLOW),
AnsiBack.BLUE: (winterm.back, WinColor.BLUE),
AnsiBack.MAGENTA: (winterm.back, WinColor.MAGENTA),
AnsiBack.CYAN: (winterm.back, WinColor.CYAN),
AnsiBack.WHITE: (winterm.back, WinColor.GREY),
AnsiBack.RESET: (winterm.back, ),
AnsiBack.LIGHTBLACK_EX: (winterm.back, WinColor.BLACK, True),
AnsiBack.LIGHTRED_EX: (winterm.back, WinColor.RED, True),
AnsiBack.LIGHTGREEN_EX: (winterm.back, WinColor.GREEN, True),
AnsiBack.LIGHTYELLOW_EX: (winterm.back, WinColor.YELLOW, True),
AnsiBack.LIGHTBLUE_EX: (winterm.back, WinColor.BLUE, True),
AnsiBack.LIGHTMAGENTA_EX: (winterm.back, WinColor.MAGENTA, True),
AnsiBack.LIGHTCYAN_EX: (winterm.back, WinColor.CYAN, True),
AnsiBack.LIGHTWHITE_EX: (winterm.back, WinColor.GREY, True),
}
return dict()
def write(self, text):
if self.strip or self.convert:
self.write_and_convert(text)
else:
self.wrapped.write(text)
self.wrapped.flush()
if self.autoreset:
self.reset_all()
def reset_all(self):
if self.convert:
self.call_win32('m', (0,))
elif not self.strip and not self.stream.closed:
self.wrapped.write(Style.RESET_ALL)
def write_and_convert(self, text):
'''
Write the given text to our wrapped stream, stripping any ANSI
sequences from the text, and optionally converting them into win32
calls.
'''
cursor = 0
text = self.convert_osc(text)
for match in self.ANSI_CSI_RE.finditer(text):
start, end = match.span()
self.write_plain_text(text, cursor, start)
self.convert_ansi(*match.groups())
cursor = end
self.write_plain_text(text, cursor, len(text))
def write_plain_text(self, text, start, end):
if start < end:
self.wrapped.write(text[start:end])
self.wrapped.flush()
def convert_ansi(self, paramstring, command):
if self.convert:
params = self.extract_params(command, paramstring)
self.call_win32(command, params)
def extract_params(self, command, paramstring):
if command in 'Hf':
params = tuple(int(p) if len(p) != 0 else 1 for p in paramstring.split(';'))
while len(params) < 2:
# defaults:
params = params + (1,)
else:
params = tuple(int(p) for p in paramstring.split(';') if len(p) != 0)
if len(params) == 0:
# defaults:
if command in 'JKm':
params = (0,)
elif command in 'ABCD':
params = (1,)
return params
def call_win32(self, command, params):
if command == 'm':
for param in params:
if param in self.win32_calls:
func_args = self.win32_calls[param]
func = func_args[0]
args = func_args[1:]
kwargs = dict(on_stderr=self.on_stderr)
func(*args, **kwargs)
elif command in 'J':
winterm.erase_screen(params[0], on_stderr=self.on_stderr)
elif command in 'K':
winterm.erase_line(params[0], on_stderr=self.on_stderr)
elif command in 'Hf': # cursor position - absolute
winterm.set_cursor_position(params, on_stderr=self.on_stderr)
elif command in 'ABCD': # cursor position - relative
n = params[0]
# A - up, B - down, C - forward, D - back
x, y = {'A': (0, -n), 'B': (0, n), 'C': (n, 0), 'D': (-n, 0)}[command]
winterm.cursor_adjust(x, y, on_stderr=self.on_stderr)
def convert_osc(self, text):
for match in self.ANSI_OSC_RE.finditer(text):
start, end = match.span()
text = text[:start] + text[end:]
paramstring, command = match.groups()
if command == BEL:
if paramstring.count(";") == 1:
params = paramstring.split(";")
# 0 - change title and icon (we will only change title)
# 1 - change icon (we don't support this)
# 2 - change title
if params[0] in '02':
winterm.set_title(params[1])
return text
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/colorama/ansitowin32.py
|
Python
|
mit
| 10,830 |
# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
import atexit
import contextlib
import sys
from .ansitowin32 import AnsiToWin32
orig_stdout = None
orig_stderr = None
wrapped_stdout = None
wrapped_stderr = None
atexit_done = False
def reset_all():
if AnsiToWin32 is not None: # Issue #74: objects might become None at exit
AnsiToWin32(orig_stdout).reset_all()
def init(autoreset=False, convert=None, strip=None, wrap=True):
if not wrap and any([autoreset, convert, strip]):
raise ValueError('wrap=False conflicts with any other arg=True')
global wrapped_stdout, wrapped_stderr
global orig_stdout, orig_stderr
orig_stdout = sys.stdout
orig_stderr = sys.stderr
if sys.stdout is None:
wrapped_stdout = None
else:
sys.stdout = wrapped_stdout = \
wrap_stream(orig_stdout, convert, strip, autoreset, wrap)
if sys.stderr is None:
wrapped_stderr = None
else:
sys.stderr = wrapped_stderr = \
wrap_stream(orig_stderr, convert, strip, autoreset, wrap)
global atexit_done
if not atexit_done:
atexit.register(reset_all)
atexit_done = True
def deinit():
if orig_stdout is not None:
sys.stdout = orig_stdout
if orig_stderr is not None:
sys.stderr = orig_stderr
@contextlib.contextmanager
def colorama_text(*args, **kwargs):
init(*args, **kwargs)
try:
yield
finally:
deinit()
def reinit():
if wrapped_stdout is not None:
sys.stdout = wrapped_stdout
if wrapped_stderr is not None:
sys.stderr = wrapped_stderr
def wrap_stream(stream, convert, strip, autoreset, wrap):
if wrap:
wrapper = AnsiToWin32(stream,
convert=convert, strip=strip, autoreset=autoreset)
if wrapper.should_wrap():
stream = wrapper.stream
return stream
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/colorama/initialise.py
|
Python
|
mit
| 1,915 |
# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
# from winbase.h
STDOUT = -11
STDERR = -12
try:
import ctypes
from ctypes import LibraryLoader
windll = LibraryLoader(ctypes.WinDLL)
from ctypes import wintypes
except (AttributeError, ImportError):
windll = None
SetConsoleTextAttribute = lambda *_: None
winapi_test = lambda *_: None
else:
from ctypes import byref, Structure, c_char, POINTER
COORD = wintypes._COORD
class CONSOLE_SCREEN_BUFFER_INFO(Structure):
"""struct in wincon.h."""
_fields_ = [
("dwSize", COORD),
("dwCursorPosition", COORD),
("wAttributes", wintypes.WORD),
("srWindow", wintypes.SMALL_RECT),
("dwMaximumWindowSize", COORD),
]
def __str__(self):
return '(%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d)' % (
self.dwSize.Y, self.dwSize.X
, self.dwCursorPosition.Y, self.dwCursorPosition.X
, self.wAttributes
, self.srWindow.Top, self.srWindow.Left, self.srWindow.Bottom, self.srWindow.Right
, self.dwMaximumWindowSize.Y, self.dwMaximumWindowSize.X
)
_GetStdHandle = windll.kernel32.GetStdHandle
_GetStdHandle.argtypes = [
wintypes.DWORD,
]
_GetStdHandle.restype = wintypes.HANDLE
_GetConsoleScreenBufferInfo = windll.kernel32.GetConsoleScreenBufferInfo
_GetConsoleScreenBufferInfo.argtypes = [
wintypes.HANDLE,
POINTER(CONSOLE_SCREEN_BUFFER_INFO),
]
_GetConsoleScreenBufferInfo.restype = wintypes.BOOL
_SetConsoleTextAttribute = windll.kernel32.SetConsoleTextAttribute
_SetConsoleTextAttribute.argtypes = [
wintypes.HANDLE,
wintypes.WORD,
]
_SetConsoleTextAttribute.restype = wintypes.BOOL
_SetConsoleCursorPosition = windll.kernel32.SetConsoleCursorPosition
_SetConsoleCursorPosition.argtypes = [
wintypes.HANDLE,
COORD,
]
_SetConsoleCursorPosition.restype = wintypes.BOOL
_FillConsoleOutputCharacterA = windll.kernel32.FillConsoleOutputCharacterA
_FillConsoleOutputCharacterA.argtypes = [
wintypes.HANDLE,
c_char,
wintypes.DWORD,
COORD,
POINTER(wintypes.DWORD),
]
_FillConsoleOutputCharacterA.restype = wintypes.BOOL
_FillConsoleOutputAttribute = windll.kernel32.FillConsoleOutputAttribute
_FillConsoleOutputAttribute.argtypes = [
wintypes.HANDLE,
wintypes.WORD,
wintypes.DWORD,
COORD,
POINTER(wintypes.DWORD),
]
_FillConsoleOutputAttribute.restype = wintypes.BOOL
_SetConsoleTitleW = windll.kernel32.SetConsoleTitleW
_SetConsoleTitleW.argtypes = [
wintypes.LPCWSTR
]
_SetConsoleTitleW.restype = wintypes.BOOL
def _winapi_test(handle):
csbi = CONSOLE_SCREEN_BUFFER_INFO()
success = _GetConsoleScreenBufferInfo(
handle, byref(csbi))
return bool(success)
def winapi_test():
return any(_winapi_test(h) for h in
(_GetStdHandle(STDOUT), _GetStdHandle(STDERR)))
def GetConsoleScreenBufferInfo(stream_id=STDOUT):
handle = _GetStdHandle(stream_id)
csbi = CONSOLE_SCREEN_BUFFER_INFO()
success = _GetConsoleScreenBufferInfo(
handle, byref(csbi))
return csbi
def SetConsoleTextAttribute(stream_id, attrs):
handle = _GetStdHandle(stream_id)
return _SetConsoleTextAttribute(handle, attrs)
def SetConsoleCursorPosition(stream_id, position, adjust=True):
position = COORD(*position)
# If the position is out of range, do nothing.
if position.Y <= 0 or position.X <= 0:
return
# Adjust for Windows' SetConsoleCursorPosition:
# 1. being 0-based, while ANSI is 1-based.
# 2. expecting (x,y), while ANSI uses (y,x).
adjusted_position = COORD(position.Y - 1, position.X - 1)
if adjust:
# Adjust for viewport's scroll position
sr = GetConsoleScreenBufferInfo(STDOUT).srWindow
adjusted_position.Y += sr.Top
adjusted_position.X += sr.Left
# Resume normal processing
handle = _GetStdHandle(stream_id)
return _SetConsoleCursorPosition(handle, adjusted_position)
def FillConsoleOutputCharacter(stream_id, char, length, start):
handle = _GetStdHandle(stream_id)
char = c_char(char.encode())
length = wintypes.DWORD(length)
num_written = wintypes.DWORD(0)
# Note that this is hard-coded for ANSI (vs wide) bytes.
success = _FillConsoleOutputCharacterA(
handle, char, length, start, byref(num_written))
return num_written.value
def FillConsoleOutputAttribute(stream_id, attr, length, start):
''' FillConsoleOutputAttribute( hConsole, csbi.wAttributes, dwConSize, coordScreen, &cCharsWritten )'''
handle = _GetStdHandle(stream_id)
attribute = wintypes.WORD(attr)
length = wintypes.DWORD(length)
num_written = wintypes.DWORD(0)
# Note that this is hard-coded for ANSI (vs wide) bytes.
return _FillConsoleOutputAttribute(
handle, attribute, length, start, byref(num_written))
def SetConsoleTitle(title):
return _SetConsoleTitleW(title)
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/colorama/win32.py
|
Python
|
mit
| 5,404 |
# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
from . import win32
# from wincon.h
class WinColor(object):
BLACK = 0
BLUE = 1
GREEN = 2
CYAN = 3
RED = 4
MAGENTA = 5
YELLOW = 6
GREY = 7
# from wincon.h
class WinStyle(object):
NORMAL = 0x00 # dim text, dim background
BRIGHT = 0x08 # bright text, dim background
BRIGHT_BACKGROUND = 0x80 # dim text, bright background
class WinTerm(object):
def __init__(self):
self._default = win32.GetConsoleScreenBufferInfo(win32.STDOUT).wAttributes
self.set_attrs(self._default)
self._default_fore = self._fore
self._default_back = self._back
self._default_style = self._style
# In order to emulate LIGHT_EX in windows, we borrow the BRIGHT style.
# So that LIGHT_EX colors and BRIGHT style do not clobber each other,
# we track them separately, since LIGHT_EX is overwritten by Fore/Back
# and BRIGHT is overwritten by Style codes.
self._light = 0
def get_attrs(self):
return self._fore + self._back * 16 + (self._style | self._light)
def set_attrs(self, value):
self._fore = value & 7
self._back = (value >> 4) & 7
self._style = value & (WinStyle.BRIGHT | WinStyle.BRIGHT_BACKGROUND)
def reset_all(self, on_stderr=None):
self.set_attrs(self._default)
self.set_console(attrs=self._default)
self._light = 0
def fore(self, fore=None, light=False, on_stderr=False):
if fore is None:
fore = self._default_fore
self._fore = fore
# Emulate LIGHT_EX with BRIGHT Style
if light:
self._light |= WinStyle.BRIGHT
else:
self._light &= ~WinStyle.BRIGHT
self.set_console(on_stderr=on_stderr)
def back(self, back=None, light=False, on_stderr=False):
if back is None:
back = self._default_back
self._back = back
# Emulate LIGHT_EX with BRIGHT_BACKGROUND Style
if light:
self._light |= WinStyle.BRIGHT_BACKGROUND
else:
self._light &= ~WinStyle.BRIGHT_BACKGROUND
self.set_console(on_stderr=on_stderr)
def style(self, style=None, on_stderr=False):
if style is None:
style = self._default_style
self._style = style
self.set_console(on_stderr=on_stderr)
def set_console(self, attrs=None, on_stderr=False):
if attrs is None:
attrs = self.get_attrs()
handle = win32.STDOUT
if on_stderr:
handle = win32.STDERR
win32.SetConsoleTextAttribute(handle, attrs)
def get_position(self, handle):
position = win32.GetConsoleScreenBufferInfo(handle).dwCursorPosition
# Because Windows coordinates are 0-based,
# and win32.SetConsoleCursorPosition expects 1-based.
position.X += 1
position.Y += 1
return position
def set_cursor_position(self, position=None, on_stderr=False):
if position is None:
# I'm not currently tracking the position, so there is no default.
# position = self.get_position()
return
handle = win32.STDOUT
if on_stderr:
handle = win32.STDERR
win32.SetConsoleCursorPosition(handle, position)
def cursor_adjust(self, x, y, on_stderr=False):
handle = win32.STDOUT
if on_stderr:
handle = win32.STDERR
position = self.get_position(handle)
adjusted_position = (position.Y + y, position.X + x)
win32.SetConsoleCursorPosition(handle, adjusted_position, adjust=False)
def erase_screen(self, mode=0, on_stderr=False):
# 0 should clear from the cursor to the end of the screen.
# 1 should clear from the cursor to the beginning of the screen.
# 2 should clear the entire screen, and move cursor to (1,1)
handle = win32.STDOUT
if on_stderr:
handle = win32.STDERR
csbi = win32.GetConsoleScreenBufferInfo(handle)
# get the number of character cells in the current buffer
cells_in_screen = csbi.dwSize.X * csbi.dwSize.Y
# get number of character cells before current cursor position
cells_before_cursor = csbi.dwSize.X * csbi.dwCursorPosition.Y + csbi.dwCursorPosition.X
if mode == 0:
from_coord = csbi.dwCursorPosition
cells_to_erase = cells_in_screen - cells_before_cursor
elif mode == 1:
from_coord = win32.COORD(0, 0)
cells_to_erase = cells_before_cursor
elif mode == 2:
from_coord = win32.COORD(0, 0)
cells_to_erase = cells_in_screen
else:
# invalid mode
return
# fill the entire screen with blanks
win32.FillConsoleOutputCharacter(handle, ' ', cells_to_erase, from_coord)
# now set the buffer's attributes accordingly
win32.FillConsoleOutputAttribute(handle, self.get_attrs(), cells_to_erase, from_coord)
if mode == 2:
# put the cursor where needed
win32.SetConsoleCursorPosition(handle, (1, 1))
def erase_line(self, mode=0, on_stderr=False):
# 0 should clear from the cursor to the end of the line.
# 1 should clear from the cursor to the beginning of the line.
# 2 should clear the entire line.
handle = win32.STDOUT
if on_stderr:
handle = win32.STDERR
csbi = win32.GetConsoleScreenBufferInfo(handle)
if mode == 0:
from_coord = csbi.dwCursorPosition
cells_to_erase = csbi.dwSize.X - csbi.dwCursorPosition.X
elif mode == 1:
from_coord = win32.COORD(0, csbi.dwCursorPosition.Y)
cells_to_erase = csbi.dwCursorPosition.X
elif mode == 2:
from_coord = win32.COORD(0, csbi.dwCursorPosition.Y)
cells_to_erase = csbi.dwSize.X
else:
# invalid mode
return
# fill the entire screen with blanks
win32.FillConsoleOutputCharacter(handle, ' ', cells_to_erase, from_coord)
# now set the buffer's attributes accordingly
win32.FillConsoleOutputAttribute(handle, self.get_attrs(), cells_to_erase, from_coord)
def set_title(self, title):
win32.SetConsoleTitle(title)
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/colorama/winterm.py
|
Python
|
mit
| 6,438 |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2022 Vinay Sajip.
# Licensed to the Python Software Foundation under a contributor agreement.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
import logging
__version__ = '0.3.6'
class DistlibException(Exception):
pass
try:
from logging import NullHandler
except ImportError: # pragma: no cover
class NullHandler(logging.Handler):
def handle(self, record): pass
def emit(self, record): pass
def createLock(self): self.lock = None
logger = logging.getLogger(__name__)
logger.addHandler(NullHandler())
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/distlib/__init__.py
|
Python
|
mit
| 581 |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2013-2017 Vinay Sajip.
# Licensed to the Python Software Foundation under a contributor agreement.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
from __future__ import absolute_import
import os
import re
import sys
try:
import ssl
except ImportError: # pragma: no cover
ssl = None
if sys.version_info[0] < 3: # pragma: no cover
from StringIO import StringIO
string_types = basestring,
text_type = unicode
from types import FileType as file_type
import __builtin__ as builtins
import ConfigParser as configparser
from urlparse import urlparse, urlunparse, urljoin, urlsplit, urlunsplit
from urllib import (urlretrieve, quote as _quote, unquote, url2pathname,
pathname2url, ContentTooShortError, splittype)
def quote(s):
if isinstance(s, unicode):
s = s.encode('utf-8')
return _quote(s)
import urllib2
from urllib2 import (Request, urlopen, URLError, HTTPError,
HTTPBasicAuthHandler, HTTPPasswordMgr,
HTTPHandler, HTTPRedirectHandler,
build_opener)
if ssl:
from urllib2 import HTTPSHandler
import httplib
import xmlrpclib
import Queue as queue
from HTMLParser import HTMLParser
import htmlentitydefs
raw_input = raw_input
from itertools import ifilter as filter
from itertools import ifilterfalse as filterfalse
# Leaving this around for now, in case it needs resurrecting in some way
# _userprog = None
# def splituser(host):
# """splituser('user[:passwd]@host[:port]') --> 'user[:passwd]', 'host[:port]'."""
# global _userprog
# if _userprog is None:
# import re
# _userprog = re.compile('^(.*)@(.*)$')
# match = _userprog.match(host)
# if match: return match.group(1, 2)
# return None, host
else: # pragma: no cover
from io import StringIO
string_types = str,
text_type = str
from io import TextIOWrapper as file_type
import builtins
import configparser
import shutil
from urllib.parse import (urlparse, urlunparse, urljoin, quote,
unquote, urlsplit, urlunsplit, splittype)
from urllib.request import (urlopen, urlretrieve, Request, url2pathname,
pathname2url,
HTTPBasicAuthHandler, HTTPPasswordMgr,
HTTPHandler, HTTPRedirectHandler,
build_opener)
if ssl:
from urllib.request import HTTPSHandler
from urllib.error import HTTPError, URLError, ContentTooShortError
import http.client as httplib
import urllib.request as urllib2
import xmlrpc.client as xmlrpclib
import queue
from html.parser import HTMLParser
import html.entities as htmlentitydefs
raw_input = input
from itertools import filterfalse
filter = filter
try:
from ssl import match_hostname, CertificateError
except ImportError: # pragma: no cover
class CertificateError(ValueError):
pass
def _dnsname_match(dn, hostname, max_wildcards=1):
"""Matching according to RFC 6125, section 6.4.3
http://tools.ietf.org/html/rfc6125#section-6.4.3
"""
pats = []
if not dn:
return False
parts = dn.split('.')
leftmost, remainder = parts[0], parts[1:]
wildcards = leftmost.count('*')
if wildcards > max_wildcards:
# Issue #17980: avoid denials of service by refusing more
# than one wildcard per fragment. A survey of established
# policy among SSL implementations showed it to be a
# reasonable choice.
raise CertificateError(
"too many wildcards in certificate DNS name: " + repr(dn))
# speed up common case w/o wildcards
if not wildcards:
return dn.lower() == hostname.lower()
# RFC 6125, section 6.4.3, subitem 1.
# The client SHOULD NOT attempt to match a presented identifier in which
# the wildcard character comprises a label other than the left-most label.
if leftmost == '*':
# When '*' is a fragment by itself, it matches a non-empty dotless
# fragment.
pats.append('[^.]+')
elif leftmost.startswith('xn--') or hostname.startswith('xn--'):
# RFC 6125, section 6.4.3, subitem 3.
# The client SHOULD NOT attempt to match a presented identifier
# where the wildcard character is embedded within an A-label or
# U-label of an internationalized domain name.
pats.append(re.escape(leftmost))
else:
# Otherwise, '*' matches any dotless string, e.g. www*
pats.append(re.escape(leftmost).replace(r'\*', '[^.]*'))
# add the remaining fragments, ignore any wildcards
for frag in remainder:
pats.append(re.escape(frag))
pat = re.compile(r'\A' + r'\.'.join(pats) + r'\Z', re.IGNORECASE)
return pat.match(hostname)
def match_hostname(cert, hostname):
"""Verify that *cert* (in decoded format as returned by
SSLSocket.getpeercert()) matches the *hostname*. RFC 2818 and RFC 6125
rules are followed, but IP addresses are not accepted for *hostname*.
CertificateError is raised on failure. On success, the function
returns nothing.
"""
if not cert:
raise ValueError("empty or no certificate, match_hostname needs a "
"SSL socket or SSL context with either "
"CERT_OPTIONAL or CERT_REQUIRED")
dnsnames = []
san = cert.get('subjectAltName', ())
for key, value in san:
if key == 'DNS':
if _dnsname_match(value, hostname):
return
dnsnames.append(value)
if not dnsnames:
# The subject is only checked when there is no dNSName entry
# in subjectAltName
for sub in cert.get('subject', ()):
for key, value in sub:
# XXX according to RFC 2818, the most specific Common Name
# must be used.
if key == 'commonName':
if _dnsname_match(value, hostname):
return
dnsnames.append(value)
if len(dnsnames) > 1:
raise CertificateError("hostname %r "
"doesn't match either of %s"
% (hostname, ', '.join(map(repr, dnsnames))))
elif len(dnsnames) == 1:
raise CertificateError("hostname %r "
"doesn't match %r"
% (hostname, dnsnames[0]))
else:
raise CertificateError("no appropriate commonName or "
"subjectAltName fields were found")
try:
from types import SimpleNamespace as Container
except ImportError: # pragma: no cover
class Container(object):
"""
A generic container for when multiple values need to be returned
"""
def __init__(self, **kwargs):
self.__dict__.update(kwargs)
try:
from shutil import which
except ImportError: # pragma: no cover
# Implementation from Python 3.3
def which(cmd, mode=os.F_OK | os.X_OK, path=None):
"""Given a command, mode, and a PATH string, return the path which
conforms to the given mode on the PATH, or None if there is no such
file.
`mode` defaults to os.F_OK | os.X_OK. `path` defaults to the result
of os.environ.get("PATH"), or can be overridden with a custom search
path.
"""
# Check that a given file can be accessed with the correct mode.
# Additionally check that `file` is not a directory, as on Windows
# directories pass the os.access check.
def _access_check(fn, mode):
return (os.path.exists(fn) and os.access(fn, mode)
and not os.path.isdir(fn))
# If we're given a path with a directory part, look it up directly rather
# than referring to PATH directories. This includes checking relative to the
# current directory, e.g. ./script
if os.path.dirname(cmd):
if _access_check(cmd, mode):
return cmd
return None
if path is None:
path = os.environ.get("PATH", os.defpath)
if not path:
return None
path = path.split(os.pathsep)
if sys.platform == "win32":
# The current directory takes precedence on Windows.
if not os.curdir in path:
path.insert(0, os.curdir)
# PATHEXT is necessary to check on Windows.
pathext = os.environ.get("PATHEXT", "").split(os.pathsep)
# See if the given file matches any of the expected path extensions.
# This will allow us to short circuit when given "python.exe".
# If it does match, only test that one, otherwise we have to try
# others.
if any(cmd.lower().endswith(ext.lower()) for ext in pathext):
files = [cmd]
else:
files = [cmd + ext for ext in pathext]
else:
# On other platforms you don't have things like PATHEXT to tell you
# what file suffixes are executable, so just pass on cmd as-is.
files = [cmd]
seen = set()
for dir in path:
normdir = os.path.normcase(dir)
if not normdir in seen:
seen.add(normdir)
for thefile in files:
name = os.path.join(dir, thefile)
if _access_check(name, mode):
return name
return None
# ZipFile is a context manager in 2.7, but not in 2.6
from zipfile import ZipFile as BaseZipFile
if hasattr(BaseZipFile, '__enter__'): # pragma: no cover
ZipFile = BaseZipFile
else: # pragma: no cover
from zipfile import ZipExtFile as BaseZipExtFile
class ZipExtFile(BaseZipExtFile):
def __init__(self, base):
self.__dict__.update(base.__dict__)
def __enter__(self):
return self
def __exit__(self, *exc_info):
self.close()
# return None, so if an exception occurred, it will propagate
class ZipFile(BaseZipFile):
def __enter__(self):
return self
def __exit__(self, *exc_info):
self.close()
# return None, so if an exception occurred, it will propagate
def open(self, *args, **kwargs):
base = BaseZipFile.open(self, *args, **kwargs)
return ZipExtFile(base)
try:
from platform import python_implementation
except ImportError: # pragma: no cover
def python_implementation():
"""Return a string identifying the Python implementation."""
if 'PyPy' in sys.version:
return 'PyPy'
if os.name == 'java':
return 'Jython'
if sys.version.startswith('IronPython'):
return 'IronPython'
return 'CPython'
import shutil
import sysconfig
try:
callable = callable
except NameError: # pragma: no cover
from collections.abc import Callable
def callable(obj):
return isinstance(obj, Callable)
try:
fsencode = os.fsencode
fsdecode = os.fsdecode
except AttributeError: # pragma: no cover
# Issue #99: on some systems (e.g. containerised),
# sys.getfilesystemencoding() returns None, and we need a real value,
# so fall back to utf-8. From the CPython 2.7 docs relating to Unix and
# sys.getfilesystemencoding(): the return value is "the user’s preference
# according to the result of nl_langinfo(CODESET), or None if the
# nl_langinfo(CODESET) failed."
_fsencoding = sys.getfilesystemencoding() or 'utf-8'
if _fsencoding == 'mbcs':
_fserrors = 'strict'
else:
_fserrors = 'surrogateescape'
def fsencode(filename):
if isinstance(filename, bytes):
return filename
elif isinstance(filename, text_type):
return filename.encode(_fsencoding, _fserrors)
else:
raise TypeError("expect bytes or str, not %s" %
type(filename).__name__)
def fsdecode(filename):
if isinstance(filename, text_type):
return filename
elif isinstance(filename, bytes):
return filename.decode(_fsencoding, _fserrors)
else:
raise TypeError("expect bytes or str, not %s" %
type(filename).__name__)
try:
from tokenize import detect_encoding
except ImportError: # pragma: no cover
from codecs import BOM_UTF8, lookup
import re
cookie_re = re.compile(r"coding[:=]\s*([-\w.]+)")
def _get_normal_name(orig_enc):
"""Imitates get_normal_name in tokenizer.c."""
# Only care about the first 12 characters.
enc = orig_enc[:12].lower().replace("_", "-")
if enc == "utf-8" or enc.startswith("utf-8-"):
return "utf-8"
if enc in ("latin-1", "iso-8859-1", "iso-latin-1") or \
enc.startswith(("latin-1-", "iso-8859-1-", "iso-latin-1-")):
return "iso-8859-1"
return orig_enc
def detect_encoding(readline):
"""
The detect_encoding() function is used to detect the encoding that should
be used to decode a Python source file. It requires one argument, readline,
in the same way as the tokenize() generator.
It will call readline a maximum of twice, and return the encoding used
(as a string) and a list of any lines (left as bytes) it has read in.
It detects the encoding from the presence of a utf-8 bom or an encoding
cookie as specified in pep-0263. If both a bom and a cookie are present,
but disagree, a SyntaxError will be raised. If the encoding cookie is an
invalid charset, raise a SyntaxError. Note that if a utf-8 bom is found,
'utf-8-sig' is returned.
If no encoding is specified, then the default of 'utf-8' will be returned.
"""
try:
filename = readline.__self__.name
except AttributeError:
filename = None
bom_found = False
encoding = None
default = 'utf-8'
def read_or_stop():
try:
return readline()
except StopIteration:
return b''
def find_cookie(line):
try:
# Decode as UTF-8. Either the line is an encoding declaration,
# in which case it should be pure ASCII, or it must be UTF-8
# per default encoding.
line_string = line.decode('utf-8')
except UnicodeDecodeError:
msg = "invalid or missing encoding declaration"
if filename is not None:
msg = '{} for {!r}'.format(msg, filename)
raise SyntaxError(msg)
matches = cookie_re.findall(line_string)
if not matches:
return None
encoding = _get_normal_name(matches[0])
try:
codec = lookup(encoding)
except LookupError:
# This behaviour mimics the Python interpreter
if filename is None:
msg = "unknown encoding: " + encoding
else:
msg = "unknown encoding for {!r}: {}".format(filename,
encoding)
raise SyntaxError(msg)
if bom_found:
if codec.name != 'utf-8':
# This behaviour mimics the Python interpreter
if filename is None:
msg = 'encoding problem: utf-8'
else:
msg = 'encoding problem for {!r}: utf-8'.format(filename)
raise SyntaxError(msg)
encoding += '-sig'
return encoding
first = read_or_stop()
if first.startswith(BOM_UTF8):
bom_found = True
first = first[3:]
default = 'utf-8-sig'
if not first:
return default, []
encoding = find_cookie(first)
if encoding:
return encoding, [first]
second = read_or_stop()
if not second:
return default, [first]
encoding = find_cookie(second)
if encoding:
return encoding, [first, second]
return default, [first, second]
# For converting & <-> & etc.
try:
from html import escape
except ImportError:
from cgi import escape
if sys.version_info[:2] < (3, 4):
unescape = HTMLParser().unescape
else:
from html import unescape
try:
from collections import ChainMap
except ImportError: # pragma: no cover
from collections import MutableMapping
try:
from reprlib import recursive_repr as _recursive_repr
except ImportError:
def _recursive_repr(fillvalue='...'):
'''
Decorator to make a repr function return fillvalue for a recursive
call
'''
def decorating_function(user_function):
repr_running = set()
def wrapper(self):
key = id(self), get_ident()
if key in repr_running:
return fillvalue
repr_running.add(key)
try:
result = user_function(self)
finally:
repr_running.discard(key)
return result
# Can't use functools.wraps() here because of bootstrap issues
wrapper.__module__ = getattr(user_function, '__module__')
wrapper.__doc__ = getattr(user_function, '__doc__')
wrapper.__name__ = getattr(user_function, '__name__')
wrapper.__annotations__ = getattr(user_function, '__annotations__', {})
return wrapper
return decorating_function
class ChainMap(MutableMapping):
''' A ChainMap groups multiple dicts (or other mappings) together
to create a single, updateable view.
The underlying mappings are stored in a list. That list is public and can
accessed or updated using the *maps* attribute. There is no other state.
Lookups search the underlying mappings successively until a key is found.
In contrast, writes, updates, and deletions only operate on the first
mapping.
'''
def __init__(self, *maps):
'''Initialize a ChainMap by setting *maps* to the given mappings.
If no mappings are provided, a single empty dictionary is used.
'''
self.maps = list(maps) or [{}] # always at least one map
def __missing__(self, key):
raise KeyError(key)
def __getitem__(self, key):
for mapping in self.maps:
try:
return mapping[key] # can't use 'key in mapping' with defaultdict
except KeyError:
pass
return self.__missing__(key) # support subclasses that define __missing__
def get(self, key, default=None):
return self[key] if key in self else default
def __len__(self):
return len(set().union(*self.maps)) # reuses stored hash values if possible
def __iter__(self):
return iter(set().union(*self.maps))
def __contains__(self, key):
return any(key in m for m in self.maps)
def __bool__(self):
return any(self.maps)
@_recursive_repr()
def __repr__(self):
return '{0.__class__.__name__}({1})'.format(
self, ', '.join(map(repr, self.maps)))
@classmethod
def fromkeys(cls, iterable, *args):
'Create a ChainMap with a single dict created from the iterable.'
return cls(dict.fromkeys(iterable, *args))
def copy(self):
'New ChainMap or subclass with a new copy of maps[0] and refs to maps[1:]'
return self.__class__(self.maps[0].copy(), *self.maps[1:])
__copy__ = copy
def new_child(self): # like Django's Context.push()
'New ChainMap with a new dict followed by all previous maps.'
return self.__class__({}, *self.maps)
@property
def parents(self): # like Django's Context.pop()
'New ChainMap from maps[1:].'
return self.__class__(*self.maps[1:])
def __setitem__(self, key, value):
self.maps[0][key] = value
def __delitem__(self, key):
try:
del self.maps[0][key]
except KeyError:
raise KeyError('Key not found in the first mapping: {!r}'.format(key))
def popitem(self):
'Remove and return an item pair from maps[0]. Raise KeyError is maps[0] is empty.'
try:
return self.maps[0].popitem()
except KeyError:
raise KeyError('No keys found in the first mapping.')
def pop(self, key, *args):
'Remove *key* from maps[0] and return its value. Raise KeyError if *key* not in maps[0].'
try:
return self.maps[0].pop(key, *args)
except KeyError:
raise KeyError('Key not found in the first mapping: {!r}'.format(key))
def clear(self):
'Clear maps[0], leaving maps[1:] intact.'
self.maps[0].clear()
try:
from importlib.util import cache_from_source # Python >= 3.4
except ImportError: # pragma: no cover
def cache_from_source(path, debug_override=None):
assert path.endswith('.py')
if debug_override is None:
debug_override = __debug__
if debug_override:
suffix = 'c'
else:
suffix = 'o'
return path + suffix
try:
from collections import OrderedDict
except ImportError: # pragma: no cover
## {{{ http://code.activestate.com/recipes/576693/ (r9)
# Backport of OrderedDict() class that runs on Python 2.4, 2.5, 2.6, 2.7 and pypy.
# Passes Python2.7's test suite and incorporates all the latest updates.
try:
from thread import get_ident as _get_ident
except ImportError:
from dummy_thread import get_ident as _get_ident
try:
from _abcoll import KeysView, ValuesView, ItemsView
except ImportError:
pass
class OrderedDict(dict):
'Dictionary that remembers insertion order'
# An inherited dict maps keys to values.
# The inherited dict provides __getitem__, __len__, __contains__, and get.
# The remaining methods are order-aware.
# Big-O running times for all methods are the same as for regular dictionaries.
# The internal self.__map dictionary maps keys to links in a doubly linked list.
# The circular doubly linked list starts and ends with a sentinel element.
# The sentinel element never gets deleted (this simplifies the algorithm).
# Each link is stored as a list of length three: [PREV, NEXT, KEY].
def __init__(self, *args, **kwds):
'''Initialize an ordered dictionary. Signature is the same as for
regular dictionaries, but keyword arguments are not recommended
because their insertion order is arbitrary.
'''
if len(args) > 1:
raise TypeError('expected at most 1 arguments, got %d' % len(args))
try:
self.__root
except AttributeError:
self.__root = root = [] # sentinel node
root[:] = [root, root, None]
self.__map = {}
self.__update(*args, **kwds)
def __setitem__(self, key, value, dict_setitem=dict.__setitem__):
'od.__setitem__(i, y) <==> od[i]=y'
# Setting a new item creates a new link which goes at the end of the linked
# list, and the inherited dictionary is updated with the new key/value pair.
if key not in self:
root = self.__root
last = root[0]
last[1] = root[0] = self.__map[key] = [last, root, key]
dict_setitem(self, key, value)
def __delitem__(self, key, dict_delitem=dict.__delitem__):
'od.__delitem__(y) <==> del od[y]'
# Deleting an existing item uses self.__map to find the link which is
# then removed by updating the links in the predecessor and successor nodes.
dict_delitem(self, key)
link_prev, link_next, key = self.__map.pop(key)
link_prev[1] = link_next
link_next[0] = link_prev
def __iter__(self):
'od.__iter__() <==> iter(od)'
root = self.__root
curr = root[1]
while curr is not root:
yield curr[2]
curr = curr[1]
def __reversed__(self):
'od.__reversed__() <==> reversed(od)'
root = self.__root
curr = root[0]
while curr is not root:
yield curr[2]
curr = curr[0]
def clear(self):
'od.clear() -> None. Remove all items from od.'
try:
for node in self.__map.itervalues():
del node[:]
root = self.__root
root[:] = [root, root, None]
self.__map.clear()
except AttributeError:
pass
dict.clear(self)
def popitem(self, last=True):
'''od.popitem() -> (k, v), return and remove a (key, value) pair.
Pairs are returned in LIFO order if last is true or FIFO order if false.
'''
if not self:
raise KeyError('dictionary is empty')
root = self.__root
if last:
link = root[0]
link_prev = link[0]
link_prev[1] = root
root[0] = link_prev
else:
link = root[1]
link_next = link[1]
root[1] = link_next
link_next[0] = root
key = link[2]
del self.__map[key]
value = dict.pop(self, key)
return key, value
# -- the following methods do not depend on the internal structure --
def keys(self):
'od.keys() -> list of keys in od'
return list(self)
def values(self):
'od.values() -> list of values in od'
return [self[key] for key in self]
def items(self):
'od.items() -> list of (key, value) pairs in od'
return [(key, self[key]) for key in self]
def iterkeys(self):
'od.iterkeys() -> an iterator over the keys in od'
return iter(self)
def itervalues(self):
'od.itervalues -> an iterator over the values in od'
for k in self:
yield self[k]
def iteritems(self):
'od.iteritems -> an iterator over the (key, value) items in od'
for k in self:
yield (k, self[k])
def update(*args, **kwds):
'''od.update(E, **F) -> None. Update od from dict/iterable E and F.
If E is a dict instance, does: for k in E: od[k] = E[k]
If E has a .keys() method, does: for k in E.keys(): od[k] = E[k]
Or if E is an iterable of items, does: for k, v in E: od[k] = v
In either case, this is followed by: for k, v in F.items(): od[k] = v
'''
if len(args) > 2:
raise TypeError('update() takes at most 2 positional '
'arguments (%d given)' % (len(args),))
elif not args:
raise TypeError('update() takes at least 1 argument (0 given)')
self = args[0]
# Make progressively weaker assumptions about "other"
other = ()
if len(args) == 2:
other = args[1]
if isinstance(other, dict):
for key in other:
self[key] = other[key]
elif hasattr(other, 'keys'):
for key in other.keys():
self[key] = other[key]
else:
for key, value in other:
self[key] = value
for key, value in kwds.items():
self[key] = value
__update = update # let subclasses override update without breaking __init__
__marker = object()
def pop(self, key, default=__marker):
'''od.pop(k[,d]) -> v, remove specified key and return the corresponding value.
If key is not found, d is returned if given, otherwise KeyError is raised.
'''
if key in self:
result = self[key]
del self[key]
return result
if default is self.__marker:
raise KeyError(key)
return default
def setdefault(self, key, default=None):
'od.setdefault(k[,d]) -> od.get(k,d), also set od[k]=d if k not in od'
if key in self:
return self[key]
self[key] = default
return default
def __repr__(self, _repr_running=None):
'od.__repr__() <==> repr(od)'
if not _repr_running: _repr_running = {}
call_key = id(self), _get_ident()
if call_key in _repr_running:
return '...'
_repr_running[call_key] = 1
try:
if not self:
return '%s()' % (self.__class__.__name__,)
return '%s(%r)' % (self.__class__.__name__, self.items())
finally:
del _repr_running[call_key]
def __reduce__(self):
'Return state information for pickling'
items = [[k, self[k]] for k in self]
inst_dict = vars(self).copy()
for k in vars(OrderedDict()):
inst_dict.pop(k, None)
if inst_dict:
return (self.__class__, (items,), inst_dict)
return self.__class__, (items,)
def copy(self):
'od.copy() -> a shallow copy of od'
return self.__class__(self)
@classmethod
def fromkeys(cls, iterable, value=None):
'''OD.fromkeys(S[, v]) -> New ordered dictionary with keys from S
and values equal to v (which defaults to None).
'''
d = cls()
for key in iterable:
d[key] = value
return d
def __eq__(self, other):
'''od.__eq__(y) <==> od==y. Comparison to another OD is order-sensitive
while comparison to a regular mapping is order-insensitive.
'''
if isinstance(other, OrderedDict):
return len(self)==len(other) and self.items() == other.items()
return dict.__eq__(self, other)
def __ne__(self, other):
return not self == other
# -- the following methods are only used in Python 2.7 --
def viewkeys(self):
"od.viewkeys() -> a set-like object providing a view on od's keys"
return KeysView(self)
def viewvalues(self):
"od.viewvalues() -> an object providing a view on od's values"
return ValuesView(self)
def viewitems(self):
"od.viewitems() -> a set-like object providing a view on od's items"
return ItemsView(self)
try:
from logging.config import BaseConfigurator, valid_ident
except ImportError: # pragma: no cover
IDENTIFIER = re.compile('^[a-z_][a-z0-9_]*$', re.I)
def valid_ident(s):
m = IDENTIFIER.match(s)
if not m:
raise ValueError('Not a valid Python identifier: %r' % s)
return True
# The ConvertingXXX classes are wrappers around standard Python containers,
# and they serve to convert any suitable values in the container. The
# conversion converts base dicts, lists and tuples to their wrapped
# equivalents, whereas strings which match a conversion format are converted
# appropriately.
#
# Each wrapper should have a configurator attribute holding the actual
# configurator to use for conversion.
class ConvertingDict(dict):
"""A converting dictionary wrapper."""
def __getitem__(self, key):
value = dict.__getitem__(self, key)
result = self.configurator.convert(value)
#If the converted value is different, save for next time
if value is not result:
self[key] = result
if type(result) in (ConvertingDict, ConvertingList,
ConvertingTuple):
result.parent = self
result.key = key
return result
def get(self, key, default=None):
value = dict.get(self, key, default)
result = self.configurator.convert(value)
#If the converted value is different, save for next time
if value is not result:
self[key] = result
if type(result) in (ConvertingDict, ConvertingList,
ConvertingTuple):
result.parent = self
result.key = key
return result
def pop(self, key, default=None):
value = dict.pop(self, key, default)
result = self.configurator.convert(value)
if value is not result:
if type(result) in (ConvertingDict, ConvertingList,
ConvertingTuple):
result.parent = self
result.key = key
return result
class ConvertingList(list):
"""A converting list wrapper."""
def __getitem__(self, key):
value = list.__getitem__(self, key)
result = self.configurator.convert(value)
#If the converted value is different, save for next time
if value is not result:
self[key] = result
if type(result) in (ConvertingDict, ConvertingList,
ConvertingTuple):
result.parent = self
result.key = key
return result
def pop(self, idx=-1):
value = list.pop(self, idx)
result = self.configurator.convert(value)
if value is not result:
if type(result) in (ConvertingDict, ConvertingList,
ConvertingTuple):
result.parent = self
return result
class ConvertingTuple(tuple):
"""A converting tuple wrapper."""
def __getitem__(self, key):
value = tuple.__getitem__(self, key)
result = self.configurator.convert(value)
if value is not result:
if type(result) in (ConvertingDict, ConvertingList,
ConvertingTuple):
result.parent = self
result.key = key
return result
class BaseConfigurator(object):
"""
The configurator base class which defines some useful defaults.
"""
CONVERT_PATTERN = re.compile(r'^(?P<prefix>[a-z]+)://(?P<suffix>.*)$')
WORD_PATTERN = re.compile(r'^\s*(\w+)\s*')
DOT_PATTERN = re.compile(r'^\.\s*(\w+)\s*')
INDEX_PATTERN = re.compile(r'^\[\s*(\w+)\s*\]\s*')
DIGIT_PATTERN = re.compile(r'^\d+$')
value_converters = {
'ext' : 'ext_convert',
'cfg' : 'cfg_convert',
}
# We might want to use a different one, e.g. importlib
importer = staticmethod(__import__)
def __init__(self, config):
self.config = ConvertingDict(config)
self.config.configurator = self
def resolve(self, s):
"""
Resolve strings to objects using standard import and attribute
syntax.
"""
name = s.split('.')
used = name.pop(0)
try:
found = self.importer(used)
for frag in name:
used += '.' + frag
try:
found = getattr(found, frag)
except AttributeError:
self.importer(used)
found = getattr(found, frag)
return found
except ImportError:
e, tb = sys.exc_info()[1:]
v = ValueError('Cannot resolve %r: %s' % (s, e))
v.__cause__, v.__traceback__ = e, tb
raise v
def ext_convert(self, value):
"""Default converter for the ext:// protocol."""
return self.resolve(value)
def cfg_convert(self, value):
"""Default converter for the cfg:// protocol."""
rest = value
m = self.WORD_PATTERN.match(rest)
if m is None:
raise ValueError("Unable to convert %r" % value)
else:
rest = rest[m.end():]
d = self.config[m.groups()[0]]
#print d, rest
while rest:
m = self.DOT_PATTERN.match(rest)
if m:
d = d[m.groups()[0]]
else:
m = self.INDEX_PATTERN.match(rest)
if m:
idx = m.groups()[0]
if not self.DIGIT_PATTERN.match(idx):
d = d[idx]
else:
try:
n = int(idx) # try as number first (most likely)
d = d[n]
except TypeError:
d = d[idx]
if m:
rest = rest[m.end():]
else:
raise ValueError('Unable to convert '
'%r at %r' % (value, rest))
#rest should be empty
return d
def convert(self, value):
"""
Convert values to an appropriate type. dicts, lists and tuples are
replaced by their converting alternatives. Strings are checked to
see if they have a conversion format and are converted if they do.
"""
if not isinstance(value, ConvertingDict) and isinstance(value, dict):
value = ConvertingDict(value)
value.configurator = self
elif not isinstance(value, ConvertingList) and isinstance(value, list):
value = ConvertingList(value)
value.configurator = self
elif not isinstance(value, ConvertingTuple) and\
isinstance(value, tuple):
value = ConvertingTuple(value)
value.configurator = self
elif isinstance(value, string_types):
m = self.CONVERT_PATTERN.match(value)
if m:
d = m.groupdict()
prefix = d['prefix']
converter = self.value_converters.get(prefix, None)
if converter:
suffix = d['suffix']
converter = getattr(self, converter)
value = converter(suffix)
return value
def configure_custom(self, config):
"""Configure an object with a user-supplied factory."""
c = config.pop('()')
if not callable(c):
c = self.resolve(c)
props = config.pop('.', None)
# Check for valid identifiers
kwargs = dict([(k, config[k]) for k in config if valid_ident(k)])
result = c(**kwargs)
if props:
for name, value in props.items():
setattr(result, name, value)
return result
def as_tuple(self, value):
"""Utility function which converts lists to tuples."""
if isinstance(value, list):
value = tuple(value)
return value
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/distlib/compat.py
|
Python
|
mit
| 41,259 |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2017 The Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
"""PEP 376 implementation."""
from __future__ import unicode_literals
import base64
import codecs
import contextlib
import hashlib
import logging
import os
import posixpath
import sys
import zipimport
from . import DistlibException, resources
from .compat import StringIO
from .version import get_scheme, UnsupportedVersionError
from .metadata import (Metadata, METADATA_FILENAME, WHEEL_METADATA_FILENAME,
LEGACY_METADATA_FILENAME)
from .util import (parse_requirement, cached_property, parse_name_and_version,
read_exports, write_exports, CSVReader, CSVWriter)
__all__ = ['Distribution', 'BaseInstalledDistribution',
'InstalledDistribution', 'EggInfoDistribution',
'DistributionPath']
logger = logging.getLogger(__name__)
EXPORTS_FILENAME = 'pydist-exports.json'
COMMANDS_FILENAME = 'pydist-commands.json'
DIST_FILES = ('INSTALLER', METADATA_FILENAME, 'RECORD', 'REQUESTED',
'RESOURCES', EXPORTS_FILENAME, 'SHARED')
DISTINFO_EXT = '.dist-info'
class _Cache(object):
"""
A simple cache mapping names and .dist-info paths to distributions
"""
def __init__(self):
"""
Initialise an instance. There is normally one for each DistributionPath.
"""
self.name = {}
self.path = {}
self.generated = False
def clear(self):
"""
Clear the cache, setting it to its initial state.
"""
self.name.clear()
self.path.clear()
self.generated = False
def add(self, dist):
"""
Add a distribution to the cache.
:param dist: The distribution to add.
"""
if dist.path not in self.path:
self.path[dist.path] = dist
self.name.setdefault(dist.key, []).append(dist)
class DistributionPath(object):
"""
Represents a set of distributions installed on a path (typically sys.path).
"""
def __init__(self, path=None, include_egg=False):
"""
Create an instance from a path, optionally including legacy (distutils/
setuptools/distribute) distributions.
:param path: The path to use, as a list of directories. If not specified,
sys.path is used.
:param include_egg: If True, this instance will look for and return legacy
distributions as well as those based on PEP 376.
"""
if path is None:
path = sys.path
self.path = path
self._include_dist = True
self._include_egg = include_egg
self._cache = _Cache()
self._cache_egg = _Cache()
self._cache_enabled = True
self._scheme = get_scheme('default')
def _get_cache_enabled(self):
return self._cache_enabled
def _set_cache_enabled(self, value):
self._cache_enabled = value
cache_enabled = property(_get_cache_enabled, _set_cache_enabled)
def clear_cache(self):
"""
Clears the internal cache.
"""
self._cache.clear()
self._cache_egg.clear()
def _yield_distributions(self):
"""
Yield .dist-info and/or .egg(-info) distributions.
"""
# We need to check if we've seen some resources already, because on
# some Linux systems (e.g. some Debian/Ubuntu variants) there are
# symlinks which alias other files in the environment.
seen = set()
for path in self.path:
finder = resources.finder_for_path(path)
if finder is None:
continue
r = finder.find('')
if not r or not r.is_container:
continue
rset = sorted(r.resources)
for entry in rset:
r = finder.find(entry)
if not r or r.path in seen:
continue
try:
if self._include_dist and entry.endswith(DISTINFO_EXT):
possible_filenames = [METADATA_FILENAME,
WHEEL_METADATA_FILENAME,
LEGACY_METADATA_FILENAME]
for metadata_filename in possible_filenames:
metadata_path = posixpath.join(entry, metadata_filename)
pydist = finder.find(metadata_path)
if pydist:
break
else:
continue
with contextlib.closing(pydist.as_stream()) as stream:
metadata = Metadata(fileobj=stream, scheme='legacy')
logger.debug('Found %s', r.path)
seen.add(r.path)
yield new_dist_class(r.path, metadata=metadata,
env=self)
elif self._include_egg and entry.endswith(('.egg-info',
'.egg')):
logger.debug('Found %s', r.path)
seen.add(r.path)
yield old_dist_class(r.path, self)
except Exception as e:
msg = 'Unable to read distribution at %s, perhaps due to bad metadata: %s'
logger.warning(msg, r.path, e)
import warnings
warnings.warn(msg % (r.path, e), stacklevel=2)
def _generate_cache(self):
"""
Scan the path for distributions and populate the cache with
those that are found.
"""
gen_dist = not self._cache.generated
gen_egg = self._include_egg and not self._cache_egg.generated
if gen_dist or gen_egg:
for dist in self._yield_distributions():
if isinstance(dist, InstalledDistribution):
self._cache.add(dist)
else:
self._cache_egg.add(dist)
if gen_dist:
self._cache.generated = True
if gen_egg:
self._cache_egg.generated = True
@classmethod
def distinfo_dirname(cls, name, version):
"""
The *name* and *version* parameters are converted into their
filename-escaped form, i.e. any ``'-'`` characters are replaced
with ``'_'`` other than the one in ``'dist-info'`` and the one
separating the name from the version number.
:parameter name: is converted to a standard distribution name by replacing
any runs of non- alphanumeric characters with a single
``'-'``.
:type name: string
:parameter version: is converted to a standard version string. Spaces
become dots, and all other non-alphanumeric characters
(except dots) become dashes, with runs of multiple
dashes condensed to a single dash.
:type version: string
:returns: directory name
:rtype: string"""
name = name.replace('-', '_')
return '-'.join([name, version]) + DISTINFO_EXT
def get_distributions(self):
"""
Provides an iterator that looks for distributions and returns
:class:`InstalledDistribution` or
:class:`EggInfoDistribution` instances for each one of them.
:rtype: iterator of :class:`InstalledDistribution` and
:class:`EggInfoDistribution` instances
"""
if not self._cache_enabled:
for dist in self._yield_distributions():
yield dist
else:
self._generate_cache()
for dist in self._cache.path.values():
yield dist
if self._include_egg:
for dist in self._cache_egg.path.values():
yield dist
def get_distribution(self, name):
"""
Looks for a named distribution on the path.
This function only returns the first result found, as no more than one
value is expected. If nothing is found, ``None`` is returned.
:rtype: :class:`InstalledDistribution`, :class:`EggInfoDistribution`
or ``None``
"""
result = None
name = name.lower()
if not self._cache_enabled:
for dist in self._yield_distributions():
if dist.key == name:
result = dist
break
else:
self._generate_cache()
if name in self._cache.name:
result = self._cache.name[name][0]
elif self._include_egg and name in self._cache_egg.name:
result = self._cache_egg.name[name][0]
return result
def provides_distribution(self, name, version=None):
"""
Iterates over all distributions to find which distributions provide *name*.
If a *version* is provided, it will be used to filter the results.
This function only returns the first result found, since no more than
one values are expected. If the directory is not found, returns ``None``.
:parameter version: a version specifier that indicates the version
required, conforming to the format in ``PEP-345``
:type name: string
:type version: string
"""
matcher = None
if version is not None:
try:
matcher = self._scheme.matcher('%s (%s)' % (name, version))
except ValueError:
raise DistlibException('invalid name or version: %r, %r' %
(name, version))
for dist in self.get_distributions():
# We hit a problem on Travis where enum34 was installed and doesn't
# have a provides attribute ...
if not hasattr(dist, 'provides'):
logger.debug('No "provides": %s', dist)
else:
provided = dist.provides
for p in provided:
p_name, p_ver = parse_name_and_version(p)
if matcher is None:
if p_name == name:
yield dist
break
else:
if p_name == name and matcher.match(p_ver):
yield dist
break
def get_file_path(self, name, relative_path):
"""
Return the path to a resource file.
"""
dist = self.get_distribution(name)
if dist is None:
raise LookupError('no distribution named %r found' % name)
return dist.get_resource_path(relative_path)
def get_exported_entries(self, category, name=None):
"""
Return all of the exported entries in a particular category.
:param category: The category to search for entries.
:param name: If specified, only entries with that name are returned.
"""
for dist in self.get_distributions():
r = dist.exports
if category in r:
d = r[category]
if name is not None:
if name in d:
yield d[name]
else:
for v in d.values():
yield v
class Distribution(object):
"""
A base class for distributions, whether installed or from indexes.
Either way, it must have some metadata, so that's all that's needed
for construction.
"""
build_time_dependency = False
"""
Set to True if it's known to be only a build-time dependency (i.e.
not needed after installation).
"""
requested = False
"""A boolean that indicates whether the ``REQUESTED`` metadata file is
present (in other words, whether the package was installed by user
request or it was installed as a dependency)."""
def __init__(self, metadata):
"""
Initialise an instance.
:param metadata: The instance of :class:`Metadata` describing this
distribution.
"""
self.metadata = metadata
self.name = metadata.name
self.key = self.name.lower() # for case-insensitive comparisons
self.version = metadata.version
self.locator = None
self.digest = None
self.extras = None # additional features requested
self.context = None # environment marker overrides
self.download_urls = set()
self.digests = {}
@property
def source_url(self):
"""
The source archive download URL for this distribution.
"""
return self.metadata.source_url
download_url = source_url # Backward compatibility
@property
def name_and_version(self):
"""
A utility property which displays the name and version in parentheses.
"""
return '%s (%s)' % (self.name, self.version)
@property
def provides(self):
"""
A set of distribution names and versions provided by this distribution.
:return: A set of "name (version)" strings.
"""
plist = self.metadata.provides
s = '%s (%s)' % (self.name, self.version)
if s not in plist:
plist.append(s)
return plist
def _get_requirements(self, req_attr):
md = self.metadata
reqts = getattr(md, req_attr)
logger.debug('%s: got requirements %r from metadata: %r', self.name, req_attr,
reqts)
return set(md.get_requirements(reqts, extras=self.extras,
env=self.context))
@property
def run_requires(self):
return self._get_requirements('run_requires')
@property
def meta_requires(self):
return self._get_requirements('meta_requires')
@property
def build_requires(self):
return self._get_requirements('build_requires')
@property
def test_requires(self):
return self._get_requirements('test_requires')
@property
def dev_requires(self):
return self._get_requirements('dev_requires')
def matches_requirement(self, req):
"""
Say if this instance matches (fulfills) a requirement.
:param req: The requirement to match.
:rtype req: str
:return: True if it matches, else False.
"""
# Requirement may contain extras - parse to lose those
# from what's passed to the matcher
r = parse_requirement(req)
scheme = get_scheme(self.metadata.scheme)
try:
matcher = scheme.matcher(r.requirement)
except UnsupportedVersionError:
# XXX compat-mode if cannot read the version
logger.warning('could not read version %r - using name only',
req)
name = req.split()[0]
matcher = scheme.matcher(name)
name = matcher.key # case-insensitive
result = False
for p in self.provides:
p_name, p_ver = parse_name_and_version(p)
if p_name != name:
continue
try:
result = matcher.match(p_ver)
break
except UnsupportedVersionError:
pass
return result
def __repr__(self):
"""
Return a textual representation of this instance,
"""
if self.source_url:
suffix = ' [%s]' % self.source_url
else:
suffix = ''
return '<Distribution %s (%s)%s>' % (self.name, self.version, suffix)
def __eq__(self, other):
"""
See if this distribution is the same as another.
:param other: The distribution to compare with. To be equal to one
another. distributions must have the same type, name,
version and source_url.
:return: True if it is the same, else False.
"""
if type(other) is not type(self):
result = False
else:
result = (self.name == other.name and
self.version == other.version and
self.source_url == other.source_url)
return result
def __hash__(self):
"""
Compute hash in a way which matches the equality test.
"""
return hash(self.name) + hash(self.version) + hash(self.source_url)
class BaseInstalledDistribution(Distribution):
"""
This is the base class for installed distributions (whether PEP 376 or
legacy).
"""
hasher = None
def __init__(self, metadata, path, env=None):
"""
Initialise an instance.
:param metadata: An instance of :class:`Metadata` which describes the
distribution. This will normally have been initialised
from a metadata file in the ``path``.
:param path: The path of the ``.dist-info`` or ``.egg-info``
directory for the distribution.
:param env: This is normally the :class:`DistributionPath`
instance where this distribution was found.
"""
super(BaseInstalledDistribution, self).__init__(metadata)
self.path = path
self.dist_path = env
def get_hash(self, data, hasher=None):
"""
Get the hash of some data, using a particular hash algorithm, if
specified.
:param data: The data to be hashed.
:type data: bytes
:param hasher: The name of a hash implementation, supported by hashlib,
or ``None``. Examples of valid values are ``'sha1'``,
``'sha224'``, ``'sha384'``, '``sha256'``, ``'md5'`` and
``'sha512'``. If no hasher is specified, the ``hasher``
attribute of the :class:`InstalledDistribution` instance
is used. If the hasher is determined to be ``None``, MD5
is used as the hashing algorithm.
:returns: The hash of the data. If a hasher was explicitly specified,
the returned hash will be prefixed with the specified hasher
followed by '='.
:rtype: str
"""
if hasher is None:
hasher = self.hasher
if hasher is None:
hasher = hashlib.md5
prefix = ''
else:
hasher = getattr(hashlib, hasher)
prefix = '%s=' % self.hasher
digest = hasher(data).digest()
digest = base64.urlsafe_b64encode(digest).rstrip(b'=').decode('ascii')
return '%s%s' % (prefix, digest)
class InstalledDistribution(BaseInstalledDistribution):
"""
Created with the *path* of the ``.dist-info`` directory provided to the
constructor. It reads the metadata contained in ``pydist.json`` when it is
instantiated., or uses a passed in Metadata instance (useful for when
dry-run mode is being used).
"""
hasher = 'sha256'
def __init__(self, path, metadata=None, env=None):
self.modules = []
self.finder = finder = resources.finder_for_path(path)
if finder is None:
raise ValueError('finder unavailable for %s' % path)
if env and env._cache_enabled and path in env._cache.path:
metadata = env._cache.path[path].metadata
elif metadata is None:
r = finder.find(METADATA_FILENAME)
# Temporary - for Wheel 0.23 support
if r is None:
r = finder.find(WHEEL_METADATA_FILENAME)
# Temporary - for legacy support
if r is None:
r = finder.find(LEGACY_METADATA_FILENAME)
if r is None:
raise ValueError('no %s found in %s' % (METADATA_FILENAME,
path))
with contextlib.closing(r.as_stream()) as stream:
metadata = Metadata(fileobj=stream, scheme='legacy')
super(InstalledDistribution, self).__init__(metadata, path, env)
if env and env._cache_enabled:
env._cache.add(self)
r = finder.find('REQUESTED')
self.requested = r is not None
p = os.path.join(path, 'top_level.txt')
if os.path.exists(p):
with open(p, 'rb') as f:
data = f.read().decode('utf-8')
self.modules = data.splitlines()
def __repr__(self):
return '<InstalledDistribution %r %s at %r>' % (
self.name, self.version, self.path)
def __str__(self):
return "%s %s" % (self.name, self.version)
def _get_records(self):
"""
Get the list of installed files for the distribution
:return: A list of tuples of path, hash and size. Note that hash and
size might be ``None`` for some entries. The path is exactly
as stored in the file (which is as in PEP 376).
"""
results = []
r = self.get_distinfo_resource('RECORD')
with contextlib.closing(r.as_stream()) as stream:
with CSVReader(stream=stream) as record_reader:
# Base location is parent dir of .dist-info dir
#base_location = os.path.dirname(self.path)
#base_location = os.path.abspath(base_location)
for row in record_reader:
missing = [None for i in range(len(row), 3)]
path, checksum, size = row + missing
#if not os.path.isabs(path):
# path = path.replace('/', os.sep)
# path = os.path.join(base_location, path)
results.append((path, checksum, size))
return results
@cached_property
def exports(self):
"""
Return the information exported by this distribution.
:return: A dictionary of exports, mapping an export category to a dict
of :class:`ExportEntry` instances describing the individual
export entries, and keyed by name.
"""
result = {}
r = self.get_distinfo_resource(EXPORTS_FILENAME)
if r:
result = self.read_exports()
return result
def read_exports(self):
"""
Read exports data from a file in .ini format.
:return: A dictionary of exports, mapping an export category to a list
of :class:`ExportEntry` instances describing the individual
export entries.
"""
result = {}
r = self.get_distinfo_resource(EXPORTS_FILENAME)
if r:
with contextlib.closing(r.as_stream()) as stream:
result = read_exports(stream)
return result
def write_exports(self, exports):
"""
Write a dictionary of exports to a file in .ini format.
:param exports: A dictionary of exports, mapping an export category to
a list of :class:`ExportEntry` instances describing the
individual export entries.
"""
rf = self.get_distinfo_file(EXPORTS_FILENAME)
with open(rf, 'w') as f:
write_exports(exports, f)
def get_resource_path(self, relative_path):
"""
NOTE: This API may change in the future.
Return the absolute path to a resource file with the given relative
path.
:param relative_path: The path, relative to .dist-info, of the resource
of interest.
:return: The absolute path where the resource is to be found.
"""
r = self.get_distinfo_resource('RESOURCES')
with contextlib.closing(r.as_stream()) as stream:
with CSVReader(stream=stream) as resources_reader:
for relative, destination in resources_reader:
if relative == relative_path:
return destination
raise KeyError('no resource file with relative path %r '
'is installed' % relative_path)
def list_installed_files(self):
"""
Iterates over the ``RECORD`` entries and returns a tuple
``(path, hash, size)`` for each line.
:returns: iterator of (path, hash, size)
"""
for result in self._get_records():
yield result
def write_installed_files(self, paths, prefix, dry_run=False):
"""
Writes the ``RECORD`` file, using the ``paths`` iterable passed in. Any
existing ``RECORD`` file is silently overwritten.
prefix is used to determine when to write absolute paths.
"""
prefix = os.path.join(prefix, '')
base = os.path.dirname(self.path)
base_under_prefix = base.startswith(prefix)
base = os.path.join(base, '')
record_path = self.get_distinfo_file('RECORD')
logger.info('creating %s', record_path)
if dry_run:
return None
with CSVWriter(record_path) as writer:
for path in paths:
if os.path.isdir(path) or path.endswith(('.pyc', '.pyo')):
# do not put size and hash, as in PEP-376
hash_value = size = ''
else:
size = '%d' % os.path.getsize(path)
with open(path, 'rb') as fp:
hash_value = self.get_hash(fp.read())
if path.startswith(base) or (base_under_prefix and
path.startswith(prefix)):
path = os.path.relpath(path, base)
writer.writerow((path, hash_value, size))
# add the RECORD file itself
if record_path.startswith(base):
record_path = os.path.relpath(record_path, base)
writer.writerow((record_path, '', ''))
return record_path
def check_installed_files(self):
"""
Checks that the hashes and sizes of the files in ``RECORD`` are
matched by the files themselves. Returns a (possibly empty) list of
mismatches. Each entry in the mismatch list will be a tuple consisting
of the path, 'exists', 'size' or 'hash' according to what didn't match
(existence is checked first, then size, then hash), the expected
value and the actual value.
"""
mismatches = []
base = os.path.dirname(self.path)
record_path = self.get_distinfo_file('RECORD')
for path, hash_value, size in self.list_installed_files():
if not os.path.isabs(path):
path = os.path.join(base, path)
if path == record_path:
continue
if not os.path.exists(path):
mismatches.append((path, 'exists', True, False))
elif os.path.isfile(path):
actual_size = str(os.path.getsize(path))
if size and actual_size != size:
mismatches.append((path, 'size', size, actual_size))
elif hash_value:
if '=' in hash_value:
hasher = hash_value.split('=', 1)[0]
else:
hasher = None
with open(path, 'rb') as f:
actual_hash = self.get_hash(f.read(), hasher)
if actual_hash != hash_value:
mismatches.append((path, 'hash', hash_value, actual_hash))
return mismatches
@cached_property
def shared_locations(self):
"""
A dictionary of shared locations whose keys are in the set 'prefix',
'purelib', 'platlib', 'scripts', 'headers', 'data' and 'namespace'.
The corresponding value is the absolute path of that category for
this distribution, and takes into account any paths selected by the
user at installation time (e.g. via command-line arguments). In the
case of the 'namespace' key, this would be a list of absolute paths
for the roots of namespace packages in this distribution.
The first time this property is accessed, the relevant information is
read from the SHARED file in the .dist-info directory.
"""
result = {}
shared_path = os.path.join(self.path, 'SHARED')
if os.path.isfile(shared_path):
with codecs.open(shared_path, 'r', encoding='utf-8') as f:
lines = f.read().splitlines()
for line in lines:
key, value = line.split('=', 1)
if key == 'namespace':
result.setdefault(key, []).append(value)
else:
result[key] = value
return result
def write_shared_locations(self, paths, dry_run=False):
"""
Write shared location information to the SHARED file in .dist-info.
:param paths: A dictionary as described in the documentation for
:meth:`shared_locations`.
:param dry_run: If True, the action is logged but no file is actually
written.
:return: The path of the file written to.
"""
shared_path = os.path.join(self.path, 'SHARED')
logger.info('creating %s', shared_path)
if dry_run:
return None
lines = []
for key in ('prefix', 'lib', 'headers', 'scripts', 'data'):
path = paths[key]
if os.path.isdir(paths[key]):
lines.append('%s=%s' % (key, path))
for ns in paths.get('namespace', ()):
lines.append('namespace=%s' % ns)
with codecs.open(shared_path, 'w', encoding='utf-8') as f:
f.write('\n'.join(lines))
return shared_path
def get_distinfo_resource(self, path):
if path not in DIST_FILES:
raise DistlibException('invalid path for a dist-info file: '
'%r at %r' % (path, self.path))
finder = resources.finder_for_path(self.path)
if finder is None:
raise DistlibException('Unable to get a finder for %s' % self.path)
return finder.find(path)
def get_distinfo_file(self, path):
"""
Returns a path located under the ``.dist-info`` directory. Returns a
string representing the path.
:parameter path: a ``'/'``-separated path relative to the
``.dist-info`` directory or an absolute path;
If *path* is an absolute path and doesn't start
with the ``.dist-info`` directory path,
a :class:`DistlibException` is raised
:type path: str
:rtype: str
"""
# Check if it is an absolute path # XXX use relpath, add tests
if path.find(os.sep) >= 0:
# it's an absolute path?
distinfo_dirname, path = path.split(os.sep)[-2:]
if distinfo_dirname != self.path.split(os.sep)[-1]:
raise DistlibException(
'dist-info file %r does not belong to the %r %s '
'distribution' % (path, self.name, self.version))
# The file must be relative
if path not in DIST_FILES:
raise DistlibException('invalid path for a dist-info file: '
'%r at %r' % (path, self.path))
return os.path.join(self.path, path)
def list_distinfo_files(self):
"""
Iterates over the ``RECORD`` entries and returns paths for each line if
the path is pointing to a file located in the ``.dist-info`` directory
or one of its subdirectories.
:returns: iterator of paths
"""
base = os.path.dirname(self.path)
for path, checksum, size in self._get_records():
# XXX add separator or use real relpath algo
if not os.path.isabs(path):
path = os.path.join(base, path)
if path.startswith(self.path):
yield path
def __eq__(self, other):
return (isinstance(other, InstalledDistribution) and
self.path == other.path)
# See http://docs.python.org/reference/datamodel#object.__hash__
__hash__ = object.__hash__
class EggInfoDistribution(BaseInstalledDistribution):
"""Created with the *path* of the ``.egg-info`` directory or file provided
to the constructor. It reads the metadata contained in the file itself, or
if the given path happens to be a directory, the metadata is read from the
file ``PKG-INFO`` under that directory."""
requested = True # as we have no way of knowing, assume it was
shared_locations = {}
def __init__(self, path, env=None):
def set_name_and_version(s, n, v):
s.name = n
s.key = n.lower() # for case-insensitive comparisons
s.version = v
self.path = path
self.dist_path = env
if env and env._cache_enabled and path in env._cache_egg.path:
metadata = env._cache_egg.path[path].metadata
set_name_and_version(self, metadata.name, metadata.version)
else:
metadata = self._get_metadata(path)
# Need to be set before caching
set_name_and_version(self, metadata.name, metadata.version)
if env and env._cache_enabled:
env._cache_egg.add(self)
super(EggInfoDistribution, self).__init__(metadata, path, env)
def _get_metadata(self, path):
requires = None
def parse_requires_data(data):
"""Create a list of dependencies from a requires.txt file.
*data*: the contents of a setuptools-produced requires.txt file.
"""
reqs = []
lines = data.splitlines()
for line in lines:
line = line.strip()
if line.startswith('['):
logger.warning('Unexpected line: quitting requirement scan: %r',
line)
break
r = parse_requirement(line)
if not r:
logger.warning('Not recognised as a requirement: %r', line)
continue
if r.extras:
logger.warning('extra requirements in requires.txt are '
'not supported')
if not r.constraints:
reqs.append(r.name)
else:
cons = ', '.join('%s%s' % c for c in r.constraints)
reqs.append('%s (%s)' % (r.name, cons))
return reqs
def parse_requires_path(req_path):
"""Create a list of dependencies from a requires.txt file.
*req_path*: the path to a setuptools-produced requires.txt file.
"""
reqs = []
try:
with codecs.open(req_path, 'r', 'utf-8') as fp:
reqs = parse_requires_data(fp.read())
except IOError:
pass
return reqs
tl_path = tl_data = None
if path.endswith('.egg'):
if os.path.isdir(path):
p = os.path.join(path, 'EGG-INFO')
meta_path = os.path.join(p, 'PKG-INFO')
metadata = Metadata(path=meta_path, scheme='legacy')
req_path = os.path.join(p, 'requires.txt')
tl_path = os.path.join(p, 'top_level.txt')
requires = parse_requires_path(req_path)
else:
# FIXME handle the case where zipfile is not available
zipf = zipimport.zipimporter(path)
fileobj = StringIO(
zipf.get_data('EGG-INFO/PKG-INFO').decode('utf8'))
metadata = Metadata(fileobj=fileobj, scheme='legacy')
try:
data = zipf.get_data('EGG-INFO/requires.txt')
tl_data = zipf.get_data('EGG-INFO/top_level.txt').decode('utf-8')
requires = parse_requires_data(data.decode('utf-8'))
except IOError:
requires = None
elif path.endswith('.egg-info'):
if os.path.isdir(path):
req_path = os.path.join(path, 'requires.txt')
requires = parse_requires_path(req_path)
path = os.path.join(path, 'PKG-INFO')
tl_path = os.path.join(path, 'top_level.txt')
metadata = Metadata(path=path, scheme='legacy')
else:
raise DistlibException('path must end with .egg-info or .egg, '
'got %r' % path)
if requires:
metadata.add_requirements(requires)
# look for top-level modules in top_level.txt, if present
if tl_data is None:
if tl_path is not None and os.path.exists(tl_path):
with open(tl_path, 'rb') as f:
tl_data = f.read().decode('utf-8')
if not tl_data:
tl_data = []
else:
tl_data = tl_data.splitlines()
self.modules = tl_data
return metadata
def __repr__(self):
return '<EggInfoDistribution %r %s at %r>' % (
self.name, self.version, self.path)
def __str__(self):
return "%s %s" % (self.name, self.version)
def check_installed_files(self):
"""
Checks that the hashes and sizes of the files in ``RECORD`` are
matched by the files themselves. Returns a (possibly empty) list of
mismatches. Each entry in the mismatch list will be a tuple consisting
of the path, 'exists', 'size' or 'hash' according to what didn't match
(existence is checked first, then size, then hash), the expected
value and the actual value.
"""
mismatches = []
record_path = os.path.join(self.path, 'installed-files.txt')
if os.path.exists(record_path):
for path, _, _ in self.list_installed_files():
if path == record_path:
continue
if not os.path.exists(path):
mismatches.append((path, 'exists', True, False))
return mismatches
def list_installed_files(self):
"""
Iterates over the ``installed-files.txt`` entries and returns a tuple
``(path, hash, size)`` for each line.
:returns: a list of (path, hash, size)
"""
def _md5(path):
f = open(path, 'rb')
try:
content = f.read()
finally:
f.close()
return hashlib.md5(content).hexdigest()
def _size(path):
return os.stat(path).st_size
record_path = os.path.join(self.path, 'installed-files.txt')
result = []
if os.path.exists(record_path):
with codecs.open(record_path, 'r', encoding='utf-8') as f:
for line in f:
line = line.strip()
p = os.path.normpath(os.path.join(self.path, line))
# "./" is present as a marker between installed files
# and installation metadata files
if not os.path.exists(p):
logger.warning('Non-existent file: %s', p)
if p.endswith(('.pyc', '.pyo')):
continue
#otherwise fall through and fail
if not os.path.isdir(p):
result.append((p, _md5(p), _size(p)))
result.append((record_path, None, None))
return result
def list_distinfo_files(self, absolute=False):
"""
Iterates over the ``installed-files.txt`` entries and returns paths for
each line if the path is pointing to a file located in the
``.egg-info`` directory or one of its subdirectories.
:parameter absolute: If *absolute* is ``True``, each returned path is
transformed into a local absolute path. Otherwise the
raw value from ``installed-files.txt`` is returned.
:type absolute: boolean
:returns: iterator of paths
"""
record_path = os.path.join(self.path, 'installed-files.txt')
if os.path.exists(record_path):
skip = True
with codecs.open(record_path, 'r', encoding='utf-8') as f:
for line in f:
line = line.strip()
if line == './':
skip = False
continue
if not skip:
p = os.path.normpath(os.path.join(self.path, line))
if p.startswith(self.path):
if absolute:
yield p
else:
yield line
def __eq__(self, other):
return (isinstance(other, EggInfoDistribution) and
self.path == other.path)
# See http://docs.python.org/reference/datamodel#object.__hash__
__hash__ = object.__hash__
new_dist_class = InstalledDistribution
old_dist_class = EggInfoDistribution
class DependencyGraph(object):
"""
Represents a dependency graph between distributions.
The dependency relationships are stored in an ``adjacency_list`` that maps
distributions to a list of ``(other, label)`` tuples where ``other``
is a distribution and the edge is labeled with ``label`` (i.e. the version
specifier, if such was provided). Also, for more efficient traversal, for
every distribution ``x``, a list of predecessors is kept in
``reverse_list[x]``. An edge from distribution ``a`` to
distribution ``b`` means that ``a`` depends on ``b``. If any missing
dependencies are found, they are stored in ``missing``, which is a
dictionary that maps distributions to a list of requirements that were not
provided by any other distributions.
"""
def __init__(self):
self.adjacency_list = {}
self.reverse_list = {}
self.missing = {}
def add_distribution(self, distribution):
"""Add the *distribution* to the graph.
:type distribution: :class:`distutils2.database.InstalledDistribution`
or :class:`distutils2.database.EggInfoDistribution`
"""
self.adjacency_list[distribution] = []
self.reverse_list[distribution] = []
#self.missing[distribution] = []
def add_edge(self, x, y, label=None):
"""Add an edge from distribution *x* to distribution *y* with the given
*label*.
:type x: :class:`distutils2.database.InstalledDistribution` or
:class:`distutils2.database.EggInfoDistribution`
:type y: :class:`distutils2.database.InstalledDistribution` or
:class:`distutils2.database.EggInfoDistribution`
:type label: ``str`` or ``None``
"""
self.adjacency_list[x].append((y, label))
# multiple edges are allowed, so be careful
if x not in self.reverse_list[y]:
self.reverse_list[y].append(x)
def add_missing(self, distribution, requirement):
"""
Add a missing *requirement* for the given *distribution*.
:type distribution: :class:`distutils2.database.InstalledDistribution`
or :class:`distutils2.database.EggInfoDistribution`
:type requirement: ``str``
"""
logger.debug('%s missing %r', distribution, requirement)
self.missing.setdefault(distribution, []).append(requirement)
def _repr_dist(self, dist):
return '%s %s' % (dist.name, dist.version)
def repr_node(self, dist, level=1):
"""Prints only a subgraph"""
output = [self._repr_dist(dist)]
for other, label in self.adjacency_list[dist]:
dist = self._repr_dist(other)
if label is not None:
dist = '%s [%s]' % (dist, label)
output.append(' ' * level + str(dist))
suboutput = self.repr_node(other, level + 1)
subs = suboutput.split('\n')
output.extend(subs[1:])
return '\n'.join(output)
def to_dot(self, f, skip_disconnected=True):
"""Writes a DOT output for the graph to the provided file *f*.
If *skip_disconnected* is set to ``True``, then all distributions
that are not dependent on any other distribution are skipped.
:type f: has to support ``file``-like operations
:type skip_disconnected: ``bool``
"""
disconnected = []
f.write("digraph dependencies {\n")
for dist, adjs in self.adjacency_list.items():
if len(adjs) == 0 and not skip_disconnected:
disconnected.append(dist)
for other, label in adjs:
if not label is None:
f.write('"%s" -> "%s" [label="%s"]\n' %
(dist.name, other.name, label))
else:
f.write('"%s" -> "%s"\n' % (dist.name, other.name))
if not skip_disconnected and len(disconnected) > 0:
f.write('subgraph disconnected {\n')
f.write('label = "Disconnected"\n')
f.write('bgcolor = red\n')
for dist in disconnected:
f.write('"%s"' % dist.name)
f.write('\n')
f.write('}\n')
f.write('}\n')
def topological_sort(self):
"""
Perform a topological sort of the graph.
:return: A tuple, the first element of which is a topologically sorted
list of distributions, and the second element of which is a
list of distributions that cannot be sorted because they have
circular dependencies and so form a cycle.
"""
result = []
# Make a shallow copy of the adjacency list
alist = {}
for k, v in self.adjacency_list.items():
alist[k] = v[:]
while True:
# See what we can remove in this run
to_remove = []
for k, v in list(alist.items())[:]:
if not v:
to_remove.append(k)
del alist[k]
if not to_remove:
# What's left in alist (if anything) is a cycle.
break
# Remove from the adjacency list of others
for k, v in alist.items():
alist[k] = [(d, r) for d, r in v if d not in to_remove]
logger.debug('Moving to result: %s',
['%s (%s)' % (d.name, d.version) for d in to_remove])
result.extend(to_remove)
return result, list(alist.keys())
def __repr__(self):
"""Representation of the graph"""
output = []
for dist, adjs in self.adjacency_list.items():
output.append(self.repr_node(dist))
return '\n'.join(output)
def make_graph(dists, scheme='default'):
"""Makes a dependency graph from the given distributions.
:parameter dists: a list of distributions
:type dists: list of :class:`distutils2.database.InstalledDistribution` and
:class:`distutils2.database.EggInfoDistribution` instances
:rtype: a :class:`DependencyGraph` instance
"""
scheme = get_scheme(scheme)
graph = DependencyGraph()
provided = {} # maps names to lists of (version, dist) tuples
# first, build the graph and find out what's provided
for dist in dists:
graph.add_distribution(dist)
for p in dist.provides:
name, version = parse_name_and_version(p)
logger.debug('Add to provided: %s, %s, %s', name, version, dist)
provided.setdefault(name, []).append((version, dist))
# now make the edges
for dist in dists:
requires = (dist.run_requires | dist.meta_requires |
dist.build_requires | dist.dev_requires)
for req in requires:
try:
matcher = scheme.matcher(req)
except UnsupportedVersionError:
# XXX compat-mode if cannot read the version
logger.warning('could not read version %r - using name only',
req)
name = req.split()[0]
matcher = scheme.matcher(name)
name = matcher.key # case-insensitive
matched = False
if name in provided:
for version, provider in provided[name]:
try:
match = matcher.match(version)
except UnsupportedVersionError:
match = False
if match:
graph.add_edge(dist, provider, req)
matched = True
break
if not matched:
graph.add_missing(dist, req)
return graph
def get_dependent_dists(dists, dist):
"""Recursively generate a list of distributions from *dists* that are
dependent on *dist*.
:param dists: a list of distributions
:param dist: a distribution, member of *dists* for which we are interested
"""
if dist not in dists:
raise DistlibException('given distribution %r is not a member '
'of the list' % dist.name)
graph = make_graph(dists)
dep = [dist] # dependent distributions
todo = graph.reverse_list[dist] # list of nodes we should inspect
while todo:
d = todo.pop()
dep.append(d)
for succ in graph.reverse_list[d]:
if succ not in dep:
todo.append(succ)
dep.pop(0) # remove dist from dep, was there to prevent infinite loops
return dep
def get_required_dists(dists, dist):
"""Recursively generate a list of distributions from *dists* that are
required by *dist*.
:param dists: a list of distributions
:param dist: a distribution, member of *dists* for which we are interested
in finding the dependencies.
"""
if dist not in dists:
raise DistlibException('given distribution %r is not a member '
'of the list' % dist.name)
graph = make_graph(dists)
req = set() # required distributions
todo = graph.adjacency_list[dist] # list of nodes we should inspect
seen = set(t[0] for t in todo) # already added to todo
while todo:
d = todo.pop()[0]
req.add(d)
pred_list = graph.adjacency_list[d]
for pred in pred_list:
d = pred[0]
if d not in req and d not in seen:
seen.add(d)
todo.append(pred)
return req
def make_dist(name, version, **kwargs):
"""
A convenience method for making a dist given just a name and version.
"""
summary = kwargs.pop('summary', 'Placeholder for summary')
md = Metadata(**kwargs)
md.name = name
md.version = version
md.summary = summary or 'Placeholder for summary'
return Distribution(md)
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/distlib/database.py
|
Python
|
mit
| 51,697 |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2013 Vinay Sajip.
# Licensed to the Python Software Foundation under a contributor agreement.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
import hashlib
import logging
import os
import shutil
import subprocess
import tempfile
try:
from threading import Thread
except ImportError: # pragma: no cover
from dummy_threading import Thread
from . import DistlibException
from .compat import (HTTPBasicAuthHandler, Request, HTTPPasswordMgr,
urlparse, build_opener, string_types)
from .util import zip_dir, ServerProxy
logger = logging.getLogger(__name__)
DEFAULT_INDEX = 'https://pypi.org/pypi'
DEFAULT_REALM = 'pypi'
class PackageIndex(object):
"""
This class represents a package index compatible with PyPI, the Python
Package Index.
"""
boundary = b'----------ThIs_Is_tHe_distlib_index_bouNdaRY_$'
def __init__(self, url=None):
"""
Initialise an instance.
:param url: The URL of the index. If not specified, the URL for PyPI is
used.
"""
self.url = url or DEFAULT_INDEX
self.read_configuration()
scheme, netloc, path, params, query, frag = urlparse(self.url)
if params or query or frag or scheme not in ('http', 'https'):
raise DistlibException('invalid repository: %s' % self.url)
self.password_handler = None
self.ssl_verifier = None
self.gpg = None
self.gpg_home = None
with open(os.devnull, 'w') as sink:
# Use gpg by default rather than gpg2, as gpg2 insists on
# prompting for passwords
for s in ('gpg', 'gpg2'):
try:
rc = subprocess.check_call([s, '--version'], stdout=sink,
stderr=sink)
if rc == 0:
self.gpg = s
break
except OSError:
pass
def _get_pypirc_command(self):
"""
Get the distutils command for interacting with PyPI configurations.
:return: the command.
"""
from .util import _get_pypirc_command as cmd
return cmd()
def read_configuration(self):
"""
Read the PyPI access configuration as supported by distutils. This populates
``username``, ``password``, ``realm`` and ``url`` attributes from the
configuration.
"""
from .util import _load_pypirc
cfg = _load_pypirc(self)
self.username = cfg.get('username')
self.password = cfg.get('password')
self.realm = cfg.get('realm', 'pypi')
self.url = cfg.get('repository', self.url)
def save_configuration(self):
"""
Save the PyPI access configuration. You must have set ``username`` and
``password`` attributes before calling this method.
"""
self.check_credentials()
from .util import _store_pypirc
_store_pypirc(self)
def check_credentials(self):
"""
Check that ``username`` and ``password`` have been set, and raise an
exception if not.
"""
if self.username is None or self.password is None:
raise DistlibException('username and password must be set')
pm = HTTPPasswordMgr()
_, netloc, _, _, _, _ = urlparse(self.url)
pm.add_password(self.realm, netloc, self.username, self.password)
self.password_handler = HTTPBasicAuthHandler(pm)
def register(self, metadata): # pragma: no cover
"""
Register a distribution on PyPI, using the provided metadata.
:param metadata: A :class:`Metadata` instance defining at least a name
and version number for the distribution to be
registered.
:return: The HTTP response received from PyPI upon submission of the
request.
"""
self.check_credentials()
metadata.validate()
d = metadata.todict()
d[':action'] = 'verify'
request = self.encode_request(d.items(), [])
response = self.send_request(request)
d[':action'] = 'submit'
request = self.encode_request(d.items(), [])
return self.send_request(request)
def _reader(self, name, stream, outbuf):
"""
Thread runner for reading lines of from a subprocess into a buffer.
:param name: The logical name of the stream (used for logging only).
:param stream: The stream to read from. This will typically a pipe
connected to the output stream of a subprocess.
:param outbuf: The list to append the read lines to.
"""
while True:
s = stream.readline()
if not s:
break
s = s.decode('utf-8').rstrip()
outbuf.append(s)
logger.debug('%s: %s' % (name, s))
stream.close()
def get_sign_command(self, filename, signer, sign_password, keystore=None): # pragma: no cover
"""
Return a suitable command for signing a file.
:param filename: The pathname to the file to be signed.
:param signer: The identifier of the signer of the file.
:param sign_password: The passphrase for the signer's
private key used for signing.
:param keystore: The path to a directory which contains the keys
used in verification. If not specified, the
instance's ``gpg_home`` attribute is used instead.
:return: The signing command as a list suitable to be
passed to :class:`subprocess.Popen`.
"""
cmd = [self.gpg, '--status-fd', '2', '--no-tty']
if keystore is None:
keystore = self.gpg_home
if keystore:
cmd.extend(['--homedir', keystore])
if sign_password is not None:
cmd.extend(['--batch', '--passphrase-fd', '0'])
td = tempfile.mkdtemp()
sf = os.path.join(td, os.path.basename(filename) + '.asc')
cmd.extend(['--detach-sign', '--armor', '--local-user',
signer, '--output', sf, filename])
logger.debug('invoking: %s', ' '.join(cmd))
return cmd, sf
def run_command(self, cmd, input_data=None):
"""
Run a command in a child process , passing it any input data specified.
:param cmd: The command to run.
:param input_data: If specified, this must be a byte string containing
data to be sent to the child process.
:return: A tuple consisting of the subprocess' exit code, a list of
lines read from the subprocess' ``stdout``, and a list of
lines read from the subprocess' ``stderr``.
"""
kwargs = {
'stdout': subprocess.PIPE,
'stderr': subprocess.PIPE,
}
if input_data is not None:
kwargs['stdin'] = subprocess.PIPE
stdout = []
stderr = []
p = subprocess.Popen(cmd, **kwargs)
# We don't use communicate() here because we may need to
# get clever with interacting with the command
t1 = Thread(target=self._reader, args=('stdout', p.stdout, stdout))
t1.start()
t2 = Thread(target=self._reader, args=('stderr', p.stderr, stderr))
t2.start()
if input_data is not None:
p.stdin.write(input_data)
p.stdin.close()
p.wait()
t1.join()
t2.join()
return p.returncode, stdout, stderr
def sign_file(self, filename, signer, sign_password, keystore=None): # pragma: no cover
"""
Sign a file.
:param filename: The pathname to the file to be signed.
:param signer: The identifier of the signer of the file.
:param sign_password: The passphrase for the signer's
private key used for signing.
:param keystore: The path to a directory which contains the keys
used in signing. If not specified, the instance's
``gpg_home`` attribute is used instead.
:return: The absolute pathname of the file where the signature is
stored.
"""
cmd, sig_file = self.get_sign_command(filename, signer, sign_password,
keystore)
rc, stdout, stderr = self.run_command(cmd,
sign_password.encode('utf-8'))
if rc != 0:
raise DistlibException('sign command failed with error '
'code %s' % rc)
return sig_file
def upload_file(self, metadata, filename, signer=None, sign_password=None,
filetype='sdist', pyversion='source', keystore=None):
"""
Upload a release file to the index.
:param metadata: A :class:`Metadata` instance defining at least a name
and version number for the file to be uploaded.
:param filename: The pathname of the file to be uploaded.
:param signer: The identifier of the signer of the file.
:param sign_password: The passphrase for the signer's
private key used for signing.
:param filetype: The type of the file being uploaded. This is the
distutils command which produced that file, e.g.
``sdist`` or ``bdist_wheel``.
:param pyversion: The version of Python which the release relates
to. For code compatible with any Python, this would
be ``source``, otherwise it would be e.g. ``3.2``.
:param keystore: The path to a directory which contains the keys
used in signing. If not specified, the instance's
``gpg_home`` attribute is used instead.
:return: The HTTP response received from PyPI upon submission of the
request.
"""
self.check_credentials()
if not os.path.exists(filename):
raise DistlibException('not found: %s' % filename)
metadata.validate()
d = metadata.todict()
sig_file = None
if signer:
if not self.gpg:
logger.warning('no signing program available - not signed')
else:
sig_file = self.sign_file(filename, signer, sign_password,
keystore)
with open(filename, 'rb') as f:
file_data = f.read()
md5_digest = hashlib.md5(file_data).hexdigest()
sha256_digest = hashlib.sha256(file_data).hexdigest()
d.update({
':action': 'file_upload',
'protocol_version': '1',
'filetype': filetype,
'pyversion': pyversion,
'md5_digest': md5_digest,
'sha256_digest': sha256_digest,
})
files = [('content', os.path.basename(filename), file_data)]
if sig_file:
with open(sig_file, 'rb') as f:
sig_data = f.read()
files.append(('gpg_signature', os.path.basename(sig_file),
sig_data))
shutil.rmtree(os.path.dirname(sig_file))
request = self.encode_request(d.items(), files)
return self.send_request(request)
def upload_documentation(self, metadata, doc_dir): # pragma: no cover
"""
Upload documentation to the index.
:param metadata: A :class:`Metadata` instance defining at least a name
and version number for the documentation to be
uploaded.
:param doc_dir: The pathname of the directory which contains the
documentation. This should be the directory that
contains the ``index.html`` for the documentation.
:return: The HTTP response received from PyPI upon submission of the
request.
"""
self.check_credentials()
if not os.path.isdir(doc_dir):
raise DistlibException('not a directory: %r' % doc_dir)
fn = os.path.join(doc_dir, 'index.html')
if not os.path.exists(fn):
raise DistlibException('not found: %r' % fn)
metadata.validate()
name, version = metadata.name, metadata.version
zip_data = zip_dir(doc_dir).getvalue()
fields = [(':action', 'doc_upload'),
('name', name), ('version', version)]
files = [('content', name, zip_data)]
request = self.encode_request(fields, files)
return self.send_request(request)
def get_verify_command(self, signature_filename, data_filename,
keystore=None):
"""
Return a suitable command for verifying a file.
:param signature_filename: The pathname to the file containing the
signature.
:param data_filename: The pathname to the file containing the
signed data.
:param keystore: The path to a directory which contains the keys
used in verification. If not specified, the
instance's ``gpg_home`` attribute is used instead.
:return: The verifying command as a list suitable to be
passed to :class:`subprocess.Popen`.
"""
cmd = [self.gpg, '--status-fd', '2', '--no-tty']
if keystore is None:
keystore = self.gpg_home
if keystore:
cmd.extend(['--homedir', keystore])
cmd.extend(['--verify', signature_filename, data_filename])
logger.debug('invoking: %s', ' '.join(cmd))
return cmd
def verify_signature(self, signature_filename, data_filename,
keystore=None):
"""
Verify a signature for a file.
:param signature_filename: The pathname to the file containing the
signature.
:param data_filename: The pathname to the file containing the
signed data.
:param keystore: The path to a directory which contains the keys
used in verification. If not specified, the
instance's ``gpg_home`` attribute is used instead.
:return: True if the signature was verified, else False.
"""
if not self.gpg:
raise DistlibException('verification unavailable because gpg '
'unavailable')
cmd = self.get_verify_command(signature_filename, data_filename,
keystore)
rc, stdout, stderr = self.run_command(cmd)
if rc not in (0, 1):
raise DistlibException('verify command failed with error '
'code %s' % rc)
return rc == 0
def download_file(self, url, destfile, digest=None, reporthook=None):
"""
This is a convenience method for downloading a file from an URL.
Normally, this will be a file from the index, though currently
no check is made for this (i.e. a file can be downloaded from
anywhere).
The method is just like the :func:`urlretrieve` function in the
standard library, except that it allows digest computation to be
done during download and checking that the downloaded data
matched any expected value.
:param url: The URL of the file to be downloaded (assumed to be
available via an HTTP GET request).
:param destfile: The pathname where the downloaded file is to be
saved.
:param digest: If specified, this must be a (hasher, value)
tuple, where hasher is the algorithm used (e.g.
``'md5'``) and ``value`` is the expected value.
:param reporthook: The same as for :func:`urlretrieve` in the
standard library.
"""
if digest is None:
digester = None
logger.debug('No digest specified')
else:
if isinstance(digest, (list, tuple)):
hasher, digest = digest
else:
hasher = 'md5'
digester = getattr(hashlib, hasher)()
logger.debug('Digest specified: %s' % digest)
# The following code is equivalent to urlretrieve.
# We need to do it this way so that we can compute the
# digest of the file as we go.
with open(destfile, 'wb') as dfp:
# addinfourl is not a context manager on 2.x
# so we have to use try/finally
sfp = self.send_request(Request(url))
try:
headers = sfp.info()
blocksize = 8192
size = -1
read = 0
blocknum = 0
if "content-length" in headers:
size = int(headers["Content-Length"])
if reporthook:
reporthook(blocknum, blocksize, size)
while True:
block = sfp.read(blocksize)
if not block:
break
read += len(block)
dfp.write(block)
if digester:
digester.update(block)
blocknum += 1
if reporthook:
reporthook(blocknum, blocksize, size)
finally:
sfp.close()
# check that we got the whole file, if we can
if size >= 0 and read < size:
raise DistlibException(
'retrieval incomplete: got only %d out of %d bytes'
% (read, size))
# if we have a digest, it must match.
if digester:
actual = digester.hexdigest()
if digest != actual:
raise DistlibException('%s digest mismatch for %s: expected '
'%s, got %s' % (hasher, destfile,
digest, actual))
logger.debug('Digest verified: %s', digest)
def send_request(self, req):
"""
Send a standard library :class:`Request` to PyPI and return its
response.
:param req: The request to send.
:return: The HTTP response from PyPI (a standard library HTTPResponse).
"""
handlers = []
if self.password_handler:
handlers.append(self.password_handler)
if self.ssl_verifier:
handlers.append(self.ssl_verifier)
opener = build_opener(*handlers)
return opener.open(req)
def encode_request(self, fields, files):
"""
Encode fields and files for posting to an HTTP server.
:param fields: The fields to send as a list of (fieldname, value)
tuples.
:param files: The files to send as a list of (fieldname, filename,
file_bytes) tuple.
"""
# Adapted from packaging, which in turn was adapted from
# http://code.activestate.com/recipes/146306
parts = []
boundary = self.boundary
for k, values in fields:
if not isinstance(values, (list, tuple)):
values = [values]
for v in values:
parts.extend((
b'--' + boundary,
('Content-Disposition: form-data; name="%s"' %
k).encode('utf-8'),
b'',
v.encode('utf-8')))
for key, filename, value in files:
parts.extend((
b'--' + boundary,
('Content-Disposition: form-data; name="%s"; filename="%s"' %
(key, filename)).encode('utf-8'),
b'',
value))
parts.extend((b'--' + boundary + b'--', b''))
body = b'\r\n'.join(parts)
ct = b'multipart/form-data; boundary=' + boundary
headers = {
'Content-type': ct,
'Content-length': str(len(body))
}
return Request(self.url, body, headers)
def search(self, terms, operator=None): # pragma: no cover
if isinstance(terms, string_types):
terms = {'name': terms}
rpc_proxy = ServerProxy(self.url, timeout=3.0)
try:
return rpc_proxy.search(terms, operator or 'and')
finally:
rpc_proxy('close')()
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/distlib/index.py
|
Python
|
mit
| 20,834 |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2015 Vinay Sajip.
# Licensed to the Python Software Foundation under a contributor agreement.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
import gzip
from io import BytesIO
import json
import logging
import os
import posixpath
import re
try:
import threading
except ImportError: # pragma: no cover
import dummy_threading as threading
import zlib
from . import DistlibException
from .compat import (urljoin, urlparse, urlunparse, url2pathname, pathname2url,
queue, quote, unescape, build_opener,
HTTPRedirectHandler as BaseRedirectHandler, text_type,
Request, HTTPError, URLError)
from .database import Distribution, DistributionPath, make_dist
from .metadata import Metadata, MetadataInvalidError
from .util import (cached_property, ensure_slash, split_filename, get_project_data,
parse_requirement, parse_name_and_version, ServerProxy,
normalize_name)
from .version import get_scheme, UnsupportedVersionError
from .wheel import Wheel, is_compatible
logger = logging.getLogger(__name__)
HASHER_HASH = re.compile(r'^(\w+)=([a-f0-9]+)')
CHARSET = re.compile(r';\s*charset\s*=\s*(.*)\s*$', re.I)
HTML_CONTENT_TYPE = re.compile('text/html|application/x(ht)?ml')
DEFAULT_INDEX = 'https://pypi.org/pypi'
def get_all_distribution_names(url=None):
"""
Return all distribution names known by an index.
:param url: The URL of the index.
:return: A list of all known distribution names.
"""
if url is None:
url = DEFAULT_INDEX
client = ServerProxy(url, timeout=3.0)
try:
return client.list_packages()
finally:
client('close')()
class RedirectHandler(BaseRedirectHandler):
"""
A class to work around a bug in some Python 3.2.x releases.
"""
# There's a bug in the base version for some 3.2.x
# (e.g. 3.2.2 on Ubuntu Oneiric). If a Location header
# returns e.g. /abc, it bails because it says the scheme ''
# is bogus, when actually it should use the request's
# URL for the scheme. See Python issue #13696.
def http_error_302(self, req, fp, code, msg, headers):
# Some servers (incorrectly) return multiple Location headers
# (so probably same goes for URI). Use first header.
newurl = None
for key in ('location', 'uri'):
if key in headers:
newurl = headers[key]
break
if newurl is None: # pragma: no cover
return
urlparts = urlparse(newurl)
if urlparts.scheme == '':
newurl = urljoin(req.get_full_url(), newurl)
if hasattr(headers, 'replace_header'):
headers.replace_header(key, newurl)
else:
headers[key] = newurl
return BaseRedirectHandler.http_error_302(self, req, fp, code, msg,
headers)
http_error_301 = http_error_303 = http_error_307 = http_error_302
class Locator(object):
"""
A base class for locators - things that locate distributions.
"""
source_extensions = ('.tar.gz', '.tar.bz2', '.tar', '.zip', '.tgz', '.tbz')
binary_extensions = ('.egg', '.exe', '.whl')
excluded_extensions = ('.pdf',)
# A list of tags indicating which wheels you want to match. The default
# value of None matches against the tags compatible with the running
# Python. If you want to match other values, set wheel_tags on a locator
# instance to a list of tuples (pyver, abi, arch) which you want to match.
wheel_tags = None
downloadable_extensions = source_extensions + ('.whl',)
def __init__(self, scheme='default'):
"""
Initialise an instance.
:param scheme: Because locators look for most recent versions, they
need to know the version scheme to use. This specifies
the current PEP-recommended scheme - use ``'legacy'``
if you need to support existing distributions on PyPI.
"""
self._cache = {}
self.scheme = scheme
# Because of bugs in some of the handlers on some of the platforms,
# we use our own opener rather than just using urlopen.
self.opener = build_opener(RedirectHandler())
# If get_project() is called from locate(), the matcher instance
# is set from the requirement passed to locate(). See issue #18 for
# why this can be useful to know.
self.matcher = None
self.errors = queue.Queue()
def get_errors(self):
"""
Return any errors which have occurred.
"""
result = []
while not self.errors.empty(): # pragma: no cover
try:
e = self.errors.get(False)
result.append(e)
except self.errors.Empty:
continue
self.errors.task_done()
return result
def clear_errors(self):
"""
Clear any errors which may have been logged.
"""
# Just get the errors and throw them away
self.get_errors()
def clear_cache(self):
self._cache.clear()
def _get_scheme(self):
return self._scheme
def _set_scheme(self, value):
self._scheme = value
scheme = property(_get_scheme, _set_scheme)
def _get_project(self, name):
"""
For a given project, get a dictionary mapping available versions to Distribution
instances.
This should be implemented in subclasses.
If called from a locate() request, self.matcher will be set to a
matcher for the requirement to satisfy, otherwise it will be None.
"""
raise NotImplementedError('Please implement in the subclass')
def get_distribution_names(self):
"""
Return all the distribution names known to this locator.
"""
raise NotImplementedError('Please implement in the subclass')
def get_project(self, name):
"""
For a given project, get a dictionary mapping available versions to Distribution
instances.
This calls _get_project to do all the work, and just implements a caching layer on top.
"""
if self._cache is None: # pragma: no cover
result = self._get_project(name)
elif name in self._cache:
result = self._cache[name]
else:
self.clear_errors()
result = self._get_project(name)
self._cache[name] = result
return result
def score_url(self, url):
"""
Give an url a score which can be used to choose preferred URLs
for a given project release.
"""
t = urlparse(url)
basename = posixpath.basename(t.path)
compatible = True
is_wheel = basename.endswith('.whl')
is_downloadable = basename.endswith(self.downloadable_extensions)
if is_wheel:
compatible = is_compatible(Wheel(basename), self.wheel_tags)
return (t.scheme == 'https', 'pypi.org' in t.netloc,
is_downloadable, is_wheel, compatible, basename)
def prefer_url(self, url1, url2):
"""
Choose one of two URLs where both are candidates for distribution
archives for the same version of a distribution (for example,
.tar.gz vs. zip).
The current implementation favours https:// URLs over http://, archives
from PyPI over those from other locations, wheel compatibility (if a
wheel) and then the archive name.
"""
result = url2
if url1:
s1 = self.score_url(url1)
s2 = self.score_url(url2)
if s1 > s2:
result = url1
if result != url2:
logger.debug('Not replacing %r with %r', url1, url2)
else:
logger.debug('Replacing %r with %r', url1, url2)
return result
def split_filename(self, filename, project_name):
"""
Attempt to split a filename in project name, version and Python version.
"""
return split_filename(filename, project_name)
def convert_url_to_download_info(self, url, project_name):
"""
See if a URL is a candidate for a download URL for a project (the URL
has typically been scraped from an HTML page).
If it is, a dictionary is returned with keys "name", "version",
"filename" and "url"; otherwise, None is returned.
"""
def same_project(name1, name2):
return normalize_name(name1) == normalize_name(name2)
result = None
scheme, netloc, path, params, query, frag = urlparse(url)
if frag.lower().startswith('egg='): # pragma: no cover
logger.debug('%s: version hint in fragment: %r',
project_name, frag)
m = HASHER_HASH.match(frag)
if m:
algo, digest = m.groups()
else:
algo, digest = None, None
origpath = path
if path and path[-1] == '/': # pragma: no cover
path = path[:-1]
if path.endswith('.whl'):
try:
wheel = Wheel(path)
if not is_compatible(wheel, self.wheel_tags):
logger.debug('Wheel not compatible: %s', path)
else:
if project_name is None:
include = True
else:
include = same_project(wheel.name, project_name)
if include:
result = {
'name': wheel.name,
'version': wheel.version,
'filename': wheel.filename,
'url': urlunparse((scheme, netloc, origpath,
params, query, '')),
'python-version': ', '.join(
['.'.join(list(v[2:])) for v in wheel.pyver]),
}
except Exception as e: # pragma: no cover
logger.warning('invalid path for wheel: %s', path)
elif not path.endswith(self.downloadable_extensions): # pragma: no cover
logger.debug('Not downloadable: %s', path)
else: # downloadable extension
path = filename = posixpath.basename(path)
for ext in self.downloadable_extensions:
if path.endswith(ext):
path = path[:-len(ext)]
t = self.split_filename(path, project_name)
if not t: # pragma: no cover
logger.debug('No match for project/version: %s', path)
else:
name, version, pyver = t
if not project_name or same_project(project_name, name):
result = {
'name': name,
'version': version,
'filename': filename,
'url': urlunparse((scheme, netloc, origpath,
params, query, '')),
#'packagetype': 'sdist',
}
if pyver: # pragma: no cover
result['python-version'] = pyver
break
if result and algo:
result['%s_digest' % algo] = digest
return result
def _get_digest(self, info):
"""
Get a digest from a dictionary by looking at a "digests" dictionary
or keys of the form 'algo_digest'.
Returns a 2-tuple (algo, digest) if found, else None. Currently
looks only for SHA256, then MD5.
"""
result = None
if 'digests' in info:
digests = info['digests']
for algo in ('sha256', 'md5'):
if algo in digests:
result = (algo, digests[algo])
break
if not result:
for algo in ('sha256', 'md5'):
key = '%s_digest' % algo
if key in info:
result = (algo, info[key])
break
return result
def _update_version_data(self, result, info):
"""
Update a result dictionary (the final result from _get_project) with a
dictionary for a specific version, which typically holds information
gleaned from a filename or URL for an archive for the distribution.
"""
name = info.pop('name')
version = info.pop('version')
if version in result:
dist = result[version]
md = dist.metadata
else:
dist = make_dist(name, version, scheme=self.scheme)
md = dist.metadata
dist.digest = digest = self._get_digest(info)
url = info['url']
result['digests'][url] = digest
if md.source_url != info['url']:
md.source_url = self.prefer_url(md.source_url, url)
result['urls'].setdefault(version, set()).add(url)
dist.locator = self
result[version] = dist
def locate(self, requirement, prereleases=False):
"""
Find the most recent distribution which matches the given
requirement.
:param requirement: A requirement of the form 'foo (1.0)' or perhaps
'foo (>= 1.0, < 2.0, != 1.3)'
:param prereleases: If ``True``, allow pre-release versions
to be located. Otherwise, pre-release versions
are not returned.
:return: A :class:`Distribution` instance, or ``None`` if no such
distribution could be located.
"""
result = None
r = parse_requirement(requirement)
if r is None: # pragma: no cover
raise DistlibException('Not a valid requirement: %r' % requirement)
scheme = get_scheme(self.scheme)
self.matcher = matcher = scheme.matcher(r.requirement)
logger.debug('matcher: %s (%s)', matcher, type(matcher).__name__)
versions = self.get_project(r.name)
if len(versions) > 2: # urls and digests keys are present
# sometimes, versions are invalid
slist = []
vcls = matcher.version_class
for k in versions:
if k in ('urls', 'digests'):
continue
try:
if not matcher.match(k):
pass # logger.debug('%s did not match %r', matcher, k)
else:
if prereleases or not vcls(k).is_prerelease:
slist.append(k)
# else:
# logger.debug('skipping pre-release '
# 'version %s of %s', k, matcher.name)
except Exception: # pragma: no cover
logger.warning('error matching %s with %r', matcher, k)
pass # slist.append(k)
if len(slist) > 1:
slist = sorted(slist, key=scheme.key)
if slist:
logger.debug('sorted list: %s', slist)
version = slist[-1]
result = versions[version]
if result:
if r.extras:
result.extras = r.extras
result.download_urls = versions.get('urls', {}).get(version, set())
d = {}
sd = versions.get('digests', {})
for url in result.download_urls:
if url in sd: # pragma: no cover
d[url] = sd[url]
result.digests = d
self.matcher = None
return result
class PyPIRPCLocator(Locator):
"""
This locator uses XML-RPC to locate distributions. It therefore
cannot be used with simple mirrors (that only mirror file content).
"""
def __init__(self, url, **kwargs):
"""
Initialise an instance.
:param url: The URL to use for XML-RPC.
:param kwargs: Passed to the superclass constructor.
"""
super(PyPIRPCLocator, self).__init__(**kwargs)
self.base_url = url
self.client = ServerProxy(url, timeout=3.0)
def get_distribution_names(self):
"""
Return all the distribution names known to this locator.
"""
return set(self.client.list_packages())
def _get_project(self, name):
result = {'urls': {}, 'digests': {}}
versions = self.client.package_releases(name, True)
for v in versions:
urls = self.client.release_urls(name, v)
data = self.client.release_data(name, v)
metadata = Metadata(scheme=self.scheme)
metadata.name = data['name']
metadata.version = data['version']
metadata.license = data.get('license')
metadata.keywords = data.get('keywords', [])
metadata.summary = data.get('summary')
dist = Distribution(metadata)
if urls:
info = urls[0]
metadata.source_url = info['url']
dist.digest = self._get_digest(info)
dist.locator = self
result[v] = dist
for info in urls:
url = info['url']
digest = self._get_digest(info)
result['urls'].setdefault(v, set()).add(url)
result['digests'][url] = digest
return result
class PyPIJSONLocator(Locator):
"""
This locator uses PyPI's JSON interface. It's very limited in functionality
and probably not worth using.
"""
def __init__(self, url, **kwargs):
super(PyPIJSONLocator, self).__init__(**kwargs)
self.base_url = ensure_slash(url)
def get_distribution_names(self):
"""
Return all the distribution names known to this locator.
"""
raise NotImplementedError('Not available from this locator')
def _get_project(self, name):
result = {'urls': {}, 'digests': {}}
url = urljoin(self.base_url, '%s/json' % quote(name))
try:
resp = self.opener.open(url)
data = resp.read().decode() # for now
d = json.loads(data)
md = Metadata(scheme=self.scheme)
data = d['info']
md.name = data['name']
md.version = data['version']
md.license = data.get('license')
md.keywords = data.get('keywords', [])
md.summary = data.get('summary')
dist = Distribution(md)
dist.locator = self
urls = d['urls']
result[md.version] = dist
for info in d['urls']:
url = info['url']
dist.download_urls.add(url)
dist.digests[url] = self._get_digest(info)
result['urls'].setdefault(md.version, set()).add(url)
result['digests'][url] = self._get_digest(info)
# Now get other releases
for version, infos in d['releases'].items():
if version == md.version:
continue # already done
omd = Metadata(scheme=self.scheme)
omd.name = md.name
omd.version = version
odist = Distribution(omd)
odist.locator = self
result[version] = odist
for info in infos:
url = info['url']
odist.download_urls.add(url)
odist.digests[url] = self._get_digest(info)
result['urls'].setdefault(version, set()).add(url)
result['digests'][url] = self._get_digest(info)
# for info in urls:
# md.source_url = info['url']
# dist.digest = self._get_digest(info)
# dist.locator = self
# for info in urls:
# url = info['url']
# result['urls'].setdefault(md.version, set()).add(url)
# result['digests'][url] = self._get_digest(info)
except Exception as e:
self.errors.put(text_type(e))
logger.exception('JSON fetch failed: %s', e)
return result
class Page(object):
"""
This class represents a scraped HTML page.
"""
# The following slightly hairy-looking regex just looks for the contents of
# an anchor link, which has an attribute "href" either immediately preceded
# or immediately followed by a "rel" attribute. The attribute values can be
# declared with double quotes, single quotes or no quotes - which leads to
# the length of the expression.
_href = re.compile("""
(rel\\s*=\\s*(?:"(?P<rel1>[^"]*)"|'(?P<rel2>[^']*)'|(?P<rel3>[^>\\s\n]*))\\s+)?
href\\s*=\\s*(?:"(?P<url1>[^"]*)"|'(?P<url2>[^']*)'|(?P<url3>[^>\\s\n]*))
(\\s+rel\\s*=\\s*(?:"(?P<rel4>[^"]*)"|'(?P<rel5>[^']*)'|(?P<rel6>[^>\\s\n]*)))?
""", re.I | re.S | re.X)
_base = re.compile(r"""<base\s+href\s*=\s*['"]?([^'">]+)""", re.I | re.S)
def __init__(self, data, url):
"""
Initialise an instance with the Unicode page contents and the URL they
came from.
"""
self.data = data
self.base_url = self.url = url
m = self._base.search(self.data)
if m:
self.base_url = m.group(1)
_clean_re = re.compile(r'[^a-z0-9$&+,/:;=?@.#%_\\|-]', re.I)
@cached_property
def links(self):
"""
Return the URLs of all the links on a page together with information
about their "rel" attribute, for determining which ones to treat as
downloads and which ones to queue for further scraping.
"""
def clean(url):
"Tidy up an URL."
scheme, netloc, path, params, query, frag = urlparse(url)
return urlunparse((scheme, netloc, quote(path),
params, query, frag))
result = set()
for match in self._href.finditer(self.data):
d = match.groupdict('')
rel = (d['rel1'] or d['rel2'] or d['rel3'] or
d['rel4'] or d['rel5'] or d['rel6'])
url = d['url1'] or d['url2'] or d['url3']
url = urljoin(self.base_url, url)
url = unescape(url)
url = self._clean_re.sub(lambda m: '%%%2x' % ord(m.group(0)), url)
result.add((url, rel))
# We sort the result, hoping to bring the most recent versions
# to the front
result = sorted(result, key=lambda t: t[0], reverse=True)
return result
class SimpleScrapingLocator(Locator):
"""
A locator which scrapes HTML pages to locate downloads for a distribution.
This runs multiple threads to do the I/O; performance is at least as good
as pip's PackageFinder, which works in an analogous fashion.
"""
# These are used to deal with various Content-Encoding schemes.
decoders = {
'deflate': zlib.decompress,
'gzip': lambda b: gzip.GzipFile(fileobj=BytesIO(b)).read(),
'none': lambda b: b,
}
def __init__(self, url, timeout=None, num_workers=10, **kwargs):
"""
Initialise an instance.
:param url: The root URL to use for scraping.
:param timeout: The timeout, in seconds, to be applied to requests.
This defaults to ``None`` (no timeout specified).
:param num_workers: The number of worker threads you want to do I/O,
This defaults to 10.
:param kwargs: Passed to the superclass.
"""
super(SimpleScrapingLocator, self).__init__(**kwargs)
self.base_url = ensure_slash(url)
self.timeout = timeout
self._page_cache = {}
self._seen = set()
self._to_fetch = queue.Queue()
self._bad_hosts = set()
self.skip_externals = False
self.num_workers = num_workers
self._lock = threading.RLock()
# See issue #45: we need to be resilient when the locator is used
# in a thread, e.g. with concurrent.futures. We can't use self._lock
# as it is for coordinating our internal threads - the ones created
# in _prepare_threads.
self._gplock = threading.RLock()
self.platform_check = False # See issue #112
def _prepare_threads(self):
"""
Threads are created only when get_project is called, and terminate
before it returns. They are there primarily to parallelise I/O (i.e.
fetching web pages).
"""
self._threads = []
for i in range(self.num_workers):
t = threading.Thread(target=self._fetch)
t.daemon = True
t.start()
self._threads.append(t)
def _wait_threads(self):
"""
Tell all the threads to terminate (by sending a sentinel value) and
wait for them to do so.
"""
# Note that you need two loops, since you can't say which
# thread will get each sentinel
for t in self._threads:
self._to_fetch.put(None) # sentinel
for t in self._threads:
t.join()
self._threads = []
def _get_project(self, name):
result = {'urls': {}, 'digests': {}}
with self._gplock:
self.result = result
self.project_name = name
url = urljoin(self.base_url, '%s/' % quote(name))
self._seen.clear()
self._page_cache.clear()
self._prepare_threads()
try:
logger.debug('Queueing %s', url)
self._to_fetch.put(url)
self._to_fetch.join()
finally:
self._wait_threads()
del self.result
return result
platform_dependent = re.compile(r'\b(linux_(i\d86|x86_64|arm\w+)|'
r'win(32|_amd64)|macosx_?\d+)\b', re.I)
def _is_platform_dependent(self, url):
"""
Does an URL refer to a platform-specific download?
"""
return self.platform_dependent.search(url)
def _process_download(self, url):
"""
See if an URL is a suitable download for a project.
If it is, register information in the result dictionary (for
_get_project) about the specific version it's for.
Note that the return value isn't actually used other than as a boolean
value.
"""
if self.platform_check and self._is_platform_dependent(url):
info = None
else:
info = self.convert_url_to_download_info(url, self.project_name)
logger.debug('process_download: %s -> %s', url, info)
if info:
with self._lock: # needed because self.result is shared
self._update_version_data(self.result, info)
return info
def _should_queue(self, link, referrer, rel):
"""
Determine whether a link URL from a referring page and with a
particular "rel" attribute should be queued for scraping.
"""
scheme, netloc, path, _, _, _ = urlparse(link)
if path.endswith(self.source_extensions + self.binary_extensions +
self.excluded_extensions):
result = False
elif self.skip_externals and not link.startswith(self.base_url):
result = False
elif not referrer.startswith(self.base_url):
result = False
elif rel not in ('homepage', 'download'):
result = False
elif scheme not in ('http', 'https', 'ftp'):
result = False
elif self._is_platform_dependent(link):
result = False
else:
host = netloc.split(':', 1)[0]
if host.lower() == 'localhost':
result = False
else:
result = True
logger.debug('should_queue: %s (%s) from %s -> %s', link, rel,
referrer, result)
return result
def _fetch(self):
"""
Get a URL to fetch from the work queue, get the HTML page, examine its
links for download candidates and candidates for further scraping.
This is a handy method to run in a thread.
"""
while True:
url = self._to_fetch.get()
try:
if url:
page = self.get_page(url)
if page is None: # e.g. after an error
continue
for link, rel in page.links:
if link not in self._seen:
try:
self._seen.add(link)
if (not self._process_download(link) and
self._should_queue(link, url, rel)):
logger.debug('Queueing %s from %s', link, url)
self._to_fetch.put(link)
except MetadataInvalidError: # e.g. invalid versions
pass
except Exception as e: # pragma: no cover
self.errors.put(text_type(e))
finally:
# always do this, to avoid hangs :-)
self._to_fetch.task_done()
if not url:
#logger.debug('Sentinel seen, quitting.')
break
def get_page(self, url):
"""
Get the HTML for an URL, possibly from an in-memory cache.
XXX TODO Note: this cache is never actually cleared. It's assumed that
the data won't get stale over the lifetime of a locator instance (not
necessarily true for the default_locator).
"""
# http://peak.telecommunity.com/DevCenter/EasyInstall#package-index-api
scheme, netloc, path, _, _, _ = urlparse(url)
if scheme == 'file' and os.path.isdir(url2pathname(path)):
url = urljoin(ensure_slash(url), 'index.html')
if url in self._page_cache:
result = self._page_cache[url]
logger.debug('Returning %s from cache: %s', url, result)
else:
host = netloc.split(':', 1)[0]
result = None
if host in self._bad_hosts:
logger.debug('Skipping %s due to bad host %s', url, host)
else:
req = Request(url, headers={'Accept-encoding': 'identity'})
try:
logger.debug('Fetching %s', url)
resp = self.opener.open(req, timeout=self.timeout)
logger.debug('Fetched %s', url)
headers = resp.info()
content_type = headers.get('Content-Type', '')
if HTML_CONTENT_TYPE.match(content_type):
final_url = resp.geturl()
data = resp.read()
encoding = headers.get('Content-Encoding')
if encoding:
decoder = self.decoders[encoding] # fail if not found
data = decoder(data)
encoding = 'utf-8'
m = CHARSET.search(content_type)
if m:
encoding = m.group(1)
try:
data = data.decode(encoding)
except UnicodeError: # pragma: no cover
data = data.decode('latin-1') # fallback
result = Page(data, final_url)
self._page_cache[final_url] = result
except HTTPError as e:
if e.code != 404:
logger.exception('Fetch failed: %s: %s', url, e)
except URLError as e: # pragma: no cover
logger.exception('Fetch failed: %s: %s', url, e)
with self._lock:
self._bad_hosts.add(host)
except Exception as e: # pragma: no cover
logger.exception('Fetch failed: %s: %s', url, e)
finally:
self._page_cache[url] = result # even if None (failure)
return result
_distname_re = re.compile('<a href=[^>]*>([^<]+)<')
def get_distribution_names(self):
"""
Return all the distribution names known to this locator.
"""
result = set()
page = self.get_page(self.base_url)
if not page:
raise DistlibException('Unable to get %s' % self.base_url)
for match in self._distname_re.finditer(page.data):
result.add(match.group(1))
return result
class DirectoryLocator(Locator):
"""
This class locates distributions in a directory tree.
"""
def __init__(self, path, **kwargs):
"""
Initialise an instance.
:param path: The root of the directory tree to search.
:param kwargs: Passed to the superclass constructor,
except for:
* recursive - if True (the default), subdirectories are
recursed into. If False, only the top-level directory
is searched,
"""
self.recursive = kwargs.pop('recursive', True)
super(DirectoryLocator, self).__init__(**kwargs)
path = os.path.abspath(path)
if not os.path.isdir(path): # pragma: no cover
raise DistlibException('Not a directory: %r' % path)
self.base_dir = path
def should_include(self, filename, parent):
"""
Should a filename be considered as a candidate for a distribution
archive? As well as the filename, the directory which contains it
is provided, though not used by the current implementation.
"""
return filename.endswith(self.downloadable_extensions)
def _get_project(self, name):
result = {'urls': {}, 'digests': {}}
for root, dirs, files in os.walk(self.base_dir):
for fn in files:
if self.should_include(fn, root):
fn = os.path.join(root, fn)
url = urlunparse(('file', '',
pathname2url(os.path.abspath(fn)),
'', '', ''))
info = self.convert_url_to_download_info(url, name)
if info:
self._update_version_data(result, info)
if not self.recursive:
break
return result
def get_distribution_names(self):
"""
Return all the distribution names known to this locator.
"""
result = set()
for root, dirs, files in os.walk(self.base_dir):
for fn in files:
if self.should_include(fn, root):
fn = os.path.join(root, fn)
url = urlunparse(('file', '',
pathname2url(os.path.abspath(fn)),
'', '', ''))
info = self.convert_url_to_download_info(url, None)
if info:
result.add(info['name'])
if not self.recursive:
break
return result
class JSONLocator(Locator):
"""
This locator uses special extended metadata (not available on PyPI) and is
the basis of performant dependency resolution in distlib. Other locators
require archive downloads before dependencies can be determined! As you
might imagine, that can be slow.
"""
def get_distribution_names(self):
"""
Return all the distribution names known to this locator.
"""
raise NotImplementedError('Not available from this locator')
def _get_project(self, name):
result = {'urls': {}, 'digests': {}}
data = get_project_data(name)
if data:
for info in data.get('files', []):
if info['ptype'] != 'sdist' or info['pyversion'] != 'source':
continue
# We don't store summary in project metadata as it makes
# the data bigger for no benefit during dependency
# resolution
dist = make_dist(data['name'], info['version'],
summary=data.get('summary',
'Placeholder for summary'),
scheme=self.scheme)
md = dist.metadata
md.source_url = info['url']
# TODO SHA256 digest
if 'digest' in info and info['digest']:
dist.digest = ('md5', info['digest'])
md.dependencies = info.get('requirements', {})
dist.exports = info.get('exports', {})
result[dist.version] = dist
result['urls'].setdefault(dist.version, set()).add(info['url'])
return result
class DistPathLocator(Locator):
"""
This locator finds installed distributions in a path. It can be useful for
adding to an :class:`AggregatingLocator`.
"""
def __init__(self, distpath, **kwargs):
"""
Initialise an instance.
:param distpath: A :class:`DistributionPath` instance to search.
"""
super(DistPathLocator, self).__init__(**kwargs)
assert isinstance(distpath, DistributionPath)
self.distpath = distpath
def _get_project(self, name):
dist = self.distpath.get_distribution(name)
if dist is None:
result = {'urls': {}, 'digests': {}}
else:
result = {
dist.version: dist,
'urls': {dist.version: set([dist.source_url])},
'digests': {dist.version: set([None])}
}
return result
class AggregatingLocator(Locator):
"""
This class allows you to chain and/or merge a list of locators.
"""
def __init__(self, *locators, **kwargs):
"""
Initialise an instance.
:param locators: The list of locators to search.
:param kwargs: Passed to the superclass constructor,
except for:
* merge - if False (the default), the first successful
search from any of the locators is returned. If True,
the results from all locators are merged (this can be
slow).
"""
self.merge = kwargs.pop('merge', False)
self.locators = locators
super(AggregatingLocator, self).__init__(**kwargs)
def clear_cache(self):
super(AggregatingLocator, self).clear_cache()
for locator in self.locators:
locator.clear_cache()
def _set_scheme(self, value):
self._scheme = value
for locator in self.locators:
locator.scheme = value
scheme = property(Locator.scheme.fget, _set_scheme)
def _get_project(self, name):
result = {}
for locator in self.locators:
d = locator.get_project(name)
if d:
if self.merge:
files = result.get('urls', {})
digests = result.get('digests', {})
# next line could overwrite result['urls'], result['digests']
result.update(d)
df = result.get('urls')
if files and df:
for k, v in files.items():
if k in df:
df[k] |= v
else:
df[k] = v
dd = result.get('digests')
if digests and dd:
dd.update(digests)
else:
# See issue #18. If any dists are found and we're looking
# for specific constraints, we only return something if
# a match is found. For example, if a DirectoryLocator
# returns just foo (1.0) while we're looking for
# foo (>= 2.0), we'll pretend there was nothing there so
# that subsequent locators can be queried. Otherwise we
# would just return foo (1.0) which would then lead to a
# failure to find foo (>= 2.0), because other locators
# weren't searched. Note that this only matters when
# merge=False.
if self.matcher is None:
found = True
else:
found = False
for k in d:
if self.matcher.match(k):
found = True
break
if found:
result = d
break
return result
def get_distribution_names(self):
"""
Return all the distribution names known to this locator.
"""
result = set()
for locator in self.locators:
try:
result |= locator.get_distribution_names()
except NotImplementedError:
pass
return result
# We use a legacy scheme simply because most of the dists on PyPI use legacy
# versions which don't conform to PEP 440.
default_locator = AggregatingLocator(
# JSONLocator(), # don't use as PEP 426 is withdrawn
SimpleScrapingLocator('https://pypi.org/simple/',
timeout=3.0),
scheme='legacy')
locate = default_locator.locate
class DependencyFinder(object):
"""
Locate dependencies for distributions.
"""
def __init__(self, locator=None):
"""
Initialise an instance, using the specified locator
to locate distributions.
"""
self.locator = locator or default_locator
self.scheme = get_scheme(self.locator.scheme)
def add_distribution(self, dist):
"""
Add a distribution to the finder. This will update internal information
about who provides what.
:param dist: The distribution to add.
"""
logger.debug('adding distribution %s', dist)
name = dist.key
self.dists_by_name[name] = dist
self.dists[(name, dist.version)] = dist
for p in dist.provides:
name, version = parse_name_and_version(p)
logger.debug('Add to provided: %s, %s, %s', name, version, dist)
self.provided.setdefault(name, set()).add((version, dist))
def remove_distribution(self, dist):
"""
Remove a distribution from the finder. This will update internal
information about who provides what.
:param dist: The distribution to remove.
"""
logger.debug('removing distribution %s', dist)
name = dist.key
del self.dists_by_name[name]
del self.dists[(name, dist.version)]
for p in dist.provides:
name, version = parse_name_and_version(p)
logger.debug('Remove from provided: %s, %s, %s', name, version, dist)
s = self.provided[name]
s.remove((version, dist))
if not s:
del self.provided[name]
def get_matcher(self, reqt):
"""
Get a version matcher for a requirement.
:param reqt: The requirement
:type reqt: str
:return: A version matcher (an instance of
:class:`distlib.version.Matcher`).
"""
try:
matcher = self.scheme.matcher(reqt)
except UnsupportedVersionError: # pragma: no cover
# XXX compat-mode if cannot read the version
name = reqt.split()[0]
matcher = self.scheme.matcher(name)
return matcher
def find_providers(self, reqt):
"""
Find the distributions which can fulfill a requirement.
:param reqt: The requirement.
:type reqt: str
:return: A set of distribution which can fulfill the requirement.
"""
matcher = self.get_matcher(reqt)
name = matcher.key # case-insensitive
result = set()
provided = self.provided
if name in provided:
for version, provider in provided[name]:
try:
match = matcher.match(version)
except UnsupportedVersionError:
match = False
if match:
result.add(provider)
break
return result
def try_to_replace(self, provider, other, problems):
"""
Attempt to replace one provider with another. This is typically used
when resolving dependencies from multiple sources, e.g. A requires
(B >= 1.0) while C requires (B >= 1.1).
For successful replacement, ``provider`` must meet all the requirements
which ``other`` fulfills.
:param provider: The provider we are trying to replace with.
:param other: The provider we're trying to replace.
:param problems: If False is returned, this will contain what
problems prevented replacement. This is currently
a tuple of the literal string 'cantreplace',
``provider``, ``other`` and the set of requirements
that ``provider`` couldn't fulfill.
:return: True if we can replace ``other`` with ``provider``, else
False.
"""
rlist = self.reqts[other]
unmatched = set()
for s in rlist:
matcher = self.get_matcher(s)
if not matcher.match(provider.version):
unmatched.add(s)
if unmatched:
# can't replace other with provider
problems.add(('cantreplace', provider, other,
frozenset(unmatched)))
result = False
else:
# can replace other with provider
self.remove_distribution(other)
del self.reqts[other]
for s in rlist:
self.reqts.setdefault(provider, set()).add(s)
self.add_distribution(provider)
result = True
return result
def find(self, requirement, meta_extras=None, prereleases=False):
"""
Find a distribution and all distributions it depends on.
:param requirement: The requirement specifying the distribution to
find, or a Distribution instance.
:param meta_extras: A list of meta extras such as :test:, :build: and
so on.
:param prereleases: If ``True``, allow pre-release versions to be
returned - otherwise, don't return prereleases
unless they're all that's available.
Return a set of :class:`Distribution` instances and a set of
problems.
The distributions returned should be such that they have the
:attr:`required` attribute set to ``True`` if they were
from the ``requirement`` passed to ``find()``, and they have the
:attr:`build_time_dependency` attribute set to ``True`` unless they
are post-installation dependencies of the ``requirement``.
The problems should be a tuple consisting of the string
``'unsatisfied'`` and the requirement which couldn't be satisfied
by any distribution known to the locator.
"""
self.provided = {}
self.dists = {}
self.dists_by_name = {}
self.reqts = {}
meta_extras = set(meta_extras or [])
if ':*:' in meta_extras:
meta_extras.remove(':*:')
# :meta: and :run: are implicitly included
meta_extras |= set([':test:', ':build:', ':dev:'])
if isinstance(requirement, Distribution):
dist = odist = requirement
logger.debug('passed %s as requirement', odist)
else:
dist = odist = self.locator.locate(requirement,
prereleases=prereleases)
if dist is None:
raise DistlibException('Unable to locate %r' % requirement)
logger.debug('located %s', odist)
dist.requested = True
problems = set()
todo = set([dist])
install_dists = set([odist])
while todo:
dist = todo.pop()
name = dist.key # case-insensitive
if name not in self.dists_by_name:
self.add_distribution(dist)
else:
#import pdb; pdb.set_trace()
other = self.dists_by_name[name]
if other != dist:
self.try_to_replace(dist, other, problems)
ireqts = dist.run_requires | dist.meta_requires
sreqts = dist.build_requires
ereqts = set()
if meta_extras and dist in install_dists:
for key in ('test', 'build', 'dev'):
e = ':%s:' % key
if e in meta_extras:
ereqts |= getattr(dist, '%s_requires' % key)
all_reqts = ireqts | sreqts | ereqts
for r in all_reqts:
providers = self.find_providers(r)
if not providers:
logger.debug('No providers found for %r', r)
provider = self.locator.locate(r, prereleases=prereleases)
# If no provider is found and we didn't consider
# prereleases, consider them now.
if provider is None and not prereleases:
provider = self.locator.locate(r, prereleases=True)
if provider is None:
logger.debug('Cannot satisfy %r', r)
problems.add(('unsatisfied', r))
else:
n, v = provider.key, provider.version
if (n, v) not in self.dists:
todo.add(provider)
providers.add(provider)
if r in ireqts and dist in install_dists:
install_dists.add(provider)
logger.debug('Adding %s to install_dists',
provider.name_and_version)
for p in providers:
name = p.key
if name not in self.dists_by_name:
self.reqts.setdefault(p, set()).add(r)
else:
other = self.dists_by_name[name]
if other != p:
# see if other can be replaced by p
self.try_to_replace(p, other, problems)
dists = set(self.dists.values())
for dist in dists:
dist.build_time_dependency = dist not in install_dists
if dist.build_time_dependency:
logger.debug('%s is a build-time dependency only.',
dist.name_and_version)
logger.debug('find done for %s', odist)
return dists, problems
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/distlib/locators.py
|
Python
|
mit
| 51,991 |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2013 Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
"""
Class representing the list of files in a distribution.
Equivalent to distutils.filelist, but fixes some problems.
"""
import fnmatch
import logging
import os
import re
import sys
from . import DistlibException
from .compat import fsdecode
from .util import convert_path
__all__ = ['Manifest']
logger = logging.getLogger(__name__)
# a \ followed by some spaces + EOL
_COLLAPSE_PATTERN = re.compile('\\\\w*\n', re.M)
_COMMENTED_LINE = re.compile('#.*?(?=\n)|\n(?=$)', re.M | re.S)
#
# Due to the different results returned by fnmatch.translate, we need
# to do slightly different processing for Python 2.7 and 3.2 ... this needed
# to be brought in for Python 3.6 onwards.
#
_PYTHON_VERSION = sys.version_info[:2]
class Manifest(object):
"""A list of files built by on exploring the filesystem and filtered by
applying various patterns to what we find there.
"""
def __init__(self, base=None):
"""
Initialise an instance.
:param base: The base directory to explore under.
"""
self.base = os.path.abspath(os.path.normpath(base or os.getcwd()))
self.prefix = self.base + os.sep
self.allfiles = None
self.files = set()
#
# Public API
#
def findall(self):
"""Find all files under the base and set ``allfiles`` to the absolute
pathnames of files found.
"""
from stat import S_ISREG, S_ISDIR, S_ISLNK
self.allfiles = allfiles = []
root = self.base
stack = [root]
pop = stack.pop
push = stack.append
while stack:
root = pop()
names = os.listdir(root)
for name in names:
fullname = os.path.join(root, name)
# Avoid excess stat calls -- just one will do, thank you!
stat = os.stat(fullname)
mode = stat.st_mode
if S_ISREG(mode):
allfiles.append(fsdecode(fullname))
elif S_ISDIR(mode) and not S_ISLNK(mode):
push(fullname)
def add(self, item):
"""
Add a file to the manifest.
:param item: The pathname to add. This can be relative to the base.
"""
if not item.startswith(self.prefix):
item = os.path.join(self.base, item)
self.files.add(os.path.normpath(item))
def add_many(self, items):
"""
Add a list of files to the manifest.
:param items: The pathnames to add. These can be relative to the base.
"""
for item in items:
self.add(item)
def sorted(self, wantdirs=False):
"""
Return sorted files in directory order
"""
def add_dir(dirs, d):
dirs.add(d)
logger.debug('add_dir added %s', d)
if d != self.base:
parent, _ = os.path.split(d)
assert parent not in ('', '/')
add_dir(dirs, parent)
result = set(self.files) # make a copy!
if wantdirs:
dirs = set()
for f in result:
add_dir(dirs, os.path.dirname(f))
result |= dirs
return [os.path.join(*path_tuple) for path_tuple in
sorted(os.path.split(path) for path in result)]
def clear(self):
"""Clear all collected files."""
self.files = set()
self.allfiles = []
def process_directive(self, directive):
"""
Process a directive which either adds some files from ``allfiles`` to
``files``, or removes some files from ``files``.
:param directive: The directive to process. This should be in a format
compatible with distutils ``MANIFEST.in`` files:
http://docs.python.org/distutils/sourcedist.html#commands
"""
# Parse the line: split it up, make sure the right number of words
# is there, and return the relevant words. 'action' is always
# defined: it's the first word of the line. Which of the other
# three are defined depends on the action; it'll be either
# patterns, (dir and patterns), or (dirpattern).
action, patterns, thedir, dirpattern = self._parse_directive(directive)
# OK, now we know that the action is valid and we have the
# right number of words on the line for that action -- so we
# can proceed with minimal error-checking.
if action == 'include':
for pattern in patterns:
if not self._include_pattern(pattern, anchor=True):
logger.warning('no files found matching %r', pattern)
elif action == 'exclude':
for pattern in patterns:
found = self._exclude_pattern(pattern, anchor=True)
#if not found:
# logger.warning('no previously-included files '
# 'found matching %r', pattern)
elif action == 'global-include':
for pattern in patterns:
if not self._include_pattern(pattern, anchor=False):
logger.warning('no files found matching %r '
'anywhere in distribution', pattern)
elif action == 'global-exclude':
for pattern in patterns:
found = self._exclude_pattern(pattern, anchor=False)
#if not found:
# logger.warning('no previously-included files '
# 'matching %r found anywhere in '
# 'distribution', pattern)
elif action == 'recursive-include':
for pattern in patterns:
if not self._include_pattern(pattern, prefix=thedir):
logger.warning('no files found matching %r '
'under directory %r', pattern, thedir)
elif action == 'recursive-exclude':
for pattern in patterns:
found = self._exclude_pattern(pattern, prefix=thedir)
#if not found:
# logger.warning('no previously-included files '
# 'matching %r found under directory %r',
# pattern, thedir)
elif action == 'graft':
if not self._include_pattern(None, prefix=dirpattern):
logger.warning('no directories found matching %r',
dirpattern)
elif action == 'prune':
if not self._exclude_pattern(None, prefix=dirpattern):
logger.warning('no previously-included directories found '
'matching %r', dirpattern)
else: # pragma: no cover
# This should never happen, as it should be caught in
# _parse_template_line
raise DistlibException(
'invalid action %r' % action)
#
# Private API
#
def _parse_directive(self, directive):
"""
Validate a directive.
:param directive: The directive to validate.
:return: A tuple of action, patterns, thedir, dir_patterns
"""
words = directive.split()
if len(words) == 1 and words[0] not in ('include', 'exclude',
'global-include',
'global-exclude',
'recursive-include',
'recursive-exclude',
'graft', 'prune'):
# no action given, let's use the default 'include'
words.insert(0, 'include')
action = words[0]
patterns = thedir = dir_pattern = None
if action in ('include', 'exclude',
'global-include', 'global-exclude'):
if len(words) < 2:
raise DistlibException(
'%r expects <pattern1> <pattern2> ...' % action)
patterns = [convert_path(word) for word in words[1:]]
elif action in ('recursive-include', 'recursive-exclude'):
if len(words) < 3:
raise DistlibException(
'%r expects <dir> <pattern1> <pattern2> ...' % action)
thedir = convert_path(words[1])
patterns = [convert_path(word) for word in words[2:]]
elif action in ('graft', 'prune'):
if len(words) != 2:
raise DistlibException(
'%r expects a single <dir_pattern>' % action)
dir_pattern = convert_path(words[1])
else:
raise DistlibException('unknown action %r' % action)
return action, patterns, thedir, dir_pattern
def _include_pattern(self, pattern, anchor=True, prefix=None,
is_regex=False):
"""Select strings (presumably filenames) from 'self.files' that
match 'pattern', a Unix-style wildcard (glob) pattern.
Patterns are not quite the same as implemented by the 'fnmatch'
module: '*' and '?' match non-special characters, where "special"
is platform-dependent: slash on Unix; colon, slash, and backslash on
DOS/Windows; and colon on Mac OS.
If 'anchor' is true (the default), then the pattern match is more
stringent: "*.py" will match "foo.py" but not "foo/bar.py". If
'anchor' is false, both of these will match.
If 'prefix' is supplied, then only filenames starting with 'prefix'
(itself a pattern) and ending with 'pattern', with anything in between
them, will match. 'anchor' is ignored in this case.
If 'is_regex' is true, 'anchor' and 'prefix' are ignored, and
'pattern' is assumed to be either a string containing a regex or a
regex object -- no translation is done, the regex is just compiled
and used as-is.
Selected strings will be added to self.files.
Return True if files are found.
"""
# XXX docstring lying about what the special chars are?
found = False
pattern_re = self._translate_pattern(pattern, anchor, prefix, is_regex)
# delayed loading of allfiles list
if self.allfiles is None:
self.findall()
for name in self.allfiles:
if pattern_re.search(name):
self.files.add(name)
found = True
return found
def _exclude_pattern(self, pattern, anchor=True, prefix=None,
is_regex=False):
"""Remove strings (presumably filenames) from 'files' that match
'pattern'.
Other parameters are the same as for 'include_pattern()', above.
The list 'self.files' is modified in place. Return True if files are
found.
This API is public to allow e.g. exclusion of SCM subdirs, e.g. when
packaging source distributions
"""
found = False
pattern_re = self._translate_pattern(pattern, anchor, prefix, is_regex)
for f in list(self.files):
if pattern_re.search(f):
self.files.remove(f)
found = True
return found
def _translate_pattern(self, pattern, anchor=True, prefix=None,
is_regex=False):
"""Translate a shell-like wildcard pattern to a compiled regular
expression.
Return the compiled regex. If 'is_regex' true,
then 'pattern' is directly compiled to a regex (if it's a string)
or just returned as-is (assumes it's a regex object).
"""
if is_regex:
if isinstance(pattern, str):
return re.compile(pattern)
else:
return pattern
if _PYTHON_VERSION > (3, 2):
# ditch start and end characters
start, _, end = self._glob_to_re('_').partition('_')
if pattern:
pattern_re = self._glob_to_re(pattern)
if _PYTHON_VERSION > (3, 2):
assert pattern_re.startswith(start) and pattern_re.endswith(end)
else:
pattern_re = ''
base = re.escape(os.path.join(self.base, ''))
if prefix is not None:
# ditch end of pattern character
if _PYTHON_VERSION <= (3, 2):
empty_pattern = self._glob_to_re('')
prefix_re = self._glob_to_re(prefix)[:-len(empty_pattern)]
else:
prefix_re = self._glob_to_re(prefix)
assert prefix_re.startswith(start) and prefix_re.endswith(end)
prefix_re = prefix_re[len(start): len(prefix_re) - len(end)]
sep = os.sep
if os.sep == '\\':
sep = r'\\'
if _PYTHON_VERSION <= (3, 2):
pattern_re = '^' + base + sep.join((prefix_re,
'.*' + pattern_re))
else:
pattern_re = pattern_re[len(start): len(pattern_re) - len(end)]
pattern_re = r'%s%s%s%s.*%s%s' % (start, base, prefix_re, sep,
pattern_re, end)
else: # no prefix -- respect anchor flag
if anchor:
if _PYTHON_VERSION <= (3, 2):
pattern_re = '^' + base + pattern_re
else:
pattern_re = r'%s%s%s' % (start, base, pattern_re[len(start):])
return re.compile(pattern_re)
def _glob_to_re(self, pattern):
"""Translate a shell-like glob pattern to a regular expression.
Return a string containing the regex. Differs from
'fnmatch.translate()' in that '*' does not match "special characters"
(which are platform-specific).
"""
pattern_re = fnmatch.translate(pattern)
# '?' and '*' in the glob pattern become '.' and '.*' in the RE, which
# IMHO is wrong -- '?' and '*' aren't supposed to match slash in Unix,
# and by extension they shouldn't match such "special characters" under
# any OS. So change all non-escaped dots in the RE to match any
# character except the special characters (currently: just os.sep).
sep = os.sep
if os.sep == '\\':
# we're using a regex to manipulate a regex, so we need
# to escape the backslash twice
sep = r'\\\\'
escaped = r'\1[^%s]' % sep
pattern_re = re.sub(r'((?<!\\)(\\\\)*)\.', escaped, pattern_re)
return pattern_re
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/distlib/manifest.py
|
Python
|
mit
| 14,811 |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2017 Vinay Sajip.
# Licensed to the Python Software Foundation under a contributor agreement.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
"""
Parser for the environment markers micro-language defined in PEP 508.
"""
# Note: In PEP 345, the micro-language was Python compatible, so the ast
# module could be used to parse it. However, PEP 508 introduced operators such
# as ~= and === which aren't in Python, necessitating a different approach.
import os
import re
import sys
import platform
from .compat import string_types
from .util import in_venv, parse_marker
from .version import NormalizedVersion as NV
__all__ = ['interpret']
_VERSION_PATTERN = re.compile(r'((\d+(\.\d+)*\w*)|\'(\d+(\.\d+)*\w*)\'|\"(\d+(\.\d+)*\w*)\")')
def _is_literal(o):
if not isinstance(o, string_types) or not o:
return False
return o[0] in '\'"'
def _get_versions(s):
result = []
for m in _VERSION_PATTERN.finditer(s):
result.append(NV(m.groups()[0]))
return set(result)
class Evaluator(object):
"""
This class is used to evaluate marker expessions.
"""
operations = {
'==': lambda x, y: x == y,
'===': lambda x, y: x == y,
'~=': lambda x, y: x == y or x > y,
'!=': lambda x, y: x != y,
'<': lambda x, y: x < y,
'<=': lambda x, y: x == y or x < y,
'>': lambda x, y: x > y,
'>=': lambda x, y: x == y or x > y,
'and': lambda x, y: x and y,
'or': lambda x, y: x or y,
'in': lambda x, y: x in y,
'not in': lambda x, y: x not in y,
}
def evaluate(self, expr, context):
"""
Evaluate a marker expression returned by the :func:`parse_requirement`
function in the specified context.
"""
if isinstance(expr, string_types):
if expr[0] in '\'"':
result = expr[1:-1]
else:
if expr not in context:
raise SyntaxError('unknown variable: %s' % expr)
result = context[expr]
else:
assert isinstance(expr, dict)
op = expr['op']
if op not in self.operations:
raise NotImplementedError('op not implemented: %s' % op)
elhs = expr['lhs']
erhs = expr['rhs']
if _is_literal(expr['lhs']) and _is_literal(expr['rhs']):
raise SyntaxError('invalid comparison: %s %s %s' % (elhs, op, erhs))
lhs = self.evaluate(elhs, context)
rhs = self.evaluate(erhs, context)
if ((elhs == 'python_version' or erhs == 'python_version') and
op in ('<', '<=', '>', '>=', '===', '==', '!=', '~=')):
lhs = NV(lhs)
rhs = NV(rhs)
elif elhs == 'python_version' and op in ('in', 'not in'):
lhs = NV(lhs)
rhs = _get_versions(rhs)
result = self.operations[op](lhs, rhs)
return result
_DIGITS = re.compile(r'\d+\.\d+')
def default_context():
def format_full_version(info):
version = '%s.%s.%s' % (info.major, info.minor, info.micro)
kind = info.releaselevel
if kind != 'final':
version += kind[0] + str(info.serial)
return version
if hasattr(sys, 'implementation'):
implementation_version = format_full_version(sys.implementation.version)
implementation_name = sys.implementation.name
else:
implementation_version = '0'
implementation_name = ''
ppv = platform.python_version()
m = _DIGITS.match(ppv)
pv = m.group(0)
result = {
'implementation_name': implementation_name,
'implementation_version': implementation_version,
'os_name': os.name,
'platform_machine': platform.machine(),
'platform_python_implementation': platform.python_implementation(),
'platform_release': platform.release(),
'platform_system': platform.system(),
'platform_version': platform.version(),
'platform_in_venv': str(in_venv()),
'python_full_version': ppv,
'python_version': pv,
'sys_platform': sys.platform,
}
return result
DEFAULT_CONTEXT = default_context()
del default_context
evaluator = Evaluator()
def interpret(marker, execution_context=None):
"""
Interpret a marker and return a result depending on environment.
:param marker: The marker to interpret.
:type marker: str
:param execution_context: The context used for name lookup.
:type execution_context: mapping
"""
try:
expr, rest = parse_marker(marker)
except Exception as e:
raise SyntaxError('Unable to interpret marker syntax: %s: %s' % (marker, e))
if rest and rest[0] != '#':
raise SyntaxError('unexpected trailing data in marker: %s: %s' % (marker, rest))
context = dict(DEFAULT_CONTEXT)
if execution_context:
context.update(execution_context)
return evaluator.evaluate(expr, context)
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/distlib/markers.py
|
Python
|
mit
| 5,058 |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2012 The Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
"""Implementation of the Metadata for Python packages PEPs.
Supports all metadata formats (1.0, 1.1, 1.2, 1.3/2.1 and 2.2).
"""
from __future__ import unicode_literals
import codecs
from email import message_from_file
import json
import logging
import re
from . import DistlibException, __version__
from .compat import StringIO, string_types, text_type
from .markers import interpret
from .util import extract_by_key, get_extras
from .version import get_scheme, PEP440_VERSION_RE
logger = logging.getLogger(__name__)
class MetadataMissingError(DistlibException):
"""A required metadata is missing"""
class MetadataConflictError(DistlibException):
"""Attempt to read or write metadata fields that are conflictual."""
class MetadataUnrecognizedVersionError(DistlibException):
"""Unknown metadata version number."""
class MetadataInvalidError(DistlibException):
"""A metadata value is invalid"""
# public API of this module
__all__ = ['Metadata', 'PKG_INFO_ENCODING', 'PKG_INFO_PREFERRED_VERSION']
# Encoding used for the PKG-INFO files
PKG_INFO_ENCODING = 'utf-8'
# preferred version. Hopefully will be changed
# to 1.2 once PEP 345 is supported everywhere
PKG_INFO_PREFERRED_VERSION = '1.1'
_LINE_PREFIX_1_2 = re.compile('\n \\|')
_LINE_PREFIX_PRE_1_2 = re.compile('\n ')
_241_FIELDS = ('Metadata-Version', 'Name', 'Version', 'Platform',
'Summary', 'Description',
'Keywords', 'Home-page', 'Author', 'Author-email',
'License')
_314_FIELDS = ('Metadata-Version', 'Name', 'Version', 'Platform',
'Supported-Platform', 'Summary', 'Description',
'Keywords', 'Home-page', 'Author', 'Author-email',
'License', 'Classifier', 'Download-URL', 'Obsoletes',
'Provides', 'Requires')
_314_MARKERS = ('Obsoletes', 'Provides', 'Requires', 'Classifier',
'Download-URL')
_345_FIELDS = ('Metadata-Version', 'Name', 'Version', 'Platform',
'Supported-Platform', 'Summary', 'Description',
'Keywords', 'Home-page', 'Author', 'Author-email',
'Maintainer', 'Maintainer-email', 'License',
'Classifier', 'Download-URL', 'Obsoletes-Dist',
'Project-URL', 'Provides-Dist', 'Requires-Dist',
'Requires-Python', 'Requires-External')
_345_MARKERS = ('Provides-Dist', 'Requires-Dist', 'Requires-Python',
'Obsoletes-Dist', 'Requires-External', 'Maintainer',
'Maintainer-email', 'Project-URL')
_426_FIELDS = ('Metadata-Version', 'Name', 'Version', 'Platform',
'Supported-Platform', 'Summary', 'Description',
'Keywords', 'Home-page', 'Author', 'Author-email',
'Maintainer', 'Maintainer-email', 'License',
'Classifier', 'Download-URL', 'Obsoletes-Dist',
'Project-URL', 'Provides-Dist', 'Requires-Dist',
'Requires-Python', 'Requires-External', 'Private-Version',
'Obsoleted-By', 'Setup-Requires-Dist', 'Extension',
'Provides-Extra')
_426_MARKERS = ('Private-Version', 'Provides-Extra', 'Obsoleted-By',
'Setup-Requires-Dist', 'Extension')
# See issue #106: Sometimes 'Requires' and 'Provides' occur wrongly in
# the metadata. Include them in the tuple literal below to allow them
# (for now).
# Ditto for Obsoletes - see issue #140.
_566_FIELDS = _426_FIELDS + ('Description-Content-Type',
'Requires', 'Provides', 'Obsoletes')
_566_MARKERS = ('Description-Content-Type',)
_643_MARKERS = ('Dynamic', 'License-File')
_643_FIELDS = _566_FIELDS + _643_MARKERS
_ALL_FIELDS = set()
_ALL_FIELDS.update(_241_FIELDS)
_ALL_FIELDS.update(_314_FIELDS)
_ALL_FIELDS.update(_345_FIELDS)
_ALL_FIELDS.update(_426_FIELDS)
_ALL_FIELDS.update(_566_FIELDS)
_ALL_FIELDS.update(_643_FIELDS)
EXTRA_RE = re.compile(r'''extra\s*==\s*("([^"]+)"|'([^']+)')''')
def _version2fieldlist(version):
if version == '1.0':
return _241_FIELDS
elif version == '1.1':
return _314_FIELDS
elif version == '1.2':
return _345_FIELDS
elif version in ('1.3', '2.1'):
# avoid adding field names if already there
return _345_FIELDS + tuple(f for f in _566_FIELDS if f not in _345_FIELDS)
elif version == '2.0':
raise ValueError('Metadata 2.0 is withdrawn and not supported')
# return _426_FIELDS
elif version == '2.2':
return _643_FIELDS
raise MetadataUnrecognizedVersionError(version)
def _best_version(fields):
"""Detect the best version depending on the fields used."""
def _has_marker(keys, markers):
for marker in markers:
if marker in keys:
return True
return False
keys = []
for key, value in fields.items():
if value in ([], 'UNKNOWN', None):
continue
keys.append(key)
possible_versions = ['1.0', '1.1', '1.2', '1.3', '2.1', '2.2'] # 2.0 removed
# first let's try to see if a field is not part of one of the version
for key in keys:
if key not in _241_FIELDS and '1.0' in possible_versions:
possible_versions.remove('1.0')
logger.debug('Removed 1.0 due to %s', key)
if key not in _314_FIELDS and '1.1' in possible_versions:
possible_versions.remove('1.1')
logger.debug('Removed 1.1 due to %s', key)
if key not in _345_FIELDS and '1.2' in possible_versions:
possible_versions.remove('1.2')
logger.debug('Removed 1.2 due to %s', key)
if key not in _566_FIELDS and '1.3' in possible_versions:
possible_versions.remove('1.3')
logger.debug('Removed 1.3 due to %s', key)
if key not in _566_FIELDS and '2.1' in possible_versions:
if key != 'Description': # In 2.1, description allowed after headers
possible_versions.remove('2.1')
logger.debug('Removed 2.1 due to %s', key)
if key not in _643_FIELDS and '2.2' in possible_versions:
possible_versions.remove('2.2')
logger.debug('Removed 2.2 due to %s', key)
# if key not in _426_FIELDS and '2.0' in possible_versions:
# possible_versions.remove('2.0')
# logger.debug('Removed 2.0 due to %s', key)
# possible_version contains qualified versions
if len(possible_versions) == 1:
return possible_versions[0] # found !
elif len(possible_versions) == 0:
logger.debug('Out of options - unknown metadata set: %s', fields)
raise MetadataConflictError('Unknown metadata set')
# let's see if one unique marker is found
is_1_1 = '1.1' in possible_versions and _has_marker(keys, _314_MARKERS)
is_1_2 = '1.2' in possible_versions and _has_marker(keys, _345_MARKERS)
is_2_1 = '2.1' in possible_versions and _has_marker(keys, _566_MARKERS)
# is_2_0 = '2.0' in possible_versions and _has_marker(keys, _426_MARKERS)
is_2_2 = '2.2' in possible_versions and _has_marker(keys, _643_MARKERS)
if int(is_1_1) + int(is_1_2) + int(is_2_1) + int(is_2_2) > 1:
raise MetadataConflictError('You used incompatible 1.1/1.2/2.1/2.2 fields')
# we have the choice, 1.0, or 1.2, 2.1 or 2.2
# - 1.0 has a broken Summary field but works with all tools
# - 1.1 is to avoid
# - 1.2 fixes Summary but has little adoption
# - 2.1 adds more features
# - 2.2 is the latest
if not is_1_1 and not is_1_2 and not is_2_1 and not is_2_2:
# we couldn't find any specific marker
if PKG_INFO_PREFERRED_VERSION in possible_versions:
return PKG_INFO_PREFERRED_VERSION
if is_1_1:
return '1.1'
if is_1_2:
return '1.2'
if is_2_1:
return '2.1'
# if is_2_2:
# return '2.2'
return '2.2'
# This follows the rules about transforming keys as described in
# https://www.python.org/dev/peps/pep-0566/#id17
_ATTR2FIELD = {
name.lower().replace("-", "_"): name for name in _ALL_FIELDS
}
_FIELD2ATTR = {field: attr for attr, field in _ATTR2FIELD.items()}
_PREDICATE_FIELDS = ('Requires-Dist', 'Obsoletes-Dist', 'Provides-Dist')
_VERSIONS_FIELDS = ('Requires-Python',)
_VERSION_FIELDS = ('Version',)
_LISTFIELDS = ('Platform', 'Classifier', 'Obsoletes',
'Requires', 'Provides', 'Obsoletes-Dist',
'Provides-Dist', 'Requires-Dist', 'Requires-External',
'Project-URL', 'Supported-Platform', 'Setup-Requires-Dist',
'Provides-Extra', 'Extension', 'License-File')
_LISTTUPLEFIELDS = ('Project-URL',)
_ELEMENTSFIELD = ('Keywords',)
_UNICODEFIELDS = ('Author', 'Maintainer', 'Summary', 'Description')
_MISSING = object()
_FILESAFE = re.compile('[^A-Za-z0-9.]+')
def _get_name_and_version(name, version, for_filename=False):
"""Return the distribution name with version.
If for_filename is true, return a filename-escaped form."""
if for_filename:
# For both name and version any runs of non-alphanumeric or '.'
# characters are replaced with a single '-'. Additionally any
# spaces in the version string become '.'
name = _FILESAFE.sub('-', name)
version = _FILESAFE.sub('-', version.replace(' ', '.'))
return '%s-%s' % (name, version)
class LegacyMetadata(object):
"""The legacy metadata of a release.
Supports versions 1.0, 1.1, 1.2, 2.0 and 1.3/2.1 (auto-detected). You can
instantiate the class with one of these arguments (or none):
- *path*, the path to a metadata file
- *fileobj* give a file-like object with metadata as content
- *mapping* is a dict-like object
- *scheme* is a version scheme name
"""
# TODO document the mapping API and UNKNOWN default key
def __init__(self, path=None, fileobj=None, mapping=None,
scheme='default'):
if [path, fileobj, mapping].count(None) < 2:
raise TypeError('path, fileobj and mapping are exclusive')
self._fields = {}
self.requires_files = []
self._dependencies = None
self.scheme = scheme
if path is not None:
self.read(path)
elif fileobj is not None:
self.read_file(fileobj)
elif mapping is not None:
self.update(mapping)
self.set_metadata_version()
def set_metadata_version(self):
self._fields['Metadata-Version'] = _best_version(self._fields)
def _write_field(self, fileobj, name, value):
fileobj.write('%s: %s\n' % (name, value))
def __getitem__(self, name):
return self.get(name)
def __setitem__(self, name, value):
return self.set(name, value)
def __delitem__(self, name):
field_name = self._convert_name(name)
try:
del self._fields[field_name]
except KeyError:
raise KeyError(name)
def __contains__(self, name):
return (name in self._fields or
self._convert_name(name) in self._fields)
def _convert_name(self, name):
if name in _ALL_FIELDS:
return name
name = name.replace('-', '_').lower()
return _ATTR2FIELD.get(name, name)
def _default_value(self, name):
if name in _LISTFIELDS or name in _ELEMENTSFIELD:
return []
return 'UNKNOWN'
def _remove_line_prefix(self, value):
if self.metadata_version in ('1.0', '1.1'):
return _LINE_PREFIX_PRE_1_2.sub('\n', value)
else:
return _LINE_PREFIX_1_2.sub('\n', value)
def __getattr__(self, name):
if name in _ATTR2FIELD:
return self[name]
raise AttributeError(name)
#
# Public API
#
# dependencies = property(_get_dependencies, _set_dependencies)
def get_fullname(self, filesafe=False):
"""Return the distribution name with version.
If filesafe is true, return a filename-escaped form."""
return _get_name_and_version(self['Name'], self['Version'], filesafe)
def is_field(self, name):
"""return True if name is a valid metadata key"""
name = self._convert_name(name)
return name in _ALL_FIELDS
def is_multi_field(self, name):
name = self._convert_name(name)
return name in _LISTFIELDS
def read(self, filepath):
"""Read the metadata values from a file path."""
fp = codecs.open(filepath, 'r', encoding='utf-8')
try:
self.read_file(fp)
finally:
fp.close()
def read_file(self, fileob):
"""Read the metadata values from a file object."""
msg = message_from_file(fileob)
self._fields['Metadata-Version'] = msg['metadata-version']
# When reading, get all the fields we can
for field in _ALL_FIELDS:
if field not in msg:
continue
if field in _LISTFIELDS:
# we can have multiple lines
values = msg.get_all(field)
if field in _LISTTUPLEFIELDS and values is not None:
values = [tuple(value.split(',')) for value in values]
self.set(field, values)
else:
# single line
value = msg[field]
if value is not None and value != 'UNKNOWN':
self.set(field, value)
# PEP 566 specifies that the body be used for the description, if
# available
body = msg.get_payload()
self["Description"] = body if body else self["Description"]
# logger.debug('Attempting to set metadata for %s', self)
# self.set_metadata_version()
def write(self, filepath, skip_unknown=False):
"""Write the metadata fields to filepath."""
fp = codecs.open(filepath, 'w', encoding='utf-8')
try:
self.write_file(fp, skip_unknown)
finally:
fp.close()
def write_file(self, fileobject, skip_unknown=False):
"""Write the PKG-INFO format data to a file object."""
self.set_metadata_version()
for field in _version2fieldlist(self['Metadata-Version']):
values = self.get(field)
if skip_unknown and values in ('UNKNOWN', [], ['UNKNOWN']):
continue
if field in _ELEMENTSFIELD:
self._write_field(fileobject, field, ','.join(values))
continue
if field not in _LISTFIELDS:
if field == 'Description':
if self.metadata_version in ('1.0', '1.1'):
values = values.replace('\n', '\n ')
else:
values = values.replace('\n', '\n |')
values = [values]
if field in _LISTTUPLEFIELDS:
values = [','.join(value) for value in values]
for value in values:
self._write_field(fileobject, field, value)
def update(self, other=None, **kwargs):
"""Set metadata values from the given iterable `other` and kwargs.
Behavior is like `dict.update`: If `other` has a ``keys`` method,
they are looped over and ``self[key]`` is assigned ``other[key]``.
Else, ``other`` is an iterable of ``(key, value)`` iterables.
Keys that don't match a metadata field or that have an empty value are
dropped.
"""
def _set(key, value):
if key in _ATTR2FIELD and value:
self.set(self._convert_name(key), value)
if not other:
# other is None or empty container
pass
elif hasattr(other, 'keys'):
for k in other.keys():
_set(k, other[k])
else:
for k, v in other:
_set(k, v)
if kwargs:
for k, v in kwargs.items():
_set(k, v)
def set(self, name, value):
"""Control then set a metadata field."""
name = self._convert_name(name)
if ((name in _ELEMENTSFIELD or name == 'Platform') and
not isinstance(value, (list, tuple))):
if isinstance(value, string_types):
value = [v.strip() for v in value.split(',')]
else:
value = []
elif (name in _LISTFIELDS and
not isinstance(value, (list, tuple))):
if isinstance(value, string_types):
value = [value]
else:
value = []
if logger.isEnabledFor(logging.WARNING):
project_name = self['Name']
scheme = get_scheme(self.scheme)
if name in _PREDICATE_FIELDS and value is not None:
for v in value:
# check that the values are valid
if not scheme.is_valid_matcher(v.split(';')[0]):
logger.warning(
"'%s': '%s' is not valid (field '%s')",
project_name, v, name)
# FIXME this rejects UNKNOWN, is that right?
elif name in _VERSIONS_FIELDS and value is not None:
if not scheme.is_valid_constraint_list(value):
logger.warning("'%s': '%s' is not a valid version (field '%s')",
project_name, value, name)
elif name in _VERSION_FIELDS and value is not None:
if not scheme.is_valid_version(value):
logger.warning("'%s': '%s' is not a valid version (field '%s')",
project_name, value, name)
if name in _UNICODEFIELDS:
if name == 'Description':
value = self._remove_line_prefix(value)
self._fields[name] = value
def get(self, name, default=_MISSING):
"""Get a metadata field."""
name = self._convert_name(name)
if name not in self._fields:
if default is _MISSING:
default = self._default_value(name)
return default
if name in _UNICODEFIELDS:
value = self._fields[name]
return value
elif name in _LISTFIELDS:
value = self._fields[name]
if value is None:
return []
res = []
for val in value:
if name not in _LISTTUPLEFIELDS:
res.append(val)
else:
# That's for Project-URL
res.append((val[0], val[1]))
return res
elif name in _ELEMENTSFIELD:
value = self._fields[name]
if isinstance(value, string_types):
return value.split(',')
return self._fields[name]
def check(self, strict=False):
"""Check if the metadata is compliant. If strict is True then raise if
no Name or Version are provided"""
self.set_metadata_version()
# XXX should check the versions (if the file was loaded)
missing, warnings = [], []
for attr in ('Name', 'Version'): # required by PEP 345
if attr not in self:
missing.append(attr)
if strict and missing != []:
msg = 'missing required metadata: %s' % ', '.join(missing)
raise MetadataMissingError(msg)
for attr in ('Home-page', 'Author'):
if attr not in self:
missing.append(attr)
# checking metadata 1.2 (XXX needs to check 1.1, 1.0)
if self['Metadata-Version'] != '1.2':
return missing, warnings
scheme = get_scheme(self.scheme)
def are_valid_constraints(value):
for v in value:
if not scheme.is_valid_matcher(v.split(';')[0]):
return False
return True
for fields, controller in ((_PREDICATE_FIELDS, are_valid_constraints),
(_VERSIONS_FIELDS,
scheme.is_valid_constraint_list),
(_VERSION_FIELDS,
scheme.is_valid_version)):
for field in fields:
value = self.get(field, None)
if value is not None and not controller(value):
warnings.append("Wrong value for '%s': %s" % (field, value))
return missing, warnings
def todict(self, skip_missing=False):
"""Return fields as a dict.
Field names will be converted to use the underscore-lowercase style
instead of hyphen-mixed case (i.e. home_page instead of Home-page).
This is as per https://www.python.org/dev/peps/pep-0566/#id17.
"""
self.set_metadata_version()
fields = _version2fieldlist(self['Metadata-Version'])
data = {}
for field_name in fields:
if not skip_missing or field_name in self._fields:
key = _FIELD2ATTR[field_name]
if key != 'project_url':
data[key] = self[field_name]
else:
data[key] = [','.join(u) for u in self[field_name]]
return data
def add_requirements(self, requirements):
if self['Metadata-Version'] == '1.1':
# we can't have 1.1 metadata *and* Setuptools requires
for field in ('Obsoletes', 'Requires', 'Provides'):
if field in self:
del self[field]
self['Requires-Dist'] += requirements
# Mapping API
# TODO could add iter* variants
def keys(self):
return list(_version2fieldlist(self['Metadata-Version']))
def __iter__(self):
for key in self.keys():
yield key
def values(self):
return [self[key] for key in self.keys()]
def items(self):
return [(key, self[key]) for key in self.keys()]
def __repr__(self):
return '<%s %s %s>' % (self.__class__.__name__, self.name,
self.version)
METADATA_FILENAME = 'pydist.json'
WHEEL_METADATA_FILENAME = 'metadata.json'
LEGACY_METADATA_FILENAME = 'METADATA'
class Metadata(object):
"""
The metadata of a release. This implementation uses 2.1
metadata where possible. If not possible, it wraps a LegacyMetadata
instance which handles the key-value metadata format.
"""
METADATA_VERSION_MATCHER = re.compile(r'^\d+(\.\d+)*$')
NAME_MATCHER = re.compile('^[0-9A-Z]([0-9A-Z_.-]*[0-9A-Z])?$', re.I)
FIELDNAME_MATCHER = re.compile('^[A-Z]([0-9A-Z-]*[0-9A-Z])?$', re.I)
VERSION_MATCHER = PEP440_VERSION_RE
SUMMARY_MATCHER = re.compile('.{1,2047}')
METADATA_VERSION = '2.0'
GENERATOR = 'distlib (%s)' % __version__
MANDATORY_KEYS = {
'name': (),
'version': (),
'summary': ('legacy',),
}
INDEX_KEYS = ('name version license summary description author '
'author_email keywords platform home_page classifiers '
'download_url')
DEPENDENCY_KEYS = ('extras run_requires test_requires build_requires '
'dev_requires provides meta_requires obsoleted_by '
'supports_environments')
SYNTAX_VALIDATORS = {
'metadata_version': (METADATA_VERSION_MATCHER, ()),
'name': (NAME_MATCHER, ('legacy',)),
'version': (VERSION_MATCHER, ('legacy',)),
'summary': (SUMMARY_MATCHER, ('legacy',)),
'dynamic': (FIELDNAME_MATCHER, ('legacy',)),
}
__slots__ = ('_legacy', '_data', 'scheme')
def __init__(self, path=None, fileobj=None, mapping=None,
scheme='default'):
if [path, fileobj, mapping].count(None) < 2:
raise TypeError('path, fileobj and mapping are exclusive')
self._legacy = None
self._data = None
self.scheme = scheme
#import pdb; pdb.set_trace()
if mapping is not None:
try:
self._validate_mapping(mapping, scheme)
self._data = mapping
except MetadataUnrecognizedVersionError:
self._legacy = LegacyMetadata(mapping=mapping, scheme=scheme)
self.validate()
else:
data = None
if path:
with open(path, 'rb') as f:
data = f.read()
elif fileobj:
data = fileobj.read()
if data is None:
# Initialised with no args - to be added
self._data = {
'metadata_version': self.METADATA_VERSION,
'generator': self.GENERATOR,
}
else:
if not isinstance(data, text_type):
data = data.decode('utf-8')
try:
self._data = json.loads(data)
self._validate_mapping(self._data, scheme)
except ValueError:
# Note: MetadataUnrecognizedVersionError does not
# inherit from ValueError (it's a DistlibException,
# which should not inherit from ValueError).
# The ValueError comes from the json.load - if that
# succeeds and we get a validation error, we want
# that to propagate
self._legacy = LegacyMetadata(fileobj=StringIO(data),
scheme=scheme)
self.validate()
common_keys = set(('name', 'version', 'license', 'keywords', 'summary'))
none_list = (None, list)
none_dict = (None, dict)
mapped_keys = {
'run_requires': ('Requires-Dist', list),
'build_requires': ('Setup-Requires-Dist', list),
'dev_requires': none_list,
'test_requires': none_list,
'meta_requires': none_list,
'extras': ('Provides-Extra', list),
'modules': none_list,
'namespaces': none_list,
'exports': none_dict,
'commands': none_dict,
'classifiers': ('Classifier', list),
'source_url': ('Download-URL', None),
'metadata_version': ('Metadata-Version', None),
}
del none_list, none_dict
def __getattribute__(self, key):
common = object.__getattribute__(self, 'common_keys')
mapped = object.__getattribute__(self, 'mapped_keys')
if key in mapped:
lk, maker = mapped[key]
if self._legacy:
if lk is None:
result = None if maker is None else maker()
else:
result = self._legacy.get(lk)
else:
value = None if maker is None else maker()
if key not in ('commands', 'exports', 'modules', 'namespaces',
'classifiers'):
result = self._data.get(key, value)
else:
# special cases for PEP 459
sentinel = object()
result = sentinel
d = self._data.get('extensions')
if d:
if key == 'commands':
result = d.get('python.commands', value)
elif key == 'classifiers':
d = d.get('python.details')
if d:
result = d.get(key, value)
else:
d = d.get('python.exports')
if not d:
d = self._data.get('python.exports')
if d:
result = d.get(key, value)
if result is sentinel:
result = value
elif key not in common:
result = object.__getattribute__(self, key)
elif self._legacy:
result = self._legacy.get(key)
else:
result = self._data.get(key)
return result
def _validate_value(self, key, value, scheme=None):
if key in self.SYNTAX_VALIDATORS:
pattern, exclusions = self.SYNTAX_VALIDATORS[key]
if (scheme or self.scheme) not in exclusions:
m = pattern.match(value)
if not m:
raise MetadataInvalidError("'%s' is an invalid value for "
"the '%s' property" % (value,
key))
def __setattr__(self, key, value):
self._validate_value(key, value)
common = object.__getattribute__(self, 'common_keys')
mapped = object.__getattribute__(self, 'mapped_keys')
if key in mapped:
lk, _ = mapped[key]
if self._legacy:
if lk is None:
raise NotImplementedError
self._legacy[lk] = value
elif key not in ('commands', 'exports', 'modules', 'namespaces',
'classifiers'):
self._data[key] = value
else:
# special cases for PEP 459
d = self._data.setdefault('extensions', {})
if key == 'commands':
d['python.commands'] = value
elif key == 'classifiers':
d = d.setdefault('python.details', {})
d[key] = value
else:
d = d.setdefault('python.exports', {})
d[key] = value
elif key not in common:
object.__setattr__(self, key, value)
else:
if key == 'keywords':
if isinstance(value, string_types):
value = value.strip()
if value:
value = value.split()
else:
value = []
if self._legacy:
self._legacy[key] = value
else:
self._data[key] = value
@property
def name_and_version(self):
return _get_name_and_version(self.name, self.version, True)
@property
def provides(self):
if self._legacy:
result = self._legacy['Provides-Dist']
else:
result = self._data.setdefault('provides', [])
s = '%s (%s)' % (self.name, self.version)
if s not in result:
result.append(s)
return result
@provides.setter
def provides(self, value):
if self._legacy:
self._legacy['Provides-Dist'] = value
else:
self._data['provides'] = value
def get_requirements(self, reqts, extras=None, env=None):
"""
Base method to get dependencies, given a set of extras
to satisfy and an optional environment context.
:param reqts: A list of sometimes-wanted dependencies,
perhaps dependent on extras and environment.
:param extras: A list of optional components being requested.
:param env: An optional environment for marker evaluation.
"""
if self._legacy:
result = reqts
else:
result = []
extras = get_extras(extras or [], self.extras)
for d in reqts:
if 'extra' not in d and 'environment' not in d:
# unconditional
include = True
else:
if 'extra' not in d:
# Not extra-dependent - only environment-dependent
include = True
else:
include = d.get('extra') in extras
if include:
# Not excluded because of extras, check environment
marker = d.get('environment')
if marker:
include = interpret(marker, env)
if include:
result.extend(d['requires'])
for key in ('build', 'dev', 'test'):
e = ':%s:' % key
if e in extras:
extras.remove(e)
# A recursive call, but it should terminate since 'test'
# has been removed from the extras
reqts = self._data.get('%s_requires' % key, [])
result.extend(self.get_requirements(reqts, extras=extras,
env=env))
return result
@property
def dictionary(self):
if self._legacy:
return self._from_legacy()
return self._data
@property
def dependencies(self):
if self._legacy:
raise NotImplementedError
else:
return extract_by_key(self._data, self.DEPENDENCY_KEYS)
@dependencies.setter
def dependencies(self, value):
if self._legacy:
raise NotImplementedError
else:
self._data.update(value)
def _validate_mapping(self, mapping, scheme):
if mapping.get('metadata_version') != self.METADATA_VERSION:
raise MetadataUnrecognizedVersionError()
missing = []
for key, exclusions in self.MANDATORY_KEYS.items():
if key not in mapping:
if scheme not in exclusions:
missing.append(key)
if missing:
msg = 'Missing metadata items: %s' % ', '.join(missing)
raise MetadataMissingError(msg)
for k, v in mapping.items():
self._validate_value(k, v, scheme)
def validate(self):
if self._legacy:
missing, warnings = self._legacy.check(True)
if missing or warnings:
logger.warning('Metadata: missing: %s, warnings: %s',
missing, warnings)
else:
self._validate_mapping(self._data, self.scheme)
def todict(self):
if self._legacy:
return self._legacy.todict(True)
else:
result = extract_by_key(self._data, self.INDEX_KEYS)
return result
def _from_legacy(self):
assert self._legacy and not self._data
result = {
'metadata_version': self.METADATA_VERSION,
'generator': self.GENERATOR,
}
lmd = self._legacy.todict(True) # skip missing ones
for k in ('name', 'version', 'license', 'summary', 'description',
'classifier'):
if k in lmd:
if k == 'classifier':
nk = 'classifiers'
else:
nk = k
result[nk] = lmd[k]
kw = lmd.get('Keywords', [])
if kw == ['']:
kw = []
result['keywords'] = kw
keys = (('requires_dist', 'run_requires'),
('setup_requires_dist', 'build_requires'))
for ok, nk in keys:
if ok in lmd and lmd[ok]:
result[nk] = [{'requires': lmd[ok]}]
result['provides'] = self.provides
author = {}
maintainer = {}
return result
LEGACY_MAPPING = {
'name': 'Name',
'version': 'Version',
('extensions', 'python.details', 'license'): 'License',
'summary': 'Summary',
'description': 'Description',
('extensions', 'python.project', 'project_urls', 'Home'): 'Home-page',
('extensions', 'python.project', 'contacts', 0, 'name'): 'Author',
('extensions', 'python.project', 'contacts', 0, 'email'): 'Author-email',
'source_url': 'Download-URL',
('extensions', 'python.details', 'classifiers'): 'Classifier',
}
def _to_legacy(self):
def process_entries(entries):
reqts = set()
for e in entries:
extra = e.get('extra')
env = e.get('environment')
rlist = e['requires']
for r in rlist:
if not env and not extra:
reqts.add(r)
else:
marker = ''
if extra:
marker = 'extra == "%s"' % extra
if env:
if marker:
marker = '(%s) and %s' % (env, marker)
else:
marker = env
reqts.add(';'.join((r, marker)))
return reqts
assert self._data and not self._legacy
result = LegacyMetadata()
nmd = self._data
# import pdb; pdb.set_trace()
for nk, ok in self.LEGACY_MAPPING.items():
if not isinstance(nk, tuple):
if nk in nmd:
result[ok] = nmd[nk]
else:
d = nmd
found = True
for k in nk:
try:
d = d[k]
except (KeyError, IndexError):
found = False
break
if found:
result[ok] = d
r1 = process_entries(self.run_requires + self.meta_requires)
r2 = process_entries(self.build_requires + self.dev_requires)
if self.extras:
result['Provides-Extra'] = sorted(self.extras)
result['Requires-Dist'] = sorted(r1)
result['Setup-Requires-Dist'] = sorted(r2)
# TODO: any other fields wanted
return result
def write(self, path=None, fileobj=None, legacy=False, skip_unknown=True):
if [path, fileobj].count(None) != 1:
raise ValueError('Exactly one of path and fileobj is needed')
self.validate()
if legacy:
if self._legacy:
legacy_md = self._legacy
else:
legacy_md = self._to_legacy()
if path:
legacy_md.write(path, skip_unknown=skip_unknown)
else:
legacy_md.write_file(fileobj, skip_unknown=skip_unknown)
else:
if self._legacy:
d = self._from_legacy()
else:
d = self._data
if fileobj:
json.dump(d, fileobj, ensure_ascii=True, indent=2,
sort_keys=True)
else:
with codecs.open(path, 'w', 'utf-8') as f:
json.dump(d, f, ensure_ascii=True, indent=2,
sort_keys=True)
def add_requirements(self, requirements):
if self._legacy:
self._legacy.add_requirements(requirements)
else:
run_requires = self._data.setdefault('run_requires', [])
always = None
for entry in run_requires:
if 'environment' not in entry and 'extra' not in entry:
always = entry
break
if always is None:
always = { 'requires': requirements }
run_requires.insert(0, always)
else:
rset = set(always['requires']) | set(requirements)
always['requires'] = sorted(rset)
def __repr__(self):
name = self.name or '(no name)'
version = self.version or 'no version'
return '<%s %s %s (%s)>' % (self.__class__.__name__,
self.metadata_version, name, version)
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/distlib/metadata.py
|
Python
|
mit
| 39,801 |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2013-2017 Vinay Sajip.
# Licensed to the Python Software Foundation under a contributor agreement.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
from __future__ import unicode_literals
import bisect
import io
import logging
import os
import pkgutil
import sys
import types
import zipimport
from . import DistlibException
from .util import cached_property, get_cache_base, Cache
logger = logging.getLogger(__name__)
cache = None # created when needed
class ResourceCache(Cache):
def __init__(self, base=None):
if base is None:
# Use native string to avoid issues on 2.x: see Python #20140.
base = os.path.join(get_cache_base(), str('resource-cache'))
super(ResourceCache, self).__init__(base)
def is_stale(self, resource, path):
"""
Is the cache stale for the given resource?
:param resource: The :class:`Resource` being cached.
:param path: The path of the resource in the cache.
:return: True if the cache is stale.
"""
# Cache invalidation is a hard problem :-)
return True
def get(self, resource):
"""
Get a resource into the cache,
:param resource: A :class:`Resource` instance.
:return: The pathname of the resource in the cache.
"""
prefix, path = resource.finder.get_cache_info(resource)
if prefix is None:
result = path
else:
result = os.path.join(self.base, self.prefix_to_dir(prefix), path)
dirname = os.path.dirname(result)
if not os.path.isdir(dirname):
os.makedirs(dirname)
if not os.path.exists(result):
stale = True
else:
stale = self.is_stale(resource, path)
if stale:
# write the bytes of the resource to the cache location
with open(result, 'wb') as f:
f.write(resource.bytes)
return result
class ResourceBase(object):
def __init__(self, finder, name):
self.finder = finder
self.name = name
class Resource(ResourceBase):
"""
A class representing an in-package resource, such as a data file. This is
not normally instantiated by user code, but rather by a
:class:`ResourceFinder` which manages the resource.
"""
is_container = False # Backwards compatibility
def as_stream(self):
"""
Get the resource as a stream.
This is not a property to make it obvious that it returns a new stream
each time.
"""
return self.finder.get_stream(self)
@cached_property
def file_path(self):
global cache
if cache is None:
cache = ResourceCache()
return cache.get(self)
@cached_property
def bytes(self):
return self.finder.get_bytes(self)
@cached_property
def size(self):
return self.finder.get_size(self)
class ResourceContainer(ResourceBase):
is_container = True # Backwards compatibility
@cached_property
def resources(self):
return self.finder.get_resources(self)
class ResourceFinder(object):
"""
Resource finder for file system resources.
"""
if sys.platform.startswith('java'):
skipped_extensions = ('.pyc', '.pyo', '.class')
else:
skipped_extensions = ('.pyc', '.pyo')
def __init__(self, module):
self.module = module
self.loader = getattr(module, '__loader__', None)
self.base = os.path.dirname(getattr(module, '__file__', ''))
def _adjust_path(self, path):
return os.path.realpath(path)
def _make_path(self, resource_name):
# Issue #50: need to preserve type of path on Python 2.x
# like os.path._get_sep
if isinstance(resource_name, bytes): # should only happen on 2.x
sep = b'/'
else:
sep = '/'
parts = resource_name.split(sep)
parts.insert(0, self.base)
result = os.path.join(*parts)
return self._adjust_path(result)
def _find(self, path):
return os.path.exists(path)
def get_cache_info(self, resource):
return None, resource.path
def find(self, resource_name):
path = self._make_path(resource_name)
if not self._find(path):
result = None
else:
if self._is_directory(path):
result = ResourceContainer(self, resource_name)
else:
result = Resource(self, resource_name)
result.path = path
return result
def get_stream(self, resource):
return open(resource.path, 'rb')
def get_bytes(self, resource):
with open(resource.path, 'rb') as f:
return f.read()
def get_size(self, resource):
return os.path.getsize(resource.path)
def get_resources(self, resource):
def allowed(f):
return (f != '__pycache__' and not
f.endswith(self.skipped_extensions))
return set([f for f in os.listdir(resource.path) if allowed(f)])
def is_container(self, resource):
return self._is_directory(resource.path)
_is_directory = staticmethod(os.path.isdir)
def iterator(self, resource_name):
resource = self.find(resource_name)
if resource is not None:
todo = [resource]
while todo:
resource = todo.pop(0)
yield resource
if resource.is_container:
rname = resource.name
for name in resource.resources:
if not rname:
new_name = name
else:
new_name = '/'.join([rname, name])
child = self.find(new_name)
if child.is_container:
todo.append(child)
else:
yield child
class ZipResourceFinder(ResourceFinder):
"""
Resource finder for resources in .zip files.
"""
def __init__(self, module):
super(ZipResourceFinder, self).__init__(module)
archive = self.loader.archive
self.prefix_len = 1 + len(archive)
# PyPy doesn't have a _files attr on zipimporter, and you can't set one
if hasattr(self.loader, '_files'):
self._files = self.loader._files
else:
self._files = zipimport._zip_directory_cache[archive]
self.index = sorted(self._files)
def _adjust_path(self, path):
return path
def _find(self, path):
path = path[self.prefix_len:]
if path in self._files:
result = True
else:
if path and path[-1] != os.sep:
path = path + os.sep
i = bisect.bisect(self.index, path)
try:
result = self.index[i].startswith(path)
except IndexError:
result = False
if not result:
logger.debug('_find failed: %r %r', path, self.loader.prefix)
else:
logger.debug('_find worked: %r %r', path, self.loader.prefix)
return result
def get_cache_info(self, resource):
prefix = self.loader.archive
path = resource.path[1 + len(prefix):]
return prefix, path
def get_bytes(self, resource):
return self.loader.get_data(resource.path)
def get_stream(self, resource):
return io.BytesIO(self.get_bytes(resource))
def get_size(self, resource):
path = resource.path[self.prefix_len:]
return self._files[path][3]
def get_resources(self, resource):
path = resource.path[self.prefix_len:]
if path and path[-1] != os.sep:
path += os.sep
plen = len(path)
result = set()
i = bisect.bisect(self.index, path)
while i < len(self.index):
if not self.index[i].startswith(path):
break
s = self.index[i][plen:]
result.add(s.split(os.sep, 1)[0]) # only immediate children
i += 1
return result
def _is_directory(self, path):
path = path[self.prefix_len:]
if path and path[-1] != os.sep:
path += os.sep
i = bisect.bisect(self.index, path)
try:
result = self.index[i].startswith(path)
except IndexError:
result = False
return result
_finder_registry = {
type(None): ResourceFinder,
zipimport.zipimporter: ZipResourceFinder
}
try:
# In Python 3.6, _frozen_importlib -> _frozen_importlib_external
try:
import _frozen_importlib_external as _fi
except ImportError:
import _frozen_importlib as _fi
_finder_registry[_fi.SourceFileLoader] = ResourceFinder
_finder_registry[_fi.FileFinder] = ResourceFinder
# See issue #146
_finder_registry[_fi.SourcelessFileLoader] = ResourceFinder
del _fi
except (ImportError, AttributeError):
pass
def register_finder(loader, finder_maker):
_finder_registry[type(loader)] = finder_maker
_finder_cache = {}
def finder(package):
"""
Return a resource finder for a package.
:param package: The name of the package.
:return: A :class:`ResourceFinder` instance for the package.
"""
if package in _finder_cache:
result = _finder_cache[package]
else:
if package not in sys.modules:
__import__(package)
module = sys.modules[package]
path = getattr(module, '__path__', None)
if path is None:
raise DistlibException('You cannot get a finder for a module, '
'only for a package')
loader = getattr(module, '__loader__', None)
finder_maker = _finder_registry.get(type(loader))
if finder_maker is None:
raise DistlibException('Unable to locate finder for %r' % package)
result = finder_maker(module)
_finder_cache[package] = result
return result
_dummy_module = types.ModuleType(str('__dummy__'))
def finder_for_path(path):
"""
Return a resource finder for a path, which should represent a container.
:param path: The path.
:return: A :class:`ResourceFinder` instance for the path.
"""
result = None
# calls any path hooks, gets importer into cache
pkgutil.get_importer(path)
loader = sys.path_importer_cache.get(path)
finder = _finder_registry.get(type(loader))
if finder:
module = _dummy_module
module.__file__ = os.path.join(path, '')
module.__loader__ = loader
result = finder(module)
return result
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/distlib/resources.py
|
Python
|
mit
| 10,820 |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2013-2015 Vinay Sajip.
# Licensed to the Python Software Foundation under a contributor agreement.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
from io import BytesIO
import logging
import os
import re
import struct
import sys
import time
from zipfile import ZipInfo
from .compat import sysconfig, detect_encoding, ZipFile
from .resources import finder
from .util import (FileOperator, get_export_entry, convert_path,
get_executable, get_platform, in_venv)
logger = logging.getLogger(__name__)
_DEFAULT_MANIFEST = '''
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0"
processorArchitecture="X86"
name="%s"
type="win32"/>
<!-- Identify the application security requirements. -->
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>'''.strip()
# check if Python is called on the first line with this expression
FIRST_LINE_RE = re.compile(b'^#!.*pythonw?[0-9.]*([ \t].*)?$')
SCRIPT_TEMPLATE = r'''# -*- coding: utf-8 -*-
import re
import sys
from %(module)s import %(import_name)s
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(%(func)s())
'''
def enquote_executable(executable):
if ' ' in executable:
# make sure we quote only the executable in case of env
# for example /usr/bin/env "/dir with spaces/bin/jython"
# instead of "/usr/bin/env /dir with spaces/bin/jython"
# otherwise whole
if executable.startswith('/usr/bin/env '):
env, _executable = executable.split(' ', 1)
if ' ' in _executable and not _executable.startswith('"'):
executable = '%s "%s"' % (env, _executable)
else:
if not executable.startswith('"'):
executable = '"%s"' % executable
return executable
# Keep the old name around (for now), as there is at least one project using it!
_enquote_executable = enquote_executable
class ScriptMaker(object):
"""
A class to copy or create scripts from source scripts or callable
specifications.
"""
script_template = SCRIPT_TEMPLATE
executable = None # for shebangs
def __init__(self, source_dir, target_dir, add_launchers=True,
dry_run=False, fileop=None):
self.source_dir = source_dir
self.target_dir = target_dir
self.add_launchers = add_launchers
self.force = False
self.clobber = False
# It only makes sense to set mode bits on POSIX.
self.set_mode = (os.name == 'posix') or (os.name == 'java' and
os._name == 'posix')
self.variants = set(('', 'X.Y'))
self._fileop = fileop or FileOperator(dry_run)
self._is_nt = os.name == 'nt' or (
os.name == 'java' and os._name == 'nt')
self.version_info = sys.version_info
def _get_alternate_executable(self, executable, options):
if options.get('gui', False) and self._is_nt: # pragma: no cover
dn, fn = os.path.split(executable)
fn = fn.replace('python', 'pythonw')
executable = os.path.join(dn, fn)
return executable
if sys.platform.startswith('java'): # pragma: no cover
def _is_shell(self, executable):
"""
Determine if the specified executable is a script
(contains a #! line)
"""
try:
with open(executable) as fp:
return fp.read(2) == '#!'
except (OSError, IOError):
logger.warning('Failed to open %s', executable)
return False
def _fix_jython_executable(self, executable):
if self._is_shell(executable):
# Workaround for Jython is not needed on Linux systems.
import java
if java.lang.System.getProperty('os.name') == 'Linux':
return executable
elif executable.lower().endswith('jython.exe'):
# Use wrapper exe for Jython on Windows
return executable
return '/usr/bin/env %s' % executable
def _build_shebang(self, executable, post_interp):
"""
Build a shebang line. In the simple case (on Windows, or a shebang line
which is not too long or contains spaces) use a simple formulation for
the shebang. Otherwise, use /bin/sh as the executable, with a contrived
shebang which allows the script to run either under Python or sh, using
suitable quoting. Thanks to Harald Nordgren for his input.
See also: http://www.in-ulm.de/~mascheck/various/shebang/#length
https://hg.mozilla.org/mozilla-central/file/tip/mach
"""
if os.name != 'posix':
simple_shebang = True
else:
# Add 3 for '#!' prefix and newline suffix.
shebang_length = len(executable) + len(post_interp) + 3
if sys.platform == 'darwin':
max_shebang_length = 512
else:
max_shebang_length = 127
simple_shebang = ((b' ' not in executable) and
(shebang_length <= max_shebang_length))
if simple_shebang:
result = b'#!' + executable + post_interp + b'\n'
else:
result = b'#!/bin/sh\n'
result += b"'''exec' " + executable + post_interp + b' "$0" "$@"\n'
result += b"' '''"
return result
def _get_shebang(self, encoding, post_interp=b'', options=None):
enquote = True
if self.executable:
executable = self.executable
enquote = False # assume this will be taken care of
elif not sysconfig.is_python_build():
executable = get_executable()
elif in_venv(): # pragma: no cover
executable = os.path.join(sysconfig.get_path('scripts'),
'python%s' % sysconfig.get_config_var('EXE'))
else: # pragma: no cover
executable = os.path.join(
sysconfig.get_config_var('BINDIR'),
'python%s%s' % (sysconfig.get_config_var('VERSION'),
sysconfig.get_config_var('EXE')))
if not os.path.isfile(executable):
# for Python builds from source on Windows, no Python executables with
# a version suffix are created, so we use python.exe
executable = os.path.join(sysconfig.get_config_var('BINDIR'),
'python%s' % (sysconfig.get_config_var('EXE')))
if options:
executable = self._get_alternate_executable(executable, options)
if sys.platform.startswith('java'): # pragma: no cover
executable = self._fix_jython_executable(executable)
# Normalise case for Windows - COMMENTED OUT
# executable = os.path.normcase(executable)
# N.B. The normalising operation above has been commented out: See
# issue #124. Although paths in Windows are generally case-insensitive,
# they aren't always. For example, a path containing a ẞ (which is a
# LATIN CAPITAL LETTER SHARP S - U+1E9E) is normcased to ß (which is a
# LATIN SMALL LETTER SHARP S' - U+00DF). The two are not considered by
# Windows as equivalent in path names.
# If the user didn't specify an executable, it may be necessary to
# cater for executable paths with spaces (not uncommon on Windows)
if enquote:
executable = enquote_executable(executable)
# Issue #51: don't use fsencode, since we later try to
# check that the shebang is decodable using utf-8.
executable = executable.encode('utf-8')
# in case of IronPython, play safe and enable frames support
if (sys.platform == 'cli' and '-X:Frames' not in post_interp
and '-X:FullFrames' not in post_interp): # pragma: no cover
post_interp += b' -X:Frames'
shebang = self._build_shebang(executable, post_interp)
# Python parser starts to read a script using UTF-8 until
# it gets a #coding:xxx cookie. The shebang has to be the
# first line of a file, the #coding:xxx cookie cannot be
# written before. So the shebang has to be decodable from
# UTF-8.
try:
shebang.decode('utf-8')
except UnicodeDecodeError: # pragma: no cover
raise ValueError(
'The shebang (%r) is not decodable from utf-8' % shebang)
# If the script is encoded to a custom encoding (use a
# #coding:xxx cookie), the shebang has to be decodable from
# the script encoding too.
if encoding != 'utf-8':
try:
shebang.decode(encoding)
except UnicodeDecodeError: # pragma: no cover
raise ValueError(
'The shebang (%r) is not decodable '
'from the script encoding (%r)' % (shebang, encoding))
return shebang
def _get_script_text(self, entry):
return self.script_template % dict(module=entry.prefix,
import_name=entry.suffix.split('.')[0],
func=entry.suffix)
manifest = _DEFAULT_MANIFEST
def get_manifest(self, exename):
base = os.path.basename(exename)
return self.manifest % base
def _write_script(self, names, shebang, script_bytes, filenames, ext):
use_launcher = self.add_launchers and self._is_nt
linesep = os.linesep.encode('utf-8')
if not shebang.endswith(linesep):
shebang += linesep
if not use_launcher:
script_bytes = shebang + script_bytes
else: # pragma: no cover
if ext == 'py':
launcher = self._get_launcher('t')
else:
launcher = self._get_launcher('w')
stream = BytesIO()
with ZipFile(stream, 'w') as zf:
source_date_epoch = os.environ.get('SOURCE_DATE_EPOCH')
if source_date_epoch:
date_time = time.gmtime(int(source_date_epoch))[:6]
zinfo = ZipInfo(filename='__main__.py', date_time=date_time)
zf.writestr(zinfo, script_bytes)
else:
zf.writestr('__main__.py', script_bytes)
zip_data = stream.getvalue()
script_bytes = launcher + shebang + zip_data
for name in names:
outname = os.path.join(self.target_dir, name)
if use_launcher: # pragma: no cover
n, e = os.path.splitext(outname)
if e.startswith('.py'):
outname = n
outname = '%s.exe' % outname
try:
self._fileop.write_binary_file(outname, script_bytes)
except Exception:
# Failed writing an executable - it might be in use.
logger.warning('Failed to write executable - trying to '
'use .deleteme logic')
dfname = '%s.deleteme' % outname
if os.path.exists(dfname):
os.remove(dfname) # Not allowed to fail here
os.rename(outname, dfname) # nor here
self._fileop.write_binary_file(outname, script_bytes)
logger.debug('Able to replace executable using '
'.deleteme logic')
try:
os.remove(dfname)
except Exception:
pass # still in use - ignore error
else:
if self._is_nt and not outname.endswith('.' + ext): # pragma: no cover
outname = '%s.%s' % (outname, ext)
if os.path.exists(outname) and not self.clobber:
logger.warning('Skipping existing file %s', outname)
continue
self._fileop.write_binary_file(outname, script_bytes)
if self.set_mode:
self._fileop.set_executable_mode([outname])
filenames.append(outname)
variant_separator = '-'
def get_script_filenames(self, name):
result = set()
if '' in self.variants:
result.add(name)
if 'X' in self.variants:
result.add('%s%s' % (name, self.version_info[0]))
if 'X.Y' in self.variants:
result.add('%s%s%s.%s' % (name, self.variant_separator,
self.version_info[0], self.version_info[1]))
return result
def _make_script(self, entry, filenames, options=None):
post_interp = b''
if options:
args = options.get('interpreter_args', [])
if args:
args = ' %s' % ' '.join(args)
post_interp = args.encode('utf-8')
shebang = self._get_shebang('utf-8', post_interp, options=options)
script = self._get_script_text(entry).encode('utf-8')
scriptnames = self.get_script_filenames(entry.name)
if options and options.get('gui', False):
ext = 'pyw'
else:
ext = 'py'
self._write_script(scriptnames, shebang, script, filenames, ext)
def _copy_script(self, script, filenames):
adjust = False
script = os.path.join(self.source_dir, convert_path(script))
outname = os.path.join(self.target_dir, os.path.basename(script))
if not self.force and not self._fileop.newer(script, outname):
logger.debug('not copying %s (up-to-date)', script)
return
# Always open the file, but ignore failures in dry-run mode --
# that way, we'll get accurate feedback if we can read the
# script.
try:
f = open(script, 'rb')
except IOError: # pragma: no cover
if not self.dry_run:
raise
f = None
else:
first_line = f.readline()
if not first_line: # pragma: no cover
logger.warning('%s is an empty file (skipping)', script)
return
match = FIRST_LINE_RE.match(first_line.replace(b'\r\n', b'\n'))
if match:
adjust = True
post_interp = match.group(1) or b''
if not adjust:
if f:
f.close()
self._fileop.copy_file(script, outname)
if self.set_mode:
self._fileop.set_executable_mode([outname])
filenames.append(outname)
else:
logger.info('copying and adjusting %s -> %s', script,
self.target_dir)
if not self._fileop.dry_run:
encoding, lines = detect_encoding(f.readline)
f.seek(0)
shebang = self._get_shebang(encoding, post_interp)
if b'pythonw' in first_line: # pragma: no cover
ext = 'pyw'
else:
ext = 'py'
n = os.path.basename(outname)
self._write_script([n], shebang, f.read(), filenames, ext)
if f:
f.close()
@property
def dry_run(self):
return self._fileop.dry_run
@dry_run.setter
def dry_run(self, value):
self._fileop.dry_run = value
if os.name == 'nt' or (os.name == 'java' and os._name == 'nt'): # pragma: no cover
# Executable launcher support.
# Launchers are from https://bitbucket.org/vinay.sajip/simple_launcher/
def _get_launcher(self, kind):
if struct.calcsize('P') == 8: # 64-bit
bits = '64'
else:
bits = '32'
platform_suffix = '-arm' if get_platform() == 'win-arm64' else ''
name = '%s%s%s.exe' % (kind, bits, platform_suffix)
# Issue 31: don't hardcode an absolute package name, but
# determine it relative to the current package
distlib_package = __name__.rsplit('.', 1)[0]
resource = finder(distlib_package).find(name)
if not resource:
msg = ('Unable to find resource %s in package %s' % (name,
distlib_package))
raise ValueError(msg)
return resource.bytes
# Public API follows
def make(self, specification, options=None):
"""
Make a script.
:param specification: The specification, which is either a valid export
entry specification (to make a script from a
callable) or a filename (to make a script by
copying from a source location).
:param options: A dictionary of options controlling script generation.
:return: A list of all absolute pathnames written to.
"""
filenames = []
entry = get_export_entry(specification)
if entry is None:
self._copy_script(specification, filenames)
else:
self._make_script(entry, filenames, options=options)
return filenames
def make_multiple(self, specifications, options=None):
"""
Take a list of specifications and make scripts from them,
:param specifications: A list of specifications.
:return: A list of all absolute pathnames written to,
"""
filenames = []
for specification in specifications:
filenames.extend(self.make(specification, options))
return filenames
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/distlib/scripts.py
|
Python
|
mit
| 18,102 |
#
# Copyright (C) 2012-2021 The Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
import codecs
from collections import deque
import contextlib
import csv
from glob import iglob as std_iglob
import io
import json
import logging
import os
import py_compile
import re
import socket
try:
import ssl
except ImportError: # pragma: no cover
ssl = None
import subprocess
import sys
import tarfile
import tempfile
import textwrap
try:
import threading
except ImportError: # pragma: no cover
import dummy_threading as threading
import time
from . import DistlibException
from .compat import (string_types, text_type, shutil, raw_input, StringIO,
cache_from_source, urlopen, urljoin, httplib, xmlrpclib,
splittype, HTTPHandler, BaseConfigurator, valid_ident,
Container, configparser, URLError, ZipFile, fsdecode,
unquote, urlparse)
logger = logging.getLogger(__name__)
#
# Requirement parsing code as per PEP 508
#
IDENTIFIER = re.compile(r'^([\w\.-]+)\s*')
VERSION_IDENTIFIER = re.compile(r'^([\w\.*+-]+)\s*')
COMPARE_OP = re.compile(r'^(<=?|>=?|={2,3}|[~!]=)\s*')
MARKER_OP = re.compile(r'^((<=?)|(>=?)|={2,3}|[~!]=|in|not\s+in)\s*')
OR = re.compile(r'^or\b\s*')
AND = re.compile(r'^and\b\s*')
NON_SPACE = re.compile(r'(\S+)\s*')
STRING_CHUNK = re.compile(r'([\s\w\.{}()*+#:;,/?!~`@$%^&=|<>\[\]-]+)')
def parse_marker(marker_string):
"""
Parse a marker string and return a dictionary containing a marker expression.
The dictionary will contain keys "op", "lhs" and "rhs" for non-terminals in
the expression grammar, or strings. A string contained in quotes is to be
interpreted as a literal string, and a string not contained in quotes is a
variable (such as os_name).
"""
def marker_var(remaining):
# either identifier, or literal string
m = IDENTIFIER.match(remaining)
if m:
result = m.groups()[0]
remaining = remaining[m.end():]
elif not remaining:
raise SyntaxError('unexpected end of input')
else:
q = remaining[0]
if q not in '\'"':
raise SyntaxError('invalid expression: %s' % remaining)
oq = '\'"'.replace(q, '')
remaining = remaining[1:]
parts = [q]
while remaining:
# either a string chunk, or oq, or q to terminate
if remaining[0] == q:
break
elif remaining[0] == oq:
parts.append(oq)
remaining = remaining[1:]
else:
m = STRING_CHUNK.match(remaining)
if not m:
raise SyntaxError('error in string literal: %s' % remaining)
parts.append(m.groups()[0])
remaining = remaining[m.end():]
else:
s = ''.join(parts)
raise SyntaxError('unterminated string: %s' % s)
parts.append(q)
result = ''.join(parts)
remaining = remaining[1:].lstrip() # skip past closing quote
return result, remaining
def marker_expr(remaining):
if remaining and remaining[0] == '(':
result, remaining = marker(remaining[1:].lstrip())
if remaining[0] != ')':
raise SyntaxError('unterminated parenthesis: %s' % remaining)
remaining = remaining[1:].lstrip()
else:
lhs, remaining = marker_var(remaining)
while remaining:
m = MARKER_OP.match(remaining)
if not m:
break
op = m.groups()[0]
remaining = remaining[m.end():]
rhs, remaining = marker_var(remaining)
lhs = {'op': op, 'lhs': lhs, 'rhs': rhs}
result = lhs
return result, remaining
def marker_and(remaining):
lhs, remaining = marker_expr(remaining)
while remaining:
m = AND.match(remaining)
if not m:
break
remaining = remaining[m.end():]
rhs, remaining = marker_expr(remaining)
lhs = {'op': 'and', 'lhs': lhs, 'rhs': rhs}
return lhs, remaining
def marker(remaining):
lhs, remaining = marker_and(remaining)
while remaining:
m = OR.match(remaining)
if not m:
break
remaining = remaining[m.end():]
rhs, remaining = marker_and(remaining)
lhs = {'op': 'or', 'lhs': lhs, 'rhs': rhs}
return lhs, remaining
return marker(marker_string)
def parse_requirement(req):
"""
Parse a requirement passed in as a string. Return a Container
whose attributes contain the various parts of the requirement.
"""
remaining = req.strip()
if not remaining or remaining.startswith('#'):
return None
m = IDENTIFIER.match(remaining)
if not m:
raise SyntaxError('name expected: %s' % remaining)
distname = m.groups()[0]
remaining = remaining[m.end():]
extras = mark_expr = versions = uri = None
if remaining and remaining[0] == '[':
i = remaining.find(']', 1)
if i < 0:
raise SyntaxError('unterminated extra: %s' % remaining)
s = remaining[1:i]
remaining = remaining[i + 1:].lstrip()
extras = []
while s:
m = IDENTIFIER.match(s)
if not m:
raise SyntaxError('malformed extra: %s' % s)
extras.append(m.groups()[0])
s = s[m.end():]
if not s:
break
if s[0] != ',':
raise SyntaxError('comma expected in extras: %s' % s)
s = s[1:].lstrip()
if not extras:
extras = None
if remaining:
if remaining[0] == '@':
# it's a URI
remaining = remaining[1:].lstrip()
m = NON_SPACE.match(remaining)
if not m:
raise SyntaxError('invalid URI: %s' % remaining)
uri = m.groups()[0]
t = urlparse(uri)
# there are issues with Python and URL parsing, so this test
# is a bit crude. See bpo-20271, bpo-23505. Python doesn't
# always parse invalid URLs correctly - it should raise
# exceptions for malformed URLs
if not (t.scheme and t.netloc):
raise SyntaxError('Invalid URL: %s' % uri)
remaining = remaining[m.end():].lstrip()
else:
def get_versions(ver_remaining):
"""
Return a list of operator, version tuples if any are
specified, else None.
"""
m = COMPARE_OP.match(ver_remaining)
versions = None
if m:
versions = []
while True:
op = m.groups()[0]
ver_remaining = ver_remaining[m.end():]
m = VERSION_IDENTIFIER.match(ver_remaining)
if not m:
raise SyntaxError('invalid version: %s' % ver_remaining)
v = m.groups()[0]
versions.append((op, v))
ver_remaining = ver_remaining[m.end():]
if not ver_remaining or ver_remaining[0] != ',':
break
ver_remaining = ver_remaining[1:].lstrip()
# Some packages have a trailing comma which would break things
# See issue #148
if not ver_remaining:
break
m = COMPARE_OP.match(ver_remaining)
if not m:
raise SyntaxError('invalid constraint: %s' % ver_remaining)
if not versions:
versions = None
return versions, ver_remaining
if remaining[0] != '(':
versions, remaining = get_versions(remaining)
else:
i = remaining.find(')', 1)
if i < 0:
raise SyntaxError('unterminated parenthesis: %s' % remaining)
s = remaining[1:i]
remaining = remaining[i + 1:].lstrip()
# As a special diversion from PEP 508, allow a version number
# a.b.c in parentheses as a synonym for ~= a.b.c (because this
# is allowed in earlier PEPs)
if COMPARE_OP.match(s):
versions, _ = get_versions(s)
else:
m = VERSION_IDENTIFIER.match(s)
if not m:
raise SyntaxError('invalid constraint: %s' % s)
v = m.groups()[0]
s = s[m.end():].lstrip()
if s:
raise SyntaxError('invalid constraint: %s' % s)
versions = [('~=', v)]
if remaining:
if remaining[0] != ';':
raise SyntaxError('invalid requirement: %s' % remaining)
remaining = remaining[1:].lstrip()
mark_expr, remaining = parse_marker(remaining)
if remaining and remaining[0] != '#':
raise SyntaxError('unexpected trailing data: %s' % remaining)
if not versions:
rs = distname
else:
rs = '%s %s' % (distname, ', '.join(['%s %s' % con for con in versions]))
return Container(name=distname, extras=extras, constraints=versions,
marker=mark_expr, url=uri, requirement=rs)
def get_resources_dests(resources_root, rules):
"""Find destinations for resources files"""
def get_rel_path(root, path):
# normalizes and returns a lstripped-/-separated path
root = root.replace(os.path.sep, '/')
path = path.replace(os.path.sep, '/')
assert path.startswith(root)
return path[len(root):].lstrip('/')
destinations = {}
for base, suffix, dest in rules:
prefix = os.path.join(resources_root, base)
for abs_base in iglob(prefix):
abs_glob = os.path.join(abs_base, suffix)
for abs_path in iglob(abs_glob):
resource_file = get_rel_path(resources_root, abs_path)
if dest is None: # remove the entry if it was here
destinations.pop(resource_file, None)
else:
rel_path = get_rel_path(abs_base, abs_path)
rel_dest = dest.replace(os.path.sep, '/').rstrip('/')
destinations[resource_file] = rel_dest + '/' + rel_path
return destinations
def in_venv():
if hasattr(sys, 'real_prefix'):
# virtualenv venvs
result = True
else:
# PEP 405 venvs
result = sys.prefix != getattr(sys, 'base_prefix', sys.prefix)
return result
def get_executable():
# The __PYVENV_LAUNCHER__ dance is apparently no longer needed, as
# changes to the stub launcher mean that sys.executable always points
# to the stub on OS X
# if sys.platform == 'darwin' and ('__PYVENV_LAUNCHER__'
# in os.environ):
# result = os.environ['__PYVENV_LAUNCHER__']
# else:
# result = sys.executable
# return result
# Avoid normcasing: see issue #143
# result = os.path.normcase(sys.executable)
result = sys.executable
if not isinstance(result, text_type):
result = fsdecode(result)
return result
def proceed(prompt, allowed_chars, error_prompt=None, default=None):
p = prompt
while True:
s = raw_input(p)
p = prompt
if not s and default:
s = default
if s:
c = s[0].lower()
if c in allowed_chars:
break
if error_prompt:
p = '%c: %s\n%s' % (c, error_prompt, prompt)
return c
def extract_by_key(d, keys):
if isinstance(keys, string_types):
keys = keys.split()
result = {}
for key in keys:
if key in d:
result[key] = d[key]
return result
def read_exports(stream):
if sys.version_info[0] >= 3:
# needs to be a text stream
stream = codecs.getreader('utf-8')(stream)
# Try to load as JSON, falling back on legacy format
data = stream.read()
stream = StringIO(data)
try:
jdata = json.load(stream)
result = jdata['extensions']['python.exports']['exports']
for group, entries in result.items():
for k, v in entries.items():
s = '%s = %s' % (k, v)
entry = get_export_entry(s)
assert entry is not None
entries[k] = entry
return result
except Exception:
stream.seek(0, 0)
def read_stream(cp, stream):
if hasattr(cp, 'read_file'):
cp.read_file(stream)
else:
cp.readfp(stream)
cp = configparser.ConfigParser()
try:
read_stream(cp, stream)
except configparser.MissingSectionHeaderError:
stream.close()
data = textwrap.dedent(data)
stream = StringIO(data)
read_stream(cp, stream)
result = {}
for key in cp.sections():
result[key] = entries = {}
for name, value in cp.items(key):
s = '%s = %s' % (name, value)
entry = get_export_entry(s)
assert entry is not None
#entry.dist = self
entries[name] = entry
return result
def write_exports(exports, stream):
if sys.version_info[0] >= 3:
# needs to be a text stream
stream = codecs.getwriter('utf-8')(stream)
cp = configparser.ConfigParser()
for k, v in exports.items():
# TODO check k, v for valid values
cp.add_section(k)
for entry in v.values():
if entry.suffix is None:
s = entry.prefix
else:
s = '%s:%s' % (entry.prefix, entry.suffix)
if entry.flags:
s = '%s [%s]' % (s, ', '.join(entry.flags))
cp.set(k, entry.name, s)
cp.write(stream)
@contextlib.contextmanager
def tempdir():
td = tempfile.mkdtemp()
try:
yield td
finally:
shutil.rmtree(td)
@contextlib.contextmanager
def chdir(d):
cwd = os.getcwd()
try:
os.chdir(d)
yield
finally:
os.chdir(cwd)
@contextlib.contextmanager
def socket_timeout(seconds=15):
cto = socket.getdefaulttimeout()
try:
socket.setdefaulttimeout(seconds)
yield
finally:
socket.setdefaulttimeout(cto)
class cached_property(object):
def __init__(self, func):
self.func = func
#for attr in ('__name__', '__module__', '__doc__'):
# setattr(self, attr, getattr(func, attr, None))
def __get__(self, obj, cls=None):
if obj is None:
return self
value = self.func(obj)
object.__setattr__(obj, self.func.__name__, value)
#obj.__dict__[self.func.__name__] = value = self.func(obj)
return value
def convert_path(pathname):
"""Return 'pathname' as a name that will work on the native filesystem.
The path is split on '/' and put back together again using the current
directory separator. Needed because filenames in the setup script are
always supplied in Unix style, and have to be converted to the local
convention before we can actually use them in the filesystem. Raises
ValueError on non-Unix-ish systems if 'pathname' either starts or
ends with a slash.
"""
if os.sep == '/':
return pathname
if not pathname:
return pathname
if pathname[0] == '/':
raise ValueError("path '%s' cannot be absolute" % pathname)
if pathname[-1] == '/':
raise ValueError("path '%s' cannot end with '/'" % pathname)
paths = pathname.split('/')
while os.curdir in paths:
paths.remove(os.curdir)
if not paths:
return os.curdir
return os.path.join(*paths)
class FileOperator(object):
def __init__(self, dry_run=False):
self.dry_run = dry_run
self.ensured = set()
self._init_record()
def _init_record(self):
self.record = False
self.files_written = set()
self.dirs_created = set()
def record_as_written(self, path):
if self.record:
self.files_written.add(path)
def newer(self, source, target):
"""Tell if the target is newer than the source.
Returns true if 'source' exists and is more recently modified than
'target', or if 'source' exists and 'target' doesn't.
Returns false if both exist and 'target' is the same age or younger
than 'source'. Raise PackagingFileError if 'source' does not exist.
Note that this test is not very accurate: files created in the same
second will have the same "age".
"""
if not os.path.exists(source):
raise DistlibException("file '%r' does not exist" %
os.path.abspath(source))
if not os.path.exists(target):
return True
return os.stat(source).st_mtime > os.stat(target).st_mtime
def copy_file(self, infile, outfile, check=True):
"""Copy a file respecting dry-run and force flags.
"""
self.ensure_dir(os.path.dirname(outfile))
logger.info('Copying %s to %s', infile, outfile)
if not self.dry_run:
msg = None
if check:
if os.path.islink(outfile):
msg = '%s is a symlink' % outfile
elif os.path.exists(outfile) and not os.path.isfile(outfile):
msg = '%s is a non-regular file' % outfile
if msg:
raise ValueError(msg + ' which would be overwritten')
shutil.copyfile(infile, outfile)
self.record_as_written(outfile)
def copy_stream(self, instream, outfile, encoding=None):
assert not os.path.isdir(outfile)
self.ensure_dir(os.path.dirname(outfile))
logger.info('Copying stream %s to %s', instream, outfile)
if not self.dry_run:
if encoding is None:
outstream = open(outfile, 'wb')
else:
outstream = codecs.open(outfile, 'w', encoding=encoding)
try:
shutil.copyfileobj(instream, outstream)
finally:
outstream.close()
self.record_as_written(outfile)
def write_binary_file(self, path, data):
self.ensure_dir(os.path.dirname(path))
if not self.dry_run:
if os.path.exists(path):
os.remove(path)
with open(path, 'wb') as f:
f.write(data)
self.record_as_written(path)
def write_text_file(self, path, data, encoding):
self.write_binary_file(path, data.encode(encoding))
def set_mode(self, bits, mask, files):
if os.name == 'posix' or (os.name == 'java' and os._name == 'posix'):
# Set the executable bits (owner, group, and world) on
# all the files specified.
for f in files:
if self.dry_run:
logger.info("changing mode of %s", f)
else:
mode = (os.stat(f).st_mode | bits) & mask
logger.info("changing mode of %s to %o", f, mode)
os.chmod(f, mode)
set_executable_mode = lambda s, f: s.set_mode(0o555, 0o7777, f)
def ensure_dir(self, path):
path = os.path.abspath(path)
if path not in self.ensured and not os.path.exists(path):
self.ensured.add(path)
d, f = os.path.split(path)
self.ensure_dir(d)
logger.info('Creating %s' % path)
if not self.dry_run:
os.mkdir(path)
if self.record:
self.dirs_created.add(path)
def byte_compile(self, path, optimize=False, force=False, prefix=None, hashed_invalidation=False):
dpath = cache_from_source(path, not optimize)
logger.info('Byte-compiling %s to %s', path, dpath)
if not self.dry_run:
if force or self.newer(path, dpath):
if not prefix:
diagpath = None
else:
assert path.startswith(prefix)
diagpath = path[len(prefix):]
compile_kwargs = {}
if hashed_invalidation and hasattr(py_compile, 'PycInvalidationMode'):
compile_kwargs['invalidation_mode'] = py_compile.PycInvalidationMode.CHECKED_HASH
py_compile.compile(path, dpath, diagpath, True, **compile_kwargs) # raise error
self.record_as_written(dpath)
return dpath
def ensure_removed(self, path):
if os.path.exists(path):
if os.path.isdir(path) and not os.path.islink(path):
logger.debug('Removing directory tree at %s', path)
if not self.dry_run:
shutil.rmtree(path)
if self.record:
if path in self.dirs_created:
self.dirs_created.remove(path)
else:
if os.path.islink(path):
s = 'link'
else:
s = 'file'
logger.debug('Removing %s %s', s, path)
if not self.dry_run:
os.remove(path)
if self.record:
if path in self.files_written:
self.files_written.remove(path)
def is_writable(self, path):
result = False
while not result:
if os.path.exists(path):
result = os.access(path, os.W_OK)
break
parent = os.path.dirname(path)
if parent == path:
break
path = parent
return result
def commit(self):
"""
Commit recorded changes, turn off recording, return
changes.
"""
assert self.record
result = self.files_written, self.dirs_created
self._init_record()
return result
def rollback(self):
if not self.dry_run:
for f in list(self.files_written):
if os.path.exists(f):
os.remove(f)
# dirs should all be empty now, except perhaps for
# __pycache__ subdirs
# reverse so that subdirs appear before their parents
dirs = sorted(self.dirs_created, reverse=True)
for d in dirs:
flist = os.listdir(d)
if flist:
assert flist == ['__pycache__']
sd = os.path.join(d, flist[0])
os.rmdir(sd)
os.rmdir(d) # should fail if non-empty
self._init_record()
def resolve(module_name, dotted_path):
if module_name in sys.modules:
mod = sys.modules[module_name]
else:
mod = __import__(module_name)
if dotted_path is None:
result = mod
else:
parts = dotted_path.split('.')
result = getattr(mod, parts.pop(0))
for p in parts:
result = getattr(result, p)
return result
class ExportEntry(object):
def __init__(self, name, prefix, suffix, flags):
self.name = name
self.prefix = prefix
self.suffix = suffix
self.flags = flags
@cached_property
def value(self):
return resolve(self.prefix, self.suffix)
def __repr__(self): # pragma: no cover
return '<ExportEntry %s = %s:%s %s>' % (self.name, self.prefix,
self.suffix, self.flags)
def __eq__(self, other):
if not isinstance(other, ExportEntry):
result = False
else:
result = (self.name == other.name and
self.prefix == other.prefix and
self.suffix == other.suffix and
self.flags == other.flags)
return result
__hash__ = object.__hash__
ENTRY_RE = re.compile(r'''(?P<name>(\w|[-.+])+)
\s*=\s*(?P<callable>(\w+)([:\.]\w+)*)
\s*(\[\s*(?P<flags>[\w-]+(=\w+)?(,\s*\w+(=\w+)?)*)\s*\])?
''', re.VERBOSE)
def get_export_entry(specification):
m = ENTRY_RE.search(specification)
if not m:
result = None
if '[' in specification or ']' in specification:
raise DistlibException("Invalid specification "
"'%s'" % specification)
else:
d = m.groupdict()
name = d['name']
path = d['callable']
colons = path.count(':')
if colons == 0:
prefix, suffix = path, None
else:
if colons != 1:
raise DistlibException("Invalid specification "
"'%s'" % specification)
prefix, suffix = path.split(':')
flags = d['flags']
if flags is None:
if '[' in specification or ']' in specification:
raise DistlibException("Invalid specification "
"'%s'" % specification)
flags = []
else:
flags = [f.strip() for f in flags.split(',')]
result = ExportEntry(name, prefix, suffix, flags)
return result
def get_cache_base(suffix=None):
"""
Return the default base location for distlib caches. If the directory does
not exist, it is created. Use the suffix provided for the base directory,
and default to '.distlib' if it isn't provided.
On Windows, if LOCALAPPDATA is defined in the environment, then it is
assumed to be a directory, and will be the parent directory of the result.
On POSIX, and on Windows if LOCALAPPDATA is not defined, the user's home
directory - using os.expanduser('~') - will be the parent directory of
the result.
The result is just the directory '.distlib' in the parent directory as
determined above, or with the name specified with ``suffix``.
"""
if suffix is None:
suffix = '.distlib'
if os.name == 'nt' and 'LOCALAPPDATA' in os.environ:
result = os.path.expandvars('$localappdata')
else:
# Assume posix, or old Windows
result = os.path.expanduser('~')
# we use 'isdir' instead of 'exists', because we want to
# fail if there's a file with that name
if os.path.isdir(result):
usable = os.access(result, os.W_OK)
if not usable:
logger.warning('Directory exists but is not writable: %s', result)
else:
try:
os.makedirs(result)
usable = True
except OSError:
logger.warning('Unable to create %s', result, exc_info=True)
usable = False
if not usable:
result = tempfile.mkdtemp()
logger.warning('Default location unusable, using %s', result)
return os.path.join(result, suffix)
def path_to_cache_dir(path):
"""
Convert an absolute path to a directory name for use in a cache.
The algorithm used is:
#. On Windows, any ``':'`` in the drive is replaced with ``'---'``.
#. Any occurrence of ``os.sep`` is replaced with ``'--'``.
#. ``'.cache'`` is appended.
"""
d, p = os.path.splitdrive(os.path.abspath(path))
if d:
d = d.replace(':', '---')
p = p.replace(os.sep, '--')
return d + p + '.cache'
def ensure_slash(s):
if not s.endswith('/'):
return s + '/'
return s
def parse_credentials(netloc):
username = password = None
if '@' in netloc:
prefix, netloc = netloc.rsplit('@', 1)
if ':' not in prefix:
username = prefix
else:
username, password = prefix.split(':', 1)
if username:
username = unquote(username)
if password:
password = unquote(password)
return username, password, netloc
def get_process_umask():
result = os.umask(0o22)
os.umask(result)
return result
def is_string_sequence(seq):
result = True
i = None
for i, s in enumerate(seq):
if not isinstance(s, string_types):
result = False
break
assert i is not None
return result
PROJECT_NAME_AND_VERSION = re.compile('([a-z0-9_]+([.-][a-z_][a-z0-9_]*)*)-'
'([a-z0-9_.+-]+)', re.I)
PYTHON_VERSION = re.compile(r'-py(\d\.?\d?)')
def split_filename(filename, project_name=None):
"""
Extract name, version, python version from a filename (no extension)
Return name, version, pyver or None
"""
result = None
pyver = None
filename = unquote(filename).replace(' ', '-')
m = PYTHON_VERSION.search(filename)
if m:
pyver = m.group(1)
filename = filename[:m.start()]
if project_name and len(filename) > len(project_name) + 1:
m = re.match(re.escape(project_name) + r'\b', filename)
if m:
n = m.end()
result = filename[:n], filename[n + 1:], pyver
if result is None:
m = PROJECT_NAME_AND_VERSION.match(filename)
if m:
result = m.group(1), m.group(3), pyver
return result
# Allow spaces in name because of legacy dists like "Twisted Core"
NAME_VERSION_RE = re.compile(r'(?P<name>[\w .-]+)\s*'
r'\(\s*(?P<ver>[^\s)]+)\)$')
def parse_name_and_version(p):
"""
A utility method used to get name and version from a string.
From e.g. a Provides-Dist value.
:param p: A value in a form 'foo (1.0)'
:return: The name and version as a tuple.
"""
m = NAME_VERSION_RE.match(p)
if not m:
raise DistlibException('Ill-formed name/version string: \'%s\'' % p)
d = m.groupdict()
return d['name'].strip().lower(), d['ver']
def get_extras(requested, available):
result = set()
requested = set(requested or [])
available = set(available or [])
if '*' in requested:
requested.remove('*')
result |= available
for r in requested:
if r == '-':
result.add(r)
elif r.startswith('-'):
unwanted = r[1:]
if unwanted not in available:
logger.warning('undeclared extra: %s' % unwanted)
if unwanted in result:
result.remove(unwanted)
else:
if r not in available:
logger.warning('undeclared extra: %s' % r)
result.add(r)
return result
#
# Extended metadata functionality
#
def _get_external_data(url):
result = {}
try:
# urlopen might fail if it runs into redirections,
# because of Python issue #13696. Fixed in locators
# using a custom redirect handler.
resp = urlopen(url)
headers = resp.info()
ct = headers.get('Content-Type')
if not ct.startswith('application/json'):
logger.debug('Unexpected response for JSON request: %s', ct)
else:
reader = codecs.getreader('utf-8')(resp)
#data = reader.read().decode('utf-8')
#result = json.loads(data)
result = json.load(reader)
except Exception as e:
logger.exception('Failed to get external data for %s: %s', url, e)
return result
_external_data_base_url = 'https://www.red-dove.com/pypi/projects/'
def get_project_data(name):
url = '%s/%s/project.json' % (name[0].upper(), name)
url = urljoin(_external_data_base_url, url)
result = _get_external_data(url)
return result
def get_package_data(name, version):
url = '%s/%s/package-%s.json' % (name[0].upper(), name, version)
url = urljoin(_external_data_base_url, url)
return _get_external_data(url)
class Cache(object):
"""
A class implementing a cache for resources that need to live in the file system
e.g. shared libraries. This class was moved from resources to here because it
could be used by other modules, e.g. the wheel module.
"""
def __init__(self, base):
"""
Initialise an instance.
:param base: The base directory where the cache should be located.
"""
# we use 'isdir' instead of 'exists', because we want to
# fail if there's a file with that name
if not os.path.isdir(base): # pragma: no cover
os.makedirs(base)
if (os.stat(base).st_mode & 0o77) != 0:
logger.warning('Directory \'%s\' is not private', base)
self.base = os.path.abspath(os.path.normpath(base))
def prefix_to_dir(self, prefix):
"""
Converts a resource prefix to a directory name in the cache.
"""
return path_to_cache_dir(prefix)
def clear(self):
"""
Clear the cache.
"""
not_removed = []
for fn in os.listdir(self.base):
fn = os.path.join(self.base, fn)
try:
if os.path.islink(fn) or os.path.isfile(fn):
os.remove(fn)
elif os.path.isdir(fn):
shutil.rmtree(fn)
except Exception:
not_removed.append(fn)
return not_removed
class EventMixin(object):
"""
A very simple publish/subscribe system.
"""
def __init__(self):
self._subscribers = {}
def add(self, event, subscriber, append=True):
"""
Add a subscriber for an event.
:param event: The name of an event.
:param subscriber: The subscriber to be added (and called when the
event is published).
:param append: Whether to append or prepend the subscriber to an
existing subscriber list for the event.
"""
subs = self._subscribers
if event not in subs:
subs[event] = deque([subscriber])
else:
sq = subs[event]
if append:
sq.append(subscriber)
else:
sq.appendleft(subscriber)
def remove(self, event, subscriber):
"""
Remove a subscriber for an event.
:param event: The name of an event.
:param subscriber: The subscriber to be removed.
"""
subs = self._subscribers
if event not in subs:
raise ValueError('No subscribers: %r' % event)
subs[event].remove(subscriber)
def get_subscribers(self, event):
"""
Return an iterator for the subscribers for an event.
:param event: The event to return subscribers for.
"""
return iter(self._subscribers.get(event, ()))
def publish(self, event, *args, **kwargs):
"""
Publish a event and return a list of values returned by its
subscribers.
:param event: The event to publish.
:param args: The positional arguments to pass to the event's
subscribers.
:param kwargs: The keyword arguments to pass to the event's
subscribers.
"""
result = []
for subscriber in self.get_subscribers(event):
try:
value = subscriber(event, *args, **kwargs)
except Exception:
logger.exception('Exception during event publication')
value = None
result.append(value)
logger.debug('publish %s: args = %s, kwargs = %s, result = %s',
event, args, kwargs, result)
return result
#
# Simple sequencing
#
class Sequencer(object):
def __init__(self):
self._preds = {}
self._succs = {}
self._nodes = set() # nodes with no preds/succs
def add_node(self, node):
self._nodes.add(node)
def remove_node(self, node, edges=False):
if node in self._nodes:
self._nodes.remove(node)
if edges:
for p in set(self._preds.get(node, ())):
self.remove(p, node)
for s in set(self._succs.get(node, ())):
self.remove(node, s)
# Remove empties
for k, v in list(self._preds.items()):
if not v:
del self._preds[k]
for k, v in list(self._succs.items()):
if not v:
del self._succs[k]
def add(self, pred, succ):
assert pred != succ
self._preds.setdefault(succ, set()).add(pred)
self._succs.setdefault(pred, set()).add(succ)
def remove(self, pred, succ):
assert pred != succ
try:
preds = self._preds[succ]
succs = self._succs[pred]
except KeyError: # pragma: no cover
raise ValueError('%r not a successor of anything' % succ)
try:
preds.remove(pred)
succs.remove(succ)
except KeyError: # pragma: no cover
raise ValueError('%r not a successor of %r' % (succ, pred))
def is_step(self, step):
return (step in self._preds or step in self._succs or
step in self._nodes)
def get_steps(self, final):
if not self.is_step(final):
raise ValueError('Unknown: %r' % final)
result = []
todo = []
seen = set()
todo.append(final)
while todo:
step = todo.pop(0)
if step in seen:
# if a step was already seen,
# move it to the end (so it will appear earlier
# when reversed on return) ... but not for the
# final step, as that would be confusing for
# users
if step != final:
result.remove(step)
result.append(step)
else:
seen.add(step)
result.append(step)
preds = self._preds.get(step, ())
todo.extend(preds)
return reversed(result)
@property
def strong_connections(self):
#http://en.wikipedia.org/wiki/Tarjan%27s_strongly_connected_components_algorithm
index_counter = [0]
stack = []
lowlinks = {}
index = {}
result = []
graph = self._succs
def strongconnect(node):
# set the depth index for this node to the smallest unused index
index[node] = index_counter[0]
lowlinks[node] = index_counter[0]
index_counter[0] += 1
stack.append(node)
# Consider successors
try:
successors = graph[node]
except Exception:
successors = []
for successor in successors:
if successor not in lowlinks:
# Successor has not yet been visited
strongconnect(successor)
lowlinks[node] = min(lowlinks[node],lowlinks[successor])
elif successor in stack:
# the successor is in the stack and hence in the current
# strongly connected component (SCC)
lowlinks[node] = min(lowlinks[node],index[successor])
# If `node` is a root node, pop the stack and generate an SCC
if lowlinks[node] == index[node]:
connected_component = []
while True:
successor = stack.pop()
connected_component.append(successor)
if successor == node: break
component = tuple(connected_component)
# storing the result
result.append(component)
for node in graph:
if node not in lowlinks:
strongconnect(node)
return result
@property
def dot(self):
result = ['digraph G {']
for succ in self._preds:
preds = self._preds[succ]
for pred in preds:
result.append(' %s -> %s;' % (pred, succ))
for node in self._nodes:
result.append(' %s;' % node)
result.append('}')
return '\n'.join(result)
#
# Unarchiving functionality for zip, tar, tgz, tbz, whl
#
ARCHIVE_EXTENSIONS = ('.tar.gz', '.tar.bz2', '.tar', '.zip',
'.tgz', '.tbz', '.whl')
def unarchive(archive_filename, dest_dir, format=None, check=True):
def check_path(path):
if not isinstance(path, text_type):
path = path.decode('utf-8')
p = os.path.abspath(os.path.join(dest_dir, path))
if not p.startswith(dest_dir) or p[plen] != os.sep:
raise ValueError('path outside destination: %r' % p)
dest_dir = os.path.abspath(dest_dir)
plen = len(dest_dir)
archive = None
if format is None:
if archive_filename.endswith(('.zip', '.whl')):
format = 'zip'
elif archive_filename.endswith(('.tar.gz', '.tgz')):
format = 'tgz'
mode = 'r:gz'
elif archive_filename.endswith(('.tar.bz2', '.tbz')):
format = 'tbz'
mode = 'r:bz2'
elif archive_filename.endswith('.tar'):
format = 'tar'
mode = 'r'
else: # pragma: no cover
raise ValueError('Unknown format for %r' % archive_filename)
try:
if format == 'zip':
archive = ZipFile(archive_filename, 'r')
if check:
names = archive.namelist()
for name in names:
check_path(name)
else:
archive = tarfile.open(archive_filename, mode)
if check:
names = archive.getnames()
for name in names:
check_path(name)
if format != 'zip' and sys.version_info[0] < 3:
# See Python issue 17153. If the dest path contains Unicode,
# tarfile extraction fails on Python 2.x if a member path name
# contains non-ASCII characters - it leads to an implicit
# bytes -> unicode conversion using ASCII to decode.
for tarinfo in archive.getmembers():
if not isinstance(tarinfo.name, text_type):
tarinfo.name = tarinfo.name.decode('utf-8')
archive.extractall(dest_dir)
finally:
if archive:
archive.close()
def zip_dir(directory):
"""zip a directory tree into a BytesIO object"""
result = io.BytesIO()
dlen = len(directory)
with ZipFile(result, "w") as zf:
for root, dirs, files in os.walk(directory):
for name in files:
full = os.path.join(root, name)
rel = root[dlen:]
dest = os.path.join(rel, name)
zf.write(full, dest)
return result
#
# Simple progress bar
#
UNITS = ('', 'K', 'M', 'G','T','P')
class Progress(object):
unknown = 'UNKNOWN'
def __init__(self, minval=0, maxval=100):
assert maxval is None or maxval >= minval
self.min = self.cur = minval
self.max = maxval
self.started = None
self.elapsed = 0
self.done = False
def update(self, curval):
assert self.min <= curval
assert self.max is None or curval <= self.max
self.cur = curval
now = time.time()
if self.started is None:
self.started = now
else:
self.elapsed = now - self.started
def increment(self, incr):
assert incr >= 0
self.update(self.cur + incr)
def start(self):
self.update(self.min)
return self
def stop(self):
if self.max is not None:
self.update(self.max)
self.done = True
@property
def maximum(self):
return self.unknown if self.max is None else self.max
@property
def percentage(self):
if self.done:
result = '100 %'
elif self.max is None:
result = ' ?? %'
else:
v = 100.0 * (self.cur - self.min) / (self.max - self.min)
result = '%3d %%' % v
return result
def format_duration(self, duration):
if (duration <= 0) and self.max is None or self.cur == self.min:
result = '??:??:??'
#elif duration < 1:
# result = '--:--:--'
else:
result = time.strftime('%H:%M:%S', time.gmtime(duration))
return result
@property
def ETA(self):
if self.done:
prefix = 'Done'
t = self.elapsed
#import pdb; pdb.set_trace()
else:
prefix = 'ETA '
if self.max is None:
t = -1
elif self.elapsed == 0 or (self.cur == self.min):
t = 0
else:
#import pdb; pdb.set_trace()
t = float(self.max - self.min)
t /= self.cur - self.min
t = (t - 1) * self.elapsed
return '%s: %s' % (prefix, self.format_duration(t))
@property
def speed(self):
if self.elapsed == 0:
result = 0.0
else:
result = (self.cur - self.min) / self.elapsed
for unit in UNITS:
if result < 1000:
break
result /= 1000.0
return '%d %sB/s' % (result, unit)
#
# Glob functionality
#
RICH_GLOB = re.compile(r'\{([^}]*)\}')
_CHECK_RECURSIVE_GLOB = re.compile(r'[^/\\,{]\*\*|\*\*[^/\\,}]')
_CHECK_MISMATCH_SET = re.compile(r'^[^{]*\}|\{[^}]*$')
def iglob(path_glob):
"""Extended globbing function that supports ** and {opt1,opt2,opt3}."""
if _CHECK_RECURSIVE_GLOB.search(path_glob):
msg = """invalid glob %r: recursive glob "**" must be used alone"""
raise ValueError(msg % path_glob)
if _CHECK_MISMATCH_SET.search(path_glob):
msg = """invalid glob %r: mismatching set marker '{' or '}'"""
raise ValueError(msg % path_glob)
return _iglob(path_glob)
def _iglob(path_glob):
rich_path_glob = RICH_GLOB.split(path_glob, 1)
if len(rich_path_glob) > 1:
assert len(rich_path_glob) == 3, rich_path_glob
prefix, set, suffix = rich_path_glob
for item in set.split(','):
for path in _iglob(''.join((prefix, item, suffix))):
yield path
else:
if '**' not in path_glob:
for item in std_iglob(path_glob):
yield item
else:
prefix, radical = path_glob.split('**', 1)
if prefix == '':
prefix = '.'
if radical == '':
radical = '*'
else:
# we support both
radical = radical.lstrip('/')
radical = radical.lstrip('\\')
for path, dir, files in os.walk(prefix):
path = os.path.normpath(path)
for fn in _iglob(os.path.join(path, radical)):
yield fn
if ssl:
from .compat import (HTTPSHandler as BaseHTTPSHandler, match_hostname,
CertificateError)
#
# HTTPSConnection which verifies certificates/matches domains
#
class HTTPSConnection(httplib.HTTPSConnection):
ca_certs = None # set this to the path to the certs file (.pem)
check_domain = True # only used if ca_certs is not None
# noinspection PyPropertyAccess
def connect(self):
sock = socket.create_connection((self.host, self.port), self.timeout)
if getattr(self, '_tunnel_host', False):
self.sock = sock
self._tunnel()
context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
if hasattr(ssl, 'OP_NO_SSLv2'):
context.options |= ssl.OP_NO_SSLv2
if self.cert_file:
context.load_cert_chain(self.cert_file, self.key_file)
kwargs = {}
if self.ca_certs:
context.verify_mode = ssl.CERT_REQUIRED
context.load_verify_locations(cafile=self.ca_certs)
if getattr(ssl, 'HAS_SNI', False):
kwargs['server_hostname'] = self.host
self.sock = context.wrap_socket(sock, **kwargs)
if self.ca_certs and self.check_domain:
try:
match_hostname(self.sock.getpeercert(), self.host)
logger.debug('Host verified: %s', self.host)
except CertificateError: # pragma: no cover
self.sock.shutdown(socket.SHUT_RDWR)
self.sock.close()
raise
class HTTPSHandler(BaseHTTPSHandler):
def __init__(self, ca_certs, check_domain=True):
BaseHTTPSHandler.__init__(self)
self.ca_certs = ca_certs
self.check_domain = check_domain
def _conn_maker(self, *args, **kwargs):
"""
This is called to create a connection instance. Normally you'd
pass a connection class to do_open, but it doesn't actually check for
a class, and just expects a callable. As long as we behave just as a
constructor would have, we should be OK. If it ever changes so that
we *must* pass a class, we'll create an UnsafeHTTPSConnection class
which just sets check_domain to False in the class definition, and
choose which one to pass to do_open.
"""
result = HTTPSConnection(*args, **kwargs)
if self.ca_certs:
result.ca_certs = self.ca_certs
result.check_domain = self.check_domain
return result
def https_open(self, req):
try:
return self.do_open(self._conn_maker, req)
except URLError as e:
if 'certificate verify failed' in str(e.reason):
raise CertificateError('Unable to verify server certificate '
'for %s' % req.host)
else:
raise
#
# To prevent against mixing HTTP traffic with HTTPS (examples: A Man-In-The-
# Middle proxy using HTTP listens on port 443, or an index mistakenly serves
# HTML containing a http://xyz link when it should be https://xyz),
# you can use the following handler class, which does not allow HTTP traffic.
#
# It works by inheriting from HTTPHandler - so build_opener won't add a
# handler for HTTP itself.
#
class HTTPSOnlyHandler(HTTPSHandler, HTTPHandler):
def http_open(self, req):
raise URLError('Unexpected HTTP request on what should be a secure '
'connection: %s' % req)
#
# XML-RPC with timeouts
#
class Transport(xmlrpclib.Transport):
def __init__(self, timeout, use_datetime=0):
self.timeout = timeout
xmlrpclib.Transport.__init__(self, use_datetime)
def make_connection(self, host):
h, eh, x509 = self.get_host_info(host)
if not self._connection or host != self._connection[0]:
self._extra_headers = eh
self._connection = host, httplib.HTTPConnection(h)
return self._connection[1]
if ssl:
class SafeTransport(xmlrpclib.SafeTransport):
def __init__(self, timeout, use_datetime=0):
self.timeout = timeout
xmlrpclib.SafeTransport.__init__(self, use_datetime)
def make_connection(self, host):
h, eh, kwargs = self.get_host_info(host)
if not kwargs:
kwargs = {}
kwargs['timeout'] = self.timeout
if not self._connection or host != self._connection[0]:
self._extra_headers = eh
self._connection = host, httplib.HTTPSConnection(h, None,
**kwargs)
return self._connection[1]
class ServerProxy(xmlrpclib.ServerProxy):
def __init__(self, uri, **kwargs):
self.timeout = timeout = kwargs.pop('timeout', None)
# The above classes only come into play if a timeout
# is specified
if timeout is not None:
# scheme = splittype(uri) # deprecated as of Python 3.8
scheme = urlparse(uri)[0]
use_datetime = kwargs.get('use_datetime', 0)
if scheme == 'https':
tcls = SafeTransport
else:
tcls = Transport
kwargs['transport'] = t = tcls(timeout, use_datetime=use_datetime)
self.transport = t
xmlrpclib.ServerProxy.__init__(self, uri, **kwargs)
#
# CSV functionality. This is provided because on 2.x, the csv module can't
# handle Unicode. However, we need to deal with Unicode in e.g. RECORD files.
#
def _csv_open(fn, mode, **kwargs):
if sys.version_info[0] < 3:
mode += 'b'
else:
kwargs['newline'] = ''
# Python 3 determines encoding from locale. Force 'utf-8'
# file encoding to match other forced utf-8 encoding
kwargs['encoding'] = 'utf-8'
return open(fn, mode, **kwargs)
class CSVBase(object):
defaults = {
'delimiter': str(','), # The strs are used because we need native
'quotechar': str('"'), # str in the csv API (2.x won't take
'lineterminator': str('\n') # Unicode)
}
def __enter__(self):
return self
def __exit__(self, *exc_info):
self.stream.close()
class CSVReader(CSVBase):
def __init__(self, **kwargs):
if 'stream' in kwargs:
stream = kwargs['stream']
if sys.version_info[0] >= 3:
# needs to be a text stream
stream = codecs.getreader('utf-8')(stream)
self.stream = stream
else:
self.stream = _csv_open(kwargs['path'], 'r')
self.reader = csv.reader(self.stream, **self.defaults)
def __iter__(self):
return self
def next(self):
result = next(self.reader)
if sys.version_info[0] < 3:
for i, item in enumerate(result):
if not isinstance(item, text_type):
result[i] = item.decode('utf-8')
return result
__next__ = next
class CSVWriter(CSVBase):
def __init__(self, fn, **kwargs):
self.stream = _csv_open(fn, 'w')
self.writer = csv.writer(self.stream, **self.defaults)
def writerow(self, row):
if sys.version_info[0] < 3:
r = []
for item in row:
if isinstance(item, text_type):
item = item.encode('utf-8')
r.append(item)
row = r
self.writer.writerow(row)
#
# Configurator functionality
#
class Configurator(BaseConfigurator):
value_converters = dict(BaseConfigurator.value_converters)
value_converters['inc'] = 'inc_convert'
def __init__(self, config, base=None):
super(Configurator, self).__init__(config)
self.base = base or os.getcwd()
def configure_custom(self, config):
def convert(o):
if isinstance(o, (list, tuple)):
result = type(o)([convert(i) for i in o])
elif isinstance(o, dict):
if '()' in o:
result = self.configure_custom(o)
else:
result = {}
for k in o:
result[k] = convert(o[k])
else:
result = self.convert(o)
return result
c = config.pop('()')
if not callable(c):
c = self.resolve(c)
props = config.pop('.', None)
# Check for valid identifiers
args = config.pop('[]', ())
if args:
args = tuple([convert(o) for o in args])
items = [(k, convert(config[k])) for k in config if valid_ident(k)]
kwargs = dict(items)
result = c(*args, **kwargs)
if props:
for n, v in props.items():
setattr(result, n, convert(v))
return result
def __getitem__(self, key):
result = self.config[key]
if isinstance(result, dict) and '()' in result:
self.config[key] = result = self.configure_custom(result)
return result
def inc_convert(self, value):
"""Default converter for the inc:// protocol."""
if not os.path.isabs(value):
value = os.path.join(self.base, value)
with codecs.open(value, 'r', encoding='utf-8') as f:
result = json.load(f)
return result
class SubprocessMixin(object):
"""
Mixin for running subprocesses and capturing their output
"""
def __init__(self, verbose=False, progress=None):
self.verbose = verbose
self.progress = progress
def reader(self, stream, context):
"""
Read lines from a subprocess' output stream and either pass to a progress
callable (if specified) or write progress information to sys.stderr.
"""
progress = self.progress
verbose = self.verbose
while True:
s = stream.readline()
if not s:
break
if progress is not None:
progress(s, context)
else:
if not verbose:
sys.stderr.write('.')
else:
sys.stderr.write(s.decode('utf-8'))
sys.stderr.flush()
stream.close()
def run_command(self, cmd, **kwargs):
p = subprocess.Popen(cmd, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, **kwargs)
t1 = threading.Thread(target=self.reader, args=(p.stdout, 'stdout'))
t1.start()
t2 = threading.Thread(target=self.reader, args=(p.stderr, 'stderr'))
t2.start()
p.wait()
t1.join()
t2.join()
if self.progress is not None:
self.progress('done.', 'main')
elif self.verbose:
sys.stderr.write('done.\n')
return p
def normalize_name(name):
"""Normalize a python package name a la PEP 503"""
# https://www.python.org/dev/peps/pep-0503/#normalized-names
return re.sub('[-_.]+', '-', name).lower()
# def _get_pypirc_command():
# """
# Get the distutils command for interacting with PyPI configurations.
# :return: the command.
# """
# from distutils.core import Distribution
# from distutils.config import PyPIRCCommand
# d = Distribution()
# return PyPIRCCommand(d)
class PyPIRCFile(object):
DEFAULT_REPOSITORY = 'https://upload.pypi.org/legacy/'
DEFAULT_REALM = 'pypi'
def __init__(self, fn=None, url=None):
if fn is None:
fn = os.path.join(os.path.expanduser('~'), '.pypirc')
self.filename = fn
self.url = url
def read(self):
result = {}
if os.path.exists(self.filename):
repository = self.url or self.DEFAULT_REPOSITORY
config = configparser.RawConfigParser()
config.read(self.filename)
sections = config.sections()
if 'distutils' in sections:
# let's get the list of servers
index_servers = config.get('distutils', 'index-servers')
_servers = [server.strip() for server in
index_servers.split('\n')
if server.strip() != '']
if _servers == []:
# nothing set, let's try to get the default pypi
if 'pypi' in sections:
_servers = ['pypi']
else:
for server in _servers:
result = {'server': server}
result['username'] = config.get(server, 'username')
# optional params
for key, default in (('repository', self.DEFAULT_REPOSITORY),
('realm', self.DEFAULT_REALM),
('password', None)):
if config.has_option(server, key):
result[key] = config.get(server, key)
else:
result[key] = default
# work around people having "repository" for the "pypi"
# section of their config set to the HTTP (rather than
# HTTPS) URL
if (server == 'pypi' and
repository in (self.DEFAULT_REPOSITORY, 'pypi')):
result['repository'] = self.DEFAULT_REPOSITORY
elif (result['server'] != repository and
result['repository'] != repository):
result = {}
elif 'server-login' in sections:
# old format
server = 'server-login'
if config.has_option(server, 'repository'):
repository = config.get(server, 'repository')
else:
repository = self.DEFAULT_REPOSITORY
result = {
'username': config.get(server, 'username'),
'password': config.get(server, 'password'),
'repository': repository,
'server': server,
'realm': self.DEFAULT_REALM
}
return result
def update(self, username, password):
# import pdb; pdb.set_trace()
config = configparser.RawConfigParser()
fn = self.filename
config.read(fn)
if not config.has_section('pypi'):
config.add_section('pypi')
config.set('pypi', 'username', username)
config.set('pypi', 'password', password)
with open(fn, 'w') as f:
config.write(f)
def _load_pypirc(index):
"""
Read the PyPI access configuration as supported by distutils.
"""
return PyPIRCFile(url=index.url).read()
def _store_pypirc(index):
PyPIRCFile().update(index.username, index.password)
#
# get_platform()/get_host_platform() copied from Python 3.10.a0 source, with some minor
# tweaks
#
def get_host_platform():
"""Return a string that identifies the current platform. This is used mainly to
distinguish platform-specific build directories and platform-specific built
distributions. Typically includes the OS name and version and the
architecture (as supplied by 'os.uname()'), although the exact information
included depends on the OS; eg. on Linux, the kernel version isn't
particularly important.
Examples of returned values:
linux-i586
linux-alpha (?)
solaris-2.6-sun4u
Windows will return one of:
win-amd64 (64bit Windows on AMD64 (aka x86_64, Intel64, EM64T, etc)
win32 (all others - specifically, sys.platform is returned)
For other non-POSIX platforms, currently just returns 'sys.platform'.
"""
if os.name == 'nt':
if 'amd64' in sys.version.lower():
return 'win-amd64'
if '(arm)' in sys.version.lower():
return 'win-arm32'
if '(arm64)' in sys.version.lower():
return 'win-arm64'
return sys.platform
# Set for cross builds explicitly
if "_PYTHON_HOST_PLATFORM" in os.environ:
return os.environ["_PYTHON_HOST_PLATFORM"]
if os.name != 'posix' or not hasattr(os, 'uname'):
# XXX what about the architecture? NT is Intel or Alpha,
# Mac OS is M68k or PPC, etc.
return sys.platform
# Try to distinguish various flavours of Unix
(osname, host, release, version, machine) = os.uname()
# Convert the OS name to lowercase, remove '/' characters, and translate
# spaces (for "Power Macintosh")
osname = osname.lower().replace('/', '')
machine = machine.replace(' ', '_').replace('/', '-')
if osname[:5] == 'linux':
# At least on Linux/Intel, 'machine' is the processor --
# i386, etc.
# XXX what about Alpha, SPARC, etc?
return "%s-%s" % (osname, machine)
elif osname[:5] == 'sunos':
if release[0] >= '5': # SunOS 5 == Solaris 2
osname = 'solaris'
release = '%d.%s' % (int(release[0]) - 3, release[2:])
# We can't use 'platform.architecture()[0]' because a
# bootstrap problem. We use a dict to get an error
# if some suspicious happens.
bitness = {2147483647:'32bit', 9223372036854775807:'64bit'}
machine += '.%s' % bitness[sys.maxsize]
# fall through to standard osname-release-machine representation
elif osname[:3] == 'aix':
from _aix_support import aix_platform
return aix_platform()
elif osname[:6] == 'cygwin':
osname = 'cygwin'
rel_re = re.compile (r'[\d.]+', re.ASCII)
m = rel_re.match(release)
if m:
release = m.group()
elif osname[:6] == 'darwin':
import _osx_support, distutils.sysconfig
osname, release, machine = _osx_support.get_platform_osx(
distutils.sysconfig.get_config_vars(),
osname, release, machine)
return '%s-%s-%s' % (osname, release, machine)
_TARGET_TO_PLAT = {
'x86' : 'win32',
'x64' : 'win-amd64',
'arm' : 'win-arm32',
}
def get_platform():
if os.name != 'nt':
return get_host_platform()
cross_compilation_target = os.environ.get('VSCMD_ARG_TGT_ARCH')
if cross_compilation_target not in _TARGET_TO_PLAT:
return get_host_platform()
return _TARGET_TO_PLAT[cross_compilation_target]
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/distlib/util.py
|
Python
|
mit
| 66,262 |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2017 The Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
"""
Implementation of a flexible versioning scheme providing support for PEP-440,
setuptools-compatible and semantic versioning.
"""
import logging
import re
from .compat import string_types
from .util import parse_requirement
__all__ = ['NormalizedVersion', 'NormalizedMatcher',
'LegacyVersion', 'LegacyMatcher',
'SemanticVersion', 'SemanticMatcher',
'UnsupportedVersionError', 'get_scheme']
logger = logging.getLogger(__name__)
class UnsupportedVersionError(ValueError):
"""This is an unsupported version."""
pass
class Version(object):
def __init__(self, s):
self._string = s = s.strip()
self._parts = parts = self.parse(s)
assert isinstance(parts, tuple)
assert len(parts) > 0
def parse(self, s):
raise NotImplementedError('please implement in a subclass')
def _check_compatible(self, other):
if type(self) != type(other):
raise TypeError('cannot compare %r and %r' % (self, other))
def __eq__(self, other):
self._check_compatible(other)
return self._parts == other._parts
def __ne__(self, other):
return not self.__eq__(other)
def __lt__(self, other):
self._check_compatible(other)
return self._parts < other._parts
def __gt__(self, other):
return not (self.__lt__(other) or self.__eq__(other))
def __le__(self, other):
return self.__lt__(other) or self.__eq__(other)
def __ge__(self, other):
return self.__gt__(other) or self.__eq__(other)
# See http://docs.python.org/reference/datamodel#object.__hash__
def __hash__(self):
return hash(self._parts)
def __repr__(self):
return "%s('%s')" % (self.__class__.__name__, self._string)
def __str__(self):
return self._string
@property
def is_prerelease(self):
raise NotImplementedError('Please implement in subclasses.')
class Matcher(object):
version_class = None
# value is either a callable or the name of a method
_operators = {
'<': lambda v, c, p: v < c,
'>': lambda v, c, p: v > c,
'<=': lambda v, c, p: v == c or v < c,
'>=': lambda v, c, p: v == c or v > c,
'==': lambda v, c, p: v == c,
'===': lambda v, c, p: v == c,
# by default, compatible => >=.
'~=': lambda v, c, p: v == c or v > c,
'!=': lambda v, c, p: v != c,
}
# this is a method only to support alternative implementations
# via overriding
def parse_requirement(self, s):
return parse_requirement(s)
def __init__(self, s):
if self.version_class is None:
raise ValueError('Please specify a version class')
self._string = s = s.strip()
r = self.parse_requirement(s)
if not r:
raise ValueError('Not valid: %r' % s)
self.name = r.name
self.key = self.name.lower() # for case-insensitive comparisons
clist = []
if r.constraints:
# import pdb; pdb.set_trace()
for op, s in r.constraints:
if s.endswith('.*'):
if op not in ('==', '!='):
raise ValueError('\'.*\' not allowed for '
'%r constraints' % op)
# Could be a partial version (e.g. for '2.*') which
# won't parse as a version, so keep it as a string
vn, prefix = s[:-2], True
# Just to check that vn is a valid version
self.version_class(vn)
else:
# Should parse as a version, so we can create an
# instance for the comparison
vn, prefix = self.version_class(s), False
clist.append((op, vn, prefix))
self._parts = tuple(clist)
def match(self, version):
"""
Check if the provided version matches the constraints.
:param version: The version to match against this instance.
:type version: String or :class:`Version` instance.
"""
if isinstance(version, string_types):
version = self.version_class(version)
for operator, constraint, prefix in self._parts:
f = self._operators.get(operator)
if isinstance(f, string_types):
f = getattr(self, f)
if not f:
msg = ('%r not implemented '
'for %s' % (operator, self.__class__.__name__))
raise NotImplementedError(msg)
if not f(version, constraint, prefix):
return False
return True
@property
def exact_version(self):
result = None
if len(self._parts) == 1 and self._parts[0][0] in ('==', '==='):
result = self._parts[0][1]
return result
def _check_compatible(self, other):
if type(self) != type(other) or self.name != other.name:
raise TypeError('cannot compare %s and %s' % (self, other))
def __eq__(self, other):
self._check_compatible(other)
return self.key == other.key and self._parts == other._parts
def __ne__(self, other):
return not self.__eq__(other)
# See http://docs.python.org/reference/datamodel#object.__hash__
def __hash__(self):
return hash(self.key) + hash(self._parts)
def __repr__(self):
return "%s(%r)" % (self.__class__.__name__, self._string)
def __str__(self):
return self._string
PEP440_VERSION_RE = re.compile(r'^v?(\d+!)?(\d+(\.\d+)*)((a|b|c|rc)(\d+))?'
r'(\.(post)(\d+))?(\.(dev)(\d+))?'
r'(\+([a-zA-Z\d]+(\.[a-zA-Z\d]+)?))?$')
def _pep_440_key(s):
s = s.strip()
m = PEP440_VERSION_RE.match(s)
if not m:
raise UnsupportedVersionError('Not a valid version: %s' % s)
groups = m.groups()
nums = tuple(int(v) for v in groups[1].split('.'))
while len(nums) > 1 and nums[-1] == 0:
nums = nums[:-1]
if not groups[0]:
epoch = 0
else:
epoch = int(groups[0][:-1])
pre = groups[4:6]
post = groups[7:9]
dev = groups[10:12]
local = groups[13]
if pre == (None, None):
pre = ()
else:
pre = pre[0], int(pre[1])
if post == (None, None):
post = ()
else:
post = post[0], int(post[1])
if dev == (None, None):
dev = ()
else:
dev = dev[0], int(dev[1])
if local is None:
local = ()
else:
parts = []
for part in local.split('.'):
# to ensure that numeric compares as > lexicographic, avoid
# comparing them directly, but encode a tuple which ensures
# correct sorting
if part.isdigit():
part = (1, int(part))
else:
part = (0, part)
parts.append(part)
local = tuple(parts)
if not pre:
# either before pre-release, or final release and after
if not post and dev:
# before pre-release
pre = ('a', -1) # to sort before a0
else:
pre = ('z',) # to sort after all pre-releases
# now look at the state of post and dev.
if not post:
post = ('_',) # sort before 'a'
if not dev:
dev = ('final',)
#print('%s -> %s' % (s, m.groups()))
return epoch, nums, pre, post, dev, local
_normalized_key = _pep_440_key
class NormalizedVersion(Version):
"""A rational version.
Good:
1.2 # equivalent to "1.2.0"
1.2.0
1.2a1
1.2.3a2
1.2.3b1
1.2.3c1
1.2.3.4
TODO: fill this out
Bad:
1 # minimum two numbers
1.2a # release level must have a release serial
1.2.3b
"""
def parse(self, s):
result = _normalized_key(s)
# _normalized_key loses trailing zeroes in the release
# clause, since that's needed to ensure that X.Y == X.Y.0 == X.Y.0.0
# However, PEP 440 prefix matching needs it: for example,
# (~= 1.4.5.0) matches differently to (~= 1.4.5.0.0).
m = PEP440_VERSION_RE.match(s) # must succeed
groups = m.groups()
self._release_clause = tuple(int(v) for v in groups[1].split('.'))
return result
PREREL_TAGS = set(['a', 'b', 'c', 'rc', 'dev'])
@property
def is_prerelease(self):
return any(t[0] in self.PREREL_TAGS for t in self._parts if t)
def _match_prefix(x, y):
x = str(x)
y = str(y)
if x == y:
return True
if not x.startswith(y):
return False
n = len(y)
return x[n] == '.'
class NormalizedMatcher(Matcher):
version_class = NormalizedVersion
# value is either a callable or the name of a method
_operators = {
'~=': '_match_compatible',
'<': '_match_lt',
'>': '_match_gt',
'<=': '_match_le',
'>=': '_match_ge',
'==': '_match_eq',
'===': '_match_arbitrary',
'!=': '_match_ne',
}
def _adjust_local(self, version, constraint, prefix):
if prefix:
strip_local = '+' not in constraint and version._parts[-1]
else:
# both constraint and version are
# NormalizedVersion instances.
# If constraint does not have a local component,
# ensure the version doesn't, either.
strip_local = not constraint._parts[-1] and version._parts[-1]
if strip_local:
s = version._string.split('+', 1)[0]
version = self.version_class(s)
return version, constraint
def _match_lt(self, version, constraint, prefix):
version, constraint = self._adjust_local(version, constraint, prefix)
if version >= constraint:
return False
release_clause = constraint._release_clause
pfx = '.'.join([str(i) for i in release_clause])
return not _match_prefix(version, pfx)
def _match_gt(self, version, constraint, prefix):
version, constraint = self._adjust_local(version, constraint, prefix)
if version <= constraint:
return False
release_clause = constraint._release_clause
pfx = '.'.join([str(i) for i in release_clause])
return not _match_prefix(version, pfx)
def _match_le(self, version, constraint, prefix):
version, constraint = self._adjust_local(version, constraint, prefix)
return version <= constraint
def _match_ge(self, version, constraint, prefix):
version, constraint = self._adjust_local(version, constraint, prefix)
return version >= constraint
def _match_eq(self, version, constraint, prefix):
version, constraint = self._adjust_local(version, constraint, prefix)
if not prefix:
result = (version == constraint)
else:
result = _match_prefix(version, constraint)
return result
def _match_arbitrary(self, version, constraint, prefix):
return str(version) == str(constraint)
def _match_ne(self, version, constraint, prefix):
version, constraint = self._adjust_local(version, constraint, prefix)
if not prefix:
result = (version != constraint)
else:
result = not _match_prefix(version, constraint)
return result
def _match_compatible(self, version, constraint, prefix):
version, constraint = self._adjust_local(version, constraint, prefix)
if version == constraint:
return True
if version < constraint:
return False
# if not prefix:
# return True
release_clause = constraint._release_clause
if len(release_clause) > 1:
release_clause = release_clause[:-1]
pfx = '.'.join([str(i) for i in release_clause])
return _match_prefix(version, pfx)
_REPLACEMENTS = (
(re.compile('[.+-]$'), ''), # remove trailing puncts
(re.compile(r'^[.](\d)'), r'0.\1'), # .N -> 0.N at start
(re.compile('^[.-]'), ''), # remove leading puncts
(re.compile(r'^\((.*)\)$'), r'\1'), # remove parentheses
(re.compile(r'^v(ersion)?\s*(\d+)'), r'\2'), # remove leading v(ersion)
(re.compile(r'^r(ev)?\s*(\d+)'), r'\2'), # remove leading v(ersion)
(re.compile('[.]{2,}'), '.'), # multiple runs of '.'
(re.compile(r'\b(alfa|apha)\b'), 'alpha'), # misspelt alpha
(re.compile(r'\b(pre-alpha|prealpha)\b'),
'pre.alpha'), # standardise
(re.compile(r'\(beta\)$'), 'beta'), # remove parentheses
)
_SUFFIX_REPLACEMENTS = (
(re.compile('^[:~._+-]+'), ''), # remove leading puncts
(re.compile('[,*")([\\]]'), ''), # remove unwanted chars
(re.compile('[~:+_ -]'), '.'), # replace illegal chars
(re.compile('[.]{2,}'), '.'), # multiple runs of '.'
(re.compile(r'\.$'), ''), # trailing '.'
)
_NUMERIC_PREFIX = re.compile(r'(\d+(\.\d+)*)')
def _suggest_semantic_version(s):
"""
Try to suggest a semantic form for a version for which
_suggest_normalized_version couldn't come up with anything.
"""
result = s.strip().lower()
for pat, repl in _REPLACEMENTS:
result = pat.sub(repl, result)
if not result:
result = '0.0.0'
# Now look for numeric prefix, and separate it out from
# the rest.
#import pdb; pdb.set_trace()
m = _NUMERIC_PREFIX.match(result)
if not m:
prefix = '0.0.0'
suffix = result
else:
prefix = m.groups()[0].split('.')
prefix = [int(i) for i in prefix]
while len(prefix) < 3:
prefix.append(0)
if len(prefix) == 3:
suffix = result[m.end():]
else:
suffix = '.'.join([str(i) for i in prefix[3:]]) + result[m.end():]
prefix = prefix[:3]
prefix = '.'.join([str(i) for i in prefix])
suffix = suffix.strip()
if suffix:
#import pdb; pdb.set_trace()
# massage the suffix.
for pat, repl in _SUFFIX_REPLACEMENTS:
suffix = pat.sub(repl, suffix)
if not suffix:
result = prefix
else:
sep = '-' if 'dev' in suffix else '+'
result = prefix + sep + suffix
if not is_semver(result):
result = None
return result
def _suggest_normalized_version(s):
"""Suggest a normalized version close to the given version string.
If you have a version string that isn't rational (i.e. NormalizedVersion
doesn't like it) then you might be able to get an equivalent (or close)
rational version from this function.
This does a number of simple normalizations to the given string, based
on observation of versions currently in use on PyPI. Given a dump of
those version during PyCon 2009, 4287 of them:
- 2312 (53.93%) match NormalizedVersion without change
with the automatic suggestion
- 3474 (81.04%) match when using this suggestion method
@param s {str} An irrational version string.
@returns A rational version string, or None, if couldn't determine one.
"""
try:
_normalized_key(s)
return s # already rational
except UnsupportedVersionError:
pass
rs = s.lower()
# part of this could use maketrans
for orig, repl in (('-alpha', 'a'), ('-beta', 'b'), ('alpha', 'a'),
('beta', 'b'), ('rc', 'c'), ('-final', ''),
('-pre', 'c'),
('-release', ''), ('.release', ''), ('-stable', ''),
('+', '.'), ('_', '.'), (' ', ''), ('.final', ''),
('final', '')):
rs = rs.replace(orig, repl)
# if something ends with dev or pre, we add a 0
rs = re.sub(r"pre$", r"pre0", rs)
rs = re.sub(r"dev$", r"dev0", rs)
# if we have something like "b-2" or "a.2" at the end of the
# version, that is probably beta, alpha, etc
# let's remove the dash or dot
rs = re.sub(r"([abc]|rc)[\-\.](\d+)$", r"\1\2", rs)
# 1.0-dev-r371 -> 1.0.dev371
# 0.1-dev-r79 -> 0.1.dev79
rs = re.sub(r"[\-\.](dev)[\-\.]?r?(\d+)$", r".\1\2", rs)
# Clean: 2.0.a.3, 2.0.b1, 0.9.0~c1
rs = re.sub(r"[.~]?([abc])\.?", r"\1", rs)
# Clean: v0.3, v1.0
if rs.startswith('v'):
rs = rs[1:]
# Clean leading '0's on numbers.
#TODO: unintended side-effect on, e.g., "2003.05.09"
# PyPI stats: 77 (~2%) better
rs = re.sub(r"\b0+(\d+)(?!\d)", r"\1", rs)
# Clean a/b/c with no version. E.g. "1.0a" -> "1.0a0". Setuptools infers
# zero.
# PyPI stats: 245 (7.56%) better
rs = re.sub(r"(\d+[abc])$", r"\g<1>0", rs)
# the 'dev-rNNN' tag is a dev tag
rs = re.sub(r"\.?(dev-r|dev\.r)\.?(\d+)$", r".dev\2", rs)
# clean the - when used as a pre delimiter
rs = re.sub(r"-(a|b|c)(\d+)$", r"\1\2", rs)
# a terminal "dev" or "devel" can be changed into ".dev0"
rs = re.sub(r"[\.\-](dev|devel)$", r".dev0", rs)
# a terminal "dev" can be changed into ".dev0"
rs = re.sub(r"(?![\.\-])dev$", r".dev0", rs)
# a terminal "final" or "stable" can be removed
rs = re.sub(r"(final|stable)$", "", rs)
# The 'r' and the '-' tags are post release tags
# 0.4a1.r10 -> 0.4a1.post10
# 0.9.33-17222 -> 0.9.33.post17222
# 0.9.33-r17222 -> 0.9.33.post17222
rs = re.sub(r"\.?(r|-|-r)\.?(\d+)$", r".post\2", rs)
# Clean 'r' instead of 'dev' usage:
# 0.9.33+r17222 -> 0.9.33.dev17222
# 1.0dev123 -> 1.0.dev123
# 1.0.git123 -> 1.0.dev123
# 1.0.bzr123 -> 1.0.dev123
# 0.1a0dev.123 -> 0.1a0.dev123
# PyPI stats: ~150 (~4%) better
rs = re.sub(r"\.?(dev|git|bzr)\.?(\d+)$", r".dev\2", rs)
# Clean '.pre' (normalized from '-pre' above) instead of 'c' usage:
# 0.2.pre1 -> 0.2c1
# 0.2-c1 -> 0.2c1
# 1.0preview123 -> 1.0c123
# PyPI stats: ~21 (0.62%) better
rs = re.sub(r"\.?(pre|preview|-c)(\d+)$", r"c\g<2>", rs)
# Tcl/Tk uses "px" for their post release markers
rs = re.sub(r"p(\d+)$", r".post\1", rs)
try:
_normalized_key(rs)
except UnsupportedVersionError:
rs = None
return rs
#
# Legacy version processing (distribute-compatible)
#
_VERSION_PART = re.compile(r'([a-z]+|\d+|[\.-])', re.I)
_VERSION_REPLACE = {
'pre': 'c',
'preview': 'c',
'-': 'final-',
'rc': 'c',
'dev': '@',
'': None,
'.': None,
}
def _legacy_key(s):
def get_parts(s):
result = []
for p in _VERSION_PART.split(s.lower()):
p = _VERSION_REPLACE.get(p, p)
if p:
if '0' <= p[:1] <= '9':
p = p.zfill(8)
else:
p = '*' + p
result.append(p)
result.append('*final')
return result
result = []
for p in get_parts(s):
if p.startswith('*'):
if p < '*final':
while result and result[-1] == '*final-':
result.pop()
while result and result[-1] == '00000000':
result.pop()
result.append(p)
return tuple(result)
class LegacyVersion(Version):
def parse(self, s):
return _legacy_key(s)
@property
def is_prerelease(self):
result = False
for x in self._parts:
if (isinstance(x, string_types) and x.startswith('*') and
x < '*final'):
result = True
break
return result
class LegacyMatcher(Matcher):
version_class = LegacyVersion
_operators = dict(Matcher._operators)
_operators['~='] = '_match_compatible'
numeric_re = re.compile(r'^(\d+(\.\d+)*)')
def _match_compatible(self, version, constraint, prefix):
if version < constraint:
return False
m = self.numeric_re.match(str(constraint))
if not m:
logger.warning('Cannot compute compatible match for version %s '
' and constraint %s', version, constraint)
return True
s = m.groups()[0]
if '.' in s:
s = s.rsplit('.', 1)[0]
return _match_prefix(version, s)
#
# Semantic versioning
#
_SEMVER_RE = re.compile(r'^(\d+)\.(\d+)\.(\d+)'
r'(-[a-z0-9]+(\.[a-z0-9-]+)*)?'
r'(\+[a-z0-9]+(\.[a-z0-9-]+)*)?$', re.I)
def is_semver(s):
return _SEMVER_RE.match(s)
def _semantic_key(s):
def make_tuple(s, absent):
if s is None:
result = (absent,)
else:
parts = s[1:].split('.')
# We can't compare ints and strings on Python 3, so fudge it
# by zero-filling numeric values so simulate a numeric comparison
result = tuple([p.zfill(8) if p.isdigit() else p for p in parts])
return result
m = is_semver(s)
if not m:
raise UnsupportedVersionError(s)
groups = m.groups()
major, minor, patch = [int(i) for i in groups[:3]]
# choose the '|' and '*' so that versions sort correctly
pre, build = make_tuple(groups[3], '|'), make_tuple(groups[5], '*')
return (major, minor, patch), pre, build
class SemanticVersion(Version):
def parse(self, s):
return _semantic_key(s)
@property
def is_prerelease(self):
return self._parts[1][0] != '|'
class SemanticMatcher(Matcher):
version_class = SemanticVersion
class VersionScheme(object):
def __init__(self, key, matcher, suggester=None):
self.key = key
self.matcher = matcher
self.suggester = suggester
def is_valid_version(self, s):
try:
self.matcher.version_class(s)
result = True
except UnsupportedVersionError:
result = False
return result
def is_valid_matcher(self, s):
try:
self.matcher(s)
result = True
except UnsupportedVersionError:
result = False
return result
def is_valid_constraint_list(self, s):
"""
Used for processing some metadata fields
"""
# See issue #140. Be tolerant of a single trailing comma.
if s.endswith(','):
s = s[:-1]
return self.is_valid_matcher('dummy_name (%s)' % s)
def suggest(self, s):
if self.suggester is None:
result = None
else:
result = self.suggester(s)
return result
_SCHEMES = {
'normalized': VersionScheme(_normalized_key, NormalizedMatcher,
_suggest_normalized_version),
'legacy': VersionScheme(_legacy_key, LegacyMatcher, lambda self, s: s),
'semantic': VersionScheme(_semantic_key, SemanticMatcher,
_suggest_semantic_version),
}
_SCHEMES['default'] = _SCHEMES['normalized']
def get_scheme(name):
if name not in _SCHEMES:
raise ValueError('unknown scheme name: %r' % name)
return _SCHEMES[name]
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/distlib/version.py
|
Python
|
mit
| 23,513 |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2013-2020 Vinay Sajip.
# Licensed to the Python Software Foundation under a contributor agreement.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
from __future__ import unicode_literals
import base64
import codecs
import datetime
from email import message_from_file
import hashlib
import json
import logging
import os
import posixpath
import re
import shutil
import sys
import tempfile
import zipfile
from . import __version__, DistlibException
from .compat import sysconfig, ZipFile, fsdecode, text_type, filter
from .database import InstalledDistribution
from .metadata import (Metadata, METADATA_FILENAME, WHEEL_METADATA_FILENAME,
LEGACY_METADATA_FILENAME)
from .util import (FileOperator, convert_path, CSVReader, CSVWriter, Cache,
cached_property, get_cache_base, read_exports, tempdir,
get_platform)
from .version import NormalizedVersion, UnsupportedVersionError
logger = logging.getLogger(__name__)
cache = None # created when needed
if hasattr(sys, 'pypy_version_info'): # pragma: no cover
IMP_PREFIX = 'pp'
elif sys.platform.startswith('java'): # pragma: no cover
IMP_PREFIX = 'jy'
elif sys.platform == 'cli': # pragma: no cover
IMP_PREFIX = 'ip'
else:
IMP_PREFIX = 'cp'
VER_SUFFIX = sysconfig.get_config_var('py_version_nodot')
if not VER_SUFFIX: # pragma: no cover
VER_SUFFIX = '%s%s' % sys.version_info[:2]
PYVER = 'py' + VER_SUFFIX
IMPVER = IMP_PREFIX + VER_SUFFIX
ARCH = get_platform().replace('-', '_').replace('.', '_')
ABI = sysconfig.get_config_var('SOABI')
if ABI and ABI.startswith('cpython-'):
ABI = ABI.replace('cpython-', 'cp').split('-')[0]
else:
def _derive_abi():
parts = ['cp', VER_SUFFIX]
if sysconfig.get_config_var('Py_DEBUG'):
parts.append('d')
if IMP_PREFIX == 'cp':
vi = sys.version_info[:2]
if vi < (3, 8):
wpm = sysconfig.get_config_var('WITH_PYMALLOC')
if wpm is None:
wpm = True
if wpm:
parts.append('m')
if vi < (3, 3):
us = sysconfig.get_config_var('Py_UNICODE_SIZE')
if us == 4 or (us is None and sys.maxunicode == 0x10FFFF):
parts.append('u')
return ''.join(parts)
ABI = _derive_abi()
del _derive_abi
FILENAME_RE = re.compile(r'''
(?P<nm>[^-]+)
-(?P<vn>\d+[^-]*)
(-(?P<bn>\d+[^-]*))?
-(?P<py>\w+\d+(\.\w+\d+)*)
-(?P<bi>\w+)
-(?P<ar>\w+(\.\w+)*)
\.whl$
''', re.IGNORECASE | re.VERBOSE)
NAME_VERSION_RE = re.compile(r'''
(?P<nm>[^-]+)
-(?P<vn>\d+[^-]*)
(-(?P<bn>\d+[^-]*))?$
''', re.IGNORECASE | re.VERBOSE)
SHEBANG_RE = re.compile(br'\s*#![^\r\n]*')
SHEBANG_DETAIL_RE = re.compile(br'^(\s*#!("[^"]+"|\S+))\s+(.*)$')
SHEBANG_PYTHON = b'#!python'
SHEBANG_PYTHONW = b'#!pythonw'
if os.sep == '/':
to_posix = lambda o: o
else:
to_posix = lambda o: o.replace(os.sep, '/')
if sys.version_info[0] < 3:
import imp
else:
imp = None
import importlib.machinery
import importlib.util
def _get_suffixes():
if imp:
return [s[0] for s in imp.get_suffixes()]
else:
return importlib.machinery.EXTENSION_SUFFIXES
def _load_dynamic(name, path):
# https://docs.python.org/3/library/importlib.html#importing-a-source-file-directly
if imp:
return imp.load_dynamic(name, path)
else:
spec = importlib.util.spec_from_file_location(name, path)
module = importlib.util.module_from_spec(spec)
sys.modules[name] = module
spec.loader.exec_module(module)
return module
class Mounter(object):
def __init__(self):
self.impure_wheels = {}
self.libs = {}
def add(self, pathname, extensions):
self.impure_wheels[pathname] = extensions
self.libs.update(extensions)
def remove(self, pathname):
extensions = self.impure_wheels.pop(pathname)
for k, v in extensions:
if k in self.libs:
del self.libs[k]
def find_module(self, fullname, path=None):
if fullname in self.libs:
result = self
else:
result = None
return result
def load_module(self, fullname):
if fullname in sys.modules:
result = sys.modules[fullname]
else:
if fullname not in self.libs:
raise ImportError('unable to find extension for %s' % fullname)
result = _load_dynamic(fullname, self.libs[fullname])
result.__loader__ = self
parts = fullname.rsplit('.', 1)
if len(parts) > 1:
result.__package__ = parts[0]
return result
_hook = Mounter()
class Wheel(object):
"""
Class to build and install from Wheel files (PEP 427).
"""
wheel_version = (1, 1)
hash_kind = 'sha256'
def __init__(self, filename=None, sign=False, verify=False):
"""
Initialise an instance using a (valid) filename.
"""
self.sign = sign
self.should_verify = verify
self.buildver = ''
self.pyver = [PYVER]
self.abi = ['none']
self.arch = ['any']
self.dirname = os.getcwd()
if filename is None:
self.name = 'dummy'
self.version = '0.1'
self._filename = self.filename
else:
m = NAME_VERSION_RE.match(filename)
if m:
info = m.groupdict('')
self.name = info['nm']
# Reinstate the local version separator
self.version = info['vn'].replace('_', '-')
self.buildver = info['bn']
self._filename = self.filename
else:
dirname, filename = os.path.split(filename)
m = FILENAME_RE.match(filename)
if not m:
raise DistlibException('Invalid name or '
'filename: %r' % filename)
if dirname:
self.dirname = os.path.abspath(dirname)
self._filename = filename
info = m.groupdict('')
self.name = info['nm']
self.version = info['vn']
self.buildver = info['bn']
self.pyver = info['py'].split('.')
self.abi = info['bi'].split('.')
self.arch = info['ar'].split('.')
@property
def filename(self):
"""
Build and return a filename from the various components.
"""
if self.buildver:
buildver = '-' + self.buildver
else:
buildver = ''
pyver = '.'.join(self.pyver)
abi = '.'.join(self.abi)
arch = '.'.join(self.arch)
# replace - with _ as a local version separator
version = self.version.replace('-', '_')
return '%s-%s%s-%s-%s-%s.whl' % (self.name, version, buildver,
pyver, abi, arch)
@property
def exists(self):
path = os.path.join(self.dirname, self.filename)
return os.path.isfile(path)
@property
def tags(self):
for pyver in self.pyver:
for abi in self.abi:
for arch in self.arch:
yield pyver, abi, arch
@cached_property
def metadata(self):
pathname = os.path.join(self.dirname, self.filename)
name_ver = '%s-%s' % (self.name, self.version)
info_dir = '%s.dist-info' % name_ver
wrapper = codecs.getreader('utf-8')
with ZipFile(pathname, 'r') as zf:
wheel_metadata = self.get_wheel_metadata(zf)
wv = wheel_metadata['Wheel-Version'].split('.', 1)
file_version = tuple([int(i) for i in wv])
# if file_version < (1, 1):
# fns = [WHEEL_METADATA_FILENAME, METADATA_FILENAME,
# LEGACY_METADATA_FILENAME]
# else:
# fns = [WHEEL_METADATA_FILENAME, METADATA_FILENAME]
fns = [WHEEL_METADATA_FILENAME, LEGACY_METADATA_FILENAME]
result = None
for fn in fns:
try:
metadata_filename = posixpath.join(info_dir, fn)
with zf.open(metadata_filename) as bf:
wf = wrapper(bf)
result = Metadata(fileobj=wf)
if result:
break
except KeyError:
pass
if not result:
raise ValueError('Invalid wheel, because metadata is '
'missing: looked in %s' % ', '.join(fns))
return result
def get_wheel_metadata(self, zf):
name_ver = '%s-%s' % (self.name, self.version)
info_dir = '%s.dist-info' % name_ver
metadata_filename = posixpath.join(info_dir, 'WHEEL')
with zf.open(metadata_filename) as bf:
wf = codecs.getreader('utf-8')(bf)
message = message_from_file(wf)
return dict(message)
@cached_property
def info(self):
pathname = os.path.join(self.dirname, self.filename)
with ZipFile(pathname, 'r') as zf:
result = self.get_wheel_metadata(zf)
return result
def process_shebang(self, data):
m = SHEBANG_RE.match(data)
if m:
end = m.end()
shebang, data_after_shebang = data[:end], data[end:]
# Preserve any arguments after the interpreter
if b'pythonw' in shebang.lower():
shebang_python = SHEBANG_PYTHONW
else:
shebang_python = SHEBANG_PYTHON
m = SHEBANG_DETAIL_RE.match(shebang)
if m:
args = b' ' + m.groups()[-1]
else:
args = b''
shebang = shebang_python + args
data = shebang + data_after_shebang
else:
cr = data.find(b'\r')
lf = data.find(b'\n')
if cr < 0 or cr > lf:
term = b'\n'
else:
if data[cr:cr + 2] == b'\r\n':
term = b'\r\n'
else:
term = b'\r'
data = SHEBANG_PYTHON + term + data
return data
def get_hash(self, data, hash_kind=None):
if hash_kind is None:
hash_kind = self.hash_kind
try:
hasher = getattr(hashlib, hash_kind)
except AttributeError:
raise DistlibException('Unsupported hash algorithm: %r' % hash_kind)
result = hasher(data).digest()
result = base64.urlsafe_b64encode(result).rstrip(b'=').decode('ascii')
return hash_kind, result
def write_record(self, records, record_path, archive_record_path):
records = list(records) # make a copy, as mutated
records.append((archive_record_path, '', ''))
with CSVWriter(record_path) as writer:
for row in records:
writer.writerow(row)
def write_records(self, info, libdir, archive_paths):
records = []
distinfo, info_dir = info
hasher = getattr(hashlib, self.hash_kind)
for ap, p in archive_paths:
with open(p, 'rb') as f:
data = f.read()
digest = '%s=%s' % self.get_hash(data)
size = os.path.getsize(p)
records.append((ap, digest, size))
p = os.path.join(distinfo, 'RECORD')
ap = to_posix(os.path.join(info_dir, 'RECORD'))
self.write_record(records, p, ap)
archive_paths.append((ap, p))
def build_zip(self, pathname, archive_paths):
with ZipFile(pathname, 'w', zipfile.ZIP_DEFLATED) as zf:
for ap, p in archive_paths:
logger.debug('Wrote %s to %s in wheel', p, ap)
zf.write(p, ap)
def build(self, paths, tags=None, wheel_version=None):
"""
Build a wheel from files in specified paths, and use any specified tags
when determining the name of the wheel.
"""
if tags is None:
tags = {}
libkey = list(filter(lambda o: o in paths, ('purelib', 'platlib')))[0]
if libkey == 'platlib':
is_pure = 'false'
default_pyver = [IMPVER]
default_abi = [ABI]
default_arch = [ARCH]
else:
is_pure = 'true'
default_pyver = [PYVER]
default_abi = ['none']
default_arch = ['any']
self.pyver = tags.get('pyver', default_pyver)
self.abi = tags.get('abi', default_abi)
self.arch = tags.get('arch', default_arch)
libdir = paths[libkey]
name_ver = '%s-%s' % (self.name, self.version)
data_dir = '%s.data' % name_ver
info_dir = '%s.dist-info' % name_ver
archive_paths = []
# First, stuff which is not in site-packages
for key in ('data', 'headers', 'scripts'):
if key not in paths:
continue
path = paths[key]
if os.path.isdir(path):
for root, dirs, files in os.walk(path):
for fn in files:
p = fsdecode(os.path.join(root, fn))
rp = os.path.relpath(p, path)
ap = to_posix(os.path.join(data_dir, key, rp))
archive_paths.append((ap, p))
if key == 'scripts' and not p.endswith('.exe'):
with open(p, 'rb') as f:
data = f.read()
data = self.process_shebang(data)
with open(p, 'wb') as f:
f.write(data)
# Now, stuff which is in site-packages, other than the
# distinfo stuff.
path = libdir
distinfo = None
for root, dirs, files in os.walk(path):
if root == path:
# At the top level only, save distinfo for later
# and skip it for now
for i, dn in enumerate(dirs):
dn = fsdecode(dn)
if dn.endswith('.dist-info'):
distinfo = os.path.join(root, dn)
del dirs[i]
break
assert distinfo, '.dist-info directory expected, not found'
for fn in files:
# comment out next suite to leave .pyc files in
if fsdecode(fn).endswith(('.pyc', '.pyo')):
continue
p = os.path.join(root, fn)
rp = to_posix(os.path.relpath(p, path))
archive_paths.append((rp, p))
# Now distinfo. Assumed to be flat, i.e. os.listdir is enough.
files = os.listdir(distinfo)
for fn in files:
if fn not in ('RECORD', 'INSTALLER', 'SHARED', 'WHEEL'):
p = fsdecode(os.path.join(distinfo, fn))
ap = to_posix(os.path.join(info_dir, fn))
archive_paths.append((ap, p))
wheel_metadata = [
'Wheel-Version: %d.%d' % (wheel_version or self.wheel_version),
'Generator: distlib %s' % __version__,
'Root-Is-Purelib: %s' % is_pure,
]
for pyver, abi, arch in self.tags:
wheel_metadata.append('Tag: %s-%s-%s' % (pyver, abi, arch))
p = os.path.join(distinfo, 'WHEEL')
with open(p, 'w') as f:
f.write('\n'.join(wheel_metadata))
ap = to_posix(os.path.join(info_dir, 'WHEEL'))
archive_paths.append((ap, p))
# sort the entries by archive path. Not needed by any spec, but it
# keeps the archive listing and RECORD tidier than they would otherwise
# be. Use the number of path segments to keep directory entries together,
# and keep the dist-info stuff at the end.
def sorter(t):
ap = t[0]
n = ap.count('/')
if '.dist-info' in ap:
n += 10000
return (n, ap)
archive_paths = sorted(archive_paths, key=sorter)
# Now, at last, RECORD.
# Paths in here are archive paths - nothing else makes sense.
self.write_records((distinfo, info_dir), libdir, archive_paths)
# Now, ready to build the zip file
pathname = os.path.join(self.dirname, self.filename)
self.build_zip(pathname, archive_paths)
return pathname
def skip_entry(self, arcname):
"""
Determine whether an archive entry should be skipped when verifying
or installing.
"""
# The signature file won't be in RECORD,
# and we don't currently don't do anything with it
# We also skip directories, as they won't be in RECORD
# either. See:
#
# https://github.com/pypa/wheel/issues/294
# https://github.com/pypa/wheel/issues/287
# https://github.com/pypa/wheel/pull/289
#
return arcname.endswith(('/', '/RECORD.jws'))
def install(self, paths, maker, **kwargs):
"""
Install a wheel to the specified paths. If kwarg ``warner`` is
specified, it should be a callable, which will be called with two
tuples indicating the wheel version of this software and the wheel
version in the file, if there is a discrepancy in the versions.
This can be used to issue any warnings to raise any exceptions.
If kwarg ``lib_only`` is True, only the purelib/platlib files are
installed, and the headers, scripts, data and dist-info metadata are
not written. If kwarg ``bytecode_hashed_invalidation`` is True, written
bytecode will try to use file-hash based invalidation (PEP-552) on
supported interpreter versions (CPython 2.7+).
The return value is a :class:`InstalledDistribution` instance unless
``options.lib_only`` is True, in which case the return value is ``None``.
"""
dry_run = maker.dry_run
warner = kwargs.get('warner')
lib_only = kwargs.get('lib_only', False)
bc_hashed_invalidation = kwargs.get('bytecode_hashed_invalidation', False)
pathname = os.path.join(self.dirname, self.filename)
name_ver = '%s-%s' % (self.name, self.version)
data_dir = '%s.data' % name_ver
info_dir = '%s.dist-info' % name_ver
metadata_name = posixpath.join(info_dir, LEGACY_METADATA_FILENAME)
wheel_metadata_name = posixpath.join(info_dir, 'WHEEL')
record_name = posixpath.join(info_dir, 'RECORD')
wrapper = codecs.getreader('utf-8')
with ZipFile(pathname, 'r') as zf:
with zf.open(wheel_metadata_name) as bwf:
wf = wrapper(bwf)
message = message_from_file(wf)
wv = message['Wheel-Version'].split('.', 1)
file_version = tuple([int(i) for i in wv])
if (file_version != self.wheel_version) and warner:
warner(self.wheel_version, file_version)
if message['Root-Is-Purelib'] == 'true':
libdir = paths['purelib']
else:
libdir = paths['platlib']
records = {}
with zf.open(record_name) as bf:
with CSVReader(stream=bf) as reader:
for row in reader:
p = row[0]
records[p] = row
data_pfx = posixpath.join(data_dir, '')
info_pfx = posixpath.join(info_dir, '')
script_pfx = posixpath.join(data_dir, 'scripts', '')
# make a new instance rather than a copy of maker's,
# as we mutate it
fileop = FileOperator(dry_run=dry_run)
fileop.record = True # so we can rollback if needed
bc = not sys.dont_write_bytecode # Double negatives. Lovely!
outfiles = [] # for RECORD writing
# for script copying/shebang processing
workdir = tempfile.mkdtemp()
# set target dir later
# we default add_launchers to False, as the
# Python Launcher should be used instead
maker.source_dir = workdir
maker.target_dir = None
try:
for zinfo in zf.infolist():
arcname = zinfo.filename
if isinstance(arcname, text_type):
u_arcname = arcname
else:
u_arcname = arcname.decode('utf-8')
if self.skip_entry(u_arcname):
continue
row = records[u_arcname]
if row[2] and str(zinfo.file_size) != row[2]:
raise DistlibException('size mismatch for '
'%s' % u_arcname)
if row[1]:
kind, value = row[1].split('=', 1)
with zf.open(arcname) as bf:
data = bf.read()
_, digest = self.get_hash(data, kind)
if digest != value:
raise DistlibException('digest mismatch for '
'%s' % arcname)
if lib_only and u_arcname.startswith((info_pfx, data_pfx)):
logger.debug('lib_only: skipping %s', u_arcname)
continue
is_script = (u_arcname.startswith(script_pfx)
and not u_arcname.endswith('.exe'))
if u_arcname.startswith(data_pfx):
_, where, rp = u_arcname.split('/', 2)
outfile = os.path.join(paths[where], convert_path(rp))
else:
# meant for site-packages.
if u_arcname in (wheel_metadata_name, record_name):
continue
outfile = os.path.join(libdir, convert_path(u_arcname))
if not is_script:
with zf.open(arcname) as bf:
fileop.copy_stream(bf, outfile)
# Issue #147: permission bits aren't preserved. Using
# zf.extract(zinfo, libdir) should have worked, but didn't,
# see https://www.thetopsites.net/article/53834422.shtml
# So ... manually preserve permission bits as given in zinfo
if os.name == 'posix':
# just set the normal permission bits
os.chmod(outfile, (zinfo.external_attr >> 16) & 0x1FF)
outfiles.append(outfile)
# Double check the digest of the written file
if not dry_run and row[1]:
with open(outfile, 'rb') as bf:
data = bf.read()
_, newdigest = self.get_hash(data, kind)
if newdigest != digest:
raise DistlibException('digest mismatch '
'on write for '
'%s' % outfile)
if bc and outfile.endswith('.py'):
try:
pyc = fileop.byte_compile(outfile,
hashed_invalidation=bc_hashed_invalidation)
outfiles.append(pyc)
except Exception:
# Don't give up if byte-compilation fails,
# but log it and perhaps warn the user
logger.warning('Byte-compilation failed',
exc_info=True)
else:
fn = os.path.basename(convert_path(arcname))
workname = os.path.join(workdir, fn)
with zf.open(arcname) as bf:
fileop.copy_stream(bf, workname)
dn, fn = os.path.split(outfile)
maker.target_dir = dn
filenames = maker.make(fn)
fileop.set_executable_mode(filenames)
outfiles.extend(filenames)
if lib_only:
logger.debug('lib_only: returning None')
dist = None
else:
# Generate scripts
# Try to get pydist.json so we can see if there are
# any commands to generate. If this fails (e.g. because
# of a legacy wheel), log a warning but don't give up.
commands = None
file_version = self.info['Wheel-Version']
if file_version == '1.0':
# Use legacy info
ep = posixpath.join(info_dir, 'entry_points.txt')
try:
with zf.open(ep) as bwf:
epdata = read_exports(bwf)
commands = {}
for key in ('console', 'gui'):
k = '%s_scripts' % key
if k in epdata:
commands['wrap_%s' % key] = d = {}
for v in epdata[k].values():
s = '%s:%s' % (v.prefix, v.suffix)
if v.flags:
s += ' [%s]' % ','.join(v.flags)
d[v.name] = s
except Exception:
logger.warning('Unable to read legacy script '
'metadata, so cannot generate '
'scripts')
else:
try:
with zf.open(metadata_name) as bwf:
wf = wrapper(bwf)
commands = json.load(wf).get('extensions')
if commands:
commands = commands.get('python.commands')
except Exception:
logger.warning('Unable to read JSON metadata, so '
'cannot generate scripts')
if commands:
console_scripts = commands.get('wrap_console', {})
gui_scripts = commands.get('wrap_gui', {})
if console_scripts or gui_scripts:
script_dir = paths.get('scripts', '')
if not os.path.isdir(script_dir):
raise ValueError('Valid script path not '
'specified')
maker.target_dir = script_dir
for k, v in console_scripts.items():
script = '%s = %s' % (k, v)
filenames = maker.make(script)
fileop.set_executable_mode(filenames)
if gui_scripts:
options = {'gui': True }
for k, v in gui_scripts.items():
script = '%s = %s' % (k, v)
filenames = maker.make(script, options)
fileop.set_executable_mode(filenames)
p = os.path.join(libdir, info_dir)
dist = InstalledDistribution(p)
# Write SHARED
paths = dict(paths) # don't change passed in dict
del paths['purelib']
del paths['platlib']
paths['lib'] = libdir
p = dist.write_shared_locations(paths, dry_run)
if p:
outfiles.append(p)
# Write RECORD
dist.write_installed_files(outfiles, paths['prefix'],
dry_run)
return dist
except Exception: # pragma: no cover
logger.exception('installation failed.')
fileop.rollback()
raise
finally:
shutil.rmtree(workdir)
def _get_dylib_cache(self):
global cache
if cache is None:
# Use native string to avoid issues on 2.x: see Python #20140.
base = os.path.join(get_cache_base(), str('dylib-cache'),
'%s.%s' % sys.version_info[:2])
cache = Cache(base)
return cache
def _get_extensions(self):
pathname = os.path.join(self.dirname, self.filename)
name_ver = '%s-%s' % (self.name, self.version)
info_dir = '%s.dist-info' % name_ver
arcname = posixpath.join(info_dir, 'EXTENSIONS')
wrapper = codecs.getreader('utf-8')
result = []
with ZipFile(pathname, 'r') as zf:
try:
with zf.open(arcname) as bf:
wf = wrapper(bf)
extensions = json.load(wf)
cache = self._get_dylib_cache()
prefix = cache.prefix_to_dir(pathname)
cache_base = os.path.join(cache.base, prefix)
if not os.path.isdir(cache_base):
os.makedirs(cache_base)
for name, relpath in extensions.items():
dest = os.path.join(cache_base, convert_path(relpath))
if not os.path.exists(dest):
extract = True
else:
file_time = os.stat(dest).st_mtime
file_time = datetime.datetime.fromtimestamp(file_time)
info = zf.getinfo(relpath)
wheel_time = datetime.datetime(*info.date_time)
extract = wheel_time > file_time
if extract:
zf.extract(relpath, cache_base)
result.append((name, dest))
except KeyError:
pass
return result
def is_compatible(self):
"""
Determine if a wheel is compatible with the running system.
"""
return is_compatible(self)
def is_mountable(self):
"""
Determine if a wheel is asserted as mountable by its metadata.
"""
return True # for now - metadata details TBD
def mount(self, append=False):
pathname = os.path.abspath(os.path.join(self.dirname, self.filename))
if not self.is_compatible():
msg = 'Wheel %s not compatible with this Python.' % pathname
raise DistlibException(msg)
if not self.is_mountable():
msg = 'Wheel %s is marked as not mountable.' % pathname
raise DistlibException(msg)
if pathname in sys.path:
logger.debug('%s already in path', pathname)
else:
if append:
sys.path.append(pathname)
else:
sys.path.insert(0, pathname)
extensions = self._get_extensions()
if extensions:
if _hook not in sys.meta_path:
sys.meta_path.append(_hook)
_hook.add(pathname, extensions)
def unmount(self):
pathname = os.path.abspath(os.path.join(self.dirname, self.filename))
if pathname not in sys.path:
logger.debug('%s not in path', pathname)
else:
sys.path.remove(pathname)
if pathname in _hook.impure_wheels:
_hook.remove(pathname)
if not _hook.impure_wheels:
if _hook in sys.meta_path:
sys.meta_path.remove(_hook)
def verify(self):
pathname = os.path.join(self.dirname, self.filename)
name_ver = '%s-%s' % (self.name, self.version)
data_dir = '%s.data' % name_ver
info_dir = '%s.dist-info' % name_ver
metadata_name = posixpath.join(info_dir, LEGACY_METADATA_FILENAME)
wheel_metadata_name = posixpath.join(info_dir, 'WHEEL')
record_name = posixpath.join(info_dir, 'RECORD')
wrapper = codecs.getreader('utf-8')
with ZipFile(pathname, 'r') as zf:
with zf.open(wheel_metadata_name) as bwf:
wf = wrapper(bwf)
message = message_from_file(wf)
wv = message['Wheel-Version'].split('.', 1)
file_version = tuple([int(i) for i in wv])
# TODO version verification
records = {}
with zf.open(record_name) as bf:
with CSVReader(stream=bf) as reader:
for row in reader:
p = row[0]
records[p] = row
for zinfo in zf.infolist():
arcname = zinfo.filename
if isinstance(arcname, text_type):
u_arcname = arcname
else:
u_arcname = arcname.decode('utf-8')
# See issue #115: some wheels have .. in their entries, but
# in the filename ... e.g. __main__..py ! So the check is
# updated to look for .. in the directory portions
p = u_arcname.split('/')
if '..' in p:
raise DistlibException('invalid entry in '
'wheel: %r' % u_arcname)
if self.skip_entry(u_arcname):
continue
row = records[u_arcname]
if row[2] and str(zinfo.file_size) != row[2]:
raise DistlibException('size mismatch for '
'%s' % u_arcname)
if row[1]:
kind, value = row[1].split('=', 1)
with zf.open(arcname) as bf:
data = bf.read()
_, digest = self.get_hash(data, kind)
if digest != value:
raise DistlibException('digest mismatch for '
'%s' % arcname)
def update(self, modifier, dest_dir=None, **kwargs):
"""
Update the contents of a wheel in a generic way. The modifier should
be a callable which expects a dictionary argument: its keys are
archive-entry paths, and its values are absolute filesystem paths
where the contents the corresponding archive entries can be found. The
modifier is free to change the contents of the files pointed to, add
new entries and remove entries, before returning. This method will
extract the entire contents of the wheel to a temporary location, call
the modifier, and then use the passed (and possibly updated)
dictionary to write a new wheel. If ``dest_dir`` is specified, the new
wheel is written there -- otherwise, the original wheel is overwritten.
The modifier should return True if it updated the wheel, else False.
This method returns the same value the modifier returns.
"""
def get_version(path_map, info_dir):
version = path = None
key = '%s/%s' % (info_dir, LEGACY_METADATA_FILENAME)
if key not in path_map:
key = '%s/PKG-INFO' % info_dir
if key in path_map:
path = path_map[key]
version = Metadata(path=path).version
return version, path
def update_version(version, path):
updated = None
try:
v = NormalizedVersion(version)
i = version.find('-')
if i < 0:
updated = '%s+1' % version
else:
parts = [int(s) for s in version[i + 1:].split('.')]
parts[-1] += 1
updated = '%s+%s' % (version[:i],
'.'.join(str(i) for i in parts))
except UnsupportedVersionError:
logger.debug('Cannot update non-compliant (PEP-440) '
'version %r', version)
if updated:
md = Metadata(path=path)
md.version = updated
legacy = path.endswith(LEGACY_METADATA_FILENAME)
md.write(path=path, legacy=legacy)
logger.debug('Version updated from %r to %r', version,
updated)
pathname = os.path.join(self.dirname, self.filename)
name_ver = '%s-%s' % (self.name, self.version)
info_dir = '%s.dist-info' % name_ver
record_name = posixpath.join(info_dir, 'RECORD')
with tempdir() as workdir:
with ZipFile(pathname, 'r') as zf:
path_map = {}
for zinfo in zf.infolist():
arcname = zinfo.filename
if isinstance(arcname, text_type):
u_arcname = arcname
else:
u_arcname = arcname.decode('utf-8')
if u_arcname == record_name:
continue
if '..' in u_arcname:
raise DistlibException('invalid entry in '
'wheel: %r' % u_arcname)
zf.extract(zinfo, workdir)
path = os.path.join(workdir, convert_path(u_arcname))
path_map[u_arcname] = path
# Remember the version.
original_version, _ = get_version(path_map, info_dir)
# Files extracted. Call the modifier.
modified = modifier(path_map, **kwargs)
if modified:
# Something changed - need to build a new wheel.
current_version, path = get_version(path_map, info_dir)
if current_version and (current_version == original_version):
# Add or update local version to signify changes.
update_version(current_version, path)
# Decide where the new wheel goes.
if dest_dir is None:
fd, newpath = tempfile.mkstemp(suffix='.whl',
prefix='wheel-update-',
dir=workdir)
os.close(fd)
else:
if not os.path.isdir(dest_dir):
raise DistlibException('Not a directory: %r' % dest_dir)
newpath = os.path.join(dest_dir, self.filename)
archive_paths = list(path_map.items())
distinfo = os.path.join(workdir, info_dir)
info = distinfo, info_dir
self.write_records(info, workdir, archive_paths)
self.build_zip(newpath, archive_paths)
if dest_dir is None:
shutil.copyfile(newpath, pathname)
return modified
def _get_glibc_version():
import platform
ver = platform.libc_ver()
result = []
if ver[0] == 'glibc':
for s in ver[1].split('.'):
result.append(int(s) if s.isdigit() else 0)
result = tuple(result)
return result
def compatible_tags():
"""
Return (pyver, abi, arch) tuples compatible with this Python.
"""
versions = [VER_SUFFIX]
major = VER_SUFFIX[0]
for minor in range(sys.version_info[1] - 1, - 1, -1):
versions.append(''.join([major, str(minor)]))
abis = []
for suffix in _get_suffixes():
if suffix.startswith('.abi'):
abis.append(suffix.split('.', 2)[1])
abis.sort()
if ABI != 'none':
abis.insert(0, ABI)
abis.append('none')
result = []
arches = [ARCH]
if sys.platform == 'darwin':
m = re.match(r'(\w+)_(\d+)_(\d+)_(\w+)$', ARCH)
if m:
name, major, minor, arch = m.groups()
minor = int(minor)
matches = [arch]
if arch in ('i386', 'ppc'):
matches.append('fat')
if arch in ('i386', 'ppc', 'x86_64'):
matches.append('fat3')
if arch in ('ppc64', 'x86_64'):
matches.append('fat64')
if arch in ('i386', 'x86_64'):
matches.append('intel')
if arch in ('i386', 'x86_64', 'intel', 'ppc', 'ppc64'):
matches.append('universal')
while minor >= 0:
for match in matches:
s = '%s_%s_%s_%s' % (name, major, minor, match)
if s != ARCH: # already there
arches.append(s)
minor -= 1
# Most specific - our Python version, ABI and arch
for abi in abis:
for arch in arches:
result.append((''.join((IMP_PREFIX, versions[0])), abi, arch))
# manylinux
if abi != 'none' and sys.platform.startswith('linux'):
arch = arch.replace('linux_', '')
parts = _get_glibc_version()
if len(parts) == 2:
if parts >= (2, 5):
result.append((''.join((IMP_PREFIX, versions[0])), abi,
'manylinux1_%s' % arch))
if parts >= (2, 12):
result.append((''.join((IMP_PREFIX, versions[0])), abi,
'manylinux2010_%s' % arch))
if parts >= (2, 17):
result.append((''.join((IMP_PREFIX, versions[0])), abi,
'manylinux2014_%s' % arch))
result.append((''.join((IMP_PREFIX, versions[0])), abi,
'manylinux_%s_%s_%s' % (parts[0], parts[1],
arch)))
# where no ABI / arch dependency, but IMP_PREFIX dependency
for i, version in enumerate(versions):
result.append((''.join((IMP_PREFIX, version)), 'none', 'any'))
if i == 0:
result.append((''.join((IMP_PREFIX, version[0])), 'none', 'any'))
# no IMP_PREFIX, ABI or arch dependency
for i, version in enumerate(versions):
result.append((''.join(('py', version)), 'none', 'any'))
if i == 0:
result.append((''.join(('py', version[0])), 'none', 'any'))
return set(result)
COMPATIBLE_TAGS = compatible_tags()
del compatible_tags
def is_compatible(wheel, tags=None):
if not isinstance(wheel, Wheel):
wheel = Wheel(wheel) # assume it's a filename
result = False
if tags is None:
tags = COMPATIBLE_TAGS
for ver, abi, arch in tags:
if ver in wheel.pyver and abi in wheel.abi and arch in wheel.arch:
result = True
break
return result
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/distlib/wheel.py
|
Python
|
mit
| 43,898 |
from .distro import (
NORMALIZED_DISTRO_ID,
NORMALIZED_LSB_ID,
NORMALIZED_OS_ID,
LinuxDistribution,
__version__,
build_number,
codename,
distro_release_attr,
distro_release_info,
id,
info,
like,
linux_distribution,
lsb_release_attr,
lsb_release_info,
major_version,
minor_version,
name,
os_release_attr,
os_release_info,
uname_attr,
uname_info,
version,
version_parts,
)
__all__ = [
"NORMALIZED_DISTRO_ID",
"NORMALIZED_LSB_ID",
"NORMALIZED_OS_ID",
"LinuxDistribution",
"build_number",
"codename",
"distro_release_attr",
"distro_release_info",
"id",
"info",
"like",
"linux_distribution",
"lsb_release_attr",
"lsb_release_info",
"major_version",
"minor_version",
"name",
"os_release_attr",
"os_release_info",
"uname_attr",
"uname_info",
"version",
"version_parts",
]
__version__ = __version__
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/distro/__init__.py
|
Python
|
mit
| 981 |
from .distro import main
if __name__ == "__main__":
main()
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/distro/__main__.py
|
Python
|
mit
| 64 |
#!/usr/bin/env python
# Copyright 2015,2016,2017 Nir Cohen
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""
The ``distro`` package (``distro`` stands for Linux Distribution) provides
information about the Linux distribution it runs on, such as a reliable
machine-readable distro ID, or version information.
It is the recommended replacement for Python's original
:py:func:`platform.linux_distribution` function, but it provides much more
functionality. An alternative implementation became necessary because Python
3.5 deprecated this function, and Python 3.8 removed it altogether. Its
predecessor function :py:func:`platform.dist` was already deprecated since
Python 2.6 and removed in Python 3.8. Still, there are many cases in which
access to OS distribution information is needed. See `Python issue 1322
<https://bugs.python.org/issue1322>`_ for more information.
"""
import argparse
import json
import logging
import os
import re
import shlex
import subprocess
import sys
import warnings
from typing import (
Any,
Callable,
Dict,
Iterable,
Optional,
Sequence,
TextIO,
Tuple,
Type,
)
try:
from typing import TypedDict
except ImportError:
# Python 3.7
TypedDict = dict
__version__ = "1.7.0"
class VersionDict(TypedDict):
major: str
minor: str
build_number: str
class InfoDict(TypedDict):
id: str
version: str
version_parts: VersionDict
like: str
codename: str
_UNIXCONFDIR = os.environ.get("UNIXCONFDIR", "/etc")
_UNIXUSRLIBDIR = os.environ.get("UNIXUSRLIBDIR", "/usr/lib")
_OS_RELEASE_BASENAME = "os-release"
#: Translation table for normalizing the "ID" attribute defined in os-release
#: files, for use by the :func:`distro.id` method.
#:
#: * Key: Value as defined in the os-release file, translated to lower case,
#: with blanks translated to underscores.
#:
#: * Value: Normalized value.
NORMALIZED_OS_ID = {
"ol": "oracle", # Oracle Linux
"opensuse-leap": "opensuse", # Newer versions of OpenSuSE report as opensuse-leap
}
#: Translation table for normalizing the "Distributor ID" attribute returned by
#: the lsb_release command, for use by the :func:`distro.id` method.
#:
#: * Key: Value as returned by the lsb_release command, translated to lower
#: case, with blanks translated to underscores.
#:
#: * Value: Normalized value.
NORMALIZED_LSB_ID = {
"enterpriseenterpriseas": "oracle", # Oracle Enterprise Linux 4
"enterpriseenterpriseserver": "oracle", # Oracle Linux 5
"redhatenterpriseworkstation": "rhel", # RHEL 6, 7 Workstation
"redhatenterpriseserver": "rhel", # RHEL 6, 7 Server
"redhatenterprisecomputenode": "rhel", # RHEL 6 ComputeNode
}
#: Translation table for normalizing the distro ID derived from the file name
#: of distro release files, for use by the :func:`distro.id` method.
#:
#: * Key: Value as derived from the file name of a distro release file,
#: translated to lower case, with blanks translated to underscores.
#:
#: * Value: Normalized value.
NORMALIZED_DISTRO_ID = {
"redhat": "rhel", # RHEL 6.x, 7.x
}
# Pattern for content of distro release file (reversed)
_DISTRO_RELEASE_CONTENT_REVERSED_PATTERN = re.compile(
r"(?:[^)]*\)(.*)\()? *(?:STL )?([\d.+\-a-z]*\d) *(?:esaeler *)?(.+)"
)
# Pattern for base file name of distro release file
_DISTRO_RELEASE_BASENAME_PATTERN = re.compile(r"(\w+)[-_](release|version)$")
# Base file names to be ignored when searching for distro release file
_DISTRO_RELEASE_IGNORE_BASENAMES = (
"debian_version",
"lsb-release",
"oem-release",
_OS_RELEASE_BASENAME,
"system-release",
"plesk-release",
"iredmail-release",
)
def linux_distribution(full_distribution_name: bool = True) -> Tuple[str, str, str]:
"""
.. deprecated:: 1.6.0
:func:`distro.linux_distribution()` is deprecated. It should only be
used as a compatibility shim with Python's
:py:func:`platform.linux_distribution()`. Please use :func:`distro.id`,
:func:`distro.version` and :func:`distro.name` instead.
Return information about the current OS distribution as a tuple
``(id_name, version, codename)`` with items as follows:
* ``id_name``: If *full_distribution_name* is false, the result of
:func:`distro.id`. Otherwise, the result of :func:`distro.name`.
* ``version``: The result of :func:`distro.version`.
* ``codename``: The extra item (usually in parentheses) after the
os-release version number, or the result of :func:`distro.codename`.
The interface of this function is compatible with the original
:py:func:`platform.linux_distribution` function, supporting a subset of
its parameters.
The data it returns may not exactly be the same, because it uses more data
sources than the original function, and that may lead to different data if
the OS distribution is not consistent across multiple data sources it
provides (there are indeed such distributions ...).
Another reason for differences is the fact that the :func:`distro.id`
method normalizes the distro ID string to a reliable machine-readable value
for a number of popular OS distributions.
"""
warnings.warn(
"distro.linux_distribution() is deprecated. It should only be used as a "
"compatibility shim with Python's platform.linux_distribution(). Please use "
"distro.id(), distro.version() and distro.name() instead.",
DeprecationWarning,
stacklevel=2,
)
return _distro.linux_distribution(full_distribution_name)
def id() -> str:
"""
Return the distro ID of the current distribution, as a
machine-readable string.
For a number of OS distributions, the returned distro ID value is
*reliable*, in the sense that it is documented and that it does not change
across releases of the distribution.
This package maintains the following reliable distro ID values:
============== =========================================
Distro ID Distribution
============== =========================================
"ubuntu" Ubuntu
"debian" Debian
"rhel" RedHat Enterprise Linux
"centos" CentOS
"fedora" Fedora
"sles" SUSE Linux Enterprise Server
"opensuse" openSUSE
"amzn" Amazon Linux
"arch" Arch Linux
"cloudlinux" CloudLinux OS
"exherbo" Exherbo Linux
"gentoo" GenToo Linux
"ibm_powerkvm" IBM PowerKVM
"kvmibm" KVM for IBM z Systems
"linuxmint" Linux Mint
"mageia" Mageia
"mandriva" Mandriva Linux
"parallels" Parallels
"pidora" Pidora
"raspbian" Raspbian
"oracle" Oracle Linux (and Oracle Enterprise Linux)
"scientific" Scientific Linux
"slackware" Slackware
"xenserver" XenServer
"openbsd" OpenBSD
"netbsd" NetBSD
"freebsd" FreeBSD
"midnightbsd" MidnightBSD
"rocky" Rocky Linux
"aix" AIX
============== =========================================
If you have a need to get distros for reliable IDs added into this set,
or if you find that the :func:`distro.id` function returns a different
distro ID for one of the listed distros, please create an issue in the
`distro issue tracker`_.
**Lookup hierarchy and transformations:**
First, the ID is obtained from the following sources, in the specified
order. The first available and non-empty value is used:
* the value of the "ID" attribute of the os-release file,
* the value of the "Distributor ID" attribute returned by the lsb_release
command,
* the first part of the file name of the distro release file,
The so determined ID value then passes the following transformations,
before it is returned by this method:
* it is translated to lower case,
* blanks (which should not be there anyway) are translated to underscores,
* a normalization of the ID is performed, based upon
`normalization tables`_. The purpose of this normalization is to ensure
that the ID is as reliable as possible, even across incompatible changes
in the OS distributions. A common reason for an incompatible change is
the addition of an os-release file, or the addition of the lsb_release
command, with ID values that differ from what was previously determined
from the distro release file name.
"""
return _distro.id()
def name(pretty: bool = False) -> str:
"""
Return the name of the current OS distribution, as a human-readable
string.
If *pretty* is false, the name is returned without version or codename.
(e.g. "CentOS Linux")
If *pretty* is true, the version and codename are appended.
(e.g. "CentOS Linux 7.1.1503 (Core)")
**Lookup hierarchy:**
The name is obtained from the following sources, in the specified order.
The first available and non-empty value is used:
* If *pretty* is false:
- the value of the "NAME" attribute of the os-release file,
- the value of the "Distributor ID" attribute returned by the lsb_release
command,
- the value of the "<name>" field of the distro release file.
* If *pretty* is true:
- the value of the "PRETTY_NAME" attribute of the os-release file,
- the value of the "Description" attribute returned by the lsb_release
command,
- the value of the "<name>" field of the distro release file, appended
with the value of the pretty version ("<version_id>" and "<codename>"
fields) of the distro release file, if available.
"""
return _distro.name(pretty)
def version(pretty: bool = False, best: bool = False) -> str:
"""
Return the version of the current OS distribution, as a human-readable
string.
If *pretty* is false, the version is returned without codename (e.g.
"7.0").
If *pretty* is true, the codename in parenthesis is appended, if the
codename is non-empty (e.g. "7.0 (Maipo)").
Some distributions provide version numbers with different precisions in
the different sources of distribution information. Examining the different
sources in a fixed priority order does not always yield the most precise
version (e.g. for Debian 8.2, or CentOS 7.1).
Some other distributions may not provide this kind of information. In these
cases, an empty string would be returned. This behavior can be observed
with rolling releases distributions (e.g. Arch Linux).
The *best* parameter can be used to control the approach for the returned
version:
If *best* is false, the first non-empty version number in priority order of
the examined sources is returned.
If *best* is true, the most precise version number out of all examined
sources is returned.
**Lookup hierarchy:**
In all cases, the version number is obtained from the following sources.
If *best* is false, this order represents the priority order:
* the value of the "VERSION_ID" attribute of the os-release file,
* the value of the "Release" attribute returned by the lsb_release
command,
* the version number parsed from the "<version_id>" field of the first line
of the distro release file,
* the version number parsed from the "PRETTY_NAME" attribute of the
os-release file, if it follows the format of the distro release files.
* the version number parsed from the "Description" attribute returned by
the lsb_release command, if it follows the format of the distro release
files.
"""
return _distro.version(pretty, best)
def version_parts(best: bool = False) -> Tuple[str, str, str]:
"""
Return the version of the current OS distribution as a tuple
``(major, minor, build_number)`` with items as follows:
* ``major``: The result of :func:`distro.major_version`.
* ``minor``: The result of :func:`distro.minor_version`.
* ``build_number``: The result of :func:`distro.build_number`.
For a description of the *best* parameter, see the :func:`distro.version`
method.
"""
return _distro.version_parts(best)
def major_version(best: bool = False) -> str:
"""
Return the major version of the current OS distribution, as a string,
if provided.
Otherwise, the empty string is returned. The major version is the first
part of the dot-separated version string.
For a description of the *best* parameter, see the :func:`distro.version`
method.
"""
return _distro.major_version(best)
def minor_version(best: bool = False) -> str:
"""
Return the minor version of the current OS distribution, as a string,
if provided.
Otherwise, the empty string is returned. The minor version is the second
part of the dot-separated version string.
For a description of the *best* parameter, see the :func:`distro.version`
method.
"""
return _distro.minor_version(best)
def build_number(best: bool = False) -> str:
"""
Return the build number of the current OS distribution, as a string,
if provided.
Otherwise, the empty string is returned. The build number is the third part
of the dot-separated version string.
For a description of the *best* parameter, see the :func:`distro.version`
method.
"""
return _distro.build_number(best)
def like() -> str:
"""
Return a space-separated list of distro IDs of distributions that are
closely related to the current OS distribution in regards to packaging
and programming interfaces, for example distributions the current
distribution is a derivative from.
**Lookup hierarchy:**
This information item is only provided by the os-release file.
For details, see the description of the "ID_LIKE" attribute in the
`os-release man page
<http://www.freedesktop.org/software/systemd/man/os-release.html>`_.
"""
return _distro.like()
def codename() -> str:
"""
Return the codename for the release of the current OS distribution,
as a string.
If the distribution does not have a codename, an empty string is returned.
Note that the returned codename is not always really a codename. For
example, openSUSE returns "x86_64". This function does not handle such
cases in any special way and just returns the string it finds, if any.
**Lookup hierarchy:**
* the codename within the "VERSION" attribute of the os-release file, if
provided,
* the value of the "Codename" attribute returned by the lsb_release
command,
* the value of the "<codename>" field of the distro release file.
"""
return _distro.codename()
def info(pretty: bool = False, best: bool = False) -> InfoDict:
"""
Return certain machine-readable information items about the current OS
distribution in a dictionary, as shown in the following example:
.. sourcecode:: python
{
'id': 'rhel',
'version': '7.0',
'version_parts': {
'major': '7',
'minor': '0',
'build_number': ''
},
'like': 'fedora',
'codename': 'Maipo'
}
The dictionary structure and keys are always the same, regardless of which
information items are available in the underlying data sources. The values
for the various keys are as follows:
* ``id``: The result of :func:`distro.id`.
* ``version``: The result of :func:`distro.version`.
* ``version_parts -> major``: The result of :func:`distro.major_version`.
* ``version_parts -> minor``: The result of :func:`distro.minor_version`.
* ``version_parts -> build_number``: The result of
:func:`distro.build_number`.
* ``like``: The result of :func:`distro.like`.
* ``codename``: The result of :func:`distro.codename`.
For a description of the *pretty* and *best* parameters, see the
:func:`distro.version` method.
"""
return _distro.info(pretty, best)
def os_release_info() -> Dict[str, str]:
"""
Return a dictionary containing key-value pairs for the information items
from the os-release file data source of the current OS distribution.
See `os-release file`_ for details about these information items.
"""
return _distro.os_release_info()
def lsb_release_info() -> Dict[str, str]:
"""
Return a dictionary containing key-value pairs for the information items
from the lsb_release command data source of the current OS distribution.
See `lsb_release command output`_ for details about these information
items.
"""
return _distro.lsb_release_info()
def distro_release_info() -> Dict[str, str]:
"""
Return a dictionary containing key-value pairs for the information items
from the distro release file data source of the current OS distribution.
See `distro release file`_ for details about these information items.
"""
return _distro.distro_release_info()
def uname_info() -> Dict[str, str]:
"""
Return a dictionary containing key-value pairs for the information items
from the distro release file data source of the current OS distribution.
"""
return _distro.uname_info()
def os_release_attr(attribute: str) -> str:
"""
Return a single named information item from the os-release file data source
of the current OS distribution.
Parameters:
* ``attribute`` (string): Key of the information item.
Returns:
* (string): Value of the information item, if the item exists.
The empty string, if the item does not exist.
See `os-release file`_ for details about these information items.
"""
return _distro.os_release_attr(attribute)
def lsb_release_attr(attribute: str) -> str:
"""
Return a single named information item from the lsb_release command output
data source of the current OS distribution.
Parameters:
* ``attribute`` (string): Key of the information item.
Returns:
* (string): Value of the information item, if the item exists.
The empty string, if the item does not exist.
See `lsb_release command output`_ for details about these information
items.
"""
return _distro.lsb_release_attr(attribute)
def distro_release_attr(attribute: str) -> str:
"""
Return a single named information item from the distro release file
data source of the current OS distribution.
Parameters:
* ``attribute`` (string): Key of the information item.
Returns:
* (string): Value of the information item, if the item exists.
The empty string, if the item does not exist.
See `distro release file`_ for details about these information items.
"""
return _distro.distro_release_attr(attribute)
def uname_attr(attribute: str) -> str:
"""
Return a single named information item from the distro release file
data source of the current OS distribution.
Parameters:
* ``attribute`` (string): Key of the information item.
Returns:
* (string): Value of the information item, if the item exists.
The empty string, if the item does not exist.
"""
return _distro.uname_attr(attribute)
try:
from functools import cached_property
except ImportError:
# Python < 3.8
class cached_property: # type: ignore
"""A version of @property which caches the value. On access, it calls the
underlying function and sets the value in `__dict__` so future accesses
will not re-call the property.
"""
def __init__(self, f: Callable[[Any], Any]) -> None:
self._fname = f.__name__
self._f = f
def __get__(self, obj: Any, owner: Type[Any]) -> Any:
assert obj is not None, f"call {self._fname} on an instance"
ret = obj.__dict__[self._fname] = self._f(obj)
return ret
class LinuxDistribution:
"""
Provides information about a OS distribution.
This package creates a private module-global instance of this class with
default initialization arguments, that is used by the
`consolidated accessor functions`_ and `single source accessor functions`_.
By using default initialization arguments, that module-global instance
returns data about the current OS distribution (i.e. the distro this
package runs on).
Normally, it is not necessary to create additional instances of this class.
However, in situations where control is needed over the exact data sources
that are used, instances of this class can be created with a specific
distro release file, or a specific os-release file, or without invoking the
lsb_release command.
"""
def __init__(
self,
include_lsb: Optional[bool] = None,
os_release_file: str = "",
distro_release_file: str = "",
include_uname: Optional[bool] = None,
root_dir: Optional[str] = None,
include_oslevel: Optional[bool] = None,
) -> None:
"""
The initialization method of this class gathers information from the
available data sources, and stores that in private instance attributes.
Subsequent access to the information items uses these private instance
attributes, so that the data sources are read only once.
Parameters:
* ``include_lsb`` (bool): Controls whether the
`lsb_release command output`_ is included as a data source.
If the lsb_release command is not available in the program execution
path, the data source for the lsb_release command will be empty.
* ``os_release_file`` (string): The path name of the
`os-release file`_ that is to be used as a data source.
An empty string (the default) will cause the default path name to
be used (see `os-release file`_ for details).
If the specified or defaulted os-release file does not exist, the
data source for the os-release file will be empty.
* ``distro_release_file`` (string): The path name of the
`distro release file`_ that is to be used as a data source.
An empty string (the default) will cause a default search algorithm
to be used (see `distro release file`_ for details).
If the specified distro release file does not exist, or if no default
distro release file can be found, the data source for the distro
release file will be empty.
* ``include_uname`` (bool): Controls whether uname command output is
included as a data source. If the uname command is not available in
the program execution path the data source for the uname command will
be empty.
* ``root_dir`` (string): The absolute path to the root directory to use
to find distro-related information files. Note that ``include_*``
parameters must not be enabled in combination with ``root_dir``.
* ``include_oslevel`` (bool): Controls whether (AIX) oslevel command
output is included as a data source. If the oslevel command is not
available in the program execution path the data source will be
empty.
Public instance attributes:
* ``os_release_file`` (string): The path name of the
`os-release file`_ that is actually used as a data source. The
empty string if no distro release file is used as a data source.
* ``distro_release_file`` (string): The path name of the
`distro release file`_ that is actually used as a data source. The
empty string if no distro release file is used as a data source.
* ``include_lsb`` (bool): The result of the ``include_lsb`` parameter.
This controls whether the lsb information will be loaded.
* ``include_uname`` (bool): The result of the ``include_uname``
parameter. This controls whether the uname information will
be loaded.
* ``include_oslevel`` (bool): The result of the ``include_oslevel``
parameter. This controls whether (AIX) oslevel information will be
loaded.
* ``root_dir`` (string): The result of the ``root_dir`` parameter.
The absolute path to the root directory to use to find distro-related
information files.
Raises:
* :py:exc:`ValueError`: Initialization parameters combination is not
supported.
* :py:exc:`OSError`: Some I/O issue with an os-release file or distro
release file.
* :py:exc:`UnicodeError`: A data source has unexpected characters or
uses an unexpected encoding.
"""
self.root_dir = root_dir
self.etc_dir = os.path.join(root_dir, "etc") if root_dir else _UNIXCONFDIR
self.usr_lib_dir = (
os.path.join(root_dir, "usr/lib") if root_dir else _UNIXUSRLIBDIR
)
if os_release_file:
self.os_release_file = os_release_file
else:
etc_dir_os_release_file = os.path.join(self.etc_dir, _OS_RELEASE_BASENAME)
usr_lib_os_release_file = os.path.join(
self.usr_lib_dir, _OS_RELEASE_BASENAME
)
# NOTE: The idea is to respect order **and** have it set
# at all times for API backwards compatibility.
if os.path.isfile(etc_dir_os_release_file) or not os.path.isfile(
usr_lib_os_release_file
):
self.os_release_file = etc_dir_os_release_file
else:
self.os_release_file = usr_lib_os_release_file
self.distro_release_file = distro_release_file or "" # updated later
is_root_dir_defined = root_dir is not None
if is_root_dir_defined and (include_lsb or include_uname or include_oslevel):
raise ValueError(
"Including subprocess data sources from specific root_dir is disallowed"
" to prevent false information"
)
self.include_lsb = (
include_lsb if include_lsb is not None else not is_root_dir_defined
)
self.include_uname = (
include_uname if include_uname is not None else not is_root_dir_defined
)
self.include_oslevel = (
include_oslevel if include_oslevel is not None else not is_root_dir_defined
)
def __repr__(self) -> str:
"""Return repr of all info"""
return (
"LinuxDistribution("
"os_release_file={self.os_release_file!r}, "
"distro_release_file={self.distro_release_file!r}, "
"include_lsb={self.include_lsb!r}, "
"include_uname={self.include_uname!r}, "
"include_oslevel={self.include_oslevel!r}, "
"root_dir={self.root_dir!r}, "
"_os_release_info={self._os_release_info!r}, "
"_lsb_release_info={self._lsb_release_info!r}, "
"_distro_release_info={self._distro_release_info!r}, "
"_uname_info={self._uname_info!r}, "
"_oslevel_info={self._oslevel_info!r})".format(self=self)
)
def linux_distribution(
self, full_distribution_name: bool = True
) -> Tuple[str, str, str]:
"""
Return information about the OS distribution that is compatible
with Python's :func:`platform.linux_distribution`, supporting a subset
of its parameters.
For details, see :func:`distro.linux_distribution`.
"""
return (
self.name() if full_distribution_name else self.id(),
self.version(),
self._os_release_info.get("release_codename") or self.codename(),
)
def id(self) -> str:
"""Return the distro ID of the OS distribution, as a string.
For details, see :func:`distro.id`.
"""
def normalize(distro_id: str, table: Dict[str, str]) -> str:
distro_id = distro_id.lower().replace(" ", "_")
return table.get(distro_id, distro_id)
distro_id = self.os_release_attr("id")
if distro_id:
return normalize(distro_id, NORMALIZED_OS_ID)
distro_id = self.lsb_release_attr("distributor_id")
if distro_id:
return normalize(distro_id, NORMALIZED_LSB_ID)
distro_id = self.distro_release_attr("id")
if distro_id:
return normalize(distro_id, NORMALIZED_DISTRO_ID)
distro_id = self.uname_attr("id")
if distro_id:
return normalize(distro_id, NORMALIZED_DISTRO_ID)
return ""
def name(self, pretty: bool = False) -> str:
"""
Return the name of the OS distribution, as a string.
For details, see :func:`distro.name`.
"""
name = (
self.os_release_attr("name")
or self.lsb_release_attr("distributor_id")
or self.distro_release_attr("name")
or self.uname_attr("name")
)
if pretty:
name = self.os_release_attr("pretty_name") or self.lsb_release_attr(
"description"
)
if not name:
name = self.distro_release_attr("name") or self.uname_attr("name")
version = self.version(pretty=True)
if version:
name = f"{name} {version}"
return name or ""
def version(self, pretty: bool = False, best: bool = False) -> str:
"""
Return the version of the OS distribution, as a string.
For details, see :func:`distro.version`.
"""
versions = [
self.os_release_attr("version_id"),
self.lsb_release_attr("release"),
self.distro_release_attr("version_id"),
self._parse_distro_release_content(self.os_release_attr("pretty_name")).get(
"version_id", ""
),
self._parse_distro_release_content(
self.lsb_release_attr("description")
).get("version_id", ""),
self.uname_attr("release"),
]
if self.uname_attr("id").startswith("aix"):
# On AIX platforms, prefer oslevel command output.
versions.insert(0, self.oslevel_info())
version = ""
if best:
# This algorithm uses the last version in priority order that has
# the best precision. If the versions are not in conflict, that
# does not matter; otherwise, using the last one instead of the
# first one might be considered a surprise.
for v in versions:
if v.count(".") > version.count(".") or version == "":
version = v
else:
for v in versions:
if v != "":
version = v
break
if pretty and version and self.codename():
version = f"{version} ({self.codename()})"
return version
def version_parts(self, best: bool = False) -> Tuple[str, str, str]:
"""
Return the version of the OS distribution, as a tuple of version
numbers.
For details, see :func:`distro.version_parts`.
"""
version_str = self.version(best=best)
if version_str:
version_regex = re.compile(r"(\d+)\.?(\d+)?\.?(\d+)?")
matches = version_regex.match(version_str)
if matches:
major, minor, build_number = matches.groups()
return major, minor or "", build_number or ""
return "", "", ""
def major_version(self, best: bool = False) -> str:
"""
Return the major version number of the current distribution.
For details, see :func:`distro.major_version`.
"""
return self.version_parts(best)[0]
def minor_version(self, best: bool = False) -> str:
"""
Return the minor version number of the current distribution.
For details, see :func:`distro.minor_version`.
"""
return self.version_parts(best)[1]
def build_number(self, best: bool = False) -> str:
"""
Return the build number of the current distribution.
For details, see :func:`distro.build_number`.
"""
return self.version_parts(best)[2]
def like(self) -> str:
"""
Return the IDs of distributions that are like the OS distribution.
For details, see :func:`distro.like`.
"""
return self.os_release_attr("id_like") or ""
def codename(self) -> str:
"""
Return the codename of the OS distribution.
For details, see :func:`distro.codename`.
"""
try:
# Handle os_release specially since distros might purposefully set
# this to empty string to have no codename
return self._os_release_info["codename"]
except KeyError:
return (
self.lsb_release_attr("codename")
or self.distro_release_attr("codename")
or ""
)
def info(self, pretty: bool = False, best: bool = False) -> InfoDict:
"""
Return certain machine-readable information about the OS
distribution.
For details, see :func:`distro.info`.
"""
return dict(
id=self.id(),
version=self.version(pretty, best),
version_parts=dict(
major=self.major_version(best),
minor=self.minor_version(best),
build_number=self.build_number(best),
),
like=self.like(),
codename=self.codename(),
)
def os_release_info(self) -> Dict[str, str]:
"""
Return a dictionary containing key-value pairs for the information
items from the os-release file data source of the OS distribution.
For details, see :func:`distro.os_release_info`.
"""
return self._os_release_info
def lsb_release_info(self) -> Dict[str, str]:
"""
Return a dictionary containing key-value pairs for the information
items from the lsb_release command data source of the OS
distribution.
For details, see :func:`distro.lsb_release_info`.
"""
return self._lsb_release_info
def distro_release_info(self) -> Dict[str, str]:
"""
Return a dictionary containing key-value pairs for the information
items from the distro release file data source of the OS
distribution.
For details, see :func:`distro.distro_release_info`.
"""
return self._distro_release_info
def uname_info(self) -> Dict[str, str]:
"""
Return a dictionary containing key-value pairs for the information
items from the uname command data source of the OS distribution.
For details, see :func:`distro.uname_info`.
"""
return self._uname_info
def oslevel_info(self) -> str:
"""
Return AIX' oslevel command output.
"""
return self._oslevel_info
def os_release_attr(self, attribute: str) -> str:
"""
Return a single named information item from the os-release file data
source of the OS distribution.
For details, see :func:`distro.os_release_attr`.
"""
return self._os_release_info.get(attribute, "")
def lsb_release_attr(self, attribute: str) -> str:
"""
Return a single named information item from the lsb_release command
output data source of the OS distribution.
For details, see :func:`distro.lsb_release_attr`.
"""
return self._lsb_release_info.get(attribute, "")
def distro_release_attr(self, attribute: str) -> str:
"""
Return a single named information item from the distro release file
data source of the OS distribution.
For details, see :func:`distro.distro_release_attr`.
"""
return self._distro_release_info.get(attribute, "")
def uname_attr(self, attribute: str) -> str:
"""
Return a single named information item from the uname command
output data source of the OS distribution.
For details, see :func:`distro.uname_attr`.
"""
return self._uname_info.get(attribute, "")
@cached_property
def _os_release_info(self) -> Dict[str, str]:
"""
Get the information items from the specified os-release file.
Returns:
A dictionary containing all information items.
"""
if os.path.isfile(self.os_release_file):
with open(self.os_release_file, encoding="utf-8") as release_file:
return self._parse_os_release_content(release_file)
return {}
@staticmethod
def _parse_os_release_content(lines: TextIO) -> Dict[str, str]:
"""
Parse the lines of an os-release file.
Parameters:
* lines: Iterable through the lines in the os-release file.
Each line must be a unicode string or a UTF-8 encoded byte
string.
Returns:
A dictionary containing all information items.
"""
props = {}
lexer = shlex.shlex(lines, posix=True)
lexer.whitespace_split = True
tokens = list(lexer)
for token in tokens:
# At this point, all shell-like parsing has been done (i.e.
# comments processed, quotes and backslash escape sequences
# processed, multi-line values assembled, trailing newlines
# stripped, etc.), so the tokens are now either:
# * variable assignments: var=value
# * commands or their arguments (not allowed in os-release)
# Ignore any tokens that are not variable assignments
if "=" in token:
k, v = token.split("=", 1)
props[k.lower()] = v
if "version" in props:
# extract release codename (if any) from version attribute
match = re.search(r"\((\D+)\)|,\s*(\D+)", props["version"])
if match:
release_codename = match.group(1) or match.group(2)
props["codename"] = props["release_codename"] = release_codename
if "version_codename" in props:
# os-release added a version_codename field. Use that in
# preference to anything else Note that some distros purposefully
# do not have code names. They should be setting
# version_codename=""
props["codename"] = props["version_codename"]
elif "ubuntu_codename" in props:
# Same as above but a non-standard field name used on older Ubuntus
props["codename"] = props["ubuntu_codename"]
return props
@cached_property
def _lsb_release_info(self) -> Dict[str, str]:
"""
Get the information items from the lsb_release command output.
Returns:
A dictionary containing all information items.
"""
if not self.include_lsb:
return {}
try:
cmd = ("lsb_release", "-a")
stdout = subprocess.check_output(cmd, stderr=subprocess.DEVNULL)
# Command not found or lsb_release returned error
except (OSError, subprocess.CalledProcessError):
return {}
content = self._to_str(stdout).splitlines()
return self._parse_lsb_release_content(content)
@staticmethod
def _parse_lsb_release_content(lines: Iterable[str]) -> Dict[str, str]:
"""
Parse the output of the lsb_release command.
Parameters:
* lines: Iterable through the lines of the lsb_release output.
Each line must be a unicode string or a UTF-8 encoded byte
string.
Returns:
A dictionary containing all information items.
"""
props = {}
for line in lines:
kv = line.strip("\n").split(":", 1)
if len(kv) != 2:
# Ignore lines without colon.
continue
k, v = kv
props.update({k.replace(" ", "_").lower(): v.strip()})
return props
@cached_property
def _uname_info(self) -> Dict[str, str]:
if not self.include_uname:
return {}
try:
cmd = ("uname", "-rs")
stdout = subprocess.check_output(cmd, stderr=subprocess.DEVNULL)
except OSError:
return {}
content = self._to_str(stdout).splitlines()
return self._parse_uname_content(content)
@cached_property
def _oslevel_info(self) -> str:
if not self.include_oslevel:
return ""
try:
stdout = subprocess.check_output("oslevel", stderr=subprocess.DEVNULL)
except (OSError, subprocess.CalledProcessError):
return ""
return self._to_str(stdout).strip()
@staticmethod
def _parse_uname_content(lines: Sequence[str]) -> Dict[str, str]:
if not lines:
return {}
props = {}
match = re.search(r"^([^\s]+)\s+([\d\.]+)", lines[0].strip())
if match:
name, version = match.groups()
# This is to prevent the Linux kernel version from
# appearing as the 'best' version on otherwise
# identifiable distributions.
if name == "Linux":
return {}
props["id"] = name.lower()
props["name"] = name
props["release"] = version
return props
@staticmethod
def _to_str(bytestring: bytes) -> str:
encoding = sys.getfilesystemencoding()
return bytestring.decode(encoding)
@cached_property
def _distro_release_info(self) -> Dict[str, str]:
"""
Get the information items from the specified distro release file.
Returns:
A dictionary containing all information items.
"""
if self.distro_release_file:
# If it was specified, we use it and parse what we can, even if
# its file name or content does not match the expected pattern.
distro_info = self._parse_distro_release_file(self.distro_release_file)
basename = os.path.basename(self.distro_release_file)
# The file name pattern for user-specified distro release files
# is somewhat more tolerant (compared to when searching for the
# file), because we want to use what was specified as best as
# possible.
match = _DISTRO_RELEASE_BASENAME_PATTERN.match(basename)
if "name" in distro_info and "cloudlinux" in distro_info["name"].lower():
distro_info["id"] = "cloudlinux"
elif match:
distro_info["id"] = match.group(1)
return distro_info
else:
try:
basenames = os.listdir(self.etc_dir)
# We sort for repeatability in cases where there are multiple
# distro specific files; e.g. CentOS, Oracle, Enterprise all
# containing `redhat-release` on top of their own.
basenames.sort()
except OSError:
# This may occur when /etc is not readable but we can't be
# sure about the *-release files. Check common entries of
# /etc for information. If they turn out to not be there the
# error is handled in `_parse_distro_release_file()`.
basenames = [
"SuSE-release",
"arch-release",
"base-release",
"centos-release",
"fedora-release",
"gentoo-release",
"mageia-release",
"mandrake-release",
"mandriva-release",
"mandrivalinux-release",
"manjaro-release",
"oracle-release",
"redhat-release",
"rocky-release",
"sl-release",
"slackware-version",
]
for basename in basenames:
if basename in _DISTRO_RELEASE_IGNORE_BASENAMES:
continue
match = _DISTRO_RELEASE_BASENAME_PATTERN.match(basename)
if match:
filepath = os.path.join(self.etc_dir, basename)
distro_info = self._parse_distro_release_file(filepath)
if "name" in distro_info:
# The name is always present if the pattern matches
self.distro_release_file = filepath
distro_info["id"] = match.group(1)
if "cloudlinux" in distro_info["name"].lower():
distro_info["id"] = "cloudlinux"
return distro_info
return {}
def _parse_distro_release_file(self, filepath: str) -> Dict[str, str]:
"""
Parse a distro release file.
Parameters:
* filepath: Path name of the distro release file.
Returns:
A dictionary containing all information items.
"""
try:
with open(filepath, encoding="utf-8") as fp:
# Only parse the first line. For instance, on SLES there
# are multiple lines. We don't want them...
return self._parse_distro_release_content(fp.readline())
except OSError:
# Ignore not being able to read a specific, seemingly version
# related file.
# See https://github.com/python-distro/distro/issues/162
return {}
@staticmethod
def _parse_distro_release_content(line: str) -> Dict[str, str]:
"""
Parse a line from a distro release file.
Parameters:
* line: Line from the distro release file. Must be a unicode string
or a UTF-8 encoded byte string.
Returns:
A dictionary containing all information items.
"""
matches = _DISTRO_RELEASE_CONTENT_REVERSED_PATTERN.match(line.strip()[::-1])
distro_info = {}
if matches:
# regexp ensures non-None
distro_info["name"] = matches.group(3)[::-1]
if matches.group(2):
distro_info["version_id"] = matches.group(2)[::-1]
if matches.group(1):
distro_info["codename"] = matches.group(1)[::-1]
elif line:
distro_info["name"] = line.strip()
return distro_info
_distro = LinuxDistribution()
def main() -> None:
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
logger.addHandler(logging.StreamHandler(sys.stdout))
parser = argparse.ArgumentParser(description="OS distro info tool")
parser.add_argument(
"--json", "-j", help="Output in machine readable format", action="store_true"
)
parser.add_argument(
"--root-dir",
"-r",
type=str,
dest="root_dir",
help="Path to the root filesystem directory (defaults to /)",
)
args = parser.parse_args()
if args.root_dir:
dist = LinuxDistribution(
include_lsb=False,
include_uname=False,
include_oslevel=False,
root_dir=args.root_dir,
)
else:
dist = _distro
if args.json:
logger.info(json.dumps(dist.info(), indent=4, sort_keys=True))
else:
logger.info("Name: %s", dist.name(pretty=True))
distribution_version = dist.version(pretty=True)
logger.info("Version: %s", distribution_version)
distribution_codename = dist.codename()
logger.info("Codename: %s", distribution_codename)
if __name__ == "__main__":
main()
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/distro/distro.py
|
Python
|
mit
| 48,841 |
from .package_data import __version__
from .core import (
IDNABidiError,
IDNAError,
InvalidCodepoint,
InvalidCodepointContext,
alabel,
check_bidi,
check_hyphen_ok,
check_initial_combiner,
check_label,
check_nfc,
decode,
encode,
ulabel,
uts46_remap,
valid_contextj,
valid_contexto,
valid_label_length,
valid_string_length,
)
from .intranges import intranges_contain
__all__ = [
"IDNABidiError",
"IDNAError",
"InvalidCodepoint",
"InvalidCodepointContext",
"alabel",
"check_bidi",
"check_hyphen_ok",
"check_initial_combiner",
"check_label",
"check_nfc",
"decode",
"encode",
"intranges_contain",
"ulabel",
"uts46_remap",
"valid_contextj",
"valid_contexto",
"valid_label_length",
"valid_string_length",
]
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/idna/__init__.py
|
Python
|
mit
| 849 |
from .core import encode, decode, alabel, ulabel, IDNAError
import codecs
import re
from typing import Tuple, Optional
_unicode_dots_re = re.compile('[\u002e\u3002\uff0e\uff61]')
class Codec(codecs.Codec):
def encode(self, data: str, errors: str = 'strict') -> Tuple[bytes, int]:
if errors != 'strict':
raise IDNAError('Unsupported error handling \"{}\"'.format(errors))
if not data:
return b"", 0
return encode(data), len(data)
def decode(self, data: bytes, errors: str = 'strict') -> Tuple[str, int]:
if errors != 'strict':
raise IDNAError('Unsupported error handling \"{}\"'.format(errors))
if not data:
return '', 0
return decode(data), len(data)
class IncrementalEncoder(codecs.BufferedIncrementalEncoder):
def _buffer_encode(self, data: str, errors: str, final: bool) -> Tuple[str, int]: # type: ignore
if errors != 'strict':
raise IDNAError('Unsupported error handling \"{}\"'.format(errors))
if not data:
return "", 0
labels = _unicode_dots_re.split(data)
trailing_dot = ''
if labels:
if not labels[-1]:
trailing_dot = '.'
del labels[-1]
elif not final:
# Keep potentially unfinished label until the next call
del labels[-1]
if labels:
trailing_dot = '.'
result = []
size = 0
for label in labels:
result.append(alabel(label))
if size:
size += 1
size += len(label)
# Join with U+002E
result_str = '.'.join(result) + trailing_dot # type: ignore
size += len(trailing_dot)
return result_str, size
class IncrementalDecoder(codecs.BufferedIncrementalDecoder):
def _buffer_decode(self, data: str, errors: str, final: bool) -> Tuple[str, int]: # type: ignore
if errors != 'strict':
raise IDNAError('Unsupported error handling \"{}\"'.format(errors))
if not data:
return ('', 0)
labels = _unicode_dots_re.split(data)
trailing_dot = ''
if labels:
if not labels[-1]:
trailing_dot = '.'
del labels[-1]
elif not final:
# Keep potentially unfinished label until the next call
del labels[-1]
if labels:
trailing_dot = '.'
result = []
size = 0
for label in labels:
result.append(ulabel(label))
if size:
size += 1
size += len(label)
result_str = '.'.join(result) + trailing_dot
size += len(trailing_dot)
return (result_str, size)
class StreamWriter(Codec, codecs.StreamWriter):
pass
class StreamReader(Codec, codecs.StreamReader):
pass
def getregentry() -> codecs.CodecInfo:
# Compatibility as a search_function for codecs.register()
return codecs.CodecInfo(
name='idna',
encode=Codec().encode, # type: ignore
decode=Codec().decode, # type: ignore
incrementalencoder=IncrementalEncoder,
incrementaldecoder=IncrementalDecoder,
streamwriter=StreamWriter,
streamreader=StreamReader,
)
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/idna/codec.py
|
Python
|
mit
| 3,374 |
from .core import *
from .codec import *
from typing import Any, Union
def ToASCII(label: str) -> bytes:
return encode(label)
def ToUnicode(label: Union[bytes, bytearray]) -> str:
return decode(label)
def nameprep(s: Any) -> None:
raise NotImplementedError('IDNA 2008 does not utilise nameprep protocol')
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/idna/compat.py
|
Python
|
mit
| 321 |
from . import idnadata
import bisect
import unicodedata
import re
from typing import Union, Optional
from .intranges import intranges_contain
_virama_combining_class = 9
_alabel_prefix = b'xn--'
_unicode_dots_re = re.compile('[\u002e\u3002\uff0e\uff61]')
class IDNAError(UnicodeError):
""" Base exception for all IDNA-encoding related problems """
pass
class IDNABidiError(IDNAError):
""" Exception when bidirectional requirements are not satisfied """
pass
class InvalidCodepoint(IDNAError):
""" Exception when a disallowed or unallocated codepoint is used """
pass
class InvalidCodepointContext(IDNAError):
""" Exception when the codepoint is not valid in the context it is used """
pass
def _combining_class(cp: int) -> int:
v = unicodedata.combining(chr(cp))
if v == 0:
if not unicodedata.name(chr(cp)):
raise ValueError('Unknown character in unicodedata')
return v
def _is_script(cp: str, script: str) -> bool:
return intranges_contain(ord(cp), idnadata.scripts[script])
def _punycode(s: str) -> bytes:
return s.encode('punycode')
def _unot(s: int) -> str:
return 'U+{:04X}'.format(s)
def valid_label_length(label: Union[bytes, str]) -> bool:
if len(label) > 63:
return False
return True
def valid_string_length(label: Union[bytes, str], trailing_dot: bool) -> bool:
if len(label) > (254 if trailing_dot else 253):
return False
return True
def check_bidi(label: str, check_ltr: bool = False) -> bool:
# Bidi rules should only be applied if string contains RTL characters
bidi_label = False
for (idx, cp) in enumerate(label, 1):
direction = unicodedata.bidirectional(cp)
if direction == '':
# String likely comes from a newer version of Unicode
raise IDNABidiError('Unknown directionality in label {} at position {}'.format(repr(label), idx))
if direction in ['R', 'AL', 'AN']:
bidi_label = True
if not bidi_label and not check_ltr:
return True
# Bidi rule 1
direction = unicodedata.bidirectional(label[0])
if direction in ['R', 'AL']:
rtl = True
elif direction == 'L':
rtl = False
else:
raise IDNABidiError('First codepoint in label {} must be directionality L, R or AL'.format(repr(label)))
valid_ending = False
number_type = None # type: Optional[str]
for (idx, cp) in enumerate(label, 1):
direction = unicodedata.bidirectional(cp)
if rtl:
# Bidi rule 2
if not direction in ['R', 'AL', 'AN', 'EN', 'ES', 'CS', 'ET', 'ON', 'BN', 'NSM']:
raise IDNABidiError('Invalid direction for codepoint at position {} in a right-to-left label'.format(idx))
# Bidi rule 3
if direction in ['R', 'AL', 'EN', 'AN']:
valid_ending = True
elif direction != 'NSM':
valid_ending = False
# Bidi rule 4
if direction in ['AN', 'EN']:
if not number_type:
number_type = direction
else:
if number_type != direction:
raise IDNABidiError('Can not mix numeral types in a right-to-left label')
else:
# Bidi rule 5
if not direction in ['L', 'EN', 'ES', 'CS', 'ET', 'ON', 'BN', 'NSM']:
raise IDNABidiError('Invalid direction for codepoint at position {} in a left-to-right label'.format(idx))
# Bidi rule 6
if direction in ['L', 'EN']:
valid_ending = True
elif direction != 'NSM':
valid_ending = False
if not valid_ending:
raise IDNABidiError('Label ends with illegal codepoint directionality')
return True
def check_initial_combiner(label: str) -> bool:
if unicodedata.category(label[0])[0] == 'M':
raise IDNAError('Label begins with an illegal combining character')
return True
def check_hyphen_ok(label: str) -> bool:
if label[2:4] == '--':
raise IDNAError('Label has disallowed hyphens in 3rd and 4th position')
if label[0] == '-' or label[-1] == '-':
raise IDNAError('Label must not start or end with a hyphen')
return True
def check_nfc(label: str) -> None:
if unicodedata.normalize('NFC', label) != label:
raise IDNAError('Label must be in Normalization Form C')
def valid_contextj(label: str, pos: int) -> bool:
cp_value = ord(label[pos])
if cp_value == 0x200c:
if pos > 0:
if _combining_class(ord(label[pos - 1])) == _virama_combining_class:
return True
ok = False
for i in range(pos-1, -1, -1):
joining_type = idnadata.joining_types.get(ord(label[i]))
if joining_type == ord('T'):
continue
if joining_type in [ord('L'), ord('D')]:
ok = True
break
if not ok:
return False
ok = False
for i in range(pos+1, len(label)):
joining_type = idnadata.joining_types.get(ord(label[i]))
if joining_type == ord('T'):
continue
if joining_type in [ord('R'), ord('D')]:
ok = True
break
return ok
if cp_value == 0x200d:
if pos > 0:
if _combining_class(ord(label[pos - 1])) == _virama_combining_class:
return True
return False
else:
return False
def valid_contexto(label: str, pos: int, exception: bool = False) -> bool:
cp_value = ord(label[pos])
if cp_value == 0x00b7:
if 0 < pos < len(label)-1:
if ord(label[pos - 1]) == 0x006c and ord(label[pos + 1]) == 0x006c:
return True
return False
elif cp_value == 0x0375:
if pos < len(label)-1 and len(label) > 1:
return _is_script(label[pos + 1], 'Greek')
return False
elif cp_value == 0x05f3 or cp_value == 0x05f4:
if pos > 0:
return _is_script(label[pos - 1], 'Hebrew')
return False
elif cp_value == 0x30fb:
for cp in label:
if cp == '\u30fb':
continue
if _is_script(cp, 'Hiragana') or _is_script(cp, 'Katakana') or _is_script(cp, 'Han'):
return True
return False
elif 0x660 <= cp_value <= 0x669:
for cp in label:
if 0x6f0 <= ord(cp) <= 0x06f9:
return False
return True
elif 0x6f0 <= cp_value <= 0x6f9:
for cp in label:
if 0x660 <= ord(cp) <= 0x0669:
return False
return True
return False
def check_label(label: Union[str, bytes, bytearray]) -> None:
if isinstance(label, (bytes, bytearray)):
label = label.decode('utf-8')
if len(label) == 0:
raise IDNAError('Empty Label')
check_nfc(label)
check_hyphen_ok(label)
check_initial_combiner(label)
for (pos, cp) in enumerate(label):
cp_value = ord(cp)
if intranges_contain(cp_value, idnadata.codepoint_classes['PVALID']):
continue
elif intranges_contain(cp_value, idnadata.codepoint_classes['CONTEXTJ']):
try:
if not valid_contextj(label, pos):
raise InvalidCodepointContext('Joiner {} not allowed at position {} in {}'.format(
_unot(cp_value), pos+1, repr(label)))
except ValueError:
raise IDNAError('Unknown codepoint adjacent to joiner {} at position {} in {}'.format(
_unot(cp_value), pos+1, repr(label)))
elif intranges_contain(cp_value, idnadata.codepoint_classes['CONTEXTO']):
if not valid_contexto(label, pos):
raise InvalidCodepointContext('Codepoint {} not allowed at position {} in {}'.format(_unot(cp_value), pos+1, repr(label)))
else:
raise InvalidCodepoint('Codepoint {} at position {} of {} not allowed'.format(_unot(cp_value), pos+1, repr(label)))
check_bidi(label)
def alabel(label: str) -> bytes:
try:
label_bytes = label.encode('ascii')
ulabel(label_bytes)
if not valid_label_length(label_bytes):
raise IDNAError('Label too long')
return label_bytes
except UnicodeEncodeError:
pass
if not label:
raise IDNAError('No Input')
label = str(label)
check_label(label)
label_bytes = _punycode(label)
label_bytes = _alabel_prefix + label_bytes
if not valid_label_length(label_bytes):
raise IDNAError('Label too long')
return label_bytes
def ulabel(label: Union[str, bytes, bytearray]) -> str:
if not isinstance(label, (bytes, bytearray)):
try:
label_bytes = label.encode('ascii')
except UnicodeEncodeError:
check_label(label)
return label
else:
label_bytes = label
label_bytes = label_bytes.lower()
if label_bytes.startswith(_alabel_prefix):
label_bytes = label_bytes[len(_alabel_prefix):]
if not label_bytes:
raise IDNAError('Malformed A-label, no Punycode eligible content found')
if label_bytes.decode('ascii')[-1] == '-':
raise IDNAError('A-label must not end with a hyphen')
else:
check_label(label_bytes)
return label_bytes.decode('ascii')
try:
label = label_bytes.decode('punycode')
except UnicodeError:
raise IDNAError('Invalid A-label')
check_label(label)
return label
def uts46_remap(domain: str, std3_rules: bool = True, transitional: bool = False) -> str:
"""Re-map the characters in the string according to UTS46 processing."""
from .uts46data import uts46data
output = ''
for pos, char in enumerate(domain):
code_point = ord(char)
try:
uts46row = uts46data[code_point if code_point < 256 else
bisect.bisect_left(uts46data, (code_point, 'Z')) - 1]
status = uts46row[1]
replacement = None # type: Optional[str]
if len(uts46row) == 3:
replacement = uts46row[2] # type: ignore
if (status == 'V' or
(status == 'D' and not transitional) or
(status == '3' and not std3_rules and replacement is None)):
output += char
elif replacement is not None and (status == 'M' or
(status == '3' and not std3_rules) or
(status == 'D' and transitional)):
output += replacement
elif status != 'I':
raise IndexError()
except IndexError:
raise InvalidCodepoint(
'Codepoint {} not allowed at position {} in {}'.format(
_unot(code_point), pos + 1, repr(domain)))
return unicodedata.normalize('NFC', output)
def encode(s: Union[str, bytes, bytearray], strict: bool = False, uts46: bool = False, std3_rules: bool = False, transitional: bool = False) -> bytes:
if isinstance(s, (bytes, bytearray)):
try:
s = s.decode('ascii')
except UnicodeDecodeError:
raise IDNAError('should pass a unicode string to the function rather than a byte string.')
if uts46:
s = uts46_remap(s, std3_rules, transitional)
trailing_dot = False
result = []
if strict:
labels = s.split('.')
else:
labels = _unicode_dots_re.split(s)
if not labels or labels == ['']:
raise IDNAError('Empty domain')
if labels[-1] == '':
del labels[-1]
trailing_dot = True
for label in labels:
s = alabel(label)
if s:
result.append(s)
else:
raise IDNAError('Empty label')
if trailing_dot:
result.append(b'')
s = b'.'.join(result)
if not valid_string_length(s, trailing_dot):
raise IDNAError('Domain too long')
return s
def decode(s: Union[str, bytes, bytearray], strict: bool = False, uts46: bool = False, std3_rules: bool = False) -> str:
try:
if isinstance(s, (bytes, bytearray)):
s = s.decode('ascii')
except UnicodeDecodeError:
raise IDNAError('Invalid ASCII in A-label')
if uts46:
s = uts46_remap(s, std3_rules, False)
trailing_dot = False
result = []
if not strict:
labels = _unicode_dots_re.split(s)
else:
labels = s.split('.')
if not labels or labels == ['']:
raise IDNAError('Empty domain')
if not labels[-1]:
del labels[-1]
trailing_dot = True
for label in labels:
s = ulabel(label)
if s:
result.append(s)
else:
raise IDNAError('Empty label')
if trailing_dot:
result.append('')
return '.'.join(result)
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/idna/core.py
|
Python
|
mit
| 12,950 |
# This file is automatically generated by tools/idna-data
__version__ = '15.0.0'
scripts = {
'Greek': (
0x37000000374,
0x37500000378,
0x37a0000037e,
0x37f00000380,
0x38400000385,
0x38600000387,
0x3880000038b,
0x38c0000038d,
0x38e000003a2,
0x3a3000003e2,
0x3f000000400,
0x1d2600001d2b,
0x1d5d00001d62,
0x1d6600001d6b,
0x1dbf00001dc0,
0x1f0000001f16,
0x1f1800001f1e,
0x1f2000001f46,
0x1f4800001f4e,
0x1f5000001f58,
0x1f5900001f5a,
0x1f5b00001f5c,
0x1f5d00001f5e,
0x1f5f00001f7e,
0x1f8000001fb5,
0x1fb600001fc5,
0x1fc600001fd4,
0x1fd600001fdc,
0x1fdd00001ff0,
0x1ff200001ff5,
0x1ff600001fff,
0x212600002127,
0xab650000ab66,
0x101400001018f,
0x101a0000101a1,
0x1d2000001d246,
),
'Han': (
0x2e8000002e9a,
0x2e9b00002ef4,
0x2f0000002fd6,
0x300500003006,
0x300700003008,
0x30210000302a,
0x30380000303c,
0x340000004dc0,
0x4e000000a000,
0xf9000000fa6e,
0xfa700000fada,
0x16fe200016fe4,
0x16ff000016ff2,
0x200000002a6e0,
0x2a7000002b73a,
0x2b7400002b81e,
0x2b8200002cea2,
0x2ceb00002ebe1,
0x2f8000002fa1e,
0x300000003134b,
0x31350000323b0,
),
'Hebrew': (
0x591000005c8,
0x5d0000005eb,
0x5ef000005f5,
0xfb1d0000fb37,
0xfb380000fb3d,
0xfb3e0000fb3f,
0xfb400000fb42,
0xfb430000fb45,
0xfb460000fb50,
),
'Hiragana': (
0x304100003097,
0x309d000030a0,
0x1b0010001b120,
0x1b1320001b133,
0x1b1500001b153,
0x1f2000001f201,
),
'Katakana': (
0x30a1000030fb,
0x30fd00003100,
0x31f000003200,
0x32d0000032ff,
0x330000003358,
0xff660000ff70,
0xff710000ff9e,
0x1aff00001aff4,
0x1aff50001affc,
0x1affd0001afff,
0x1b0000001b001,
0x1b1200001b123,
0x1b1550001b156,
0x1b1640001b168,
),
}
joining_types = {
0x600: 85,
0x601: 85,
0x602: 85,
0x603: 85,
0x604: 85,
0x605: 85,
0x608: 85,
0x60b: 85,
0x620: 68,
0x621: 85,
0x622: 82,
0x623: 82,
0x624: 82,
0x625: 82,
0x626: 68,
0x627: 82,
0x628: 68,
0x629: 82,
0x62a: 68,
0x62b: 68,
0x62c: 68,
0x62d: 68,
0x62e: 68,
0x62f: 82,
0x630: 82,
0x631: 82,
0x632: 82,
0x633: 68,
0x634: 68,
0x635: 68,
0x636: 68,
0x637: 68,
0x638: 68,
0x639: 68,
0x63a: 68,
0x63b: 68,
0x63c: 68,
0x63d: 68,
0x63e: 68,
0x63f: 68,
0x640: 67,
0x641: 68,
0x642: 68,
0x643: 68,
0x644: 68,
0x645: 68,
0x646: 68,
0x647: 68,
0x648: 82,
0x649: 68,
0x64a: 68,
0x66e: 68,
0x66f: 68,
0x671: 82,
0x672: 82,
0x673: 82,
0x674: 85,
0x675: 82,
0x676: 82,
0x677: 82,
0x678: 68,
0x679: 68,
0x67a: 68,
0x67b: 68,
0x67c: 68,
0x67d: 68,
0x67e: 68,
0x67f: 68,
0x680: 68,
0x681: 68,
0x682: 68,
0x683: 68,
0x684: 68,
0x685: 68,
0x686: 68,
0x687: 68,
0x688: 82,
0x689: 82,
0x68a: 82,
0x68b: 82,
0x68c: 82,
0x68d: 82,
0x68e: 82,
0x68f: 82,
0x690: 82,
0x691: 82,
0x692: 82,
0x693: 82,
0x694: 82,
0x695: 82,
0x696: 82,
0x697: 82,
0x698: 82,
0x699: 82,
0x69a: 68,
0x69b: 68,
0x69c: 68,
0x69d: 68,
0x69e: 68,
0x69f: 68,
0x6a0: 68,
0x6a1: 68,
0x6a2: 68,
0x6a3: 68,
0x6a4: 68,
0x6a5: 68,
0x6a6: 68,
0x6a7: 68,
0x6a8: 68,
0x6a9: 68,
0x6aa: 68,
0x6ab: 68,
0x6ac: 68,
0x6ad: 68,
0x6ae: 68,
0x6af: 68,
0x6b0: 68,
0x6b1: 68,
0x6b2: 68,
0x6b3: 68,
0x6b4: 68,
0x6b5: 68,
0x6b6: 68,
0x6b7: 68,
0x6b8: 68,
0x6b9: 68,
0x6ba: 68,
0x6bb: 68,
0x6bc: 68,
0x6bd: 68,
0x6be: 68,
0x6bf: 68,
0x6c0: 82,
0x6c1: 68,
0x6c2: 68,
0x6c3: 82,
0x6c4: 82,
0x6c5: 82,
0x6c6: 82,
0x6c7: 82,
0x6c8: 82,
0x6c9: 82,
0x6ca: 82,
0x6cb: 82,
0x6cc: 68,
0x6cd: 82,
0x6ce: 68,
0x6cf: 82,
0x6d0: 68,
0x6d1: 68,
0x6d2: 82,
0x6d3: 82,
0x6d5: 82,
0x6dd: 85,
0x6ee: 82,
0x6ef: 82,
0x6fa: 68,
0x6fb: 68,
0x6fc: 68,
0x6ff: 68,
0x70f: 84,
0x710: 82,
0x712: 68,
0x713: 68,
0x714: 68,
0x715: 82,
0x716: 82,
0x717: 82,
0x718: 82,
0x719: 82,
0x71a: 68,
0x71b: 68,
0x71c: 68,
0x71d: 68,
0x71e: 82,
0x71f: 68,
0x720: 68,
0x721: 68,
0x722: 68,
0x723: 68,
0x724: 68,
0x725: 68,
0x726: 68,
0x727: 68,
0x728: 82,
0x729: 68,
0x72a: 82,
0x72b: 68,
0x72c: 82,
0x72d: 68,
0x72e: 68,
0x72f: 82,
0x74d: 82,
0x74e: 68,
0x74f: 68,
0x750: 68,
0x751: 68,
0x752: 68,
0x753: 68,
0x754: 68,
0x755: 68,
0x756: 68,
0x757: 68,
0x758: 68,
0x759: 82,
0x75a: 82,
0x75b: 82,
0x75c: 68,
0x75d: 68,
0x75e: 68,
0x75f: 68,
0x760: 68,
0x761: 68,
0x762: 68,
0x763: 68,
0x764: 68,
0x765: 68,
0x766: 68,
0x767: 68,
0x768: 68,
0x769: 68,
0x76a: 68,
0x76b: 82,
0x76c: 82,
0x76d: 68,
0x76e: 68,
0x76f: 68,
0x770: 68,
0x771: 82,
0x772: 68,
0x773: 82,
0x774: 82,
0x775: 68,
0x776: 68,
0x777: 68,
0x778: 82,
0x779: 82,
0x77a: 68,
0x77b: 68,
0x77c: 68,
0x77d: 68,
0x77e: 68,
0x77f: 68,
0x7ca: 68,
0x7cb: 68,
0x7cc: 68,
0x7cd: 68,
0x7ce: 68,
0x7cf: 68,
0x7d0: 68,
0x7d1: 68,
0x7d2: 68,
0x7d3: 68,
0x7d4: 68,
0x7d5: 68,
0x7d6: 68,
0x7d7: 68,
0x7d8: 68,
0x7d9: 68,
0x7da: 68,
0x7db: 68,
0x7dc: 68,
0x7dd: 68,
0x7de: 68,
0x7df: 68,
0x7e0: 68,
0x7e1: 68,
0x7e2: 68,
0x7e3: 68,
0x7e4: 68,
0x7e5: 68,
0x7e6: 68,
0x7e7: 68,
0x7e8: 68,
0x7e9: 68,
0x7ea: 68,
0x7fa: 67,
0x840: 82,
0x841: 68,
0x842: 68,
0x843: 68,
0x844: 68,
0x845: 68,
0x846: 82,
0x847: 82,
0x848: 68,
0x849: 82,
0x84a: 68,
0x84b: 68,
0x84c: 68,
0x84d: 68,
0x84e: 68,
0x84f: 68,
0x850: 68,
0x851: 68,
0x852: 68,
0x853: 68,
0x854: 82,
0x855: 68,
0x856: 82,
0x857: 82,
0x858: 82,
0x860: 68,
0x861: 85,
0x862: 68,
0x863: 68,
0x864: 68,
0x865: 68,
0x866: 85,
0x867: 82,
0x868: 68,
0x869: 82,
0x86a: 82,
0x870: 82,
0x871: 82,
0x872: 82,
0x873: 82,
0x874: 82,
0x875: 82,
0x876: 82,
0x877: 82,
0x878: 82,
0x879: 82,
0x87a: 82,
0x87b: 82,
0x87c: 82,
0x87d: 82,
0x87e: 82,
0x87f: 82,
0x880: 82,
0x881: 82,
0x882: 82,
0x883: 67,
0x884: 67,
0x885: 67,
0x886: 68,
0x887: 85,
0x888: 85,
0x889: 68,
0x88a: 68,
0x88b: 68,
0x88c: 68,
0x88d: 68,
0x88e: 82,
0x890: 85,
0x891: 85,
0x8a0: 68,
0x8a1: 68,
0x8a2: 68,
0x8a3: 68,
0x8a4: 68,
0x8a5: 68,
0x8a6: 68,
0x8a7: 68,
0x8a8: 68,
0x8a9: 68,
0x8aa: 82,
0x8ab: 82,
0x8ac: 82,
0x8ad: 85,
0x8ae: 82,
0x8af: 68,
0x8b0: 68,
0x8b1: 82,
0x8b2: 82,
0x8b3: 68,
0x8b4: 68,
0x8b5: 68,
0x8b6: 68,
0x8b7: 68,
0x8b8: 68,
0x8b9: 82,
0x8ba: 68,
0x8bb: 68,
0x8bc: 68,
0x8bd: 68,
0x8be: 68,
0x8bf: 68,
0x8c0: 68,
0x8c1: 68,
0x8c2: 68,
0x8c3: 68,
0x8c4: 68,
0x8c5: 68,
0x8c6: 68,
0x8c7: 68,
0x8c8: 68,
0x8e2: 85,
0x1806: 85,
0x1807: 68,
0x180a: 67,
0x180e: 85,
0x1820: 68,
0x1821: 68,
0x1822: 68,
0x1823: 68,
0x1824: 68,
0x1825: 68,
0x1826: 68,
0x1827: 68,
0x1828: 68,
0x1829: 68,
0x182a: 68,
0x182b: 68,
0x182c: 68,
0x182d: 68,
0x182e: 68,
0x182f: 68,
0x1830: 68,
0x1831: 68,
0x1832: 68,
0x1833: 68,
0x1834: 68,
0x1835: 68,
0x1836: 68,
0x1837: 68,
0x1838: 68,
0x1839: 68,
0x183a: 68,
0x183b: 68,
0x183c: 68,
0x183d: 68,
0x183e: 68,
0x183f: 68,
0x1840: 68,
0x1841: 68,
0x1842: 68,
0x1843: 68,
0x1844: 68,
0x1845: 68,
0x1846: 68,
0x1847: 68,
0x1848: 68,
0x1849: 68,
0x184a: 68,
0x184b: 68,
0x184c: 68,
0x184d: 68,
0x184e: 68,
0x184f: 68,
0x1850: 68,
0x1851: 68,
0x1852: 68,
0x1853: 68,
0x1854: 68,
0x1855: 68,
0x1856: 68,
0x1857: 68,
0x1858: 68,
0x1859: 68,
0x185a: 68,
0x185b: 68,
0x185c: 68,
0x185d: 68,
0x185e: 68,
0x185f: 68,
0x1860: 68,
0x1861: 68,
0x1862: 68,
0x1863: 68,
0x1864: 68,
0x1865: 68,
0x1866: 68,
0x1867: 68,
0x1868: 68,
0x1869: 68,
0x186a: 68,
0x186b: 68,
0x186c: 68,
0x186d: 68,
0x186e: 68,
0x186f: 68,
0x1870: 68,
0x1871: 68,
0x1872: 68,
0x1873: 68,
0x1874: 68,
0x1875: 68,
0x1876: 68,
0x1877: 68,
0x1878: 68,
0x1880: 85,
0x1881: 85,
0x1882: 85,
0x1883: 85,
0x1884: 85,
0x1885: 84,
0x1886: 84,
0x1887: 68,
0x1888: 68,
0x1889: 68,
0x188a: 68,
0x188b: 68,
0x188c: 68,
0x188d: 68,
0x188e: 68,
0x188f: 68,
0x1890: 68,
0x1891: 68,
0x1892: 68,
0x1893: 68,
0x1894: 68,
0x1895: 68,
0x1896: 68,
0x1897: 68,
0x1898: 68,
0x1899: 68,
0x189a: 68,
0x189b: 68,
0x189c: 68,
0x189d: 68,
0x189e: 68,
0x189f: 68,
0x18a0: 68,
0x18a1: 68,
0x18a2: 68,
0x18a3: 68,
0x18a4: 68,
0x18a5: 68,
0x18a6: 68,
0x18a7: 68,
0x18a8: 68,
0x18aa: 68,
0x200c: 85,
0x200d: 67,
0x202f: 85,
0x2066: 85,
0x2067: 85,
0x2068: 85,
0x2069: 85,
0xa840: 68,
0xa841: 68,
0xa842: 68,
0xa843: 68,
0xa844: 68,
0xa845: 68,
0xa846: 68,
0xa847: 68,
0xa848: 68,
0xa849: 68,
0xa84a: 68,
0xa84b: 68,
0xa84c: 68,
0xa84d: 68,
0xa84e: 68,
0xa84f: 68,
0xa850: 68,
0xa851: 68,
0xa852: 68,
0xa853: 68,
0xa854: 68,
0xa855: 68,
0xa856: 68,
0xa857: 68,
0xa858: 68,
0xa859: 68,
0xa85a: 68,
0xa85b: 68,
0xa85c: 68,
0xa85d: 68,
0xa85e: 68,
0xa85f: 68,
0xa860: 68,
0xa861: 68,
0xa862: 68,
0xa863: 68,
0xa864: 68,
0xa865: 68,
0xa866: 68,
0xa867: 68,
0xa868: 68,
0xa869: 68,
0xa86a: 68,
0xa86b: 68,
0xa86c: 68,
0xa86d: 68,
0xa86e: 68,
0xa86f: 68,
0xa870: 68,
0xa871: 68,
0xa872: 76,
0xa873: 85,
0x10ac0: 68,
0x10ac1: 68,
0x10ac2: 68,
0x10ac3: 68,
0x10ac4: 68,
0x10ac5: 82,
0x10ac6: 85,
0x10ac7: 82,
0x10ac8: 85,
0x10ac9: 82,
0x10aca: 82,
0x10acb: 85,
0x10acc: 85,
0x10acd: 76,
0x10ace: 82,
0x10acf: 82,
0x10ad0: 82,
0x10ad1: 82,
0x10ad2: 82,
0x10ad3: 68,
0x10ad4: 68,
0x10ad5: 68,
0x10ad6: 68,
0x10ad7: 76,
0x10ad8: 68,
0x10ad9: 68,
0x10ada: 68,
0x10adb: 68,
0x10adc: 68,
0x10add: 82,
0x10ade: 68,
0x10adf: 68,
0x10ae0: 68,
0x10ae1: 82,
0x10ae2: 85,
0x10ae3: 85,
0x10ae4: 82,
0x10aeb: 68,
0x10aec: 68,
0x10aed: 68,
0x10aee: 68,
0x10aef: 82,
0x10b80: 68,
0x10b81: 82,
0x10b82: 68,
0x10b83: 82,
0x10b84: 82,
0x10b85: 82,
0x10b86: 68,
0x10b87: 68,
0x10b88: 68,
0x10b89: 82,
0x10b8a: 68,
0x10b8b: 68,
0x10b8c: 82,
0x10b8d: 68,
0x10b8e: 82,
0x10b8f: 82,
0x10b90: 68,
0x10b91: 82,
0x10ba9: 82,
0x10baa: 82,
0x10bab: 82,
0x10bac: 82,
0x10bad: 68,
0x10bae: 68,
0x10baf: 85,
0x10d00: 76,
0x10d01: 68,
0x10d02: 68,
0x10d03: 68,
0x10d04: 68,
0x10d05: 68,
0x10d06: 68,
0x10d07: 68,
0x10d08: 68,
0x10d09: 68,
0x10d0a: 68,
0x10d0b: 68,
0x10d0c: 68,
0x10d0d: 68,
0x10d0e: 68,
0x10d0f: 68,
0x10d10: 68,
0x10d11: 68,
0x10d12: 68,
0x10d13: 68,
0x10d14: 68,
0x10d15: 68,
0x10d16: 68,
0x10d17: 68,
0x10d18: 68,
0x10d19: 68,
0x10d1a: 68,
0x10d1b: 68,
0x10d1c: 68,
0x10d1d: 68,
0x10d1e: 68,
0x10d1f: 68,
0x10d20: 68,
0x10d21: 68,
0x10d22: 82,
0x10d23: 68,
0x10f30: 68,
0x10f31: 68,
0x10f32: 68,
0x10f33: 82,
0x10f34: 68,
0x10f35: 68,
0x10f36: 68,
0x10f37: 68,
0x10f38: 68,
0x10f39: 68,
0x10f3a: 68,
0x10f3b: 68,
0x10f3c: 68,
0x10f3d: 68,
0x10f3e: 68,
0x10f3f: 68,
0x10f40: 68,
0x10f41: 68,
0x10f42: 68,
0x10f43: 68,
0x10f44: 68,
0x10f45: 85,
0x10f51: 68,
0x10f52: 68,
0x10f53: 68,
0x10f54: 82,
0x10f70: 68,
0x10f71: 68,
0x10f72: 68,
0x10f73: 68,
0x10f74: 82,
0x10f75: 82,
0x10f76: 68,
0x10f77: 68,
0x10f78: 68,
0x10f79: 68,
0x10f7a: 68,
0x10f7b: 68,
0x10f7c: 68,
0x10f7d: 68,
0x10f7e: 68,
0x10f7f: 68,
0x10f80: 68,
0x10f81: 68,
0x10fb0: 68,
0x10fb1: 85,
0x10fb2: 68,
0x10fb3: 68,
0x10fb4: 82,
0x10fb5: 82,
0x10fb6: 82,
0x10fb7: 85,
0x10fb8: 68,
0x10fb9: 82,
0x10fba: 82,
0x10fbb: 68,
0x10fbc: 68,
0x10fbd: 82,
0x10fbe: 68,
0x10fbf: 68,
0x10fc0: 85,
0x10fc1: 68,
0x10fc2: 82,
0x10fc3: 82,
0x10fc4: 68,
0x10fc5: 85,
0x10fc6: 85,
0x10fc7: 85,
0x10fc8: 85,
0x10fc9: 82,
0x10fca: 68,
0x10fcb: 76,
0x110bd: 85,
0x110cd: 85,
0x1e900: 68,
0x1e901: 68,
0x1e902: 68,
0x1e903: 68,
0x1e904: 68,
0x1e905: 68,
0x1e906: 68,
0x1e907: 68,
0x1e908: 68,
0x1e909: 68,
0x1e90a: 68,
0x1e90b: 68,
0x1e90c: 68,
0x1e90d: 68,
0x1e90e: 68,
0x1e90f: 68,
0x1e910: 68,
0x1e911: 68,
0x1e912: 68,
0x1e913: 68,
0x1e914: 68,
0x1e915: 68,
0x1e916: 68,
0x1e917: 68,
0x1e918: 68,
0x1e919: 68,
0x1e91a: 68,
0x1e91b: 68,
0x1e91c: 68,
0x1e91d: 68,
0x1e91e: 68,
0x1e91f: 68,
0x1e920: 68,
0x1e921: 68,
0x1e922: 68,
0x1e923: 68,
0x1e924: 68,
0x1e925: 68,
0x1e926: 68,
0x1e927: 68,
0x1e928: 68,
0x1e929: 68,
0x1e92a: 68,
0x1e92b: 68,
0x1e92c: 68,
0x1e92d: 68,
0x1e92e: 68,
0x1e92f: 68,
0x1e930: 68,
0x1e931: 68,
0x1e932: 68,
0x1e933: 68,
0x1e934: 68,
0x1e935: 68,
0x1e936: 68,
0x1e937: 68,
0x1e938: 68,
0x1e939: 68,
0x1e93a: 68,
0x1e93b: 68,
0x1e93c: 68,
0x1e93d: 68,
0x1e93e: 68,
0x1e93f: 68,
0x1e940: 68,
0x1e941: 68,
0x1e942: 68,
0x1e943: 68,
0x1e94b: 84,
}
codepoint_classes = {
'PVALID': (
0x2d0000002e,
0x300000003a,
0x610000007b,
0xdf000000f7,
0xf800000100,
0x10100000102,
0x10300000104,
0x10500000106,
0x10700000108,
0x1090000010a,
0x10b0000010c,
0x10d0000010e,
0x10f00000110,
0x11100000112,
0x11300000114,
0x11500000116,
0x11700000118,
0x1190000011a,
0x11b0000011c,
0x11d0000011e,
0x11f00000120,
0x12100000122,
0x12300000124,
0x12500000126,
0x12700000128,
0x1290000012a,
0x12b0000012c,
0x12d0000012e,
0x12f00000130,
0x13100000132,
0x13500000136,
0x13700000139,
0x13a0000013b,
0x13c0000013d,
0x13e0000013f,
0x14200000143,
0x14400000145,
0x14600000147,
0x14800000149,
0x14b0000014c,
0x14d0000014e,
0x14f00000150,
0x15100000152,
0x15300000154,
0x15500000156,
0x15700000158,
0x1590000015a,
0x15b0000015c,
0x15d0000015e,
0x15f00000160,
0x16100000162,
0x16300000164,
0x16500000166,
0x16700000168,
0x1690000016a,
0x16b0000016c,
0x16d0000016e,
0x16f00000170,
0x17100000172,
0x17300000174,
0x17500000176,
0x17700000178,
0x17a0000017b,
0x17c0000017d,
0x17e0000017f,
0x18000000181,
0x18300000184,
0x18500000186,
0x18800000189,
0x18c0000018e,
0x19200000193,
0x19500000196,
0x1990000019c,
0x19e0000019f,
0x1a1000001a2,
0x1a3000001a4,
0x1a5000001a6,
0x1a8000001a9,
0x1aa000001ac,
0x1ad000001ae,
0x1b0000001b1,
0x1b4000001b5,
0x1b6000001b7,
0x1b9000001bc,
0x1bd000001c4,
0x1ce000001cf,
0x1d0000001d1,
0x1d2000001d3,
0x1d4000001d5,
0x1d6000001d7,
0x1d8000001d9,
0x1da000001db,
0x1dc000001de,
0x1df000001e0,
0x1e1000001e2,
0x1e3000001e4,
0x1e5000001e6,
0x1e7000001e8,
0x1e9000001ea,
0x1eb000001ec,
0x1ed000001ee,
0x1ef000001f1,
0x1f5000001f6,
0x1f9000001fa,
0x1fb000001fc,
0x1fd000001fe,
0x1ff00000200,
0x20100000202,
0x20300000204,
0x20500000206,
0x20700000208,
0x2090000020a,
0x20b0000020c,
0x20d0000020e,
0x20f00000210,
0x21100000212,
0x21300000214,
0x21500000216,
0x21700000218,
0x2190000021a,
0x21b0000021c,
0x21d0000021e,
0x21f00000220,
0x22100000222,
0x22300000224,
0x22500000226,
0x22700000228,
0x2290000022a,
0x22b0000022c,
0x22d0000022e,
0x22f00000230,
0x23100000232,
0x2330000023a,
0x23c0000023d,
0x23f00000241,
0x24200000243,
0x24700000248,
0x2490000024a,
0x24b0000024c,
0x24d0000024e,
0x24f000002b0,
0x2b9000002c2,
0x2c6000002d2,
0x2ec000002ed,
0x2ee000002ef,
0x30000000340,
0x34200000343,
0x3460000034f,
0x35000000370,
0x37100000372,
0x37300000374,
0x37700000378,
0x37b0000037e,
0x39000000391,
0x3ac000003cf,
0x3d7000003d8,
0x3d9000003da,
0x3db000003dc,
0x3dd000003de,
0x3df000003e0,
0x3e1000003e2,
0x3e3000003e4,
0x3e5000003e6,
0x3e7000003e8,
0x3e9000003ea,
0x3eb000003ec,
0x3ed000003ee,
0x3ef000003f0,
0x3f3000003f4,
0x3f8000003f9,
0x3fb000003fd,
0x43000000460,
0x46100000462,
0x46300000464,
0x46500000466,
0x46700000468,
0x4690000046a,
0x46b0000046c,
0x46d0000046e,
0x46f00000470,
0x47100000472,
0x47300000474,
0x47500000476,
0x47700000478,
0x4790000047a,
0x47b0000047c,
0x47d0000047e,
0x47f00000480,
0x48100000482,
0x48300000488,
0x48b0000048c,
0x48d0000048e,
0x48f00000490,
0x49100000492,
0x49300000494,
0x49500000496,
0x49700000498,
0x4990000049a,
0x49b0000049c,
0x49d0000049e,
0x49f000004a0,
0x4a1000004a2,
0x4a3000004a4,
0x4a5000004a6,
0x4a7000004a8,
0x4a9000004aa,
0x4ab000004ac,
0x4ad000004ae,
0x4af000004b0,
0x4b1000004b2,
0x4b3000004b4,
0x4b5000004b6,
0x4b7000004b8,
0x4b9000004ba,
0x4bb000004bc,
0x4bd000004be,
0x4bf000004c0,
0x4c2000004c3,
0x4c4000004c5,
0x4c6000004c7,
0x4c8000004c9,
0x4ca000004cb,
0x4cc000004cd,
0x4ce000004d0,
0x4d1000004d2,
0x4d3000004d4,
0x4d5000004d6,
0x4d7000004d8,
0x4d9000004da,
0x4db000004dc,
0x4dd000004de,
0x4df000004e0,
0x4e1000004e2,
0x4e3000004e4,
0x4e5000004e6,
0x4e7000004e8,
0x4e9000004ea,
0x4eb000004ec,
0x4ed000004ee,
0x4ef000004f0,
0x4f1000004f2,
0x4f3000004f4,
0x4f5000004f6,
0x4f7000004f8,
0x4f9000004fa,
0x4fb000004fc,
0x4fd000004fe,
0x4ff00000500,
0x50100000502,
0x50300000504,
0x50500000506,
0x50700000508,
0x5090000050a,
0x50b0000050c,
0x50d0000050e,
0x50f00000510,
0x51100000512,
0x51300000514,
0x51500000516,
0x51700000518,
0x5190000051a,
0x51b0000051c,
0x51d0000051e,
0x51f00000520,
0x52100000522,
0x52300000524,
0x52500000526,
0x52700000528,
0x5290000052a,
0x52b0000052c,
0x52d0000052e,
0x52f00000530,
0x5590000055a,
0x56000000587,
0x58800000589,
0x591000005be,
0x5bf000005c0,
0x5c1000005c3,
0x5c4000005c6,
0x5c7000005c8,
0x5d0000005eb,
0x5ef000005f3,
0x6100000061b,
0x62000000640,
0x64100000660,
0x66e00000675,
0x679000006d4,
0x6d5000006dd,
0x6df000006e9,
0x6ea000006f0,
0x6fa00000700,
0x7100000074b,
0x74d000007b2,
0x7c0000007f6,
0x7fd000007fe,
0x8000000082e,
0x8400000085c,
0x8600000086b,
0x87000000888,
0x8890000088f,
0x898000008e2,
0x8e300000958,
0x96000000964,
0x96600000970,
0x97100000984,
0x9850000098d,
0x98f00000991,
0x993000009a9,
0x9aa000009b1,
0x9b2000009b3,
0x9b6000009ba,
0x9bc000009c5,
0x9c7000009c9,
0x9cb000009cf,
0x9d7000009d8,
0x9e0000009e4,
0x9e6000009f2,
0x9fc000009fd,
0x9fe000009ff,
0xa0100000a04,
0xa0500000a0b,
0xa0f00000a11,
0xa1300000a29,
0xa2a00000a31,
0xa3200000a33,
0xa3500000a36,
0xa3800000a3a,
0xa3c00000a3d,
0xa3e00000a43,
0xa4700000a49,
0xa4b00000a4e,
0xa5100000a52,
0xa5c00000a5d,
0xa6600000a76,
0xa8100000a84,
0xa8500000a8e,
0xa8f00000a92,
0xa9300000aa9,
0xaaa00000ab1,
0xab200000ab4,
0xab500000aba,
0xabc00000ac6,
0xac700000aca,
0xacb00000ace,
0xad000000ad1,
0xae000000ae4,
0xae600000af0,
0xaf900000b00,
0xb0100000b04,
0xb0500000b0d,
0xb0f00000b11,
0xb1300000b29,
0xb2a00000b31,
0xb3200000b34,
0xb3500000b3a,
0xb3c00000b45,
0xb4700000b49,
0xb4b00000b4e,
0xb5500000b58,
0xb5f00000b64,
0xb6600000b70,
0xb7100000b72,
0xb8200000b84,
0xb8500000b8b,
0xb8e00000b91,
0xb9200000b96,
0xb9900000b9b,
0xb9c00000b9d,
0xb9e00000ba0,
0xba300000ba5,
0xba800000bab,
0xbae00000bba,
0xbbe00000bc3,
0xbc600000bc9,
0xbca00000bce,
0xbd000000bd1,
0xbd700000bd8,
0xbe600000bf0,
0xc0000000c0d,
0xc0e00000c11,
0xc1200000c29,
0xc2a00000c3a,
0xc3c00000c45,
0xc4600000c49,
0xc4a00000c4e,
0xc5500000c57,
0xc5800000c5b,
0xc5d00000c5e,
0xc6000000c64,
0xc6600000c70,
0xc8000000c84,
0xc8500000c8d,
0xc8e00000c91,
0xc9200000ca9,
0xcaa00000cb4,
0xcb500000cba,
0xcbc00000cc5,
0xcc600000cc9,
0xcca00000cce,
0xcd500000cd7,
0xcdd00000cdf,
0xce000000ce4,
0xce600000cf0,
0xcf100000cf4,
0xd0000000d0d,
0xd0e00000d11,
0xd1200000d45,
0xd4600000d49,
0xd4a00000d4f,
0xd5400000d58,
0xd5f00000d64,
0xd6600000d70,
0xd7a00000d80,
0xd8100000d84,
0xd8500000d97,
0xd9a00000db2,
0xdb300000dbc,
0xdbd00000dbe,
0xdc000000dc7,
0xdca00000dcb,
0xdcf00000dd5,
0xdd600000dd7,
0xdd800000de0,
0xde600000df0,
0xdf200000df4,
0xe0100000e33,
0xe3400000e3b,
0xe4000000e4f,
0xe5000000e5a,
0xe8100000e83,
0xe8400000e85,
0xe8600000e8b,
0xe8c00000ea4,
0xea500000ea6,
0xea700000eb3,
0xeb400000ebe,
0xec000000ec5,
0xec600000ec7,
0xec800000ecf,
0xed000000eda,
0xede00000ee0,
0xf0000000f01,
0xf0b00000f0c,
0xf1800000f1a,
0xf2000000f2a,
0xf3500000f36,
0xf3700000f38,
0xf3900000f3a,
0xf3e00000f43,
0xf4400000f48,
0xf4900000f4d,
0xf4e00000f52,
0xf5300000f57,
0xf5800000f5c,
0xf5d00000f69,
0xf6a00000f6d,
0xf7100000f73,
0xf7400000f75,
0xf7a00000f81,
0xf8200000f85,
0xf8600000f93,
0xf9400000f98,
0xf9900000f9d,
0xf9e00000fa2,
0xfa300000fa7,
0xfa800000fac,
0xfad00000fb9,
0xfba00000fbd,
0xfc600000fc7,
0x10000000104a,
0x10500000109e,
0x10d0000010fb,
0x10fd00001100,
0x120000001249,
0x124a0000124e,
0x125000001257,
0x125800001259,
0x125a0000125e,
0x126000001289,
0x128a0000128e,
0x1290000012b1,
0x12b2000012b6,
0x12b8000012bf,
0x12c0000012c1,
0x12c2000012c6,
0x12c8000012d7,
0x12d800001311,
0x131200001316,
0x13180000135b,
0x135d00001360,
0x138000001390,
0x13a0000013f6,
0x14010000166d,
0x166f00001680,
0x16810000169b,
0x16a0000016eb,
0x16f1000016f9,
0x170000001716,
0x171f00001735,
0x174000001754,
0x17600000176d,
0x176e00001771,
0x177200001774,
0x1780000017b4,
0x17b6000017d4,
0x17d7000017d8,
0x17dc000017de,
0x17e0000017ea,
0x18100000181a,
0x182000001879,
0x1880000018ab,
0x18b0000018f6,
0x19000000191f,
0x19200000192c,
0x19300000193c,
0x19460000196e,
0x197000001975,
0x1980000019ac,
0x19b0000019ca,
0x19d0000019da,
0x1a0000001a1c,
0x1a2000001a5f,
0x1a6000001a7d,
0x1a7f00001a8a,
0x1a9000001a9a,
0x1aa700001aa8,
0x1ab000001abe,
0x1abf00001acf,
0x1b0000001b4d,
0x1b5000001b5a,
0x1b6b00001b74,
0x1b8000001bf4,
0x1c0000001c38,
0x1c4000001c4a,
0x1c4d00001c7e,
0x1cd000001cd3,
0x1cd400001cfb,
0x1d0000001d2c,
0x1d2f00001d30,
0x1d3b00001d3c,
0x1d4e00001d4f,
0x1d6b00001d78,
0x1d7900001d9b,
0x1dc000001e00,
0x1e0100001e02,
0x1e0300001e04,
0x1e0500001e06,
0x1e0700001e08,
0x1e0900001e0a,
0x1e0b00001e0c,
0x1e0d00001e0e,
0x1e0f00001e10,
0x1e1100001e12,
0x1e1300001e14,
0x1e1500001e16,
0x1e1700001e18,
0x1e1900001e1a,
0x1e1b00001e1c,
0x1e1d00001e1e,
0x1e1f00001e20,
0x1e2100001e22,
0x1e2300001e24,
0x1e2500001e26,
0x1e2700001e28,
0x1e2900001e2a,
0x1e2b00001e2c,
0x1e2d00001e2e,
0x1e2f00001e30,
0x1e3100001e32,
0x1e3300001e34,
0x1e3500001e36,
0x1e3700001e38,
0x1e3900001e3a,
0x1e3b00001e3c,
0x1e3d00001e3e,
0x1e3f00001e40,
0x1e4100001e42,
0x1e4300001e44,
0x1e4500001e46,
0x1e4700001e48,
0x1e4900001e4a,
0x1e4b00001e4c,
0x1e4d00001e4e,
0x1e4f00001e50,
0x1e5100001e52,
0x1e5300001e54,
0x1e5500001e56,
0x1e5700001e58,
0x1e5900001e5a,
0x1e5b00001e5c,
0x1e5d00001e5e,
0x1e5f00001e60,
0x1e6100001e62,
0x1e6300001e64,
0x1e6500001e66,
0x1e6700001e68,
0x1e6900001e6a,
0x1e6b00001e6c,
0x1e6d00001e6e,
0x1e6f00001e70,
0x1e7100001e72,
0x1e7300001e74,
0x1e7500001e76,
0x1e7700001e78,
0x1e7900001e7a,
0x1e7b00001e7c,
0x1e7d00001e7e,
0x1e7f00001e80,
0x1e8100001e82,
0x1e8300001e84,
0x1e8500001e86,
0x1e8700001e88,
0x1e8900001e8a,
0x1e8b00001e8c,
0x1e8d00001e8e,
0x1e8f00001e90,
0x1e9100001e92,
0x1e9300001e94,
0x1e9500001e9a,
0x1e9c00001e9e,
0x1e9f00001ea0,
0x1ea100001ea2,
0x1ea300001ea4,
0x1ea500001ea6,
0x1ea700001ea8,
0x1ea900001eaa,
0x1eab00001eac,
0x1ead00001eae,
0x1eaf00001eb0,
0x1eb100001eb2,
0x1eb300001eb4,
0x1eb500001eb6,
0x1eb700001eb8,
0x1eb900001eba,
0x1ebb00001ebc,
0x1ebd00001ebe,
0x1ebf00001ec0,
0x1ec100001ec2,
0x1ec300001ec4,
0x1ec500001ec6,
0x1ec700001ec8,
0x1ec900001eca,
0x1ecb00001ecc,
0x1ecd00001ece,
0x1ecf00001ed0,
0x1ed100001ed2,
0x1ed300001ed4,
0x1ed500001ed6,
0x1ed700001ed8,
0x1ed900001eda,
0x1edb00001edc,
0x1edd00001ede,
0x1edf00001ee0,
0x1ee100001ee2,
0x1ee300001ee4,
0x1ee500001ee6,
0x1ee700001ee8,
0x1ee900001eea,
0x1eeb00001eec,
0x1eed00001eee,
0x1eef00001ef0,
0x1ef100001ef2,
0x1ef300001ef4,
0x1ef500001ef6,
0x1ef700001ef8,
0x1ef900001efa,
0x1efb00001efc,
0x1efd00001efe,
0x1eff00001f08,
0x1f1000001f16,
0x1f2000001f28,
0x1f3000001f38,
0x1f4000001f46,
0x1f5000001f58,
0x1f6000001f68,
0x1f7000001f71,
0x1f7200001f73,
0x1f7400001f75,
0x1f7600001f77,
0x1f7800001f79,
0x1f7a00001f7b,
0x1f7c00001f7d,
0x1fb000001fb2,
0x1fb600001fb7,
0x1fc600001fc7,
0x1fd000001fd3,
0x1fd600001fd8,
0x1fe000001fe3,
0x1fe400001fe8,
0x1ff600001ff7,
0x214e0000214f,
0x218400002185,
0x2c3000002c60,
0x2c6100002c62,
0x2c6500002c67,
0x2c6800002c69,
0x2c6a00002c6b,
0x2c6c00002c6d,
0x2c7100002c72,
0x2c7300002c75,
0x2c7600002c7c,
0x2c8100002c82,
0x2c8300002c84,
0x2c8500002c86,
0x2c8700002c88,
0x2c8900002c8a,
0x2c8b00002c8c,
0x2c8d00002c8e,
0x2c8f00002c90,
0x2c9100002c92,
0x2c9300002c94,
0x2c9500002c96,
0x2c9700002c98,
0x2c9900002c9a,
0x2c9b00002c9c,
0x2c9d00002c9e,
0x2c9f00002ca0,
0x2ca100002ca2,
0x2ca300002ca4,
0x2ca500002ca6,
0x2ca700002ca8,
0x2ca900002caa,
0x2cab00002cac,
0x2cad00002cae,
0x2caf00002cb0,
0x2cb100002cb2,
0x2cb300002cb4,
0x2cb500002cb6,
0x2cb700002cb8,
0x2cb900002cba,
0x2cbb00002cbc,
0x2cbd00002cbe,
0x2cbf00002cc0,
0x2cc100002cc2,
0x2cc300002cc4,
0x2cc500002cc6,
0x2cc700002cc8,
0x2cc900002cca,
0x2ccb00002ccc,
0x2ccd00002cce,
0x2ccf00002cd0,
0x2cd100002cd2,
0x2cd300002cd4,
0x2cd500002cd6,
0x2cd700002cd8,
0x2cd900002cda,
0x2cdb00002cdc,
0x2cdd00002cde,
0x2cdf00002ce0,
0x2ce100002ce2,
0x2ce300002ce5,
0x2cec00002ced,
0x2cee00002cf2,
0x2cf300002cf4,
0x2d0000002d26,
0x2d2700002d28,
0x2d2d00002d2e,
0x2d3000002d68,
0x2d7f00002d97,
0x2da000002da7,
0x2da800002daf,
0x2db000002db7,
0x2db800002dbf,
0x2dc000002dc7,
0x2dc800002dcf,
0x2dd000002dd7,
0x2dd800002ddf,
0x2de000002e00,
0x2e2f00002e30,
0x300500003008,
0x302a0000302e,
0x303c0000303d,
0x304100003097,
0x30990000309b,
0x309d0000309f,
0x30a1000030fb,
0x30fc000030ff,
0x310500003130,
0x31a0000031c0,
0x31f000003200,
0x340000004dc0,
0x4e000000a48d,
0xa4d00000a4fe,
0xa5000000a60d,
0xa6100000a62c,
0xa6410000a642,
0xa6430000a644,
0xa6450000a646,
0xa6470000a648,
0xa6490000a64a,
0xa64b0000a64c,
0xa64d0000a64e,
0xa64f0000a650,
0xa6510000a652,
0xa6530000a654,
0xa6550000a656,
0xa6570000a658,
0xa6590000a65a,
0xa65b0000a65c,
0xa65d0000a65e,
0xa65f0000a660,
0xa6610000a662,
0xa6630000a664,
0xa6650000a666,
0xa6670000a668,
0xa6690000a66a,
0xa66b0000a66c,
0xa66d0000a670,
0xa6740000a67e,
0xa67f0000a680,
0xa6810000a682,
0xa6830000a684,
0xa6850000a686,
0xa6870000a688,
0xa6890000a68a,
0xa68b0000a68c,
0xa68d0000a68e,
0xa68f0000a690,
0xa6910000a692,
0xa6930000a694,
0xa6950000a696,
0xa6970000a698,
0xa6990000a69a,
0xa69b0000a69c,
0xa69e0000a6e6,
0xa6f00000a6f2,
0xa7170000a720,
0xa7230000a724,
0xa7250000a726,
0xa7270000a728,
0xa7290000a72a,
0xa72b0000a72c,
0xa72d0000a72e,
0xa72f0000a732,
0xa7330000a734,
0xa7350000a736,
0xa7370000a738,
0xa7390000a73a,
0xa73b0000a73c,
0xa73d0000a73e,
0xa73f0000a740,
0xa7410000a742,
0xa7430000a744,
0xa7450000a746,
0xa7470000a748,
0xa7490000a74a,
0xa74b0000a74c,
0xa74d0000a74e,
0xa74f0000a750,
0xa7510000a752,
0xa7530000a754,
0xa7550000a756,
0xa7570000a758,
0xa7590000a75a,
0xa75b0000a75c,
0xa75d0000a75e,
0xa75f0000a760,
0xa7610000a762,
0xa7630000a764,
0xa7650000a766,
0xa7670000a768,
0xa7690000a76a,
0xa76b0000a76c,
0xa76d0000a76e,
0xa76f0000a770,
0xa7710000a779,
0xa77a0000a77b,
0xa77c0000a77d,
0xa77f0000a780,
0xa7810000a782,
0xa7830000a784,
0xa7850000a786,
0xa7870000a789,
0xa78c0000a78d,
0xa78e0000a790,
0xa7910000a792,
0xa7930000a796,
0xa7970000a798,
0xa7990000a79a,
0xa79b0000a79c,
0xa79d0000a79e,
0xa79f0000a7a0,
0xa7a10000a7a2,
0xa7a30000a7a4,
0xa7a50000a7a6,
0xa7a70000a7a8,
0xa7a90000a7aa,
0xa7af0000a7b0,
0xa7b50000a7b6,
0xa7b70000a7b8,
0xa7b90000a7ba,
0xa7bb0000a7bc,
0xa7bd0000a7be,
0xa7bf0000a7c0,
0xa7c10000a7c2,
0xa7c30000a7c4,
0xa7c80000a7c9,
0xa7ca0000a7cb,
0xa7d10000a7d2,
0xa7d30000a7d4,
0xa7d50000a7d6,
0xa7d70000a7d8,
0xa7d90000a7da,
0xa7f20000a7f5,
0xa7f60000a7f8,
0xa7fa0000a828,
0xa82c0000a82d,
0xa8400000a874,
0xa8800000a8c6,
0xa8d00000a8da,
0xa8e00000a8f8,
0xa8fb0000a8fc,
0xa8fd0000a92e,
0xa9300000a954,
0xa9800000a9c1,
0xa9cf0000a9da,
0xa9e00000a9ff,
0xaa000000aa37,
0xaa400000aa4e,
0xaa500000aa5a,
0xaa600000aa77,
0xaa7a0000aac3,
0xaadb0000aade,
0xaae00000aaf0,
0xaaf20000aaf7,
0xab010000ab07,
0xab090000ab0f,
0xab110000ab17,
0xab200000ab27,
0xab280000ab2f,
0xab300000ab5b,
0xab600000ab69,
0xabc00000abeb,
0xabec0000abee,
0xabf00000abfa,
0xac000000d7a4,
0xfa0e0000fa10,
0xfa110000fa12,
0xfa130000fa15,
0xfa1f0000fa20,
0xfa210000fa22,
0xfa230000fa25,
0xfa270000fa2a,
0xfb1e0000fb1f,
0xfe200000fe30,
0xfe730000fe74,
0x100000001000c,
0x1000d00010027,
0x100280001003b,
0x1003c0001003e,
0x1003f0001004e,
0x100500001005e,
0x10080000100fb,
0x101fd000101fe,
0x102800001029d,
0x102a0000102d1,
0x102e0000102e1,
0x1030000010320,
0x1032d00010341,
0x103420001034a,
0x103500001037b,
0x103800001039e,
0x103a0000103c4,
0x103c8000103d0,
0x104280001049e,
0x104a0000104aa,
0x104d8000104fc,
0x1050000010528,
0x1053000010564,
0x10597000105a2,
0x105a3000105b2,
0x105b3000105ba,
0x105bb000105bd,
0x1060000010737,
0x1074000010756,
0x1076000010768,
0x1078000010786,
0x10787000107b1,
0x107b2000107bb,
0x1080000010806,
0x1080800010809,
0x1080a00010836,
0x1083700010839,
0x1083c0001083d,
0x1083f00010856,
0x1086000010877,
0x108800001089f,
0x108e0000108f3,
0x108f4000108f6,
0x1090000010916,
0x109200001093a,
0x10980000109b8,
0x109be000109c0,
0x10a0000010a04,
0x10a0500010a07,
0x10a0c00010a14,
0x10a1500010a18,
0x10a1900010a36,
0x10a3800010a3b,
0x10a3f00010a40,
0x10a6000010a7d,
0x10a8000010a9d,
0x10ac000010ac8,
0x10ac900010ae7,
0x10b0000010b36,
0x10b4000010b56,
0x10b6000010b73,
0x10b8000010b92,
0x10c0000010c49,
0x10cc000010cf3,
0x10d0000010d28,
0x10d3000010d3a,
0x10e8000010eaa,
0x10eab00010ead,
0x10eb000010eb2,
0x10efd00010f1d,
0x10f2700010f28,
0x10f3000010f51,
0x10f7000010f86,
0x10fb000010fc5,
0x10fe000010ff7,
0x1100000011047,
0x1106600011076,
0x1107f000110bb,
0x110c2000110c3,
0x110d0000110e9,
0x110f0000110fa,
0x1110000011135,
0x1113600011140,
0x1114400011148,
0x1115000011174,
0x1117600011177,
0x11180000111c5,
0x111c9000111cd,
0x111ce000111db,
0x111dc000111dd,
0x1120000011212,
0x1121300011238,
0x1123e00011242,
0x1128000011287,
0x1128800011289,
0x1128a0001128e,
0x1128f0001129e,
0x1129f000112a9,
0x112b0000112eb,
0x112f0000112fa,
0x1130000011304,
0x113050001130d,
0x1130f00011311,
0x1131300011329,
0x1132a00011331,
0x1133200011334,
0x113350001133a,
0x1133b00011345,
0x1134700011349,
0x1134b0001134e,
0x1135000011351,
0x1135700011358,
0x1135d00011364,
0x113660001136d,
0x1137000011375,
0x114000001144b,
0x114500001145a,
0x1145e00011462,
0x11480000114c6,
0x114c7000114c8,
0x114d0000114da,
0x11580000115b6,
0x115b8000115c1,
0x115d8000115de,
0x1160000011641,
0x1164400011645,
0x116500001165a,
0x11680000116b9,
0x116c0000116ca,
0x117000001171b,
0x1171d0001172c,
0x117300001173a,
0x1174000011747,
0x118000001183b,
0x118c0000118ea,
0x118ff00011907,
0x119090001190a,
0x1190c00011914,
0x1191500011917,
0x1191800011936,
0x1193700011939,
0x1193b00011944,
0x119500001195a,
0x119a0000119a8,
0x119aa000119d8,
0x119da000119e2,
0x119e3000119e5,
0x11a0000011a3f,
0x11a4700011a48,
0x11a5000011a9a,
0x11a9d00011a9e,
0x11ab000011af9,
0x11c0000011c09,
0x11c0a00011c37,
0x11c3800011c41,
0x11c5000011c5a,
0x11c7200011c90,
0x11c9200011ca8,
0x11ca900011cb7,
0x11d0000011d07,
0x11d0800011d0a,
0x11d0b00011d37,
0x11d3a00011d3b,
0x11d3c00011d3e,
0x11d3f00011d48,
0x11d5000011d5a,
0x11d6000011d66,
0x11d6700011d69,
0x11d6a00011d8f,
0x11d9000011d92,
0x11d9300011d99,
0x11da000011daa,
0x11ee000011ef7,
0x11f0000011f11,
0x11f1200011f3b,
0x11f3e00011f43,
0x11f5000011f5a,
0x11fb000011fb1,
0x120000001239a,
0x1248000012544,
0x12f9000012ff1,
0x1300000013430,
0x1344000013456,
0x1440000014647,
0x1680000016a39,
0x16a4000016a5f,
0x16a6000016a6a,
0x16a7000016abf,
0x16ac000016aca,
0x16ad000016aee,
0x16af000016af5,
0x16b0000016b37,
0x16b4000016b44,
0x16b5000016b5a,
0x16b6300016b78,
0x16b7d00016b90,
0x16e6000016e80,
0x16f0000016f4b,
0x16f4f00016f88,
0x16f8f00016fa0,
0x16fe000016fe2,
0x16fe300016fe5,
0x16ff000016ff2,
0x17000000187f8,
0x1880000018cd6,
0x18d0000018d09,
0x1aff00001aff4,
0x1aff50001affc,
0x1affd0001afff,
0x1b0000001b123,
0x1b1320001b133,
0x1b1500001b153,
0x1b1550001b156,
0x1b1640001b168,
0x1b1700001b2fc,
0x1bc000001bc6b,
0x1bc700001bc7d,
0x1bc800001bc89,
0x1bc900001bc9a,
0x1bc9d0001bc9f,
0x1cf000001cf2e,
0x1cf300001cf47,
0x1da000001da37,
0x1da3b0001da6d,
0x1da750001da76,
0x1da840001da85,
0x1da9b0001daa0,
0x1daa10001dab0,
0x1df000001df1f,
0x1df250001df2b,
0x1e0000001e007,
0x1e0080001e019,
0x1e01b0001e022,
0x1e0230001e025,
0x1e0260001e02b,
0x1e0300001e06e,
0x1e08f0001e090,
0x1e1000001e12d,
0x1e1300001e13e,
0x1e1400001e14a,
0x1e14e0001e14f,
0x1e2900001e2af,
0x1e2c00001e2fa,
0x1e4d00001e4fa,
0x1e7e00001e7e7,
0x1e7e80001e7ec,
0x1e7ed0001e7ef,
0x1e7f00001e7ff,
0x1e8000001e8c5,
0x1e8d00001e8d7,
0x1e9220001e94c,
0x1e9500001e95a,
0x200000002a6e0,
0x2a7000002b73a,
0x2b7400002b81e,
0x2b8200002cea2,
0x2ceb00002ebe1,
0x300000003134b,
0x31350000323b0,
),
'CONTEXTJ': (
0x200c0000200e,
),
'CONTEXTO': (
0xb7000000b8,
0x37500000376,
0x5f3000005f5,
0x6600000066a,
0x6f0000006fa,
0x30fb000030fc,
),
}
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/idna/idnadata.py
|
Python
|
mit
| 44,375 |
"""
Given a list of integers, made up of (hopefully) a small number of long runs
of consecutive integers, compute a representation of the form
((start1, end1), (start2, end2) ...). Then answer the question "was x present
in the original list?" in time O(log(# runs)).
"""
import bisect
from typing import List, Tuple
def intranges_from_list(list_: List[int]) -> Tuple[int, ...]:
"""Represent a list of integers as a sequence of ranges:
((start_0, end_0), (start_1, end_1), ...), such that the original
integers are exactly those x such that start_i <= x < end_i for some i.
Ranges are encoded as single integers (start << 32 | end), not as tuples.
"""
sorted_list = sorted(list_)
ranges = []
last_write = -1
for i in range(len(sorted_list)):
if i+1 < len(sorted_list):
if sorted_list[i] == sorted_list[i+1]-1:
continue
current_range = sorted_list[last_write+1:i+1]
ranges.append(_encode_range(current_range[0], current_range[-1] + 1))
last_write = i
return tuple(ranges)
def _encode_range(start: int, end: int) -> int:
return (start << 32) | end
def _decode_range(r: int) -> Tuple[int, int]:
return (r >> 32), (r & ((1 << 32) - 1))
def intranges_contain(int_: int, ranges: Tuple[int, ...]) -> bool:
"""Determine if `int_` falls into one of the ranges in `ranges`."""
tuple_ = _encode_range(int_, 0)
pos = bisect.bisect_left(ranges, tuple_)
# we could be immediately ahead of a tuple (start, end)
# with start < int_ <= end
if pos > 0:
left, right = _decode_range(ranges[pos-1])
if left <= int_ < right:
return True
# or we could be immediately behind a tuple (int_, end)
if pos < len(ranges):
left, _ = _decode_range(ranges[pos])
if left == int_:
return True
return False
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/idna/intranges.py
|
Python
|
mit
| 1,881 |
__version__ = '3.4'
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/idna/package_data.py
|
Python
|
mit
| 21 |
# This file is automatically generated by tools/idna-data
# vim: set fileencoding=utf-8 :
from typing import List, Tuple, Union
"""IDNA Mapping Table from UTS46."""
__version__ = '15.0.0'
def _seg_0() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x0, '3'),
(0x1, '3'),
(0x2, '3'),
(0x3, '3'),
(0x4, '3'),
(0x5, '3'),
(0x6, '3'),
(0x7, '3'),
(0x8, '3'),
(0x9, '3'),
(0xA, '3'),
(0xB, '3'),
(0xC, '3'),
(0xD, '3'),
(0xE, '3'),
(0xF, '3'),
(0x10, '3'),
(0x11, '3'),
(0x12, '3'),
(0x13, '3'),
(0x14, '3'),
(0x15, '3'),
(0x16, '3'),
(0x17, '3'),
(0x18, '3'),
(0x19, '3'),
(0x1A, '3'),
(0x1B, '3'),
(0x1C, '3'),
(0x1D, '3'),
(0x1E, '3'),
(0x1F, '3'),
(0x20, '3'),
(0x21, '3'),
(0x22, '3'),
(0x23, '3'),
(0x24, '3'),
(0x25, '3'),
(0x26, '3'),
(0x27, '3'),
(0x28, '3'),
(0x29, '3'),
(0x2A, '3'),
(0x2B, '3'),
(0x2C, '3'),
(0x2D, 'V'),
(0x2E, 'V'),
(0x2F, '3'),
(0x30, 'V'),
(0x31, 'V'),
(0x32, 'V'),
(0x33, 'V'),
(0x34, 'V'),
(0x35, 'V'),
(0x36, 'V'),
(0x37, 'V'),
(0x38, 'V'),
(0x39, 'V'),
(0x3A, '3'),
(0x3B, '3'),
(0x3C, '3'),
(0x3D, '3'),
(0x3E, '3'),
(0x3F, '3'),
(0x40, '3'),
(0x41, 'M', 'a'),
(0x42, 'M', 'b'),
(0x43, 'M', 'c'),
(0x44, 'M', 'd'),
(0x45, 'M', 'e'),
(0x46, 'M', 'f'),
(0x47, 'M', 'g'),
(0x48, 'M', 'h'),
(0x49, 'M', 'i'),
(0x4A, 'M', 'j'),
(0x4B, 'M', 'k'),
(0x4C, 'M', 'l'),
(0x4D, 'M', 'm'),
(0x4E, 'M', 'n'),
(0x4F, 'M', 'o'),
(0x50, 'M', 'p'),
(0x51, 'M', 'q'),
(0x52, 'M', 'r'),
(0x53, 'M', 's'),
(0x54, 'M', 't'),
(0x55, 'M', 'u'),
(0x56, 'M', 'v'),
(0x57, 'M', 'w'),
(0x58, 'M', 'x'),
(0x59, 'M', 'y'),
(0x5A, 'M', 'z'),
(0x5B, '3'),
(0x5C, '3'),
(0x5D, '3'),
(0x5E, '3'),
(0x5F, '3'),
(0x60, '3'),
(0x61, 'V'),
(0x62, 'V'),
(0x63, 'V'),
]
def _seg_1() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x64, 'V'),
(0x65, 'V'),
(0x66, 'V'),
(0x67, 'V'),
(0x68, 'V'),
(0x69, 'V'),
(0x6A, 'V'),
(0x6B, 'V'),
(0x6C, 'V'),
(0x6D, 'V'),
(0x6E, 'V'),
(0x6F, 'V'),
(0x70, 'V'),
(0x71, 'V'),
(0x72, 'V'),
(0x73, 'V'),
(0x74, 'V'),
(0x75, 'V'),
(0x76, 'V'),
(0x77, 'V'),
(0x78, 'V'),
(0x79, 'V'),
(0x7A, 'V'),
(0x7B, '3'),
(0x7C, '3'),
(0x7D, '3'),
(0x7E, '3'),
(0x7F, '3'),
(0x80, 'X'),
(0x81, 'X'),
(0x82, 'X'),
(0x83, 'X'),
(0x84, 'X'),
(0x85, 'X'),
(0x86, 'X'),
(0x87, 'X'),
(0x88, 'X'),
(0x89, 'X'),
(0x8A, 'X'),
(0x8B, 'X'),
(0x8C, 'X'),
(0x8D, 'X'),
(0x8E, 'X'),
(0x8F, 'X'),
(0x90, 'X'),
(0x91, 'X'),
(0x92, 'X'),
(0x93, 'X'),
(0x94, 'X'),
(0x95, 'X'),
(0x96, 'X'),
(0x97, 'X'),
(0x98, 'X'),
(0x99, 'X'),
(0x9A, 'X'),
(0x9B, 'X'),
(0x9C, 'X'),
(0x9D, 'X'),
(0x9E, 'X'),
(0x9F, 'X'),
(0xA0, '3', ' '),
(0xA1, 'V'),
(0xA2, 'V'),
(0xA3, 'V'),
(0xA4, 'V'),
(0xA5, 'V'),
(0xA6, 'V'),
(0xA7, 'V'),
(0xA8, '3', ' ̈'),
(0xA9, 'V'),
(0xAA, 'M', 'a'),
(0xAB, 'V'),
(0xAC, 'V'),
(0xAD, 'I'),
(0xAE, 'V'),
(0xAF, '3', ' ̄'),
(0xB0, 'V'),
(0xB1, 'V'),
(0xB2, 'M', '2'),
(0xB3, 'M', '3'),
(0xB4, '3', ' ́'),
(0xB5, 'M', 'μ'),
(0xB6, 'V'),
(0xB7, 'V'),
(0xB8, '3', ' ̧'),
(0xB9, 'M', '1'),
(0xBA, 'M', 'o'),
(0xBB, 'V'),
(0xBC, 'M', '1⁄4'),
(0xBD, 'M', '1⁄2'),
(0xBE, 'M', '3⁄4'),
(0xBF, 'V'),
(0xC0, 'M', 'à'),
(0xC1, 'M', 'á'),
(0xC2, 'M', 'â'),
(0xC3, 'M', 'ã'),
(0xC4, 'M', 'ä'),
(0xC5, 'M', 'å'),
(0xC6, 'M', 'æ'),
(0xC7, 'M', 'ç'),
]
def _seg_2() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0xC8, 'M', 'è'),
(0xC9, 'M', 'é'),
(0xCA, 'M', 'ê'),
(0xCB, 'M', 'ë'),
(0xCC, 'M', 'ì'),
(0xCD, 'M', 'í'),
(0xCE, 'M', 'î'),
(0xCF, 'M', 'ï'),
(0xD0, 'M', 'ð'),
(0xD1, 'M', 'ñ'),
(0xD2, 'M', 'ò'),
(0xD3, 'M', 'ó'),
(0xD4, 'M', 'ô'),
(0xD5, 'M', 'õ'),
(0xD6, 'M', 'ö'),
(0xD7, 'V'),
(0xD8, 'M', 'ø'),
(0xD9, 'M', 'ù'),
(0xDA, 'M', 'ú'),
(0xDB, 'M', 'û'),
(0xDC, 'M', 'ü'),
(0xDD, 'M', 'ý'),
(0xDE, 'M', 'þ'),
(0xDF, 'D', 'ss'),
(0xE0, 'V'),
(0xE1, 'V'),
(0xE2, 'V'),
(0xE3, 'V'),
(0xE4, 'V'),
(0xE5, 'V'),
(0xE6, 'V'),
(0xE7, 'V'),
(0xE8, 'V'),
(0xE9, 'V'),
(0xEA, 'V'),
(0xEB, 'V'),
(0xEC, 'V'),
(0xED, 'V'),
(0xEE, 'V'),
(0xEF, 'V'),
(0xF0, 'V'),
(0xF1, 'V'),
(0xF2, 'V'),
(0xF3, 'V'),
(0xF4, 'V'),
(0xF5, 'V'),
(0xF6, 'V'),
(0xF7, 'V'),
(0xF8, 'V'),
(0xF9, 'V'),
(0xFA, 'V'),
(0xFB, 'V'),
(0xFC, 'V'),
(0xFD, 'V'),
(0xFE, 'V'),
(0xFF, 'V'),
(0x100, 'M', 'ā'),
(0x101, 'V'),
(0x102, 'M', 'ă'),
(0x103, 'V'),
(0x104, 'M', 'ą'),
(0x105, 'V'),
(0x106, 'M', 'ć'),
(0x107, 'V'),
(0x108, 'M', 'ĉ'),
(0x109, 'V'),
(0x10A, 'M', 'ċ'),
(0x10B, 'V'),
(0x10C, 'M', 'č'),
(0x10D, 'V'),
(0x10E, 'M', 'ď'),
(0x10F, 'V'),
(0x110, 'M', 'đ'),
(0x111, 'V'),
(0x112, 'M', 'ē'),
(0x113, 'V'),
(0x114, 'M', 'ĕ'),
(0x115, 'V'),
(0x116, 'M', 'ė'),
(0x117, 'V'),
(0x118, 'M', 'ę'),
(0x119, 'V'),
(0x11A, 'M', 'ě'),
(0x11B, 'V'),
(0x11C, 'M', 'ĝ'),
(0x11D, 'V'),
(0x11E, 'M', 'ğ'),
(0x11F, 'V'),
(0x120, 'M', 'ġ'),
(0x121, 'V'),
(0x122, 'M', 'ģ'),
(0x123, 'V'),
(0x124, 'M', 'ĥ'),
(0x125, 'V'),
(0x126, 'M', 'ħ'),
(0x127, 'V'),
(0x128, 'M', 'ĩ'),
(0x129, 'V'),
(0x12A, 'M', 'ī'),
(0x12B, 'V'),
]
def _seg_3() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x12C, 'M', 'ĭ'),
(0x12D, 'V'),
(0x12E, 'M', 'į'),
(0x12F, 'V'),
(0x130, 'M', 'i̇'),
(0x131, 'V'),
(0x132, 'M', 'ij'),
(0x134, 'M', 'ĵ'),
(0x135, 'V'),
(0x136, 'M', 'ķ'),
(0x137, 'V'),
(0x139, 'M', 'ĺ'),
(0x13A, 'V'),
(0x13B, 'M', 'ļ'),
(0x13C, 'V'),
(0x13D, 'M', 'ľ'),
(0x13E, 'V'),
(0x13F, 'M', 'l·'),
(0x141, 'M', 'ł'),
(0x142, 'V'),
(0x143, 'M', 'ń'),
(0x144, 'V'),
(0x145, 'M', 'ņ'),
(0x146, 'V'),
(0x147, 'M', 'ň'),
(0x148, 'V'),
(0x149, 'M', 'ʼn'),
(0x14A, 'M', 'ŋ'),
(0x14B, 'V'),
(0x14C, 'M', 'ō'),
(0x14D, 'V'),
(0x14E, 'M', 'ŏ'),
(0x14F, 'V'),
(0x150, 'M', 'ő'),
(0x151, 'V'),
(0x152, 'M', 'œ'),
(0x153, 'V'),
(0x154, 'M', 'ŕ'),
(0x155, 'V'),
(0x156, 'M', 'ŗ'),
(0x157, 'V'),
(0x158, 'M', 'ř'),
(0x159, 'V'),
(0x15A, 'M', 'ś'),
(0x15B, 'V'),
(0x15C, 'M', 'ŝ'),
(0x15D, 'V'),
(0x15E, 'M', 'ş'),
(0x15F, 'V'),
(0x160, 'M', 'š'),
(0x161, 'V'),
(0x162, 'M', 'ţ'),
(0x163, 'V'),
(0x164, 'M', 'ť'),
(0x165, 'V'),
(0x166, 'M', 'ŧ'),
(0x167, 'V'),
(0x168, 'M', 'ũ'),
(0x169, 'V'),
(0x16A, 'M', 'ū'),
(0x16B, 'V'),
(0x16C, 'M', 'ŭ'),
(0x16D, 'V'),
(0x16E, 'M', 'ů'),
(0x16F, 'V'),
(0x170, 'M', 'ű'),
(0x171, 'V'),
(0x172, 'M', 'ų'),
(0x173, 'V'),
(0x174, 'M', 'ŵ'),
(0x175, 'V'),
(0x176, 'M', 'ŷ'),
(0x177, 'V'),
(0x178, 'M', 'ÿ'),
(0x179, 'M', 'ź'),
(0x17A, 'V'),
(0x17B, 'M', 'ż'),
(0x17C, 'V'),
(0x17D, 'M', 'ž'),
(0x17E, 'V'),
(0x17F, 'M', 's'),
(0x180, 'V'),
(0x181, 'M', 'ɓ'),
(0x182, 'M', 'ƃ'),
(0x183, 'V'),
(0x184, 'M', 'ƅ'),
(0x185, 'V'),
(0x186, 'M', 'ɔ'),
(0x187, 'M', 'ƈ'),
(0x188, 'V'),
(0x189, 'M', 'ɖ'),
(0x18A, 'M', 'ɗ'),
(0x18B, 'M', 'ƌ'),
(0x18C, 'V'),
(0x18E, 'M', 'ǝ'),
(0x18F, 'M', 'ə'),
(0x190, 'M', 'ɛ'),
(0x191, 'M', 'ƒ'),
(0x192, 'V'),
(0x193, 'M', 'ɠ'),
]
def _seg_4() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x194, 'M', 'ɣ'),
(0x195, 'V'),
(0x196, 'M', 'ɩ'),
(0x197, 'M', 'ɨ'),
(0x198, 'M', 'ƙ'),
(0x199, 'V'),
(0x19C, 'M', 'ɯ'),
(0x19D, 'M', 'ɲ'),
(0x19E, 'V'),
(0x19F, 'M', 'ɵ'),
(0x1A0, 'M', 'ơ'),
(0x1A1, 'V'),
(0x1A2, 'M', 'ƣ'),
(0x1A3, 'V'),
(0x1A4, 'M', 'ƥ'),
(0x1A5, 'V'),
(0x1A6, 'M', 'ʀ'),
(0x1A7, 'M', 'ƨ'),
(0x1A8, 'V'),
(0x1A9, 'M', 'ʃ'),
(0x1AA, 'V'),
(0x1AC, 'M', 'ƭ'),
(0x1AD, 'V'),
(0x1AE, 'M', 'ʈ'),
(0x1AF, 'M', 'ư'),
(0x1B0, 'V'),
(0x1B1, 'M', 'ʊ'),
(0x1B2, 'M', 'ʋ'),
(0x1B3, 'M', 'ƴ'),
(0x1B4, 'V'),
(0x1B5, 'M', 'ƶ'),
(0x1B6, 'V'),
(0x1B7, 'M', 'ʒ'),
(0x1B8, 'M', 'ƹ'),
(0x1B9, 'V'),
(0x1BC, 'M', 'ƽ'),
(0x1BD, 'V'),
(0x1C4, 'M', 'dž'),
(0x1C7, 'M', 'lj'),
(0x1CA, 'M', 'nj'),
(0x1CD, 'M', 'ǎ'),
(0x1CE, 'V'),
(0x1CF, 'M', 'ǐ'),
(0x1D0, 'V'),
(0x1D1, 'M', 'ǒ'),
(0x1D2, 'V'),
(0x1D3, 'M', 'ǔ'),
(0x1D4, 'V'),
(0x1D5, 'M', 'ǖ'),
(0x1D6, 'V'),
(0x1D7, 'M', 'ǘ'),
(0x1D8, 'V'),
(0x1D9, 'M', 'ǚ'),
(0x1DA, 'V'),
(0x1DB, 'M', 'ǜ'),
(0x1DC, 'V'),
(0x1DE, 'M', 'ǟ'),
(0x1DF, 'V'),
(0x1E0, 'M', 'ǡ'),
(0x1E1, 'V'),
(0x1E2, 'M', 'ǣ'),
(0x1E3, 'V'),
(0x1E4, 'M', 'ǥ'),
(0x1E5, 'V'),
(0x1E6, 'M', 'ǧ'),
(0x1E7, 'V'),
(0x1E8, 'M', 'ǩ'),
(0x1E9, 'V'),
(0x1EA, 'M', 'ǫ'),
(0x1EB, 'V'),
(0x1EC, 'M', 'ǭ'),
(0x1ED, 'V'),
(0x1EE, 'M', 'ǯ'),
(0x1EF, 'V'),
(0x1F1, 'M', 'dz'),
(0x1F4, 'M', 'ǵ'),
(0x1F5, 'V'),
(0x1F6, 'M', 'ƕ'),
(0x1F7, 'M', 'ƿ'),
(0x1F8, 'M', 'ǹ'),
(0x1F9, 'V'),
(0x1FA, 'M', 'ǻ'),
(0x1FB, 'V'),
(0x1FC, 'M', 'ǽ'),
(0x1FD, 'V'),
(0x1FE, 'M', 'ǿ'),
(0x1FF, 'V'),
(0x200, 'M', 'ȁ'),
(0x201, 'V'),
(0x202, 'M', 'ȃ'),
(0x203, 'V'),
(0x204, 'M', 'ȅ'),
(0x205, 'V'),
(0x206, 'M', 'ȇ'),
(0x207, 'V'),
(0x208, 'M', 'ȉ'),
(0x209, 'V'),
(0x20A, 'M', 'ȋ'),
(0x20B, 'V'),
(0x20C, 'M', 'ȍ'),
]
def _seg_5() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x20D, 'V'),
(0x20E, 'M', 'ȏ'),
(0x20F, 'V'),
(0x210, 'M', 'ȑ'),
(0x211, 'V'),
(0x212, 'M', 'ȓ'),
(0x213, 'V'),
(0x214, 'M', 'ȕ'),
(0x215, 'V'),
(0x216, 'M', 'ȗ'),
(0x217, 'V'),
(0x218, 'M', 'ș'),
(0x219, 'V'),
(0x21A, 'M', 'ț'),
(0x21B, 'V'),
(0x21C, 'M', 'ȝ'),
(0x21D, 'V'),
(0x21E, 'M', 'ȟ'),
(0x21F, 'V'),
(0x220, 'M', 'ƞ'),
(0x221, 'V'),
(0x222, 'M', 'ȣ'),
(0x223, 'V'),
(0x224, 'M', 'ȥ'),
(0x225, 'V'),
(0x226, 'M', 'ȧ'),
(0x227, 'V'),
(0x228, 'M', 'ȩ'),
(0x229, 'V'),
(0x22A, 'M', 'ȫ'),
(0x22B, 'V'),
(0x22C, 'M', 'ȭ'),
(0x22D, 'V'),
(0x22E, 'M', 'ȯ'),
(0x22F, 'V'),
(0x230, 'M', 'ȱ'),
(0x231, 'V'),
(0x232, 'M', 'ȳ'),
(0x233, 'V'),
(0x23A, 'M', 'ⱥ'),
(0x23B, 'M', 'ȼ'),
(0x23C, 'V'),
(0x23D, 'M', 'ƚ'),
(0x23E, 'M', 'ⱦ'),
(0x23F, 'V'),
(0x241, 'M', 'ɂ'),
(0x242, 'V'),
(0x243, 'M', 'ƀ'),
(0x244, 'M', 'ʉ'),
(0x245, 'M', 'ʌ'),
(0x246, 'M', 'ɇ'),
(0x247, 'V'),
(0x248, 'M', 'ɉ'),
(0x249, 'V'),
(0x24A, 'M', 'ɋ'),
(0x24B, 'V'),
(0x24C, 'M', 'ɍ'),
(0x24D, 'V'),
(0x24E, 'M', 'ɏ'),
(0x24F, 'V'),
(0x2B0, 'M', 'h'),
(0x2B1, 'M', 'ɦ'),
(0x2B2, 'M', 'j'),
(0x2B3, 'M', 'r'),
(0x2B4, 'M', 'ɹ'),
(0x2B5, 'M', 'ɻ'),
(0x2B6, 'M', 'ʁ'),
(0x2B7, 'M', 'w'),
(0x2B8, 'M', 'y'),
(0x2B9, 'V'),
(0x2D8, '3', ' ̆'),
(0x2D9, '3', ' ̇'),
(0x2DA, '3', ' ̊'),
(0x2DB, '3', ' ̨'),
(0x2DC, '3', ' ̃'),
(0x2DD, '3', ' ̋'),
(0x2DE, 'V'),
(0x2E0, 'M', 'ɣ'),
(0x2E1, 'M', 'l'),
(0x2E2, 'M', 's'),
(0x2E3, 'M', 'x'),
(0x2E4, 'M', 'ʕ'),
(0x2E5, 'V'),
(0x340, 'M', '̀'),
(0x341, 'M', '́'),
(0x342, 'V'),
(0x343, 'M', '̓'),
(0x344, 'M', '̈́'),
(0x345, 'M', 'ι'),
(0x346, 'V'),
(0x34F, 'I'),
(0x350, 'V'),
(0x370, 'M', 'ͱ'),
(0x371, 'V'),
(0x372, 'M', 'ͳ'),
(0x373, 'V'),
(0x374, 'M', 'ʹ'),
(0x375, 'V'),
(0x376, 'M', 'ͷ'),
(0x377, 'V'),
]
def _seg_6() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x378, 'X'),
(0x37A, '3', ' ι'),
(0x37B, 'V'),
(0x37E, '3', ';'),
(0x37F, 'M', 'ϳ'),
(0x380, 'X'),
(0x384, '3', ' ́'),
(0x385, '3', ' ̈́'),
(0x386, 'M', 'ά'),
(0x387, 'M', '·'),
(0x388, 'M', 'έ'),
(0x389, 'M', 'ή'),
(0x38A, 'M', 'ί'),
(0x38B, 'X'),
(0x38C, 'M', 'ό'),
(0x38D, 'X'),
(0x38E, 'M', 'ύ'),
(0x38F, 'M', 'ώ'),
(0x390, 'V'),
(0x391, 'M', 'α'),
(0x392, 'M', 'β'),
(0x393, 'M', 'γ'),
(0x394, 'M', 'δ'),
(0x395, 'M', 'ε'),
(0x396, 'M', 'ζ'),
(0x397, 'M', 'η'),
(0x398, 'M', 'θ'),
(0x399, 'M', 'ι'),
(0x39A, 'M', 'κ'),
(0x39B, 'M', 'λ'),
(0x39C, 'M', 'μ'),
(0x39D, 'M', 'ν'),
(0x39E, 'M', 'ξ'),
(0x39F, 'M', 'ο'),
(0x3A0, 'M', 'π'),
(0x3A1, 'M', 'ρ'),
(0x3A2, 'X'),
(0x3A3, 'M', 'σ'),
(0x3A4, 'M', 'τ'),
(0x3A5, 'M', 'υ'),
(0x3A6, 'M', 'φ'),
(0x3A7, 'M', 'χ'),
(0x3A8, 'M', 'ψ'),
(0x3A9, 'M', 'ω'),
(0x3AA, 'M', 'ϊ'),
(0x3AB, 'M', 'ϋ'),
(0x3AC, 'V'),
(0x3C2, 'D', 'σ'),
(0x3C3, 'V'),
(0x3CF, 'M', 'ϗ'),
(0x3D0, 'M', 'β'),
(0x3D1, 'M', 'θ'),
(0x3D2, 'M', 'υ'),
(0x3D3, 'M', 'ύ'),
(0x3D4, 'M', 'ϋ'),
(0x3D5, 'M', 'φ'),
(0x3D6, 'M', 'π'),
(0x3D7, 'V'),
(0x3D8, 'M', 'ϙ'),
(0x3D9, 'V'),
(0x3DA, 'M', 'ϛ'),
(0x3DB, 'V'),
(0x3DC, 'M', 'ϝ'),
(0x3DD, 'V'),
(0x3DE, 'M', 'ϟ'),
(0x3DF, 'V'),
(0x3E0, 'M', 'ϡ'),
(0x3E1, 'V'),
(0x3E2, 'M', 'ϣ'),
(0x3E3, 'V'),
(0x3E4, 'M', 'ϥ'),
(0x3E5, 'V'),
(0x3E6, 'M', 'ϧ'),
(0x3E7, 'V'),
(0x3E8, 'M', 'ϩ'),
(0x3E9, 'V'),
(0x3EA, 'M', 'ϫ'),
(0x3EB, 'V'),
(0x3EC, 'M', 'ϭ'),
(0x3ED, 'V'),
(0x3EE, 'M', 'ϯ'),
(0x3EF, 'V'),
(0x3F0, 'M', 'κ'),
(0x3F1, 'M', 'ρ'),
(0x3F2, 'M', 'σ'),
(0x3F3, 'V'),
(0x3F4, 'M', 'θ'),
(0x3F5, 'M', 'ε'),
(0x3F6, 'V'),
(0x3F7, 'M', 'ϸ'),
(0x3F8, 'V'),
(0x3F9, 'M', 'σ'),
(0x3FA, 'M', 'ϻ'),
(0x3FB, 'V'),
(0x3FD, 'M', 'ͻ'),
(0x3FE, 'M', 'ͼ'),
(0x3FF, 'M', 'ͽ'),
(0x400, 'M', 'ѐ'),
(0x401, 'M', 'ё'),
(0x402, 'M', 'ђ'),
]
def _seg_7() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x403, 'M', 'ѓ'),
(0x404, 'M', 'є'),
(0x405, 'M', 'ѕ'),
(0x406, 'M', 'і'),
(0x407, 'M', 'ї'),
(0x408, 'M', 'ј'),
(0x409, 'M', 'љ'),
(0x40A, 'M', 'њ'),
(0x40B, 'M', 'ћ'),
(0x40C, 'M', 'ќ'),
(0x40D, 'M', 'ѝ'),
(0x40E, 'M', 'ў'),
(0x40F, 'M', 'џ'),
(0x410, 'M', 'а'),
(0x411, 'M', 'б'),
(0x412, 'M', 'в'),
(0x413, 'M', 'г'),
(0x414, 'M', 'д'),
(0x415, 'M', 'е'),
(0x416, 'M', 'ж'),
(0x417, 'M', 'з'),
(0x418, 'M', 'и'),
(0x419, 'M', 'й'),
(0x41A, 'M', 'к'),
(0x41B, 'M', 'л'),
(0x41C, 'M', 'м'),
(0x41D, 'M', 'н'),
(0x41E, 'M', 'о'),
(0x41F, 'M', 'п'),
(0x420, 'M', 'р'),
(0x421, 'M', 'с'),
(0x422, 'M', 'т'),
(0x423, 'M', 'у'),
(0x424, 'M', 'ф'),
(0x425, 'M', 'х'),
(0x426, 'M', 'ц'),
(0x427, 'M', 'ч'),
(0x428, 'M', 'ш'),
(0x429, 'M', 'щ'),
(0x42A, 'M', 'ъ'),
(0x42B, 'M', 'ы'),
(0x42C, 'M', 'ь'),
(0x42D, 'M', 'э'),
(0x42E, 'M', 'ю'),
(0x42F, 'M', 'я'),
(0x430, 'V'),
(0x460, 'M', 'ѡ'),
(0x461, 'V'),
(0x462, 'M', 'ѣ'),
(0x463, 'V'),
(0x464, 'M', 'ѥ'),
(0x465, 'V'),
(0x466, 'M', 'ѧ'),
(0x467, 'V'),
(0x468, 'M', 'ѩ'),
(0x469, 'V'),
(0x46A, 'M', 'ѫ'),
(0x46B, 'V'),
(0x46C, 'M', 'ѭ'),
(0x46D, 'V'),
(0x46E, 'M', 'ѯ'),
(0x46F, 'V'),
(0x470, 'M', 'ѱ'),
(0x471, 'V'),
(0x472, 'M', 'ѳ'),
(0x473, 'V'),
(0x474, 'M', 'ѵ'),
(0x475, 'V'),
(0x476, 'M', 'ѷ'),
(0x477, 'V'),
(0x478, 'M', 'ѹ'),
(0x479, 'V'),
(0x47A, 'M', 'ѻ'),
(0x47B, 'V'),
(0x47C, 'M', 'ѽ'),
(0x47D, 'V'),
(0x47E, 'M', 'ѿ'),
(0x47F, 'V'),
(0x480, 'M', 'ҁ'),
(0x481, 'V'),
(0x48A, 'M', 'ҋ'),
(0x48B, 'V'),
(0x48C, 'M', 'ҍ'),
(0x48D, 'V'),
(0x48E, 'M', 'ҏ'),
(0x48F, 'V'),
(0x490, 'M', 'ґ'),
(0x491, 'V'),
(0x492, 'M', 'ғ'),
(0x493, 'V'),
(0x494, 'M', 'ҕ'),
(0x495, 'V'),
(0x496, 'M', 'җ'),
(0x497, 'V'),
(0x498, 'M', 'ҙ'),
(0x499, 'V'),
(0x49A, 'M', 'қ'),
(0x49B, 'V'),
(0x49C, 'M', 'ҝ'),
(0x49D, 'V'),
]
def _seg_8() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x49E, 'M', 'ҟ'),
(0x49F, 'V'),
(0x4A0, 'M', 'ҡ'),
(0x4A1, 'V'),
(0x4A2, 'M', 'ң'),
(0x4A3, 'V'),
(0x4A4, 'M', 'ҥ'),
(0x4A5, 'V'),
(0x4A6, 'M', 'ҧ'),
(0x4A7, 'V'),
(0x4A8, 'M', 'ҩ'),
(0x4A9, 'V'),
(0x4AA, 'M', 'ҫ'),
(0x4AB, 'V'),
(0x4AC, 'M', 'ҭ'),
(0x4AD, 'V'),
(0x4AE, 'M', 'ү'),
(0x4AF, 'V'),
(0x4B0, 'M', 'ұ'),
(0x4B1, 'V'),
(0x4B2, 'M', 'ҳ'),
(0x4B3, 'V'),
(0x4B4, 'M', 'ҵ'),
(0x4B5, 'V'),
(0x4B6, 'M', 'ҷ'),
(0x4B7, 'V'),
(0x4B8, 'M', 'ҹ'),
(0x4B9, 'V'),
(0x4BA, 'M', 'һ'),
(0x4BB, 'V'),
(0x4BC, 'M', 'ҽ'),
(0x4BD, 'V'),
(0x4BE, 'M', 'ҿ'),
(0x4BF, 'V'),
(0x4C0, 'X'),
(0x4C1, 'M', 'ӂ'),
(0x4C2, 'V'),
(0x4C3, 'M', 'ӄ'),
(0x4C4, 'V'),
(0x4C5, 'M', 'ӆ'),
(0x4C6, 'V'),
(0x4C7, 'M', 'ӈ'),
(0x4C8, 'V'),
(0x4C9, 'M', 'ӊ'),
(0x4CA, 'V'),
(0x4CB, 'M', 'ӌ'),
(0x4CC, 'V'),
(0x4CD, 'M', 'ӎ'),
(0x4CE, 'V'),
(0x4D0, 'M', 'ӑ'),
(0x4D1, 'V'),
(0x4D2, 'M', 'ӓ'),
(0x4D3, 'V'),
(0x4D4, 'M', 'ӕ'),
(0x4D5, 'V'),
(0x4D6, 'M', 'ӗ'),
(0x4D7, 'V'),
(0x4D8, 'M', 'ә'),
(0x4D9, 'V'),
(0x4DA, 'M', 'ӛ'),
(0x4DB, 'V'),
(0x4DC, 'M', 'ӝ'),
(0x4DD, 'V'),
(0x4DE, 'M', 'ӟ'),
(0x4DF, 'V'),
(0x4E0, 'M', 'ӡ'),
(0x4E1, 'V'),
(0x4E2, 'M', 'ӣ'),
(0x4E3, 'V'),
(0x4E4, 'M', 'ӥ'),
(0x4E5, 'V'),
(0x4E6, 'M', 'ӧ'),
(0x4E7, 'V'),
(0x4E8, 'M', 'ө'),
(0x4E9, 'V'),
(0x4EA, 'M', 'ӫ'),
(0x4EB, 'V'),
(0x4EC, 'M', 'ӭ'),
(0x4ED, 'V'),
(0x4EE, 'M', 'ӯ'),
(0x4EF, 'V'),
(0x4F0, 'M', 'ӱ'),
(0x4F1, 'V'),
(0x4F2, 'M', 'ӳ'),
(0x4F3, 'V'),
(0x4F4, 'M', 'ӵ'),
(0x4F5, 'V'),
(0x4F6, 'M', 'ӷ'),
(0x4F7, 'V'),
(0x4F8, 'M', 'ӹ'),
(0x4F9, 'V'),
(0x4FA, 'M', 'ӻ'),
(0x4FB, 'V'),
(0x4FC, 'M', 'ӽ'),
(0x4FD, 'V'),
(0x4FE, 'M', 'ӿ'),
(0x4FF, 'V'),
(0x500, 'M', 'ԁ'),
(0x501, 'V'),
(0x502, 'M', 'ԃ'),
]
def _seg_9() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x503, 'V'),
(0x504, 'M', 'ԅ'),
(0x505, 'V'),
(0x506, 'M', 'ԇ'),
(0x507, 'V'),
(0x508, 'M', 'ԉ'),
(0x509, 'V'),
(0x50A, 'M', 'ԋ'),
(0x50B, 'V'),
(0x50C, 'M', 'ԍ'),
(0x50D, 'V'),
(0x50E, 'M', 'ԏ'),
(0x50F, 'V'),
(0x510, 'M', 'ԑ'),
(0x511, 'V'),
(0x512, 'M', 'ԓ'),
(0x513, 'V'),
(0x514, 'M', 'ԕ'),
(0x515, 'V'),
(0x516, 'M', 'ԗ'),
(0x517, 'V'),
(0x518, 'M', 'ԙ'),
(0x519, 'V'),
(0x51A, 'M', 'ԛ'),
(0x51B, 'V'),
(0x51C, 'M', 'ԝ'),
(0x51D, 'V'),
(0x51E, 'M', 'ԟ'),
(0x51F, 'V'),
(0x520, 'M', 'ԡ'),
(0x521, 'V'),
(0x522, 'M', 'ԣ'),
(0x523, 'V'),
(0x524, 'M', 'ԥ'),
(0x525, 'V'),
(0x526, 'M', 'ԧ'),
(0x527, 'V'),
(0x528, 'M', 'ԩ'),
(0x529, 'V'),
(0x52A, 'M', 'ԫ'),
(0x52B, 'V'),
(0x52C, 'M', 'ԭ'),
(0x52D, 'V'),
(0x52E, 'M', 'ԯ'),
(0x52F, 'V'),
(0x530, 'X'),
(0x531, 'M', 'ա'),
(0x532, 'M', 'բ'),
(0x533, 'M', 'գ'),
(0x534, 'M', 'դ'),
(0x535, 'M', 'ե'),
(0x536, 'M', 'զ'),
(0x537, 'M', 'է'),
(0x538, 'M', 'ը'),
(0x539, 'M', 'թ'),
(0x53A, 'M', 'ժ'),
(0x53B, 'M', 'ի'),
(0x53C, 'M', 'լ'),
(0x53D, 'M', 'խ'),
(0x53E, 'M', 'ծ'),
(0x53F, 'M', 'կ'),
(0x540, 'M', 'հ'),
(0x541, 'M', 'ձ'),
(0x542, 'M', 'ղ'),
(0x543, 'M', 'ճ'),
(0x544, 'M', 'մ'),
(0x545, 'M', 'յ'),
(0x546, 'M', 'ն'),
(0x547, 'M', 'շ'),
(0x548, 'M', 'ո'),
(0x549, 'M', 'չ'),
(0x54A, 'M', 'պ'),
(0x54B, 'M', 'ջ'),
(0x54C, 'M', 'ռ'),
(0x54D, 'M', 'ս'),
(0x54E, 'M', 'վ'),
(0x54F, 'M', 'տ'),
(0x550, 'M', 'ր'),
(0x551, 'M', 'ց'),
(0x552, 'M', 'ւ'),
(0x553, 'M', 'փ'),
(0x554, 'M', 'ք'),
(0x555, 'M', 'օ'),
(0x556, 'M', 'ֆ'),
(0x557, 'X'),
(0x559, 'V'),
(0x587, 'M', 'եւ'),
(0x588, 'V'),
(0x58B, 'X'),
(0x58D, 'V'),
(0x590, 'X'),
(0x591, 'V'),
(0x5C8, 'X'),
(0x5D0, 'V'),
(0x5EB, 'X'),
(0x5EF, 'V'),
(0x5F5, 'X'),
(0x606, 'V'),
(0x61C, 'X'),
(0x61D, 'V'),
]
def _seg_10() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x675, 'M', 'اٴ'),
(0x676, 'M', 'وٴ'),
(0x677, 'M', 'ۇٴ'),
(0x678, 'M', 'يٴ'),
(0x679, 'V'),
(0x6DD, 'X'),
(0x6DE, 'V'),
(0x70E, 'X'),
(0x710, 'V'),
(0x74B, 'X'),
(0x74D, 'V'),
(0x7B2, 'X'),
(0x7C0, 'V'),
(0x7FB, 'X'),
(0x7FD, 'V'),
(0x82E, 'X'),
(0x830, 'V'),
(0x83F, 'X'),
(0x840, 'V'),
(0x85C, 'X'),
(0x85E, 'V'),
(0x85F, 'X'),
(0x860, 'V'),
(0x86B, 'X'),
(0x870, 'V'),
(0x88F, 'X'),
(0x898, 'V'),
(0x8E2, 'X'),
(0x8E3, 'V'),
(0x958, 'M', 'क़'),
(0x959, 'M', 'ख़'),
(0x95A, 'M', 'ग़'),
(0x95B, 'M', 'ज़'),
(0x95C, 'M', 'ड़'),
(0x95D, 'M', 'ढ़'),
(0x95E, 'M', 'फ़'),
(0x95F, 'M', 'य़'),
(0x960, 'V'),
(0x984, 'X'),
(0x985, 'V'),
(0x98D, 'X'),
(0x98F, 'V'),
(0x991, 'X'),
(0x993, 'V'),
(0x9A9, 'X'),
(0x9AA, 'V'),
(0x9B1, 'X'),
(0x9B2, 'V'),
(0x9B3, 'X'),
(0x9B6, 'V'),
(0x9BA, 'X'),
(0x9BC, 'V'),
(0x9C5, 'X'),
(0x9C7, 'V'),
(0x9C9, 'X'),
(0x9CB, 'V'),
(0x9CF, 'X'),
(0x9D7, 'V'),
(0x9D8, 'X'),
(0x9DC, 'M', 'ড়'),
(0x9DD, 'M', 'ঢ়'),
(0x9DE, 'X'),
(0x9DF, 'M', 'য়'),
(0x9E0, 'V'),
(0x9E4, 'X'),
(0x9E6, 'V'),
(0x9FF, 'X'),
(0xA01, 'V'),
(0xA04, 'X'),
(0xA05, 'V'),
(0xA0B, 'X'),
(0xA0F, 'V'),
(0xA11, 'X'),
(0xA13, 'V'),
(0xA29, 'X'),
(0xA2A, 'V'),
(0xA31, 'X'),
(0xA32, 'V'),
(0xA33, 'M', 'ਲ਼'),
(0xA34, 'X'),
(0xA35, 'V'),
(0xA36, 'M', 'ਸ਼'),
(0xA37, 'X'),
(0xA38, 'V'),
(0xA3A, 'X'),
(0xA3C, 'V'),
(0xA3D, 'X'),
(0xA3E, 'V'),
(0xA43, 'X'),
(0xA47, 'V'),
(0xA49, 'X'),
(0xA4B, 'V'),
(0xA4E, 'X'),
(0xA51, 'V'),
(0xA52, 'X'),
(0xA59, 'M', 'ਖ਼'),
(0xA5A, 'M', 'ਗ਼'),
(0xA5B, 'M', 'ਜ਼'),
(0xA5C, 'V'),
(0xA5D, 'X'),
]
def _seg_11() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0xA5E, 'M', 'ਫ਼'),
(0xA5F, 'X'),
(0xA66, 'V'),
(0xA77, 'X'),
(0xA81, 'V'),
(0xA84, 'X'),
(0xA85, 'V'),
(0xA8E, 'X'),
(0xA8F, 'V'),
(0xA92, 'X'),
(0xA93, 'V'),
(0xAA9, 'X'),
(0xAAA, 'V'),
(0xAB1, 'X'),
(0xAB2, 'V'),
(0xAB4, 'X'),
(0xAB5, 'V'),
(0xABA, 'X'),
(0xABC, 'V'),
(0xAC6, 'X'),
(0xAC7, 'V'),
(0xACA, 'X'),
(0xACB, 'V'),
(0xACE, 'X'),
(0xAD0, 'V'),
(0xAD1, 'X'),
(0xAE0, 'V'),
(0xAE4, 'X'),
(0xAE6, 'V'),
(0xAF2, 'X'),
(0xAF9, 'V'),
(0xB00, 'X'),
(0xB01, 'V'),
(0xB04, 'X'),
(0xB05, 'V'),
(0xB0D, 'X'),
(0xB0F, 'V'),
(0xB11, 'X'),
(0xB13, 'V'),
(0xB29, 'X'),
(0xB2A, 'V'),
(0xB31, 'X'),
(0xB32, 'V'),
(0xB34, 'X'),
(0xB35, 'V'),
(0xB3A, 'X'),
(0xB3C, 'V'),
(0xB45, 'X'),
(0xB47, 'V'),
(0xB49, 'X'),
(0xB4B, 'V'),
(0xB4E, 'X'),
(0xB55, 'V'),
(0xB58, 'X'),
(0xB5C, 'M', 'ଡ଼'),
(0xB5D, 'M', 'ଢ଼'),
(0xB5E, 'X'),
(0xB5F, 'V'),
(0xB64, 'X'),
(0xB66, 'V'),
(0xB78, 'X'),
(0xB82, 'V'),
(0xB84, 'X'),
(0xB85, 'V'),
(0xB8B, 'X'),
(0xB8E, 'V'),
(0xB91, 'X'),
(0xB92, 'V'),
(0xB96, 'X'),
(0xB99, 'V'),
(0xB9B, 'X'),
(0xB9C, 'V'),
(0xB9D, 'X'),
(0xB9E, 'V'),
(0xBA0, 'X'),
(0xBA3, 'V'),
(0xBA5, 'X'),
(0xBA8, 'V'),
(0xBAB, 'X'),
(0xBAE, 'V'),
(0xBBA, 'X'),
(0xBBE, 'V'),
(0xBC3, 'X'),
(0xBC6, 'V'),
(0xBC9, 'X'),
(0xBCA, 'V'),
(0xBCE, 'X'),
(0xBD0, 'V'),
(0xBD1, 'X'),
(0xBD7, 'V'),
(0xBD8, 'X'),
(0xBE6, 'V'),
(0xBFB, 'X'),
(0xC00, 'V'),
(0xC0D, 'X'),
(0xC0E, 'V'),
(0xC11, 'X'),
(0xC12, 'V'),
(0xC29, 'X'),
(0xC2A, 'V'),
]
def _seg_12() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0xC3A, 'X'),
(0xC3C, 'V'),
(0xC45, 'X'),
(0xC46, 'V'),
(0xC49, 'X'),
(0xC4A, 'V'),
(0xC4E, 'X'),
(0xC55, 'V'),
(0xC57, 'X'),
(0xC58, 'V'),
(0xC5B, 'X'),
(0xC5D, 'V'),
(0xC5E, 'X'),
(0xC60, 'V'),
(0xC64, 'X'),
(0xC66, 'V'),
(0xC70, 'X'),
(0xC77, 'V'),
(0xC8D, 'X'),
(0xC8E, 'V'),
(0xC91, 'X'),
(0xC92, 'V'),
(0xCA9, 'X'),
(0xCAA, 'V'),
(0xCB4, 'X'),
(0xCB5, 'V'),
(0xCBA, 'X'),
(0xCBC, 'V'),
(0xCC5, 'X'),
(0xCC6, 'V'),
(0xCC9, 'X'),
(0xCCA, 'V'),
(0xCCE, 'X'),
(0xCD5, 'V'),
(0xCD7, 'X'),
(0xCDD, 'V'),
(0xCDF, 'X'),
(0xCE0, 'V'),
(0xCE4, 'X'),
(0xCE6, 'V'),
(0xCF0, 'X'),
(0xCF1, 'V'),
(0xCF4, 'X'),
(0xD00, 'V'),
(0xD0D, 'X'),
(0xD0E, 'V'),
(0xD11, 'X'),
(0xD12, 'V'),
(0xD45, 'X'),
(0xD46, 'V'),
(0xD49, 'X'),
(0xD4A, 'V'),
(0xD50, 'X'),
(0xD54, 'V'),
(0xD64, 'X'),
(0xD66, 'V'),
(0xD80, 'X'),
(0xD81, 'V'),
(0xD84, 'X'),
(0xD85, 'V'),
(0xD97, 'X'),
(0xD9A, 'V'),
(0xDB2, 'X'),
(0xDB3, 'V'),
(0xDBC, 'X'),
(0xDBD, 'V'),
(0xDBE, 'X'),
(0xDC0, 'V'),
(0xDC7, 'X'),
(0xDCA, 'V'),
(0xDCB, 'X'),
(0xDCF, 'V'),
(0xDD5, 'X'),
(0xDD6, 'V'),
(0xDD7, 'X'),
(0xDD8, 'V'),
(0xDE0, 'X'),
(0xDE6, 'V'),
(0xDF0, 'X'),
(0xDF2, 'V'),
(0xDF5, 'X'),
(0xE01, 'V'),
(0xE33, 'M', 'ํา'),
(0xE34, 'V'),
(0xE3B, 'X'),
(0xE3F, 'V'),
(0xE5C, 'X'),
(0xE81, 'V'),
(0xE83, 'X'),
(0xE84, 'V'),
(0xE85, 'X'),
(0xE86, 'V'),
(0xE8B, 'X'),
(0xE8C, 'V'),
(0xEA4, 'X'),
(0xEA5, 'V'),
(0xEA6, 'X'),
(0xEA7, 'V'),
(0xEB3, 'M', 'ໍາ'),
(0xEB4, 'V'),
]
def _seg_13() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0xEBE, 'X'),
(0xEC0, 'V'),
(0xEC5, 'X'),
(0xEC6, 'V'),
(0xEC7, 'X'),
(0xEC8, 'V'),
(0xECF, 'X'),
(0xED0, 'V'),
(0xEDA, 'X'),
(0xEDC, 'M', 'ຫນ'),
(0xEDD, 'M', 'ຫມ'),
(0xEDE, 'V'),
(0xEE0, 'X'),
(0xF00, 'V'),
(0xF0C, 'M', '་'),
(0xF0D, 'V'),
(0xF43, 'M', 'གྷ'),
(0xF44, 'V'),
(0xF48, 'X'),
(0xF49, 'V'),
(0xF4D, 'M', 'ཌྷ'),
(0xF4E, 'V'),
(0xF52, 'M', 'དྷ'),
(0xF53, 'V'),
(0xF57, 'M', 'བྷ'),
(0xF58, 'V'),
(0xF5C, 'M', 'ཛྷ'),
(0xF5D, 'V'),
(0xF69, 'M', 'ཀྵ'),
(0xF6A, 'V'),
(0xF6D, 'X'),
(0xF71, 'V'),
(0xF73, 'M', 'ཱི'),
(0xF74, 'V'),
(0xF75, 'M', 'ཱུ'),
(0xF76, 'M', 'ྲྀ'),
(0xF77, 'M', 'ྲཱྀ'),
(0xF78, 'M', 'ླྀ'),
(0xF79, 'M', 'ླཱྀ'),
(0xF7A, 'V'),
(0xF81, 'M', 'ཱྀ'),
(0xF82, 'V'),
(0xF93, 'M', 'ྒྷ'),
(0xF94, 'V'),
(0xF98, 'X'),
(0xF99, 'V'),
(0xF9D, 'M', 'ྜྷ'),
(0xF9E, 'V'),
(0xFA2, 'M', 'ྡྷ'),
(0xFA3, 'V'),
(0xFA7, 'M', 'ྦྷ'),
(0xFA8, 'V'),
(0xFAC, 'M', 'ྫྷ'),
(0xFAD, 'V'),
(0xFB9, 'M', 'ྐྵ'),
(0xFBA, 'V'),
(0xFBD, 'X'),
(0xFBE, 'V'),
(0xFCD, 'X'),
(0xFCE, 'V'),
(0xFDB, 'X'),
(0x1000, 'V'),
(0x10A0, 'X'),
(0x10C7, 'M', 'ⴧ'),
(0x10C8, 'X'),
(0x10CD, 'M', 'ⴭ'),
(0x10CE, 'X'),
(0x10D0, 'V'),
(0x10FC, 'M', 'ნ'),
(0x10FD, 'V'),
(0x115F, 'X'),
(0x1161, 'V'),
(0x1249, 'X'),
(0x124A, 'V'),
(0x124E, 'X'),
(0x1250, 'V'),
(0x1257, 'X'),
(0x1258, 'V'),
(0x1259, 'X'),
(0x125A, 'V'),
(0x125E, 'X'),
(0x1260, 'V'),
(0x1289, 'X'),
(0x128A, 'V'),
(0x128E, 'X'),
(0x1290, 'V'),
(0x12B1, 'X'),
(0x12B2, 'V'),
(0x12B6, 'X'),
(0x12B8, 'V'),
(0x12BF, 'X'),
(0x12C0, 'V'),
(0x12C1, 'X'),
(0x12C2, 'V'),
(0x12C6, 'X'),
(0x12C8, 'V'),
(0x12D7, 'X'),
(0x12D8, 'V'),
(0x1311, 'X'),
(0x1312, 'V'),
]
def _seg_14() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x1316, 'X'),
(0x1318, 'V'),
(0x135B, 'X'),
(0x135D, 'V'),
(0x137D, 'X'),
(0x1380, 'V'),
(0x139A, 'X'),
(0x13A0, 'V'),
(0x13F6, 'X'),
(0x13F8, 'M', 'Ᏸ'),
(0x13F9, 'M', 'Ᏹ'),
(0x13FA, 'M', 'Ᏺ'),
(0x13FB, 'M', 'Ᏻ'),
(0x13FC, 'M', 'Ᏼ'),
(0x13FD, 'M', 'Ᏽ'),
(0x13FE, 'X'),
(0x1400, 'V'),
(0x1680, 'X'),
(0x1681, 'V'),
(0x169D, 'X'),
(0x16A0, 'V'),
(0x16F9, 'X'),
(0x1700, 'V'),
(0x1716, 'X'),
(0x171F, 'V'),
(0x1737, 'X'),
(0x1740, 'V'),
(0x1754, 'X'),
(0x1760, 'V'),
(0x176D, 'X'),
(0x176E, 'V'),
(0x1771, 'X'),
(0x1772, 'V'),
(0x1774, 'X'),
(0x1780, 'V'),
(0x17B4, 'X'),
(0x17B6, 'V'),
(0x17DE, 'X'),
(0x17E0, 'V'),
(0x17EA, 'X'),
(0x17F0, 'V'),
(0x17FA, 'X'),
(0x1800, 'V'),
(0x1806, 'X'),
(0x1807, 'V'),
(0x180B, 'I'),
(0x180E, 'X'),
(0x180F, 'I'),
(0x1810, 'V'),
(0x181A, 'X'),
(0x1820, 'V'),
(0x1879, 'X'),
(0x1880, 'V'),
(0x18AB, 'X'),
(0x18B0, 'V'),
(0x18F6, 'X'),
(0x1900, 'V'),
(0x191F, 'X'),
(0x1920, 'V'),
(0x192C, 'X'),
(0x1930, 'V'),
(0x193C, 'X'),
(0x1940, 'V'),
(0x1941, 'X'),
(0x1944, 'V'),
(0x196E, 'X'),
(0x1970, 'V'),
(0x1975, 'X'),
(0x1980, 'V'),
(0x19AC, 'X'),
(0x19B0, 'V'),
(0x19CA, 'X'),
(0x19D0, 'V'),
(0x19DB, 'X'),
(0x19DE, 'V'),
(0x1A1C, 'X'),
(0x1A1E, 'V'),
(0x1A5F, 'X'),
(0x1A60, 'V'),
(0x1A7D, 'X'),
(0x1A7F, 'V'),
(0x1A8A, 'X'),
(0x1A90, 'V'),
(0x1A9A, 'X'),
(0x1AA0, 'V'),
(0x1AAE, 'X'),
(0x1AB0, 'V'),
(0x1ACF, 'X'),
(0x1B00, 'V'),
(0x1B4D, 'X'),
(0x1B50, 'V'),
(0x1B7F, 'X'),
(0x1B80, 'V'),
(0x1BF4, 'X'),
(0x1BFC, 'V'),
(0x1C38, 'X'),
(0x1C3B, 'V'),
(0x1C4A, 'X'),
(0x1C4D, 'V'),
(0x1C80, 'M', 'в'),
]
def _seg_15() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x1C81, 'M', 'д'),
(0x1C82, 'M', 'о'),
(0x1C83, 'M', 'с'),
(0x1C84, 'M', 'т'),
(0x1C86, 'M', 'ъ'),
(0x1C87, 'M', 'ѣ'),
(0x1C88, 'M', 'ꙋ'),
(0x1C89, 'X'),
(0x1C90, 'M', 'ა'),
(0x1C91, 'M', 'ბ'),
(0x1C92, 'M', 'გ'),
(0x1C93, 'M', 'დ'),
(0x1C94, 'M', 'ე'),
(0x1C95, 'M', 'ვ'),
(0x1C96, 'M', 'ზ'),
(0x1C97, 'M', 'თ'),
(0x1C98, 'M', 'ი'),
(0x1C99, 'M', 'კ'),
(0x1C9A, 'M', 'ლ'),
(0x1C9B, 'M', 'მ'),
(0x1C9C, 'M', 'ნ'),
(0x1C9D, 'M', 'ო'),
(0x1C9E, 'M', 'პ'),
(0x1C9F, 'M', 'ჟ'),
(0x1CA0, 'M', 'რ'),
(0x1CA1, 'M', 'ს'),
(0x1CA2, 'M', 'ტ'),
(0x1CA3, 'M', 'უ'),
(0x1CA4, 'M', 'ფ'),
(0x1CA5, 'M', 'ქ'),
(0x1CA6, 'M', 'ღ'),
(0x1CA7, 'M', 'ყ'),
(0x1CA8, 'M', 'შ'),
(0x1CA9, 'M', 'ჩ'),
(0x1CAA, 'M', 'ც'),
(0x1CAB, 'M', 'ძ'),
(0x1CAC, 'M', 'წ'),
(0x1CAD, 'M', 'ჭ'),
(0x1CAE, 'M', 'ხ'),
(0x1CAF, 'M', 'ჯ'),
(0x1CB0, 'M', 'ჰ'),
(0x1CB1, 'M', 'ჱ'),
(0x1CB2, 'M', 'ჲ'),
(0x1CB3, 'M', 'ჳ'),
(0x1CB4, 'M', 'ჴ'),
(0x1CB5, 'M', 'ჵ'),
(0x1CB6, 'M', 'ჶ'),
(0x1CB7, 'M', 'ჷ'),
(0x1CB8, 'M', 'ჸ'),
(0x1CB9, 'M', 'ჹ'),
(0x1CBA, 'M', 'ჺ'),
(0x1CBB, 'X'),
(0x1CBD, 'M', 'ჽ'),
(0x1CBE, 'M', 'ჾ'),
(0x1CBF, 'M', 'ჿ'),
(0x1CC0, 'V'),
(0x1CC8, 'X'),
(0x1CD0, 'V'),
(0x1CFB, 'X'),
(0x1D00, 'V'),
(0x1D2C, 'M', 'a'),
(0x1D2D, 'M', 'æ'),
(0x1D2E, 'M', 'b'),
(0x1D2F, 'V'),
(0x1D30, 'M', 'd'),
(0x1D31, 'M', 'e'),
(0x1D32, 'M', 'ǝ'),
(0x1D33, 'M', 'g'),
(0x1D34, 'M', 'h'),
(0x1D35, 'M', 'i'),
(0x1D36, 'M', 'j'),
(0x1D37, 'M', 'k'),
(0x1D38, 'M', 'l'),
(0x1D39, 'M', 'm'),
(0x1D3A, 'M', 'n'),
(0x1D3B, 'V'),
(0x1D3C, 'M', 'o'),
(0x1D3D, 'M', 'ȣ'),
(0x1D3E, 'M', 'p'),
(0x1D3F, 'M', 'r'),
(0x1D40, 'M', 't'),
(0x1D41, 'M', 'u'),
(0x1D42, 'M', 'w'),
(0x1D43, 'M', 'a'),
(0x1D44, 'M', 'ɐ'),
(0x1D45, 'M', 'ɑ'),
(0x1D46, 'M', 'ᴂ'),
(0x1D47, 'M', 'b'),
(0x1D48, 'M', 'd'),
(0x1D49, 'M', 'e'),
(0x1D4A, 'M', 'ə'),
(0x1D4B, 'M', 'ɛ'),
(0x1D4C, 'M', 'ɜ'),
(0x1D4D, 'M', 'g'),
(0x1D4E, 'V'),
(0x1D4F, 'M', 'k'),
(0x1D50, 'M', 'm'),
(0x1D51, 'M', 'ŋ'),
(0x1D52, 'M', 'o'),
(0x1D53, 'M', 'ɔ'),
]
def _seg_16() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x1D54, 'M', 'ᴖ'),
(0x1D55, 'M', 'ᴗ'),
(0x1D56, 'M', 'p'),
(0x1D57, 'M', 't'),
(0x1D58, 'M', 'u'),
(0x1D59, 'M', 'ᴝ'),
(0x1D5A, 'M', 'ɯ'),
(0x1D5B, 'M', 'v'),
(0x1D5C, 'M', 'ᴥ'),
(0x1D5D, 'M', 'β'),
(0x1D5E, 'M', 'γ'),
(0x1D5F, 'M', 'δ'),
(0x1D60, 'M', 'φ'),
(0x1D61, 'M', 'χ'),
(0x1D62, 'M', 'i'),
(0x1D63, 'M', 'r'),
(0x1D64, 'M', 'u'),
(0x1D65, 'M', 'v'),
(0x1D66, 'M', 'β'),
(0x1D67, 'M', 'γ'),
(0x1D68, 'M', 'ρ'),
(0x1D69, 'M', 'φ'),
(0x1D6A, 'M', 'χ'),
(0x1D6B, 'V'),
(0x1D78, 'M', 'н'),
(0x1D79, 'V'),
(0x1D9B, 'M', 'ɒ'),
(0x1D9C, 'M', 'c'),
(0x1D9D, 'M', 'ɕ'),
(0x1D9E, 'M', 'ð'),
(0x1D9F, 'M', 'ɜ'),
(0x1DA0, 'M', 'f'),
(0x1DA1, 'M', 'ɟ'),
(0x1DA2, 'M', 'ɡ'),
(0x1DA3, 'M', 'ɥ'),
(0x1DA4, 'M', 'ɨ'),
(0x1DA5, 'M', 'ɩ'),
(0x1DA6, 'M', 'ɪ'),
(0x1DA7, 'M', 'ᵻ'),
(0x1DA8, 'M', 'ʝ'),
(0x1DA9, 'M', 'ɭ'),
(0x1DAA, 'M', 'ᶅ'),
(0x1DAB, 'M', 'ʟ'),
(0x1DAC, 'M', 'ɱ'),
(0x1DAD, 'M', 'ɰ'),
(0x1DAE, 'M', 'ɲ'),
(0x1DAF, 'M', 'ɳ'),
(0x1DB0, 'M', 'ɴ'),
(0x1DB1, 'M', 'ɵ'),
(0x1DB2, 'M', 'ɸ'),
(0x1DB3, 'M', 'ʂ'),
(0x1DB4, 'M', 'ʃ'),
(0x1DB5, 'M', 'ƫ'),
(0x1DB6, 'M', 'ʉ'),
(0x1DB7, 'M', 'ʊ'),
(0x1DB8, 'M', 'ᴜ'),
(0x1DB9, 'M', 'ʋ'),
(0x1DBA, 'M', 'ʌ'),
(0x1DBB, 'M', 'z'),
(0x1DBC, 'M', 'ʐ'),
(0x1DBD, 'M', 'ʑ'),
(0x1DBE, 'M', 'ʒ'),
(0x1DBF, 'M', 'θ'),
(0x1DC0, 'V'),
(0x1E00, 'M', 'ḁ'),
(0x1E01, 'V'),
(0x1E02, 'M', 'ḃ'),
(0x1E03, 'V'),
(0x1E04, 'M', 'ḅ'),
(0x1E05, 'V'),
(0x1E06, 'M', 'ḇ'),
(0x1E07, 'V'),
(0x1E08, 'M', 'ḉ'),
(0x1E09, 'V'),
(0x1E0A, 'M', 'ḋ'),
(0x1E0B, 'V'),
(0x1E0C, 'M', 'ḍ'),
(0x1E0D, 'V'),
(0x1E0E, 'M', 'ḏ'),
(0x1E0F, 'V'),
(0x1E10, 'M', 'ḑ'),
(0x1E11, 'V'),
(0x1E12, 'M', 'ḓ'),
(0x1E13, 'V'),
(0x1E14, 'M', 'ḕ'),
(0x1E15, 'V'),
(0x1E16, 'M', 'ḗ'),
(0x1E17, 'V'),
(0x1E18, 'M', 'ḙ'),
(0x1E19, 'V'),
(0x1E1A, 'M', 'ḛ'),
(0x1E1B, 'V'),
(0x1E1C, 'M', 'ḝ'),
(0x1E1D, 'V'),
(0x1E1E, 'M', 'ḟ'),
(0x1E1F, 'V'),
(0x1E20, 'M', 'ḡ'),
(0x1E21, 'V'),
(0x1E22, 'M', 'ḣ'),
(0x1E23, 'V'),
]
def _seg_17() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x1E24, 'M', 'ḥ'),
(0x1E25, 'V'),
(0x1E26, 'M', 'ḧ'),
(0x1E27, 'V'),
(0x1E28, 'M', 'ḩ'),
(0x1E29, 'V'),
(0x1E2A, 'M', 'ḫ'),
(0x1E2B, 'V'),
(0x1E2C, 'M', 'ḭ'),
(0x1E2D, 'V'),
(0x1E2E, 'M', 'ḯ'),
(0x1E2F, 'V'),
(0x1E30, 'M', 'ḱ'),
(0x1E31, 'V'),
(0x1E32, 'M', 'ḳ'),
(0x1E33, 'V'),
(0x1E34, 'M', 'ḵ'),
(0x1E35, 'V'),
(0x1E36, 'M', 'ḷ'),
(0x1E37, 'V'),
(0x1E38, 'M', 'ḹ'),
(0x1E39, 'V'),
(0x1E3A, 'M', 'ḻ'),
(0x1E3B, 'V'),
(0x1E3C, 'M', 'ḽ'),
(0x1E3D, 'V'),
(0x1E3E, 'M', 'ḿ'),
(0x1E3F, 'V'),
(0x1E40, 'M', 'ṁ'),
(0x1E41, 'V'),
(0x1E42, 'M', 'ṃ'),
(0x1E43, 'V'),
(0x1E44, 'M', 'ṅ'),
(0x1E45, 'V'),
(0x1E46, 'M', 'ṇ'),
(0x1E47, 'V'),
(0x1E48, 'M', 'ṉ'),
(0x1E49, 'V'),
(0x1E4A, 'M', 'ṋ'),
(0x1E4B, 'V'),
(0x1E4C, 'M', 'ṍ'),
(0x1E4D, 'V'),
(0x1E4E, 'M', 'ṏ'),
(0x1E4F, 'V'),
(0x1E50, 'M', 'ṑ'),
(0x1E51, 'V'),
(0x1E52, 'M', 'ṓ'),
(0x1E53, 'V'),
(0x1E54, 'M', 'ṕ'),
(0x1E55, 'V'),
(0x1E56, 'M', 'ṗ'),
(0x1E57, 'V'),
(0x1E58, 'M', 'ṙ'),
(0x1E59, 'V'),
(0x1E5A, 'M', 'ṛ'),
(0x1E5B, 'V'),
(0x1E5C, 'M', 'ṝ'),
(0x1E5D, 'V'),
(0x1E5E, 'M', 'ṟ'),
(0x1E5F, 'V'),
(0x1E60, 'M', 'ṡ'),
(0x1E61, 'V'),
(0x1E62, 'M', 'ṣ'),
(0x1E63, 'V'),
(0x1E64, 'M', 'ṥ'),
(0x1E65, 'V'),
(0x1E66, 'M', 'ṧ'),
(0x1E67, 'V'),
(0x1E68, 'M', 'ṩ'),
(0x1E69, 'V'),
(0x1E6A, 'M', 'ṫ'),
(0x1E6B, 'V'),
(0x1E6C, 'M', 'ṭ'),
(0x1E6D, 'V'),
(0x1E6E, 'M', 'ṯ'),
(0x1E6F, 'V'),
(0x1E70, 'M', 'ṱ'),
(0x1E71, 'V'),
(0x1E72, 'M', 'ṳ'),
(0x1E73, 'V'),
(0x1E74, 'M', 'ṵ'),
(0x1E75, 'V'),
(0x1E76, 'M', 'ṷ'),
(0x1E77, 'V'),
(0x1E78, 'M', 'ṹ'),
(0x1E79, 'V'),
(0x1E7A, 'M', 'ṻ'),
(0x1E7B, 'V'),
(0x1E7C, 'M', 'ṽ'),
(0x1E7D, 'V'),
(0x1E7E, 'M', 'ṿ'),
(0x1E7F, 'V'),
(0x1E80, 'M', 'ẁ'),
(0x1E81, 'V'),
(0x1E82, 'M', 'ẃ'),
(0x1E83, 'V'),
(0x1E84, 'M', 'ẅ'),
(0x1E85, 'V'),
(0x1E86, 'M', 'ẇ'),
(0x1E87, 'V'),
]
def _seg_18() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x1E88, 'M', 'ẉ'),
(0x1E89, 'V'),
(0x1E8A, 'M', 'ẋ'),
(0x1E8B, 'V'),
(0x1E8C, 'M', 'ẍ'),
(0x1E8D, 'V'),
(0x1E8E, 'M', 'ẏ'),
(0x1E8F, 'V'),
(0x1E90, 'M', 'ẑ'),
(0x1E91, 'V'),
(0x1E92, 'M', 'ẓ'),
(0x1E93, 'V'),
(0x1E94, 'M', 'ẕ'),
(0x1E95, 'V'),
(0x1E9A, 'M', 'aʾ'),
(0x1E9B, 'M', 'ṡ'),
(0x1E9C, 'V'),
(0x1E9E, 'M', 'ss'),
(0x1E9F, 'V'),
(0x1EA0, 'M', 'ạ'),
(0x1EA1, 'V'),
(0x1EA2, 'M', 'ả'),
(0x1EA3, 'V'),
(0x1EA4, 'M', 'ấ'),
(0x1EA5, 'V'),
(0x1EA6, 'M', 'ầ'),
(0x1EA7, 'V'),
(0x1EA8, 'M', 'ẩ'),
(0x1EA9, 'V'),
(0x1EAA, 'M', 'ẫ'),
(0x1EAB, 'V'),
(0x1EAC, 'M', 'ậ'),
(0x1EAD, 'V'),
(0x1EAE, 'M', 'ắ'),
(0x1EAF, 'V'),
(0x1EB0, 'M', 'ằ'),
(0x1EB1, 'V'),
(0x1EB2, 'M', 'ẳ'),
(0x1EB3, 'V'),
(0x1EB4, 'M', 'ẵ'),
(0x1EB5, 'V'),
(0x1EB6, 'M', 'ặ'),
(0x1EB7, 'V'),
(0x1EB8, 'M', 'ẹ'),
(0x1EB9, 'V'),
(0x1EBA, 'M', 'ẻ'),
(0x1EBB, 'V'),
(0x1EBC, 'M', 'ẽ'),
(0x1EBD, 'V'),
(0x1EBE, 'M', 'ế'),
(0x1EBF, 'V'),
(0x1EC0, 'M', 'ề'),
(0x1EC1, 'V'),
(0x1EC2, 'M', 'ể'),
(0x1EC3, 'V'),
(0x1EC4, 'M', 'ễ'),
(0x1EC5, 'V'),
(0x1EC6, 'M', 'ệ'),
(0x1EC7, 'V'),
(0x1EC8, 'M', 'ỉ'),
(0x1EC9, 'V'),
(0x1ECA, 'M', 'ị'),
(0x1ECB, 'V'),
(0x1ECC, 'M', 'ọ'),
(0x1ECD, 'V'),
(0x1ECE, 'M', 'ỏ'),
(0x1ECF, 'V'),
(0x1ED0, 'M', 'ố'),
(0x1ED1, 'V'),
(0x1ED2, 'M', 'ồ'),
(0x1ED3, 'V'),
(0x1ED4, 'M', 'ổ'),
(0x1ED5, 'V'),
(0x1ED6, 'M', 'ỗ'),
(0x1ED7, 'V'),
(0x1ED8, 'M', 'ộ'),
(0x1ED9, 'V'),
(0x1EDA, 'M', 'ớ'),
(0x1EDB, 'V'),
(0x1EDC, 'M', 'ờ'),
(0x1EDD, 'V'),
(0x1EDE, 'M', 'ở'),
(0x1EDF, 'V'),
(0x1EE0, 'M', 'ỡ'),
(0x1EE1, 'V'),
(0x1EE2, 'M', 'ợ'),
(0x1EE3, 'V'),
(0x1EE4, 'M', 'ụ'),
(0x1EE5, 'V'),
(0x1EE6, 'M', 'ủ'),
(0x1EE7, 'V'),
(0x1EE8, 'M', 'ứ'),
(0x1EE9, 'V'),
(0x1EEA, 'M', 'ừ'),
(0x1EEB, 'V'),
(0x1EEC, 'M', 'ử'),
(0x1EED, 'V'),
(0x1EEE, 'M', 'ữ'),
(0x1EEF, 'V'),
(0x1EF0, 'M', 'ự'),
]
def _seg_19() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x1EF1, 'V'),
(0x1EF2, 'M', 'ỳ'),
(0x1EF3, 'V'),
(0x1EF4, 'M', 'ỵ'),
(0x1EF5, 'V'),
(0x1EF6, 'M', 'ỷ'),
(0x1EF7, 'V'),
(0x1EF8, 'M', 'ỹ'),
(0x1EF9, 'V'),
(0x1EFA, 'M', 'ỻ'),
(0x1EFB, 'V'),
(0x1EFC, 'M', 'ỽ'),
(0x1EFD, 'V'),
(0x1EFE, 'M', 'ỿ'),
(0x1EFF, 'V'),
(0x1F08, 'M', 'ἀ'),
(0x1F09, 'M', 'ἁ'),
(0x1F0A, 'M', 'ἂ'),
(0x1F0B, 'M', 'ἃ'),
(0x1F0C, 'M', 'ἄ'),
(0x1F0D, 'M', 'ἅ'),
(0x1F0E, 'M', 'ἆ'),
(0x1F0F, 'M', 'ἇ'),
(0x1F10, 'V'),
(0x1F16, 'X'),
(0x1F18, 'M', 'ἐ'),
(0x1F19, 'M', 'ἑ'),
(0x1F1A, 'M', 'ἒ'),
(0x1F1B, 'M', 'ἓ'),
(0x1F1C, 'M', 'ἔ'),
(0x1F1D, 'M', 'ἕ'),
(0x1F1E, 'X'),
(0x1F20, 'V'),
(0x1F28, 'M', 'ἠ'),
(0x1F29, 'M', 'ἡ'),
(0x1F2A, 'M', 'ἢ'),
(0x1F2B, 'M', 'ἣ'),
(0x1F2C, 'M', 'ἤ'),
(0x1F2D, 'M', 'ἥ'),
(0x1F2E, 'M', 'ἦ'),
(0x1F2F, 'M', 'ἧ'),
(0x1F30, 'V'),
(0x1F38, 'M', 'ἰ'),
(0x1F39, 'M', 'ἱ'),
(0x1F3A, 'M', 'ἲ'),
(0x1F3B, 'M', 'ἳ'),
(0x1F3C, 'M', 'ἴ'),
(0x1F3D, 'M', 'ἵ'),
(0x1F3E, 'M', 'ἶ'),
(0x1F3F, 'M', 'ἷ'),
(0x1F40, 'V'),
(0x1F46, 'X'),
(0x1F48, 'M', 'ὀ'),
(0x1F49, 'M', 'ὁ'),
(0x1F4A, 'M', 'ὂ'),
(0x1F4B, 'M', 'ὃ'),
(0x1F4C, 'M', 'ὄ'),
(0x1F4D, 'M', 'ὅ'),
(0x1F4E, 'X'),
(0x1F50, 'V'),
(0x1F58, 'X'),
(0x1F59, 'M', 'ὑ'),
(0x1F5A, 'X'),
(0x1F5B, 'M', 'ὓ'),
(0x1F5C, 'X'),
(0x1F5D, 'M', 'ὕ'),
(0x1F5E, 'X'),
(0x1F5F, 'M', 'ὗ'),
(0x1F60, 'V'),
(0x1F68, 'M', 'ὠ'),
(0x1F69, 'M', 'ὡ'),
(0x1F6A, 'M', 'ὢ'),
(0x1F6B, 'M', 'ὣ'),
(0x1F6C, 'M', 'ὤ'),
(0x1F6D, 'M', 'ὥ'),
(0x1F6E, 'M', 'ὦ'),
(0x1F6F, 'M', 'ὧ'),
(0x1F70, 'V'),
(0x1F71, 'M', 'ά'),
(0x1F72, 'V'),
(0x1F73, 'M', 'έ'),
(0x1F74, 'V'),
(0x1F75, 'M', 'ή'),
(0x1F76, 'V'),
(0x1F77, 'M', 'ί'),
(0x1F78, 'V'),
(0x1F79, 'M', 'ό'),
(0x1F7A, 'V'),
(0x1F7B, 'M', 'ύ'),
(0x1F7C, 'V'),
(0x1F7D, 'M', 'ώ'),
(0x1F7E, 'X'),
(0x1F80, 'M', 'ἀι'),
(0x1F81, 'M', 'ἁι'),
(0x1F82, 'M', 'ἂι'),
(0x1F83, 'M', 'ἃι'),
(0x1F84, 'M', 'ἄι'),
(0x1F85, 'M', 'ἅι'),
(0x1F86, 'M', 'ἆι'),
(0x1F87, 'M', 'ἇι'),
]
def _seg_20() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x1F88, 'M', 'ἀι'),
(0x1F89, 'M', 'ἁι'),
(0x1F8A, 'M', 'ἂι'),
(0x1F8B, 'M', 'ἃι'),
(0x1F8C, 'M', 'ἄι'),
(0x1F8D, 'M', 'ἅι'),
(0x1F8E, 'M', 'ἆι'),
(0x1F8F, 'M', 'ἇι'),
(0x1F90, 'M', 'ἠι'),
(0x1F91, 'M', 'ἡι'),
(0x1F92, 'M', 'ἢι'),
(0x1F93, 'M', 'ἣι'),
(0x1F94, 'M', 'ἤι'),
(0x1F95, 'M', 'ἥι'),
(0x1F96, 'M', 'ἦι'),
(0x1F97, 'M', 'ἧι'),
(0x1F98, 'M', 'ἠι'),
(0x1F99, 'M', 'ἡι'),
(0x1F9A, 'M', 'ἢι'),
(0x1F9B, 'M', 'ἣι'),
(0x1F9C, 'M', 'ἤι'),
(0x1F9D, 'M', 'ἥι'),
(0x1F9E, 'M', 'ἦι'),
(0x1F9F, 'M', 'ἧι'),
(0x1FA0, 'M', 'ὠι'),
(0x1FA1, 'M', 'ὡι'),
(0x1FA2, 'M', 'ὢι'),
(0x1FA3, 'M', 'ὣι'),
(0x1FA4, 'M', 'ὤι'),
(0x1FA5, 'M', 'ὥι'),
(0x1FA6, 'M', 'ὦι'),
(0x1FA7, 'M', 'ὧι'),
(0x1FA8, 'M', 'ὠι'),
(0x1FA9, 'M', 'ὡι'),
(0x1FAA, 'M', 'ὢι'),
(0x1FAB, 'M', 'ὣι'),
(0x1FAC, 'M', 'ὤι'),
(0x1FAD, 'M', 'ὥι'),
(0x1FAE, 'M', 'ὦι'),
(0x1FAF, 'M', 'ὧι'),
(0x1FB0, 'V'),
(0x1FB2, 'M', 'ὰι'),
(0x1FB3, 'M', 'αι'),
(0x1FB4, 'M', 'άι'),
(0x1FB5, 'X'),
(0x1FB6, 'V'),
(0x1FB7, 'M', 'ᾶι'),
(0x1FB8, 'M', 'ᾰ'),
(0x1FB9, 'M', 'ᾱ'),
(0x1FBA, 'M', 'ὰ'),
(0x1FBB, 'M', 'ά'),
(0x1FBC, 'M', 'αι'),
(0x1FBD, '3', ' ̓'),
(0x1FBE, 'M', 'ι'),
(0x1FBF, '3', ' ̓'),
(0x1FC0, '3', ' ͂'),
(0x1FC1, '3', ' ̈͂'),
(0x1FC2, 'M', 'ὴι'),
(0x1FC3, 'M', 'ηι'),
(0x1FC4, 'M', 'ήι'),
(0x1FC5, 'X'),
(0x1FC6, 'V'),
(0x1FC7, 'M', 'ῆι'),
(0x1FC8, 'M', 'ὲ'),
(0x1FC9, 'M', 'έ'),
(0x1FCA, 'M', 'ὴ'),
(0x1FCB, 'M', 'ή'),
(0x1FCC, 'M', 'ηι'),
(0x1FCD, '3', ' ̓̀'),
(0x1FCE, '3', ' ̓́'),
(0x1FCF, '3', ' ̓͂'),
(0x1FD0, 'V'),
(0x1FD3, 'M', 'ΐ'),
(0x1FD4, 'X'),
(0x1FD6, 'V'),
(0x1FD8, 'M', 'ῐ'),
(0x1FD9, 'M', 'ῑ'),
(0x1FDA, 'M', 'ὶ'),
(0x1FDB, 'M', 'ί'),
(0x1FDC, 'X'),
(0x1FDD, '3', ' ̔̀'),
(0x1FDE, '3', ' ̔́'),
(0x1FDF, '3', ' ̔͂'),
(0x1FE0, 'V'),
(0x1FE3, 'M', 'ΰ'),
(0x1FE4, 'V'),
(0x1FE8, 'M', 'ῠ'),
(0x1FE9, 'M', 'ῡ'),
(0x1FEA, 'M', 'ὺ'),
(0x1FEB, 'M', 'ύ'),
(0x1FEC, 'M', 'ῥ'),
(0x1FED, '3', ' ̈̀'),
(0x1FEE, '3', ' ̈́'),
(0x1FEF, '3', '`'),
(0x1FF0, 'X'),
(0x1FF2, 'M', 'ὼι'),
(0x1FF3, 'M', 'ωι'),
(0x1FF4, 'M', 'ώι'),
(0x1FF5, 'X'),
(0x1FF6, 'V'),
]
def _seg_21() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x1FF7, 'M', 'ῶι'),
(0x1FF8, 'M', 'ὸ'),
(0x1FF9, 'M', 'ό'),
(0x1FFA, 'M', 'ὼ'),
(0x1FFB, 'M', 'ώ'),
(0x1FFC, 'M', 'ωι'),
(0x1FFD, '3', ' ́'),
(0x1FFE, '3', ' ̔'),
(0x1FFF, 'X'),
(0x2000, '3', ' '),
(0x200B, 'I'),
(0x200C, 'D', ''),
(0x200E, 'X'),
(0x2010, 'V'),
(0x2011, 'M', '‐'),
(0x2012, 'V'),
(0x2017, '3', ' ̳'),
(0x2018, 'V'),
(0x2024, 'X'),
(0x2027, 'V'),
(0x2028, 'X'),
(0x202F, '3', ' '),
(0x2030, 'V'),
(0x2033, 'M', '′′'),
(0x2034, 'M', '′′′'),
(0x2035, 'V'),
(0x2036, 'M', '‵‵'),
(0x2037, 'M', '‵‵‵'),
(0x2038, 'V'),
(0x203C, '3', '!!'),
(0x203D, 'V'),
(0x203E, '3', ' ̅'),
(0x203F, 'V'),
(0x2047, '3', '??'),
(0x2048, '3', '?!'),
(0x2049, '3', '!?'),
(0x204A, 'V'),
(0x2057, 'M', '′′′′'),
(0x2058, 'V'),
(0x205F, '3', ' '),
(0x2060, 'I'),
(0x2061, 'X'),
(0x2064, 'I'),
(0x2065, 'X'),
(0x2070, 'M', '0'),
(0x2071, 'M', 'i'),
(0x2072, 'X'),
(0x2074, 'M', '4'),
(0x2075, 'M', '5'),
(0x2076, 'M', '6'),
(0x2077, 'M', '7'),
(0x2078, 'M', '8'),
(0x2079, 'M', '9'),
(0x207A, '3', '+'),
(0x207B, 'M', '−'),
(0x207C, '3', '='),
(0x207D, '3', '('),
(0x207E, '3', ')'),
(0x207F, 'M', 'n'),
(0x2080, 'M', '0'),
(0x2081, 'M', '1'),
(0x2082, 'M', '2'),
(0x2083, 'M', '3'),
(0x2084, 'M', '4'),
(0x2085, 'M', '5'),
(0x2086, 'M', '6'),
(0x2087, 'M', '7'),
(0x2088, 'M', '8'),
(0x2089, 'M', '9'),
(0x208A, '3', '+'),
(0x208B, 'M', '−'),
(0x208C, '3', '='),
(0x208D, '3', '('),
(0x208E, '3', ')'),
(0x208F, 'X'),
(0x2090, 'M', 'a'),
(0x2091, 'M', 'e'),
(0x2092, 'M', 'o'),
(0x2093, 'M', 'x'),
(0x2094, 'M', 'ə'),
(0x2095, 'M', 'h'),
(0x2096, 'M', 'k'),
(0x2097, 'M', 'l'),
(0x2098, 'M', 'm'),
(0x2099, 'M', 'n'),
(0x209A, 'M', 'p'),
(0x209B, 'M', 's'),
(0x209C, 'M', 't'),
(0x209D, 'X'),
(0x20A0, 'V'),
(0x20A8, 'M', 'rs'),
(0x20A9, 'V'),
(0x20C1, 'X'),
(0x20D0, 'V'),
(0x20F1, 'X'),
(0x2100, '3', 'a/c'),
(0x2101, '3', 'a/s'),
(0x2102, 'M', 'c'),
(0x2103, 'M', '°c'),
(0x2104, 'V'),
]
def _seg_22() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x2105, '3', 'c/o'),
(0x2106, '3', 'c/u'),
(0x2107, 'M', 'ɛ'),
(0x2108, 'V'),
(0x2109, 'M', '°f'),
(0x210A, 'M', 'g'),
(0x210B, 'M', 'h'),
(0x210F, 'M', 'ħ'),
(0x2110, 'M', 'i'),
(0x2112, 'M', 'l'),
(0x2114, 'V'),
(0x2115, 'M', 'n'),
(0x2116, 'M', 'no'),
(0x2117, 'V'),
(0x2119, 'M', 'p'),
(0x211A, 'M', 'q'),
(0x211B, 'M', 'r'),
(0x211E, 'V'),
(0x2120, 'M', 'sm'),
(0x2121, 'M', 'tel'),
(0x2122, 'M', 'tm'),
(0x2123, 'V'),
(0x2124, 'M', 'z'),
(0x2125, 'V'),
(0x2126, 'M', 'ω'),
(0x2127, 'V'),
(0x2128, 'M', 'z'),
(0x2129, 'V'),
(0x212A, 'M', 'k'),
(0x212B, 'M', 'å'),
(0x212C, 'M', 'b'),
(0x212D, 'M', 'c'),
(0x212E, 'V'),
(0x212F, 'M', 'e'),
(0x2131, 'M', 'f'),
(0x2132, 'X'),
(0x2133, 'M', 'm'),
(0x2134, 'M', 'o'),
(0x2135, 'M', 'א'),
(0x2136, 'M', 'ב'),
(0x2137, 'M', 'ג'),
(0x2138, 'M', 'ד'),
(0x2139, 'M', 'i'),
(0x213A, 'V'),
(0x213B, 'M', 'fax'),
(0x213C, 'M', 'π'),
(0x213D, 'M', 'γ'),
(0x213F, 'M', 'π'),
(0x2140, 'M', '∑'),
(0x2141, 'V'),
(0x2145, 'M', 'd'),
(0x2147, 'M', 'e'),
(0x2148, 'M', 'i'),
(0x2149, 'M', 'j'),
(0x214A, 'V'),
(0x2150, 'M', '1⁄7'),
(0x2151, 'M', '1⁄9'),
(0x2152, 'M', '1⁄10'),
(0x2153, 'M', '1⁄3'),
(0x2154, 'M', '2⁄3'),
(0x2155, 'M', '1⁄5'),
(0x2156, 'M', '2⁄5'),
(0x2157, 'M', '3⁄5'),
(0x2158, 'M', '4⁄5'),
(0x2159, 'M', '1⁄6'),
(0x215A, 'M', '5⁄6'),
(0x215B, 'M', '1⁄8'),
(0x215C, 'M', '3⁄8'),
(0x215D, 'M', '5⁄8'),
(0x215E, 'M', '7⁄8'),
(0x215F, 'M', '1⁄'),
(0x2160, 'M', 'i'),
(0x2161, 'M', 'ii'),
(0x2162, 'M', 'iii'),
(0x2163, 'M', 'iv'),
(0x2164, 'M', 'v'),
(0x2165, 'M', 'vi'),
(0x2166, 'M', 'vii'),
(0x2167, 'M', 'viii'),
(0x2168, 'M', 'ix'),
(0x2169, 'M', 'x'),
(0x216A, 'M', 'xi'),
(0x216B, 'M', 'xii'),
(0x216C, 'M', 'l'),
(0x216D, 'M', 'c'),
(0x216E, 'M', 'd'),
(0x216F, 'M', 'm'),
(0x2170, 'M', 'i'),
(0x2171, 'M', 'ii'),
(0x2172, 'M', 'iii'),
(0x2173, 'M', 'iv'),
(0x2174, 'M', 'v'),
(0x2175, 'M', 'vi'),
(0x2176, 'M', 'vii'),
(0x2177, 'M', 'viii'),
(0x2178, 'M', 'ix'),
(0x2179, 'M', 'x'),
(0x217A, 'M', 'xi'),
(0x217B, 'M', 'xii'),
(0x217C, 'M', 'l'),
]
def _seg_23() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x217D, 'M', 'c'),
(0x217E, 'M', 'd'),
(0x217F, 'M', 'm'),
(0x2180, 'V'),
(0x2183, 'X'),
(0x2184, 'V'),
(0x2189, 'M', '0⁄3'),
(0x218A, 'V'),
(0x218C, 'X'),
(0x2190, 'V'),
(0x222C, 'M', '∫∫'),
(0x222D, 'M', '∫∫∫'),
(0x222E, 'V'),
(0x222F, 'M', '∮∮'),
(0x2230, 'M', '∮∮∮'),
(0x2231, 'V'),
(0x2260, '3'),
(0x2261, 'V'),
(0x226E, '3'),
(0x2270, 'V'),
(0x2329, 'M', '〈'),
(0x232A, 'M', '〉'),
(0x232B, 'V'),
(0x2427, 'X'),
(0x2440, 'V'),
(0x244B, 'X'),
(0x2460, 'M', '1'),
(0x2461, 'M', '2'),
(0x2462, 'M', '3'),
(0x2463, 'M', '4'),
(0x2464, 'M', '5'),
(0x2465, 'M', '6'),
(0x2466, 'M', '7'),
(0x2467, 'M', '8'),
(0x2468, 'M', '9'),
(0x2469, 'M', '10'),
(0x246A, 'M', '11'),
(0x246B, 'M', '12'),
(0x246C, 'M', '13'),
(0x246D, 'M', '14'),
(0x246E, 'M', '15'),
(0x246F, 'M', '16'),
(0x2470, 'M', '17'),
(0x2471, 'M', '18'),
(0x2472, 'M', '19'),
(0x2473, 'M', '20'),
(0x2474, '3', '(1)'),
(0x2475, '3', '(2)'),
(0x2476, '3', '(3)'),
(0x2477, '3', '(4)'),
(0x2478, '3', '(5)'),
(0x2479, '3', '(6)'),
(0x247A, '3', '(7)'),
(0x247B, '3', '(8)'),
(0x247C, '3', '(9)'),
(0x247D, '3', '(10)'),
(0x247E, '3', '(11)'),
(0x247F, '3', '(12)'),
(0x2480, '3', '(13)'),
(0x2481, '3', '(14)'),
(0x2482, '3', '(15)'),
(0x2483, '3', '(16)'),
(0x2484, '3', '(17)'),
(0x2485, '3', '(18)'),
(0x2486, '3', '(19)'),
(0x2487, '3', '(20)'),
(0x2488, 'X'),
(0x249C, '3', '(a)'),
(0x249D, '3', '(b)'),
(0x249E, '3', '(c)'),
(0x249F, '3', '(d)'),
(0x24A0, '3', '(e)'),
(0x24A1, '3', '(f)'),
(0x24A2, '3', '(g)'),
(0x24A3, '3', '(h)'),
(0x24A4, '3', '(i)'),
(0x24A5, '3', '(j)'),
(0x24A6, '3', '(k)'),
(0x24A7, '3', '(l)'),
(0x24A8, '3', '(m)'),
(0x24A9, '3', '(n)'),
(0x24AA, '3', '(o)'),
(0x24AB, '3', '(p)'),
(0x24AC, '3', '(q)'),
(0x24AD, '3', '(r)'),
(0x24AE, '3', '(s)'),
(0x24AF, '3', '(t)'),
(0x24B0, '3', '(u)'),
(0x24B1, '3', '(v)'),
(0x24B2, '3', '(w)'),
(0x24B3, '3', '(x)'),
(0x24B4, '3', '(y)'),
(0x24B5, '3', '(z)'),
(0x24B6, 'M', 'a'),
(0x24B7, 'M', 'b'),
(0x24B8, 'M', 'c'),
(0x24B9, 'M', 'd'),
(0x24BA, 'M', 'e'),
(0x24BB, 'M', 'f'),
(0x24BC, 'M', 'g'),
]
def _seg_24() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x24BD, 'M', 'h'),
(0x24BE, 'M', 'i'),
(0x24BF, 'M', 'j'),
(0x24C0, 'M', 'k'),
(0x24C1, 'M', 'l'),
(0x24C2, 'M', 'm'),
(0x24C3, 'M', 'n'),
(0x24C4, 'M', 'o'),
(0x24C5, 'M', 'p'),
(0x24C6, 'M', 'q'),
(0x24C7, 'M', 'r'),
(0x24C8, 'M', 's'),
(0x24C9, 'M', 't'),
(0x24CA, 'M', 'u'),
(0x24CB, 'M', 'v'),
(0x24CC, 'M', 'w'),
(0x24CD, 'M', 'x'),
(0x24CE, 'M', 'y'),
(0x24CF, 'M', 'z'),
(0x24D0, 'M', 'a'),
(0x24D1, 'M', 'b'),
(0x24D2, 'M', 'c'),
(0x24D3, 'M', 'd'),
(0x24D4, 'M', 'e'),
(0x24D5, 'M', 'f'),
(0x24D6, 'M', 'g'),
(0x24D7, 'M', 'h'),
(0x24D8, 'M', 'i'),
(0x24D9, 'M', 'j'),
(0x24DA, 'M', 'k'),
(0x24DB, 'M', 'l'),
(0x24DC, 'M', 'm'),
(0x24DD, 'M', 'n'),
(0x24DE, 'M', 'o'),
(0x24DF, 'M', 'p'),
(0x24E0, 'M', 'q'),
(0x24E1, 'M', 'r'),
(0x24E2, 'M', 's'),
(0x24E3, 'M', 't'),
(0x24E4, 'M', 'u'),
(0x24E5, 'M', 'v'),
(0x24E6, 'M', 'w'),
(0x24E7, 'M', 'x'),
(0x24E8, 'M', 'y'),
(0x24E9, 'M', 'z'),
(0x24EA, 'M', '0'),
(0x24EB, 'V'),
(0x2A0C, 'M', '∫∫∫∫'),
(0x2A0D, 'V'),
(0x2A74, '3', '::='),
(0x2A75, '3', '=='),
(0x2A76, '3', '==='),
(0x2A77, 'V'),
(0x2ADC, 'M', '⫝̸'),
(0x2ADD, 'V'),
(0x2B74, 'X'),
(0x2B76, 'V'),
(0x2B96, 'X'),
(0x2B97, 'V'),
(0x2C00, 'M', 'ⰰ'),
(0x2C01, 'M', 'ⰱ'),
(0x2C02, 'M', 'ⰲ'),
(0x2C03, 'M', 'ⰳ'),
(0x2C04, 'M', 'ⰴ'),
(0x2C05, 'M', 'ⰵ'),
(0x2C06, 'M', 'ⰶ'),
(0x2C07, 'M', 'ⰷ'),
(0x2C08, 'M', 'ⰸ'),
(0x2C09, 'M', 'ⰹ'),
(0x2C0A, 'M', 'ⰺ'),
(0x2C0B, 'M', 'ⰻ'),
(0x2C0C, 'M', 'ⰼ'),
(0x2C0D, 'M', 'ⰽ'),
(0x2C0E, 'M', 'ⰾ'),
(0x2C0F, 'M', 'ⰿ'),
(0x2C10, 'M', 'ⱀ'),
(0x2C11, 'M', 'ⱁ'),
(0x2C12, 'M', 'ⱂ'),
(0x2C13, 'M', 'ⱃ'),
(0x2C14, 'M', 'ⱄ'),
(0x2C15, 'M', 'ⱅ'),
(0x2C16, 'M', 'ⱆ'),
(0x2C17, 'M', 'ⱇ'),
(0x2C18, 'M', 'ⱈ'),
(0x2C19, 'M', 'ⱉ'),
(0x2C1A, 'M', 'ⱊ'),
(0x2C1B, 'M', 'ⱋ'),
(0x2C1C, 'M', 'ⱌ'),
(0x2C1D, 'M', 'ⱍ'),
(0x2C1E, 'M', 'ⱎ'),
(0x2C1F, 'M', 'ⱏ'),
(0x2C20, 'M', 'ⱐ'),
(0x2C21, 'M', 'ⱑ'),
(0x2C22, 'M', 'ⱒ'),
(0x2C23, 'M', 'ⱓ'),
(0x2C24, 'M', 'ⱔ'),
(0x2C25, 'M', 'ⱕ'),
(0x2C26, 'M', 'ⱖ'),
(0x2C27, 'M', 'ⱗ'),
(0x2C28, 'M', 'ⱘ'),
]
def _seg_25() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x2C29, 'M', 'ⱙ'),
(0x2C2A, 'M', 'ⱚ'),
(0x2C2B, 'M', 'ⱛ'),
(0x2C2C, 'M', 'ⱜ'),
(0x2C2D, 'M', 'ⱝ'),
(0x2C2E, 'M', 'ⱞ'),
(0x2C2F, 'M', 'ⱟ'),
(0x2C30, 'V'),
(0x2C60, 'M', 'ⱡ'),
(0x2C61, 'V'),
(0x2C62, 'M', 'ɫ'),
(0x2C63, 'M', 'ᵽ'),
(0x2C64, 'M', 'ɽ'),
(0x2C65, 'V'),
(0x2C67, 'M', 'ⱨ'),
(0x2C68, 'V'),
(0x2C69, 'M', 'ⱪ'),
(0x2C6A, 'V'),
(0x2C6B, 'M', 'ⱬ'),
(0x2C6C, 'V'),
(0x2C6D, 'M', 'ɑ'),
(0x2C6E, 'M', 'ɱ'),
(0x2C6F, 'M', 'ɐ'),
(0x2C70, 'M', 'ɒ'),
(0x2C71, 'V'),
(0x2C72, 'M', 'ⱳ'),
(0x2C73, 'V'),
(0x2C75, 'M', 'ⱶ'),
(0x2C76, 'V'),
(0x2C7C, 'M', 'j'),
(0x2C7D, 'M', 'v'),
(0x2C7E, 'M', 'ȿ'),
(0x2C7F, 'M', 'ɀ'),
(0x2C80, 'M', 'ⲁ'),
(0x2C81, 'V'),
(0x2C82, 'M', 'ⲃ'),
(0x2C83, 'V'),
(0x2C84, 'M', 'ⲅ'),
(0x2C85, 'V'),
(0x2C86, 'M', 'ⲇ'),
(0x2C87, 'V'),
(0x2C88, 'M', 'ⲉ'),
(0x2C89, 'V'),
(0x2C8A, 'M', 'ⲋ'),
(0x2C8B, 'V'),
(0x2C8C, 'M', 'ⲍ'),
(0x2C8D, 'V'),
(0x2C8E, 'M', 'ⲏ'),
(0x2C8F, 'V'),
(0x2C90, 'M', 'ⲑ'),
(0x2C91, 'V'),
(0x2C92, 'M', 'ⲓ'),
(0x2C93, 'V'),
(0x2C94, 'M', 'ⲕ'),
(0x2C95, 'V'),
(0x2C96, 'M', 'ⲗ'),
(0x2C97, 'V'),
(0x2C98, 'M', 'ⲙ'),
(0x2C99, 'V'),
(0x2C9A, 'M', 'ⲛ'),
(0x2C9B, 'V'),
(0x2C9C, 'M', 'ⲝ'),
(0x2C9D, 'V'),
(0x2C9E, 'M', 'ⲟ'),
(0x2C9F, 'V'),
(0x2CA0, 'M', 'ⲡ'),
(0x2CA1, 'V'),
(0x2CA2, 'M', 'ⲣ'),
(0x2CA3, 'V'),
(0x2CA4, 'M', 'ⲥ'),
(0x2CA5, 'V'),
(0x2CA6, 'M', 'ⲧ'),
(0x2CA7, 'V'),
(0x2CA8, 'M', 'ⲩ'),
(0x2CA9, 'V'),
(0x2CAA, 'M', 'ⲫ'),
(0x2CAB, 'V'),
(0x2CAC, 'M', 'ⲭ'),
(0x2CAD, 'V'),
(0x2CAE, 'M', 'ⲯ'),
(0x2CAF, 'V'),
(0x2CB0, 'M', 'ⲱ'),
(0x2CB1, 'V'),
(0x2CB2, 'M', 'ⲳ'),
(0x2CB3, 'V'),
(0x2CB4, 'M', 'ⲵ'),
(0x2CB5, 'V'),
(0x2CB6, 'M', 'ⲷ'),
(0x2CB7, 'V'),
(0x2CB8, 'M', 'ⲹ'),
(0x2CB9, 'V'),
(0x2CBA, 'M', 'ⲻ'),
(0x2CBB, 'V'),
(0x2CBC, 'M', 'ⲽ'),
(0x2CBD, 'V'),
(0x2CBE, 'M', 'ⲿ'),
(0x2CBF, 'V'),
(0x2CC0, 'M', 'ⳁ'),
(0x2CC1, 'V'),
(0x2CC2, 'M', 'ⳃ'),
]
def _seg_26() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x2CC3, 'V'),
(0x2CC4, 'M', 'ⳅ'),
(0x2CC5, 'V'),
(0x2CC6, 'M', 'ⳇ'),
(0x2CC7, 'V'),
(0x2CC8, 'M', 'ⳉ'),
(0x2CC9, 'V'),
(0x2CCA, 'M', 'ⳋ'),
(0x2CCB, 'V'),
(0x2CCC, 'M', 'ⳍ'),
(0x2CCD, 'V'),
(0x2CCE, 'M', 'ⳏ'),
(0x2CCF, 'V'),
(0x2CD0, 'M', 'ⳑ'),
(0x2CD1, 'V'),
(0x2CD2, 'M', 'ⳓ'),
(0x2CD3, 'V'),
(0x2CD4, 'M', 'ⳕ'),
(0x2CD5, 'V'),
(0x2CD6, 'M', 'ⳗ'),
(0x2CD7, 'V'),
(0x2CD8, 'M', 'ⳙ'),
(0x2CD9, 'V'),
(0x2CDA, 'M', 'ⳛ'),
(0x2CDB, 'V'),
(0x2CDC, 'M', 'ⳝ'),
(0x2CDD, 'V'),
(0x2CDE, 'M', 'ⳟ'),
(0x2CDF, 'V'),
(0x2CE0, 'M', 'ⳡ'),
(0x2CE1, 'V'),
(0x2CE2, 'M', 'ⳣ'),
(0x2CE3, 'V'),
(0x2CEB, 'M', 'ⳬ'),
(0x2CEC, 'V'),
(0x2CED, 'M', 'ⳮ'),
(0x2CEE, 'V'),
(0x2CF2, 'M', 'ⳳ'),
(0x2CF3, 'V'),
(0x2CF4, 'X'),
(0x2CF9, 'V'),
(0x2D26, 'X'),
(0x2D27, 'V'),
(0x2D28, 'X'),
(0x2D2D, 'V'),
(0x2D2E, 'X'),
(0x2D30, 'V'),
(0x2D68, 'X'),
(0x2D6F, 'M', 'ⵡ'),
(0x2D70, 'V'),
(0x2D71, 'X'),
(0x2D7F, 'V'),
(0x2D97, 'X'),
(0x2DA0, 'V'),
(0x2DA7, 'X'),
(0x2DA8, 'V'),
(0x2DAF, 'X'),
(0x2DB0, 'V'),
(0x2DB7, 'X'),
(0x2DB8, 'V'),
(0x2DBF, 'X'),
(0x2DC0, 'V'),
(0x2DC7, 'X'),
(0x2DC8, 'V'),
(0x2DCF, 'X'),
(0x2DD0, 'V'),
(0x2DD7, 'X'),
(0x2DD8, 'V'),
(0x2DDF, 'X'),
(0x2DE0, 'V'),
(0x2E5E, 'X'),
(0x2E80, 'V'),
(0x2E9A, 'X'),
(0x2E9B, 'V'),
(0x2E9F, 'M', '母'),
(0x2EA0, 'V'),
(0x2EF3, 'M', '龟'),
(0x2EF4, 'X'),
(0x2F00, 'M', '一'),
(0x2F01, 'M', '丨'),
(0x2F02, 'M', '丶'),
(0x2F03, 'M', '丿'),
(0x2F04, 'M', '乙'),
(0x2F05, 'M', '亅'),
(0x2F06, 'M', '二'),
(0x2F07, 'M', '亠'),
(0x2F08, 'M', '人'),
(0x2F09, 'M', '儿'),
(0x2F0A, 'M', '入'),
(0x2F0B, 'M', '八'),
(0x2F0C, 'M', '冂'),
(0x2F0D, 'M', '冖'),
(0x2F0E, 'M', '冫'),
(0x2F0F, 'M', '几'),
(0x2F10, 'M', '凵'),
(0x2F11, 'M', '刀'),
(0x2F12, 'M', '力'),
(0x2F13, 'M', '勹'),
(0x2F14, 'M', '匕'),
(0x2F15, 'M', '匚'),
]
def _seg_27() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x2F16, 'M', '匸'),
(0x2F17, 'M', '十'),
(0x2F18, 'M', '卜'),
(0x2F19, 'M', '卩'),
(0x2F1A, 'M', '厂'),
(0x2F1B, 'M', '厶'),
(0x2F1C, 'M', '又'),
(0x2F1D, 'M', '口'),
(0x2F1E, 'M', '囗'),
(0x2F1F, 'M', '土'),
(0x2F20, 'M', '士'),
(0x2F21, 'M', '夂'),
(0x2F22, 'M', '夊'),
(0x2F23, 'M', '夕'),
(0x2F24, 'M', '大'),
(0x2F25, 'M', '女'),
(0x2F26, 'M', '子'),
(0x2F27, 'M', '宀'),
(0x2F28, 'M', '寸'),
(0x2F29, 'M', '小'),
(0x2F2A, 'M', '尢'),
(0x2F2B, 'M', '尸'),
(0x2F2C, 'M', '屮'),
(0x2F2D, 'M', '山'),
(0x2F2E, 'M', '巛'),
(0x2F2F, 'M', '工'),
(0x2F30, 'M', '己'),
(0x2F31, 'M', '巾'),
(0x2F32, 'M', '干'),
(0x2F33, 'M', '幺'),
(0x2F34, 'M', '广'),
(0x2F35, 'M', '廴'),
(0x2F36, 'M', '廾'),
(0x2F37, 'M', '弋'),
(0x2F38, 'M', '弓'),
(0x2F39, 'M', '彐'),
(0x2F3A, 'M', '彡'),
(0x2F3B, 'M', '彳'),
(0x2F3C, 'M', '心'),
(0x2F3D, 'M', '戈'),
(0x2F3E, 'M', '戶'),
(0x2F3F, 'M', '手'),
(0x2F40, 'M', '支'),
(0x2F41, 'M', '攴'),
(0x2F42, 'M', '文'),
(0x2F43, 'M', '斗'),
(0x2F44, 'M', '斤'),
(0x2F45, 'M', '方'),
(0x2F46, 'M', '无'),
(0x2F47, 'M', '日'),
(0x2F48, 'M', '曰'),
(0x2F49, 'M', '月'),
(0x2F4A, 'M', '木'),
(0x2F4B, 'M', '欠'),
(0x2F4C, 'M', '止'),
(0x2F4D, 'M', '歹'),
(0x2F4E, 'M', '殳'),
(0x2F4F, 'M', '毋'),
(0x2F50, 'M', '比'),
(0x2F51, 'M', '毛'),
(0x2F52, 'M', '氏'),
(0x2F53, 'M', '气'),
(0x2F54, 'M', '水'),
(0x2F55, 'M', '火'),
(0x2F56, 'M', '爪'),
(0x2F57, 'M', '父'),
(0x2F58, 'M', '爻'),
(0x2F59, 'M', '爿'),
(0x2F5A, 'M', '片'),
(0x2F5B, 'M', '牙'),
(0x2F5C, 'M', '牛'),
(0x2F5D, 'M', '犬'),
(0x2F5E, 'M', '玄'),
(0x2F5F, 'M', '玉'),
(0x2F60, 'M', '瓜'),
(0x2F61, 'M', '瓦'),
(0x2F62, 'M', '甘'),
(0x2F63, 'M', '生'),
(0x2F64, 'M', '用'),
(0x2F65, 'M', '田'),
(0x2F66, 'M', '疋'),
(0x2F67, 'M', '疒'),
(0x2F68, 'M', '癶'),
(0x2F69, 'M', '白'),
(0x2F6A, 'M', '皮'),
(0x2F6B, 'M', '皿'),
(0x2F6C, 'M', '目'),
(0x2F6D, 'M', '矛'),
(0x2F6E, 'M', '矢'),
(0x2F6F, 'M', '石'),
(0x2F70, 'M', '示'),
(0x2F71, 'M', '禸'),
(0x2F72, 'M', '禾'),
(0x2F73, 'M', '穴'),
(0x2F74, 'M', '立'),
(0x2F75, 'M', '竹'),
(0x2F76, 'M', '米'),
(0x2F77, 'M', '糸'),
(0x2F78, 'M', '缶'),
(0x2F79, 'M', '网'),
]
def _seg_28() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x2F7A, 'M', '羊'),
(0x2F7B, 'M', '羽'),
(0x2F7C, 'M', '老'),
(0x2F7D, 'M', '而'),
(0x2F7E, 'M', '耒'),
(0x2F7F, 'M', '耳'),
(0x2F80, 'M', '聿'),
(0x2F81, 'M', '肉'),
(0x2F82, 'M', '臣'),
(0x2F83, 'M', '自'),
(0x2F84, 'M', '至'),
(0x2F85, 'M', '臼'),
(0x2F86, 'M', '舌'),
(0x2F87, 'M', '舛'),
(0x2F88, 'M', '舟'),
(0x2F89, 'M', '艮'),
(0x2F8A, 'M', '色'),
(0x2F8B, 'M', '艸'),
(0x2F8C, 'M', '虍'),
(0x2F8D, 'M', '虫'),
(0x2F8E, 'M', '血'),
(0x2F8F, 'M', '行'),
(0x2F90, 'M', '衣'),
(0x2F91, 'M', '襾'),
(0x2F92, 'M', '見'),
(0x2F93, 'M', '角'),
(0x2F94, 'M', '言'),
(0x2F95, 'M', '谷'),
(0x2F96, 'M', '豆'),
(0x2F97, 'M', '豕'),
(0x2F98, 'M', '豸'),
(0x2F99, 'M', '貝'),
(0x2F9A, 'M', '赤'),
(0x2F9B, 'M', '走'),
(0x2F9C, 'M', '足'),
(0x2F9D, 'M', '身'),
(0x2F9E, 'M', '車'),
(0x2F9F, 'M', '辛'),
(0x2FA0, 'M', '辰'),
(0x2FA1, 'M', '辵'),
(0x2FA2, 'M', '邑'),
(0x2FA3, 'M', '酉'),
(0x2FA4, 'M', '釆'),
(0x2FA5, 'M', '里'),
(0x2FA6, 'M', '金'),
(0x2FA7, 'M', '長'),
(0x2FA8, 'M', '門'),
(0x2FA9, 'M', '阜'),
(0x2FAA, 'M', '隶'),
(0x2FAB, 'M', '隹'),
(0x2FAC, 'M', '雨'),
(0x2FAD, 'M', '靑'),
(0x2FAE, 'M', '非'),
(0x2FAF, 'M', '面'),
(0x2FB0, 'M', '革'),
(0x2FB1, 'M', '韋'),
(0x2FB2, 'M', '韭'),
(0x2FB3, 'M', '音'),
(0x2FB4, 'M', '頁'),
(0x2FB5, 'M', '風'),
(0x2FB6, 'M', '飛'),
(0x2FB7, 'M', '食'),
(0x2FB8, 'M', '首'),
(0x2FB9, 'M', '香'),
(0x2FBA, 'M', '馬'),
(0x2FBB, 'M', '骨'),
(0x2FBC, 'M', '高'),
(0x2FBD, 'M', '髟'),
(0x2FBE, 'M', '鬥'),
(0x2FBF, 'M', '鬯'),
(0x2FC0, 'M', '鬲'),
(0x2FC1, 'M', '鬼'),
(0x2FC2, 'M', '魚'),
(0x2FC3, 'M', '鳥'),
(0x2FC4, 'M', '鹵'),
(0x2FC5, 'M', '鹿'),
(0x2FC6, 'M', '麥'),
(0x2FC7, 'M', '麻'),
(0x2FC8, 'M', '黃'),
(0x2FC9, 'M', '黍'),
(0x2FCA, 'M', '黑'),
(0x2FCB, 'M', '黹'),
(0x2FCC, 'M', '黽'),
(0x2FCD, 'M', '鼎'),
(0x2FCE, 'M', '鼓'),
(0x2FCF, 'M', '鼠'),
(0x2FD0, 'M', '鼻'),
(0x2FD1, 'M', '齊'),
(0x2FD2, 'M', '齒'),
(0x2FD3, 'M', '龍'),
(0x2FD4, 'M', '龜'),
(0x2FD5, 'M', '龠'),
(0x2FD6, 'X'),
(0x3000, '3', ' '),
(0x3001, 'V'),
(0x3002, 'M', '.'),
(0x3003, 'V'),
(0x3036, 'M', '〒'),
(0x3037, 'V'),
(0x3038, 'M', '十'),
]
def _seg_29() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x3039, 'M', '卄'),
(0x303A, 'M', '卅'),
(0x303B, 'V'),
(0x3040, 'X'),
(0x3041, 'V'),
(0x3097, 'X'),
(0x3099, 'V'),
(0x309B, '3', ' ゙'),
(0x309C, '3', ' ゚'),
(0x309D, 'V'),
(0x309F, 'M', 'より'),
(0x30A0, 'V'),
(0x30FF, 'M', 'コト'),
(0x3100, 'X'),
(0x3105, 'V'),
(0x3130, 'X'),
(0x3131, 'M', 'ᄀ'),
(0x3132, 'M', 'ᄁ'),
(0x3133, 'M', 'ᆪ'),
(0x3134, 'M', 'ᄂ'),
(0x3135, 'M', 'ᆬ'),
(0x3136, 'M', 'ᆭ'),
(0x3137, 'M', 'ᄃ'),
(0x3138, 'M', 'ᄄ'),
(0x3139, 'M', 'ᄅ'),
(0x313A, 'M', 'ᆰ'),
(0x313B, 'M', 'ᆱ'),
(0x313C, 'M', 'ᆲ'),
(0x313D, 'M', 'ᆳ'),
(0x313E, 'M', 'ᆴ'),
(0x313F, 'M', 'ᆵ'),
(0x3140, 'M', 'ᄚ'),
(0x3141, 'M', 'ᄆ'),
(0x3142, 'M', 'ᄇ'),
(0x3143, 'M', 'ᄈ'),
(0x3144, 'M', 'ᄡ'),
(0x3145, 'M', 'ᄉ'),
(0x3146, 'M', 'ᄊ'),
(0x3147, 'M', 'ᄋ'),
(0x3148, 'M', 'ᄌ'),
(0x3149, 'M', 'ᄍ'),
(0x314A, 'M', 'ᄎ'),
(0x314B, 'M', 'ᄏ'),
(0x314C, 'M', 'ᄐ'),
(0x314D, 'M', 'ᄑ'),
(0x314E, 'M', 'ᄒ'),
(0x314F, 'M', 'ᅡ'),
(0x3150, 'M', 'ᅢ'),
(0x3151, 'M', 'ᅣ'),
(0x3152, 'M', 'ᅤ'),
(0x3153, 'M', 'ᅥ'),
(0x3154, 'M', 'ᅦ'),
(0x3155, 'M', 'ᅧ'),
(0x3156, 'M', 'ᅨ'),
(0x3157, 'M', 'ᅩ'),
(0x3158, 'M', 'ᅪ'),
(0x3159, 'M', 'ᅫ'),
(0x315A, 'M', 'ᅬ'),
(0x315B, 'M', 'ᅭ'),
(0x315C, 'M', 'ᅮ'),
(0x315D, 'M', 'ᅯ'),
(0x315E, 'M', 'ᅰ'),
(0x315F, 'M', 'ᅱ'),
(0x3160, 'M', 'ᅲ'),
(0x3161, 'M', 'ᅳ'),
(0x3162, 'M', 'ᅴ'),
(0x3163, 'M', 'ᅵ'),
(0x3164, 'X'),
(0x3165, 'M', 'ᄔ'),
(0x3166, 'M', 'ᄕ'),
(0x3167, 'M', 'ᇇ'),
(0x3168, 'M', 'ᇈ'),
(0x3169, 'M', 'ᇌ'),
(0x316A, 'M', 'ᇎ'),
(0x316B, 'M', 'ᇓ'),
(0x316C, 'M', 'ᇗ'),
(0x316D, 'M', 'ᇙ'),
(0x316E, 'M', 'ᄜ'),
(0x316F, 'M', 'ᇝ'),
(0x3170, 'M', 'ᇟ'),
(0x3171, 'M', 'ᄝ'),
(0x3172, 'M', 'ᄞ'),
(0x3173, 'M', 'ᄠ'),
(0x3174, 'M', 'ᄢ'),
(0x3175, 'M', 'ᄣ'),
(0x3176, 'M', 'ᄧ'),
(0x3177, 'M', 'ᄩ'),
(0x3178, 'M', 'ᄫ'),
(0x3179, 'M', 'ᄬ'),
(0x317A, 'M', 'ᄭ'),
(0x317B, 'M', 'ᄮ'),
(0x317C, 'M', 'ᄯ'),
(0x317D, 'M', 'ᄲ'),
(0x317E, 'M', 'ᄶ'),
(0x317F, 'M', 'ᅀ'),
(0x3180, 'M', 'ᅇ'),
(0x3181, 'M', 'ᅌ'),
(0x3182, 'M', 'ᇱ'),
(0x3183, 'M', 'ᇲ'),
(0x3184, 'M', 'ᅗ'),
]
def _seg_30() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x3185, 'M', 'ᅘ'),
(0x3186, 'M', 'ᅙ'),
(0x3187, 'M', 'ᆄ'),
(0x3188, 'M', 'ᆅ'),
(0x3189, 'M', 'ᆈ'),
(0x318A, 'M', 'ᆑ'),
(0x318B, 'M', 'ᆒ'),
(0x318C, 'M', 'ᆔ'),
(0x318D, 'M', 'ᆞ'),
(0x318E, 'M', 'ᆡ'),
(0x318F, 'X'),
(0x3190, 'V'),
(0x3192, 'M', '一'),
(0x3193, 'M', '二'),
(0x3194, 'M', '三'),
(0x3195, 'M', '四'),
(0x3196, 'M', '上'),
(0x3197, 'M', '中'),
(0x3198, 'M', '下'),
(0x3199, 'M', '甲'),
(0x319A, 'M', '乙'),
(0x319B, 'M', '丙'),
(0x319C, 'M', '丁'),
(0x319D, 'M', '天'),
(0x319E, 'M', '地'),
(0x319F, 'M', '人'),
(0x31A0, 'V'),
(0x31E4, 'X'),
(0x31F0, 'V'),
(0x3200, '3', '(ᄀ)'),
(0x3201, '3', '(ᄂ)'),
(0x3202, '3', '(ᄃ)'),
(0x3203, '3', '(ᄅ)'),
(0x3204, '3', '(ᄆ)'),
(0x3205, '3', '(ᄇ)'),
(0x3206, '3', '(ᄉ)'),
(0x3207, '3', '(ᄋ)'),
(0x3208, '3', '(ᄌ)'),
(0x3209, '3', '(ᄎ)'),
(0x320A, '3', '(ᄏ)'),
(0x320B, '3', '(ᄐ)'),
(0x320C, '3', '(ᄑ)'),
(0x320D, '3', '(ᄒ)'),
(0x320E, '3', '(가)'),
(0x320F, '3', '(나)'),
(0x3210, '3', '(다)'),
(0x3211, '3', '(라)'),
(0x3212, '3', '(마)'),
(0x3213, '3', '(바)'),
(0x3214, '3', '(사)'),
(0x3215, '3', '(아)'),
(0x3216, '3', '(자)'),
(0x3217, '3', '(차)'),
(0x3218, '3', '(카)'),
(0x3219, '3', '(타)'),
(0x321A, '3', '(파)'),
(0x321B, '3', '(하)'),
(0x321C, '3', '(주)'),
(0x321D, '3', '(오전)'),
(0x321E, '3', '(오후)'),
(0x321F, 'X'),
(0x3220, '3', '(一)'),
(0x3221, '3', '(二)'),
(0x3222, '3', '(三)'),
(0x3223, '3', '(四)'),
(0x3224, '3', '(五)'),
(0x3225, '3', '(六)'),
(0x3226, '3', '(七)'),
(0x3227, '3', '(八)'),
(0x3228, '3', '(九)'),
(0x3229, '3', '(十)'),
(0x322A, '3', '(月)'),
(0x322B, '3', '(火)'),
(0x322C, '3', '(水)'),
(0x322D, '3', '(木)'),
(0x322E, '3', '(金)'),
(0x322F, '3', '(土)'),
(0x3230, '3', '(日)'),
(0x3231, '3', '(株)'),
(0x3232, '3', '(有)'),
(0x3233, '3', '(社)'),
(0x3234, '3', '(名)'),
(0x3235, '3', '(特)'),
(0x3236, '3', '(財)'),
(0x3237, '3', '(祝)'),
(0x3238, '3', '(労)'),
(0x3239, '3', '(代)'),
(0x323A, '3', '(呼)'),
(0x323B, '3', '(学)'),
(0x323C, '3', '(監)'),
(0x323D, '3', '(企)'),
(0x323E, '3', '(資)'),
(0x323F, '3', '(協)'),
(0x3240, '3', '(祭)'),
(0x3241, '3', '(休)'),
(0x3242, '3', '(自)'),
(0x3243, '3', '(至)'),
(0x3244, 'M', '問'),
(0x3245, 'M', '幼'),
(0x3246, 'M', '文'),
]
def _seg_31() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x3247, 'M', '箏'),
(0x3248, 'V'),
(0x3250, 'M', 'pte'),
(0x3251, 'M', '21'),
(0x3252, 'M', '22'),
(0x3253, 'M', '23'),
(0x3254, 'M', '24'),
(0x3255, 'M', '25'),
(0x3256, 'M', '26'),
(0x3257, 'M', '27'),
(0x3258, 'M', '28'),
(0x3259, 'M', '29'),
(0x325A, 'M', '30'),
(0x325B, 'M', '31'),
(0x325C, 'M', '32'),
(0x325D, 'M', '33'),
(0x325E, 'M', '34'),
(0x325F, 'M', '35'),
(0x3260, 'M', 'ᄀ'),
(0x3261, 'M', 'ᄂ'),
(0x3262, 'M', 'ᄃ'),
(0x3263, 'M', 'ᄅ'),
(0x3264, 'M', 'ᄆ'),
(0x3265, 'M', 'ᄇ'),
(0x3266, 'M', 'ᄉ'),
(0x3267, 'M', 'ᄋ'),
(0x3268, 'M', 'ᄌ'),
(0x3269, 'M', 'ᄎ'),
(0x326A, 'M', 'ᄏ'),
(0x326B, 'M', 'ᄐ'),
(0x326C, 'M', 'ᄑ'),
(0x326D, 'M', 'ᄒ'),
(0x326E, 'M', '가'),
(0x326F, 'M', '나'),
(0x3270, 'M', '다'),
(0x3271, 'M', '라'),
(0x3272, 'M', '마'),
(0x3273, 'M', '바'),
(0x3274, 'M', '사'),
(0x3275, 'M', '아'),
(0x3276, 'M', '자'),
(0x3277, 'M', '차'),
(0x3278, 'M', '카'),
(0x3279, 'M', '타'),
(0x327A, 'M', '파'),
(0x327B, 'M', '하'),
(0x327C, 'M', '참고'),
(0x327D, 'M', '주의'),
(0x327E, 'M', '우'),
(0x327F, 'V'),
(0x3280, 'M', '一'),
(0x3281, 'M', '二'),
(0x3282, 'M', '三'),
(0x3283, 'M', '四'),
(0x3284, 'M', '五'),
(0x3285, 'M', '六'),
(0x3286, 'M', '七'),
(0x3287, 'M', '八'),
(0x3288, 'M', '九'),
(0x3289, 'M', '十'),
(0x328A, 'M', '月'),
(0x328B, 'M', '火'),
(0x328C, 'M', '水'),
(0x328D, 'M', '木'),
(0x328E, 'M', '金'),
(0x328F, 'M', '土'),
(0x3290, 'M', '日'),
(0x3291, 'M', '株'),
(0x3292, 'M', '有'),
(0x3293, 'M', '社'),
(0x3294, 'M', '名'),
(0x3295, 'M', '特'),
(0x3296, 'M', '財'),
(0x3297, 'M', '祝'),
(0x3298, 'M', '労'),
(0x3299, 'M', '秘'),
(0x329A, 'M', '男'),
(0x329B, 'M', '女'),
(0x329C, 'M', '適'),
(0x329D, 'M', '優'),
(0x329E, 'M', '印'),
(0x329F, 'M', '注'),
(0x32A0, 'M', '項'),
(0x32A1, 'M', '休'),
(0x32A2, 'M', '写'),
(0x32A3, 'M', '正'),
(0x32A4, 'M', '上'),
(0x32A5, 'M', '中'),
(0x32A6, 'M', '下'),
(0x32A7, 'M', '左'),
(0x32A8, 'M', '右'),
(0x32A9, 'M', '医'),
(0x32AA, 'M', '宗'),
(0x32AB, 'M', '学'),
(0x32AC, 'M', '監'),
(0x32AD, 'M', '企'),
(0x32AE, 'M', '資'),
(0x32AF, 'M', '協'),
(0x32B0, 'M', '夜'),
(0x32B1, 'M', '36'),
]
def _seg_32() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x32B2, 'M', '37'),
(0x32B3, 'M', '38'),
(0x32B4, 'M', '39'),
(0x32B5, 'M', '40'),
(0x32B6, 'M', '41'),
(0x32B7, 'M', '42'),
(0x32B8, 'M', '43'),
(0x32B9, 'M', '44'),
(0x32BA, 'M', '45'),
(0x32BB, 'M', '46'),
(0x32BC, 'M', '47'),
(0x32BD, 'M', '48'),
(0x32BE, 'M', '49'),
(0x32BF, 'M', '50'),
(0x32C0, 'M', '1月'),
(0x32C1, 'M', '2月'),
(0x32C2, 'M', '3月'),
(0x32C3, 'M', '4月'),
(0x32C4, 'M', '5月'),
(0x32C5, 'M', '6月'),
(0x32C6, 'M', '7月'),
(0x32C7, 'M', '8月'),
(0x32C8, 'M', '9月'),
(0x32C9, 'M', '10月'),
(0x32CA, 'M', '11月'),
(0x32CB, 'M', '12月'),
(0x32CC, 'M', 'hg'),
(0x32CD, 'M', 'erg'),
(0x32CE, 'M', 'ev'),
(0x32CF, 'M', 'ltd'),
(0x32D0, 'M', 'ア'),
(0x32D1, 'M', 'イ'),
(0x32D2, 'M', 'ウ'),
(0x32D3, 'M', 'エ'),
(0x32D4, 'M', 'オ'),
(0x32D5, 'M', 'カ'),
(0x32D6, 'M', 'キ'),
(0x32D7, 'M', 'ク'),
(0x32D8, 'M', 'ケ'),
(0x32D9, 'M', 'コ'),
(0x32DA, 'M', 'サ'),
(0x32DB, 'M', 'シ'),
(0x32DC, 'M', 'ス'),
(0x32DD, 'M', 'セ'),
(0x32DE, 'M', 'ソ'),
(0x32DF, 'M', 'タ'),
(0x32E0, 'M', 'チ'),
(0x32E1, 'M', 'ツ'),
(0x32E2, 'M', 'テ'),
(0x32E3, 'M', 'ト'),
(0x32E4, 'M', 'ナ'),
(0x32E5, 'M', 'ニ'),
(0x32E6, 'M', 'ヌ'),
(0x32E7, 'M', 'ネ'),
(0x32E8, 'M', 'ノ'),
(0x32E9, 'M', 'ハ'),
(0x32EA, 'M', 'ヒ'),
(0x32EB, 'M', 'フ'),
(0x32EC, 'M', 'ヘ'),
(0x32ED, 'M', 'ホ'),
(0x32EE, 'M', 'マ'),
(0x32EF, 'M', 'ミ'),
(0x32F0, 'M', 'ム'),
(0x32F1, 'M', 'メ'),
(0x32F2, 'M', 'モ'),
(0x32F3, 'M', 'ヤ'),
(0x32F4, 'M', 'ユ'),
(0x32F5, 'M', 'ヨ'),
(0x32F6, 'M', 'ラ'),
(0x32F7, 'M', 'リ'),
(0x32F8, 'M', 'ル'),
(0x32F9, 'M', 'レ'),
(0x32FA, 'M', 'ロ'),
(0x32FB, 'M', 'ワ'),
(0x32FC, 'M', 'ヰ'),
(0x32FD, 'M', 'ヱ'),
(0x32FE, 'M', 'ヲ'),
(0x32FF, 'M', '令和'),
(0x3300, 'M', 'アパート'),
(0x3301, 'M', 'アルファ'),
(0x3302, 'M', 'アンペア'),
(0x3303, 'M', 'アール'),
(0x3304, 'M', 'イニング'),
(0x3305, 'M', 'インチ'),
(0x3306, 'M', 'ウォン'),
(0x3307, 'M', 'エスクード'),
(0x3308, 'M', 'エーカー'),
(0x3309, 'M', 'オンス'),
(0x330A, 'M', 'オーム'),
(0x330B, 'M', 'カイリ'),
(0x330C, 'M', 'カラット'),
(0x330D, 'M', 'カロリー'),
(0x330E, 'M', 'ガロン'),
(0x330F, 'M', 'ガンマ'),
(0x3310, 'M', 'ギガ'),
(0x3311, 'M', 'ギニー'),
(0x3312, 'M', 'キュリー'),
(0x3313, 'M', 'ギルダー'),
(0x3314, 'M', 'キロ'),
(0x3315, 'M', 'キログラム'),
]
def _seg_33() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x3316, 'M', 'キロメートル'),
(0x3317, 'M', 'キロワット'),
(0x3318, 'M', 'グラム'),
(0x3319, 'M', 'グラムトン'),
(0x331A, 'M', 'クルゼイロ'),
(0x331B, 'M', 'クローネ'),
(0x331C, 'M', 'ケース'),
(0x331D, 'M', 'コルナ'),
(0x331E, 'M', 'コーポ'),
(0x331F, 'M', 'サイクル'),
(0x3320, 'M', 'サンチーム'),
(0x3321, 'M', 'シリング'),
(0x3322, 'M', 'センチ'),
(0x3323, 'M', 'セント'),
(0x3324, 'M', 'ダース'),
(0x3325, 'M', 'デシ'),
(0x3326, 'M', 'ドル'),
(0x3327, 'M', 'トン'),
(0x3328, 'M', 'ナノ'),
(0x3329, 'M', 'ノット'),
(0x332A, 'M', 'ハイツ'),
(0x332B, 'M', 'パーセント'),
(0x332C, 'M', 'パーツ'),
(0x332D, 'M', 'バーレル'),
(0x332E, 'M', 'ピアストル'),
(0x332F, 'M', 'ピクル'),
(0x3330, 'M', 'ピコ'),
(0x3331, 'M', 'ビル'),
(0x3332, 'M', 'ファラッド'),
(0x3333, 'M', 'フィート'),
(0x3334, 'M', 'ブッシェル'),
(0x3335, 'M', 'フラン'),
(0x3336, 'M', 'ヘクタール'),
(0x3337, 'M', 'ペソ'),
(0x3338, 'M', 'ペニヒ'),
(0x3339, 'M', 'ヘルツ'),
(0x333A, 'M', 'ペンス'),
(0x333B, 'M', 'ページ'),
(0x333C, 'M', 'ベータ'),
(0x333D, 'M', 'ポイント'),
(0x333E, 'M', 'ボルト'),
(0x333F, 'M', 'ホン'),
(0x3340, 'M', 'ポンド'),
(0x3341, 'M', 'ホール'),
(0x3342, 'M', 'ホーン'),
(0x3343, 'M', 'マイクロ'),
(0x3344, 'M', 'マイル'),
(0x3345, 'M', 'マッハ'),
(0x3346, 'M', 'マルク'),
(0x3347, 'M', 'マンション'),
(0x3348, 'M', 'ミクロン'),
(0x3349, 'M', 'ミリ'),
(0x334A, 'M', 'ミリバール'),
(0x334B, 'M', 'メガ'),
(0x334C, 'M', 'メガトン'),
(0x334D, 'M', 'メートル'),
(0x334E, 'M', 'ヤード'),
(0x334F, 'M', 'ヤール'),
(0x3350, 'M', 'ユアン'),
(0x3351, 'M', 'リットル'),
(0x3352, 'M', 'リラ'),
(0x3353, 'M', 'ルピー'),
(0x3354, 'M', 'ルーブル'),
(0x3355, 'M', 'レム'),
(0x3356, 'M', 'レントゲン'),
(0x3357, 'M', 'ワット'),
(0x3358, 'M', '0点'),
(0x3359, 'M', '1点'),
(0x335A, 'M', '2点'),
(0x335B, 'M', '3点'),
(0x335C, 'M', '4点'),
(0x335D, 'M', '5点'),
(0x335E, 'M', '6点'),
(0x335F, 'M', '7点'),
(0x3360, 'M', '8点'),
(0x3361, 'M', '9点'),
(0x3362, 'M', '10点'),
(0x3363, 'M', '11点'),
(0x3364, 'M', '12点'),
(0x3365, 'M', '13点'),
(0x3366, 'M', '14点'),
(0x3367, 'M', '15点'),
(0x3368, 'M', '16点'),
(0x3369, 'M', '17点'),
(0x336A, 'M', '18点'),
(0x336B, 'M', '19点'),
(0x336C, 'M', '20点'),
(0x336D, 'M', '21点'),
(0x336E, 'M', '22点'),
(0x336F, 'M', '23点'),
(0x3370, 'M', '24点'),
(0x3371, 'M', 'hpa'),
(0x3372, 'M', 'da'),
(0x3373, 'M', 'au'),
(0x3374, 'M', 'bar'),
(0x3375, 'M', 'ov'),
(0x3376, 'M', 'pc'),
(0x3377, 'M', 'dm'),
(0x3378, 'M', 'dm2'),
(0x3379, 'M', 'dm3'),
]
def _seg_34() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x337A, 'M', 'iu'),
(0x337B, 'M', '平成'),
(0x337C, 'M', '昭和'),
(0x337D, 'M', '大正'),
(0x337E, 'M', '明治'),
(0x337F, 'M', '株式会社'),
(0x3380, 'M', 'pa'),
(0x3381, 'M', 'na'),
(0x3382, 'M', 'μa'),
(0x3383, 'M', 'ma'),
(0x3384, 'M', 'ka'),
(0x3385, 'M', 'kb'),
(0x3386, 'M', 'mb'),
(0x3387, 'M', 'gb'),
(0x3388, 'M', 'cal'),
(0x3389, 'M', 'kcal'),
(0x338A, 'M', 'pf'),
(0x338B, 'M', 'nf'),
(0x338C, 'M', 'μf'),
(0x338D, 'M', 'μg'),
(0x338E, 'M', 'mg'),
(0x338F, 'M', 'kg'),
(0x3390, 'M', 'hz'),
(0x3391, 'M', 'khz'),
(0x3392, 'M', 'mhz'),
(0x3393, 'M', 'ghz'),
(0x3394, 'M', 'thz'),
(0x3395, 'M', 'μl'),
(0x3396, 'M', 'ml'),
(0x3397, 'M', 'dl'),
(0x3398, 'M', 'kl'),
(0x3399, 'M', 'fm'),
(0x339A, 'M', 'nm'),
(0x339B, 'M', 'μm'),
(0x339C, 'M', 'mm'),
(0x339D, 'M', 'cm'),
(0x339E, 'M', 'km'),
(0x339F, 'M', 'mm2'),
(0x33A0, 'M', 'cm2'),
(0x33A1, 'M', 'm2'),
(0x33A2, 'M', 'km2'),
(0x33A3, 'M', 'mm3'),
(0x33A4, 'M', 'cm3'),
(0x33A5, 'M', 'm3'),
(0x33A6, 'M', 'km3'),
(0x33A7, 'M', 'm∕s'),
(0x33A8, 'M', 'm∕s2'),
(0x33A9, 'M', 'pa'),
(0x33AA, 'M', 'kpa'),
(0x33AB, 'M', 'mpa'),
(0x33AC, 'M', 'gpa'),
(0x33AD, 'M', 'rad'),
(0x33AE, 'M', 'rad∕s'),
(0x33AF, 'M', 'rad∕s2'),
(0x33B0, 'M', 'ps'),
(0x33B1, 'M', 'ns'),
(0x33B2, 'M', 'μs'),
(0x33B3, 'M', 'ms'),
(0x33B4, 'M', 'pv'),
(0x33B5, 'M', 'nv'),
(0x33B6, 'M', 'μv'),
(0x33B7, 'M', 'mv'),
(0x33B8, 'M', 'kv'),
(0x33B9, 'M', 'mv'),
(0x33BA, 'M', 'pw'),
(0x33BB, 'M', 'nw'),
(0x33BC, 'M', 'μw'),
(0x33BD, 'M', 'mw'),
(0x33BE, 'M', 'kw'),
(0x33BF, 'M', 'mw'),
(0x33C0, 'M', 'kω'),
(0x33C1, 'M', 'mω'),
(0x33C2, 'X'),
(0x33C3, 'M', 'bq'),
(0x33C4, 'M', 'cc'),
(0x33C5, 'M', 'cd'),
(0x33C6, 'M', 'c∕kg'),
(0x33C7, 'X'),
(0x33C8, 'M', 'db'),
(0x33C9, 'M', 'gy'),
(0x33CA, 'M', 'ha'),
(0x33CB, 'M', 'hp'),
(0x33CC, 'M', 'in'),
(0x33CD, 'M', 'kk'),
(0x33CE, 'M', 'km'),
(0x33CF, 'M', 'kt'),
(0x33D0, 'M', 'lm'),
(0x33D1, 'M', 'ln'),
(0x33D2, 'M', 'log'),
(0x33D3, 'M', 'lx'),
(0x33D4, 'M', 'mb'),
(0x33D5, 'M', 'mil'),
(0x33D6, 'M', 'mol'),
(0x33D7, 'M', 'ph'),
(0x33D8, 'X'),
(0x33D9, 'M', 'ppm'),
(0x33DA, 'M', 'pr'),
(0x33DB, 'M', 'sr'),
(0x33DC, 'M', 'sv'),
(0x33DD, 'M', 'wb'),
]
def _seg_35() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x33DE, 'M', 'v∕m'),
(0x33DF, 'M', 'a∕m'),
(0x33E0, 'M', '1日'),
(0x33E1, 'M', '2日'),
(0x33E2, 'M', '3日'),
(0x33E3, 'M', '4日'),
(0x33E4, 'M', '5日'),
(0x33E5, 'M', '6日'),
(0x33E6, 'M', '7日'),
(0x33E7, 'M', '8日'),
(0x33E8, 'M', '9日'),
(0x33E9, 'M', '10日'),
(0x33EA, 'M', '11日'),
(0x33EB, 'M', '12日'),
(0x33EC, 'M', '13日'),
(0x33ED, 'M', '14日'),
(0x33EE, 'M', '15日'),
(0x33EF, 'M', '16日'),
(0x33F0, 'M', '17日'),
(0x33F1, 'M', '18日'),
(0x33F2, 'M', '19日'),
(0x33F3, 'M', '20日'),
(0x33F4, 'M', '21日'),
(0x33F5, 'M', '22日'),
(0x33F6, 'M', '23日'),
(0x33F7, 'M', '24日'),
(0x33F8, 'M', '25日'),
(0x33F9, 'M', '26日'),
(0x33FA, 'M', '27日'),
(0x33FB, 'M', '28日'),
(0x33FC, 'M', '29日'),
(0x33FD, 'M', '30日'),
(0x33FE, 'M', '31日'),
(0x33FF, 'M', 'gal'),
(0x3400, 'V'),
(0xA48D, 'X'),
(0xA490, 'V'),
(0xA4C7, 'X'),
(0xA4D0, 'V'),
(0xA62C, 'X'),
(0xA640, 'M', 'ꙁ'),
(0xA641, 'V'),
(0xA642, 'M', 'ꙃ'),
(0xA643, 'V'),
(0xA644, 'M', 'ꙅ'),
(0xA645, 'V'),
(0xA646, 'M', 'ꙇ'),
(0xA647, 'V'),
(0xA648, 'M', 'ꙉ'),
(0xA649, 'V'),
(0xA64A, 'M', 'ꙋ'),
(0xA64B, 'V'),
(0xA64C, 'M', 'ꙍ'),
(0xA64D, 'V'),
(0xA64E, 'M', 'ꙏ'),
(0xA64F, 'V'),
(0xA650, 'M', 'ꙑ'),
(0xA651, 'V'),
(0xA652, 'M', 'ꙓ'),
(0xA653, 'V'),
(0xA654, 'M', 'ꙕ'),
(0xA655, 'V'),
(0xA656, 'M', 'ꙗ'),
(0xA657, 'V'),
(0xA658, 'M', 'ꙙ'),
(0xA659, 'V'),
(0xA65A, 'M', 'ꙛ'),
(0xA65B, 'V'),
(0xA65C, 'M', 'ꙝ'),
(0xA65D, 'V'),
(0xA65E, 'M', 'ꙟ'),
(0xA65F, 'V'),
(0xA660, 'M', 'ꙡ'),
(0xA661, 'V'),
(0xA662, 'M', 'ꙣ'),
(0xA663, 'V'),
(0xA664, 'M', 'ꙥ'),
(0xA665, 'V'),
(0xA666, 'M', 'ꙧ'),
(0xA667, 'V'),
(0xA668, 'M', 'ꙩ'),
(0xA669, 'V'),
(0xA66A, 'M', 'ꙫ'),
(0xA66B, 'V'),
(0xA66C, 'M', 'ꙭ'),
(0xA66D, 'V'),
(0xA680, 'M', 'ꚁ'),
(0xA681, 'V'),
(0xA682, 'M', 'ꚃ'),
(0xA683, 'V'),
(0xA684, 'M', 'ꚅ'),
(0xA685, 'V'),
(0xA686, 'M', 'ꚇ'),
(0xA687, 'V'),
(0xA688, 'M', 'ꚉ'),
(0xA689, 'V'),
(0xA68A, 'M', 'ꚋ'),
(0xA68B, 'V'),
(0xA68C, 'M', 'ꚍ'),
(0xA68D, 'V'),
]
def _seg_36() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0xA68E, 'M', 'ꚏ'),
(0xA68F, 'V'),
(0xA690, 'M', 'ꚑ'),
(0xA691, 'V'),
(0xA692, 'M', 'ꚓ'),
(0xA693, 'V'),
(0xA694, 'M', 'ꚕ'),
(0xA695, 'V'),
(0xA696, 'M', 'ꚗ'),
(0xA697, 'V'),
(0xA698, 'M', 'ꚙ'),
(0xA699, 'V'),
(0xA69A, 'M', 'ꚛ'),
(0xA69B, 'V'),
(0xA69C, 'M', 'ъ'),
(0xA69D, 'M', 'ь'),
(0xA69E, 'V'),
(0xA6F8, 'X'),
(0xA700, 'V'),
(0xA722, 'M', 'ꜣ'),
(0xA723, 'V'),
(0xA724, 'M', 'ꜥ'),
(0xA725, 'V'),
(0xA726, 'M', 'ꜧ'),
(0xA727, 'V'),
(0xA728, 'M', 'ꜩ'),
(0xA729, 'V'),
(0xA72A, 'M', 'ꜫ'),
(0xA72B, 'V'),
(0xA72C, 'M', 'ꜭ'),
(0xA72D, 'V'),
(0xA72E, 'M', 'ꜯ'),
(0xA72F, 'V'),
(0xA732, 'M', 'ꜳ'),
(0xA733, 'V'),
(0xA734, 'M', 'ꜵ'),
(0xA735, 'V'),
(0xA736, 'M', 'ꜷ'),
(0xA737, 'V'),
(0xA738, 'M', 'ꜹ'),
(0xA739, 'V'),
(0xA73A, 'M', 'ꜻ'),
(0xA73B, 'V'),
(0xA73C, 'M', 'ꜽ'),
(0xA73D, 'V'),
(0xA73E, 'M', 'ꜿ'),
(0xA73F, 'V'),
(0xA740, 'M', 'ꝁ'),
(0xA741, 'V'),
(0xA742, 'M', 'ꝃ'),
(0xA743, 'V'),
(0xA744, 'M', 'ꝅ'),
(0xA745, 'V'),
(0xA746, 'M', 'ꝇ'),
(0xA747, 'V'),
(0xA748, 'M', 'ꝉ'),
(0xA749, 'V'),
(0xA74A, 'M', 'ꝋ'),
(0xA74B, 'V'),
(0xA74C, 'M', 'ꝍ'),
(0xA74D, 'V'),
(0xA74E, 'M', 'ꝏ'),
(0xA74F, 'V'),
(0xA750, 'M', 'ꝑ'),
(0xA751, 'V'),
(0xA752, 'M', 'ꝓ'),
(0xA753, 'V'),
(0xA754, 'M', 'ꝕ'),
(0xA755, 'V'),
(0xA756, 'M', 'ꝗ'),
(0xA757, 'V'),
(0xA758, 'M', 'ꝙ'),
(0xA759, 'V'),
(0xA75A, 'M', 'ꝛ'),
(0xA75B, 'V'),
(0xA75C, 'M', 'ꝝ'),
(0xA75D, 'V'),
(0xA75E, 'M', 'ꝟ'),
(0xA75F, 'V'),
(0xA760, 'M', 'ꝡ'),
(0xA761, 'V'),
(0xA762, 'M', 'ꝣ'),
(0xA763, 'V'),
(0xA764, 'M', 'ꝥ'),
(0xA765, 'V'),
(0xA766, 'M', 'ꝧ'),
(0xA767, 'V'),
(0xA768, 'M', 'ꝩ'),
(0xA769, 'V'),
(0xA76A, 'M', 'ꝫ'),
(0xA76B, 'V'),
(0xA76C, 'M', 'ꝭ'),
(0xA76D, 'V'),
(0xA76E, 'M', 'ꝯ'),
(0xA76F, 'V'),
(0xA770, 'M', 'ꝯ'),
(0xA771, 'V'),
(0xA779, 'M', 'ꝺ'),
(0xA77A, 'V'),
(0xA77B, 'M', 'ꝼ'),
]
def _seg_37() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0xA77C, 'V'),
(0xA77D, 'M', 'ᵹ'),
(0xA77E, 'M', 'ꝿ'),
(0xA77F, 'V'),
(0xA780, 'M', 'ꞁ'),
(0xA781, 'V'),
(0xA782, 'M', 'ꞃ'),
(0xA783, 'V'),
(0xA784, 'M', 'ꞅ'),
(0xA785, 'V'),
(0xA786, 'M', 'ꞇ'),
(0xA787, 'V'),
(0xA78B, 'M', 'ꞌ'),
(0xA78C, 'V'),
(0xA78D, 'M', 'ɥ'),
(0xA78E, 'V'),
(0xA790, 'M', 'ꞑ'),
(0xA791, 'V'),
(0xA792, 'M', 'ꞓ'),
(0xA793, 'V'),
(0xA796, 'M', 'ꞗ'),
(0xA797, 'V'),
(0xA798, 'M', 'ꞙ'),
(0xA799, 'V'),
(0xA79A, 'M', 'ꞛ'),
(0xA79B, 'V'),
(0xA79C, 'M', 'ꞝ'),
(0xA79D, 'V'),
(0xA79E, 'M', 'ꞟ'),
(0xA79F, 'V'),
(0xA7A0, 'M', 'ꞡ'),
(0xA7A1, 'V'),
(0xA7A2, 'M', 'ꞣ'),
(0xA7A3, 'V'),
(0xA7A4, 'M', 'ꞥ'),
(0xA7A5, 'V'),
(0xA7A6, 'M', 'ꞧ'),
(0xA7A7, 'V'),
(0xA7A8, 'M', 'ꞩ'),
(0xA7A9, 'V'),
(0xA7AA, 'M', 'ɦ'),
(0xA7AB, 'M', 'ɜ'),
(0xA7AC, 'M', 'ɡ'),
(0xA7AD, 'M', 'ɬ'),
(0xA7AE, 'M', 'ɪ'),
(0xA7AF, 'V'),
(0xA7B0, 'M', 'ʞ'),
(0xA7B1, 'M', 'ʇ'),
(0xA7B2, 'M', 'ʝ'),
(0xA7B3, 'M', 'ꭓ'),
(0xA7B4, 'M', 'ꞵ'),
(0xA7B5, 'V'),
(0xA7B6, 'M', 'ꞷ'),
(0xA7B7, 'V'),
(0xA7B8, 'M', 'ꞹ'),
(0xA7B9, 'V'),
(0xA7BA, 'M', 'ꞻ'),
(0xA7BB, 'V'),
(0xA7BC, 'M', 'ꞽ'),
(0xA7BD, 'V'),
(0xA7BE, 'M', 'ꞿ'),
(0xA7BF, 'V'),
(0xA7C0, 'M', 'ꟁ'),
(0xA7C1, 'V'),
(0xA7C2, 'M', 'ꟃ'),
(0xA7C3, 'V'),
(0xA7C4, 'M', 'ꞔ'),
(0xA7C5, 'M', 'ʂ'),
(0xA7C6, 'M', 'ᶎ'),
(0xA7C7, 'M', 'ꟈ'),
(0xA7C8, 'V'),
(0xA7C9, 'M', 'ꟊ'),
(0xA7CA, 'V'),
(0xA7CB, 'X'),
(0xA7D0, 'M', 'ꟑ'),
(0xA7D1, 'V'),
(0xA7D2, 'X'),
(0xA7D3, 'V'),
(0xA7D4, 'X'),
(0xA7D5, 'V'),
(0xA7D6, 'M', 'ꟗ'),
(0xA7D7, 'V'),
(0xA7D8, 'M', 'ꟙ'),
(0xA7D9, 'V'),
(0xA7DA, 'X'),
(0xA7F2, 'M', 'c'),
(0xA7F3, 'M', 'f'),
(0xA7F4, 'M', 'q'),
(0xA7F5, 'M', 'ꟶ'),
(0xA7F6, 'V'),
(0xA7F8, 'M', 'ħ'),
(0xA7F9, 'M', 'œ'),
(0xA7FA, 'V'),
(0xA82D, 'X'),
(0xA830, 'V'),
(0xA83A, 'X'),
(0xA840, 'V'),
(0xA878, 'X'),
(0xA880, 'V'),
(0xA8C6, 'X'),
]
def _seg_38() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0xA8CE, 'V'),
(0xA8DA, 'X'),
(0xA8E0, 'V'),
(0xA954, 'X'),
(0xA95F, 'V'),
(0xA97D, 'X'),
(0xA980, 'V'),
(0xA9CE, 'X'),
(0xA9CF, 'V'),
(0xA9DA, 'X'),
(0xA9DE, 'V'),
(0xA9FF, 'X'),
(0xAA00, 'V'),
(0xAA37, 'X'),
(0xAA40, 'V'),
(0xAA4E, 'X'),
(0xAA50, 'V'),
(0xAA5A, 'X'),
(0xAA5C, 'V'),
(0xAAC3, 'X'),
(0xAADB, 'V'),
(0xAAF7, 'X'),
(0xAB01, 'V'),
(0xAB07, 'X'),
(0xAB09, 'V'),
(0xAB0F, 'X'),
(0xAB11, 'V'),
(0xAB17, 'X'),
(0xAB20, 'V'),
(0xAB27, 'X'),
(0xAB28, 'V'),
(0xAB2F, 'X'),
(0xAB30, 'V'),
(0xAB5C, 'M', 'ꜧ'),
(0xAB5D, 'M', 'ꬷ'),
(0xAB5E, 'M', 'ɫ'),
(0xAB5F, 'M', 'ꭒ'),
(0xAB60, 'V'),
(0xAB69, 'M', 'ʍ'),
(0xAB6A, 'V'),
(0xAB6C, 'X'),
(0xAB70, 'M', 'Ꭰ'),
(0xAB71, 'M', 'Ꭱ'),
(0xAB72, 'M', 'Ꭲ'),
(0xAB73, 'M', 'Ꭳ'),
(0xAB74, 'M', 'Ꭴ'),
(0xAB75, 'M', 'Ꭵ'),
(0xAB76, 'M', 'Ꭶ'),
(0xAB77, 'M', 'Ꭷ'),
(0xAB78, 'M', 'Ꭸ'),
(0xAB79, 'M', 'Ꭹ'),
(0xAB7A, 'M', 'Ꭺ'),
(0xAB7B, 'M', 'Ꭻ'),
(0xAB7C, 'M', 'Ꭼ'),
(0xAB7D, 'M', 'Ꭽ'),
(0xAB7E, 'M', 'Ꭾ'),
(0xAB7F, 'M', 'Ꭿ'),
(0xAB80, 'M', 'Ꮀ'),
(0xAB81, 'M', 'Ꮁ'),
(0xAB82, 'M', 'Ꮂ'),
(0xAB83, 'M', 'Ꮃ'),
(0xAB84, 'M', 'Ꮄ'),
(0xAB85, 'M', 'Ꮅ'),
(0xAB86, 'M', 'Ꮆ'),
(0xAB87, 'M', 'Ꮇ'),
(0xAB88, 'M', 'Ꮈ'),
(0xAB89, 'M', 'Ꮉ'),
(0xAB8A, 'M', 'Ꮊ'),
(0xAB8B, 'M', 'Ꮋ'),
(0xAB8C, 'M', 'Ꮌ'),
(0xAB8D, 'M', 'Ꮍ'),
(0xAB8E, 'M', 'Ꮎ'),
(0xAB8F, 'M', 'Ꮏ'),
(0xAB90, 'M', 'Ꮐ'),
(0xAB91, 'M', 'Ꮑ'),
(0xAB92, 'M', 'Ꮒ'),
(0xAB93, 'M', 'Ꮓ'),
(0xAB94, 'M', 'Ꮔ'),
(0xAB95, 'M', 'Ꮕ'),
(0xAB96, 'M', 'Ꮖ'),
(0xAB97, 'M', 'Ꮗ'),
(0xAB98, 'M', 'Ꮘ'),
(0xAB99, 'M', 'Ꮙ'),
(0xAB9A, 'M', 'Ꮚ'),
(0xAB9B, 'M', 'Ꮛ'),
(0xAB9C, 'M', 'Ꮜ'),
(0xAB9D, 'M', 'Ꮝ'),
(0xAB9E, 'M', 'Ꮞ'),
(0xAB9F, 'M', 'Ꮟ'),
(0xABA0, 'M', 'Ꮠ'),
(0xABA1, 'M', 'Ꮡ'),
(0xABA2, 'M', 'Ꮢ'),
(0xABA3, 'M', 'Ꮣ'),
(0xABA4, 'M', 'Ꮤ'),
(0xABA5, 'M', 'Ꮥ'),
(0xABA6, 'M', 'Ꮦ'),
(0xABA7, 'M', 'Ꮧ'),
(0xABA8, 'M', 'Ꮨ'),
(0xABA9, 'M', 'Ꮩ'),
(0xABAA, 'M', 'Ꮪ'),
]
def _seg_39() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0xABAB, 'M', 'Ꮫ'),
(0xABAC, 'M', 'Ꮬ'),
(0xABAD, 'M', 'Ꮭ'),
(0xABAE, 'M', 'Ꮮ'),
(0xABAF, 'M', 'Ꮯ'),
(0xABB0, 'M', 'Ꮰ'),
(0xABB1, 'M', 'Ꮱ'),
(0xABB2, 'M', 'Ꮲ'),
(0xABB3, 'M', 'Ꮳ'),
(0xABB4, 'M', 'Ꮴ'),
(0xABB5, 'M', 'Ꮵ'),
(0xABB6, 'M', 'Ꮶ'),
(0xABB7, 'M', 'Ꮷ'),
(0xABB8, 'M', 'Ꮸ'),
(0xABB9, 'M', 'Ꮹ'),
(0xABBA, 'M', 'Ꮺ'),
(0xABBB, 'M', 'Ꮻ'),
(0xABBC, 'M', 'Ꮼ'),
(0xABBD, 'M', 'Ꮽ'),
(0xABBE, 'M', 'Ꮾ'),
(0xABBF, 'M', 'Ꮿ'),
(0xABC0, 'V'),
(0xABEE, 'X'),
(0xABF0, 'V'),
(0xABFA, 'X'),
(0xAC00, 'V'),
(0xD7A4, 'X'),
(0xD7B0, 'V'),
(0xD7C7, 'X'),
(0xD7CB, 'V'),
(0xD7FC, 'X'),
(0xF900, 'M', '豈'),
(0xF901, 'M', '更'),
(0xF902, 'M', '車'),
(0xF903, 'M', '賈'),
(0xF904, 'M', '滑'),
(0xF905, 'M', '串'),
(0xF906, 'M', '句'),
(0xF907, 'M', '龜'),
(0xF909, 'M', '契'),
(0xF90A, 'M', '金'),
(0xF90B, 'M', '喇'),
(0xF90C, 'M', '奈'),
(0xF90D, 'M', '懶'),
(0xF90E, 'M', '癩'),
(0xF90F, 'M', '羅'),
(0xF910, 'M', '蘿'),
(0xF911, 'M', '螺'),
(0xF912, 'M', '裸'),
(0xF913, 'M', '邏'),
(0xF914, 'M', '樂'),
(0xF915, 'M', '洛'),
(0xF916, 'M', '烙'),
(0xF917, 'M', '珞'),
(0xF918, 'M', '落'),
(0xF919, 'M', '酪'),
(0xF91A, 'M', '駱'),
(0xF91B, 'M', '亂'),
(0xF91C, 'M', '卵'),
(0xF91D, 'M', '欄'),
(0xF91E, 'M', '爛'),
(0xF91F, 'M', '蘭'),
(0xF920, 'M', '鸞'),
(0xF921, 'M', '嵐'),
(0xF922, 'M', '濫'),
(0xF923, 'M', '藍'),
(0xF924, 'M', '襤'),
(0xF925, 'M', '拉'),
(0xF926, 'M', '臘'),
(0xF927, 'M', '蠟'),
(0xF928, 'M', '廊'),
(0xF929, 'M', '朗'),
(0xF92A, 'M', '浪'),
(0xF92B, 'M', '狼'),
(0xF92C, 'M', '郎'),
(0xF92D, 'M', '來'),
(0xF92E, 'M', '冷'),
(0xF92F, 'M', '勞'),
(0xF930, 'M', '擄'),
(0xF931, 'M', '櫓'),
(0xF932, 'M', '爐'),
(0xF933, 'M', '盧'),
(0xF934, 'M', '老'),
(0xF935, 'M', '蘆'),
(0xF936, 'M', '虜'),
(0xF937, 'M', '路'),
(0xF938, 'M', '露'),
(0xF939, 'M', '魯'),
(0xF93A, 'M', '鷺'),
(0xF93B, 'M', '碌'),
(0xF93C, 'M', '祿'),
(0xF93D, 'M', '綠'),
(0xF93E, 'M', '菉'),
(0xF93F, 'M', '錄'),
(0xF940, 'M', '鹿'),
(0xF941, 'M', '論'),
(0xF942, 'M', '壟'),
(0xF943, 'M', '弄'),
(0xF944, 'M', '籠'),
(0xF945, 'M', '聾'),
]
def _seg_40() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0xF946, 'M', '牢'),
(0xF947, 'M', '磊'),
(0xF948, 'M', '賂'),
(0xF949, 'M', '雷'),
(0xF94A, 'M', '壘'),
(0xF94B, 'M', '屢'),
(0xF94C, 'M', '樓'),
(0xF94D, 'M', '淚'),
(0xF94E, 'M', '漏'),
(0xF94F, 'M', '累'),
(0xF950, 'M', '縷'),
(0xF951, 'M', '陋'),
(0xF952, 'M', '勒'),
(0xF953, 'M', '肋'),
(0xF954, 'M', '凜'),
(0xF955, 'M', '凌'),
(0xF956, 'M', '稜'),
(0xF957, 'M', '綾'),
(0xF958, 'M', '菱'),
(0xF959, 'M', '陵'),
(0xF95A, 'M', '讀'),
(0xF95B, 'M', '拏'),
(0xF95C, 'M', '樂'),
(0xF95D, 'M', '諾'),
(0xF95E, 'M', '丹'),
(0xF95F, 'M', '寧'),
(0xF960, 'M', '怒'),
(0xF961, 'M', '率'),
(0xF962, 'M', '異'),
(0xF963, 'M', '北'),
(0xF964, 'M', '磻'),
(0xF965, 'M', '便'),
(0xF966, 'M', '復'),
(0xF967, 'M', '不'),
(0xF968, 'M', '泌'),
(0xF969, 'M', '數'),
(0xF96A, 'M', '索'),
(0xF96B, 'M', '參'),
(0xF96C, 'M', '塞'),
(0xF96D, 'M', '省'),
(0xF96E, 'M', '葉'),
(0xF96F, 'M', '說'),
(0xF970, 'M', '殺'),
(0xF971, 'M', '辰'),
(0xF972, 'M', '沈'),
(0xF973, 'M', '拾'),
(0xF974, 'M', '若'),
(0xF975, 'M', '掠'),
(0xF976, 'M', '略'),
(0xF977, 'M', '亮'),
(0xF978, 'M', '兩'),
(0xF979, 'M', '凉'),
(0xF97A, 'M', '梁'),
(0xF97B, 'M', '糧'),
(0xF97C, 'M', '良'),
(0xF97D, 'M', '諒'),
(0xF97E, 'M', '量'),
(0xF97F, 'M', '勵'),
(0xF980, 'M', '呂'),
(0xF981, 'M', '女'),
(0xF982, 'M', '廬'),
(0xF983, 'M', '旅'),
(0xF984, 'M', '濾'),
(0xF985, 'M', '礪'),
(0xF986, 'M', '閭'),
(0xF987, 'M', '驪'),
(0xF988, 'M', '麗'),
(0xF989, 'M', '黎'),
(0xF98A, 'M', '力'),
(0xF98B, 'M', '曆'),
(0xF98C, 'M', '歷'),
(0xF98D, 'M', '轢'),
(0xF98E, 'M', '年'),
(0xF98F, 'M', '憐'),
(0xF990, 'M', '戀'),
(0xF991, 'M', '撚'),
(0xF992, 'M', '漣'),
(0xF993, 'M', '煉'),
(0xF994, 'M', '璉'),
(0xF995, 'M', '秊'),
(0xF996, 'M', '練'),
(0xF997, 'M', '聯'),
(0xF998, 'M', '輦'),
(0xF999, 'M', '蓮'),
(0xF99A, 'M', '連'),
(0xF99B, 'M', '鍊'),
(0xF99C, 'M', '列'),
(0xF99D, 'M', '劣'),
(0xF99E, 'M', '咽'),
(0xF99F, 'M', '烈'),
(0xF9A0, 'M', '裂'),
(0xF9A1, 'M', '說'),
(0xF9A2, 'M', '廉'),
(0xF9A3, 'M', '念'),
(0xF9A4, 'M', '捻'),
(0xF9A5, 'M', '殮'),
(0xF9A6, 'M', '簾'),
(0xF9A7, 'M', '獵'),
(0xF9A8, 'M', '令'),
(0xF9A9, 'M', '囹'),
]
def _seg_41() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0xF9AA, 'M', '寧'),
(0xF9AB, 'M', '嶺'),
(0xF9AC, 'M', '怜'),
(0xF9AD, 'M', '玲'),
(0xF9AE, 'M', '瑩'),
(0xF9AF, 'M', '羚'),
(0xF9B0, 'M', '聆'),
(0xF9B1, 'M', '鈴'),
(0xF9B2, 'M', '零'),
(0xF9B3, 'M', '靈'),
(0xF9B4, 'M', '領'),
(0xF9B5, 'M', '例'),
(0xF9B6, 'M', '禮'),
(0xF9B7, 'M', '醴'),
(0xF9B8, 'M', '隸'),
(0xF9B9, 'M', '惡'),
(0xF9BA, 'M', '了'),
(0xF9BB, 'M', '僚'),
(0xF9BC, 'M', '寮'),
(0xF9BD, 'M', '尿'),
(0xF9BE, 'M', '料'),
(0xF9BF, 'M', '樂'),
(0xF9C0, 'M', '燎'),
(0xF9C1, 'M', '療'),
(0xF9C2, 'M', '蓼'),
(0xF9C3, 'M', '遼'),
(0xF9C4, 'M', '龍'),
(0xF9C5, 'M', '暈'),
(0xF9C6, 'M', '阮'),
(0xF9C7, 'M', '劉'),
(0xF9C8, 'M', '杻'),
(0xF9C9, 'M', '柳'),
(0xF9CA, 'M', '流'),
(0xF9CB, 'M', '溜'),
(0xF9CC, 'M', '琉'),
(0xF9CD, 'M', '留'),
(0xF9CE, 'M', '硫'),
(0xF9CF, 'M', '紐'),
(0xF9D0, 'M', '類'),
(0xF9D1, 'M', '六'),
(0xF9D2, 'M', '戮'),
(0xF9D3, 'M', '陸'),
(0xF9D4, 'M', '倫'),
(0xF9D5, 'M', '崙'),
(0xF9D6, 'M', '淪'),
(0xF9D7, 'M', '輪'),
(0xF9D8, 'M', '律'),
(0xF9D9, 'M', '慄'),
(0xF9DA, 'M', '栗'),
(0xF9DB, 'M', '率'),
(0xF9DC, 'M', '隆'),
(0xF9DD, 'M', '利'),
(0xF9DE, 'M', '吏'),
(0xF9DF, 'M', '履'),
(0xF9E0, 'M', '易'),
(0xF9E1, 'M', '李'),
(0xF9E2, 'M', '梨'),
(0xF9E3, 'M', '泥'),
(0xF9E4, 'M', '理'),
(0xF9E5, 'M', '痢'),
(0xF9E6, 'M', '罹'),
(0xF9E7, 'M', '裏'),
(0xF9E8, 'M', '裡'),
(0xF9E9, 'M', '里'),
(0xF9EA, 'M', '離'),
(0xF9EB, 'M', '匿'),
(0xF9EC, 'M', '溺'),
(0xF9ED, 'M', '吝'),
(0xF9EE, 'M', '燐'),
(0xF9EF, 'M', '璘'),
(0xF9F0, 'M', '藺'),
(0xF9F1, 'M', '隣'),
(0xF9F2, 'M', '鱗'),
(0xF9F3, 'M', '麟'),
(0xF9F4, 'M', '林'),
(0xF9F5, 'M', '淋'),
(0xF9F6, 'M', '臨'),
(0xF9F7, 'M', '立'),
(0xF9F8, 'M', '笠'),
(0xF9F9, 'M', '粒'),
(0xF9FA, 'M', '狀'),
(0xF9FB, 'M', '炙'),
(0xF9FC, 'M', '識'),
(0xF9FD, 'M', '什'),
(0xF9FE, 'M', '茶'),
(0xF9FF, 'M', '刺'),
(0xFA00, 'M', '切'),
(0xFA01, 'M', '度'),
(0xFA02, 'M', '拓'),
(0xFA03, 'M', '糖'),
(0xFA04, 'M', '宅'),
(0xFA05, 'M', '洞'),
(0xFA06, 'M', '暴'),
(0xFA07, 'M', '輻'),
(0xFA08, 'M', '行'),
(0xFA09, 'M', '降'),
(0xFA0A, 'M', '見'),
(0xFA0B, 'M', '廓'),
(0xFA0C, 'M', '兀'),
(0xFA0D, 'M', '嗀'),
]
def _seg_42() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0xFA0E, 'V'),
(0xFA10, 'M', '塚'),
(0xFA11, 'V'),
(0xFA12, 'M', '晴'),
(0xFA13, 'V'),
(0xFA15, 'M', '凞'),
(0xFA16, 'M', '猪'),
(0xFA17, 'M', '益'),
(0xFA18, 'M', '礼'),
(0xFA19, 'M', '神'),
(0xFA1A, 'M', '祥'),
(0xFA1B, 'M', '福'),
(0xFA1C, 'M', '靖'),
(0xFA1D, 'M', '精'),
(0xFA1E, 'M', '羽'),
(0xFA1F, 'V'),
(0xFA20, 'M', '蘒'),
(0xFA21, 'V'),
(0xFA22, 'M', '諸'),
(0xFA23, 'V'),
(0xFA25, 'M', '逸'),
(0xFA26, 'M', '都'),
(0xFA27, 'V'),
(0xFA2A, 'M', '飯'),
(0xFA2B, 'M', '飼'),
(0xFA2C, 'M', '館'),
(0xFA2D, 'M', '鶴'),
(0xFA2E, 'M', '郞'),
(0xFA2F, 'M', '隷'),
(0xFA30, 'M', '侮'),
(0xFA31, 'M', '僧'),
(0xFA32, 'M', '免'),
(0xFA33, 'M', '勉'),
(0xFA34, 'M', '勤'),
(0xFA35, 'M', '卑'),
(0xFA36, 'M', '喝'),
(0xFA37, 'M', '嘆'),
(0xFA38, 'M', '器'),
(0xFA39, 'M', '塀'),
(0xFA3A, 'M', '墨'),
(0xFA3B, 'M', '層'),
(0xFA3C, 'M', '屮'),
(0xFA3D, 'M', '悔'),
(0xFA3E, 'M', '慨'),
(0xFA3F, 'M', '憎'),
(0xFA40, 'M', '懲'),
(0xFA41, 'M', '敏'),
(0xFA42, 'M', '既'),
(0xFA43, 'M', '暑'),
(0xFA44, 'M', '梅'),
(0xFA45, 'M', '海'),
(0xFA46, 'M', '渚'),
(0xFA47, 'M', '漢'),
(0xFA48, 'M', '煮'),
(0xFA49, 'M', '爫'),
(0xFA4A, 'M', '琢'),
(0xFA4B, 'M', '碑'),
(0xFA4C, 'M', '社'),
(0xFA4D, 'M', '祉'),
(0xFA4E, 'M', '祈'),
(0xFA4F, 'M', '祐'),
(0xFA50, 'M', '祖'),
(0xFA51, 'M', '祝'),
(0xFA52, 'M', '禍'),
(0xFA53, 'M', '禎'),
(0xFA54, 'M', '穀'),
(0xFA55, 'M', '突'),
(0xFA56, 'M', '節'),
(0xFA57, 'M', '練'),
(0xFA58, 'M', '縉'),
(0xFA59, 'M', '繁'),
(0xFA5A, 'M', '署'),
(0xFA5B, 'M', '者'),
(0xFA5C, 'M', '臭'),
(0xFA5D, 'M', '艹'),
(0xFA5F, 'M', '著'),
(0xFA60, 'M', '褐'),
(0xFA61, 'M', '視'),
(0xFA62, 'M', '謁'),
(0xFA63, 'M', '謹'),
(0xFA64, 'M', '賓'),
(0xFA65, 'M', '贈'),
(0xFA66, 'M', '辶'),
(0xFA67, 'M', '逸'),
(0xFA68, 'M', '難'),
(0xFA69, 'M', '響'),
(0xFA6A, 'M', '頻'),
(0xFA6B, 'M', '恵'),
(0xFA6C, 'M', '𤋮'),
(0xFA6D, 'M', '舘'),
(0xFA6E, 'X'),
(0xFA70, 'M', '並'),
(0xFA71, 'M', '况'),
(0xFA72, 'M', '全'),
(0xFA73, 'M', '侀'),
(0xFA74, 'M', '充'),
(0xFA75, 'M', '冀'),
(0xFA76, 'M', '勇'),
(0xFA77, 'M', '勺'),
(0xFA78, 'M', '喝'),
]
def _seg_43() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0xFA79, 'M', '啕'),
(0xFA7A, 'M', '喙'),
(0xFA7B, 'M', '嗢'),
(0xFA7C, 'M', '塚'),
(0xFA7D, 'M', '墳'),
(0xFA7E, 'M', '奄'),
(0xFA7F, 'M', '奔'),
(0xFA80, 'M', '婢'),
(0xFA81, 'M', '嬨'),
(0xFA82, 'M', '廒'),
(0xFA83, 'M', '廙'),
(0xFA84, 'M', '彩'),
(0xFA85, 'M', '徭'),
(0xFA86, 'M', '惘'),
(0xFA87, 'M', '慎'),
(0xFA88, 'M', '愈'),
(0xFA89, 'M', '憎'),
(0xFA8A, 'M', '慠'),
(0xFA8B, 'M', '懲'),
(0xFA8C, 'M', '戴'),
(0xFA8D, 'M', '揄'),
(0xFA8E, 'M', '搜'),
(0xFA8F, 'M', '摒'),
(0xFA90, 'M', '敖'),
(0xFA91, 'M', '晴'),
(0xFA92, 'M', '朗'),
(0xFA93, 'M', '望'),
(0xFA94, 'M', '杖'),
(0xFA95, 'M', '歹'),
(0xFA96, 'M', '殺'),
(0xFA97, 'M', '流'),
(0xFA98, 'M', '滛'),
(0xFA99, 'M', '滋'),
(0xFA9A, 'M', '漢'),
(0xFA9B, 'M', '瀞'),
(0xFA9C, 'M', '煮'),
(0xFA9D, 'M', '瞧'),
(0xFA9E, 'M', '爵'),
(0xFA9F, 'M', '犯'),
(0xFAA0, 'M', '猪'),
(0xFAA1, 'M', '瑱'),
(0xFAA2, 'M', '甆'),
(0xFAA3, 'M', '画'),
(0xFAA4, 'M', '瘝'),
(0xFAA5, 'M', '瘟'),
(0xFAA6, 'M', '益'),
(0xFAA7, 'M', '盛'),
(0xFAA8, 'M', '直'),
(0xFAA9, 'M', '睊'),
(0xFAAA, 'M', '着'),
(0xFAAB, 'M', '磌'),
(0xFAAC, 'M', '窱'),
(0xFAAD, 'M', '節'),
(0xFAAE, 'M', '类'),
(0xFAAF, 'M', '絛'),
(0xFAB0, 'M', '練'),
(0xFAB1, 'M', '缾'),
(0xFAB2, 'M', '者'),
(0xFAB3, 'M', '荒'),
(0xFAB4, 'M', '華'),
(0xFAB5, 'M', '蝹'),
(0xFAB6, 'M', '襁'),
(0xFAB7, 'M', '覆'),
(0xFAB8, 'M', '視'),
(0xFAB9, 'M', '調'),
(0xFABA, 'M', '諸'),
(0xFABB, 'M', '請'),
(0xFABC, 'M', '謁'),
(0xFABD, 'M', '諾'),
(0xFABE, 'M', '諭'),
(0xFABF, 'M', '謹'),
(0xFAC0, 'M', '變'),
(0xFAC1, 'M', '贈'),
(0xFAC2, 'M', '輸'),
(0xFAC3, 'M', '遲'),
(0xFAC4, 'M', '醙'),
(0xFAC5, 'M', '鉶'),
(0xFAC6, 'M', '陼'),
(0xFAC7, 'M', '難'),
(0xFAC8, 'M', '靖'),
(0xFAC9, 'M', '韛'),
(0xFACA, 'M', '響'),
(0xFACB, 'M', '頋'),
(0xFACC, 'M', '頻'),
(0xFACD, 'M', '鬒'),
(0xFACE, 'M', '龜'),
(0xFACF, 'M', '𢡊'),
(0xFAD0, 'M', '𢡄'),
(0xFAD1, 'M', '𣏕'),
(0xFAD2, 'M', '㮝'),
(0xFAD3, 'M', '䀘'),
(0xFAD4, 'M', '䀹'),
(0xFAD5, 'M', '𥉉'),
(0xFAD6, 'M', '𥳐'),
(0xFAD7, 'M', '𧻓'),
(0xFAD8, 'M', '齃'),
(0xFAD9, 'M', '龎'),
(0xFADA, 'X'),
(0xFB00, 'M', 'ff'),
(0xFB01, 'M', 'fi'),
]
def _seg_44() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0xFB02, 'M', 'fl'),
(0xFB03, 'M', 'ffi'),
(0xFB04, 'M', 'ffl'),
(0xFB05, 'M', 'st'),
(0xFB07, 'X'),
(0xFB13, 'M', 'մն'),
(0xFB14, 'M', 'մե'),
(0xFB15, 'M', 'մի'),
(0xFB16, 'M', 'վն'),
(0xFB17, 'M', 'մխ'),
(0xFB18, 'X'),
(0xFB1D, 'M', 'יִ'),
(0xFB1E, 'V'),
(0xFB1F, 'M', 'ײַ'),
(0xFB20, 'M', 'ע'),
(0xFB21, 'M', 'א'),
(0xFB22, 'M', 'ד'),
(0xFB23, 'M', 'ה'),
(0xFB24, 'M', 'כ'),
(0xFB25, 'M', 'ל'),
(0xFB26, 'M', 'ם'),
(0xFB27, 'M', 'ר'),
(0xFB28, 'M', 'ת'),
(0xFB29, '3', '+'),
(0xFB2A, 'M', 'שׁ'),
(0xFB2B, 'M', 'שׂ'),
(0xFB2C, 'M', 'שּׁ'),
(0xFB2D, 'M', 'שּׂ'),
(0xFB2E, 'M', 'אַ'),
(0xFB2F, 'M', 'אָ'),
(0xFB30, 'M', 'אּ'),
(0xFB31, 'M', 'בּ'),
(0xFB32, 'M', 'גּ'),
(0xFB33, 'M', 'דּ'),
(0xFB34, 'M', 'הּ'),
(0xFB35, 'M', 'וּ'),
(0xFB36, 'M', 'זּ'),
(0xFB37, 'X'),
(0xFB38, 'M', 'טּ'),
(0xFB39, 'M', 'יּ'),
(0xFB3A, 'M', 'ךּ'),
(0xFB3B, 'M', 'כּ'),
(0xFB3C, 'M', 'לּ'),
(0xFB3D, 'X'),
(0xFB3E, 'M', 'מּ'),
(0xFB3F, 'X'),
(0xFB40, 'M', 'נּ'),
(0xFB41, 'M', 'סּ'),
(0xFB42, 'X'),
(0xFB43, 'M', 'ףּ'),
(0xFB44, 'M', 'פּ'),
(0xFB45, 'X'),
(0xFB46, 'M', 'צּ'),
(0xFB47, 'M', 'קּ'),
(0xFB48, 'M', 'רּ'),
(0xFB49, 'M', 'שּ'),
(0xFB4A, 'M', 'תּ'),
(0xFB4B, 'M', 'וֹ'),
(0xFB4C, 'M', 'בֿ'),
(0xFB4D, 'M', 'כֿ'),
(0xFB4E, 'M', 'פֿ'),
(0xFB4F, 'M', 'אל'),
(0xFB50, 'M', 'ٱ'),
(0xFB52, 'M', 'ٻ'),
(0xFB56, 'M', 'پ'),
(0xFB5A, 'M', 'ڀ'),
(0xFB5E, 'M', 'ٺ'),
(0xFB62, 'M', 'ٿ'),
(0xFB66, 'M', 'ٹ'),
(0xFB6A, 'M', 'ڤ'),
(0xFB6E, 'M', 'ڦ'),
(0xFB72, 'M', 'ڄ'),
(0xFB76, 'M', 'ڃ'),
(0xFB7A, 'M', 'چ'),
(0xFB7E, 'M', 'ڇ'),
(0xFB82, 'M', 'ڍ'),
(0xFB84, 'M', 'ڌ'),
(0xFB86, 'M', 'ڎ'),
(0xFB88, 'M', 'ڈ'),
(0xFB8A, 'M', 'ژ'),
(0xFB8C, 'M', 'ڑ'),
(0xFB8E, 'M', 'ک'),
(0xFB92, 'M', 'گ'),
(0xFB96, 'M', 'ڳ'),
(0xFB9A, 'M', 'ڱ'),
(0xFB9E, 'M', 'ں'),
(0xFBA0, 'M', 'ڻ'),
(0xFBA4, 'M', 'ۀ'),
(0xFBA6, 'M', 'ہ'),
(0xFBAA, 'M', 'ھ'),
(0xFBAE, 'M', 'ے'),
(0xFBB0, 'M', 'ۓ'),
(0xFBB2, 'V'),
(0xFBC3, 'X'),
(0xFBD3, 'M', 'ڭ'),
(0xFBD7, 'M', 'ۇ'),
(0xFBD9, 'M', 'ۆ'),
(0xFBDB, 'M', 'ۈ'),
(0xFBDD, 'M', 'ۇٴ'),
(0xFBDE, 'M', 'ۋ'),
]
def _seg_45() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0xFBE0, 'M', 'ۅ'),
(0xFBE2, 'M', 'ۉ'),
(0xFBE4, 'M', 'ې'),
(0xFBE8, 'M', 'ى'),
(0xFBEA, 'M', 'ئا'),
(0xFBEC, 'M', 'ئە'),
(0xFBEE, 'M', 'ئو'),
(0xFBF0, 'M', 'ئۇ'),
(0xFBF2, 'M', 'ئۆ'),
(0xFBF4, 'M', 'ئۈ'),
(0xFBF6, 'M', 'ئې'),
(0xFBF9, 'M', 'ئى'),
(0xFBFC, 'M', 'ی'),
(0xFC00, 'M', 'ئج'),
(0xFC01, 'M', 'ئح'),
(0xFC02, 'M', 'ئم'),
(0xFC03, 'M', 'ئى'),
(0xFC04, 'M', 'ئي'),
(0xFC05, 'M', 'بج'),
(0xFC06, 'M', 'بح'),
(0xFC07, 'M', 'بخ'),
(0xFC08, 'M', 'بم'),
(0xFC09, 'M', 'بى'),
(0xFC0A, 'M', 'بي'),
(0xFC0B, 'M', 'تج'),
(0xFC0C, 'M', 'تح'),
(0xFC0D, 'M', 'تخ'),
(0xFC0E, 'M', 'تم'),
(0xFC0F, 'M', 'تى'),
(0xFC10, 'M', 'تي'),
(0xFC11, 'M', 'ثج'),
(0xFC12, 'M', 'ثم'),
(0xFC13, 'M', 'ثى'),
(0xFC14, 'M', 'ثي'),
(0xFC15, 'M', 'جح'),
(0xFC16, 'M', 'جم'),
(0xFC17, 'M', 'حج'),
(0xFC18, 'M', 'حم'),
(0xFC19, 'M', 'خج'),
(0xFC1A, 'M', 'خح'),
(0xFC1B, 'M', 'خم'),
(0xFC1C, 'M', 'سج'),
(0xFC1D, 'M', 'سح'),
(0xFC1E, 'M', 'سخ'),
(0xFC1F, 'M', 'سم'),
(0xFC20, 'M', 'صح'),
(0xFC21, 'M', 'صم'),
(0xFC22, 'M', 'ضج'),
(0xFC23, 'M', 'ضح'),
(0xFC24, 'M', 'ضخ'),
(0xFC25, 'M', 'ضم'),
(0xFC26, 'M', 'طح'),
(0xFC27, 'M', 'طم'),
(0xFC28, 'M', 'ظم'),
(0xFC29, 'M', 'عج'),
(0xFC2A, 'M', 'عم'),
(0xFC2B, 'M', 'غج'),
(0xFC2C, 'M', 'غم'),
(0xFC2D, 'M', 'فج'),
(0xFC2E, 'M', 'فح'),
(0xFC2F, 'M', 'فخ'),
(0xFC30, 'M', 'فم'),
(0xFC31, 'M', 'فى'),
(0xFC32, 'M', 'في'),
(0xFC33, 'M', 'قح'),
(0xFC34, 'M', 'قم'),
(0xFC35, 'M', 'قى'),
(0xFC36, 'M', 'قي'),
(0xFC37, 'M', 'كا'),
(0xFC38, 'M', 'كج'),
(0xFC39, 'M', 'كح'),
(0xFC3A, 'M', 'كخ'),
(0xFC3B, 'M', 'كل'),
(0xFC3C, 'M', 'كم'),
(0xFC3D, 'M', 'كى'),
(0xFC3E, 'M', 'كي'),
(0xFC3F, 'M', 'لج'),
(0xFC40, 'M', 'لح'),
(0xFC41, 'M', 'لخ'),
(0xFC42, 'M', 'لم'),
(0xFC43, 'M', 'لى'),
(0xFC44, 'M', 'لي'),
(0xFC45, 'M', 'مج'),
(0xFC46, 'M', 'مح'),
(0xFC47, 'M', 'مخ'),
(0xFC48, 'M', 'مم'),
(0xFC49, 'M', 'مى'),
(0xFC4A, 'M', 'مي'),
(0xFC4B, 'M', 'نج'),
(0xFC4C, 'M', 'نح'),
(0xFC4D, 'M', 'نخ'),
(0xFC4E, 'M', 'نم'),
(0xFC4F, 'M', 'نى'),
(0xFC50, 'M', 'ني'),
(0xFC51, 'M', 'هج'),
(0xFC52, 'M', 'هم'),
(0xFC53, 'M', 'هى'),
(0xFC54, 'M', 'هي'),
(0xFC55, 'M', 'يج'),
(0xFC56, 'M', 'يح'),
]
def _seg_46() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0xFC57, 'M', 'يخ'),
(0xFC58, 'M', 'يم'),
(0xFC59, 'M', 'يى'),
(0xFC5A, 'M', 'يي'),
(0xFC5B, 'M', 'ذٰ'),
(0xFC5C, 'M', 'رٰ'),
(0xFC5D, 'M', 'ىٰ'),
(0xFC5E, '3', ' ٌّ'),
(0xFC5F, '3', ' ٍّ'),
(0xFC60, '3', ' َّ'),
(0xFC61, '3', ' ُّ'),
(0xFC62, '3', ' ِّ'),
(0xFC63, '3', ' ّٰ'),
(0xFC64, 'M', 'ئر'),
(0xFC65, 'M', 'ئز'),
(0xFC66, 'M', 'ئم'),
(0xFC67, 'M', 'ئن'),
(0xFC68, 'M', 'ئى'),
(0xFC69, 'M', 'ئي'),
(0xFC6A, 'M', 'بر'),
(0xFC6B, 'M', 'بز'),
(0xFC6C, 'M', 'بم'),
(0xFC6D, 'M', 'بن'),
(0xFC6E, 'M', 'بى'),
(0xFC6F, 'M', 'بي'),
(0xFC70, 'M', 'تر'),
(0xFC71, 'M', 'تز'),
(0xFC72, 'M', 'تم'),
(0xFC73, 'M', 'تن'),
(0xFC74, 'M', 'تى'),
(0xFC75, 'M', 'تي'),
(0xFC76, 'M', 'ثر'),
(0xFC77, 'M', 'ثز'),
(0xFC78, 'M', 'ثم'),
(0xFC79, 'M', 'ثن'),
(0xFC7A, 'M', 'ثى'),
(0xFC7B, 'M', 'ثي'),
(0xFC7C, 'M', 'فى'),
(0xFC7D, 'M', 'في'),
(0xFC7E, 'M', 'قى'),
(0xFC7F, 'M', 'قي'),
(0xFC80, 'M', 'كا'),
(0xFC81, 'M', 'كل'),
(0xFC82, 'M', 'كم'),
(0xFC83, 'M', 'كى'),
(0xFC84, 'M', 'كي'),
(0xFC85, 'M', 'لم'),
(0xFC86, 'M', 'لى'),
(0xFC87, 'M', 'لي'),
(0xFC88, 'M', 'ما'),
(0xFC89, 'M', 'مم'),
(0xFC8A, 'M', 'نر'),
(0xFC8B, 'M', 'نز'),
(0xFC8C, 'M', 'نم'),
(0xFC8D, 'M', 'نن'),
(0xFC8E, 'M', 'نى'),
(0xFC8F, 'M', 'ني'),
(0xFC90, 'M', 'ىٰ'),
(0xFC91, 'M', 'ير'),
(0xFC92, 'M', 'يز'),
(0xFC93, 'M', 'يم'),
(0xFC94, 'M', 'ين'),
(0xFC95, 'M', 'يى'),
(0xFC96, 'M', 'يي'),
(0xFC97, 'M', 'ئج'),
(0xFC98, 'M', 'ئح'),
(0xFC99, 'M', 'ئخ'),
(0xFC9A, 'M', 'ئم'),
(0xFC9B, 'M', 'ئه'),
(0xFC9C, 'M', 'بج'),
(0xFC9D, 'M', 'بح'),
(0xFC9E, 'M', 'بخ'),
(0xFC9F, 'M', 'بم'),
(0xFCA0, 'M', 'به'),
(0xFCA1, 'M', 'تج'),
(0xFCA2, 'M', 'تح'),
(0xFCA3, 'M', 'تخ'),
(0xFCA4, 'M', 'تم'),
(0xFCA5, 'M', 'ته'),
(0xFCA6, 'M', 'ثم'),
(0xFCA7, 'M', 'جح'),
(0xFCA8, 'M', 'جم'),
(0xFCA9, 'M', 'حج'),
(0xFCAA, 'M', 'حم'),
(0xFCAB, 'M', 'خج'),
(0xFCAC, 'M', 'خم'),
(0xFCAD, 'M', 'سج'),
(0xFCAE, 'M', 'سح'),
(0xFCAF, 'M', 'سخ'),
(0xFCB0, 'M', 'سم'),
(0xFCB1, 'M', 'صح'),
(0xFCB2, 'M', 'صخ'),
(0xFCB3, 'M', 'صم'),
(0xFCB4, 'M', 'ضج'),
(0xFCB5, 'M', 'ضح'),
(0xFCB6, 'M', 'ضخ'),
(0xFCB7, 'M', 'ضم'),
(0xFCB8, 'M', 'طح'),
(0xFCB9, 'M', 'ظم'),
(0xFCBA, 'M', 'عج'),
]
def _seg_47() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0xFCBB, 'M', 'عم'),
(0xFCBC, 'M', 'غج'),
(0xFCBD, 'M', 'غم'),
(0xFCBE, 'M', 'فج'),
(0xFCBF, 'M', 'فح'),
(0xFCC0, 'M', 'فخ'),
(0xFCC1, 'M', 'فم'),
(0xFCC2, 'M', 'قح'),
(0xFCC3, 'M', 'قم'),
(0xFCC4, 'M', 'كج'),
(0xFCC5, 'M', 'كح'),
(0xFCC6, 'M', 'كخ'),
(0xFCC7, 'M', 'كل'),
(0xFCC8, 'M', 'كم'),
(0xFCC9, 'M', 'لج'),
(0xFCCA, 'M', 'لح'),
(0xFCCB, 'M', 'لخ'),
(0xFCCC, 'M', 'لم'),
(0xFCCD, 'M', 'له'),
(0xFCCE, 'M', 'مج'),
(0xFCCF, 'M', 'مح'),
(0xFCD0, 'M', 'مخ'),
(0xFCD1, 'M', 'مم'),
(0xFCD2, 'M', 'نج'),
(0xFCD3, 'M', 'نح'),
(0xFCD4, 'M', 'نخ'),
(0xFCD5, 'M', 'نم'),
(0xFCD6, 'M', 'نه'),
(0xFCD7, 'M', 'هج'),
(0xFCD8, 'M', 'هم'),
(0xFCD9, 'M', 'هٰ'),
(0xFCDA, 'M', 'يج'),
(0xFCDB, 'M', 'يح'),
(0xFCDC, 'M', 'يخ'),
(0xFCDD, 'M', 'يم'),
(0xFCDE, 'M', 'يه'),
(0xFCDF, 'M', 'ئم'),
(0xFCE0, 'M', 'ئه'),
(0xFCE1, 'M', 'بم'),
(0xFCE2, 'M', 'به'),
(0xFCE3, 'M', 'تم'),
(0xFCE4, 'M', 'ته'),
(0xFCE5, 'M', 'ثم'),
(0xFCE6, 'M', 'ثه'),
(0xFCE7, 'M', 'سم'),
(0xFCE8, 'M', 'سه'),
(0xFCE9, 'M', 'شم'),
(0xFCEA, 'M', 'شه'),
(0xFCEB, 'M', 'كل'),
(0xFCEC, 'M', 'كم'),
(0xFCED, 'M', 'لم'),
(0xFCEE, 'M', 'نم'),
(0xFCEF, 'M', 'نه'),
(0xFCF0, 'M', 'يم'),
(0xFCF1, 'M', 'يه'),
(0xFCF2, 'M', 'ـَّ'),
(0xFCF3, 'M', 'ـُّ'),
(0xFCF4, 'M', 'ـِّ'),
(0xFCF5, 'M', 'طى'),
(0xFCF6, 'M', 'طي'),
(0xFCF7, 'M', 'عى'),
(0xFCF8, 'M', 'عي'),
(0xFCF9, 'M', 'غى'),
(0xFCFA, 'M', 'غي'),
(0xFCFB, 'M', 'سى'),
(0xFCFC, 'M', 'سي'),
(0xFCFD, 'M', 'شى'),
(0xFCFE, 'M', 'شي'),
(0xFCFF, 'M', 'حى'),
(0xFD00, 'M', 'حي'),
(0xFD01, 'M', 'جى'),
(0xFD02, 'M', 'جي'),
(0xFD03, 'M', 'خى'),
(0xFD04, 'M', 'خي'),
(0xFD05, 'M', 'صى'),
(0xFD06, 'M', 'صي'),
(0xFD07, 'M', 'ضى'),
(0xFD08, 'M', 'ضي'),
(0xFD09, 'M', 'شج'),
(0xFD0A, 'M', 'شح'),
(0xFD0B, 'M', 'شخ'),
(0xFD0C, 'M', 'شم'),
(0xFD0D, 'M', 'شر'),
(0xFD0E, 'M', 'سر'),
(0xFD0F, 'M', 'صر'),
(0xFD10, 'M', 'ضر'),
(0xFD11, 'M', 'طى'),
(0xFD12, 'M', 'طي'),
(0xFD13, 'M', 'عى'),
(0xFD14, 'M', 'عي'),
(0xFD15, 'M', 'غى'),
(0xFD16, 'M', 'غي'),
(0xFD17, 'M', 'سى'),
(0xFD18, 'M', 'سي'),
(0xFD19, 'M', 'شى'),
(0xFD1A, 'M', 'شي'),
(0xFD1B, 'M', 'حى'),
(0xFD1C, 'M', 'حي'),
(0xFD1D, 'M', 'جى'),
(0xFD1E, 'M', 'جي'),
]
def _seg_48() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0xFD1F, 'M', 'خى'),
(0xFD20, 'M', 'خي'),
(0xFD21, 'M', 'صى'),
(0xFD22, 'M', 'صي'),
(0xFD23, 'M', 'ضى'),
(0xFD24, 'M', 'ضي'),
(0xFD25, 'M', 'شج'),
(0xFD26, 'M', 'شح'),
(0xFD27, 'M', 'شخ'),
(0xFD28, 'M', 'شم'),
(0xFD29, 'M', 'شر'),
(0xFD2A, 'M', 'سر'),
(0xFD2B, 'M', 'صر'),
(0xFD2C, 'M', 'ضر'),
(0xFD2D, 'M', 'شج'),
(0xFD2E, 'M', 'شح'),
(0xFD2F, 'M', 'شخ'),
(0xFD30, 'M', 'شم'),
(0xFD31, 'M', 'سه'),
(0xFD32, 'M', 'شه'),
(0xFD33, 'M', 'طم'),
(0xFD34, 'M', 'سج'),
(0xFD35, 'M', 'سح'),
(0xFD36, 'M', 'سخ'),
(0xFD37, 'M', 'شج'),
(0xFD38, 'M', 'شح'),
(0xFD39, 'M', 'شخ'),
(0xFD3A, 'M', 'طم'),
(0xFD3B, 'M', 'ظم'),
(0xFD3C, 'M', 'اً'),
(0xFD3E, 'V'),
(0xFD50, 'M', 'تجم'),
(0xFD51, 'M', 'تحج'),
(0xFD53, 'M', 'تحم'),
(0xFD54, 'M', 'تخم'),
(0xFD55, 'M', 'تمج'),
(0xFD56, 'M', 'تمح'),
(0xFD57, 'M', 'تمخ'),
(0xFD58, 'M', 'جمح'),
(0xFD5A, 'M', 'حمي'),
(0xFD5B, 'M', 'حمى'),
(0xFD5C, 'M', 'سحج'),
(0xFD5D, 'M', 'سجح'),
(0xFD5E, 'M', 'سجى'),
(0xFD5F, 'M', 'سمح'),
(0xFD61, 'M', 'سمج'),
(0xFD62, 'M', 'سمم'),
(0xFD64, 'M', 'صحح'),
(0xFD66, 'M', 'صمم'),
(0xFD67, 'M', 'شحم'),
(0xFD69, 'M', 'شجي'),
(0xFD6A, 'M', 'شمخ'),
(0xFD6C, 'M', 'شمم'),
(0xFD6E, 'M', 'ضحى'),
(0xFD6F, 'M', 'ضخم'),
(0xFD71, 'M', 'طمح'),
(0xFD73, 'M', 'طمم'),
(0xFD74, 'M', 'طمي'),
(0xFD75, 'M', 'عجم'),
(0xFD76, 'M', 'عمم'),
(0xFD78, 'M', 'عمى'),
(0xFD79, 'M', 'غمم'),
(0xFD7A, 'M', 'غمي'),
(0xFD7B, 'M', 'غمى'),
(0xFD7C, 'M', 'فخم'),
(0xFD7E, 'M', 'قمح'),
(0xFD7F, 'M', 'قمم'),
(0xFD80, 'M', 'لحم'),
(0xFD81, 'M', 'لحي'),
(0xFD82, 'M', 'لحى'),
(0xFD83, 'M', 'لجج'),
(0xFD85, 'M', 'لخم'),
(0xFD87, 'M', 'لمح'),
(0xFD89, 'M', 'محج'),
(0xFD8A, 'M', 'محم'),
(0xFD8B, 'M', 'محي'),
(0xFD8C, 'M', 'مجح'),
(0xFD8D, 'M', 'مجم'),
(0xFD8E, 'M', 'مخج'),
(0xFD8F, 'M', 'مخم'),
(0xFD90, 'X'),
(0xFD92, 'M', 'مجخ'),
(0xFD93, 'M', 'همج'),
(0xFD94, 'M', 'همم'),
(0xFD95, 'M', 'نحم'),
(0xFD96, 'M', 'نحى'),
(0xFD97, 'M', 'نجم'),
(0xFD99, 'M', 'نجى'),
(0xFD9A, 'M', 'نمي'),
(0xFD9B, 'M', 'نمى'),
(0xFD9C, 'M', 'يمم'),
(0xFD9E, 'M', 'بخي'),
(0xFD9F, 'M', 'تجي'),
(0xFDA0, 'M', 'تجى'),
(0xFDA1, 'M', 'تخي'),
(0xFDA2, 'M', 'تخى'),
(0xFDA3, 'M', 'تمي'),
(0xFDA4, 'M', 'تمى'),
(0xFDA5, 'M', 'جمي'),
(0xFDA6, 'M', 'جحى'),
]
def _seg_49() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0xFDA7, 'M', 'جمى'),
(0xFDA8, 'M', 'سخى'),
(0xFDA9, 'M', 'صحي'),
(0xFDAA, 'M', 'شحي'),
(0xFDAB, 'M', 'ضحي'),
(0xFDAC, 'M', 'لجي'),
(0xFDAD, 'M', 'لمي'),
(0xFDAE, 'M', 'يحي'),
(0xFDAF, 'M', 'يجي'),
(0xFDB0, 'M', 'يمي'),
(0xFDB1, 'M', 'ممي'),
(0xFDB2, 'M', 'قمي'),
(0xFDB3, 'M', 'نحي'),
(0xFDB4, 'M', 'قمح'),
(0xFDB5, 'M', 'لحم'),
(0xFDB6, 'M', 'عمي'),
(0xFDB7, 'M', 'كمي'),
(0xFDB8, 'M', 'نجح'),
(0xFDB9, 'M', 'مخي'),
(0xFDBA, 'M', 'لجم'),
(0xFDBB, 'M', 'كمم'),
(0xFDBC, 'M', 'لجم'),
(0xFDBD, 'M', 'نجح'),
(0xFDBE, 'M', 'جحي'),
(0xFDBF, 'M', 'حجي'),
(0xFDC0, 'M', 'مجي'),
(0xFDC1, 'M', 'فمي'),
(0xFDC2, 'M', 'بحي'),
(0xFDC3, 'M', 'كمم'),
(0xFDC4, 'M', 'عجم'),
(0xFDC5, 'M', 'صمم'),
(0xFDC6, 'M', 'سخي'),
(0xFDC7, 'M', 'نجي'),
(0xFDC8, 'X'),
(0xFDCF, 'V'),
(0xFDD0, 'X'),
(0xFDF0, 'M', 'صلے'),
(0xFDF1, 'M', 'قلے'),
(0xFDF2, 'M', 'الله'),
(0xFDF3, 'M', 'اكبر'),
(0xFDF4, 'M', 'محمد'),
(0xFDF5, 'M', 'صلعم'),
(0xFDF6, 'M', 'رسول'),
(0xFDF7, 'M', 'عليه'),
(0xFDF8, 'M', 'وسلم'),
(0xFDF9, 'M', 'صلى'),
(0xFDFA, '3', 'صلى الله عليه وسلم'),
(0xFDFB, '3', 'جل جلاله'),
(0xFDFC, 'M', 'ریال'),
(0xFDFD, 'V'),
(0xFE00, 'I'),
(0xFE10, '3', ','),
(0xFE11, 'M', '、'),
(0xFE12, 'X'),
(0xFE13, '3', ':'),
(0xFE14, '3', ';'),
(0xFE15, '3', '!'),
(0xFE16, '3', '?'),
(0xFE17, 'M', '〖'),
(0xFE18, 'M', '〗'),
(0xFE19, 'X'),
(0xFE20, 'V'),
(0xFE30, 'X'),
(0xFE31, 'M', '—'),
(0xFE32, 'M', '–'),
(0xFE33, '3', '_'),
(0xFE35, '3', '('),
(0xFE36, '3', ')'),
(0xFE37, '3', '{'),
(0xFE38, '3', '}'),
(0xFE39, 'M', '〔'),
(0xFE3A, 'M', '〕'),
(0xFE3B, 'M', '【'),
(0xFE3C, 'M', '】'),
(0xFE3D, 'M', '《'),
(0xFE3E, 'M', '》'),
(0xFE3F, 'M', '〈'),
(0xFE40, 'M', '〉'),
(0xFE41, 'M', '「'),
(0xFE42, 'M', '」'),
(0xFE43, 'M', '『'),
(0xFE44, 'M', '』'),
(0xFE45, 'V'),
(0xFE47, '3', '['),
(0xFE48, '3', ']'),
(0xFE49, '3', ' ̅'),
(0xFE4D, '3', '_'),
(0xFE50, '3', ','),
(0xFE51, 'M', '、'),
(0xFE52, 'X'),
(0xFE54, '3', ';'),
(0xFE55, '3', ':'),
(0xFE56, '3', '?'),
(0xFE57, '3', '!'),
(0xFE58, 'M', '—'),
(0xFE59, '3', '('),
(0xFE5A, '3', ')'),
(0xFE5B, '3', '{'),
(0xFE5C, '3', '}'),
(0xFE5D, 'M', '〔'),
]
def _seg_50() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0xFE5E, 'M', '〕'),
(0xFE5F, '3', '#'),
(0xFE60, '3', '&'),
(0xFE61, '3', '*'),
(0xFE62, '3', '+'),
(0xFE63, 'M', '-'),
(0xFE64, '3', '<'),
(0xFE65, '3', '>'),
(0xFE66, '3', '='),
(0xFE67, 'X'),
(0xFE68, '3', '\\'),
(0xFE69, '3', '$'),
(0xFE6A, '3', '%'),
(0xFE6B, '3', '@'),
(0xFE6C, 'X'),
(0xFE70, '3', ' ً'),
(0xFE71, 'M', 'ـً'),
(0xFE72, '3', ' ٌ'),
(0xFE73, 'V'),
(0xFE74, '3', ' ٍ'),
(0xFE75, 'X'),
(0xFE76, '3', ' َ'),
(0xFE77, 'M', 'ـَ'),
(0xFE78, '3', ' ُ'),
(0xFE79, 'M', 'ـُ'),
(0xFE7A, '3', ' ِ'),
(0xFE7B, 'M', 'ـِ'),
(0xFE7C, '3', ' ّ'),
(0xFE7D, 'M', 'ـّ'),
(0xFE7E, '3', ' ْ'),
(0xFE7F, 'M', 'ـْ'),
(0xFE80, 'M', 'ء'),
(0xFE81, 'M', 'آ'),
(0xFE83, 'M', 'أ'),
(0xFE85, 'M', 'ؤ'),
(0xFE87, 'M', 'إ'),
(0xFE89, 'M', 'ئ'),
(0xFE8D, 'M', 'ا'),
(0xFE8F, 'M', 'ب'),
(0xFE93, 'M', 'ة'),
(0xFE95, 'M', 'ت'),
(0xFE99, 'M', 'ث'),
(0xFE9D, 'M', 'ج'),
(0xFEA1, 'M', 'ح'),
(0xFEA5, 'M', 'خ'),
(0xFEA9, 'M', 'د'),
(0xFEAB, 'M', 'ذ'),
(0xFEAD, 'M', 'ر'),
(0xFEAF, 'M', 'ز'),
(0xFEB1, 'M', 'س'),
(0xFEB5, 'M', 'ش'),
(0xFEB9, 'M', 'ص'),
(0xFEBD, 'M', 'ض'),
(0xFEC1, 'M', 'ط'),
(0xFEC5, 'M', 'ظ'),
(0xFEC9, 'M', 'ع'),
(0xFECD, 'M', 'غ'),
(0xFED1, 'M', 'ف'),
(0xFED5, 'M', 'ق'),
(0xFED9, 'M', 'ك'),
(0xFEDD, 'M', 'ل'),
(0xFEE1, 'M', 'م'),
(0xFEE5, 'M', 'ن'),
(0xFEE9, 'M', 'ه'),
(0xFEED, 'M', 'و'),
(0xFEEF, 'M', 'ى'),
(0xFEF1, 'M', 'ي'),
(0xFEF5, 'M', 'لآ'),
(0xFEF7, 'M', 'لأ'),
(0xFEF9, 'M', 'لإ'),
(0xFEFB, 'M', 'لا'),
(0xFEFD, 'X'),
(0xFEFF, 'I'),
(0xFF00, 'X'),
(0xFF01, '3', '!'),
(0xFF02, '3', '"'),
(0xFF03, '3', '#'),
(0xFF04, '3', '$'),
(0xFF05, '3', '%'),
(0xFF06, '3', '&'),
(0xFF07, '3', '\''),
(0xFF08, '3', '('),
(0xFF09, '3', ')'),
(0xFF0A, '3', '*'),
(0xFF0B, '3', '+'),
(0xFF0C, '3', ','),
(0xFF0D, 'M', '-'),
(0xFF0E, 'M', '.'),
(0xFF0F, '3', '/'),
(0xFF10, 'M', '0'),
(0xFF11, 'M', '1'),
(0xFF12, 'M', '2'),
(0xFF13, 'M', '3'),
(0xFF14, 'M', '4'),
(0xFF15, 'M', '5'),
(0xFF16, 'M', '6'),
(0xFF17, 'M', '7'),
(0xFF18, 'M', '8'),
(0xFF19, 'M', '9'),
(0xFF1A, '3', ':'),
]
def _seg_51() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0xFF1B, '3', ';'),
(0xFF1C, '3', '<'),
(0xFF1D, '3', '='),
(0xFF1E, '3', '>'),
(0xFF1F, '3', '?'),
(0xFF20, '3', '@'),
(0xFF21, 'M', 'a'),
(0xFF22, 'M', 'b'),
(0xFF23, 'M', 'c'),
(0xFF24, 'M', 'd'),
(0xFF25, 'M', 'e'),
(0xFF26, 'M', 'f'),
(0xFF27, 'M', 'g'),
(0xFF28, 'M', 'h'),
(0xFF29, 'M', 'i'),
(0xFF2A, 'M', 'j'),
(0xFF2B, 'M', 'k'),
(0xFF2C, 'M', 'l'),
(0xFF2D, 'M', 'm'),
(0xFF2E, 'M', 'n'),
(0xFF2F, 'M', 'o'),
(0xFF30, 'M', 'p'),
(0xFF31, 'M', 'q'),
(0xFF32, 'M', 'r'),
(0xFF33, 'M', 's'),
(0xFF34, 'M', 't'),
(0xFF35, 'M', 'u'),
(0xFF36, 'M', 'v'),
(0xFF37, 'M', 'w'),
(0xFF38, 'M', 'x'),
(0xFF39, 'M', 'y'),
(0xFF3A, 'M', 'z'),
(0xFF3B, '3', '['),
(0xFF3C, '3', '\\'),
(0xFF3D, '3', ']'),
(0xFF3E, '3', '^'),
(0xFF3F, '3', '_'),
(0xFF40, '3', '`'),
(0xFF41, 'M', 'a'),
(0xFF42, 'M', 'b'),
(0xFF43, 'M', 'c'),
(0xFF44, 'M', 'd'),
(0xFF45, 'M', 'e'),
(0xFF46, 'M', 'f'),
(0xFF47, 'M', 'g'),
(0xFF48, 'M', 'h'),
(0xFF49, 'M', 'i'),
(0xFF4A, 'M', 'j'),
(0xFF4B, 'M', 'k'),
(0xFF4C, 'M', 'l'),
(0xFF4D, 'M', 'm'),
(0xFF4E, 'M', 'n'),
(0xFF4F, 'M', 'o'),
(0xFF50, 'M', 'p'),
(0xFF51, 'M', 'q'),
(0xFF52, 'M', 'r'),
(0xFF53, 'M', 's'),
(0xFF54, 'M', 't'),
(0xFF55, 'M', 'u'),
(0xFF56, 'M', 'v'),
(0xFF57, 'M', 'w'),
(0xFF58, 'M', 'x'),
(0xFF59, 'M', 'y'),
(0xFF5A, 'M', 'z'),
(0xFF5B, '3', '{'),
(0xFF5C, '3', '|'),
(0xFF5D, '3', '}'),
(0xFF5E, '3', '~'),
(0xFF5F, 'M', '⦅'),
(0xFF60, 'M', '⦆'),
(0xFF61, 'M', '.'),
(0xFF62, 'M', '「'),
(0xFF63, 'M', '」'),
(0xFF64, 'M', '、'),
(0xFF65, 'M', '・'),
(0xFF66, 'M', 'ヲ'),
(0xFF67, 'M', 'ァ'),
(0xFF68, 'M', 'ィ'),
(0xFF69, 'M', 'ゥ'),
(0xFF6A, 'M', 'ェ'),
(0xFF6B, 'M', 'ォ'),
(0xFF6C, 'M', 'ャ'),
(0xFF6D, 'M', 'ュ'),
(0xFF6E, 'M', 'ョ'),
(0xFF6F, 'M', 'ッ'),
(0xFF70, 'M', 'ー'),
(0xFF71, 'M', 'ア'),
(0xFF72, 'M', 'イ'),
(0xFF73, 'M', 'ウ'),
(0xFF74, 'M', 'エ'),
(0xFF75, 'M', 'オ'),
(0xFF76, 'M', 'カ'),
(0xFF77, 'M', 'キ'),
(0xFF78, 'M', 'ク'),
(0xFF79, 'M', 'ケ'),
(0xFF7A, 'M', 'コ'),
(0xFF7B, 'M', 'サ'),
(0xFF7C, 'M', 'シ'),
(0xFF7D, 'M', 'ス'),
(0xFF7E, 'M', 'セ'),
]
def _seg_52() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0xFF7F, 'M', 'ソ'),
(0xFF80, 'M', 'タ'),
(0xFF81, 'M', 'チ'),
(0xFF82, 'M', 'ツ'),
(0xFF83, 'M', 'テ'),
(0xFF84, 'M', 'ト'),
(0xFF85, 'M', 'ナ'),
(0xFF86, 'M', 'ニ'),
(0xFF87, 'M', 'ヌ'),
(0xFF88, 'M', 'ネ'),
(0xFF89, 'M', 'ノ'),
(0xFF8A, 'M', 'ハ'),
(0xFF8B, 'M', 'ヒ'),
(0xFF8C, 'M', 'フ'),
(0xFF8D, 'M', 'ヘ'),
(0xFF8E, 'M', 'ホ'),
(0xFF8F, 'M', 'マ'),
(0xFF90, 'M', 'ミ'),
(0xFF91, 'M', 'ム'),
(0xFF92, 'M', 'メ'),
(0xFF93, 'M', 'モ'),
(0xFF94, 'M', 'ヤ'),
(0xFF95, 'M', 'ユ'),
(0xFF96, 'M', 'ヨ'),
(0xFF97, 'M', 'ラ'),
(0xFF98, 'M', 'リ'),
(0xFF99, 'M', 'ル'),
(0xFF9A, 'M', 'レ'),
(0xFF9B, 'M', 'ロ'),
(0xFF9C, 'M', 'ワ'),
(0xFF9D, 'M', 'ン'),
(0xFF9E, 'M', '゙'),
(0xFF9F, 'M', '゚'),
(0xFFA0, 'X'),
(0xFFA1, 'M', 'ᄀ'),
(0xFFA2, 'M', 'ᄁ'),
(0xFFA3, 'M', 'ᆪ'),
(0xFFA4, 'M', 'ᄂ'),
(0xFFA5, 'M', 'ᆬ'),
(0xFFA6, 'M', 'ᆭ'),
(0xFFA7, 'M', 'ᄃ'),
(0xFFA8, 'M', 'ᄄ'),
(0xFFA9, 'M', 'ᄅ'),
(0xFFAA, 'M', 'ᆰ'),
(0xFFAB, 'M', 'ᆱ'),
(0xFFAC, 'M', 'ᆲ'),
(0xFFAD, 'M', 'ᆳ'),
(0xFFAE, 'M', 'ᆴ'),
(0xFFAF, 'M', 'ᆵ'),
(0xFFB0, 'M', 'ᄚ'),
(0xFFB1, 'M', 'ᄆ'),
(0xFFB2, 'M', 'ᄇ'),
(0xFFB3, 'M', 'ᄈ'),
(0xFFB4, 'M', 'ᄡ'),
(0xFFB5, 'M', 'ᄉ'),
(0xFFB6, 'M', 'ᄊ'),
(0xFFB7, 'M', 'ᄋ'),
(0xFFB8, 'M', 'ᄌ'),
(0xFFB9, 'M', 'ᄍ'),
(0xFFBA, 'M', 'ᄎ'),
(0xFFBB, 'M', 'ᄏ'),
(0xFFBC, 'M', 'ᄐ'),
(0xFFBD, 'M', 'ᄑ'),
(0xFFBE, 'M', 'ᄒ'),
(0xFFBF, 'X'),
(0xFFC2, 'M', 'ᅡ'),
(0xFFC3, 'M', 'ᅢ'),
(0xFFC4, 'M', 'ᅣ'),
(0xFFC5, 'M', 'ᅤ'),
(0xFFC6, 'M', 'ᅥ'),
(0xFFC7, 'M', 'ᅦ'),
(0xFFC8, 'X'),
(0xFFCA, 'M', 'ᅧ'),
(0xFFCB, 'M', 'ᅨ'),
(0xFFCC, 'M', 'ᅩ'),
(0xFFCD, 'M', 'ᅪ'),
(0xFFCE, 'M', 'ᅫ'),
(0xFFCF, 'M', 'ᅬ'),
(0xFFD0, 'X'),
(0xFFD2, 'M', 'ᅭ'),
(0xFFD3, 'M', 'ᅮ'),
(0xFFD4, 'M', 'ᅯ'),
(0xFFD5, 'M', 'ᅰ'),
(0xFFD6, 'M', 'ᅱ'),
(0xFFD7, 'M', 'ᅲ'),
(0xFFD8, 'X'),
(0xFFDA, 'M', 'ᅳ'),
(0xFFDB, 'M', 'ᅴ'),
(0xFFDC, 'M', 'ᅵ'),
(0xFFDD, 'X'),
(0xFFE0, 'M', '¢'),
(0xFFE1, 'M', '£'),
(0xFFE2, 'M', '¬'),
(0xFFE3, '3', ' ̄'),
(0xFFE4, 'M', '¦'),
(0xFFE5, 'M', '¥'),
(0xFFE6, 'M', '₩'),
(0xFFE7, 'X'),
(0xFFE8, 'M', '│'),
(0xFFE9, 'M', '←'),
]
def _seg_53() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0xFFEA, 'M', '↑'),
(0xFFEB, 'M', '→'),
(0xFFEC, 'M', '↓'),
(0xFFED, 'M', '■'),
(0xFFEE, 'M', '○'),
(0xFFEF, 'X'),
(0x10000, 'V'),
(0x1000C, 'X'),
(0x1000D, 'V'),
(0x10027, 'X'),
(0x10028, 'V'),
(0x1003B, 'X'),
(0x1003C, 'V'),
(0x1003E, 'X'),
(0x1003F, 'V'),
(0x1004E, 'X'),
(0x10050, 'V'),
(0x1005E, 'X'),
(0x10080, 'V'),
(0x100FB, 'X'),
(0x10100, 'V'),
(0x10103, 'X'),
(0x10107, 'V'),
(0x10134, 'X'),
(0x10137, 'V'),
(0x1018F, 'X'),
(0x10190, 'V'),
(0x1019D, 'X'),
(0x101A0, 'V'),
(0x101A1, 'X'),
(0x101D0, 'V'),
(0x101FE, 'X'),
(0x10280, 'V'),
(0x1029D, 'X'),
(0x102A0, 'V'),
(0x102D1, 'X'),
(0x102E0, 'V'),
(0x102FC, 'X'),
(0x10300, 'V'),
(0x10324, 'X'),
(0x1032D, 'V'),
(0x1034B, 'X'),
(0x10350, 'V'),
(0x1037B, 'X'),
(0x10380, 'V'),
(0x1039E, 'X'),
(0x1039F, 'V'),
(0x103C4, 'X'),
(0x103C8, 'V'),
(0x103D6, 'X'),
(0x10400, 'M', '𐐨'),
(0x10401, 'M', '𐐩'),
(0x10402, 'M', '𐐪'),
(0x10403, 'M', '𐐫'),
(0x10404, 'M', '𐐬'),
(0x10405, 'M', '𐐭'),
(0x10406, 'M', '𐐮'),
(0x10407, 'M', '𐐯'),
(0x10408, 'M', '𐐰'),
(0x10409, 'M', '𐐱'),
(0x1040A, 'M', '𐐲'),
(0x1040B, 'M', '𐐳'),
(0x1040C, 'M', '𐐴'),
(0x1040D, 'M', '𐐵'),
(0x1040E, 'M', '𐐶'),
(0x1040F, 'M', '𐐷'),
(0x10410, 'M', '𐐸'),
(0x10411, 'M', '𐐹'),
(0x10412, 'M', '𐐺'),
(0x10413, 'M', '𐐻'),
(0x10414, 'M', '𐐼'),
(0x10415, 'M', '𐐽'),
(0x10416, 'M', '𐐾'),
(0x10417, 'M', '𐐿'),
(0x10418, 'M', '𐑀'),
(0x10419, 'M', '𐑁'),
(0x1041A, 'M', '𐑂'),
(0x1041B, 'M', '𐑃'),
(0x1041C, 'M', '𐑄'),
(0x1041D, 'M', '𐑅'),
(0x1041E, 'M', '𐑆'),
(0x1041F, 'M', '𐑇'),
(0x10420, 'M', '𐑈'),
(0x10421, 'M', '𐑉'),
(0x10422, 'M', '𐑊'),
(0x10423, 'M', '𐑋'),
(0x10424, 'M', '𐑌'),
(0x10425, 'M', '𐑍'),
(0x10426, 'M', '𐑎'),
(0x10427, 'M', '𐑏'),
(0x10428, 'V'),
(0x1049E, 'X'),
(0x104A0, 'V'),
(0x104AA, 'X'),
(0x104B0, 'M', '𐓘'),
(0x104B1, 'M', '𐓙'),
(0x104B2, 'M', '𐓚'),
(0x104B3, 'M', '𐓛'),
(0x104B4, 'M', '𐓜'),
(0x104B5, 'M', '𐓝'),
]
def _seg_54() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x104B6, 'M', '𐓞'),
(0x104B7, 'M', '𐓟'),
(0x104B8, 'M', '𐓠'),
(0x104B9, 'M', '𐓡'),
(0x104BA, 'M', '𐓢'),
(0x104BB, 'M', '𐓣'),
(0x104BC, 'M', '𐓤'),
(0x104BD, 'M', '𐓥'),
(0x104BE, 'M', '𐓦'),
(0x104BF, 'M', '𐓧'),
(0x104C0, 'M', '𐓨'),
(0x104C1, 'M', '𐓩'),
(0x104C2, 'M', '𐓪'),
(0x104C3, 'M', '𐓫'),
(0x104C4, 'M', '𐓬'),
(0x104C5, 'M', '𐓭'),
(0x104C6, 'M', '𐓮'),
(0x104C7, 'M', '𐓯'),
(0x104C8, 'M', '𐓰'),
(0x104C9, 'M', '𐓱'),
(0x104CA, 'M', '𐓲'),
(0x104CB, 'M', '𐓳'),
(0x104CC, 'M', '𐓴'),
(0x104CD, 'M', '𐓵'),
(0x104CE, 'M', '𐓶'),
(0x104CF, 'M', '𐓷'),
(0x104D0, 'M', '𐓸'),
(0x104D1, 'M', '𐓹'),
(0x104D2, 'M', '𐓺'),
(0x104D3, 'M', '𐓻'),
(0x104D4, 'X'),
(0x104D8, 'V'),
(0x104FC, 'X'),
(0x10500, 'V'),
(0x10528, 'X'),
(0x10530, 'V'),
(0x10564, 'X'),
(0x1056F, 'V'),
(0x10570, 'M', '𐖗'),
(0x10571, 'M', '𐖘'),
(0x10572, 'M', '𐖙'),
(0x10573, 'M', '𐖚'),
(0x10574, 'M', '𐖛'),
(0x10575, 'M', '𐖜'),
(0x10576, 'M', '𐖝'),
(0x10577, 'M', '𐖞'),
(0x10578, 'M', '𐖟'),
(0x10579, 'M', '𐖠'),
(0x1057A, 'M', '𐖡'),
(0x1057B, 'X'),
(0x1057C, 'M', '𐖣'),
(0x1057D, 'M', '𐖤'),
(0x1057E, 'M', '𐖥'),
(0x1057F, 'M', '𐖦'),
(0x10580, 'M', '𐖧'),
(0x10581, 'M', '𐖨'),
(0x10582, 'M', '𐖩'),
(0x10583, 'M', '𐖪'),
(0x10584, 'M', '𐖫'),
(0x10585, 'M', '𐖬'),
(0x10586, 'M', '𐖭'),
(0x10587, 'M', '𐖮'),
(0x10588, 'M', '𐖯'),
(0x10589, 'M', '𐖰'),
(0x1058A, 'M', '𐖱'),
(0x1058B, 'X'),
(0x1058C, 'M', '𐖳'),
(0x1058D, 'M', '𐖴'),
(0x1058E, 'M', '𐖵'),
(0x1058F, 'M', '𐖶'),
(0x10590, 'M', '𐖷'),
(0x10591, 'M', '𐖸'),
(0x10592, 'M', '𐖹'),
(0x10593, 'X'),
(0x10594, 'M', '𐖻'),
(0x10595, 'M', '𐖼'),
(0x10596, 'X'),
(0x10597, 'V'),
(0x105A2, 'X'),
(0x105A3, 'V'),
(0x105B2, 'X'),
(0x105B3, 'V'),
(0x105BA, 'X'),
(0x105BB, 'V'),
(0x105BD, 'X'),
(0x10600, 'V'),
(0x10737, 'X'),
(0x10740, 'V'),
(0x10756, 'X'),
(0x10760, 'V'),
(0x10768, 'X'),
(0x10780, 'V'),
(0x10781, 'M', 'ː'),
(0x10782, 'M', 'ˑ'),
(0x10783, 'M', 'æ'),
(0x10784, 'M', 'ʙ'),
(0x10785, 'M', 'ɓ'),
(0x10786, 'X'),
(0x10787, 'M', 'ʣ'),
(0x10788, 'M', 'ꭦ'),
]
def _seg_55() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x10789, 'M', 'ʥ'),
(0x1078A, 'M', 'ʤ'),
(0x1078B, 'M', 'ɖ'),
(0x1078C, 'M', 'ɗ'),
(0x1078D, 'M', 'ᶑ'),
(0x1078E, 'M', 'ɘ'),
(0x1078F, 'M', 'ɞ'),
(0x10790, 'M', 'ʩ'),
(0x10791, 'M', 'ɤ'),
(0x10792, 'M', 'ɢ'),
(0x10793, 'M', 'ɠ'),
(0x10794, 'M', 'ʛ'),
(0x10795, 'M', 'ħ'),
(0x10796, 'M', 'ʜ'),
(0x10797, 'M', 'ɧ'),
(0x10798, 'M', 'ʄ'),
(0x10799, 'M', 'ʪ'),
(0x1079A, 'M', 'ʫ'),
(0x1079B, 'M', 'ɬ'),
(0x1079C, 'M', '𝼄'),
(0x1079D, 'M', 'ꞎ'),
(0x1079E, 'M', 'ɮ'),
(0x1079F, 'M', '𝼅'),
(0x107A0, 'M', 'ʎ'),
(0x107A1, 'M', '𝼆'),
(0x107A2, 'M', 'ø'),
(0x107A3, 'M', 'ɶ'),
(0x107A4, 'M', 'ɷ'),
(0x107A5, 'M', 'q'),
(0x107A6, 'M', 'ɺ'),
(0x107A7, 'M', '𝼈'),
(0x107A8, 'M', 'ɽ'),
(0x107A9, 'M', 'ɾ'),
(0x107AA, 'M', 'ʀ'),
(0x107AB, 'M', 'ʨ'),
(0x107AC, 'M', 'ʦ'),
(0x107AD, 'M', 'ꭧ'),
(0x107AE, 'M', 'ʧ'),
(0x107AF, 'M', 'ʈ'),
(0x107B0, 'M', 'ⱱ'),
(0x107B1, 'X'),
(0x107B2, 'M', 'ʏ'),
(0x107B3, 'M', 'ʡ'),
(0x107B4, 'M', 'ʢ'),
(0x107B5, 'M', 'ʘ'),
(0x107B6, 'M', 'ǀ'),
(0x107B7, 'M', 'ǁ'),
(0x107B8, 'M', 'ǂ'),
(0x107B9, 'M', '𝼊'),
(0x107BA, 'M', '𝼞'),
(0x107BB, 'X'),
(0x10800, 'V'),
(0x10806, 'X'),
(0x10808, 'V'),
(0x10809, 'X'),
(0x1080A, 'V'),
(0x10836, 'X'),
(0x10837, 'V'),
(0x10839, 'X'),
(0x1083C, 'V'),
(0x1083D, 'X'),
(0x1083F, 'V'),
(0x10856, 'X'),
(0x10857, 'V'),
(0x1089F, 'X'),
(0x108A7, 'V'),
(0x108B0, 'X'),
(0x108E0, 'V'),
(0x108F3, 'X'),
(0x108F4, 'V'),
(0x108F6, 'X'),
(0x108FB, 'V'),
(0x1091C, 'X'),
(0x1091F, 'V'),
(0x1093A, 'X'),
(0x1093F, 'V'),
(0x10940, 'X'),
(0x10980, 'V'),
(0x109B8, 'X'),
(0x109BC, 'V'),
(0x109D0, 'X'),
(0x109D2, 'V'),
(0x10A04, 'X'),
(0x10A05, 'V'),
(0x10A07, 'X'),
(0x10A0C, 'V'),
(0x10A14, 'X'),
(0x10A15, 'V'),
(0x10A18, 'X'),
(0x10A19, 'V'),
(0x10A36, 'X'),
(0x10A38, 'V'),
(0x10A3B, 'X'),
(0x10A3F, 'V'),
(0x10A49, 'X'),
(0x10A50, 'V'),
(0x10A59, 'X'),
(0x10A60, 'V'),
(0x10AA0, 'X'),
(0x10AC0, 'V'),
]
def _seg_56() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x10AE7, 'X'),
(0x10AEB, 'V'),
(0x10AF7, 'X'),
(0x10B00, 'V'),
(0x10B36, 'X'),
(0x10B39, 'V'),
(0x10B56, 'X'),
(0x10B58, 'V'),
(0x10B73, 'X'),
(0x10B78, 'V'),
(0x10B92, 'X'),
(0x10B99, 'V'),
(0x10B9D, 'X'),
(0x10BA9, 'V'),
(0x10BB0, 'X'),
(0x10C00, 'V'),
(0x10C49, 'X'),
(0x10C80, 'M', '𐳀'),
(0x10C81, 'M', '𐳁'),
(0x10C82, 'M', '𐳂'),
(0x10C83, 'M', '𐳃'),
(0x10C84, 'M', '𐳄'),
(0x10C85, 'M', '𐳅'),
(0x10C86, 'M', '𐳆'),
(0x10C87, 'M', '𐳇'),
(0x10C88, 'M', '𐳈'),
(0x10C89, 'M', '𐳉'),
(0x10C8A, 'M', '𐳊'),
(0x10C8B, 'M', '𐳋'),
(0x10C8C, 'M', '𐳌'),
(0x10C8D, 'M', '𐳍'),
(0x10C8E, 'M', '𐳎'),
(0x10C8F, 'M', '𐳏'),
(0x10C90, 'M', '𐳐'),
(0x10C91, 'M', '𐳑'),
(0x10C92, 'M', '𐳒'),
(0x10C93, 'M', '𐳓'),
(0x10C94, 'M', '𐳔'),
(0x10C95, 'M', '𐳕'),
(0x10C96, 'M', '𐳖'),
(0x10C97, 'M', '𐳗'),
(0x10C98, 'M', '𐳘'),
(0x10C99, 'M', '𐳙'),
(0x10C9A, 'M', '𐳚'),
(0x10C9B, 'M', '𐳛'),
(0x10C9C, 'M', '𐳜'),
(0x10C9D, 'M', '𐳝'),
(0x10C9E, 'M', '𐳞'),
(0x10C9F, 'M', '𐳟'),
(0x10CA0, 'M', '𐳠'),
(0x10CA1, 'M', '𐳡'),
(0x10CA2, 'M', '𐳢'),
(0x10CA3, 'M', '𐳣'),
(0x10CA4, 'M', '𐳤'),
(0x10CA5, 'M', '𐳥'),
(0x10CA6, 'M', '𐳦'),
(0x10CA7, 'M', '𐳧'),
(0x10CA8, 'M', '𐳨'),
(0x10CA9, 'M', '𐳩'),
(0x10CAA, 'M', '𐳪'),
(0x10CAB, 'M', '𐳫'),
(0x10CAC, 'M', '𐳬'),
(0x10CAD, 'M', '𐳭'),
(0x10CAE, 'M', '𐳮'),
(0x10CAF, 'M', '𐳯'),
(0x10CB0, 'M', '𐳰'),
(0x10CB1, 'M', '𐳱'),
(0x10CB2, 'M', '𐳲'),
(0x10CB3, 'X'),
(0x10CC0, 'V'),
(0x10CF3, 'X'),
(0x10CFA, 'V'),
(0x10D28, 'X'),
(0x10D30, 'V'),
(0x10D3A, 'X'),
(0x10E60, 'V'),
(0x10E7F, 'X'),
(0x10E80, 'V'),
(0x10EAA, 'X'),
(0x10EAB, 'V'),
(0x10EAE, 'X'),
(0x10EB0, 'V'),
(0x10EB2, 'X'),
(0x10EFD, 'V'),
(0x10F28, 'X'),
(0x10F30, 'V'),
(0x10F5A, 'X'),
(0x10F70, 'V'),
(0x10F8A, 'X'),
(0x10FB0, 'V'),
(0x10FCC, 'X'),
(0x10FE0, 'V'),
(0x10FF7, 'X'),
(0x11000, 'V'),
(0x1104E, 'X'),
(0x11052, 'V'),
(0x11076, 'X'),
(0x1107F, 'V'),
(0x110BD, 'X'),
(0x110BE, 'V'),
]
def _seg_57() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x110C3, 'X'),
(0x110D0, 'V'),
(0x110E9, 'X'),
(0x110F0, 'V'),
(0x110FA, 'X'),
(0x11100, 'V'),
(0x11135, 'X'),
(0x11136, 'V'),
(0x11148, 'X'),
(0x11150, 'V'),
(0x11177, 'X'),
(0x11180, 'V'),
(0x111E0, 'X'),
(0x111E1, 'V'),
(0x111F5, 'X'),
(0x11200, 'V'),
(0x11212, 'X'),
(0x11213, 'V'),
(0x11242, 'X'),
(0x11280, 'V'),
(0x11287, 'X'),
(0x11288, 'V'),
(0x11289, 'X'),
(0x1128A, 'V'),
(0x1128E, 'X'),
(0x1128F, 'V'),
(0x1129E, 'X'),
(0x1129F, 'V'),
(0x112AA, 'X'),
(0x112B0, 'V'),
(0x112EB, 'X'),
(0x112F0, 'V'),
(0x112FA, 'X'),
(0x11300, 'V'),
(0x11304, 'X'),
(0x11305, 'V'),
(0x1130D, 'X'),
(0x1130F, 'V'),
(0x11311, 'X'),
(0x11313, 'V'),
(0x11329, 'X'),
(0x1132A, 'V'),
(0x11331, 'X'),
(0x11332, 'V'),
(0x11334, 'X'),
(0x11335, 'V'),
(0x1133A, 'X'),
(0x1133B, 'V'),
(0x11345, 'X'),
(0x11347, 'V'),
(0x11349, 'X'),
(0x1134B, 'V'),
(0x1134E, 'X'),
(0x11350, 'V'),
(0x11351, 'X'),
(0x11357, 'V'),
(0x11358, 'X'),
(0x1135D, 'V'),
(0x11364, 'X'),
(0x11366, 'V'),
(0x1136D, 'X'),
(0x11370, 'V'),
(0x11375, 'X'),
(0x11400, 'V'),
(0x1145C, 'X'),
(0x1145D, 'V'),
(0x11462, 'X'),
(0x11480, 'V'),
(0x114C8, 'X'),
(0x114D0, 'V'),
(0x114DA, 'X'),
(0x11580, 'V'),
(0x115B6, 'X'),
(0x115B8, 'V'),
(0x115DE, 'X'),
(0x11600, 'V'),
(0x11645, 'X'),
(0x11650, 'V'),
(0x1165A, 'X'),
(0x11660, 'V'),
(0x1166D, 'X'),
(0x11680, 'V'),
(0x116BA, 'X'),
(0x116C0, 'V'),
(0x116CA, 'X'),
(0x11700, 'V'),
(0x1171B, 'X'),
(0x1171D, 'V'),
(0x1172C, 'X'),
(0x11730, 'V'),
(0x11747, 'X'),
(0x11800, 'V'),
(0x1183C, 'X'),
(0x118A0, 'M', '𑣀'),
(0x118A1, 'M', '𑣁'),
(0x118A2, 'M', '𑣂'),
(0x118A3, 'M', '𑣃'),
(0x118A4, 'M', '𑣄'),
(0x118A5, 'M', '𑣅'),
(0x118A6, 'M', '𑣆'),
]
def _seg_58() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x118A7, 'M', '𑣇'),
(0x118A8, 'M', '𑣈'),
(0x118A9, 'M', '𑣉'),
(0x118AA, 'M', '𑣊'),
(0x118AB, 'M', '𑣋'),
(0x118AC, 'M', '𑣌'),
(0x118AD, 'M', '𑣍'),
(0x118AE, 'M', '𑣎'),
(0x118AF, 'M', '𑣏'),
(0x118B0, 'M', '𑣐'),
(0x118B1, 'M', '𑣑'),
(0x118B2, 'M', '𑣒'),
(0x118B3, 'M', '𑣓'),
(0x118B4, 'M', '𑣔'),
(0x118B5, 'M', '𑣕'),
(0x118B6, 'M', '𑣖'),
(0x118B7, 'M', '𑣗'),
(0x118B8, 'M', '𑣘'),
(0x118B9, 'M', '𑣙'),
(0x118BA, 'M', '𑣚'),
(0x118BB, 'M', '𑣛'),
(0x118BC, 'M', '𑣜'),
(0x118BD, 'M', '𑣝'),
(0x118BE, 'M', '𑣞'),
(0x118BF, 'M', '𑣟'),
(0x118C0, 'V'),
(0x118F3, 'X'),
(0x118FF, 'V'),
(0x11907, 'X'),
(0x11909, 'V'),
(0x1190A, 'X'),
(0x1190C, 'V'),
(0x11914, 'X'),
(0x11915, 'V'),
(0x11917, 'X'),
(0x11918, 'V'),
(0x11936, 'X'),
(0x11937, 'V'),
(0x11939, 'X'),
(0x1193B, 'V'),
(0x11947, 'X'),
(0x11950, 'V'),
(0x1195A, 'X'),
(0x119A0, 'V'),
(0x119A8, 'X'),
(0x119AA, 'V'),
(0x119D8, 'X'),
(0x119DA, 'V'),
(0x119E5, 'X'),
(0x11A00, 'V'),
(0x11A48, 'X'),
(0x11A50, 'V'),
(0x11AA3, 'X'),
(0x11AB0, 'V'),
(0x11AF9, 'X'),
(0x11B00, 'V'),
(0x11B0A, 'X'),
(0x11C00, 'V'),
(0x11C09, 'X'),
(0x11C0A, 'V'),
(0x11C37, 'X'),
(0x11C38, 'V'),
(0x11C46, 'X'),
(0x11C50, 'V'),
(0x11C6D, 'X'),
(0x11C70, 'V'),
(0x11C90, 'X'),
(0x11C92, 'V'),
(0x11CA8, 'X'),
(0x11CA9, 'V'),
(0x11CB7, 'X'),
(0x11D00, 'V'),
(0x11D07, 'X'),
(0x11D08, 'V'),
(0x11D0A, 'X'),
(0x11D0B, 'V'),
(0x11D37, 'X'),
(0x11D3A, 'V'),
(0x11D3B, 'X'),
(0x11D3C, 'V'),
(0x11D3E, 'X'),
(0x11D3F, 'V'),
(0x11D48, 'X'),
(0x11D50, 'V'),
(0x11D5A, 'X'),
(0x11D60, 'V'),
(0x11D66, 'X'),
(0x11D67, 'V'),
(0x11D69, 'X'),
(0x11D6A, 'V'),
(0x11D8F, 'X'),
(0x11D90, 'V'),
(0x11D92, 'X'),
(0x11D93, 'V'),
(0x11D99, 'X'),
(0x11DA0, 'V'),
(0x11DAA, 'X'),
(0x11EE0, 'V'),
(0x11EF9, 'X'),
(0x11F00, 'V'),
]
def _seg_59() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x11F11, 'X'),
(0x11F12, 'V'),
(0x11F3B, 'X'),
(0x11F3E, 'V'),
(0x11F5A, 'X'),
(0x11FB0, 'V'),
(0x11FB1, 'X'),
(0x11FC0, 'V'),
(0x11FF2, 'X'),
(0x11FFF, 'V'),
(0x1239A, 'X'),
(0x12400, 'V'),
(0x1246F, 'X'),
(0x12470, 'V'),
(0x12475, 'X'),
(0x12480, 'V'),
(0x12544, 'X'),
(0x12F90, 'V'),
(0x12FF3, 'X'),
(0x13000, 'V'),
(0x13430, 'X'),
(0x13440, 'V'),
(0x13456, 'X'),
(0x14400, 'V'),
(0x14647, 'X'),
(0x16800, 'V'),
(0x16A39, 'X'),
(0x16A40, 'V'),
(0x16A5F, 'X'),
(0x16A60, 'V'),
(0x16A6A, 'X'),
(0x16A6E, 'V'),
(0x16ABF, 'X'),
(0x16AC0, 'V'),
(0x16ACA, 'X'),
(0x16AD0, 'V'),
(0x16AEE, 'X'),
(0x16AF0, 'V'),
(0x16AF6, 'X'),
(0x16B00, 'V'),
(0x16B46, 'X'),
(0x16B50, 'V'),
(0x16B5A, 'X'),
(0x16B5B, 'V'),
(0x16B62, 'X'),
(0x16B63, 'V'),
(0x16B78, 'X'),
(0x16B7D, 'V'),
(0x16B90, 'X'),
(0x16E40, 'M', '𖹠'),
(0x16E41, 'M', '𖹡'),
(0x16E42, 'M', '𖹢'),
(0x16E43, 'M', '𖹣'),
(0x16E44, 'M', '𖹤'),
(0x16E45, 'M', '𖹥'),
(0x16E46, 'M', '𖹦'),
(0x16E47, 'M', '𖹧'),
(0x16E48, 'M', '𖹨'),
(0x16E49, 'M', '𖹩'),
(0x16E4A, 'M', '𖹪'),
(0x16E4B, 'M', '𖹫'),
(0x16E4C, 'M', '𖹬'),
(0x16E4D, 'M', '𖹭'),
(0x16E4E, 'M', '𖹮'),
(0x16E4F, 'M', '𖹯'),
(0x16E50, 'M', '𖹰'),
(0x16E51, 'M', '𖹱'),
(0x16E52, 'M', '𖹲'),
(0x16E53, 'M', '𖹳'),
(0x16E54, 'M', '𖹴'),
(0x16E55, 'M', '𖹵'),
(0x16E56, 'M', '𖹶'),
(0x16E57, 'M', '𖹷'),
(0x16E58, 'M', '𖹸'),
(0x16E59, 'M', '𖹹'),
(0x16E5A, 'M', '𖹺'),
(0x16E5B, 'M', '𖹻'),
(0x16E5C, 'M', '𖹼'),
(0x16E5D, 'M', '𖹽'),
(0x16E5E, 'M', '𖹾'),
(0x16E5F, 'M', '𖹿'),
(0x16E60, 'V'),
(0x16E9B, 'X'),
(0x16F00, 'V'),
(0x16F4B, 'X'),
(0x16F4F, 'V'),
(0x16F88, 'X'),
(0x16F8F, 'V'),
(0x16FA0, 'X'),
(0x16FE0, 'V'),
(0x16FE5, 'X'),
(0x16FF0, 'V'),
(0x16FF2, 'X'),
(0x17000, 'V'),
(0x187F8, 'X'),
(0x18800, 'V'),
(0x18CD6, 'X'),
(0x18D00, 'V'),
(0x18D09, 'X'),
(0x1AFF0, 'V'),
]
def _seg_60() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x1AFF4, 'X'),
(0x1AFF5, 'V'),
(0x1AFFC, 'X'),
(0x1AFFD, 'V'),
(0x1AFFF, 'X'),
(0x1B000, 'V'),
(0x1B123, 'X'),
(0x1B132, 'V'),
(0x1B133, 'X'),
(0x1B150, 'V'),
(0x1B153, 'X'),
(0x1B155, 'V'),
(0x1B156, 'X'),
(0x1B164, 'V'),
(0x1B168, 'X'),
(0x1B170, 'V'),
(0x1B2FC, 'X'),
(0x1BC00, 'V'),
(0x1BC6B, 'X'),
(0x1BC70, 'V'),
(0x1BC7D, 'X'),
(0x1BC80, 'V'),
(0x1BC89, 'X'),
(0x1BC90, 'V'),
(0x1BC9A, 'X'),
(0x1BC9C, 'V'),
(0x1BCA0, 'I'),
(0x1BCA4, 'X'),
(0x1CF00, 'V'),
(0x1CF2E, 'X'),
(0x1CF30, 'V'),
(0x1CF47, 'X'),
(0x1CF50, 'V'),
(0x1CFC4, 'X'),
(0x1D000, 'V'),
(0x1D0F6, 'X'),
(0x1D100, 'V'),
(0x1D127, 'X'),
(0x1D129, 'V'),
(0x1D15E, 'M', '𝅗𝅥'),
(0x1D15F, 'M', '𝅘𝅥'),
(0x1D160, 'M', '𝅘𝅥𝅮'),
(0x1D161, 'M', '𝅘𝅥𝅯'),
(0x1D162, 'M', '𝅘𝅥𝅰'),
(0x1D163, 'M', '𝅘𝅥𝅱'),
(0x1D164, 'M', '𝅘𝅥𝅲'),
(0x1D165, 'V'),
(0x1D173, 'X'),
(0x1D17B, 'V'),
(0x1D1BB, 'M', '𝆹𝅥'),
(0x1D1BC, 'M', '𝆺𝅥'),
(0x1D1BD, 'M', '𝆹𝅥𝅮'),
(0x1D1BE, 'M', '𝆺𝅥𝅮'),
(0x1D1BF, 'M', '𝆹𝅥𝅯'),
(0x1D1C0, 'M', '𝆺𝅥𝅯'),
(0x1D1C1, 'V'),
(0x1D1EB, 'X'),
(0x1D200, 'V'),
(0x1D246, 'X'),
(0x1D2C0, 'V'),
(0x1D2D4, 'X'),
(0x1D2E0, 'V'),
(0x1D2F4, 'X'),
(0x1D300, 'V'),
(0x1D357, 'X'),
(0x1D360, 'V'),
(0x1D379, 'X'),
(0x1D400, 'M', 'a'),
(0x1D401, 'M', 'b'),
(0x1D402, 'M', 'c'),
(0x1D403, 'M', 'd'),
(0x1D404, 'M', 'e'),
(0x1D405, 'M', 'f'),
(0x1D406, 'M', 'g'),
(0x1D407, 'M', 'h'),
(0x1D408, 'M', 'i'),
(0x1D409, 'M', 'j'),
(0x1D40A, 'M', 'k'),
(0x1D40B, 'M', 'l'),
(0x1D40C, 'M', 'm'),
(0x1D40D, 'M', 'n'),
(0x1D40E, 'M', 'o'),
(0x1D40F, 'M', 'p'),
(0x1D410, 'M', 'q'),
(0x1D411, 'M', 'r'),
(0x1D412, 'M', 's'),
(0x1D413, 'M', 't'),
(0x1D414, 'M', 'u'),
(0x1D415, 'M', 'v'),
(0x1D416, 'M', 'w'),
(0x1D417, 'M', 'x'),
(0x1D418, 'M', 'y'),
(0x1D419, 'M', 'z'),
(0x1D41A, 'M', 'a'),
(0x1D41B, 'M', 'b'),
(0x1D41C, 'M', 'c'),
(0x1D41D, 'M', 'd'),
(0x1D41E, 'M', 'e'),
(0x1D41F, 'M', 'f'),
(0x1D420, 'M', 'g'),
]
def _seg_61() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x1D421, 'M', 'h'),
(0x1D422, 'M', 'i'),
(0x1D423, 'M', 'j'),
(0x1D424, 'M', 'k'),
(0x1D425, 'M', 'l'),
(0x1D426, 'M', 'm'),
(0x1D427, 'M', 'n'),
(0x1D428, 'M', 'o'),
(0x1D429, 'M', 'p'),
(0x1D42A, 'M', 'q'),
(0x1D42B, 'M', 'r'),
(0x1D42C, 'M', 's'),
(0x1D42D, 'M', 't'),
(0x1D42E, 'M', 'u'),
(0x1D42F, 'M', 'v'),
(0x1D430, 'M', 'w'),
(0x1D431, 'M', 'x'),
(0x1D432, 'M', 'y'),
(0x1D433, 'M', 'z'),
(0x1D434, 'M', 'a'),
(0x1D435, 'M', 'b'),
(0x1D436, 'M', 'c'),
(0x1D437, 'M', 'd'),
(0x1D438, 'M', 'e'),
(0x1D439, 'M', 'f'),
(0x1D43A, 'M', 'g'),
(0x1D43B, 'M', 'h'),
(0x1D43C, 'M', 'i'),
(0x1D43D, 'M', 'j'),
(0x1D43E, 'M', 'k'),
(0x1D43F, 'M', 'l'),
(0x1D440, 'M', 'm'),
(0x1D441, 'M', 'n'),
(0x1D442, 'M', 'o'),
(0x1D443, 'M', 'p'),
(0x1D444, 'M', 'q'),
(0x1D445, 'M', 'r'),
(0x1D446, 'M', 's'),
(0x1D447, 'M', 't'),
(0x1D448, 'M', 'u'),
(0x1D449, 'M', 'v'),
(0x1D44A, 'M', 'w'),
(0x1D44B, 'M', 'x'),
(0x1D44C, 'M', 'y'),
(0x1D44D, 'M', 'z'),
(0x1D44E, 'M', 'a'),
(0x1D44F, 'M', 'b'),
(0x1D450, 'M', 'c'),
(0x1D451, 'M', 'd'),
(0x1D452, 'M', 'e'),
(0x1D453, 'M', 'f'),
(0x1D454, 'M', 'g'),
(0x1D455, 'X'),
(0x1D456, 'M', 'i'),
(0x1D457, 'M', 'j'),
(0x1D458, 'M', 'k'),
(0x1D459, 'M', 'l'),
(0x1D45A, 'M', 'm'),
(0x1D45B, 'M', 'n'),
(0x1D45C, 'M', 'o'),
(0x1D45D, 'M', 'p'),
(0x1D45E, 'M', 'q'),
(0x1D45F, 'M', 'r'),
(0x1D460, 'M', 's'),
(0x1D461, 'M', 't'),
(0x1D462, 'M', 'u'),
(0x1D463, 'M', 'v'),
(0x1D464, 'M', 'w'),
(0x1D465, 'M', 'x'),
(0x1D466, 'M', 'y'),
(0x1D467, 'M', 'z'),
(0x1D468, 'M', 'a'),
(0x1D469, 'M', 'b'),
(0x1D46A, 'M', 'c'),
(0x1D46B, 'M', 'd'),
(0x1D46C, 'M', 'e'),
(0x1D46D, 'M', 'f'),
(0x1D46E, 'M', 'g'),
(0x1D46F, 'M', 'h'),
(0x1D470, 'M', 'i'),
(0x1D471, 'M', 'j'),
(0x1D472, 'M', 'k'),
(0x1D473, 'M', 'l'),
(0x1D474, 'M', 'm'),
(0x1D475, 'M', 'n'),
(0x1D476, 'M', 'o'),
(0x1D477, 'M', 'p'),
(0x1D478, 'M', 'q'),
(0x1D479, 'M', 'r'),
(0x1D47A, 'M', 's'),
(0x1D47B, 'M', 't'),
(0x1D47C, 'M', 'u'),
(0x1D47D, 'M', 'v'),
(0x1D47E, 'M', 'w'),
(0x1D47F, 'M', 'x'),
(0x1D480, 'M', 'y'),
(0x1D481, 'M', 'z'),
(0x1D482, 'M', 'a'),
(0x1D483, 'M', 'b'),
(0x1D484, 'M', 'c'),
]
def _seg_62() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x1D485, 'M', 'd'),
(0x1D486, 'M', 'e'),
(0x1D487, 'M', 'f'),
(0x1D488, 'M', 'g'),
(0x1D489, 'M', 'h'),
(0x1D48A, 'M', 'i'),
(0x1D48B, 'M', 'j'),
(0x1D48C, 'M', 'k'),
(0x1D48D, 'M', 'l'),
(0x1D48E, 'M', 'm'),
(0x1D48F, 'M', 'n'),
(0x1D490, 'M', 'o'),
(0x1D491, 'M', 'p'),
(0x1D492, 'M', 'q'),
(0x1D493, 'M', 'r'),
(0x1D494, 'M', 's'),
(0x1D495, 'M', 't'),
(0x1D496, 'M', 'u'),
(0x1D497, 'M', 'v'),
(0x1D498, 'M', 'w'),
(0x1D499, 'M', 'x'),
(0x1D49A, 'M', 'y'),
(0x1D49B, 'M', 'z'),
(0x1D49C, 'M', 'a'),
(0x1D49D, 'X'),
(0x1D49E, 'M', 'c'),
(0x1D49F, 'M', 'd'),
(0x1D4A0, 'X'),
(0x1D4A2, 'M', 'g'),
(0x1D4A3, 'X'),
(0x1D4A5, 'M', 'j'),
(0x1D4A6, 'M', 'k'),
(0x1D4A7, 'X'),
(0x1D4A9, 'M', 'n'),
(0x1D4AA, 'M', 'o'),
(0x1D4AB, 'M', 'p'),
(0x1D4AC, 'M', 'q'),
(0x1D4AD, 'X'),
(0x1D4AE, 'M', 's'),
(0x1D4AF, 'M', 't'),
(0x1D4B0, 'M', 'u'),
(0x1D4B1, 'M', 'v'),
(0x1D4B2, 'M', 'w'),
(0x1D4B3, 'M', 'x'),
(0x1D4B4, 'M', 'y'),
(0x1D4B5, 'M', 'z'),
(0x1D4B6, 'M', 'a'),
(0x1D4B7, 'M', 'b'),
(0x1D4B8, 'M', 'c'),
(0x1D4B9, 'M', 'd'),
(0x1D4BA, 'X'),
(0x1D4BB, 'M', 'f'),
(0x1D4BC, 'X'),
(0x1D4BD, 'M', 'h'),
(0x1D4BE, 'M', 'i'),
(0x1D4BF, 'M', 'j'),
(0x1D4C0, 'M', 'k'),
(0x1D4C1, 'M', 'l'),
(0x1D4C2, 'M', 'm'),
(0x1D4C3, 'M', 'n'),
(0x1D4C4, 'X'),
(0x1D4C5, 'M', 'p'),
(0x1D4C6, 'M', 'q'),
(0x1D4C7, 'M', 'r'),
(0x1D4C8, 'M', 's'),
(0x1D4C9, 'M', 't'),
(0x1D4CA, 'M', 'u'),
(0x1D4CB, 'M', 'v'),
(0x1D4CC, 'M', 'w'),
(0x1D4CD, 'M', 'x'),
(0x1D4CE, 'M', 'y'),
(0x1D4CF, 'M', 'z'),
(0x1D4D0, 'M', 'a'),
(0x1D4D1, 'M', 'b'),
(0x1D4D2, 'M', 'c'),
(0x1D4D3, 'M', 'd'),
(0x1D4D4, 'M', 'e'),
(0x1D4D5, 'M', 'f'),
(0x1D4D6, 'M', 'g'),
(0x1D4D7, 'M', 'h'),
(0x1D4D8, 'M', 'i'),
(0x1D4D9, 'M', 'j'),
(0x1D4DA, 'M', 'k'),
(0x1D4DB, 'M', 'l'),
(0x1D4DC, 'M', 'm'),
(0x1D4DD, 'M', 'n'),
(0x1D4DE, 'M', 'o'),
(0x1D4DF, 'M', 'p'),
(0x1D4E0, 'M', 'q'),
(0x1D4E1, 'M', 'r'),
(0x1D4E2, 'M', 's'),
(0x1D4E3, 'M', 't'),
(0x1D4E4, 'M', 'u'),
(0x1D4E5, 'M', 'v'),
(0x1D4E6, 'M', 'w'),
(0x1D4E7, 'M', 'x'),
(0x1D4E8, 'M', 'y'),
(0x1D4E9, 'M', 'z'),
(0x1D4EA, 'M', 'a'),
(0x1D4EB, 'M', 'b'),
]
def _seg_63() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x1D4EC, 'M', 'c'),
(0x1D4ED, 'M', 'd'),
(0x1D4EE, 'M', 'e'),
(0x1D4EF, 'M', 'f'),
(0x1D4F0, 'M', 'g'),
(0x1D4F1, 'M', 'h'),
(0x1D4F2, 'M', 'i'),
(0x1D4F3, 'M', 'j'),
(0x1D4F4, 'M', 'k'),
(0x1D4F5, 'M', 'l'),
(0x1D4F6, 'M', 'm'),
(0x1D4F7, 'M', 'n'),
(0x1D4F8, 'M', 'o'),
(0x1D4F9, 'M', 'p'),
(0x1D4FA, 'M', 'q'),
(0x1D4FB, 'M', 'r'),
(0x1D4FC, 'M', 's'),
(0x1D4FD, 'M', 't'),
(0x1D4FE, 'M', 'u'),
(0x1D4FF, 'M', 'v'),
(0x1D500, 'M', 'w'),
(0x1D501, 'M', 'x'),
(0x1D502, 'M', 'y'),
(0x1D503, 'M', 'z'),
(0x1D504, 'M', 'a'),
(0x1D505, 'M', 'b'),
(0x1D506, 'X'),
(0x1D507, 'M', 'd'),
(0x1D508, 'M', 'e'),
(0x1D509, 'M', 'f'),
(0x1D50A, 'M', 'g'),
(0x1D50B, 'X'),
(0x1D50D, 'M', 'j'),
(0x1D50E, 'M', 'k'),
(0x1D50F, 'M', 'l'),
(0x1D510, 'M', 'm'),
(0x1D511, 'M', 'n'),
(0x1D512, 'M', 'o'),
(0x1D513, 'M', 'p'),
(0x1D514, 'M', 'q'),
(0x1D515, 'X'),
(0x1D516, 'M', 's'),
(0x1D517, 'M', 't'),
(0x1D518, 'M', 'u'),
(0x1D519, 'M', 'v'),
(0x1D51A, 'M', 'w'),
(0x1D51B, 'M', 'x'),
(0x1D51C, 'M', 'y'),
(0x1D51D, 'X'),
(0x1D51E, 'M', 'a'),
(0x1D51F, 'M', 'b'),
(0x1D520, 'M', 'c'),
(0x1D521, 'M', 'd'),
(0x1D522, 'M', 'e'),
(0x1D523, 'M', 'f'),
(0x1D524, 'M', 'g'),
(0x1D525, 'M', 'h'),
(0x1D526, 'M', 'i'),
(0x1D527, 'M', 'j'),
(0x1D528, 'M', 'k'),
(0x1D529, 'M', 'l'),
(0x1D52A, 'M', 'm'),
(0x1D52B, 'M', 'n'),
(0x1D52C, 'M', 'o'),
(0x1D52D, 'M', 'p'),
(0x1D52E, 'M', 'q'),
(0x1D52F, 'M', 'r'),
(0x1D530, 'M', 's'),
(0x1D531, 'M', 't'),
(0x1D532, 'M', 'u'),
(0x1D533, 'M', 'v'),
(0x1D534, 'M', 'w'),
(0x1D535, 'M', 'x'),
(0x1D536, 'M', 'y'),
(0x1D537, 'M', 'z'),
(0x1D538, 'M', 'a'),
(0x1D539, 'M', 'b'),
(0x1D53A, 'X'),
(0x1D53B, 'M', 'd'),
(0x1D53C, 'M', 'e'),
(0x1D53D, 'M', 'f'),
(0x1D53E, 'M', 'g'),
(0x1D53F, 'X'),
(0x1D540, 'M', 'i'),
(0x1D541, 'M', 'j'),
(0x1D542, 'M', 'k'),
(0x1D543, 'M', 'l'),
(0x1D544, 'M', 'm'),
(0x1D545, 'X'),
(0x1D546, 'M', 'o'),
(0x1D547, 'X'),
(0x1D54A, 'M', 's'),
(0x1D54B, 'M', 't'),
(0x1D54C, 'M', 'u'),
(0x1D54D, 'M', 'v'),
(0x1D54E, 'M', 'w'),
(0x1D54F, 'M', 'x'),
(0x1D550, 'M', 'y'),
(0x1D551, 'X'),
(0x1D552, 'M', 'a'),
]
def _seg_64() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x1D553, 'M', 'b'),
(0x1D554, 'M', 'c'),
(0x1D555, 'M', 'd'),
(0x1D556, 'M', 'e'),
(0x1D557, 'M', 'f'),
(0x1D558, 'M', 'g'),
(0x1D559, 'M', 'h'),
(0x1D55A, 'M', 'i'),
(0x1D55B, 'M', 'j'),
(0x1D55C, 'M', 'k'),
(0x1D55D, 'M', 'l'),
(0x1D55E, 'M', 'm'),
(0x1D55F, 'M', 'n'),
(0x1D560, 'M', 'o'),
(0x1D561, 'M', 'p'),
(0x1D562, 'M', 'q'),
(0x1D563, 'M', 'r'),
(0x1D564, 'M', 's'),
(0x1D565, 'M', 't'),
(0x1D566, 'M', 'u'),
(0x1D567, 'M', 'v'),
(0x1D568, 'M', 'w'),
(0x1D569, 'M', 'x'),
(0x1D56A, 'M', 'y'),
(0x1D56B, 'M', 'z'),
(0x1D56C, 'M', 'a'),
(0x1D56D, 'M', 'b'),
(0x1D56E, 'M', 'c'),
(0x1D56F, 'M', 'd'),
(0x1D570, 'M', 'e'),
(0x1D571, 'M', 'f'),
(0x1D572, 'M', 'g'),
(0x1D573, 'M', 'h'),
(0x1D574, 'M', 'i'),
(0x1D575, 'M', 'j'),
(0x1D576, 'M', 'k'),
(0x1D577, 'M', 'l'),
(0x1D578, 'M', 'm'),
(0x1D579, 'M', 'n'),
(0x1D57A, 'M', 'o'),
(0x1D57B, 'M', 'p'),
(0x1D57C, 'M', 'q'),
(0x1D57D, 'M', 'r'),
(0x1D57E, 'M', 's'),
(0x1D57F, 'M', 't'),
(0x1D580, 'M', 'u'),
(0x1D581, 'M', 'v'),
(0x1D582, 'M', 'w'),
(0x1D583, 'M', 'x'),
(0x1D584, 'M', 'y'),
(0x1D585, 'M', 'z'),
(0x1D586, 'M', 'a'),
(0x1D587, 'M', 'b'),
(0x1D588, 'M', 'c'),
(0x1D589, 'M', 'd'),
(0x1D58A, 'M', 'e'),
(0x1D58B, 'M', 'f'),
(0x1D58C, 'M', 'g'),
(0x1D58D, 'M', 'h'),
(0x1D58E, 'M', 'i'),
(0x1D58F, 'M', 'j'),
(0x1D590, 'M', 'k'),
(0x1D591, 'M', 'l'),
(0x1D592, 'M', 'm'),
(0x1D593, 'M', 'n'),
(0x1D594, 'M', 'o'),
(0x1D595, 'M', 'p'),
(0x1D596, 'M', 'q'),
(0x1D597, 'M', 'r'),
(0x1D598, 'M', 's'),
(0x1D599, 'M', 't'),
(0x1D59A, 'M', 'u'),
(0x1D59B, 'M', 'v'),
(0x1D59C, 'M', 'w'),
(0x1D59D, 'M', 'x'),
(0x1D59E, 'M', 'y'),
(0x1D59F, 'M', 'z'),
(0x1D5A0, 'M', 'a'),
(0x1D5A1, 'M', 'b'),
(0x1D5A2, 'M', 'c'),
(0x1D5A3, 'M', 'd'),
(0x1D5A4, 'M', 'e'),
(0x1D5A5, 'M', 'f'),
(0x1D5A6, 'M', 'g'),
(0x1D5A7, 'M', 'h'),
(0x1D5A8, 'M', 'i'),
(0x1D5A9, 'M', 'j'),
(0x1D5AA, 'M', 'k'),
(0x1D5AB, 'M', 'l'),
(0x1D5AC, 'M', 'm'),
(0x1D5AD, 'M', 'n'),
(0x1D5AE, 'M', 'o'),
(0x1D5AF, 'M', 'p'),
(0x1D5B0, 'M', 'q'),
(0x1D5B1, 'M', 'r'),
(0x1D5B2, 'M', 's'),
(0x1D5B3, 'M', 't'),
(0x1D5B4, 'M', 'u'),
(0x1D5B5, 'M', 'v'),
(0x1D5B6, 'M', 'w'),
]
def _seg_65() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x1D5B7, 'M', 'x'),
(0x1D5B8, 'M', 'y'),
(0x1D5B9, 'M', 'z'),
(0x1D5BA, 'M', 'a'),
(0x1D5BB, 'M', 'b'),
(0x1D5BC, 'M', 'c'),
(0x1D5BD, 'M', 'd'),
(0x1D5BE, 'M', 'e'),
(0x1D5BF, 'M', 'f'),
(0x1D5C0, 'M', 'g'),
(0x1D5C1, 'M', 'h'),
(0x1D5C2, 'M', 'i'),
(0x1D5C3, 'M', 'j'),
(0x1D5C4, 'M', 'k'),
(0x1D5C5, 'M', 'l'),
(0x1D5C6, 'M', 'm'),
(0x1D5C7, 'M', 'n'),
(0x1D5C8, 'M', 'o'),
(0x1D5C9, 'M', 'p'),
(0x1D5CA, 'M', 'q'),
(0x1D5CB, 'M', 'r'),
(0x1D5CC, 'M', 's'),
(0x1D5CD, 'M', 't'),
(0x1D5CE, 'M', 'u'),
(0x1D5CF, 'M', 'v'),
(0x1D5D0, 'M', 'w'),
(0x1D5D1, 'M', 'x'),
(0x1D5D2, 'M', 'y'),
(0x1D5D3, 'M', 'z'),
(0x1D5D4, 'M', 'a'),
(0x1D5D5, 'M', 'b'),
(0x1D5D6, 'M', 'c'),
(0x1D5D7, 'M', 'd'),
(0x1D5D8, 'M', 'e'),
(0x1D5D9, 'M', 'f'),
(0x1D5DA, 'M', 'g'),
(0x1D5DB, 'M', 'h'),
(0x1D5DC, 'M', 'i'),
(0x1D5DD, 'M', 'j'),
(0x1D5DE, 'M', 'k'),
(0x1D5DF, 'M', 'l'),
(0x1D5E0, 'M', 'm'),
(0x1D5E1, 'M', 'n'),
(0x1D5E2, 'M', 'o'),
(0x1D5E3, 'M', 'p'),
(0x1D5E4, 'M', 'q'),
(0x1D5E5, 'M', 'r'),
(0x1D5E6, 'M', 's'),
(0x1D5E7, 'M', 't'),
(0x1D5E8, 'M', 'u'),
(0x1D5E9, 'M', 'v'),
(0x1D5EA, 'M', 'w'),
(0x1D5EB, 'M', 'x'),
(0x1D5EC, 'M', 'y'),
(0x1D5ED, 'M', 'z'),
(0x1D5EE, 'M', 'a'),
(0x1D5EF, 'M', 'b'),
(0x1D5F0, 'M', 'c'),
(0x1D5F1, 'M', 'd'),
(0x1D5F2, 'M', 'e'),
(0x1D5F3, 'M', 'f'),
(0x1D5F4, 'M', 'g'),
(0x1D5F5, 'M', 'h'),
(0x1D5F6, 'M', 'i'),
(0x1D5F7, 'M', 'j'),
(0x1D5F8, 'M', 'k'),
(0x1D5F9, 'M', 'l'),
(0x1D5FA, 'M', 'm'),
(0x1D5FB, 'M', 'n'),
(0x1D5FC, 'M', 'o'),
(0x1D5FD, 'M', 'p'),
(0x1D5FE, 'M', 'q'),
(0x1D5FF, 'M', 'r'),
(0x1D600, 'M', 's'),
(0x1D601, 'M', 't'),
(0x1D602, 'M', 'u'),
(0x1D603, 'M', 'v'),
(0x1D604, 'M', 'w'),
(0x1D605, 'M', 'x'),
(0x1D606, 'M', 'y'),
(0x1D607, 'M', 'z'),
(0x1D608, 'M', 'a'),
(0x1D609, 'M', 'b'),
(0x1D60A, 'M', 'c'),
(0x1D60B, 'M', 'd'),
(0x1D60C, 'M', 'e'),
(0x1D60D, 'M', 'f'),
(0x1D60E, 'M', 'g'),
(0x1D60F, 'M', 'h'),
(0x1D610, 'M', 'i'),
(0x1D611, 'M', 'j'),
(0x1D612, 'M', 'k'),
(0x1D613, 'M', 'l'),
(0x1D614, 'M', 'm'),
(0x1D615, 'M', 'n'),
(0x1D616, 'M', 'o'),
(0x1D617, 'M', 'p'),
(0x1D618, 'M', 'q'),
(0x1D619, 'M', 'r'),
(0x1D61A, 'M', 's'),
]
def _seg_66() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x1D61B, 'M', 't'),
(0x1D61C, 'M', 'u'),
(0x1D61D, 'M', 'v'),
(0x1D61E, 'M', 'w'),
(0x1D61F, 'M', 'x'),
(0x1D620, 'M', 'y'),
(0x1D621, 'M', 'z'),
(0x1D622, 'M', 'a'),
(0x1D623, 'M', 'b'),
(0x1D624, 'M', 'c'),
(0x1D625, 'M', 'd'),
(0x1D626, 'M', 'e'),
(0x1D627, 'M', 'f'),
(0x1D628, 'M', 'g'),
(0x1D629, 'M', 'h'),
(0x1D62A, 'M', 'i'),
(0x1D62B, 'M', 'j'),
(0x1D62C, 'M', 'k'),
(0x1D62D, 'M', 'l'),
(0x1D62E, 'M', 'm'),
(0x1D62F, 'M', 'n'),
(0x1D630, 'M', 'o'),
(0x1D631, 'M', 'p'),
(0x1D632, 'M', 'q'),
(0x1D633, 'M', 'r'),
(0x1D634, 'M', 's'),
(0x1D635, 'M', 't'),
(0x1D636, 'M', 'u'),
(0x1D637, 'M', 'v'),
(0x1D638, 'M', 'w'),
(0x1D639, 'M', 'x'),
(0x1D63A, 'M', 'y'),
(0x1D63B, 'M', 'z'),
(0x1D63C, 'M', 'a'),
(0x1D63D, 'M', 'b'),
(0x1D63E, 'M', 'c'),
(0x1D63F, 'M', 'd'),
(0x1D640, 'M', 'e'),
(0x1D641, 'M', 'f'),
(0x1D642, 'M', 'g'),
(0x1D643, 'M', 'h'),
(0x1D644, 'M', 'i'),
(0x1D645, 'M', 'j'),
(0x1D646, 'M', 'k'),
(0x1D647, 'M', 'l'),
(0x1D648, 'M', 'm'),
(0x1D649, 'M', 'n'),
(0x1D64A, 'M', 'o'),
(0x1D64B, 'M', 'p'),
(0x1D64C, 'M', 'q'),
(0x1D64D, 'M', 'r'),
(0x1D64E, 'M', 's'),
(0x1D64F, 'M', 't'),
(0x1D650, 'M', 'u'),
(0x1D651, 'M', 'v'),
(0x1D652, 'M', 'w'),
(0x1D653, 'M', 'x'),
(0x1D654, 'M', 'y'),
(0x1D655, 'M', 'z'),
(0x1D656, 'M', 'a'),
(0x1D657, 'M', 'b'),
(0x1D658, 'M', 'c'),
(0x1D659, 'M', 'd'),
(0x1D65A, 'M', 'e'),
(0x1D65B, 'M', 'f'),
(0x1D65C, 'M', 'g'),
(0x1D65D, 'M', 'h'),
(0x1D65E, 'M', 'i'),
(0x1D65F, 'M', 'j'),
(0x1D660, 'M', 'k'),
(0x1D661, 'M', 'l'),
(0x1D662, 'M', 'm'),
(0x1D663, 'M', 'n'),
(0x1D664, 'M', 'o'),
(0x1D665, 'M', 'p'),
(0x1D666, 'M', 'q'),
(0x1D667, 'M', 'r'),
(0x1D668, 'M', 's'),
(0x1D669, 'M', 't'),
(0x1D66A, 'M', 'u'),
(0x1D66B, 'M', 'v'),
(0x1D66C, 'M', 'w'),
(0x1D66D, 'M', 'x'),
(0x1D66E, 'M', 'y'),
(0x1D66F, 'M', 'z'),
(0x1D670, 'M', 'a'),
(0x1D671, 'M', 'b'),
(0x1D672, 'M', 'c'),
(0x1D673, 'M', 'd'),
(0x1D674, 'M', 'e'),
(0x1D675, 'M', 'f'),
(0x1D676, 'M', 'g'),
(0x1D677, 'M', 'h'),
(0x1D678, 'M', 'i'),
(0x1D679, 'M', 'j'),
(0x1D67A, 'M', 'k'),
(0x1D67B, 'M', 'l'),
(0x1D67C, 'M', 'm'),
(0x1D67D, 'M', 'n'),
(0x1D67E, 'M', 'o'),
]
def _seg_67() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x1D67F, 'M', 'p'),
(0x1D680, 'M', 'q'),
(0x1D681, 'M', 'r'),
(0x1D682, 'M', 's'),
(0x1D683, 'M', 't'),
(0x1D684, 'M', 'u'),
(0x1D685, 'M', 'v'),
(0x1D686, 'M', 'w'),
(0x1D687, 'M', 'x'),
(0x1D688, 'M', 'y'),
(0x1D689, 'M', 'z'),
(0x1D68A, 'M', 'a'),
(0x1D68B, 'M', 'b'),
(0x1D68C, 'M', 'c'),
(0x1D68D, 'M', 'd'),
(0x1D68E, 'M', 'e'),
(0x1D68F, 'M', 'f'),
(0x1D690, 'M', 'g'),
(0x1D691, 'M', 'h'),
(0x1D692, 'M', 'i'),
(0x1D693, 'M', 'j'),
(0x1D694, 'M', 'k'),
(0x1D695, 'M', 'l'),
(0x1D696, 'M', 'm'),
(0x1D697, 'M', 'n'),
(0x1D698, 'M', 'o'),
(0x1D699, 'M', 'p'),
(0x1D69A, 'M', 'q'),
(0x1D69B, 'M', 'r'),
(0x1D69C, 'M', 's'),
(0x1D69D, 'M', 't'),
(0x1D69E, 'M', 'u'),
(0x1D69F, 'M', 'v'),
(0x1D6A0, 'M', 'w'),
(0x1D6A1, 'M', 'x'),
(0x1D6A2, 'M', 'y'),
(0x1D6A3, 'M', 'z'),
(0x1D6A4, 'M', 'ı'),
(0x1D6A5, 'M', 'ȷ'),
(0x1D6A6, 'X'),
(0x1D6A8, 'M', 'α'),
(0x1D6A9, 'M', 'β'),
(0x1D6AA, 'M', 'γ'),
(0x1D6AB, 'M', 'δ'),
(0x1D6AC, 'M', 'ε'),
(0x1D6AD, 'M', 'ζ'),
(0x1D6AE, 'M', 'η'),
(0x1D6AF, 'M', 'θ'),
(0x1D6B0, 'M', 'ι'),
(0x1D6B1, 'M', 'κ'),
(0x1D6B2, 'M', 'λ'),
(0x1D6B3, 'M', 'μ'),
(0x1D6B4, 'M', 'ν'),
(0x1D6B5, 'M', 'ξ'),
(0x1D6B6, 'M', 'ο'),
(0x1D6B7, 'M', 'π'),
(0x1D6B8, 'M', 'ρ'),
(0x1D6B9, 'M', 'θ'),
(0x1D6BA, 'M', 'σ'),
(0x1D6BB, 'M', 'τ'),
(0x1D6BC, 'M', 'υ'),
(0x1D6BD, 'M', 'φ'),
(0x1D6BE, 'M', 'χ'),
(0x1D6BF, 'M', 'ψ'),
(0x1D6C0, 'M', 'ω'),
(0x1D6C1, 'M', '∇'),
(0x1D6C2, 'M', 'α'),
(0x1D6C3, 'M', 'β'),
(0x1D6C4, 'M', 'γ'),
(0x1D6C5, 'M', 'δ'),
(0x1D6C6, 'M', 'ε'),
(0x1D6C7, 'M', 'ζ'),
(0x1D6C8, 'M', 'η'),
(0x1D6C9, 'M', 'θ'),
(0x1D6CA, 'M', 'ι'),
(0x1D6CB, 'M', 'κ'),
(0x1D6CC, 'M', 'λ'),
(0x1D6CD, 'M', 'μ'),
(0x1D6CE, 'M', 'ν'),
(0x1D6CF, 'M', 'ξ'),
(0x1D6D0, 'M', 'ο'),
(0x1D6D1, 'M', 'π'),
(0x1D6D2, 'M', 'ρ'),
(0x1D6D3, 'M', 'σ'),
(0x1D6D5, 'M', 'τ'),
(0x1D6D6, 'M', 'υ'),
(0x1D6D7, 'M', 'φ'),
(0x1D6D8, 'M', 'χ'),
(0x1D6D9, 'M', 'ψ'),
(0x1D6DA, 'M', 'ω'),
(0x1D6DB, 'M', '∂'),
(0x1D6DC, 'M', 'ε'),
(0x1D6DD, 'M', 'θ'),
(0x1D6DE, 'M', 'κ'),
(0x1D6DF, 'M', 'φ'),
(0x1D6E0, 'M', 'ρ'),
(0x1D6E1, 'M', 'π'),
(0x1D6E2, 'M', 'α'),
(0x1D6E3, 'M', 'β'),
(0x1D6E4, 'M', 'γ'),
]
def _seg_68() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x1D6E5, 'M', 'δ'),
(0x1D6E6, 'M', 'ε'),
(0x1D6E7, 'M', 'ζ'),
(0x1D6E8, 'M', 'η'),
(0x1D6E9, 'M', 'θ'),
(0x1D6EA, 'M', 'ι'),
(0x1D6EB, 'M', 'κ'),
(0x1D6EC, 'M', 'λ'),
(0x1D6ED, 'M', 'μ'),
(0x1D6EE, 'M', 'ν'),
(0x1D6EF, 'M', 'ξ'),
(0x1D6F0, 'M', 'ο'),
(0x1D6F1, 'M', 'π'),
(0x1D6F2, 'M', 'ρ'),
(0x1D6F3, 'M', 'θ'),
(0x1D6F4, 'M', 'σ'),
(0x1D6F5, 'M', 'τ'),
(0x1D6F6, 'M', 'υ'),
(0x1D6F7, 'M', 'φ'),
(0x1D6F8, 'M', 'χ'),
(0x1D6F9, 'M', 'ψ'),
(0x1D6FA, 'M', 'ω'),
(0x1D6FB, 'M', '∇'),
(0x1D6FC, 'M', 'α'),
(0x1D6FD, 'M', 'β'),
(0x1D6FE, 'M', 'γ'),
(0x1D6FF, 'M', 'δ'),
(0x1D700, 'M', 'ε'),
(0x1D701, 'M', 'ζ'),
(0x1D702, 'M', 'η'),
(0x1D703, 'M', 'θ'),
(0x1D704, 'M', 'ι'),
(0x1D705, 'M', 'κ'),
(0x1D706, 'M', 'λ'),
(0x1D707, 'M', 'μ'),
(0x1D708, 'M', 'ν'),
(0x1D709, 'M', 'ξ'),
(0x1D70A, 'M', 'ο'),
(0x1D70B, 'M', 'π'),
(0x1D70C, 'M', 'ρ'),
(0x1D70D, 'M', 'σ'),
(0x1D70F, 'M', 'τ'),
(0x1D710, 'M', 'υ'),
(0x1D711, 'M', 'φ'),
(0x1D712, 'M', 'χ'),
(0x1D713, 'M', 'ψ'),
(0x1D714, 'M', 'ω'),
(0x1D715, 'M', '∂'),
(0x1D716, 'M', 'ε'),
(0x1D717, 'M', 'θ'),
(0x1D718, 'M', 'κ'),
(0x1D719, 'M', 'φ'),
(0x1D71A, 'M', 'ρ'),
(0x1D71B, 'M', 'π'),
(0x1D71C, 'M', 'α'),
(0x1D71D, 'M', 'β'),
(0x1D71E, 'M', 'γ'),
(0x1D71F, 'M', 'δ'),
(0x1D720, 'M', 'ε'),
(0x1D721, 'M', 'ζ'),
(0x1D722, 'M', 'η'),
(0x1D723, 'M', 'θ'),
(0x1D724, 'M', 'ι'),
(0x1D725, 'M', 'κ'),
(0x1D726, 'M', 'λ'),
(0x1D727, 'M', 'μ'),
(0x1D728, 'M', 'ν'),
(0x1D729, 'M', 'ξ'),
(0x1D72A, 'M', 'ο'),
(0x1D72B, 'M', 'π'),
(0x1D72C, 'M', 'ρ'),
(0x1D72D, 'M', 'θ'),
(0x1D72E, 'M', 'σ'),
(0x1D72F, 'M', 'τ'),
(0x1D730, 'M', 'υ'),
(0x1D731, 'M', 'φ'),
(0x1D732, 'M', 'χ'),
(0x1D733, 'M', 'ψ'),
(0x1D734, 'M', 'ω'),
(0x1D735, 'M', '∇'),
(0x1D736, 'M', 'α'),
(0x1D737, 'M', 'β'),
(0x1D738, 'M', 'γ'),
(0x1D739, 'M', 'δ'),
(0x1D73A, 'M', 'ε'),
(0x1D73B, 'M', 'ζ'),
(0x1D73C, 'M', 'η'),
(0x1D73D, 'M', 'θ'),
(0x1D73E, 'M', 'ι'),
(0x1D73F, 'M', 'κ'),
(0x1D740, 'M', 'λ'),
(0x1D741, 'M', 'μ'),
(0x1D742, 'M', 'ν'),
(0x1D743, 'M', 'ξ'),
(0x1D744, 'M', 'ο'),
(0x1D745, 'M', 'π'),
(0x1D746, 'M', 'ρ'),
(0x1D747, 'M', 'σ'),
(0x1D749, 'M', 'τ'),
(0x1D74A, 'M', 'υ'),
]
def _seg_69() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x1D74B, 'M', 'φ'),
(0x1D74C, 'M', 'χ'),
(0x1D74D, 'M', 'ψ'),
(0x1D74E, 'M', 'ω'),
(0x1D74F, 'M', '∂'),
(0x1D750, 'M', 'ε'),
(0x1D751, 'M', 'θ'),
(0x1D752, 'M', 'κ'),
(0x1D753, 'M', 'φ'),
(0x1D754, 'M', 'ρ'),
(0x1D755, 'M', 'π'),
(0x1D756, 'M', 'α'),
(0x1D757, 'M', 'β'),
(0x1D758, 'M', 'γ'),
(0x1D759, 'M', 'δ'),
(0x1D75A, 'M', 'ε'),
(0x1D75B, 'M', 'ζ'),
(0x1D75C, 'M', 'η'),
(0x1D75D, 'M', 'θ'),
(0x1D75E, 'M', 'ι'),
(0x1D75F, 'M', 'κ'),
(0x1D760, 'M', 'λ'),
(0x1D761, 'M', 'μ'),
(0x1D762, 'M', 'ν'),
(0x1D763, 'M', 'ξ'),
(0x1D764, 'M', 'ο'),
(0x1D765, 'M', 'π'),
(0x1D766, 'M', 'ρ'),
(0x1D767, 'M', 'θ'),
(0x1D768, 'M', 'σ'),
(0x1D769, 'M', 'τ'),
(0x1D76A, 'M', 'υ'),
(0x1D76B, 'M', 'φ'),
(0x1D76C, 'M', 'χ'),
(0x1D76D, 'M', 'ψ'),
(0x1D76E, 'M', 'ω'),
(0x1D76F, 'M', '∇'),
(0x1D770, 'M', 'α'),
(0x1D771, 'M', 'β'),
(0x1D772, 'M', 'γ'),
(0x1D773, 'M', 'δ'),
(0x1D774, 'M', 'ε'),
(0x1D775, 'M', 'ζ'),
(0x1D776, 'M', 'η'),
(0x1D777, 'M', 'θ'),
(0x1D778, 'M', 'ι'),
(0x1D779, 'M', 'κ'),
(0x1D77A, 'M', 'λ'),
(0x1D77B, 'M', 'μ'),
(0x1D77C, 'M', 'ν'),
(0x1D77D, 'M', 'ξ'),
(0x1D77E, 'M', 'ο'),
(0x1D77F, 'M', 'π'),
(0x1D780, 'M', 'ρ'),
(0x1D781, 'M', 'σ'),
(0x1D783, 'M', 'τ'),
(0x1D784, 'M', 'υ'),
(0x1D785, 'M', 'φ'),
(0x1D786, 'M', 'χ'),
(0x1D787, 'M', 'ψ'),
(0x1D788, 'M', 'ω'),
(0x1D789, 'M', '∂'),
(0x1D78A, 'M', 'ε'),
(0x1D78B, 'M', 'θ'),
(0x1D78C, 'M', 'κ'),
(0x1D78D, 'M', 'φ'),
(0x1D78E, 'M', 'ρ'),
(0x1D78F, 'M', 'π'),
(0x1D790, 'M', 'α'),
(0x1D791, 'M', 'β'),
(0x1D792, 'M', 'γ'),
(0x1D793, 'M', 'δ'),
(0x1D794, 'M', 'ε'),
(0x1D795, 'M', 'ζ'),
(0x1D796, 'M', 'η'),
(0x1D797, 'M', 'θ'),
(0x1D798, 'M', 'ι'),
(0x1D799, 'M', 'κ'),
(0x1D79A, 'M', 'λ'),
(0x1D79B, 'M', 'μ'),
(0x1D79C, 'M', 'ν'),
(0x1D79D, 'M', 'ξ'),
(0x1D79E, 'M', 'ο'),
(0x1D79F, 'M', 'π'),
(0x1D7A0, 'M', 'ρ'),
(0x1D7A1, 'M', 'θ'),
(0x1D7A2, 'M', 'σ'),
(0x1D7A3, 'M', 'τ'),
(0x1D7A4, 'M', 'υ'),
(0x1D7A5, 'M', 'φ'),
(0x1D7A6, 'M', 'χ'),
(0x1D7A7, 'M', 'ψ'),
(0x1D7A8, 'M', 'ω'),
(0x1D7A9, 'M', '∇'),
(0x1D7AA, 'M', 'α'),
(0x1D7AB, 'M', 'β'),
(0x1D7AC, 'M', 'γ'),
(0x1D7AD, 'M', 'δ'),
(0x1D7AE, 'M', 'ε'),
(0x1D7AF, 'M', 'ζ'),
]
def _seg_70() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x1D7B0, 'M', 'η'),
(0x1D7B1, 'M', 'θ'),
(0x1D7B2, 'M', 'ι'),
(0x1D7B3, 'M', 'κ'),
(0x1D7B4, 'M', 'λ'),
(0x1D7B5, 'M', 'μ'),
(0x1D7B6, 'M', 'ν'),
(0x1D7B7, 'M', 'ξ'),
(0x1D7B8, 'M', 'ο'),
(0x1D7B9, 'M', 'π'),
(0x1D7BA, 'M', 'ρ'),
(0x1D7BB, 'M', 'σ'),
(0x1D7BD, 'M', 'τ'),
(0x1D7BE, 'M', 'υ'),
(0x1D7BF, 'M', 'φ'),
(0x1D7C0, 'M', 'χ'),
(0x1D7C1, 'M', 'ψ'),
(0x1D7C2, 'M', 'ω'),
(0x1D7C3, 'M', '∂'),
(0x1D7C4, 'M', 'ε'),
(0x1D7C5, 'M', 'θ'),
(0x1D7C6, 'M', 'κ'),
(0x1D7C7, 'M', 'φ'),
(0x1D7C8, 'M', 'ρ'),
(0x1D7C9, 'M', 'π'),
(0x1D7CA, 'M', 'ϝ'),
(0x1D7CC, 'X'),
(0x1D7CE, 'M', '0'),
(0x1D7CF, 'M', '1'),
(0x1D7D0, 'M', '2'),
(0x1D7D1, 'M', '3'),
(0x1D7D2, 'M', '4'),
(0x1D7D3, 'M', '5'),
(0x1D7D4, 'M', '6'),
(0x1D7D5, 'M', '7'),
(0x1D7D6, 'M', '8'),
(0x1D7D7, 'M', '9'),
(0x1D7D8, 'M', '0'),
(0x1D7D9, 'M', '1'),
(0x1D7DA, 'M', '2'),
(0x1D7DB, 'M', '3'),
(0x1D7DC, 'M', '4'),
(0x1D7DD, 'M', '5'),
(0x1D7DE, 'M', '6'),
(0x1D7DF, 'M', '7'),
(0x1D7E0, 'M', '8'),
(0x1D7E1, 'M', '9'),
(0x1D7E2, 'M', '0'),
(0x1D7E3, 'M', '1'),
(0x1D7E4, 'M', '2'),
(0x1D7E5, 'M', '3'),
(0x1D7E6, 'M', '4'),
(0x1D7E7, 'M', '5'),
(0x1D7E8, 'M', '6'),
(0x1D7E9, 'M', '7'),
(0x1D7EA, 'M', '8'),
(0x1D7EB, 'M', '9'),
(0x1D7EC, 'M', '0'),
(0x1D7ED, 'M', '1'),
(0x1D7EE, 'M', '2'),
(0x1D7EF, 'M', '3'),
(0x1D7F0, 'M', '4'),
(0x1D7F1, 'M', '5'),
(0x1D7F2, 'M', '6'),
(0x1D7F3, 'M', '7'),
(0x1D7F4, 'M', '8'),
(0x1D7F5, 'M', '9'),
(0x1D7F6, 'M', '0'),
(0x1D7F7, 'M', '1'),
(0x1D7F8, 'M', '2'),
(0x1D7F9, 'M', '3'),
(0x1D7FA, 'M', '4'),
(0x1D7FB, 'M', '5'),
(0x1D7FC, 'M', '6'),
(0x1D7FD, 'M', '7'),
(0x1D7FE, 'M', '8'),
(0x1D7FF, 'M', '9'),
(0x1D800, 'V'),
(0x1DA8C, 'X'),
(0x1DA9B, 'V'),
(0x1DAA0, 'X'),
(0x1DAA1, 'V'),
(0x1DAB0, 'X'),
(0x1DF00, 'V'),
(0x1DF1F, 'X'),
(0x1DF25, 'V'),
(0x1DF2B, 'X'),
(0x1E000, 'V'),
(0x1E007, 'X'),
(0x1E008, 'V'),
(0x1E019, 'X'),
(0x1E01B, 'V'),
(0x1E022, 'X'),
(0x1E023, 'V'),
(0x1E025, 'X'),
(0x1E026, 'V'),
(0x1E02B, 'X'),
(0x1E030, 'M', 'а'),
(0x1E031, 'M', 'б'),
(0x1E032, 'M', 'в'),
]
def _seg_71() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x1E033, 'M', 'г'),
(0x1E034, 'M', 'д'),
(0x1E035, 'M', 'е'),
(0x1E036, 'M', 'ж'),
(0x1E037, 'M', 'з'),
(0x1E038, 'M', 'и'),
(0x1E039, 'M', 'к'),
(0x1E03A, 'M', 'л'),
(0x1E03B, 'M', 'м'),
(0x1E03C, 'M', 'о'),
(0x1E03D, 'M', 'п'),
(0x1E03E, 'M', 'р'),
(0x1E03F, 'M', 'с'),
(0x1E040, 'M', 'т'),
(0x1E041, 'M', 'у'),
(0x1E042, 'M', 'ф'),
(0x1E043, 'M', 'х'),
(0x1E044, 'M', 'ц'),
(0x1E045, 'M', 'ч'),
(0x1E046, 'M', 'ш'),
(0x1E047, 'M', 'ы'),
(0x1E048, 'M', 'э'),
(0x1E049, 'M', 'ю'),
(0x1E04A, 'M', 'ꚉ'),
(0x1E04B, 'M', 'ә'),
(0x1E04C, 'M', 'і'),
(0x1E04D, 'M', 'ј'),
(0x1E04E, 'M', 'ө'),
(0x1E04F, 'M', 'ү'),
(0x1E050, 'M', 'ӏ'),
(0x1E051, 'M', 'а'),
(0x1E052, 'M', 'б'),
(0x1E053, 'M', 'в'),
(0x1E054, 'M', 'г'),
(0x1E055, 'M', 'д'),
(0x1E056, 'M', 'е'),
(0x1E057, 'M', 'ж'),
(0x1E058, 'M', 'з'),
(0x1E059, 'M', 'и'),
(0x1E05A, 'M', 'к'),
(0x1E05B, 'M', 'л'),
(0x1E05C, 'M', 'о'),
(0x1E05D, 'M', 'п'),
(0x1E05E, 'M', 'с'),
(0x1E05F, 'M', 'у'),
(0x1E060, 'M', 'ф'),
(0x1E061, 'M', 'х'),
(0x1E062, 'M', 'ц'),
(0x1E063, 'M', 'ч'),
(0x1E064, 'M', 'ш'),
(0x1E065, 'M', 'ъ'),
(0x1E066, 'M', 'ы'),
(0x1E067, 'M', 'ґ'),
(0x1E068, 'M', 'і'),
(0x1E069, 'M', 'ѕ'),
(0x1E06A, 'M', 'џ'),
(0x1E06B, 'M', 'ҫ'),
(0x1E06C, 'M', 'ꙑ'),
(0x1E06D, 'M', 'ұ'),
(0x1E06E, 'X'),
(0x1E08F, 'V'),
(0x1E090, 'X'),
(0x1E100, 'V'),
(0x1E12D, 'X'),
(0x1E130, 'V'),
(0x1E13E, 'X'),
(0x1E140, 'V'),
(0x1E14A, 'X'),
(0x1E14E, 'V'),
(0x1E150, 'X'),
(0x1E290, 'V'),
(0x1E2AF, 'X'),
(0x1E2C0, 'V'),
(0x1E2FA, 'X'),
(0x1E2FF, 'V'),
(0x1E300, 'X'),
(0x1E4D0, 'V'),
(0x1E4FA, 'X'),
(0x1E7E0, 'V'),
(0x1E7E7, 'X'),
(0x1E7E8, 'V'),
(0x1E7EC, 'X'),
(0x1E7ED, 'V'),
(0x1E7EF, 'X'),
(0x1E7F0, 'V'),
(0x1E7FF, 'X'),
(0x1E800, 'V'),
(0x1E8C5, 'X'),
(0x1E8C7, 'V'),
(0x1E8D7, 'X'),
(0x1E900, 'M', '𞤢'),
(0x1E901, 'M', '𞤣'),
(0x1E902, 'M', '𞤤'),
(0x1E903, 'M', '𞤥'),
(0x1E904, 'M', '𞤦'),
(0x1E905, 'M', '𞤧'),
(0x1E906, 'M', '𞤨'),
(0x1E907, 'M', '𞤩'),
(0x1E908, 'M', '𞤪'),
(0x1E909, 'M', '𞤫'),
]
def _seg_72() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x1E90A, 'M', '𞤬'),
(0x1E90B, 'M', '𞤭'),
(0x1E90C, 'M', '𞤮'),
(0x1E90D, 'M', '𞤯'),
(0x1E90E, 'M', '𞤰'),
(0x1E90F, 'M', '𞤱'),
(0x1E910, 'M', '𞤲'),
(0x1E911, 'M', '𞤳'),
(0x1E912, 'M', '𞤴'),
(0x1E913, 'M', '𞤵'),
(0x1E914, 'M', '𞤶'),
(0x1E915, 'M', '𞤷'),
(0x1E916, 'M', '𞤸'),
(0x1E917, 'M', '𞤹'),
(0x1E918, 'M', '𞤺'),
(0x1E919, 'M', '𞤻'),
(0x1E91A, 'M', '𞤼'),
(0x1E91B, 'M', '𞤽'),
(0x1E91C, 'M', '𞤾'),
(0x1E91D, 'M', '𞤿'),
(0x1E91E, 'M', '𞥀'),
(0x1E91F, 'M', '𞥁'),
(0x1E920, 'M', '𞥂'),
(0x1E921, 'M', '𞥃'),
(0x1E922, 'V'),
(0x1E94C, 'X'),
(0x1E950, 'V'),
(0x1E95A, 'X'),
(0x1E95E, 'V'),
(0x1E960, 'X'),
(0x1EC71, 'V'),
(0x1ECB5, 'X'),
(0x1ED01, 'V'),
(0x1ED3E, 'X'),
(0x1EE00, 'M', 'ا'),
(0x1EE01, 'M', 'ب'),
(0x1EE02, 'M', 'ج'),
(0x1EE03, 'M', 'د'),
(0x1EE04, 'X'),
(0x1EE05, 'M', 'و'),
(0x1EE06, 'M', 'ز'),
(0x1EE07, 'M', 'ح'),
(0x1EE08, 'M', 'ط'),
(0x1EE09, 'M', 'ي'),
(0x1EE0A, 'M', 'ك'),
(0x1EE0B, 'M', 'ل'),
(0x1EE0C, 'M', 'م'),
(0x1EE0D, 'M', 'ن'),
(0x1EE0E, 'M', 'س'),
(0x1EE0F, 'M', 'ع'),
(0x1EE10, 'M', 'ف'),
(0x1EE11, 'M', 'ص'),
(0x1EE12, 'M', 'ق'),
(0x1EE13, 'M', 'ر'),
(0x1EE14, 'M', 'ش'),
(0x1EE15, 'M', 'ت'),
(0x1EE16, 'M', 'ث'),
(0x1EE17, 'M', 'خ'),
(0x1EE18, 'M', 'ذ'),
(0x1EE19, 'M', 'ض'),
(0x1EE1A, 'M', 'ظ'),
(0x1EE1B, 'M', 'غ'),
(0x1EE1C, 'M', 'ٮ'),
(0x1EE1D, 'M', 'ں'),
(0x1EE1E, 'M', 'ڡ'),
(0x1EE1F, 'M', 'ٯ'),
(0x1EE20, 'X'),
(0x1EE21, 'M', 'ب'),
(0x1EE22, 'M', 'ج'),
(0x1EE23, 'X'),
(0x1EE24, 'M', 'ه'),
(0x1EE25, 'X'),
(0x1EE27, 'M', 'ح'),
(0x1EE28, 'X'),
(0x1EE29, 'M', 'ي'),
(0x1EE2A, 'M', 'ك'),
(0x1EE2B, 'M', 'ل'),
(0x1EE2C, 'M', 'م'),
(0x1EE2D, 'M', 'ن'),
(0x1EE2E, 'M', 'س'),
(0x1EE2F, 'M', 'ع'),
(0x1EE30, 'M', 'ف'),
(0x1EE31, 'M', 'ص'),
(0x1EE32, 'M', 'ق'),
(0x1EE33, 'X'),
(0x1EE34, 'M', 'ش'),
(0x1EE35, 'M', 'ت'),
(0x1EE36, 'M', 'ث'),
(0x1EE37, 'M', 'خ'),
(0x1EE38, 'X'),
(0x1EE39, 'M', 'ض'),
(0x1EE3A, 'X'),
(0x1EE3B, 'M', 'غ'),
(0x1EE3C, 'X'),
(0x1EE42, 'M', 'ج'),
(0x1EE43, 'X'),
(0x1EE47, 'M', 'ح'),
(0x1EE48, 'X'),
(0x1EE49, 'M', 'ي'),
(0x1EE4A, 'X'),
]
def _seg_73() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x1EE4B, 'M', 'ل'),
(0x1EE4C, 'X'),
(0x1EE4D, 'M', 'ن'),
(0x1EE4E, 'M', 'س'),
(0x1EE4F, 'M', 'ع'),
(0x1EE50, 'X'),
(0x1EE51, 'M', 'ص'),
(0x1EE52, 'M', 'ق'),
(0x1EE53, 'X'),
(0x1EE54, 'M', 'ش'),
(0x1EE55, 'X'),
(0x1EE57, 'M', 'خ'),
(0x1EE58, 'X'),
(0x1EE59, 'M', 'ض'),
(0x1EE5A, 'X'),
(0x1EE5B, 'M', 'غ'),
(0x1EE5C, 'X'),
(0x1EE5D, 'M', 'ں'),
(0x1EE5E, 'X'),
(0x1EE5F, 'M', 'ٯ'),
(0x1EE60, 'X'),
(0x1EE61, 'M', 'ب'),
(0x1EE62, 'M', 'ج'),
(0x1EE63, 'X'),
(0x1EE64, 'M', 'ه'),
(0x1EE65, 'X'),
(0x1EE67, 'M', 'ح'),
(0x1EE68, 'M', 'ط'),
(0x1EE69, 'M', 'ي'),
(0x1EE6A, 'M', 'ك'),
(0x1EE6B, 'X'),
(0x1EE6C, 'M', 'م'),
(0x1EE6D, 'M', 'ن'),
(0x1EE6E, 'M', 'س'),
(0x1EE6F, 'M', 'ع'),
(0x1EE70, 'M', 'ف'),
(0x1EE71, 'M', 'ص'),
(0x1EE72, 'M', 'ق'),
(0x1EE73, 'X'),
(0x1EE74, 'M', 'ش'),
(0x1EE75, 'M', 'ت'),
(0x1EE76, 'M', 'ث'),
(0x1EE77, 'M', 'خ'),
(0x1EE78, 'X'),
(0x1EE79, 'M', 'ض'),
(0x1EE7A, 'M', 'ظ'),
(0x1EE7B, 'M', 'غ'),
(0x1EE7C, 'M', 'ٮ'),
(0x1EE7D, 'X'),
(0x1EE7E, 'M', 'ڡ'),
(0x1EE7F, 'X'),
(0x1EE80, 'M', 'ا'),
(0x1EE81, 'M', 'ب'),
(0x1EE82, 'M', 'ج'),
(0x1EE83, 'M', 'د'),
(0x1EE84, 'M', 'ه'),
(0x1EE85, 'M', 'و'),
(0x1EE86, 'M', 'ز'),
(0x1EE87, 'M', 'ح'),
(0x1EE88, 'M', 'ط'),
(0x1EE89, 'M', 'ي'),
(0x1EE8A, 'X'),
(0x1EE8B, 'M', 'ل'),
(0x1EE8C, 'M', 'م'),
(0x1EE8D, 'M', 'ن'),
(0x1EE8E, 'M', 'س'),
(0x1EE8F, 'M', 'ع'),
(0x1EE90, 'M', 'ف'),
(0x1EE91, 'M', 'ص'),
(0x1EE92, 'M', 'ق'),
(0x1EE93, 'M', 'ر'),
(0x1EE94, 'M', 'ش'),
(0x1EE95, 'M', 'ت'),
(0x1EE96, 'M', 'ث'),
(0x1EE97, 'M', 'خ'),
(0x1EE98, 'M', 'ذ'),
(0x1EE99, 'M', 'ض'),
(0x1EE9A, 'M', 'ظ'),
(0x1EE9B, 'M', 'غ'),
(0x1EE9C, 'X'),
(0x1EEA1, 'M', 'ب'),
(0x1EEA2, 'M', 'ج'),
(0x1EEA3, 'M', 'د'),
(0x1EEA4, 'X'),
(0x1EEA5, 'M', 'و'),
(0x1EEA6, 'M', 'ز'),
(0x1EEA7, 'M', 'ح'),
(0x1EEA8, 'M', 'ط'),
(0x1EEA9, 'M', 'ي'),
(0x1EEAA, 'X'),
(0x1EEAB, 'M', 'ل'),
(0x1EEAC, 'M', 'م'),
(0x1EEAD, 'M', 'ن'),
(0x1EEAE, 'M', 'س'),
(0x1EEAF, 'M', 'ع'),
(0x1EEB0, 'M', 'ف'),
(0x1EEB1, 'M', 'ص'),
(0x1EEB2, 'M', 'ق'),
(0x1EEB3, 'M', 'ر'),
(0x1EEB4, 'M', 'ش'),
]
def _seg_74() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x1EEB5, 'M', 'ت'),
(0x1EEB6, 'M', 'ث'),
(0x1EEB7, 'M', 'خ'),
(0x1EEB8, 'M', 'ذ'),
(0x1EEB9, 'M', 'ض'),
(0x1EEBA, 'M', 'ظ'),
(0x1EEBB, 'M', 'غ'),
(0x1EEBC, 'X'),
(0x1EEF0, 'V'),
(0x1EEF2, 'X'),
(0x1F000, 'V'),
(0x1F02C, 'X'),
(0x1F030, 'V'),
(0x1F094, 'X'),
(0x1F0A0, 'V'),
(0x1F0AF, 'X'),
(0x1F0B1, 'V'),
(0x1F0C0, 'X'),
(0x1F0C1, 'V'),
(0x1F0D0, 'X'),
(0x1F0D1, 'V'),
(0x1F0F6, 'X'),
(0x1F101, '3', '0,'),
(0x1F102, '3', '1,'),
(0x1F103, '3', '2,'),
(0x1F104, '3', '3,'),
(0x1F105, '3', '4,'),
(0x1F106, '3', '5,'),
(0x1F107, '3', '6,'),
(0x1F108, '3', '7,'),
(0x1F109, '3', '8,'),
(0x1F10A, '3', '9,'),
(0x1F10B, 'V'),
(0x1F110, '3', '(a)'),
(0x1F111, '3', '(b)'),
(0x1F112, '3', '(c)'),
(0x1F113, '3', '(d)'),
(0x1F114, '3', '(e)'),
(0x1F115, '3', '(f)'),
(0x1F116, '3', '(g)'),
(0x1F117, '3', '(h)'),
(0x1F118, '3', '(i)'),
(0x1F119, '3', '(j)'),
(0x1F11A, '3', '(k)'),
(0x1F11B, '3', '(l)'),
(0x1F11C, '3', '(m)'),
(0x1F11D, '3', '(n)'),
(0x1F11E, '3', '(o)'),
(0x1F11F, '3', '(p)'),
(0x1F120, '3', '(q)'),
(0x1F121, '3', '(r)'),
(0x1F122, '3', '(s)'),
(0x1F123, '3', '(t)'),
(0x1F124, '3', '(u)'),
(0x1F125, '3', '(v)'),
(0x1F126, '3', '(w)'),
(0x1F127, '3', '(x)'),
(0x1F128, '3', '(y)'),
(0x1F129, '3', '(z)'),
(0x1F12A, 'M', '〔s〕'),
(0x1F12B, 'M', 'c'),
(0x1F12C, 'M', 'r'),
(0x1F12D, 'M', 'cd'),
(0x1F12E, 'M', 'wz'),
(0x1F12F, 'V'),
(0x1F130, 'M', 'a'),
(0x1F131, 'M', 'b'),
(0x1F132, 'M', 'c'),
(0x1F133, 'M', 'd'),
(0x1F134, 'M', 'e'),
(0x1F135, 'M', 'f'),
(0x1F136, 'M', 'g'),
(0x1F137, 'M', 'h'),
(0x1F138, 'M', 'i'),
(0x1F139, 'M', 'j'),
(0x1F13A, 'M', 'k'),
(0x1F13B, 'M', 'l'),
(0x1F13C, 'M', 'm'),
(0x1F13D, 'M', 'n'),
(0x1F13E, 'M', 'o'),
(0x1F13F, 'M', 'p'),
(0x1F140, 'M', 'q'),
(0x1F141, 'M', 'r'),
(0x1F142, 'M', 's'),
(0x1F143, 'M', 't'),
(0x1F144, 'M', 'u'),
(0x1F145, 'M', 'v'),
(0x1F146, 'M', 'w'),
(0x1F147, 'M', 'x'),
(0x1F148, 'M', 'y'),
(0x1F149, 'M', 'z'),
(0x1F14A, 'M', 'hv'),
(0x1F14B, 'M', 'mv'),
(0x1F14C, 'M', 'sd'),
(0x1F14D, 'M', 'ss'),
(0x1F14E, 'M', 'ppv'),
(0x1F14F, 'M', 'wc'),
(0x1F150, 'V'),
(0x1F16A, 'M', 'mc'),
(0x1F16B, 'M', 'md'),
]
def _seg_75() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x1F16C, 'M', 'mr'),
(0x1F16D, 'V'),
(0x1F190, 'M', 'dj'),
(0x1F191, 'V'),
(0x1F1AE, 'X'),
(0x1F1E6, 'V'),
(0x1F200, 'M', 'ほか'),
(0x1F201, 'M', 'ココ'),
(0x1F202, 'M', 'サ'),
(0x1F203, 'X'),
(0x1F210, 'M', '手'),
(0x1F211, 'M', '字'),
(0x1F212, 'M', '双'),
(0x1F213, 'M', 'デ'),
(0x1F214, 'M', '二'),
(0x1F215, 'M', '多'),
(0x1F216, 'M', '解'),
(0x1F217, 'M', '天'),
(0x1F218, 'M', '交'),
(0x1F219, 'M', '映'),
(0x1F21A, 'M', '無'),
(0x1F21B, 'M', '料'),
(0x1F21C, 'M', '前'),
(0x1F21D, 'M', '後'),
(0x1F21E, 'M', '再'),
(0x1F21F, 'M', '新'),
(0x1F220, 'M', '初'),
(0x1F221, 'M', '終'),
(0x1F222, 'M', '生'),
(0x1F223, 'M', '販'),
(0x1F224, 'M', '声'),
(0x1F225, 'M', '吹'),
(0x1F226, 'M', '演'),
(0x1F227, 'M', '投'),
(0x1F228, 'M', '捕'),
(0x1F229, 'M', '一'),
(0x1F22A, 'M', '三'),
(0x1F22B, 'M', '遊'),
(0x1F22C, 'M', '左'),
(0x1F22D, 'M', '中'),
(0x1F22E, 'M', '右'),
(0x1F22F, 'M', '指'),
(0x1F230, 'M', '走'),
(0x1F231, 'M', '打'),
(0x1F232, 'M', '禁'),
(0x1F233, 'M', '空'),
(0x1F234, 'M', '合'),
(0x1F235, 'M', '満'),
(0x1F236, 'M', '有'),
(0x1F237, 'M', '月'),
(0x1F238, 'M', '申'),
(0x1F239, 'M', '割'),
(0x1F23A, 'M', '営'),
(0x1F23B, 'M', '配'),
(0x1F23C, 'X'),
(0x1F240, 'M', '〔本〕'),
(0x1F241, 'M', '〔三〕'),
(0x1F242, 'M', '〔二〕'),
(0x1F243, 'M', '〔安〕'),
(0x1F244, 'M', '〔点〕'),
(0x1F245, 'M', '〔打〕'),
(0x1F246, 'M', '〔盗〕'),
(0x1F247, 'M', '〔勝〕'),
(0x1F248, 'M', '〔敗〕'),
(0x1F249, 'X'),
(0x1F250, 'M', '得'),
(0x1F251, 'M', '可'),
(0x1F252, 'X'),
(0x1F260, 'V'),
(0x1F266, 'X'),
(0x1F300, 'V'),
(0x1F6D8, 'X'),
(0x1F6DC, 'V'),
(0x1F6ED, 'X'),
(0x1F6F0, 'V'),
(0x1F6FD, 'X'),
(0x1F700, 'V'),
(0x1F777, 'X'),
(0x1F77B, 'V'),
(0x1F7DA, 'X'),
(0x1F7E0, 'V'),
(0x1F7EC, 'X'),
(0x1F7F0, 'V'),
(0x1F7F1, 'X'),
(0x1F800, 'V'),
(0x1F80C, 'X'),
(0x1F810, 'V'),
(0x1F848, 'X'),
(0x1F850, 'V'),
(0x1F85A, 'X'),
(0x1F860, 'V'),
(0x1F888, 'X'),
(0x1F890, 'V'),
(0x1F8AE, 'X'),
(0x1F8B0, 'V'),
(0x1F8B2, 'X'),
(0x1F900, 'V'),
(0x1FA54, 'X'),
(0x1FA60, 'V'),
(0x1FA6E, 'X'),
]
def _seg_76() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x1FA70, 'V'),
(0x1FA7D, 'X'),
(0x1FA80, 'V'),
(0x1FA89, 'X'),
(0x1FA90, 'V'),
(0x1FABE, 'X'),
(0x1FABF, 'V'),
(0x1FAC6, 'X'),
(0x1FACE, 'V'),
(0x1FADC, 'X'),
(0x1FAE0, 'V'),
(0x1FAE9, 'X'),
(0x1FAF0, 'V'),
(0x1FAF9, 'X'),
(0x1FB00, 'V'),
(0x1FB93, 'X'),
(0x1FB94, 'V'),
(0x1FBCB, 'X'),
(0x1FBF0, 'M', '0'),
(0x1FBF1, 'M', '1'),
(0x1FBF2, 'M', '2'),
(0x1FBF3, 'M', '3'),
(0x1FBF4, 'M', '4'),
(0x1FBF5, 'M', '5'),
(0x1FBF6, 'M', '6'),
(0x1FBF7, 'M', '7'),
(0x1FBF8, 'M', '8'),
(0x1FBF9, 'M', '9'),
(0x1FBFA, 'X'),
(0x20000, 'V'),
(0x2A6E0, 'X'),
(0x2A700, 'V'),
(0x2B73A, 'X'),
(0x2B740, 'V'),
(0x2B81E, 'X'),
(0x2B820, 'V'),
(0x2CEA2, 'X'),
(0x2CEB0, 'V'),
(0x2EBE1, 'X'),
(0x2F800, 'M', '丽'),
(0x2F801, 'M', '丸'),
(0x2F802, 'M', '乁'),
(0x2F803, 'M', '𠄢'),
(0x2F804, 'M', '你'),
(0x2F805, 'M', '侮'),
(0x2F806, 'M', '侻'),
(0x2F807, 'M', '倂'),
(0x2F808, 'M', '偺'),
(0x2F809, 'M', '備'),
(0x2F80A, 'M', '僧'),
(0x2F80B, 'M', '像'),
(0x2F80C, 'M', '㒞'),
(0x2F80D, 'M', '𠘺'),
(0x2F80E, 'M', '免'),
(0x2F80F, 'M', '兔'),
(0x2F810, 'M', '兤'),
(0x2F811, 'M', '具'),
(0x2F812, 'M', '𠔜'),
(0x2F813, 'M', '㒹'),
(0x2F814, 'M', '內'),
(0x2F815, 'M', '再'),
(0x2F816, 'M', '𠕋'),
(0x2F817, 'M', '冗'),
(0x2F818, 'M', '冤'),
(0x2F819, 'M', '仌'),
(0x2F81A, 'M', '冬'),
(0x2F81B, 'M', '况'),
(0x2F81C, 'M', '𩇟'),
(0x2F81D, 'M', '凵'),
(0x2F81E, 'M', '刃'),
(0x2F81F, 'M', '㓟'),
(0x2F820, 'M', '刻'),
(0x2F821, 'M', '剆'),
(0x2F822, 'M', '割'),
(0x2F823, 'M', '剷'),
(0x2F824, 'M', '㔕'),
(0x2F825, 'M', '勇'),
(0x2F826, 'M', '勉'),
(0x2F827, 'M', '勤'),
(0x2F828, 'M', '勺'),
(0x2F829, 'M', '包'),
(0x2F82A, 'M', '匆'),
(0x2F82B, 'M', '北'),
(0x2F82C, 'M', '卉'),
(0x2F82D, 'M', '卑'),
(0x2F82E, 'M', '博'),
(0x2F82F, 'M', '即'),
(0x2F830, 'M', '卽'),
(0x2F831, 'M', '卿'),
(0x2F834, 'M', '𠨬'),
(0x2F835, 'M', '灰'),
(0x2F836, 'M', '及'),
(0x2F837, 'M', '叟'),
(0x2F838, 'M', '𠭣'),
(0x2F839, 'M', '叫'),
(0x2F83A, 'M', '叱'),
(0x2F83B, 'M', '吆'),
(0x2F83C, 'M', '咞'),
(0x2F83D, 'M', '吸'),
(0x2F83E, 'M', '呈'),
]
def _seg_77() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x2F83F, 'M', '周'),
(0x2F840, 'M', '咢'),
(0x2F841, 'M', '哶'),
(0x2F842, 'M', '唐'),
(0x2F843, 'M', '啓'),
(0x2F844, 'M', '啣'),
(0x2F845, 'M', '善'),
(0x2F847, 'M', '喙'),
(0x2F848, 'M', '喫'),
(0x2F849, 'M', '喳'),
(0x2F84A, 'M', '嗂'),
(0x2F84B, 'M', '圖'),
(0x2F84C, 'M', '嘆'),
(0x2F84D, 'M', '圗'),
(0x2F84E, 'M', '噑'),
(0x2F84F, 'M', '噴'),
(0x2F850, 'M', '切'),
(0x2F851, 'M', '壮'),
(0x2F852, 'M', '城'),
(0x2F853, 'M', '埴'),
(0x2F854, 'M', '堍'),
(0x2F855, 'M', '型'),
(0x2F856, 'M', '堲'),
(0x2F857, 'M', '報'),
(0x2F858, 'M', '墬'),
(0x2F859, 'M', '𡓤'),
(0x2F85A, 'M', '売'),
(0x2F85B, 'M', '壷'),
(0x2F85C, 'M', '夆'),
(0x2F85D, 'M', '多'),
(0x2F85E, 'M', '夢'),
(0x2F85F, 'M', '奢'),
(0x2F860, 'M', '𡚨'),
(0x2F861, 'M', '𡛪'),
(0x2F862, 'M', '姬'),
(0x2F863, 'M', '娛'),
(0x2F864, 'M', '娧'),
(0x2F865, 'M', '姘'),
(0x2F866, 'M', '婦'),
(0x2F867, 'M', '㛮'),
(0x2F868, 'X'),
(0x2F869, 'M', '嬈'),
(0x2F86A, 'M', '嬾'),
(0x2F86C, 'M', '𡧈'),
(0x2F86D, 'M', '寃'),
(0x2F86E, 'M', '寘'),
(0x2F86F, 'M', '寧'),
(0x2F870, 'M', '寳'),
(0x2F871, 'M', '𡬘'),
(0x2F872, 'M', '寿'),
(0x2F873, 'M', '将'),
(0x2F874, 'X'),
(0x2F875, 'M', '尢'),
(0x2F876, 'M', '㞁'),
(0x2F877, 'M', '屠'),
(0x2F878, 'M', '屮'),
(0x2F879, 'M', '峀'),
(0x2F87A, 'M', '岍'),
(0x2F87B, 'M', '𡷤'),
(0x2F87C, 'M', '嵃'),
(0x2F87D, 'M', '𡷦'),
(0x2F87E, 'M', '嵮'),
(0x2F87F, 'M', '嵫'),
(0x2F880, 'M', '嵼'),
(0x2F881, 'M', '巡'),
(0x2F882, 'M', '巢'),
(0x2F883, 'M', '㠯'),
(0x2F884, 'M', '巽'),
(0x2F885, 'M', '帨'),
(0x2F886, 'M', '帽'),
(0x2F887, 'M', '幩'),
(0x2F888, 'M', '㡢'),
(0x2F889, 'M', '𢆃'),
(0x2F88A, 'M', '㡼'),
(0x2F88B, 'M', '庰'),
(0x2F88C, 'M', '庳'),
(0x2F88D, 'M', '庶'),
(0x2F88E, 'M', '廊'),
(0x2F88F, 'M', '𪎒'),
(0x2F890, 'M', '廾'),
(0x2F891, 'M', '𢌱'),
(0x2F893, 'M', '舁'),
(0x2F894, 'M', '弢'),
(0x2F896, 'M', '㣇'),
(0x2F897, 'M', '𣊸'),
(0x2F898, 'M', '𦇚'),
(0x2F899, 'M', '形'),
(0x2F89A, 'M', '彫'),
(0x2F89B, 'M', '㣣'),
(0x2F89C, 'M', '徚'),
(0x2F89D, 'M', '忍'),
(0x2F89E, 'M', '志'),
(0x2F89F, 'M', '忹'),
(0x2F8A0, 'M', '悁'),
(0x2F8A1, 'M', '㤺'),
(0x2F8A2, 'M', '㤜'),
(0x2F8A3, 'M', '悔'),
(0x2F8A4, 'M', '𢛔'),
(0x2F8A5, 'M', '惇'),
(0x2F8A6, 'M', '慈'),
]
def _seg_78() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x2F8A7, 'M', '慌'),
(0x2F8A8, 'M', '慎'),
(0x2F8A9, 'M', '慌'),
(0x2F8AA, 'M', '慺'),
(0x2F8AB, 'M', '憎'),
(0x2F8AC, 'M', '憲'),
(0x2F8AD, 'M', '憤'),
(0x2F8AE, 'M', '憯'),
(0x2F8AF, 'M', '懞'),
(0x2F8B0, 'M', '懲'),
(0x2F8B1, 'M', '懶'),
(0x2F8B2, 'M', '成'),
(0x2F8B3, 'M', '戛'),
(0x2F8B4, 'M', '扝'),
(0x2F8B5, 'M', '抱'),
(0x2F8B6, 'M', '拔'),
(0x2F8B7, 'M', '捐'),
(0x2F8B8, 'M', '𢬌'),
(0x2F8B9, 'M', '挽'),
(0x2F8BA, 'M', '拼'),
(0x2F8BB, 'M', '捨'),
(0x2F8BC, 'M', '掃'),
(0x2F8BD, 'M', '揤'),
(0x2F8BE, 'M', '𢯱'),
(0x2F8BF, 'M', '搢'),
(0x2F8C0, 'M', '揅'),
(0x2F8C1, 'M', '掩'),
(0x2F8C2, 'M', '㨮'),
(0x2F8C3, 'M', '摩'),
(0x2F8C4, 'M', '摾'),
(0x2F8C5, 'M', '撝'),
(0x2F8C6, 'M', '摷'),
(0x2F8C7, 'M', '㩬'),
(0x2F8C8, 'M', '敏'),
(0x2F8C9, 'M', '敬'),
(0x2F8CA, 'M', '𣀊'),
(0x2F8CB, 'M', '旣'),
(0x2F8CC, 'M', '書'),
(0x2F8CD, 'M', '晉'),
(0x2F8CE, 'M', '㬙'),
(0x2F8CF, 'M', '暑'),
(0x2F8D0, 'M', '㬈'),
(0x2F8D1, 'M', '㫤'),
(0x2F8D2, 'M', '冒'),
(0x2F8D3, 'M', '冕'),
(0x2F8D4, 'M', '最'),
(0x2F8D5, 'M', '暜'),
(0x2F8D6, 'M', '肭'),
(0x2F8D7, 'M', '䏙'),
(0x2F8D8, 'M', '朗'),
(0x2F8D9, 'M', '望'),
(0x2F8DA, 'M', '朡'),
(0x2F8DB, 'M', '杞'),
(0x2F8DC, 'M', '杓'),
(0x2F8DD, 'M', '𣏃'),
(0x2F8DE, 'M', '㭉'),
(0x2F8DF, 'M', '柺'),
(0x2F8E0, 'M', '枅'),
(0x2F8E1, 'M', '桒'),
(0x2F8E2, 'M', '梅'),
(0x2F8E3, 'M', '𣑭'),
(0x2F8E4, 'M', '梎'),
(0x2F8E5, 'M', '栟'),
(0x2F8E6, 'M', '椔'),
(0x2F8E7, 'M', '㮝'),
(0x2F8E8, 'M', '楂'),
(0x2F8E9, 'M', '榣'),
(0x2F8EA, 'M', '槪'),
(0x2F8EB, 'M', '檨'),
(0x2F8EC, 'M', '𣚣'),
(0x2F8ED, 'M', '櫛'),
(0x2F8EE, 'M', '㰘'),
(0x2F8EF, 'M', '次'),
(0x2F8F0, 'M', '𣢧'),
(0x2F8F1, 'M', '歔'),
(0x2F8F2, 'M', '㱎'),
(0x2F8F3, 'M', '歲'),
(0x2F8F4, 'M', '殟'),
(0x2F8F5, 'M', '殺'),
(0x2F8F6, 'M', '殻'),
(0x2F8F7, 'M', '𣪍'),
(0x2F8F8, 'M', '𡴋'),
(0x2F8F9, 'M', '𣫺'),
(0x2F8FA, 'M', '汎'),
(0x2F8FB, 'M', '𣲼'),
(0x2F8FC, 'M', '沿'),
(0x2F8FD, 'M', '泍'),
(0x2F8FE, 'M', '汧'),
(0x2F8FF, 'M', '洖'),
(0x2F900, 'M', '派'),
(0x2F901, 'M', '海'),
(0x2F902, 'M', '流'),
(0x2F903, 'M', '浩'),
(0x2F904, 'M', '浸'),
(0x2F905, 'M', '涅'),
(0x2F906, 'M', '𣴞'),
(0x2F907, 'M', '洴'),
(0x2F908, 'M', '港'),
(0x2F909, 'M', '湮'),
(0x2F90A, 'M', '㴳'),
]
def _seg_79() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x2F90B, 'M', '滋'),
(0x2F90C, 'M', '滇'),
(0x2F90D, 'M', '𣻑'),
(0x2F90E, 'M', '淹'),
(0x2F90F, 'M', '潮'),
(0x2F910, 'M', '𣽞'),
(0x2F911, 'M', '𣾎'),
(0x2F912, 'M', '濆'),
(0x2F913, 'M', '瀹'),
(0x2F914, 'M', '瀞'),
(0x2F915, 'M', '瀛'),
(0x2F916, 'M', '㶖'),
(0x2F917, 'M', '灊'),
(0x2F918, 'M', '災'),
(0x2F919, 'M', '灷'),
(0x2F91A, 'M', '炭'),
(0x2F91B, 'M', '𠔥'),
(0x2F91C, 'M', '煅'),
(0x2F91D, 'M', '𤉣'),
(0x2F91E, 'M', '熜'),
(0x2F91F, 'X'),
(0x2F920, 'M', '爨'),
(0x2F921, 'M', '爵'),
(0x2F922, 'M', '牐'),
(0x2F923, 'M', '𤘈'),
(0x2F924, 'M', '犀'),
(0x2F925, 'M', '犕'),
(0x2F926, 'M', '𤜵'),
(0x2F927, 'M', '𤠔'),
(0x2F928, 'M', '獺'),
(0x2F929, 'M', '王'),
(0x2F92A, 'M', '㺬'),
(0x2F92B, 'M', '玥'),
(0x2F92C, 'M', '㺸'),
(0x2F92E, 'M', '瑇'),
(0x2F92F, 'M', '瑜'),
(0x2F930, 'M', '瑱'),
(0x2F931, 'M', '璅'),
(0x2F932, 'M', '瓊'),
(0x2F933, 'M', '㼛'),
(0x2F934, 'M', '甤'),
(0x2F935, 'M', '𤰶'),
(0x2F936, 'M', '甾'),
(0x2F937, 'M', '𤲒'),
(0x2F938, 'M', '異'),
(0x2F939, 'M', '𢆟'),
(0x2F93A, 'M', '瘐'),
(0x2F93B, 'M', '𤾡'),
(0x2F93C, 'M', '𤾸'),
(0x2F93D, 'M', '𥁄'),
(0x2F93E, 'M', '㿼'),
(0x2F93F, 'M', '䀈'),
(0x2F940, 'M', '直'),
(0x2F941, 'M', '𥃳'),
(0x2F942, 'M', '𥃲'),
(0x2F943, 'M', '𥄙'),
(0x2F944, 'M', '𥄳'),
(0x2F945, 'M', '眞'),
(0x2F946, 'M', '真'),
(0x2F948, 'M', '睊'),
(0x2F949, 'M', '䀹'),
(0x2F94A, 'M', '瞋'),
(0x2F94B, 'M', '䁆'),
(0x2F94C, 'M', '䂖'),
(0x2F94D, 'M', '𥐝'),
(0x2F94E, 'M', '硎'),
(0x2F94F, 'M', '碌'),
(0x2F950, 'M', '磌'),
(0x2F951, 'M', '䃣'),
(0x2F952, 'M', '𥘦'),
(0x2F953, 'M', '祖'),
(0x2F954, 'M', '𥚚'),
(0x2F955, 'M', '𥛅'),
(0x2F956, 'M', '福'),
(0x2F957, 'M', '秫'),
(0x2F958, 'M', '䄯'),
(0x2F959, 'M', '穀'),
(0x2F95A, 'M', '穊'),
(0x2F95B, 'M', '穏'),
(0x2F95C, 'M', '𥥼'),
(0x2F95D, 'M', '𥪧'),
(0x2F95F, 'X'),
(0x2F960, 'M', '䈂'),
(0x2F961, 'M', '𥮫'),
(0x2F962, 'M', '篆'),
(0x2F963, 'M', '築'),
(0x2F964, 'M', '䈧'),
(0x2F965, 'M', '𥲀'),
(0x2F966, 'M', '糒'),
(0x2F967, 'M', '䊠'),
(0x2F968, 'M', '糨'),
(0x2F969, 'M', '糣'),
(0x2F96A, 'M', '紀'),
(0x2F96B, 'M', '𥾆'),
(0x2F96C, 'M', '絣'),
(0x2F96D, 'M', '䌁'),
(0x2F96E, 'M', '緇'),
(0x2F96F, 'M', '縂'),
(0x2F970, 'M', '繅'),
(0x2F971, 'M', '䌴'),
]
def _seg_80() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x2F972, 'M', '𦈨'),
(0x2F973, 'M', '𦉇'),
(0x2F974, 'M', '䍙'),
(0x2F975, 'M', '𦋙'),
(0x2F976, 'M', '罺'),
(0x2F977, 'M', '𦌾'),
(0x2F978, 'M', '羕'),
(0x2F979, 'M', '翺'),
(0x2F97A, 'M', '者'),
(0x2F97B, 'M', '𦓚'),
(0x2F97C, 'M', '𦔣'),
(0x2F97D, 'M', '聠'),
(0x2F97E, 'M', '𦖨'),
(0x2F97F, 'M', '聰'),
(0x2F980, 'M', '𣍟'),
(0x2F981, 'M', '䏕'),
(0x2F982, 'M', '育'),
(0x2F983, 'M', '脃'),
(0x2F984, 'M', '䐋'),
(0x2F985, 'M', '脾'),
(0x2F986, 'M', '媵'),
(0x2F987, 'M', '𦞧'),
(0x2F988, 'M', '𦞵'),
(0x2F989, 'M', '𣎓'),
(0x2F98A, 'M', '𣎜'),
(0x2F98B, 'M', '舁'),
(0x2F98C, 'M', '舄'),
(0x2F98D, 'M', '辞'),
(0x2F98E, 'M', '䑫'),
(0x2F98F, 'M', '芑'),
(0x2F990, 'M', '芋'),
(0x2F991, 'M', '芝'),
(0x2F992, 'M', '劳'),
(0x2F993, 'M', '花'),
(0x2F994, 'M', '芳'),
(0x2F995, 'M', '芽'),
(0x2F996, 'M', '苦'),
(0x2F997, 'M', '𦬼'),
(0x2F998, 'M', '若'),
(0x2F999, 'M', '茝'),
(0x2F99A, 'M', '荣'),
(0x2F99B, 'M', '莭'),
(0x2F99C, 'M', '茣'),
(0x2F99D, 'M', '莽'),
(0x2F99E, 'M', '菧'),
(0x2F99F, 'M', '著'),
(0x2F9A0, 'M', '荓'),
(0x2F9A1, 'M', '菊'),
(0x2F9A2, 'M', '菌'),
(0x2F9A3, 'M', '菜'),
(0x2F9A4, 'M', '𦰶'),
(0x2F9A5, 'M', '𦵫'),
(0x2F9A6, 'M', '𦳕'),
(0x2F9A7, 'M', '䔫'),
(0x2F9A8, 'M', '蓱'),
(0x2F9A9, 'M', '蓳'),
(0x2F9AA, 'M', '蔖'),
(0x2F9AB, 'M', '𧏊'),
(0x2F9AC, 'M', '蕤'),
(0x2F9AD, 'M', '𦼬'),
(0x2F9AE, 'M', '䕝'),
(0x2F9AF, 'M', '䕡'),
(0x2F9B0, 'M', '𦾱'),
(0x2F9B1, 'M', '𧃒'),
(0x2F9B2, 'M', '䕫'),
(0x2F9B3, 'M', '虐'),
(0x2F9B4, 'M', '虜'),
(0x2F9B5, 'M', '虧'),
(0x2F9B6, 'M', '虩'),
(0x2F9B7, 'M', '蚩'),
(0x2F9B8, 'M', '蚈'),
(0x2F9B9, 'M', '蜎'),
(0x2F9BA, 'M', '蛢'),
(0x2F9BB, 'M', '蝹'),
(0x2F9BC, 'M', '蜨'),
(0x2F9BD, 'M', '蝫'),
(0x2F9BE, 'M', '螆'),
(0x2F9BF, 'X'),
(0x2F9C0, 'M', '蟡'),
(0x2F9C1, 'M', '蠁'),
(0x2F9C2, 'M', '䗹'),
(0x2F9C3, 'M', '衠'),
(0x2F9C4, 'M', '衣'),
(0x2F9C5, 'M', '𧙧'),
(0x2F9C6, 'M', '裗'),
(0x2F9C7, 'M', '裞'),
(0x2F9C8, 'M', '䘵'),
(0x2F9C9, 'M', '裺'),
(0x2F9CA, 'M', '㒻'),
(0x2F9CB, 'M', '𧢮'),
(0x2F9CC, 'M', '𧥦'),
(0x2F9CD, 'M', '䚾'),
(0x2F9CE, 'M', '䛇'),
(0x2F9CF, 'M', '誠'),
(0x2F9D0, 'M', '諭'),
(0x2F9D1, 'M', '變'),
(0x2F9D2, 'M', '豕'),
(0x2F9D3, 'M', '𧲨'),
(0x2F9D4, 'M', '貫'),
(0x2F9D5, 'M', '賁'),
]
def _seg_81() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
return [
(0x2F9D6, 'M', '贛'),
(0x2F9D7, 'M', '起'),
(0x2F9D8, 'M', '𧼯'),
(0x2F9D9, 'M', '𠠄'),
(0x2F9DA, 'M', '跋'),
(0x2F9DB, 'M', '趼'),
(0x2F9DC, 'M', '跰'),
(0x2F9DD, 'M', '𠣞'),
(0x2F9DE, 'M', '軔'),
(0x2F9DF, 'M', '輸'),
(0x2F9E0, 'M', '𨗒'),
(0x2F9E1, 'M', '𨗭'),
(0x2F9E2, 'M', '邔'),
(0x2F9E3, 'M', '郱'),
(0x2F9E4, 'M', '鄑'),
(0x2F9E5, 'M', '𨜮'),
(0x2F9E6, 'M', '鄛'),
(0x2F9E7, 'M', '鈸'),
(0x2F9E8, 'M', '鋗'),
(0x2F9E9, 'M', '鋘'),
(0x2F9EA, 'M', '鉼'),
(0x2F9EB, 'M', '鏹'),
(0x2F9EC, 'M', '鐕'),
(0x2F9ED, 'M', '𨯺'),
(0x2F9EE, 'M', '開'),
(0x2F9EF, 'M', '䦕'),
(0x2F9F0, 'M', '閷'),
(0x2F9F1, 'M', '𨵷'),
(0x2F9F2, 'M', '䧦'),
(0x2F9F3, 'M', '雃'),
(0x2F9F4, 'M', '嶲'),
(0x2F9F5, 'M', '霣'),
(0x2F9F6, 'M', '𩅅'),
(0x2F9F7, 'M', '𩈚'),
(0x2F9F8, 'M', '䩮'),
(0x2F9F9, 'M', '䩶'),
(0x2F9FA, 'M', '韠'),
(0x2F9FB, 'M', '𩐊'),
(0x2F9FC, 'M', '䪲'),
(0x2F9FD, 'M', '𩒖'),
(0x2F9FE, 'M', '頋'),
(0x2FA00, 'M', '頩'),
(0x2FA01, 'M', '𩖶'),
(0x2FA02, 'M', '飢'),
(0x2FA03, 'M', '䬳'),
(0x2FA04, 'M', '餩'),
(0x2FA05, 'M', '馧'),
(0x2FA06, 'M', '駂'),
(0x2FA07, 'M', '駾'),
(0x2FA08, 'M', '䯎'),
(0x2FA09, 'M', '𩬰'),
(0x2FA0A, 'M', '鬒'),
(0x2FA0B, 'M', '鱀'),
(0x2FA0C, 'M', '鳽'),
(0x2FA0D, 'M', '䳎'),
(0x2FA0E, 'M', '䳭'),
(0x2FA0F, 'M', '鵧'),
(0x2FA10, 'M', '𪃎'),
(0x2FA11, 'M', '䳸'),
(0x2FA12, 'M', '𪄅'),
(0x2FA13, 'M', '𪈎'),
(0x2FA14, 'M', '𪊑'),
(0x2FA15, 'M', '麻'),
(0x2FA16, 'M', '䵖'),
(0x2FA17, 'M', '黹'),
(0x2FA18, 'M', '黾'),
(0x2FA19, 'M', '鼅'),
(0x2FA1A, 'M', '鼏'),
(0x2FA1B, 'M', '鼖'),
(0x2FA1C, 'M', '鼻'),
(0x2FA1D, 'M', '𪘀'),
(0x2FA1E, 'X'),
(0x30000, 'V'),
(0x3134B, 'X'),
(0x31350, 'V'),
(0x323B0, 'X'),
(0xE0100, 'I'),
(0xE01F0, 'X'),
]
uts46data = tuple(
_seg_0()
+ _seg_1()
+ _seg_2()
+ _seg_3()
+ _seg_4()
+ _seg_5()
+ _seg_6()
+ _seg_7()
+ _seg_8()
+ _seg_9()
+ _seg_10()
+ _seg_11()
+ _seg_12()
+ _seg_13()
+ _seg_14()
+ _seg_15()
+ _seg_16()
+ _seg_17()
+ _seg_18()
+ _seg_19()
+ _seg_20()
+ _seg_21()
+ _seg_22()
+ _seg_23()
+ _seg_24()
+ _seg_25()
+ _seg_26()
+ _seg_27()
+ _seg_28()
+ _seg_29()
+ _seg_30()
+ _seg_31()
+ _seg_32()
+ _seg_33()
+ _seg_34()
+ _seg_35()
+ _seg_36()
+ _seg_37()
+ _seg_38()
+ _seg_39()
+ _seg_40()
+ _seg_41()
+ _seg_42()
+ _seg_43()
+ _seg_44()
+ _seg_45()
+ _seg_46()
+ _seg_47()
+ _seg_48()
+ _seg_49()
+ _seg_50()
+ _seg_51()
+ _seg_52()
+ _seg_53()
+ _seg_54()
+ _seg_55()
+ _seg_56()
+ _seg_57()
+ _seg_58()
+ _seg_59()
+ _seg_60()
+ _seg_61()
+ _seg_62()
+ _seg_63()
+ _seg_64()
+ _seg_65()
+ _seg_66()
+ _seg_67()
+ _seg_68()
+ _seg_69()
+ _seg_70()
+ _seg_71()
+ _seg_72()
+ _seg_73()
+ _seg_74()
+ _seg_75()
+ _seg_76()
+ _seg_77()
+ _seg_78()
+ _seg_79()
+ _seg_80()
+ _seg_81()
) # type: Tuple[Union[Tuple[int, str], Tuple[int, str, str]], ...]
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/idna/uts46data.py
|
Python
|
mit
| 206,539 |
# coding: utf-8
from .exceptions import *
from .ext import ExtType, Timestamp
import os
import sys
version = (1, 0, 4)
__version__ = "1.0.4"
if os.environ.get("MSGPACK_PUREPYTHON") or sys.version_info[0] == 2:
from .fallback import Packer, unpackb, Unpacker
else:
try:
from ._cmsgpack import Packer, unpackb, Unpacker
except ImportError:
from .fallback import Packer, unpackb, Unpacker
def pack(o, stream, **kwargs):
"""
Pack object `o` and write it to `stream`
See :class:`Packer` for options.
"""
packer = Packer(**kwargs)
stream.write(packer.pack(o))
def packb(o, **kwargs):
"""
Pack object `o` and return packed bytes
See :class:`Packer` for options.
"""
return Packer(**kwargs).pack(o)
def unpack(stream, **kwargs):
"""
Unpack an object from `stream`.
Raises `ExtraData` when `stream` contains extra bytes.
See :class:`Unpacker` for options.
"""
data = stream.read()
return unpackb(data, **kwargs)
# alias for compatibility to simplejson/marshal/pickle.
load = unpack
loads = unpackb
dump = pack
dumps = packb
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/msgpack/__init__.py
|
Python
|
mit
| 1,132 |
class UnpackException(Exception):
"""Base class for some exceptions raised while unpacking.
NOTE: unpack may raise exception other than subclass of
UnpackException. If you want to catch all error, catch
Exception instead.
"""
class BufferFull(UnpackException):
pass
class OutOfData(UnpackException):
pass
class FormatError(ValueError, UnpackException):
"""Invalid msgpack format"""
class StackError(ValueError, UnpackException):
"""Too nested"""
# Deprecated. Use ValueError instead
UnpackValueError = ValueError
class ExtraData(UnpackValueError):
"""ExtraData is raised when there is trailing data.
This exception is raised while only one-shot (not streaming)
unpack.
"""
def __init__(self, unpacked, extra):
self.unpacked = unpacked
self.extra = extra
def __str__(self):
return "unpack(b) received extra data."
# Deprecated. Use Exception instead to catch all exception during packing.
PackException = Exception
PackValueError = ValueError
PackOverflowError = OverflowError
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/msgpack/exceptions.py
|
Python
|
mit
| 1,081 |
# coding: utf-8
from collections import namedtuple
import datetime
import sys
import struct
PY2 = sys.version_info[0] == 2
if PY2:
int_types = (int, long)
_utc = None
else:
int_types = int
try:
_utc = datetime.timezone.utc
except AttributeError:
_utc = datetime.timezone(datetime.timedelta(0))
class ExtType(namedtuple("ExtType", "code data")):
"""ExtType represents ext type in msgpack."""
def __new__(cls, code, data):
if not isinstance(code, int):
raise TypeError("code must be int")
if not isinstance(data, bytes):
raise TypeError("data must be bytes")
if not 0 <= code <= 127:
raise ValueError("code must be 0~127")
return super(ExtType, cls).__new__(cls, code, data)
class Timestamp(object):
"""Timestamp represents the Timestamp extension type in msgpack.
When built with Cython, msgpack uses C methods to pack and unpack `Timestamp`. When using pure-Python
msgpack, :func:`to_bytes` and :func:`from_bytes` are used to pack and unpack `Timestamp`.
This class is immutable: Do not override seconds and nanoseconds.
"""
__slots__ = ["seconds", "nanoseconds"]
def __init__(self, seconds, nanoseconds=0):
"""Initialize a Timestamp object.
:param int seconds:
Number of seconds since the UNIX epoch (00:00:00 UTC Jan 1 1970, minus leap seconds).
May be negative.
:param int nanoseconds:
Number of nanoseconds to add to `seconds` to get fractional time.
Maximum is 999_999_999. Default is 0.
Note: Negative times (before the UNIX epoch) are represented as negative seconds + positive ns.
"""
if not isinstance(seconds, int_types):
raise TypeError("seconds must be an interger")
if not isinstance(nanoseconds, int_types):
raise TypeError("nanoseconds must be an integer")
if not (0 <= nanoseconds < 10**9):
raise ValueError(
"nanoseconds must be a non-negative integer less than 999999999."
)
self.seconds = seconds
self.nanoseconds = nanoseconds
def __repr__(self):
"""String representation of Timestamp."""
return "Timestamp(seconds={0}, nanoseconds={1})".format(
self.seconds, self.nanoseconds
)
def __eq__(self, other):
"""Check for equality with another Timestamp object"""
if type(other) is self.__class__:
return (
self.seconds == other.seconds and self.nanoseconds == other.nanoseconds
)
return False
def __ne__(self, other):
"""not-equals method (see :func:`__eq__()`)"""
return not self.__eq__(other)
def __hash__(self):
return hash((self.seconds, self.nanoseconds))
@staticmethod
def from_bytes(b):
"""Unpack bytes into a `Timestamp` object.
Used for pure-Python msgpack unpacking.
:param b: Payload from msgpack ext message with code -1
:type b: bytes
:returns: Timestamp object unpacked from msgpack ext payload
:rtype: Timestamp
"""
if len(b) == 4:
seconds = struct.unpack("!L", b)[0]
nanoseconds = 0
elif len(b) == 8:
data64 = struct.unpack("!Q", b)[0]
seconds = data64 & 0x00000003FFFFFFFF
nanoseconds = data64 >> 34
elif len(b) == 12:
nanoseconds, seconds = struct.unpack("!Iq", b)
else:
raise ValueError(
"Timestamp type can only be created from 32, 64, or 96-bit byte objects"
)
return Timestamp(seconds, nanoseconds)
def to_bytes(self):
"""Pack this Timestamp object into bytes.
Used for pure-Python msgpack packing.
:returns data: Payload for EXT message with code -1 (timestamp type)
:rtype: bytes
"""
if (self.seconds >> 34) == 0: # seconds is non-negative and fits in 34 bits
data64 = self.nanoseconds << 34 | self.seconds
if data64 & 0xFFFFFFFF00000000 == 0:
# nanoseconds is zero and seconds < 2**32, so timestamp 32
data = struct.pack("!L", data64)
else:
# timestamp 64
data = struct.pack("!Q", data64)
else:
# timestamp 96
data = struct.pack("!Iq", self.nanoseconds, self.seconds)
return data
@staticmethod
def from_unix(unix_sec):
"""Create a Timestamp from posix timestamp in seconds.
:param unix_float: Posix timestamp in seconds.
:type unix_float: int or float.
"""
seconds = int(unix_sec // 1)
nanoseconds = int((unix_sec % 1) * 10**9)
return Timestamp(seconds, nanoseconds)
def to_unix(self):
"""Get the timestamp as a floating-point value.
:returns: posix timestamp
:rtype: float
"""
return self.seconds + self.nanoseconds / 1e9
@staticmethod
def from_unix_nano(unix_ns):
"""Create a Timestamp from posix timestamp in nanoseconds.
:param int unix_ns: Posix timestamp in nanoseconds.
:rtype: Timestamp
"""
return Timestamp(*divmod(unix_ns, 10**9))
def to_unix_nano(self):
"""Get the timestamp as a unixtime in nanoseconds.
:returns: posix timestamp in nanoseconds
:rtype: int
"""
return self.seconds * 10**9 + self.nanoseconds
def to_datetime(self):
"""Get the timestamp as a UTC datetime.
Python 2 is not supported.
:rtype: datetime.
"""
return datetime.datetime.fromtimestamp(0, _utc) + datetime.timedelta(
seconds=self.to_unix()
)
@staticmethod
def from_datetime(dt):
"""Create a Timestamp from datetime with tzinfo.
Python 2 is not supported.
:rtype: Timestamp
"""
return Timestamp.from_unix(dt.timestamp())
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/msgpack/ext.py
|
Python
|
mit
| 6,080 |
"""Fallback pure Python implementation of msgpack"""
from datetime import datetime as _DateTime
import sys
import struct
PY2 = sys.version_info[0] == 2
if PY2:
int_types = (int, long)
def dict_iteritems(d):
return d.iteritems()
else:
int_types = int
unicode = str
xrange = range
def dict_iteritems(d):
return d.items()
if sys.version_info < (3, 5):
# Ugly hack...
RecursionError = RuntimeError
def _is_recursionerror(e):
return (
len(e.args) == 1
and isinstance(e.args[0], str)
and e.args[0].startswith("maximum recursion depth exceeded")
)
else:
def _is_recursionerror(e):
return True
if hasattr(sys, "pypy_version_info"):
# StringIO is slow on PyPy, StringIO is faster. However: PyPy's own
# StringBuilder is fastest.
from __pypy__ import newlist_hint
try:
from __pypy__.builders import BytesBuilder as StringBuilder
except ImportError:
from __pypy__.builders import StringBuilder
USING_STRINGBUILDER = True
class StringIO(object):
def __init__(self, s=b""):
if s:
self.builder = StringBuilder(len(s))
self.builder.append(s)
else:
self.builder = StringBuilder()
def write(self, s):
if isinstance(s, memoryview):
s = s.tobytes()
elif isinstance(s, bytearray):
s = bytes(s)
self.builder.append(s)
def getvalue(self):
return self.builder.build()
else:
USING_STRINGBUILDER = False
from io import BytesIO as StringIO
newlist_hint = lambda size: []
from .exceptions import BufferFull, OutOfData, ExtraData, FormatError, StackError
from .ext import ExtType, Timestamp
EX_SKIP = 0
EX_CONSTRUCT = 1
EX_READ_ARRAY_HEADER = 2
EX_READ_MAP_HEADER = 3
TYPE_IMMEDIATE = 0
TYPE_ARRAY = 1
TYPE_MAP = 2
TYPE_RAW = 3
TYPE_BIN = 4
TYPE_EXT = 5
DEFAULT_RECURSE_LIMIT = 511
def _check_type_strict(obj, t, type=type, tuple=tuple):
if type(t) is tuple:
return type(obj) in t
else:
return type(obj) is t
def _get_data_from_buffer(obj):
view = memoryview(obj)
if view.itemsize != 1:
raise ValueError("cannot unpack from multi-byte object")
return view
def unpackb(packed, **kwargs):
"""
Unpack an object from `packed`.
Raises ``ExtraData`` when *packed* contains extra bytes.
Raises ``ValueError`` when *packed* is incomplete.
Raises ``FormatError`` when *packed* is not valid msgpack.
Raises ``StackError`` when *packed* contains too nested.
Other exceptions can be raised during unpacking.
See :class:`Unpacker` for options.
"""
unpacker = Unpacker(None, max_buffer_size=len(packed), **kwargs)
unpacker.feed(packed)
try:
ret = unpacker._unpack()
except OutOfData:
raise ValueError("Unpack failed: incomplete input")
except RecursionError as e:
if _is_recursionerror(e):
raise StackError
raise
if unpacker._got_extradata():
raise ExtraData(ret, unpacker._get_extradata())
return ret
if sys.version_info < (2, 7, 6):
def _unpack_from(f, b, o=0):
"""Explicit type cast for legacy struct.unpack_from"""
return struct.unpack_from(f, bytes(b), o)
else:
_unpack_from = struct.unpack_from
_NO_FORMAT_USED = ""
_MSGPACK_HEADERS = {
0xC4: (1, _NO_FORMAT_USED, TYPE_BIN),
0xC5: (2, ">H", TYPE_BIN),
0xC6: (4, ">I", TYPE_BIN),
0xC7: (2, "Bb", TYPE_EXT),
0xC8: (3, ">Hb", TYPE_EXT),
0xC9: (5, ">Ib", TYPE_EXT),
0xCA: (4, ">f"),
0xCB: (8, ">d"),
0xCC: (1, _NO_FORMAT_USED),
0xCD: (2, ">H"),
0xCE: (4, ">I"),
0xCF: (8, ">Q"),
0xD0: (1, "b"),
0xD1: (2, ">h"),
0xD2: (4, ">i"),
0xD3: (8, ">q"),
0xD4: (1, "b1s", TYPE_EXT),
0xD5: (2, "b2s", TYPE_EXT),
0xD6: (4, "b4s", TYPE_EXT),
0xD7: (8, "b8s", TYPE_EXT),
0xD8: (16, "b16s", TYPE_EXT),
0xD9: (1, _NO_FORMAT_USED, TYPE_RAW),
0xDA: (2, ">H", TYPE_RAW),
0xDB: (4, ">I", TYPE_RAW),
0xDC: (2, ">H", TYPE_ARRAY),
0xDD: (4, ">I", TYPE_ARRAY),
0xDE: (2, ">H", TYPE_MAP),
0xDF: (4, ">I", TYPE_MAP),
}
class Unpacker(object):
"""Streaming unpacker.
Arguments:
:param file_like:
File-like object having `.read(n)` method.
If specified, unpacker reads serialized data from it and :meth:`feed()` is not usable.
:param int read_size:
Used as `file_like.read(read_size)`. (default: `min(16*1024, max_buffer_size)`)
:param bool use_list:
If true, unpack msgpack array to Python list.
Otherwise, unpack to Python tuple. (default: True)
:param bool raw:
If true, unpack msgpack raw to Python bytes.
Otherwise, unpack to Python str by decoding with UTF-8 encoding (default).
:param int timestamp:
Control how timestamp type is unpacked:
0 - Timestamp
1 - float (Seconds from the EPOCH)
2 - int (Nanoseconds from the EPOCH)
3 - datetime.datetime (UTC). Python 2 is not supported.
:param bool strict_map_key:
If true (default), only str or bytes are accepted for map (dict) keys.
:param callable object_hook:
When specified, it should be callable.
Unpacker calls it with a dict argument after unpacking msgpack map.
(See also simplejson)
:param callable object_pairs_hook:
When specified, it should be callable.
Unpacker calls it with a list of key-value pairs after unpacking msgpack map.
(See also simplejson)
:param str unicode_errors:
The error handler for decoding unicode. (default: 'strict')
This option should be used only when you have msgpack data which
contains invalid UTF-8 string.
:param int max_buffer_size:
Limits size of data waiting unpacked. 0 means 2**32-1.
The default value is 100*1024*1024 (100MiB).
Raises `BufferFull` exception when it is insufficient.
You should set this parameter when unpacking data from untrusted source.
:param int max_str_len:
Deprecated, use *max_buffer_size* instead.
Limits max length of str. (default: max_buffer_size)
:param int max_bin_len:
Deprecated, use *max_buffer_size* instead.
Limits max length of bin. (default: max_buffer_size)
:param int max_array_len:
Limits max length of array.
(default: max_buffer_size)
:param int max_map_len:
Limits max length of map.
(default: max_buffer_size//2)
:param int max_ext_len:
Deprecated, use *max_buffer_size* instead.
Limits max size of ext type. (default: max_buffer_size)
Example of streaming deserialize from file-like object::
unpacker = Unpacker(file_like)
for o in unpacker:
process(o)
Example of streaming deserialize from socket::
unpacker = Unpacker()
while True:
buf = sock.recv(1024**2)
if not buf:
break
unpacker.feed(buf)
for o in unpacker:
process(o)
Raises ``ExtraData`` when *packed* contains extra bytes.
Raises ``OutOfData`` when *packed* is incomplete.
Raises ``FormatError`` when *packed* is not valid msgpack.
Raises ``StackError`` when *packed* contains too nested.
Other exceptions can be raised during unpacking.
"""
def __init__(
self,
file_like=None,
read_size=0,
use_list=True,
raw=False,
timestamp=0,
strict_map_key=True,
object_hook=None,
object_pairs_hook=None,
list_hook=None,
unicode_errors=None,
max_buffer_size=100 * 1024 * 1024,
ext_hook=ExtType,
max_str_len=-1,
max_bin_len=-1,
max_array_len=-1,
max_map_len=-1,
max_ext_len=-1,
):
if unicode_errors is None:
unicode_errors = "strict"
if file_like is None:
self._feeding = True
else:
if not callable(file_like.read):
raise TypeError("`file_like.read` must be callable")
self.file_like = file_like
self._feeding = False
#: array of bytes fed.
self._buffer = bytearray()
#: Which position we currently reads
self._buff_i = 0
# When Unpacker is used as an iterable, between the calls to next(),
# the buffer is not "consumed" completely, for efficiency sake.
# Instead, it is done sloppily. To make sure we raise BufferFull at
# the correct moments, we have to keep track of how sloppy we were.
# Furthermore, when the buffer is incomplete (that is: in the case
# we raise an OutOfData) we need to rollback the buffer to the correct
# state, which _buf_checkpoint records.
self._buf_checkpoint = 0
if not max_buffer_size:
max_buffer_size = 2**31 - 1
if max_str_len == -1:
max_str_len = max_buffer_size
if max_bin_len == -1:
max_bin_len = max_buffer_size
if max_array_len == -1:
max_array_len = max_buffer_size
if max_map_len == -1:
max_map_len = max_buffer_size // 2
if max_ext_len == -1:
max_ext_len = max_buffer_size
self._max_buffer_size = max_buffer_size
if read_size > self._max_buffer_size:
raise ValueError("read_size must be smaller than max_buffer_size")
self._read_size = read_size or min(self._max_buffer_size, 16 * 1024)
self._raw = bool(raw)
self._strict_map_key = bool(strict_map_key)
self._unicode_errors = unicode_errors
self._use_list = use_list
if not (0 <= timestamp <= 3):
raise ValueError("timestamp must be 0..3")
self._timestamp = timestamp
self._list_hook = list_hook
self._object_hook = object_hook
self._object_pairs_hook = object_pairs_hook
self._ext_hook = ext_hook
self._max_str_len = max_str_len
self._max_bin_len = max_bin_len
self._max_array_len = max_array_len
self._max_map_len = max_map_len
self._max_ext_len = max_ext_len
self._stream_offset = 0
if list_hook is not None and not callable(list_hook):
raise TypeError("`list_hook` is not callable")
if object_hook is not None and not callable(object_hook):
raise TypeError("`object_hook` is not callable")
if object_pairs_hook is not None and not callable(object_pairs_hook):
raise TypeError("`object_pairs_hook` is not callable")
if object_hook is not None and object_pairs_hook is not None:
raise TypeError(
"object_pairs_hook and object_hook are mutually " "exclusive"
)
if not callable(ext_hook):
raise TypeError("`ext_hook` is not callable")
def feed(self, next_bytes):
assert self._feeding
view = _get_data_from_buffer(next_bytes)
if len(self._buffer) - self._buff_i + len(view) > self._max_buffer_size:
raise BufferFull
# Strip buffer before checkpoint before reading file.
if self._buf_checkpoint > 0:
del self._buffer[: self._buf_checkpoint]
self._buff_i -= self._buf_checkpoint
self._buf_checkpoint = 0
# Use extend here: INPLACE_ADD += doesn't reliably typecast memoryview in jython
self._buffer.extend(view)
def _consume(self):
"""Gets rid of the used parts of the buffer."""
self._stream_offset += self._buff_i - self._buf_checkpoint
self._buf_checkpoint = self._buff_i
def _got_extradata(self):
return self._buff_i < len(self._buffer)
def _get_extradata(self):
return self._buffer[self._buff_i :]
def read_bytes(self, n):
ret = self._read(n, raise_outofdata=False)
self._consume()
return ret
def _read(self, n, raise_outofdata=True):
# (int) -> bytearray
self._reserve(n, raise_outofdata=raise_outofdata)
i = self._buff_i
ret = self._buffer[i : i + n]
self._buff_i = i + len(ret)
return ret
def _reserve(self, n, raise_outofdata=True):
remain_bytes = len(self._buffer) - self._buff_i - n
# Fast path: buffer has n bytes already
if remain_bytes >= 0:
return
if self._feeding:
self._buff_i = self._buf_checkpoint
raise OutOfData
# Strip buffer before checkpoint before reading file.
if self._buf_checkpoint > 0:
del self._buffer[: self._buf_checkpoint]
self._buff_i -= self._buf_checkpoint
self._buf_checkpoint = 0
# Read from file
remain_bytes = -remain_bytes
if remain_bytes + len(self._buffer) > self._max_buffer_size:
raise BufferFull
while remain_bytes > 0:
to_read_bytes = max(self._read_size, remain_bytes)
read_data = self.file_like.read(to_read_bytes)
if not read_data:
break
assert isinstance(read_data, bytes)
self._buffer += read_data
remain_bytes -= len(read_data)
if len(self._buffer) < n + self._buff_i and raise_outofdata:
self._buff_i = 0 # rollback
raise OutOfData
def _read_header(self):
typ = TYPE_IMMEDIATE
n = 0
obj = None
self._reserve(1)
b = self._buffer[self._buff_i]
self._buff_i += 1
if b & 0b10000000 == 0:
obj = b
elif b & 0b11100000 == 0b11100000:
obj = -1 - (b ^ 0xFF)
elif b & 0b11100000 == 0b10100000:
n = b & 0b00011111
typ = TYPE_RAW
if n > self._max_str_len:
raise ValueError("%s exceeds max_str_len(%s)" % (n, self._max_str_len))
obj = self._read(n)
elif b & 0b11110000 == 0b10010000:
n = b & 0b00001111
typ = TYPE_ARRAY
if n > self._max_array_len:
raise ValueError(
"%s exceeds max_array_len(%s)" % (n, self._max_array_len)
)
elif b & 0b11110000 == 0b10000000:
n = b & 0b00001111
typ = TYPE_MAP
if n > self._max_map_len:
raise ValueError("%s exceeds max_map_len(%s)" % (n, self._max_map_len))
elif b == 0xC0:
obj = None
elif b == 0xC2:
obj = False
elif b == 0xC3:
obj = True
elif 0xC4 <= b <= 0xC6:
size, fmt, typ = _MSGPACK_HEADERS[b]
self._reserve(size)
if len(fmt) > 0:
n = _unpack_from(fmt, self._buffer, self._buff_i)[0]
else:
n = self._buffer[self._buff_i]
self._buff_i += size
if n > self._max_bin_len:
raise ValueError("%s exceeds max_bin_len(%s)" % (n, self._max_bin_len))
obj = self._read(n)
elif 0xC7 <= b <= 0xC9:
size, fmt, typ = _MSGPACK_HEADERS[b]
self._reserve(size)
L, n = _unpack_from(fmt, self._buffer, self._buff_i)
self._buff_i += size
if L > self._max_ext_len:
raise ValueError("%s exceeds max_ext_len(%s)" % (L, self._max_ext_len))
obj = self._read(L)
elif 0xCA <= b <= 0xD3:
size, fmt = _MSGPACK_HEADERS[b]
self._reserve(size)
if len(fmt) > 0:
obj = _unpack_from(fmt, self._buffer, self._buff_i)[0]
else:
obj = self._buffer[self._buff_i]
self._buff_i += size
elif 0xD4 <= b <= 0xD8:
size, fmt, typ = _MSGPACK_HEADERS[b]
if self._max_ext_len < size:
raise ValueError(
"%s exceeds max_ext_len(%s)" % (size, self._max_ext_len)
)
self._reserve(size + 1)
n, obj = _unpack_from(fmt, self._buffer, self._buff_i)
self._buff_i += size + 1
elif 0xD9 <= b <= 0xDB:
size, fmt, typ = _MSGPACK_HEADERS[b]
self._reserve(size)
if len(fmt) > 0:
(n,) = _unpack_from(fmt, self._buffer, self._buff_i)
else:
n = self._buffer[self._buff_i]
self._buff_i += size
if n > self._max_str_len:
raise ValueError("%s exceeds max_str_len(%s)" % (n, self._max_str_len))
obj = self._read(n)
elif 0xDC <= b <= 0xDD:
size, fmt, typ = _MSGPACK_HEADERS[b]
self._reserve(size)
(n,) = _unpack_from(fmt, self._buffer, self._buff_i)
self._buff_i += size
if n > self._max_array_len:
raise ValueError(
"%s exceeds max_array_len(%s)" % (n, self._max_array_len)
)
elif 0xDE <= b <= 0xDF:
size, fmt, typ = _MSGPACK_HEADERS[b]
self._reserve(size)
(n,) = _unpack_from(fmt, self._buffer, self._buff_i)
self._buff_i += size
if n > self._max_map_len:
raise ValueError("%s exceeds max_map_len(%s)" % (n, self._max_map_len))
else:
raise FormatError("Unknown header: 0x%x" % b)
return typ, n, obj
def _unpack(self, execute=EX_CONSTRUCT):
typ, n, obj = self._read_header()
if execute == EX_READ_ARRAY_HEADER:
if typ != TYPE_ARRAY:
raise ValueError("Expected array")
return n
if execute == EX_READ_MAP_HEADER:
if typ != TYPE_MAP:
raise ValueError("Expected map")
return n
# TODO should we eliminate the recursion?
if typ == TYPE_ARRAY:
if execute == EX_SKIP:
for i in xrange(n):
# TODO check whether we need to call `list_hook`
self._unpack(EX_SKIP)
return
ret = newlist_hint(n)
for i in xrange(n):
ret.append(self._unpack(EX_CONSTRUCT))
if self._list_hook is not None:
ret = self._list_hook(ret)
# TODO is the interaction between `list_hook` and `use_list` ok?
return ret if self._use_list else tuple(ret)
if typ == TYPE_MAP:
if execute == EX_SKIP:
for i in xrange(n):
# TODO check whether we need to call hooks
self._unpack(EX_SKIP)
self._unpack(EX_SKIP)
return
if self._object_pairs_hook is not None:
ret = self._object_pairs_hook(
(self._unpack(EX_CONSTRUCT), self._unpack(EX_CONSTRUCT))
for _ in xrange(n)
)
else:
ret = {}
for _ in xrange(n):
key = self._unpack(EX_CONSTRUCT)
if self._strict_map_key and type(key) not in (unicode, bytes):
raise ValueError(
"%s is not allowed for map key" % str(type(key))
)
if not PY2 and type(key) is str:
key = sys.intern(key)
ret[key] = self._unpack(EX_CONSTRUCT)
if self._object_hook is not None:
ret = self._object_hook(ret)
return ret
if execute == EX_SKIP:
return
if typ == TYPE_RAW:
if self._raw:
obj = bytes(obj)
else:
obj = obj.decode("utf_8", self._unicode_errors)
return obj
if typ == TYPE_BIN:
return bytes(obj)
if typ == TYPE_EXT:
if n == -1: # timestamp
ts = Timestamp.from_bytes(bytes(obj))
if self._timestamp == 1:
return ts.to_unix()
elif self._timestamp == 2:
return ts.to_unix_nano()
elif self._timestamp == 3:
return ts.to_datetime()
else:
return ts
else:
return self._ext_hook(n, bytes(obj))
assert typ == TYPE_IMMEDIATE
return obj
def __iter__(self):
return self
def __next__(self):
try:
ret = self._unpack(EX_CONSTRUCT)
self._consume()
return ret
except OutOfData:
self._consume()
raise StopIteration
except RecursionError:
raise StackError
next = __next__
def skip(self):
self._unpack(EX_SKIP)
self._consume()
def unpack(self):
try:
ret = self._unpack(EX_CONSTRUCT)
except RecursionError:
raise StackError
self._consume()
return ret
def read_array_header(self):
ret = self._unpack(EX_READ_ARRAY_HEADER)
self._consume()
return ret
def read_map_header(self):
ret = self._unpack(EX_READ_MAP_HEADER)
self._consume()
return ret
def tell(self):
return self._stream_offset
class Packer(object):
"""
MessagePack Packer
Usage::
packer = Packer()
astream.write(packer.pack(a))
astream.write(packer.pack(b))
Packer's constructor has some keyword arguments:
:param callable default:
Convert user type to builtin type that Packer supports.
See also simplejson's document.
:param bool use_single_float:
Use single precision float type for float. (default: False)
:param bool autoreset:
Reset buffer after each pack and return its content as `bytes`. (default: True).
If set this to false, use `bytes()` to get content and `.reset()` to clear buffer.
:param bool use_bin_type:
Use bin type introduced in msgpack spec 2.0 for bytes.
It also enables str8 type for unicode. (default: True)
:param bool strict_types:
If set to true, types will be checked to be exact. Derived classes
from serializable types will not be serialized and will be
treated as unsupported type and forwarded to default.
Additionally tuples will not be serialized as lists.
This is useful when trying to implement accurate serialization
for python types.
:param bool datetime:
If set to true, datetime with tzinfo is packed into Timestamp type.
Note that the tzinfo is stripped in the timestamp.
You can get UTC datetime with `timestamp=3` option of the Unpacker.
(Python 2 is not supported).
:param str unicode_errors:
The error handler for encoding unicode. (default: 'strict')
DO NOT USE THIS!! This option is kept for very specific usage.
Example of streaming deserialize from file-like object::
unpacker = Unpacker(file_like)
for o in unpacker:
process(o)
Example of streaming deserialize from socket::
unpacker = Unpacker()
while True:
buf = sock.recv(1024**2)
if not buf:
break
unpacker.feed(buf)
for o in unpacker:
process(o)
Raises ``ExtraData`` when *packed* contains extra bytes.
Raises ``OutOfData`` when *packed* is incomplete.
Raises ``FormatError`` when *packed* is not valid msgpack.
Raises ``StackError`` when *packed* contains too nested.
Other exceptions can be raised during unpacking.
"""
def __init__(
self,
default=None,
use_single_float=False,
autoreset=True,
use_bin_type=True,
strict_types=False,
datetime=False,
unicode_errors=None,
):
self._strict_types = strict_types
self._use_float = use_single_float
self._autoreset = autoreset
self._use_bin_type = use_bin_type
self._buffer = StringIO()
if PY2 and datetime:
raise ValueError("datetime is not supported in Python 2")
self._datetime = bool(datetime)
self._unicode_errors = unicode_errors or "strict"
if default is not None:
if not callable(default):
raise TypeError("default must be callable")
self._default = default
def _pack(
self,
obj,
nest_limit=DEFAULT_RECURSE_LIMIT,
check=isinstance,
check_type_strict=_check_type_strict,
):
default_used = False
if self._strict_types:
check = check_type_strict
list_types = list
else:
list_types = (list, tuple)
while True:
if nest_limit < 0:
raise ValueError("recursion limit exceeded")
if obj is None:
return self._buffer.write(b"\xc0")
if check(obj, bool):
if obj:
return self._buffer.write(b"\xc3")
return self._buffer.write(b"\xc2")
if check(obj, int_types):
if 0 <= obj < 0x80:
return self._buffer.write(struct.pack("B", obj))
if -0x20 <= obj < 0:
return self._buffer.write(struct.pack("b", obj))
if 0x80 <= obj <= 0xFF:
return self._buffer.write(struct.pack("BB", 0xCC, obj))
if -0x80 <= obj < 0:
return self._buffer.write(struct.pack(">Bb", 0xD0, obj))
if 0xFF < obj <= 0xFFFF:
return self._buffer.write(struct.pack(">BH", 0xCD, obj))
if -0x8000 <= obj < -0x80:
return self._buffer.write(struct.pack(">Bh", 0xD1, obj))
if 0xFFFF < obj <= 0xFFFFFFFF:
return self._buffer.write(struct.pack(">BI", 0xCE, obj))
if -0x80000000 <= obj < -0x8000:
return self._buffer.write(struct.pack(">Bi", 0xD2, obj))
if 0xFFFFFFFF < obj <= 0xFFFFFFFFFFFFFFFF:
return self._buffer.write(struct.pack(">BQ", 0xCF, obj))
if -0x8000000000000000 <= obj < -0x80000000:
return self._buffer.write(struct.pack(">Bq", 0xD3, obj))
if not default_used and self._default is not None:
obj = self._default(obj)
default_used = True
continue
raise OverflowError("Integer value out of range")
if check(obj, (bytes, bytearray)):
n = len(obj)
if n >= 2**32:
raise ValueError("%s is too large" % type(obj).__name__)
self._pack_bin_header(n)
return self._buffer.write(obj)
if check(obj, unicode):
obj = obj.encode("utf-8", self._unicode_errors)
n = len(obj)
if n >= 2**32:
raise ValueError("String is too large")
self._pack_raw_header(n)
return self._buffer.write(obj)
if check(obj, memoryview):
n = len(obj) * obj.itemsize
if n >= 2**32:
raise ValueError("Memoryview is too large")
self._pack_bin_header(n)
return self._buffer.write(obj)
if check(obj, float):
if self._use_float:
return self._buffer.write(struct.pack(">Bf", 0xCA, obj))
return self._buffer.write(struct.pack(">Bd", 0xCB, obj))
if check(obj, (ExtType, Timestamp)):
if check(obj, Timestamp):
code = -1
data = obj.to_bytes()
else:
code = obj.code
data = obj.data
assert isinstance(code, int)
assert isinstance(data, bytes)
L = len(data)
if L == 1:
self._buffer.write(b"\xd4")
elif L == 2:
self._buffer.write(b"\xd5")
elif L == 4:
self._buffer.write(b"\xd6")
elif L == 8:
self._buffer.write(b"\xd7")
elif L == 16:
self._buffer.write(b"\xd8")
elif L <= 0xFF:
self._buffer.write(struct.pack(">BB", 0xC7, L))
elif L <= 0xFFFF:
self._buffer.write(struct.pack(">BH", 0xC8, L))
else:
self._buffer.write(struct.pack(">BI", 0xC9, L))
self._buffer.write(struct.pack("b", code))
self._buffer.write(data)
return
if check(obj, list_types):
n = len(obj)
self._pack_array_header(n)
for i in xrange(n):
self._pack(obj[i], nest_limit - 1)
return
if check(obj, dict):
return self._pack_map_pairs(
len(obj), dict_iteritems(obj), nest_limit - 1
)
if self._datetime and check(obj, _DateTime) and obj.tzinfo is not None:
obj = Timestamp.from_datetime(obj)
default_used = 1
continue
if not default_used and self._default is not None:
obj = self._default(obj)
default_used = 1
continue
if self._datetime and check(obj, _DateTime):
raise ValueError("Cannot serialize %r where tzinfo=None" % (obj,))
raise TypeError("Cannot serialize %r" % (obj,))
def pack(self, obj):
try:
self._pack(obj)
except:
self._buffer = StringIO() # force reset
raise
if self._autoreset:
ret = self._buffer.getvalue()
self._buffer = StringIO()
return ret
def pack_map_pairs(self, pairs):
self._pack_map_pairs(len(pairs), pairs)
if self._autoreset:
ret = self._buffer.getvalue()
self._buffer = StringIO()
return ret
def pack_array_header(self, n):
if n >= 2**32:
raise ValueError
self._pack_array_header(n)
if self._autoreset:
ret = self._buffer.getvalue()
self._buffer = StringIO()
return ret
def pack_map_header(self, n):
if n >= 2**32:
raise ValueError
self._pack_map_header(n)
if self._autoreset:
ret = self._buffer.getvalue()
self._buffer = StringIO()
return ret
def pack_ext_type(self, typecode, data):
if not isinstance(typecode, int):
raise TypeError("typecode must have int type.")
if not 0 <= typecode <= 127:
raise ValueError("typecode should be 0-127")
if not isinstance(data, bytes):
raise TypeError("data must have bytes type")
L = len(data)
if L > 0xFFFFFFFF:
raise ValueError("Too large data")
if L == 1:
self._buffer.write(b"\xd4")
elif L == 2:
self._buffer.write(b"\xd5")
elif L == 4:
self._buffer.write(b"\xd6")
elif L == 8:
self._buffer.write(b"\xd7")
elif L == 16:
self._buffer.write(b"\xd8")
elif L <= 0xFF:
self._buffer.write(b"\xc7" + struct.pack("B", L))
elif L <= 0xFFFF:
self._buffer.write(b"\xc8" + struct.pack(">H", L))
else:
self._buffer.write(b"\xc9" + struct.pack(">I", L))
self._buffer.write(struct.pack("B", typecode))
self._buffer.write(data)
def _pack_array_header(self, n):
if n <= 0x0F:
return self._buffer.write(struct.pack("B", 0x90 + n))
if n <= 0xFFFF:
return self._buffer.write(struct.pack(">BH", 0xDC, n))
if n <= 0xFFFFFFFF:
return self._buffer.write(struct.pack(">BI", 0xDD, n))
raise ValueError("Array is too large")
def _pack_map_header(self, n):
if n <= 0x0F:
return self._buffer.write(struct.pack("B", 0x80 + n))
if n <= 0xFFFF:
return self._buffer.write(struct.pack(">BH", 0xDE, n))
if n <= 0xFFFFFFFF:
return self._buffer.write(struct.pack(">BI", 0xDF, n))
raise ValueError("Dict is too large")
def _pack_map_pairs(self, n, pairs, nest_limit=DEFAULT_RECURSE_LIMIT):
self._pack_map_header(n)
for (k, v) in pairs:
self._pack(k, nest_limit - 1)
self._pack(v, nest_limit - 1)
def _pack_raw_header(self, n):
if n <= 0x1F:
self._buffer.write(struct.pack("B", 0xA0 + n))
elif self._use_bin_type and n <= 0xFF:
self._buffer.write(struct.pack(">BB", 0xD9, n))
elif n <= 0xFFFF:
self._buffer.write(struct.pack(">BH", 0xDA, n))
elif n <= 0xFFFFFFFF:
self._buffer.write(struct.pack(">BI", 0xDB, n))
else:
raise ValueError("Raw is too large")
def _pack_bin_header(self, n):
if not self._use_bin_type:
return self._pack_raw_header(n)
elif n <= 0xFF:
return self._buffer.write(struct.pack(">BB", 0xC4, n))
elif n <= 0xFFFF:
return self._buffer.write(struct.pack(">BH", 0xC5, n))
elif n <= 0xFFFFFFFF:
return self._buffer.write(struct.pack(">BI", 0xC6, n))
else:
raise ValueError("Bin is too large")
def bytes(self):
"""Return internal buffer contents as bytes object"""
return self._buffer.getvalue()
def reset(self):
"""Reset internal buffer.
This method is useful only when autoreset=False.
"""
self._buffer = StringIO()
def getbuffer(self):
"""Return view of internal buffer."""
if USING_STRINGBUILDER or PY2:
return memoryview(self.bytes())
else:
return self._buffer.getbuffer()
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/msgpack/fallback.py
|
Python
|
mit
| 34,557 |
# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
__all__ = [
"__title__",
"__summary__",
"__uri__",
"__version__",
"__author__",
"__email__",
"__license__",
"__copyright__",
]
__title__ = "packaging"
__summary__ = "Core utilities for Python packages"
__uri__ = "https://github.com/pypa/packaging"
__version__ = "21.3"
__author__ = "Donald Stufft and individual contributors"
__email__ = "donald@stufft.io"
__license__ = "BSD-2-Clause or Apache-2.0"
__copyright__ = "2014-2019 %s" % __author__
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/packaging/__about__.py
|
Python
|
mit
| 661 |
# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from .__about__ import (
__author__,
__copyright__,
__email__,
__license__,
__summary__,
__title__,
__uri__,
__version__,
)
__all__ = [
"__title__",
"__summary__",
"__uri__",
"__version__",
"__author__",
"__email__",
"__license__",
"__copyright__",
]
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/packaging/__init__.py
|
Python
|
mit
| 497 |
import collections
import functools
import os
import re
import struct
import sys
import warnings
from typing import IO, Dict, Iterator, NamedTuple, Optional, Tuple
# Python does not provide platform information at sufficient granularity to
# identify the architecture of the running executable in some cases, so we
# determine it dynamically by reading the information from the running
# process. This only applies on Linux, which uses the ELF format.
class _ELFFileHeader:
# https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header
class _InvalidELFFileHeader(ValueError):
"""
An invalid ELF file header was found.
"""
ELF_MAGIC_NUMBER = 0x7F454C46
ELFCLASS32 = 1
ELFCLASS64 = 2
ELFDATA2LSB = 1
ELFDATA2MSB = 2
EM_386 = 3
EM_S390 = 22
EM_ARM = 40
EM_X86_64 = 62
EF_ARM_ABIMASK = 0xFF000000
EF_ARM_ABI_VER5 = 0x05000000
EF_ARM_ABI_FLOAT_HARD = 0x00000400
def __init__(self, file: IO[bytes]) -> None:
def unpack(fmt: str) -> int:
try:
data = file.read(struct.calcsize(fmt))
result: Tuple[int, ...] = struct.unpack(fmt, data)
except struct.error:
raise _ELFFileHeader._InvalidELFFileHeader()
return result[0]
self.e_ident_magic = unpack(">I")
if self.e_ident_magic != self.ELF_MAGIC_NUMBER:
raise _ELFFileHeader._InvalidELFFileHeader()
self.e_ident_class = unpack("B")
if self.e_ident_class not in {self.ELFCLASS32, self.ELFCLASS64}:
raise _ELFFileHeader._InvalidELFFileHeader()
self.e_ident_data = unpack("B")
if self.e_ident_data not in {self.ELFDATA2LSB, self.ELFDATA2MSB}:
raise _ELFFileHeader._InvalidELFFileHeader()
self.e_ident_version = unpack("B")
self.e_ident_osabi = unpack("B")
self.e_ident_abiversion = unpack("B")
self.e_ident_pad = file.read(7)
format_h = "<H" if self.e_ident_data == self.ELFDATA2LSB else ">H"
format_i = "<I" if self.e_ident_data == self.ELFDATA2LSB else ">I"
format_q = "<Q" if self.e_ident_data == self.ELFDATA2LSB else ">Q"
format_p = format_i if self.e_ident_class == self.ELFCLASS32 else format_q
self.e_type = unpack(format_h)
self.e_machine = unpack(format_h)
self.e_version = unpack(format_i)
self.e_entry = unpack(format_p)
self.e_phoff = unpack(format_p)
self.e_shoff = unpack(format_p)
self.e_flags = unpack(format_i)
self.e_ehsize = unpack(format_h)
self.e_phentsize = unpack(format_h)
self.e_phnum = unpack(format_h)
self.e_shentsize = unpack(format_h)
self.e_shnum = unpack(format_h)
self.e_shstrndx = unpack(format_h)
def _get_elf_header() -> Optional[_ELFFileHeader]:
try:
with open(sys.executable, "rb") as f:
elf_header = _ELFFileHeader(f)
except (OSError, TypeError, _ELFFileHeader._InvalidELFFileHeader):
return None
return elf_header
def _is_linux_armhf() -> bool:
# hard-float ABI can be detected from the ELF header of the running
# process
# https://static.docs.arm.com/ihi0044/g/aaelf32.pdf
elf_header = _get_elf_header()
if elf_header is None:
return False
result = elf_header.e_ident_class == elf_header.ELFCLASS32
result &= elf_header.e_ident_data == elf_header.ELFDATA2LSB
result &= elf_header.e_machine == elf_header.EM_ARM
result &= (
elf_header.e_flags & elf_header.EF_ARM_ABIMASK
) == elf_header.EF_ARM_ABI_VER5
result &= (
elf_header.e_flags & elf_header.EF_ARM_ABI_FLOAT_HARD
) == elf_header.EF_ARM_ABI_FLOAT_HARD
return result
def _is_linux_i686() -> bool:
elf_header = _get_elf_header()
if elf_header is None:
return False
result = elf_header.e_ident_class == elf_header.ELFCLASS32
result &= elf_header.e_ident_data == elf_header.ELFDATA2LSB
result &= elf_header.e_machine == elf_header.EM_386
return result
def _have_compatible_abi(arch: str) -> bool:
if arch == "armv7l":
return _is_linux_armhf()
if arch == "i686":
return _is_linux_i686()
return arch in {"x86_64", "aarch64", "ppc64", "ppc64le", "s390x"}
# If glibc ever changes its major version, we need to know what the last
# minor version was, so we can build the complete list of all versions.
# For now, guess what the highest minor version might be, assume it will
# be 50 for testing. Once this actually happens, update the dictionary
# with the actual value.
_LAST_GLIBC_MINOR: Dict[int, int] = collections.defaultdict(lambda: 50)
class _GLibCVersion(NamedTuple):
major: int
minor: int
def _glibc_version_string_confstr() -> Optional[str]:
"""
Primary implementation of glibc_version_string using os.confstr.
"""
# os.confstr is quite a bit faster than ctypes.DLL. It's also less likely
# to be broken or missing. This strategy is used in the standard library
# platform module.
# https://github.com/python/cpython/blob/fcf1d003bf4f0100c/Lib/platform.py#L175-L183
try:
# os.confstr("CS_GNU_LIBC_VERSION") returns a string like "glibc 2.17".
version_string = os.confstr("CS_GNU_LIBC_VERSION")
assert version_string is not None
_, version = version_string.split()
except (AssertionError, AttributeError, OSError, ValueError):
# os.confstr() or CS_GNU_LIBC_VERSION not available (or a bad value)...
return None
return version
def _glibc_version_string_ctypes() -> Optional[str]:
"""
Fallback implementation of glibc_version_string using ctypes.
"""
try:
import ctypes
except ImportError:
return None
# ctypes.CDLL(None) internally calls dlopen(NULL), and as the dlopen
# manpage says, "If filename is NULL, then the returned handle is for the
# main program". This way we can let the linker do the work to figure out
# which libc our process is actually using.
#
# We must also handle the special case where the executable is not a
# dynamically linked executable. This can occur when using musl libc,
# for example. In this situation, dlopen() will error, leading to an
# OSError. Interestingly, at least in the case of musl, there is no
# errno set on the OSError. The single string argument used to construct
# OSError comes from libc itself and is therefore not portable to
# hard code here. In any case, failure to call dlopen() means we
# can proceed, so we bail on our attempt.
try:
process_namespace = ctypes.CDLL(None)
except OSError:
return None
try:
gnu_get_libc_version = process_namespace.gnu_get_libc_version
except AttributeError:
# Symbol doesn't exist -> therefore, we are not linked to
# glibc.
return None
# Call gnu_get_libc_version, which returns a string like "2.5"
gnu_get_libc_version.restype = ctypes.c_char_p
version_str: str = gnu_get_libc_version()
# py2 / py3 compatibility:
if not isinstance(version_str, str):
version_str = version_str.decode("ascii")
return version_str
def _glibc_version_string() -> Optional[str]:
"""Returns glibc version string, or None if not using glibc."""
return _glibc_version_string_confstr() or _glibc_version_string_ctypes()
def _parse_glibc_version(version_str: str) -> Tuple[int, int]:
"""Parse glibc version.
We use a regexp instead of str.split because we want to discard any
random junk that might come after the minor version -- this might happen
in patched/forked versions of glibc (e.g. Linaro's version of glibc
uses version strings like "2.20-2014.11"). See gh-3588.
"""
m = re.match(r"(?P<major>[0-9]+)\.(?P<minor>[0-9]+)", version_str)
if not m:
warnings.warn(
"Expected glibc version with 2 components major.minor,"
" got: %s" % version_str,
RuntimeWarning,
)
return -1, -1
return int(m.group("major")), int(m.group("minor"))
@functools.lru_cache()
def _get_glibc_version() -> Tuple[int, int]:
version_str = _glibc_version_string()
if version_str is None:
return (-1, -1)
return _parse_glibc_version(version_str)
# From PEP 513, PEP 600
def _is_compatible(name: str, arch: str, version: _GLibCVersion) -> bool:
sys_glibc = _get_glibc_version()
if sys_glibc < version:
return False
# Check for presence of _manylinux module.
try:
import _manylinux # noqa
except ImportError:
return True
if hasattr(_manylinux, "manylinux_compatible"):
result = _manylinux.manylinux_compatible(version[0], version[1], arch)
if result is not None:
return bool(result)
return True
if version == _GLibCVersion(2, 5):
if hasattr(_manylinux, "manylinux1_compatible"):
return bool(_manylinux.manylinux1_compatible)
if version == _GLibCVersion(2, 12):
if hasattr(_manylinux, "manylinux2010_compatible"):
return bool(_manylinux.manylinux2010_compatible)
if version == _GLibCVersion(2, 17):
if hasattr(_manylinux, "manylinux2014_compatible"):
return bool(_manylinux.manylinux2014_compatible)
return True
_LEGACY_MANYLINUX_MAP = {
# CentOS 7 w/ glibc 2.17 (PEP 599)
(2, 17): "manylinux2014",
# CentOS 6 w/ glibc 2.12 (PEP 571)
(2, 12): "manylinux2010",
# CentOS 5 w/ glibc 2.5 (PEP 513)
(2, 5): "manylinux1",
}
def platform_tags(linux: str, arch: str) -> Iterator[str]:
if not _have_compatible_abi(arch):
return
# Oldest glibc to be supported regardless of architecture is (2, 17).
too_old_glibc2 = _GLibCVersion(2, 16)
if arch in {"x86_64", "i686"}:
# On x86/i686 also oldest glibc to be supported is (2, 5).
too_old_glibc2 = _GLibCVersion(2, 4)
current_glibc = _GLibCVersion(*_get_glibc_version())
glibc_max_list = [current_glibc]
# We can assume compatibility across glibc major versions.
# https://sourceware.org/bugzilla/show_bug.cgi?id=24636
#
# Build a list of maximum glibc versions so that we can
# output the canonical list of all glibc from current_glibc
# down to too_old_glibc2, including all intermediary versions.
for glibc_major in range(current_glibc.major - 1, 1, -1):
glibc_minor = _LAST_GLIBC_MINOR[glibc_major]
glibc_max_list.append(_GLibCVersion(glibc_major, glibc_minor))
for glibc_max in glibc_max_list:
if glibc_max.major == too_old_glibc2.major:
min_minor = too_old_glibc2.minor
else:
# For other glibc major versions oldest supported is (x, 0).
min_minor = -1
for glibc_minor in range(glibc_max.minor, min_minor, -1):
glibc_version = _GLibCVersion(glibc_max.major, glibc_minor)
tag = "manylinux_{}_{}".format(*glibc_version)
if _is_compatible(tag, arch, glibc_version):
yield linux.replace("linux", tag)
# Handle the legacy manylinux1, manylinux2010, manylinux2014 tags.
if glibc_version in _LEGACY_MANYLINUX_MAP:
legacy_tag = _LEGACY_MANYLINUX_MAP[glibc_version]
if _is_compatible(legacy_tag, arch, glibc_version):
yield linux.replace("linux", legacy_tag)
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/packaging/_manylinux.py
|
Python
|
mit
| 11,488 |
"""PEP 656 support.
This module implements logic to detect if the currently running Python is
linked against musl, and what musl version is used.
"""
import contextlib
import functools
import operator
import os
import re
import struct
import subprocess
import sys
from typing import IO, Iterator, NamedTuple, Optional, Tuple
def _read_unpacked(f: IO[bytes], fmt: str) -> Tuple[int, ...]:
return struct.unpack(fmt, f.read(struct.calcsize(fmt)))
def _parse_ld_musl_from_elf(f: IO[bytes]) -> Optional[str]:
"""Detect musl libc location by parsing the Python executable.
Based on: https://gist.github.com/lyssdod/f51579ae8d93c8657a5564aefc2ffbca
ELF header: https://refspecs.linuxfoundation.org/elf/gabi4+/ch4.eheader.html
"""
f.seek(0)
try:
ident = _read_unpacked(f, "16B")
except struct.error:
return None
if ident[:4] != tuple(b"\x7fELF"): # Invalid magic, not ELF.
return None
f.seek(struct.calcsize("HHI"), 1) # Skip file type, machine, and version.
try:
# e_fmt: Format for program header.
# p_fmt: Format for section header.
# p_idx: Indexes to find p_type, p_offset, and p_filesz.
e_fmt, p_fmt, p_idx = {
1: ("IIIIHHH", "IIIIIIII", (0, 1, 4)), # 32-bit.
2: ("QQQIHHH", "IIQQQQQQ", (0, 2, 5)), # 64-bit.
}[ident[4]]
except KeyError:
return None
else:
p_get = operator.itemgetter(*p_idx)
# Find the interpreter section and return its content.
try:
_, e_phoff, _, _, _, e_phentsize, e_phnum = _read_unpacked(f, e_fmt)
except struct.error:
return None
for i in range(e_phnum + 1):
f.seek(e_phoff + e_phentsize * i)
try:
p_type, p_offset, p_filesz = p_get(_read_unpacked(f, p_fmt))
except struct.error:
return None
if p_type != 3: # Not PT_INTERP.
continue
f.seek(p_offset)
interpreter = os.fsdecode(f.read(p_filesz)).strip("\0")
if "musl" not in interpreter:
return None
return interpreter
return None
class _MuslVersion(NamedTuple):
major: int
minor: int
def _parse_musl_version(output: str) -> Optional[_MuslVersion]:
lines = [n for n in (n.strip() for n in output.splitlines()) if n]
if len(lines) < 2 or lines[0][:4] != "musl":
return None
m = re.match(r"Version (\d+)\.(\d+)", lines[1])
if not m:
return None
return _MuslVersion(major=int(m.group(1)), minor=int(m.group(2)))
@functools.lru_cache()
def _get_musl_version(executable: str) -> Optional[_MuslVersion]:
"""Detect currently-running musl runtime version.
This is done by checking the specified executable's dynamic linking
information, and invoking the loader to parse its output for a version
string. If the loader is musl, the output would be something like::
musl libc (x86_64)
Version 1.2.2
Dynamic Program Loader
"""
with contextlib.ExitStack() as stack:
try:
f = stack.enter_context(open(executable, "rb"))
except OSError:
return None
ld = _parse_ld_musl_from_elf(f)
if not ld:
return None
proc = subprocess.run([ld], stderr=subprocess.PIPE, universal_newlines=True)
return _parse_musl_version(proc.stderr)
def platform_tags(arch: str) -> Iterator[str]:
"""Generate musllinux tags compatible to the current platform.
:param arch: Should be the part of platform tag after the ``linux_``
prefix, e.g. ``x86_64``. The ``linux_`` prefix is assumed as a
prerequisite for the current platform to be musllinux-compatible.
:returns: An iterator of compatible musllinux tags.
"""
sys_musl = _get_musl_version(sys.executable)
if sys_musl is None: # Python not dynamically linked against musl.
return
for minor in range(sys_musl.minor, -1, -1):
yield f"musllinux_{sys_musl.major}_{minor}_{arch}"
if __name__ == "__main__": # pragma: no cover
import sysconfig
plat = sysconfig.get_platform()
assert plat.startswith("linux-"), "not linux"
print("plat:", plat)
print("musl:", _get_musl_version(sys.executable))
print("tags:", end=" ")
for t in platform_tags(re.sub(r"[.-]", "_", plat.split("-", 1)[-1])):
print(t, end="\n ")
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/packaging/_musllinux.py
|
Python
|
mit
| 4,378 |
# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
class InfinityType:
def __repr__(self) -> str:
return "Infinity"
def __hash__(self) -> int:
return hash(repr(self))
def __lt__(self, other: object) -> bool:
return False
def __le__(self, other: object) -> bool:
return False
def __eq__(self, other: object) -> bool:
return isinstance(other, self.__class__)
def __gt__(self, other: object) -> bool:
return True
def __ge__(self, other: object) -> bool:
return True
def __neg__(self: object) -> "NegativeInfinityType":
return NegativeInfinity
Infinity = InfinityType()
class NegativeInfinityType:
def __repr__(self) -> str:
return "-Infinity"
def __hash__(self) -> int:
return hash(repr(self))
def __lt__(self, other: object) -> bool:
return True
def __le__(self, other: object) -> bool:
return True
def __eq__(self, other: object) -> bool:
return isinstance(other, self.__class__)
def __gt__(self, other: object) -> bool:
return False
def __ge__(self, other: object) -> bool:
return False
def __neg__(self: object) -> InfinityType:
return Infinity
NegativeInfinity = NegativeInfinityType()
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/packaging/_structures.py
|
Python
|
mit
| 1,431 |
# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
import operator
import os
import platform
import sys
from typing import Any, Callable, Dict, List, Optional, Tuple, Union
from pip._vendor.pyparsing import ( # noqa: N817
Forward,
Group,
Literal as L,
ParseException,
ParseResults,
QuotedString,
ZeroOrMore,
stringEnd,
stringStart,
)
from .specifiers import InvalidSpecifier, Specifier
__all__ = [
"InvalidMarker",
"UndefinedComparison",
"UndefinedEnvironmentName",
"Marker",
"default_environment",
]
Operator = Callable[[str, str], bool]
class InvalidMarker(ValueError):
"""
An invalid marker was found, users should refer to PEP 508.
"""
class UndefinedComparison(ValueError):
"""
An invalid operation was attempted on a value that doesn't support it.
"""
class UndefinedEnvironmentName(ValueError):
"""
A name was attempted to be used that does not exist inside of the
environment.
"""
class Node:
def __init__(self, value: Any) -> None:
self.value = value
def __str__(self) -> str:
return str(self.value)
def __repr__(self) -> str:
return f"<{self.__class__.__name__}('{self}')>"
def serialize(self) -> str:
raise NotImplementedError
class Variable(Node):
def serialize(self) -> str:
return str(self)
class Value(Node):
def serialize(self) -> str:
return f'"{self}"'
class Op(Node):
def serialize(self) -> str:
return str(self)
VARIABLE = (
L("implementation_version")
| L("platform_python_implementation")
| L("implementation_name")
| L("python_full_version")
| L("platform_release")
| L("platform_version")
| L("platform_machine")
| L("platform_system")
| L("python_version")
| L("sys_platform")
| L("os_name")
| L("os.name") # PEP-345
| L("sys.platform") # PEP-345
| L("platform.version") # PEP-345
| L("platform.machine") # PEP-345
| L("platform.python_implementation") # PEP-345
| L("python_implementation") # undocumented setuptools legacy
| L("extra") # PEP-508
)
ALIASES = {
"os.name": "os_name",
"sys.platform": "sys_platform",
"platform.version": "platform_version",
"platform.machine": "platform_machine",
"platform.python_implementation": "platform_python_implementation",
"python_implementation": "platform_python_implementation",
}
VARIABLE.setParseAction(lambda s, l, t: Variable(ALIASES.get(t[0], t[0])))
VERSION_CMP = (
L("===") | L("==") | L(">=") | L("<=") | L("!=") | L("~=") | L(">") | L("<")
)
MARKER_OP = VERSION_CMP | L("not in") | L("in")
MARKER_OP.setParseAction(lambda s, l, t: Op(t[0]))
MARKER_VALUE = QuotedString("'") | QuotedString('"')
MARKER_VALUE.setParseAction(lambda s, l, t: Value(t[0]))
BOOLOP = L("and") | L("or")
MARKER_VAR = VARIABLE | MARKER_VALUE
MARKER_ITEM = Group(MARKER_VAR + MARKER_OP + MARKER_VAR)
MARKER_ITEM.setParseAction(lambda s, l, t: tuple(t[0]))
LPAREN = L("(").suppress()
RPAREN = L(")").suppress()
MARKER_EXPR = Forward()
MARKER_ATOM = MARKER_ITEM | Group(LPAREN + MARKER_EXPR + RPAREN)
MARKER_EXPR << MARKER_ATOM + ZeroOrMore(BOOLOP + MARKER_EXPR)
MARKER = stringStart + MARKER_EXPR + stringEnd
def _coerce_parse_result(results: Union[ParseResults, List[Any]]) -> List[Any]:
if isinstance(results, ParseResults):
return [_coerce_parse_result(i) for i in results]
else:
return results
def _format_marker(
marker: Union[List[str], Tuple[Node, ...], str], first: Optional[bool] = True
) -> str:
assert isinstance(marker, (list, tuple, str))
# Sometimes we have a structure like [[...]] which is a single item list
# where the single item is itself it's own list. In that case we want skip
# the rest of this function so that we don't get extraneous () on the
# outside.
if (
isinstance(marker, list)
and len(marker) == 1
and isinstance(marker[0], (list, tuple))
):
return _format_marker(marker[0])
if isinstance(marker, list):
inner = (_format_marker(m, first=False) for m in marker)
if first:
return " ".join(inner)
else:
return "(" + " ".join(inner) + ")"
elif isinstance(marker, tuple):
return " ".join([m.serialize() for m in marker])
else:
return marker
_operators: Dict[str, Operator] = {
"in": lambda lhs, rhs: lhs in rhs,
"not in": lambda lhs, rhs: lhs not in rhs,
"<": operator.lt,
"<=": operator.le,
"==": operator.eq,
"!=": operator.ne,
">=": operator.ge,
">": operator.gt,
}
def _eval_op(lhs: str, op: Op, rhs: str) -> bool:
try:
spec = Specifier("".join([op.serialize(), rhs]))
except InvalidSpecifier:
pass
else:
return spec.contains(lhs)
oper: Optional[Operator] = _operators.get(op.serialize())
if oper is None:
raise UndefinedComparison(f"Undefined {op!r} on {lhs!r} and {rhs!r}.")
return oper(lhs, rhs)
class Undefined:
pass
_undefined = Undefined()
def _get_env(environment: Dict[str, str], name: str) -> str:
value: Union[str, Undefined] = environment.get(name, _undefined)
if isinstance(value, Undefined):
raise UndefinedEnvironmentName(
f"{name!r} does not exist in evaluation environment."
)
return value
def _evaluate_markers(markers: List[Any], environment: Dict[str, str]) -> bool:
groups: List[List[bool]] = [[]]
for marker in markers:
assert isinstance(marker, (list, tuple, str))
if isinstance(marker, list):
groups[-1].append(_evaluate_markers(marker, environment))
elif isinstance(marker, tuple):
lhs, op, rhs = marker
if isinstance(lhs, Variable):
lhs_value = _get_env(environment, lhs.value)
rhs_value = rhs.value
else:
lhs_value = lhs.value
rhs_value = _get_env(environment, rhs.value)
groups[-1].append(_eval_op(lhs_value, op, rhs_value))
else:
assert marker in ["and", "or"]
if marker == "or":
groups.append([])
return any(all(item) for item in groups)
def format_full_version(info: "sys._version_info") -> str:
version = "{0.major}.{0.minor}.{0.micro}".format(info)
kind = info.releaselevel
if kind != "final":
version += kind[0] + str(info.serial)
return version
def default_environment() -> Dict[str, str]:
iver = format_full_version(sys.implementation.version)
implementation_name = sys.implementation.name
return {
"implementation_name": implementation_name,
"implementation_version": iver,
"os_name": os.name,
"platform_machine": platform.machine(),
"platform_release": platform.release(),
"platform_system": platform.system(),
"platform_version": platform.version(),
"python_full_version": platform.python_version(),
"platform_python_implementation": platform.python_implementation(),
"python_version": ".".join(platform.python_version_tuple()[:2]),
"sys_platform": sys.platform,
}
class Marker:
def __init__(self, marker: str) -> None:
try:
self._markers = _coerce_parse_result(MARKER.parseString(marker))
except ParseException as e:
raise InvalidMarker(
f"Invalid marker: {marker!r}, parse error at "
f"{marker[e.loc : e.loc + 8]!r}"
)
def __str__(self) -> str:
return _format_marker(self._markers)
def __repr__(self) -> str:
return f"<Marker('{self}')>"
def evaluate(self, environment: Optional[Dict[str, str]] = None) -> bool:
"""Evaluate a marker.
Return the boolean from evaluating the given marker against the
environment. environment is an optional argument to override all or
part of the determined environment.
The environment is determined from the current Python process.
"""
current_environment = default_environment()
if environment is not None:
current_environment.update(environment)
return _evaluate_markers(self._markers, current_environment)
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/packaging/markers.py
|
Python
|
mit
| 8,487 |
# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
import re
import string
import urllib.parse
from typing import List, Optional as TOptional, Set
from pip._vendor.pyparsing import ( # noqa
Combine,
Literal as L,
Optional,
ParseException,
Regex,
Word,
ZeroOrMore,
originalTextFor,
stringEnd,
stringStart,
)
from .markers import MARKER_EXPR, Marker
from .specifiers import LegacySpecifier, Specifier, SpecifierSet
class InvalidRequirement(ValueError):
"""
An invalid requirement was found, users should refer to PEP 508.
"""
ALPHANUM = Word(string.ascii_letters + string.digits)
LBRACKET = L("[").suppress()
RBRACKET = L("]").suppress()
LPAREN = L("(").suppress()
RPAREN = L(")").suppress()
COMMA = L(",").suppress()
SEMICOLON = L(";").suppress()
AT = L("@").suppress()
PUNCTUATION = Word("-_.")
IDENTIFIER_END = ALPHANUM | (ZeroOrMore(PUNCTUATION) + ALPHANUM)
IDENTIFIER = Combine(ALPHANUM + ZeroOrMore(IDENTIFIER_END))
NAME = IDENTIFIER("name")
EXTRA = IDENTIFIER
URI = Regex(r"[^ ]+")("url")
URL = AT + URI
EXTRAS_LIST = EXTRA + ZeroOrMore(COMMA + EXTRA)
EXTRAS = (LBRACKET + Optional(EXTRAS_LIST) + RBRACKET)("extras")
VERSION_PEP440 = Regex(Specifier._regex_str, re.VERBOSE | re.IGNORECASE)
VERSION_LEGACY = Regex(LegacySpecifier._regex_str, re.VERBOSE | re.IGNORECASE)
VERSION_ONE = VERSION_PEP440 ^ VERSION_LEGACY
VERSION_MANY = Combine(
VERSION_ONE + ZeroOrMore(COMMA + VERSION_ONE), joinString=",", adjacent=False
)("_raw_spec")
_VERSION_SPEC = Optional((LPAREN + VERSION_MANY + RPAREN) | VERSION_MANY)
_VERSION_SPEC.setParseAction(lambda s, l, t: t._raw_spec or "")
VERSION_SPEC = originalTextFor(_VERSION_SPEC)("specifier")
VERSION_SPEC.setParseAction(lambda s, l, t: t[1])
MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker")
MARKER_EXPR.setParseAction(
lambda s, l, t: Marker(s[t._original_start : t._original_end])
)
MARKER_SEPARATOR = SEMICOLON
MARKER = MARKER_SEPARATOR + MARKER_EXPR
VERSION_AND_MARKER = VERSION_SPEC + Optional(MARKER)
URL_AND_MARKER = URL + Optional(MARKER)
NAMED_REQUIREMENT = NAME + Optional(EXTRAS) + (URL_AND_MARKER | VERSION_AND_MARKER)
REQUIREMENT = stringStart + NAMED_REQUIREMENT + stringEnd
# pyparsing isn't thread safe during initialization, so we do it eagerly, see
# issue #104
REQUIREMENT.parseString("x[]")
class Requirement:
"""Parse a requirement.
Parse a given requirement string into its parts, such as name, specifier,
URL, and extras. Raises InvalidRequirement on a badly-formed requirement
string.
"""
# TODO: Can we test whether something is contained within a requirement?
# If so how do we do that? Do we need to test against the _name_ of
# the thing as well as the version? What about the markers?
# TODO: Can we normalize the name and extra name?
def __init__(self, requirement_string: str) -> None:
try:
req = REQUIREMENT.parseString(requirement_string)
except ParseException as e:
raise InvalidRequirement(
f'Parse error at "{ requirement_string[e.loc : e.loc + 8]!r}": {e.msg}'
)
self.name: str = req.name
if req.url:
parsed_url = urllib.parse.urlparse(req.url)
if parsed_url.scheme == "file":
if urllib.parse.urlunparse(parsed_url) != req.url:
raise InvalidRequirement("Invalid URL given")
elif not (parsed_url.scheme and parsed_url.netloc) or (
not parsed_url.scheme and not parsed_url.netloc
):
raise InvalidRequirement(f"Invalid URL: {req.url}")
self.url: TOptional[str] = req.url
else:
self.url = None
self.extras: Set[str] = set(req.extras.asList() if req.extras else [])
self.specifier: SpecifierSet = SpecifierSet(req.specifier)
self.marker: TOptional[Marker] = req.marker if req.marker else None
def __str__(self) -> str:
parts: List[str] = [self.name]
if self.extras:
formatted_extras = ",".join(sorted(self.extras))
parts.append(f"[{formatted_extras}]")
if self.specifier:
parts.append(str(self.specifier))
if self.url:
parts.append(f"@ {self.url}")
if self.marker:
parts.append(" ")
if self.marker:
parts.append(f"; {self.marker}")
return "".join(parts)
def __repr__(self) -> str:
return f"<Requirement('{self}')>"
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/packaging/requirements.py
|
Python
|
mit
| 4,676 |
# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
import abc
import functools
import itertools
import re
import warnings
from typing import (
Callable,
Dict,
Iterable,
Iterator,
List,
Optional,
Pattern,
Set,
Tuple,
TypeVar,
Union,
)
from .utils import canonicalize_version
from .version import LegacyVersion, Version, parse
ParsedVersion = Union[Version, LegacyVersion]
UnparsedVersion = Union[Version, LegacyVersion, str]
VersionTypeVar = TypeVar("VersionTypeVar", bound=UnparsedVersion)
CallableOperator = Callable[[ParsedVersion, str], bool]
class InvalidSpecifier(ValueError):
"""
An invalid specifier was found, users should refer to PEP 440.
"""
class BaseSpecifier(metaclass=abc.ABCMeta):
@abc.abstractmethod
def __str__(self) -> str:
"""
Returns the str representation of this Specifier like object. This
should be representative of the Specifier itself.
"""
@abc.abstractmethod
def __hash__(self) -> int:
"""
Returns a hash value for this Specifier like object.
"""
@abc.abstractmethod
def __eq__(self, other: object) -> bool:
"""
Returns a boolean representing whether or not the two Specifier like
objects are equal.
"""
@abc.abstractproperty
def prereleases(self) -> Optional[bool]:
"""
Returns whether or not pre-releases as a whole are allowed by this
specifier.
"""
@prereleases.setter
def prereleases(self, value: bool) -> None:
"""
Sets whether or not pre-releases as a whole are allowed by this
specifier.
"""
@abc.abstractmethod
def contains(self, item: str, prereleases: Optional[bool] = None) -> bool:
"""
Determines if the given item is contained within this specifier.
"""
@abc.abstractmethod
def filter(
self, iterable: Iterable[VersionTypeVar], prereleases: Optional[bool] = None
) -> Iterable[VersionTypeVar]:
"""
Takes an iterable of items and filters them so that only items which
are contained within this specifier are allowed in it.
"""
class _IndividualSpecifier(BaseSpecifier):
_operators: Dict[str, str] = {}
_regex: Pattern[str]
def __init__(self, spec: str = "", prereleases: Optional[bool] = None) -> None:
match = self._regex.search(spec)
if not match:
raise InvalidSpecifier(f"Invalid specifier: '{spec}'")
self._spec: Tuple[str, str] = (
match.group("operator").strip(),
match.group("version").strip(),
)
# Store whether or not this Specifier should accept prereleases
self._prereleases = prereleases
def __repr__(self) -> str:
pre = (
f", prereleases={self.prereleases!r}"
if self._prereleases is not None
else ""
)
return f"<{self.__class__.__name__}({str(self)!r}{pre})>"
def __str__(self) -> str:
return "{}{}".format(*self._spec)
@property
def _canonical_spec(self) -> Tuple[str, str]:
return self._spec[0], canonicalize_version(self._spec[1])
def __hash__(self) -> int:
return hash(self._canonical_spec)
def __eq__(self, other: object) -> bool:
if isinstance(other, str):
try:
other = self.__class__(str(other))
except InvalidSpecifier:
return NotImplemented
elif not isinstance(other, self.__class__):
return NotImplemented
return self._canonical_spec == other._canonical_spec
def _get_operator(self, op: str) -> CallableOperator:
operator_callable: CallableOperator = getattr(
self, f"_compare_{self._operators[op]}"
)
return operator_callable
def _coerce_version(self, version: UnparsedVersion) -> ParsedVersion:
if not isinstance(version, (LegacyVersion, Version)):
version = parse(version)
return version
@property
def operator(self) -> str:
return self._spec[0]
@property
def version(self) -> str:
return self._spec[1]
@property
def prereleases(self) -> Optional[bool]:
return self._prereleases
@prereleases.setter
def prereleases(self, value: bool) -> None:
self._prereleases = value
def __contains__(self, item: str) -> bool:
return self.contains(item)
def contains(
self, item: UnparsedVersion, prereleases: Optional[bool] = None
) -> bool:
# Determine if prereleases are to be allowed or not.
if prereleases is None:
prereleases = self.prereleases
# Normalize item to a Version or LegacyVersion, this allows us to have
# a shortcut for ``"2.0" in Specifier(">=2")
normalized_item = self._coerce_version(item)
# Determine if we should be supporting prereleases in this specifier
# or not, if we do not support prereleases than we can short circuit
# logic if this version is a prereleases.
if normalized_item.is_prerelease and not prereleases:
return False
# Actually do the comparison to determine if this item is contained
# within this Specifier or not.
operator_callable: CallableOperator = self._get_operator(self.operator)
return operator_callable(normalized_item, self.version)
def filter(
self, iterable: Iterable[VersionTypeVar], prereleases: Optional[bool] = None
) -> Iterable[VersionTypeVar]:
yielded = False
found_prereleases = []
kw = {"prereleases": prereleases if prereleases is not None else True}
# Attempt to iterate over all the values in the iterable and if any of
# them match, yield them.
for version in iterable:
parsed_version = self._coerce_version(version)
if self.contains(parsed_version, **kw):
# If our version is a prerelease, and we were not set to allow
# prereleases, then we'll store it for later in case nothing
# else matches this specifier.
if parsed_version.is_prerelease and not (
prereleases or self.prereleases
):
found_prereleases.append(version)
# Either this is not a prerelease, or we should have been
# accepting prereleases from the beginning.
else:
yielded = True
yield version
# Now that we've iterated over everything, determine if we've yielded
# any values, and if we have not and we have any prereleases stored up
# then we will go ahead and yield the prereleases.
if not yielded and found_prereleases:
for version in found_prereleases:
yield version
class LegacySpecifier(_IndividualSpecifier):
_regex_str = r"""
(?P<operator>(==|!=|<=|>=|<|>))
\s*
(?P<version>
[^,;\s)]* # Since this is a "legacy" specifier, and the version
# string can be just about anything, we match everything
# except for whitespace, a semi-colon for marker support,
# a closing paren since versions can be enclosed in
# them, and a comma since it's a version separator.
)
"""
_regex = re.compile(r"^\s*" + _regex_str + r"\s*$", re.VERBOSE | re.IGNORECASE)
_operators = {
"==": "equal",
"!=": "not_equal",
"<=": "less_than_equal",
">=": "greater_than_equal",
"<": "less_than",
">": "greater_than",
}
def __init__(self, spec: str = "", prereleases: Optional[bool] = None) -> None:
super().__init__(spec, prereleases)
warnings.warn(
"Creating a LegacyVersion has been deprecated and will be "
"removed in the next major release",
DeprecationWarning,
)
def _coerce_version(self, version: UnparsedVersion) -> LegacyVersion:
if not isinstance(version, LegacyVersion):
version = LegacyVersion(str(version))
return version
def _compare_equal(self, prospective: LegacyVersion, spec: str) -> bool:
return prospective == self._coerce_version(spec)
def _compare_not_equal(self, prospective: LegacyVersion, spec: str) -> bool:
return prospective != self._coerce_version(spec)
def _compare_less_than_equal(self, prospective: LegacyVersion, spec: str) -> bool:
return prospective <= self._coerce_version(spec)
def _compare_greater_than_equal(
self, prospective: LegacyVersion, spec: str
) -> bool:
return prospective >= self._coerce_version(spec)
def _compare_less_than(self, prospective: LegacyVersion, spec: str) -> bool:
return prospective < self._coerce_version(spec)
def _compare_greater_than(self, prospective: LegacyVersion, spec: str) -> bool:
return prospective > self._coerce_version(spec)
def _require_version_compare(
fn: Callable[["Specifier", ParsedVersion, str], bool]
) -> Callable[["Specifier", ParsedVersion, str], bool]:
@functools.wraps(fn)
def wrapped(self: "Specifier", prospective: ParsedVersion, spec: str) -> bool:
if not isinstance(prospective, Version):
return False
return fn(self, prospective, spec)
return wrapped
class Specifier(_IndividualSpecifier):
_regex_str = r"""
(?P<operator>(~=|==|!=|<=|>=|<|>|===))
(?P<version>
(?:
# The identity operators allow for an escape hatch that will
# do an exact string match of the version you wish to install.
# This will not be parsed by PEP 440 and we cannot determine
# any semantic meaning from it. This operator is discouraged
# but included entirely as an escape hatch.
(?<====) # Only match for the identity operator
\s*
[^\s]* # We just match everything, except for whitespace
# since we are only testing for strict identity.
)
|
(?:
# The (non)equality operators allow for wild card and local
# versions to be specified so we have to define these two
# operators separately to enable that.
(?<===|!=) # Only match for equals and not equals
\s*
v?
(?:[0-9]+!)? # epoch
[0-9]+(?:\.[0-9]+)* # release
(?: # pre release
[-_\.]?
(a|b|c|rc|alpha|beta|pre|preview)
[-_\.]?
[0-9]*
)?
(?: # post release
(?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
)?
# You cannot use a wild card and a dev or local version
# together so group them with a | and make them optional.
(?:
(?:[-_\.]?dev[-_\.]?[0-9]*)? # dev release
(?:\+[a-z0-9]+(?:[-_\.][a-z0-9]+)*)? # local
|
\.\* # Wild card syntax of .*
)?
)
|
(?:
# The compatible operator requires at least two digits in the
# release segment.
(?<=~=) # Only match for the compatible operator
\s*
v?
(?:[0-9]+!)? # epoch
[0-9]+(?:\.[0-9]+)+ # release (We have a + instead of a *)
(?: # pre release
[-_\.]?
(a|b|c|rc|alpha|beta|pre|preview)
[-_\.]?
[0-9]*
)?
(?: # post release
(?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
)?
(?:[-_\.]?dev[-_\.]?[0-9]*)? # dev release
)
|
(?:
# All other operators only allow a sub set of what the
# (non)equality operators do. Specifically they do not allow
# local versions to be specified nor do they allow the prefix
# matching wild cards.
(?<!==|!=|~=) # We have special cases for these
# operators so we want to make sure they
# don't match here.
\s*
v?
(?:[0-9]+!)? # epoch
[0-9]+(?:\.[0-9]+)* # release
(?: # pre release
[-_\.]?
(a|b|c|rc|alpha|beta|pre|preview)
[-_\.]?
[0-9]*
)?
(?: # post release
(?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
)?
(?:[-_\.]?dev[-_\.]?[0-9]*)? # dev release
)
)
"""
_regex = re.compile(r"^\s*" + _regex_str + r"\s*$", re.VERBOSE | re.IGNORECASE)
_operators = {
"~=": "compatible",
"==": "equal",
"!=": "not_equal",
"<=": "less_than_equal",
">=": "greater_than_equal",
"<": "less_than",
">": "greater_than",
"===": "arbitrary",
}
@_require_version_compare
def _compare_compatible(self, prospective: ParsedVersion, spec: str) -> bool:
# Compatible releases have an equivalent combination of >= and ==. That
# is that ~=2.2 is equivalent to >=2.2,==2.*. This allows us to
# implement this in terms of the other specifiers instead of
# implementing it ourselves. The only thing we need to do is construct
# the other specifiers.
# We want everything but the last item in the version, but we want to
# ignore suffix segments.
prefix = ".".join(
list(itertools.takewhile(_is_not_suffix, _version_split(spec)))[:-1]
)
# Add the prefix notation to the end of our string
prefix += ".*"
return self._get_operator(">=")(prospective, spec) and self._get_operator("==")(
prospective, prefix
)
@_require_version_compare
def _compare_equal(self, prospective: ParsedVersion, spec: str) -> bool:
# We need special logic to handle prefix matching
if spec.endswith(".*"):
# In the case of prefix matching we want to ignore local segment.
prospective = Version(prospective.public)
# Split the spec out by dots, and pretend that there is an implicit
# dot in between a release segment and a pre-release segment.
split_spec = _version_split(spec[:-2]) # Remove the trailing .*
# Split the prospective version out by dots, and pretend that there
# is an implicit dot in between a release segment and a pre-release
# segment.
split_prospective = _version_split(str(prospective))
# Shorten the prospective version to be the same length as the spec
# so that we can determine if the specifier is a prefix of the
# prospective version or not.
shortened_prospective = split_prospective[: len(split_spec)]
# Pad out our two sides with zeros so that they both equal the same
# length.
padded_spec, padded_prospective = _pad_version(
split_spec, shortened_prospective
)
return padded_prospective == padded_spec
else:
# Convert our spec string into a Version
spec_version = Version(spec)
# If the specifier does not have a local segment, then we want to
# act as if the prospective version also does not have a local
# segment.
if not spec_version.local:
prospective = Version(prospective.public)
return prospective == spec_version
@_require_version_compare
def _compare_not_equal(self, prospective: ParsedVersion, spec: str) -> bool:
return not self._compare_equal(prospective, spec)
@_require_version_compare
def _compare_less_than_equal(self, prospective: ParsedVersion, spec: str) -> bool:
# NB: Local version identifiers are NOT permitted in the version
# specifier, so local version labels can be universally removed from
# the prospective version.
return Version(prospective.public) <= Version(spec)
@_require_version_compare
def _compare_greater_than_equal(
self, prospective: ParsedVersion, spec: str
) -> bool:
# NB: Local version identifiers are NOT permitted in the version
# specifier, so local version labels can be universally removed from
# the prospective version.
return Version(prospective.public) >= Version(spec)
@_require_version_compare
def _compare_less_than(self, prospective: ParsedVersion, spec_str: str) -> bool:
# Convert our spec to a Version instance, since we'll want to work with
# it as a version.
spec = Version(spec_str)
# Check to see if the prospective version is less than the spec
# version. If it's not we can short circuit and just return False now
# instead of doing extra unneeded work.
if not prospective < spec:
return False
# This special case is here so that, unless the specifier itself
# includes is a pre-release version, that we do not accept pre-release
# versions for the version mentioned in the specifier (e.g. <3.1 should
# not match 3.1.dev0, but should match 3.0.dev0).
if not spec.is_prerelease and prospective.is_prerelease:
if Version(prospective.base_version) == Version(spec.base_version):
return False
# If we've gotten to here, it means that prospective version is both
# less than the spec version *and* it's not a pre-release of the same
# version in the spec.
return True
@_require_version_compare
def _compare_greater_than(self, prospective: ParsedVersion, spec_str: str) -> bool:
# Convert our spec to a Version instance, since we'll want to work with
# it as a version.
spec = Version(spec_str)
# Check to see if the prospective version is greater than the spec
# version. If it's not we can short circuit and just return False now
# instead of doing extra unneeded work.
if not prospective > spec:
return False
# This special case is here so that, unless the specifier itself
# includes is a post-release version, that we do not accept
# post-release versions for the version mentioned in the specifier
# (e.g. >3.1 should not match 3.0.post0, but should match 3.2.post0).
if not spec.is_postrelease and prospective.is_postrelease:
if Version(prospective.base_version) == Version(spec.base_version):
return False
# Ensure that we do not allow a local version of the version mentioned
# in the specifier, which is technically greater than, to match.
if prospective.local is not None:
if Version(prospective.base_version) == Version(spec.base_version):
return False
# If we've gotten to here, it means that prospective version is both
# greater than the spec version *and* it's not a pre-release of the
# same version in the spec.
return True
def _compare_arbitrary(self, prospective: Version, spec: str) -> bool:
return str(prospective).lower() == str(spec).lower()
@property
def prereleases(self) -> bool:
# If there is an explicit prereleases set for this, then we'll just
# blindly use that.
if self._prereleases is not None:
return self._prereleases
# Look at all of our specifiers and determine if they are inclusive
# operators, and if they are if they are including an explicit
# prerelease.
operator, version = self._spec
if operator in ["==", ">=", "<=", "~=", "==="]:
# The == specifier can include a trailing .*, if it does we
# want to remove before parsing.
if operator == "==" and version.endswith(".*"):
version = version[:-2]
# Parse the version, and if it is a pre-release than this
# specifier allows pre-releases.
if parse(version).is_prerelease:
return True
return False
@prereleases.setter
def prereleases(self, value: bool) -> None:
self._prereleases = value
_prefix_regex = re.compile(r"^([0-9]+)((?:a|b|c|rc)[0-9]+)$")
def _version_split(version: str) -> List[str]:
result: List[str] = []
for item in version.split("."):
match = _prefix_regex.search(item)
if match:
result.extend(match.groups())
else:
result.append(item)
return result
def _is_not_suffix(segment: str) -> bool:
return not any(
segment.startswith(prefix) for prefix in ("dev", "a", "b", "rc", "post")
)
def _pad_version(left: List[str], right: List[str]) -> Tuple[List[str], List[str]]:
left_split, right_split = [], []
# Get the release segment of our versions
left_split.append(list(itertools.takewhile(lambda x: x.isdigit(), left)))
right_split.append(list(itertools.takewhile(lambda x: x.isdigit(), right)))
# Get the rest of our versions
left_split.append(left[len(left_split[0]) :])
right_split.append(right[len(right_split[0]) :])
# Insert our padding
left_split.insert(1, ["0"] * max(0, len(right_split[0]) - len(left_split[0])))
right_split.insert(1, ["0"] * max(0, len(left_split[0]) - len(right_split[0])))
return (list(itertools.chain(*left_split)), list(itertools.chain(*right_split)))
class SpecifierSet(BaseSpecifier):
def __init__(
self, specifiers: str = "", prereleases: Optional[bool] = None
) -> None:
# Split on , to break each individual specifier into it's own item, and
# strip each item to remove leading/trailing whitespace.
split_specifiers = [s.strip() for s in specifiers.split(",") if s.strip()]
# Parsed each individual specifier, attempting first to make it a
# Specifier and falling back to a LegacySpecifier.
parsed: Set[_IndividualSpecifier] = set()
for specifier in split_specifiers:
try:
parsed.add(Specifier(specifier))
except InvalidSpecifier:
parsed.add(LegacySpecifier(specifier))
# Turn our parsed specifiers into a frozen set and save them for later.
self._specs = frozenset(parsed)
# Store our prereleases value so we can use it later to determine if
# we accept prereleases or not.
self._prereleases = prereleases
def __repr__(self) -> str:
pre = (
f", prereleases={self.prereleases!r}"
if self._prereleases is not None
else ""
)
return f"<SpecifierSet({str(self)!r}{pre})>"
def __str__(self) -> str:
return ",".join(sorted(str(s) for s in self._specs))
def __hash__(self) -> int:
return hash(self._specs)
def __and__(self, other: Union["SpecifierSet", str]) -> "SpecifierSet":
if isinstance(other, str):
other = SpecifierSet(other)
elif not isinstance(other, SpecifierSet):
return NotImplemented
specifier = SpecifierSet()
specifier._specs = frozenset(self._specs | other._specs)
if self._prereleases is None and other._prereleases is not None:
specifier._prereleases = other._prereleases
elif self._prereleases is not None and other._prereleases is None:
specifier._prereleases = self._prereleases
elif self._prereleases == other._prereleases:
specifier._prereleases = self._prereleases
else:
raise ValueError(
"Cannot combine SpecifierSets with True and False prerelease "
"overrides."
)
return specifier
def __eq__(self, other: object) -> bool:
if isinstance(other, (str, _IndividualSpecifier)):
other = SpecifierSet(str(other))
elif not isinstance(other, SpecifierSet):
return NotImplemented
return self._specs == other._specs
def __len__(self) -> int:
return len(self._specs)
def __iter__(self) -> Iterator[_IndividualSpecifier]:
return iter(self._specs)
@property
def prereleases(self) -> Optional[bool]:
# If we have been given an explicit prerelease modifier, then we'll
# pass that through here.
if self._prereleases is not None:
return self._prereleases
# If we don't have any specifiers, and we don't have a forced value,
# then we'll just return None since we don't know if this should have
# pre-releases or not.
if not self._specs:
return None
# Otherwise we'll see if any of the given specifiers accept
# prereleases, if any of them do we'll return True, otherwise False.
return any(s.prereleases for s in self._specs)
@prereleases.setter
def prereleases(self, value: bool) -> None:
self._prereleases = value
def __contains__(self, item: UnparsedVersion) -> bool:
return self.contains(item)
def contains(
self, item: UnparsedVersion, prereleases: Optional[bool] = None
) -> bool:
# Ensure that our item is a Version or LegacyVersion instance.
if not isinstance(item, (LegacyVersion, Version)):
item = parse(item)
# Determine if we're forcing a prerelease or not, if we're not forcing
# one for this particular filter call, then we'll use whatever the
# SpecifierSet thinks for whether or not we should support prereleases.
if prereleases is None:
prereleases = self.prereleases
# We can determine if we're going to allow pre-releases by looking to
# see if any of the underlying items supports them. If none of them do
# and this item is a pre-release then we do not allow it and we can
# short circuit that here.
# Note: This means that 1.0.dev1 would not be contained in something
# like >=1.0.devabc however it would be in >=1.0.debabc,>0.0.dev0
if not prereleases and item.is_prerelease:
return False
# We simply dispatch to the underlying specs here to make sure that the
# given version is contained within all of them.
# Note: This use of all() here means that an empty set of specifiers
# will always return True, this is an explicit design decision.
return all(s.contains(item, prereleases=prereleases) for s in self._specs)
def filter(
self, iterable: Iterable[VersionTypeVar], prereleases: Optional[bool] = None
) -> Iterable[VersionTypeVar]:
# Determine if we're forcing a prerelease or not, if we're not forcing
# one for this particular filter call, then we'll use whatever the
# SpecifierSet thinks for whether or not we should support prereleases.
if prereleases is None:
prereleases = self.prereleases
# If we have any specifiers, then we want to wrap our iterable in the
# filter method for each one, this will act as a logical AND amongst
# each specifier.
if self._specs:
for spec in self._specs:
iterable = spec.filter(iterable, prereleases=bool(prereleases))
return iterable
# If we do not have any specifiers, then we need to have a rough filter
# which will filter out any pre-releases, unless there are no final
# releases, and which will filter out LegacyVersion in general.
else:
filtered: List[VersionTypeVar] = []
found_prereleases: List[VersionTypeVar] = []
item: UnparsedVersion
parsed_version: Union[Version, LegacyVersion]
for item in iterable:
# Ensure that we some kind of Version class for this item.
if not isinstance(item, (LegacyVersion, Version)):
parsed_version = parse(item)
else:
parsed_version = item
# Filter out any item which is parsed as a LegacyVersion
if isinstance(parsed_version, LegacyVersion):
continue
# Store any item which is a pre-release for later unless we've
# already found a final version or we are accepting prereleases
if parsed_version.is_prerelease and not prereleases:
if not filtered:
found_prereleases.append(item)
else:
filtered.append(item)
# If we've found no items except for pre-releases, then we'll go
# ahead and use the pre-releases
if not filtered and found_prereleases and prereleases is None:
return found_prereleases
return filtered
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/packaging/specifiers.py
|
Python
|
mit
| 30,110 |
# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
import logging
import platform
import sys
import sysconfig
from importlib.machinery import EXTENSION_SUFFIXES
from typing import (
Dict,
FrozenSet,
Iterable,
Iterator,
List,
Optional,
Sequence,
Tuple,
Union,
cast,
)
from . import _manylinux, _musllinux
logger = logging.getLogger(__name__)
PythonVersion = Sequence[int]
MacVersion = Tuple[int, int]
INTERPRETER_SHORT_NAMES: Dict[str, str] = {
"python": "py", # Generic.
"cpython": "cp",
"pypy": "pp",
"ironpython": "ip",
"jython": "jy",
}
_32_BIT_INTERPRETER = sys.maxsize <= 2 ** 32
class Tag:
"""
A representation of the tag triple for a wheel.
Instances are considered immutable and thus are hashable. Equality checking
is also supported.
"""
__slots__ = ["_interpreter", "_abi", "_platform", "_hash"]
def __init__(self, interpreter: str, abi: str, platform: str) -> None:
self._interpreter = interpreter.lower()
self._abi = abi.lower()
self._platform = platform.lower()
# The __hash__ of every single element in a Set[Tag] will be evaluated each time
# that a set calls its `.disjoint()` method, which may be called hundreds of
# times when scanning a page of links for packages with tags matching that
# Set[Tag]. Pre-computing the value here produces significant speedups for
# downstream consumers.
self._hash = hash((self._interpreter, self._abi, self._platform))
@property
def interpreter(self) -> str:
return self._interpreter
@property
def abi(self) -> str:
return self._abi
@property
def platform(self) -> str:
return self._platform
def __eq__(self, other: object) -> bool:
if not isinstance(other, Tag):
return NotImplemented
return (
(self._hash == other._hash) # Short-circuit ASAP for perf reasons.
and (self._platform == other._platform)
and (self._abi == other._abi)
and (self._interpreter == other._interpreter)
)
def __hash__(self) -> int:
return self._hash
def __str__(self) -> str:
return f"{self._interpreter}-{self._abi}-{self._platform}"
def __repr__(self) -> str:
return f"<{self} @ {id(self)}>"
def parse_tag(tag: str) -> FrozenSet[Tag]:
"""
Parses the provided tag (e.g. `py3-none-any`) into a frozenset of Tag instances.
Returning a set is required due to the possibility that the tag is a
compressed tag set.
"""
tags = set()
interpreters, abis, platforms = tag.split("-")
for interpreter in interpreters.split("."):
for abi in abis.split("."):
for platform_ in platforms.split("."):
tags.add(Tag(interpreter, abi, platform_))
return frozenset(tags)
def _get_config_var(name: str, warn: bool = False) -> Union[int, str, None]:
value = sysconfig.get_config_var(name)
if value is None and warn:
logger.debug(
"Config variable '%s' is unset, Python ABI tag may be incorrect", name
)
return value
def _normalize_string(string: str) -> str:
return string.replace(".", "_").replace("-", "_")
def _abi3_applies(python_version: PythonVersion) -> bool:
"""
Determine if the Python version supports abi3.
PEP 384 was first implemented in Python 3.2.
"""
return len(python_version) > 1 and tuple(python_version) >= (3, 2)
def _cpython_abis(py_version: PythonVersion, warn: bool = False) -> List[str]:
py_version = tuple(py_version) # To allow for version comparison.
abis = []
version = _version_nodot(py_version[:2])
debug = pymalloc = ucs4 = ""
with_debug = _get_config_var("Py_DEBUG", warn)
has_refcount = hasattr(sys, "gettotalrefcount")
# Windows doesn't set Py_DEBUG, so checking for support of debug-compiled
# extension modules is the best option.
# https://github.com/pypa/pip/issues/3383#issuecomment-173267692
has_ext = "_d.pyd" in EXTENSION_SUFFIXES
if with_debug or (with_debug is None and (has_refcount or has_ext)):
debug = "d"
if py_version < (3, 8):
with_pymalloc = _get_config_var("WITH_PYMALLOC", warn)
if with_pymalloc or with_pymalloc is None:
pymalloc = "m"
if py_version < (3, 3):
unicode_size = _get_config_var("Py_UNICODE_SIZE", warn)
if unicode_size == 4 or (
unicode_size is None and sys.maxunicode == 0x10FFFF
):
ucs4 = "u"
elif debug:
# Debug builds can also load "normal" extension modules.
# We can also assume no UCS-4 or pymalloc requirement.
abis.append(f"cp{version}")
abis.insert(
0,
"cp{version}{debug}{pymalloc}{ucs4}".format(
version=version, debug=debug, pymalloc=pymalloc, ucs4=ucs4
),
)
return abis
def cpython_tags(
python_version: Optional[PythonVersion] = None,
abis: Optional[Iterable[str]] = None,
platforms: Optional[Iterable[str]] = None,
*,
warn: bool = False,
) -> Iterator[Tag]:
"""
Yields the tags for a CPython interpreter.
The tags consist of:
- cp<python_version>-<abi>-<platform>
- cp<python_version>-abi3-<platform>
- cp<python_version>-none-<platform>
- cp<less than python_version>-abi3-<platform> # Older Python versions down to 3.2.
If python_version only specifies a major version then user-provided ABIs and
the 'none' ABItag will be used.
If 'abi3' or 'none' are specified in 'abis' then they will be yielded at
their normal position and not at the beginning.
"""
if not python_version:
python_version = sys.version_info[:2]
interpreter = f"cp{_version_nodot(python_version[:2])}"
if abis is None:
if len(python_version) > 1:
abis = _cpython_abis(python_version, warn)
else:
abis = []
abis = list(abis)
# 'abi3' and 'none' are explicitly handled later.
for explicit_abi in ("abi3", "none"):
try:
abis.remove(explicit_abi)
except ValueError:
pass
platforms = list(platforms or platform_tags())
for abi in abis:
for platform_ in platforms:
yield Tag(interpreter, abi, platform_)
if _abi3_applies(python_version):
yield from (Tag(interpreter, "abi3", platform_) for platform_ in platforms)
yield from (Tag(interpreter, "none", platform_) for platform_ in platforms)
if _abi3_applies(python_version):
for minor_version in range(python_version[1] - 1, 1, -1):
for platform_ in platforms:
interpreter = "cp{version}".format(
version=_version_nodot((python_version[0], minor_version))
)
yield Tag(interpreter, "abi3", platform_)
def _generic_abi() -> Iterator[str]:
abi = sysconfig.get_config_var("SOABI")
if abi:
yield _normalize_string(abi)
def generic_tags(
interpreter: Optional[str] = None,
abis: Optional[Iterable[str]] = None,
platforms: Optional[Iterable[str]] = None,
*,
warn: bool = False,
) -> Iterator[Tag]:
"""
Yields the tags for a generic interpreter.
The tags consist of:
- <interpreter>-<abi>-<platform>
The "none" ABI will be added if it was not explicitly provided.
"""
if not interpreter:
interp_name = interpreter_name()
interp_version = interpreter_version(warn=warn)
interpreter = "".join([interp_name, interp_version])
if abis is None:
abis = _generic_abi()
platforms = list(platforms or platform_tags())
abis = list(abis)
if "none" not in abis:
abis.append("none")
for abi in abis:
for platform_ in platforms:
yield Tag(interpreter, abi, platform_)
def _py_interpreter_range(py_version: PythonVersion) -> Iterator[str]:
"""
Yields Python versions in descending order.
After the latest version, the major-only version will be yielded, and then
all previous versions of that major version.
"""
if len(py_version) > 1:
yield f"py{_version_nodot(py_version[:2])}"
yield f"py{py_version[0]}"
if len(py_version) > 1:
for minor in range(py_version[1] - 1, -1, -1):
yield f"py{_version_nodot((py_version[0], minor))}"
def compatible_tags(
python_version: Optional[PythonVersion] = None,
interpreter: Optional[str] = None,
platforms: Optional[Iterable[str]] = None,
) -> Iterator[Tag]:
"""
Yields the sequence of tags that are compatible with a specific version of Python.
The tags consist of:
- py*-none-<platform>
- <interpreter>-none-any # ... if `interpreter` is provided.
- py*-none-any
"""
if not python_version:
python_version = sys.version_info[:2]
platforms = list(platforms or platform_tags())
for version in _py_interpreter_range(python_version):
for platform_ in platforms:
yield Tag(version, "none", platform_)
if interpreter:
yield Tag(interpreter, "none", "any")
for version in _py_interpreter_range(python_version):
yield Tag(version, "none", "any")
def _mac_arch(arch: str, is_32bit: bool = _32_BIT_INTERPRETER) -> str:
if not is_32bit:
return arch
if arch.startswith("ppc"):
return "ppc"
return "i386"
def _mac_binary_formats(version: MacVersion, cpu_arch: str) -> List[str]:
formats = [cpu_arch]
if cpu_arch == "x86_64":
if version < (10, 4):
return []
formats.extend(["intel", "fat64", "fat32"])
elif cpu_arch == "i386":
if version < (10, 4):
return []
formats.extend(["intel", "fat32", "fat"])
elif cpu_arch == "ppc64":
# TODO: Need to care about 32-bit PPC for ppc64 through 10.2?
if version > (10, 5) or version < (10, 4):
return []
formats.append("fat64")
elif cpu_arch == "ppc":
if version > (10, 6):
return []
formats.extend(["fat32", "fat"])
if cpu_arch in {"arm64", "x86_64"}:
formats.append("universal2")
if cpu_arch in {"x86_64", "i386", "ppc64", "ppc", "intel"}:
formats.append("universal")
return formats
def mac_platforms(
version: Optional[MacVersion] = None, arch: Optional[str] = None
) -> Iterator[str]:
"""
Yields the platform tags for a macOS system.
The `version` parameter is a two-item tuple specifying the macOS version to
generate platform tags for. The `arch` parameter is the CPU architecture to
generate platform tags for. Both parameters default to the appropriate value
for the current system.
"""
version_str, _, cpu_arch = platform.mac_ver()
if version is None:
version = cast("MacVersion", tuple(map(int, version_str.split(".")[:2])))
else:
version = version
if arch is None:
arch = _mac_arch(cpu_arch)
else:
arch = arch
if (10, 0) <= version and version < (11, 0):
# Prior to Mac OS 11, each yearly release of Mac OS bumped the
# "minor" version number. The major version was always 10.
for minor_version in range(version[1], -1, -1):
compat_version = 10, minor_version
binary_formats = _mac_binary_formats(compat_version, arch)
for binary_format in binary_formats:
yield "macosx_{major}_{minor}_{binary_format}".format(
major=10, minor=minor_version, binary_format=binary_format
)
if version >= (11, 0):
# Starting with Mac OS 11, each yearly release bumps the major version
# number. The minor versions are now the midyear updates.
for major_version in range(version[0], 10, -1):
compat_version = major_version, 0
binary_formats = _mac_binary_formats(compat_version, arch)
for binary_format in binary_formats:
yield "macosx_{major}_{minor}_{binary_format}".format(
major=major_version, minor=0, binary_format=binary_format
)
if version >= (11, 0):
# Mac OS 11 on x86_64 is compatible with binaries from previous releases.
# Arm64 support was introduced in 11.0, so no Arm binaries from previous
# releases exist.
#
# However, the "universal2" binary format can have a
# macOS version earlier than 11.0 when the x86_64 part of the binary supports
# that version of macOS.
if arch == "x86_64":
for minor_version in range(16, 3, -1):
compat_version = 10, minor_version
binary_formats = _mac_binary_formats(compat_version, arch)
for binary_format in binary_formats:
yield "macosx_{major}_{minor}_{binary_format}".format(
major=compat_version[0],
minor=compat_version[1],
binary_format=binary_format,
)
else:
for minor_version in range(16, 3, -1):
compat_version = 10, minor_version
binary_format = "universal2"
yield "macosx_{major}_{minor}_{binary_format}".format(
major=compat_version[0],
minor=compat_version[1],
binary_format=binary_format,
)
def _linux_platforms(is_32bit: bool = _32_BIT_INTERPRETER) -> Iterator[str]:
linux = _normalize_string(sysconfig.get_platform())
if is_32bit:
if linux == "linux_x86_64":
linux = "linux_i686"
elif linux == "linux_aarch64":
linux = "linux_armv7l"
_, arch = linux.split("_", 1)
yield from _manylinux.platform_tags(linux, arch)
yield from _musllinux.platform_tags(arch)
yield linux
def _generic_platforms() -> Iterator[str]:
yield _normalize_string(sysconfig.get_platform())
def platform_tags() -> Iterator[str]:
"""
Provides the platform tags for this installation.
"""
if platform.system() == "Darwin":
return mac_platforms()
elif platform.system() == "Linux":
return _linux_platforms()
else:
return _generic_platforms()
def interpreter_name() -> str:
"""
Returns the name of the running interpreter.
"""
name = sys.implementation.name
return INTERPRETER_SHORT_NAMES.get(name) or name
def interpreter_version(*, warn: bool = False) -> str:
"""
Returns the version of the running interpreter.
"""
version = _get_config_var("py_version_nodot", warn=warn)
if version:
version = str(version)
else:
version = _version_nodot(sys.version_info[:2])
return version
def _version_nodot(version: PythonVersion) -> str:
return "".join(map(str, version))
def sys_tags(*, warn: bool = False) -> Iterator[Tag]:
"""
Returns the sequence of tag triples for the running interpreter.
The order of the sequence corresponds to priority order for the
interpreter, from most to least important.
"""
interp_name = interpreter_name()
if interp_name == "cp":
yield from cpython_tags(warn=warn)
else:
yield from generic_tags()
if interp_name == "pp":
yield from compatible_tags(interpreter="pp3")
else:
yield from compatible_tags()
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/packaging/tags.py
|
Python
|
mit
| 15,699 |
# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
import re
from typing import FrozenSet, NewType, Tuple, Union, cast
from .tags import Tag, parse_tag
from .version import InvalidVersion, Version
BuildTag = Union[Tuple[()], Tuple[int, str]]
NormalizedName = NewType("NormalizedName", str)
class InvalidWheelFilename(ValueError):
"""
An invalid wheel filename was found, users should refer to PEP 427.
"""
class InvalidSdistFilename(ValueError):
"""
An invalid sdist filename was found, users should refer to the packaging user guide.
"""
_canonicalize_regex = re.compile(r"[-_.]+")
# PEP 427: The build number must start with a digit.
_build_tag_regex = re.compile(r"(\d+)(.*)")
def canonicalize_name(name: str) -> NormalizedName:
# This is taken from PEP 503.
value = _canonicalize_regex.sub("-", name).lower()
return cast(NormalizedName, value)
def canonicalize_version(version: Union[Version, str]) -> str:
"""
This is very similar to Version.__str__, but has one subtle difference
with the way it handles the release segment.
"""
if isinstance(version, str):
try:
parsed = Version(version)
except InvalidVersion:
# Legacy versions cannot be normalized
return version
else:
parsed = version
parts = []
# Epoch
if parsed.epoch != 0:
parts.append(f"{parsed.epoch}!")
# Release segment
# NB: This strips trailing '.0's to normalize
parts.append(re.sub(r"(\.0)+$", "", ".".join(str(x) for x in parsed.release)))
# Pre-release
if parsed.pre is not None:
parts.append("".join(str(x) for x in parsed.pre))
# Post-release
if parsed.post is not None:
parts.append(f".post{parsed.post}")
# Development release
if parsed.dev is not None:
parts.append(f".dev{parsed.dev}")
# Local version segment
if parsed.local is not None:
parts.append(f"+{parsed.local}")
return "".join(parts)
def parse_wheel_filename(
filename: str,
) -> Tuple[NormalizedName, Version, BuildTag, FrozenSet[Tag]]:
if not filename.endswith(".whl"):
raise InvalidWheelFilename(
f"Invalid wheel filename (extension must be '.whl'): {filename}"
)
filename = filename[:-4]
dashes = filename.count("-")
if dashes not in (4, 5):
raise InvalidWheelFilename(
f"Invalid wheel filename (wrong number of parts): {filename}"
)
parts = filename.split("-", dashes - 2)
name_part = parts[0]
# See PEP 427 for the rules on escaping the project name
if "__" in name_part or re.match(r"^[\w\d._]*$", name_part, re.UNICODE) is None:
raise InvalidWheelFilename(f"Invalid project name: {filename}")
name = canonicalize_name(name_part)
version = Version(parts[1])
if dashes == 5:
build_part = parts[2]
build_match = _build_tag_regex.match(build_part)
if build_match is None:
raise InvalidWheelFilename(
f"Invalid build number: {build_part} in '{filename}'"
)
build = cast(BuildTag, (int(build_match.group(1)), build_match.group(2)))
else:
build = ()
tags = parse_tag(parts[-1])
return (name, version, build, tags)
def parse_sdist_filename(filename: str) -> Tuple[NormalizedName, Version]:
if filename.endswith(".tar.gz"):
file_stem = filename[: -len(".tar.gz")]
elif filename.endswith(".zip"):
file_stem = filename[: -len(".zip")]
else:
raise InvalidSdistFilename(
f"Invalid sdist filename (extension must be '.tar.gz' or '.zip'):"
f" {filename}"
)
# We are requiring a PEP 440 version, which cannot contain dashes,
# so we split on the last dash.
name_part, sep, version_part = file_stem.rpartition("-")
if not sep:
raise InvalidSdistFilename(f"Invalid sdist filename: {filename}")
name = canonicalize_name(name_part)
version = Version(version_part)
return (name, version)
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/packaging/utils.py
|
Python
|
mit
| 4,200 |
# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
import collections
import itertools
import re
import warnings
from typing import Callable, Iterator, List, Optional, SupportsInt, Tuple, Union
from ._structures import Infinity, InfinityType, NegativeInfinity, NegativeInfinityType
__all__ = ["parse", "Version", "LegacyVersion", "InvalidVersion", "VERSION_PATTERN"]
InfiniteTypes = Union[InfinityType, NegativeInfinityType]
PrePostDevType = Union[InfiniteTypes, Tuple[str, int]]
SubLocalType = Union[InfiniteTypes, int, str]
LocalType = Union[
NegativeInfinityType,
Tuple[
Union[
SubLocalType,
Tuple[SubLocalType, str],
Tuple[NegativeInfinityType, SubLocalType],
],
...,
],
]
CmpKey = Tuple[
int, Tuple[int, ...], PrePostDevType, PrePostDevType, PrePostDevType, LocalType
]
LegacyCmpKey = Tuple[int, Tuple[str, ...]]
VersionComparisonMethod = Callable[
[Union[CmpKey, LegacyCmpKey], Union[CmpKey, LegacyCmpKey]], bool
]
_Version = collections.namedtuple(
"_Version", ["epoch", "release", "dev", "pre", "post", "local"]
)
def parse(version: str) -> Union["LegacyVersion", "Version"]:
"""
Parse the given version string and return either a :class:`Version` object
or a :class:`LegacyVersion` object depending on if the given version is
a valid PEP 440 version or a legacy version.
"""
try:
return Version(version)
except InvalidVersion:
return LegacyVersion(version)
class InvalidVersion(ValueError):
"""
An invalid version was found, users should refer to PEP 440.
"""
class _BaseVersion:
_key: Union[CmpKey, LegacyCmpKey]
def __hash__(self) -> int:
return hash(self._key)
# Please keep the duplicated `isinstance` check
# in the six comparisons hereunder
# unless you find a way to avoid adding overhead function calls.
def __lt__(self, other: "_BaseVersion") -> bool:
if not isinstance(other, _BaseVersion):
return NotImplemented
return self._key < other._key
def __le__(self, other: "_BaseVersion") -> bool:
if not isinstance(other, _BaseVersion):
return NotImplemented
return self._key <= other._key
def __eq__(self, other: object) -> bool:
if not isinstance(other, _BaseVersion):
return NotImplemented
return self._key == other._key
def __ge__(self, other: "_BaseVersion") -> bool:
if not isinstance(other, _BaseVersion):
return NotImplemented
return self._key >= other._key
def __gt__(self, other: "_BaseVersion") -> bool:
if not isinstance(other, _BaseVersion):
return NotImplemented
return self._key > other._key
def __ne__(self, other: object) -> bool:
if not isinstance(other, _BaseVersion):
return NotImplemented
return self._key != other._key
class LegacyVersion(_BaseVersion):
def __init__(self, version: str) -> None:
self._version = str(version)
self._key = _legacy_cmpkey(self._version)
warnings.warn(
"Creating a LegacyVersion has been deprecated and will be "
"removed in the next major release",
DeprecationWarning,
)
def __str__(self) -> str:
return self._version
def __repr__(self) -> str:
return f"<LegacyVersion('{self}')>"
@property
def public(self) -> str:
return self._version
@property
def base_version(self) -> str:
return self._version
@property
def epoch(self) -> int:
return -1
@property
def release(self) -> None:
return None
@property
def pre(self) -> None:
return None
@property
def post(self) -> None:
return None
@property
def dev(self) -> None:
return None
@property
def local(self) -> None:
return None
@property
def is_prerelease(self) -> bool:
return False
@property
def is_postrelease(self) -> bool:
return False
@property
def is_devrelease(self) -> bool:
return False
_legacy_version_component_re = re.compile(r"(\d+ | [a-z]+ | \.| -)", re.VERBOSE)
_legacy_version_replacement_map = {
"pre": "c",
"preview": "c",
"-": "final-",
"rc": "c",
"dev": "@",
}
def _parse_version_parts(s: str) -> Iterator[str]:
for part in _legacy_version_component_re.split(s):
part = _legacy_version_replacement_map.get(part, part)
if not part or part == ".":
continue
if part[:1] in "0123456789":
# pad for numeric comparison
yield part.zfill(8)
else:
yield "*" + part
# ensure that alpha/beta/candidate are before final
yield "*final"
def _legacy_cmpkey(version: str) -> LegacyCmpKey:
# We hardcode an epoch of -1 here. A PEP 440 version can only have a epoch
# greater than or equal to 0. This will effectively put the LegacyVersion,
# which uses the defacto standard originally implemented by setuptools,
# as before all PEP 440 versions.
epoch = -1
# This scheme is taken from pkg_resources.parse_version setuptools prior to
# it's adoption of the packaging library.
parts: List[str] = []
for part in _parse_version_parts(version.lower()):
if part.startswith("*"):
# remove "-" before a prerelease tag
if part < "*final":
while parts and parts[-1] == "*final-":
parts.pop()
# remove trailing zeros from each series of numeric parts
while parts and parts[-1] == "00000000":
parts.pop()
parts.append(part)
return epoch, tuple(parts)
# Deliberately not anchored to the start and end of the string, to make it
# easier for 3rd party code to reuse
VERSION_PATTERN = r"""
v?
(?:
(?:(?P<epoch>[0-9]+)!)? # epoch
(?P<release>[0-9]+(?:\.[0-9]+)*) # release segment
(?P<pre> # pre-release
[-_\.]?
(?P<pre_l>(a|b|c|rc|alpha|beta|pre|preview))
[-_\.]?
(?P<pre_n>[0-9]+)?
)?
(?P<post> # post release
(?:-(?P<post_n1>[0-9]+))
|
(?:
[-_\.]?
(?P<post_l>post|rev|r)
[-_\.]?
(?P<post_n2>[0-9]+)?
)
)?
(?P<dev> # dev release
[-_\.]?
(?P<dev_l>dev)
[-_\.]?
(?P<dev_n>[0-9]+)?
)?
)
(?:\+(?P<local>[a-z0-9]+(?:[-_\.][a-z0-9]+)*))? # local version
"""
class Version(_BaseVersion):
_regex = re.compile(r"^\s*" + VERSION_PATTERN + r"\s*$", re.VERBOSE | re.IGNORECASE)
def __init__(self, version: str) -> None:
# Validate the version and parse it into pieces
match = self._regex.search(version)
if not match:
raise InvalidVersion(f"Invalid version: '{version}'")
# Store the parsed out pieces of the version
self._version = _Version(
epoch=int(match.group("epoch")) if match.group("epoch") else 0,
release=tuple(int(i) for i in match.group("release").split(".")),
pre=_parse_letter_version(match.group("pre_l"), match.group("pre_n")),
post=_parse_letter_version(
match.group("post_l"), match.group("post_n1") or match.group("post_n2")
),
dev=_parse_letter_version(match.group("dev_l"), match.group("dev_n")),
local=_parse_local_version(match.group("local")),
)
# Generate a key which will be used for sorting
self._key = _cmpkey(
self._version.epoch,
self._version.release,
self._version.pre,
self._version.post,
self._version.dev,
self._version.local,
)
def __repr__(self) -> str:
return f"<Version('{self}')>"
def __str__(self) -> str:
parts = []
# Epoch
if self.epoch != 0:
parts.append(f"{self.epoch}!")
# Release segment
parts.append(".".join(str(x) for x in self.release))
# Pre-release
if self.pre is not None:
parts.append("".join(str(x) for x in self.pre))
# Post-release
if self.post is not None:
parts.append(f".post{self.post}")
# Development release
if self.dev is not None:
parts.append(f".dev{self.dev}")
# Local version segment
if self.local is not None:
parts.append(f"+{self.local}")
return "".join(parts)
@property
def epoch(self) -> int:
_epoch: int = self._version.epoch
return _epoch
@property
def release(self) -> Tuple[int, ...]:
_release: Tuple[int, ...] = self._version.release
return _release
@property
def pre(self) -> Optional[Tuple[str, int]]:
_pre: Optional[Tuple[str, int]] = self._version.pre
return _pre
@property
def post(self) -> Optional[int]:
return self._version.post[1] if self._version.post else None
@property
def dev(self) -> Optional[int]:
return self._version.dev[1] if self._version.dev else None
@property
def local(self) -> Optional[str]:
if self._version.local:
return ".".join(str(x) for x in self._version.local)
else:
return None
@property
def public(self) -> str:
return str(self).split("+", 1)[0]
@property
def base_version(self) -> str:
parts = []
# Epoch
if self.epoch != 0:
parts.append(f"{self.epoch}!")
# Release segment
parts.append(".".join(str(x) for x in self.release))
return "".join(parts)
@property
def is_prerelease(self) -> bool:
return self.dev is not None or self.pre is not None
@property
def is_postrelease(self) -> bool:
return self.post is not None
@property
def is_devrelease(self) -> bool:
return self.dev is not None
@property
def major(self) -> int:
return self.release[0] if len(self.release) >= 1 else 0
@property
def minor(self) -> int:
return self.release[1] if len(self.release) >= 2 else 0
@property
def micro(self) -> int:
return self.release[2] if len(self.release) >= 3 else 0
def _parse_letter_version(
letter: str, number: Union[str, bytes, SupportsInt]
) -> Optional[Tuple[str, int]]:
if letter:
# We consider there to be an implicit 0 in a pre-release if there is
# not a numeral associated with it.
if number is None:
number = 0
# We normalize any letters to their lower case form
letter = letter.lower()
# We consider some words to be alternate spellings of other words and
# in those cases we want to normalize the spellings to our preferred
# spelling.
if letter == "alpha":
letter = "a"
elif letter == "beta":
letter = "b"
elif letter in ["c", "pre", "preview"]:
letter = "rc"
elif letter in ["rev", "r"]:
letter = "post"
return letter, int(number)
if not letter and number:
# We assume if we are given a number, but we are not given a letter
# then this is using the implicit post release syntax (e.g. 1.0-1)
letter = "post"
return letter, int(number)
return None
_local_version_separators = re.compile(r"[\._-]")
def _parse_local_version(local: str) -> Optional[LocalType]:
"""
Takes a string like abc.1.twelve and turns it into ("abc", 1, "twelve").
"""
if local is not None:
return tuple(
part.lower() if not part.isdigit() else int(part)
for part in _local_version_separators.split(local)
)
return None
def _cmpkey(
epoch: int,
release: Tuple[int, ...],
pre: Optional[Tuple[str, int]],
post: Optional[Tuple[str, int]],
dev: Optional[Tuple[str, int]],
local: Optional[Tuple[SubLocalType]],
) -> CmpKey:
# When we compare a release version, we want to compare it with all of the
# trailing zeros removed. So we'll use a reverse the list, drop all the now
# leading zeros until we come to something non zero, then take the rest
# re-reverse it back into the correct order and make it a tuple and use
# that for our sorting key.
_release = tuple(
reversed(list(itertools.dropwhile(lambda x: x == 0, reversed(release))))
)
# We need to "trick" the sorting algorithm to put 1.0.dev0 before 1.0a0.
# We'll do this by abusing the pre segment, but we _only_ want to do this
# if there is not a pre or a post segment. If we have one of those then
# the normal sorting rules will handle this case correctly.
if pre is None and post is None and dev is not None:
_pre: PrePostDevType = NegativeInfinity
# Versions without a pre-release (except as noted above) should sort after
# those with one.
elif pre is None:
_pre = Infinity
else:
_pre = pre
# Versions without a post segment should sort before those with one.
if post is None:
_post: PrePostDevType = NegativeInfinity
else:
_post = post
# Versions without a development segment should sort after those with one.
if dev is None:
_dev: PrePostDevType = Infinity
else:
_dev = dev
if local is None:
# Versions without a local segment should sort before those with one.
_local: LocalType = NegativeInfinity
else:
# Versions with a local segment need that segment parsed to implement
# the sorting rules in PEP440.
# - Alpha numeric segments sort before numeric segments
# - Alpha numeric segments sort lexicographically
# - Numeric segments sort numerically
# - Shorter versions sort before longer versions when the prefixes
# match exactly
_local = tuple(
(i, "") if isinstance(i, int) else (NegativeInfinity, i) for i in local
)
return epoch, _release, _pre, _post, _dev, _local
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/packaging/version.py
|
Python
|
mit
| 14,665 |
"""Wrappers to build Python packages using PEP 517 hooks
"""
__version__ = '0.13.0'
from .wrappers import * # noqa: F401, F403
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/pep517/__init__.py
|
Python
|
mit
| 130 |
__all__ = ("tomllib",)
import sys
if sys.version_info >= (3, 11):
import tomllib
else:
from pip._vendor import tomli as tomllib
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/pep517/_compat.py
|
Python
|
mit
| 138 |
"""Build a project using PEP 517 hooks.
"""
import argparse
import logging
import os
import shutil
import tempfile
from ._compat import tomllib
from .envbuild import BuildEnvironment
from .wrappers import Pep517HookCaller
log = logging.getLogger(__name__)
def validate_system(system):
"""
Ensure build system has the requisite fields.
"""
required = {'requires', 'build-backend'}
if not (required <= set(system)):
message = "Missing required fields: {missing}".format(
missing=required-set(system),
)
raise ValueError(message)
def load_system(source_dir):
"""
Load the build system from a source dir (pyproject.toml).
"""
pyproject = os.path.join(source_dir, 'pyproject.toml')
with open(pyproject, 'rb') as f:
pyproject_data = tomllib.load(f)
return pyproject_data['build-system']
def compat_system(source_dir):
"""
Given a source dir, attempt to get a build system backend
and requirements from pyproject.toml. Fallback to
setuptools but only if the file was not found or a build
system was not indicated.
"""
try:
system = load_system(source_dir)
except (FileNotFoundError, KeyError):
system = {}
system.setdefault(
'build-backend',
'setuptools.build_meta:__legacy__',
)
system.setdefault('requires', ['setuptools', 'wheel'])
return system
def _do_build(hooks, env, dist, dest):
get_requires_name = 'get_requires_for_build_{dist}'.format(**locals())
get_requires = getattr(hooks, get_requires_name)
reqs = get_requires({})
log.info('Got build requires: %s', reqs)
env.pip_install(reqs)
log.info('Installed dynamic build dependencies')
with tempfile.TemporaryDirectory() as td:
log.info('Trying to build %s in %s', dist, td)
build_name = 'build_{dist}'.format(**locals())
build = getattr(hooks, build_name)
filename = build(td, {})
source = os.path.join(td, filename)
shutil.move(source, os.path.join(dest, os.path.basename(filename)))
def build(source_dir, dist, dest=None, system=None):
system = system or load_system(source_dir)
dest = os.path.join(source_dir, dest or 'dist')
os.makedirs(dest, exist_ok=True)
validate_system(system)
hooks = Pep517HookCaller(
source_dir, system['build-backend'], system.get('backend-path')
)
with BuildEnvironment() as env:
env.pip_install(system['requires'])
_do_build(hooks, env, dist, dest)
parser = argparse.ArgumentParser()
parser.add_argument(
'source_dir',
help="A directory containing pyproject.toml",
)
parser.add_argument(
'--binary', '-b',
action='store_true',
default=False,
)
parser.add_argument(
'--source', '-s',
action='store_true',
default=False,
)
parser.add_argument(
'--out-dir', '-o',
help="Destination in which to save the builds relative to source dir",
)
def main(args):
log.warning('pep517.build is deprecated. '
'Consider switching to https://pypi.org/project/build/')
# determine which dists to build
dists = list(filter(None, (
'sdist' if args.source or not args.binary else None,
'wheel' if args.binary or not args.source else None,
)))
for dist in dists:
build(args.source_dir, dist, args.out_dir)
if __name__ == '__main__':
main(parser.parse_args())
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/pep517/build.py
|
Python
|
mit
| 3,443 |
"""Check a project and backend by attempting to build using PEP 517 hooks.
"""
import argparse
import logging
import os
import shutil
import sys
import tarfile
import zipfile
from os.path import isfile
from os.path import join as pjoin
from subprocess import CalledProcessError
from tempfile import mkdtemp
from ._compat import tomllib
from .colorlog import enable_colourful_output
from .envbuild import BuildEnvironment
from .wrappers import Pep517HookCaller
log = logging.getLogger(__name__)
def check_build_sdist(hooks, build_sys_requires):
with BuildEnvironment() as env:
try:
env.pip_install(build_sys_requires)
log.info('Installed static build dependencies')
except CalledProcessError:
log.error('Failed to install static build dependencies')
return False
try:
reqs = hooks.get_requires_for_build_sdist({})
log.info('Got build requires: %s', reqs)
except Exception:
log.error('Failure in get_requires_for_build_sdist', exc_info=True)
return False
try:
env.pip_install(reqs)
log.info('Installed dynamic build dependencies')
except CalledProcessError:
log.error('Failed to install dynamic build dependencies')
return False
td = mkdtemp()
log.info('Trying to build sdist in %s', td)
try:
try:
filename = hooks.build_sdist(td, {})
log.info('build_sdist returned %r', filename)
except Exception:
log.info('Failure in build_sdist', exc_info=True)
return False
if not filename.endswith('.tar.gz'):
log.error(
"Filename %s doesn't have .tar.gz extension", filename)
return False
path = pjoin(td, filename)
if isfile(path):
log.info("Output file %s exists", path)
else:
log.error("Output file %s does not exist", path)
return False
if tarfile.is_tarfile(path):
log.info("Output file is a tar file")
else:
log.error("Output file is not a tar file")
return False
finally:
shutil.rmtree(td)
return True
def check_build_wheel(hooks, build_sys_requires):
with BuildEnvironment() as env:
try:
env.pip_install(build_sys_requires)
log.info('Installed static build dependencies')
except CalledProcessError:
log.error('Failed to install static build dependencies')
return False
try:
reqs = hooks.get_requires_for_build_wheel({})
log.info('Got build requires: %s', reqs)
except Exception:
log.error('Failure in get_requires_for_build_sdist', exc_info=True)
return False
try:
env.pip_install(reqs)
log.info('Installed dynamic build dependencies')
except CalledProcessError:
log.error('Failed to install dynamic build dependencies')
return False
td = mkdtemp()
log.info('Trying to build wheel in %s', td)
try:
try:
filename = hooks.build_wheel(td, {})
log.info('build_wheel returned %r', filename)
except Exception:
log.info('Failure in build_wheel', exc_info=True)
return False
if not filename.endswith('.whl'):
log.error("Filename %s doesn't have .whl extension", filename)
return False
path = pjoin(td, filename)
if isfile(path):
log.info("Output file %s exists", path)
else:
log.error("Output file %s does not exist", path)
return False
if zipfile.is_zipfile(path):
log.info("Output file is a zip file")
else:
log.error("Output file is not a zip file")
return False
finally:
shutil.rmtree(td)
return True
def check(source_dir):
pyproject = pjoin(source_dir, 'pyproject.toml')
if isfile(pyproject):
log.info('Found pyproject.toml')
else:
log.error('Missing pyproject.toml')
return False
try:
with open(pyproject, 'rb') as f:
pyproject_data = tomllib.load(f)
# Ensure the mandatory data can be loaded
buildsys = pyproject_data['build-system']
requires = buildsys['requires']
backend = buildsys['build-backend']
backend_path = buildsys.get('backend-path')
log.info('Loaded pyproject.toml')
except (tomllib.TOMLDecodeError, KeyError):
log.error("Invalid pyproject.toml", exc_info=True)
return False
hooks = Pep517HookCaller(source_dir, backend, backend_path)
sdist_ok = check_build_sdist(hooks, requires)
wheel_ok = check_build_wheel(hooks, requires)
if not sdist_ok:
log.warning('Sdist checks failed; scroll up to see')
if not wheel_ok:
log.warning('Wheel checks failed')
return sdist_ok
def main(argv=None):
log.warning('pep517.check is deprecated. '
'Consider switching to https://pypi.org/project/build/')
ap = argparse.ArgumentParser()
ap.add_argument(
'source_dir',
help="A directory containing pyproject.toml")
args = ap.parse_args(argv)
enable_colourful_output()
ok = check(args.source_dir)
if ok:
print(ansi('Checks passed', 'green'))
else:
print(ansi('Checks failed', 'red'))
sys.exit(1)
ansi_codes = {
'reset': '\x1b[0m',
'bold': '\x1b[1m',
'red': '\x1b[31m',
'green': '\x1b[32m',
}
def ansi(s, attr):
if os.name != 'nt' and sys.stdout.isatty():
return ansi_codes[attr] + str(s) + ansi_codes['reset']
else:
return str(s)
if __name__ == '__main__':
main()
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/pep517/check.py
|
Python
|
mit
| 6,083 |
"""Nicer log formatting with colours.
Code copied from Tornado, Apache licensed.
"""
# Copyright 2012 Facebook
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import logging
import sys
try:
import curses
except ImportError:
curses = None
def _stderr_supports_color():
color = False
if curses and hasattr(sys.stderr, 'isatty') and sys.stderr.isatty():
try:
curses.setupterm()
if curses.tigetnum("colors") > 0:
color = True
except Exception:
pass
return color
class LogFormatter(logging.Formatter):
"""Log formatter with colour support
"""
DEFAULT_COLORS = {
logging.INFO: 2, # Green
logging.WARNING: 3, # Yellow
logging.ERROR: 1, # Red
logging.CRITICAL: 1,
}
def __init__(self, color=True, datefmt=None):
r"""
:arg bool color: Enables color support.
:arg string fmt: Log message format.
It will be applied to the attributes dict of log records. The
text between ``%(color)s`` and ``%(end_color)s`` will be colored
depending on the level if color support is on.
:arg dict colors: color mappings from logging level to terminal color
code
:arg string datefmt: Datetime format.
Used for formatting ``(asctime)`` placeholder in ``prefix_fmt``.
.. versionchanged:: 3.2
Added ``fmt`` and ``datefmt`` arguments.
"""
logging.Formatter.__init__(self, datefmt=datefmt)
self._colors = {}
if color and _stderr_supports_color():
# The curses module has some str/bytes confusion in
# python3. Until version 3.2.3, most methods return
# bytes, but only accept strings. In addition, we want to
# output these strings with the logging module, which
# works with unicode strings. The explicit calls to
# unicode() below are harmless in python2 but will do the
# right conversion in python 3.
fg_color = (curses.tigetstr("setaf") or
curses.tigetstr("setf") or "")
for levelno, code in self.DEFAULT_COLORS.items():
self._colors[levelno] = str(
curses.tparm(fg_color, code), "ascii")
self._normal = str(curses.tigetstr("sgr0"), "ascii")
scr = curses.initscr()
self.termwidth = scr.getmaxyx()[1]
curses.endwin()
else:
self._normal = ''
# Default width is usually 80, but too wide is
# worse than too narrow
self.termwidth = 70
def formatMessage(self, record):
mlen = len(record.message)
right_text = '{initial}-{name}'.format(initial=record.levelname[0],
name=record.name)
if mlen + len(right_text) < self.termwidth:
space = ' ' * (self.termwidth - (mlen + len(right_text)))
else:
space = ' '
if record.levelno in self._colors:
start_color = self._colors[record.levelno]
end_color = self._normal
else:
start_color = end_color = ''
return record.message + space + start_color + right_text + end_color
def enable_colourful_output(level=logging.INFO):
handler = logging.StreamHandler()
handler.setFormatter(LogFormatter())
logging.root.addHandler(handler)
logging.root.setLevel(level)
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/pep517/colorlog.py
|
Python
|
mit
| 3,994 |
import io
import os
import zipfile
def dir_to_zipfile(root):
"""Construct an in-memory zip file for a directory."""
buffer = io.BytesIO()
zip_file = zipfile.ZipFile(buffer, 'w')
for root, dirs, files in os.walk(root):
for path in dirs:
fs_path = os.path.join(root, path)
rel_path = os.path.relpath(fs_path, root)
zip_file.writestr(rel_path + '/', '')
for path in files:
fs_path = os.path.join(root, path)
rel_path = os.path.relpath(fs_path, root)
zip_file.write(fs_path, rel_path)
return zip_file
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/pep517/dirtools.py
|
Python
|
mit
| 607 |
"""Build wheels/sdists by installing build deps to a temporary environment.
"""
import logging
import os
import shutil
import sys
from subprocess import check_call
from sysconfig import get_paths
from tempfile import mkdtemp
from ._compat import tomllib
from .wrappers import LoggerWrapper, Pep517HookCaller
log = logging.getLogger(__name__)
def _load_pyproject(source_dir):
with open(
os.path.join(source_dir, 'pyproject.toml'),
'rb',
) as f:
pyproject_data = tomllib.load(f)
buildsys = pyproject_data['build-system']
return (
buildsys['requires'],
buildsys['build-backend'],
buildsys.get('backend-path'),
)
class BuildEnvironment:
"""Context manager to install build deps in a simple temporary environment
Based on code I wrote for pip, which is MIT licensed.
"""
# Copyright (c) 2008-2016 The pip developers (see AUTHORS.txt file)
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
path = None
def __init__(self, cleanup=True):
self._cleanup = cleanup
def __enter__(self):
self.path = mkdtemp(prefix='pep517-build-env-')
log.info('Temporary build environment: %s', self.path)
self.save_path = os.environ.get('PATH', None)
self.save_pythonpath = os.environ.get('PYTHONPATH', None)
install_scheme = 'nt' if (os.name == 'nt') else 'posix_prefix'
install_dirs = get_paths(install_scheme, vars={
'base': self.path,
'platbase': self.path,
})
scripts = install_dirs['scripts']
if self.save_path:
os.environ['PATH'] = scripts + os.pathsep + self.save_path
else:
os.environ['PATH'] = scripts + os.pathsep + os.defpath
if install_dirs['purelib'] == install_dirs['platlib']:
lib_dirs = install_dirs['purelib']
else:
lib_dirs = install_dirs['purelib'] + os.pathsep + \
install_dirs['platlib']
if self.save_pythonpath:
os.environ['PYTHONPATH'] = lib_dirs + os.pathsep + \
self.save_pythonpath
else:
os.environ['PYTHONPATH'] = lib_dirs
return self
def pip_install(self, reqs):
"""Install dependencies into this env by calling pip in a subprocess"""
if not reqs:
return
log.info('Calling pip to install %s', reqs)
cmd = [
sys.executable, '-m', 'pip', 'install', '--ignore-installed',
'--prefix', self.path] + list(reqs)
check_call(
cmd,
stdout=LoggerWrapper(log, logging.INFO),
stderr=LoggerWrapper(log, logging.ERROR),
)
def __exit__(self, exc_type, exc_val, exc_tb):
needs_cleanup = (
self._cleanup and
self.path is not None and
os.path.isdir(self.path)
)
if needs_cleanup:
shutil.rmtree(self.path)
if self.save_path is None:
os.environ.pop('PATH', None)
else:
os.environ['PATH'] = self.save_path
if self.save_pythonpath is None:
os.environ.pop('PYTHONPATH', None)
else:
os.environ['PYTHONPATH'] = self.save_pythonpath
def build_wheel(source_dir, wheel_dir, config_settings=None):
"""Build a wheel from a source directory using PEP 517 hooks.
:param str source_dir: Source directory containing pyproject.toml
:param str wheel_dir: Target directory to create wheel in
:param dict config_settings: Options to pass to build backend
This is a blocking function which will run pip in a subprocess to install
build requirements.
"""
if config_settings is None:
config_settings = {}
requires, backend, backend_path = _load_pyproject(source_dir)
hooks = Pep517HookCaller(source_dir, backend, backend_path)
with BuildEnvironment() as env:
env.pip_install(requires)
reqs = hooks.get_requires_for_build_wheel(config_settings)
env.pip_install(reqs)
return hooks.build_wheel(wheel_dir, config_settings)
def build_sdist(source_dir, sdist_dir, config_settings=None):
"""Build an sdist from a source directory using PEP 517 hooks.
:param str source_dir: Source directory containing pyproject.toml
:param str sdist_dir: Target directory to place sdist in
:param dict config_settings: Options to pass to build backend
This is a blocking function which will run pip in a subprocess to install
build requirements.
"""
if config_settings is None:
config_settings = {}
requires, backend, backend_path = _load_pyproject(source_dir)
hooks = Pep517HookCaller(source_dir, backend, backend_path)
with BuildEnvironment() as env:
env.pip_install(requires)
reqs = hooks.get_requires_for_build_sdist(config_settings)
env.pip_install(reqs)
return hooks.build_sdist(sdist_dir, config_settings)
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/pep517/envbuild.py
|
Python
|
mit
| 6,081 |
"""This is a subpackage because the directory is on sys.path for _in_process.py
The subpackage should stay as empty as possible to avoid shadowing modules that
the backend might import.
"""
from contextlib import contextmanager
from os.path import abspath, dirname
from os.path import join as pjoin
try:
import importlib.resources as resources
try:
resources.files
except AttributeError:
# Python 3.8 compatibility
def _in_proc_script_path():
return resources.path(__package__, '_in_process.py')
else:
def _in_proc_script_path():
return resources.as_file(
resources.files(__package__).joinpath('_in_process.py'))
except ImportError:
# Python 3.6 compatibility
@contextmanager
def _in_proc_script_path():
yield pjoin(dirname(abspath(__file__)), '_in_process.py')
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/pep517/in_process/__init__.py
|
Python
|
mit
| 872 |
"""This is invoked in a subprocess to call the build backend hooks.
It expects:
- Command line args: hook_name, control_dir
- Environment variables:
PEP517_BUILD_BACKEND=entry.point:spec
PEP517_BACKEND_PATH=paths (separated with os.pathsep)
- control_dir/input.json:
- {"kwargs": {...}}
Results:
- control_dir/output.json
- {"return_val": ...}
"""
import json
import os
import os.path
import re
import shutil
import sys
import traceback
from glob import glob
from importlib import import_module
from os.path import join as pjoin
# This file is run as a script, and `import wrappers` is not zip-safe, so we
# include write_json() and read_json() from wrappers.py.
def write_json(obj, path, **kwargs):
with open(path, 'w', encoding='utf-8') as f:
json.dump(obj, f, **kwargs)
def read_json(path):
with open(path, encoding='utf-8') as f:
return json.load(f)
class BackendUnavailable(Exception):
"""Raised if we cannot import the backend"""
def __init__(self, traceback):
self.traceback = traceback
class BackendInvalid(Exception):
"""Raised if the backend is invalid"""
def __init__(self, message):
self.message = message
class HookMissing(Exception):
"""Raised if a hook is missing and we are not executing the fallback"""
def __init__(self, hook_name=None):
super().__init__(hook_name)
self.hook_name = hook_name
def contained_in(filename, directory):
"""Test if a file is located within the given directory."""
filename = os.path.normcase(os.path.abspath(filename))
directory = os.path.normcase(os.path.abspath(directory))
return os.path.commonprefix([filename, directory]) == directory
def _build_backend():
"""Find and load the build backend"""
# Add in-tree backend directories to the front of sys.path.
backend_path = os.environ.get('PEP517_BACKEND_PATH')
if backend_path:
extra_pathitems = backend_path.split(os.pathsep)
sys.path[:0] = extra_pathitems
ep = os.environ['PEP517_BUILD_BACKEND']
mod_path, _, obj_path = ep.partition(':')
try:
obj = import_module(mod_path)
except ImportError:
raise BackendUnavailable(traceback.format_exc())
if backend_path:
if not any(
contained_in(obj.__file__, path)
for path in extra_pathitems
):
raise BackendInvalid("Backend was not loaded from backend-path")
if obj_path:
for path_part in obj_path.split('.'):
obj = getattr(obj, path_part)
return obj
def _supported_features():
"""Return the list of options features supported by the backend.
Returns a list of strings.
The only possible value is 'build_editable'.
"""
backend = _build_backend()
features = []
if hasattr(backend, "build_editable"):
features.append("build_editable")
return features
def get_requires_for_build_wheel(config_settings):
"""Invoke the optional get_requires_for_build_wheel hook
Returns [] if the hook is not defined.
"""
backend = _build_backend()
try:
hook = backend.get_requires_for_build_wheel
except AttributeError:
return []
else:
return hook(config_settings)
def get_requires_for_build_editable(config_settings):
"""Invoke the optional get_requires_for_build_editable hook
Returns [] if the hook is not defined.
"""
backend = _build_backend()
try:
hook = backend.get_requires_for_build_editable
except AttributeError:
return []
else:
return hook(config_settings)
def prepare_metadata_for_build_wheel(
metadata_directory, config_settings, _allow_fallback):
"""Invoke optional prepare_metadata_for_build_wheel
Implements a fallback by building a wheel if the hook isn't defined,
unless _allow_fallback is False in which case HookMissing is raised.
"""
backend = _build_backend()
try:
hook = backend.prepare_metadata_for_build_wheel
except AttributeError:
if not _allow_fallback:
raise HookMissing()
whl_basename = backend.build_wheel(metadata_directory, config_settings)
return _get_wheel_metadata_from_wheel(whl_basename, metadata_directory,
config_settings)
else:
return hook(metadata_directory, config_settings)
def prepare_metadata_for_build_editable(
metadata_directory, config_settings, _allow_fallback):
"""Invoke optional prepare_metadata_for_build_editable
Implements a fallback by building an editable wheel if the hook isn't
defined, unless _allow_fallback is False in which case HookMissing is
raised.
"""
backend = _build_backend()
try:
hook = backend.prepare_metadata_for_build_editable
except AttributeError:
if not _allow_fallback:
raise HookMissing()
try:
build_hook = backend.build_editable
except AttributeError:
raise HookMissing(hook_name='build_editable')
else:
whl_basename = build_hook(metadata_directory, config_settings)
return _get_wheel_metadata_from_wheel(whl_basename,
metadata_directory,
config_settings)
else:
return hook(metadata_directory, config_settings)
WHEEL_BUILT_MARKER = 'PEP517_ALREADY_BUILT_WHEEL'
def _dist_info_files(whl_zip):
"""Identify the .dist-info folder inside a wheel ZipFile."""
res = []
for path in whl_zip.namelist():
m = re.match(r'[^/\\]+-[^/\\]+\.dist-info/', path)
if m:
res.append(path)
if res:
return res
raise Exception("No .dist-info folder found in wheel")
def _get_wheel_metadata_from_wheel(
whl_basename, metadata_directory, config_settings):
"""Extract the metadata from a wheel.
Fallback for when the build backend does not
define the 'get_wheel_metadata' hook.
"""
from zipfile import ZipFile
with open(os.path.join(metadata_directory, WHEEL_BUILT_MARKER), 'wb'):
pass # Touch marker file
whl_file = os.path.join(metadata_directory, whl_basename)
with ZipFile(whl_file) as zipf:
dist_info = _dist_info_files(zipf)
zipf.extractall(path=metadata_directory, members=dist_info)
return dist_info[0].split('/')[0]
def _find_already_built_wheel(metadata_directory):
"""Check for a wheel already built during the get_wheel_metadata hook.
"""
if not metadata_directory:
return None
metadata_parent = os.path.dirname(metadata_directory)
if not os.path.isfile(pjoin(metadata_parent, WHEEL_BUILT_MARKER)):
return None
whl_files = glob(os.path.join(metadata_parent, '*.whl'))
if not whl_files:
print('Found wheel built marker, but no .whl files')
return None
if len(whl_files) > 1:
print('Found multiple .whl files; unspecified behaviour. '
'Will call build_wheel.')
return None
# Exactly one .whl file
return whl_files[0]
def build_wheel(wheel_directory, config_settings, metadata_directory=None):
"""Invoke the mandatory build_wheel hook.
If a wheel was already built in the
prepare_metadata_for_build_wheel fallback, this
will copy it rather than rebuilding the wheel.
"""
prebuilt_whl = _find_already_built_wheel(metadata_directory)
if prebuilt_whl:
shutil.copy2(prebuilt_whl, wheel_directory)
return os.path.basename(prebuilt_whl)
return _build_backend().build_wheel(wheel_directory, config_settings,
metadata_directory)
def build_editable(wheel_directory, config_settings, metadata_directory=None):
"""Invoke the optional build_editable hook.
If a wheel was already built in the
prepare_metadata_for_build_editable fallback, this
will copy it rather than rebuilding the wheel.
"""
backend = _build_backend()
try:
hook = backend.build_editable
except AttributeError:
raise HookMissing()
else:
prebuilt_whl = _find_already_built_wheel(metadata_directory)
if prebuilt_whl:
shutil.copy2(prebuilt_whl, wheel_directory)
return os.path.basename(prebuilt_whl)
return hook(wheel_directory, config_settings, metadata_directory)
def get_requires_for_build_sdist(config_settings):
"""Invoke the optional get_requires_for_build_wheel hook
Returns [] if the hook is not defined.
"""
backend = _build_backend()
try:
hook = backend.get_requires_for_build_sdist
except AttributeError:
return []
else:
return hook(config_settings)
class _DummyException(Exception):
"""Nothing should ever raise this exception"""
class GotUnsupportedOperation(Exception):
"""For internal use when backend raises UnsupportedOperation"""
def __init__(self, traceback):
self.traceback = traceback
def build_sdist(sdist_directory, config_settings):
"""Invoke the mandatory build_sdist hook."""
backend = _build_backend()
try:
return backend.build_sdist(sdist_directory, config_settings)
except getattr(backend, 'UnsupportedOperation', _DummyException):
raise GotUnsupportedOperation(traceback.format_exc())
HOOK_NAMES = {
'get_requires_for_build_wheel',
'prepare_metadata_for_build_wheel',
'build_wheel',
'get_requires_for_build_editable',
'prepare_metadata_for_build_editable',
'build_editable',
'get_requires_for_build_sdist',
'build_sdist',
'_supported_features',
}
def main():
if len(sys.argv) < 3:
sys.exit("Needs args: hook_name, control_dir")
hook_name = sys.argv[1]
control_dir = sys.argv[2]
if hook_name not in HOOK_NAMES:
sys.exit("Unknown hook: %s" % hook_name)
hook = globals()[hook_name]
hook_input = read_json(pjoin(control_dir, 'input.json'))
json_out = {'unsupported': False, 'return_val': None}
try:
json_out['return_val'] = hook(**hook_input['kwargs'])
except BackendUnavailable as e:
json_out['no_backend'] = True
json_out['traceback'] = e.traceback
except BackendInvalid as e:
json_out['backend_invalid'] = True
json_out['backend_error'] = e.message
except GotUnsupportedOperation as e:
json_out['unsupported'] = True
json_out['traceback'] = e.traceback
except HookMissing as e:
json_out['hook_missing'] = True
json_out['missing_hook_name'] = e.hook_name or hook_name
write_json(json_out, pjoin(control_dir, 'output.json'), indent=2)
if __name__ == '__main__':
main()
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/pep517/in_process/_in_process.py
|
Python
|
mit
| 10,801 |
"""Build metadata for a project using PEP 517 hooks.
"""
import argparse
import functools
import logging
import os
import shutil
import tempfile
try:
import importlib.metadata as imp_meta
except ImportError:
import importlib_metadata as imp_meta
try:
from zipfile import Path
except ImportError:
from zipp import Path
from .build import compat_system, load_system, validate_system
from .dirtools import dir_to_zipfile
from .envbuild import BuildEnvironment
from .wrappers import Pep517HookCaller, quiet_subprocess_runner
log = logging.getLogger(__name__)
def _prep_meta(hooks, env, dest):
reqs = hooks.get_requires_for_build_wheel({})
log.info('Got build requires: %s', reqs)
env.pip_install(reqs)
log.info('Installed dynamic build dependencies')
with tempfile.TemporaryDirectory() as td:
log.info('Trying to build metadata in %s', td)
filename = hooks.prepare_metadata_for_build_wheel(td, {})
source = os.path.join(td, filename)
shutil.move(source, os.path.join(dest, os.path.basename(filename)))
def build(source_dir='.', dest=None, system=None):
system = system or load_system(source_dir)
dest = os.path.join(source_dir, dest or 'dist')
os.makedirs(dest, exist_ok=True)
validate_system(system)
hooks = Pep517HookCaller(
source_dir, system['build-backend'], system.get('backend-path')
)
with hooks.subprocess_runner(quiet_subprocess_runner):
with BuildEnvironment() as env:
env.pip_install(system['requires'])
_prep_meta(hooks, env, dest)
def build_as_zip(builder=build):
with tempfile.TemporaryDirectory() as out_dir:
builder(dest=out_dir)
return dir_to_zipfile(out_dir)
def load(root):
"""
Given a source directory (root) of a package,
return an importlib.metadata.Distribution object
with metadata build from that package.
"""
root = os.path.expanduser(root)
system = compat_system(root)
builder = functools.partial(build, source_dir=root, system=system)
path = Path(build_as_zip(builder))
return imp_meta.PathDistribution(path)
parser = argparse.ArgumentParser()
parser.add_argument(
'source_dir',
help="A directory containing pyproject.toml",
)
parser.add_argument(
'--out-dir', '-o',
help="Destination in which to save the builds relative to source dir",
)
def main():
args = parser.parse_args()
build(args.source_dir, args.out_dir)
if __name__ == '__main__':
main()
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/pep517/meta.py
|
Python
|
mit
| 2,520 |
import json
import os
import sys
import tempfile
import threading
from contextlib import contextmanager
from os.path import abspath
from os.path import join as pjoin
from subprocess import STDOUT, check_call, check_output
from .in_process import _in_proc_script_path
__all__ = [
'BackendUnavailable',
'BackendInvalid',
'HookMissing',
'UnsupportedOperation',
'default_subprocess_runner',
'quiet_subprocess_runner',
'Pep517HookCaller',
]
def write_json(obj, path, **kwargs):
with open(path, 'w', encoding='utf-8') as f:
json.dump(obj, f, **kwargs)
def read_json(path):
with open(path, encoding='utf-8') as f:
return json.load(f)
class BackendUnavailable(Exception):
"""Will be raised if the backend cannot be imported in the hook process."""
def __init__(self, traceback):
self.traceback = traceback
class BackendInvalid(Exception):
"""Will be raised if the backend is invalid."""
def __init__(self, backend_name, backend_path, message):
self.backend_name = backend_name
self.backend_path = backend_path
self.message = message
class HookMissing(Exception):
"""Will be raised on missing hooks."""
def __init__(self, hook_name):
super().__init__(hook_name)
self.hook_name = hook_name
class UnsupportedOperation(Exception):
"""May be raised by build_sdist if the backend indicates that it can't."""
def __init__(self, traceback):
self.traceback = traceback
def default_subprocess_runner(cmd, cwd=None, extra_environ=None):
"""The default method of calling the wrapper subprocess."""
env = os.environ.copy()
if extra_environ:
env.update(extra_environ)
check_call(cmd, cwd=cwd, env=env)
def quiet_subprocess_runner(cmd, cwd=None, extra_environ=None):
"""A method of calling the wrapper subprocess while suppressing output."""
env = os.environ.copy()
if extra_environ:
env.update(extra_environ)
check_output(cmd, cwd=cwd, env=env, stderr=STDOUT)
def norm_and_check(source_tree, requested):
"""Normalise and check a backend path.
Ensure that the requested backend path is specified as a relative path,
and resolves to a location under the given source tree.
Return an absolute version of the requested path.
"""
if os.path.isabs(requested):
raise ValueError("paths must be relative")
abs_source = os.path.abspath(source_tree)
abs_requested = os.path.normpath(os.path.join(abs_source, requested))
# We have to use commonprefix for Python 2.7 compatibility. So we
# normalise case to avoid problems because commonprefix is a character
# based comparison :-(
norm_source = os.path.normcase(abs_source)
norm_requested = os.path.normcase(abs_requested)
if os.path.commonprefix([norm_source, norm_requested]) != norm_source:
raise ValueError("paths must be inside source tree")
return abs_requested
class Pep517HookCaller:
"""A wrapper around a source directory to be built with a PEP 517 backend.
:param source_dir: The path to the source directory, containing
pyproject.toml.
:param build_backend: The build backend spec, as per PEP 517, from
pyproject.toml.
:param backend_path: The backend path, as per PEP 517, from pyproject.toml.
:param runner: A callable that invokes the wrapper subprocess.
:param python_executable: The Python executable used to invoke the backend
The 'runner', if provided, must expect the following:
- cmd: a list of strings representing the command and arguments to
execute, as would be passed to e.g. 'subprocess.check_call'.
- cwd: a string representing the working directory that must be
used for the subprocess. Corresponds to the provided source_dir.
- extra_environ: a dict mapping environment variable names to values
which must be set for the subprocess execution.
"""
def __init__(
self,
source_dir,
build_backend,
backend_path=None,
runner=None,
python_executable=None,
):
if runner is None:
runner = default_subprocess_runner
self.source_dir = abspath(source_dir)
self.build_backend = build_backend
if backend_path:
backend_path = [
norm_and_check(self.source_dir, p) for p in backend_path
]
self.backend_path = backend_path
self._subprocess_runner = runner
if not python_executable:
python_executable = sys.executable
self.python_executable = python_executable
@contextmanager
def subprocess_runner(self, runner):
"""A context manager for temporarily overriding the default subprocess
runner.
"""
prev = self._subprocess_runner
self._subprocess_runner = runner
try:
yield
finally:
self._subprocess_runner = prev
def _supported_features(self):
"""Return the list of optional features supported by the backend."""
return self._call_hook('_supported_features', {})
def get_requires_for_build_wheel(self, config_settings=None):
"""Identify packages required for building a wheel
Returns a list of dependency specifications, e.g.::
["wheel >= 0.25", "setuptools"]
This does not include requirements specified in pyproject.toml.
It returns the result of calling the equivalently named hook in a
subprocess.
"""
return self._call_hook('get_requires_for_build_wheel', {
'config_settings': config_settings
})
def prepare_metadata_for_build_wheel(
self, metadata_directory, config_settings=None,
_allow_fallback=True):
"""Prepare a ``*.dist-info`` folder with metadata for this project.
Returns the name of the newly created folder.
If the build backend defines a hook with this name, it will be called
in a subprocess. If not, the backend will be asked to build a wheel,
and the dist-info extracted from that (unless _allow_fallback is
False).
"""
return self._call_hook('prepare_metadata_for_build_wheel', {
'metadata_directory': abspath(metadata_directory),
'config_settings': config_settings,
'_allow_fallback': _allow_fallback,
})
def build_wheel(
self, wheel_directory, config_settings=None,
metadata_directory=None):
"""Build a wheel from this project.
Returns the name of the newly created file.
In general, this will call the 'build_wheel' hook in the backend.
However, if that was previously called by
'prepare_metadata_for_build_wheel', and the same metadata_directory is
used, the previously built wheel will be copied to wheel_directory.
"""
if metadata_directory is not None:
metadata_directory = abspath(metadata_directory)
return self._call_hook('build_wheel', {
'wheel_directory': abspath(wheel_directory),
'config_settings': config_settings,
'metadata_directory': metadata_directory,
})
def get_requires_for_build_editable(self, config_settings=None):
"""Identify packages required for building an editable wheel
Returns a list of dependency specifications, e.g.::
["wheel >= 0.25", "setuptools"]
This does not include requirements specified in pyproject.toml.
It returns the result of calling the equivalently named hook in a
subprocess.
"""
return self._call_hook('get_requires_for_build_editable', {
'config_settings': config_settings
})
def prepare_metadata_for_build_editable(
self, metadata_directory, config_settings=None,
_allow_fallback=True):
"""Prepare a ``*.dist-info`` folder with metadata for this project.
Returns the name of the newly created folder.
If the build backend defines a hook with this name, it will be called
in a subprocess. If not, the backend will be asked to build an editable
wheel, and the dist-info extracted from that (unless _allow_fallback is
False).
"""
return self._call_hook('prepare_metadata_for_build_editable', {
'metadata_directory': abspath(metadata_directory),
'config_settings': config_settings,
'_allow_fallback': _allow_fallback,
})
def build_editable(
self, wheel_directory, config_settings=None,
metadata_directory=None):
"""Build an editable wheel from this project.
Returns the name of the newly created file.
In general, this will call the 'build_editable' hook in the backend.
However, if that was previously called by
'prepare_metadata_for_build_editable', and the same metadata_directory
is used, the previously built wheel will be copied to wheel_directory.
"""
if metadata_directory is not None:
metadata_directory = abspath(metadata_directory)
return self._call_hook('build_editable', {
'wheel_directory': abspath(wheel_directory),
'config_settings': config_settings,
'metadata_directory': metadata_directory,
})
def get_requires_for_build_sdist(self, config_settings=None):
"""Identify packages required for building a wheel
Returns a list of dependency specifications, e.g.::
["setuptools >= 26"]
This does not include requirements specified in pyproject.toml.
It returns the result of calling the equivalently named hook in a
subprocess.
"""
return self._call_hook('get_requires_for_build_sdist', {
'config_settings': config_settings
})
def build_sdist(self, sdist_directory, config_settings=None):
"""Build an sdist from this project.
Returns the name of the newly created file.
This calls the 'build_sdist' backend hook in a subprocess.
"""
return self._call_hook('build_sdist', {
'sdist_directory': abspath(sdist_directory),
'config_settings': config_settings,
})
def _call_hook(self, hook_name, kwargs):
extra_environ = {'PEP517_BUILD_BACKEND': self.build_backend}
if self.backend_path:
backend_path = os.pathsep.join(self.backend_path)
extra_environ['PEP517_BACKEND_PATH'] = backend_path
with tempfile.TemporaryDirectory() as td:
hook_input = {'kwargs': kwargs}
write_json(hook_input, pjoin(td, 'input.json'), indent=2)
# Run the hook in a subprocess
with _in_proc_script_path() as script:
python = self.python_executable
self._subprocess_runner(
[python, abspath(str(script)), hook_name, td],
cwd=self.source_dir,
extra_environ=extra_environ
)
data = read_json(pjoin(td, 'output.json'))
if data.get('unsupported'):
raise UnsupportedOperation(data.get('traceback', ''))
if data.get('no_backend'):
raise BackendUnavailable(data.get('traceback', ''))
if data.get('backend_invalid'):
raise BackendInvalid(
backend_name=self.build_backend,
backend_path=self.backend_path,
message=data.get('backend_error', '')
)
if data.get('hook_missing'):
raise HookMissing(data.get('missing_hook_name') or hook_name)
return data['return_val']
class LoggerWrapper(threading.Thread):
"""
Read messages from a pipe and redirect them
to a logger (see python's logging module).
"""
def __init__(self, logger, level):
threading.Thread.__init__(self)
self.daemon = True
self.logger = logger
self.level = level
# create the pipe and reader
self.fd_read, self.fd_write = os.pipe()
self.reader = os.fdopen(self.fd_read)
self.start()
def fileno(self):
return self.fd_write
@staticmethod
def remove_newline(msg):
return msg[:-1] if msg.endswith(os.linesep) else msg
def run(self):
for line in self.reader:
self._write(self.remove_newline(line))
def _write(self, message):
self.logger.log(self.level, message)
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/pep517/wrappers.py
|
Python
|
mit
| 12,721 |
# coding: utf-8
"""
Package resource API
--------------------
A resource is a logical file contained within a package, or a logical
subdirectory thereof. The package resource API expects resource names
to have their path parts separated with ``/``, *not* whatever the local
path separator is. Do not use os.path operations to manipulate resource
names being passed into the API.
The package resource API is designed to work with normal filesystem packages,
.egg files, and unpacked .egg files. It can also work in a limited way with
.zip files and with custom PEP 302 loaders that support the ``get_data()``
method.
"""
from __future__ import absolute_import
import sys
import os
import io
import time
import re
import types
import zipfile
import zipimport
import warnings
import stat
import functools
import pkgutil
import operator
import platform
import collections
import plistlib
import email.parser
import errno
import tempfile
import textwrap
import itertools
import inspect
import ntpath
import posixpath
from pkgutil import get_importer
try:
import _imp
except ImportError:
# Python 3.2 compatibility
import imp as _imp
try:
FileExistsError
except NameError:
FileExistsError = OSError
from pip._vendor import six
from pip._vendor.six.moves import urllib, map, filter
# capture these to bypass sandboxing
from os import utime
try:
from os import mkdir, rename, unlink
WRITE_SUPPORT = True
except ImportError:
# no write support, probably under GAE
WRITE_SUPPORT = False
from os import open as os_open
from os.path import isdir, split
try:
import importlib.machinery as importlib_machinery
# access attribute to force import under delayed import mechanisms.
importlib_machinery.__name__
except ImportError:
importlib_machinery = None
from . import py31compat
from pip._vendor import platformdirs
from pip._vendor import packaging
__import__('pip._vendor.packaging.version')
__import__('pip._vendor.packaging.specifiers')
__import__('pip._vendor.packaging.requirements')
__import__('pip._vendor.packaging.markers')
__metaclass__ = type
if (3, 0) < sys.version_info < (3, 5):
raise RuntimeError("Python 3.5 or later is required")
if six.PY2:
# Those builtin exceptions are only defined in Python 3
PermissionError = None
NotADirectoryError = None
# declare some globals that will be defined later to
# satisfy the linters.
require = None
working_set = None
add_activation_listener = None
resources_stream = None
cleanup_resources = None
resource_dir = None
resource_stream = None
set_extraction_path = None
resource_isdir = None
resource_string = None
iter_entry_points = None
resource_listdir = None
resource_filename = None
resource_exists = None
_distribution_finders = None
_namespace_handlers = None
_namespace_packages = None
class PEP440Warning(RuntimeWarning):
"""
Used when there is an issue with a version or specifier not complying with
PEP 440.
"""
def parse_version(v):
try:
return packaging.version.Version(v)
except packaging.version.InvalidVersion:
return packaging.version.LegacyVersion(v)
_state_vars = {}
def _declare_state(vartype, **kw):
globals().update(kw)
_state_vars.update(dict.fromkeys(kw, vartype))
def __getstate__():
state = {}
g = globals()
for k, v in _state_vars.items():
state[k] = g['_sget_' + v](g[k])
return state
def __setstate__(state):
g = globals()
for k, v in state.items():
g['_sset_' + _state_vars[k]](k, g[k], v)
return state
def _sget_dict(val):
return val.copy()
def _sset_dict(key, ob, state):
ob.clear()
ob.update(state)
def _sget_object(val):
return val.__getstate__()
def _sset_object(key, ob, state):
ob.__setstate__(state)
_sget_none = _sset_none = lambda *args: None
def get_supported_platform():
"""Return this platform's maximum compatible version.
distutils.util.get_platform() normally reports the minimum version
of Mac OS X that would be required to *use* extensions produced by
distutils. But what we want when checking compatibility is to know the
version of Mac OS X that we are *running*. To allow usage of packages that
explicitly require a newer version of Mac OS X, we must also know the
current version of the OS.
If this condition occurs for any other platform with a version in its
platform strings, this function should be extended accordingly.
"""
plat = get_build_platform()
m = macosVersionString.match(plat)
if m is not None and sys.platform == "darwin":
try:
plat = 'macosx-%s-%s' % ('.'.join(_macosx_vers()[:2]), m.group(3))
except ValueError:
# not Mac OS X
pass
return plat
__all__ = [
# Basic resource access and distribution/entry point discovery
'require', 'run_script', 'get_provider', 'get_distribution',
'load_entry_point', 'get_entry_map', 'get_entry_info',
'iter_entry_points',
'resource_string', 'resource_stream', 'resource_filename',
'resource_listdir', 'resource_exists', 'resource_isdir',
# Environmental control
'declare_namespace', 'working_set', 'add_activation_listener',
'find_distributions', 'set_extraction_path', 'cleanup_resources',
'get_default_cache',
# Primary implementation classes
'Environment', 'WorkingSet', 'ResourceManager',
'Distribution', 'Requirement', 'EntryPoint',
# Exceptions
'ResolutionError', 'VersionConflict', 'DistributionNotFound',
'UnknownExtra', 'ExtractionError',
# Warnings
'PEP440Warning',
# Parsing functions and string utilities
'parse_requirements', 'parse_version', 'safe_name', 'safe_version',
'get_platform', 'compatible_platforms', 'yield_lines', 'split_sections',
'safe_extra', 'to_filename', 'invalid_marker', 'evaluate_marker',
# filesystem utilities
'ensure_directory', 'normalize_path',
# Distribution "precedence" constants
'EGG_DIST', 'BINARY_DIST', 'SOURCE_DIST', 'CHECKOUT_DIST', 'DEVELOP_DIST',
# "Provider" interfaces, implementations, and registration/lookup APIs
'IMetadataProvider', 'IResourceProvider', 'FileMetadata',
'PathMetadata', 'EggMetadata', 'EmptyProvider', 'empty_provider',
'NullProvider', 'EggProvider', 'DefaultProvider', 'ZipProvider',
'register_finder', 'register_namespace_handler', 'register_loader_type',
'fixup_namespace_packages', 'get_importer',
# Warnings
'PkgResourcesDeprecationWarning',
# Deprecated/backward compatibility only
'run_main', 'AvailableDistributions',
]
class ResolutionError(Exception):
"""Abstract base for dependency resolution errors"""
def __repr__(self):
return self.__class__.__name__ + repr(self.args)
class VersionConflict(ResolutionError):
"""
An already-installed version conflicts with the requested version.
Should be initialized with the installed Distribution and the requested
Requirement.
"""
_template = "{self.dist} is installed but {self.req} is required"
@property
def dist(self):
return self.args[0]
@property
def req(self):
return self.args[1]
def report(self):
return self._template.format(**locals())
def with_context(self, required_by):
"""
If required_by is non-empty, return a version of self that is a
ContextualVersionConflict.
"""
if not required_by:
return self
args = self.args + (required_by,)
return ContextualVersionConflict(*args)
class ContextualVersionConflict(VersionConflict):
"""
A VersionConflict that accepts a third parameter, the set of the
requirements that required the installed Distribution.
"""
_template = VersionConflict._template + ' by {self.required_by}'
@property
def required_by(self):
return self.args[2]
class DistributionNotFound(ResolutionError):
"""A requested distribution was not found"""
_template = ("The '{self.req}' distribution was not found "
"and is required by {self.requirers_str}")
@property
def req(self):
return self.args[0]
@property
def requirers(self):
return self.args[1]
@property
def requirers_str(self):
if not self.requirers:
return 'the application'
return ', '.join(self.requirers)
def report(self):
return self._template.format(**locals())
def __str__(self):
return self.report()
class UnknownExtra(ResolutionError):
"""Distribution doesn't have an "extra feature" of the given name"""
_provider_factories = {}
PY_MAJOR = '{}.{}'.format(*sys.version_info)
EGG_DIST = 3
BINARY_DIST = 2
SOURCE_DIST = 1
CHECKOUT_DIST = 0
DEVELOP_DIST = -1
def register_loader_type(loader_type, provider_factory):
"""Register `provider_factory` to make providers for `loader_type`
`loader_type` is the type or class of a PEP 302 ``module.__loader__``,
and `provider_factory` is a function that, passed a *module* object,
returns an ``IResourceProvider`` for that module.
"""
_provider_factories[loader_type] = provider_factory
def get_provider(moduleOrReq):
"""Return an IResourceProvider for the named module or requirement"""
if isinstance(moduleOrReq, Requirement):
return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
try:
module = sys.modules[moduleOrReq]
except KeyError:
__import__(moduleOrReq)
module = sys.modules[moduleOrReq]
loader = getattr(module, '__loader__', None)
return _find_adapter(_provider_factories, loader)(module)
def _macosx_vers(_cache=[]):
if not _cache:
version = platform.mac_ver()[0]
# fallback for MacPorts
if version == '':
plist = '/System/Library/CoreServices/SystemVersion.plist'
if os.path.exists(plist):
if hasattr(plistlib, 'readPlist'):
plist_content = plistlib.readPlist(plist)
if 'ProductVersion' in plist_content:
version = plist_content['ProductVersion']
_cache.append(version.split('.'))
return _cache[0]
def _macosx_arch(machine):
return {'PowerPC': 'ppc', 'Power_Macintosh': 'ppc'}.get(machine, machine)
def get_build_platform():
"""Return this platform's string for platform-specific distributions
XXX Currently this is the same as ``distutils.util.get_platform()``, but it
needs some hacks for Linux and Mac OS X.
"""
from sysconfig import get_platform
plat = get_platform()
if sys.platform == "darwin" and not plat.startswith('macosx-'):
try:
version = _macosx_vers()
machine = os.uname()[4].replace(" ", "_")
return "macosx-%d.%d-%s" % (
int(version[0]), int(version[1]),
_macosx_arch(machine),
)
except ValueError:
# if someone is running a non-Mac darwin system, this will fall
# through to the default implementation
pass
return plat
macosVersionString = re.compile(r"macosx-(\d+)\.(\d+)-(.*)")
darwinVersionString = re.compile(r"darwin-(\d+)\.(\d+)\.(\d+)-(.*)")
# XXX backward compat
get_platform = get_build_platform
def compatible_platforms(provided, required):
"""Can code for the `provided` platform run on the `required` platform?
Returns true if either platform is ``None``, or the platforms are equal.
XXX Needs compatibility checks for Linux and other unixy OSes.
"""
if provided is None or required is None or provided == required:
# easy case
return True
# Mac OS X special cases
reqMac = macosVersionString.match(required)
if reqMac:
provMac = macosVersionString.match(provided)
# is this a Mac package?
if not provMac:
# this is backwards compatibility for packages built before
# setuptools 0.6. All packages built after this point will
# use the new macosx designation.
provDarwin = darwinVersionString.match(provided)
if provDarwin:
dversion = int(provDarwin.group(1))
macosversion = "%s.%s" % (reqMac.group(1), reqMac.group(2))
if dversion == 7 and macosversion >= "10.3" or \
dversion == 8 and macosversion >= "10.4":
return True
# egg isn't macosx or legacy darwin
return False
# are they the same major version and machine type?
if provMac.group(1) != reqMac.group(1) or \
provMac.group(3) != reqMac.group(3):
return False
# is the required OS major update >= the provided one?
if int(provMac.group(2)) > int(reqMac.group(2)):
return False
return True
# XXX Linux and other platforms' special cases should go here
return False
def run_script(dist_spec, script_name):
"""Locate distribution `dist_spec` and run its `script_name` script"""
ns = sys._getframe(1).f_globals
name = ns['__name__']
ns.clear()
ns['__name__'] = name
require(dist_spec)[0].run_script(script_name, ns)
# backward compatibility
run_main = run_script
def get_distribution(dist):
"""Return a current distribution object for a Requirement or string"""
if isinstance(dist, six.string_types):
dist = Requirement.parse(dist)
if isinstance(dist, Requirement):
dist = get_provider(dist)
if not isinstance(dist, Distribution):
raise TypeError("Expected string, Requirement, or Distribution", dist)
return dist
def load_entry_point(dist, group, name):
"""Return `name` entry point of `group` for `dist` or raise ImportError"""
return get_distribution(dist).load_entry_point(group, name)
def get_entry_map(dist, group=None):
"""Return the entry point map for `group`, or the full entry map"""
return get_distribution(dist).get_entry_map(group)
def get_entry_info(dist, group, name):
"""Return the EntryPoint object for `group`+`name`, or ``None``"""
return get_distribution(dist).get_entry_info(group, name)
class IMetadataProvider:
def has_metadata(name):
"""Does the package's distribution contain the named metadata?"""
def get_metadata(name):
"""The named metadata resource as a string"""
def get_metadata_lines(name):
"""Yield named metadata resource as list of non-blank non-comment lines
Leading and trailing whitespace is stripped from each line, and lines
with ``#`` as the first non-blank character are omitted."""
def metadata_isdir(name):
"""Is the named metadata a directory? (like ``os.path.isdir()``)"""
def metadata_listdir(name):
"""List of metadata names in the directory (like ``os.listdir()``)"""
def run_script(script_name, namespace):
"""Execute the named script in the supplied namespace dictionary"""
class IResourceProvider(IMetadataProvider):
"""An object that provides access to package resources"""
def get_resource_filename(manager, resource_name):
"""Return a true filesystem path for `resource_name`
`manager` must be an ``IResourceManager``"""
def get_resource_stream(manager, resource_name):
"""Return a readable file-like object for `resource_name`
`manager` must be an ``IResourceManager``"""
def get_resource_string(manager, resource_name):
"""Return a string containing the contents of `resource_name`
`manager` must be an ``IResourceManager``"""
def has_resource(resource_name):
"""Does the package contain the named resource?"""
def resource_isdir(resource_name):
"""Is the named resource a directory? (like ``os.path.isdir()``)"""
def resource_listdir(resource_name):
"""List of resource names in the directory (like ``os.listdir()``)"""
class WorkingSet:
"""A collection of active distributions on sys.path (or a similar list)"""
def __init__(self, entries=None):
"""Create working set from list of path entries (default=sys.path)"""
self.entries = []
self.entry_keys = {}
self.by_key = {}
self.callbacks = []
if entries is None:
entries = sys.path
for entry in entries:
self.add_entry(entry)
@classmethod
def _build_master(cls):
"""
Prepare the master working set.
"""
ws = cls()
try:
from __main__ import __requires__
except ImportError:
# The main program does not list any requirements
return ws
# ensure the requirements are met
try:
ws.require(__requires__)
except VersionConflict:
return cls._build_from_requirements(__requires__)
return ws
@classmethod
def _build_from_requirements(cls, req_spec):
"""
Build a working set from a requirement spec. Rewrites sys.path.
"""
# try it without defaults already on sys.path
# by starting with an empty path
ws = cls([])
reqs = parse_requirements(req_spec)
dists = ws.resolve(reqs, Environment())
for dist in dists:
ws.add(dist)
# add any missing entries from sys.path
for entry in sys.path:
if entry not in ws.entries:
ws.add_entry(entry)
# then copy back to sys.path
sys.path[:] = ws.entries
return ws
def add_entry(self, entry):
"""Add a path item to ``.entries``, finding any distributions on it
``find_distributions(entry, True)`` is used to find distributions
corresponding to the path entry, and they are added. `entry` is
always appended to ``.entries``, even if it is already present.
(This is because ``sys.path`` can contain the same value more than
once, and the ``.entries`` of the ``sys.path`` WorkingSet should always
equal ``sys.path``.)
"""
self.entry_keys.setdefault(entry, [])
self.entries.append(entry)
for dist in find_distributions(entry, True):
self.add(dist, entry, False)
def __contains__(self, dist):
"""True if `dist` is the active distribution for its project"""
return self.by_key.get(dist.key) == dist
def find(self, req):
"""Find a distribution matching requirement `req`
If there is an active distribution for the requested project, this
returns it as long as it meets the version requirement specified by
`req`. But, if there is an active distribution for the project and it
does *not* meet the `req` requirement, ``VersionConflict`` is raised.
If there is no active distribution for the requested project, ``None``
is returned.
"""
dist = self.by_key.get(req.key)
if dist is not None and dist not in req:
# XXX add more info
raise VersionConflict(dist, req)
return dist
def iter_entry_points(self, group, name=None):
"""Yield entry point objects from `group` matching `name`
If `name` is None, yields all entry points in `group` from all
distributions in the working set, otherwise only ones matching
both `group` and `name` are yielded (in distribution order).
"""
return (
entry
for dist in self
for entry in dist.get_entry_map(group).values()
if name is None or name == entry.name
)
def run_script(self, requires, script_name):
"""Locate distribution for `requires` and run `script_name` script"""
ns = sys._getframe(1).f_globals
name = ns['__name__']
ns.clear()
ns['__name__'] = name
self.require(requires)[0].run_script(script_name, ns)
def __iter__(self):
"""Yield distributions for non-duplicate projects in the working set
The yield order is the order in which the items' path entries were
added to the working set.
"""
seen = {}
for item in self.entries:
if item not in self.entry_keys:
# workaround a cache issue
continue
for key in self.entry_keys[item]:
if key not in seen:
seen[key] = 1
yield self.by_key[key]
def add(self, dist, entry=None, insert=True, replace=False):
"""Add `dist` to working set, associated with `entry`
If `entry` is unspecified, it defaults to the ``.location`` of `dist`.
On exit from this routine, `entry` is added to the end of the working
set's ``.entries`` (if it wasn't already present).
`dist` is only added to the working set if it's for a project that
doesn't already have a distribution in the set, unless `replace=True`.
If it's added, any callbacks registered with the ``subscribe()`` method
will be called.
"""
if insert:
dist.insert_on(self.entries, entry, replace=replace)
if entry is None:
entry = dist.location
keys = self.entry_keys.setdefault(entry, [])
keys2 = self.entry_keys.setdefault(dist.location, [])
if not replace and dist.key in self.by_key:
# ignore hidden distros
return
self.by_key[dist.key] = dist
if dist.key not in keys:
keys.append(dist.key)
if dist.key not in keys2:
keys2.append(dist.key)
self._added_new(dist)
def resolve(self, requirements, env=None, installer=None,
replace_conflicting=False, extras=None):
"""List all distributions needed to (recursively) meet `requirements`
`requirements` must be a sequence of ``Requirement`` objects. `env`,
if supplied, should be an ``Environment`` instance. If
not supplied, it defaults to all distributions available within any
entry or distribution in the working set. `installer`, if supplied,
will be invoked with each requirement that cannot be met by an
already-installed distribution; it should return a ``Distribution`` or
``None``.
Unless `replace_conflicting=True`, raises a VersionConflict exception
if
any requirements are found on the path that have the correct name but
the wrong version. Otherwise, if an `installer` is supplied it will be
invoked to obtain the correct version of the requirement and activate
it.
`extras` is a list of the extras to be used with these requirements.
This is important because extra requirements may look like `my_req;
extra = "my_extra"`, which would otherwise be interpreted as a purely
optional requirement. Instead, we want to be able to assert that these
requirements are truly required.
"""
# set up the stack
requirements = list(requirements)[::-1]
# set of processed requirements
processed = {}
# key -> dist
best = {}
to_activate = []
req_extras = _ReqExtras()
# Mapping of requirement to set of distributions that required it;
# useful for reporting info about conflicts.
required_by = collections.defaultdict(set)
while requirements:
# process dependencies breadth-first
req = requirements.pop(0)
if req in processed:
# Ignore cyclic or redundant dependencies
continue
if not req_extras.markers_pass(req, extras):
continue
dist = best.get(req.key)
if dist is None:
# Find the best distribution and add it to the map
dist = self.by_key.get(req.key)
if dist is None or (dist not in req and replace_conflicting):
ws = self
if env is None:
if dist is None:
env = Environment(self.entries)
else:
# Use an empty environment and workingset to avoid
# any further conflicts with the conflicting
# distribution
env = Environment([])
ws = WorkingSet([])
dist = best[req.key] = env.best_match(
req, ws, installer,
replace_conflicting=replace_conflicting
)
if dist is None:
requirers = required_by.get(req, None)
raise DistributionNotFound(req, requirers)
to_activate.append(dist)
if dist not in req:
# Oops, the "best" so far conflicts with a dependency
dependent_req = required_by[req]
raise VersionConflict(dist, req).with_context(dependent_req)
# push the new requirements onto the stack
new_requirements = dist.requires(req.extras)[::-1]
requirements.extend(new_requirements)
# Register the new requirements needed by req
for new_requirement in new_requirements:
required_by[new_requirement].add(req.project_name)
req_extras[new_requirement] = req.extras
processed[req] = True
# return list of distros to activate
return to_activate
def find_plugins(
self, plugin_env, full_env=None, installer=None, fallback=True):
"""Find all activatable distributions in `plugin_env`
Example usage::
distributions, errors = working_set.find_plugins(
Environment(plugin_dirlist)
)
# add plugins+libs to sys.path
map(working_set.add, distributions)
# display errors
print('Could not load', errors)
The `plugin_env` should be an ``Environment`` instance that contains
only distributions that are in the project's "plugin directory" or
directories. The `full_env`, if supplied, should be an ``Environment``
contains all currently-available distributions. If `full_env` is not
supplied, one is created automatically from the ``WorkingSet`` this
method is called on, which will typically mean that every directory on
``sys.path`` will be scanned for distributions.
`installer` is a standard installer callback as used by the
``resolve()`` method. The `fallback` flag indicates whether we should
attempt to resolve older versions of a plugin if the newest version
cannot be resolved.
This method returns a 2-tuple: (`distributions`, `error_info`), where
`distributions` is a list of the distributions found in `plugin_env`
that were loadable, along with any other distributions that are needed
to resolve their dependencies. `error_info` is a dictionary mapping
unloadable plugin distributions to an exception instance describing the
error that occurred. Usually this will be a ``DistributionNotFound`` or
``VersionConflict`` instance.
"""
plugin_projects = list(plugin_env)
# scan project names in alphabetic order
plugin_projects.sort()
error_info = {}
distributions = {}
if full_env is None:
env = Environment(self.entries)
env += plugin_env
else:
env = full_env + plugin_env
shadow_set = self.__class__([])
# put all our entries in shadow_set
list(map(shadow_set.add, self))
for project_name in plugin_projects:
for dist in plugin_env[project_name]:
req = [dist.as_requirement()]
try:
resolvees = shadow_set.resolve(req, env, installer)
except ResolutionError as v:
# save error info
error_info[dist] = v
if fallback:
# try the next older version of project
continue
else:
# give up on this project, keep going
break
else:
list(map(shadow_set.add, resolvees))
distributions.update(dict.fromkeys(resolvees))
# success, no need to try any more versions of this project
break
distributions = list(distributions)
distributions.sort()
return distributions, error_info
def require(self, *requirements):
"""Ensure that distributions matching `requirements` are activated
`requirements` must be a string or a (possibly-nested) sequence
thereof, specifying the distributions and versions required. The
return value is a sequence of the distributions that needed to be
activated to fulfill the requirements; all relevant distributions are
included, even if they were already activated in this working set.
"""
needed = self.resolve(parse_requirements(requirements))
for dist in needed:
self.add(dist)
return needed
def subscribe(self, callback, existing=True):
"""Invoke `callback` for all distributions
If `existing=True` (default),
call on all existing ones, as well.
"""
if callback in self.callbacks:
return
self.callbacks.append(callback)
if not existing:
return
for dist in self:
callback(dist)
def _added_new(self, dist):
for callback in self.callbacks:
callback(dist)
def __getstate__(self):
return (
self.entries[:], self.entry_keys.copy(), self.by_key.copy(),
self.callbacks[:]
)
def __setstate__(self, e_k_b_c):
entries, keys, by_key, callbacks = e_k_b_c
self.entries = entries[:]
self.entry_keys = keys.copy()
self.by_key = by_key.copy()
self.callbacks = callbacks[:]
class _ReqExtras(dict):
"""
Map each requirement to the extras that demanded it.
"""
def markers_pass(self, req, extras=None):
"""
Evaluate markers for req against each extra that
demanded it.
Return False if the req has a marker and fails
evaluation. Otherwise, return True.
"""
extra_evals = (
req.marker.evaluate({'extra': extra})
for extra in self.get(req, ()) + (extras or (None,))
)
return not req.marker or any(extra_evals)
class Environment:
"""Searchable snapshot of distributions on a search path"""
def __init__(
self, search_path=None, platform=get_supported_platform(),
python=PY_MAJOR):
"""Snapshot distributions available on a search path
Any distributions found on `search_path` are added to the environment.
`search_path` should be a sequence of ``sys.path`` items. If not
supplied, ``sys.path`` is used.
`platform` is an optional string specifying the name of the platform
that platform-specific distributions must be compatible with. If
unspecified, it defaults to the current platform. `python` is an
optional string naming the desired version of Python (e.g. ``'3.6'``);
it defaults to the current version.
You may explicitly set `platform` (and/or `python`) to ``None`` if you
wish to map *all* distributions, not just those compatible with the
running platform or Python version.
"""
self._distmap = {}
self.platform = platform
self.python = python
self.scan(search_path)
def can_add(self, dist):
"""Is distribution `dist` acceptable for this environment?
The distribution must match the platform and python version
requirements specified when this environment was created, or False
is returned.
"""
py_compat = (
self.python is None
or dist.py_version is None
or dist.py_version == self.python
)
return py_compat and compatible_platforms(dist.platform, self.platform)
def remove(self, dist):
"""Remove `dist` from the environment"""
self._distmap[dist.key].remove(dist)
def scan(self, search_path=None):
"""Scan `search_path` for distributions usable in this environment
Any distributions found are added to the environment.
`search_path` should be a sequence of ``sys.path`` items. If not
supplied, ``sys.path`` is used. Only distributions conforming to
the platform/python version defined at initialization are added.
"""
if search_path is None:
search_path = sys.path
for item in search_path:
for dist in find_distributions(item):
self.add(dist)
def __getitem__(self, project_name):
"""Return a newest-to-oldest list of distributions for `project_name`
Uses case-insensitive `project_name` comparison, assuming all the
project's distributions use their project's name converted to all
lowercase as their key.
"""
distribution_key = project_name.lower()
return self._distmap.get(distribution_key, [])
def add(self, dist):
"""Add `dist` if we ``can_add()`` it and it has not already been added
"""
if self.can_add(dist) and dist.has_version():
dists = self._distmap.setdefault(dist.key, [])
if dist not in dists:
dists.append(dist)
dists.sort(key=operator.attrgetter('hashcmp'), reverse=True)
def best_match(
self, req, working_set, installer=None, replace_conflicting=False):
"""Find distribution best matching `req` and usable on `working_set`
This calls the ``find(req)`` method of the `working_set` to see if a
suitable distribution is already active. (This may raise
``VersionConflict`` if an unsuitable version of the project is already
active in the specified `working_set`.) If a suitable distribution
isn't active, this method returns the newest distribution in the
environment that meets the ``Requirement`` in `req`. If no suitable
distribution is found, and `installer` is supplied, then the result of
calling the environment's ``obtain(req, installer)`` method will be
returned.
"""
try:
dist = working_set.find(req)
except VersionConflict:
if not replace_conflicting:
raise
dist = None
if dist is not None:
return dist
for dist in self[req.key]:
if dist in req:
return dist
# try to download/install
return self.obtain(req, installer)
def obtain(self, requirement, installer=None):
"""Obtain a distribution matching `requirement` (e.g. via download)
Obtain a distro that matches requirement (e.g. via download). In the
base ``Environment`` class, this routine just returns
``installer(requirement)``, unless `installer` is None, in which case
None is returned instead. This method is a hook that allows subclasses
to attempt other ways of obtaining a distribution before falling back
to the `installer` argument."""
if installer is not None:
return installer(requirement)
def __iter__(self):
"""Yield the unique project names of the available distributions"""
for key in self._distmap.keys():
if self[key]:
yield key
def __iadd__(self, other):
"""In-place addition of a distribution or environment"""
if isinstance(other, Distribution):
self.add(other)
elif isinstance(other, Environment):
for project in other:
for dist in other[project]:
self.add(dist)
else:
raise TypeError("Can't add %r to environment" % (other,))
return self
def __add__(self, other):
"""Add an environment or distribution to an environment"""
new = self.__class__([], platform=None, python=None)
for env in self, other:
new += env
return new
# XXX backward compatibility
AvailableDistributions = Environment
class ExtractionError(RuntimeError):
"""An error occurred extracting a resource
The following attributes are available from instances of this exception:
manager
The resource manager that raised this exception
cache_path
The base directory for resource extraction
original_error
The exception instance that caused extraction to fail
"""
class ResourceManager:
"""Manage resource extraction and packages"""
extraction_path = None
def __init__(self):
self.cached_files = {}
def resource_exists(self, package_or_requirement, resource_name):
"""Does the named resource exist?"""
return get_provider(package_or_requirement).has_resource(resource_name)
def resource_isdir(self, package_or_requirement, resource_name):
"""Is the named resource an existing directory?"""
return get_provider(package_or_requirement).resource_isdir(
resource_name
)
def resource_filename(self, package_or_requirement, resource_name):
"""Return a true filesystem path for specified resource"""
return get_provider(package_or_requirement).get_resource_filename(
self, resource_name
)
def resource_stream(self, package_or_requirement, resource_name):
"""Return a readable file-like object for specified resource"""
return get_provider(package_or_requirement).get_resource_stream(
self, resource_name
)
def resource_string(self, package_or_requirement, resource_name):
"""Return specified resource as a string"""
return get_provider(package_or_requirement).get_resource_string(
self, resource_name
)
def resource_listdir(self, package_or_requirement, resource_name):
"""List the contents of the named resource directory"""
return get_provider(package_or_requirement).resource_listdir(
resource_name
)
def extraction_error(self):
"""Give an error message for problems extracting file(s)"""
old_exc = sys.exc_info()[1]
cache_path = self.extraction_path or get_default_cache()
tmpl = textwrap.dedent("""
Can't extract file(s) to egg cache
The following error occurred while trying to extract file(s)
to the Python egg cache:
{old_exc}
The Python egg cache directory is currently set to:
{cache_path}
Perhaps your account does not have write access to this directory?
You can change the cache directory by setting the PYTHON_EGG_CACHE
environment variable to point to an accessible directory.
""").lstrip()
err = ExtractionError(tmpl.format(**locals()))
err.manager = self
err.cache_path = cache_path
err.original_error = old_exc
raise err
def get_cache_path(self, archive_name, names=()):
"""Return absolute location in cache for `archive_name` and `names`
The parent directory of the resulting path will be created if it does
not already exist. `archive_name` should be the base filename of the
enclosing egg (which may not be the name of the enclosing zipfile!),
including its ".egg" extension. `names`, if provided, should be a
sequence of path name parts "under" the egg's extraction location.
This method should only be called by resource providers that need to
obtain an extraction location, and only for names they intend to
extract, as it tracks the generated names for possible cleanup later.
"""
extract_path = self.extraction_path or get_default_cache()
target_path = os.path.join(extract_path, archive_name + '-tmp', *names)
try:
_bypass_ensure_directory(target_path)
except Exception:
self.extraction_error()
self._warn_unsafe_extraction_path(extract_path)
self.cached_files[target_path] = 1
return target_path
@staticmethod
def _warn_unsafe_extraction_path(path):
"""
If the default extraction path is overridden and set to an insecure
location, such as /tmp, it opens up an opportunity for an attacker to
replace an extracted file with an unauthorized payload. Warn the user
if a known insecure location is used.
See Distribute #375 for more details.
"""
if os.name == 'nt' and not path.startswith(os.environ['windir']):
# On Windows, permissions are generally restrictive by default
# and temp directories are not writable by other users, so
# bypass the warning.
return
mode = os.stat(path).st_mode
if mode & stat.S_IWOTH or mode & stat.S_IWGRP:
msg = (
"%s is writable by group/others and vulnerable to attack "
"when "
"used with get_resource_filename. Consider a more secure "
"location (set with .set_extraction_path or the "
"PYTHON_EGG_CACHE environment variable)." % path
)
warnings.warn(msg, UserWarning)
def postprocess(self, tempname, filename):
"""Perform any platform-specific postprocessing of `tempname`
This is where Mac header rewrites should be done; other platforms don't
have anything special they should do.
Resource providers should call this method ONLY after successfully
extracting a compressed resource. They must NOT call it on resources
that are already in the filesystem.
`tempname` is the current (temporary) name of the file, and `filename`
is the name it will be renamed to by the caller after this routine
returns.
"""
if os.name == 'posix':
# Make the resource executable
mode = ((os.stat(tempname).st_mode) | 0o555) & 0o7777
os.chmod(tempname, mode)
def set_extraction_path(self, path):
"""Set the base path where resources will be extracted to, if needed.
If you do not call this routine before any extractions take place, the
path defaults to the return value of ``get_default_cache()``. (Which
is based on the ``PYTHON_EGG_CACHE`` environment variable, with various
platform-specific fallbacks. See that routine's documentation for more
details.)
Resources are extracted to subdirectories of this path based upon
information given by the ``IResourceProvider``. You may set this to a
temporary directory, but then you must call ``cleanup_resources()`` to
delete the extracted files when done. There is no guarantee that
``cleanup_resources()`` will be able to remove all extracted files.
(Note: you may not change the extraction path for a given resource
manager once resources have been extracted, unless you first call
``cleanup_resources()``.)
"""
if self.cached_files:
raise ValueError(
"Can't change extraction path, files already extracted"
)
self.extraction_path = path
def cleanup_resources(self, force=False):
"""
Delete all extracted resource files and directories, returning a list
of the file and directory names that could not be successfully removed.
This function does not have any concurrency protection, so it should
generally only be called when the extraction path is a temporary
directory exclusive to a single process. This method is not
automatically called; you must call it explicitly or register it as an
``atexit`` function if you wish to ensure cleanup of a temporary
directory used for extractions.
"""
# XXX
def get_default_cache():
"""
Return the ``PYTHON_EGG_CACHE`` environment variable
or a platform-relevant user cache dir for an app
named "Python-Eggs".
"""
return (
os.environ.get('PYTHON_EGG_CACHE')
or platformdirs.user_cache_dir(appname='Python-Eggs')
)
def safe_name(name):
"""Convert an arbitrary string to a standard distribution name
Any runs of non-alphanumeric/. characters are replaced with a single '-'.
"""
return re.sub('[^A-Za-z0-9.]+', '-', name)
def safe_version(version):
"""
Convert an arbitrary string to a standard version string
"""
try:
# normalize the version
return str(packaging.version.Version(version))
except packaging.version.InvalidVersion:
version = version.replace(' ', '.')
return re.sub('[^A-Za-z0-9.]+', '-', version)
def safe_extra(extra):
"""Convert an arbitrary string to a standard 'extra' name
Any runs of non-alphanumeric characters are replaced with a single '_',
and the result is always lowercased.
"""
return re.sub('[^A-Za-z0-9.-]+', '_', extra).lower()
def to_filename(name):
"""Convert a project or version name to its filename-escaped form
Any '-' characters are currently replaced with '_'.
"""
return name.replace('-', '_')
def invalid_marker(text):
"""
Validate text as a PEP 508 environment marker; return an exception
if invalid or False otherwise.
"""
try:
evaluate_marker(text)
except SyntaxError as e:
e.filename = None
e.lineno = None
return e
return False
def evaluate_marker(text, extra=None):
"""
Evaluate a PEP 508 environment marker.
Return a boolean indicating the marker result in this environment.
Raise SyntaxError if marker is invalid.
This implementation uses the 'pyparsing' module.
"""
try:
marker = packaging.markers.Marker(text)
return marker.evaluate()
except packaging.markers.InvalidMarker as e:
raise SyntaxError(e)
class NullProvider:
"""Try to implement resources and metadata for arbitrary PEP 302 loaders"""
egg_name = None
egg_info = None
loader = None
def __init__(self, module):
self.loader = getattr(module, '__loader__', None)
self.module_path = os.path.dirname(getattr(module, '__file__', ''))
def get_resource_filename(self, manager, resource_name):
return self._fn(self.module_path, resource_name)
def get_resource_stream(self, manager, resource_name):
return io.BytesIO(self.get_resource_string(manager, resource_name))
def get_resource_string(self, manager, resource_name):
return self._get(self._fn(self.module_path, resource_name))
def has_resource(self, resource_name):
return self._has(self._fn(self.module_path, resource_name))
def _get_metadata_path(self, name):
return self._fn(self.egg_info, name)
def has_metadata(self, name):
if not self.egg_info:
return self.egg_info
path = self._get_metadata_path(name)
return self._has(path)
def get_metadata(self, name):
if not self.egg_info:
return ""
path = self._get_metadata_path(name)
value = self._get(path)
if six.PY2:
return value
try:
return value.decode('utf-8')
except UnicodeDecodeError as exc:
# Include the path in the error message to simplify
# troubleshooting, and without changing the exception type.
exc.reason += ' in {} file at path: {}'.format(name, path)
raise
def get_metadata_lines(self, name):
return yield_lines(self.get_metadata(name))
def resource_isdir(self, resource_name):
return self._isdir(self._fn(self.module_path, resource_name))
def metadata_isdir(self, name):
return self.egg_info and self._isdir(self._fn(self.egg_info, name))
def resource_listdir(self, resource_name):
return self._listdir(self._fn(self.module_path, resource_name))
def metadata_listdir(self, name):
if self.egg_info:
return self._listdir(self._fn(self.egg_info, name))
return []
def run_script(self, script_name, namespace):
script = 'scripts/' + script_name
if not self.has_metadata(script):
raise ResolutionError(
"Script {script!r} not found in metadata at {self.egg_info!r}"
.format(**locals()),
)
script_text = self.get_metadata(script).replace('\r\n', '\n')
script_text = script_text.replace('\r', '\n')
script_filename = self._fn(self.egg_info, script)
namespace['__file__'] = script_filename
if os.path.exists(script_filename):
source = open(script_filename).read()
code = compile(source, script_filename, 'exec')
exec(code, namespace, namespace)
else:
from linecache import cache
cache[script_filename] = (
len(script_text), 0, script_text.split('\n'), script_filename
)
script_code = compile(script_text, script_filename, 'exec')
exec(script_code, namespace, namespace)
def _has(self, path):
raise NotImplementedError(
"Can't perform this operation for unregistered loader type"
)
def _isdir(self, path):
raise NotImplementedError(
"Can't perform this operation for unregistered loader type"
)
def _listdir(self, path):
raise NotImplementedError(
"Can't perform this operation for unregistered loader type"
)
def _fn(self, base, resource_name):
self._validate_resource_path(resource_name)
if resource_name:
return os.path.join(base, *resource_name.split('/'))
return base
@staticmethod
def _validate_resource_path(path):
"""
Validate the resource paths according to the docs.
https://setuptools.readthedocs.io/en/latest/pkg_resources.html#basic-resource-access
>>> warned = getfixture('recwarn')
>>> warnings.simplefilter('always')
>>> vrp = NullProvider._validate_resource_path
>>> vrp('foo/bar.txt')
>>> bool(warned)
False
>>> vrp('../foo/bar.txt')
>>> bool(warned)
True
>>> warned.clear()
>>> vrp('/foo/bar.txt')
>>> bool(warned)
True
>>> vrp('foo/../../bar.txt')
>>> bool(warned)
True
>>> warned.clear()
>>> vrp('foo/f../bar.txt')
>>> bool(warned)
False
Windows path separators are straight-up disallowed.
>>> vrp(r'\\foo/bar.txt')
Traceback (most recent call last):
...
ValueError: Use of .. or absolute path in a resource path \
is not allowed.
>>> vrp(r'C:\\foo/bar.txt')
Traceback (most recent call last):
...
ValueError: Use of .. or absolute path in a resource path \
is not allowed.
Blank values are allowed
>>> vrp('')
>>> bool(warned)
False
Non-string values are not.
>>> vrp(None)
Traceback (most recent call last):
...
AttributeError: ...
"""
invalid = (
os.path.pardir in path.split(posixpath.sep) or
posixpath.isabs(path) or
ntpath.isabs(path)
)
if not invalid:
return
msg = "Use of .. or absolute path in a resource path is not allowed."
# Aggressively disallow Windows absolute paths
if ntpath.isabs(path) and not posixpath.isabs(path):
raise ValueError(msg)
# for compatibility, warn; in future
# raise ValueError(msg)
warnings.warn(
msg[:-1] + " and will raise exceptions in a future release.",
DeprecationWarning,
stacklevel=4,
)
def _get(self, path):
if hasattr(self.loader, 'get_data'):
return self.loader.get_data(path)
raise NotImplementedError(
"Can't perform this operation for loaders without 'get_data()'"
)
register_loader_type(object, NullProvider)
class EggProvider(NullProvider):
"""Provider based on a virtual filesystem"""
def __init__(self, module):
NullProvider.__init__(self, module)
self._setup_prefix()
def _setup_prefix(self):
# we assume here that our metadata may be nested inside a "basket"
# of multiple eggs; that's why we use module_path instead of .archive
path = self.module_path
old = None
while path != old:
if _is_egg_path(path):
self.egg_name = os.path.basename(path)
self.egg_info = os.path.join(path, 'EGG-INFO')
self.egg_root = path
break
old = path
path, base = os.path.split(path)
class DefaultProvider(EggProvider):
"""Provides access to package resources in the filesystem"""
def _has(self, path):
return os.path.exists(path)
def _isdir(self, path):
return os.path.isdir(path)
def _listdir(self, path):
return os.listdir(path)
def get_resource_stream(self, manager, resource_name):
return open(self._fn(self.module_path, resource_name), 'rb')
def _get(self, path):
with open(path, 'rb') as stream:
return stream.read()
@classmethod
def _register(cls):
loader_names = 'SourceFileLoader', 'SourcelessFileLoader',
for name in loader_names:
loader_cls = getattr(importlib_machinery, name, type(None))
register_loader_type(loader_cls, cls)
DefaultProvider._register()
class EmptyProvider(NullProvider):
"""Provider that returns nothing for all requests"""
module_path = None
_isdir = _has = lambda self, path: False
def _get(self, path):
return ''
def _listdir(self, path):
return []
def __init__(self):
pass
empty_provider = EmptyProvider()
class ZipManifests(dict):
"""
zip manifest builder
"""
@classmethod
def build(cls, path):
"""
Build a dictionary similar to the zipimport directory
caches, except instead of tuples, store ZipInfo objects.
Use a platform-specific path separator (os.sep) for the path keys
for compatibility with pypy on Windows.
"""
with zipfile.ZipFile(path) as zfile:
items = (
(
name.replace('/', os.sep),
zfile.getinfo(name),
)
for name in zfile.namelist()
)
return dict(items)
load = build
class MemoizedZipManifests(ZipManifests):
"""
Memoized zipfile manifests.
"""
manifest_mod = collections.namedtuple('manifest_mod', 'manifest mtime')
def load(self, path):
"""
Load a manifest at path or return a suitable manifest already loaded.
"""
path = os.path.normpath(path)
mtime = os.stat(path).st_mtime
if path not in self or self[path].mtime != mtime:
manifest = self.build(path)
self[path] = self.manifest_mod(manifest, mtime)
return self[path].manifest
class ZipProvider(EggProvider):
"""Resource support for zips and eggs"""
eagers = None
_zip_manifests = MemoizedZipManifests()
def __init__(self, module):
EggProvider.__init__(self, module)
self.zip_pre = self.loader.archive + os.sep
def _zipinfo_name(self, fspath):
# Convert a virtual filename (full path to file) into a zipfile subpath
# usable with the zipimport directory cache for our target archive
fspath = fspath.rstrip(os.sep)
if fspath == self.loader.archive:
return ''
if fspath.startswith(self.zip_pre):
return fspath[len(self.zip_pre):]
raise AssertionError(
"%s is not a subpath of %s" % (fspath, self.zip_pre)
)
def _parts(self, zip_path):
# Convert a zipfile subpath into an egg-relative path part list.
# pseudo-fs path
fspath = self.zip_pre + zip_path
if fspath.startswith(self.egg_root + os.sep):
return fspath[len(self.egg_root) + 1:].split(os.sep)
raise AssertionError(
"%s is not a subpath of %s" % (fspath, self.egg_root)
)
@property
def zipinfo(self):
return self._zip_manifests.load(self.loader.archive)
def get_resource_filename(self, manager, resource_name):
if not self.egg_name:
raise NotImplementedError(
"resource_filename() only supported for .egg, not .zip"
)
# no need to lock for extraction, since we use temp names
zip_path = self._resource_to_zip(resource_name)
eagers = self._get_eager_resources()
if '/'.join(self._parts(zip_path)) in eagers:
for name in eagers:
self._extract_resource(manager, self._eager_to_zip(name))
return self._extract_resource(manager, zip_path)
@staticmethod
def _get_date_and_size(zip_stat):
size = zip_stat.file_size
# ymdhms+wday, yday, dst
date_time = zip_stat.date_time + (0, 0, -1)
# 1980 offset already done
timestamp = time.mktime(date_time)
return timestamp, size
def _extract_resource(self, manager, zip_path):
if zip_path in self._index():
for name in self._index()[zip_path]:
last = self._extract_resource(
manager, os.path.join(zip_path, name)
)
# return the extracted directory name
return os.path.dirname(last)
timestamp, size = self._get_date_and_size(self.zipinfo[zip_path])
if not WRITE_SUPPORT:
raise IOError('"os.rename" and "os.unlink" are not supported '
'on this platform')
try:
real_path = manager.get_cache_path(
self.egg_name, self._parts(zip_path)
)
if self._is_current(real_path, zip_path):
return real_path
outf, tmpnam = _mkstemp(
".$extract",
dir=os.path.dirname(real_path),
)
os.write(outf, self.loader.get_data(zip_path))
os.close(outf)
utime(tmpnam, (timestamp, timestamp))
manager.postprocess(tmpnam, real_path)
try:
rename(tmpnam, real_path)
except os.error:
if os.path.isfile(real_path):
if self._is_current(real_path, zip_path):
# the file became current since it was checked above,
# so proceed.
return real_path
# Windows, del old file and retry
elif os.name == 'nt':
unlink(real_path)
rename(tmpnam, real_path)
return real_path
raise
except os.error:
# report a user-friendly error
manager.extraction_error()
return real_path
def _is_current(self, file_path, zip_path):
"""
Return True if the file_path is current for this zip_path
"""
timestamp, size = self._get_date_and_size(self.zipinfo[zip_path])
if not os.path.isfile(file_path):
return False
stat = os.stat(file_path)
if stat.st_size != size or stat.st_mtime != timestamp:
return False
# check that the contents match
zip_contents = self.loader.get_data(zip_path)
with open(file_path, 'rb') as f:
file_contents = f.read()
return zip_contents == file_contents
def _get_eager_resources(self):
if self.eagers is None:
eagers = []
for name in ('native_libs.txt', 'eager_resources.txt'):
if self.has_metadata(name):
eagers.extend(self.get_metadata_lines(name))
self.eagers = eagers
return self.eagers
def _index(self):
try:
return self._dirindex
except AttributeError:
ind = {}
for path in self.zipinfo:
parts = path.split(os.sep)
while parts:
parent = os.sep.join(parts[:-1])
if parent in ind:
ind[parent].append(parts[-1])
break
else:
ind[parent] = [parts.pop()]
self._dirindex = ind
return ind
def _has(self, fspath):
zip_path = self._zipinfo_name(fspath)
return zip_path in self.zipinfo or zip_path in self._index()
def _isdir(self, fspath):
return self._zipinfo_name(fspath) in self._index()
def _listdir(self, fspath):
return list(self._index().get(self._zipinfo_name(fspath), ()))
def _eager_to_zip(self, resource_name):
return self._zipinfo_name(self._fn(self.egg_root, resource_name))
def _resource_to_zip(self, resource_name):
return self._zipinfo_name(self._fn(self.module_path, resource_name))
register_loader_type(zipimport.zipimporter, ZipProvider)
class FileMetadata(EmptyProvider):
"""Metadata handler for standalone PKG-INFO files
Usage::
metadata = FileMetadata("/path/to/PKG-INFO")
This provider rejects all data and metadata requests except for PKG-INFO,
which is treated as existing, and will be the contents of the file at
the provided location.
"""
def __init__(self, path):
self.path = path
def _get_metadata_path(self, name):
return self.path
def has_metadata(self, name):
return name == 'PKG-INFO' and os.path.isfile(self.path)
def get_metadata(self, name):
if name != 'PKG-INFO':
raise KeyError("No metadata except PKG-INFO is available")
with io.open(self.path, encoding='utf-8', errors="replace") as f:
metadata = f.read()
self._warn_on_replacement(metadata)
return metadata
def _warn_on_replacement(self, metadata):
# Python 2.7 compat for: replacement_char = '�'
replacement_char = b'\xef\xbf\xbd'.decode('utf-8')
if replacement_char in metadata:
tmpl = "{self.path} could not be properly decoded in UTF-8"
msg = tmpl.format(**locals())
warnings.warn(msg)
def get_metadata_lines(self, name):
return yield_lines(self.get_metadata(name))
class PathMetadata(DefaultProvider):
"""Metadata provider for egg directories
Usage::
# Development eggs:
egg_info = "/path/to/PackageName.egg-info"
base_dir = os.path.dirname(egg_info)
metadata = PathMetadata(base_dir, egg_info)
dist_name = os.path.splitext(os.path.basename(egg_info))[0]
dist = Distribution(basedir, project_name=dist_name, metadata=metadata)
# Unpacked egg directories:
egg_path = "/path/to/PackageName-ver-pyver-etc.egg"
metadata = PathMetadata(egg_path, os.path.join(egg_path,'EGG-INFO'))
dist = Distribution.from_filename(egg_path, metadata=metadata)
"""
def __init__(self, path, egg_info):
self.module_path = path
self.egg_info = egg_info
class EggMetadata(ZipProvider):
"""Metadata provider for .egg files"""
def __init__(self, importer):
"""Create a metadata provider from a zipimporter"""
self.zip_pre = importer.archive + os.sep
self.loader = importer
if importer.prefix:
self.module_path = os.path.join(importer.archive, importer.prefix)
else:
self.module_path = importer.archive
self._setup_prefix()
_declare_state('dict', _distribution_finders={})
def register_finder(importer_type, distribution_finder):
"""Register `distribution_finder` to find distributions in sys.path items
`importer_type` is the type or class of a PEP 302 "Importer" (sys.path item
handler), and `distribution_finder` is a callable that, passed a path
item and the importer instance, yields ``Distribution`` instances found on
that path item. See ``pkg_resources.find_on_path`` for an example."""
_distribution_finders[importer_type] = distribution_finder
def find_distributions(path_item, only=False):
"""Yield distributions accessible via `path_item`"""
importer = get_importer(path_item)
finder = _find_adapter(_distribution_finders, importer)
return finder(importer, path_item, only)
def find_eggs_in_zip(importer, path_item, only=False):
"""
Find eggs in zip files; possibly multiple nested eggs.
"""
if importer.archive.endswith('.whl'):
# wheels are not supported with this finder
# they don't have PKG-INFO metadata, and won't ever contain eggs
return
metadata = EggMetadata(importer)
if metadata.has_metadata('PKG-INFO'):
yield Distribution.from_filename(path_item, metadata=metadata)
if only:
# don't yield nested distros
return
for subitem in metadata.resource_listdir(''):
if _is_egg_path(subitem):
subpath = os.path.join(path_item, subitem)
dists = find_eggs_in_zip(zipimport.zipimporter(subpath), subpath)
for dist in dists:
yield dist
elif subitem.lower().endswith('.dist-info'):
subpath = os.path.join(path_item, subitem)
submeta = EggMetadata(zipimport.zipimporter(subpath))
submeta.egg_info = subpath
yield Distribution.from_location(path_item, subitem, submeta)
register_finder(zipimport.zipimporter, find_eggs_in_zip)
def find_nothing(importer, path_item, only=False):
return ()
register_finder(object, find_nothing)
def _by_version_descending(names):
"""
Given a list of filenames, return them in descending order
by version number.
>>> names = 'bar', 'foo', 'Python-2.7.10.egg', 'Python-2.7.2.egg'
>>> _by_version_descending(names)
['Python-2.7.10.egg', 'Python-2.7.2.egg', 'foo', 'bar']
>>> names = 'Setuptools-1.2.3b1.egg', 'Setuptools-1.2.3.egg'
>>> _by_version_descending(names)
['Setuptools-1.2.3.egg', 'Setuptools-1.2.3b1.egg']
>>> names = 'Setuptools-1.2.3b1.egg', 'Setuptools-1.2.3.post1.egg'
>>> _by_version_descending(names)
['Setuptools-1.2.3.post1.egg', 'Setuptools-1.2.3b1.egg']
"""
def _by_version(name):
"""
Parse each component of the filename
"""
name, ext = os.path.splitext(name)
parts = itertools.chain(name.split('-'), [ext])
return [packaging.version.parse(part) for part in parts]
return sorted(names, key=_by_version, reverse=True)
def find_on_path(importer, path_item, only=False):
"""Yield distributions accessible on a sys.path directory"""
path_item = _normalize_cached(path_item)
if _is_unpacked_egg(path_item):
yield Distribution.from_filename(
path_item, metadata=PathMetadata(
path_item, os.path.join(path_item, 'EGG-INFO')
)
)
return
entries = safe_listdir(path_item)
# for performance, before sorting by version,
# screen entries for only those that will yield
# distributions
filtered = (
entry
for entry in entries
if dist_factory(path_item, entry, only)
)
# scan for .egg and .egg-info in directory
path_item_entries = _by_version_descending(filtered)
for entry in path_item_entries:
fullpath = os.path.join(path_item, entry)
factory = dist_factory(path_item, entry, only)
for dist in factory(fullpath):
yield dist
def dist_factory(path_item, entry, only):
"""
Return a dist_factory for a path_item and entry
"""
lower = entry.lower()
is_meta = any(map(lower.endswith, ('.egg-info', '.dist-info')))
return (
distributions_from_metadata
if is_meta else
find_distributions
if not only and _is_egg_path(entry) else
resolve_egg_link
if not only and lower.endswith('.egg-link') else
NoDists()
)
class NoDists:
"""
>>> bool(NoDists())
False
>>> list(NoDists()('anything'))
[]
"""
def __bool__(self):
return False
if six.PY2:
__nonzero__ = __bool__
def __call__(self, fullpath):
return iter(())
def safe_listdir(path):
"""
Attempt to list contents of path, but suppress some exceptions.
"""
try:
return os.listdir(path)
except (PermissionError, NotADirectoryError):
pass
except OSError as e:
# Ignore the directory if does not exist, not a directory or
# permission denied
ignorable = (
e.errno in (errno.ENOTDIR, errno.EACCES, errno.ENOENT)
# Python 2 on Windows needs to be handled this way :(
or getattr(e, "winerror", None) == 267
)
if not ignorable:
raise
return ()
def distributions_from_metadata(path):
root = os.path.dirname(path)
if os.path.isdir(path):
if len(os.listdir(path)) == 0:
# empty metadata dir; skip
return
metadata = PathMetadata(root, path)
else:
metadata = FileMetadata(path)
entry = os.path.basename(path)
yield Distribution.from_location(
root, entry, metadata, precedence=DEVELOP_DIST,
)
def non_empty_lines(path):
"""
Yield non-empty lines from file at path
"""
with open(path) as f:
for line in f:
line = line.strip()
if line:
yield line
def resolve_egg_link(path):
"""
Given a path to an .egg-link, resolve distributions
present in the referenced path.
"""
referenced_paths = non_empty_lines(path)
resolved_paths = (
os.path.join(os.path.dirname(path), ref)
for ref in referenced_paths
)
dist_groups = map(find_distributions, resolved_paths)
return next(dist_groups, ())
register_finder(pkgutil.ImpImporter, find_on_path)
if hasattr(importlib_machinery, 'FileFinder'):
register_finder(importlib_machinery.FileFinder, find_on_path)
_declare_state('dict', _namespace_handlers={})
_declare_state('dict', _namespace_packages={})
def register_namespace_handler(importer_type, namespace_handler):
"""Register `namespace_handler` to declare namespace packages
`importer_type` is the type or class of a PEP 302 "Importer" (sys.path item
handler), and `namespace_handler` is a callable like this::
def namespace_handler(importer, path_entry, moduleName, module):
# return a path_entry to use for child packages
Namespace handlers are only called if the importer object has already
agreed that it can handle the relevant path item, and they should only
return a subpath if the module __path__ does not already contain an
equivalent subpath. For an example namespace handler, see
``pkg_resources.file_ns_handler``.
"""
_namespace_handlers[importer_type] = namespace_handler
def _handle_ns(packageName, path_item):
"""Ensure that named package includes a subpath of path_item (if needed)"""
importer = get_importer(path_item)
if importer is None:
return None
# capture warnings due to #1111
with warnings.catch_warnings():
warnings.simplefilter("ignore")
loader = importer.find_module(packageName)
if loader is None:
return None
module = sys.modules.get(packageName)
if module is None:
module = sys.modules[packageName] = types.ModuleType(packageName)
module.__path__ = []
_set_parent_ns(packageName)
elif not hasattr(module, '__path__'):
raise TypeError("Not a package:", packageName)
handler = _find_adapter(_namespace_handlers, importer)
subpath = handler(importer, path_item, packageName, module)
if subpath is not None:
path = module.__path__
path.append(subpath)
loader.load_module(packageName)
_rebuild_mod_path(path, packageName, module)
return subpath
def _rebuild_mod_path(orig_path, package_name, module):
"""
Rebuild module.__path__ ensuring that all entries are ordered
corresponding to their sys.path order
"""
sys_path = [_normalize_cached(p) for p in sys.path]
def safe_sys_path_index(entry):
"""
Workaround for #520 and #513.
"""
try:
return sys_path.index(entry)
except ValueError:
return float('inf')
def position_in_sys_path(path):
"""
Return the ordinal of the path based on its position in sys.path
"""
path_parts = path.split(os.sep)
module_parts = package_name.count('.') + 1
parts = path_parts[:-module_parts]
return safe_sys_path_index(_normalize_cached(os.sep.join(parts)))
new_path = sorted(orig_path, key=position_in_sys_path)
new_path = [_normalize_cached(p) for p in new_path]
if isinstance(module.__path__, list):
module.__path__[:] = new_path
else:
module.__path__ = new_path
def declare_namespace(packageName):
"""Declare that package 'packageName' is a namespace package"""
_imp.acquire_lock()
try:
if packageName in _namespace_packages:
return
path = sys.path
parent, _, _ = packageName.rpartition('.')
if parent:
declare_namespace(parent)
if parent not in _namespace_packages:
__import__(parent)
try:
path = sys.modules[parent].__path__
except AttributeError:
raise TypeError("Not a package:", parent)
# Track what packages are namespaces, so when new path items are added,
# they can be updated
_namespace_packages.setdefault(parent or None, []).append(packageName)
_namespace_packages.setdefault(packageName, [])
for path_item in path:
# Ensure all the parent's path items are reflected in the child,
# if they apply
_handle_ns(packageName, path_item)
finally:
_imp.release_lock()
def fixup_namespace_packages(path_item, parent=None):
"""Ensure that previously-declared namespace packages include path_item"""
_imp.acquire_lock()
try:
for package in _namespace_packages.get(parent, ()):
subpath = _handle_ns(package, path_item)
if subpath:
fixup_namespace_packages(subpath, package)
finally:
_imp.release_lock()
def file_ns_handler(importer, path_item, packageName, module):
"""Compute an ns-package subpath for a filesystem or zipfile importer"""
subpath = os.path.join(path_item, packageName.split('.')[-1])
normalized = _normalize_cached(subpath)
for item in module.__path__:
if _normalize_cached(item) == normalized:
break
else:
# Only return the path if it's not already there
return subpath
register_namespace_handler(pkgutil.ImpImporter, file_ns_handler)
register_namespace_handler(zipimport.zipimporter, file_ns_handler)
if hasattr(importlib_machinery, 'FileFinder'):
register_namespace_handler(importlib_machinery.FileFinder, file_ns_handler)
def null_ns_handler(importer, path_item, packageName, module):
return None
register_namespace_handler(object, null_ns_handler)
def normalize_path(filename):
"""Normalize a file/dir name for comparison purposes"""
return os.path.normcase(os.path.realpath(os.path.normpath(_cygwin_patch(filename))))
def _cygwin_patch(filename): # pragma: nocover
"""
Contrary to POSIX 2008, on Cygwin, getcwd (3) contains
symlink components. Using
os.path.abspath() works around this limitation. A fix in os.getcwd()
would probably better, in Cygwin even more so, except
that this seems to be by design...
"""
return os.path.abspath(filename) if sys.platform == 'cygwin' else filename
def _normalize_cached(filename, _cache={}):
try:
return _cache[filename]
except KeyError:
_cache[filename] = result = normalize_path(filename)
return result
def _is_egg_path(path):
"""
Determine if given path appears to be an egg.
"""
return path.lower().endswith('.egg')
def _is_unpacked_egg(path):
"""
Determine if given path appears to be an unpacked egg.
"""
return (
_is_egg_path(path) and
os.path.isfile(os.path.join(path, 'EGG-INFO', 'PKG-INFO'))
)
def _set_parent_ns(packageName):
parts = packageName.split('.')
name = parts.pop()
if parts:
parent = '.'.join(parts)
setattr(sys.modules[parent], name, sys.modules[packageName])
def yield_lines(strs):
"""Yield non-empty/non-comment lines of a string or sequence"""
if isinstance(strs, six.string_types):
for s in strs.splitlines():
s = s.strip()
# skip blank lines/comments
if s and not s.startswith('#'):
yield s
else:
for ss in strs:
for s in yield_lines(ss):
yield s
MODULE = re.compile(r"\w+(\.\w+)*$").match
EGG_NAME = re.compile(
r"""
(?P<name>[^-]+) (
-(?P<ver>[^-]+) (
-py(?P<pyver>[^-]+) (
-(?P<plat>.+)
)?
)?
)?
""",
re.VERBOSE | re.IGNORECASE,
).match
class EntryPoint:
"""Object representing an advertised importable object"""
def __init__(self, name, module_name, attrs=(), extras=(), dist=None):
if not MODULE(module_name):
raise ValueError("Invalid module name", module_name)
self.name = name
self.module_name = module_name
self.attrs = tuple(attrs)
self.extras = tuple(extras)
self.dist = dist
def __str__(self):
s = "%s = %s" % (self.name, self.module_name)
if self.attrs:
s += ':' + '.'.join(self.attrs)
if self.extras:
s += ' [%s]' % ','.join(self.extras)
return s
def __repr__(self):
return "EntryPoint.parse(%r)" % str(self)
def load(self, require=True, *args, **kwargs):
"""
Require packages for this EntryPoint, then resolve it.
"""
if not require or args or kwargs:
warnings.warn(
"Parameters to load are deprecated. Call .resolve and "
".require separately.",
PkgResourcesDeprecationWarning,
stacklevel=2,
)
if require:
self.require(*args, **kwargs)
return self.resolve()
def resolve(self):
"""
Resolve the entry point from its module and attrs.
"""
module = __import__(self.module_name, fromlist=['__name__'], level=0)
try:
return functools.reduce(getattr, self.attrs, module)
except AttributeError as exc:
raise ImportError(str(exc))
def require(self, env=None, installer=None):
if self.extras and not self.dist:
raise UnknownExtra("Can't require() without a distribution", self)
# Get the requirements for this entry point with all its extras and
# then resolve them. We have to pass `extras` along when resolving so
# that the working set knows what extras we want. Otherwise, for
# dist-info distributions, the working set will assume that the
# requirements for that extra are purely optional and skip over them.
reqs = self.dist.requires(self.extras)
items = working_set.resolve(reqs, env, installer, extras=self.extras)
list(map(working_set.add, items))
pattern = re.compile(
r'\s*'
r'(?P<name>.+?)\s*'
r'=\s*'
r'(?P<module>[\w.]+)\s*'
r'(:\s*(?P<attr>[\w.]+))?\s*'
r'(?P<extras>\[.*\])?\s*$'
)
@classmethod
def parse(cls, src, dist=None):
"""Parse a single entry point from string `src`
Entry point syntax follows the form::
name = some.module:some.attr [extra1, extra2]
The entry name and module name are required, but the ``:attrs`` and
``[extras]`` parts are optional
"""
m = cls.pattern.match(src)
if not m:
msg = "EntryPoint must be in 'name=module:attrs [extras]' format"
raise ValueError(msg, src)
res = m.groupdict()
extras = cls._parse_extras(res['extras'])
attrs = res['attr'].split('.') if res['attr'] else ()
return cls(res['name'], res['module'], attrs, extras, dist)
@classmethod
def _parse_extras(cls, extras_spec):
if not extras_spec:
return ()
req = Requirement.parse('x' + extras_spec)
if req.specs:
raise ValueError()
return req.extras
@classmethod
def parse_group(cls, group, lines, dist=None):
"""Parse an entry point group"""
if not MODULE(group):
raise ValueError("Invalid group name", group)
this = {}
for line in yield_lines(lines):
ep = cls.parse(line, dist)
if ep.name in this:
raise ValueError("Duplicate entry point", group, ep.name)
this[ep.name] = ep
return this
@classmethod
def parse_map(cls, data, dist=None):
"""Parse a map of entry point groups"""
if isinstance(data, dict):
data = data.items()
else:
data = split_sections(data)
maps = {}
for group, lines in data:
if group is None:
if not lines:
continue
raise ValueError("Entry points must be listed in groups")
group = group.strip()
if group in maps:
raise ValueError("Duplicate group name", group)
maps[group] = cls.parse_group(group, lines, dist)
return maps
def _remove_md5_fragment(location):
if not location:
return ''
parsed = urllib.parse.urlparse(location)
if parsed[-1].startswith('md5='):
return urllib.parse.urlunparse(parsed[:-1] + ('',))
return location
def _version_from_file(lines):
"""
Given an iterable of lines from a Metadata file, return
the value of the Version field, if present, or None otherwise.
"""
def is_version_line(line):
return line.lower().startswith('version:')
version_lines = filter(is_version_line, lines)
line = next(iter(version_lines), '')
_, _, value = line.partition(':')
return safe_version(value.strip()) or None
class Distribution:
"""Wrap an actual or potential sys.path entry w/metadata"""
PKG_INFO = 'PKG-INFO'
def __init__(
self, location=None, metadata=None, project_name=None,
version=None, py_version=PY_MAJOR, platform=None,
precedence=EGG_DIST):
self.project_name = safe_name(project_name or 'Unknown')
if version is not None:
self._version = safe_version(version)
self.py_version = py_version
self.platform = platform
self.location = location
self.precedence = precedence
self._provider = metadata or empty_provider
@classmethod
def from_location(cls, location, basename, metadata=None, **kw):
project_name, version, py_version, platform = [None] * 4
basename, ext = os.path.splitext(basename)
if ext.lower() in _distributionImpl:
cls = _distributionImpl[ext.lower()]
match = EGG_NAME(basename)
if match:
project_name, version, py_version, platform = match.group(
'name', 'ver', 'pyver', 'plat'
)
return cls(
location, metadata, project_name=project_name, version=version,
py_version=py_version, platform=platform, **kw
)._reload_version()
def _reload_version(self):
return self
@property
def hashcmp(self):
return (
self.parsed_version,
self.precedence,
self.key,
_remove_md5_fragment(self.location),
self.py_version or '',
self.platform or '',
)
def __hash__(self):
return hash(self.hashcmp)
def __lt__(self, other):
return self.hashcmp < other.hashcmp
def __le__(self, other):
return self.hashcmp <= other.hashcmp
def __gt__(self, other):
return self.hashcmp > other.hashcmp
def __ge__(self, other):
return self.hashcmp >= other.hashcmp
def __eq__(self, other):
if not isinstance(other, self.__class__):
# It's not a Distribution, so they are not equal
return False
return self.hashcmp == other.hashcmp
def __ne__(self, other):
return not self == other
# These properties have to be lazy so that we don't have to load any
# metadata until/unless it's actually needed. (i.e., some distributions
# may not know their name or version without loading PKG-INFO)
@property
def key(self):
try:
return self._key
except AttributeError:
self._key = key = self.project_name.lower()
return key
@property
def parsed_version(self):
if not hasattr(self, "_parsed_version"):
self._parsed_version = parse_version(self.version)
return self._parsed_version
def _warn_legacy_version(self):
LV = packaging.version.LegacyVersion
is_legacy = isinstance(self._parsed_version, LV)
if not is_legacy:
return
# While an empty version is technically a legacy version and
# is not a valid PEP 440 version, it's also unlikely to
# actually come from someone and instead it is more likely that
# it comes from setuptools attempting to parse a filename and
# including it in the list. So for that we'll gate this warning
# on if the version is anything at all or not.
if not self.version:
return
tmpl = textwrap.dedent("""
'{project_name} ({version})' is being parsed as a legacy,
non PEP 440,
version. You may find odd behavior and sort order.
In particular it will be sorted as less than 0.0. It
is recommended to migrate to PEP 440 compatible
versions.
""").strip().replace('\n', ' ')
warnings.warn(tmpl.format(**vars(self)), PEP440Warning)
@property
def version(self):
try:
return self._version
except AttributeError:
version = self._get_version()
if version is None:
path = self._get_metadata_path_for_display(self.PKG_INFO)
msg = (
"Missing 'Version:' header and/or {} file at path: {}"
).format(self.PKG_INFO, path)
raise ValueError(msg, self)
return version
@property
def _dep_map(self):
"""
A map of extra to its list of (direct) requirements
for this distribution, including the null extra.
"""
try:
return self.__dep_map
except AttributeError:
self.__dep_map = self._filter_extras(self._build_dep_map())
return self.__dep_map
@staticmethod
def _filter_extras(dm):
"""
Given a mapping of extras to dependencies, strip off
environment markers and filter out any dependencies
not matching the markers.
"""
for extra in list(filter(None, dm)):
new_extra = extra
reqs = dm.pop(extra)
new_extra, _, marker = extra.partition(':')
fails_marker = marker and (
invalid_marker(marker)
or not evaluate_marker(marker)
)
if fails_marker:
reqs = []
new_extra = safe_extra(new_extra) or None
dm.setdefault(new_extra, []).extend(reqs)
return dm
def _build_dep_map(self):
dm = {}
for name in 'requires.txt', 'depends.txt':
for extra, reqs in split_sections(self._get_metadata(name)):
dm.setdefault(extra, []).extend(parse_requirements(reqs))
return dm
def requires(self, extras=()):
"""List of Requirements needed for this distro if `extras` are used"""
dm = self._dep_map
deps = []
deps.extend(dm.get(None, ()))
for ext in extras:
try:
deps.extend(dm[safe_extra(ext)])
except KeyError:
raise UnknownExtra(
"%s has no such extra feature %r" % (self, ext)
)
return deps
def _get_metadata_path_for_display(self, name):
"""
Return the path to the given metadata file, if available.
"""
try:
# We need to access _get_metadata_path() on the provider object
# directly rather than through this class's __getattr__()
# since _get_metadata_path() is marked private.
path = self._provider._get_metadata_path(name)
# Handle exceptions e.g. in case the distribution's metadata
# provider doesn't support _get_metadata_path().
except Exception:
return '[could not detect]'
return path
def _get_metadata(self, name):
if self.has_metadata(name):
for line in self.get_metadata_lines(name):
yield line
def _get_version(self):
lines = self._get_metadata(self.PKG_INFO)
version = _version_from_file(lines)
return version
def activate(self, path=None, replace=False):
"""Ensure distribution is importable on `path` (default=sys.path)"""
if path is None:
path = sys.path
self.insert_on(path, replace=replace)
if path is sys.path:
fixup_namespace_packages(self.location)
for pkg in self._get_metadata('namespace_packages.txt'):
if pkg in sys.modules:
declare_namespace(pkg)
def egg_name(self):
"""Return what this distribution's standard .egg filename should be"""
filename = "%s-%s-py%s" % (
to_filename(self.project_name), to_filename(self.version),
self.py_version or PY_MAJOR
)
if self.platform:
filename += '-' + self.platform
return filename
def __repr__(self):
if self.location:
return "%s (%s)" % (self, self.location)
else:
return str(self)
def __str__(self):
try:
version = getattr(self, 'version', None)
except ValueError:
version = None
version = version or "[unknown version]"
return "%s %s" % (self.project_name, version)
def __getattr__(self, attr):
"""Delegate all unrecognized public attributes to .metadata provider"""
if attr.startswith('_'):
raise AttributeError(attr)
return getattr(self._provider, attr)
def __dir__(self):
return list(
set(super(Distribution, self).__dir__())
| set(
attr for attr in self._provider.__dir__()
if not attr.startswith('_')
)
)
if not hasattr(object, '__dir__'):
# python 2.7 not supported
del __dir__
@classmethod
def from_filename(cls, filename, metadata=None, **kw):
return cls.from_location(
_normalize_cached(filename), os.path.basename(filename), metadata,
**kw
)
def as_requirement(self):
"""Return a ``Requirement`` that matches this distribution exactly"""
if isinstance(self.parsed_version, packaging.version.Version):
spec = "%s==%s" % (self.project_name, self.parsed_version)
else:
spec = "%s===%s" % (self.project_name, self.parsed_version)
return Requirement.parse(spec)
def load_entry_point(self, group, name):
"""Return the `name` entry point of `group` or raise ImportError"""
ep = self.get_entry_info(group, name)
if ep is None:
raise ImportError("Entry point %r not found" % ((group, name),))
return ep.load()
def get_entry_map(self, group=None):
"""Return the entry point map for `group`, or the full entry map"""
try:
ep_map = self._ep_map
except AttributeError:
ep_map = self._ep_map = EntryPoint.parse_map(
self._get_metadata('entry_points.txt'), self
)
if group is not None:
return ep_map.get(group, {})
return ep_map
def get_entry_info(self, group, name):
"""Return the EntryPoint object for `group`+`name`, or ``None``"""
return self.get_entry_map(group).get(name)
def insert_on(self, path, loc=None, replace=False):
"""Ensure self.location is on path
If replace=False (default):
- If location is already in path anywhere, do nothing.
- Else:
- If it's an egg and its parent directory is on path,
insert just ahead of the parent.
- Else: add to the end of path.
If replace=True:
- If location is already on path anywhere (not eggs)
or higher priority than its parent (eggs)
do nothing.
- Else:
- If it's an egg and its parent directory is on path,
insert just ahead of the parent,
removing any lower-priority entries.
- Else: add it to the front of path.
"""
loc = loc or self.location
if not loc:
return
nloc = _normalize_cached(loc)
bdir = os.path.dirname(nloc)
npath = [(p and _normalize_cached(p) or p) for p in path]
for p, item in enumerate(npath):
if item == nloc:
if replace:
break
else:
# don't modify path (even removing duplicates) if
# found and not replace
return
elif item == bdir and self.precedence == EGG_DIST:
# if it's an .egg, give it precedence over its directory
# UNLESS it's already been added to sys.path and replace=False
if (not replace) and nloc in npath[p:]:
return
if path is sys.path:
self.check_version_conflict()
path.insert(p, loc)
npath.insert(p, nloc)
break
else:
if path is sys.path:
self.check_version_conflict()
if replace:
path.insert(0, loc)
else:
path.append(loc)
return
# p is the spot where we found or inserted loc; now remove duplicates
while True:
try:
np = npath.index(nloc, p + 1)
except ValueError:
break
else:
del npath[np], path[np]
# ha!
p = np
return
def check_version_conflict(self):
if self.key == 'setuptools':
# ignore the inevitable setuptools self-conflicts :(
return
nsp = dict.fromkeys(self._get_metadata('namespace_packages.txt'))
loc = normalize_path(self.location)
for modname in self._get_metadata('top_level.txt'):
if (modname not in sys.modules or modname in nsp
or modname in _namespace_packages):
continue
if modname in ('pkg_resources', 'setuptools', 'site'):
continue
fn = getattr(sys.modules[modname], '__file__', None)
if fn and (normalize_path(fn).startswith(loc) or
fn.startswith(self.location)):
continue
issue_warning(
"Module %s was already imported from %s, but %s is being added"
" to sys.path" % (modname, fn, self.location),
)
def has_version(self):
try:
self.version
except ValueError:
issue_warning("Unbuilt egg for " + repr(self))
return False
return True
def clone(self, **kw):
"""Copy this distribution, substituting in any changed keyword args"""
names = 'project_name version py_version platform location precedence'
for attr in names.split():
kw.setdefault(attr, getattr(self, attr, None))
kw.setdefault('metadata', self._provider)
return self.__class__(**kw)
@property
def extras(self):
return [dep for dep in self._dep_map if dep]
class EggInfoDistribution(Distribution):
def _reload_version(self):
"""
Packages installed by distutils (e.g. numpy or scipy),
which uses an old safe_version, and so
their version numbers can get mangled when
converted to filenames (e.g., 1.11.0.dev0+2329eae to
1.11.0.dev0_2329eae). These distributions will not be
parsed properly
downstream by Distribution and safe_version, so
take an extra step and try to get the version number from
the metadata file itself instead of the filename.
"""
md_version = self._get_version()
if md_version:
self._version = md_version
return self
class DistInfoDistribution(Distribution):
"""
Wrap an actual or potential sys.path entry
w/metadata, .dist-info style.
"""
PKG_INFO = 'METADATA'
EQEQ = re.compile(r"([\(,])\s*(\d.*?)\s*([,\)])")
@property
def _parsed_pkg_info(self):
"""Parse and cache metadata"""
try:
return self._pkg_info
except AttributeError:
metadata = self.get_metadata(self.PKG_INFO)
self._pkg_info = email.parser.Parser().parsestr(metadata)
return self._pkg_info
@property
def _dep_map(self):
try:
return self.__dep_map
except AttributeError:
self.__dep_map = self._compute_dependencies()
return self.__dep_map
def _compute_dependencies(self):
"""Recompute this distribution's dependencies."""
dm = self.__dep_map = {None: []}
reqs = []
# Including any condition expressions
for req in self._parsed_pkg_info.get_all('Requires-Dist') or []:
reqs.extend(parse_requirements(req))
def reqs_for_extra(extra):
for req in reqs:
if not req.marker or req.marker.evaluate({'extra': extra}):
yield req
common = frozenset(reqs_for_extra(None))
dm[None].extend(common)
for extra in self._parsed_pkg_info.get_all('Provides-Extra') or []:
s_extra = safe_extra(extra.strip())
dm[s_extra] = list(frozenset(reqs_for_extra(extra)) - common)
return dm
_distributionImpl = {
'.egg': Distribution,
'.egg-info': EggInfoDistribution,
'.dist-info': DistInfoDistribution,
}
def issue_warning(*args, **kw):
level = 1
g = globals()
try:
# find the first stack frame that is *not* code in
# the pkg_resources module, to use for the warning
while sys._getframe(level).f_globals is g:
level += 1
except ValueError:
pass
warnings.warn(stacklevel=level + 1, *args, **kw)
class RequirementParseError(ValueError):
def __str__(self):
return ' '.join(self.args)
def parse_requirements(strs):
"""Yield ``Requirement`` objects for each specification in `strs`
`strs` must be a string, or a (possibly-nested) iterable thereof.
"""
# create a steppable iterator, so we can handle \-continuations
lines = iter(yield_lines(strs))
for line in lines:
# Drop comments -- a hash without a space may be in a URL.
if ' #' in line:
line = line[:line.find(' #')]
# If there is a line continuation, drop it, and append the next line.
if line.endswith('\\'):
line = line[:-2].strip()
try:
line += next(lines)
except StopIteration:
return
yield Requirement(line)
class Requirement(packaging.requirements.Requirement):
def __init__(self, requirement_string):
"""DO NOT CALL THIS UNDOCUMENTED METHOD; use Requirement.parse()!"""
try:
super(Requirement, self).__init__(requirement_string)
except packaging.requirements.InvalidRequirement as e:
raise RequirementParseError(str(e))
self.unsafe_name = self.name
project_name = safe_name(self.name)
self.project_name, self.key = project_name, project_name.lower()
self.specs = [
(spec.operator, spec.version) for spec in self.specifier]
self.extras = tuple(map(safe_extra, self.extras))
self.hashCmp = (
self.key,
self.url,
self.specifier,
frozenset(self.extras),
str(self.marker) if self.marker else None,
)
self.__hash = hash(self.hashCmp)
def __eq__(self, other):
return (
isinstance(other, Requirement) and
self.hashCmp == other.hashCmp
)
def __ne__(self, other):
return not self == other
def __contains__(self, item):
if isinstance(item, Distribution):
if item.key != self.key:
return False
item = item.version
# Allow prereleases always in order to match the previous behavior of
# this method. In the future this should be smarter and follow PEP 440
# more accurately.
return self.specifier.contains(item, prereleases=True)
def __hash__(self):
return self.__hash
def __repr__(self):
return "Requirement.parse(%r)" % str(self)
@staticmethod
def parse(s):
req, = parse_requirements(s)
return req
def _always_object(classes):
"""
Ensure object appears in the mro even
for old-style classes.
"""
if object not in classes:
return classes + (object,)
return classes
def _find_adapter(registry, ob):
"""Return an adapter factory for `ob` from `registry`"""
types = _always_object(inspect.getmro(getattr(ob, '__class__', type(ob))))
for t in types:
if t in registry:
return registry[t]
def ensure_directory(path):
"""Ensure that the parent directory of `path` exists"""
dirname = os.path.dirname(path)
py31compat.makedirs(dirname, exist_ok=True)
def _bypass_ensure_directory(path):
"""Sandbox-bypassing version of ensure_directory()"""
if not WRITE_SUPPORT:
raise IOError('"os.mkdir" not supported on this platform.')
dirname, filename = split(path)
if dirname and filename and not isdir(dirname):
_bypass_ensure_directory(dirname)
try:
mkdir(dirname, 0o755)
except FileExistsError:
pass
def split_sections(s):
"""Split a string or iterable thereof into (section, content) pairs
Each ``section`` is a stripped version of the section header ("[section]")
and each ``content`` is a list of stripped lines excluding blank lines and
comment-only lines. If there are any such lines before the first section
header, they're returned in a first ``section`` of ``None``.
"""
section = None
content = []
for line in yield_lines(s):
if line.startswith("["):
if line.endswith("]"):
if section or content:
yield section, content
section = line[1:-1].strip()
content = []
else:
raise ValueError("Invalid section heading", line)
else:
content.append(line)
# wrap up last segment
yield section, content
def _mkstemp(*args, **kw):
old_open = os.open
try:
# temporarily bypass sandboxing
os.open = os_open
return tempfile.mkstemp(*args, **kw)
finally:
# and then put it back
os.open = old_open
# Silence the PEP440Warning by default, so that end users don't get hit by it
# randomly just because they use pkg_resources. We want to append the rule
# because we want earlier uses of filterwarnings to take precedence over this
# one.
warnings.filterwarnings("ignore", category=PEP440Warning, append=True)
# from jaraco.functools 1.3
def _call_aside(f, *args, **kwargs):
f(*args, **kwargs)
return f
@_call_aside
def _initialize(g=globals()):
"Set up global resource manager (deliberately not state-saved)"
manager = ResourceManager()
g['_manager'] = manager
g.update(
(name, getattr(manager, name))
for name in dir(manager)
if not name.startswith('_')
)
@_call_aside
def _initialize_master_working_set():
"""
Prepare the master working set and make the ``require()``
API available.
This function has explicit effects on the global state
of pkg_resources. It is intended to be invoked once at
the initialization of this module.
Invocation by other packages is unsupported and done
at their own risk.
"""
working_set = WorkingSet._build_master()
_declare_state('object', working_set=working_set)
require = working_set.require
iter_entry_points = working_set.iter_entry_points
add_activation_listener = working_set.subscribe
run_script = working_set.run_script
# backward compatibility
run_main = run_script
# Activate all distributions already on sys.path with replace=False and
# ensure that all distributions added to the working set in the future
# (e.g. by calling ``require()``) will get activated as well,
# with higher priority (replace=True).
tuple(
dist.activate(replace=False)
for dist in working_set
)
add_activation_listener(
lambda dist: dist.activate(replace=True),
existing=False,
)
working_set.entries = []
# match order
list(map(working_set.add_entry, sys.path))
globals().update(locals())
class PkgResourcesDeprecationWarning(Warning):
"""
Base class for warning about deprecations in ``pkg_resources``
This class is not derived from ``DeprecationWarning``, and as such is
visible by default.
"""
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/pkg_resources/__init__.py
|
Python
|
mit
| 108,287 |
import os
import errno
import sys
from pip._vendor import six
def _makedirs_31(path, exist_ok=False):
try:
os.makedirs(path)
except OSError as exc:
if not exist_ok or exc.errno != errno.EEXIST:
raise
# rely on compatibility behavior until mode considerations
# and exists_ok considerations are disentangled.
# See https://github.com/pypa/setuptools/pull/1083#issuecomment-315168663
needs_makedirs = (
six.PY2 or
(3, 4) <= sys.version_info < (3, 4, 1)
)
makedirs = _makedirs_31 if needs_makedirs else os.makedirs
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/pkg_resources/py31compat.py
|
Python
|
mit
| 562 |
"""
Utilities for determining application-specific dirs. See <https://github.com/platformdirs/platformdirs> for details and
usage.
"""
from __future__ import annotations
import os
import sys
from pathlib import Path
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from pip._vendor.typing_extensions import Literal # pragma: no cover
from .api import PlatformDirsABC
from .version import __version__, __version_info__
def _set_platform_dir_class() -> type[PlatformDirsABC]:
if sys.platform == "win32":
from pip._vendor.platformdirs.windows import Windows as Result
elif sys.platform == "darwin":
from pip._vendor.platformdirs.macos import MacOS as Result
else:
from pip._vendor.platformdirs.unix import Unix as Result
if os.getenv("ANDROID_DATA") == "/data" and os.getenv("ANDROID_ROOT") == "/system":
if os.getenv("SHELL") is not None:
return Result
from pip._vendor.platformdirs.android import _android_folder
if _android_folder() is not None:
from pip._vendor.platformdirs.android import Android
return Android # return to avoid redefinition of result
return Result
PlatformDirs = _set_platform_dir_class() #: Currently active platform
AppDirs = PlatformDirs #: Backwards compatibility with appdirs
def user_data_dir(
appname: str | None = None,
appauthor: str | None | Literal[False] = None,
version: str | None = None,
roaming: bool = False,
) -> str:
"""
:param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
:param roaming: See `roaming <platformdirs.api.PlatformDirsABC.version>`.
:returns: data directory tied to the user
"""
return PlatformDirs(appname=appname, appauthor=appauthor, version=version, roaming=roaming).user_data_dir
def site_data_dir(
appname: str | None = None,
appauthor: str | None | Literal[False] = None,
version: str | None = None,
multipath: bool = False,
) -> str:
"""
:param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
:param multipath: See `roaming <platformdirs.api.PlatformDirsABC.multipath>`.
:returns: data directory shared by users
"""
return PlatformDirs(appname=appname, appauthor=appauthor, version=version, multipath=multipath).site_data_dir
def user_config_dir(
appname: str | None = None,
appauthor: str | None | Literal[False] = None,
version: str | None = None,
roaming: bool = False,
) -> str:
"""
:param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
:param roaming: See `roaming <platformdirs.api.PlatformDirsABC.version>`.
:returns: config directory tied to the user
"""
return PlatformDirs(appname=appname, appauthor=appauthor, version=version, roaming=roaming).user_config_dir
def site_config_dir(
appname: str | None = None,
appauthor: str | None | Literal[False] = None,
version: str | None = None,
multipath: bool = False,
) -> str:
"""
:param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
:param multipath: See `roaming <platformdirs.api.PlatformDirsABC.multipath>`.
:returns: config directory shared by the users
"""
return PlatformDirs(appname=appname, appauthor=appauthor, version=version, multipath=multipath).site_config_dir
def user_cache_dir(
appname: str | None = None,
appauthor: str | None | Literal[False] = None,
version: str | None = None,
opinion: bool = True,
) -> str:
"""
:param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
:param opinion: See `roaming <platformdirs.api.PlatformDirsABC.opinion>`.
:returns: cache directory tied to the user
"""
return PlatformDirs(appname=appname, appauthor=appauthor, version=version, opinion=opinion).user_cache_dir
def user_state_dir(
appname: str | None = None,
appauthor: str | None | Literal[False] = None,
version: str | None = None,
roaming: bool = False,
) -> str:
"""
:param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
:param roaming: See `roaming <platformdirs.api.PlatformDirsABC.version>`.
:returns: state directory tied to the user
"""
return PlatformDirs(appname=appname, appauthor=appauthor, version=version, roaming=roaming).user_state_dir
def user_log_dir(
appname: str | None = None,
appauthor: str | None | Literal[False] = None,
version: str | None = None,
opinion: bool = True,
) -> str:
"""
:param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
:param opinion: See `roaming <platformdirs.api.PlatformDirsABC.opinion>`.
:returns: log directory tied to the user
"""
return PlatformDirs(appname=appname, appauthor=appauthor, version=version, opinion=opinion).user_log_dir
def user_documents_dir() -> str:
"""
:returns: documents directory tied to the user
"""
return PlatformDirs().user_documents_dir
def user_runtime_dir(
appname: str | None = None,
appauthor: str | None | Literal[False] = None,
version: str | None = None,
opinion: bool = True,
) -> str:
"""
:param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
:param opinion: See `opinion <platformdirs.api.PlatformDirsABC.opinion>`.
:returns: runtime directory tied to the user
"""
return PlatformDirs(appname=appname, appauthor=appauthor, version=version, opinion=opinion).user_runtime_dir
def user_data_path(
appname: str | None = None,
appauthor: str | None | Literal[False] = None,
version: str | None = None,
roaming: bool = False,
) -> Path:
"""
:param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
:param roaming: See `roaming <platformdirs.api.PlatformDirsABC.version>`.
:returns: data path tied to the user
"""
return PlatformDirs(appname=appname, appauthor=appauthor, version=version, roaming=roaming).user_data_path
def site_data_path(
appname: str | None = None,
appauthor: str | None | Literal[False] = None,
version: str | None = None,
multipath: bool = False,
) -> Path:
"""
:param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
:param multipath: See `multipath <platformdirs.api.PlatformDirsABC.multipath>`.
:returns: data path shared by users
"""
return PlatformDirs(appname=appname, appauthor=appauthor, version=version, multipath=multipath).site_data_path
def user_config_path(
appname: str | None = None,
appauthor: str | None | Literal[False] = None,
version: str | None = None,
roaming: bool = False,
) -> Path:
"""
:param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
:param roaming: See `roaming <platformdirs.api.PlatformDirsABC.version>`.
:returns: config path tied to the user
"""
return PlatformDirs(appname=appname, appauthor=appauthor, version=version, roaming=roaming).user_config_path
def site_config_path(
appname: str | None = None,
appauthor: str | None | Literal[False] = None,
version: str | None = None,
multipath: bool = False,
) -> Path:
"""
:param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
:param multipath: See `roaming <platformdirs.api.PlatformDirsABC.multipath>`.
:returns: config path shared by the users
"""
return PlatformDirs(appname=appname, appauthor=appauthor, version=version, multipath=multipath).site_config_path
def user_cache_path(
appname: str | None = None,
appauthor: str | None | Literal[False] = None,
version: str | None = None,
opinion: bool = True,
) -> Path:
"""
:param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
:param opinion: See `roaming <platformdirs.api.PlatformDirsABC.opinion>`.
:returns: cache path tied to the user
"""
return PlatformDirs(appname=appname, appauthor=appauthor, version=version, opinion=opinion).user_cache_path
def user_state_path(
appname: str | None = None,
appauthor: str | None | Literal[False] = None,
version: str | None = None,
roaming: bool = False,
) -> Path:
"""
:param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
:param roaming: See `roaming <platformdirs.api.PlatformDirsABC.version>`.
:returns: state path tied to the user
"""
return PlatformDirs(appname=appname, appauthor=appauthor, version=version, roaming=roaming).user_state_path
def user_log_path(
appname: str | None = None,
appauthor: str | None | Literal[False] = None,
version: str | None = None,
opinion: bool = True,
) -> Path:
"""
:param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
:param opinion: See `roaming <platformdirs.api.PlatformDirsABC.opinion>`.
:returns: log path tied to the user
"""
return PlatformDirs(appname=appname, appauthor=appauthor, version=version, opinion=opinion).user_log_path
def user_documents_path() -> Path:
"""
:returns: documents path tied to the user
"""
return PlatformDirs().user_documents_path
def user_runtime_path(
appname: str | None = None,
appauthor: str | None | Literal[False] = None,
version: str | None = None,
opinion: bool = True,
) -> Path:
"""
:param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
:param opinion: See `opinion <platformdirs.api.PlatformDirsABC.opinion>`.
:returns: runtime path tied to the user
"""
return PlatformDirs(appname=appname, appauthor=appauthor, version=version, opinion=opinion).user_runtime_path
__all__ = [
"__version__",
"__version_info__",
"PlatformDirs",
"AppDirs",
"PlatformDirsABC",
"user_data_dir",
"user_config_dir",
"user_cache_dir",
"user_state_dir",
"user_log_dir",
"user_documents_dir",
"user_runtime_dir",
"site_data_dir",
"site_config_dir",
"user_data_path",
"user_config_path",
"user_cache_path",
"user_state_path",
"user_log_path",
"user_documents_path",
"user_runtime_path",
"site_data_path",
"site_config_path",
]
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/platformdirs/__init__.py
|
Python
|
mit
| 12,831 |
from __future__ import annotations
from pip._vendor.platformdirs import PlatformDirs, __version__
PROPS = (
"user_data_dir",
"user_config_dir",
"user_cache_dir",
"user_state_dir",
"user_log_dir",
"user_documents_dir",
"user_runtime_dir",
"site_data_dir",
"site_config_dir",
)
def main() -> None:
app_name = "MyApp"
app_author = "MyCompany"
print(f"-- platformdirs {__version__} --")
print("-- app dirs (with optional 'version')")
dirs = PlatformDirs(app_name, app_author, version="1.0")
for prop in PROPS:
print(f"{prop}: {getattr(dirs, prop)}")
print("\n-- app dirs (without optional 'version')")
dirs = PlatformDirs(app_name, app_author)
for prop in PROPS:
print(f"{prop}: {getattr(dirs, prop)}")
print("\n-- app dirs (without optional 'appauthor')")
dirs = PlatformDirs(app_name)
for prop in PROPS:
print(f"{prop}: {getattr(dirs, prop)}")
print("\n-- app dirs (with disabled 'appauthor')")
dirs = PlatformDirs(app_name, appauthor=False)
for prop in PROPS:
print(f"{prop}: {getattr(dirs, prop)}")
if __name__ == "__main__":
main()
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/platformdirs/__main__.py
|
Python
|
mit
| 1,176 |
from __future__ import annotations
import os
import re
import sys
from functools import lru_cache
from typing import cast
from .api import PlatformDirsABC
class Android(PlatformDirsABC):
"""
Follows the guidance `from here <https://android.stackexchange.com/a/216132>`_. Makes use of the
`appname <platformdirs.api.PlatformDirsABC.appname>` and
`version <platformdirs.api.PlatformDirsABC.version>`.
"""
@property
def user_data_dir(self) -> str:
""":return: data directory tied to the user, e.g. ``/data/user/<userid>/<packagename>/files/<AppName>``"""
return self._append_app_name_and_version(cast(str, _android_folder()), "files")
@property
def site_data_dir(self) -> str:
""":return: data directory shared by users, same as `user_data_dir`"""
return self.user_data_dir
@property
def user_config_dir(self) -> str:
"""
:return: config directory tied to the user, e.g. ``/data/user/<userid>/<packagename>/shared_prefs/<AppName>``
"""
return self._append_app_name_and_version(cast(str, _android_folder()), "shared_prefs")
@property
def site_config_dir(self) -> str:
""":return: config directory shared by the users, same as `user_config_dir`"""
return self.user_config_dir
@property
def user_cache_dir(self) -> str:
""":return: cache directory tied to the user, e.g. e.g. ``/data/user/<userid>/<packagename>/cache/<AppName>``"""
return self._append_app_name_and_version(cast(str, _android_folder()), "cache")
@property
def user_state_dir(self) -> str:
""":return: state directory tied to the user, same as `user_data_dir`"""
return self.user_data_dir
@property
def user_log_dir(self) -> str:
"""
:return: log directory tied to the user, same as `user_cache_dir` if not opinionated else ``log`` in it,
e.g. ``/data/user/<userid>/<packagename>/cache/<AppName>/log``
"""
path = self.user_cache_dir
if self.opinion:
path = os.path.join(path, "log")
return path
@property
def user_documents_dir(self) -> str:
"""
:return: documents directory tied to the user e.g. ``/storage/emulated/0/Documents``
"""
return _android_documents_folder()
@property
def user_runtime_dir(self) -> str:
"""
:return: runtime directory tied to the user, same as `user_cache_dir` if not opinionated else ``tmp`` in it,
e.g. ``/data/user/<userid>/<packagename>/cache/<AppName>/tmp``
"""
path = self.user_cache_dir
if self.opinion:
path = os.path.join(path, "tmp")
return path
@lru_cache(maxsize=1)
def _android_folder() -> str | None:
""":return: base folder for the Android OS or None if cannot be found"""
try:
# First try to get path to android app via pyjnius
from jnius import autoclass
Context = autoclass("android.content.Context") # noqa: N806
result: str | None = Context.getFilesDir().getParentFile().getAbsolutePath()
except Exception:
# if fails find an android folder looking path on the sys.path
pattern = re.compile(r"/data/(data|user/\d+)/(.+)/files")
for path in sys.path:
if pattern.match(path):
result = path.split("/files")[0]
break
else:
result = None
return result
@lru_cache(maxsize=1)
def _android_documents_folder() -> str:
""":return: documents folder for the Android OS"""
# Get directories with pyjnius
try:
from jnius import autoclass
Context = autoclass("android.content.Context") # noqa: N806
Environment = autoclass("android.os.Environment") # noqa: N806
documents_dir: str = Context.getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS).getAbsolutePath()
except Exception:
documents_dir = "/storage/emulated/0/Documents"
return documents_dir
__all__ = [
"Android",
]
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/platformdirs/android.py
|
Python
|
mit
| 4,068 |
from __future__ import annotations
import os
import sys
from abc import ABC, abstractmethod
from pathlib import Path
if sys.version_info >= (3, 8): # pragma: no branch
from typing import Literal # pragma: no cover
class PlatformDirsABC(ABC):
"""
Abstract base class for platform directories.
"""
def __init__(
self,
appname: str | None = None,
appauthor: str | None | Literal[False] = None,
version: str | None = None,
roaming: bool = False,
multipath: bool = False,
opinion: bool = True,
):
"""
Create a new platform directory.
:param appname: See `appname`.
:param appauthor: See `appauthor`.
:param version: See `version`.
:param roaming: See `roaming`.
:param multipath: See `multipath`.
:param opinion: See `opinion`.
"""
self.appname = appname #: The name of application.
self.appauthor = appauthor
"""
The name of the app author or distributing body for this application. Typically, it is the owning company name.
Defaults to `appname`. You may pass ``False`` to disable it.
"""
self.version = version
"""
An optional version path element to append to the path. You might want to use this if you want multiple versions
of your app to be able to run independently. If used, this would typically be ``<major>.<minor>``.
"""
self.roaming = roaming
"""
Whether to use the roaming appdata directory on Windows. That means that for users on a Windows network setup
for roaming profiles, this user data will be synced on login (see
`here <http://technet.microsoft.com/en-us/library/cc766489(WS.10).aspx>`_).
"""
self.multipath = multipath
"""
An optional parameter only applicable to Unix/Linux which indicates that the entire list of data dirs should be
returned. By default, the first item would only be returned.
"""
self.opinion = opinion #: A flag to indicating to use opinionated values.
def _append_app_name_and_version(self, *base: str) -> str:
params = list(base[1:])
if self.appname:
params.append(self.appname)
if self.version:
params.append(self.version)
return os.path.join(base[0], *params)
@property
@abstractmethod
def user_data_dir(self) -> str:
""":return: data directory tied to the user"""
@property
@abstractmethod
def site_data_dir(self) -> str:
""":return: data directory shared by users"""
@property
@abstractmethod
def user_config_dir(self) -> str:
""":return: config directory tied to the user"""
@property
@abstractmethod
def site_config_dir(self) -> str:
""":return: config directory shared by the users"""
@property
@abstractmethod
def user_cache_dir(self) -> str:
""":return: cache directory tied to the user"""
@property
@abstractmethod
def user_state_dir(self) -> str:
""":return: state directory tied to the user"""
@property
@abstractmethod
def user_log_dir(self) -> str:
""":return: log directory tied to the user"""
@property
@abstractmethod
def user_documents_dir(self) -> str:
""":return: documents directory tied to the user"""
@property
@abstractmethod
def user_runtime_dir(self) -> str:
""":return: runtime directory tied to the user"""
@property
def user_data_path(self) -> Path:
""":return: data path tied to the user"""
return Path(self.user_data_dir)
@property
def site_data_path(self) -> Path:
""":return: data path shared by users"""
return Path(self.site_data_dir)
@property
def user_config_path(self) -> Path:
""":return: config path tied to the user"""
return Path(self.user_config_dir)
@property
def site_config_path(self) -> Path:
""":return: config path shared by the users"""
return Path(self.site_config_dir)
@property
def user_cache_path(self) -> Path:
""":return: cache path tied to the user"""
return Path(self.user_cache_dir)
@property
def user_state_path(self) -> Path:
""":return: state path tied to the user"""
return Path(self.user_state_dir)
@property
def user_log_path(self) -> Path:
""":return: log path tied to the user"""
return Path(self.user_log_dir)
@property
def user_documents_path(self) -> Path:
""":return: documents path tied to the user"""
return Path(self.user_documents_dir)
@property
def user_runtime_path(self) -> Path:
""":return: runtime path tied to the user"""
return Path(self.user_runtime_dir)
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/platformdirs/api.py
|
Python
|
mit
| 4,910 |
from __future__ import annotations
import os
from .api import PlatformDirsABC
class MacOS(PlatformDirsABC):
"""
Platform directories for the macOS operating system. Follows the guidance from `Apple documentation
<https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/MacOSXDirectories/MacOSXDirectories.html>`_.
Makes use of the `appname <platformdirs.api.PlatformDirsABC.appname>` and
`version <platformdirs.api.PlatformDirsABC.version>`.
"""
@property
def user_data_dir(self) -> str:
""":return: data directory tied to the user, e.g. ``~/Library/Application Support/$appname/$version``"""
return self._append_app_name_and_version(os.path.expanduser("~/Library/Application Support/"))
@property
def site_data_dir(self) -> str:
""":return: data directory shared by users, e.g. ``/Library/Application Support/$appname/$version``"""
return self._append_app_name_and_version("/Library/Application Support")
@property
def user_config_dir(self) -> str:
""":return: config directory tied to the user, e.g. ``~/Library/Preferences/$appname/$version``"""
return self._append_app_name_and_version(os.path.expanduser("~/Library/Preferences/"))
@property
def site_config_dir(self) -> str:
""":return: config directory shared by the users, e.g. ``/Library/Preferences/$appname``"""
return self._append_app_name_and_version("/Library/Preferences")
@property
def user_cache_dir(self) -> str:
""":return: cache directory tied to the user, e.g. ``~/Library/Caches/$appname/$version``"""
return self._append_app_name_and_version(os.path.expanduser("~/Library/Caches"))
@property
def user_state_dir(self) -> str:
""":return: state directory tied to the user, same as `user_data_dir`"""
return self.user_data_dir
@property
def user_log_dir(self) -> str:
""":return: log directory tied to the user, e.g. ``~/Library/Logs/$appname/$version``"""
return self._append_app_name_and_version(os.path.expanduser("~/Library/Logs"))
@property
def user_documents_dir(self) -> str:
""":return: documents directory tied to the user, e.g. ``~/Documents``"""
return os.path.expanduser("~/Documents")
@property
def user_runtime_dir(self) -> str:
""":return: runtime directory tied to the user, e.g. ``~/Library/Caches/TemporaryItems/$appname/$version``"""
return self._append_app_name_and_version(os.path.expanduser("~/Library/Caches/TemporaryItems"))
__all__ = [
"MacOS",
]
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/platformdirs/macos.py
|
Python
|
mit
| 2,655 |
from __future__ import annotations
import os
import sys
from configparser import ConfigParser
from pathlib import Path
from .api import PlatformDirsABC
if sys.platform.startswith("linux"): # pragma: no branch # no op check, only to please the type checker
from os import getuid
else:
def getuid() -> int:
raise RuntimeError("should only be used on Linux")
class Unix(PlatformDirsABC):
"""
On Unix/Linux, we follow the
`XDG Basedir Spec <https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html>`_. The spec allows
overriding directories with environment variables. The examples show are the default values, alongside the name of
the environment variable that overrides them. Makes use of the
`appname <platformdirs.api.PlatformDirsABC.appname>`,
`version <platformdirs.api.PlatformDirsABC.version>`,
`multipath <platformdirs.api.PlatformDirsABC.multipath>`,
`opinion <platformdirs.api.PlatformDirsABC.opinion>`.
"""
@property
def user_data_dir(self) -> str:
"""
:return: data directory tied to the user, e.g. ``~/.local/share/$appname/$version`` or
``$XDG_DATA_HOME/$appname/$version``
"""
path = os.environ.get("XDG_DATA_HOME", "")
if not path.strip():
path = os.path.expanduser("~/.local/share")
return self._append_app_name_and_version(path)
@property
def site_data_dir(self) -> str:
"""
:return: data directories shared by users (if `multipath <platformdirs.api.PlatformDirsABC.multipath>` is
enabled and ``XDG_DATA_DIR`` is set and a multi path the response is also a multi path separated by the OS
path separator), e.g. ``/usr/local/share/$appname/$version`` or ``/usr/share/$appname/$version``
"""
# XDG default for $XDG_DATA_DIRS; only first, if multipath is False
path = os.environ.get("XDG_DATA_DIRS", "")
if not path.strip():
path = f"/usr/local/share{os.pathsep}/usr/share"
return self._with_multi_path(path)
def _with_multi_path(self, path: str) -> str:
path_list = path.split(os.pathsep)
if not self.multipath:
path_list = path_list[0:1]
path_list = [self._append_app_name_and_version(os.path.expanduser(p)) for p in path_list]
return os.pathsep.join(path_list)
@property
def user_config_dir(self) -> str:
"""
:return: config directory tied to the user, e.g. ``~/.config/$appname/$version`` or
``$XDG_CONFIG_HOME/$appname/$version``
"""
path = os.environ.get("XDG_CONFIG_HOME", "")
if not path.strip():
path = os.path.expanduser("~/.config")
return self._append_app_name_and_version(path)
@property
def site_config_dir(self) -> str:
"""
:return: config directories shared by users (if `multipath <platformdirs.api.PlatformDirsABC.multipath>`
is enabled and ``XDG_DATA_DIR`` is set and a multi path the response is also a multi path separated by the OS
path separator), e.g. ``/etc/xdg/$appname/$version``
"""
# XDG default for $XDG_CONFIG_DIRS only first, if multipath is False
path = os.environ.get("XDG_CONFIG_DIRS", "")
if not path.strip():
path = "/etc/xdg"
return self._with_multi_path(path)
@property
def user_cache_dir(self) -> str:
"""
:return: cache directory tied to the user, e.g. ``~/.cache/$appname/$version`` or
``~/$XDG_CACHE_HOME/$appname/$version``
"""
path = os.environ.get("XDG_CACHE_HOME", "")
if not path.strip():
path = os.path.expanduser("~/.cache")
return self._append_app_name_and_version(path)
@property
def user_state_dir(self) -> str:
"""
:return: state directory tied to the user, e.g. ``~/.local/state/$appname/$version`` or
``$XDG_STATE_HOME/$appname/$version``
"""
path = os.environ.get("XDG_STATE_HOME", "")
if not path.strip():
path = os.path.expanduser("~/.local/state")
return self._append_app_name_and_version(path)
@property
def user_log_dir(self) -> str:
"""
:return: log directory tied to the user, same as `user_data_dir` if not opinionated else ``log`` in it
"""
path = self.user_cache_dir
if self.opinion:
path = os.path.join(path, "log")
return path
@property
def user_documents_dir(self) -> str:
"""
:return: documents directory tied to the user, e.g. ``~/Documents``
"""
documents_dir = _get_user_dirs_folder("XDG_DOCUMENTS_DIR")
if documents_dir is None:
documents_dir = os.environ.get("XDG_DOCUMENTS_DIR", "").strip()
if not documents_dir:
documents_dir = os.path.expanduser("~/Documents")
return documents_dir
@property
def user_runtime_dir(self) -> str:
"""
:return: runtime directory tied to the user, e.g. ``/run/user/$(id -u)/$appname/$version`` or
``$XDG_RUNTIME_DIR/$appname/$version``
"""
path = os.environ.get("XDG_RUNTIME_DIR", "")
if not path.strip():
path = f"/run/user/{getuid()}"
return self._append_app_name_and_version(path)
@property
def site_data_path(self) -> Path:
""":return: data path shared by users. Only return first item, even if ``multipath`` is set to ``True``"""
return self._first_item_as_path_if_multipath(self.site_data_dir)
@property
def site_config_path(self) -> Path:
""":return: config path shared by the users. Only return first item, even if ``multipath`` is set to ``True``"""
return self._first_item_as_path_if_multipath(self.site_config_dir)
def _first_item_as_path_if_multipath(self, directory: str) -> Path:
if self.multipath:
# If multipath is True, the first path is returned.
directory = directory.split(os.pathsep)[0]
return Path(directory)
def _get_user_dirs_folder(key: str) -> str | None:
"""Return directory from user-dirs.dirs config file. See https://freedesktop.org/wiki/Software/xdg-user-dirs/"""
user_dirs_config_path = os.path.join(Unix().user_config_dir, "user-dirs.dirs")
if os.path.exists(user_dirs_config_path):
parser = ConfigParser()
with open(user_dirs_config_path) as stream:
# Add fake section header, so ConfigParser doesn't complain
parser.read_string(f"[top]\n{stream.read()}")
if key not in parser["top"]:
return None
path = parser["top"][key].strip('"')
# Handle relative home paths
path = path.replace("$HOME", os.path.expanduser("~"))
return path
return None
__all__ = [
"Unix",
]
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/platformdirs/unix.py
|
Python
|
mit
| 6,910 |
"""Version information"""
__version__ = "2.5.2"
__version_info__ = (2, 5, 2)
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/platformdirs/version.py
|
Python
|
mit
| 78 |
from __future__ import annotations
import ctypes
import os
from functools import lru_cache
from typing import Callable
from .api import PlatformDirsABC
class Windows(PlatformDirsABC):
"""`MSDN on where to store app data files
<http://support.microsoft.com/default.aspx?scid=kb;en-us;310294#XSLTH3194121123120121120120>`_.
Makes use of the
`appname <platformdirs.api.PlatformDirsABC.appname>`,
`appauthor <platformdirs.api.PlatformDirsABC.appauthor>`,
`version <platformdirs.api.PlatformDirsABC.version>`,
`roaming <platformdirs.api.PlatformDirsABC.roaming>`,
`opinion <platformdirs.api.PlatformDirsABC.opinion>`."""
@property
def user_data_dir(self) -> str:
"""
:return: data directory tied to the user, e.g.
``%USERPROFILE%\\AppData\\Local\\$appauthor\\$appname`` (not roaming) or
``%USERPROFILE%\\AppData\\Roaming\\$appauthor\\$appname`` (roaming)
"""
const = "CSIDL_APPDATA" if self.roaming else "CSIDL_LOCAL_APPDATA"
path = os.path.normpath(get_win_folder(const))
return self._append_parts(path)
def _append_parts(self, path: str, *, opinion_value: str | None = None) -> str:
params = []
if self.appname:
if self.appauthor is not False:
author = self.appauthor or self.appname
params.append(author)
params.append(self.appname)
if opinion_value is not None and self.opinion:
params.append(opinion_value)
if self.version:
params.append(self.version)
return os.path.join(path, *params)
@property
def site_data_dir(self) -> str:
""":return: data directory shared by users, e.g. ``C:\\ProgramData\\$appauthor\\$appname``"""
path = os.path.normpath(get_win_folder("CSIDL_COMMON_APPDATA"))
return self._append_parts(path)
@property
def user_config_dir(self) -> str:
""":return: config directory tied to the user, same as `user_data_dir`"""
return self.user_data_dir
@property
def site_config_dir(self) -> str:
""":return: config directory shared by the users, same as `site_data_dir`"""
return self.site_data_dir
@property
def user_cache_dir(self) -> str:
"""
:return: cache directory tied to the user (if opinionated with ``Cache`` folder within ``$appname``) e.g.
``%USERPROFILE%\\AppData\\Local\\$appauthor\\$appname\\Cache\\$version``
"""
path = os.path.normpath(get_win_folder("CSIDL_LOCAL_APPDATA"))
return self._append_parts(path, opinion_value="Cache")
@property
def user_state_dir(self) -> str:
""":return: state directory tied to the user, same as `user_data_dir`"""
return self.user_data_dir
@property
def user_log_dir(self) -> str:
"""
:return: log directory tied to the user, same as `user_data_dir` if not opinionated else ``Logs`` in it
"""
path = self.user_data_dir
if self.opinion:
path = os.path.join(path, "Logs")
return path
@property
def user_documents_dir(self) -> str:
"""
:return: documents directory tied to the user e.g. ``%USERPROFILE%\\Documents``
"""
return os.path.normpath(get_win_folder("CSIDL_PERSONAL"))
@property
def user_runtime_dir(self) -> str:
"""
:return: runtime directory tied to the user, e.g.
``%USERPROFILE%\\AppData\\Local\\Temp\\$appauthor\\$appname``
"""
path = os.path.normpath(os.path.join(get_win_folder("CSIDL_LOCAL_APPDATA"), "Temp"))
return self._append_parts(path)
def get_win_folder_from_env_vars(csidl_name: str) -> str:
"""Get folder from environment variables."""
if csidl_name == "CSIDL_PERSONAL": # does not have an environment name
return os.path.join(os.path.normpath(os.environ["USERPROFILE"]), "Documents")
env_var_name = {
"CSIDL_APPDATA": "APPDATA",
"CSIDL_COMMON_APPDATA": "ALLUSERSPROFILE",
"CSIDL_LOCAL_APPDATA": "LOCALAPPDATA",
}.get(csidl_name)
if env_var_name is None:
raise ValueError(f"Unknown CSIDL name: {csidl_name}")
result = os.environ.get(env_var_name)
if result is None:
raise ValueError(f"Unset environment variable: {env_var_name}")
return result
def get_win_folder_from_registry(csidl_name: str) -> str:
"""Get folder from the registry.
This is a fallback technique at best. I'm not sure if using the
registry for this guarantees us the correct answer for all CSIDL_*
names.
"""
shell_folder_name = {
"CSIDL_APPDATA": "AppData",
"CSIDL_COMMON_APPDATA": "Common AppData",
"CSIDL_LOCAL_APPDATA": "Local AppData",
"CSIDL_PERSONAL": "Personal",
}.get(csidl_name)
if shell_folder_name is None:
raise ValueError(f"Unknown CSIDL name: {csidl_name}")
import winreg
key = winreg.OpenKey(winreg.HKEY_CURRENT_USER, r"Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders")
directory, _ = winreg.QueryValueEx(key, shell_folder_name)
return str(directory)
def get_win_folder_via_ctypes(csidl_name: str) -> str:
"""Get folder with ctypes."""
csidl_const = {
"CSIDL_APPDATA": 26,
"CSIDL_COMMON_APPDATA": 35,
"CSIDL_LOCAL_APPDATA": 28,
"CSIDL_PERSONAL": 5,
}.get(csidl_name)
if csidl_const is None:
raise ValueError(f"Unknown CSIDL name: {csidl_name}")
buf = ctypes.create_unicode_buffer(1024)
windll = getattr(ctypes, "windll") # noqa: B009 # using getattr to avoid false positive with mypy type checker
windll.shell32.SHGetFolderPathW(None, csidl_const, None, 0, buf)
# Downgrade to short path name if it has highbit chars.
if any(ord(c) > 255 for c in buf):
buf2 = ctypes.create_unicode_buffer(1024)
if windll.kernel32.GetShortPathNameW(buf.value, buf2, 1024):
buf = buf2
return buf.value
def _pick_get_win_folder() -> Callable[[str], str]:
if hasattr(ctypes, "windll"):
return get_win_folder_via_ctypes
try:
import winreg # noqa: F401
except ImportError:
return get_win_folder_from_env_vars
else:
return get_win_folder_from_registry
get_win_folder = lru_cache(maxsize=None)(_pick_get_win_folder())
__all__ = [
"Windows",
]
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/platformdirs/windows.py
|
Python
|
mit
| 6,439 |
"""
Pygments
~~~~~~~~
Pygments is a syntax highlighting package written in Python.
It is a generic syntax highlighter for general use in all kinds of software
such as forum systems, wikis or other applications that need to prettify
source code. Highlights are:
* a wide range of common languages and markup formats is supported
* special attention is paid to details, increasing quality by a fair amount
* support for new languages and formats are added easily
* a number of output formats, presently HTML, LaTeX, RTF, SVG, all image
formats that PIL supports, and ANSI sequences
* it is usable as a command-line tool and as a library
* ... and it highlights even Brainfuck!
The `Pygments master branch`_ is installable with ``easy_install Pygments==dev``.
.. _Pygments master branch:
https://github.com/pygments/pygments/archive/master.zip#egg=Pygments-dev
:copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from io import StringIO, BytesIO
__version__ = '2.13.0'
__docformat__ = 'restructuredtext'
__all__ = ['lex', 'format', 'highlight']
def lex(code, lexer):
"""
Lex ``code`` with ``lexer`` and return an iterable of tokens.
"""
try:
return lexer.get_tokens(code)
except TypeError:
# Heuristic to catch a common mistake.
from pip._vendor.pygments.lexer import RegexLexer
if isinstance(lexer, type) and issubclass(lexer, RegexLexer):
raise TypeError('lex() argument must be a lexer instance, '
'not a class')
raise
def format(tokens, formatter, outfile=None): # pylint: disable=redefined-builtin
"""
Format a tokenlist ``tokens`` with the formatter ``formatter``.
If ``outfile`` is given and a valid file object (an object
with a ``write`` method), the result will be written to it, otherwise
it is returned as a string.
"""
try:
if not outfile:
realoutfile = getattr(formatter, 'encoding', None) and BytesIO() or StringIO()
formatter.format(tokens, realoutfile)
return realoutfile.getvalue()
else:
formatter.format(tokens, outfile)
except TypeError:
# Heuristic to catch a common mistake.
from pip._vendor.pygments.formatter import Formatter
if isinstance(formatter, type) and issubclass(formatter, Formatter):
raise TypeError('format() argument must be a formatter instance, '
'not a class')
raise
def highlight(code, lexer, formatter, outfile=None):
"""
Lex ``code`` with ``lexer`` and format it with the formatter ``formatter``.
If ``outfile`` is given and a valid file object (an object
with a ``write`` method), the result will be written to it, otherwise
it is returned as a string.
"""
return format(lex(code, lexer), formatter, outfile)
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/pygments/__init__.py
|
Python
|
mit
| 2,999 |
"""
pygments.__main__
~~~~~~~~~~~~~~~~~
Main entry point for ``python -m pygments``.
:copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import sys
from pip._vendor.pygments.cmdline import main
try:
sys.exit(main(sys.argv))
except KeyboardInterrupt:
sys.exit(1)
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/pygments/__main__.py
|
Python
|
mit
| 353 |
"""
pygments.cmdline
~~~~~~~~~~~~~~~~
Command line interface.
:copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import os
import sys
import shutil
import argparse
from textwrap import dedent
from pip._vendor.pygments import __version__, highlight
from pip._vendor.pygments.util import ClassNotFound, OptionError, docstring_headline, \
guess_decode, guess_decode_from_terminal, terminal_encoding, \
UnclosingTextIOWrapper
from pip._vendor.pygments.lexers import get_all_lexers, get_lexer_by_name, guess_lexer, \
load_lexer_from_file, get_lexer_for_filename, find_lexer_class_for_filename
from pip._vendor.pygments.lexers.special import TextLexer
from pip._vendor.pygments.formatters.latex import LatexEmbeddedLexer, LatexFormatter
from pip._vendor.pygments.formatters import get_all_formatters, get_formatter_by_name, \
load_formatter_from_file, get_formatter_for_filename, find_formatter_class
from pip._vendor.pygments.formatters.terminal import TerminalFormatter
from pip._vendor.pygments.formatters.terminal256 import Terminal256Formatter, TerminalTrueColorFormatter
from pip._vendor.pygments.filters import get_all_filters, find_filter_class
from pip._vendor.pygments.styles import get_all_styles, get_style_by_name
def _parse_options(o_strs):
opts = {}
if not o_strs:
return opts
for o_str in o_strs:
if not o_str.strip():
continue
o_args = o_str.split(',')
for o_arg in o_args:
o_arg = o_arg.strip()
try:
o_key, o_val = o_arg.split('=', 1)
o_key = o_key.strip()
o_val = o_val.strip()
except ValueError:
opts[o_arg] = True
else:
opts[o_key] = o_val
return opts
def _parse_filters(f_strs):
filters = []
if not f_strs:
return filters
for f_str in f_strs:
if ':' in f_str:
fname, fopts = f_str.split(':', 1)
filters.append((fname, _parse_options([fopts])))
else:
filters.append((f_str, {}))
return filters
def _print_help(what, name):
try:
if what == 'lexer':
cls = get_lexer_by_name(name)
print("Help on the %s lexer:" % cls.name)
print(dedent(cls.__doc__))
elif what == 'formatter':
cls = find_formatter_class(name)
print("Help on the %s formatter:" % cls.name)
print(dedent(cls.__doc__))
elif what == 'filter':
cls = find_filter_class(name)
print("Help on the %s filter:" % name)
print(dedent(cls.__doc__))
return 0
except (AttributeError, ValueError):
print("%s not found!" % what, file=sys.stderr)
return 1
def _print_list(what):
if what == 'lexer':
print()
print("Lexers:")
print("~~~~~~~")
info = []
for fullname, names, exts, _ in get_all_lexers():
tup = (', '.join(names)+':', fullname,
exts and '(filenames ' + ', '.join(exts) + ')' or '')
info.append(tup)
info.sort()
for i in info:
print(('* %s\n %s %s') % i)
elif what == 'formatter':
print()
print("Formatters:")
print("~~~~~~~~~~~")
info = []
for cls in get_all_formatters():
doc = docstring_headline(cls)
tup = (', '.join(cls.aliases) + ':', doc, cls.filenames and
'(filenames ' + ', '.join(cls.filenames) + ')' or '')
info.append(tup)
info.sort()
for i in info:
print(('* %s\n %s %s') % i)
elif what == 'filter':
print()
print("Filters:")
print("~~~~~~~~")
for name in get_all_filters():
cls = find_filter_class(name)
print("* " + name + ':')
print(" %s" % docstring_headline(cls))
elif what == 'style':
print()
print("Styles:")
print("~~~~~~~")
for name in get_all_styles():
cls = get_style_by_name(name)
print("* " + name + ':')
print(" %s" % docstring_headline(cls))
def _print_list_as_json(requested_items):
import json
result = {}
if 'lexer' in requested_items:
info = {}
for fullname, names, filenames, mimetypes in get_all_lexers():
info[fullname] = {
'aliases': names,
'filenames': filenames,
'mimetypes': mimetypes
}
result['lexers'] = info
if 'formatter' in requested_items:
info = {}
for cls in get_all_formatters():
doc = docstring_headline(cls)
info[cls.name] = {
'aliases': cls.aliases,
'filenames': cls.filenames,
'doc': doc
}
result['formatters'] = info
if 'filter' in requested_items:
info = {}
for name in get_all_filters():
cls = find_filter_class(name)
info[name] = {
'doc': docstring_headline(cls)
}
result['filters'] = info
if 'style' in requested_items:
info = {}
for name in get_all_styles():
cls = get_style_by_name(name)
info[name] = {
'doc': docstring_headline(cls)
}
result['styles'] = info
json.dump(result, sys.stdout)
def main_inner(parser, argns):
if argns.help:
parser.print_help()
return 0
if argns.V:
print('Pygments version %s, (c) 2006-2022 by Georg Brandl, Matthäus '
'Chajdas and contributors.' % __version__)
return 0
def is_only_option(opt):
return not any(v for (k, v) in vars(argns).items() if k != opt)
# handle ``pygmentize -L``
if argns.L is not None:
arg_set = set()
for k, v in vars(argns).items():
if v:
arg_set.add(k)
arg_set.discard('L')
arg_set.discard('json')
if arg_set:
parser.print_help(sys.stderr)
return 2
# print version
if not argns.json:
main(['', '-V'])
allowed_types = {'lexer', 'formatter', 'filter', 'style'}
largs = [arg.rstrip('s') for arg in argns.L]
if any(arg not in allowed_types for arg in largs):
parser.print_help(sys.stderr)
return 0
if not largs:
largs = allowed_types
if not argns.json:
for arg in largs:
_print_list(arg)
else:
_print_list_as_json(largs)
return 0
# handle ``pygmentize -H``
if argns.H:
if not is_only_option('H'):
parser.print_help(sys.stderr)
return 2
what, name = argns.H
if what not in ('lexer', 'formatter', 'filter'):
parser.print_help(sys.stderr)
return 2
return _print_help(what, name)
# parse -O options
parsed_opts = _parse_options(argns.O or [])
# parse -P options
for p_opt in argns.P or []:
try:
name, value = p_opt.split('=', 1)
except ValueError:
parsed_opts[p_opt] = True
else:
parsed_opts[name] = value
# encodings
inencoding = parsed_opts.get('inencoding', parsed_opts.get('encoding'))
outencoding = parsed_opts.get('outencoding', parsed_opts.get('encoding'))
# handle ``pygmentize -N``
if argns.N:
lexer = find_lexer_class_for_filename(argns.N)
if lexer is None:
lexer = TextLexer
print(lexer.aliases[0])
return 0
# handle ``pygmentize -C``
if argns.C:
inp = sys.stdin.buffer.read()
try:
lexer = guess_lexer(inp, inencoding=inencoding)
except ClassNotFound:
lexer = TextLexer
print(lexer.aliases[0])
return 0
# handle ``pygmentize -S``
S_opt = argns.S
a_opt = argns.a
if S_opt is not None:
f_opt = argns.f
if not f_opt:
parser.print_help(sys.stderr)
return 2
if argns.l or argns.INPUTFILE:
parser.print_help(sys.stderr)
return 2
try:
parsed_opts['style'] = S_opt
fmter = get_formatter_by_name(f_opt, **parsed_opts)
except ClassNotFound as err:
print(err, file=sys.stderr)
return 1
print(fmter.get_style_defs(a_opt or ''))
return 0
# if no -S is given, -a is not allowed
if argns.a is not None:
parser.print_help(sys.stderr)
return 2
# parse -F options
F_opts = _parse_filters(argns.F or [])
# -x: allow custom (eXternal) lexers and formatters
allow_custom_lexer_formatter = bool(argns.x)
# select lexer
lexer = None
# given by name?
lexername = argns.l
if lexername:
# custom lexer, located relative to user's cwd
if allow_custom_lexer_formatter and '.py' in lexername:
try:
filename = None
name = None
if ':' in lexername:
filename, name = lexername.rsplit(':', 1)
if '.py' in name:
# This can happen on Windows: If the lexername is
# C:\lexer.py -- return to normal load path in that case
name = None
if filename and name:
lexer = load_lexer_from_file(filename, name,
**parsed_opts)
else:
lexer = load_lexer_from_file(lexername, **parsed_opts)
except ClassNotFound as err:
print('Error:', err, file=sys.stderr)
return 1
else:
try:
lexer = get_lexer_by_name(lexername, **parsed_opts)
except (OptionError, ClassNotFound) as err:
print('Error:', err, file=sys.stderr)
return 1
# read input code
code = None
if argns.INPUTFILE:
if argns.s:
print('Error: -s option not usable when input file specified',
file=sys.stderr)
return 2
infn = argns.INPUTFILE
try:
with open(infn, 'rb') as infp:
code = infp.read()
except Exception as err:
print('Error: cannot read infile:', err, file=sys.stderr)
return 1
if not inencoding:
code, inencoding = guess_decode(code)
# do we have to guess the lexer?
if not lexer:
try:
lexer = get_lexer_for_filename(infn, code, **parsed_opts)
except ClassNotFound as err:
if argns.g:
try:
lexer = guess_lexer(code, **parsed_opts)
except ClassNotFound:
lexer = TextLexer(**parsed_opts)
else:
print('Error:', err, file=sys.stderr)
return 1
except OptionError as err:
print('Error:', err, file=sys.stderr)
return 1
elif not argns.s: # treat stdin as full file (-s support is later)
# read code from terminal, always in binary mode since we want to
# decode ourselves and be tolerant with it
code = sys.stdin.buffer.read() # use .buffer to get a binary stream
if not inencoding:
code, inencoding = guess_decode_from_terminal(code, sys.stdin)
# else the lexer will do the decoding
if not lexer:
try:
lexer = guess_lexer(code, **parsed_opts)
except ClassNotFound:
lexer = TextLexer(**parsed_opts)
else: # -s option needs a lexer with -l
if not lexer:
print('Error: when using -s a lexer has to be selected with -l',
file=sys.stderr)
return 2
# process filters
for fname, fopts in F_opts:
try:
lexer.add_filter(fname, **fopts)
except ClassNotFound as err:
print('Error:', err, file=sys.stderr)
return 1
# select formatter
outfn = argns.o
fmter = argns.f
if fmter:
# custom formatter, located relative to user's cwd
if allow_custom_lexer_formatter and '.py' in fmter:
try:
filename = None
name = None
if ':' in fmter:
# Same logic as above for custom lexer
filename, name = fmter.rsplit(':', 1)
if '.py' in name:
name = None
if filename and name:
fmter = load_formatter_from_file(filename, name,
**parsed_opts)
else:
fmter = load_formatter_from_file(fmter, **parsed_opts)
except ClassNotFound as err:
print('Error:', err, file=sys.stderr)
return 1
else:
try:
fmter = get_formatter_by_name(fmter, **parsed_opts)
except (OptionError, ClassNotFound) as err:
print('Error:', err, file=sys.stderr)
return 1
if outfn:
if not fmter:
try:
fmter = get_formatter_for_filename(outfn, **parsed_opts)
except (OptionError, ClassNotFound) as err:
print('Error:', err, file=sys.stderr)
return 1
try:
outfile = open(outfn, 'wb')
except Exception as err:
print('Error: cannot open outfile:', err, file=sys.stderr)
return 1
else:
if not fmter:
if os.environ.get('COLORTERM','') in ('truecolor', '24bit'):
fmter = TerminalTrueColorFormatter(**parsed_opts)
elif '256' in os.environ.get('TERM', ''):
fmter = Terminal256Formatter(**parsed_opts)
else:
fmter = TerminalFormatter(**parsed_opts)
outfile = sys.stdout.buffer
# determine output encoding if not explicitly selected
if not outencoding:
if outfn:
# output file? use lexer encoding for now (can still be None)
fmter.encoding = inencoding
else:
# else use terminal encoding
fmter.encoding = terminal_encoding(sys.stdout)
# provide coloring under Windows, if possible
if not outfn and sys.platform in ('win32', 'cygwin') and \
fmter.name in ('Terminal', 'Terminal256'): # pragma: no cover
# unfortunately colorama doesn't support binary streams on Py3
outfile = UnclosingTextIOWrapper(outfile, encoding=fmter.encoding)
fmter.encoding = None
try:
import pip._vendor.colorama.initialise as colorama_initialise
except ImportError:
pass
else:
outfile = colorama_initialise.wrap_stream(
outfile, convert=None, strip=None, autoreset=False, wrap=True)
# When using the LaTeX formatter and the option `escapeinside` is
# specified, we need a special lexer which collects escaped text
# before running the chosen language lexer.
escapeinside = parsed_opts.get('escapeinside', '')
if len(escapeinside) == 2 and isinstance(fmter, LatexFormatter):
left = escapeinside[0]
right = escapeinside[1]
lexer = LatexEmbeddedLexer(left, right, lexer)
# ... and do it!
if not argns.s:
# process whole input as per normal...
try:
highlight(code, lexer, fmter, outfile)
finally:
if outfn:
outfile.close()
return 0
else:
# line by line processing of stdin (eg: for 'tail -f')...
try:
while 1:
line = sys.stdin.buffer.readline()
if not line:
break
if not inencoding:
line = guess_decode_from_terminal(line, sys.stdin)[0]
highlight(line, lexer, fmter, outfile)
if hasattr(outfile, 'flush'):
outfile.flush()
return 0
except KeyboardInterrupt: # pragma: no cover
return 0
finally:
if outfn:
outfile.close()
class HelpFormatter(argparse.HelpFormatter):
def __init__(self, prog, indent_increment=2, max_help_position=16, width=None):
if width is None:
try:
width = shutil.get_terminal_size().columns - 2
except Exception:
pass
argparse.HelpFormatter.__init__(self, prog, indent_increment,
max_help_position, width)
def main(args=sys.argv):
"""
Main command line entry point.
"""
desc = "Highlight an input file and write the result to an output file."
parser = argparse.ArgumentParser(description=desc, add_help=False,
formatter_class=HelpFormatter)
operation = parser.add_argument_group('Main operation')
lexersel = operation.add_mutually_exclusive_group()
lexersel.add_argument(
'-l', metavar='LEXER',
help='Specify the lexer to use. (Query names with -L.) If not '
'given and -g is not present, the lexer is guessed from the filename.')
lexersel.add_argument(
'-g', action='store_true',
help='Guess the lexer from the file contents, or pass through '
'as plain text if nothing can be guessed.')
operation.add_argument(
'-F', metavar='FILTER[:options]', action='append',
help='Add a filter to the token stream. (Query names with -L.) '
'Filter options are given after a colon if necessary.')
operation.add_argument(
'-f', metavar='FORMATTER',
help='Specify the formatter to use. (Query names with -L.) '
'If not given, the formatter is guessed from the output filename, '
'and defaults to the terminal formatter if the output is to the '
'terminal or an unknown file extension.')
operation.add_argument(
'-O', metavar='OPTION=value[,OPTION=value,...]', action='append',
help='Give options to the lexer and formatter as a comma-separated '
'list of key-value pairs. '
'Example: `-O bg=light,python=cool`.')
operation.add_argument(
'-P', metavar='OPTION=value', action='append',
help='Give a single option to the lexer and formatter - with this '
'you can pass options whose value contains commas and equal signs. '
'Example: `-P "heading=Pygments, the Python highlighter"`.')
operation.add_argument(
'-o', metavar='OUTPUTFILE',
help='Where to write the output. Defaults to standard output.')
operation.add_argument(
'INPUTFILE', nargs='?',
help='Where to read the input. Defaults to standard input.')
flags = parser.add_argument_group('Operation flags')
flags.add_argument(
'-v', action='store_true',
help='Print a detailed traceback on unhandled exceptions, which '
'is useful for debugging and bug reports.')
flags.add_argument(
'-s', action='store_true',
help='Process lines one at a time until EOF, rather than waiting to '
'process the entire file. This only works for stdin, only for lexers '
'with no line-spanning constructs, and is intended for streaming '
'input such as you get from `tail -f`. '
'Example usage: `tail -f sql.log | pygmentize -s -l sql`.')
flags.add_argument(
'-x', action='store_true',
help='Allow custom lexers and formatters to be loaded from a .py file '
'relative to the current working directory. For example, '
'`-l ./customlexer.py -x`. By default, this option expects a file '
'with a class named CustomLexer or CustomFormatter; you can also '
'specify your own class name with a colon (`-l ./lexer.py:MyLexer`). '
'Users should be very careful not to use this option with untrusted '
'files, because it will import and run them.')
flags.add_argument('--json', help='Output as JSON. This can '
'be only used in conjunction with -L.',
default=False,
action='store_true')
special_modes_group = parser.add_argument_group(
'Special modes - do not do any highlighting')
special_modes = special_modes_group.add_mutually_exclusive_group()
special_modes.add_argument(
'-S', metavar='STYLE -f formatter',
help='Print style definitions for STYLE for a formatter '
'given with -f. The argument given by -a is formatter '
'dependent.')
special_modes.add_argument(
'-L', nargs='*', metavar='WHAT',
help='List lexers, formatters, styles or filters -- '
'give additional arguments for the thing(s) you want to list '
'(e.g. "styles"), or omit them to list everything.')
special_modes.add_argument(
'-N', metavar='FILENAME',
help='Guess and print out a lexer name based solely on the given '
'filename. Does not take input or highlight anything. If no specific '
'lexer can be determined, "text" is printed.')
special_modes.add_argument(
'-C', action='store_true',
help='Like -N, but print out a lexer name based solely on '
'a given content from standard input.')
special_modes.add_argument(
'-H', action='store', nargs=2, metavar=('NAME', 'TYPE'),
help='Print detailed help for the object <name> of type <type>, '
'where <type> is one of "lexer", "formatter" or "filter".')
special_modes.add_argument(
'-V', action='store_true',
help='Print the package version.')
special_modes.add_argument(
'-h', '--help', action='store_true',
help='Print this help.')
special_modes_group.add_argument(
'-a', metavar='ARG',
help='Formatter-specific additional argument for the -S (print '
'style sheet) mode.')
argns = parser.parse_args(args[1:])
try:
return main_inner(parser, argns)
except BrokenPipeError:
# someone closed our stdout, e.g. by quitting a pager.
return 0
except Exception:
if argns.v:
print(file=sys.stderr)
print('*' * 65, file=sys.stderr)
print('An unhandled exception occurred while highlighting.',
file=sys.stderr)
print('Please report the whole traceback to the issue tracker at',
file=sys.stderr)
print('<https://github.com/pygments/pygments/issues>.',
file=sys.stderr)
print('*' * 65, file=sys.stderr)
print(file=sys.stderr)
raise
import traceback
info = traceback.format_exception(*sys.exc_info())
msg = info[-1].strip()
if len(info) >= 3:
# extract relevant file and position info
msg += '\n (f%s)' % info[-2].split('\n')[0].strip()[1:]
print(file=sys.stderr)
print('*** Error while highlighting:', file=sys.stderr)
print(msg, file=sys.stderr)
print('*** If this is a bug you want to report, please rerun with -v.',
file=sys.stderr)
return 1
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/pygments/cmdline.py
|
Python
|
mit
| 23,685 |
"""
pygments.console
~~~~~~~~~~~~~~~~
Format colored console output.
:copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
esc = "\x1b["
codes = {}
codes[""] = ""
codes["reset"] = esc + "39;49;00m"
codes["bold"] = esc + "01m"
codes["faint"] = esc + "02m"
codes["standout"] = esc + "03m"
codes["underline"] = esc + "04m"
codes["blink"] = esc + "05m"
codes["overline"] = esc + "06m"
dark_colors = ["black", "red", "green", "yellow", "blue",
"magenta", "cyan", "gray"]
light_colors = ["brightblack", "brightred", "brightgreen", "brightyellow", "brightblue",
"brightmagenta", "brightcyan", "white"]
x = 30
for d, l in zip(dark_colors, light_colors):
codes[d] = esc + "%im" % x
codes[l] = esc + "%im" % (60 + x)
x += 1
del d, l, x
codes["white"] = codes["bold"]
def reset_color():
return codes["reset"]
def colorize(color_key, text):
return codes[color_key] + text + codes["reset"]
def ansiformat(attr, text):
"""
Format ``text`` with a color and/or some attributes::
color normal color
*color* bold color
_color_ underlined color
+color+ blinking color
"""
result = []
if attr[:1] == attr[-1:] == '+':
result.append(codes['blink'])
attr = attr[1:-1]
if attr[:1] == attr[-1:] == '*':
result.append(codes['bold'])
attr = attr[1:-1]
if attr[:1] == attr[-1:] == '_':
result.append(codes['underline'])
attr = attr[1:-1]
result.append(codes[attr])
result.append(text)
result.append(codes['reset'])
return ''.join(result)
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/pygments/console.py
|
Python
|
mit
| 1,697 |
"""
pygments.filter
~~~~~~~~~~~~~~~
Module that implements the default filter.
:copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
def apply_filters(stream, filters, lexer=None):
"""
Use this method to apply an iterable of filters to
a stream. If lexer is given it's forwarded to the
filter, otherwise the filter receives `None`.
"""
def _apply(filter_, stream):
yield from filter_.filter(lexer, stream)
for filter_ in filters:
stream = _apply(filter_, stream)
return stream
def simplefilter(f):
"""
Decorator that converts a function into a filter::
@simplefilter
def lowercase(self, lexer, stream, options):
for ttype, value in stream:
yield ttype, value.lower()
"""
return type(f.__name__, (FunctionFilter,), {
'__module__': getattr(f, '__module__'),
'__doc__': f.__doc__,
'function': f,
})
class Filter:
"""
Default filter. Subclass this class or use the `simplefilter`
decorator to create own filters.
"""
def __init__(self, **options):
self.options = options
def filter(self, lexer, stream):
raise NotImplementedError()
class FunctionFilter(Filter):
"""
Abstract class used by `simplefilter` to create simple
function filters on the fly. The `simplefilter` decorator
automatically creates subclasses of this class for
functions passed to it.
"""
function = None
def __init__(self, **options):
if not hasattr(self, 'function'):
raise TypeError('%r used without bound function' %
self.__class__.__name__)
Filter.__init__(self, **options)
def filter(self, lexer, stream):
# pylint: disable=not-callable
yield from self.function(lexer, stream, self.options)
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/pygments/filter.py
|
Python
|
mit
| 1,938 |
"""
pygments.filters
~~~~~~~~~~~~~~~~
Module containing filter lookup functions and default
filters.
:copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pip._vendor.pygments.token import String, Comment, Keyword, Name, Error, Whitespace, \
string_to_tokentype
from pip._vendor.pygments.filter import Filter
from pip._vendor.pygments.util import get_list_opt, get_int_opt, get_bool_opt, \
get_choice_opt, ClassNotFound, OptionError
from pip._vendor.pygments.plugin import find_plugin_filters
def find_filter_class(filtername):
"""Lookup a filter by name. Return None if not found."""
if filtername in FILTERS:
return FILTERS[filtername]
for name, cls in find_plugin_filters():
if name == filtername:
return cls
return None
def get_filter_by_name(filtername, **options):
"""Return an instantiated filter.
Options are passed to the filter initializer if wanted.
Raise a ClassNotFound if not found.
"""
cls = find_filter_class(filtername)
if cls:
return cls(**options)
else:
raise ClassNotFound('filter %r not found' % filtername)
def get_all_filters():
"""Return a generator of all filter names."""
yield from FILTERS
for name, _ in find_plugin_filters():
yield name
def _replace_special(ttype, value, regex, specialttype,
replacefunc=lambda x: x):
last = 0
for match in regex.finditer(value):
start, end = match.start(), match.end()
if start != last:
yield ttype, value[last:start]
yield specialttype, replacefunc(value[start:end])
last = end
if last != len(value):
yield ttype, value[last:]
class CodeTagFilter(Filter):
"""Highlight special code tags in comments and docstrings.
Options accepted:
`codetags` : list of strings
A list of strings that are flagged as code tags. The default is to
highlight ``XXX``, ``TODO``, ``FIXME``, ``BUG`` and ``NOTE``.
.. versionchanged:: 2.13
Now recognizes ``FIXME`` by default.
"""
def __init__(self, **options):
Filter.__init__(self, **options)
tags = get_list_opt(options, 'codetags',
['XXX', 'TODO', 'FIXME', 'BUG', 'NOTE'])
self.tag_re = re.compile(r'\b(%s)\b' % '|'.join([
re.escape(tag) for tag in tags if tag
]))
def filter(self, lexer, stream):
regex = self.tag_re
for ttype, value in stream:
if ttype in String.Doc or \
ttype in Comment and \
ttype not in Comment.Preproc:
yield from _replace_special(ttype, value, regex, Comment.Special)
else:
yield ttype, value
class SymbolFilter(Filter):
"""Convert mathematical symbols such as \\<longrightarrow> in Isabelle
or \\longrightarrow in LaTeX into Unicode characters.
This is mostly useful for HTML or console output when you want to
approximate the source rendering you'd see in an IDE.
Options accepted:
`lang` : string
The symbol language. Must be one of ``'isabelle'`` or
``'latex'``. The default is ``'isabelle'``.
"""
latex_symbols = {
'\\alpha' : '\U000003b1',
'\\beta' : '\U000003b2',
'\\gamma' : '\U000003b3',
'\\delta' : '\U000003b4',
'\\varepsilon' : '\U000003b5',
'\\zeta' : '\U000003b6',
'\\eta' : '\U000003b7',
'\\vartheta' : '\U000003b8',
'\\iota' : '\U000003b9',
'\\kappa' : '\U000003ba',
'\\lambda' : '\U000003bb',
'\\mu' : '\U000003bc',
'\\nu' : '\U000003bd',
'\\xi' : '\U000003be',
'\\pi' : '\U000003c0',
'\\varrho' : '\U000003c1',
'\\sigma' : '\U000003c3',
'\\tau' : '\U000003c4',
'\\upsilon' : '\U000003c5',
'\\varphi' : '\U000003c6',
'\\chi' : '\U000003c7',
'\\psi' : '\U000003c8',
'\\omega' : '\U000003c9',
'\\Gamma' : '\U00000393',
'\\Delta' : '\U00000394',
'\\Theta' : '\U00000398',
'\\Lambda' : '\U0000039b',
'\\Xi' : '\U0000039e',
'\\Pi' : '\U000003a0',
'\\Sigma' : '\U000003a3',
'\\Upsilon' : '\U000003a5',
'\\Phi' : '\U000003a6',
'\\Psi' : '\U000003a8',
'\\Omega' : '\U000003a9',
'\\leftarrow' : '\U00002190',
'\\longleftarrow' : '\U000027f5',
'\\rightarrow' : '\U00002192',
'\\longrightarrow' : '\U000027f6',
'\\Leftarrow' : '\U000021d0',
'\\Longleftarrow' : '\U000027f8',
'\\Rightarrow' : '\U000021d2',
'\\Longrightarrow' : '\U000027f9',
'\\leftrightarrow' : '\U00002194',
'\\longleftrightarrow' : '\U000027f7',
'\\Leftrightarrow' : '\U000021d4',
'\\Longleftrightarrow' : '\U000027fa',
'\\mapsto' : '\U000021a6',
'\\longmapsto' : '\U000027fc',
'\\relbar' : '\U00002500',
'\\Relbar' : '\U00002550',
'\\hookleftarrow' : '\U000021a9',
'\\hookrightarrow' : '\U000021aa',
'\\leftharpoondown' : '\U000021bd',
'\\rightharpoondown' : '\U000021c1',
'\\leftharpoonup' : '\U000021bc',
'\\rightharpoonup' : '\U000021c0',
'\\rightleftharpoons' : '\U000021cc',
'\\leadsto' : '\U0000219d',
'\\downharpoonleft' : '\U000021c3',
'\\downharpoonright' : '\U000021c2',
'\\upharpoonleft' : '\U000021bf',
'\\upharpoonright' : '\U000021be',
'\\restriction' : '\U000021be',
'\\uparrow' : '\U00002191',
'\\Uparrow' : '\U000021d1',
'\\downarrow' : '\U00002193',
'\\Downarrow' : '\U000021d3',
'\\updownarrow' : '\U00002195',
'\\Updownarrow' : '\U000021d5',
'\\langle' : '\U000027e8',
'\\rangle' : '\U000027e9',
'\\lceil' : '\U00002308',
'\\rceil' : '\U00002309',
'\\lfloor' : '\U0000230a',
'\\rfloor' : '\U0000230b',
'\\flqq' : '\U000000ab',
'\\frqq' : '\U000000bb',
'\\bot' : '\U000022a5',
'\\top' : '\U000022a4',
'\\wedge' : '\U00002227',
'\\bigwedge' : '\U000022c0',
'\\vee' : '\U00002228',
'\\bigvee' : '\U000022c1',
'\\forall' : '\U00002200',
'\\exists' : '\U00002203',
'\\nexists' : '\U00002204',
'\\neg' : '\U000000ac',
'\\Box' : '\U000025a1',
'\\Diamond' : '\U000025c7',
'\\vdash' : '\U000022a2',
'\\models' : '\U000022a8',
'\\dashv' : '\U000022a3',
'\\surd' : '\U0000221a',
'\\le' : '\U00002264',
'\\ge' : '\U00002265',
'\\ll' : '\U0000226a',
'\\gg' : '\U0000226b',
'\\lesssim' : '\U00002272',
'\\gtrsim' : '\U00002273',
'\\lessapprox' : '\U00002a85',
'\\gtrapprox' : '\U00002a86',
'\\in' : '\U00002208',
'\\notin' : '\U00002209',
'\\subset' : '\U00002282',
'\\supset' : '\U00002283',
'\\subseteq' : '\U00002286',
'\\supseteq' : '\U00002287',
'\\sqsubset' : '\U0000228f',
'\\sqsupset' : '\U00002290',
'\\sqsubseteq' : '\U00002291',
'\\sqsupseteq' : '\U00002292',
'\\cap' : '\U00002229',
'\\bigcap' : '\U000022c2',
'\\cup' : '\U0000222a',
'\\bigcup' : '\U000022c3',
'\\sqcup' : '\U00002294',
'\\bigsqcup' : '\U00002a06',
'\\sqcap' : '\U00002293',
'\\Bigsqcap' : '\U00002a05',
'\\setminus' : '\U00002216',
'\\propto' : '\U0000221d',
'\\uplus' : '\U0000228e',
'\\bigplus' : '\U00002a04',
'\\sim' : '\U0000223c',
'\\doteq' : '\U00002250',
'\\simeq' : '\U00002243',
'\\approx' : '\U00002248',
'\\asymp' : '\U0000224d',
'\\cong' : '\U00002245',
'\\equiv' : '\U00002261',
'\\Join' : '\U000022c8',
'\\bowtie' : '\U00002a1d',
'\\prec' : '\U0000227a',
'\\succ' : '\U0000227b',
'\\preceq' : '\U0000227c',
'\\succeq' : '\U0000227d',
'\\parallel' : '\U00002225',
'\\mid' : '\U000000a6',
'\\pm' : '\U000000b1',
'\\mp' : '\U00002213',
'\\times' : '\U000000d7',
'\\div' : '\U000000f7',
'\\cdot' : '\U000022c5',
'\\star' : '\U000022c6',
'\\circ' : '\U00002218',
'\\dagger' : '\U00002020',
'\\ddagger' : '\U00002021',
'\\lhd' : '\U000022b2',
'\\rhd' : '\U000022b3',
'\\unlhd' : '\U000022b4',
'\\unrhd' : '\U000022b5',
'\\triangleleft' : '\U000025c3',
'\\triangleright' : '\U000025b9',
'\\triangle' : '\U000025b3',
'\\triangleq' : '\U0000225c',
'\\oplus' : '\U00002295',
'\\bigoplus' : '\U00002a01',
'\\otimes' : '\U00002297',
'\\bigotimes' : '\U00002a02',
'\\odot' : '\U00002299',
'\\bigodot' : '\U00002a00',
'\\ominus' : '\U00002296',
'\\oslash' : '\U00002298',
'\\dots' : '\U00002026',
'\\cdots' : '\U000022ef',
'\\sum' : '\U00002211',
'\\prod' : '\U0000220f',
'\\coprod' : '\U00002210',
'\\infty' : '\U0000221e',
'\\int' : '\U0000222b',
'\\oint' : '\U0000222e',
'\\clubsuit' : '\U00002663',
'\\diamondsuit' : '\U00002662',
'\\heartsuit' : '\U00002661',
'\\spadesuit' : '\U00002660',
'\\aleph' : '\U00002135',
'\\emptyset' : '\U00002205',
'\\nabla' : '\U00002207',
'\\partial' : '\U00002202',
'\\flat' : '\U0000266d',
'\\natural' : '\U0000266e',
'\\sharp' : '\U0000266f',
'\\angle' : '\U00002220',
'\\copyright' : '\U000000a9',
'\\textregistered' : '\U000000ae',
'\\textonequarter' : '\U000000bc',
'\\textonehalf' : '\U000000bd',
'\\textthreequarters' : '\U000000be',
'\\textordfeminine' : '\U000000aa',
'\\textordmasculine' : '\U000000ba',
'\\euro' : '\U000020ac',
'\\pounds' : '\U000000a3',
'\\yen' : '\U000000a5',
'\\textcent' : '\U000000a2',
'\\textcurrency' : '\U000000a4',
'\\textdegree' : '\U000000b0',
}
isabelle_symbols = {
'\\<zero>' : '\U0001d7ec',
'\\<one>' : '\U0001d7ed',
'\\<two>' : '\U0001d7ee',
'\\<three>' : '\U0001d7ef',
'\\<four>' : '\U0001d7f0',
'\\<five>' : '\U0001d7f1',
'\\<six>' : '\U0001d7f2',
'\\<seven>' : '\U0001d7f3',
'\\<eight>' : '\U0001d7f4',
'\\<nine>' : '\U0001d7f5',
'\\<A>' : '\U0001d49c',
'\\<B>' : '\U0000212c',
'\\<C>' : '\U0001d49e',
'\\<D>' : '\U0001d49f',
'\\<E>' : '\U00002130',
'\\<F>' : '\U00002131',
'\\<G>' : '\U0001d4a2',
'\\<H>' : '\U0000210b',
'\\<I>' : '\U00002110',
'\\<J>' : '\U0001d4a5',
'\\<K>' : '\U0001d4a6',
'\\<L>' : '\U00002112',
'\\<M>' : '\U00002133',
'\\<N>' : '\U0001d4a9',
'\\<O>' : '\U0001d4aa',
'\\<P>' : '\U0001d4ab',
'\\<Q>' : '\U0001d4ac',
'\\<R>' : '\U0000211b',
'\\<S>' : '\U0001d4ae',
'\\<T>' : '\U0001d4af',
'\\<U>' : '\U0001d4b0',
'\\<V>' : '\U0001d4b1',
'\\<W>' : '\U0001d4b2',
'\\<X>' : '\U0001d4b3',
'\\<Y>' : '\U0001d4b4',
'\\<Z>' : '\U0001d4b5',
'\\<a>' : '\U0001d5ba',
'\\<b>' : '\U0001d5bb',
'\\<c>' : '\U0001d5bc',
'\\<d>' : '\U0001d5bd',
'\\<e>' : '\U0001d5be',
'\\<f>' : '\U0001d5bf',
'\\<g>' : '\U0001d5c0',
'\\<h>' : '\U0001d5c1',
'\\<i>' : '\U0001d5c2',
'\\<j>' : '\U0001d5c3',
'\\<k>' : '\U0001d5c4',
'\\<l>' : '\U0001d5c5',
'\\<m>' : '\U0001d5c6',
'\\<n>' : '\U0001d5c7',
'\\<o>' : '\U0001d5c8',
'\\<p>' : '\U0001d5c9',
'\\<q>' : '\U0001d5ca',
'\\<r>' : '\U0001d5cb',
'\\<s>' : '\U0001d5cc',
'\\<t>' : '\U0001d5cd',
'\\<u>' : '\U0001d5ce',
'\\<v>' : '\U0001d5cf',
'\\<w>' : '\U0001d5d0',
'\\<x>' : '\U0001d5d1',
'\\<y>' : '\U0001d5d2',
'\\<z>' : '\U0001d5d3',
'\\<AA>' : '\U0001d504',
'\\<BB>' : '\U0001d505',
'\\<CC>' : '\U0000212d',
'\\<DD>' : '\U0001d507',
'\\<EE>' : '\U0001d508',
'\\<FF>' : '\U0001d509',
'\\<GG>' : '\U0001d50a',
'\\<HH>' : '\U0000210c',
'\\<II>' : '\U00002111',
'\\<JJ>' : '\U0001d50d',
'\\<KK>' : '\U0001d50e',
'\\<LL>' : '\U0001d50f',
'\\<MM>' : '\U0001d510',
'\\<NN>' : '\U0001d511',
'\\<OO>' : '\U0001d512',
'\\<PP>' : '\U0001d513',
'\\<QQ>' : '\U0001d514',
'\\<RR>' : '\U0000211c',
'\\<SS>' : '\U0001d516',
'\\<TT>' : '\U0001d517',
'\\<UU>' : '\U0001d518',
'\\<VV>' : '\U0001d519',
'\\<WW>' : '\U0001d51a',
'\\<XX>' : '\U0001d51b',
'\\<YY>' : '\U0001d51c',
'\\<ZZ>' : '\U00002128',
'\\<aa>' : '\U0001d51e',
'\\<bb>' : '\U0001d51f',
'\\<cc>' : '\U0001d520',
'\\<dd>' : '\U0001d521',
'\\<ee>' : '\U0001d522',
'\\<ff>' : '\U0001d523',
'\\<gg>' : '\U0001d524',
'\\<hh>' : '\U0001d525',
'\\<ii>' : '\U0001d526',
'\\<jj>' : '\U0001d527',
'\\<kk>' : '\U0001d528',
'\\<ll>' : '\U0001d529',
'\\<mm>' : '\U0001d52a',
'\\<nn>' : '\U0001d52b',
'\\<oo>' : '\U0001d52c',
'\\<pp>' : '\U0001d52d',
'\\<qq>' : '\U0001d52e',
'\\<rr>' : '\U0001d52f',
'\\<ss>' : '\U0001d530',
'\\<tt>' : '\U0001d531',
'\\<uu>' : '\U0001d532',
'\\<vv>' : '\U0001d533',
'\\<ww>' : '\U0001d534',
'\\<xx>' : '\U0001d535',
'\\<yy>' : '\U0001d536',
'\\<zz>' : '\U0001d537',
'\\<alpha>' : '\U000003b1',
'\\<beta>' : '\U000003b2',
'\\<gamma>' : '\U000003b3',
'\\<delta>' : '\U000003b4',
'\\<epsilon>' : '\U000003b5',
'\\<zeta>' : '\U000003b6',
'\\<eta>' : '\U000003b7',
'\\<theta>' : '\U000003b8',
'\\<iota>' : '\U000003b9',
'\\<kappa>' : '\U000003ba',
'\\<lambda>' : '\U000003bb',
'\\<mu>' : '\U000003bc',
'\\<nu>' : '\U000003bd',
'\\<xi>' : '\U000003be',
'\\<pi>' : '\U000003c0',
'\\<rho>' : '\U000003c1',
'\\<sigma>' : '\U000003c3',
'\\<tau>' : '\U000003c4',
'\\<upsilon>' : '\U000003c5',
'\\<phi>' : '\U000003c6',
'\\<chi>' : '\U000003c7',
'\\<psi>' : '\U000003c8',
'\\<omega>' : '\U000003c9',
'\\<Gamma>' : '\U00000393',
'\\<Delta>' : '\U00000394',
'\\<Theta>' : '\U00000398',
'\\<Lambda>' : '\U0000039b',
'\\<Xi>' : '\U0000039e',
'\\<Pi>' : '\U000003a0',
'\\<Sigma>' : '\U000003a3',
'\\<Upsilon>' : '\U000003a5',
'\\<Phi>' : '\U000003a6',
'\\<Psi>' : '\U000003a8',
'\\<Omega>' : '\U000003a9',
'\\<bool>' : '\U0001d539',
'\\<complex>' : '\U00002102',
'\\<nat>' : '\U00002115',
'\\<rat>' : '\U0000211a',
'\\<real>' : '\U0000211d',
'\\<int>' : '\U00002124',
'\\<leftarrow>' : '\U00002190',
'\\<longleftarrow>' : '\U000027f5',
'\\<rightarrow>' : '\U00002192',
'\\<longrightarrow>' : '\U000027f6',
'\\<Leftarrow>' : '\U000021d0',
'\\<Longleftarrow>' : '\U000027f8',
'\\<Rightarrow>' : '\U000021d2',
'\\<Longrightarrow>' : '\U000027f9',
'\\<leftrightarrow>' : '\U00002194',
'\\<longleftrightarrow>' : '\U000027f7',
'\\<Leftrightarrow>' : '\U000021d4',
'\\<Longleftrightarrow>' : '\U000027fa',
'\\<mapsto>' : '\U000021a6',
'\\<longmapsto>' : '\U000027fc',
'\\<midarrow>' : '\U00002500',
'\\<Midarrow>' : '\U00002550',
'\\<hookleftarrow>' : '\U000021a9',
'\\<hookrightarrow>' : '\U000021aa',
'\\<leftharpoondown>' : '\U000021bd',
'\\<rightharpoondown>' : '\U000021c1',
'\\<leftharpoonup>' : '\U000021bc',
'\\<rightharpoonup>' : '\U000021c0',
'\\<rightleftharpoons>' : '\U000021cc',
'\\<leadsto>' : '\U0000219d',
'\\<downharpoonleft>' : '\U000021c3',
'\\<downharpoonright>' : '\U000021c2',
'\\<upharpoonleft>' : '\U000021bf',
'\\<upharpoonright>' : '\U000021be',
'\\<restriction>' : '\U000021be',
'\\<Colon>' : '\U00002237',
'\\<up>' : '\U00002191',
'\\<Up>' : '\U000021d1',
'\\<down>' : '\U00002193',
'\\<Down>' : '\U000021d3',
'\\<updown>' : '\U00002195',
'\\<Updown>' : '\U000021d5',
'\\<langle>' : '\U000027e8',
'\\<rangle>' : '\U000027e9',
'\\<lceil>' : '\U00002308',
'\\<rceil>' : '\U00002309',
'\\<lfloor>' : '\U0000230a',
'\\<rfloor>' : '\U0000230b',
'\\<lparr>' : '\U00002987',
'\\<rparr>' : '\U00002988',
'\\<lbrakk>' : '\U000027e6',
'\\<rbrakk>' : '\U000027e7',
'\\<lbrace>' : '\U00002983',
'\\<rbrace>' : '\U00002984',
'\\<guillemotleft>' : '\U000000ab',
'\\<guillemotright>' : '\U000000bb',
'\\<bottom>' : '\U000022a5',
'\\<top>' : '\U000022a4',
'\\<and>' : '\U00002227',
'\\<And>' : '\U000022c0',
'\\<or>' : '\U00002228',
'\\<Or>' : '\U000022c1',
'\\<forall>' : '\U00002200',
'\\<exists>' : '\U00002203',
'\\<nexists>' : '\U00002204',
'\\<not>' : '\U000000ac',
'\\<box>' : '\U000025a1',
'\\<diamond>' : '\U000025c7',
'\\<turnstile>' : '\U000022a2',
'\\<Turnstile>' : '\U000022a8',
'\\<tturnstile>' : '\U000022a9',
'\\<TTurnstile>' : '\U000022ab',
'\\<stileturn>' : '\U000022a3',
'\\<surd>' : '\U0000221a',
'\\<le>' : '\U00002264',
'\\<ge>' : '\U00002265',
'\\<lless>' : '\U0000226a',
'\\<ggreater>' : '\U0000226b',
'\\<lesssim>' : '\U00002272',
'\\<greatersim>' : '\U00002273',
'\\<lessapprox>' : '\U00002a85',
'\\<greaterapprox>' : '\U00002a86',
'\\<in>' : '\U00002208',
'\\<notin>' : '\U00002209',
'\\<subset>' : '\U00002282',
'\\<supset>' : '\U00002283',
'\\<subseteq>' : '\U00002286',
'\\<supseteq>' : '\U00002287',
'\\<sqsubset>' : '\U0000228f',
'\\<sqsupset>' : '\U00002290',
'\\<sqsubseteq>' : '\U00002291',
'\\<sqsupseteq>' : '\U00002292',
'\\<inter>' : '\U00002229',
'\\<Inter>' : '\U000022c2',
'\\<union>' : '\U0000222a',
'\\<Union>' : '\U000022c3',
'\\<squnion>' : '\U00002294',
'\\<Squnion>' : '\U00002a06',
'\\<sqinter>' : '\U00002293',
'\\<Sqinter>' : '\U00002a05',
'\\<setminus>' : '\U00002216',
'\\<propto>' : '\U0000221d',
'\\<uplus>' : '\U0000228e',
'\\<Uplus>' : '\U00002a04',
'\\<noteq>' : '\U00002260',
'\\<sim>' : '\U0000223c',
'\\<doteq>' : '\U00002250',
'\\<simeq>' : '\U00002243',
'\\<approx>' : '\U00002248',
'\\<asymp>' : '\U0000224d',
'\\<cong>' : '\U00002245',
'\\<smile>' : '\U00002323',
'\\<equiv>' : '\U00002261',
'\\<frown>' : '\U00002322',
'\\<Join>' : '\U000022c8',
'\\<bowtie>' : '\U00002a1d',
'\\<prec>' : '\U0000227a',
'\\<succ>' : '\U0000227b',
'\\<preceq>' : '\U0000227c',
'\\<succeq>' : '\U0000227d',
'\\<parallel>' : '\U00002225',
'\\<bar>' : '\U000000a6',
'\\<plusminus>' : '\U000000b1',
'\\<minusplus>' : '\U00002213',
'\\<times>' : '\U000000d7',
'\\<div>' : '\U000000f7',
'\\<cdot>' : '\U000022c5',
'\\<star>' : '\U000022c6',
'\\<bullet>' : '\U00002219',
'\\<circ>' : '\U00002218',
'\\<dagger>' : '\U00002020',
'\\<ddagger>' : '\U00002021',
'\\<lhd>' : '\U000022b2',
'\\<rhd>' : '\U000022b3',
'\\<unlhd>' : '\U000022b4',
'\\<unrhd>' : '\U000022b5',
'\\<triangleleft>' : '\U000025c3',
'\\<triangleright>' : '\U000025b9',
'\\<triangle>' : '\U000025b3',
'\\<triangleq>' : '\U0000225c',
'\\<oplus>' : '\U00002295',
'\\<Oplus>' : '\U00002a01',
'\\<otimes>' : '\U00002297',
'\\<Otimes>' : '\U00002a02',
'\\<odot>' : '\U00002299',
'\\<Odot>' : '\U00002a00',
'\\<ominus>' : '\U00002296',
'\\<oslash>' : '\U00002298',
'\\<dots>' : '\U00002026',
'\\<cdots>' : '\U000022ef',
'\\<Sum>' : '\U00002211',
'\\<Prod>' : '\U0000220f',
'\\<Coprod>' : '\U00002210',
'\\<infinity>' : '\U0000221e',
'\\<integral>' : '\U0000222b',
'\\<ointegral>' : '\U0000222e',
'\\<clubsuit>' : '\U00002663',
'\\<diamondsuit>' : '\U00002662',
'\\<heartsuit>' : '\U00002661',
'\\<spadesuit>' : '\U00002660',
'\\<aleph>' : '\U00002135',
'\\<emptyset>' : '\U00002205',
'\\<nabla>' : '\U00002207',
'\\<partial>' : '\U00002202',
'\\<flat>' : '\U0000266d',
'\\<natural>' : '\U0000266e',
'\\<sharp>' : '\U0000266f',
'\\<angle>' : '\U00002220',
'\\<copyright>' : '\U000000a9',
'\\<registered>' : '\U000000ae',
'\\<hyphen>' : '\U000000ad',
'\\<inverse>' : '\U000000af',
'\\<onequarter>' : '\U000000bc',
'\\<onehalf>' : '\U000000bd',
'\\<threequarters>' : '\U000000be',
'\\<ordfeminine>' : '\U000000aa',
'\\<ordmasculine>' : '\U000000ba',
'\\<section>' : '\U000000a7',
'\\<paragraph>' : '\U000000b6',
'\\<exclamdown>' : '\U000000a1',
'\\<questiondown>' : '\U000000bf',
'\\<euro>' : '\U000020ac',
'\\<pounds>' : '\U000000a3',
'\\<yen>' : '\U000000a5',
'\\<cent>' : '\U000000a2',
'\\<currency>' : '\U000000a4',
'\\<degree>' : '\U000000b0',
'\\<amalg>' : '\U00002a3f',
'\\<mho>' : '\U00002127',
'\\<lozenge>' : '\U000025ca',
'\\<wp>' : '\U00002118',
'\\<wrong>' : '\U00002240',
'\\<struct>' : '\U000022c4',
'\\<acute>' : '\U000000b4',
'\\<index>' : '\U00000131',
'\\<dieresis>' : '\U000000a8',
'\\<cedilla>' : '\U000000b8',
'\\<hungarumlaut>' : '\U000002dd',
'\\<some>' : '\U000003f5',
'\\<newline>' : '\U000023ce',
'\\<open>' : '\U00002039',
'\\<close>' : '\U0000203a',
'\\<here>' : '\U00002302',
'\\<^sub>' : '\U000021e9',
'\\<^sup>' : '\U000021e7',
'\\<^bold>' : '\U00002759',
'\\<^bsub>' : '\U000021d8',
'\\<^esub>' : '\U000021d9',
'\\<^bsup>' : '\U000021d7',
'\\<^esup>' : '\U000021d6',
}
lang_map = {'isabelle' : isabelle_symbols, 'latex' : latex_symbols}
def __init__(self, **options):
Filter.__init__(self, **options)
lang = get_choice_opt(options, 'lang',
['isabelle', 'latex'], 'isabelle')
self.symbols = self.lang_map[lang]
def filter(self, lexer, stream):
for ttype, value in stream:
if value in self.symbols:
yield ttype, self.symbols[value]
else:
yield ttype, value
class KeywordCaseFilter(Filter):
"""Convert keywords to lowercase or uppercase or capitalize them, which
means first letter uppercase, rest lowercase.
This can be useful e.g. if you highlight Pascal code and want to adapt the
code to your styleguide.
Options accepted:
`case` : string
The casing to convert keywords to. Must be one of ``'lower'``,
``'upper'`` or ``'capitalize'``. The default is ``'lower'``.
"""
def __init__(self, **options):
Filter.__init__(self, **options)
case = get_choice_opt(options, 'case',
['lower', 'upper', 'capitalize'], 'lower')
self.convert = getattr(str, case)
def filter(self, lexer, stream):
for ttype, value in stream:
if ttype in Keyword:
yield ttype, self.convert(value)
else:
yield ttype, value
class NameHighlightFilter(Filter):
"""Highlight a normal Name (and Name.*) token with a different token type.
Example::
filter = NameHighlightFilter(
names=['foo', 'bar', 'baz'],
tokentype=Name.Function,
)
This would highlight the names "foo", "bar" and "baz"
as functions. `Name.Function` is the default token type.
Options accepted:
`names` : list of strings
A list of names that should be given the different token type.
There is no default.
`tokentype` : TokenType or string
A token type or a string containing a token type name that is
used for highlighting the strings in `names`. The default is
`Name.Function`.
"""
def __init__(self, **options):
Filter.__init__(self, **options)
self.names = set(get_list_opt(options, 'names', []))
tokentype = options.get('tokentype')
if tokentype:
self.tokentype = string_to_tokentype(tokentype)
else:
self.tokentype = Name.Function
def filter(self, lexer, stream):
for ttype, value in stream:
if ttype in Name and value in self.names:
yield self.tokentype, value
else:
yield ttype, value
class ErrorToken(Exception):
pass
class RaiseOnErrorTokenFilter(Filter):
"""Raise an exception when the lexer generates an error token.
Options accepted:
`excclass` : Exception class
The exception class to raise.
The default is `pygments.filters.ErrorToken`.
.. versionadded:: 0.8
"""
def __init__(self, **options):
Filter.__init__(self, **options)
self.exception = options.get('excclass', ErrorToken)
try:
# issubclass() will raise TypeError if first argument is not a class
if not issubclass(self.exception, Exception):
raise TypeError
except TypeError:
raise OptionError('excclass option is not an exception class')
def filter(self, lexer, stream):
for ttype, value in stream:
if ttype is Error:
raise self.exception(value)
yield ttype, value
class VisibleWhitespaceFilter(Filter):
"""Convert tabs, newlines and/or spaces to visible characters.
Options accepted:
`spaces` : string or bool
If this is a one-character string, spaces will be replaces by this string.
If it is another true value, spaces will be replaced by ``·`` (unicode
MIDDLE DOT). If it is a false value, spaces will not be replaced. The
default is ``False``.
`tabs` : string or bool
The same as for `spaces`, but the default replacement character is ``»``
(unicode RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK). The default value
is ``False``. Note: this will not work if the `tabsize` option for the
lexer is nonzero, as tabs will already have been expanded then.
`tabsize` : int
If tabs are to be replaced by this filter (see the `tabs` option), this
is the total number of characters that a tab should be expanded to.
The default is ``8``.
`newlines` : string or bool
The same as for `spaces`, but the default replacement character is ``¶``
(unicode PILCROW SIGN). The default value is ``False``.
`wstokentype` : bool
If true, give whitespace the special `Whitespace` token type. This allows
styling the visible whitespace differently (e.g. greyed out), but it can
disrupt background colors. The default is ``True``.
.. versionadded:: 0.8
"""
def __init__(self, **options):
Filter.__init__(self, **options)
for name, default in [('spaces', '·'),
('tabs', '»'),
('newlines', '¶')]:
opt = options.get(name, False)
if isinstance(opt, str) and len(opt) == 1:
setattr(self, name, opt)
else:
setattr(self, name, (opt and default or ''))
tabsize = get_int_opt(options, 'tabsize', 8)
if self.tabs:
self.tabs += ' ' * (tabsize - 1)
if self.newlines:
self.newlines += '\n'
self.wstt = get_bool_opt(options, 'wstokentype', True)
def filter(self, lexer, stream):
if self.wstt:
spaces = self.spaces or ' '
tabs = self.tabs or '\t'
newlines = self.newlines or '\n'
regex = re.compile(r'\s')
def replacefunc(wschar):
if wschar == ' ':
return spaces
elif wschar == '\t':
return tabs
elif wschar == '\n':
return newlines
return wschar
for ttype, value in stream:
yield from _replace_special(ttype, value, regex, Whitespace,
replacefunc)
else:
spaces, tabs, newlines = self.spaces, self.tabs, self.newlines
# simpler processing
for ttype, value in stream:
if spaces:
value = value.replace(' ', spaces)
if tabs:
value = value.replace('\t', tabs)
if newlines:
value = value.replace('\n', newlines)
yield ttype, value
class GobbleFilter(Filter):
"""Gobbles source code lines (eats initial characters).
This filter drops the first ``n`` characters off every line of code. This
may be useful when the source code fed to the lexer is indented by a fixed
amount of space that isn't desired in the output.
Options accepted:
`n` : int
The number of characters to gobble.
.. versionadded:: 1.2
"""
def __init__(self, **options):
Filter.__init__(self, **options)
self.n = get_int_opt(options, 'n', 0)
def gobble(self, value, left):
if left < len(value):
return value[left:], 0
else:
return '', left - len(value)
def filter(self, lexer, stream):
n = self.n
left = n # How many characters left to gobble.
for ttype, value in stream:
# Remove ``left`` tokens from first line, ``n`` from all others.
parts = value.split('\n')
(parts[0], left) = self.gobble(parts[0], left)
for i in range(1, len(parts)):
(parts[i], left) = self.gobble(parts[i], n)
value = '\n'.join(parts)
if value != '':
yield ttype, value
class TokenMergeFilter(Filter):
"""Merges consecutive tokens with the same token type in the output
stream of a lexer.
.. versionadded:: 1.2
"""
def __init__(self, **options):
Filter.__init__(self, **options)
def filter(self, lexer, stream):
current_type = None
current_value = None
for ttype, value in stream:
if ttype is current_type:
current_value += value
else:
if current_type is not None:
yield current_type, current_value
current_type = ttype
current_value = value
if current_type is not None:
yield current_type, current_value
FILTERS = {
'codetagify': CodeTagFilter,
'keywordcase': KeywordCaseFilter,
'highlight': NameHighlightFilter,
'raiseonerror': RaiseOnErrorTokenFilter,
'whitespace': VisibleWhitespaceFilter,
'gobble': GobbleFilter,
'tokenmerge': TokenMergeFilter,
'symbols': SymbolFilter,
}
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/pygments/filters/__init__.py
|
Python
|
mit
| 40,386 |
"""
pygments.formatter
~~~~~~~~~~~~~~~~~~
Base formatter class.
:copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import codecs
from pip._vendor.pygments.util import get_bool_opt
from pip._vendor.pygments.styles import get_style_by_name
__all__ = ['Formatter']
def _lookup_style(style):
if isinstance(style, str):
return get_style_by_name(style)
return style
class Formatter:
"""
Converts a token stream to text.
Options accepted:
``style``
The style to use, can be a string or a Style subclass
(default: "default"). Not used by e.g. the
TerminalFormatter.
``full``
Tells the formatter to output a "full" document, i.e.
a complete self-contained document. This doesn't have
any effect for some formatters (default: false).
``title``
If ``full`` is true, the title that should be used to
caption the document (default: '').
``encoding``
If given, must be an encoding name. This will be used to
convert the Unicode token strings to byte strings in the
output. If it is "" or None, Unicode strings will be written
to the output file, which most file-like objects do not
support (default: None).
``outencoding``
Overrides ``encoding`` if given.
"""
#: Name of the formatter
name = None
#: Shortcuts for the formatter
aliases = []
#: fn match rules
filenames = []
#: If True, this formatter outputs Unicode strings when no encoding
#: option is given.
unicodeoutput = True
def __init__(self, **options):
self.style = _lookup_style(options.get('style', 'default'))
self.full = get_bool_opt(options, 'full', False)
self.title = options.get('title', '')
self.encoding = options.get('encoding', None) or None
if self.encoding in ('guess', 'chardet'):
# can happen for e.g. pygmentize -O encoding=guess
self.encoding = 'utf-8'
self.encoding = options.get('outencoding') or self.encoding
self.options = options
def get_style_defs(self, arg=''):
"""
Return the style definitions for the current style as a string.
``arg`` is an additional argument whose meaning depends on the
formatter used. Note that ``arg`` can also be a list or tuple
for some formatters like the html formatter.
"""
return ''
def format(self, tokensource, outfile):
"""
Format ``tokensource``, an iterable of ``(tokentype, tokenstring)``
tuples and write it into ``outfile``.
"""
if self.encoding:
# wrap the outfile in a StreamWriter
outfile = codecs.lookup(self.encoding)[3](outfile)
return self.format_unencoded(tokensource, outfile)
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/pygments/formatter.py
|
Python
|
mit
| 2,917 |
"""
pygments.formatters
~~~~~~~~~~~~~~~~~~~
Pygments formatters.
:copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
import sys
import types
from fnmatch import fnmatch
from os.path import basename
from pip._vendor.pygments.formatters._mapping import FORMATTERS
from pip._vendor.pygments.plugin import find_plugin_formatters
from pip._vendor.pygments.util import ClassNotFound
__all__ = ['get_formatter_by_name', 'get_formatter_for_filename',
'get_all_formatters', 'load_formatter_from_file'] + list(FORMATTERS)
_formatter_cache = {} # classes by name
def _load_formatters(module_name):
"""Load a formatter (and all others in the module too)."""
mod = __import__(module_name, None, None, ['__all__'])
for formatter_name in mod.__all__:
cls = getattr(mod, formatter_name)
_formatter_cache[cls.name] = cls
def get_all_formatters():
"""Return a generator for all formatter classes."""
# NB: this returns formatter classes, not info like get_all_lexers().
for info in FORMATTERS.values():
if info[1] not in _formatter_cache:
_load_formatters(info[0])
yield _formatter_cache[info[1]]
for _, formatter in find_plugin_formatters():
yield formatter
def find_formatter_class(alias):
"""Lookup a formatter by alias.
Returns None if not found.
"""
for module_name, name, aliases, _, _ in FORMATTERS.values():
if alias in aliases:
if name not in _formatter_cache:
_load_formatters(module_name)
return _formatter_cache[name]
for _, cls in find_plugin_formatters():
if alias in cls.aliases:
return cls
def get_formatter_by_name(_alias, **options):
"""Lookup and instantiate a formatter by alias.
Raises ClassNotFound if not found.
"""
cls = find_formatter_class(_alias)
if cls is None:
raise ClassNotFound("no formatter found for name %r" % _alias)
return cls(**options)
def load_formatter_from_file(filename, formattername="CustomFormatter",
**options):
"""Load a formatter from a file.
This method expects a file located relative to the current working
directory, which contains a class named CustomFormatter. By default,
it expects the Formatter to be named CustomFormatter; you can specify
your own class name as the second argument to this function.
Users should be very careful with the input, because this method
is equivalent to running eval on the input file.
Raises ClassNotFound if there are any problems importing the Formatter.
.. versionadded:: 2.2
"""
try:
# This empty dict will contain the namespace for the exec'd file
custom_namespace = {}
with open(filename, 'rb') as f:
exec(f.read(), custom_namespace)
# Retrieve the class `formattername` from that namespace
if formattername not in custom_namespace:
raise ClassNotFound('no valid %s class found in %s' %
(formattername, filename))
formatter_class = custom_namespace[formattername]
# And finally instantiate it with the options
return formatter_class(**options)
except OSError as err:
raise ClassNotFound('cannot read %s: %s' % (filename, err))
except ClassNotFound:
raise
except Exception as err:
raise ClassNotFound('error when loading custom formatter: %s' % err)
def get_formatter_for_filename(fn, **options):
"""Lookup and instantiate a formatter by filename pattern.
Raises ClassNotFound if not found.
"""
fn = basename(fn)
for modname, name, _, filenames, _ in FORMATTERS.values():
for filename in filenames:
if fnmatch(fn, filename):
if name not in _formatter_cache:
_load_formatters(modname)
return _formatter_cache[name](**options)
for cls in find_plugin_formatters():
for filename in cls.filenames:
if fnmatch(fn, filename):
return cls(**options)
raise ClassNotFound("no formatter found for file name %r" % fn)
class _automodule(types.ModuleType):
"""Automatically import formatters."""
def __getattr__(self, name):
info = FORMATTERS.get(name)
if info:
_load_formatters(info[0])
cls = _formatter_cache[info[1]]
setattr(self, name, cls)
return cls
raise AttributeError(name)
oldmod = sys.modules[__name__]
newmod = _automodule(__name__)
newmod.__dict__.update(oldmod.__dict__)
sys.modules[__name__] = newmod
del newmod.newmod, newmod.oldmod, newmod.sys, newmod.types
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/pygments/formatters/__init__.py
|
Python
|
mit
| 4,810 |
# Automatically generated by scripts/gen_mapfiles.py.
# DO NOT EDIT BY HAND; run `make mapfiles` instead.
FORMATTERS = {
'BBCodeFormatter': ('pygments.formatters.bbcode', 'BBCode', ('bbcode', 'bb'), (), 'Format tokens with BBcodes. These formatting codes are used by many bulletin boards, so you can highlight your sourcecode with pygments before posting it there.'),
'BmpImageFormatter': ('pygments.formatters.img', 'img_bmp', ('bmp', 'bitmap'), ('*.bmp',), 'Create a bitmap image from source code. This uses the Python Imaging Library to generate a pixmap from the source code.'),
'GifImageFormatter': ('pygments.formatters.img', 'img_gif', ('gif',), ('*.gif',), 'Create a GIF image from source code. This uses the Python Imaging Library to generate a pixmap from the source code.'),
'GroffFormatter': ('pygments.formatters.groff', 'groff', ('groff', 'troff', 'roff'), (), 'Format tokens with groff escapes to change their color and font style.'),
'HtmlFormatter': ('pygments.formatters.html', 'HTML', ('html',), ('*.html', '*.htm'), "Format tokens as HTML 4 ``<span>`` tags within a ``<pre>`` tag, wrapped in a ``<div>`` tag. The ``<div>``'s CSS class can be set by the `cssclass` option."),
'IRCFormatter': ('pygments.formatters.irc', 'IRC', ('irc', 'IRC'), (), 'Format tokens with IRC color sequences'),
'ImageFormatter': ('pygments.formatters.img', 'img', ('img', 'IMG', 'png'), ('*.png',), 'Create a PNG image from source code. This uses the Python Imaging Library to generate a pixmap from the source code.'),
'JpgImageFormatter': ('pygments.formatters.img', 'img_jpg', ('jpg', 'jpeg'), ('*.jpg',), 'Create a JPEG image from source code. This uses the Python Imaging Library to generate a pixmap from the source code.'),
'LatexFormatter': ('pygments.formatters.latex', 'LaTeX', ('latex', 'tex'), ('*.tex',), 'Format tokens as LaTeX code. This needs the `fancyvrb` and `color` standard packages.'),
'NullFormatter': ('pygments.formatters.other', 'Text only', ('text', 'null'), ('*.txt',), 'Output the text unchanged without any formatting.'),
'PangoMarkupFormatter': ('pygments.formatters.pangomarkup', 'Pango Markup', ('pango', 'pangomarkup'), (), 'Format tokens as Pango Markup code. It can then be rendered to an SVG.'),
'RawTokenFormatter': ('pygments.formatters.other', 'Raw tokens', ('raw', 'tokens'), ('*.raw',), 'Format tokens as a raw representation for storing token streams.'),
'RtfFormatter': ('pygments.formatters.rtf', 'RTF', ('rtf',), ('*.rtf',), 'Format tokens as RTF markup. This formatter automatically outputs full RTF documents with color information and other useful stuff. Perfect for Copy and Paste into Microsoft(R) Word(R) documents.'),
'SvgFormatter': ('pygments.formatters.svg', 'SVG', ('svg',), ('*.svg',), 'Format tokens as an SVG graphics file. This formatter is still experimental. Each line of code is a ``<text>`` element with explicit ``x`` and ``y`` coordinates containing ``<tspan>`` elements with the individual token styles.'),
'Terminal256Formatter': ('pygments.formatters.terminal256', 'Terminal256', ('terminal256', 'console256', '256'), (), 'Format tokens with ANSI color sequences, for output in a 256-color terminal or console. Like in `TerminalFormatter` color sequences are terminated at newlines, so that paging the output works correctly.'),
'TerminalFormatter': ('pygments.formatters.terminal', 'Terminal', ('terminal', 'console'), (), 'Format tokens with ANSI color sequences, for output in a text console. Color sequences are terminated at newlines, so that paging the output works correctly.'),
'TerminalTrueColorFormatter': ('pygments.formatters.terminal256', 'TerminalTrueColor', ('terminal16m', 'console16m', '16m'), (), 'Format tokens with ANSI color sequences, for output in a true-color terminal or console. Like in `TerminalFormatter` color sequences are terminated at newlines, so that paging the output works correctly.'),
'TestcaseFormatter': ('pygments.formatters.other', 'Testcase', ('testcase',), (), 'Format tokens as appropriate for a new testcase.'),
}
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/pygments/formatters/_mapping.py
|
Python
|
mit
| 4,104 |
"""
pygments.formatters.bbcode
~~~~~~~~~~~~~~~~~~~~~~~~~~
BBcode formatter.
:copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pip._vendor.pygments.formatter import Formatter
from pip._vendor.pygments.util import get_bool_opt
__all__ = ['BBCodeFormatter']
class BBCodeFormatter(Formatter):
"""
Format tokens with BBcodes. These formatting codes are used by many
bulletin boards, so you can highlight your sourcecode with pygments before
posting it there.
This formatter has no support for background colors and borders, as there
are no common BBcode tags for that.
Some board systems (e.g. phpBB) don't support colors in their [code] tag,
so you can't use the highlighting together with that tag.
Text in a [code] tag usually is shown with a monospace font (which this
formatter can do with the ``monofont`` option) and no spaces (which you
need for indentation) are removed.
Additional options accepted:
`style`
The style to use, can be a string or a Style subclass (default:
``'default'``).
`codetag`
If set to true, put the output into ``[code]`` tags (default:
``false``)
`monofont`
If set to true, add a tag to show the code with a monospace font
(default: ``false``).
"""
name = 'BBCode'
aliases = ['bbcode', 'bb']
filenames = []
def __init__(self, **options):
Formatter.__init__(self, **options)
self._code = get_bool_opt(options, 'codetag', False)
self._mono = get_bool_opt(options, 'monofont', False)
self.styles = {}
self._make_styles()
def _make_styles(self):
for ttype, ndef in self.style:
start = end = ''
if ndef['color']:
start += '[color=#%s]' % ndef['color']
end = '[/color]' + end
if ndef['bold']:
start += '[b]'
end = '[/b]' + end
if ndef['italic']:
start += '[i]'
end = '[/i]' + end
if ndef['underline']:
start += '[u]'
end = '[/u]' + end
# there are no common BBcodes for background-color and border
self.styles[ttype] = start, end
def format_unencoded(self, tokensource, outfile):
if self._code:
outfile.write('[code]')
if self._mono:
outfile.write('[font=monospace]')
lastval = ''
lasttype = None
for ttype, value in tokensource:
while ttype not in self.styles:
ttype = ttype.parent
if ttype == lasttype:
lastval += value
else:
if lastval:
start, end = self.styles[lasttype]
outfile.write(''.join((start, lastval, end)))
lastval = value
lasttype = ttype
if lastval:
start, end = self.styles[lasttype]
outfile.write(''.join((start, lastval, end)))
if self._mono:
outfile.write('[/font]')
if self._code:
outfile.write('[/code]')
if self._code or self._mono:
outfile.write('\n')
|
castiel248/Convert
|
Lib/site-packages/pip/_vendor/pygments/formatters/bbcode.py
|
Python
|
mit
| 3,314 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.