使用wordnet(或一些简单的字典)从Java程序中检查名词是可数还是不可数

发布于 2024-11-16 08:47:41 字数 152 浏览 5 评论 0原文

我发现了 2 个 Java 库——JWNL 和 JAWS。到目前为止,在我看来,这些 API 非常适合查找同义词集、下义词和类似的东西。你知道是否有一些工具可以使用wordnet来检查名词是否是可数/不可数名词?我的意思是,人们使用 wordnet 来完成这项任务吗?不然的话,工具是什么?

I found 2 libraries in Java – JWNL and JAWS. So far, it seems to me that these APIs are good for finding synsets and hyponyms and similar things. Do you know if there is some tool to use wordnet to check if a noun is a countable/uncountable noun? I mean, do people use wordnet for this task? Else, what is the tool?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

人海汹涌 2024-11-23 08:47:41

如果您找不到简单的来源,您可以考虑构建自己的分类器,即。编写您自己的用户定义函数。

需要考虑的因素:

  • 有些英语词典会将名词标记为 (U) 与 (C) 来表示不可数与可数,您也许可以在网上找到。
  • 您可以查看大型语料库中的二元组,看看该名词是在可数还是不可数的意义上使用:
    一个男孩这个男孩那个男孩一些食物一点食物 code> 等。
  • 您必须考虑许多极端情况:我想要一些咖啡我想要一杯咖啡(一杯咖啡的缩写)。
    事情变得复杂了。

这个问题非常相关,尽管它没有解决您的Java请求。这个问题的三个答案都很好。

希望这有帮助。

If you can't find an easy source, you can consider building your own classifier, ie. write your own user-defined-function.

Factors to consider:

  • There are some English dictionaries that will mark nouns as (U) vs (C) for uncountable vs countable, and you might be able to find out online somewhere.
  • You could look at bigrams in a huge corpus to see if the noun is used in the sense of countable or uncountable:
    one boy or this boy or that boy but some food or a little bit of food etc.
  • There are many corner cases that you have to account for: I'd like some coffee vs I'd like a coffee (short for a cup of coffee).
    It gets complicated.

This SO question is very relevant, though it doesn't address your Java request. All three answers to that question are very good.

Hope this helps.

江南烟雨〆相思醉 2024-11-23 08:47:41

我不是 100% 肯定你想要什么,但是 WolframAlpha 有一个 开发者界面 您也许可以使用。

他们似乎也已经有了 java 库,尽管免费版本似乎仅限于2k 查询(不知道这是否是一个可行的限制)。

I'm not 100% positive what you're going for, but WolframAlpha has a developer interface you may be able to use.

They also seem to have a java library already, though the free version appears to be limited to 2k queries (Don't know if thats a feasible limitation).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文