Debian Codegraph @

stubs/calibre_extensions/hunspell.pyi

raw
1 class HunspellError(Exception):
2 pass
3
4 class Dictionary:
5 def __init__(self, dic: str, aff: str) -> None:
6 "Dictionary object"
7 pass
8
9 def recognized(self, word: str) -> bool:
10 """Checks the spelling of the given word. The word must be a unicode object.
11
12 If encoding of the word to the encoding of the dictionary fails, a
13 UnicodeEncodeError is raised. Returns False if the input word is not recognized.
14 """
15 pass
16
17 def suggest(self, word: str) -> tuple[str, ...]:
18 """Provide suggestions for the given word. The input word must be a unicode object.
19
20 If encoding of the word to the encoding of the dictionary fails, a
21 UnicodeEncodeError is raised. Returns the list of suggested words as unicode objects.
22 """
23 pass
24
25 def add(self, word: str) -> bool:
26 "Adds the given word into the runtime dictionary"
27 pass
28
29 def remove(self, word: str) -> bool:
30 "Removes the given word from the runtime dictionary"
31 pass