当前位置: 首页>>代码示例>>Python>>正文


Python CharSetProber.__init__方法代码示例

本文整理汇总了Python中charsetprober.CharSetProber.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python CharSetProber.__init__方法的具体用法?Python CharSetProber.__init__怎么用?Python CharSetProber.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在charsetprober.CharSetProber的用法示例。


在下文中一共展示了CharSetProber.__init__方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from charsetprober import CharSetProber [as 别名]
# 或者: from charsetprober.CharSetProber import __init__ [as 别名]
 def __init__(self):
     CharSetProber.__init__(self)
     self._mCodingSM = [ \
         CodingStateMachine(HZSMModel),
         CodingStateMachine(ISO2022CNSMModel),
         CodingStateMachine(ISO2022JPSMModel),
         CodingStateMachine(ISO2022KRSMModel)
         ]
     self.reset()
开发者ID:Ettack,项目名称:csqlmap,代码行数:11,代码来源:escprober.py

示例2: __init__

# 需要导入模块: from charsetprober import CharSetProber [as 别名]
# 或者: from charsetprober.CharSetProber import __init__ [as 别名]
 def __init__(self):
     CharSetProber.__init__(self)
     self._mActiveNum = 0
     self._mProbers = []
     self._mBestGuessProber = None
开发者ID:00zl00,项目名称:AlfredWorkflow.com,代码行数:7,代码来源:charsetgroupprober.py

示例3: __init__

# 需要导入模块: from charsetprober import CharSetProber [as 别名]
# 或者: from charsetprober.CharSetProber import __init__ [as 别名]
 def __init__(self):
     CharSetProber.__init__(self)
     self.reset()
开发者ID:toddlerya,项目名称:PyWebGet,代码行数:5,代码来源:latin1prober.py

示例4: SingleByteCharSetProber

# 需要导入模块: from charsetprober import CharSetProber [as 别名]
# 或者: from charsetprober.CharSetProber import __init__ [as 别名]
import constants, sys
from charsetprober import CharSetProber

SAMPLE_SIZE = 64
SB_ENOUGH_REL_THRESHOLD = 1024
POSITIVE_SHORTCUT_THRESHOLD = 0.95
NEGATIVE_SHORTCUT_THRESHOLD = 0.05
SYMBOL_CAT_ORDER = 250
NUMBER_OF_SEQ_CAT = 4
POSITIVE_CAT = NUMBER_OF_SEQ_CAT - 1
#NEGATIVE_CAT = 0
 
class SingleByteCharSetProber(CharSetProber):
    def __init__(self, model, reversed=constants.False, nameProber=None):
        CharSetProber.__init__(self)
        self._mModel = model
        self._mReversed = reversed # TRUE if we need to reverse every pair in the model lookup
        self._mNameProber = nameProber # Optional auxiliary prober for name decision
        self.reset()

    def reset(self):
        CharSetProber.reset(self)
        self._mLastOrder = 255 # char order of last character
        self._mSeqCounters = [0] * NUMBER_OF_SEQ_CAT
        self._mTotalSeqs = 0
        self._mTotalChar = 0
        self._mFreqChar = 0 # characters that fall in our sampling range

    def get_charset_name(self):
        if self._mNameProber:
开发者ID:00zl00,项目名称:AlfredWorkflow.com,代码行数:32,代码来源:sbcharsetprober.py

示例5: __init__

# 需要导入模块: from charsetprober import CharSetProber [as 别名]
# 或者: from charsetprober.CharSetProber import __init__ [as 别名]
 def __init__(self):
     CharSetProber.__init__(self)
     self._mDistributionAnalyzer = None
     self._mCodingSM = None
     self._mLastChar = [_bytechar(0), _bytechar(0)]
开发者ID:barak066,项目名称:python-chardet,代码行数:7,代码来源:mbcharsetprober.py

示例6: __init__

# 需要导入模块: from charsetprober import CharSetProber [as 别名]
# 或者: from charsetprober.CharSetProber import __init__ [as 别名]
	def __init__(self):
		CharSetProber.__init__(self)
		self._mDistributionAnalyzer = None
		self._mCodingSM = None
		self._mLastChar = ['\x00', '\x00']
开发者ID:3cky,项目名称:3,代码行数:7,代码来源:mbcharsetprober.py

示例7: __init__

# 需要导入模块: from charsetprober import CharSetProber [as 别名]
# 或者: from charsetprober.CharSetProber import __init__ [as 别名]
 def __init__(self):
     CharSetProber.__init__(self)
     self._mCodingSM = CodingStateMachine(UTF8SMModel)
     self.reset()
开发者ID:christofoo,项目名称:hard-way,代码行数:6,代码来源:ex41.py

示例8: __init__

# 需要导入模块: from charsetprober import CharSetProber [as 别名]
# 或者: from charsetprober.CharSetProber import __init__ [as 别名]
	def __init__(self):
		CharSetProber.__init__(self)
		self._mLogicalProber = None
		self._mVisualProber = None
		self.reset()
开发者ID:3cky,项目名称:3,代码行数:7,代码来源:hebrewprober.py

示例9: __init__

# 需要导入模块: from charsetprober import CharSetProber [as 别名]
# 或者: from charsetprober.CharSetProber import __init__ [as 别名]
 def __init__(self, model, reversed=False, nameProber=None):
     CharSetProber.__init__(self)
     self._mModel = model
     self._mReversed = reversed # TRUE if we need to reverse every pair in the model lookup
     self._mNameProber = nameProber # Optional auxiliary prober for name decision
     self.reset()
开发者ID:barak066,项目名称:python-chardet,代码行数:8,代码来源:sbcharsetprober.py


注:本文中的charsetprober.CharSetProber.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。