explosion / explosion/sense2vec

Get most similar senses on multiple senses.

Open
#146 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.7k
Forks
236
PR merge metrics
No merged PRs in 30d

Description

Is there a way to get multiple most similar senses using array of senses?

I believe current solution gives average to multiple senses. For example I want to get most similar senses on two or more senses i.e.

```python
from sense2vec import Sense2Vec

s2v = Sense2Vec().from_disk("./s2v_reddit_2015_md")
query = ["bot|NOUN", "think|VERB" ]
# gives averaged senses
s2v.most_similar(query, n=10)
[('sup(This|ADV', 0.7275), ('idontbelieveyou.gif|NOUN', 0.7244), ('TLDR|NOUN', 0.6689), ('Original_Post|NOUN', 0.6167)]

# But I want to get separate most similar senses for each sense. Like this.
[[('sup(This|ADV', 0.7137), ('Original_Post|NOUN', 0.6189), ('TLDR|NOUN', 0.6129)], [('but|CONJ', 0.9187), ('obviously|ADV', 0.9084), ('honestly|ADV', 0.9006)]]
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.