Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在寻找可以做两件事的 API 或 Ruby Gem。首先是查找每个单词,看看它是否是名词。我想做的第二件事是查找形容词(也许还有名词)并找到与其最相似的单词。做这个的最好方式是什么?
我不了解 Ruby,但要确定一个单词的词性(比如它是否是名词),您需要所谓的“词性标注器”。对于第二部分,听起来 WordNet 会帮助你。WordNet 是一个英语单词数据库(你没有说你感兴趣的语言),其关系包括“含义相似”、“更具体”(比如“猫”比“动物”更具体)、“相反意义”等。