To get vector of a word, I can use:
model["word"]
but if I want to get the vector of a sentence, I need to either sum vectors of all words or get average of all vectors.
Does FastText provide a method to do this?
If you want to compute vector representations of sentences or paragraphs, please use:
$ ./fasttext print-sentence-vectors model.bin < text.txt
This assumes that the text.txt file contains the paragraphs that you want to get vectors for. The program will output one vector representation per line in the file.
This has been clearly mentioned in the README of fasttext repo. https://github.com/facebookresearch/fastText