Fasttext: python : enable batch predictions for predict and predict-prob options

Created on 22 Dec 2017  路  1Comment  路  Source: facebookresearch/fastText

predict and predict-prob options of the fasttext binary can have a file name or stdin as input,
it would be great to be able to have in the python library the following methods in the supervised model objet

  • predict_file : to get the (k) predictions of an input file
  • predict_prob_file : to get the (k) predictions of an input with the probabilities
follow-up-after-fix

Most helpful comment

Hello @davidswaven,

Thank you for your post. I just landed an extension to predict that also accepts a list of strings (but not a path to a file). You can feed this function batches of text and it should help you speed up your code a bit. Let me know how this works out.

Thanks,
Christian

>All comments

Hello @davidswaven,

Thank you for your post. I just landed an extension to predict that also accepts a list of strings (but not a path to a file). You can feed this function batches of text and it should help you speed up your code a bit. Let me know how this works out.

Thanks,
Christian

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hughbzhang picture hughbzhang  路  3Comments

shriiitk picture shriiitk  路  3Comments

mino98 picture mino98  路  3Comments

nomadlx picture nomadlx  路  3Comments

kurtjanssensai picture kurtjanssensai  路  3Comments