Machine learning 使用WordNet将特定单词概括为高阶概念

Machine learning 使用WordNet将特定单词概括为高阶概念,machine-learning,prolog,nlp,wordnet,Machine Learning,Prolog,Nlp,Wordnet,是否有“更高阶”的概念?如何为给定的单词生成它们 我有一个prolog“facts”形式的数据集。我想概括概念成分,即'contains'('oranges','vitamin c')。和'contains'('spinach','iron')。将被概括为'contains'(,)。 我对WordNet不太了解,所以我想做的一件事就是生成所有可能的超词,然后组合阐述每一条可能的新规则,但这是一种“暴力”方法 WordNet是否存储高阶概念,例如?这可能会使它更容易,因为这样我就可以用这个特定变量

是否有“更高阶”的概念?如何为给定的单词生成它们

我有一个prolog“facts”形式的数据集。我想概括概念成分,即
'contains'('oranges','vitamin c')。
'contains'('spinach','iron')。
将被概括为
'contains'(,)。

我对WordNet不太了解,所以我想做的一件事就是生成所有可能的超词,然后组合阐述每一条可能的新规则,但这是一种“暴力”方法

WordNet是否存储高阶概念,例如?这可能会使它更容易,因为这样我就可以用这个特定变量的高阶概念创建一个新规则,假设WordNet中有一个规则,而不是用蛮力的方式创建50或100个规则

所以我真正想知道的是:是否有一个命令来为给定的“事实”中的三个组件中的每一个生成更高阶的概念?或者只针对括号内的两个。如果存在这样的命令,它是什么

下面是我正在处理的一些数据,以供参考

'be'('mr jiang', 'representing china').
'be'('hrh', 'britain').
'be more than'('# distinguished guests', 'the principal representatives').
'end with'('the playing of the british national anthem', 'hong kong').
'follow at'('the stroke of midnight', 'this').
'take part in'('the ceremony', 'both countries').
'start at about'('# pm', 'the ceremony').
'end about'('# am', 'the ceremony').
'lower'('the british hong kong flag', '# royal hong kong police officers').
'raise'('the sar flag', 'another #').
'leave for'('the royal yacht britannia', 'the #').
'hold by'('the chinese and british governments', 'the handover of hong kong').
'rise over'('this land', 'the regional flag of the hong kong special administrative region of the people \'s republic of china').
'cast eye on'('hong kong', 'the world').
'hold on'('schedule', 'the # governments').
'be festival for'('the chinese nation', 'this').
'go in'('the annals of history', 'july # , #').
'become master of'('this chinese land', 'the hong kong compatriots').
'enter era of'('development', 'hong kong').
'remember'('mr deng xiaoping', 'history').
'be along'('the course', 'it').
'resolve'('the hong kong question', 'we').
'wish to express thanks to'('all the personages', 'i').
'contribute to'('the settlement of the hong kong', 'both china and britain').
'support'('hong kong \'s return', 'the world').

Wordnet将高阶概念称为“超级名词”。例如,颜色“绿色”的缩略词是“彩色”,因为绿色属于高阶彩色

需要注意的是,Wordnet区分了“单词”(字符串)和“系统网络”(与给定字符串相关联的含义)。正如一个单词可以有多个含义一样,一个字符串可以有多个语法集。如果要检索给定单词的所有高阶含义,可以在Python中运行以下行:

from nltk import wordnet as wn

# If you are using nltk version 3.0.1, the following will tell you all the synsets for "green" and will thenn find all of their hypernyms. If you're running nltk 3.0.0, you can change the first line to `for synset in wn.synsets('bank'):
for synset in wn.wordnet.synsets('green'):
    for hypernym in synset.hypernyms():
        print synset, hypernym

我认为你不会找到一个现成的“命令”。另外,请注意Wordnet 3.0有一个bug(循环炒作),可能会将Wordnet中的单词映射到现有的本体,如@capelical,您认为有意义吗?