mirror of
https://github.com/explosion/spaCy.git
synced 2025-08-06 21:30:22 +03:00
rename to apply
This commit is contained in:
parent
ab80dea14f
commit
a7070f3dcf
|
@ -16,7 +16,7 @@ from .debug_config import debug_config # noqa: F401
|
|||
from .debug_model import debug_model # noqa: F401
|
||||
from .debug_diff import debug_diff # noqa: F401
|
||||
from .evaluate import evaluate # noqa: F401
|
||||
from .annotate import annotate # noqa: F401
|
||||
from .apply import apply # noqa: F401
|
||||
from .convert import convert # noqa: F401
|
||||
from .init_pipeline import init_pipeline_cli # noqa: F401
|
||||
from .init_config import init_config, fill_config # noqa: F401
|
||||
|
|
|
@ -72,8 +72,8 @@ def _stream_data(
|
|||
sys.exit()
|
||||
|
||||
|
||||
@app.command("annotate")
|
||||
def annotate_cli(
|
||||
@app.command("apply")
|
||||
def apply_cli(
|
||||
# fmt: off
|
||||
model: str = Arg(..., help="Model name or path"),
|
||||
data_path: Path = Arg(..., help=path_help, exists=True),
|
||||
|
@ -84,7 +84,7 @@ def annotate_cli(
|
|||
n_process: int = Opt(1, "--n-process", "-n", help="Number of processors to use")
|
||||
):
|
||||
"""
|
||||
Run a trained pipeline over documents.
|
||||
Apply a trained pipeline to documents to get predictions.
|
||||
Expects a loadable spaCy pipeline and some data as input.
|
||||
The input can be provided multiple formats. It can be a .spacy
|
||||
file, a single text file with one document per line or a directory
|
||||
|
@ -94,10 +94,10 @@ def annotate_cli(
|
|||
"""
|
||||
import_code(code_path)
|
||||
setup_gpu(use_gpu)
|
||||
annotate(data_path, output, model, batch_size, n_process)
|
||||
apply(data_path, output, model, batch_size, n_process)
|
||||
|
||||
|
||||
def annotate(
|
||||
def apply(
|
||||
data_path: Path,
|
||||
output: Path,
|
||||
model: str,
|
Loading…
Reference in New Issue
Block a user