使用 wordnet 查找没有名词同义词集或至少有一个名词同义词集的术语

发布于 2024-10-04 11:15:34 字数 178 浏览 0 评论 0原文

我正在使用 WordNet 3.0。 WordNet 文档展示了如何查找给定单词的同义词,例如:

 wn car -synsn

但是,有没有办法查找带有
的术语 a) 没有名词同义词
b) 至少有一个名词同义词集等等。

谢谢, 索尼

I am using WordNet 3.0. The WordNet documentation shows how to find synsets of a given word such as:

 wn car -synsn

But, is there a way to find terms with
a) no noun synsets
b) with at least one noun synset and so on.

Thanks,
Sony

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

提笔落墨 2024-10-11 11:15:34

简短的回答是:
“不!无法根据同义词集中的单词存在或数量进行搜索”

命令行界面和库 API 均不提供将此类谓词应用于搜索的功能。

也就是说,可以将 WordNet 文件导入到关系性更强的存储类型,并在结果数据库中执行此类查询。
导入 WordNet 数据的更直接方法是直接点击 WordNet 文件本身(特别参见 这两个文件并解析出所需的数据。
另一种方法是基于 Library API 构建某种数据扫描器,从而利用库的所有 WordNet 格式解析功能,并将所需的字段输出到更适合数据库导入的文本文件。

The short answer is:
"NO! There is no way to search based on existence or count of words in synset"

Neither the Command Line interface nor the Library API provide the ability to apply this kind of predicates to a search.

This said, it is possible to import WordNet files to a more relational type of storage, and perform this type of queries in the resulting database.
The more direct way to import WordNet data is by tapping directly into the WordNet files themselves (see in particular these two files and parsing out the desired data.
An alternative is to build some kind of scanner of the data based on the Library API, hence leveraging all the WordNet format parsing capability of the library, and to output the desired Fields to a text file more suitable for database import.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文