-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add multilingual wordnet #9
Comments
There is an Italian project called 'MultiWordNet' so I would like to avoid just 'multiwordnet'. How about omw? |
OK. We're often writing "from nltk import wordnet as wn", and so wn has gained some currency as an abbreviation for WordNet. We could have omwn. But in a world where openness is the unmarked case, we could have mwn. Do either of these appeal or would you still prefer omw? |
G'day, OK. We're often writing "from nltk import wordnet as wn", and so wn has
I alos like to thing of openness as the default, but 'mwn' is still a bit Francis Bond http://www3.ntu.edu.sg/home/fcbond/ |
OK, omw it is then, thanks. |
The list of languages in the supplied omw corpus is as follows. I think
@fcbond would you please advise. |
The current list is as follows: langs = ("eng", "ind", "zsm", "jpn", "tha", We use qcn for traditional Chinese (and the slightly differently designed NTU, Taiwan Chinese Wordnet). We will try to upload a new omw.zip sometime today. t = dd(lambda: dd(unicode)) thing, lang, = labelt['eng']['eng'] = 'English' t["swe"]["eng"] = "Swedish"; t['als']['eng'] = 'Albanian' |
Hi, got the same problem that somebody posted on Quora some months ago: but when i call I checked the downloader and the omw is installed. I am using Python 2.7. |
One just needed to read the NLTK cookbook more accurately. You don't need to import the module 'omw', but you can recall it directly by simply importing wordnet (wn). More under: http://www.nltk.org/howto/wordnet.html |
A user reported missing spanish lemmas from OMW: http://stackoverflow.com/questions/26474731/missing-spanish-wordnet-from-nltk/26494099#26494099 |
@franquattri It would be useful if the howto showed full installation instructions. On Ubuntu 14.04, with the data URL fixed (http://askubuntu.com/a/527408/93794), I have wordnet and omw installed (I see them under ~/nltk_data/corpora), but when I follow through http://www.nltk.org/howto/wordnet.html a lot of the examples fail, in particular wn.langs() fails with "AttributeError: 'WordNetCorpusReader' object has no attribute 'langs'". |
Hi Darren, The manual has been updated to the NLTK 3.0 version but it should work fine with the previous NLTK versions too. I'm working with Windows, Python 2.7 and iPython (which I suggest also for Unicode matters) Both attempts work for me: from nltk.corpus import wordnet as wn Can you be more specific about the examples that fail? |
@DarrenCook, there are discrepancies between the API, the documentation and the Please note that
|
nltk.version Is that too old? (apt-get install python-nltk tells me "python-nltk is already the newest version.") Working through the examples, the first one that fails is "print(wn.synset('dog.n.01').definition())", which says "TypeError: 'str' object is not callable". The three commands before that worked fine. |
Using With regards to accessing synsets from the wordnet API in NLTK, i think the major change would be nltk/nltk@ba8ab7e Possibly you'll find errors from See also: |
@DarrenCook you sure you have installed NLTK correctly? you can take a look here: http://www.nltk.org/install.html To find out which nltk version you have: to update NLTK / modules (for windows) > Command Prompt > python -m pip install -upgrade SomePackage Are you using the WN version that comes with NLTK (WN 3.0) or the newest release (i.e.have you imported it in NLTK)? There might be some issues for that reason as well. |
Thanks @alvations and Francesca for your help. These two commands got everything working: sudo apt-get install python-pip @franquattri I think I may have downloaded the latest wordnet, while having the 2.0b9 of nltk installed, so maybe that was the issue. |
Hi, |
This is already done, doesn't it? |
Thanks @bryant1410. Yes, this is resolved. |
i download cow from http://globalwordnet.org/wordnets-in-the-world/ to process Chinese. How can i use cow in python? |
cow is already included in omw (open multilingual wordnet), so if you
download that from the normal download interface, you can access cow with
lang='cmn':
e.g. for Japanese
wn.synsets('dog')[0].lemmas(lang='jpn')
[Lemma('dog.n.01.イヌ'), Lemma('dog.n.01.ドッグ'),
Lemma('dog.n.01.洋犬'), Lemma('dog.n.01.犬')]
…On Thu, Apr 13, 2017 at 9:24 AM, nicoleljc1227 ***@***.***> wrote:
i download cow from http://globalwordnet.org/wordnets-in-the-world/ to
process Chinese. How can i use cow in python?
for example, from nltk.corpus import wordnet as wn then how can i use cow?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABD8xvdE1LZQNWx7VvZpiW5VZ6aToWJrks5rviH6gaJpZM4BJSpt>
.
--
Francis Bond <http://www3.ntu.edu.sg/home/fcbond/>
Division of Linguistics and Multilingual Studies
Nanyang Technological University
|
Can we use wn.synsets('dog')[0].lemmas(lang='jpn') in a way of using more than one language, ie wn.synsets('dog')[0].lemmas(lang='jpn, ita')? |
@francisbond is contributing the Open Multilingual Wordnet to NLTK (http://www.casta-net.jp/~kuribayashi/multi/).
We need to settle on a short name to use: multiwordnet?
The text was updated successfully, but these errors were encountered: