Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add one couple of similar terms? #8

Closed
gaochao19860203 opened this issue Oct 31, 2017 · 3 comments
Closed

How to add one couple of similar terms? #8

gaochao19860203 opened this issue Oct 31, 2017 · 3 comments

Comments

@gaochao19860203
Copy link

如果 是想增加一对近义词,应该怎么操作?把这对近义词提交给你?或者 是否可以开放相关添加近义词的接口?

@hailiang-wang
Copy link
Member

hailiang-wang commented Oct 31, 2017

现在近义词是有距离的,这也是计算句子间相似度的必要,而这个距离是word2vec计算出来的,我觉得增加api去添加近义词,不是很符合接口的一致性。实际中,是有这样的需求的,直接干扰近义词词表,但是这里要定义一个距离和词向量。
添加一对近义词 (A, B),有下面的情况:

  1. A,B 都不在当前词表中

  2. A在词表中,B不在

  3. A和B都在词表中

这几个情况,还需要认真思考一下怎么处理。目前我没有好的办法,所以还不能提供接口。

@gaochao19860203
Copy link
Author

按照你说的思路,就是 先判断A,B两个词在不在词表中。如果A不在,将A与其他词的距离和词向量录入词表,B同理。是这样吗?
A与其他词的距离 可以用word2vec来计算,但是是不是需要包含A这个词的语料 才能计算?

@luoruisichuan
Copy link

软件功能很不错!
建议开放一个接口函数,自主添加词汇进去,比如,”病人“的向量是A,那么,自己可以添加”患者“,并将其向量设置为A,或者,在A的基础上,对向量中的元素人工做些修改,作为对应”患者“的向量。这样有利于软件的推广使用。
谢谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants