# custom sense2vec

**URL:** <https://support.prodi.gy/t/custom-sense2vec/2698>\
**Category:** Uncategorized\
**Tags:** usage\
**Created:** [March 24, 2020, 8:29pm UTC](https://support.prodi.gy/t/custom-sense2vec/2698 "2020-03-24T20:29:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![robertto](https://avatars.discourse-cdn.com/v4/letter/r/f475e1/32.png) [@robertto](https://support.prodi.gy/u/robertto)\
**Post date:** [March 24, 2020, 8:29pm UTC](https://support.prodi.gy/t/custom-sense2vec/2698/1 "2020-03-24T20:29:05Z")

</div>

Hi All,  
@ines  
I hope you are ok and healthy, I have two types of questions, theoretical, implementation

1- I want to know your idea how can I use word2sense for a specific corpus (A book with 7000 sentences) to add more semantic to my word vector or my custom NER

2- How should I implement, I followed this

> **[explosion/sense2vec](https://github.com/explosion/sense2vec#-training-your-own-sense2vec-vectors)**
>
> 🦆 Contextually-keyed word vectors. Contribute to explosion/sense2vec development by creating an account on GitHub.

but I lost a bit, aI could run this comment on my specific corpus

```python
python -m prodigy sense2vec.teach data_merged_v22 C:/Users/moha/Documents/Models/s2v_old --seeds "since"

```

her I used "since " and was looking for other cue words related to causation, however, I know that you also used sense2vecto improve NER

I would be happy if you can give me some hints mainly how can I Training your own sense2vec vectors AND how can use it to add more sematic to my model

---

<div class="post-metadata">

**Author:** ![robertto](https://avatars.discourse-cdn.com/v4/letter/r/f475e1/32.png) [@robertto](https://support.prodi.gy/u/robertto)\
**Post date:** [March 26, 2020, 12:19pm UTC](https://support.prodi.gy/t/custom-sense2vec/2698/2 "2020-03-26T12:19:37Z")

</div>

I would be very thankful if someone can give me some ideas about my question , many thanks

---

<div class="post-metadata">

**Author:** ![ines](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ines/32/3_2.png) [@ines](https://support.prodi.gy/u/ines)\
**Post date:** [March 26, 2020, 8:13pm UTC](https://support.prodi.gy/t/custom-sense2vec/2698/3 "2020-03-26T20:13:53Z")

</div>

If you want to train your model, the link you shared is the way to go – you need to follow the steps and run the scripts for preprocessing, and then use either FastText or GloVe to train the vectors: [https://github.com/explosion/sense2vec#-training-your-own-sense2vec-vectors](https://github.com/explosion/sense2vec#-training-your-own-sense2vec-vectors)

To train meaningful vectors, you typically want to use a lot of text, like 1 billion words. So your 7000 likely won't be enough. Maybe you can find other similar texts from a different source that you can use.

Once you have a sense2vec model, you can then use the vectors to find more similar terms. Not sure if "since" is a good seed term here, because there are not _that_ many similar expressions. It works better for things like (proper) nouns.

---

<div class="post-metadata">

**Author:** ![robertto](https://avatars.discourse-cdn.com/v4/letter/r/f475e1/32.png) [@robertto](https://support.prodi.gy/u/robertto)\
**Post date:** [March 26, 2020, 8:32pm UTC](https://support.prodi.gy/t/custom-sense2vec/2698/4 "2020-03-26T20:32:23Z")

</div>

like always, very informative! you are right. I have only around 150000 tokens, many thanks, let me suppose that I will find another corpus, can I use the prodigy comments instead of scripts for pre-processing?

is there any other usage of sense2vec that I can use with the combination of NER to expand and improve my entities?

could you have a look my other question here?

> [@how can I annotate my text to argumentation components?](https://support.prodi.gy/t/how-can-i-annotate-my-text-to-argumentation-components/2628):
>
> Dear all, I hope you are doing well If you remember I have trained custom NER using prodigy. I am really happy with the model here it is an example: basically I have this kind of entities: LONG,DATE,TIME,NAMES,STAR,PLAN,GEOM,... then using these entities extracted explicit observational sentences (I can call them evidence in the context of argument mining) you can see here like those sentences , now I am looking for a way to extract "claims" how can I do it using …

many thanks,  
Bleiben Sie Gesund

---

<div class="post-metadata">

**Author:** ![henokDES](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/henokdes/32/2339_2.png) [@henokDES](https://support.prodi.gy/u/henokDES)\
**Post date:** [August 14, 2021, 1:07pm UTC](https://support.prodi.gy/t/custom-sense2vec/2698/5 "2021-08-14T13:07:26Z")

</div>

@robertto @ines hope you all are doing well, i am struggling on training custom sense2vec model for language other than English, please help me out, i have already prepared my data as expected, but couldnt figure out to feed the data to the model, any help is appreciated thank you,

---

<div class="post-metadata">

**Author:** ![ines](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ines/32/3_2.png) [@ines](https://support.prodi.gy/u/ines)\
**Post date:** [August 15, 2021, 1:01am UTC](https://support.prodi.gy/t/custom-sense2vec/2698/6 "2021-08-15T01:01:47Z")

</div>

> [@henokDES](#):
>
> i have already prepared my data as expected, but couldnt figure out to feed the data to the model, any help is appreciated thank you,

Can you share more details on what exactly isn't working for you, or the problem you're hitting?

The step-by-step scripts should show you the full end-to-end process: [GitHub - explosion/sense2vec: 🦆 Contextually-keyed word vectors](https://github.com/explosion/sense2vec/#step-by-step-process) So if you've already prepared your data, you should be able to run those scripts in order, and the `05_export.py` script will then output the trained sense2vec vectors.
