-
Notifications
You must be signed in to change notification settings - Fork 1
/
vibrato.pyi
34 lines (29 loc) · 967 Bytes
/
vibrato.pyi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
from collections.abc import Iterable
from collections.abc import Iterator
VIBRATO_VERSION: str
class Token:
def end(self) -> int: ...
def feature(self) -> str: ...
def start(self) -> int: ...
def surface(self) -> str: ...
class TokenIterator(Iterator[Token]):
def __next__(self) -> Token: ...
class TokenList(Iterable[Token]):
def __getitem__(self, index: int) -> Token: ...
def __iter__(self) -> TokenIterator: ...
def __len__(self) -> int: ...
class Vibrato:
def __init__(
self, dict_data: bytes, ignore_space: bool = False, max_grouping_len: int = 0
) -> None: ...
@staticmethod
def from_textdict(
lex_data: str,
matrix_data: str,
char_data: str,
unk_data: str,
ignore_space: bool = False,
max_grouping_len: int = 0,
) -> Vibrato: ...
def tokenize(self, text: str) -> TokenList: ...
def tokenize_to_surfaces(self, text: str) -> list[str]: ...