mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-12 10:16:27 +03:00
updated add_pipe
docs (#12947)
This commit is contained in:
parent
3e4264899c
commit
065ead4eed
|
@ -2806,7 +2806,7 @@
|
|||
"",
|
||||
"# see github repo for examples on sentence-transformers and Huggingface",
|
||||
"nlp = spacy.load('en_core_web_md')",
|
||||
"nlp.add_pipe(\"text_categorizer\", ",
|
||||
"nlp.add_pipe(\"classy_classification\", ",
|
||||
" config={",
|
||||
" \"data\": data,",
|
||||
" \"model\": \"spacy\"",
|
||||
|
@ -3010,8 +3010,8 @@
|
|||
"# Load the spaCy language model:",
|
||||
"nlp = spacy.load(\"en_core_web_sm\")",
|
||||
"",
|
||||
"# Add the \"text_categorizer\" pipeline component to the spaCy model, and configure it with SetFit parameters:",
|
||||
"nlp.add_pipe(\"text_categorizer\", config={",
|
||||
"# Add the \"spacy_setfit\" pipeline component to the spaCy model, and configure it with SetFit parameters:",
|
||||
"nlp.add_pipe(\"spacy_setfit\", config={",
|
||||
" \"pretrained_model_name_or_path\": \"paraphrase-MiniLM-L3-v2\",",
|
||||
" \"setfit_trainer_args\": {",
|
||||
" \"train_dataset\": train_dataset",
|
||||
|
|
Loading…
Reference in New Issue
Block a user