如何使用word2vec识别类似单词

发布于 2025-02-10 03:46:07 字数 387 浏览 2 评论 0原文

输入:我有一组单词(n)&输入句子

问题陈述: 该句子是动态的,用户可以提供与一个业务领域有关的任何句子。我们必须根据亲密关系将输入句子令牌映射到一组单词。

例如,我们可以使用不同的单词来提出相同的含义问题,并且很难维护所有同义词,因此我们有一种找到相似单词的机制,我们可以轻松地绘制。

1) A meeting scheduled by john
2) A meeting organized by john

用户可以像上面的示例一样以不同的方式构架句子。

计划&组织非常接近。

n集有计划的单词。如果用户给出(2)之类的句子,则我必须用 计划

input: I have a set of words(N) & input sentence

problem statement:
the sentence is dynamic, the user can give any sentence related to one business domain. we have to map the input sentence tokens to the set of words based on the closeness.

for example, we can use different words to ask the same meaning questions, and hard to maintain all the synonyms hence we have a mechanism to find similar words, we can map easily.

1) A meeting scheduled by john
2) A meeting organized by john

user can frame a sentence in different ways, like the above example.

scheduled & organized are very close.

N set has the word, scheduled. if a user gives a sentence like (2), I have to map the organized with scheduled.

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

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

发布评论

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

评论(1

咋地 2025-02-17 03:46:08

看看“单词移动的距离”,这是一种基本基于“单词矢量袋”的文本之间差异的方法。计算可能是昂贵的,尤其是在较长的文本上,但通常比“所有单词矢量的平均值”(如“平均值”)更好地识别“类似”的文本范围。

除此之外,一些更深层次的神经网络矢量化文本方法 - 伯特,elmo等 - 可能会在将这种“通过不同单词的类似意图”放置在共享坐标空间中的近距离位置方面做出什至有效的工作。

Take a look at "Word Mover's Distance", a way to calculate differences between texts that's essentially based on "bags of word-vectors". It can be expensive to calculate, especially on longer texts, but generally identifies "similar" ranges-of-text better than a simple baseline like "average of all word-vectors".

Beyond that, some of the deeper-neural-network methods of vectorizing text – BERT, ELMo, etc – may do an even-more effective job of placing such "similar intent by different words" texts into close positions in a shared coordinate space.

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