[英]cannot import name 'train_unsupervised' from 'fastText' (unknown location)
Currently I am working on stack overflow tag predictor where I am using fasttext.目前我正在使用 fasttext 的堆栈溢出标签预测器。
I install fasttext when I am running the line :我在运行该行时安装 fasttext:
import fastText as fasttext
from fastText import train_supervised
I get the error我收到错误
ImportError Traceback (most recent call last)
<ipython-input-176-72aec327c85a> in <module>
----> 1 from fastText import train_supervised
ImportError: cannot import name 'train_supervised' from 'fastText' (unknown location)
Can someone help me please.有人能帮助我吗。
I think fastText
should be spelled as from fasttext import train_supervised
.我认为fastText
应该拼写为from fasttext import train_supervised
。
This might help - https://github.com/facebookresearch/fastText/blob/master/python/doc/examples/train_supervised.py这可能会有所帮助 - https://github.com/facebookresearch/fastText/blob/master/python/doc/examples/train_supervised.py
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.