java - 使用wordnet在java中查找单词的词根

标签 java wordnet jaws-wordnet word-sense-disambiguation

我知道 wordnet 中的上位词,但由于每个术语都有多种含义,我被迫使用 Lesk 算法来查找单词的上下文含义。

在这个过程中,我看到了question 。我正在尝试实现这个已被指定为答案的算法。

但我的主要问题是找到“两个节点之间的节点数倒数的乘积”

如何找到两个单词之间的节点数。

当我尝试使用上位词时,它返回一组单词,这些单词比层次结构中当前单词高一级

示例:如果我使用“应用程序”一词。 Wordnet 建议 6 个含义,每个含义都有一组词根,现在我应该将哪个词视为层次结构中的下一个级别

for the 1th meaning of application the hypernyms are 
request petition postulation 
for the 2th meaning of application the hypernyms are 
use usage utilization utilisation employment exercise 
for the 3th meaning of application the hypernyms are 
program programme computer program computer programme 
for the 4th meaning of application the hypernyms are 
manual labor manual labour 
for the 5th meaning of application the hypernyms are 
remedy curative cure therapeutic 
for the 6th meaning of application the hypernyms are 
effort elbow grease exertion travail sweat 

现在我应该考虑哪个单词作为层次结构中的下一个单词来构建到根以找到距离?

请帮忙,我有紧急需要

最佳答案

您链接到的算法对我来说似乎有点令人困惑。我假设您与提出问题的其他人有相同的目标:找到单词的适当同义词。该任务可以分为两个步骤:

  1. 消除您要查找同义词的单词的歧义,这样您最终只会得到一个意义
  2. 获取其同义词

即使您需要访问上位词,也应首先使用 Lesk algorithm 完成步骤 1。 ,是simplified versionalternatives 之一。那么你就只有该意义的上位词。

为了消除歧义,您不需要计算节点距离(至少作为 Lesk 的一部分),您只需比较每个节点的注释即可找到最可能的含义。如果不清楚或者我没有回答正确的问题,请随时发表评论。

关于java - 使用wordnet在java中查找单词的词根,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9324472/

相关文章:

java - “麻省理工学院 Java Wordnet 接口(interface) (JWI)”-edu.mit.jwi.data.IHasLifecycle$ObjectClosedException

nlp - 获取指定单词的 WordNet 域名

java - Maven部署到Tomcat

java - 泛型和通配符

java - 签名 Applet 和服务器端 Controller 之间的通信

java - 使用 REST-assured 验证响应 header 中的整数值

python - NLTK——WordNet : list of long words

java - 使用 WS4J 的句子相似度

java - Jaws Wordnet 的编译问题