-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathflashtext2.pyi
More file actions
14 lines (12 loc) · 673 Bytes
/
flashtext2.pyi
File metadata and controls
14 lines (12 loc) · 673 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from typing import Optional, Iterable
class KeywordProcessor:
case_sensitive: bool
def __init__(self, case_sensitive: bool) -> None: ...
def __len__(self) -> int: ...
def __repr__(self) -> str: ...
def add_keyword(self, word: str, clean_word: Optional[str] = None) -> None: ...
def add_keywords_from_iter(self, words: Iterable[str]) -> None: ...
def add_keywords_with_clean_word_from_iter(self, words: Iterable[tuple[str, str]]) -> None: ...
def extract_keywords(self, text: str) -> list[str]: ...
def extract_keywords_with_span(self, text: str) -> list[tuple[str, int, int]]: ...
def replace_keywords(self, text: str) -> str: ...