mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-12 17:22:25 +03:00
Add links to docs in docstrings
This commit is contained in:
parent
c0a3e9a44a
commit
2524d067fd
|
@ -103,6 +103,8 @@ def configure_resume_cli(
|
|||
|
||||
A config for resuming training is the same as the input config, but with
|
||||
all components sourced.
|
||||
|
||||
DOCS: https://spacy.io/api/cli#configure-resume
|
||||
"""
|
||||
|
||||
nlp = spacy.load(base_model)
|
||||
|
@ -127,7 +129,10 @@ def configure_resume_cli(
|
|||
def configure_transformer_feature_source(
|
||||
base_model: str, output_file: Path, transformer_name: str = "roberta-base"
|
||||
) -> Config:
|
||||
"""Replace pipeline tok2vec with transformer."""
|
||||
"""Replace pipeline tok2vec with transformer.
|
||||
|
||||
DOCS: https://spacy.io/api/cli#configure-transformer
|
||||
"""
|
||||
|
||||
# 1. identify tok2vec
|
||||
# 2. replace tok2vec
|
||||
|
@ -176,7 +181,10 @@ def configure_transformer_feature_source(
|
|||
|
||||
@configure_cli.command("tok2vec")
|
||||
def configure_tok2vec_feature_source(base_model: str, output_file: Path) -> Config:
|
||||
"""Replace pipeline tok2vec with CNN tok2vec."""
|
||||
"""Replace pipeline tok2vec with CNN tok2vec.
|
||||
|
||||
DOCS: https://spacy.io/api/cli#configure-tok2vec
|
||||
"""
|
||||
nlp = spacy.load(base_model)
|
||||
_check_single_tok2vec(base_model, nlp.config)
|
||||
|
||||
|
|
|
@ -109,7 +109,16 @@ def merge_pipelines(
|
|||
output_file: Path = Arg(..., help="Path to save merged model")
|
||||
# fmt: on
|
||||
) -> Language:
|
||||
"""Combine components from multiple pipelines."""
|
||||
"""Combine components from multiple pipelines.
|
||||
|
||||
Given two pipelines, the components from them are merged into a single
|
||||
pipeline. The exact way this works depends on whether the second pipeline
|
||||
has one listener or more than one listener. In the single listener case
|
||||
`replace_listeners` is used, otherwise components are simply appended to
|
||||
the base pipeline.
|
||||
|
||||
DOCS: https://spacy.io/api/cli#merge
|
||||
"""
|
||||
nlp = spacy.load(base_model)
|
||||
nlp2 = spacy.load(added_model)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user