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

Performance: part-of-speech handling causes extra Lemma cache entries #29

Open
kliuless opened this issue Jun 12, 2017 · 0 comments
Open

Comments

@kliuless
Copy link

Related to #28:

Part-of-spech inconsistencies cause duplicate entries to be created in the Lemma cache:

[49] pry(main)> WordNet::Lemma.class_variable_get(:@@cache).clear
=> {}
[50] pry(main)> WordNet::Lemma.find('turtle', :n)
[51] pry(main)> WordNet::Lemma.find('turtle', 'noun')
[52] pry(main)> WordNet::Lemma.class_variable_get(:@@cache).keys
=> [:noun, "noun"]

One specific example is that Lemma.find_all uses symbols, while Synset.find_all uses strings, causing 4 duplicate cache entries.

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

1 participant