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

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -