Open Multilingual Arabic wordnet

28 views
Skip to first unread message

ali alk

unread,
May 1, 2017, 8:40:42 PM5/1/17
to nltk-users
Hello


I have an issue in extracting Arabic synsets' key using NLTK.
For Example:

code:
syn = wn.synsets(u'عام',lang=('arb'))[0].lemma_names('arb')
for word in syn :
    print word

Result:

شائِع
عام
مُتداول
مُشْترك

My goal is to extract all synsets keys for each lemma in a synset. I was able to extract the synset key for the lemma that English wordnet has.
For example:

code:
syn = wn.synsets(u'عام',lang=('arb'))[0].lemmas()[0].key()
print syn

Result:
common%3:00:02::

However, when I try to find the second lemma's key, it does not show me any thing
syn = wn.synsets(u'عام',lang=('arb'))[0].lemmas()[1].key()

My objective is to build a file that looks like this:

Word1
      first synset          : Firstlemma:Key:      secondlemma:key       third lemma:key   
     seconds synset   : Firstlemma:Key        secondlemma:key       third lemma:key 


Word2
The same goes here.....


Thank you in advanced.....


Reply all
Reply to author
Forward
0 new messages