Skip to content

Commit d9aa851

Browse files
committed
Update common.py
1 parent 2e2f878 commit d9aa851

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pythainlp/corpus/common.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,9 @@ def find_synonyms(word: str) -> List[str]:
367367
list_synonym.extend(synonyms["synonym"][idx])
368368
list_synonym.append(synonyms["word"][idx])
369369

370+
list_synonym = sorted(list(set(list_synonym)))
371+
370372
if word in list_synonym: # remove same word
371373
list_synonym.remove(word)
372374

373-
return sorted(list(set(list_synonym)))
375+
return list_synonym

0 commit comments

Comments
 (0)