mirror of
https://github.com/explosion/spaCy.git
synced 2025-04-20 00:51:58 +03:00
Remove binary textcat example. Format.
This commit is contained in:
parent
3cb57e18e1
commit
64c40d16f0
|
@ -673,22 +673,6 @@ prompt.
|
|||
The formatting of few-shot examples is the same as those for the
|
||||
[v1](#textcat-v1) implementation.
|
||||
|
||||
If you want to perform few-shot learning with a binary classifier, you can
|
||||
provide positive and negative examples - e. g.:
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"text": "You won the lottery! Wire a fee of 200$ to be able to withdraw your winnings.",
|
||||
"answer": "Spam"
|
||||
},
|
||||
{
|
||||
"text": "Your order #123456789 has arrived",
|
||||
"answer": "NotSpam"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
#### spacy.TextCat.v2 {id="textcat-v2"}
|
||||
|
||||
V2 includes all v1 functionality, with an improved prompt template.
|
||||
|
@ -718,22 +702,6 @@ V2 includes all v1 functionality, with an improved prompt template.
|
|||
The formatting of few-shot examples is the same as those for the
|
||||
[v1](#textcat-v1) implementation.
|
||||
|
||||
If you want to perform few-shot learning with a binary classifier, you can
|
||||
provide positive and negative examples - e. g.:
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"text": "You won the lottery! Wire a fee of 200$ to be able to withdraw your winnings.",
|
||||
"answer": "Spam"
|
||||
},
|
||||
{
|
||||
"text": "Your order #123456789 has arrived",
|
||||
"answer": "NotSpam"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
#### spacy.TextCat.v1 {id="textcat-v1"}
|
||||
|
||||
Version 1 of the built-in TextCat task supports both zero-shot and few-shot
|
||||
|
@ -784,8 +752,9 @@ supports `.yml`, `.yaml`, `.json` and `.jsonl`.
|
|||
path = "textcat_examples.json"
|
||||
```
|
||||
|
||||
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
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue
Block a user