2 All of the Enums that are used throughout the chardet package.
4 :author: Dan Blanchard (dan.blanchard@gmail.com)
7 from enum
import Enum
, Flag
12 This enum represents the different states a universal detector can be in.
20 class LanguageFilter(Flag
):
22 This enum represents the different language filters we can apply to a
23 ``UniversalDetector``.
27 CHINESE_SIMPLIFIED
= 0x01
28 CHINESE_TRADITIONAL
= 0x02
33 CHINESE
= CHINESE_SIMPLIFIED | CHINESE_TRADITIONAL
34 CJK
= CHINESE | JAPANESE | KOREAN
37 class ProbingState(Enum
):
39 This enum represents the different states a prober can be in.
49 This enum represents the different states a state machine can be in.
57 class SequenceLikelihood
:
59 This enum represents the likelihood of a character following the previous one.
68 def get_num_categories(cls
) -> int:
69 """:returns: The number of likelihood categories in the enum."""
73 class CharacterCategory
:
75 This enum represents the different categories language models for
76 ``SingleByteCharsetProber`` put characters into.
78 Anything less than CONTROL is considered a letter.