epfml / sent2vec

General purpose unsupervised sentence representations
Other
1.19k stars 256 forks source link

How to install sent2vec? #76

Closed rv-ltran closed 4 years ago

rv-ltran commented 5 years ago

I want to use sent2vec on mac

I am following the following codes and ran into the error: "no module named 'sent2vec'". Do you know how to resolve this?

import sent2vec model = sent2vec.Sent2vecModel() model.load_model('model.bin') emb = model.embed_sentence("once upon a time .")

I have done the following steps, and fastText-0.9.1 has been installed successfully

$ wget https://github.com/facebookresearch/fastText/archive/v0.9.1.zip $ unzip v0.9.1.zip $ cd fastText-0.9.1 $ make $pip install .

AlexanderDavid commented 4 years ago

Did you clone this repository and run pip install . inside it? It seems like you just installed FastText.

OnlyBelter commented 4 years ago

After installing fasttext and sent2vec, how to use sent2vec as a commond line?

Such as the demo code shows: ./fasttext sent2vec -input wiki_sentences.txt -output my_model -minCount 8 -dim 700 -epoch 9 -lr 0.2 -wordNgrams 2 -loss ns -neg 10 -thread 20 -t 0.000005 -dropoutK 4 -minCountLabel 20 -bucket 4000000 -maxVocabSize 750000 -numCheckPoints 10

1eclipse commented 4 years ago

My OS is win10. Did someone install it successfully?I have some questions in detail. Can you give me some help? thanks!!!

martinjaggi commented 4 years ago

closing this, thanks alex for the help!