FastText bigram vs words words sentences

Given the input file, I want to get dictionary vectors for bitrams like "new york", "machine learning", etc. I am just wondering which is the correct approach to make from the following two approaches.

Approach 1:

#Change the word_ngrams parameter to two

./fasttext skipgram -input file.txt -output model -wordNgrams 2

      

Approach 2:

#Train with default parameters

./fasttext skipgram -input file.txt -output model



#Obtain word vectors for bigrams (where `queries.txt` includes bigrams such as new york", 
"machine learning" etc.)

./fasttext print-word-vectors model.bin < queries.txt

      

Please let me know which approach is correct?

0


source to share





All Articles