-
Notifications
You must be signed in to change notification settings - Fork 1
/
vaporetto.pyi
32 lines (28 loc) · 929 Bytes
/
vaporetto.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
from collections.abc import Iterable
from collections.abc import Iterator
class Token:
def end(self) -> int: ...
def n_tags(self) -> int: ...
def start(self) -> int: ...
def surface(self) -> str: ...
def tag(self, index: int) -> str | None: ...
class TokenIterator(Iterator[Token]):
def __next__(self) -> Token: ...
class TokenList(Iterable[Token]):
def __getitem__(self, key: int) -> Token: ...
def __iter__(self) -> TokenIterator: ...
def __len__(self) -> int: ...
class Vaporetto:
def __init__(
self,
model: bytes,
predict_tags: bool = False,
wsconst: str = '',
norm: bool = True,
) -> None: ...
@staticmethod
def create_from_kytea_model(
model: bytes, wsconst: str = '', norm: bool = True
) -> Vaporetto: ...
def tokenize(self, text: str) -> TokenList: ...
def tokenize_to_string(self, text: str) -> str: ...