from myspellchecker.providers import DictionaryProvider
class DictionaryProvider(ABC):
@abstractmethod
def is_valid_word(self, word: str) -> bool: ...
@abstractmethod
def is_valid_syllable(self, syllable: str) -> bool: ...
@abstractmethod
def get_word_frequency(self, word: str) -> int: ...
@abstractmethod
def get_syllable_frequency(self, syllable: str) -> int: ...
@abstractmethod
def get_word_pos(self, word: str) -> Optional[str]: ...
@abstractmethod
def get_bigram_probability(self, prev_word: str, current_word: str) -> float: ...
@abstractmethod
def get_trigram_probability(self, w1: str, w2: str, w3: str) -> float: ...
@abstractmethod
def get_fourgram_probability(self, word1: str, word2: str, word3: str, word4: str) -> float: ...
@abstractmethod
def get_fivegram_probability(self, word1: str, word2: str, word3: str, word4: str, word5: str) -> float: ...
@abstractmethod
def get_pos_unigram_probabilities(self) -> dict[str, float]: ...
@abstractmethod
def get_pos_bigram_probabilities(self) -> dict[tuple[str, str], float]: ...
@abstractmethod
def get_pos_trigram_probabilities(self) -> dict[tuple[str, str, str], float]: ...
@abstractmethod
def get_top_continuations(self, prev_word: str, limit: int = 20) -> List[Tuple[str, float]]: ...
@abstractmethod
def get_all_syllables(self) -> Iterator[Tuple[str, int]]: ...
@abstractmethod
def get_all_words(self) -> Iterator[Tuple[str, int]]: ...