简体   繁体   English

无法从“fastText”(未知位置)导入名称“train_unsupervised”

[英]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.

相关问题 ImportError:无法从“google”(未知位置)导入名称“search” - ImportError: cannot import name 'search' from 'google' (unknown location) ImportError:无法从“电报”(未知位置)导入名称“Bot” - ImportError: cannot import name 'Bot' from 'telegram' (unknown location) ImportError:无法从“sklearn”(未知位置)导入名称“__version__” - ImportError: cannot import name '__version__' from 'sklearn' (unknown location) 无法从“变形金刚”(未知位置)导入名称“管道” - cannot import name 'pipline' from 'transformers' (unknown location) 导入错误:无法从 python 中的“包”(未知位置)导入名称“方法” - ImportError: cannot import name 'method' from 'package' (unknown location) in python 导入错误:无法从“数据”(未知位置)导入名称“voc” - ImportError: cannot import name 'voc' from 'data' (unknown location) ImportError:无法从“mypackage”(未知位置)导入名称“app” - ImportError: cannot import name 'app' from 'mypackage' (unknown location) ImportError:无法从“时间”(未知位置)导入名称“时钟” - ImportError: cannot import name 'clock' from 'time' (unknown location) ImportError:无法从“pymatgen”(未知位置)导入名称“MPRester” - ImportError: cannot import name 'MPRester' from 'pymatgen' (unknown location) ImportError:无法从“龙卷风”(未知位置)导入名称“gen” - ImportError: cannot import name 'gen' from 'tornado' (unknown location)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM