将单词添加到 WordNet 的本地副本 [英] Add words to a local copy of WordNet

查看:58
本文介绍了将单词添加到 WordNet 的本地副本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用通过 Python 的 NLTK 访问的 WordNet 来比较来自社交媒体的单词的同义词集.其中许多词不在 NLTK 连接的 WordNet 版本中.

I am using WordNet, accessed through Python's NLTK to compare the synsets of words from social media. Many of those words aren't in the version of WordNet that NLTK connects to.

当我说我时,我指的是特定领域的术语,而不是缩写或表情符号.

When I say I words I mean domain-specific terms, not abbreviations or emoticons.

我已经编制了这些单词的列表,并希望将该列表与 WordNet 合并.

I've compiled a list of these words and would like to merge that list with WordNet.

搜索先前的努力结果是尝试开发自动更新 WordNet 的方法.

Searching for prior efforts turns up on attempts to develop methods of automatically updating WordNet.

我想象的步骤是:

  1. 克隆 WordNet 数据库
  2. 编写用于查找本地副本的 WordNet 模块的扩展
  3. 更新该本地副本.

这听起来有多合理?

推荐答案

我自己还没有改变 WordNet,但我有很好的使用 多语言中央存储库,我相信您应该能够使用它来做您想做的事.

I haven't changed WordNet myself yet, but I had good experiences working with the Multilingual Central Repository, and I believe you should be able to do what you want using that.

它包含包括英语在内的多种语言的 WordNet 3.0 数据文件,这些文件已通过所谓的跨语言索引 (ILI) 相互关联.数据文件可以加载到 MySQL 或 PostgreSQL 数据库表中,从这点来看,不仅使用 SQL 命令查询它应该相对容易,而且插入新项目,维护表之间的对应关系也相对容易.您当然也可以导出更改后的数据库,例如转换成 CSV 文件,如果使用 SQL 不足以满足您的目的.

It contains the data files for WordNet 3.0 in several languages including English, which have been tied to each other through so-called Inter-Lingual Indexes (ILI). The data files can be loaded into a MySQL or PostgreSQL database tables, from which point it should be relatively easy not just to query it using SQL commands, but to insert new items, maintaining correspondence between tables. You can of course export the changed database as well, e.g. into CSV files, if using SQL is not enough for your purposes.

这篇关于将单词添加到 WordNet 的本地副本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆