thaitextaug.wordnet¶
Modules¶
- thaitextaug.wordnet.postype2wordnet(pos: str, corpus: str)¶
- class thaitextaug.wordnet.WordNetAug¶
- augment(sentence: str, tokenize: object = <function word_tokenize>, max_syn_sent: int = 6, postag: bool = True, postag_corpus: str = 'lst20') → List[List[str]]¶
Text Augment using wordnet
- Parameters
sentence (str) – thai sentence
tokenize (object) – function for tokenize word
max_syn_sent (int) – max number for synonyms sentence
postag (bool) – on part-of-speech
postag_corpus (str) – postag corpus name
- Returns
list of synonyms
- Return type
List[Tuple[str]]
- find_synonyms(word: str, pos: Optional[str] = None, postag_corpus: str = 'lst20') → List[str]¶
Find synonyms from wordnet
- Parameters
word (str) – word
pos (str) – part of speech
postag_corpus (str) – postag corpus name
- Returns
list of synonyms
- Return type
List[str]