How to vectorize all text with swift text?
2 answers
If you want to compute vector representations of sentences or paragraphs, use:
$ ./fasttext print-sentence-vectors model.bin < text.txt
This assumes that the text.txt file contains the paragraphs for which you want vectors. The program outputs one vector representation per line in the file.
This was clearly mentioned in the README of the quick text repo. https://github.com/facebookresearch/fastText
+4
source to share
To get a vector for a sentence using quick text try the following command
$ echo "Your Sentence Here" | ./fasttext print-sentence-vectors model.bin
For an example, see Learning Word Views in Fasttext
0
source to share