Wordnet 返回 nil
我正在使用 words
gem 来搜索 wordnet。这是我的代码:
require 'words'
data = Words::Wordnet.new
word = "geese"
lemma = data.find(word)
puts lemma
lemma
返回nil
。它适用于“汽车”等其他单词,但不适用于“鹅”。这个词是存在的,我可以在Wordnet网站上搜索到它:http://wordnetweb.princeton.edu/perl/webwn?s=geese&sub=Search+WordNet&o2 =&o0=&o8=1&o1=&o7=&o5=&o9=&o6=&o3=&o4=&h=00000000000
可能发生什么事?先感谢您!
I'm using the words
gem to search wordnet. Here is my code:
require 'words'
data = Words::Wordnet.new
word = "geese"
lemma = data.find(word)
puts lemma
lemma
returns nil
. It works for other words like "car" but "geese" doesn't work. The word exists, I can search for it on the Wordnet website: http://wordnetweb.princeton.edu/perl/webwn?s=geese&sub=Search+WordNet&o2=&o0=&o8=1&o1=&o7=&o5=&o9=&o6=&o3=&o4=&h=00000000000
What could be going on? Thank you in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为这是因为“geese”是复数(不规则复数),并且 WordNet 网站上的搜索使用 吗啡。我猜宝石这个词不是。尝试“汽车”和“脚”。
I think it's because "geese" is a plural (an irregular one at that), and the search on the WordNet website is using morphy. I guess the words gem isn't. Try "cars" and "feet".