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

时间:2012-02-17 07:29:29

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

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

在此过程中,我看到了question。我正在尝试实现这个算法,该算法已作为答案进行了详细说明。

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

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

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

示例:如果我接受单词application。 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 个答案:

答案 0 :(得分:1)

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

  1. 消除您要查找同义词的消息,因此您最终只能使用一个感觉
  2. 获取其同义词
  3. 即使您需要访问上位词,也应首先使用Lesk algorithmsimplified version或其中一个alternatives来完成第1步。那么你只有这种意义上的上位词。

    为了消除歧义,你需要计算节点距离(至少作为Lesk的一部分),你只需要比较每个的光泽以找到最可能的含义。如果不清楚或者我没有得到正确的答案,请不要犹豫。