id
int64
0
458k
file_name
stringlengths
4
119
file_path
stringlengths
14
227
content
stringlengths
24
9.96M
size
int64
24
9.96M
language
stringclasses
1 value
extension
stringclasses
14 values
total_lines
int64
1
219k
avg_line_length
float64
2.52
4.63M
max_line_length
int64
5
9.91M
alphanum_fraction
float64
0
1
repo_name
stringlengths
7
101
repo_stars
int64
100
139k
repo_forks
int64
0
26.4k
repo_open_issues
int64
0
2.27k
repo_license
stringclasses
12 values
repo_extraction_date
stringclasses
433 values
20,100
mbcsgroupprober.py
chardet_chardet/chardet/mbcsgroupprober.py
######################## 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 .enums import LanguageFilter 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: LanguageFilter = LanguageFilter.NONE) -> None: super().__init__(lang_filter=lang_filter) self.probers = [ UTF8Prober(), SJISProber(), EUCJPProber(), GB2312Prober(), EUCKRProber(), CP949Prober(), Big5Prober(), EUCTWProber(), JOHABProber(), ] self.reset()
2,131
Python
.py
54
35.740741
82
0.70974
chardet/chardet
2,153
257
66
LGPL-2.1
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,101
mbcharsetprober.py
chardet_chardet/chardet/mbcharsetprober.py
######################## 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 typing import Optional, Union from .chardistribution import CharDistributionAnalysis from .charsetprober import CharSetProber from .codingstatemachine import CodingStateMachine from .enums import LanguageFilter, MachineState, ProbingState class MultiByteCharSetProber(CharSetProber): """ MultiByteCharSetProber """ def __init__(self, lang_filter: LanguageFilter = LanguageFilter.NONE) -> None: super().__init__(lang_filter=lang_filter) self.distribution_analyzer: Optional[CharDistributionAnalysis] = None self.coding_sm: Optional[CodingStateMachine] = None self._last_char = bytearray(b"\0\0") def reset(self) -> None: super().reset() if self.coding_sm: self.coding_sm.reset() if self.distribution_analyzer: self.distribution_analyzer.reset() self._last_char = bytearray(b"\0\0") def feed(self, byte_str: Union[bytes, bytearray]) -> ProbingState: assert self.coding_sm is not None assert self.distribution_analyzer is not None 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) -> float: assert self.distribution_analyzer is not None return self.distribution_analyzer.get_confidence()
3,715
Python
.py
83
36.771084
86
0.643646
chardet/chardet
2,153
257
66
LGPL-2.1
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,102
mbcssm.py
chardet_chardet/chardet/mbcssm.py
######################## 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 .codingstatemachinedict import CodingStateMachineDict 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: CodingStateMachineDict = { "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: CodingStateMachineDict = { "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: CodingStateMachineDict = { "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: CodingStateMachineDict = { "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: CodingStateMachineDict = { "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: CodingStateMachineDict = { "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: CodingStateMachineDict = { "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: CodingStateMachineDict = { "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: CodingStateMachineDict = { "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: CodingStateMachineDict = { "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: CodingStateMachineDict = { "class_table": UTF8_CLS, "class_factor": 16, "state_table": UTF8_ST, "char_len_table": UTF8_CHAR_LEN_TABLE, "name": "UTF-8", }
30,391
Python
.py
615
45.131707
227
0.559233
chardet/chardet
2,153
257
66
LGPL-2.1
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,103
johabfreq.py
chardet_chardet/chardet/johabfreq.py
######################## 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, }
42,498
Python
.py
2,380
12.905882
69
0.58109
chardet/chardet
2,153
257
66
LGPL-2.1
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,104
charsetgroupprober.py
chardet_chardet/chardet/charsetgroupprober.py
######################## 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 ######################### from typing import List, Optional, Union from .charsetprober import CharSetProber from .enums import LanguageFilter, ProbingState class CharSetGroupProber(CharSetProber): def __init__(self, lang_filter: LanguageFilter = LanguageFilter.NONE) -> None: super().__init__(lang_filter=lang_filter) self._active_num = 0 self.probers: List[CharSetProber] = [] self._best_guess_prober: Optional[CharSetProber] = None def reset(self) -> None: super().reset() self._active_num = 0 for prober in self.probers: prober.reset() prober.active = True self._active_num += 1 self._best_guess_prober = None @property def charset_name(self) -> Optional[str]: if not self._best_guess_prober: self.get_confidence() if not self._best_guess_prober: return None return self._best_guess_prober.charset_name @property def language(self) -> Optional[str]: if not self._best_guess_prober: self.get_confidence() if not self._best_guess_prober: return None return self._best_guess_prober.language def feed(self, byte_str: Union[bytes, bytearray]) -> ProbingState: for prober in self.probers: if not prober.active: continue state = prober.feed(byte_str) if not state: continue if state == ProbingState.FOUND_IT: self._best_guess_prober = prober self._state = ProbingState.FOUND_IT return self.state if state == ProbingState.NOT_ME: prober.active = False self._active_num -= 1 if self._active_num <= 0: self._state = ProbingState.NOT_ME return self.state return self.state def get_confidence(self) -> float: state = self.state if state == ProbingState.FOUND_IT: return 0.99 if state == ProbingState.NOT_ME: return 0.01 best_conf = 0.0 self._best_guess_prober = None for prober in self.probers: if not prober.active: self.logger.debug("%s not active", prober.charset_name) continue conf = prober.get_confidence() self.logger.debug( "%s %s confidence = %s", prober.charset_name, prober.language, conf ) if best_conf < conf: best_conf = conf self._best_guess_prober = prober if not self._best_guess_prober: return 0.0 return best_conf
3,915
Python
.py
97
31.762887
83
0.612759
chardet/chardet
2,153
257
66
LGPL-2.1
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,105
__init__.py
chardet_chardet/chardet/__init__.py
######################## BEGIN LICENSE BLOCK ######################## # 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 typing import List, Union from .charsetgroupprober import CharSetGroupProber from .charsetprober import CharSetProber from .enums import InputState from .resultdict import ResultDict from .universaldetector import UniversalDetector from .version import VERSION, __version__ __all__ = ["UniversalDetector", "detect", "detect_all", "__version__", "VERSION"] def detect( byte_str: Union[bytes, bytearray], should_rename_legacy: bool = False ) -> ResultDict: """ Detect the encoding of the given byte string. :param byte_str: The byte sequence to examine. :type byte_str: ``bytes`` or ``bytearray`` :param should_rename_legacy: Should we rename legacy encodings to their more modern equivalents? :type should_rename_legacy: ``bool`` """ if not isinstance(byte_str, bytearray): if not isinstance(byte_str, bytes): raise TypeError( f"Expected object of type bytes or bytearray, got: {type(byte_str)}" ) byte_str = bytearray(byte_str) detector = UniversalDetector(should_rename_legacy=should_rename_legacy) detector.feed(byte_str) return detector.close() def detect_all( byte_str: Union[bytes, bytearray], ignore_threshold: bool = False, should_rename_legacy: bool = False, ) -> List[ResultDict]: """ Detect all the possible encodings of the given byte string. :param byte_str: The byte sequence to examine. :type byte_str: ``bytes`` or ``bytearray`` :param ignore_threshold: Include encodings that are below ``UniversalDetector.MINIMUM_THRESHOLD`` in results. :type ignore_threshold: ``bool`` :param should_rename_legacy: Should we rename legacy encodings to their more modern equivalents? :type should_rename_legacy: ``bool`` """ if not isinstance(byte_str, bytearray): if not isinstance(byte_str, bytes): raise TypeError( f"Expected object of type bytes or bytearray, got: {type(byte_str)}" ) byte_str = bytearray(byte_str) detector = UniversalDetector(should_rename_legacy=should_rename_legacy) detector.feed(byte_str) detector.close() if detector.input_state == InputState.HIGH_BYTE: results: List[ResultDict] = [] probers: List[CharSetProber] = [] for prober in detector.charset_probers: if isinstance(prober, CharSetGroupProber): probers.extend(p for p in prober.probers) else: probers.append(prober) for prober in probers: if ignore_threshold or prober.get_confidence() > detector.MINIMUM_THRESHOLD: charset_name = prober.charset_name or "" lower_charset_name = charset_name.lower() # Use Windows encoding name instead of ISO-8859 if we saw any # extra Windows-specific bytes if lower_charset_name.startswith("iso-8859") and detector.has_win_bytes: charset_name = detector.ISO_WIN_MAP.get( lower_charset_name, charset_name ) # Rename legacy encodings with superset encodings if asked if should_rename_legacy: charset_name = detector.LEGACY_MAP.get( charset_name.lower(), charset_name ) results.append({ "encoding": charset_name, "confidence": prober.get_confidence(), "language": prober.language, }) if len(results) > 0: return sorted(results, key=lambda result: -result["confidence"]) return [detector.result]
4,743
Python
.py
101
37.80198
88
0.626998
chardet/chardet
2,153
257
66
LGPL-2.1
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,106
euckrprober.py
chardet_chardet/chardet/euckrprober.py
######################## 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 EUCKRDistributionAnalysis from .codingstatemachine import CodingStateMachine from .mbcharsetprober import MultiByteCharSetProber from .mbcssm import EUCKR_SM_MODEL class EUCKRProber(MultiByteCharSetProber): def __init__(self) -> None: super().__init__() self.coding_sm = CodingStateMachine(EUCKR_SM_MODEL) self.distribution_analyzer = EUCKRDistributionAnalysis() self.reset() @property def charset_name(self) -> str: return "EUC-KR" @property def language(self) -> str: return "Korean"
1,753
Python
.py
42
39
69
0.719812
chardet/chardet
2,153
257
66
LGPL-2.1
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,107
resultdict.py
chardet_chardet/chardet/resultdict.py
from typing import Optional, TypedDict class ResultDict(TypedDict): encoding: Optional[str] confidence: float language: Optional[str]
148
Python
.py
5
25.8
38
0.780142
chardet/chardet
2,153
257
66
LGPL-2.1
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,108
euckrfreq.py
chardet_chardet/chardet/euckrfreq.py
######################## 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 # 128 --> 0.79 # 256 --> 0.92 # 512 --> 0.986 # 1024 --> 0.99944 # 2048 --> 0.99999 # # Idea Distribution Ratio = 0.98653 / (1-0.98653) = 73.24 # Random Distribution Ration = 512 / (2350-512) = 0.279. # # Typical Distribution Ratio EUCKR_TYPICAL_DISTRIBUTION_RATIO = 6.0 EUCKR_TABLE_SIZE = 2352 # Char to FreqOrder table , # fmt: off EUCKR_CHAR_TO_FREQ_ORDER = ( 13, 130, 120,1396, 481,1719,1720, 328, 609, 212,1721, 707, 400, 299,1722, 87, 1397,1723, 104, 536,1117,1203,1724,1267, 685,1268, 508,1725,1726,1727,1728,1398, 1399,1729,1730,1731, 141, 621, 326,1057, 368,1732, 267, 488, 20,1733,1269,1734, 945,1400,1735, 47, 904,1270,1736,1737, 773, 248,1738, 409, 313, 786, 429,1739, 116, 987, 813,1401, 683, 75,1204, 145,1740,1741,1742,1743, 16, 847, 667, 622, 708,1744,1745,1746, 966, 787, 304, 129,1747, 60, 820, 123, 676,1748,1749,1750, 1751, 617,1752, 626,1753,1754,1755,1756, 653,1757,1758,1759,1760,1761,1762, 856, 344,1763,1764,1765,1766, 89, 401, 418, 806, 905, 848,1767,1768,1769, 946,1205, 709,1770,1118,1771, 241,1772,1773,1774,1271,1775, 569,1776, 999,1777,1778,1779, 1780, 337, 751,1058, 28, 628, 254,1781, 177, 906, 270, 349, 891,1079,1782, 19, 1783, 379,1784, 315,1785, 629, 754,1402, 559,1786, 636, 203,1206,1787, 710, 567, 1788, 935, 814,1789,1790,1207, 766, 528,1791,1792,1208,1793,1794,1795,1796,1797, 1403,1798,1799, 533,1059,1404,1405,1156,1406, 936, 884,1080,1800, 351,1801,1802, 1803,1804,1805, 801,1806,1807,1808,1119,1809,1157, 714, 474,1407,1810, 298, 899, 885,1811,1120, 802,1158,1812, 892,1813,1814,1408, 659,1815,1816,1121,1817,1818, 1819,1820,1821,1822, 319,1823, 594, 545,1824, 815, 937,1209,1825,1826, 573,1409, 1022,1827,1210,1828,1829,1830,1831,1832,1833, 556, 722, 807,1122,1060,1834, 697, 1835, 900, 557, 715,1836,1410, 540,1411, 752,1159, 294, 597,1211, 976, 803, 770, 1412,1837,1838, 39, 794,1413, 358,1839, 371, 925,1840, 453, 661, 788, 531, 723, 544,1023,1081, 869, 91,1841, 392, 430, 790, 602,1414, 677,1082, 457,1415,1416, 1842,1843, 475, 327,1024,1417, 795, 121,1844, 733, 403,1418,1845,1846,1847, 300, 119, 711,1212, 627,1848,1272, 207,1849,1850, 796,1213, 382,1851, 519,1852,1083, 893,1853,1854,1855, 367, 809, 487, 671,1856, 663,1857,1858, 956, 471, 306, 857, 1859,1860,1160,1084,1861,1862,1863,1864,1865,1061,1866,1867,1868,1869,1870,1871, 282, 96, 574,1872, 502,1085,1873,1214,1874, 907,1875,1876, 827, 977,1419,1420, 1421, 268,1877,1422,1878,1879,1880, 308,1881, 2, 537,1882,1883,1215,1884,1885, 127, 791,1886,1273,1423,1887, 34, 336, 404, 643,1888, 571, 654, 894, 840,1889, 0, 886,1274, 122, 575, 260, 908, 938,1890,1275, 410, 316,1891,1892, 100,1893, 1894,1123, 48,1161,1124,1025,1895, 633, 901,1276,1896,1897, 115, 816,1898, 317, 1899, 694,1900, 909, 734,1424, 572, 866,1425, 691, 85, 524,1010, 543, 394, 841, 1901,1902,1903,1026,1904,1905,1906,1907,1908,1909, 30, 451, 651, 988, 310,1910, 1911,1426, 810,1216, 93,1912,1913,1277,1217,1914, 858, 759, 45, 58, 181, 610, 269,1915,1916, 131,1062, 551, 443,1000, 821,1427, 957, 895,1086,1917,1918, 375, 1919, 359,1920, 687,1921, 822,1922, 293,1923,1924, 40, 662, 118, 692, 29, 939, 887, 640, 482, 174,1925, 69,1162, 728,1428, 910,1926,1278,1218,1279, 386, 870, 217, 854,1163, 823,1927,1928,1929,1930, 834,1931, 78,1932, 859,1933,1063,1934, 1935,1936,1937, 438,1164, 208, 595,1938,1939,1940,1941,1219,1125,1942, 280, 888, 1429,1430,1220,1431,1943,1944,1945,1946,1947,1280, 150, 510,1432,1948,1949,1950, 1951,1952,1953,1954,1011,1087,1955,1433,1043,1956, 881,1957, 614, 958,1064,1065, 1221,1958, 638,1001, 860, 967, 896,1434, 989, 492, 553,1281,1165,1959,1282,1002, 1283,1222,1960,1961,1962,1963, 36, 383, 228, 753, 247, 454,1964, 876, 678,1965, 1966,1284, 126, 464, 490, 835, 136, 672, 529, 940,1088,1435, 473,1967,1968, 467, 50, 390, 227, 587, 279, 378, 598, 792, 968, 240, 151, 160, 849, 882,1126,1285, 639,1044, 133, 140, 288, 360, 811, 563,1027, 561, 142, 523,1969,1970,1971, 7, 103, 296, 439, 407, 506, 634, 990,1972,1973,1974,1975, 645,1976,1977,1978,1979, 1980,1981, 236,1982,1436,1983,1984,1089, 192, 828, 618, 518,1166, 333,1127,1985, 818,1223,1986,1987,1988,1989,1990,1991,1992,1993, 342,1128,1286, 746, 842,1994, 1995, 560, 223,1287, 98, 8, 189, 650, 978,1288,1996,1437,1997, 17, 345, 250, 423, 277, 234, 512, 226, 97, 289, 42, 167,1998, 201,1999,2000, 843, 836, 824, 532, 338, 783,1090, 182, 576, 436,1438,1439, 527, 500,2001, 947, 889,2002,2003, 2004,2005, 262, 600, 314, 447,2006, 547,2007, 693, 738,1129,2008, 71,1440, 745, 619, 688,2009, 829,2010,2011, 147,2012, 33, 948,2013,2014, 74, 224,2015, 61, 191, 918, 399, 637,2016,1028,1130, 257, 902,2017,2018,2019,2020,2021,2022,2023, 2024,2025,2026, 837,2027,2028,2029,2030, 179, 874, 591, 52, 724, 246,2031,2032, 2033,2034,1167, 969,2035,1289, 630, 605, 911,1091,1168,2036,2037,2038,1441, 912, 2039, 623,2040,2041, 253,1169,1290,2042,1442, 146, 620, 611, 577, 433,2043,1224, 719,1170, 959, 440, 437, 534, 84, 388, 480,1131, 159, 220, 198, 679,2044,1012, 819,1066,1443, 113,1225, 194, 318,1003,1029,2045,2046,2047,2048,1067,2049,2050, 2051,2052,2053, 59, 913, 112,2054, 632,2055, 455, 144, 739,1291,2056, 273, 681, 499,2057, 448,2058,2059, 760,2060,2061, 970, 384, 169, 245,1132,2062,2063, 414, 1444,2064,2065, 41, 235,2066, 157, 252, 877, 568, 919, 789, 580,2067, 725,2068, 2069,1292,2070,2071,1445,2072,1446,2073,2074, 55, 588, 66,1447, 271,1092,2075, 1226,2076, 960,1013, 372,2077,2078,2079,2080,2081,1293,2082,2083,2084,2085, 850, 2086,2087,2088,2089,2090, 186,2091,1068, 180,2092,2093,2094, 109,1227, 522, 606, 2095, 867,1448,1093, 991,1171, 926, 353,1133,2096, 581,2097,2098,2099,1294,1449, 1450,2100, 596,1172,1014,1228,2101,1451,1295,1173,1229,2102,2103,1296,1134,1452, 949,1135,2104,2105,1094,1453,1454,1455,2106,1095,2107,2108,2109,2110,2111,2112, 2113,2114,2115,2116,2117, 804,2118,2119,1230,1231, 805,1456, 405,1136,2120,2121, 2122,2123,2124, 720, 701,1297, 992,1457, 927,1004,2125,2126,2127,2128,2129,2130, 22, 417,2131, 303,2132, 385,2133, 971, 520, 513,2134,1174, 73,1096, 231, 274, 962,1458, 673,2135,1459,2136, 152,1137,2137,2138,2139,2140,1005,1138,1460,1139, 2141,2142,2143,2144, 11, 374, 844,2145, 154,1232, 46,1461,2146, 838, 830, 721, 1233, 106,2147, 90, 428, 462, 578, 566,1175, 352,2148,2149, 538,1234, 124,1298, 2150,1462, 761, 565,2151, 686,2152, 649,2153, 72, 173,2154, 460, 415,2155,1463, 2156,1235, 305,2157,2158,2159,2160,2161,2162, 579,2163,2164,2165,2166,2167, 747, 2168,2169,2170,2171,1464, 669,2172,2173,2174,2175,2176,1465,2177, 23, 530, 285, 2178, 335, 729,2179, 397,2180,2181,2182,1030,2183,2184, 698,2185,2186, 325,2187, 2188, 369,2189, 799,1097,1015, 348,2190,1069, 680,2191, 851,1466,2192,2193, 10, 2194, 613, 424,2195, 979, 108, 449, 589, 27, 172, 81,1031, 80, 774, 281, 350, 1032, 525, 301, 582,1176,2196, 674,1045,2197,2198,1467, 730, 762,2199,2200,2201, 2202,1468,2203, 993,2204,2205, 266,1070, 963,1140,2206,2207,2208, 664,1098, 972, 2209,2210,2211,1177,1469,1470, 871,2212,2213,2214,2215,2216,1471,2217,2218,2219, 2220,2221,2222,2223,2224,2225,2226,2227,1472,1236,2228,2229,2230,2231,2232,2233, 2234,2235,1299,2236,2237, 200,2238, 477, 373,2239,2240, 731, 825, 777,2241,2242, 2243, 521, 486, 548,2244,2245,2246,1473,1300, 53, 549, 137, 875, 76, 158,2247, 1301,1474, 469, 396,1016, 278, 712,2248, 321, 442, 503, 767, 744, 941,1237,1178, 1475,2249, 82, 178,1141,1179, 973,2250,1302,2251, 297,2252,2253, 570,2254,2255, 2256, 18, 450, 206,2257, 290, 292,1142,2258, 511, 162, 99, 346, 164, 735,2259, 1476,1477, 4, 554, 343, 798,1099,2260,1100,2261, 43, 171,1303, 139, 215,2262, 2263, 717, 775,2264,1033, 322, 216,2265, 831,2266, 149,2267,1304,2268,2269, 702, 1238, 135, 845, 347, 309,2270, 484,2271, 878, 655, 238,1006,1478,2272, 67,2273, 295,2274,2275, 461,2276, 478, 942, 412,2277,1034,2278,2279,2280, 265,2281, 541, 2282,2283,2284,2285,2286, 70, 852,1071,2287,2288,2289,2290, 21, 56, 509, 117, 432,2291,2292, 331, 980, 552,1101, 148, 284, 105, 393,1180,1239, 755,2293, 187, 2294,1046,1479,2295, 340,2296, 63,1047, 230,2297,2298,1305, 763,1306, 101, 800, 808, 494,2299,2300,2301, 903,2302, 37,1072, 14, 5,2303, 79, 675,2304, 312, 2305,2306,2307,2308,2309,1480, 6,1307,2310,2311,2312, 1, 470, 35, 24, 229, 2313, 695, 210, 86, 778, 15, 784, 592, 779, 32, 77, 855, 964,2314, 259,2315, 501, 380,2316,2317, 83, 981, 153, 689,1308,1481,1482,1483,2318,2319, 716,1484, 2320,2321,2322,2323,2324,2325,1485,2326,2327, 128, 57, 68, 261,1048, 211, 170, 1240, 31,2328, 51, 435, 742,2329,2330,2331, 635,2332, 264, 456,2333,2334,2335, 425,2336,1486, 143, 507, 263, 943,2337, 363, 920,1487, 256,1488,1102, 243, 601, 1489,2338,2339,2340,2341,2342,2343,2344, 861,2345,2346,2347,2348,2349,2350, 395, 2351,1490,1491, 62, 535, 166, 225,2352,2353, 668, 419,1241, 138, 604, 928,2354, 1181,2355,1492,1493,2356,2357,2358,1143,2359, 696,2360, 387, 307,1309, 682, 476, 2361,2362, 332, 12, 222, 156,2363, 232,2364, 641, 276, 656, 517,1494,1495,1035, 416, 736,1496,2365,1017, 586,2366,2367,2368,1497,2369, 242,2370,2371,2372,1498, 2373, 965, 713,2374,2375,2376,2377, 740, 982,1499, 944,1500,1007,2378,2379,1310, 1501,2380,2381,2382, 785, 329,2383,2384,1502,2385,2386,2387, 932,2388,1503,2389, 2390,2391,2392,1242,2393,2394,2395,2396,2397, 994, 950,2398,2399,2400,2401,1504, 1311,2402,2403,2404,2405,1049, 749,2406,2407, 853, 718,1144,1312,2408,1182,1505, 2409,2410, 255, 516, 479, 564, 550, 214,1506,1507,1313, 413, 239, 444, 339,1145, 1036,1508,1509,1314,1037,1510,1315,2411,1511,2412,2413,2414, 176, 703, 497, 624, 593, 921, 302,2415, 341, 165,1103,1512,2416,1513,2417,2418,2419, 376,2420, 700, 2421,2422,2423, 258, 768,1316,2424,1183,2425, 995, 608,2426,2427,2428,2429, 221, 2430,2431,2432,2433,2434,2435,2436,2437, 195, 323, 726, 188, 897, 983,1317, 377, 644,1050, 879,2438, 452,2439,2440,2441,2442,2443,2444, 914,2445,2446,2447,2448, 915, 489,2449,1514,1184,2450,2451, 515, 64, 427, 495,2452, 583,2453, 483, 485, 1038, 562, 213,1515, 748, 666,2454,2455,2456,2457, 334,2458, 780, 996,1008, 705, 1243,2459,2460,2461,2462,2463, 114,2464, 493,1146, 366, 163,1516, 961,1104,2465, 291,2466,1318,1105,2467,1517, 365,2468, 355, 951,1244,2469,1319,2470, 631,2471, 2472, 218,1320, 364, 320, 756,1518,1519,1321,1520,1322,2473,2474,2475,2476, 997, 2477,2478,2479,2480, 665,1185,2481, 916,1521,2482,2483,2484, 584, 684,2485,2486, 797,2487,1051,1186,2488,2489,2490,1522,2491,2492, 370,2493,1039,1187, 65,2494, 434, 205, 463,1188,2495, 125, 812, 391, 402, 826, 699, 286, 398, 155, 781, 771, 585,2496, 590, 505,1073,2497, 599, 244, 219, 917,1018, 952, 646,1523,2498,1323, 2499,2500, 49, 984, 354, 741,2501, 625,2502,1324,2503,1019, 190, 357, 757, 491, 95, 782, 868,2504,2505,2506,2507,2508,2509, 134,1524,1074, 422,1525, 898,2510, 161,2511,2512,2513,2514, 769,2515,1526,2516,2517, 411,1325,2518, 472,1527,2519, 2520,2521,2522,2523,2524, 985,2525,2526,2527,2528,2529,2530, 764,2531,1245,2532, 2533, 25, 204, 311,2534, 496,2535,1052,2536,2537,2538,2539,2540,2541,2542, 199, 704, 504, 468, 758, 657,1528, 196, 44, 839,1246, 272, 750,2543, 765, 862,2544, 2545,1326,2546, 132, 615, 933,2547, 732,2548,2549,2550,1189,1529,2551, 283,1247, 1053, 607, 929,2552,2553,2554, 930, 183, 872, 616,1040,1147,2555,1148,1020, 441, 249,1075,2556,2557,2558, 466, 743,2559,2560,2561, 92, 514, 426, 420, 526,2562, 2563,2564,2565,2566,2567,2568, 185,2569,2570,2571,2572, 776,1530, 658,2573, 362, 2574, 361, 922,1076, 793,2575,2576,2577,2578,2579,2580,1531, 251,2581,2582,2583, 2584,1532, 54, 612, 237,1327,2585,2586, 275, 408, 647, 111,2587,1533,1106, 465, 3, 458, 9, 38,2588, 107, 110, 890, 209, 26, 737, 498,2589,1534,2590, 431, 202, 88,1535, 356, 287,1107, 660,1149,2591, 381,1536, 986,1150, 445,1248,1151, 974,2592,2593, 846,2594, 446, 953, 184,1249,1250, 727,2595, 923, 193, 883,2596, 2597,2598, 102, 324, 539, 817,2599, 421,1041,2600, 832,2601, 94, 175, 197, 406, 2602, 459,2603,2604,2605,2606,2607, 330, 555,2608,2609,2610, 706,1108, 389,2611, 2612,2613,2614, 233,2615, 833, 558, 931, 954,1251,2616,2617,1537, 546,2618,2619, 1009,2620,2621,2622,1538, 690,1328,2623, 955,2624,1539,2625,2626, 772,2627,2628, 2629,2630,2631, 924, 648, 863, 603,2632,2633, 934,1540, 864, 865,2634, 642,1042, 670,1190,2635,2636,2637,2638, 168,2639, 652, 873, 542,1054,1541,2640,2641,2642, # 512, 256 ) # fmt: on
13,566
Python
.py
191
69.691099
92
0.706657
chardet/chardet
2,153
257
66
LGPL-2.1
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,109
chardistribution.py
chardet_chardet/chardet/chardistribution.py
######################## 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 ######################### from typing import Tuple, Union from .big5freq import ( BIG5_CHAR_TO_FREQ_ORDER, BIG5_TABLE_SIZE, BIG5_TYPICAL_DISTRIBUTION_RATIO, ) from .euckrfreq import ( EUCKR_CHAR_TO_FREQ_ORDER, EUCKR_TABLE_SIZE, EUCKR_TYPICAL_DISTRIBUTION_RATIO, ) from .euctwfreq import ( EUCTW_CHAR_TO_FREQ_ORDER, EUCTW_TABLE_SIZE, EUCTW_TYPICAL_DISTRIBUTION_RATIO, ) from .gb2312freq import ( GB2312_CHAR_TO_FREQ_ORDER, GB2312_TABLE_SIZE, GB2312_TYPICAL_DISTRIBUTION_RATIO, ) from .jisfreq import ( JIS_CHAR_TO_FREQ_ORDER, JIS_TABLE_SIZE, JIS_TYPICAL_DISTRIBUTION_RATIO, ) from .johabfreq import JOHAB_TO_EUCKR_ORDER_TABLE class CharDistributionAnalysis: ENOUGH_DATA_THRESHOLD = 1024 SURE_YES = 0.99 SURE_NO = 0.01 MINIMUM_DATA_THRESHOLD = 3 def __init__(self) -> None: # Mapping table to get frequency order from char order (get from # GetOrder()) self._char_to_freq_order: Tuple[int, ...] = tuple() self._table_size = 0 # Size of above table # This is a constant value which varies from language to language, # used in calculating confidence. See # http://www.mozilla.org/projects/intl/UniversalCharsetDetection.html # for further detail. self.typical_distribution_ratio = 0.0 self._done = False self._total_chars = 0 self._freq_chars = 0 self.reset() def reset(self) -> None: """reset analyser, clear any state""" # If this flag is set to True, detection is done and conclusion has # been made self._done = False self._total_chars = 0 # Total characters encountered # The number of characters whose frequency order is less than 512 self._freq_chars = 0 def feed(self, char: Union[bytes, bytearray], char_len: int) -> None: """feed a character with known length""" if char_len == 2: # we only care about 2-bytes character in our distribution analysis order = self.get_order(char) else: order = -1 if order >= 0: self._total_chars += 1 # order is valid if order < self._table_size: if 512 > self._char_to_freq_order[order]: self._freq_chars += 1 def get_confidence(self) -> float: """return confidence based on existing data""" # if we didn't receive any character in our consideration range, # return negative answer if self._total_chars <= 0 or self._freq_chars <= self.MINIMUM_DATA_THRESHOLD: return self.SURE_NO if self._total_chars != self._freq_chars: r = self._freq_chars / ( (self._total_chars - self._freq_chars) * self.typical_distribution_ratio ) if r < self.SURE_YES: return r # normalize confidence (we don't want to be 100% sure) return self.SURE_YES def got_enough_data(self) -> bool: # It is not necessary to receive all data to draw conclusion. # For charset detection, certain amount of data is enough return self._total_chars > self.ENOUGH_DATA_THRESHOLD def get_order(self, _: Union[bytes, bytearray]) -> int: # We do not handle characters based on the original encoding string, # but convert this encoding string to a number, here called order. # This allows multiple encodings of a language to share one frequency # table. return -1 class EUCTWDistributionAnalysis(CharDistributionAnalysis): def __init__(self) -> None: super().__init__() self._char_to_freq_order = EUCTW_CHAR_TO_FREQ_ORDER self._table_size = EUCTW_TABLE_SIZE self.typical_distribution_ratio = EUCTW_TYPICAL_DISTRIBUTION_RATIO def get_order(self, byte_str: Union[bytes, bytearray]) -> int: # type: ignore[reportIncompatibleMethodOverride] # for euc-TW encoding, we are interested # first byte range: 0xc4 -- 0xfe # second byte range: 0xa1 -- 0xfe # no validation needed here. State machine has done that first_char = byte_str[0] if first_char >= 0xC4: return 94 * (first_char - 0xC4) + byte_str[1] - 0xA1 return -1 class EUCKRDistributionAnalysis(CharDistributionAnalysis): def __init__(self) -> None: super().__init__() self._char_to_freq_order = EUCKR_CHAR_TO_FREQ_ORDER self._table_size = EUCKR_TABLE_SIZE self.typical_distribution_ratio = EUCKR_TYPICAL_DISTRIBUTION_RATIO def get_order(self, byte_str: Union[bytes, bytearray]) -> int: # type: ignore[reportIncompatibleMethodOverride] # for euc-KR encoding, we are interested # first byte range: 0xb0 -- 0xfe # second byte range: 0xa1 -- 0xfe # no validation needed here. State machine has done that first_char = byte_str[0] if first_char >= 0xB0: return 94 * (first_char - 0xB0) + byte_str[1] - 0xA1 return -1 class JOHABDistributionAnalysis(CharDistributionAnalysis): def __init__(self) -> None: super().__init__() self._char_to_freq_order = EUCKR_CHAR_TO_FREQ_ORDER self._table_size = EUCKR_TABLE_SIZE self.typical_distribution_ratio = EUCKR_TYPICAL_DISTRIBUTION_RATIO def get_order(self, byte_str: Union[bytes, bytearray]) -> int: # type: ignore[reportIncompatibleMethodOverride] first_char = byte_str[0] if 0x88 <= first_char < 0xD4: code = first_char * 256 + byte_str[1] return JOHAB_TO_EUCKR_ORDER_TABLE.get(code, -1) return -1 class GB2312DistributionAnalysis(CharDistributionAnalysis): def __init__(self) -> None: super().__init__() self._char_to_freq_order = GB2312_CHAR_TO_FREQ_ORDER self._table_size = GB2312_TABLE_SIZE self.typical_distribution_ratio = GB2312_TYPICAL_DISTRIBUTION_RATIO def get_order(self, byte_str: Union[bytes, bytearray]) -> int: # type: ignore[reportIncompatibleMethodOverride] # for GB2312 encoding, we are interested # first byte range: 0xb0 -- 0xfe # second byte range: 0xa1 -- 0xfe # no validation needed here. State machine has done that first_char, second_char = byte_str[0], byte_str[1] if (first_char >= 0xB0) and (second_char >= 0xA1): return 94 * (first_char - 0xB0) + second_char - 0xA1 return -1 class Big5DistributionAnalysis(CharDistributionAnalysis): def __init__(self) -> None: super().__init__() self._char_to_freq_order = BIG5_CHAR_TO_FREQ_ORDER self._table_size = BIG5_TABLE_SIZE self.typical_distribution_ratio = BIG5_TYPICAL_DISTRIBUTION_RATIO def get_order(self, byte_str: Union[bytes, bytearray]) -> int: # type: ignore[reportIncompatibleMethodOverride] # for big5 encoding, we are interested # first byte range: 0xa4 -- 0xfe # second byte range: 0x40 -- 0x7e , 0xa1 -- 0xfe # no validation needed here. State machine has done that first_char, second_char = byte_str[0], byte_str[1] if first_char >= 0xA4: if second_char >= 0xA1: return 157 * (first_char - 0xA4) + second_char - 0xA1 + 63 return 157 * (first_char - 0xA4) + second_char - 0x40 return -1 class SJISDistributionAnalysis(CharDistributionAnalysis): def __init__(self) -> None: super().__init__() self._char_to_freq_order = JIS_CHAR_TO_FREQ_ORDER self._table_size = JIS_TABLE_SIZE self.typical_distribution_ratio = JIS_TYPICAL_DISTRIBUTION_RATIO def get_order(self, byte_str: Union[bytes, bytearray]) -> int: # type: ignore[reportIncompatibleMethodOverride] # for sjis encoding, we are interested # first byte range: 0x81 -- 0x9f , 0xe0 -- 0xfe # second byte range: 0x40 -- 0x7e, 0x81 -- oxfe # no validation needed here. State machine has done that first_char, second_char = byte_str[0], byte_str[1] if 0x81 <= first_char <= 0x9F: order = 188 * (first_char - 0x81) elif 0xE0 <= first_char <= 0xEF: order = 188 * (first_char - 0xE0 + 31) else: return -1 order = order + second_char - 0x40 if second_char > 0x7F: order = -1 return order class EUCJPDistributionAnalysis(CharDistributionAnalysis): def __init__(self) -> None: super().__init__() self._char_to_freq_order = JIS_CHAR_TO_FREQ_ORDER self._table_size = JIS_TABLE_SIZE self.typical_distribution_ratio = JIS_TYPICAL_DISTRIBUTION_RATIO def get_order(self, byte_str: Union[bytes, bytearray]) -> int: # type: ignore[reportIncompatibleMethodOverride] # for euc-JP encoding, we are interested # first byte range: 0xa0 -- 0xfe # second byte range: 0xa1 -- 0xfe # no validation needed here. State machine has done that char = byte_str[0] if char >= 0xA0: return 94 * (char - 0xA1) + byte_str[1] - 0xA1 return -1
10,382
Python
.py
228
38.109649
116
0.642723
chardet/chardet
2,153
257
66
LGPL-2.1
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,110
langhebrewmodel.py
chardet_chardet/chardet/langhebrewmodel.py
from 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="אבגדהוזחטיךכלםמןנסעףפץצקרשתװױײ", )
98,184
Python
.py
4,375
12.9744
63
0.182989
chardet/chardet
2,153
257
66
LGPL-2.1
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,111
euctwprober.py
chardet_chardet/chardet/euctwprober.py
######################## 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 EUCTWDistributionAnalysis from .codingstatemachine import CodingStateMachine from .mbcharsetprober import MultiByteCharSetProber from .mbcssm import EUCTW_SM_MODEL class EUCTWProber(MultiByteCharSetProber): def __init__(self) -> None: super().__init__() self.coding_sm = CodingStateMachine(EUCTW_SM_MODEL) self.distribution_analyzer = EUCTWDistributionAnalysis() self.reset() @property def charset_name(self) -> str: return "EUC-TW" @property def language(self) -> str: return "Taiwan"
1,753
Python
.py
42
39
69
0.719812
chardet/chardet
2,153
257
66
LGPL-2.1
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,112
langbulgarianmodel.py
chardet_chardet/chardet/langbulgarianmodel.py
from 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="АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЬЮЯабвгдежзийклмнопрстуфхцчшщъьюя", )
104,550
Python
.py
4,642
13.187204
76
0.205838
chardet/chardet
2,153
257
66
LGPL-2.1
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,113
macromanprober.py
chardet_chardet/chardet/macromanprober.py
######################## BEGIN LICENSE BLOCK ######################## # This code was modified from latin1prober.py by Rob Speer <rob@lumino.so>. # 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): # Rob Speer - adapt to MacRoman encoding # 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 typing import List, Union 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 ODD = 8 # character that is unlikely to appear CLASS_NUM = 9 # total classes # The change from Latin1 is that we explicitly look for extended characters # that are infrequently-occurring symbols, and consider them to always be # improbable. This should let MacRoman get out of the way of more likely # encodings in most situations. # fmt: off MacRoman_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 ACV, ACV, ACO, ACV, ACO, ACV, ACV, ASV, # 80 - 87 ASV, ASV, ASV, ASV, ASV, ASO, ASV, ASV, # 88 - 8F ASV, ASV, ASV, ASV, ASV, ASV, ASO, ASV, # 90 - 97 ASV, ASV, ASV, ASV, ASV, ASV, ASV, ASV, # 98 - 9F OTH, OTH, OTH, OTH, OTH, OTH, OTH, ASO, # A0 - A7 OTH, OTH, ODD, ODD, OTH, OTH, ACV, ACV, # A8 - AF OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # B0 - B7 OTH, OTH, OTH, OTH, OTH, OTH, ASV, ASV, # B8 - BF OTH, OTH, ODD, OTH, ODD, OTH, OTH, OTH, # C0 - C7 OTH, OTH, OTH, ACV, ACV, ACV, ACV, ASV, # C8 - CF OTH, OTH, OTH, OTH, OTH, OTH, OTH, ODD, # D0 - D7 ASV, ACV, ODD, OTH, OTH, OTH, OTH, OTH, # D8 - DF OTH, OTH, OTH, OTH, OTH, ACV, ACV, ACV, # E0 - E7 ACV, ACV, ACV, ACV, ACV, ACV, ACV, ACV, # E8 - EF ODD, ACV, ACV, ACV, ACV, ASV, ODD, ODD, # F0 - F7 ODD, ODD, ODD, ODD, ODD, ODD, ODD, ODD, # F8 - FF ) # 0 : illegal # 1 : very unlikely # 2 : normal # 3 : very likely MacRomanClassModel = ( # UDF OTH ASC ASS ACV ACO ASV ASO ODD 0, 0, 0, 0, 0, 0, 0, 0, 0, # UDF 0, 3, 3, 3, 3, 3, 3, 3, 1, # OTH 0, 3, 3, 3, 3, 3, 3, 3, 1, # ASC 0, 3, 3, 3, 1, 1, 3, 3, 1, # ASS 0, 3, 3, 3, 1, 2, 1, 2, 1, # ACV 0, 3, 3, 3, 3, 3, 3, 3, 1, # ACO 0, 3, 1, 3, 1, 1, 1, 3, 1, # ASV 0, 3, 1, 3, 1, 1, 3, 3, 1, # ASO 0, 1, 1, 1, 1, 1, 1, 1, 1, # ODD ) # fmt: on class MacRomanProber(CharSetProber): def __init__(self) -> None: super().__init__() self._last_char_class = OTH self._freq_counter: List[int] = [] self.reset() def reset(self) -> None: self._last_char_class = OTH self._freq_counter = [0] * FREQ_CAT_NUM # express the prior that MacRoman is a somewhat rare encoding; # this can be done by starting out in a slightly improbable state # that must be overcome self._freq_counter[2] = 10 super().reset() @property def charset_name(self) -> str: return "MacRoman" @property def language(self) -> str: return "" def feed(self, byte_str: Union[bytes, bytearray]) -> ProbingState: byte_str = self.remove_xml_tags(byte_str) for c in byte_str: char_class = MacRoman_CharToClass[c] freq = MacRomanClassModel[(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) -> float: 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 MacRoman so that other more accurate # detector can take priority. confidence *= 0.73 return confidence
6,077
Python
.py
144
37.354167
87
0.595266
chardet/chardet
2,153
257
66
LGPL-2.1
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,114
codingstatemachine.py
chardet_chardet/chardet/codingstatemachine.py
######################## 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 ######################### import logging from .codingstatemachinedict import CodingStateMachineDict from .enums import MachineState class CodingStateMachine: """ A state machine to verify a byte sequence for a particular encoding. For each byte the detector receives, it will feed that byte to every active state machine available, one byte at a time. The state machine changes its state based on its previous state and the byte it receives. There are 3 states in a state machine that are of interest to an auto-detector: START state: This is the state to start with, or a legal byte sequence (i.e. a valid code point) for character has been identified. ME state: This indicates that the state machine identified a byte sequence that is specific to the charset it is designed for and that there is no other possible encoding which can contain this byte sequence. This will to lead to an immediate positive answer for the detector. ERROR state: This indicates the state machine identified an illegal byte sequence for that encoding. This will lead to an immediate negative answer for this encoding. Detector will exclude this encoding from consideration from here on. """ def __init__(self, sm: CodingStateMachineDict) -> None: self._model = sm self._curr_byte_pos = 0 self._curr_char_len = 0 self._curr_state = MachineState.START self.active = True self.logger = logging.getLogger(__name__) self.reset() def reset(self) -> None: self._curr_state = MachineState.START def next_state(self, c: int) -> int: # for each byte we get its class # if it is first byte, we also get byte length byte_class = self._model["class_table"][c] if self._curr_state == MachineState.START: self._curr_byte_pos = 0 self._curr_char_len = self._model["char_len_table"][byte_class] # from byte's class and state_table, we get its next state curr_state = self._curr_state * self._model["class_factor"] + byte_class self._curr_state = self._model["state_table"][curr_state] self._curr_byte_pos += 1 return self._curr_state def get_current_charlen(self) -> int: return self._curr_char_len def get_coding_state_machine(self) -> str: return self._model["name"] @property def language(self) -> str: return self._model["language"]
3,732
Python
.py
77
42.363636
80
0.679846
chardet/chardet
2,153
257
66
LGPL-2.1
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,115
langrussianmodel.py
chardet_chardet/chardet/langrussianmodel.py
from 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="ЁАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюяё", )
128,023
Python
.py
5,710
13.730123
82
0.231723
chardet/chardet
2,153
257
66
LGPL-2.1
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,116
big5freq.py
chardet_chardet/chardet/big5freq.py
######################## 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 ######################### # Big5 frequency table # by Taiwan's Mandarin Promotion Council # <http://www.edu.tw:81/mandr/> # # 128 --> 0.42261 # 256 --> 0.57851 # 512 --> 0.74851 # 1024 --> 0.89384 # 2048 --> 0.97583 # # Ideal Distribution Ratio = 0.74851/(1-0.74851) =2.98 # Random Distribution Ration = 512/(5401-512)=0.105 # # Typical Distribution Ratio about 25% of Ideal one, still much higher than RDR BIG5_TYPICAL_DISTRIBUTION_RATIO = 0.75 # Char to FreqOrder table BIG5_TABLE_SIZE = 5376 # fmt: off BIG5_CHAR_TO_FREQ_ORDER = ( 1,1801,1506, 255,1431, 198, 9, 82, 6,5008, 177, 202,3681,1256,2821, 110, # 16 3814, 33,3274, 261, 76, 44,2114, 16,2946,2187,1176, 659,3971, 26,3451,2653, # 32 1198,3972,3350,4202, 410,2215, 302, 590, 361,1964, 8, 204, 58,4510,5009,1932, # 48 63,5010,5011, 317,1614, 75, 222, 159,4203,2417,1480,5012,3555,3091, 224,2822, # 64 3682, 3, 10,3973,1471, 29,2787,1135,2866,1940, 873, 130,3275,1123, 312,5013, # 80 4511,2052, 507, 252, 682,5014, 142,1915, 124, 206,2947, 34,3556,3204, 64, 604, # 96 5015,2501,1977,1978, 155,1991, 645, 641,1606,5016,3452, 337, 72, 406,5017, 80, # 112 630, 238,3205,1509, 263, 939,1092,2654, 756,1440,1094,3453, 449, 69,2987, 591, # 128 179,2096, 471, 115,2035,1844, 60, 50,2988, 134, 806,1869, 734,2036,3454, 180, # 144 995,1607, 156, 537,2907, 688,5018, 319,1305, 779,2145, 514,2379, 298,4512, 359, # 160 2502, 90,2716,1338, 663, 11, 906,1099,2553, 20,2441, 182, 532,1716,5019, 732, # 176 1376,4204,1311,1420,3206, 25,2317,1056, 113, 399, 382,1950, 242,3455,2474, 529, # 192 3276, 475,1447,3683,5020, 117, 21, 656, 810,1297,2300,2334,3557,5021, 126,4205, # 208 706, 456, 150, 613,4513, 71,1118,2037,4206, 145,3092, 85, 835, 486,2115,1246, # 224 1426, 428, 727,1285,1015, 800, 106, 623, 303,1281,5022,2128,2359, 347,3815, 221, # 240 3558,3135,5023,1956,1153,4207, 83, 296,1199,3093, 192, 624, 93,5024, 822,1898, # 256 2823,3136, 795,2065, 991,1554,1542,1592, 27, 43,2867, 859, 139,1456, 860,4514, # 272 437, 712,3974, 164,2397,3137, 695, 211,3037,2097, 195,3975,1608,3559,3560,3684, # 288 3976, 234, 811,2989,2098,3977,2233,1441,3561,1615,2380, 668,2077,1638, 305, 228, # 304 1664,4515, 467, 415,5025, 262,2099,1593, 239, 108, 300, 200,1033, 512,1247,2078, # 320 5026,5027,2176,3207,3685,2682, 593, 845,1062,3277, 88,1723,2038,3978,1951, 212, # 336 266, 152, 149, 468,1899,4208,4516, 77, 187,5028,3038, 37, 5,2990,5029,3979, # 352 5030,5031, 39,2524,4517,2908,3208,2079, 55, 148, 74,4518, 545, 483,1474,1029, # 368 1665, 217,1870,1531,3138,1104,2655,4209, 24, 172,3562, 900,3980,3563,3564,4519, # 384 32,1408,2824,1312, 329, 487,2360,2251,2717, 784,2683, 4,3039,3351,1427,1789, # 400 188, 109, 499,5032,3686,1717,1790, 888,1217,3040,4520,5033,3565,5034,3352,1520, # 416 3687,3981, 196,1034, 775,5035,5036, 929,1816, 249, 439, 38,5037,1063,5038, 794, # 432 3982,1435,2301, 46, 178,3278,2066,5039,2381,5040, 214,1709,4521, 804, 35, 707, # 448 324,3688,1601,2554, 140, 459,4210,5041,5042,1365, 839, 272, 978,2262,2580,3456, # 464 2129,1363,3689,1423, 697, 100,3094, 48, 70,1231, 495,3139,2196,5043,1294,5044, # 480 2080, 462, 586,1042,3279, 853, 256, 988, 185,2382,3457,1698, 434,1084,5045,3458, # 496 314,2625,2788,4522,2335,2336, 569,2285, 637,1817,2525, 757,1162,1879,1616,3459, # 512 287,1577,2116, 768,4523,1671,2868,3566,2526,1321,3816, 909,2418,5046,4211, 933, # 528 3817,4212,2053,2361,1222,4524, 765,2419,1322, 786,4525,5047,1920,1462,1677,2909, # 544 1699,5048,4526,1424,2442,3140,3690,2600,3353,1775,1941,3460,3983,4213, 309,1369, # 560 1130,2825, 364,2234,1653,1299,3984,3567,3985,3986,2656, 525,1085,3041, 902,2001, # 576 1475, 964,4527, 421,1845,1415,1057,2286, 940,1364,3141, 376,4528,4529,1381, 7, # 592 2527, 983,2383, 336,1710,2684,1846, 321,3461, 559,1131,3042,2752,1809,1132,1313, # 608 265,1481,1858,5049, 352,1203,2826,3280, 167,1089, 420,2827, 776, 792,1724,3568, # 624 4214,2443,3281,5050,4215,5051, 446, 229, 333,2753, 901,3818,1200,1557,4530,2657, # 640 1921, 395,2754,2685,3819,4216,1836, 125, 916,3209,2626,4531,5052,5053,3820,5054, # 656 5055,5056,4532,3142,3691,1133,2555,1757,3462,1510,2318,1409,3569,5057,2146, 438, # 672 2601,2910,2384,3354,1068, 958,3043, 461, 311,2869,2686,4217,1916,3210,4218,1979, # 688 383, 750,2755,2627,4219, 274, 539, 385,1278,1442,5058,1154,1965, 384, 561, 210, # 704 98,1295,2556,3570,5059,1711,2420,1482,3463,3987,2911,1257, 129,5060,3821, 642, # 720 523,2789,2790,2658,5061, 141,2235,1333, 68, 176, 441, 876, 907,4220, 603,2602, # 736 710, 171,3464, 404, 549, 18,3143,2398,1410,3692,1666,5062,3571,4533,2912,4534, # 752 5063,2991, 368,5064, 146, 366, 99, 871,3693,1543, 748, 807,1586,1185, 22,2263, # 768 379,3822,3211,5065,3212, 505,1942,2628,1992,1382,2319,5066, 380,2362, 218, 702, # 784 1818,1248,3465,3044,3572,3355,3282,5067,2992,3694, 930,3283,3823,5068, 59,5069, # 800 585, 601,4221, 497,3466,1112,1314,4535,1802,5070,1223,1472,2177,5071, 749,1837, # 816 690,1900,3824,1773,3988,1476, 429,1043,1791,2236,2117, 917,4222, 447,1086,1629, # 832 5072, 556,5073,5074,2021,1654, 844,1090, 105, 550, 966,1758,2828,1008,1783, 686, # 848 1095,5075,2287, 793,1602,5076,3573,2603,4536,4223,2948,2302,4537,3825, 980,2503, # 864 544, 353, 527,4538, 908,2687,2913,5077, 381,2629,1943,1348,5078,1341,1252, 560, # 880 3095,5079,3467,2870,5080,2054, 973, 886,2081, 143,4539,5081,5082, 157,3989, 496, # 896 4224, 57, 840, 540,2039,4540,4541,3468,2118,1445, 970,2264,1748,1966,2082,4225, # 912 3144,1234,1776,3284,2829,3695, 773,1206,2130,1066,2040,1326,3990,1738,1725,4226, # 928 279,3145, 51,1544,2604, 423,1578,2131,2067, 173,4542,1880,5083,5084,1583, 264, # 944 610,3696,4543,2444, 280, 154,5085,5086,5087,1739, 338,1282,3096, 693,2871,1411, # 960 1074,3826,2445,5088,4544,5089,5090,1240, 952,2399,5091,2914,1538,2688, 685,1483, # 976 4227,2475,1436, 953,4228,2055,4545, 671,2400, 79,4229,2446,3285, 608, 567,2689, # 992 3469,4230,4231,1691, 393,1261,1792,2401,5092,4546,5093,5094,5095,5096,1383,1672, # 1008 3827,3213,1464, 522,1119, 661,1150, 216, 675,4547,3991,1432,3574, 609,4548,2690, # 1024 2402,5097,5098,5099,4232,3045, 0,5100,2476, 315, 231,2447, 301,3356,4549,2385, # 1040 5101, 233,4233,3697,1819,4550,4551,5102, 96,1777,1315,2083,5103, 257,5104,1810, # 1056 3698,2718,1139,1820,4234,2022,1124,2164,2791,1778,2659,5105,3097, 363,1655,3214, # 1072 5106,2993,5107,5108,5109,3992,1567,3993, 718, 103,3215, 849,1443, 341,3357,2949, # 1088 1484,5110,1712, 127, 67, 339,4235,2403, 679,1412, 821,5111,5112, 834, 738, 351, # 1104 2994,2147, 846, 235,1497,1881, 418,1993,3828,2719, 186,1100,2148,2756,3575,1545, # 1120 1355,2950,2872,1377, 583,3994,4236,2581,2995,5113,1298,3699,1078,2557,3700,2363, # 1136 78,3829,3830, 267,1289,2100,2002,1594,4237, 348, 369,1274,2197,2178,1838,4552, # 1152 1821,2830,3701,2757,2288,2003,4553,2951,2758, 144,3358, 882,4554,3995,2759,3470, # 1168 4555,2915,5114,4238,1726, 320,5115,3996,3046, 788,2996,5116,2831,1774,1327,2873, # 1184 3997,2832,5117,1306,4556,2004,1700,3831,3576,2364,2660, 787,2023, 506, 824,3702, # 1200 534, 323,4557,1044,3359,2024,1901, 946,3471,5118,1779,1500,1678,5119,1882,4558, # 1216 165, 243,4559,3703,2528, 123, 683,4239, 764,4560, 36,3998,1793, 589,2916, 816, # 1232 626,1667,3047,2237,1639,1555,1622,3832,3999,5120,4000,2874,1370,1228,1933, 891, # 1248 2084,2917, 304,4240,5121, 292,2997,2720,3577, 691,2101,4241,1115,4561, 118, 662, # 1264 5122, 611,1156, 854,2386,1316,2875, 2, 386, 515,2918,5123,5124,3286, 868,2238, # 1280 1486, 855,2661, 785,2216,3048,5125,1040,3216,3578,5126,3146, 448,5127,1525,5128, # 1296 2165,4562,5129,3833,5130,4242,2833,3579,3147, 503, 818,4001,3148,1568, 814, 676, # 1312 1444, 306,1749,5131,3834,1416,1030, 197,1428, 805,2834,1501,4563,5132,5133,5134, # 1328 1994,5135,4564,5136,5137,2198, 13,2792,3704,2998,3149,1229,1917,5138,3835,2132, # 1344 5139,4243,4565,2404,3580,5140,2217,1511,1727,1120,5141,5142, 646,3836,2448, 307, # 1360 5143,5144,1595,3217,5145,5146,5147,3705,1113,1356,4002,1465,2529,2530,5148, 519, # 1376 5149, 128,2133, 92,2289,1980,5150,4003,1512, 342,3150,2199,5151,2793,2218,1981, # 1392 3360,4244, 290,1656,1317, 789, 827,2365,5152,3837,4566, 562, 581,4004,5153, 401, # 1408 4567,2252, 94,4568,5154,1399,2794,5155,1463,2025,4569,3218,1944,5156, 828,1105, # 1424 4245,1262,1394,5157,4246, 605,4570,5158,1784,2876,5159,2835, 819,2102, 578,2200, # 1440 2952,5160,1502, 436,3287,4247,3288,2836,4005,2919,3472,3473,5161,2721,2320,5162, # 1456 5163,2337,2068, 23,4571, 193, 826,3838,2103, 699,1630,4248,3098, 390,1794,1064, # 1472 3581,5164,1579,3099,3100,1400,5165,4249,1839,1640,2877,5166,4572,4573, 137,4250, # 1488 598,3101,1967, 780, 104, 974,2953,5167, 278, 899, 253, 402, 572, 504, 493,1339, # 1504 5168,4006,1275,4574,2582,2558,5169,3706,3049,3102,2253, 565,1334,2722, 863, 41, # 1520 5170,5171,4575,5172,1657,2338, 19, 463,2760,4251, 606,5173,2999,3289,1087,2085, # 1536 1323,2662,3000,5174,1631,1623,1750,4252,2691,5175,2878, 791,2723,2663,2339, 232, # 1552 2421,5176,3001,1498,5177,2664,2630, 755,1366,3707,3290,3151,2026,1609, 119,1918, # 1568 3474, 862,1026,4253,5178,4007,3839,4576,4008,4577,2265,1952,2477,5179,1125, 817, # 1584 4254,4255,4009,1513,1766,2041,1487,4256,3050,3291,2837,3840,3152,5180,5181,1507, # 1600 5182,2692, 733, 40,1632,1106,2879, 345,4257, 841,2531, 230,4578,3002,1847,3292, # 1616 3475,5183,1263, 986,3476,5184, 735, 879, 254,1137, 857, 622,1300,1180,1388,1562, # 1632 4010,4011,2954, 967,2761,2665,1349, 592,2134,1692,3361,3003,1995,4258,1679,4012, # 1648 1902,2188,5185, 739,3708,2724,1296,1290,5186,4259,2201,2202,1922,1563,2605,2559, # 1664 1871,2762,3004,5187, 435,5188, 343,1108, 596, 17,1751,4579,2239,3477,3709,5189, # 1680 4580, 294,3582,2955,1693, 477, 979, 281,2042,3583, 643,2043,3710,2631,2795,2266, # 1696 1031,2340,2135,2303,3584,4581, 367,1249,2560,5190,3585,5191,4582,1283,3362,2005, # 1712 240,1762,3363,4583,4584, 836,1069,3153, 474,5192,2149,2532, 268,3586,5193,3219, # 1728 1521,1284,5194,1658,1546,4260,5195,3587,3588,5196,4261,3364,2693,1685,4262, 961, # 1744 1673,2632, 190,2006,2203,3841,4585,4586,5197, 570,2504,3711,1490,5198,4587,2633, # 1760 3293,1957,4588, 584,1514, 396,1045,1945,5199,4589,1968,2449,5200,5201,4590,4013, # 1776 619,5202,3154,3294, 215,2007,2796,2561,3220,4591,3221,4592, 763,4263,3842,4593, # 1792 5203,5204,1958,1767,2956,3365,3712,1174, 452,1477,4594,3366,3155,5205,2838,1253, # 1808 2387,2189,1091,2290,4264, 492,5206, 638,1169,1825,2136,1752,4014, 648, 926,1021, # 1824 1324,4595, 520,4596, 997, 847,1007, 892,4597,3843,2267,1872,3713,2405,1785,4598, # 1840 1953,2957,3103,3222,1728,4265,2044,3714,4599,2008,1701,3156,1551, 30,2268,4266, # 1856 5207,2027,4600,3589,5208, 501,5209,4267, 594,3478,2166,1822,3590,3479,3591,3223, # 1872 829,2839,4268,5210,1680,3157,1225,4269,5211,3295,4601,4270,3158,2341,5212,4602, # 1888 4271,5213,4015,4016,5214,1848,2388,2606,3367,5215,4603, 374,4017, 652,4272,4273, # 1904 375,1140, 798,5216,5217,5218,2366,4604,2269, 546,1659, 138,3051,2450,4605,5219, # 1920 2254, 612,1849, 910, 796,3844,1740,1371, 825,3845,3846,5220,2920,2562,5221, 692, # 1936 444,3052,2634, 801,4606,4274,5222,1491, 244,1053,3053,4275,4276, 340,5223,4018, # 1952 1041,3005, 293,1168, 87,1357,5224,1539, 959,5225,2240, 721, 694,4277,3847, 219, # 1968 1478, 644,1417,3368,2666,1413,1401,1335,1389,4019,5226,5227,3006,2367,3159,1826, # 1984 730,1515, 184,2840, 66,4607,5228,1660,2958, 246,3369, 378,1457, 226,3480, 975, # 2000 4020,2959,1264,3592, 674, 696,5229, 163,5230,1141,2422,2167, 713,3593,3370,4608, # 2016 4021,5231,5232,1186, 15,5233,1079,1070,5234,1522,3224,3594, 276,1050,2725, 758, # 2032 1126, 653,2960,3296,5235,2342, 889,3595,4022,3104,3007, 903,1250,4609,4023,3481, # 2048 3596,1342,1681,1718, 766,3297, 286, 89,2961,3715,5236,1713,5237,2607,3371,3008, # 2064 5238,2962,2219,3225,2880,5239,4610,2505,2533, 181, 387,1075,4024, 731,2190,3372, # 2080 5240,3298, 310, 313,3482,2304, 770,4278, 54,3054, 189,4611,3105,3848,4025,5241, # 2096 1230,1617,1850, 355,3597,4279,4612,3373, 111,4280,3716,1350,3160,3483,3055,4281, # 2112 2150,3299,3598,5242,2797,4026,4027,3009, 722,2009,5243,1071, 247,1207,2343,2478, # 2128 1378,4613,2010, 864,1437,1214,4614, 373,3849,1142,2220, 667,4615, 442,2763,2563, # 2144 3850,4028,1969,4282,3300,1840, 837, 170,1107, 934,1336,1883,5244,5245,2119,4283, # 2160 2841, 743,1569,5246,4616,4284, 582,2389,1418,3484,5247,1803,5248, 357,1395,1729, # 2176 3717,3301,2423,1564,2241,5249,3106,3851,1633,4617,1114,2086,4285,1532,5250, 482, # 2192 2451,4618,5251,5252,1492, 833,1466,5253,2726,3599,1641,2842,5254,1526,1272,3718, # 2208 4286,1686,1795, 416,2564,1903,1954,1804,5255,3852,2798,3853,1159,2321,5256,2881, # 2224 4619,1610,1584,3056,2424,2764, 443,3302,1163,3161,5257,5258,4029,5259,4287,2506, # 2240 3057,4620,4030,3162,2104,1647,3600,2011,1873,4288,5260,4289, 431,3485,5261, 250, # 2256 97, 81,4290,5262,1648,1851,1558, 160, 848,5263, 866, 740,1694,5264,2204,2843, # 2272 3226,4291,4621,3719,1687, 950,2479, 426, 469,3227,3720,3721,4031,5265,5266,1188, # 2288 424,1996, 861,3601,4292,3854,2205,2694, 168,1235,3602,4293,5267,2087,1674,4622, # 2304 3374,3303, 220,2565,1009,5268,3855, 670,3010, 332,1208, 717,5269,5270,3603,2452, # 2320 4032,3375,5271, 513,5272,1209,2882,3376,3163,4623,1080,5273,5274,5275,5276,2534, # 2336 3722,3604, 815,1587,4033,4034,5277,3605,3486,3856,1254,4624,1328,3058,1390,4035, # 2352 1741,4036,3857,4037,5278, 236,3858,2453,3304,5279,5280,3723,3859,1273,3860,4625, # 2368 5281, 308,5282,4626, 245,4627,1852,2480,1307,2583, 430, 715,2137,2454,5283, 270, # 2384 199,2883,4038,5284,3606,2727,1753, 761,1754, 725,1661,1841,4628,3487,3724,5285, # 2400 5286, 587, 14,3305, 227,2608, 326, 480,2270, 943,2765,3607, 291, 650,1884,5287, # 2416 1702,1226, 102,1547, 62,3488, 904,4629,3489,1164,4294,5288,5289,1224,1548,2766, # 2432 391, 498,1493,5290,1386,1419,5291,2056,1177,4630, 813, 880,1081,2368, 566,1145, # 2448 4631,2291,1001,1035,2566,2609,2242, 394,1286,5292,5293,2069,5294, 86,1494,1730, # 2464 4039, 491,1588, 745, 897,2963, 843,3377,4040,2767,2884,3306,1768, 998,2221,2070, # 2480 397,1827,1195,1970,3725,3011,3378, 284,5295,3861,2507,2138,2120,1904,5296,4041, # 2496 2151,4042,4295,1036,3490,1905, 114,2567,4296, 209,1527,5297,5298,2964,2844,2635, # 2512 2390,2728,3164, 812,2568,5299,3307,5300,1559, 737,1885,3726,1210, 885, 28,2695, # 2528 3608,3862,5301,4297,1004,1780,4632,5302, 346,1982,2222,2696,4633,3863,1742, 797, # 2544 1642,4043,1934,1072,1384,2152, 896,4044,3308,3727,3228,2885,3609,5303,2569,1959, # 2560 4634,2455,1786,5304,5305,5306,4045,4298,1005,1308,3728,4299,2729,4635,4636,1528, # 2576 2610, 161,1178,4300,1983, 987,4637,1101,4301, 631,4046,1157,3229,2425,1343,1241, # 2592 1016,2243,2570, 372, 877,2344,2508,1160, 555,1935, 911,4047,5307, 466,1170, 169, # 2608 1051,2921,2697,3729,2481,3012,1182,2012,2571,1251,2636,5308, 992,2345,3491,1540, # 2624 2730,1201,2071,2406,1997,2482,5309,4638, 528,1923,2191,1503,1874,1570,2369,3379, # 2640 3309,5310, 557,1073,5311,1828,3492,2088,2271,3165,3059,3107, 767,3108,2799,4639, # 2656 1006,4302,4640,2346,1267,2179,3730,3230, 778,4048,3231,2731,1597,2667,5312,4641, # 2672 5313,3493,5314,5315,5316,3310,2698,1433,3311, 131, 95,1504,4049, 723,4303,3166, # 2688 1842,3610,2768,2192,4050,2028,2105,3731,5317,3013,4051,1218,5318,3380,3232,4052, # 2704 4304,2584, 248,1634,3864, 912,5319,2845,3732,3060,3865, 654, 53,5320,3014,5321, # 2720 1688,4642, 777,3494,1032,4053,1425,5322, 191, 820,2121,2846, 971,4643, 931,3233, # 2736 135, 664, 783,3866,1998, 772,2922,1936,4054,3867,4644,2923,3234, 282,2732, 640, # 2752 1372,3495,1127, 922, 325,3381,5323,5324, 711,2045,5325,5326,4055,2223,2800,1937, # 2768 4056,3382,2224,2255,3868,2305,5327,4645,3869,1258,3312,4057,3235,2139,2965,4058, # 2784 4059,5328,2225, 258,3236,4646, 101,1227,5329,3313,1755,5330,1391,3314,5331,2924, # 2800 2057, 893,5332,5333,5334,1402,4305,2347,5335,5336,3237,3611,5337,5338, 878,1325, # 2816 1781,2801,4647, 259,1385,2585, 744,1183,2272,4648,5339,4060,2509,5340, 684,1024, # 2832 4306,5341, 472,3612,3496,1165,3315,4061,4062, 322,2153, 881, 455,1695,1152,1340, # 2848 660, 554,2154,4649,1058,4650,4307, 830,1065,3383,4063,4651,1924,5342,1703,1919, # 2864 5343, 932,2273, 122,5344,4652, 947, 677,5345,3870,2637, 297,1906,1925,2274,4653, # 2880 2322,3316,5346,5347,4308,5348,4309, 84,4310, 112, 989,5349, 547,1059,4064, 701, # 2896 3613,1019,5350,4311,5351,3497, 942, 639, 457,2306,2456, 993,2966, 407, 851, 494, # 2912 4654,3384, 927,5352,1237,5353,2426,3385, 573,4312, 680, 921,2925,1279,1875, 285, # 2928 790,1448,1984, 719,2168,5354,5355,4655,4065,4066,1649,5356,1541, 563,5357,1077, # 2944 5358,3386,3061,3498, 511,3015,4067,4068,3733,4069,1268,2572,3387,3238,4656,4657, # 2960 5359, 535,1048,1276,1189,2926,2029,3167,1438,1373,2847,2967,1134,2013,5360,4313, # 2976 1238,2586,3109,1259,5361, 700,5362,2968,3168,3734,4314,5363,4315,1146,1876,1907, # 2992 4658,2611,4070, 781,2427, 132,1589, 203, 147, 273,2802,2407, 898,1787,2155,4071, # 3008 4072,5364,3871,2803,5365,5366,4659,4660,5367,3239,5368,1635,3872, 965,5369,1805, # 3024 2699,1516,3614,1121,1082,1329,3317,4073,1449,3873, 65,1128,2848,2927,2769,1590, # 3040 3874,5370,5371, 12,2668, 45, 976,2587,3169,4661, 517,2535,1013,1037,3240,5372, # 3056 3875,2849,5373,3876,5374,3499,5375,2612, 614,1999,2323,3877,3110,2733,2638,5376, # 3072 2588,4316, 599,1269,5377,1811,3735,5378,2700,3111, 759,1060, 489,1806,3388,3318, # 3088 1358,5379,5380,2391,1387,1215,2639,2256, 490,5381,5382,4317,1759,2392,2348,5383, # 3104 4662,3878,1908,4074,2640,1807,3241,4663,3500,3319,2770,2349, 874,5384,5385,3501, # 3120 3736,1859, 91,2928,3737,3062,3879,4664,5386,3170,4075,2669,5387,3502,1202,1403, # 3136 3880,2969,2536,1517,2510,4665,3503,2511,5388,4666,5389,2701,1886,1495,1731,4076, # 3152 2370,4667,5390,2030,5391,5392,4077,2702,1216, 237,2589,4318,2324,4078,3881,4668, # 3168 4669,2703,3615,3504, 445,4670,5393,5394,5395,5396,2771, 61,4079,3738,1823,4080, # 3184 5397, 687,2046, 935, 925, 405,2670, 703,1096,1860,2734,4671,4081,1877,1367,2704, # 3200 3389, 918,2106,1782,2483, 334,3320,1611,1093,4672, 564,3171,3505,3739,3390, 945, # 3216 2641,2058,4673,5398,1926, 872,4319,5399,3506,2705,3112, 349,4320,3740,4082,4674, # 3232 3882,4321,3741,2156,4083,4675,4676,4322,4677,2408,2047, 782,4084, 400, 251,4323, # 3248 1624,5400,5401, 277,3742, 299,1265, 476,1191,3883,2122,4324,4325,1109, 205,5402, # 3264 2590,1000,2157,3616,1861,5403,5404,5405,4678,5406,4679,2573, 107,2484,2158,4085, # 3280 3507,3172,5407,1533, 541,1301, 158, 753,4326,2886,3617,5408,1696, 370,1088,4327, # 3296 4680,3618, 579, 327, 440, 162,2244, 269,1938,1374,3508, 968,3063, 56,1396,3113, # 3312 2107,3321,3391,5409,1927,2159,4681,3016,5410,3619,5411,5412,3743,4682,2485,5413, # 3328 2804,5414,1650,4683,5415,2613,5416,5417,4086,2671,3392,1149,3393,4087,3884,4088, # 3344 5418,1076, 49,5419, 951,3242,3322,3323, 450,2850, 920,5420,1812,2805,2371,4328, # 3360 1909,1138,2372,3885,3509,5421,3243,4684,1910,1147,1518,2428,4685,3886,5422,4686, # 3376 2393,2614, 260,1796,3244,5423,5424,3887,3324, 708,5425,3620,1704,5426,3621,1351, # 3392 1618,3394,3017,1887, 944,4329,3395,4330,3064,3396,4331,5427,3744, 422, 413,1714, # 3408 3325, 500,2059,2350,4332,2486,5428,1344,1911, 954,5429,1668,5430,5431,4089,2409, # 3424 4333,3622,3888,4334,5432,2307,1318,2512,3114, 133,3115,2887,4687, 629, 31,2851, # 3440 2706,3889,4688, 850, 949,4689,4090,2970,1732,2089,4335,1496,1853,5433,4091, 620, # 3456 3245, 981,1242,3745,3397,1619,3746,1643,3326,2140,2457,1971,1719,3510,2169,5434, # 3472 3246,5435,5436,3398,1829,5437,1277,4690,1565,2048,5438,1636,3623,3116,5439, 869, # 3488 2852, 655,3890,3891,3117,4092,3018,3892,1310,3624,4691,5440,5441,5442,1733, 558, # 3504 4692,3747, 335,1549,3065,1756,4336,3748,1946,3511,1830,1291,1192, 470,2735,2108, # 3520 2806, 913,1054,4093,5443,1027,5444,3066,4094,4693, 982,2672,3399,3173,3512,3247, # 3536 3248,1947,2807,5445, 571,4694,5446,1831,5447,3625,2591,1523,2429,5448,2090, 984, # 3552 4695,3749,1960,5449,3750, 852, 923,2808,3513,3751, 969,1519, 999,2049,2325,1705, # 3568 5450,3118, 615,1662, 151, 597,4095,2410,2326,1049, 275,4696,3752,4337, 568,3753, # 3584 3626,2487,4338,3754,5451,2430,2275, 409,3249,5452,1566,2888,3514,1002, 769,2853, # 3600 194,2091,3174,3755,2226,3327,4339, 628,1505,5453,5454,1763,2180,3019,4096, 521, # 3616 1161,2592,1788,2206,2411,4697,4097,1625,4340,4341, 412, 42,3119, 464,5455,2642, # 3632 4698,3400,1760,1571,2889,3515,2537,1219,2207,3893,2643,2141,2373,4699,4700,3328, # 3648 1651,3401,3627,5456,5457,3628,2488,3516,5458,3756,5459,5460,2276,2092, 460,5461, # 3664 4701,5462,3020, 962, 588,3629, 289,3250,2644,1116, 52,5463,3067,1797,5464,5465, # 3680 5466,1467,5467,1598,1143,3757,4342,1985,1734,1067,4702,1280,3402, 465,4703,1572, # 3696 510,5468,1928,2245,1813,1644,3630,5469,4704,3758,5470,5471,2673,1573,1534,5472, # 3712 5473, 536,1808,1761,3517,3894,3175,2645,5474,5475,5476,4705,3518,2929,1912,2809, # 3728 5477,3329,1122, 377,3251,5478, 360,5479,5480,4343,1529, 551,5481,2060,3759,1769, # 3744 2431,5482,2930,4344,3330,3120,2327,2109,2031,4706,1404, 136,1468,1479, 672,1171, # 3760 3252,2308, 271,3176,5483,2772,5484,2050, 678,2736, 865,1948,4707,5485,2014,4098, # 3776 2971,5486,2737,2227,1397,3068,3760,4708,4709,1735,2931,3403,3631,5487,3895, 509, # 3792 2854,2458,2890,3896,5488,5489,3177,3178,4710,4345,2538,4711,2309,1166,1010, 552, # 3808 681,1888,5490,5491,2972,2973,4099,1287,1596,1862,3179, 358, 453, 736, 175, 478, # 3824 1117, 905,1167,1097,5492,1854,1530,5493,1706,5494,2181,3519,2292,3761,3520,3632, # 3840 4346,2093,4347,5495,3404,1193,2489,4348,1458,2193,2208,1863,1889,1421,3331,2932, # 3856 3069,2182,3521, 595,2123,5496,4100,5497,5498,4349,1707,2646, 223,3762,1359, 751, # 3872 3121, 183,3522,5499,2810,3021, 419,2374, 633, 704,3897,2394, 241,5500,5501,5502, # 3888 838,3022,3763,2277,2773,2459,3898,1939,2051,4101,1309,3122,2246,1181,5503,1136, # 3904 2209,3899,2375,1446,4350,2310,4712,5504,5505,4351,1055,2615, 484,3764,5506,4102, # 3920 625,4352,2278,3405,1499,4353,4103,5507,4104,4354,3253,2279,2280,3523,5508,5509, # 3936 2774, 808,2616,3765,3406,4105,4355,3123,2539, 526,3407,3900,4356, 955,5510,1620, # 3952 4357,2647,2432,5511,1429,3766,1669,1832, 994, 928,5512,3633,1260,5513,5514,5515, # 3968 1949,2293, 741,2933,1626,4358,2738,2460, 867,1184, 362,3408,1392,5516,5517,4106, # 3984 4359,1770,1736,3254,2934,4713,4714,1929,2707,1459,1158,5518,3070,3409,2891,1292, # 4000 1930,2513,2855,3767,1986,1187,2072,2015,2617,4360,5519,2574,2514,2170,3768,2490, # 4016 3332,5520,3769,4715,5521,5522, 666,1003,3023,1022,3634,4361,5523,4716,1814,2257, # 4032 574,3901,1603, 295,1535, 705,3902,4362, 283, 858, 417,5524,5525,3255,4717,4718, # 4048 3071,1220,1890,1046,2281,2461,4107,1393,1599, 689,2575, 388,4363,5526,2491, 802, # 4064 5527,2811,3903,2061,1405,2258,5528,4719,3904,2110,1052,1345,3256,1585,5529, 809, # 4080 5530,5531,5532, 575,2739,3524, 956,1552,1469,1144,2328,5533,2329,1560,2462,3635, # 4096 3257,4108, 616,2210,4364,3180,2183,2294,5534,1833,5535,3525,4720,5536,1319,3770, # 4112 3771,1211,3636,1023,3258,1293,2812,5537,5538,5539,3905, 607,2311,3906, 762,2892, # 4128 1439,4365,1360,4721,1485,3072,5540,4722,1038,4366,1450,2062,2648,4367,1379,4723, # 4144 2593,5541,5542,4368,1352,1414,2330,2935,1172,5543,5544,3907,3908,4724,1798,1451, # 4160 5545,5546,5547,5548,2936,4109,4110,2492,2351, 411,4111,4112,3637,3333,3124,4725, # 4176 1561,2674,1452,4113,1375,5549,5550, 47,2974, 316,5551,1406,1591,2937,3181,5552, # 4192 1025,2142,3125,3182, 354,2740, 884,2228,4369,2412, 508,3772, 726,3638, 996,2433, # 4208 3639, 729,5553, 392,2194,1453,4114,4726,3773,5554,5555,2463,3640,2618,1675,2813, # 4224 919,2352,2975,2353,1270,4727,4115, 73,5556,5557, 647,5558,3259,2856,2259,1550, # 4240 1346,3024,5559,1332, 883,3526,5560,5561,5562,5563,3334,2775,5564,1212, 831,1347, # 4256 4370,4728,2331,3909,1864,3073, 720,3910,4729,4730,3911,5565,4371,5566,5567,4731, # 4272 5568,5569,1799,4732,3774,2619,4733,3641,1645,2376,4734,5570,2938, 669,2211,2675, # 4288 2434,5571,2893,5572,5573,1028,3260,5574,4372,2413,5575,2260,1353,5576,5577,4735, # 4304 3183, 518,5578,4116,5579,4373,1961,5580,2143,4374,5581,5582,3025,2354,2355,3912, # 4320 516,1834,1454,4117,2708,4375,4736,2229,2620,1972,1129,3642,5583,2776,5584,2976, # 4336 1422, 577,1470,3026,1524,3410,5585,5586, 432,4376,3074,3527,5587,2594,1455,2515, # 4352 2230,1973,1175,5588,1020,2741,4118,3528,4737,5589,2742,5590,1743,1361,3075,3529, # 4368 2649,4119,4377,4738,2295, 895, 924,4378,2171, 331,2247,3076, 166,1627,3077,1098, # 4384 5591,1232,2894,2231,3411,4739, 657, 403,1196,2377, 542,3775,3412,1600,4379,3530, # 4400 5592,4740,2777,3261, 576, 530,1362,4741,4742,2540,2676,3776,4120,5593, 842,3913, # 4416 5594,2814,2032,1014,4121, 213,2709,3413, 665, 621,4380,5595,3777,2939,2435,5596, # 4432 2436,3335,3643,3414,4743,4381,2541,4382,4744,3644,1682,4383,3531,1380,5597, 724, # 4448 2282, 600,1670,5598,1337,1233,4745,3126,2248,5599,1621,4746,5600, 651,4384,5601, # 4464 1612,4385,2621,5602,2857,5603,2743,2312,3078,5604, 716,2464,3079, 174,1255,2710, # 4480 4122,3645, 548,1320,1398, 728,4123,1574,5605,1891,1197,3080,4124,5606,3081,3082, # 4496 3778,3646,3779, 747,5607, 635,4386,4747,5608,5609,5610,4387,5611,5612,4748,5613, # 4512 3415,4749,2437, 451,5614,3780,2542,2073,4388,2744,4389,4125,5615,1764,4750,5616, # 4528 4390, 350,4751,2283,2395,2493,5617,4391,4126,2249,1434,4127, 488,4752, 458,4392, # 4544 4128,3781, 771,1330,2396,3914,2576,3184,2160,2414,1553,2677,3185,4393,5618,2494, # 4560 2895,2622,1720,2711,4394,3416,4753,5619,2543,4395,5620,3262,4396,2778,5621,2016, # 4576 2745,5622,1155,1017,3782,3915,5623,3336,2313, 201,1865,4397,1430,5624,4129,5625, # 4592 5626,5627,5628,5629,4398,1604,5630, 414,1866, 371,2595,4754,4755,3532,2017,3127, # 4608 4756,1708, 960,4399, 887, 389,2172,1536,1663,1721,5631,2232,4130,2356,2940,1580, # 4624 5632,5633,1744,4757,2544,4758,4759,5634,4760,5635,2074,5636,4761,3647,3417,2896, # 4640 4400,5637,4401,2650,3418,2815, 673,2712,2465, 709,3533,4131,3648,4402,5638,1148, # 4656 502, 634,5639,5640,1204,4762,3649,1575,4763,2623,3783,5641,3784,3128, 948,3263, # 4672 121,1745,3916,1110,5642,4403,3083,2516,3027,4132,3785,1151,1771,3917,1488,4133, # 4688 1987,5643,2438,3534,5644,5645,2094,5646,4404,3918,1213,1407,2816, 531,2746,2545, # 4704 3264,1011,1537,4764,2779,4405,3129,1061,5647,3786,3787,1867,2897,5648,2018, 120, # 4720 4406,4407,2063,3650,3265,2314,3919,2678,3419,1955,4765,4134,5649,3535,1047,2713, # 4736 1266,5650,1368,4766,2858, 649,3420,3920,2546,2747,1102,2859,2679,5651,5652,2000, # 4752 5653,1111,3651,2977,5654,2495,3921,3652,2817,1855,3421,3788,5655,5656,3422,2415, # 4768 2898,3337,3266,3653,5657,2577,5658,3654,2818,4135,1460, 856,5659,3655,5660,2899, # 4784 2978,5661,2900,3922,5662,4408, 632,2517, 875,3923,1697,3924,2296,5663,5664,4767, # 4800 3028,1239, 580,4768,4409,5665, 914, 936,2075,1190,4136,1039,2124,5666,5667,5668, # 4816 5669,3423,1473,5670,1354,4410,3925,4769,2173,3084,4137, 915,3338,4411,4412,3339, # 4832 1605,1835,5671,2748, 398,3656,4413,3926,4138, 328,1913,2860,4139,3927,1331,4414, # 4848 3029, 937,4415,5672,3657,4140,4141,3424,2161,4770,3425, 524, 742, 538,3085,1012, # 4864 5673,5674,3928,2466,5675, 658,1103, 225,3929,5676,5677,4771,5678,4772,5679,3267, # 4880 1243,5680,4142, 963,2250,4773,5681,2714,3658,3186,5682,5683,2596,2332,5684,4774, # 4896 5685,5686,5687,3536, 957,3426,2547,2033,1931,2941,2467, 870,2019,3659,1746,2780, # 4912 2781,2439,2468,5688,3930,5689,3789,3130,3790,3537,3427,3791,5690,1179,3086,5691, # 4928 3187,2378,4416,3792,2548,3188,3131,2749,4143,5692,3428,1556,2549,2297, 977,2901, # 4944 2034,4144,1205,3429,5693,1765,3430,3189,2125,1271, 714,1689,4775,3538,5694,2333, # 4960 3931, 533,4417,3660,2184, 617,5695,2469,3340,3539,2315,5696,5697,3190,5698,5699, # 4976 3932,1988, 618, 427,2651,3540,3431,5700,5701,1244,1690,5702,2819,4418,4776,5703, # 4992 3541,4777,5704,2284,1576, 473,3661,4419,3432, 972,5705,3662,5706,3087,5707,5708, # 5008 4778,4779,5709,3793,4145,4146,5710, 153,4780, 356,5711,1892,2902,4420,2144, 408, # 5024 803,2357,5712,3933,5713,4421,1646,2578,2518,4781,4782,3934,5714,3935,4422,5715, # 5040 2416,3433, 752,5716,5717,1962,3341,2979,5718, 746,3030,2470,4783,4423,3794, 698, # 5056 4784,1893,4424,3663,2550,4785,3664,3936,5719,3191,3434,5720,1824,1302,4147,2715, # 5072 3937,1974,4425,5721,4426,3192, 823,1303,1288,1236,2861,3542,4148,3435, 774,3938, # 5088 5722,1581,4786,1304,2862,3939,4787,5723,2440,2162,1083,3268,4427,4149,4428, 344, # 5104 1173, 288,2316, 454,1683,5724,5725,1461,4788,4150,2597,5726,5727,4789, 985, 894, # 5120 5728,3436,3193,5729,1914,2942,3795,1989,5730,2111,1975,5731,4151,5732,2579,1194, # 5136 425,5733,4790,3194,1245,3796,4429,5734,5735,2863,5736, 636,4791,1856,3940, 760, # 5152 1800,5737,4430,2212,1508,4792,4152,1894,1684,2298,5738,5739,4793,4431,4432,2213, # 5168 479,5740,5741, 832,5742,4153,2496,5743,2980,2497,3797, 990,3132, 627,1815,2652, # 5184 4433,1582,4434,2126,2112,3543,4794,5744, 799,4435,3195,5745,4795,2113,1737,3031, # 5200 1018, 543, 754,4436,3342,1676,4796,4797,4154,4798,1489,5746,3544,5747,2624,2903, # 5216 4155,5748,5749,2981,5750,5751,5752,5753,3196,4799,4800,2185,1722,5754,3269,3270, # 5232 1843,3665,1715, 481, 365,1976,1857,5755,5756,1963,2498,4801,5757,2127,3666,3271, # 5248 433,1895,2064,2076,5758, 602,2750,5759,5760,5761,5762,5763,3032,1628,3437,5764, # 5264 3197,4802,4156,2904,4803,2519,5765,2551,2782,5766,5767,5768,3343,4804,2905,5769, # 5280 4805,5770,2864,4806,4807,1221,2982,4157,2520,5771,5772,5773,1868,1990,5774,5775, # 5296 5776,1896,5777,5778,4808,1897,4158, 318,5779,2095,4159,4437,5780,5781, 485,5782, # 5312 938,3941, 553,2680, 116,5783,3942,3667,5784,3545,2681,2783,3438,3344,2820,5785, # 5328 3668,2943,4160,1747,2944,2983,5786,5787, 207,5788,4809,5789,4810,2521,5790,3033, # 5344 890,3669,3943,5791,1878,3798,3439,5792,2186,2358,3440,1652,5793,5794,5795, 941, # 5360 2299, 208,3546,4161,2020, 330,4438,3944,2906,2499,3799,4439,4811,5796,5797,5798, # 5376 ) # fmt: on
31,274
Python
.py
383
80.475196
87
0.739931
chardet/chardet
2,153
257
66
LGPL-2.1
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,117
langhungarianmodel.py
chardet_chardet/chardet/langhungarianmodel.py
from 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ÁÉÍÓÖÚÜáéíóöúüŐőŰű", )
101,351
Python
.py
4,642
13.151659
78
0.205702
chardet/chardet
2,153
257
66
LGPL-2.1
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,118
utf8prober.py
chardet_chardet/chardet/utf8prober.py
######################## 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 typing import Union 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) -> None: super().__init__() self.coding_sm = CodingStateMachine(UTF8_SM_MODEL) self._num_mb_chars = 0 self.reset() def reset(self) -> None: super().reset() self.coding_sm.reset() self._num_mb_chars = 0 @property def charset_name(self) -> str: return "utf-8" @property def language(self) -> str: return "" def feed(self, byte_str: Union[bytes, bytearray]) -> ProbingState: 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) -> float: unlike = 0.99 if self._num_mb_chars < 6: unlike *= self.ONE_CHAR_PROB**self._num_mb_chars return 1.0 - unlike return unlike
2,812
Python
.py
70
33.914286
70
0.647253
chardet/chardet
2,153
257
66
LGPL-2.1
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,119
jpcntx.py
chardet_chardet/chardet/jpcntx.py
######################## 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 ######################### from typing import List, Tuple, Union # 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) -> None: self._total_rel = 0 self._rel_sample: List[int] = [] self._need_to_skip_char_num = 0 self._last_char_order = -1 self._done = False self.reset() def reset(self) -> None: 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: Union[bytes, bytearray], num_bytes: int) -> None: 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) -> bool: return self._total_rel > self.ENOUGH_REL_THRESHOLD def get_confidence(self) -> float: # 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, _: Union[bytes, bytearray]) -> Tuple[int, int]: return -1, 1 class SJISContextAnalysis(JapaneseContextAnalysis): def __init__(self) -> None: super().__init__() self._charset_name = "SHIFT_JIS" @property def charset_name(self) -> str: return self._charset_name def get_order(self, byte_str: Union[bytes, bytearray]) -> Tuple[int, int]: # type: ignore[reportIncompatibleMethodOverride] 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: Union[bytes, bytearray]) -> Tuple[int, int]: # type: ignore[reportIncompatibleMethodOverride] 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
27,155
Python
.py
217
118.124424
254
0.388453
chardet/chardet
2,153
257
66
LGPL-2.1
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,120
version.py
chardet_chardet/chardet/version.py
""" This module exists only to simplify retrieving the version number of chardet from within setuptools and from chardet subpackages. :author: Dan Blanchard (dan.blanchard@gmail.com) """ __version__ = "5.3.0dev0" VERSION = __version__.split(".")
248
Python
.py
7
34.142857
76
0.757322
chardet/chardet
2,153
257
66
LGPL-2.1
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,121
codingstatemachinedict.py
chardet_chardet/chardet/codingstatemachinedict.py
from typing import Tuple, TypedDict class CodingStateMachineDict(TypedDict, total=False): class_table: Tuple[int, ...] class_factor: int state_table: Tuple[int, ...] char_len_table: Tuple[int, ...] name: str language: str # Optional key
264
Python
.py
8
28.75
53
0.688976
chardet/chardet
2,153
257
66
LGPL-2.1
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,122
charsetprober.py
chardet_chardet/chardet/charsetprober.py
######################## 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 ######################### import logging import re from typing import Optional, Union from .enums import LanguageFilter, ProbingState INTERNATIONAL_WORDS_PATTERN = re.compile( b"[a-zA-Z]*[\x80-\xff]+[a-zA-Z]*[^a-zA-Z\x80-\xff]?" ) class CharSetProber: SHORTCUT_THRESHOLD = 0.95 def __init__(self, lang_filter: LanguageFilter = LanguageFilter.NONE) -> None: self._state = ProbingState.DETECTING self.active = True self.lang_filter = lang_filter self.logger = logging.getLogger(__name__) def reset(self) -> None: self._state = ProbingState.DETECTING @property def charset_name(self) -> Optional[str]: return None @property def language(self) -> Optional[str]: raise NotImplementedError def feed(self, byte_str: Union[bytes, bytearray]) -> ProbingState: raise NotImplementedError @property def state(self) -> ProbingState: return self._state def get_confidence(self) -> float: return 0.0 @staticmethod def filter_high_byte_only(buf: Union[bytes, bytearray]) -> bytes: buf = re.sub(b"([\x00-\x7f])+", b" ", buf) return buf @staticmethod def filter_international_words(buf: Union[bytes, bytearray]) -> bytearray: """ We define three types of bytes: alphabet: english alphabets [a-zA-Z] international: international characters [\x80-\xff] marker: everything else [^a-zA-Z\x80-\xff] The input buffer can be thought to contain a series of words delimited by markers. This function works to filter all words that contain at least one international character. All contiguous sequences of markers are replaced by a single space ascii character. This filter applies to all scripts which do not use English characters. """ filtered = bytearray() # This regex expression filters out only words that have at-least one # international character. The word may include one marker character at # the end. words = INTERNATIONAL_WORDS_PATTERN.findall(buf) for word in words: filtered.extend(word[:-1]) # If the last character in the word is a marker, replace it with a # space as markers shouldn't affect our analysis (they are used # similarly across all languages and may thus have similar # frequencies). last_char = word[-1:] if not last_char.isalpha() and last_char < b"\x80": last_char = b" " filtered.extend(last_char) return filtered @staticmethod def remove_xml_tags(buf: Union[bytes, bytearray]) -> bytes: """ Returns a copy of ``buf`` that retains only the sequences of English alphabet and high byte characters that are not between <> characters. This filter can be applied to all scripts which contain both English characters and extended ASCII characters, but is currently only used by ``Latin1Prober``. """ filtered = bytearray() in_tag = False prev = 0 buf = memoryview(buf).cast("c") for curr, buf_char in enumerate(buf): # Check if we're coming out of or entering an XML tag # https://github.com/python/typeshed/issues/8182 if buf_char == b">": # type: ignore[comparison-overlap] prev = curr + 1 in_tag = False # https://github.com/python/typeshed/issues/8182 elif buf_char == b"<": # type: ignore[comparison-overlap] if curr > prev and not in_tag: # Keep everything after last non-extended-ASCII, # non-alphabetic character filtered.extend(buf[prev:curr]) # Output a space to delimit stretch we kept filtered.extend(b" ") in_tag = True # If we're not in a tag... if not in_tag: # Keep everything after last non-extended-ASCII, non-alphabetic # character filtered.extend(buf[prev:]) return filtered
5,419
Python
.py
123
36.333333
82
0.643846
chardet/chardet
2,153
257
66
LGPL-2.1
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,123
langturkishmodel.py
chardet_chardet/chardet/langturkishmodel.py
from 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ÂÇÎÖÛÜâçîöûüĞğİıŞş", )
95,360
Python
.py
4,375
12.951771
80
0.195861
chardet/chardet
2,153
257
66
LGPL-2.1
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,124
escprober.py
chardet_chardet/chardet/escprober.py
######################## 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 typing import Optional, Union from .charsetprober import CharSetProber from .codingstatemachine import CodingStateMachine from .enums import LanguageFilter, MachineState, ProbingState from .escsm import ( HZ_SM_MODEL, ISO2022CN_SM_MODEL, ISO2022JP_SM_MODEL, ISO2022KR_SM_MODEL, ) class EscCharSetProber(CharSetProber): """ This CharSetProber uses a "code scheme" approach for detecting encodings, whereby easily recognizable escape or shift sequences are relied on to identify these encodings. """ def __init__(self, lang_filter: LanguageFilter = LanguageFilter.NONE) -> None: super().__init__(lang_filter=lang_filter) self.coding_sm = [] if self.lang_filter & LanguageFilter.CHINESE_SIMPLIFIED: self.coding_sm.append(CodingStateMachine(HZ_SM_MODEL)) self.coding_sm.append(CodingStateMachine(ISO2022CN_SM_MODEL)) if self.lang_filter & LanguageFilter.JAPANESE: self.coding_sm.append(CodingStateMachine(ISO2022JP_SM_MODEL)) if self.lang_filter & LanguageFilter.KOREAN: self.coding_sm.append(CodingStateMachine(ISO2022KR_SM_MODEL)) self.active_sm_count = 0 self._detected_charset: Optional[str] = None self._detected_language: Optional[str] = None self._state = ProbingState.DETECTING self.reset() def reset(self) -> None: super().reset() for coding_sm in self.coding_sm: coding_sm.active = True coding_sm.reset() self.active_sm_count = len(self.coding_sm) self._detected_charset = None self._detected_language = None @property def charset_name(self) -> Optional[str]: return self._detected_charset @property def language(self) -> Optional[str]: return self._detected_language def get_confidence(self) -> float: return 0.99 if self._detected_charset else 0.00 def feed(self, byte_str: Union[bytes, bytearray]) -> ProbingState: for c in byte_str: for coding_sm in self.coding_sm: if not coding_sm.active: continue coding_state = coding_sm.next_state(c) if coding_state == MachineState.ERROR: coding_sm.active = False self.active_sm_count -= 1 if self.active_sm_count <= 0: self._state = ProbingState.NOT_ME return self.state elif coding_state == MachineState.ITS_ME: self._state = ProbingState.FOUND_IT self._detected_charset = coding_sm.get_coding_state_machine() self._detected_language = coding_sm.language return self.state return self.state
4,006
Python
.py
91
36.483516
82
0.657018
chardet/chardet
2,153
257
66
LGPL-2.1
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,125
big5prober.py
chardet_chardet/chardet/big5prober.py
######################## 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 ######################### from .chardistribution import Big5DistributionAnalysis from .codingstatemachine import CodingStateMachine from .mbcharsetprober import MultiByteCharSetProber from .mbcssm import BIG5_SM_MODEL class Big5Prober(MultiByteCharSetProber): def __init__(self) -> None: super().__init__() self.coding_sm = CodingStateMachine(BIG5_SM_MODEL) self.distribution_analyzer = Big5DistributionAnalysis() self.reset() @property def charset_name(self) -> str: return "Big5" @property def language(self) -> str: return "Chinese"
1,763
Python
.py
42
39.238095
69
0.721445
chardet/chardet
2,153
257
66
LGPL-2.1
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,126
latin1prober.py
chardet_chardet/chardet/latin1prober.py
######################## 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 typing import List, Union 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) -> None: super().__init__() self._last_char_class = OTH self._freq_counter: List[int] = [] self.reset() def reset(self) -> None: self._last_char_class = OTH self._freq_counter = [0] * FREQ_CAT_NUM super().reset() @property def charset_name(self) -> str: return "ISO-8859-1" @property def language(self) -> str: return "" def feed(self, byte_str: Union[bytes, bytearray]) -> ProbingState: 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) -> float: 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
5,380
Python
.py
132
35.856061
85
0.577107
chardet/chardet
2,153
257
66
LGPL-2.1
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,127
languages.py
chardet_chardet/chardet/metadata/languages.py
""" 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 from typing import List, Optional # 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: Optional[str] = None, iso_code: Optional[str] = None, use_ascii: bool = True, charsets: Optional[List[str]] = None, alphabet: Optional[str] = None, wiki_start_pages: Optional[List[str]] = None, ) -> 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) -> str: 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", "MacRoman"], alphabet="æøåÆØÅ", wiki_start_pages=["Forside"], ), "German": Language( name="German", iso_code="de", use_ascii=True, charsets=["ISO-8859-1", "ISO-8859-15", "WINDOWS-1252", "MacRoman"], 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", "MacRoman"], 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", "MacRoman"], 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", "MacRoman"], 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", "MacRoman"], 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", "MacRoman"], 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", "MacRoman"], 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", "MacRoman"], 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ữ"], ), }
13,560
Python
.py
342
28.318713
107
0.605463
chardet/chardet
2,153
257
66
LGPL-2.1
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,128
chardetect.py
chardet_chardet/chardet/cli/chardetect.py
""" Script which takes one or more file paths and reports on their detected encodings Example:: % chardetect somefile someotherfile somefile: windows-1252 with confidence 0.5 someotherfile: ascii with confidence 1.0 If no paths are provided, it takes its input from stdin. """ import argparse import sys from typing import Iterable, List, Optional from .. import __version__ from ..universaldetector import UniversalDetector def description_of( lines: Iterable[bytes], name: str = "stdin", minimal: bool = False, should_rename_legacy: bool = False, ) -> Optional[str]: """ Return a string describing the probable encoding of a file or list of strings. :param lines: The lines to get the encoding of. :type lines: Iterable of bytes :param name: Name of file or collection of lines :type name: str :param should_rename_legacy: Should we rename legacy encodings to their more modern equivalents? :type should_rename_legacy: ``bool`` """ u = UniversalDetector(should_rename_legacy=should_rename_legacy) for line in lines: line = bytearray(line) u.feed(line) # shortcut out of the loop to save reading further - particularly useful if we read a BOM. if u.done: break u.close() result = u.result if minimal: return result["encoding"] if result["encoding"]: return f'{name}: {result["encoding"]} with confidence {result["confidence"]}' return f"{name}: no result" def main(argv: Optional[List[str]] = None) -> None: """ Handles command line arguments and gets things started. :param argv: List of arguments, as if specified on the command-line. If None, ``sys.argv[1:]`` is used instead. :type argv: list of str """ # Get command line arguments parser = argparse.ArgumentParser( description=( "Takes one or more file paths and reports their detected encodings" ) ) parser.add_argument( "input", help="File whose encoding we would like to determine. (default: stdin)", type=argparse.FileType("rb"), nargs="*", default=[sys.stdin.buffer], ) parser.add_argument( "--minimal", help="Print only the encoding to standard output", action="store_true", ) parser.add_argument( "-l", "--legacy", help="Rename legacy encodings to more modern ones.", action="store_true", ) parser.add_argument( "--version", action="version", version=f"%(prog)s {__version__}" ) args = parser.parse_args(argv) for f in args.input: if f.isatty(): print( "You are running chardetect interactively. Press " "CTRL-D twice at the start of a blank line to signal the " "end of your input. If you want help, run chardetect " "--help\n", file=sys.stderr, ) print( description_of( f, f.name, minimal=args.minimal, should_rename_legacy=args.legacy ) ) if __name__ == "__main__": main()
3,241
Python
.py
96
26.53125
98
0.621725
chardet/chardet
2,153
257
66
LGPL-2.1
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,129
forms_account_handling.py
django-wiki_django-wiki/src/wiki/forms_account_handling.py
import random import string import django.contrib.auth.models from django import forms from django.contrib.auth import get_user_model from django.contrib.auth.forms import UserCreationForm from django.core.exceptions import FieldDoesNotExist from django.db.models.fields import CharField from django.db.models.fields import EmailField from django.utils.translation import gettext_lazy as _ from wiki.conf import settings def _get_field(model, field): try: return model._meta.get_field(field) except FieldDoesNotExist: return User = get_user_model() def check_user_field(user_model): return isinstance( _get_field(user_model, user_model.USERNAME_FIELD), CharField ) def check_email_field(user_model): return isinstance( _get_field(user_model, user_model.get_email_field_name()), EmailField ) # django parses the ModelForm (and Meta classes) on class creation, which fails with custom models without expected fields. # We need to check this here, because if this module can't load then system checks can't run. CustomUser = ( User if ( settings.ACCOUNT_HANDLING and check_user_field(User) and check_email_field(User) ) else django.contrib.auth.models.User ) class UserCreationForm(UserCreationForm): email = forms.EmailField(required=True) def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) # Add honeypots self.honeypot_fieldnames = "address", "phone" self.honeypot_class = "".join( random.choice(string.ascii_uppercase + string.digits) for __ in range(10) ) self.honeypot_jsfunction = "f" + "".join( random.choice(string.ascii_uppercase + string.digits) for __ in range(10) ) for fieldname in self.honeypot_fieldnames: self.fields[fieldname] = forms.CharField( widget=forms.TextInput(attrs={"class": self.honeypot_class}), required=False, ) def clean(self): super().clean() for fieldname in self.honeypot_fieldnames: if self.cleaned_data[fieldname]: raise forms.ValidationError( "Thank you, non-human visitor. Please keep trying to fill in the form." ) return self.cleaned_data class Meta: model = CustomUser fields = (CustomUser.USERNAME_FIELD, CustomUser.get_email_field_name()) class UserUpdateForm(forms.ModelForm): password1 = forms.CharField( label="New password", widget=forms.PasswordInput(), required=False ) password2 = forms.CharField( label="Confirm password", widget=forms.PasswordInput(), required=False ) def clean(self): password1 = self.cleaned_data.get("password1") password2 = self.cleaned_data.get("password2") if password1 and password1 != password2: raise forms.ValidationError(_("Passwords don't match")) return self.cleaned_data class Meta: model = CustomUser fields = [CustomUser.get_email_field_name()]
3,157
Python
.py
82
31.304878
123
0.674861
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,130
checks.py
django-wiki_django-wiki/src/wiki/checks.py
from django.apps import apps from django.core.checks import Error from django.template import Engine class Tags: required_installed_apps = "required_installed_apps" obsolete_installed_apps = "obsolete_installed_apps" context_processors = "context_processors" fields_in_custom_user_model = "fields_in_custom_user_model" REQUIRED_INSTALLED_APPS = ( # module name, package name, error code ("mptt", "django-mptt", "E001"), ("sekizai", "django-sekizai", "E002"), ("django.contrib.humanize", "django.contrib.humanize", "E003"), ("django.contrib.contenttypes", "django.contrib.contenttypes", "E004"), ("django.contrib.sites", "django.contrib.sites", "E005"), ) OBSOLETE_INSTALLED_APPS = ( # obsolete module name, new module name, error code ("django_notify", "django_nyt", "E006"), ) REQUIRED_CONTEXT_PROCESSORS = ( # context processor name, error code ("django.contrib.auth.context_processors.auth", "E007"), ("django.template.context_processors.request", "E008"), ("sekizai.context_processors.sekizai", "E009"), ) FIELDS_IN_CUSTOM_USER_MODEL = ( # check function, field fetcher, required field type, error code ("check_user_field", "USERNAME_FIELD", "CharField", "E010"), ("check_email_field", "get_email_field_name()", "EmailField", "E011"), ) def check_for_required_installed_apps(app_configs, **kwargs): errors = [] for app in REQUIRED_INSTALLED_APPS: if not apps.is_installed(app[0]): errors.append( Error( "needs %s in INSTALLED_APPS" % app[1], id="wiki.%s" % app[2], ) ) return errors def check_for_obsolete_installed_apps(app_configs, **kwargs): errors = [] for app in OBSOLETE_INSTALLED_APPS: if apps.is_installed(app[0]): errors.append( Error( "You need to change from %s to %s in INSTALLED_APPS and your urlconfig." % (app[0], app[1]), id="wiki.%s" % app[2], ) ) return errors def check_for_context_processors(app_configs, **kwargs): errors = [] # Pattern from django.contrib.admin.checks try: default_template_engine = Engine.get_default() except Exception: # Skip this non-critical check: # 1. if the user has a non-trivial TEMPLATES setting and Django # can't find a default template engine # 2. if anything goes wrong while loading template engines, in # order to avoid raising an exception from a confusing location # Catching ImproperlyConfigured suffices for 1. but 2. requires # catching all exceptions. pass else: context_processors = default_template_engine.context_processors for context_processor in REQUIRED_CONTEXT_PROCESSORS: if context_processor[0] not in context_processors: errors.append( Error( "needs %s in TEMPLATES[*]['OPTIONS']['context_processors']" % context_processor[0], id="wiki.%s" % context_processor[1], ) ) return errors def check_for_fields_in_custom_user_model(app_configs, **kwargs): errors = [] from wiki.conf import settings if not settings.ACCOUNT_HANDLING: return errors import wiki.forms_account_handling from django.contrib.auth import get_user_model User = get_user_model() for ( check_function_name, field_fetcher, required_field_type, error_code, ) in FIELDS_IN_CUSTOM_USER_MODEL: function = getattr(wiki.forms_account_handling, check_function_name) if not function(User): errors.append( Error( "%s.%s.%s refers to a field that is not of type %s" % ( User.__module__, User.__name__, field_fetcher, required_field_type, ), hint="If you have your own login/logout views, turn off settings.WIKI_ACCOUNT_HANDLING", obj=User, id="wiki.%s" % error_code, ) ) return errors
4,399
Python
.py
111
29.828829
108
0.592601
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,131
urls.py
django-wiki_django-wiki/src/wiki/urls.py
from django.urls import include from django.urls import re_path from django.utils.module_loading import import_string from wiki import sites from wiki.conf import settings from wiki.core.plugins import registry from wiki.views import accounts from wiki.views import article from wiki.views import deleted_list urlpatterns = [ re_path(r"^", sites.site.urls), ] class WikiURLPatterns: """ configurator for wiki urls. To customize, you can define your own subclass, either overriding the view providers, or overriding the functions that collect views. """ # basic views article_view_class = article.ArticleView article_create_view_class = article.Create article_delete_view_class = article.Delete article_deleted_view_class = article.Deleted article_dir_view_class = article.Dir article_edit_view_class = article.Edit article_move_view_class = article.Move article_preview_view_class = article.Preview article_history_view_class = article.History article_settings_view_class = article.Settings article_source_view_class = article.Source article_plugin_view_class = article.Plugin revision_change_view_class = article.ChangeRevisionView revision_merge_view_class = article.MergeView search_view_class = article.SearchView article_diff_view_class = article.DiffView # account views signup_view_class = accounts.Signup login_view_class = accounts.Login logout_view_class = accounts.Logout profile_update_view_class = accounts.Update # deleted list view deleted_list_view_class = deleted_list.DeletedListView def get_urls(self): urlpatterns = self.get_root_urls() urlpatterns += self.get_accounts_urls() urlpatterns += self.get_deleted_list_urls() urlpatterns += self.get_revision_urls() urlpatterns += self.get_article_urls() urlpatterns += self.get_plugin_urls() # This ALWAYS has to be the last of all the patterns since # the paths in theory could wrongly match other targets. urlpatterns += self.get_article_path_urls() return urlpatterns def get_root_urls(self): urlpatterns = [ re_path( r"^$", self.article_view_class.as_view(), name="root", kwargs={"path": ""}, ), re_path( r"^create-root/$", article.CreateRootView.as_view(), name="root_create", ), re_path( r"^missing-root/$", article.MissingRootView.as_view(), name="root_missing", ), re_path( r"^_search/$", self.search_view_class.as_view(), name="search" ), re_path( r"^_revision/diff/(?P<revision_id>[0-9]+)/$", self.article_diff_view_class.as_view(), name="diff", ), ] return urlpatterns def get_deleted_list_urls(self): urlpatterns = [ re_path( "^_admin/$", self.deleted_list_view_class.as_view(), name="deleted_list", ), ] return urlpatterns def get_accounts_urls(self): if settings.ACCOUNT_HANDLING: urlpatterns = [ re_path( r"^_accounts/sign-up/$", self.signup_view_class.as_view(), name="signup", ), re_path( r"^_accounts/logout/$", self.logout_view_class.as_view(), name="logout", ), re_path( r"^_accounts/login/$", self.login_view_class.as_view(), name="login", ), re_path( r"^_accounts/settings/$", self.profile_update_view_class.as_view(), name="profile_update", ), ] else: urlpatterns = [] return urlpatterns def get_revision_urls(self): urlpatterns = [ # This one doesn't work because it don't know # where to redirect after... re_path( r"^_revision/change/(?P<article_id>[0-9]+)/(?P<revision_id>[0-9]+)/$", self.revision_change_view_class.as_view(), name="change_revision", ), re_path( r"^_revision/preview/(?P<article_id>[0-9]+)/$", self.article_preview_view_class.as_view(), name="preview_revision", ), re_path( r"^_revision/merge/(?P<article_id>[0-9]+)/(?P<revision_id>[0-9]+)/preview/$", self.revision_merge_view_class.as_view(preview=True), name="merge_revision_preview", ), ] return urlpatterns def get_article_urls(self): urlpatterns = [ # Paths decided by article_ids re_path( r"^(?P<article_id>[0-9]+)/$", self.article_view_class.as_view(), name="get", ), re_path( r"^(?P<article_id>[0-9]+)/delete/$", self.article_delete_view_class.as_view(), name="delete", ), re_path( r"^(?P<article_id>[0-9]+)/deleted/$", self.article_deleted_view_class.as_view(), name="deleted", ), re_path( r"^(?P<article_id>[0-9]+)/edit/$", self.article_edit_view_class.as_view(), name="edit", ), re_path( r"^(?P<article_id>[0-9]+)/move/$", self.article_move_view_class.as_view(), name="move", ), re_path( r"^(?P<article_id>[0-9]+)/preview/$", self.article_preview_view_class.as_view(), name="preview", ), re_path( r"^(?P<article_id>[0-9]+)/history/$", self.article_history_view_class.as_view(), name="history", ), re_path( r"^(?P<article_id>[0-9]+)/settings/$", self.article_settings_view_class.as_view(), name="settings", ), re_path( r"^(?P<article_id>[0-9]+)/source/$", self.article_source_view_class.as_view(), name="source", ), re_path( r"^(?P<article_id>[0-9]+)/revision/change/(?P<revision_id>[0-9]+)/$", self.revision_change_view_class.as_view(), name="change_revision", ), re_path( r"^(?P<article_id>[0-9]+)/revision/merge/(?P<revision_id>[0-9]+)/$", self.revision_merge_view_class.as_view(), name="merge_revision", ), re_path( r"^(?P<article_id>[0-9]+)/plugin/(?P<slug>\w+)/$", self.article_plugin_view_class.as_view(), name="plugin", ), ] return urlpatterns def get_article_path_urls(self): urlpatterns = [ # Paths decided by URLs re_path( r"^(?P<path>.+/|)_create/$", self.article_create_view_class.as_view(), name="create", ), re_path( r"^(?P<path>.+/|)_delete/$", self.article_delete_view_class.as_view(), name="delete", ), re_path( r"^(?P<path>.+/|)_deleted/$", self.article_deleted_view_class.as_view(), name="deleted", ), re_path( r"^(?P<path>.+/|)_edit/$", self.article_edit_view_class.as_view(), name="edit", ), re_path( r"^(?P<path>.+/|)_move/$", self.article_move_view_class.as_view(), name="move", ), re_path( r"^(?P<path>.+/|)_preview/$", self.article_preview_view_class.as_view(), name="preview", ), re_path( r"^(?P<path>.+/|)_history/$", self.article_history_view_class.as_view(), name="history", ), re_path( r"^(?P<path>.+/|)_dir/$", self.article_dir_view_class.as_view(), name="dir", ), re_path( r"^(?P<path>.+/|)_search/$", self.search_view_class.as_view(), name="search", ), re_path( r"^(?P<path>.+/|)_settings/$", self.article_settings_view_class.as_view(), name="settings", ), re_path( r"^(?P<path>.+/|)_source/$", self.article_source_view_class.as_view(), name="source", ), re_path( r"^(?P<path>.+/|)_revision/change/(?P<revision_id>[0-9]+)/$", self.revision_change_view_class.as_view(), name="change_revision", ), re_path( r"^(?P<path>.+/|)_revision/merge/(?P<revision_id>[0-9]+)/$", self.revision_merge_view_class.as_view(), name="merge_revision", ), re_path( r"^(?P<path>.+/|)_plugin/(?P<slug>\w+)/$", self.article_plugin_view_class.as_view(), name="plugin", ), # This should always go last! re_path( r"^(?P<path>.+/|)$", self.article_view_class.as_view(), name="get", ), ] return urlpatterns @staticmethod def get_plugin_urls(): urlpatterns = [] for plugin in registry.get_plugins().values(): slug = getattr(plugin, "slug", None) if slug: article_urlpatterns = plugin.urlpatterns.get("article", []) urlpatterns += [ re_path( r"^(?P<article_id>[0-9]+)/plugin/" + slug + "/", include(article_urlpatterns), ), re_path( r"^(?P<path>.+/|)_plugin/" + slug + "/", include(article_urlpatterns), ), ] root_urlpatterns = plugin.urlpatterns.get("root", []) urlpatterns += [ re_path( r"^_plugin/" + slug + "/", include(root_urlpatterns) ), ] return urlpatterns def get_pattern(app_name="wiki", namespace="wiki", url_config_class=None): """Every url resolution takes place as "wiki:view_name". You should not attempt to have multiple deployments of the wiki in a single Django project. https://docs.djangoproject.com/en/dev/topics/http/urls/#topics-http-reversing-url-namespaces """ import warnings warnings.warn( "wiki.urls.get_pattern is deprecated and will be removed in next version, just `include('wiki.urls')` in your urlconf", DeprecationWarning, ) if url_config_class is None: url_config_classname = getattr(settings, "URL_CONFIG_CLASS", None) if url_config_classname is None: url_config_class = WikiURLPatterns else: warnings.warn( "URL_CONFIG_CLASS is deprecated and will be removed in next version, override `wiki.sites.WikiSite` instead", DeprecationWarning, ) url_config_class = import_string(url_config_classname) urlpatterns = url_config_class().get_urls() return urlpatterns, app_name, namespace
12,282
Python
.py
332
23.963855
127
0.485161
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,132
apps.py
django-wiki_django-wiki/src/wiki/apps.py
from django.apps import AppConfig from django.core.checks import register from django.utils.translation import gettext_lazy as _ from wiki.core.plugins.loader import load_wiki_plugins from . import checks class WikiConfig(AppConfig): default_site = "wiki.sites.WikiSite" name = "wiki" verbose_name = _("Wiki") def ready(self): register( checks.check_for_required_installed_apps, checks.Tags.required_installed_apps, ) register( checks.check_for_obsolete_installed_apps, checks.Tags.obsolete_installed_apps, ) register( checks.check_for_context_processors, checks.Tags.context_processors ) register( checks.check_for_fields_in_custom_user_model, checks.Tags.fields_in_custom_user_model, ) load_wiki_plugins()
884
Python
.py
26
26.230769
79
0.660422
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,133
sites.py
django-wiki_django-wiki/src/wiki/sites.py
from django.apps import apps from django.urls import include from django.urls import re_path from django.utils.functional import LazyObject from django.utils.module_loading import import_string from wiki.conf import settings from wiki.core.plugins import registry class WikiSite: """ Wiki site configurator. To customize, you can define your own subclass, either overriding the view providers, or overriding the functions that collect views and set update WikiConfig.default_site to the dotted import path of your customized site. """ def __init__(self, name="wiki"): from wiki.views import accounts, article, deleted_list self.name = name # root view self.root_view = getattr( self, "root_view", article.CreateRootView.as_view() ) self.root_missing_view = getattr( self, "root_missing_view", article.MissingRootView.as_view() ) # basic views self.article_view = getattr( self, "article_view", article.ArticleView.as_view() ) self.article_create_view = getattr( self, "article_create_view", article.Create.as_view() ) self.article_delete_view = getattr( self, "article_delete_view", article.Delete.as_view() ) self.article_deleted_view = getattr( self, "article_deleted_view", article.Deleted.as_view() ) self.article_dir_view = getattr( self, "article_dir_view", article.Dir.as_view() ) self.article_edit_view = getattr( self, "article_edit_view", article.Edit.as_view() ) self.article_move_view = getattr( self, "article_move_view", article.Move.as_view() ) self.article_preview_view = getattr( self, "article_preview_view", article.Preview.as_view() ) self.article_history_view = getattr( self, "article_history_view", article.History.as_view() ) self.article_settings_view = getattr( self, "article_settings_view", article.Settings.as_view() ) self.article_source_view = getattr( self, "article_source_view", article.Source.as_view() ) self.article_plugin_view = getattr( self, "article_plugin_view", article.Plugin.as_view() ) self.revision_change_view = getattr( self, "revision_change_view", article.ChangeRevisionView.as_view() ) self.revision_merge_view = getattr( self, "revision_merge_view", article.MergeView.as_view() ) self.revision_preview_merge_view = getattr( self, "revision_preview_merge_view", article.MergeView.as_view(preview=True), ) self.search_view = getattr( self, "search_view", article.SearchView.as_view() ) self.article_diff_view = getattr( self, "article_diff_view", article.DiffView.as_view() ) # account views self.signup_view = getattr( self, "signup_view", accounts.Signup.as_view() ) self.login_view = getattr(self, "login_view", accounts.Login.as_view()) self.logout_view = getattr( self, "logout_view", accounts.Logout.as_view() ) self.profile_update_view = getattr( self, "profile_update_view", accounts.Update.as_view() ) # deleted list view self.deleted_list_view = getattr( self, "deleted_list_view", deleted_list.DeletedListView.as_view() ) def get_urls(self): urlpatterns = self.get_root_urls() urlpatterns += self.get_accounts_urls() urlpatterns += self.get_deleted_list_urls() urlpatterns += self.get_revision_urls() urlpatterns += self.get_article_urls() urlpatterns += self.get_plugin_urls() # This ALWAYS has to be the last of all the patterns since # the paths in theory could wrongly match other targets. urlpatterns += self.get_article_path_urls() return urlpatterns @property def urls(self): return self.get_urls(), "wiki", self.name def get_root_urls(self): urlpatterns = [ re_path( r"^$", self.article_view, name="root", kwargs={"path": ""} ), re_path(r"^create-root/$", self.root_view, name="root_create"), re_path( r"^missing-root/$", self.root_missing_view, name="root_missing" ), re_path(r"^_search/$", self.search_view, name="search"), re_path( r"^_revision/diff/(?P<revision_id>[0-9]+)/$", self.article_diff_view, name="diff", ), ] return urlpatterns def get_deleted_list_urls(self): urlpatterns = [ re_path("^_admin/$", self.deleted_list_view, name="deleted_list"), ] return urlpatterns def get_accounts_urls(self): if settings.ACCOUNT_HANDLING: urlpatterns = [ re_path( r"^_accounts/sign-up/$", self.signup_view, name="signup" ), re_path( r"^_accounts/logout/$", self.logout_view, name="logout" ), re_path(r"^_accounts/login/$", self.login_view, name="login"), re_path( r"^_accounts/settings/$", self.profile_update_view, name="profile_update", ), ] else: urlpatterns = [] return urlpatterns def get_revision_urls(self): urlpatterns = [ # This one doesn't work because it don't know # where to redirect after... re_path( r"^change/(?P<revision_id>[0-9]+)/$", self.revision_change_view, name="change_revision", ), re_path( r"^preview/$", self.article_preview_view, name="preview_revision", ), re_path( r"^merge/(?P<revision_id>[0-9]+)/preview/$", self.revision_preview_merge_view, name="merge_revision_preview", ), ] return [ re_path( r"^_revision/(?P<article_id>[0-9]+)/", include(urlpatterns) ), ] def get_article_urls(self): urlpatterns = [ # Paths decided by article_ids re_path(r"^$", self.article_view, name="get"), re_path(r"^delete/$", self.article_delete_view, name="delete"), re_path(r"^deleted/$", self.article_deleted_view, name="deleted"), re_path(r"^edit/$", self.article_edit_view, name="edit"), re_path(r"^move/$", self.article_move_view, name="move"), re_path(r"^preview/$", self.article_preview_view, name="preview"), re_path(r"^history/$", self.article_history_view, name="history"), re_path( r"^settings/$", self.article_settings_view, name="settings" ), re_path(r"^source/$", self.article_source_view, name="source"), re_path( r"^revision/change/(?P<revision_id>[0-9]+)/$", self.revision_change_view, name="change_revision", ), re_path( r"^revision/merge/(?P<revision_id>[0-9]+)/$", self.revision_merge_view, name="merge_revision", ), re_path( r"^plugin/(?P<slug>\w+)/$", self.article_plugin_view, name="plugin", ), ] return [ re_path(r"^(?P<article_id>[0-9]+)/", include(urlpatterns)), ] def get_article_path_urls(self): urlpatterns = [ # Paths decided by URLs re_path( r"^(?P<path>.+/|)_create/$", self.article_create_view, name="create", ), re_path( r"^(?P<path>.+/|)_delete/$", self.article_delete_view, name="delete", ), re_path( r"^(?P<path>.+/|)_deleted/$", self.article_deleted_view, name="deleted", ), re_path( r"^(?P<path>.+/|)_edit/$", self.article_edit_view, name="edit" ), re_path( r"^(?P<path>.+/|)_move/$", self.article_move_view, name="move" ), re_path( r"^(?P<path>.+/|)_preview/$", self.article_preview_view, name="preview", ), re_path( r"^(?P<path>.+/|)_history/$", self.article_history_view, name="history", ), re_path( r"^(?P<path>.+/|)_dir/$", self.article_dir_view, name="dir" ), re_path( r"^(?P<path>.+/|)_search/$", self.search_view, name="search" ), re_path( r"^(?P<path>.+/|)_settings/$", self.article_settings_view, name="settings", ), re_path( r"^(?P<path>.+/|)_source/$", self.article_source_view, name="source", ), re_path( r"^(?P<path>.+/|)_revision/change/(?P<revision_id>[0-9]+)/$", self.revision_change_view, name="change_revision", ), re_path( r"^(?P<path>.+/|)_revision/merge/(?P<revision_id>[0-9]+)/$", self.revision_merge_view, name="merge_revision", ), re_path( r"^(?P<path>.+/|)_plugin/(?P<slug>\w+)/$", self.article_plugin_view, name="plugin", ), # This should always go last! re_path(r"^(?P<path>.+/|)$", self.article_view, name="get"), ] return urlpatterns def get_plugin_urls(self): urlpatterns = [] for plugin in registry.get_plugins().values(): slug = getattr(plugin, "slug", None) if slug: article_urlpatterns = plugin.urlpatterns.get("article", []) urlpatterns += [ re_path( r"^(?P<article_id>[0-9]+)/plugin/" + slug + "/", include(article_urlpatterns), ), re_path( r"^(?P<path>.+/|)_plugin/" + slug + "/", include(article_urlpatterns), ), ] root_urlpatterns = plugin.urlpatterns.get("root", []) urlpatterns += [ re_path( r"^_plugin/" + slug + "/", include(root_urlpatterns) ), ] return urlpatterns class DefaultWikiSite(LazyObject): def _setup(self): WikiSiteClass = import_string(apps.get_app_config("wiki").default_site) self._wrapped = WikiSiteClass() site = DefaultWikiSite()
11,493
Python
.py
304
25.358553
79
0.501299
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,134
__init__.py
django-wiki_django-wiki/src/wiki/__init__.py
# This package and all its sub-packages are part of django-wiki, # except where otherwise stated. # # django-wiki is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # django-wiki 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 General Public License for more details. # # You should have received a copy of the GNU General Public License # along with django-wiki. If not, see <http://www.gnu.org/licenses/>. default_app_config = "wiki.apps.WikiConfig"
774
Python
.py
16
47.3125
70
0.783355
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,135
admin.py
django-wiki_django-wiki/src/wiki/admin.py
from django import forms from django.contrib import admin from django.contrib.contenttypes.admin import GenericTabularInline from django.utils.translation import gettext_lazy as _ from mptt.admin import MPTTModelAdmin from . import editors from . import models class ArticleObjectAdmin(GenericTabularInline): model = models.ArticleForObject extra = 1 max_num = 1 raw_id_fields = ("article",) class ArticleRevisionForm(forms.ModelForm): class Meta: model = models.ArticleRevision exclude = () def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) # TODO: This pattern is too weird editor = editors.getEditor() self.fields["content"].widget = editor.get_admin_widget(self.instance) class ArticleRevisionAdmin(admin.ModelAdmin): form = ArticleRevisionForm list_display = ("title", "created", "modified", "user", "ip_address") class Media: js = editors.getEditorClass().AdminMedia.js css = editors.getEditorClass().AdminMedia.css class ArticleRevisionInline(admin.TabularInline): model = models.ArticleRevision form = ArticleRevisionForm fk_name = "article" extra = 1 fields = ( "content", "title", "deleted", "locked", ) class Media: js = editors.getEditorClass().AdminMedia.js css = editors.getEditorClass().AdminMedia.css class ArticleForm(forms.ModelForm): class Meta: model = models.Article exclude = () def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) if self.instance.pk: revisions = models.ArticleRevision.objects.select_related( "article" ).filter(article=self.instance) self.fields["current_revision"].queryset = revisions else: self.fields[ "current_revision" ].queryset = models.ArticleRevision.objects.none() self.fields["current_revision"].widget = forms.HiddenInput() class ArticleAdmin(admin.ModelAdmin): inlines = [ArticleRevisionInline] form = ArticleForm search_fields = ("current_revision__title", "current_revision__content") class URLPathAdmin(MPTTModelAdmin): inlines = [ArticleObjectAdmin] list_filter = ( "site", "articles__article__current_revision__deleted", "articles__article__created", "articles__article__modified", ) list_display = ("__str__", "article", "get_created") raw_id_fields = ("article",) def get_created(self, instance): return instance.article.created get_created.short_description = _("created") def save_model(self, request, obj, form, change): """ Ensure that there is a generic relation from the article to the URLPath """ obj.save() obj.article.add_object_relation(obj) admin.site.register(models.URLPath, URLPathAdmin) admin.site.register(models.Article, ArticleAdmin) admin.site.register(models.ArticleRevision, ArticleRevisionAdmin)
3,096
Python
.py
83
30.566265
79
0.671462
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,136
decorators.py
django-wiki_django-wiki/src/wiki/decorators.py
from functools import wraps from urllib.parse import quote as urlquote from django.http import Http404 from django.http import HttpResponseForbidden from django.http import HttpResponseNotFound from django.http import HttpResponseRedirect from django.shortcuts import redirect from django.template.loader import render_to_string from django.urls import reverse from wiki.conf import settings from wiki.core.exceptions import NoRootURL from . import models def response_forbidden(request, article, urlpath, read_denied=False): if request.user.is_anonymous: qs = request.META.get("QUERY_STRING", "") if qs: qs = urlquote("?" + qs) else: qs = "" return redirect(settings.LOGIN_URL + "?next=" + request.path + qs) else: return HttpResponseForbidden( render_to_string( "wiki/permission_denied.html", context={ "article": article, "urlpath": urlpath, "read_denied": read_denied, }, request=request, ) ) def which_article(path=None, article_id=None, **kwargs): # fetch by path if path is not None: urlpath = models.URLPath.get_by_path(path, select_related=True) if urlpath.article: # urlpath is already smart about prefetching items on article # (like current_revision), so we don't have to article = urlpath.article else: # Be robust: Somehow article is gone but urlpath exists... # clean up urlpath.delete() raise models.URLPath.DoesNotExist() # fetch by article.id elif article_id is not None: # TODO We should try to grab the article from URLPath so the # caching is good, and fall back to grabbing it from # Article.objects if not article = models.Article.objects.get(id=article_id) try: urlpath = models.URLPath.objects.get(articles__article=article) except ( models.URLPath.DoesNotExist, models.URLPath.MultipleObjectsReturned, ): urlpath = None else: raise TypeError("You should specify either article_id or path") return article, urlpath # TODO: This decorator is too complex (C901) def get_article( # noqa: max-complexity 19 func=None, can_read=True, can_write=False, deleted_contents=False, not_locked=False, can_delete=False, can_moderate=False, can_create=False, ): """View decorator for processing standard url keyword args: Intercepts the keyword args path or article_id and looks up an article, calling the decorated func with this ID. Will accept a ``func(request, article, *args, **kwargs)`` NB! This function will redirect if an article does not exist, permissions are missing or the article is deleted. Arguments: can_read=True and/or can_write=True: Check that the current request.user has correct permissions. can_delete and can_moderate: Verifies with wiki.core.permissions can_create: Same as can_write but adds an extra global setting for anonymous access (ANONYMOUS_CREATE) deleted_contents=True: Do not redirect if the article has been deleted. not_locked=True: Return permission denied if the article is locked Also see: wiki.views.mixins.ArticleMixin """ def wrapper(request, *args, **kwargs): path = kwargs.pop("path", None) article_id = kwargs.pop("article_id", None) try: article, urlpath = which_article(path, article_id) except NoRootURL: return redirect("wiki:root_create") except models.Article.DoesNotExist: raise Http404(f"Article id {article_id} not found") except models.URLPath.DoesNotExist: try: pathlist = list( filter( lambda x: x != "", path.split("/"), ) ) path = "/".join(pathlist[:-1]) parent = models.URLPath.get_by_path(path) return HttpResponseRedirect( reverse("wiki:create", kwargs={"path": parent.path}) + "?slug=%s" % pathlist[-1].lower() ) except models.URLPath.DoesNotExist: return HttpResponseNotFound( render_to_string( "wiki/error.html", context={"error_type": "ancestors_missing"}, request=request, ) ) if not deleted_contents: # If the article has been deleted, show a special page. if urlpath: if urlpath.is_deleted(): # This also checks all ancestors return redirect("wiki:deleted", path=urlpath.path) else: if ( article.current_revision and article.current_revision.deleted ): return redirect("wiki:deleted", article_id=article.id) if article.current_revision.locked and not_locked: return response_forbidden(request, article, urlpath) if can_read and not article.can_read(request.user): return response_forbidden( request, article, urlpath, read_denied=True ) if (can_write or can_create) and not article.can_write(request.user): return response_forbidden(request, article, urlpath) if can_create and not ( request.user.is_authenticated or settings.ANONYMOUS_CREATE ): return response_forbidden(request, article, urlpath) if can_delete and not article.can_delete(request.user): return response_forbidden(request, article, urlpath) if can_moderate and not article.can_moderate(request.user): return response_forbidden(request, article, urlpath) kwargs["urlpath"] = urlpath return func(request, article, *args, **kwargs) if func: return wrapper else: return lambda func: get_article( func, can_read=can_read, can_write=can_write, deleted_contents=deleted_contents, not_locked=not_locked, can_delete=can_delete, can_moderate=can_moderate, can_create=can_create, ) def disable_signal_for_loaddata(signal_handler): """ Decorator that turns off signal handlers when loading fixture data. """ @wraps(signal_handler) def wrapper(*args, **kwargs): if kwargs.get("raw", False): return return signal_handler(*args, **kwargs) return wrapper
6,904
Python
.py
170
30.117647
106
0.610597
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,137
forms.py
django-wiki_django-wiki/src/wiki/forms.py
__all__ = [ "UserCreationForm", "UserUpdateForm", "WikiSlugField", "SpamProtectionMixin", "CreateRootForm", "MoveForm", "EditForm", "SelectWidgetBootstrap", "TextInputPrepend", "CreateForm", "DeleteForm", "PermissionsForm", "DirFilterForm", "SearchForm", ] from datetime import timedelta from django import forms from django.apps import apps from django.contrib.auth import get_user_model from django.core import validators from django.core.validators import RegexValidator from django.forms.widgets import HiddenInput from django.shortcuts import get_object_or_404 from django.urls import Resolver404, resolve from django.utils import timezone from django.utils.safestring import mark_safe from django.utils.translation import gettext, gettext_lazy as _, pgettext_lazy from wiki import models from wiki.conf import settings from wiki.core import permissions from wiki.core.diff import simple_merge from wiki.core.plugins.base import PluginSettingsFormMixin from wiki.editors import getEditor from .forms_account_handling import UserCreationForm, UserUpdateForm validate_slug_numbers = RegexValidator( r"^[0-9]+$", _("A 'slug' cannot consist solely of numbers."), "invalid", inverse_match=True, ) class WikiSlugField(forms.CharField): """ In future versions of Django, we might be able to define this field as the default field directly on the model. For now, it's used in CreateForm. """ default_validators = [validators.validate_slug, validate_slug_numbers] def __init__(self, *args, **kwargs): self.allow_unicode = kwargs.pop("allow_unicode", False) if self.allow_unicode: self.default_validators = [ validators.validate_unicode_slug, validate_slug_numbers, ] super().__init__(*args, **kwargs) def _clean_slug(slug, urlpath): if slug.startswith("_"): raise forms.ValidationError( gettext("A slug may not begin with an underscore.") ) if slug == "admin": raise forms.ValidationError( gettext("'admin' is not a permitted slug name.") ) if settings.URL_CASE_SENSITIVE: already_existing_slug = models.URLPath.objects.filter( slug=slug, parent=urlpath ) else: slug = slug.lower() already_existing_slug = models.URLPath.objects.filter( slug__iexact=slug, parent=urlpath ) if already_existing_slug: already_urlpath = already_existing_slug[0] if ( already_urlpath.article and already_urlpath.article.current_revision.deleted ): raise forms.ValidationError( gettext('A deleted article with slug "%s" already exists.') % already_urlpath.slug ) else: raise forms.ValidationError( gettext('A slug named "%s" already exists.') % already_urlpath.slug ) if settings.CHECK_SLUG_URL_AVAILABLE: try: # Fail validation if URL resolves to non-wiki app match = resolve(urlpath.path + "/" + slug + "/") if match.app_name != "wiki": raise forms.ValidationError( gettext("This slug conflicts with an existing URL.") ) except Resolver404: pass return slug User = get_user_model() Group = apps.get_model(settings.GROUP_MODEL) class SpamProtectionMixin: """Check a form for spam. Only works if properties 'request' and 'revision_model' are set.""" revision_model = models.ArticleRevision # TODO: This method is too complex (C901) def check_spam(self): # noqa """Check that user or IP address does not perform content edits that are not allowed. current_revision can be any object inheriting from models.BaseRevisionMixin """ request = self.request user = None ip_address = None if request.user.is_authenticated: user = request.user else: ip_address = request.META.get( "HTTP_X_REAL_IP", None ) or request.META.get("REMOTE_ADDR", None) if not (user or ip_address): raise forms.ValidationError( gettext( "Spam protection failed to find both a logged in user and an IP address." ) ) def check_interval(from_time, max_count, interval_name): from_time = timezone.now() - timedelta( minutes=settings.REVISIONS_MINUTES_LOOKBACK ) revisions = self.revision_model.objects.filter( created__gte=from_time, ) if user: revisions = revisions.filter(user=user) if ip_address: revisions = revisions.filter(ip_address=ip_address) revisions = revisions.count() if revisions >= max_count: raise forms.ValidationError( gettext( "Spam protection: You are only allowed to create or edit %(revisions)d article(s) per %(interval_name)s." ) % {"revisions": max_count, "interval_name": interval_name} ) if not settings.LOG_IPS_ANONYMOUS: return if request.user.has_perm("wiki.moderator"): return from_time = timezone.now() - timedelta( minutes=settings.REVISIONS_MINUTES_LOOKBACK ) if request.user.is_authenticated: per_minute = settings.REVISIONS_PER_MINUTES else: per_minute = settings.REVISIONS_PER_MINUTES_ANONYMOUS check_interval( from_time, per_minute, _("minute") if settings.REVISIONS_MINUTES_LOOKBACK == 1 else (_("%d minutes") % settings.REVISIONS_MINUTES_LOOKBACK), ) from_time = timezone.now() - timedelta(minutes=60) if request.user.is_authenticated: per_hour = settings.REVISIONS_PER_MINUTES else: per_hour = settings.REVISIONS_PER_MINUTES_ANONYMOUS check_interval(from_time, per_hour, _("hour")) class CreateRootForm(forms.Form): title = forms.CharField( label=_("Title"), help_text=_( "Initial title of the article. May be overridden with revision titles." ), ) content = forms.CharField( label=_("Type in some contents"), help_text=_( "This is just the initial contents of your article. After creating it, you can use more complex features like adding plugins, meta data, related articles etc..." ), required=False, widget=getEditor().get_widget(), ) # @UndefinedVariable class MoveForm(forms.Form): destination = forms.CharField(label=_("Destination")) slug = WikiSlugField(max_length=models.URLPath.SLUG_MAX_LENGTH) redirect = forms.BooleanField( label=_("Redirect pages"), help_text=_("Create a redirect page for every moved article?"), required=False, ) def clean(self): cd = super().clean() if cd.get("slug"): dest_path = get_object_or_404( models.URLPath, pk=self.cleaned_data["destination"] ) cd["slug"] = _clean_slug(cd["slug"], dest_path) return cd class EditForm(forms.Form, SpamProtectionMixin): title = forms.CharField( label=_("Title"), ) content = forms.CharField( label=_("Contents"), required=False ) # @UndefinedVariable summary = forms.CharField( label=pgettext_lazy("Revision comment", "Summary"), help_text=_( "Give a short reason for your edit, which will be stated in the revision log." ), required=False, ) current_revision = forms.IntegerField( required=False, widget=forms.HiddenInput() ) def __init__(self, request, current_revision, *args, **kwargs): self.request = request self.no_clean = kwargs.pop("no_clean", False) self.preview = kwargs.pop("preview", False) self.initial_revision = current_revision self.presumed_revision = None if current_revision: # For e.g. editing a section of the text: The content provided by the caller is used. # Otherwise use the content of the revision. provided_content = True content = kwargs.pop("content", None) if content is None: provided_content = False content = current_revision.content initial = { "content": content, "title": current_revision.title, "current_revision": current_revision.id, } initial.update(kwargs.get("initial", {})) # Manipulate any data put in args[0] such that the current_revision # is reset to match the actual current revision. data = None if len(args) > 0: data = args[0] args = args[1:] if data is None: data = kwargs.get("data", None) if data: self.presumed_revision = data.get("current_revision", None) if not str(self.presumed_revision) == str( self.initial_revision.id ): newdata = {} for k, v in data.items(): newdata[k] = v newdata["current_revision"] = self.initial_revision.id # Don't merge if content comes from the caller if provided_content: self.presumed_revision = self.initial_revision.id else: newdata["content"] = simple_merge( content, data.get("content", "") ) newdata["title"] = current_revision.title kwargs["data"] = newdata else: # Always pass as kwarg kwargs["data"] = data kwargs["initial"] = initial super().__init__(*args, **kwargs) self.fields["content"].widget = getEditor().get_widget( current_revision ) def clean_title(self): title = self.cleaned_data.get("title", None) title = (title or "").strip() if not title: raise forms.ValidationError( gettext("Article is missing title or has an invalid title") ) return title def clean(self): """Validates form data by checking for the following No new revisions have been created since user attempted to edit Revision title or content has changed """ if self.no_clean or self.preview: return self.cleaned_data if not str(self.initial_revision.id) == str(self.presumed_revision): raise forms.ValidationError( gettext( "While you were editing, someone else changed the revision. Your contents have been automatically merged with the new contents. Please review the text below." ) ) if ( "title" in self.cleaned_data and self.cleaned_data["title"] == self.initial_revision.title and self.cleaned_data["content"] == self.initial_revision.content ): raise forms.ValidationError( gettext("No changes made. Nothing to save.") ) self.check_spam() return self.cleaned_data class SelectWidgetBootstrap(forms.Select): """ Formerly, we used Bootstrap 3's dropdowns. They look nice. But to reduce bugs and reliance on JavaScript, it's now been replaced by a conventional system platform drop-down. https://getbootstrap.com/docs/4.4/components/dropdowns/ """ def __init__(self, attrs=None, choices=()): if attrs is None: attrs = {"class": ""} elif "class" not in attrs: attrs["class"] = "" attrs["class"] += " form-control" super().__init__(attrs, choices) class TextInputPrepend(forms.TextInput): template_name = "wiki/forms/text.html" def __init__(self, *args, **kwargs): self.prepend = kwargs.pop("prepend", "") super().__init__(*args, **kwargs) def get_context(self, name, value, attrs): context = super().get_context(name, value, attrs) context["prepend"] = mark_safe(self.prepend) return context class CreateForm(forms.Form, SpamProtectionMixin): def __init__(self, request, urlpath_parent, *args, **kwargs): super().__init__(*args, **kwargs) self.request = request self.urlpath_parent = urlpath_parent title = forms.CharField( label=_("Title"), ) slug = WikiSlugField( label=_("Slug"), help_text=_( "This will be the address where your article can be found. Use only alphanumeric characters and - or _.<br>Note: If you change the slug later on, links pointing to this article are <b>not</b> updated." ), max_length=models.URLPath.SLUG_MAX_LENGTH, ) content = forms.CharField( label=_("Contents"), required=False, widget=getEditor().get_widget() ) # @UndefinedVariable summary = forms.CharField( label=pgettext_lazy("Revision comment", "Summary"), help_text=_("Write a brief message for the article's history log."), required=False, ) def clean_slug(self): return _clean_slug(self.cleaned_data["slug"], self.urlpath_parent) def clean(self): self.check_spam() return self.cleaned_data class DeleteForm(forms.Form): def __init__(self, *args, **kwargs): self.article = kwargs.pop("article") self.has_children = kwargs.pop("has_children") super().__init__(*args, **kwargs) confirm = forms.BooleanField(required=False, label=_("Yes, I am sure")) purge = forms.BooleanField( widget=HiddenInput(), required=False, label=_("Purge"), help_text=_( "Purge the article: Completely remove it (and all its contents) with no undo. Purging is a good idea if you want to free the slug such that users can create new articles in its place." ), ) revision = forms.ModelChoiceField( models.ArticleRevision.objects.all(), widget=HiddenInput(), required=False, ) def clean(self): if not self.cleaned_data["confirm"]: raise forms.ValidationError(gettext("You are not sure enough!")) if self.cleaned_data["revision"] != self.article.current_revision: raise forms.ValidationError( gettext( "While you tried to delete this article, it was modified. TAKE CARE!" ) ) return self.cleaned_data class PermissionsForm(PluginSettingsFormMixin, forms.ModelForm): locked = forms.BooleanField( label=_("Lock article"), help_text=_("Deny all users access to edit this article."), required=False, ) settings_form_headline = _("Permissions") settings_order = 5 settings_write_access = False owner_username = forms.CharField( required=False, label=_("Owner"), help_text=_("Enter the username of the owner."), ) group = forms.ModelChoiceField( Group.objects.all(), empty_label=_("(none)"), label=_("Group"), required=False, widget=forms.Select(attrs={"class": "form-control"}), ) if settings.USE_BOOTSTRAP_SELECT_WIDGET: group.widget = SelectWidgetBootstrap() recursive = forms.BooleanField( label=_("Inherit permissions"), help_text=_( "Check here to apply the above permissions (excluding group and owner of the article) recursively to articles below this one." ), required=False, ) recursive_owner = forms.BooleanField( label=_("Inherit owner"), help_text=_( "Check here to apply the ownership setting recursively to articles below this one." ), required=False, ) recursive_group = forms.BooleanField( label=_("Inherit group"), help_text=_( "Check here to apply the group setting recursively to articles below this one." ), required=False, ) def get_usermessage(self): if self.changed_data: return _("Permission settings for the article were updated.") else: return _( "Your permission settings were unchanged, so nothing saved." ) def __init__(self, article, request, *args, **kwargs): self.article = article self.user = request.user self.request = request kwargs["instance"] = article kwargs["initial"] = {"locked": article.current_revision.locked} super().__init__(*args, **kwargs) self.can_change_groups = False self.can_assign = False if permissions.can_assign(article, request.user): self.can_assign = True self.can_change_groups = True self.fields["group"].queryset = Group.objects.all() elif permissions.can_assign_owner(article, request.user): self.fields["group"].queryset = Group.objects.filter( user=request.user ) self.can_change_groups = True else: # Quick-fix... # Set the group dropdown to readonly and with the current # group as only selectable option self.fields["group"] = forms.ModelChoiceField( queryset=Group.objects.filter(id=self.instance.group.id) if self.instance.group else Group.objects.none(), empty_label=_("(none)"), required=False, widget=SelectWidgetBootstrap(attrs={"disabled": True}) if settings.USE_BOOTSTRAP_SELECT_WIDGET else forms.Select(attrs={"disabled": True}), ) self.fields["group_read"].widget = forms.HiddenInput() self.fields["group_write"].widget = forms.HiddenInput() if not self.can_assign: self.fields["owner_username"].widget = forms.TextInput( attrs={"readonly": "true"} ) self.fields["recursive"].widget = forms.HiddenInput() self.fields["recursive_group"].widget = forms.HiddenInput() self.fields["recursive_owner"].widget = forms.HiddenInput() self.fields["locked"].widget = forms.HiddenInput() self.fields["owner_username"].initial = ( getattr(article.owner, User.USERNAME_FIELD) if article.owner else "" ) def clean_owner_username(self): if self.can_assign: username = self.cleaned_data["owner_username"] if username: try: kwargs = {User.USERNAME_FIELD: username} user = User.objects.get(**kwargs) except User.DoesNotExist: raise forms.ValidationError( gettext("No user with that username") ) else: user = None else: user = self.article.owner return user def save(self, commit=True): article = super().save(commit=False) # Alter the owner according to the form field owner_username # TODO: Why not rename this field to 'owner' so this happens # automatically? article.owner = self.cleaned_data["owner_username"] # Revert any changes to group permissions if the # current user is not allowed (see __init__) # TODO: Write clean methods for this instead! if not self.can_change_groups: article.group = self.article.group article.group_read = self.article.group_read article.group_write = self.article.group_write if self.can_assign: if self.cleaned_data["recursive"]: article.set_permissions_recursive() if self.cleaned_data["recursive_owner"]: article.set_owner_recursive() if self.cleaned_data["recursive_group"]: article.set_group_recursive() if ( self.cleaned_data["locked"] and not article.current_revision.locked ): revision = models.ArticleRevision() revision.inherit_predecessor(self.article) revision.set_from_request(self.request) revision.automatic_log = _("Article locked for editing") revision.locked = True self.article.add_revision(revision) elif ( not self.cleaned_data["locked"] and article.current_revision.locked ): revision = models.ArticleRevision() revision.inherit_predecessor(self.article) revision.set_from_request(self.request) revision.automatic_log = _("Article unlocked for editing") revision.locked = False self.article.add_revision(revision) article.save() class Meta: model = models.Article fields = ( "locked", "owner_username", "recursive_owner", "group", "recursive_group", "group_read", "group_write", "other_read", "other_write", "recursive", ) widgets = {} class DirFilterForm(forms.Form): query = forms.CharField( widget=forms.TextInput( attrs={"placeholder": _("Filter..."), "class": "search-query"} ), required=False, ) class SearchForm(forms.Form): q = forms.CharField( widget=forms.TextInput( attrs={"placeholder": _("Search..."), "class": "search-query"} ), required=False, )
22,515
Python
.py
565
29.40354
213
0.590075
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,138
managers.py
django-wiki_django-wiki/src/wiki/managers.py
from django.db import models from django.db.models import Count from django.db.models import Q from django.db.models.query import EmptyQuerySet from django.db.models.query import QuerySet from mptt.managers import TreeManager class ArticleQuerySet(QuerySet): def can_read(self, user): """Filter objects so only the ones with a user's reading access are included""" if user.has_perm("wiki.moderator"): return self if user.is_anonymous: q = self.filter(other_read=True) else: q = self.filter( Q(other_read=True) | Q(owner=user) | (Q(group__user=user) & Q(group_read=True)) ).annotate(Count("id")) return q def can_write(self, user): """Filter objects so only the ones with a user's writing access are included""" if user.has_perm("wiki.moderator"): return self if user.is_anonymous: q = self.filter(other_write=True) else: q = self.filter( Q(other_write=True) | Q(owner=user) | (Q(group__user=user) & Q(group_write=True)) ) return q def active(self): return self.filter(current_revision__deleted=False) class ArticleEmptyQuerySet(EmptyQuerySet): def can_read(self, user): return self def can_write(self, user): return self def active(self): return self class ArticleFkQuerySetMixin: def can_read(self, user): """Filter objects so only the ones with a user's reading access are included""" if user.has_perm("wiki.moderate"): return self if user.is_anonymous: q = self.filter(article__other_read=True) else: # https://github.com/django-wiki/django-wiki/issues/67 q = self.filter( Q(article__other_read=True) | Q(article__owner=user) | (Q(article__group__user=user) & Q(article__group_read=True)) ).annotate(Count("id")) return q def can_write(self, user): """Filter objects so only the ones with a user's writing access are included""" if user.has_perm("wiki.moderate"): return self if user.is_anonymous: q = self.filter(article__other_write=True) else: # https://github.com/django-wiki/django-wiki/issues/67 q = self.filter( Q(article__other_write=True) | Q(article__owner=user) | (Q(article__group__user=user) & Q(article__group_write=True)) ).annotate(Count("id")) return q def active(self): return self.filter(article__current_revision__deleted=False) class ArticleFkEmptyQuerySetMixin: def can_read(self, user): return self def can_write(self, user): return self def active(self): return self class ArticleFkQuerySet(ArticleFkQuerySetMixin, QuerySet): pass class ArticleFkEmptyQuerySet(ArticleFkEmptyQuerySetMixin, EmptyQuerySet): pass class ArticleManager(models.Manager): def get_empty_query_set(self): return self.get_queryset().none() def get_queryset(self): return ArticleQuerySet(self.model, using=self._db) def active(self): return self.get_queryset().active() def can_read(self, user): return self.get_queryset().can_read(user) def can_write(self, user): return self.get_queryset().can_write(user) class ArticleFkManager(models.Manager): def get_empty_query_set(self): return self.get_queryset().none() def get_queryset(self): return ArticleFkQuerySet(self.model, using=self._db) def active(self): return self.get_queryset().active() def can_read(self, user): return self.get_queryset().can_read(user) def can_write(self, user): return self.get_queryset().can_write(user) class URLPathEmptyQuerySet(EmptyQuerySet, ArticleFkEmptyQuerySetMixin): def select_related_common(self): return self def default_order(self): return self class URLPathQuerySet(QuerySet, ArticleFkQuerySetMixin): def select_related_common(self): return self.select_related( "parent", "article__current_revision", "article__owner" ) def default_order(self): """Returns elements by there article order""" return self.order_by("article__current_revision__title") class URLPathManager(TreeManager): def get_empty_query_set(self): return self.get_queryset().none() def get_queryset(self): """Return a QuerySet with the same ordering as the TreeManager.""" return URLPathQuerySet(self.model, using=self._db).order_by( self.tree_id_attr, self.left_attr ) def select_related_common(self): return self.get_queryset().common_select_related() def active(self): return self.get_queryset().active() def can_read(self, user): return self.get_queryset().can_read(user) def can_write(self, user): return self.get_queryset().can_write(user)
5,264
Python
.py
139
29.23741
79
0.630315
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,139
pluginbase.py
django-wiki_django-wiki/src/wiki/models/pluginbase.py
""" There are three kinds of plugin base models: 1) SimplePlugin - an object purely associated with an article. Will bump the article's revision history upon creation, and rolling back an article will make it go away (not from the database, you can roll forwards again). 2) RevisionPlugin - an object with its own revisions. The object will have its own history independent of the article. The strategy is that you will provide different code for the article text while including it, so it will indirectly affect the article history, but you have the force of rolling back this object independently. 3) ReusablePlugin - a plugin that can be used on many articles. Please note that the logics for keeping revisions on such plugins are complicated, so you have to implement that on your own. Furthermore, you need to be aware of the permission system! """ from django.db import models from django.db.models import signals from django.utils.translation import gettext_lazy as _ from wiki.decorators import disable_signal_for_loaddata from .article import ArticleRevision from .article import BaseRevisionMixin __all__ = [ "ArticlePlugin", "SimplePlugin", "SimplePluginCreateError", "ReusablePlugin", "RevisionPlugin", "RevisionPluginRevision", ] class ArticlePlugin(models.Model): """This is the mother of all plugins. Extending from it means a deletion of an article will CASCADE to your plugin, and the database will be kept clean. Furthermore, it's possible to list all plugins and maintain generic properties in the future...""" article = models.ForeignKey( "wiki.Article", on_delete=models.CASCADE, verbose_name=_("article") ) deleted = models.BooleanField(default=False) created = models.DateTimeField(auto_now_add=True) # Permission methods - you should override these, if they don't fit your # logic. def can_read(self, user): return self.article.can_read(user) def can_write(self, user): return self.article.can_write(user) def can_delete(self, user): return self.article.can_delete(user) def can_moderate(self, user): return self.article.can_moderate(user) def purge(self): """Remove related contents completely, ie. media files.""" pass class ReusablePlugin(ArticlePlugin): """Extend from this model if you have a plugin that may be related to many articles. Please note that the ArticlePlugin.article ForeignKey STAYS! This is in order to maintain an explicit set of permissions. In general, it's quite complicated to maintain plugin content that's shared between different articles. The best way to go is to avoid this. For inspiration, look at wiki.plugins.attachments You might have to override the permission methods (can_read, can_write etc.) if you have certain needs for logic in your reusable plugin. """ # The article on which the plugin was originally created. # Used to apply permissions. ArticlePlugin.article.on_delete = models.SET_NULL ArticlePlugin.article.verbose_name = _("original article") ArticlePlugin.article.help_text = _( "Permissions are inherited from this article" ) ArticlePlugin.article.null = True ArticlePlugin.article.blank = True articles = models.ManyToManyField( "wiki.Article", related_name="shared_plugins_set" ) # Since the article relation may be None, we have to check for this # before handling permissions.... def can_read(self, user): return self.article.can_read(user) if self.article else False def can_write(self, user): return self.article.can_write(user) if self.article else False def can_delete(self, user): return self.article.can_delete(user) if self.article else False def can_moderate(self, user): return self.article.can_moderate(user) if self.article else False class SimplePluginCreateError(Exception): pass class SimplePlugin(ArticlePlugin): """ Inherit from this model and make sure to specify an article when saving a new instance. This way, a new revision will be created, and users are able to roll back to the a previous revision (in which your plugin wasn't related to the article). Furthermore, your plugin relation is kept when new revisions are created. Usage: class YourPlugin(SimplePlugin): ... Creating new plugins instances: YourPlugin(article=article_instance, ...) or YourPlugin.objects.create(article=article_instance, ...) """ # The article revision that this plugin is attached to article_revision = models.ForeignKey( "wiki.ArticleRevision", on_delete=models.CASCADE ) def __init__(self, *args, **kwargs): article = kwargs.pop("article", None) super().__init__(*args, **kwargs) if not self.pk and not article: raise SimplePluginCreateError( "Keyword argument 'article' expected." ) elif self.pk: self.article = self.article_revision.article else: self.article = article def get_logmessage(self): return _("A plugin was changed") class RevisionPlugin(ArticlePlugin): """ If you want your plugin to maintain revisions, extend from this one, not SimplePlugin. This kind of plugin is not attached to article plugins so rolling articles back and forth does not affect it. """ # The current revision of this plugin, if any! current_revision = models.OneToOneField( "RevisionPluginRevision", verbose_name=_("current revision"), blank=True, null=True, on_delete=models.CASCADE, related_name="plugin_set", help_text=_( "The revision being displayed for this plugin. " "If you need to do a roll-back, simply change the value of this field." ), ) def add_revision(self, new_revision, save=True): """ Sets the properties of a revision and ensures its the current revision. """ assert self.id or save, ( "RevisionPluginRevision.add_revision: Sorry, you cannot add a" "revision to a plugin that has not been saved " "without using save=True" ) if not self.id: self.save() revisions = self.revision_set.all() try: new_revision.revision_number = ( revisions.latest().revision_number + 1 ) except RevisionPluginRevision.DoesNotExist: new_revision.revision_number = 0 new_revision.plugin = self new_revision.previous_revision = self.current_revision if save: new_revision.save() self.current_revision = new_revision if save: self.save() class RevisionPluginRevision(BaseRevisionMixin, models.Model): """ If you want your plugin to maintain revisions, make an extra model that extends from this one. (this class is very much copied from wiki.models.article.ArticleRevision """ plugin = models.ForeignKey( RevisionPlugin, on_delete=models.CASCADE, related_name="revision_set" ) class Meta: # Override this setting with app_label = '' in your extended model # if it lives outside the wiki app. get_latest_by = "revision_number" ordering = ("-created",) ###################################################### # SIGNAL HANDLERS ###################################################### # Look at me. I'm a plane. # And the plane becomes a metaphor for my life. # It's my art, when I disguise my body in the shape of a plane. # (Shellac, 1993) @disable_signal_for_loaddata def update_simple_plugins(**kwargs): """Every time a new article revision is created, we update all active plugins to match this article revision""" instance = kwargs["instance"] if kwargs.get("created", False): p_revisions = SimplePlugin.objects.filter( article=instance.article, deleted=False ) # TODO: This was breaking things. SimplePlugin doesn't have a revision? p_revisions.update(article_revision=instance) @disable_signal_for_loaddata def on_simple_plugins_pre_save(**kwargs): instance = kwargs["instance"] if instance._state.adding: if not instance.article.current_revision: raise SimplePluginCreateError( "Article does not have a current_revision set." ) new_revision = ArticleRevision() new_revision.inherit_predecessor(instance.article) new_revision.automatic_log = instance.get_logmessage() new_revision.save() instance.article_revision = new_revision @disable_signal_for_loaddata def on_article_plugin_post_save(**kwargs): articleplugin = kwargs["instance"] articleplugin.article.clear_cache() @disable_signal_for_loaddata def on_reusable_plugin_pre_save(**kwargs): # Automatically make the original article the first one in the added # set instance = kwargs["instance"] if not instance.article: articles = instance.articles.all() if articles.exists(): instance.article = articles[0] @disable_signal_for_loaddata def on_revision_plugin_revision_post_save(**kwargs): # Automatically make the original article the first one in the added # set instance = kwargs["instance"] if not instance.plugin.current_revision: # If I'm saved from Django admin, then plugin.current_revision is # me! instance.plugin.current_revision = instance instance.plugin.save() # Invalidate plugin's article cache instance.plugin.article.clear_cache() @disable_signal_for_loaddata def on_revision_plugin_revision_pre_save(**kwargs): instance = kwargs["instance"] if instance._state.adding: update_previous_revision = ( not instance.previous_revision and instance.plugin and instance.plugin.current_revision and instance.plugin.current_revision != instance ) if update_previous_revision: instance.previous_revision = instance.plugin.current_revision if not instance.revision_number: try: previous_revision = instance.plugin.revision_set.latest() instance.revision_number = previous_revision.revision_number + 1 except RevisionPluginRevision.DoesNotExist: instance.revision_number = 1 @disable_signal_for_loaddata def on_reusable_plugin_post_save(**kwargs): reusableplugin = kwargs["instance"] for article in reusableplugin.articles.all(): article.clear_cache() signals.post_save.connect(update_simple_plugins, ArticleRevision) signals.post_save.connect(on_article_plugin_post_save, ArticlePlugin) signals.post_save.connect(on_reusable_plugin_post_save, ReusablePlugin) signals.post_save.connect( on_revision_plugin_revision_post_save, RevisionPluginRevision ) signals.pre_save.connect(on_reusable_plugin_pre_save, ReusablePlugin) signals.pre_save.connect( on_revision_plugin_revision_pre_save, RevisionPluginRevision ) signals.pre_save.connect(on_simple_plugins_pre_save, SimplePlugin)
11,400
Python
.py
267
36.097378
85
0.694944
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,140
__init__.py
django-wiki_django-wiki/src/wiki/models/__init__.py
from django import shortcuts from django import urls from django.urls import base from django.utils.functional import lazy from .article import * # noqa from .pluginbase import * # noqa from .urlpath import * # noqa original_django_reverse = urls.reverse def reverse(*args, **kwargs): """Now this is a crazy and silly hack, but it is basically here to enforce that an empty path always takes precedence over an article_id such that the root article doesn't get resolved to /ID/ but /. Another crazy hack that this supports is transforming every wiki url by a function. If _transform_url is set on this function, it will return the result of calling reverse._transform_url(reversed_url) for every url in the wiki namespace. """ if isinstance(args[0], str) and args[0].startswith("wiki:"): url_kwargs = kwargs.get("kwargs", {}) path = url_kwargs.get("path", False) # If a path is supplied then discard the article_id if path is not False: url_kwargs.pop("article_id", None) url_kwargs["path"] = path kwargs["kwargs"] = url_kwargs url = original_django_reverse(*args, **kwargs) if hasattr(reverse, "_transform_url"): url = reverse._transform_url(url) else: url = original_django_reverse(*args, **kwargs) return url reverse_lazy = lazy(reverse, str) # Patch up other locations of the reverse function base.reverse = reverse base.reverse_lazy = reverse_lazy urls.reverse = reverse urls.reverse_lazy = reverse_lazy shortcuts.reverse = reverse
1,599
Python
.py
38
36.894737
73
0.70129
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,141
article.py
django-wiki_django-wiki/src/wiki/models/article.py
from django.conf import settings as django_settings from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.core.cache import cache from django.db import models from django.db.models.fields import GenericIPAddressField as IPAddressField from django.db.models.signals import post_save from django.db.models.signals import pre_delete from django.db.models.signals import pre_save from django.urls import reverse from django.utils import translation from django.utils.safestring import mark_safe from django.utils.text import slugify from django.utils.translation import gettext_lazy as _ from mptt.models import MPTTModel from wiki import managers from wiki.conf import settings from wiki.core import permissions from wiki.core.markdown import article_markdown from wiki.decorators import disable_signal_for_loaddata __all__ = [ "Article", "ArticleForObject", "ArticleRevision", "BaseRevisionMixin", ] class Article(models.Model): objects = managers.ArticleManager() current_revision = models.OneToOneField( "ArticleRevision", verbose_name=_("current revision"), blank=True, null=True, related_name="current_set", on_delete=models.CASCADE, help_text=_( "The revision being displayed for this article. If you need to do a roll-back, simply change the value of this field." ), ) created = models.DateTimeField( auto_now_add=True, verbose_name=_("created"), ) modified = models.DateTimeField( auto_now=True, verbose_name=_("modified"), help_text=_("Article properties last modified"), ) owner = models.ForeignKey( django_settings.AUTH_USER_MODEL, verbose_name=_("owner"), blank=True, null=True, related_name="owned_articles", help_text=_( "The owner of the article, usually the creator. The owner always has both read and write access." ), on_delete=models.SET_NULL, ) group = models.ForeignKey( settings.GROUP_MODEL, verbose_name=_("group"), blank=True, null=True, help_text=_( "Like in a UNIX file system, permissions can be given to a user according to group membership. Groups are handled through the Django auth system." ), on_delete=models.SET_NULL, ) group_read = models.BooleanField( default=True, verbose_name=_("group read access") ) group_write = models.BooleanField( default=True, verbose_name=_("group write access") ) other_read = models.BooleanField( default=True, verbose_name=_("others read access") ) other_write = models.BooleanField( default=True, verbose_name=_("others write access") ) # PERMISSIONS def can_read(self, user): return permissions.can_read(self, user) def can_write(self, user): return permissions.can_write(self, user) def can_delete(self, user): return permissions.can_delete(self, user) def can_moderate(self, user): return permissions.can_moderate(self, user) def can_assign(self, user): return permissions.can_assign(self, user) def ancestor_objects(self): """NB! This generator is expensive, so use it with care!!""" for obj in self.articleforobject_set.filter(is_mptt=True): yield from obj.content_object.get_ancestors() def descendant_objects(self): """NB! This generator is expensive, so use it with care!!""" for obj in self.articleforobject_set.filter(is_mptt=True): yield from obj.content_object.get_descendants() def get_children(self, max_num=None, user_can_read=None, **kwargs): """NB! This generator is expensive, so use it with care!!""" cnt = 0 for obj in self.articleforobject_set.filter(is_mptt=True): if user_can_read: objects = ( obj.content_object.get_children() .filter(**kwargs) .can_read(user_can_read) ) else: objects = obj.content_object.get_children().filter(**kwargs) for child in objects.order_by( "articles__article__current_revision__title" ): cnt += 1 if max_num and cnt > max_num: return yield child # All recursive permission methods will use descendant_objects to access # generic relations and check if they are using MPTT and have # INHERIT_PERMISSIONS=True def set_permissions_recursive(self): for descendant in self.descendant_objects(): if descendant.INHERIT_PERMISSIONS: descendant.article.group_read = self.group_read descendant.article.group_write = self.group_write descendant.article.other_read = self.other_read descendant.article.other_write = self.other_write descendant.article.save() def set_group_recursive(self): for descendant in self.descendant_objects(): if descendant.INHERIT_PERMISSIONS: descendant.article.group = self.group descendant.article.save() def set_owner_recursive(self): for descendant in self.descendant_objects(): if descendant.INHERIT_PERMISSIONS: descendant.article.owner = self.owner descendant.article.save() def add_revision(self, new_revision, save=True): """ Sets the properties of a revision and ensures its the current revision. """ assert self.id or save, ( "Article.add_revision: Sorry, you cannot add a" "revision to an article that has not been saved " "without using save=True" ) if not self.id: self.save() revisions = self.articlerevision_set.all() try: new_revision.revision_number = ( revisions.latest().revision_number + 1 ) except ArticleRevision.DoesNotExist: new_revision.revision_number = 0 new_revision.article = self new_revision.previous_revision = self.current_revision if save: new_revision.clean() new_revision.save() self.current_revision = new_revision if save: self.save() def add_object_relation(self, obj): return ArticleForObject.objects.get_or_create( article=self, content_type=ContentType.objects.get_for_model(obj), object_id=obj.id, is_mptt=isinstance(obj, MPTTModel), ) @classmethod def get_for_object(cls, obj): return ArticleForObject.objects.get( object_id=obj.id, content_type=ContentType.objects.get_for_model(obj), ).article def __str__(self): if self.current_revision: return self.current_revision.title obj_name = _("Article without content (%(id)d)") % {"id": self.id} return str(obj_name) class Meta: permissions = ( ("moderate", _("Can edit all articles and lock/unlock/restore")), ("assign", _("Can change ownership of any article")), ("grant", _("Can assign permissions to other users")), ) def render(self, preview_content=None, user=None): if not self.current_revision: return "" if preview_content: content = preview_content else: content = self.current_revision.content return mark_safe( article_markdown( content, self, preview=preview_content is not None, user=user ) ) def get_cache_key(self): """Returns per-article cache key.""" lang = translation.get_language() key_raw = "wiki-article-{id}-{lang}".format( id=self.current_revision.id if self.current_revision else self.id, lang=lang, ) # https://github.com/django-wiki/django-wiki/issues/1065 return slugify(key_raw, allow_unicode=True) def get_cache_content_key(self, user=None): """Returns per-article-user cache key.""" key_raw = "{key}-{user}".format( key=self.get_cache_key(), user=user.get_username() if user else "-anonymous", ) # https://github.com/django-wiki/django-wiki/issues/1065 return slugify(key_raw, allow_unicode=True) def get_cached_content(self, user=None): """Returns cached version of rendered article. The cache contains one "per-article" entry plus multiple "per-article-user" entries. The per-article-user entries contain the rendered article, the per-article entry contains list of the per-article-user keys. The rendered article in cache (per-article-user) is used only if the key is in the per-article entry. To delete per-article invalidates all article cache entries.""" if user and user.is_anonymous: user = None cache_key = self.get_cache_key() cache_content_key = self.get_cache_content_key(user) cached_items = cache.get(cache_key, []) if cache_content_key in cached_items: cached_content = cache.get(cache_content_key) if cached_content is not None: return mark_safe(cached_content) cached_content = self.render(user=user) cached_items.append(cache_content_key) cache.set(cache_key, cached_items, settings.CACHE_TIMEOUT) cache.set(cache_content_key, cached_content, settings.CACHE_TIMEOUT) return mark_safe(cached_content) def clear_cache(self): cache.delete(self.get_cache_key()) def get_url_kwargs(self): urlpaths = self.urlpath_set.all() if urlpaths.exists(): return {"path": urlpaths[0].path} return {"article_id": self.id} def get_absolute_url(self): return reverse("wiki:get", kwargs=self.get_url_kwargs()) class ArticleForObject(models.Model): objects = managers.ArticleFkManager() article = models.ForeignKey("Article", on_delete=models.CASCADE) # Same as django.contrib.comments content_type = models.ForeignKey( ContentType, on_delete=models.CASCADE, verbose_name=_("content type"), related_name="content_type_set_for_%(class)s", ) object_id = models.PositiveIntegerField(_("object ID")) content_object = GenericForeignKey("content_type", "object_id") is_mptt = models.BooleanField(default=False, editable=False) def __str__(self): return str(self.article) class Meta: verbose_name = _("Article for object") verbose_name_plural = _("Articles for object") # Do not allow several objects unique_together = ("content_type", "object_id") class BaseRevisionMixin(models.Model): """This is an abstract model used as a mixin: Do not override any of the core model methods but respect the inheritor's freedom to do so itself.""" revision_number = models.IntegerField( editable=False, verbose_name=_("revision number") ) user_message = models.TextField( blank=True, ) automatic_log = models.TextField( blank=True, editable=False, ) ip_address = IPAddressField( _("IP address"), blank=True, null=True, editable=False ) user = models.ForeignKey( django_settings.AUTH_USER_MODEL, verbose_name=_("user"), blank=True, null=True, on_delete=models.SET_NULL, ) modified = models.DateTimeField(auto_now=True) created = models.DateTimeField(auto_now_add=True) previous_revision = models.ForeignKey( "self", blank=True, null=True, on_delete=models.SET_NULL ) # NOTE! The semantics of these fields are not related to the revision itself # but the actual related object. If the latest revision says "deleted=True" then # the related object should be regarded as deleted. deleted = models.BooleanField( verbose_name=_("deleted"), default=False, ) locked = models.BooleanField( verbose_name=_("locked"), default=False, ) def set_from_request(self, request): if request.user.is_authenticated: self.user = request.user if settings.LOG_IPS_USERS: self.ip_address = request.META.get("REMOTE_ADDR", None) elif settings.LOG_IPS_ANONYMOUS: self.ip_address = request.META.get("REMOTE_ADDR", None) def inherit_predecessor(self, predecessor): """ This is a naive way of inheriting, assuming that ``predecessor`` is in fact the predecessor and there hasn't been any intermediate changes! :param: predecessor is an instance of whatever object for which object.current_revision implements BaseRevisionMixin. """ predecessor = predecessor.current_revision self.previous_revision = predecessor self.deleted = predecessor.deleted self.locked = predecessor.locked self.revision_number = predecessor.revision_number + 1 class Meta: abstract = True class ArticleRevision(BaseRevisionMixin, models.Model): """This is where main revision data is stored. To make it easier to copy, do NEVER create m2m relationships.""" objects = managers.ArticleFkManager() article = models.ForeignKey( "Article", on_delete=models.CASCADE, verbose_name=_("article") ) # This is where the content goes, with whatever markup language is used content = models.TextField(blank=True, verbose_name=_("article contents")) # This title is automatically set from either the article's title or # the last used revision... title = models.CharField( max_length=512, verbose_name=_("article title"), null=False, blank=False, help_text=_( "Each revision contains a title field that must be filled out, even if the title has not changed" ), ) # TODO: # Allow a revision to redirect to another *article*. This # way, we can have redirects and still maintain old content. # redirect = models.ForeignKey('Article', null=True, blank=True, # verbose_name=_('redirect'), # help_text=_('If set, the article will redirect to the contents of another article.'), # related_name='redirect_set') def __str__(self): return "%s (%d)" % (self.title, self.revision_number) def clean(self): # Enforce DOS line endings \r\n. It is the standard for web browsers, # but when revisions are created programatically, they might # have UNIX line endings \n instead. self.content = self.content.replace("\r", "").replace("\n", "\r\n") def inherit_predecessor(self, article): """ Inherit certain properties from predecessor because it's very convenient. Remember to always call this method before setting properties :)""" predecessor = article.current_revision self.article = predecessor.article self.content = predecessor.content self.title = predecessor.title self.deleted = predecessor.deleted self.locked = predecessor.locked class Meta: get_latest_by = "revision_number" ordering = ("created",) unique_together = ("article", "revision_number") ###################################################### # SIGNAL HANDLERS ###################################################### # clear the ancestor cache when saving or deleting articles so things like # article_lists will be refreshed def _clear_ancestor_cache(article): for ancestor in article.ancestor_objects(): ancestor.article.clear_cache() @disable_signal_for_loaddata def on_article_save_clear_cache(instance, **kwargs): on_article_delete_clear_cache(instance, **kwargs) @disable_signal_for_loaddata def on_article_delete_clear_cache(instance, **kwargs): _clear_ancestor_cache(instance) instance.clear_cache() @disable_signal_for_loaddata def on_article_revision_pre_save(**kwargs): instance = kwargs["instance"] if instance._state.adding: revision_changed = ( not instance.previous_revision and instance.article and instance.article.current_revision and instance.article.current_revision != instance ) if revision_changed: instance.previous_revision = instance.article.current_revision if not instance.revision_number: try: previous_revision = instance.article.articlerevision_set.latest() instance.revision_number = previous_revision.revision_number + 1 except ArticleRevision.DoesNotExist: instance.revision_number = 1 @disable_signal_for_loaddata def on_article_revision_post_save(**kwargs): instance = kwargs["instance"] if not instance.article.current_revision: # If I'm saved from Django admin, then article.current_revision is # me! instance.article.current_revision = instance instance.article.save() pre_save.connect(on_article_revision_pre_save, ArticleRevision) post_save.connect(on_article_revision_post_save, ArticleRevision) post_save.connect(on_article_save_clear_cache, Article) pre_delete.connect(on_article_delete_clear_cache, Article)
17,835
Python
.py
425
33.677647
158
0.646926
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,142
urlpath.py
django-wiki_django-wiki/src/wiki/models/urlpath.py
import logging import warnings from django.contrib.contenttypes.fields import GenericRelation from django.contrib.contenttypes.models import ContentType from django.contrib.sites.models import Site from django.core.exceptions import ValidationError from django.db import models from django.db import transaction from django.db.models.signals import post_save from django.db.models.signals import pre_delete from django.urls import reverse from django.utils.translation import gettext from django.utils.translation import gettext_lazy as _ from mptt.fields import TreeForeignKey from mptt.models import MPTTModel from wiki import managers from wiki.conf import settings from wiki.core.exceptions import MultipleRootURLs from wiki.core.exceptions import NoRootURL from wiki.decorators import disable_signal_for_loaddata from wiki.models.article import Article from wiki.models.article import ArticleForObject from wiki.models.article import ArticleRevision __all__ = [ "URLPath", ] log = logging.getLogger(__name__) class URLPath(MPTTModel): """ Strategy: Very few fields go here, as most has to be managed through an article's revision. As a side-effect, the URL resolution remains slim and swift. """ # Tells django-wiki that permissions from a this object's article # should be inherited to children's articles. In this case, it's a static # property.. but you can also use a BooleanField. INHERIT_PERMISSIONS = True objects = managers.URLPathManager() # Do not use this because of # https://github.com/django-mptt/django-mptt/issues/369 # _default_manager = objects articles = GenericRelation( ArticleForObject, content_type_field="content_type", object_id_field="object_id", ) # Do NOT modify this field - it is updated with signals whenever # ArticleForObject is changed. article = models.ForeignKey( Article, on_delete=models.CASCADE, verbose_name=_("article"), help_text=_( "This field is automatically updated, but you need to populate " "it when creating a new URL path." ), ) SLUG_MAX_LENGTH = 50 slug = models.SlugField( verbose_name=_("slug"), null=True, blank=True, max_length=SLUG_MAX_LENGTH, ) site = models.ForeignKey(Site, on_delete=models.CASCADE) parent = TreeForeignKey( "self", null=True, blank=True, on_delete=models.CASCADE, related_name="children", help_text=_("Position of URL path in the tree."), ) moved_to = TreeForeignKey( "self", verbose_name=_("Moved to"), help_text=_("Article path was moved to this location"), null=True, blank=True, on_delete=models.SET_NULL, related_name="moved_from", ) def __cached_ancestors(self): """ This returns the ancestors of this urlpath. These ancestors are hopefully cached from the article path lookup. Accessing a foreign key included in add_selecte_related on one of these ancestors will not occur an additional sql query, as they were retrieved with a select_related. If the cached ancestors were not set explicitly, they will be retrieved from the database. """ # "not self.pk": HACK needed till PR#591 is included in all supported django-mptt # versions. Prevent accessing a deleted URLPath when deleting it from the admin # interface. if not self.pk or not self.get_ancestors().exists(): self._cached_ancestors = [] if not hasattr(self, "_cached_ancestors"): self._cached_ancestors = list( self.get_ancestors().select_related_common() ) return self._cached_ancestors def __cached_ancestors_setter(self, ancestors): self._cached_ancestors = ancestors # Python 2.5 compatible property constructor cached_ancestors = property(__cached_ancestors, __cached_ancestors_setter) def set_cached_ancestors_from_parent(self, parent): self.cached_ancestors = parent.cached_ancestors + [parent] @property def path(self): if not self.parent: return "" # All ancestors except roots ancestors = list( filter( lambda ancestor: ancestor.parent is not None, self.cached_ancestors, ) ) slugs = [obj.slug if obj.slug else "" for obj in ancestors + [self]] return "/".join(slugs) + "/" def is_deleted(self): """ Returns True if this article or any of its ancestors have been deleted """ return self.first_deleted_ancestor() is not None def first_deleted_ancestor(self): for ancestor in self.cached_ancestors + [self]: if ancestor.article.current_revision.deleted: return ancestor return None @transaction.atomic def _delete_subtree(self): for descendant in self.get_descendants(include_self=True).order_by( "-level" ): descendant.article.delete() def delete_subtree(self): """ NB! This deletes this urlpath, its children, and ALL of the related articles. This is a purged delete and CANNOT be undone. """ self._delete_subtree() @classmethod def root(cls): site = Site.objects.get_current() root_nodes = ( cls.objects.root_nodes().filter(site=site).select_related_common() ) # We fetch the nodes as a list and use len(), not count() because we need # to get the result out anyway. This only takes one sql query no_paths = len(root_nodes) if no_paths == 0: raise NoRootURL( "You need to create a root article on site '%s'" % site ) if no_paths > 1: raise MultipleRootURLs( "Somehow you have multiple roots on %s" % site ) return root_nodes[0] class MPTTMeta: pass def __str__(self): path = self.path return path if path else gettext("(root)") def delete(self, *args, **kwargs): assert not ( self.parent and self.get_children() ), "You cannot delete a root article with children." super().delete(*args, **kwargs) class Meta: verbose_name = _("URL path") verbose_name_plural = _("URL paths") unique_together = ("site", "parent", "slug") def clean(self, *args, **kwargs): if self.slug and not self.parent: raise ValidationError( _("Sorry but you cannot have a root article with a slug.") ) if not self.slug and self.parent: raise ValidationError( _("A non-root note must always have a slug.") ) if not self.parent: if ( URLPath.objects.root_nodes() .filter(site=self.site) .exclude(id=self.id) ): raise ValidationError( _("There is already a root node on %s") % self.site ) @classmethod def get_by_path(cls, path, select_related=False): """ Strategy: Don't handle all kinds of weird cases. Be strict. Accepts paths both starting with and without '/' """ # TODO: Save paths directly in the model for constant time lookups? # Or: Save the parents in a lazy property because the parents are # always fetched anyways so it's fine to fetch them here. path = path.lstrip("/") path = path.rstrip("/") # Root page requested if not path: return cls.root() slugs = path.split("/") level = 1 parent = cls.root() for slug in slugs: if settings.URL_CASE_SENSITIVE: child = ( parent.get_children() .select_related_common() .get(slug=slug) ) child.cached_ancestors = parent.cached_ancestors + [parent] parent = child else: child = ( parent.get_children() .select_related_common() .get(slug__iexact=slug) ) child.cached_ancestors = parent.cached_ancestors + [parent] parent = child level += 1 return parent def get_absolute_url(self): return reverse("wiki:get", kwargs={"path": self.path}) @classmethod def create_root(cls, site=None, title="Root", request=None, **kwargs): if not site: site = Site.objects.get_current() root_nodes = cls.objects.root_nodes().filter(site=site) if not root_nodes: article = Article() revision = ArticleRevision(title=title, **kwargs) if request: revision.set_from_request(request) article.add_revision(revision, save=True) article.save() root = cls.objects.create(site=site, article=article) article.add_object_relation(root) else: root = root_nodes[0] return root @classmethod @transaction.atomic def create_urlpath( cls, parent, slug, site=None, title="Root", article_kwargs={}, request=None, article_w_permissions=None, **revision_kwargs, ): """ Utility function: Creates a new urlpath with an article and a new revision for the article :returns: A new URLPath instance """ if not site: site = Site.objects.get_current() article = Article(**article_kwargs) article.add_revision( ArticleRevision(title=title, **revision_kwargs), save=True ) article.save() newpath = cls.objects.create( site=site, parent=parent, slug=slug, article=article ) article.add_object_relation(newpath) return newpath @classmethod def _create_urlpath_from_request( cls, request, perm_article, parent_urlpath, slug, title, content, summary, ): """ Creates a new URLPath, using meta data from ``request`` and copies in the permissions from ``perm_article``. This interface is internal because it's rather sloppy """ user = None ip_address = None if not request.user.is_anonymous: user = request.user if settings.LOG_IPS_USERS: ip_address = request.META.get("REMOTE_ADDR", None) elif settings.LOG_IPS_ANONYMOUS: ip_address = request.META.get("REMOTE_ADDR", None) return cls.create_urlpath( parent_urlpath, slug, title=title, content=content, user_message=summary, user=user, ip_address=ip_address, article_kwargs={ "owner": user, "group": perm_article.group, "group_read": perm_article.group_read, "group_write": perm_article.group_write, "other_read": perm_article.other_read, "other_write": perm_article.other_write, }, ) @classmethod def create_article(cls, *args, **kwargs): warnings.warn( "Pending removal: URLPath.create_article renamed to create_urlpath", DeprecationWarning, ) return cls.create_urlpath(*args, **kwargs) def get_ordered_children(self): """Return an ordered list of all chilren""" return self.children.order_by("slug") ###################################################### # SIGNAL HANDLERS ###################################################### # Just get this once urlpath_content_type = None @disable_signal_for_loaddata def on_article_relation_save(**kwargs): global urlpath_content_type instance = kwargs["instance"] if not urlpath_content_type: urlpath_content_type = ContentType.objects.get_for_model(URLPath) if instance.content_type == urlpath_content_type: URLPath.objects.filter(id=instance.object_id).update( article=instance.article ) post_save.connect(on_article_relation_save, ArticleForObject) class Namespace: # An instance of Namespace simulates "nonlocal variable_name" declaration # in any nested function, that is possible in Python 3. It allows assigning # to non local variable without rebinding it local. See PEP 3104. pass def on_article_delete(instance, *args, **kwargs): # If an article is deleted, then throw out its URLPaths # But move all descendants to a lost-and-found node. site = Site.objects.get_current() # Get the Lost-and-found path or create a new one # Only create the lost-and-found article if it's necessary and such # that the lost-and-found article can be deleted without being recreated! ns = Namespace() # nonlocal namespace backported to Python 2.x ns.lost_and_found = None def get_lost_and_found(): if ns.lost_and_found: return ns.lost_and_found try: ns.lost_and_found = URLPath.objects.get( slug=settings.LOST_AND_FOUND_SLUG, parent=URLPath.root(), site=site, ) except URLPath.DoesNotExist: article = Article( group_read=True, group_write=False, other_read=False, other_write=False, ) article.add_revision( ArticleRevision( content=_( "Articles who lost their parents\n" "===============================\n\n" "The children of this article have had their parents deleted. You should probably find a new home for them." ), title=_("Lost and found"), ) ) ns.lost_and_found = URLPath.objects.create( slug=settings.LOST_AND_FOUND_SLUG, parent=URLPath.root(), site=site, article=article, ) article.add_object_relation(ns.lost_and_found) return ns.lost_and_found for urlpath in URLPath.objects.filter( articles__article=instance, site=site ): # Delete the children for child in urlpath.get_children(): child.move_to(get_lost_and_found()) # ...and finally delete the path itself pre_delete.connect(on_article_delete, Article)
15,032
Python
.py
400
28.07
132
0.598641
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,143
wiki_tags.py
django-wiki_django-wiki/src/wiki/templatetags/wiki_tags.py
import re from urllib.parse import quote as urlquote from django import template from django.apps import apps from django.conf import settings as django_settings from django.contrib.contenttypes.models import ContentType from django.db.models import Model from django.forms import BaseForm from django.template.defaultfilters import striptags from django.utils.safestring import mark_safe from wiki import models from wiki.conf import settings from wiki.core.plugins import registry as plugin_registry register = template.Library() # Cache for looking up objects for articles... article_for_object is # called more than once per page in multiple template blocks. _cache = {} @register.simple_tag(takes_context=True) def article_for_object(context, obj): if not isinstance(obj, Model): raise TypeError( "A Wiki article can only be associated to a Django Model " "instance, not %s" % type(obj) ) content_type = ContentType.objects.get_for_model(obj) # TODO: This is disabled for now, as it should only fire once per request # Maybe store cache in the request object? if True or obj not in _cache: try: article = models.ArticleForObject.objects.get( content_type=content_type, object_id=obj.pk ).article except models.ArticleForObject.DoesNotExist: article = None _cache[obj] = article return _cache[obj] @register.inclusion_tag("wiki/includes/render.html", takes_context=True) def wiki_render(context, article, preview_content=None): if preview_content: content = article.render(preview_content=preview_content) elif article.current_revision: content = article.get_cached_content(user=context.get("user")) else: content = None context.update( { "article": article, "content": content, "preview": preview_content is not None, "plugins": plugin_registry.get_plugins(), "STATIC_URL": django_settings.STATIC_URL, "CACHE_TIMEOUT": settings.CACHE_TIMEOUT, } ) return context @register.inclusion_tag("wiki/includes/form.html", takes_context=True) def wiki_form(context, form_obj): if not isinstance(form_obj, BaseForm): raise TypeError( "Error including form, it's not a form, it's a %s" % type(form_obj) ) context.update({"form": form_obj}) return context @register.inclusion_tag("wiki/includes/messages.html", takes_context=True) def wiki_messages(context): messages = context.get("messages", []) for message in messages: message.css_class = settings.MESSAGE_TAG_CSS_CLASS[message.level] context.update({"messages": messages}) return context # XXX html strong tag is hardcoded @register.filter def get_content_snippet(content, keyword, max_words=30): """ Takes some text. Removes html tags and newlines from it. If keyword in this text - returns a short text snippet with keyword wrapped into strong tag and max_words // 2 before and after it. If no keyword - return text[:max_words]. """ def clean_text(content): """ Removes tags, newlines and spaces from content. Return array of words. """ # remove html tags content = striptags(content) # remove whitespace words = content.split() return words max_words = int(max_words) match_position = content.lower().find(keyword.lower()) if match_position != -1: try: match_start = content.rindex(" ", 0, match_position) + 1 except ValueError: match_start = 0 try: match_end = content.index(" ", match_position + len(keyword)) except ValueError: match_end = len(content) all_before = clean_text(content[:match_start]) match = content[match_start:match_end] all_after = clean_text(content[match_end:]) before_words = all_before[-max_words // 2 :] after_words = all_after[: max_words - len(before_words)] before = " ".join(before_words) after = " ".join(after_words) html = (f"{before} {striptags(match)} {after}").strip() kw_p = re.compile(r"(\S*%s\S*)" % re.escape(keyword), re.IGNORECASE) html = kw_p.sub(r"<strong>\1</strong>", html) return mark_safe(html) return " ".join(clean_text(content)[:max_words]) @register.filter def can_read(obj, user): """ Takes article or related to article model. Check if user can read article. """ return obj.can_read(user) @register.filter def can_write(obj, user): """ Takes article or related to article model. Check if user can write article. """ return obj.can_write(user) @register.filter def can_delete(obj, user): """ Takes article or related to article model. Check if user can delete article. """ return obj.can_delete(user) @register.filter def can_moderate(obj, user): """ Takes article or related to article model. Check if user can moderate article. """ return obj.can_moderate(user) @register.filter def is_locked(model): """ Check if article is locked. """ return model.current_revision and model.current_revision.locked @register.simple_tag(takes_context=True) def login_url(context): request = context["request"] qs = request.META.get("QUERY_STRING", "") if qs: qs = urlquote("?" + qs) else: qs = "" return settings.LOGIN_URL + "?next=" + request.path + qs @register.filter def plugin_enabled(plugin_name): """ Example: {% if 'wiki.plugins.notifications'|plugin_enabled %} :param: plugin_name: String specifying the full name of the plugin, e.g. 'wiki.plugins.attachments' """ return apps.is_installed(plugin_name) @register.filter def wiki_settings(name): return getattr(settings, name, "") @register.filter def starts_with(value, arg): return value.startswith(arg)
6,108
Python
.py
169
30.094675
80
0.670229
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,144
0003_mptt_upgrade.py
django-wiki_django-wiki/src/wiki/migrations/0003_mptt_upgrade.py
# Upgrades fields changed in django-mptt # See: https://github.com/django-mptt/django-mptt/pull/578 # Generated by Django 2.2.7 on 2020-02-06 20:36 import django.db.models.deletion from django.db import migrations from django.db import models class Migration(migrations.Migration): dependencies = [ ("wiki", "0002_urlpath_moved_to"), ] operations = [ migrations.AlterField( model_name="urlpath", name="level", field=models.PositiveIntegerField(editable=False), ), migrations.AlterField( model_name="urlpath", name="lft", field=models.PositiveIntegerField(editable=False), ), migrations.AlterField( model_name="urlpath", name="rght", field=models.PositiveIntegerField(editable=False), ), # Added as a no-op when upgrading to django-mptt 0.13 migrations.AlterField( model_name="articleforobject", name="content_type", field=models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, related_name="content_type_set_for_%(class)s", to="contenttypes.contenttype", verbose_name="content type", ), ), ]
1,321
Python
.py
38
25.342105
62
0.602815
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,145
0002_urlpath_moved_to.py
django-wiki_django-wiki/src/wiki/migrations/0002_urlpath_moved_to.py
# Generated by Django 1.10.7 on 2017-06-06 23:18 import django.db.models.deletion import mptt.fields from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("wiki", "0001_initial"), ] operations = [ migrations.AddField( model_name="urlpath", name="moved_to", field=mptt.fields.TreeForeignKey( blank=True, help_text="Article path was moved to this location", null=True, on_delete=django.db.models.deletion.SET_NULL, related_name="moved_from", to="wiki.URLPath", verbose_name="Moved to", ), ), ]
732
Python
.py
23
21.956522
68
0.563121
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,146
0001_initial.py
django-wiki_django-wiki/src/wiki/migrations/0001_initial.py
import django.db.models.deletion import mptt.fields from django.conf import settings from django.db import migrations from django.db import models from django.db.models.fields import GenericIPAddressField as IPAddressField from wiki.conf.settings import GROUP_MODEL class Migration(migrations.Migration): dependencies = [ ("sites", "0001_initial"), migrations.swappable_dependency(settings.AUTH_USER_MODEL), ("contenttypes", "0001_initial"), ("auth", "0001_initial"), ] operations = [ migrations.CreateModel( name="Article", fields=[ ( "id", models.AutoField( serialize=False, primary_key=True, auto_created=True, verbose_name="ID", ), ), ( "created", models.DateTimeField(verbose_name="created", auto_now_add=True), ), ( "modified", models.DateTimeField( verbose_name="modified", auto_now=True, help_text="Article properties last modified", ), ), ( "group_read", models.BooleanField(default=True, verbose_name="group read access"), ), ( "group_write", models.BooleanField( default=True, verbose_name="group write access" ), ), ( "other_read", models.BooleanField( default=True, verbose_name="others read access" ), ), ( "other_write", models.BooleanField( default=True, verbose_name="others write access" ), ), ], options={ "permissions": ( ("moderate", "Can edit all articles and lock/unlock/restore"), ("assign", "Can change ownership of any article"), ("grant", "Can assign permissions to other users"), ), }, bases=(models.Model,), ), migrations.CreateModel( name="ArticleForObject", fields=[ ( "id", models.AutoField( serialize=False, primary_key=True, auto_created=True, verbose_name="ID", ), ), ("object_id", models.PositiveIntegerField(verbose_name="object ID")), ("is_mptt", models.BooleanField(default=False, editable=False)), ( "article", models.ForeignKey(to="wiki.Article", on_delete=models.CASCADE), ), ( "content_type", models.ForeignKey( related_name="content_type_set_for_articleforobject", verbose_name="content type", to="contenttypes.ContentType", on_delete=models.CASCADE, ), ), ], options={ "verbose_name_plural": "Articles for object", "verbose_name": "Article for object", }, bases=(models.Model,), ), migrations.CreateModel( name="ArticlePlugin", fields=[ ( "id", models.AutoField( serialize=False, primary_key=True, auto_created=True, verbose_name="ID", ), ), ("deleted", models.BooleanField(default=False)), ("created", models.DateTimeField(auto_now_add=True)), ], options={}, bases=(models.Model,), ), migrations.CreateModel( name="ArticleRevision", fields=[ ( "id", models.AutoField( serialize=False, primary_key=True, auto_created=True, verbose_name="ID", ), ), ( "revision_number", models.IntegerField(verbose_name="revision number", editable=False), ), ("user_message", models.TextField(blank=True)), ("automatic_log", models.TextField(blank=True, editable=False)), ( "ip_address", IPAddressField( null=True, verbose_name="IP address", blank=True, editable=False ), ), ("modified", models.DateTimeField(auto_now=True)), ("created", models.DateTimeField(auto_now_add=True)), ("deleted", models.BooleanField(default=False, verbose_name="deleted")), ("locked", models.BooleanField(default=False, verbose_name="locked")), ( "content", models.TextField(blank=True, verbose_name="article contents"), ), ( "title", models.CharField( max_length=512, verbose_name="article title", help_text="Each revision contains a title field that must be filled out, even if the title has not changed", ), ), ( "article", models.ForeignKey( to="wiki.Article", verbose_name="article", on_delete=models.CASCADE, ), ), ( "previous_revision", models.ForeignKey( null=True, on_delete=django.db.models.deletion.SET_NULL, blank=True, to="wiki.ArticleRevision", ), ), ( "user", models.ForeignKey( null=True, on_delete=django.db.models.deletion.SET_NULL, blank=True, to=settings.AUTH_USER_MODEL, verbose_name="user", ), ), ], options={ "get_latest_by": "revision_number", "ordering": ("created",), }, bases=(models.Model,), ), migrations.CreateModel( name="ReusablePlugin", fields=[ ( "articleplugin_ptr", models.OneToOneField( primary_key=True, parent_link=True, to="wiki.ArticlePlugin", serialize=False, auto_created=True, on_delete=models.CASCADE, ), ), ( "articles", models.ManyToManyField( related_name="shared_plugins_set", to="wiki.Article" ), ), ], options={}, bases=("wiki.articleplugin",), ), migrations.CreateModel( name="RevisionPlugin", fields=[ ( "articleplugin_ptr", models.OneToOneField( primary_key=True, parent_link=True, to="wiki.ArticlePlugin", serialize=False, auto_created=True, on_delete=models.CASCADE, ), ), ], options={}, bases=("wiki.articleplugin",), ), migrations.CreateModel( name="RevisionPluginRevision", fields=[ ( "id", models.AutoField( serialize=False, primary_key=True, auto_created=True, verbose_name="ID", ), ), ( "revision_number", models.IntegerField(verbose_name="revision number", editable=False), ), ("user_message", models.TextField(blank=True)), ("automatic_log", models.TextField(blank=True, editable=False)), ( "ip_address", IPAddressField( null=True, verbose_name="IP address", blank=True, editable=False ), ), ("modified", models.DateTimeField(auto_now=True)), ("created", models.DateTimeField(auto_now_add=True)), ("deleted", models.BooleanField(default=False, verbose_name="deleted")), ("locked", models.BooleanField(default=False, verbose_name="locked")), ( "plugin", models.ForeignKey( related_name="revision_set", to="wiki.RevisionPlugin", on_delete=models.CASCADE, ), ), ( "previous_revision", models.ForeignKey( null=True, on_delete=django.db.models.deletion.SET_NULL, blank=True, to="wiki.RevisionPluginRevision", ), ), ( "user", models.ForeignKey( null=True, on_delete=django.db.models.deletion.SET_NULL, blank=True, to=settings.AUTH_USER_MODEL, verbose_name="user", ), ), ], options={ "get_latest_by": "revision_number", "ordering": ("-created",), }, bases=(models.Model,), ), migrations.CreateModel( name="SimplePlugin", fields=[ ( "articleplugin_ptr", models.OneToOneField( primary_key=True, parent_link=True, to="wiki.ArticlePlugin", serialize=False, auto_created=True, on_delete=models.CASCADE, ), ), ( "article_revision", models.ForeignKey( to="wiki.ArticleRevision", on_delete=models.CASCADE ), ), ], options={}, bases=("wiki.articleplugin",), ), migrations.CreateModel( name="URLPath", fields=[ ( "id", models.AutoField( serialize=False, primary_key=True, auto_created=True, verbose_name="ID", ), ), ("slug", models.SlugField(null=True, blank=True, verbose_name="slug")), ("lft", models.PositiveIntegerField(db_index=True, editable=False)), ("rght", models.PositiveIntegerField(db_index=True, editable=False)), ("tree_id", models.PositiveIntegerField(db_index=True, editable=False)), ("level", models.PositiveIntegerField(db_index=True, editable=False)), ( "article", models.ForeignKey( help_text="This field is automatically updated, but you need to populate it when creating a new URL path.", on_delete=django.db.models.deletion.CASCADE, to="wiki.Article", verbose_name="article", ), ), ( "parent", mptt.fields.TreeForeignKey( blank=True, help_text="Position of URL path in the tree.", null=True, on_delete=django.db.models.deletion.CASCADE, related_name="children", to="wiki.URLPath", ), ), ( "site", models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, to="sites.Site" ), ), ], options={ "verbose_name_plural": "URL paths", "verbose_name": "URL path", }, bases=(models.Model,), ), migrations.AlterUniqueTogether( name="urlpath", unique_together={("site", "parent", "slug")}, ), migrations.AddField( model_name="revisionplugin", name="current_revision", field=models.OneToOneField( related_name="plugin_set", null=True, help_text="The revision being displayed for this plugin. If you need to do a roll-back, simply change the value of this field.", blank=True, to="wiki.RevisionPluginRevision", verbose_name="current revision", on_delete=models.CASCADE, ), preserve_default=True, ), migrations.AlterUniqueTogether( name="articlerevision", unique_together={("article", "revision_number")}, ), migrations.AddField( model_name="articleplugin", name="article", field=models.ForeignKey( to="wiki.Article", verbose_name="article", on_delete=models.CASCADE ), preserve_default=True, ), migrations.AlterUniqueTogether( name="articleforobject", unique_together={("content_type", "object_id")}, ), migrations.AddField( model_name="article", name="current_revision", field=models.OneToOneField( related_name="current_set", null=True, help_text="The revision being displayed for this article. If you need to do a roll-back, simply change the value of this field.", blank=True, to="wiki.ArticleRevision", verbose_name="current revision", on_delete=models.CASCADE, ), preserve_default=True, ), migrations.AddField( model_name="article", name="group", field=models.ForeignKey( null=True, on_delete=django.db.models.deletion.SET_NULL, help_text="Like in a UNIX file system, permissions can be given to a user according to group membership. Groups are handled through the Django auth system.", blank=True, to=GROUP_MODEL, verbose_name="group", ), preserve_default=True, ), migrations.AddField( model_name="article", name="owner", field=models.ForeignKey( related_name="owned_articles", null=True, on_delete=django.db.models.deletion.SET_NULL, help_text="The owner of the article, usually the creator. The owner always has both read and write access.", blank=True, to=settings.AUTH_USER_MODEL, verbose_name="owner", ), preserve_default=True, ), ]
16,976
Python
.py
451
19.86918
173
0.420374
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,147
mixins.py
django-wiki_django-wiki/src/wiki/views/mixins.py
import logging from django.views.generic.base import TemplateResponseMixin from wiki.conf import settings from wiki.core.plugins import registry log = logging.getLogger(__name__) class ArticleMixin(TemplateResponseMixin): """A mixin that receives an article object as a parameter (usually from a wiki decorator) and puts this information as an instance attribute and in the template context.""" def dispatch(self, request, article, *args, **kwargs): self.urlpath = kwargs.pop("urlpath", None) self.article = article self.children_slice = [] if settings.SHOW_MAX_CHILDREN > 0: try: for child in self.article.get_children( max_num=settings.SHOW_MAX_CHILDREN + 1, articles__article__current_revision__deleted=False, user_can_read=request.user, ): self.children_slice.append(child) except AttributeError as e: log.error( "Attribute error most likely caused by wrong MPTT version. Use 0.5.3+.\n\n" + str(e) ) raise return super().dispatch(request, *args, **kwargs) def get_context_data(self, **kwargs): kwargs["urlpath"] = self.urlpath kwargs["article"] = self.article kwargs["article_tabs"] = registry.get_article_tabs() kwargs["children_slice"] = self.children_slice[ : settings.SHOW_MAX_CHILDREN ] kwargs["children_slice_more"] = len(self.children_slice) > 20 kwargs["plugins"] = registry.get_plugins() return kwargs
1,682
Python
.py
38
33.605263
95
0.612706
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,148
accounts.py
django-wiki_django-wiki/src/wiki/views/accounts.py
"""Here is a very basic handling of accounts. If you have your own account handling, don't worry, just switch off account handling in settings.WIKI_ACCOUNT_HANDLING = False and remember to set settings.WIKI_SIGNUP_URL = '/your/signup/url' SETTINGS.LOGIN_URL SETTINGS.LOGOUT_URL """ from django.conf import settings as django_settings from django.contrib import messages from django.contrib.auth import get_user_model from django.contrib.auth import login as auth_login from django.contrib.auth import logout as auth_logout from django.contrib.auth.forms import AuthenticationForm from django.shortcuts import get_object_or_404 from django.shortcuts import redirect from django.shortcuts import render from django.urls import reverse from django.utils.translation import gettext as _ from django.views.generic import CreateView from django.views.generic import FormView from django.views.generic import UpdateView from django.views.generic import View from wiki import forms from wiki.conf import settings User = get_user_model() class Signup(CreateView): model = User form_class = forms.UserCreationForm template_name = "wiki/accounts/signup.html" def dispatch(self, request, *args, **kwargs): # Let logged in super users continue if not request.user.is_anonymous and not request.user.is_superuser: return redirect("wiki:root") # If account handling is disabled, don't go here if not settings.ACCOUNT_HANDLING: return redirect(settings.SIGNUP_URL) # Allow superusers to use signup page... if ( not request.user.is_superuser and not settings.ACCOUNT_SIGNUP_ALLOWED ): c = { "error_msg": _( "Account signup is only allowed for administrators." ) } return render(request, "wiki/error.html", context=c) return super().dispatch(request, *args, **kwargs) def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) context["honeypot_class"] = context["form"].honeypot_class context["honeypot_jsfunction"] = context["form"].honeypot_jsfunction return context def get_success_url(self, *args): messages.success( self.request, _("You are now signed up... and now you can sign in!"), ) return reverse("wiki:login") class Logout(View): def dispatch(self, request, *args, **kwargs): if not settings.ACCOUNT_HANDLING: return redirect(settings.LOGOUT_URL) return super().dispatch(request, *args, **kwargs) def get(self, request, *args, **kwargs): auth_logout(request) messages.info(request, _("You are no longer logged in. Bye bye!")) return redirect("wiki:root") class Login(FormView): form_class = AuthenticationForm template_name = "wiki/accounts/login.html" def dispatch(self, request, *args, **kwargs): if not request.user.is_anonymous: return redirect("wiki:root") if not settings.ACCOUNT_HANDLING: return redirect(settings.LOGIN_URL) return super().dispatch(request, *args, **kwargs) def get_form_kwargs(self): self.request.session.set_test_cookie() kwargs = super().get_form_kwargs() kwargs["request"] = self.request return kwargs def post(self, request, *args, **kwargs): self.referer = request.session.get("login_referer", "") return super().post(request, *args, **kwargs) def get(self, request, *args, **kwargs): self.referer = request.META.get("HTTP_REFERER", "") request.session["login_referer"] = self.referer return super().get(request, *args, **kwargs) def form_valid(self, form, *args, **kwargs): auth_login(self.request, form.get_user()) messages.info(self.request, _("You are now logged in! Have fun!")) if self.request.GET.get("next", None): return redirect(self.request.GET["next"]) if django_settings.LOGIN_REDIRECT_URL: return redirect(django_settings.LOGIN_REDIRECT_URL) else: if not self.referer: return redirect("wiki:root") return redirect(self.referer) class Update(UpdateView): model = User form_class = forms.UserUpdateForm template_name = "wiki/accounts/account_settings.html" def get_object(self, queryset=None): return get_object_or_404(self.model, pk=self.request.user.pk) def get(self, request, *args, **kwargs): """ Save the initial referer """ self.referer = request.META.get("HTTP_REFERER", "") request.session["login_referer"] = self.referer return super().get(request, *args, **kwargs) def post(self, request, *args, **kwargs): self.referer = request.session.get("login_referer", "") return super().post(request, *args, **kwargs) def form_valid(self, form): pw = form.cleaned_data["password1"] if pw != "": self.object.set_password(pw) self.object.save() messages.info(self.request, _("Account info saved!")) # Redirect after saving if self.referer: return redirect(self.referer) if django_settings.LOGIN_REDIRECT_URL: return redirect(django_settings.LOGIN_REDIRECT_URL) return redirect("wiki:root")
5,491
Python
.py
130
34.761538
76
0.66373
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,149
deleted_list.py
django-wiki_django-wiki/src/wiki/views/deleted_list.py
from django.shortcuts import redirect from django.views.generic.base import TemplateView from wiki import models class DeletedListView(TemplateView): template_name = "wiki/deleted_list.html" def dispatch(self, request, *args, **kwargs): # Let logged in super users continue if not request.user.is_superuser: return redirect("wiki:root") return super().dispatch(request, *args, **kwargs) def get_context_data(self, **kwargs): article_list = models.Article.objects.all() deleted_articles = [] for article in article_list: if article.current_revision.deleted: deleted_articles.append(article) kwargs["deleted_articles"] = deleted_articles return super().get_context_data(**kwargs)
799
Python
.py
18
36.666667
57
0.684278
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,150
article.py
django-wiki_django-wiki/src/wiki/views/article.py
import difflib import logging from urllib.parse import urljoin from django.contrib import messages from django.contrib.auth.decorators import login_required from django.db import transaction from django.db.models import Q from django.http import Http404 from django.shortcuts import get_object_or_404 from django.shortcuts import redirect from django.shortcuts import render from django.urls import reverse from django.utils.decorators import method_decorator from django.utils.translation import gettext as _ from django.utils.translation import ngettext from django.views.decorators.clickjacking import xframe_options_sameorigin from django.views.generic import DetailView from django.views.generic import FormView from django.views.generic import ListView from django.views.generic import RedirectView from django.views.generic import TemplateView from django.views.generic import View from wiki import editors from wiki import forms from wiki import models from wiki.conf import settings from wiki.core import permissions from wiki.core.diff import simple_merge from wiki.core.exceptions import NoRootURL from wiki.core.paginator import WikiPaginator from wiki.core.plugins import registry as plugin_registry from wiki.core.utils import object_to_json_response from wiki.decorators import get_article from wiki.views.mixins import ArticleMixin log = logging.getLogger(__name__) class ArticleView(ArticleMixin, TemplateView): template_name = "wiki/view.html" @method_decorator(get_article(can_read=True)) def dispatch(self, request, article, *args, **kwargs): return super().dispatch(request, article, *args, **kwargs) def get_context_data(self, **kwargs): kwargs["selected_tab"] = "view" return ArticleMixin.get_context_data(self, **kwargs) class Create(FormView, ArticleMixin): form_class = forms.CreateForm template_name = "wiki/create.html" @method_decorator(get_article(can_write=True, can_create=True)) def dispatch(self, request, article, *args, **kwargs): return super().dispatch(request, article, *args, **kwargs) def get_form(self, form_class=None): """ Returns an instance of the form to be used in this view. """ if form_class is None: form_class = self.get_form_class() kwargs = self.get_form_kwargs() initial = kwargs.get("initial", {}) initial["slug"] = self.request.GET.get("slug", None) kwargs["initial"] = initial form = form_class(self.request, self.urlpath, **kwargs) form.fields["slug"].widget = forms.TextInputPrepend( prepend="/" + self.urlpath.path, attrs={ # Make patterns force lowercase if we are case insensitive to bless the user with a # bit of strictness, anyways "pattern": "[a-z0-9_-]+" if not settings.URL_CASE_SENSITIVE else "[a-zA-Z0-9_-]+", "title": "Lowercase letters, numbers, hyphens and underscores" if not settings.URL_CASE_SENSITIVE else "Letters, numbers, hyphens and underscores", }, ) return form def form_valid(self, form): try: self.newpath = models.URLPath._create_urlpath_from_request( self.request, self.article, self.urlpath, form.cleaned_data["slug"], form.cleaned_data["title"], form.cleaned_data["content"], form.cleaned_data["summary"], ) messages.success( self.request, _("New article '%s' created.") % self.newpath.article.current_revision.title, ) # TODO: Handle individual exceptions better and give good feedback. except Exception as e: log.exception("Exception creating article.") if self.request.user.is_superuser: messages.error( self.request, _("There was an error creating this article: %s") % str(e), ) else: messages.error( self.request, _("There was an error creating this article."), ) return redirect("wiki:get", "") return self.get_success_url() def get_success_url(self): return redirect("wiki:get", self.newpath.path) def get_context_data(self, **kwargs): c = ArticleMixin.get_context_data(self, **kwargs) c["form"] = self.get_form() c["parent_urlpath"] = self.urlpath c["parent_article"] = self.article c["create_form"] = c.pop("form", None) c["editor"] = editors.getEditor() return c class Delete(FormView, ArticleMixin): form_class = forms.DeleteForm template_name = "wiki/delete.html" @method_decorator( get_article(can_write=True, not_locked=True, can_delete=True) ) def dispatch(self, request, article, *args, **kwargs): return self.dispatch1(request, article, *args, **kwargs) def dispatch1(self, request, article, *args, **kwargs): """Deleted view needs to access this method without a decorator, therefore it is separate.""" urlpath = kwargs.get("urlpath", None) # Where to go after deletion... self.next = "" self.cannot_delete_root = False if urlpath and urlpath.parent: self.next = reverse( "wiki:get", kwargs={"path": urlpath.parent.path} ) elif urlpath: # We are a urlpath with no parent. This is the root self.cannot_delete_root = True else: # We have no urlpath. Get it if a urlpath exists for art_obj in article.articleforobject_set.filter(is_mptt=True): if art_obj.content_object.parent: self.next = reverse( "wiki:get", kwargs={ "article_id": art_obj.content_object.parent.article.id }, ) else: self.cannot_delete_root = True return super().dispatch(request, article, *args, **kwargs) def get_initial(self): return {"revision": self.article.current_revision} def get_form(self, form_class=None): form = super().get_form(form_class=form_class) if self.article.can_moderate(self.request.user): form.fields["purge"].widget = forms.forms.CheckboxInput() return form def get_form_kwargs(self): kwargs = super().get_form_kwargs() kwargs["article"] = self.article kwargs["has_children"] = bool(self.children_slice) return kwargs def form_valid(self, form): cd = form.cleaned_data purge = cd["purge"] # If we are purging, only moderators can delete articles with children cannot_delete_children = False can_moderate = self.article.can_moderate(self.request.user) if purge and self.children_slice and not can_moderate: cannot_delete_children = True if self.cannot_delete_root or cannot_delete_children: messages.error( self.request, _( "This article cannot be deleted because it has children or is a root article." ), ) return redirect("wiki:get", article_id=self.article.id) if can_moderate and purge: # First, remove children if self.urlpath: self.urlpath.delete_subtree() self.article.delete() messages.success( self.request, _( "This article together with all its contents are now completely gone! Thanks!" ), ) else: revision = models.ArticleRevision() revision.inherit_predecessor(self.article) revision.set_from_request(self.request) revision.deleted = True self.article.add_revision(revision) messages.success( self.request, _( 'The article "%s" is now marked as deleted! Thanks for keeping the site free from unwanted material!' ) % revision.title, ) return self.get_success_url() def get_success_url(self): return redirect(self.next) def get_context_data(self, **kwargs): cannot_delete_children = False if self.children_slice and not self.article.can_moderate( self.request.user ): cannot_delete_children = True kwargs["delete_form"] = self.get_form() kwargs["form"] = kwargs["delete_form"] kwargs["cannot_delete_root"] = self.cannot_delete_root kwargs["delete_children"] = self.children_slice[:20] kwargs["delete_children_more"] = len(self.children_slice) > 20 kwargs["cannot_delete_children"] = cannot_delete_children return super().get_context_data(**kwargs) class Edit(ArticleMixin, FormView): """Edit an article and process sidebar plugins.""" form_class = forms.EditForm template_name = "wiki/edit.html" @method_decorator(get_article(can_write=True, not_locked=True)) def dispatch(self, request, article, *args, **kwargs): self.orig_content = kwargs.pop("content", None) self.sidebar_plugins = plugin_registry.get_sidebar() self.sidebar = [] return super().dispatch(request, article, *args, **kwargs) def get_initial(self): initial = FormView.get_initial(self) for field_name in ["title", "content"]: session_key = "unsaved_article_%s_%d" % ( field_name, self.article.id, ) if session_key in self.request.session: content = self.request.session[session_key] initial[field_name] = content del self.request.session[session_key] return initial def get_form(self, form_class=None): """ Checks from querystring data that the edit form is actually being saved, otherwise removes the 'data' and 'files' kwargs from form initialisation. """ if form_class is None: form_class = self.get_form_class() kwargs = self.get_form_kwargs() if ( self.request.POST.get("save", "") != "1" and self.request.POST.get("preview") != "1" ): kwargs["data"] = None kwargs["files"] = None kwargs["no_clean"] = True kwargs["content"] = self.orig_content return form_class( self.request, self.article.current_revision, **kwargs ) def get_sidebar_form_classes(self): """Returns dictionary of form classes for the sidebar. If no form class is specified, puts None in dictionary. Keys in the dictionary are used to identify which form is being saved.""" form_classes = {} for cnt, plugin in enumerate(self.sidebar_plugins): form_classes["form%d" % cnt] = ( plugin, plugin.sidebar.get("form_class", None), ) return form_classes def get(self, request, *args, **kwargs): # Generate sidebar forms self.sidebar_forms = [] for form_id, (plugin, Form) in self.get_sidebar_form_classes().items(): if Form: form = Form(self.article, self.request.user) setattr(form, "form_id", form_id) else: form = None self.sidebar.append((plugin, form)) return super().get(request, *args, **kwargs) def post(self, request, *args, **kwargs): # Generate sidebar forms self.sidebar_forms = [] for form_id, (plugin, Form) in self.get_sidebar_form_classes().items(): if Form: if form_id == self.request.GET.get("f", None): form = Form( self.article, self.request, data=self.request.POST, files=self.request.FILES, ) if form.is_valid(): form.save() usermessage = form.get_usermessage() if usermessage: messages.success(self.request, usermessage) else: messages.success( self.request, _("Your changes were saved.") ) title = form.cleaned_data["unsaved_article_title"] content = form.cleaned_data["unsaved_article_content"] orig_content = self.orig_content if not orig_content: orig_content = ( self.article.current_revision.content ) if ( title != self.article.current_revision.title or content != orig_content ): request.session[ "unsaved_article_title_%d" % self.article.id ] = title request.session[ "unsaved_article_content_%d" % self.article.id ] = content messages.warning( request, _( "Please note that your article text has not yet been saved!" ), ) if self.urlpath: return redirect( "wiki:edit", path=self.urlpath.path ) return redirect( "wiki:edit", article_id=self.article.id ) else: form = Form(self.article, self.request) setattr(form, "form_id", form_id) else: form = None self.sidebar.append((plugin, form)) return super().post(request, *args, **kwargs) def form_valid(self, form): """Create a new article revision when the edit form is valid (does not concern any sidebar forms!).""" revision = models.ArticleRevision() revision.inherit_predecessor(self.article) revision.title = form.cleaned_data["title"] revision.content = form.cleaned_data["content"] revision.user_message = form.cleaned_data["summary"] revision.deleted = False revision.set_from_request(self.request) self.article.add_revision(revision) messages.success( self.request, _("A new revision of the article was successfully added."), ) return self.get_success_url() def get_success_url(self): """Go to the article view page when the article has been saved""" if self.urlpath: return redirect("wiki:get", path=self.urlpath.path) return redirect("wiki:get", article_id=self.article.id) def get_context_data(self, **kwargs): kwargs["form"] = self.get_form() kwargs["edit_form"] = kwargs["form"] kwargs["editor"] = editors.getEditor() kwargs["selected_tab"] = "edit" kwargs["sidebar"] = self.sidebar return super().get_context_data(**kwargs) class Move(ArticleMixin, FormView): form_class = forms.MoveForm template_name = "wiki/move.html" @method_decorator(login_required) @method_decorator(get_article(can_write=True, not_locked=True)) def dispatch(self, request, article, *args, **kwargs): return super().dispatch(request, article, *args, **kwargs) def get_form(self, form_class=None): if form_class is None: form_class = self.get_form_class() kwargs = self.get_form_kwargs() return form_class(**kwargs) def get_context_data(self, **kwargs): kwargs["form"] = self.get_form() kwargs["root_path"] = models.URLPath.root() return super().get_context_data(**kwargs) @transaction.atomic def form_valid(self, form): if not self.urlpath.parent: messages.error( self.request, _( "This article cannot be moved because it is a root article." ), ) return redirect("wiki:get", article_id=self.article.id) dest_path = get_object_or_404( models.URLPath, pk=form.cleaned_data["destination"] ) tmp_path = dest_path while tmp_path.parent: if tmp_path == self.urlpath: messages.error( self.request, _("This article cannot be moved to a child of itself."), ) return redirect("wiki:move", article_id=self.article.id) tmp_path = tmp_path.parent # Clear cache to update article lists (Old links) for ancestor in self.article.ancestor_objects(): ancestor.article.clear_cache() # Save the old path for later old_path = self.urlpath.path self.urlpath.parent = dest_path self.urlpath.slug = form.cleaned_data["slug"] self.urlpath.save() # Reload url path form database self.urlpath = models.URLPath.objects.get(pk=self.urlpath.pk) # Use a copy of ourself (to avoid cache) and update article links again for ancestor in models.Article.objects.get( pk=self.article.pk ).ancestor_objects(): ancestor.article.clear_cache() # Create a redirect page for every moved article # /old-slug # /old-slug/child # /old-slug/child/grand-child if form.cleaned_data["redirect"]: # NB! Includes self! descendants = list( self.urlpath.get_descendants(include_self=True).order_by( "level" ) ) root_len = len(descendants[0].path) for descendant in descendants: # Without this descendant.get_ancestors() and as a result # descendant.path is wrong after the first create_article() due # to path caching descendant.refresh_from_db() dst_path = descendant.path src_path = urljoin(old_path, dst_path[root_len:]) src_len = len(src_path) pos = src_path.rfind("/", 0, src_len - 1) slug = src_path[pos + 1 : src_len - 1] parent_urlpath = models.URLPath.get_by_path( src_path[0 : max(pos, 0)] ) link = "[wiki:/{path}](wiki:/{path})".format(path=dst_path) urlpath_new = models.URLPath._create_urlpath_from_request( self.request, self.article, parent_urlpath, slug, _("Moved: {title}").format(title=descendant.article), _("Article moved to {link}").format(link=link), _("Created redirect (auto)"), ) urlpath_new.moved_to = descendant urlpath_new.save() messages.success( self.request, ngettext( "Article successfully moved! Created {n} redirect.", "Article successfully moved! Created {n} redirects.", len(descendants), ).format(n=len(descendants)), ) else: messages.success(self.request, _("Article successfully moved!")) return redirect("wiki:get", path=self.urlpath.path) class Deleted(Delete): """Tell a user that an article has been deleted. If user has permissions, let user restore and possibly purge the deleted article and children.""" template_name = "wiki/deleted.html" form_class = forms.DeleteForm @method_decorator(get_article(can_read=True, deleted_contents=True)) def dispatch(self, request, article, *args, **kwargs): self.urlpath = kwargs.get("urlpath", None) self.article = article if self.urlpath: deleted_ancestor = self.urlpath.first_deleted_ancestor() if deleted_ancestor is None: # No one is deleted! return redirect("wiki:get", path=self.urlpath.path) elif deleted_ancestor != self.urlpath: # An ancestor was deleted, so redirect to that deleted page return redirect("wiki:deleted", path=deleted_ancestor.path) else: if not article.current_revision.deleted: return redirect("wiki:get", article_id=article.id) # Restore if request.GET.get("restore", False): can_restore = ( not article.current_revision.locked and article.can_delete(request.user) ) can_restore = can_restore or article.can_moderate(request.user) if can_restore: revision = models.ArticleRevision() revision.inherit_predecessor(self.article) revision.set_from_request(request) revision.deleted = False revision.automatic_log = _("Restoring article") self.article.add_revision(revision) messages.success( request, _('The article "%s" and its children are now restored.') % revision.title, ) if self.urlpath: return redirect("wiki:get", path=self.urlpath.path) else: return redirect("wiki:get", article_id=article.id) return super().dispatch1(request, article, *args, **kwargs) def get_initial(self): return { "revision": self.article.current_revision, "purge": True, } def get_context_data(self, **kwargs): kwargs["purge_form"] = self.get_form() kwargs["form"] = kwargs["purge_form"] return super().get_context_data(**kwargs) class Source(ArticleMixin, TemplateView): template_name = "wiki/source.html" @method_decorator(get_article(can_read=True)) def dispatch(self, request, article, *args, **kwargs): return super().dispatch(request, article, *args, **kwargs) def get_context_data(self, **kwargs): kwargs["selected_tab"] = "source" return super().get_context_data(**kwargs) class History(ListView, ArticleMixin): template_name = "wiki/history.html" allow_empty = True context_object_name = "revisions" paginator_class = WikiPaginator paginate_by = 10 def get_queryset(self): return ( models.ArticleRevision.objects.select_related("article") .filter(article=self.article) .order_by("-created") ) def get_context_data(self, **kwargs): # Is this a bit of a hack? Use better inheritance? kwargs_article = ArticleMixin.get_context_data(self, **kwargs) kwargs_listview = ListView.get_context_data(self, **kwargs) kwargs.update(kwargs_article) kwargs.update(kwargs_listview) kwargs["selected_tab"] = "history" return kwargs @method_decorator(get_article(can_read=True)) def dispatch(self, request, article, *args, **kwargs): return super().dispatch(request, article, *args, **kwargs) class Dir(ListView, ArticleMixin): template_name = "wiki/dir.html" allow_empty = True context_object_name = "directory" model = models.URLPath paginator_class = WikiPaginator paginate_by = 30 @method_decorator(get_article(can_read=True)) def dispatch(self, request, article, *args, **kwargs): self.filter_form = forms.DirFilterForm(request.GET) if self.filter_form.is_valid(): self.query = self.filter_form.cleaned_data["query"] else: self.query = None return super().dispatch(request, article, *args, **kwargs) def get_queryset(self): children = self.urlpath.get_children().can_read(self.request.user) if self.query: children = children.filter( Q(article__current_revision__title__icontains=self.query) | Q(slug__icontains=self.query) ) if not self.article.can_moderate(self.request.user): children = children.active() children = children.select_related_common().order_by( "article__current_revision__title" ) return children def get_context_data(self, **kwargs): kwargs_article = ArticleMixin.get_context_data(self, **kwargs) kwargs_listview = ListView.get_context_data(self, **kwargs) kwargs.update(kwargs_article) kwargs.update(kwargs_listview) kwargs["filter_query"] = self.query kwargs["filter_form"] = self.filter_form # Update each child's ancestor cache so the lookups don't have # to be repeated. updated_children = kwargs[self.context_object_name] for child in updated_children: child.set_cached_ancestors_from_parent(self.urlpath) kwargs[self.context_object_name] = updated_children return kwargs class SearchView(ListView): template_name = "wiki/search.html" paginator_class = WikiPaginator paginate_by = 25 context_object_name = "articles" def dispatch(self, request, *args, **kwargs): self.urlpath = None # Do not allow anonymous users to search if they cannot read content if request.user.is_anonymous and not settings.ANONYMOUS: return redirect(settings.LOGIN_URL) self.search_form = forms.SearchForm(request.GET) if self.search_form.is_valid(): self.query = self.search_form.cleaned_data["q"] else: self.query = None return super().dispatch(request, *args, **kwargs) def get_queryset(self): if not self.query: return models.Article.objects.none().order_by( "-current_revision__created" ) articles = models.Article.objects path = self.kwargs.get("path", None) if path: try: self.urlpath = models.URLPath.get_by_path(path) article_ids = self.urlpath.get_descendants( include_self=True ).values_list("article_id") articles = articles.filter(id__in=article_ids) except (NoRootURL, models.URLPath.DoesNotExist): raise Http404 articles = articles.filter( Q(current_revision__title__icontains=self.query) | Q(current_revision__content__icontains=self.query) ) if not permissions.can_moderate( models.URLPath.root().article, self.request.user ): articles = articles.active().can_read(self.request.user) return articles.order_by("-current_revision__created") def get_context_data(self, **kwargs): kwargs = super().get_context_data(**kwargs) kwargs["search_form"] = self.search_form kwargs["search_query"] = self.query kwargs["urlpath"] = self.urlpath return kwargs class Plugin(View): def dispatch(self, request, path=None, slug=None, **kwargs): kwargs["path"] = path for plugin in list(plugin_registry.get_plugins().values()): if getattr(plugin, "slug", None) == slug: return plugin.article_view(request, **kwargs) raise Http404() class Settings(ArticleMixin, TemplateView): permission_form_class = forms.PermissionsForm template_name = "wiki/settings.html" @method_decorator(login_required) @method_decorator(get_article(can_read=True)) def dispatch(self, request, article, *args, **kwargs): return super().dispatch(request, article, *args, **kwargs) def get_form_classes(self): """ Return all settings forms that can be filled in """ settings_forms = [] if permissions.can_change_permissions(self.article, self.request.user): settings_forms.append(self.permission_form_class) plugin_forms = plugin_registry.get_settings_forms() plugin_forms.sort(key=lambda form: form.settings_order) settings_forms += plugin_forms for i in range(len(settings_forms)): # TODO: Do not set an attribute on a form class - this # could be mixed up with a different instance # Use strategy from Edit view... setattr(settings_forms[i], "action", "form%d" % i) return settings_forms def post(self, *args, **kwargs): self.forms = [] for form_class in self.get_form_classes(): if form_class.action == self.request.GET.get("f", None): form = form_class( self.article, self.request, self.request.POST ) if form.is_valid(): form.save() usermessage = form.get_usermessage() if usermessage: messages.success(self.request, usermessage) if self.urlpath: return redirect( "wiki:settings", path=self.urlpath.path ) return redirect( "wiki:settings", article_id=self.article.id ) else: form = form_class(self.article, self.request) self.forms.append(form) return super().get(*args, **kwargs) def get(self, *args, **kwargs): self.forms = [] # There is a bug where articles fetched with select_related have bad boolean field https://code.djangoproject.com/ticket/15040 # We fetch a fresh new article for this reason new_article = models.Article.objects.get(id=self.article.id) for Form in self.get_form_classes(): self.forms.append(Form(new_article, self.request)) return super().get(*args, **kwargs) def get_success_url(self): if self.urlpath: return redirect("wiki:settings", path=self.urlpath.path) return redirect("wiki:settings", article_id=self.article.id) def get_context_data(self, **kwargs): kwargs["selected_tab"] = "settings" kwargs["forms"] = self.forms return super().get_context_data(**kwargs) class ChangeRevisionView(RedirectView): permanent = False @method_decorator(get_article(can_write=True, not_locked=True)) def dispatch(self, request, article, *args, **kwargs): self.article = article self.urlpath = kwargs.pop("kwargs", False) self.change_revision() return super().dispatch(request, *args, **kwargs) def get_redirect_url(self, **kwargs): if self.urlpath: return reverse("wiki:history", kwargs={"path": self.urlpath.path}) else: return reverse( "wiki:history", kwargs={"article_id": self.article.id} ) def change_revision(self): revision = get_object_or_404( models.ArticleRevision, article=self.article, id=self.kwargs["revision_id"], ) self.article.current_revision = revision self.article.save() messages.success( self.request, _( "The article %(title)s is now set to display revision #%(revision_number)d" ) % { "title": revision.title, "revision_number": revision.revision_number, }, ) class Preview(ArticleMixin, TemplateView): template_name = "wiki/preview_inline.html" @method_decorator(xframe_options_sameorigin) @method_decorator(get_article(can_read=True, deleted_contents=True)) def dispatch(self, request, article, *args, **kwargs): revision_id = request.GET.get("r", None) self.title = None self.content = None self.preview = False if revision_id: try: revision_id = int(revision_id) except ValueError: # ValueError only happens because someone put garbage in the # querystring raise Http404() self.revision = get_object_or_404( models.ArticleRevision, article=article, id=revision_id ) else: self.revision = None return super().dispatch(request, article, *args, **kwargs) def post(self, request, *args, **kwargs): edit_form = forms.EditForm( request, self.article.current_revision, request.POST, preview=True ) if edit_form.is_valid(): self.title = edit_form.cleaned_data["title"] self.content = edit_form.cleaned_data["content"] self.preview = True return super().get(request, *args, **kwargs) def get(self, request, *args, **kwargs): if self.revision and not self.title: self.title = self.revision.title if self.revision and not self.content: self.content = self.revision.content return super().get(request, *args, **kwargs) def get_context_data(self, **kwargs): kwargs["title"] = self.title kwargs["revision"] = self.revision kwargs["content"] = self.content kwargs["preview"] = self.preview return ArticleMixin.get_context_data(self, **kwargs) class DiffView(DetailView): model = models.ArticleRevision pk_url_kwarg = "revision_id" def render_to_response(self, context, **response_kwargs): revision = self.get_object() other_revision = revision.previous_revision baseText = other_revision.content if other_revision is not None else "" newText = revision.content differ = difflib.Differ(charjunk=difflib.IS_CHARACTER_JUNK) diff = differ.compare( baseText.splitlines(keepends=True), newText.splitlines(keepends=True), ) other_changes = [] if not other_revision or other_revision.title != revision.title: other_changes.append((_("New title"), revision.title)) return object_to_json_response( {"diff": list(diff), "other_changes": other_changes} ) class MergeView(View): preview = False template_name = "wiki/preview_inline.html" template_error_name = "wiki/error.html" urlpath = None @method_decorator(xframe_options_sameorigin) @method_decorator(get_article(can_write=True)) def dispatch(self, request, article, revision_id, *args, **kwargs): return super().dispatch(request, article, revision_id, *args, **kwargs) def get(self, request, article, revision_id, *args, **kwargs): revision = get_object_or_404( models.ArticleRevision, article=article, id=revision_id ) current_text = ( article.current_revision.content if article.current_revision else "" ) new_text = revision.content content = simple_merge(current_text, new_text) # Save new revision if not self.preview: old_revision = article.current_revision if revision.deleted: c = { "error_msg": _("You cannot merge with a deleted revision"), "article": article, "urlpath": self.urlpath, } return render(request, self.template_error_name, context=c) new_revision = models.ArticleRevision() new_revision.inherit_predecessor(article) new_revision.deleted = False new_revision.locked = False new_revision.title = article.current_revision.title new_revision.content = content new_revision.automatic_log = _( "Merge between revision #%(r1)d and revision #%(r2)d" ) % { "r1": revision.revision_number, "r2": old_revision.revision_number, } article.add_revision(new_revision, save=True) old_revision.simpleplugin_set.all().update( article_revision=new_revision ) revision.simpleplugin_set.all().update( article_revision=new_revision ) messages.success( request, _( "A new revision was created: Merge between revision #%(r1)d and revision #%(r2)d" ) % { "r1": revision.revision_number, "r2": old_revision.revision_number, }, ) if self.urlpath: return redirect("wiki:edit", path=self.urlpath.path) else: return redirect("wiki:edit", article_id=article.id) c = { "article": article, "title": article.current_revision.title, "revision": None, "merge1": revision, "merge2": article.current_revision, "merge": True, "content": content, } return render(request, self.template_name, c) class CreateRootView(FormView): form_class = forms.CreateRootForm template_name = "wiki/create_root.html" def dispatch(self, request, *args, **kwargs): if not request.user.is_superuser: return redirect("wiki:root_missing") try: root = models.URLPath.root() except NoRootURL: pass else: if root.article: return redirect("wiki:get", path=root.path) # TODO: This is too dangerous... let's say there is no root.article and we end up here, # then it might cascade to delete a lot of things on an existing # installation.... / benjaoming root.delete() return super().dispatch(request, *args, **kwargs) def form_valid(self, form): models.URLPath.create_root( title=form.cleaned_data["title"], content=form.cleaned_data["content"], request=self.request, ) return redirect("wiki:root") def get_context_data(self, **kwargs): kwargs = super().get_context_data(**kwargs) kwargs["editor"] = editors.getEditor() return kwargs class MissingRootView(TemplateView): template_name = "wiki/root_missing.html"
39,507
Python
.py
909
31.627063
134
0.581376
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,151
markitup.py
django-wiki_django-wiki/src/wiki/editors/markitup.py
from django import forms from wiki.editors.base import BaseEditor class MarkItUpWidget(forms.Widget): template_name = "wiki/forms/markitup.html" def __init__(self, attrs=None): # The 'rows' and 'cols' attributes are required for HTML correctness. default_attrs = { "class": "markItUp", "rows": "10", "cols": "40", } if attrs: default_attrs.update(attrs) super().__init__(default_attrs) class MarkItUpAdminWidget(MarkItUpWidget): """A simplified more fail-safe widget for the backend""" template_name = "wiki/forms/markitup-admin.html" class MarkItUp(BaseEditor): editor_id = "markitup" def get_admin_widget(self, revision=None): return MarkItUpAdminWidget() def get_widget(self, revision=None): return MarkItUpWidget() class AdminMedia: css = { "all": ( "wiki/markitup/skins/simple/style.css", "wiki/markitup/sets/admin/style.css", ) } js = ( "wiki/markitup/admin.init.js", "wiki/markitup/jquery.markitup.js", "wiki/markitup/sets/admin/set.js", ) class Media: css = { "all": ( "wiki/markitup/skins/simple/style.css", "wiki/markitup/sets/frontend/style.css", ) } js = ( "wiki/markitup/frontend.init.js", "wiki/markitup/jquery.markitup.js", "wiki/markitup/sets/frontend/set.js", )
1,579
Python
.py
47
24.085106
77
0.570395
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,152
__init__.py
django-wiki_django-wiki/src/wiki/editors/__init__.py
from django.urls import get_callable from wiki.conf import settings _EditorClass = None _editor = None def getEditorClass(): global _EditorClass if not _EditorClass: _EditorClass = get_callable(settings.EDITOR) return _EditorClass def getEditor(): global _editor if not _editor: _editor = getEditorClass()() return _editor
368
Python
.py
14
22.071429
52
0.722063
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,153
base.py
django-wiki_django-wiki/src/wiki/editors/base.py
from django import forms class BaseEditor: """Editors should inherit from this. See wiki.editors for examples.""" # The editor id can be used for conditional testing. If you write your # own editor class, you can use the same editor_id as some editor editor_id = "plaintext" media_admin = () media_frontend = () def get_admin_widget(self, revision=None): return forms.Textarea() def get_widget(self, revision=None): return forms.Textarea() class AdminMedia: css = {} js = () class Media: css = {} js = ()
601
Python
.py
18
27.055556
74
0.64
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,154
paginator.py
django-wiki_django-wiki/src/wiki/core/paginator.py
from django.core.paginator import Paginator class WikiPaginator(Paginator): def __init__(self, *args, **kwargs): """ :param side_pages: How many pages should be shown before and after the current page """ self.side_pages = kwargs.pop("side_pages", 4) super().__init__(*args, **kwargs) def page(self, number): # Save last accessed page number for context-based lookup in page_range self.last_accessed_page_number = number return super().page(number) @property def page_range(self): left = max(self.last_accessed_page_number - self.side_pages, 2) right = min( self.last_accessed_page_number + self.side_pages + 1, self.num_pages, ) pages = [] if self.num_pages > 0: pages = [1] if left > 2: pages += [0] pages += range(left, right) if right < self.num_pages: pages += [0] if self.num_pages > 1: pages += [self.num_pages] return pages
1,068
Python
.py
30
26.733333
91
0.569632
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,155
utils.py
django-wiki_django-wiki/src/wiki/core/utils.py
from django.http.response import JsonResponse def object_to_json_response(obj, status=200): """ Given an object, returns an HttpResponse object with a JSON serialized version of that object """ return JsonResponse( data=obj, status=status, safe=False, json_dumps_params={"ensure_ascii": False}, )
355
Python
.py
12
23.75
74
0.674487
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,156
exceptions.py
django-wiki_django-wiki/src/wiki/core/exceptions.py
# If no root URL is found, we raise this... class NoRootURL(Exception): pass # If there is more than one... class MultipleRootURLs(Exception): pass
162
Python
.py
6
23.666667
43
0.733333
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,157
diff.py
django-wiki_django-wiki/src/wiki/core/diff.py
import difflib def simple_merge(txt1, txt2): """Merges two texts""" differ = difflib.Differ(charjunk=difflib.IS_CHARACTER_JUNK) diff = differ.compare(txt1.splitlines(1), txt2.splitlines(1)) content = "".join([_l[2:] for _l in diff]) return content
272
Python
.py
7
34.428571
65
0.693487
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,158
permissions.py
django-wiki_django-wiki/src/wiki/core/permissions.py
from wiki.conf import settings ############################### # ARTICLE PERMISSION HANDLING # ############################### # # All functions are: # can_something(article, user) # => True/False # # All functions can be replaced by pointing their relevant # settings variable in wiki.conf.settings to a callable(article, user) def can_read(article, user): if callable(settings.CAN_READ): return settings.CAN_READ(article, user) else: # Deny reading access to deleted articles if user has no delete access article_is_deleted = ( article.current_revision and article.current_revision.deleted ) if article_is_deleted and not article.can_delete(user): return False # Check access for other users... if user.is_anonymous and not settings.ANONYMOUS: return False elif article.other_read: return True elif user.is_anonymous: return False if user == article.owner: return True if article.group_read: if ( article.group and user.groups.filter(id=article.group.id).exists() ): return True if article.can_moderate(user): return True return False def can_write(article, user): if callable(settings.CAN_WRITE): return settings.CAN_WRITE(article, user) # Check access for other users... if user.is_anonymous and not settings.ANONYMOUS_WRITE: return False elif article.other_write: return True elif user.is_anonymous: return False if user == article.owner: return True if article.group_write: if ( article.group and user and user.groups.filter(id=article.group.id).exists() ): return True if article.can_moderate(user): return True return False def can_assign(article, user): if callable(settings.CAN_ASSIGN): return settings.CAN_ASSIGN(article, user) return not user.is_anonymous and user.has_perm("wiki.assign") def can_assign_owner(article, user): if callable(settings.CAN_ASSIGN_OWNER): return settings.CAN_ASSIGN_OWNER(article, user) return False def can_change_permissions(article, user): if callable(settings.CAN_CHANGE_PERMISSIONS): return settings.CAN_CHANGE_PERMISSIONS(article, user) return not user.is_anonymous and ( article.owner == user or user.has_perm("wiki.assign") ) def can_delete(article, user): if callable(settings.CAN_DELETE): return settings.CAN_DELETE(article, user) return not user.is_anonymous and article.can_write(user) def can_moderate(article, user): if callable(settings.CAN_MODERATE): return settings.CAN_MODERATE(article, user) return not user.is_anonymous and user.has_perm("wiki.moderate") def can_admin(article, user): if callable(settings.CAN_ADMIN): return settings.CAN_ADMIN(article, user) return not user.is_anonymous and user.has_perm("wiki.admin")
3,128
Python
.py
87
28.724138
78
0.650347
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,159
http.py
django-wiki_django-wiki/src/wiki/core/http.py
import mimetypes import os from datetime import datetime from django.http import HttpResponse from django.utils import dateformat from django.utils.encoding import filepath_to_uri from django.utils.http import http_date from wiki.conf import settings def django_sendfile_response(request, filepath): from sendfile import sendfile return sendfile(request, filepath) def send_file(request, filepath, last_modified=None, filename=None): fullpath = filepath # Respect the If-Modified-Since header. statobj = os.stat(fullpath) if filename: mimetype, encoding = mimetypes.guess_type(filename) else: mimetype, encoding = mimetypes.guess_type(fullpath) mimetype = mimetype or "application/octet-stream" if settings.USE_SENDFILE: response = django_sendfile_response(request, filepath) else: response = HttpResponse( open(fullpath, "rb").read(), content_type=mimetype ) if not last_modified: response["Last-Modified"] = http_date(statobj.st_mtime) else: if isinstance(last_modified, datetime): last_modified = float(dateformat.format(last_modified, "U")) response["Last-Modified"] = http_date(epoch_seconds=last_modified) response["Content-Length"] = statobj.st_size if encoding: response["Content-Encoding"] = encoding if filename: filename_escaped = filepath_to_uri(filename) if "pdf" in mimetype.lower(): response["Content-Disposition"] = ( "inline; filename=%s" % filename_escaped ) else: response["Content-Disposition"] = ( "attachment; filename=%s" % filename_escaped ) return response
1,759
Python
.py
46
31.217391
74
0.684118
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,160
__init__.py
django-wiki_django-wiki/src/wiki/core/markdown/__init__.py
import bleach import markdown from bleach.css_sanitizer import CSSSanitizer from wiki.conf import settings from wiki.core.plugins import registry as plugin_registry class ArticleMarkdown(markdown.Markdown): def __init__(self, article, preview=False, user=None, *args, **kwargs): kwargs.update(settings.MARKDOWN_KWARGS) kwargs["extensions"] = self.get_markdown_extensions() super().__init__(*args, **kwargs) self.article = article self.preview = preview self.user = user self.source = None def core_extensions(self): """List of core extensions found in the mdx folder""" return [ "wiki.core.markdown.mdx.codehilite", "wiki.core.markdown.mdx.previewlinks", "wiki.core.markdown.mdx.responsivetable", ] def get_markdown_extensions(self): extensions = list(settings.MARKDOWN_KWARGS.get("extensions", [])) extensions += self.core_extensions() extensions += plugin_registry.get_markdown_extensions() return extensions def convert(self, text, *args, **kwargs): # store source in instance, for extensions which might need it self.source = text html = super().convert(text, *args, **kwargs) if settings.MARKDOWN_SANITIZE_HTML: tags = settings.MARKDOWN_HTML_WHITELIST.union( plugin_registry.get_html_whitelist() ) css_sanitizer = CSSSanitizer( allowed_css_properties=settings.MARKDOWN_HTML_STYLES ) attrs = {} attrs.update(settings.MARKDOWN_HTML_ATTRIBUTES) attrs.update(plugin_registry.get_html_attributes().items()) html = bleach.clean( html, tags=tags, attributes=attrs, css_sanitizer=css_sanitizer, strip=True, ) return html def article_markdown(text, article, *args, **kwargs): md = ArticleMarkdown(article, *args, **kwargs) return md.convert(text) def add_to_registry(processor, key, value, location): """Utility function to register a key by location to Markdown's registry. Parameters: * `processor`: Markdown Registry instance * `key`: A string used to reference the item. * `value`: The item being registered. * `location`: Where to register the new key location can be one of the strings below: * _begin (registers the key as the highest priority) * _end (registers the key as the lowest priority) * a string that starts with `<` or `>` (sets priority halfway between existing priorities) Returns: None Raises: ValueError if location is an invalid string. """ if len(processor) == 0: # This is the first item. Set priority to 50. priority = 50 elif location == "_begin": processor._sort() # Set priority 5 greater than highest existing priority priority = processor._priority[0].priority + 5 elif location == "_end": processor._sort() # Set priority 5 less than lowest existing priority priority = processor._priority[-1].priority - 5 elif location.startswith("<") or location.startswith(">"): # Set priority halfway between existing priorities. i = processor.get_index_for_name(location[1:]) if location.startswith("<"): after = processor._priority[i].priority if i > 0: before = processor._priority[i - 1].priority else: # Location is first item` before = after + 10 else: # location.startswith('>') before = processor._priority[i].priority if i < len(processor) - 1: after = processor._priority[i + 1].priority else: # location is last item after = before - 10 priority = before - ((before - after) / 2) else: raise ValueError( 'Not a valid location: "%s". Location key ' 'must start with a ">" or "<".' % location ) processor.register(value, key, priority)
4,209
Python
.py
101
32.277228
94
0.614858
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,161
responsivetable.py
django-wiki_django-wiki/src/wiki/core/markdown/mdx/responsivetable.py
from xml.etree import ElementTree as etree import markdown from markdown.treeprocessors import Treeprocessor from wiki.core.markdown import add_to_registry class ResponsiveTableExtension(markdown.Extension): """Wraps all tables with Bootstrap's table-responsive class""" def extendMarkdown(self, md): add_to_registry( md.treeprocessors, "responsivetable", ResponsiveTableTree(md), "_end", ) class ResponsiveTableTree(Treeprocessor): """ NOTE: If you allow inputting of raw <table> tags rather than Markdown code for tables, this tree processor will not affect the table, as it gets stashed and not managed by a Treeprocessor type extension. """ def run(self, root): for table_wrapper in list(root.iter("table")): table_new = self.create_table_element() self.convert_to_wrapper(table_wrapper) self.move_children(table_wrapper, table_new) table_wrapper.append(table_new) return root def create_table_element(self): """Create table element with text and tail""" element = etree.Element("table") element.text = "\n" element.tail = "\n" return element def move_children(self, element1, element2): """Moves children from element1 to element2""" for child in list(element1): element2.append(child) # reversed is needed to safely remove items while iterating for child in reversed(list(element1)): element1.remove(child) def convert_to_wrapper(self, element): element.tag = "div" element.set("class", "table-responsive") def makeExtension(*args, **kwargs): """Return an instance of the extension.""" return ResponsiveTableExtension(*args, **kwargs)
1,845
Python
.py
45
33.244444
78
0.670022
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,162
previewlinks.py
django-wiki_django-wiki/src/wiki/core/markdown/mdx/previewlinks.py
import markdown from markdown.treeprocessors import Treeprocessor from wiki.core.markdown import add_to_registry class PreviewLinksExtension(markdown.Extension): """Markdown Extension that sets all anchor targets to _blank when in preview mode""" def extendMarkdown(self, md): add_to_registry( md.treeprocessors, "previewlinks", PreviewLinksTree(md), "_end" ) class PreviewLinksTree(Treeprocessor): def run(self, root): if self.md.preview: for a in root.findall(".//a"): # Do not set target for links like href='#markdown' if not a.get("href").startswith("#"): a.set("target", "_blank") return root def makeExtension(*args, **kwargs): """Return an instance of the extension.""" return PreviewLinksExtension(*args, **kwargs)
860
Python
.py
20
35.2
88
0.66226
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,163
base.py
django-wiki_django-wiki/src/wiki/core/plugins/base.py
from django import forms from django.utils.translation import gettext as _ """Base classes for different plugin objects. * BasePlugin: Create a wiki_plugin.py with a class that inherits from BasePlugin. * PluginSidebarFormMixin: Mix in this class in the form that should be rendered in the editor sidebar * PluginSettingsFormMixin: ..and this one for a form in the settings tab. Please have a look in wiki.models.pluginbase to see where to inherit your plugin's models. """ class BasePlugin: """Plugins should inherit from this""" # Must fill in! slug = None # Optional settings_form = None # A form class to add to the settings tab urlpatterns = { # General urlpatterns that will reside in /wiki/plugins/plugin-slug/... "root": [], # urlpatterns that receive article_id or urlpath, i.e. # /wiki/ArticleName/plugin/plugin-slug/... "article": [], } article_tab = None # (_('Attachments'), "fa fa-file") article_view = None # A view for article_id/plugin/slug/ # A list of notification handlers to be subscribed if the notification # system is active notifications = [] # Example # [{'model': models.AttachmentRevision, # 'message': lambda obj: _("A file was changed: %s") % obj.get_filename(), # 'key': ARTICLE_EDIT, # 'created': True, # 'get_article': lambda obj: obj.attachment.article} # ] markdown_extensions = [] class RenderMedia: js = [] css = {} class PluginSidebarFormMixin(forms.ModelForm): unsaved_article_title = forms.CharField( widget=forms.HiddenInput(), required=True ) unsaved_article_content = forms.CharField( widget=forms.HiddenInput(), required=False ) def get_usermessage(self): pass class PluginSettingsFormMixin: settings_form_headline = _("Settings for plugin") settings_order = 1 settings_write_access = False def get_usermessage(self): pass
2,052
Python
.py
53
33.415094
102
0.664985
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,164
registry.py
django-wiki_django-wiki/src/wiki/core/plugins/registry.py
from importlib import import_module _cache = {} _settings_forms = [] _markdown_extensions = [] _article_tabs = [] _sidebar = [] _html_whitelist = [] _html_attributes = {} def register(PluginClass): """ Register a plugin class. This function will call back your plugin's constructor. """ if PluginClass in _cache: raise Exception("Plugin class already registered") plugin = PluginClass() _cache[PluginClass] = plugin settings_form = getattr(PluginClass, "settings_form", None) if settings_form: if isinstance(settings_form, str): klassname = settings_form.split(".")[-1] modulename = ".".join(settings_form.split(".")[:-1]) form_module = import_module(modulename) settings_form = getattr(form_module, klassname) _settings_forms.append(settings_form) if getattr(PluginClass, "article_tab", None): _article_tabs.append(plugin) if getattr(PluginClass, "sidebar", None): _sidebar.append(plugin) _markdown_extensions.extend( getattr(PluginClass, "markdown_extensions", []) ) _html_whitelist.extend(getattr(PluginClass, "html_whitelist", [])) _html_attributes.update(getattr(PluginClass, "html_attributes", {})) def get_plugins(): """Get loaded plugins - do not call before all plugins are loaded.""" return _cache def get_markdown_extensions(): """Get all markdown extension classes from plugins""" return _markdown_extensions def get_article_tabs(): """Get all article tab dictionaries from plugins""" return _article_tabs def get_sidebar(): """Returns plugin classes that should connect to the sidebar""" return _sidebar def get_settings_forms(): return _settings_forms def get_html_whitelist(): """Returns additional html tags that should be whitelisted""" return _html_whitelist def get_html_attributes(): """Returns additional html attributes that should be whitelisted""" return _html_attributes
2,027
Python
.py
54
32.259259
73
0.690256
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,165
settings.py
django-wiki_django-wiki/src/wiki/plugins/macros/settings.py
from django.conf import settings as django_settings SLUG = "macros" APP_LABEL = "wiki" #: List of markdown extensions this plugin should support. #: ``article_list`` inserts a list of articles from the current level. #: ``toc`` inserts a table of contents matching the headings. METHODS = getattr( django_settings, "WIKI_PLUGINS_METHODS", ( "article_list", "toc", ), )
403
Python
.py
14
25.357143
70
0.697674
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,166
apps.py
django-wiki_django-wiki/src/wiki/plugins/macros/apps.py
from django.apps import AppConfig from django.utils.translation import gettext_lazy as _ class MacrosConfig(AppConfig): name = "wiki.plugins.macros" verbose_name = _("Wiki macros") label = "wiki_macros"
217
Python
.py
6
32.833333
54
0.751196
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,167
wiki_plugin.py
django-wiki_django-wiki/src/wiki/plugins/macros/wiki_plugin.py
from django.utils.translation import gettext as _ from wiki.core.plugins import registry from wiki.core.plugins.base import BasePlugin from wiki.plugins.macros import settings class MacroPlugin(BasePlugin): slug = settings.SLUG sidebar = { "headline": _("Macros"), "icon_class": "fa-play", "template": "wiki/plugins/macros/sidebar.html", "form_class": None, "get_form_kwargs": (lambda a: {}), } markdown_extensions = [ "wiki.plugins.macros.mdx.macro", "wiki.plugins.macros.mdx.toc", "wiki.plugins.macros.mdx.wikilinks", ] registry.register(MacroPlugin)
643
Python
.py
19
28.105263
55
0.674757
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,168
macro.py
django-wiki_django-wiki/src/wiki/plugins/macros/mdx/macro.py
import re import markdown from django.template.loader import render_to_string from django.utils.translation import gettext as _ from wiki.core.markdown import add_to_registry from wiki.plugins.macros import settings from wiki.plugins.macros.mdx import toc # See: # http://stackoverflow.com/questions/430759/regex-for-managing-escaped-characters-for-items-like-string-literals re_sq_short = r"'([^'\\]*(?:\\.[^'\\]*)*)'" MACRO_RE = ( r"""\[(?P<macro>\w+)(?P<kwargs>(\s+\w+\:([^\:\]\s]+|'[^']+'))+)*\]""" ) KWARG_RE = re.compile( r"\s*(?P<arg>\w+)(:(?P<value>([^\']+|%s)))?" % re_sq_short, re.IGNORECASE ) class MacroExtension(markdown.Extension): """Macro plugin markdown extension for django-wiki.""" def extendMarkdown(self, md): add_to_registry( md.inlinePatterns, "dw-macros", MacroPattern(MACRO_RE, md), ">link" ) class MacroPattern(markdown.inlinepatterns.Pattern): """django-wiki macro preprocessor - parse text for various [some_macro] and [some_macro (kw:arg)*] references.""" def __init__(self, pattern, md=None): """Override init in order to add IGNORECASE flag""" super().__init__(pattern, md=md) self.compiled_re = re.compile( r"^(.*?)%s(.*)$" % pattern, flags=re.DOTALL | re.UNICODE | re.IGNORECASE, ) def handleMatch(self, m): macro = m.group("macro").strip().lower() if macro not in settings.METHODS or not hasattr(self, macro): return m.group(2) kwargs = m.group("kwargs") if not kwargs: return getattr(self, macro)() kwargs_dict = {} for kwarg in KWARG_RE.finditer(kwargs): arg = kwarg.group("arg") value = kwarg.group("value") if value is None: value = True if isinstance(value, str): # If value is enclosed with ': Remove and # remove escape sequences if value.startswith("'") and len(value) > 2: value = value[1:-1] value = value.replace("\\\\", "¤KEEPME¤") value = value.replace("\\", "") value = value.replace("¤KEEPME¤", "\\") kwargs_dict[str(arg)] = value return getattr(self, macro)(**kwargs_dict) def article_list(self, depth="2"): html = render_to_string( "wiki/plugins/macros/article_list.html", context={ "article_children": self.md.article.get_children( article__current_revision__deleted=False ), "depth": int(depth) + 1, }, ) return self.md.htmlStash.store(html) article_list.meta = { "short_description": _("Article list"), "help_text": _("Insert a list of articles in this level."), "example_code": "[article_list depth:2]", "args": {"depth": _("Maximum depth to show levels for.")}, } def toc(self, **kwargs): toc.WikiTreeProcessorClass.CACHED_KWARGS = kwargs return "[TOC]" toc.meta = { "short_description": _("Table of contents"), "help_text": _("Insert a table of contents matching the headings."), "example_code": "[TOC] or [TOC toc_depth:1]", "args": { "title": _( "Title to insert in the Table of Contents’ <div>. Defaults to Contents." ), "baselevel": _("Base level for headers. Defaults to 1."), "separator": _( "Word separator. Character which replaces white space in id. Defaults to “-”." ), "anchorlink": _( "Set to True to cause all headers to link to themselves. Default is False." ), "anchorlink_class": _( "CSS class(es) used for the link. Defaults to toclink." ), "permalink": _( "Set to True or a string to generate permanent links at the end of each header. Useful with Sphinx style sheets." ), "permalink_class": _( "CSS class(es) used for the link. Defaults to headerlink." ), "permalink_title": _( "Title attribute of the permanent link. Defaults to Permanent link." ), "toc_depth": _( "Define the range of section levels to include in the Table of Contents. A single integer (b) defines the bottom section " "level (<h1>..<hb>) only. A string consisting of two digits separated by a hyphen in between ('2-5'), define the top (t) " "and the bottom (b) (<ht>..<hb>). Defaults to 6 (bottom)." ), }, } def wikilink(self): return "" wikilink.meta = { "short_description": _("WikiLinks"), "help_text": _( "Insert a link to another wiki page with a short notation." ), "example_code": "[[WikiLink]]", "args": {}, } def makeExtension(*args, **kwargs): """Return an instance of the extension.""" return MacroExtension(*args, **kwargs)
5,202
Python
.py
122
32.467213
138
0.556392
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,169
toc.py
django-wiki_django-wiki/src/wiki/plugins/macros/mdx/toc.py
from markdown.extensions.toc import slugify from markdown.extensions.toc import TocExtension from markdown.extensions.toc import TocTreeprocessor from wiki.plugins.macros import settings HEADER_ID_PREFIX = "wiki-toc-" def process_toc_depth(toc_depth): if isinstance(toc_depth, str) and "-" in toc_depth: toc_top, toc_bottom = (int(x) for x in toc_depth.split("-")) else: toc_top = 1 toc_bottom = int(toc_depth) return {"toc_top": toc_top, "toc_bottom": toc_bottom} def process_bool_value(bool_val, org_val): if bool_val.lower() == "false" or bool_val == "0": return False elif bool_val.lower() == "true" or bool_val == "1": return True else: return org_val def process_value(org_val, new_val): try: if isinstance(new_val, str): new_val = new_val.lstrip("'").rstrip("'") if isinstance(org_val, bool): return process_bool_value(new_val, org_val) elif isinstance(org_val, int): return int(new_val) elif isinstance(org_val, str): return new_val else: return org_val except Exception: return org_val def wiki_slugify(*args, **kwargs): return HEADER_ID_PREFIX + slugify(*args, **kwargs) class WikiTreeProcessorClass(TocTreeprocessor): CACHED_KWARGS = ( dict() ) # Used to cache arguments parsed by the MacroPattern # Used to map the keyword arguments to the Class Objects attribute name. TOC_CONFIG_VALUES = { "title": "title", "baselevel": "base_level", "separator": "sep", "anchorlink": "use_anchors", "anchorlink_class": "anchorlink_class", "permalink": "use_permalinks", "permalink_class": "permalink_class", "permalink_title": "permalink_title", "toc_class": "toc_class", "toc_depth": process_toc_depth, "toc_top": "toc_top", "toc_bottom": "toc_bottom", } def run(self, doc): # Necessary because self.title is set to a LazyObject via gettext_lazy if self.title: self.title = str(self.title) tmp_kwargs = dict() def _helper_swap_values(key, value): # Saves the existing attribute value to a dictionary tmp_kwargs[ WikiTreeProcessorClass.TOC_CONFIG_VALUES[key] ] = getattr(self, WikiTreeProcessorClass.TOC_CONFIG_VALUES[key]) # This sets the value to a TocTreeprocessor attribute of its corresponding name setattr( self, WikiTreeProcessorClass.TOC_CONFIG_VALUES[key], process_value( tmp_kwargs[WikiTreeProcessorClass.TOC_CONFIG_VALUES[key]], value, ), ) try: # Iterator through CACHED_KWARGS to set attributes values and save defaults attribute values to tmp_kwargs for k, v in WikiTreeProcessorClass.CACHED_KWARGS.items(): if ( k in WikiTreeProcessorClass.TOC_CONFIG_VALUES ): # Map of keyword names to their respected object attribute names if callable( WikiTreeProcessorClass.TOC_CONFIG_VALUES[k] ): # Some values in the dictionary are functions to further process values for ( tock, tocv, ) in WikiTreeProcessorClass.TOC_CONFIG_VALUES[k]( v ).items(): _helper_swap_values(tock, tocv) else: _helper_swap_values(k, v) super().run(doc) finally: # Use tmp to reset values for k, v in tmp_kwargs.items(): if hasattr(self, k): setattr(self, k, v) # Unset cached kwargs WikiTreeProcessorClass.CACHED_KWARGS = dict() class WikiTocExtension(TocExtension): TreeProcessorClass = WikiTreeProcessorClass def __init__(self, **kwargs): kwargs.setdefault("slugify", wiki_slugify) super().__init__(**kwargs) def extendMarkdown(self, md): if "toc" in settings.METHODS: TocExtension.extendMarkdown(self, md) def makeExtension(*args, **kwargs): """Return an instance of the extension.""" return WikiTocExtension(*args, **kwargs)
4,527
Python
.py
110
30.027273
118
0.581115
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,170
wikilinks.py
django-wiki_django-wiki/src/wiki/plugins/macros/mdx/wikilinks.py
""" Extend the shipped Markdown extension 'wikilinks' """ import re import xml.etree.ElementTree from django.urls import reverse from markdown.extensions import Extension from markdown.extensions import wikilinks from wiki.core.markdown import add_to_registry def build_url(label, base, end, md): """Build a url from the label, a base, and an end.""" clean_label = re.sub(r"([ ]+_)|(_[ ]+)|([ ]+)", "_", label) urlpaths = md.article.urlpath_set.all() # Nevermind about the base we are fed, just keep the original # call pattern from the wikilinks plugin for later... base = reverse("wiki:get", kwargs={"path": ""}) for urlpath in urlpaths: if urlpath.children.filter(slug=clean_label).exists(): base = "" break return f"{base}{clean_label}{end}" class WikiLinkExtension(Extension): def __init__(self, **kwargs): # set extension defaults self.config = { "base_url": ["", "String to append to beginning or URL."], "end_url": ["/", "String to append to end of URL."], "html_class": ["wiki_wikilink", "CSS hook. Leave blank for none."], "build_url": [build_url, "Callable formats URL from label."], } super().__init__(**kwargs) def extendMarkdown(self, md): self.md = md # append to end of inline patterns WIKILINK_RE = r"\[\[([\w0-9_ -]+)\]\]" wikilinkPattern = WikiLinks(WIKILINK_RE, self.getConfigs()) wikilinkPattern.md = md add_to_registry( md.inlinePatterns, "wikilink", wikilinkPattern, "<not_strong" ) class WikiLinks(wikilinks.WikiLinksInlineProcessor): def handleMatch(self, m, data): base_url, end_url, html_class = self._getMeta() label = m.group(1).strip() url = self.config["build_url"](label, base_url, end_url, self.md) # a = markdown.util.etree.Element("a") a = xml.etree.ElementTree.Element("a") a.text = label a.set("href", url) if html_class: a.set("class", html_class) return a, m.start(0), m.end(0) def makeExtension(*args, **kwargs): """Return an instance of the extension.""" return WikiLinkExtension(*args, **kwargs)
2,266
Python
.py
55
34.236364
79
0.619827
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,171
wiki_macro_tags.py
django-wiki_django-wiki/src/wiki/plugins/macros/templatetags/wiki_macro_tags.py
from django import template from wiki.plugins.macros import settings from wiki.plugins.macros.mdx.macro import MacroPattern register = template.Library() @register.inclusion_tag( "wiki/plugins/templatetags/article_list.html", takes_context=True ) def article_list(context, urlpath, depth): context["parent"] = urlpath context["depth"] = depth return context @register.simple_tag def allowed_macros(): for method in settings.METHODS: try: yield getattr(MacroPattern, method).meta except AttributeError: continue
576
Python
.py
18
27.388889
69
0.74141
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,172
apps.py
django-wiki_django-wiki/src/wiki/plugins/help/apps.py
from django.apps import AppConfig from django.utils.translation import gettext_lazy as _ class HelpConfig(AppConfig): name = "wiki.plugins.help" verbose_name = _("Wiki help") label = "wiki_help"
209
Python
.py
6
31.5
54
0.741294
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,173
wiki_plugin.py
django-wiki_django-wiki/src/wiki/plugins/help/wiki_plugin.py
from django.utils.translation import gettext as _ from wiki.core.plugins import registry from wiki.core.plugins.base import BasePlugin class HelpPlugin(BasePlugin): slug = "help" sidebar = { "headline": _("Help"), "icon_class": "fa-question-circle", "template": "wiki/plugins/help/sidebar.html", "form_class": None, "get_form_kwargs": (lambda a: {}), } markdown_extensions = [] registry.register(HelpPlugin)
470
Python
.py
14
28.142857
53
0.668889
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,174
models.py
django-wiki_django-wiki/src/wiki/plugins/images/models.py
import os.path from django.conf import settings as django_settings from django.db import models from django.db.models import signals from django.utils.translation import gettext from django.utils.translation import gettext_lazy as _ from wiki.models.pluginbase import RevisionPlugin from wiki.models.pluginbase import RevisionPluginRevision from . import settings def upload_path(instance, filename): # Has to match original extension filename upload_path = settings.IMAGE_PATH upload_path = upload_path.replace( "%aid", str(instance.plugin.image.article.id) ) if settings.IMAGE_PATH_OBSCURIFY: import uuid upload_path = os.path.join(upload_path, uuid.uuid4().hex) return os.path.join(upload_path, filename) class Image(RevisionPlugin): # The plugin system is so awesome that the inheritor doesn't need to do # anything! :D def can_write(self, user): if not settings.ANONYMOUS and (not user or user.is_anonymous): return False return RevisionPlugin.can_write(self, user) def can_delete(self, user): return self.can_write(user) class Meta: verbose_name = _("image") verbose_name_plural = _("images") db_table = "wiki_images_image" # Matches label of upcoming 0.1 release def __str__(self): if self.current_revision: return ( gettext("Image: %s") % self.current_revision.imagerevision.get_filename() ) else: return gettext("Current revision not set!!") class ImageRevision(RevisionPluginRevision): image = models.ImageField( upload_to=upload_path, max_length=2000, height_field="height", width_field="width", blank=True, null=True, storage=settings.STORAGE_BACKEND, ) width = models.SmallIntegerField(blank=True, null=True) height = models.SmallIntegerField(blank=True, null=True) def get_filename(self): if self.image: try: return self.image.name.split("/")[-1] except OSError: pass return None def get_size(self): """Used to retrieve the file size and not cause exceptions.""" try: return self.image.size except (ValueError, OSError): return None def inherit_predecessor(self, image, skip_image_file=False): """ Inherit certain properties from predecessor because it's very convenient. Remember to always call this method before setting properties :) A revision may not have a predecessor if the property is unset, it may be unset if it's the initial history entry. """ predecessor = image.current_revision.imagerevision super().inherit_predecessor(image) self.plugin = predecessor.plugin self.deleted = predecessor.deleted self.locked = predecessor.locked if not skip_image_file: try: self.image = predecessor.image self.width = predecessor.width self.height = predecessor.height except OSError: self.image = None class Meta: verbose_name = _("image revision") verbose_name_plural = _("image revisions") # Matches label of upcoming 0.1 release db_table = "wiki_images_imagerevision" ordering = ("-created",) def __str__(self): if self.revision_number: return gettext("Image Revision: %d") % self.revision_number else: return gettext("Current revision not set!!") def on_image_revision_delete(instance, *args, **kwargs): # noqa: max-complexity=11 if not instance.image: return path = None try: path = os.path.dirname(instance.image.path) except NotImplementedError: # This backend storage doesn't implement 'path' so there is no path to delete pass except ValueError: # in case of Value error # https://github.com/django-wiki/django-wiki/issues/936 pass finally: # Remove image file instance.image.delete(save=False) if path is None: # This backend storage doesn't implement 'path' so there is no path to delete # or some other error (ValueError) return # Clean up empty directories # Check for empty folders in the path. Delete the first two. if len(path[-1]) == 32: # Path was (most likely) obscurified so we should look 2 levels down max_depth = 2 else: max_depth = 1 for depth in range(0, max_depth): delete_path = "/".join(path[:-depth] if depth > 0 else path) try: dir_list = os.listdir( os.path.join(django_settings.MEDIA_ROOT, delete_path) ) except OSError: # Path does not exist, so let's not try to remove it... dir_list = None if dir_list is not None and len(dir_list) == 0: os.rmdir(delete_path) signals.pre_delete.connect(on_image_revision_delete, ImageRevision)
5,183
Python
.py
135
29.948148
85
0.637976
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,175
checks.py
django-wiki_django-wiki/src/wiki/plugins/images/checks.py
from django.apps import apps from django.core.checks import Error class Tags: required_installed_apps = "required_installed_apps" def check_for_required_installed_apps(app_configs, **kwargs): errors = [] if not apps.is_installed("sorl.thumbnail"): errors.append( Error( "needs sorl.thumbnail in INSTALLED_APPS", id="wiki_images.E001" ) ) return errors
428
Python
.py
13
26.076923
79
0.659367
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,176
settings.py
django-wiki_django-wiki/src/wiki/plugins/images/settings.py
from django.conf import settings as django_settings from wiki.conf import settings as wiki_settings SLUG = "images" # Deprecated APP_LABEL = None #: Location where uploaded images are stored. ``%aid`` is replaced by the article id. IMAGE_PATH = getattr(django_settings, "WIKI_IMAGES_PATH", "wiki/images/%aid/") #: Size for the image thumbnail included in the HTML text. If no specific #: size is given in the markdown tag the ``default`` size is used. If a #: specific size is given in the markdown tag that size is used. THUMBNAIL_SIZES = getattr( django_settings, "WIKI_IMAGES_THUMBNAIL_SIZES", { "default": "250x250", "small": "150x150", "medium": "300x300", "large": "500x500", "orig": None, }, ) #: Storage backend to use, default is to use the same as the rest of the #: wiki, which is set in ``WIKI_STORAGE_BACKEND``, but you can override it #: with ``WIKI_IMAGES_STORAGE_BACKEND``. STORAGE_BACKEND = getattr( django_settings, "WIKI_IMAGES_STORAGE_BACKEND", wiki_settings.STORAGE_BACKEND, ) #: Should the upload path be obscurified? If so, a random hash will be added #: to the path such that someone can not guess the location of files (if you #: have restricted permissions and the files are still located within the #: web server's file system). IMAGE_PATH_OBSCURIFY = getattr( django_settings, "WIKI_IMAGES_PATH_OBSCURIFY", True ) #: Allow anonymous users upload access (not nice on an open network). #: ``WIKI_IMAGES_ANONYMOUS`` can override this, otherwise the default #: in ``wiki.conf.settings`` is used. ANONYMOUS = getattr( django_settings, "WIKI_IMAGES_ANONYMOUS", wiki_settings.ANONYMOUS_UPLOAD )
1,699
Python
.py
42
37.47619
85
0.726061
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,177
markdown_extensions.py
django-wiki_django-wiki/src/wiki/plugins/images/markdown_extensions.py
import re import markdown from django.template.loader import render_to_string from wiki.core.markdown import add_to_registry from wiki.plugins.images import models from wiki.plugins.images import settings IMAGE_RE = ( r"(?:" + # Match '[image:N' r"\[image\:(?P<id>[0-9]+)" + # Match optional 'align' r"(?:\s+align\:(?P<align>right|left))?" + # Match optional 'size' r"(?:\s+size\:(?P<size>default|small|medium|large|orig))?" + # Match ']' and rest of line. # Normally [^\n] could be replaced with a dot '.', since '.' # does not match newlines, but inline processors run with re.DOTALL. r"\s*\](?P<trailer>[^\n]*)$" + # Match zero or more caption lines, each indented by four spaces. r"(?P<caption>(?:\n [^\n]*)*))" ) class ImageExtension(markdown.Extension): """Images plugin markdown extension for django-wiki.""" def extendMarkdown(self, md): add_to_registry( md.inlinePatterns, "dw-images", ImagePattern(IMAGE_RE, md), ">link" ) add_to_registry( md.postprocessors, "dw-images-cleanup", ImagePostprocessor(md), ">raw_html", ) class ImagePattern(markdown.inlinepatterns.Pattern): """ django-wiki image preprocessor Parse text for [image:N align:ALIGN size:SIZE] references. For instance: [image:id align:left|right] This is the caption text maybe with [a link](...) So: Remember that the caption text is fully valid markdown! """ def __init__(self, pattern, md=None): """Override init in order to add IGNORECASE and MULTILINE flags""" super().__init__(pattern, md=md) self.compiled_re = re.compile( r"^(.*?)%s(.*)$" % pattern, flags=re.DOTALL | re.UNICODE | re.IGNORECASE | re.MULTILINE, ) def handleMatch(self, m): image = None image_id = None alignment = None size = settings.THUMBNAIL_SIZES["default"] image_id = m.group("id").strip() alignment = m.group("align") if m.group("size"): size = settings.THUMBNAIL_SIZES[m.group("size")] try: image = models.Image.objects.get( article=self.md.article, id=image_id, current_revision__deleted=False, ) except models.Image.DoesNotExist: pass caption = m.group("caption") trailer = m.group("trailer") caption_placeholder = "{{{IMAGECAPTION}}}" width = size.split("x")[0] if size else None html = render_to_string( "wiki/plugins/images/render.html", context={ "image": image, "caption": caption_placeholder, "align": alignment, "size": size, "width": width, }, ) html_before, html_after = html.split(caption_placeholder) placeholder_before = self.md.htmlStash.store(html_before) placeholder_after = self.md.htmlStash.store(html_after) return placeholder_before + caption + placeholder_after + trailer class ImagePostprocessor(markdown.postprocessors.Postprocessor): def run(self, text): """ This cleans up after Markdown's well-intended placing of image tags inside <p> elements. The problem is that Markdown should put <p> tags around images as they are inline elements. However, because we wrap them in <figure>, we don't actually want it and have to remove it again after. """ text = text.replace("<p><figure", "<figure") text = text.replace("</figure>\n</p>", "</figure>") return text
3,775
Python
.py
101
29.069307
79
0.596827
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,178
apps.py
django-wiki_django-wiki/src/wiki/plugins/images/apps.py
from django.apps import AppConfig from django.core.checks import register from django.utils.translation import gettext_lazy as _ from . import checks class ImagesConfig(AppConfig): name = "wiki.plugins.images" verbose_name = _("Wiki images") label = "wiki_images" def ready(self): register( checks.check_for_required_installed_apps, checks.Tags.required_installed_apps, )
432
Python
.py
13
27.615385
54
0.706024
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,179
wiki_plugin.py
django-wiki_django-wiki/src/wiki/plugins/images/wiki_plugin.py
from django.urls import re_path from django.utils.translation import gettext as _ from wiki.core.plugins import registry from wiki.core.plugins.base import BasePlugin from wiki.plugins.images import forms from wiki.plugins.images import models from wiki.plugins.images import settings from wiki.plugins.images import views from wiki.plugins.images.markdown_extensions import ImageExtension from wiki.plugins.notifications.settings import ARTICLE_EDIT from wiki.plugins.notifications.util import truncate_title class ImagePlugin(BasePlugin): slug = settings.SLUG sidebar = { "headline": _("Images"), "icon_class": "fa-image", "template": "wiki/plugins/images/sidebar.html", "form_class": forms.SidebarForm, "get_form_kwargs": (lambda a: {"instance": models.Image(article=a)}), } # List of notifications to construct signal handlers for. This # is handled inside the notifications plugin. notifications = [ { "model": models.ImageRevision, "message": lambda obj: _("An image was added: %s") % truncate_title(obj.get_filename()), "key": ARTICLE_EDIT, "created": False, # Ignore if there is a previous revision... the image isn't new "ignore": lambda revision: bool(revision.previous_revision), "get_article": lambda obj: obj.article, } ] class RenderMedia: js = [ "wiki/colorbox/jquery.colorbox-min.js", "wiki/js/images.js", ] css = {"screen": "wiki/colorbox/example1/colorbox.css"} urlpatterns = { "article": [ re_path("^$", views.ImageView.as_view(), name="images_index"), re_path( "^delete/(?P<image_id>[0-9]+)/$", views.DeleteView.as_view(), name="images_delete", ), re_path( "^restore/(?P<image_id>[0-9]+)/$", views.DeleteView.as_view(), name="images_restore", kwargs={"restore": True}, ), re_path( "^purge/(?P<image_id>[0-9]+)/$", views.PurgeView.as_view(), name="images_purge", ), re_path( "^(?P<image_id>[0-9]+)/revision/change/(?P<rev_id>[0-9]+)/$", views.RevisionChangeView.as_view(), name="images_set_revision", ), re_path( "^(?P<image_id>[0-9]+)/revision/add/$", views.RevisionAddView.as_view(), name="images_add_revision", ), ] } markdown_extensions = [ImageExtension()] registry.register(ImagePlugin)
2,769
Python
.py
73
27.931507
77
0.56978
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,180
admin.py
django-wiki_django-wiki/src/wiki/plugins/images/admin.py
from django import forms from django.contrib import admin from . import models class ImageForm(forms.ModelForm): class Meta: model = models.Image exclude = () def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) if self.instance.pk: revisions = models.ImageRevision.objects.filter( plugin=self.instance ) self.fields["current_revision"].queryset = revisions else: self.fields[ "current_revision" ].queryset = models.ImageRevision.objects.none() self.fields["current_revision"].widget = forms.HiddenInput() class ImageRevisionInline(admin.TabularInline): model = models.ImageRevision extra = 1 fields = ("image", "locked", "deleted") class ImageAdmin(admin.ModelAdmin): form = ImageForm inlines = (ImageRevisionInline,) admin.site.register(models.Image, ImageAdmin)
965
Python
.py
27
28
72
0.645474
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,181
forms.py
django-wiki_django-wiki/src/wiki/plugins/images/forms.py
from django import forms from django.utils.translation import gettext from django.utils.translation import gettext_lazy as _ from wiki.core.plugins.base import PluginSidebarFormMixin from wiki.plugins.images import models class SidebarForm(PluginSidebarFormMixin): def __init__(self, article, request, *args, **kwargs): self.article = article self.request = request super().__init__(*args, **kwargs) self.fields["image"].required = True def get_usermessage(self): return ( gettext( "New image %s was successfully uploaded. You can use it by selecting it from the list of available images." ) % self.instance.get_filename() ) def save(self, *args, **kwargs): if not self.instance.id: image = models.Image() image.article = self.article kwargs["commit"] = False revision = super().save(*args, **kwargs) revision.set_from_request(self.request) image.add_revision(self.instance, save=True) return revision return super().save(*args, **kwargs) class Meta: model = models.ImageRevision fields = ("image",) class RevisionForm(forms.ModelForm): def __init__(self, *args, **kwargs): self.image = kwargs.pop("image") self.request = kwargs.pop("request") super().__init__(*args, **kwargs) self.fields["image"].required = True def save(self, *args, **kwargs): if not self.instance.id: kwargs["commit"] = False revision = super().save(*args, **kwargs) revision.inherit_predecessor(self.image, skip_image_file=True) revision.deleted = False # Restore automatically if deleted revision.set_from_request(self.request) self.image.add_revision(self.instance, save=True) return revision return super().save(*args, **kwargs) class Meta: model = models.ImageRevision fields = ("image",) class PurgeForm(forms.Form): confirm = forms.BooleanField(label=_("Are you sure?"), required=False) def clean_confirm(self): confirm = self.cleaned_data["confirm"] if not confirm: raise forms.ValidationError(gettext("You are not sure enough!")) return confirm
2,375
Python
.py
57
32.807018
123
0.627927
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,182
views.py
django-wiki_django-wiki/src/wiki/plugins/images/views.py
import logging from django.contrib import messages from django.shortcuts import get_object_or_404 from django.shortcuts import redirect from django.urls import reverse from django.utils.decorators import method_decorator from django.utils.translation import gettext as _ from django.views.generic import FormView from django.views.generic import ListView from django.views.generic import RedirectView from wiki.conf import settings as wiki_settings from wiki.core.paginator import WikiPaginator from wiki.decorators import get_article from wiki.models.pluginbase import RevisionPluginRevision from wiki.plugins.images import forms from wiki.plugins.images import models from wiki.views.mixins import ArticleMixin logger = logging.getLogger(__name__) class ImageView(ArticleMixin, ListView): template_name = "wiki/plugins/images/index.html" allow_empty = True context_object_name = "images" paginator_class = WikiPaginator paginate_by = 10 @method_decorator(get_article(can_read=True, not_locked=True)) def dispatch(self, request, article, *args, **kwargs): return super().dispatch(request, article, *args, **kwargs) def get_queryset(self): if self.article.can_moderate( self.request.user ) or self.article.can_delete(self.request.user): images = models.Image.objects.filter(article=self.article) else: images = models.Image.objects.filter( article=self.article, current_revision__deleted=False ) images.select_related() return images.order_by("-current_revision__imagerevision__created") def get_context_data(self, **kwargs): kwargs.update(ArticleMixin.get_context_data(self, **kwargs)) return ListView.get_context_data(self, **kwargs) class DeleteView(ArticleMixin, RedirectView): permanent = False @method_decorator(get_article(can_write=True, not_locked=True)) def dispatch(self, request, article, *args, **kwargs): self.image = get_object_or_404( models.Image, article=article, id=kwargs.get("image_id", None) ) self.restore = kwargs.get("restore", False) return ArticleMixin.dispatch(self, request, article, *args, **kwargs) def get_redirect_url(self, **kwargs): if not self.image.current_revision: logger.critical( "Encountered an image without current revision set, ID: {}".format( self.image.id ) ) latest_revision = RevisionPluginRevision.objects.filter( plugin=self.image ).latest("pk") self.image.current_revision = latest_revision new_revision = models.ImageRevision() new_revision.inherit_predecessor(self.image) new_revision.set_from_request(self.request) new_revision.revision_number = RevisionPluginRevision.objects.filter( plugin=self.image ).count() new_revision.deleted = not self.restore new_revision.save() self.image.current_revision = new_revision self.image.save() if self.restore: messages.info( self.request, _("%s has been restored") % new_revision.get_filename(), ) else: messages.info( self.request, _("%s has been marked as deleted") % new_revision.get_filename(), ) if self.urlpath: return reverse( "wiki:images_index", kwargs={"path": self.urlpath.path} ) return reverse( "wiki:images_index", kwargs={"article_id": self.article.id} ) class PurgeView(ArticleMixin, FormView): template_name = "wiki/plugins/images/purge.html" permanent = False form_class = forms.PurgeForm @method_decorator(get_article(can_write=True, can_moderate=True)) def dispatch(self, request, article, *args, **kwargs): self.image = get_object_or_404( models.Image, article=article, id=kwargs.get("image_id", None) ) return super().dispatch(request, article, *args, **kwargs) def form_valid(self, form): for revision in self.image.revision_set.all().select_related( "imagerevision" ): revision.imagerevision.image.delete(save=False) revision.imagerevision.delete() if self.urlpath: return redirect("wiki:images_index", path=self.urlpath.path) return redirect("wiki:images_index", article_id=self.article_id) def get_context_data(self, **kwargs): # Needed since Django 1.9 because get_context_data is no longer called # with the form instance if "form" not in kwargs: kwargs["form"] = self.get_form() kwargs = ArticleMixin.get_context_data(self, **kwargs) kwargs.update(FormView.get_context_data(self, **kwargs)) return kwargs class RevisionChangeView(ArticleMixin, RedirectView): permanent = False @method_decorator(get_article(can_write=True, not_locked=True)) def dispatch(self, request, article, *args, **kwargs): self.image = get_object_or_404( models.Image, article=article, id=kwargs.get("image_id", None) ) self.revision = get_object_or_404( models.ImageRevision, plugin__article=article, id=kwargs.get("rev_id", None), ) return ArticleMixin.dispatch(self, request, article, *args, **kwargs) def get_redirect_url(self, **kwargs): self.image.current_revision = self.revision self.image.save() messages.info( self.request, _("%(file)s has been changed to revision #%(revision)d") % { "file": self.image.current_revision.imagerevision.get_filename(), "revision": self.revision.revision_number, }, ) if self.urlpath: return reverse( "wiki:images_index", kwargs={"path": self.urlpath.path} ) return reverse( "wiki:images_index", kwargs={"article_id": self.article.id} ) class RevisionAddView(ArticleMixin, FormView): template_name = "wiki/plugins/images/revision_add.html" form_class = forms.RevisionForm @method_decorator(get_article(can_write=True, not_locked=True)) def dispatch(self, request, article, *args, **kwargs): self.image = get_object_or_404( models.Image, article=article, id=kwargs.get("image_id", None) ) if not self.image.can_write(request.user): return redirect(wiki_settings.LOGIN_URL) return ArticleMixin.dispatch(self, request, article, *args, **kwargs) def get_form_kwargs(self, **kwargs): kwargs = super().get_form_kwargs(**kwargs) kwargs["image"] = self.image kwargs["request"] = self.request return kwargs def get_context_data(self, **kwargs): # Needed since Django 1.9 because get_context_data is no longer called # with the form instance if "form" not in kwargs: kwargs["form"] = self.get_form() kwargs = super().get_context_data(**kwargs) kwargs["image"] = self.image return kwargs def form_valid(self, form, **kwargs): form.save() messages.info( self.request, _("%(file)s has been saved.") % { "file": self.image.current_revision.imagerevision.get_filename() }, ) if self.urlpath: return redirect("wiki:edit", path=self.urlpath.path) return redirect("wiki:edit", article_id=self.article.id)
7,806
Python
.py
183
33.568306
83
0.639236
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,183
wiki_images_tags.py
django-wiki_django-wiki/src/wiki/plugins/images/templatetags/wiki_images_tags.py
from django import template from wiki.plugins.images import models from wiki.plugins.images import settings register = template.Library() @register.filter def images_for_article(article): return models.Image.objects.filter( article=article, current_revision__deleted=False ).order_by("-current_revision__created") @register.filter def images_can_add(article, user): if not settings.ANONYMOUS and (not user or user.is_anonymous): return False return article.can_write(user)
510
Python
.py
14
32.785714
66
0.773931
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,184
0002_auto_20151118_1811.py
django-wiki_django-wiki/src/wiki/plugins/images/migrations/0002_auto_20151118_1811.py
from django.db import migrations class Migration(migrations.Migration): atomic = False dependencies = [ ("wiki_images", "0001_initial"), ] operations = [ migrations.AlterModelTable( name="image", table="wiki_images_image", ), migrations.AlterModelTable( name="imagerevision", table="wiki_images_imagerevision", ), ]
429
Python
.py
16
18.75
46
0.585784
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,185
0001_initial.py
django-wiki_django-wiki/src/wiki/plugins/images/migrations/0001_initial.py
import wiki.plugins.images.models from django.db import migrations from django.db import models class Migration(migrations.Migration): dependencies = [ ("wiki", "0001_initial"), ] operations = [ migrations.CreateModel( name="Image", fields=[ ( "revisionplugin_ptr", models.OneToOneField( to="wiki.RevisionPlugin", primary_key=True, auto_created=True, parent_link=True, serialize=False, on_delete=models.CASCADE, ), ), ], options={ "verbose_name": "image", "verbose_name_plural": "images", }, bases=("wiki.revisionplugin",), ), migrations.CreateModel( name="ImageRevision", fields=[ ( "revisionpluginrevision_ptr", models.OneToOneField( to="wiki.RevisionPluginRevision", primary_key=True, auto_created=True, parent_link=True, serialize=False, on_delete=models.CASCADE, ), ), ( "image", models.ImageField( null=True, blank=True, height_field="height", max_length=2000, width_field="width", upload_to=wiki.plugins.images.models.upload_path, ), ), ("width", models.SmallIntegerField(null=True, blank=True)), ("height", models.SmallIntegerField(null=True, blank=True)), ], options={ "verbose_name": "image revision", "verbose_name_plural": "image revisions", "ordering": ("-created",), }, bases=("wiki.revisionpluginrevision",), ), ]
2,253
Python
.py
65
17.907692
76
0.415293
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,186
settings.py
django-wiki_django-wiki/src/wiki/plugins/editsection/settings.py
from django.conf import settings as django_settings from django.utils.translation import gettext SLUG = "editsection" #: Add "[edit]" links to all section headers till this level. By using #: these links editing only the text from the selected section is possible. MAX_LEVEL = getattr(django_settings, "WIKI_EDITSECTION_MAX_LEVEL", 3) #: Text used for the section edit links which will appear next to section #: headers. These links allow editing only the text of one particular section. LINK_TEXT = getattr( django_settings, "WIKI_EDITSECTION_LINK_TEXT", gettext("[edit]") )
583
Python
.py
11
51.363636
78
0.782074
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,187
markdown_extensions.py
django-wiki_django-wiki/src/wiki/plugins/editsection/markdown_extensions.py
import logging import re from xml.etree import ElementTree as etree from django.urls import reverse from markdown import Extension from markdown.blockprocessors import HashHeaderProcessor from markdown.blockprocessors import SetextHeaderProcessor from markdown.treeprocessors import Treeprocessor from wiki.core.markdown import add_to_registry from wiki.plugins.macros.mdx.toc import wiki_slugify from . import settings logger = logging.getLogger("MARKDOWN") class CustomHashHeaderProcessor(HashHeaderProcessor): """ Custom HashHeaderProcessor. The only difference to the upstream processor is that we set the data-block-source attribute on any inserted header. """ def run(self, parent, blocks): block = blocks.pop(0) m = self.RE.search(block) if m: before = block[: m.start()] # All lines before header after = block[m.end() :] # All lines after header if before: # As the header was not the first line of the block and the # lines before the header must be parsed first, # recursively parse this lines as a block. self.parser.parseBlocks(parent, [before]) # Create header using named groups from RE h = etree.SubElement(parent, "h%d" % len(m.group("level"))) h.text = m.group("header").strip() h.attrib["data-block-source"] = m.group().strip() if after: # Insert remaining lines as first block for future parsing. blocks.insert(0, after) else: # pragma: no cover # This should never happen, but just in case... logger.warning("We've got a problem header: %r" % block) class CustomSetextHeaderProcessor(SetextHeaderProcessor): """ Custom SetextHeaderProcessor. The only difference to the upstream processor is that we set the data-block-source attribute on any inserted header. """ def run(self, parent, blocks): lines = blocks.pop(0).split("\n") # Determine level. ``=`` is 1 and ``-`` is 2. if lines[1].startswith("="): level = 1 else: level = 2 h = etree.SubElement(parent, "h%d" % level) h.text = lines[0].strip() h.attrib["data-block-source"] = "\r\n".join(lines) if len(lines) > 2: # Block contains additional lines. Add to master blocks for later. blocks.insert(0, "\n".join(lines[2:])) class EditSectionExtension(Extension): def __init__(self, *args, **kwargs): self.config = { "level": [ settings.MAX_LEVEL, "Allow to edit sections until this level", ] } super().__init__(**kwargs) def extendMarkdown(self, md): # replace HashHeader/SetextHeader processors with our custom variants md.parser.blockprocessors.register( CustomHashHeaderProcessor(md.parser), "hashheader", 70 ) md.parser.blockprocessors.register( CustomSetextHeaderProcessor(md.parser), "setextheader", 60 ) # the tree processor adds the actual edit links add_to_registry( md.treeprocessors, "editsection", EditSectionProcessor(self.config, md), "_end", ) class EditSectionProcessor(Treeprocessor): """ TreeProcessor adds the edit links for every header which has a data-block-source attribute """ def __init__(self, config, md=None): self.config = config self.slugs = {} # keep found slugs (to ensure uniqueness) self.source = None # will be set in run() self.last_start = 0 # location of last inserted edit link super().__init__(md) def ensure_unique_id(self, node): """ensures that node has a unique id, preferring an already existing id""" if "id" in node.attrib: slug = node.attrib["id"] else: content = node.text.strip() slug = wiki_slugify(content, "-", unicode=True) candidate = slug i = 1 while candidate in self.slugs: candidate = f"{slug}_{i}" i += 1 self.slugs[candidate] = True node.attrib["id"] = candidate return candidate def add_links(self, node): headers = [] for child in list(node): match = self.HEADER_RE.match(child.tag.lower()) if not match: continue level = match.group(1) if "data-block-source" in child.attrib: source_block = child.attrib["data-block-source"] del child.attrib["data-block-source"] # locate in document source start = self.source.find(source_block, self.last_start) if start == -1: # not found in source, ignore continue self.last_start = start + 1 # ensure that the node has a unique id slug = self.ensure_unique_id(child) # Insert link to allow editing this section link = etree.SubElement(child, "a") link.text = settings.LINK_TEXT link.attrib["class"] = "article-edit-title-link" # Build the URL url_kwargs = self.md.article.get_url_kwargs() url_kwargs["header"] = child.attrib["id"] link.attrib["href"] = reverse( "wiki:editsection", kwargs=url_kwargs ) headers.append( { "slug": slug, "position": start, "level": level, "source": source_block, } ) return headers def run(self, root): self.level = self.config.get("level")[0] self.article = self.md.article self.source = self.md.source self.HEADER_RE = re.compile( "^h([" + "".join(map(str, range(1, self.level + 1))) + "])" ) headers = self.add_links(root) # store found headers at article, for use in edit view self.article._found_headers = headers return root
6,370
Python
.py
155
30.23871
94
0.577128
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,188
apps.py
django-wiki_django-wiki/src/wiki/plugins/editsection/apps.py
from django.apps import AppConfig from django.utils.translation import gettext_lazy as _ class EditSectionConfig(AppConfig): name = "wiki.plugins.editsection" verbose_name = _("Wiki edit section") label = "wiki_editsection"
238
Python
.py
6
36.333333
54
0.769565
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,189
wiki_plugin.py
django-wiki_django-wiki/src/wiki/plugins/editsection/wiki_plugin.py
from django.urls import re_path as url from wiki.core.plugins import registry from wiki.core.plugins.base import BasePlugin from wiki.plugins.editsection.markdown_extensions import EditSectionExtension from . import settings from . import views class EditSectionPlugin(BasePlugin): slug = settings.SLUG urlpatterns = { "article": [ url( r"^header/(?P<header>[\S]+)/$", views.EditSection.as_view(), name="editsection", ), ] } markdown_extensions = [EditSectionExtension()] registry.register(EditSectionPlugin)
619
Python
.py
19
25.789474
77
0.670034
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,190
views.py
django-wiki_django-wiki/src/wiki/plugins/editsection/views.py
from django.contrib import messages from django.shortcuts import get_object_or_404 from django.shortcuts import redirect from django.utils.decorators import method_decorator from django.utils.translation import gettext_lazy from wiki import models from wiki.core.markdown import article_markdown from wiki.decorators import get_article from wiki.views.article import Edit as EditView ERROR_SECTION_CHANGED = gettext_lazy( "Unable to find the selected section. The article was modified meanwhile." ) ERROR_SECTION_UNSAVED = gettext_lazy( "Your changes must be re-applied in the new section structure of the " "article." ) ERROR_ARTICLE_CHANGED = gettext_lazy( "Unable to find the selected section in the current article. The article " "was changed in between. Your changed section is still available as the " "last now inactive revision of this article." ) ERROR_TRY_AGAIN = gettext_lazy("Please try again.") class EditSection(EditView): def locate_section(self, article, content): """ locate the section to be edited, returning index of start and end """ # render article to get the headers article_markdown(content, article) headers = getattr(article, "_found_headers", []) # find start start, end = None, None while len(headers): header = headers.pop(0) if header["slug"] == self.header_id: if content[header["position"] :].startswith(header["source"]): start = header break if start is None: # start section not found return None, None # we have the beginning, now find next section with same or higher level while len(headers): header = headers.pop(0) if header["level"] <= start["level"]: if content[header["position"] :].startswith(header["source"]): end = header break else: # there should be a matching header, but we did not find it. # better be safe. return None, None return ( (start["position"], end["position"]) if end else (start["position"], len(content)) ) def _redirect_to_article(self): if self.urlpath: return redirect("wiki:get", path=self.urlpath.path) return redirect("wiki:get", article_id=self.article.id) @method_decorator(get_article(can_write=True, not_locked=True)) def dispatch(self, request, article, *args, **kwargs): self.header_id = kwargs.pop("header", 0) self.urlpath = kwargs.get("urlpath") kwargs["path"] = self.urlpath.path content = article.current_revision.content if request.method == "GET": start, end = self.locate_section(article, content) if start is not None and end is not None: self.orig_section = content[start:end] kwargs["content"] = self.orig_section request.session["editsection_content"] = self.orig_section else: messages.error( request, f"{ERROR_SECTION_CHANGED} {ERROR_TRY_AGAIN}", ) return self._redirect_to_article() else: kwargs["content"] = request.session.get("editsection_content") self.orig_section = kwargs.get("content") return super().dispatch(request, article, *args, **kwargs) def form_valid(self, form): super().form_valid(form) section = self.article.current_revision.content if not section.endswith("\n"): section += "\r\n\r\n" content = get_object_or_404( models.ArticleRevision, article=self.article, id=self.article.current_revision.previous_revision.id, ).content start, end = self.locate_section(self.article, content) if start is not None and end is not None: # compare saved original section with last version, so we # can detect if someone else changed it in the meantime if self.orig_section != content[start:end]: messages.warning( self.request, "{} {} {}".format( ERROR_SECTION_CHANGED, ERROR_SECTION_UNSAVED, ERROR_TRY_AGAIN, ), ) # Include the edited section into the complete previous article self.article.current_revision.content = ( content[0:start] + section + content[end:] ) self.article.current_revision.save() else: # Back to the version before replacing the article with the section self.article.current_revision = ( self.article.current_revision.previous_revision ) self.article.save() messages.error( self.request, f"{ERROR_ARTICLE_CHANGED} {ERROR_TRY_AGAIN}", ) return self._redirect_to_article()
5,243
Python
.py
122
31.737705
80
0.593187
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,191
apps.py
django-wiki_django-wiki/src/wiki/plugins/redlinks/apps.py
from django.apps import AppConfig from django.utils.translation import gettext_lazy as _ class RedlinksConfig(AppConfig): name = "wiki.plugins.redlinks" verbose_name = _("Wiki red links") label = "wiki_redlinks"
226
Python
.py
6
34.333333
54
0.756881
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,192
wiki_plugin.py
django-wiki_django-wiki/src/wiki/plugins/redlinks/wiki_plugin.py
from wiki.core.plugins import registry from wiki.core.plugins.base import BasePlugin class Plugin(BasePlugin): markdown_extensions = [ "wiki.plugins.redlinks.mdx.redlinks", ] registry.register(Plugin)
221
Python
.py
7
27.714286
45
0.77619
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,193
redlinks.py
django-wiki_django-wiki/src/wiki/plugins/redlinks/mdx/redlinks.py
import html from urllib.parse import urljoin from urllib.parse import urlparse import wiki from django.urls import resolve from django.urls.exceptions import Resolver404 from markdown.extensions import Extension from markdown.postprocessors import AndSubstitutePostprocessor from markdown.treeprocessors import Treeprocessor from wiki.core.markdown import add_to_registry from wiki.decorators import which_article from wiki.models import Article from wiki.models import URLPath class LinkTreeprocessor(Treeprocessor): def __init__(self, md, config): super().__init__(md) self.md = md self.broken_class = config["broken"] self.internal_class = config["internal"] self.external_class = config["external"] @property def my_urlpath(self): try: return self._my_urlpath except AttributeError: self._my_urlpath = self.md.article.get_absolute_url() return self._my_urlpath def get_class(self, el): # noqa: max-complexity 11 href = el.get("href") if not href: return # The autolinker turns email links into links with many HTML entities. # These entities are further escaped using markdown-specific codes. # First unescape the markdown-specific, then use html.unescape. href = AndSubstitutePostprocessor().run(href) href = html.unescape(href) try: url = urlparse(href) except ValueError: return if url.scheme == "mailto": return if url.scheme or url.netloc: # Contains a hostname or url schema ⇒ External link return self.external_class # Ensure that path ends with a slash relpath = url.path.rstrip("/") + "/" try: target = resolve(urljoin(self.my_urlpath, relpath)) except Resolver404: # Broken absolute link return self.external_class if target.app_names != ["wiki"]: # Links outside wiki return self.external_class try: article, urlpath = which_article(**target.kwargs) except ( wiki.core.exceptions.NoRootURL, URLPath.DoesNotExist, Article.DoesNotExist, ): return self.broken_class return self.internal_class def run(self, doc): for el in doc.iter(): if el.tag != "a": continue class_ = self.get_class(el) if class_: # Append class classes = (el.get("class", "") + " " + class_).strip() el.set("class", classes) class LinkExtension(Extension): TreeProcessorClass = LinkTreeprocessor def __init__(self, *args, **kwargs): self.config = { "broken": [ "wiki-broken", "CSS class to use for broken internal links", ], "internal": [ "wiki-internal", "CSS class to use for internal links", ], "external": [ "wiki-external", "CSS class to use for external links", ], } super().__init__(*args, **kwargs) def extendMarkdown(self, md): md.registerExtension(self) self.md = md ext = self.TreeProcessorClass(md, self.getConfigs()) add_to_registry(md.treeprocessors, "redlinks", ext, ">inline") def makeExtension(*args, **kwargs): """Return an instance of the extension.""" return LinkExtension(*args, **kwargs)
3,628
Python
.py
99
27.242424
78
0.600626
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,194
settings.py
django-wiki_django-wiki/src/wiki/plugins/pymdown/settings.py
from django.utils.translation import gettext as _ from django.conf import settings as django_settings from wiki.conf import settings SLUG = "pymdown" APP_LABEL = "wiki" def update_whitelist(): setattr( settings, "MARKDOWN_HTML_WHITELIST", getattr(settings, "MARKDOWN_HTML_WHITELIST", frozenset()).union( {"details", "summary"} ), ) updated_dict = getattr(settings, "MARKDOWN_HTML_ATTRIBUTES", {}) updated_dict.update( {"details": ["class"]}, ) setattr( settings, "MARKDOWN_HTML_ATTRIBUTES", updated_dict, ) # This looks for 'PYMDOWNX_KEYWORD_ARGUMENTS' in the settings.py Django file and uses it to update the # 'extensions_configs' key in the MARKDOWN_KWARGS which is used when creating the Markdown object. # This can be used to set custom arguments for PyMdown extensions settings.MARKDOWN_KWARGS["extension_configs"].update( getattr(django_settings, "PYMDOWNX_KEYWORD_ARGUMENTS", dict()) ) pymdown_docs = [ { "short_description": _("Admonition"), "help_text": _( """Insert an Admonition html tag. <a href="https://facelessuser.github.io/pymdown-extensions/extensions/blocks/plugins/admonition/" target="_blank">Open external docs ↗</a>""" ), "example_code": """ /// admonition | Some title type: warning Some content /// """, "args": { "type": _( "These are Bootstrap alert levels. Possible values: note, attention, caution, danger, error, tip, hint, warning" ), "attrs": _( "These are attributes that are added to the admonition html tag. Example: {class: class-name: id: id-name}" ), }, }, { "short_description": _("Definition"), "help_text": _( """Insert a Definition html tag. <a href="https://facelessuser.github.io/pymdown-extensions/extensions/blocks/plugins/admonition/" target="_blank">Open external docs ↗</a>""" ), "example_code": """ /// define Apple - Pomaceous fruit of plants of the genus Malus in the family Rosaceae. /// """, }, { "short_description": _("Details"), "help_text": _( """Insert a Details html tag. <a href="https://facelessuser.github.io/pymdown-extensions/extensions/blocks/plugins/admonition/" target="_blank">Open external docs ↗</a>""" ), "example_code": """ /// details | Some Summary Some content /// """, "args": { "type": _("These are Bootstrap alert levels. "), "attrs": _( "These are attributes that are added to the admonition html tag. Example: {class: class-name: id: id-name}" ), "open": _( "Boolean value of 'True' or 'False' to indicate that it is by default open or closed. Default False." ), }, }, { "short_description": _("HTML"), "help_text": _( """Insert a HTML html tag. NOTE: The wiki ues bleach to clean both HTML tags and certain attributes. <a href="https://facelessuser.github.io/pymdown-extensions/extensions/blocks/plugins/admonition/" target="_blank">Open external docs ↗</a>""" ), "example_code": """ /// html | div[style='border: 1px solid red;'] some *markdown* content /// """, "args": { "markdown": _( "String value to control how Markdown content is processed. Valid options are: auto, block, inline, html, and raw." ), "attrs": _( "These are attributes that are added to the admonition html tag. Example: {class: class-name: id: id-name}" ), }, }, ]
3,831
Python
.py
102
29.607843
254
0.592722
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,195
apps.py
django-wiki_django-wiki/src/wiki/plugins/pymdown/apps.py
from django.apps import AppConfig from django.utils.translation import gettext_lazy as _ class PyMdownConfig(AppConfig): name = "wiki.plugins.pymdown" verbose_name = _("PyMDown Extension") label = "wiki_pymdown"
226
Python
.py
6
34.333333
54
0.761468
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,196
wiki_plugin.py
django-wiki_django-wiki/src/wiki/plugins/pymdown/wiki_plugin.py
from django.utils.translation import gettext as _ from wiki.core.plugins import registry from wiki.core.plugins.base import BasePlugin from wiki.plugins.pymdown import settings class PymdownPlugin(BasePlugin): slug = settings.SLUG sidebar = { "headline": _("PyMdown Macros"), "icon_class": "fa-play", "template": "wiki/plugins/pymdown/sidebar.html", "form_class": None, "get_form_kwargs": (lambda a: {}), } # Skipping tabs as for now they do not work markdown_extensions = [ "pymdownx.blocks.admonition", "pymdownx.blocks.definition", "pymdownx.blocks.html", "pymdownx.blocks.details", ] settings.update_whitelist() registry.register(PymdownPlugin)
752
Python
.py
22
28.5
56
0.68603
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,197
wiki_pymdown_tags.py
django-wiki_django-wiki/src/wiki/plugins/pymdown/templatetags/wiki_pymdown_tags.py
from django import template from wiki.plugins.pymdown import settings register = template.Library() @register.simple_tag def allowed_pymdown_macros(): yield from settings.pymdown_docs
191
Python
.py
6
29.666667
41
0.82967
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,198
apps.py
django-wiki_django-wiki/src/wiki/plugins/globalhistory/apps.py
from django.apps import AppConfig from django.utils.translation import gettext_lazy as _ class GlobalHistoryConfig(AppConfig): name = "wiki.plugins.globalhistory" verbose_name = _("Wiki Global History") label = "wiki_globalhistory"
246
Python
.py
6
37.666667
54
0.777311
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)
20,199
wiki_plugin.py
django-wiki_django-wiki/src/wiki/plugins/globalhistory/wiki_plugin.py
from django.urls import re_path from wiki.core.plugins import registry from wiki.core.plugins.base import BasePlugin from . import settings from . import views class GlobalHistoryPlugin(BasePlugin): slug = settings.SLUG urlpatterns = { "root": [ re_path( r"^$", views.GlobalHistory.as_view(), name="globalhistory" ), re_path( "^(?P<only_last>[01])/$", views.GlobalHistory.as_view(), name="globalhistory", ), ] } registry.register(GlobalHistoryPlugin)
596
Python
.py
20
21.55
74
0.590193
django-wiki/django-wiki
1,819
569
48
GPL-3.0
9/5/2024, 5:12:30 PM (Europe/Amsterdam)