📜  fasttext python 代码示例

📅  最后修改于: 2022-03-11 14:46:56.797000             🧑  作者: Mango

代码示例1
#you can install it just by pip
#pip install fasttext

#or clone it from github and run the setup.py file
#git clone https://github.com/facebookresearch/fastText.git
#then run the setup.py file

import fasttext
# Skipgram model :
model = fasttext.train_unsupervised('data.txt', model='skipgram')
# or, cbow model :
model = fasttext.train_unsupervised('data.txt', model='cbow')