From fe64acf2e1f8f902ccb25c0a78fcd514afcd8ac3 Mon Sep 17 00:00:00 2001 From: Adriane Boyd Date: Thu, 11 Mar 2021 16:07:30 +0100 Subject: [PATCH] Minor adjustments to NER and textcat demos (#47) * Use lang var in package name * Update titles and descriptions in ner/textcat demos --- pipelines/README.md | 8 ++++---- pipelines/ner_demo/project.yml | 6 +++--- pipelines/ner_demo_replace/project.yml | 4 ++-- pipelines/ner_demo_update/project.yml | 4 ++-- pipelines/textcat_demo/project.yml | 2 +- pipelines/textcat_multilabel_demo/project.yml | 4 ++-- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/pipelines/README.md b/pipelines/README.md index cf366061a..e28a062a7 100644 --- a/pipelines/README.md +++ b/pipelines/README.md @@ -4,10 +4,10 @@ | Template | Description | | --- | --- | -| [`ner_demo`](ner_demo) | Demo NER (Named Entity Recognition) | -| [`ner_demo_replace`](ner_demo_replace) | Demo NER Replace | -| [`ner_demo_update`](ner_demo_update) | Demo NER Update | +| [`ner_demo`](ner_demo) | Demo NER in a new pipeline (Named Entity Recognition) | +| [`ner_demo_replace`](ner_demo_replace) | Demo replacing an NER component in a pretrained pipeline | +| [`ner_demo_update`](ner_demo_update) | Demo updating an NER component in a pretrained pipeline | | [`ner_wikiner`](ner_wikiner) | Named Entity Recognition (WikiNER) | | [`tagger_parser_ud`](tagger_parser_ud) | Part-of-speech Tagging & Dependency Parsing (Universal Dependencies) | | [`textcat_demo`](textcat_demo) | Demo Textcat (Text Classification) | -| [`textcat_multilabel_demo`](textcat_multilabel_demo) | Demo Textcat (Text Classification) | \ No newline at end of file +| [`textcat_multilabel_demo`](textcat_multilabel_demo) | Demo Multilabel Textcat (Text Classification) | \ No newline at end of file diff --git a/pipelines/ner_demo/project.yml b/pipelines/ner_demo/project.yml index de19199d2..8c27cf537 100644 --- a/pipelines/ner_demo/project.yml +++ b/pipelines/ner_demo/project.yml @@ -1,5 +1,5 @@ -title: "Demo NER (Named Entity Recognition)" -description: "A minimal demo NER project for spaCy v3 adapted from the spaCy v2 [`train_ner.py`](https://github.com/explosion/spaCy/blob/v2.3.x/examples/training/train_ner.py) example script." +title: "Demo NER in a new pipeline (Named Entity Recognition)" +description: "A minimal demo NER project for spaCy v3 adapted from the spaCy v2 [`train_ner.py`](https://github.com/explosion/spaCy/blob/v2.3.x/examples/training/train_ner.py) example script for creating an NER component in a new pipeline." # Variables can be referenced across the project.yml using ${vars.var_name} vars: name: "ner_demo" @@ -84,7 +84,7 @@ commands: deps: - "training/model-best" outputs_no_cache: - - "packages/en_${vars.name}-${vars.version}/dist/en_${vars.name}-${vars.version}.tar.gz" + - "packages/${vars.lang}_${vars.name}-${vars.version}/dist/${vars.lang}_${vars.name}-${vars.version}.tar.gz" - name: visualize-model help: Visualize the model's output interactively using Streamlit diff --git a/pipelines/ner_demo_replace/project.yml b/pipelines/ner_demo_replace/project.yml index 191a1b78a..29309e33f 100644 --- a/pipelines/ner_demo_replace/project.yml +++ b/pipelines/ner_demo_replace/project.yml @@ -1,4 +1,4 @@ -title: "Demo NER Replace" +title: "Demo replacing an NER component in a pretrained pipeline" description: "A minimal demo NER project that replaces the NER component in an existing pretrained pipeline. All other pipeline components are preserved and frozen during training." spacy_version: ">=3.0.5,<4.0.0" # Variables can be referenced across the project.yml using ${vars.var_name} @@ -94,7 +94,7 @@ commands: deps: - "training/model-best" outputs_no_cache: - - "packages/en_${vars.name}-${vars.version}/dist/en_${vars.name}-${vars.version}.tar.gz" + - "packages/${vars.lang}_${vars.name}-${vars.version}/dist/${vars.lang}_${vars.name}-${vars.version}.tar.gz" - name: visualize-model help: Visualize the model's output interactively using Streamlit diff --git a/pipelines/ner_demo_update/project.yml b/pipelines/ner_demo_update/project.yml index aff02f65e..17e1c67f2 100644 --- a/pipelines/ner_demo_update/project.yml +++ b/pipelines/ner_demo_update/project.yml @@ -1,4 +1,4 @@ -title: "Demo NER Update" +title: "Demo updating an NER component in a pretrained pipeline" description: "A demo NER project that updates the NER component in an existing pretrained pipeline. All other pipeline components are preserved and frozen during training." spacy_version: ">=3.0.5,<4.0.0" # Variables can be referenced across the project.yml using ${vars.var_name} @@ -94,7 +94,7 @@ commands: deps: - "training/model-best" outputs_no_cache: - - "packages/en_${vars.name}-${vars.version}/dist/en_${vars.name}-${vars.version}.tar.gz" + - "packages/${vars.lang}_${vars.name}-${vars.version}/dist/${vars.lang}_${vars.name}-${vars.version}.tar.gz" - name: visualize-model help: Visualize the model's output interactively using Streamlit diff --git a/pipelines/textcat_demo/project.yml b/pipelines/textcat_demo/project.yml index ce6c1866e..b4d2d84df 100644 --- a/pipelines/textcat_demo/project.yml +++ b/pipelines/textcat_demo/project.yml @@ -81,7 +81,7 @@ commands: deps: - "training/model-best" outputs_no_cache: - - "packages/en_${vars.name}-${vars.version}/dist/en_${vars.name}-${vars.version}.tar.gz" + - "packages/${vars.lang}_${vars.name}-${vars.version}/dist/${vars.lang}_${vars.name}-${vars.version}.tar.gz" - name: visualize-model help: Visualize the model's output interactively using Streamlit diff --git a/pipelines/textcat_multilabel_demo/project.yml b/pipelines/textcat_multilabel_demo/project.yml index 9896af996..dfa1ed7d6 100644 --- a/pipelines/textcat_multilabel_demo/project.yml +++ b/pipelines/textcat_multilabel_demo/project.yml @@ -1,4 +1,4 @@ -title: "Demo Textcat (Text Classification)" +title: "Demo Multilabel Textcat (Text Classification)" description: "A minimal demo textcat_multilabel project for spaCy v3." # Variables can be referenced across the project.yml using ${vars.var_name} vars: @@ -81,7 +81,7 @@ commands: deps: - "training/model-best" outputs_no_cache: - - "packages/en_${vars.name}-${vars.version}/dist/en_${vars.name}-${vars.version}.tar.gz" + - "packages/${vars.lang}_${vars.name}-${vars.version}/dist/${vars.lang}_${vars.name}-${vars.version}.tar.gz" - name: visualize-model help: Visualize the model's output interactively using Streamlit