如果您查看原始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端点
Wordnet 3.0 的最新RDF翻译指向两件事:
Talis SPARQL端点.使用例如此查询来检查没有这样的信息:
DESCRIBE <http://purl.org/vocabularies/princeton/wn30/synset-chair-noun-1>
W3C的映射描述.附录D"转换细节"描述了一些有用的东西:wn:classifiedByTopic.但它与词汇文件不同,并且相当不完整.例如"椅子"什么都没有,而"完成"的感觉之一就是"美式足球"主题
DESCRIBE <http://purl.org/vocabularies/princeton/wn30/synset-completion-noun-1> - >
<j.1:classifiedByTopic rdf:resource="http://purl.org/vocabularies/princeton/wn30/synset-American_football-noun-1"/>
问题:是否有提供词汇文件信息的公共Wordnet查询API或数据库?
我认为你无法在 WordNet 的 RDF/OWL 表示中找到它。不过它在 WordNet 发行版中:dict/lexnames。以下是 WordNet 3.0 中的文件内容:
00 adj.all 3
01 adj.pert 3
02 adv.all 4
03 noun.Tops 1
04 noun.act 1
05 noun.animal 1
06 noun.artifact 1
07 noun.attribute 1
08 noun.body 1
09 noun.cognition 1
10 noun.communication 1
11 noun.event 1
12 noun.feeling 1
13 noun.food 1
14 noun.group 1
15 noun.location 1
16 noun.motive 1
17 noun.object 1
18 noun.person 1
19 noun.phenomenon 1
20 noun.plant 1
21 noun.possession 1
22 noun.process 1
23 noun.quantity 1
24 noun.relation 1
25 noun.shape 1
26 noun.state 1
27 noun.substance 1
28 noun.time 1
29 verb.body 2
30 verb.change 2
31 verb.cognition 2
32 verb.communication 2
33 verb.competition 2
34 verb.consumption 2
35 verb.contact 2
36 verb.creation 2
37 verb.emotion 2
38 verb.motion 2
39 verb.perception 2
40 verb.possession 2
41 verb.social 2
42 verb.stative 2
43 verb.weather 2
44 adj.ppl 3
Run Code Online (Sandbox Code Playgroud)
对于 dict/data.* 的每个条目,第二个数字是词法文件信息。例如,此填充条目包含数字 13,即名词.food。
07883031 13 n 01 filling 0 002 @ 07882497 n 0000 ~ 07883156 n 0000 | a food mixture used to fill pastry or sandwiches etc.
Run Code Online (Sandbox Code Playgroud)
小智 5
使用 Python NLTK 接口:
from nltk.corpus import wordnet as wn
for synset in wn.synsets('can'):
print synset.lexname
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1974 次 |
| 最近记录: |