From 74140f514515540f594bb6f6fe91c902d1ed0734 Mon Sep 17 00:00:00 2001 From: kadarakos Date: Wed, 23 Nov 2022 11:00:39 +0000 Subject: [PATCH] store user data and rename cmd arg --- spacy/cli/apply.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spacy/cli/apply.py b/spacy/cli/apply.py index c789c46a2..8168b3933 100644 --- a/spacy/cli/apply.py +++ b/spacy/cli/apply.py @@ -76,7 +76,7 @@ def apply_cli( data_path: Path = Arg(..., help=path_help, exists=True), output_file: Path = Arg(..., help=out_help, dir_okay=False), code_path: Optional[Path] = Opt(None, "--code", "-c", help=code_help), - json_field: str = Opt("text", "--field", "-f", help="Field to grab from .jsonl"), + json_field: str = Opt("text", "--json-field", "-jf", help="Field to grab from .jsonl"), force_overwrite: bool = Opt(False, "--force", "-F", help="Force overwriting the output file"), use_gpu: int = Opt(-1, "--gpu-id", "-g", help="GPU ID or -1 for CPU."), batch_size: int = Opt(1, "--batch-size", "-b", help="Batch size."), @@ -116,7 +116,7 @@ def apply( nlp = load_model(model) msg.good(f"Loaded model {model}") vocab = nlp.vocab - docbin = DocBin() + docbin = DocBin(store_user_data=True) paths = walk_directory(data_path) streams: List[DocOrStrStream] = [] text_files = []