Skip to content
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

Inconsistenct part-of-speech argument handling #28

Open
kliuless opened this issue Jun 12, 2017 · 1 comment
Open

Inconsistenct part-of-speech argument handling #28

kliuless opened this issue Jun 12, 2017 · 1 comment

Comments

@kliuless
Copy link

kliuless commented Jun 12, 2017

Examples:

# these work fine
WordNet::Lemma.find('turtle', :noun)
WordNet::Lemma.find('turtle', 'noun')
WordNet::Lemma.find('turtle', :n)

# this does not
WordNet::Lemma.find('turtle', 'n')
# => Errno::ENOENT: No such file or directory @ rb_sysopen - .../gems/rwordnet-2.0.0/WordNet-3.0/dict/index.n
# this works fine
WordNet::Synset.find('turtle', 'noun')

# these do not (NoMethodError: undefined method `has_key?' for nil:NilClass)
WordNet::Synset.find('turtle', :noun)
WordNet::Synset.find('turtle', :n)
WordNet::Synset.find('turtle', 'n')

I suggest having centralized logic to perform this normalization, so both Lemma and Synset can take advantage of it.

@jtoy
Copy link

jtoy commented Feb 1, 2023

agreed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants