gpt4 book ai didi

python - 如何在 wordnet 词典中添加新词?

转载 作者:太空宇宙 更新时间:2023-11-04 04:52:10 34 4
gpt4 key购买 nike

我正在尝试匹配两个句子并找出相似之处。

我的句子中的某些单词(名词)似乎没有出现在 wordnet 词典中。如何将它们添加到 wordnet 中?

最佳答案

在这里试试:https://sourceforge.net/projects/extjwnl/

extJWNL (Extended Java WordNet Library) is a Java API for creating, reading and updating dictionaries in WordNet format. extJWNL is an upgraded version of JWNL. The library features support for creating, editing and writing dictionaries; dictionary encodings, including UTF-8; Java generics; huge dictionaries; instance dictionaries and static singletone dictionary; Maven and more.

用于添加新意义的示例脚本位于 https://github.com/extjwnl/extjwnl/wiki/ewnUserManual#script-editing

goal%1:09:00:: -add -addword end -setgloss "the state of affairs that a plan ... achieve it; ""the ends justify the means"""
goal%1:09:00:: -addptr content%1:09:00:: @
n#oxen -addexc ox

然后使用 ewn -script filename 运行

关于python - 如何在 wordnet 词典中添加新词?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47987383/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com