mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-17 22:09:45 +08:00
Re-organize directory structure (#4971)
See discussion in #2491 Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import sys
|
||||
from typing import Any, Tuple
|
||||
|
||||
from .universaldetector import UniversalDetector as UniversalDetector
|
||||
|
||||
def __getattr__(name: str) -> Any: ... # incomplete
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
from typing import TypedDict
|
||||
else:
|
||||
from typing_extensions import TypedDict
|
||||
|
||||
class _LangModelType(TypedDict):
|
||||
char_to_order_map: Tuple[int, ...]
|
||||
precedence_matrix: Tuple[int, ...]
|
||||
typical_positive_ratio: float
|
||||
keep_english_letter: bool
|
||||
charset_name: str
|
||||
language: str
|
||||
|
||||
class _SMModelType(TypedDict):
|
||||
class_table: Tuple[int, ...]
|
||||
class_factor: int
|
||||
state_table: Tuple[int, ...]
|
||||
char_len_table: Tuple[int, ...]
|
||||
name: str
|
||||
@@ -0,0 +1,39 @@
|
||||
class InputState(object):
|
||||
PURE_ASCII: int
|
||||
ESC_ASCII: int
|
||||
HIGH_BYTE: int
|
||||
|
||||
class LanguageFilter(object):
|
||||
CHINESE_SIMPLIFIED: int
|
||||
CHINESE_TRADITIONAL: int
|
||||
JAPANESE: int
|
||||
KOREAN: int
|
||||
NON_CJK: int
|
||||
ALL: int
|
||||
CHINESE: int
|
||||
CJK: int
|
||||
|
||||
class ProbingState(object):
|
||||
DETECTING: int
|
||||
FOUND_IT: int
|
||||
NOT_ME: int
|
||||
|
||||
class MachineState(object):
|
||||
START: int
|
||||
ERROR: int
|
||||
ITS_ME: int
|
||||
|
||||
class SequenceLikelihood(object):
|
||||
NEGATIVE: int
|
||||
UNLIKELY: int
|
||||
LIKELY: int
|
||||
POSITIVE: int
|
||||
@classmethod
|
||||
def get_num_categories(cls) -> int: ...
|
||||
|
||||
class CharacterCategory(object):
|
||||
UNDEFINED: int
|
||||
LINE_BREAK: int
|
||||
SYMBOL: int
|
||||
DIGIT: int
|
||||
CONTROL: int
|
||||
@@ -0,0 +1,9 @@
|
||||
from typing import Tuple
|
||||
|
||||
from . import _LangModelType
|
||||
|
||||
Latin5_BulgarianCharToOrderMap: Tuple[int, ...]
|
||||
win1251BulgarianCharToOrderMap: Tuple[int, ...]
|
||||
BulgarianLangModel: Tuple[int, ...]
|
||||
Latin5BulgarianModel: _LangModelType
|
||||
Win1251BulgarianModel: _LangModelType
|
||||
@@ -0,0 +1,17 @@
|
||||
from typing import Tuple
|
||||
|
||||
from . import _LangModelType
|
||||
|
||||
KOI8R_char_to_order_map: Tuple[int, ...]
|
||||
win1251_char_to_order_map: Tuple[int, ...]
|
||||
latin5_char_to_order_map: Tuple[int, ...]
|
||||
macCyrillic_char_to_order_map: Tuple[int, ...]
|
||||
IBM855_char_to_order_map: Tuple[int, ...]
|
||||
IBM866_char_to_order_map: Tuple[int, ...]
|
||||
RussianLangModel: Tuple[int, ...]
|
||||
Koi8rModel: _LangModelType
|
||||
Win1251CyrillicModel: _LangModelType
|
||||
Latin5CyrillicModel: _LangModelType
|
||||
MacCyrillicModel: _LangModelType
|
||||
Ibm866Model: _LangModelType
|
||||
Ibm855Model: _LangModelType
|
||||
@@ -0,0 +1,9 @@
|
||||
from typing import Tuple
|
||||
|
||||
from . import _LangModelType
|
||||
|
||||
Latin7_char_to_order_map: Tuple[int, ...]
|
||||
win1253_char_to_order_map: Tuple[int, ...]
|
||||
GreekLangModel: Tuple[int, ...]
|
||||
Latin7GreekModel: _LangModelType
|
||||
Win1253GreekModel: _LangModelType
|
||||
@@ -0,0 +1,7 @@
|
||||
from typing import Tuple
|
||||
|
||||
from . import _LangModelType
|
||||
|
||||
WIN1255_CHAR_TO_ORDER_MAP: Tuple[int, ...]
|
||||
HEBREW_LANG_MODEL: Tuple[int, ...]
|
||||
Win1255HebrewModel: _LangModelType
|
||||
@@ -0,0 +1,9 @@
|
||||
from typing import Tuple
|
||||
|
||||
from . import _LangModelType
|
||||
|
||||
Latin2_HungarianCharToOrderMap: Tuple[int, ...]
|
||||
win1250HungarianCharToOrderMap: Tuple[int, ...]
|
||||
HungarianLangModel: Tuple[int, ...]
|
||||
Latin2HungarianModel: _LangModelType
|
||||
Win1250HungarianModel: _LangModelType
|
||||
@@ -0,0 +1,7 @@
|
||||
from typing import Tuple
|
||||
|
||||
from . import _LangModelType
|
||||
|
||||
TIS620CharToOrderMap: Tuple[int, ...]
|
||||
ThaiLangModel: Tuple[int, ...]
|
||||
TIS620ThaiModel: _LangModelType
|
||||
@@ -0,0 +1,7 @@
|
||||
from typing import Tuple
|
||||
|
||||
from . import _LangModelType
|
||||
|
||||
Latin5_TurkishCharToOrderMap: Tuple[int, ...]
|
||||
TurkishLangModel: Tuple[int, ...]
|
||||
Latin5TurkishModel: _LangModelType
|
||||
@@ -0,0 +1,29 @@
|
||||
from logging import Logger
|
||||
from typing import Dict, Optional, Pattern
|
||||
from typing_extensions import TypedDict
|
||||
|
||||
class _FinalResultType(TypedDict):
|
||||
encoding: str
|
||||
confidence: float
|
||||
language: str
|
||||
|
||||
class _IntermediateResultType(TypedDict):
|
||||
encoding: Optional[str]
|
||||
confidence: float
|
||||
language: Optional[str]
|
||||
|
||||
class UniversalDetector(object):
|
||||
MINIMUM_THRESHOLD: float
|
||||
HIGH_BYTE_DETECTOR: Pattern[bytes]
|
||||
ESC_DETECTOR: Pattern[bytes]
|
||||
WIN_BYTE_DETECTOR: Pattern[bytes]
|
||||
ISO_WIN_MAP: Dict[str, str]
|
||||
|
||||
result: _IntermediateResultType
|
||||
done: bool
|
||||
lang_filter: int
|
||||
logger: Logger
|
||||
def __init__(self, lang_filter: int = ...) -> None: ...
|
||||
def reset(self) -> None: ...
|
||||
def feed(self, byte_str: bytes) -> None: ...
|
||||
def close(self) -> _FinalResultType: ...
|
||||
@@ -0,0 +1,4 @@
|
||||
from typing import List
|
||||
|
||||
__version__: str
|
||||
VERSION: List[str]
|
||||
Reference in New Issue
Block a user