Fix example.

This commit is contained in:
Raphael Mitsch 2023-10-11 12:04:30 +02:00
parent 0c36b2d636
commit 3cb57e18e1

View File

@ -784,18 +784,19 @@ supports `.yml`, `.yaml`, `.json` and `.jsonl`.
path = "textcat_examples.json" path = "textcat_examples.json"
``` ```
If you want to perform few-shot learning with a binary classifier, you can If you want to perform few-shot learning with a binary classifier (i. e. a text either should or should not be assigned
provide positive and negative examples - e. g.: to a given class), you can provide positive and negative examples with the POS/NEG label. An example for spam
classification:
```json ```json
[ [
{ {
"text": "You won the lottery! Wire a fee of 200$ to be able to withdraw your winnings.", "text": "You won the lottery! Wire a fee of 200$ to be able to withdraw your winnings.",
"answer": "Spam" "answer": "POS"
}, },
{ {
"text": "Your order #123456789 has arrived", "text": "Your order #123456789 has arrived",
"answer": "NotSpam" "answer": "NEG"
} }
] ]
``` ```