相关疑难解决方法(0)

如何在Wordnet中找到"词法文件"?

如果您查看原始Wordnet搜索并选择"显示选项:显示词汇文件信息",您将看到一个非常有用的词汇分类,称为词汇文件.例如,对于"填充",我们有:

   <noun.substance>S: (n) filling, fill (any material that fills a space or container)
   <noun.process>S: (n) filling (flow into something (as a container))
   <noun.food>S: (n) filling (a food mixture used to fill pastry or sandwiches etc.)
   <noun.artifact>S: (n) woof, weft, filling, pick (the yarn woven across the warp yarn in weaving)
   <noun.artifact>S: (n) filling ((dentistry) a dental appliance consisting of ...)
   <noun.act>S: (n) filling (the act of filling something) 
Run Code Online (Sandbox Code Playgroud)

括号中的第一件事是"词法文件".遗憾的是,我无法找到提供此信息的SPARQL端点

sparql wordnet

5
推荐指数
3
解决办法
1974
查看次数

使用Wordnet Synset的定义方法无法获得所需的输出

 from nltk.corpus import wordnet 
 syn=wordnet.synsets('cookbook')[0]
 print syn.definition
Run Code Online (Sandbox Code Playgroud)

预期产出:

'a book of recipes and cooking directions'
Run Code Online (Sandbox Code Playgroud)

实际产量:

bound method Synset.definition of Synset('cookbook.n.01')
Run Code Online (Sandbox Code Playgroud)

我无法查明代码中的错误,这会导致实际输出和预期输出之间的差异.

python owl nltk wordnet output

4
推荐指数
1
解决办法
3210
查看次数

标签 统计

wordnet ×2

nltk ×1

output ×1

owl ×1

python ×1

sparql ×1