predict
You can use classy predict
to perform predictions with a trained model. Two modes are supported:
- File-based prediction
- Bash-interactive
File-based prediction allows you to automatically tag files. Such files can be in any supported format and need not contain label information: that is, the corresponding area, such as the second column for .tsv files in sequence classification, can be missing (if present, it will just be ignored).
cat target.tsv | head -1I wish I had never bought these terrible headphones!classy predict file sequence-example target.tsv -o target.out.tsvPrediction completecat target.out.tsv | head -1I wish I had never bought these terrible headphones! <tab> negative
On the other hand, bash-interactive predictions allows you to interactively query models via bash:
classy predict interactive sequence-sampleI wish I had never bought these terrible headphones! # prediction: negative