We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 01b0a86 commit 223393dCopy full SHA for 223393d
1 file changed
pythainlp/wsd/core.py
@@ -12,17 +12,17 @@
12
_wsd_dict: dict[str, Union[list[str], list[list[str]]]] = thai_wsd_dict()
13
_mean_all: dict[str, list[str]] = {}
14
15
-_all_word: set[str] = cast("set[str]", set(_mean_all.keys()))
16
-_TRIE: Trie = Trie(_all_word)
17
-_word_cut: Tokenizer = Tokenizer(custom_dict=_TRIE)
18
-
19
words: list[str] = cast("list[str]", _wsd_dict["word"])
20
meanings: list[list[str]] = cast("list[list[str]]", _wsd_dict["meaning"])
21
i_word: str
22
i_meanings: list[str]
23
for i_word, i_meanings in zip(words, meanings):
24
_mean_all[i_word] = i_meanings
25
+_all_word: set[str] = cast("set[str]", set(_mean_all.keys()))
+_TRIE: Trie = Trie(_all_word)
+_word_cut: Tokenizer = Tokenizer(custom_dict=_TRIE)
+
26
_MODEL_CACHE: dict[str, _SentenceTransformersModel] = {}
27
28
0 commit comments