mirror of
https://github.com/explosion/spaCy.git
synced 2025-04-20 00:51:58 +03:00
Fix example.
This commit is contained in:
parent
0c36b2d636
commit
3cb57e18e1
|
@ -784,18 +784,19 @@ supports `.yml`, `.yaml`, `.json` and `.jsonl`.
|
|||
path = "textcat_examples.json"
|
||||
```
|
||||
|
||||
If you want to perform few-shot learning with a binary classifier, you can
|
||||
provide positive and negative examples - e. g.:
|
||||
If you want to perform few-shot learning with a binary classifier (i. e. a text either should or should not be assigned
|
||||
to a given class), you can provide positive and negative examples with the POS/NEG label. An example for spam
|
||||
classification:
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"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",
|
||||
"answer": "NotSpam"
|
||||
"answer": "NEG"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue
Block a user