You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 4, 2021. It is now read-only.
We provide a simple interface to encode English sentences. **See [**demo.ipynb**](https://github.com/facebookresearch/InferSent/blob/master/demo.ipynb)
24
-
for a practical example.** Get started with the following steps:
22
+
## Download sentence encoder
25
23
26
-
*0.0) Download our InferSent models (V1 trained with GloVe, V2 trained with fastText)[147MB]:*
Note that infersent1 is trained with GloVe (which have been trained on text preprocessed with the PTB tokenizer) and infersent2 is trained with fastText (which have been trained on text preprocessed with the MOSES tokenizer). The latter also removes the padding of zeros with max-pooling which was inconvenient when embedding sentences outside of their batches.
29
+
30
+
## Download necessary libraries
31
+
Run the following code below in the terminal to download the libraries:
32
+
-`pip3 install --user numpy`
33
+
-`pip3 install --user torch`
34
+
-`pip3 install --user nltk`
35
+
36
+
After installing all required packages, we will also need to download and format the sentence encoder & pre-trained model.
37
+
38
+
## Run the program
39
+
- To run the Infersent approach, call the `main.py` file inside the `/infersent` directory after set up steps have been completed with `python3 main.py`.
0 commit comments