nlp - Using Arabic WordNet for synonyms in python? -
i trying synonyms arabic words in sentence
if word in english works perfectly, , results displayed in arabic language, wondering if possible synonym of arabic word right away without writing in english first.
i tried didn't work & prefer without tashkeel انتظار instead of اِنْتِظار
from nltk.corpus import wordnet omw jan = omw.synsets('انتظار ')[0] print(jan) print(jan.lemma_names(lang='arb'))
wordnet used in nltk doesnt support arabic. if looking arabic wordnet totally different thing.
for arabic wordnet, download:
you run with:
$ python awndatabasemanagement.py -i upc_db.xml now wn.synset('إنتظار'). arabic wordnet has function wn.get_synsets_from_word(word), gives offsets. accepts words vocalized in database. example, should use جَمِيل جميل:
>> wn.get_synsets_from_word(u"جَمِيل") [(u'a', u'300218842')] 300218842 offset of synset of جميل .
i checked word إنتظار , seems doesn't exist in awn.
more details using awn synonyms here.
Comments
Post a Comment