【问题标题】:cannot import name 'train_unsupervised' from 'fastText' (unknown location)无法从“fastText”(未知位置)导入名称“train_unsupervised”
【发布时间】:2020-01-30 08:38:23
【问题描述】:

目前我正在使用 fasttext 的堆栈溢出标记预测器。

我在运行线路时安装 fasttext :

import fastText as fasttext

from fastText import train_supervised

我得到了错误

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)

谁能帮帮我。

【问题讨论】:

    标签: python machine-learning fasttext


    【解决方案1】:

    我认为fastText 应该拼写为from fasttext import train_supervised

    这可能会有所帮助 -https://github.com/facebookresearch/fastText/blob/master/python/doc/examples/train_supervised.py

    【讨论】:

    • @Prashant_Kumar 非常感谢.. 这很有帮助。
    猜你喜欢
    • 2020-12-29
    • 1970-01-01
    • 2021-02-06
    • 2021-03-21
    • 2020-09-08
    • 2021-02-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多