comparison env/lib/python3.7/site-packages/chardet/big5prober.py @ 2:6af9afd405e9 draft

"planemo upload commit 0a63dd5f4d38a1f6944587f52a8cd79874177fc1"
author shellac
date Thu, 14 May 2020 14:56:58 -0400
parents 26e78fe6e8c4
children
comparison
equal deleted inserted replaced
1:75ca89e9b81c 2:6af9afd405e9
1 ######################## BEGIN LICENSE BLOCK ########################
2 # The Original Code is Mozilla Communicator client code.
3 #
4 # The Initial Developer of the Original Code is
5 # Netscape Communications Corporation.
6 # Portions created by the Initial Developer are Copyright (C) 1998
7 # the Initial Developer. All Rights Reserved.
8 #
9 # Contributor(s):
10 # Mark Pilgrim - port to Python
11 #
12 # This library is free software; you can redistribute it and/or
13 # modify it under the terms of the GNU Lesser General Public
14 # License as published by the Free Software Foundation; either
15 # version 2.1 of the License, or (at your option) any later version.
16 #
17 # This library is distributed in the hope that it will be useful,
18 # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 # Lesser General Public License for more details.
21 #
22 # You should have received a copy of the GNU Lesser General Public
23 # License along with this library; if not, write to the Free Software
24 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
25 # 02110-1301 USA
26 ######################### END LICENSE BLOCK #########################
27
28 from .mbcharsetprober import MultiByteCharSetProber
29 from .codingstatemachine import CodingStateMachine
30 from .chardistribution import Big5DistributionAnalysis
31 from .mbcssm import BIG5_SM_MODEL
32
33
34 class Big5Prober(MultiByteCharSetProber):
35 def __init__(self):
36 super(Big5Prober, self).__init__()
37 self.coding_sm = CodingStateMachine(BIG5_SM_MODEL)
38 self.distribution_analyzer = Big5DistributionAnalysis()
39 self.reset()
40
41 @property
42 def charset_name(self):
43 return "Big5"
44
45 @property
46 def language(self):
47 return "Chinese"