在fastText的官方python绑定中是否有方法.predict

时间:2018-03-13 21:34:07

标签: machine-learning nlp text-classification fasttext

我知道在python(fasttext,pyfasttext)中有.predict方法的非官方绑定,但它们不适用于在官方FastText bash工具上训练过的最近模型,或者没有所有选项。官方的python绑定只描述了load_model(path)和tokenize(text)方法,这听起来很奇怪,因为你不能做任何预测。我在这里错过了什么吗?

1 个答案:

答案 0 :(得分:2)

我使用根据此链接https://github.com/facebookresearch/fastText/blob/master/README.md#building-fasttext-for-python构建和安装的Python包。我认为这是正式的。 通过load_model加载的模型对象具有请求的预测方法。