diff --git a/README.md b/README.md
index fc3bf453b..1851dde6d 100644
--- a/README.md
+++ b/README.md
@@ -13,14 +13,14 @@ EDS-NLP is a collaborative NLP framework that aims primarily at extracting infor
At its core, it is a collection of components or pipes, either rule-based functions or
deep learning modules. These components are organized into a novel efficient and modular pipeline system, built for hybrid and multitask models. We use [spaCy](https://spacy.io) to represent documents and their annotations, and [Pytorch](https://pytorch.org/) as a deep-learning backend for trainable components.
-EDS-NLP is versatile and can be used on any textual document. The rule-based components are fully compatible with spaCy's pipelines, and vice versa. This library is a product of collaborative effort, and we encourage further contributions to enhance its capabilities.
+EDS-NLP is versatile and can be used on any textual document. The rule-based components are fully compatible with spaCy's components, and vice versa. This library is a product of collaborative effort, and we encourage further contributions to enhance its capabilities.
Check out our interactive [demo](https://aphp.github.io/edsnlp/demo/) !
## Features
-- [Rule-based components](https://aphp.github.io/edsnlp/latest/pipelines/) for French clinical notes
-- [Trainable components](https://aphp.github.io/edsnlp/latest/pipelines/trainable): NER, Span classification
+- [Rule-based components](https://aphp.github.io/edsnlp/latest/pipes/) for French clinical notes
+- [Trainable components](https://aphp.github.io/edsnlp/latest/pipes/trainable): NER, Span classification
- Support for trained multitask models with [weights sharing](https://aphp.github.io/edsnlp/latest/concepts/torch-component/#sharing-subcomponents)
- [Fast inference](https://aphp.github.io/edsnlp/latest/concepts/inference/), with multi-GPU support out of the box
- Easy to use, with a spaCy-like API
diff --git a/changelog.md b/changelog.md
index 8595fcf0d..92262b4cb 100644
--- a/changelog.md
+++ b/changelog.md
@@ -12,7 +12,7 @@
### Changed
-- Pipes (in edsnlp/pipelines) are now lazily loaded, which should improve the loading time of the library.
+- Pipes (in edsnlp/pipes) are now lazily loaded, which should improve the loading time of the library.
- `to_disk` methods can now return a config to override the initial config of the pipeline (e.g., to load a transformer directly from the path storing its fine-tuned weights)
- The `eds.tokenizer` tokenizer has been added to entry points, making it accessible from the outside
- Deprecate old connectors (e.g. BratDataConnector) in favor of the new `edsnlp.data` API
diff --git a/contributing.md b/contributing.md
index aba1d1f0d..f4e8a8c23 100644
--- a/contributing.md
+++ b/contributing.md
@@ -4,12 +4,12 @@ We welcome contributions ! There are many ways to help. For example, you can:
1. Help us track bugs by filing issues
2. Suggest and help prioritise new functionalities
-3. Develop a new pipeline ! Fork the project and propose a new functionality through a pull request
+3. Develop a new pipe ! Fork the project and propose a new functionality through a pull request
4. Help us make the library as straightforward as possible, by simply asking questions on whatever does not seem clear to you.
## Development installation
-To be able to run the test suite, run the example notebooks and develop your own pipeline, you should clone the repo and install it locally.
+To be able to run the test suite, run the example notebooks and develop your own pipeline component, you should clone the repo and install it locally.
@@ -80,15 +80,15 @@ python -m pytest
Should your contribution propose a bug fix, we require the bug be thoroughly tested.
-### Architecture of a pipeline
+### Architecture of a pipeline component
-Pipelines should follow the same pattern :
+Pipes should follow the same pattern :
```
-edsnlp/pipelines/
- |-- .py # Defines the component logic
+edsnlp/pipes/
+ |-- .py # Defines the component logic
|-- patterns.py # Defines matched patterns
- |-- factory.py # Declares the pipeline to spaCy
+ |-- factory.py # Declares the component to spaCy
```
### Style Guide
diff --git a/demo/app.py b/demo/app.py
index ff7beb9cf..0f381ae11 100644
--- a/demo/app.py
+++ b/demo/app.py
@@ -48,7 +48,7 @@
nlp.add_pipe("eds.normalizer")
nlp.add_pipe("eds.sentences")
{pipes}
-# Qualifier pipelines
+# Qualifier pipes
nlp.add_pipe("eds.negation")
nlp.add_pipe("eds.family")
nlp.add_pipe("eds.hypothesis")
@@ -109,7 +109,6 @@ def load_model(custom_regex: str, **enabled):
nlp.add_pipe("eds.sentences")
for title, name in PIPES.items():
-
if name == "drugs":
if enabled["drugs"]:
if enabled["fuzzy_drugs"]:
@@ -128,7 +127,7 @@ def load_model(custom_regex: str, **enabled):
pipes.append(f'nlp.add_pipe("eds.{name}")')
if pipes:
- pipes.insert(0, "# Entity extraction pipelines")
+ pipes.insert(0, "# Entity extraction pipes")
if custom_regex:
nlp.add_pipe(
@@ -169,7 +168,7 @@ def load_model(custom_regex: str, **enabled):
"EDS-NLP is a contributive effort maintained by AP-HP's Data Science team. "
"Have a look at the "
"[documentation](https://aphp.github.io/edsnlp/) for "
- "more information on the available pipelines."
+ "more information on the available components."
)
st.sidebar.header("Pipeline")
@@ -201,8 +200,8 @@ def load_model(custom_regex: str, **enabled):
continue
st_pipes[name] = st.sidebar.checkbox(title, value=True)
st.sidebar.markdown(
- "These are just a few of the pipelines provided out-of-the-box by EDS-NLP. "
- "See the [documentation](https://aphp.github.io/edsnlp/latest/pipelines/) "
+ "These are just a few of the components provided out-of-the-box by EDS-NLP. "
+ "See the [documentation](https://aphp.github.io/edsnlp/latest/pipes/) "
"for detail."
)
diff --git a/docs/index.md b/docs/index.md
index 90865a7bb..e0c57bd4e 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -56,7 +56,7 @@ doc.ents[0]._.negation # (6)
1. 'eds' is the name of the language, which defines the [tokenizer](/tokenizers).
2. This example terminology provides a very simple, and by no means exhaustive, list of synonyms for COVID19.
-3. In spaCy, pipelines are added via the [`nlp.add_pipe` method](https://spacy.io/api/language#add_pipe). EDS-NLP pipelines are automatically discovered by spaCy.
+3. Similarly to spaCy, pipes are added via the [`nlp.add_pipe` method](https://spacy.io/api/language#add_pipe).
4. See the [matching tutorial](tutorials/matching-a-terminology.md) for mode details.
5. spaCy stores extracted entities in the [`Doc.ents` attribute](https://spacy.io/api/doc#ents).
6. The `eds.negation` component has adds a `negation` custom attribute.
@@ -71,7 +71,7 @@ To learn more about EDS-NLP, we have prepared a series of tutorials that should
## Available pipeline components
---8<-- "docs/pipelines/index.md:components"
+--8<-- "docs/pipes/index.md:components"
## Disclaimer
diff --git a/docs/pipes/architecture.md b/docs/pipes/architecture.md
index c855d3023..2bad98d6e 100644
--- a/docs/pipes/architecture.md
+++ b/docs/pipes/architecture.md
@@ -1,6 +1,6 @@
# Basic Architecture
-Most pipelines provided by EDS-NLP aim to qualify pre-extracted entities. To wit, the basic usage of the library:
+Most pipes provided by EDS-NLP aim to qualify pre-extracted entities. To wit, the basic usage of the library:
1. Implement a normaliser (see `eds.normalizer`)
2. Add an entity recognition component (eg the simple but powerful `eds.matcher`)
@@ -8,33 +8,33 @@ Most pipelines provided by EDS-NLP aim to qualify pre-extracted entities. To wit
## Scope
-Since the basic usage of EDS-NLP components is to qualify entities, most pipelines can function in two modes:
+Since the basic usage of EDS-NLP components is to qualify entities, most pipes can function in two modes:
1. Annotation of the extracted entities (this is the default). To increase throughput, only pre-extracted entities (found in `doc.ents`) are processed.
2. Full-text, token-wise annotation. This mode is activated by setting the `on_ents_only` parameter to `False`.
-The possibility to do full-text annotation implies that one could use the pipelines the other way around, eg detecting all negations once and for all in an ETL phase, and reusing the results consequently. However, this is not the intended use of the library, which aims to help researchers downstream as a standalone application.
+The possibility to do full-text annotation implies that one could use the pipes the other way around, eg detecting all negations once and for all in an ETL phase, and reusing the results consequently. However, this is not the intended use of the library, which aims to help researchers downstream as a standalone application.
## Result persistence
-Depending on their purpose (entity extraction, qualification, etc), EDS-NLP pipelines write their results to `Doc.ents`, `Doc.spans` or in a custom attribute.
+Depending on their purpose (entity extraction, qualification, etc), EDS-NLP pipes write their results to `Doc.ents`, `Doc.spans` or in a custom attribute.
-### Extraction pipelines
+### Extraction pipes
-Extraction pipelines (matchers, the date detector or NER pipelines, for instance) keep their results to the `Doc.ents` attribute directly.
+Extraction pipes (matchers, the date detector or NER pipes, for instance) keep their results to the `Doc.ents` attribute directly.
Note that spaCy prohibits overlapping entities within the `Doc.ents` attribute. To circumvent this limitation, we [filter spans][edsnlp.utils.filter.filter_spans], and keep all discarded entities within the `discarded` key of the `Doc.spans` attribute.
-Some pipelines write their output to the `Doc.spans` dictionary. We enforce the following doctrine:
+Some pipes write their output to the `Doc.spans` dictionary. We enforce the following doctrine:
- Should the pipe extract entities that are directly informative (typically the output of the `eds.matcher` component), said entities are stashed in the `Doc.ents` attribute.
- On the other hand, should the entity be useful to another pipe, but less so in itself (eg the output of the `eds.sections` or `eds.dates` component), it will be stashed in a specific key within the `Doc.spans` attribute.
### Entity tagging
-Moreover, most pipelines declare [spaCy extensions](https://spacy.io/usage/processing-pipelines#custom-components-attributes), on the `Doc`, `Span` and/or `Token` objects.
+Moreover, most pipes declare [spaCy extensions](https://spacy.io/usage/processing-pipelines#custom-components-attributes), on the `Doc`, `Span` and/or `Token` objects.
-These extensions are especially useful for qualifier pipelines, but can also be used by other pipelines to persist relevant information. For instance, the `eds.dates` pipeline:
+These extensions are especially useful for qualifier pipes, but can also be used by other pipes to persist relevant information. For instance, the `eds.dates` pipeline component:
1. Populates `#!python Doc.spans["dates"]`
2. For each detected item, keeps the normalised date in `#!python Span._.date`
diff --git a/docs/pipes/core/contextual-matcher.md b/docs/pipes/core/contextual-matcher.md
index f55cdda40..9ac5d7970 100644
--- a/docs/pipes/core/contextual-matcher.md
+++ b/docs/pipes/core/contextual-matcher.md
@@ -1,5 +1,5 @@
-# Contextual Matcher {: #edsnlp.pipelines.core.contextual_matcher.factory.create_component }
+# Contextual Matcher {: #edsnlp.pipes.core.contextual_matcher.factory.create_component }
During feature extraction, it may be necessary to search for additional patterns in their neighborhood, namely:
@@ -13,7 +13,7 @@ The ContextualMatcher allows to perform this extraction in a clear and concise w
## The configuration file
-The whole ContextualMatcher pipeline is basically defined as a list of **pattern dictionaries**.
+The whole ContextualMatcher pipeline component is basically defined as a list of **pattern dictionaries**.
Let us see step by step how to build such a list using the example stated just above.
### a. Finding mentions of cancer
@@ -326,10 +326,10 @@ dict(
)
```
-::: edsnlp.pipelines.core.contextual_matcher.factory.create_component
+::: edsnlp.pipes.core.contextual_matcher.factory.create_component
options:
only_parameters: true
## Authors and citation
-The `eds.matcher` pipeline was developed by AP-HP's Data Science team.
+The `eds.matcher` pipeline component was developed by AP-HP's Data Science team.
diff --git a/docs/pipes/core/endlines.md b/docs/pipes/core/endlines.md
index 3845cd0e9..34a582b4c 100644
--- a/docs/pipes/core/endlines.md
+++ b/docs/pipes/core/endlines.md
@@ -1,6 +1,6 @@
-# Endlines {: #edsnlp.pipelines.core.endlines.factory.create_component }
+# Endlines {: #edsnlp.pipes.core.endlines.factory.create_component }
-::: edsnlp.pipelines.core.endlines.factory.create_component
+::: edsnlp.pipes.core.endlines.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/core/matcher.md b/docs/pipes/core/matcher.md
index 984541ec4..baec17a0c 100644
--- a/docs/pipes/core/matcher.md
+++ b/docs/pipes/core/matcher.md
@@ -1,6 +1,6 @@
-# Matcher {: #edsnlp.pipelines.core.matcher.factory.create_component }
+# Matcher {: #edsnlp.pipes.core.matcher.factory.create_component }
-::: edsnlp.pipelines.core.matcher.factory.create_component
+::: edsnlp.pipes.core.matcher.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/core/normalizer.md b/docs/pipes/core/normalizer.md
index 35fe5c989..4ad69060b 100644
--- a/docs/pipes/core/normalizer.md
+++ b/docs/pipes/core/normalizer.md
@@ -1,4 +1,4 @@
-# Normalisation {: #edsnlp.pipelines.core.normalizer.factory.create_component }
+# Normalisation {: #edsnlp.pipes.core.normalizer.factory.create_component }
The normalisation scheme used by EDS-NLP adheres to the non-destructive doctrine. In other words,
@@ -10,8 +10,8 @@ is always true.
To achieve this, the input text is never modified. Instead, our normalisation strategy focuses on two axes:
-1. Only the `NORM` and `tag_` attributes are modified by the `normalizer` pipeline ;
-2. Pipelines (eg the [`pollution`](#pollution) pipeline) can mark tokens as _excluded_ by setting the extension `Token.tag_` to `EXCLUDED` or as _space_ by setting the extension `Token.tag_` to `SPACE`.
+1. Only the `NORM` and `tag_` attributes are modified by the `normalizer` pipeline component ;
+2. Pipes (e.g., [`pollution`](#pollution)) can mark tokens as _excluded_ by setting the extension `Token.tag_` to `EXCLUDED` or as _space_ by setting the extension `Token.tag_` to `SPACE`.
It enables downstream matchers to skip excluded tokens.
The normaliser can act on the input text in five dimensions :
@@ -26,12 +26,12 @@ The normaliser can act on the input text in five dimensions :
We recommend you also **add an end-of-line classifier to remove excess new line characters** (introduced by the PDF layout).
- We provide a `endlines` pipeline, which requires training an unsupervised model.
+ We provide a `endlines` pipeline component, which requires training an unsupervised model.
Refer to [the dedicated page for more information](./endlines.md).
## Usage
-The normalisation is handled by the single `eds.normalizer` pipeline. The following code snippet is complete, and should run as is.
+The normalisation is handled by the single `eds.normalizer` pipeline component. The following code snippet is complete, and should run as is.
```python
import edsnlp
@@ -57,19 +57,19 @@ Moreover, every span exposes a `normalized_variant` extension getter, which comp
## Configuration
-The pipeline can be configured using the following parameters :
+The pipeline component can be configured using the following parameters :
-::: edsnlp.pipelines.core.normalizer.factory.create_component
+::: edsnlp.pipes.core.normalizer.factory.create_component
options:
only_parameters: true
-## Pipelines
+## Pipes
Let's review each subcomponent.
### Lowercase
-The `eds.lowercase` pipeline transforms every token to lowercase. It is not configurable.
+The `eds.lowercase` pipeline component transforms every token to lowercase. It is not configurable.
Consider the following example :
@@ -98,7 +98,7 @@ get_text(doc, attr="NORM", ignore_excluded=False)
### Accents
-The `eds.accents` pipeline removes accents. To avoid edge cases,
+The `eds.accents` pipeline component removes accents. To avoid edge cases,
the component uses a specified list of accentuated characters and their unaccented representation,
making it more predictable than using a library such as `unidecode`.
@@ -189,7 +189,7 @@ doc = nlp("Phrase avec des espaces \n et un retour à la ligne")
### Pollution
-The pollution pipeline uses a set of regular expressions to detect pollutions (irrelevant non-medical text that hinders text processing). Corresponding tokens are marked as excluded (by setting `Token._.excluded` to `True`), enabling the use of the phrase matcher.
+The pollution pipeline component uses a set of regular expressions to detect pollutions (irrelevant non-medical text that hinders text processing). Corresponding tokens are marked as excluded (by setting `Token._.excluded` to `True`), enabling the use of the phrase matcher.
Consider the following example :
@@ -248,7 +248,7 @@ nlp.add_pipe(
|---------------|---------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------|---------------------|
| `information` | Footnote present in a lot of notes, providing information to the patient about the use of its data | "L'AP-HP collecte vos données administratives à des fins ..." | `True` |
| `bars` | Barcodes wrongly parsed as text | "...NBNbWbWbNbWbNBNbNbWbW..." | `True` |
-| `biology` | Parsed biology results table. It often contains disease names that often leads to *false positives* with NER pipelines. | "...¦UI/L ¦20 ¦ ¦ ¦20-70 Polyarthrite rhumatoïde Facteur rhumatoide ¦UI/mL ¦ ¦<10 ¦ ¦ ¦ ¦0-14..." | `False` |
+| `biology` | Parsed biology results table. It often contains disease names that often leads to *false positives* with NER pipes. | "...¦UI/L ¦20 ¦ ¦ ¦20-70 Polyarthrite rhumatoïde Facteur rhumatoide ¦UI/mL ¦ ¦<10 ¦ ¦ ¦ ¦0-14..." | `False` |
| `doctors` | List of doctor names and specialities, often found in left-side note margins. Also source of potential *false positives*. | "... Dr ABC - Diabète/Endocrino ..." | `True` |
| `web` | Webpages URL and email adresses. Also source of potential *false positives*. | "... www.vascularites.fr ..." | `True` |
| `coding` | Subsection containing ICD-10 codes along with their description. Also source of potential *false positives*. | "... (2) E112 + Oeil (2) E113 + Neuro (2) E114 Démence (2) F03 MA (2) F001+G301 DCL G22+G301 Vasc (2) ..." | `False` |
@@ -275,4 +275,4 @@ nlp.add_pipe(
## Authors and citation
-The `eds.normalizer` pipeline was developed by AP-HP's Data Science team.
+The `eds.normalizer` pipeline component was developed by AP-HP's Data Science team.
diff --git a/docs/pipes/core/sentences.md b/docs/pipes/core/sentences.md
index 0d1cfde54..53d0ff149 100644
--- a/docs/pipes/core/sentences.md
+++ b/docs/pipes/core/sentences.md
@@ -1,6 +1,6 @@
-# Sentences {: #edsnlp.pipelines.core.sentences.factory.create_component }
+# Sentences {: #edsnlp.pipes.core.sentences.factory.create_component }
-::: edsnlp.pipelines.core.sentences.factory.create_component
+::: edsnlp.pipes.core.sentences.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/core/terminology.md b/docs/pipes/core/terminology.md
index ea13058cb..46bc5b5a9 100644
--- a/docs/pipes/core/terminology.md
+++ b/docs/pipes/core/terminology.md
@@ -1,6 +1,6 @@
-# Terminology {: #edsnlp.pipelines.core.terminology.factory.create_component }
+# Terminology {: #edsnlp.pipes.core.terminology.factory.create_component }
-::: edsnlp.pipelines.core.terminology.factory.create_component
+::: edsnlp.pipes.core.terminology.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/index.md b/docs/pipes/index.md
index 66a5e2a4e..b6785d03c 100644
--- a/docs/pipes/index.md
+++ b/docs/pipes/index.md
@@ -8,33 +8,33 @@ EDS-NLP provides easy-to-use pipeline components (aka pipes).
=== "Core"
- See the [Core components overview](/pipelines/misc/overview/) for more information.
+ See the [Core components overview](/pipes/misc/overview/) for more information.
- --8<-- "docs/pipelines/core/index.md:components"
+ --8<-- "docs/pipes/core/index.md:components"
=== "Qualifiers"
- See the [Qualifiers overview](/pipelines/qualifiers/overview/) for more information.
+ See the [Qualifiers overview](/pipes/qualifiers/overview/) for more information.
- --8<-- "docs/pipelines/qualifiers/index.md:components"
+ --8<-- "docs/pipes/qualifiers/index.md:components"
=== "Miscellaneous"
- See the [Miscellaneous components overview](/pipelines/misc/overview/) for more information.
+ See the [Miscellaneous components overview](/pipes/misc/overview/) for more information.
- --8<-- "docs/pipelines/misc/index.md:components"
+ --8<-- "docs/pipes/misc/index.md:components"
=== "NER"
- See the [NER overview](/pipelines/ner/overview/) for more information.
+ See the [NER overview](/pipes/ner/overview/) for more information.
- --8<-- "docs/pipelines/ner/index.md:components"
+ --8<-- "docs/pipes/ner/index.md:components"
=== "Trainable"
- See the [Trainable components overview](/pipelines/trainable/overview/) for more information.
+ See the [Trainable components overview](/pipes/trainable/overview/) for more information.
- --8<-- "docs/pipelines/trainable/index.md:components"
+ --8<-- "docs/pipes/trainable/index.md:components"
diff --git a/docs/pipes/misc/consultation-dates.md b/docs/pipes/misc/consultation-dates.md
index b91b0af76..f35edec55 100644
--- a/docs/pipes/misc/consultation-dates.md
+++ b/docs/pipes/misc/consultation-dates.md
@@ -1,6 +1,6 @@
-# Consultation dates {: #edsnlp.pipelines.misc.consultation_dates.factory.create_component }
+# Consultation dates {: #edsnlp.pipes.misc.consultation_dates.factory.create_component }
-::: edsnlp.pipelines.misc.consultation_dates.factory.create_component
+::: edsnlp.pipes.misc.consultation_dates.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/misc/dates.md b/docs/pipes/misc/dates.md
index f5febd440..20258a0b6 100644
--- a/docs/pipes/misc/dates.md
+++ b/docs/pipes/misc/dates.md
@@ -1,6 +1,6 @@
-# Dates {: #edsnlp.pipelines.misc.dates.factory.create_component }
+# Dates {: #edsnlp.pipes.misc.dates.factory.create_component }
-::: edsnlp.pipelines.misc.dates.factory.create_component
+::: edsnlp.pipes.misc.dates.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/misc/measurements.md b/docs/pipes/misc/measurements.md
index a334b4078..135cc7e25 100644
--- a/docs/pipes/misc/measurements.md
+++ b/docs/pipes/misc/measurements.md
@@ -1,6 +1,6 @@
-# Measurements {: #edsnlp.pipelines.misc.measurements.factory.create_component }
+# Measurements {: #edsnlp.pipes.misc.measurements.factory.create_component }
-::: edsnlp.pipelines.misc.measurements.factory.create_component
+::: edsnlp.pipes.misc.measurements.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/misc/reason.md b/docs/pipes/misc/reason.md
index 3d3d0c90e..d6466bfc2 100644
--- a/docs/pipes/misc/reason.md
+++ b/docs/pipes/misc/reason.md
@@ -1,6 +1,6 @@
-# Reasons {: #edsnlp.pipelines.misc.reason.factory.create_component }
+# Reasons {: #edsnlp.pipes.misc.reason.factory.create_component }
-::: edsnlp.pipelines.misc.reason.factory.create_component
+::: edsnlp.pipes.misc.reason.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/misc/sections.md b/docs/pipes/misc/sections.md
index 8e9598a18..8277241bd 100644
--- a/docs/pipes/misc/sections.md
+++ b/docs/pipes/misc/sections.md
@@ -1,6 +1,6 @@
-# Sections {: #edsnlp.pipelines.misc.sections.factory.create_component }
+# Sections {: #edsnlp.pipes.misc.sections.factory.create_component }
-::: edsnlp.pipelines.misc.sections.factory.create_component
+::: edsnlp.pipes.misc.sections.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/misc/tables.md b/docs/pipes/misc/tables.md
index c24c86d55..ee3c7b2cc 100644
--- a/docs/pipes/misc/tables.md
+++ b/docs/pipes/misc/tables.md
@@ -1,6 +1,6 @@
-# Tables {: #edsnlp.pipelines.misc.tables.factory.create_component }
+# Tables {: #edsnlp.pipes.misc.tables.factory.create_component }
-::: edsnlp.pipelines.misc.tables.factory.create_component
+::: edsnlp.pipes.misc.tables.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/ner/adicap.md b/docs/pipes/ner/adicap.md
index 730df6127..dc7df2464 100644
--- a/docs/pipes/ner/adicap.md
+++ b/docs/pipes/ner/adicap.md
@@ -1,6 +1,6 @@
-# Adicap {: #edsnlp.pipelines.ner.adicap.factory.create_component }
+# Adicap {: #edsnlp.pipes.ner.adicap.factory.create_component }
-::: edsnlp.pipelines.ner.adicap.factory.create_component
+::: edsnlp.pipes.ner.adicap.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/ner/behaviors/alcohol.md b/docs/pipes/ner/behaviors/alcohol.md
index a3e0792f4..f8c5772fb 100644
--- a/docs/pipes/ner/behaviors/alcohol.md
+++ b/docs/pipes/ner/behaviors/alcohol.md
@@ -1,6 +1,6 @@
-# Alcohol consumption {: #edsnlp.pipelines.ner.behaviors.alcohol.factory.create_component }
+# Alcohol consumption {: #edsnlp.pipes.ner.behaviors.alcohol.factory.create_component }
-::: edsnlp.pipelines.ner.behaviors.alcohol.factory.create_component
+::: edsnlp.pipes.ner.behaviors.alcohol.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/ner/behaviors/tobacco.md b/docs/pipes/ner/behaviors/tobacco.md
index ca6383cab..294e3a679 100644
--- a/docs/pipes/ner/behaviors/tobacco.md
+++ b/docs/pipes/ner/behaviors/tobacco.md
@@ -1,6 +1,6 @@
-# Tobacco consumption {: #edsnlp.pipelines.ner.behaviors.tobacco.factory.create_component }
+# Tobacco consumption {: #edsnlp.pipes.ner.behaviors.tobacco.factory.create_component }
-::: edsnlp.pipelines.ner.behaviors.tobacco.factory.create_component
+::: edsnlp.pipes.ner.behaviors.tobacco.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/ner/cim10.md b/docs/pipes/ner/cim10.md
index 42312c6e7..53fbdd492 100644
--- a/docs/pipes/ner/cim10.md
+++ b/docs/pipes/ner/cim10.md
@@ -1,6 +1,6 @@
-# CIM10 {: #edsnlp.pipelines.ner.cim10.factory.create_component }
+# CIM10 {: #edsnlp.pipes.ner.cim10.factory.create_component }
-::: edsnlp.pipelines.ner.cim10.factory.create_component
+::: edsnlp.pipes.ner.cim10.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/ner/covid.md b/docs/pipes/ner/covid.md
index 28d37c034..23df13791 100644
--- a/docs/pipes/ner/covid.md
+++ b/docs/pipes/ner/covid.md
@@ -1,6 +1,6 @@
-# COVID {: #edsnlp.pipelines.ner.covid.factory.create_component }
+# COVID {: #edsnlp.pipes.ner.covid.factory.create_component }
-::: edsnlp.pipelines.ner.covid.factory.create_component
+::: edsnlp.pipes.ner.covid.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/ner/disorders/aids.md b/docs/pipes/ner/disorders/aids.md
index 1061cc83b..8dc63966e 100644
--- a/docs/pipes/ner/disorders/aids.md
+++ b/docs/pipes/ner/disorders/aids.md
@@ -1,6 +1,6 @@
-# AIDS {: #edsnlp.pipelines.ner.disorders.aids.factory.create_component }
+# AIDS {: #edsnlp.pipes.ner.disorders.aids.factory.create_component }
-::: edsnlp.pipelines.ner.disorders.aids.factory.create_component
+::: edsnlp.pipes.ner.disorders.aids.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/ner/disorders/cerebrovascular-accident.md b/docs/pipes/ner/disorders/cerebrovascular-accident.md
index d48bc9d8c..163676a78 100644
--- a/docs/pipes/ner/disorders/cerebrovascular-accident.md
+++ b/docs/pipes/ner/disorders/cerebrovascular-accident.md
@@ -1,6 +1,6 @@
-# Cerebrovascular accident {: #edsnlp.pipelines.ner.disorders.cerebrovascular_accident.factory.create_component }
+# Cerebrovascular accident {: #edsnlp.pipes.ner.disorders.cerebrovascular_accident.factory.create_component }
-::: edsnlp.pipelines.ner.disorders.cerebrovascular_accident.factory.create_component
+::: edsnlp.pipes.ner.disorders.cerebrovascular_accident.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/ner/disorders/ckd.md b/docs/pipes/ner/disorders/ckd.md
index e17f92c3e..850455ecc 100644
--- a/docs/pipes/ner/disorders/ckd.md
+++ b/docs/pipes/ner/disorders/ckd.md
@@ -1,6 +1,6 @@
-# CKD {: #edsnlp.pipelines.ner.disorders.ckd.factory.create_component }
+# CKD {: #edsnlp.pipes.ner.disorders.ckd.factory.create_component }
-::: edsnlp.pipelines.ner.disorders.ckd.factory.create_component
+::: edsnlp.pipes.ner.disorders.ckd.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/ner/disorders/congestive-heart-failure.md b/docs/pipes/ner/disorders/congestive-heart-failure.md
index 8651dbeef..a661e9fc9 100644
--- a/docs/pipes/ner/disorders/congestive-heart-failure.md
+++ b/docs/pipes/ner/disorders/congestive-heart-failure.md
@@ -1,6 +1,6 @@
-# Congestive heart failure {: #edsnlp.pipelines.ner.disorders.congestive_heart_failure.factory.create_component }
+# Congestive heart failure {: #edsnlp.pipes.ner.disorders.congestive_heart_failure.factory.create_component }
-::: edsnlp.pipelines.ner.disorders.congestive_heart_failure.factory.create_component
+::: edsnlp.pipes.ner.disorders.congestive_heart_failure.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/ner/disorders/connective-tissue-disease.md b/docs/pipes/ner/disorders/connective-tissue-disease.md
index e9364ee26..8b39e45a0 100644
--- a/docs/pipes/ner/disorders/connective-tissue-disease.md
+++ b/docs/pipes/ner/disorders/connective-tissue-disease.md
@@ -1,6 +1,6 @@
-# Connective tissue disease {: #edsnlp.pipelines.ner.disorders.connective_tissue_disease.factory.create_component }
+# Connective tissue disease {: #edsnlp.pipes.ner.disorders.connective_tissue_disease.factory.create_component }
-::: edsnlp.pipelines.ner.disorders.connective_tissue_disease.factory.create_component
+::: edsnlp.pipes.ner.disorders.connective_tissue_disease.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/ner/disorders/copd.md b/docs/pipes/ner/disorders/copd.md
index f9154630d..d25855fd4 100644
--- a/docs/pipes/ner/disorders/copd.md
+++ b/docs/pipes/ner/disorders/copd.md
@@ -1,6 +1,6 @@
-# COPD {: #edsnlp.pipelines.ner.disorders.copd.factory.create_component }
+# COPD {: #edsnlp.pipes.ner.disorders.copd.factory.create_component }
-::: edsnlp.pipelines.ner.disorders.copd.factory.create_component
+::: edsnlp.pipes.ner.disorders.copd.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/ner/disorders/dementia.md b/docs/pipes/ner/disorders/dementia.md
index 320040a4d..ebb8039d4 100644
--- a/docs/pipes/ner/disorders/dementia.md
+++ b/docs/pipes/ner/disorders/dementia.md
@@ -1,6 +1,6 @@
-# Dementia {: #edsnlp.pipelines.ner.disorders.dementia.factory.create_component }
+# Dementia {: #edsnlp.pipes.ner.disorders.dementia.factory.create_component }
-::: edsnlp.pipelines.ner.disorders.dementia.factory.create_component
+::: edsnlp.pipes.ner.disorders.dementia.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/ner/disorders/diabetes.md b/docs/pipes/ner/disorders/diabetes.md
index 4013e3235..f02c61eb0 100644
--- a/docs/pipes/ner/disorders/diabetes.md
+++ b/docs/pipes/ner/disorders/diabetes.md
@@ -1,6 +1,6 @@
-# Diabetes {: #edsnlp.pipelines.ner.disorders.diabetes.factory.create_component }
+# Diabetes {: #edsnlp.pipes.ner.disorders.diabetes.factory.create_component }
-::: edsnlp.pipelines.ner.disorders.diabetes.factory.create_component
+::: edsnlp.pipes.ner.disorders.diabetes.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/ner/disorders/hemiplegia.md b/docs/pipes/ner/disorders/hemiplegia.md
index 39a3b453b..5722f2577 100644
--- a/docs/pipes/ner/disorders/hemiplegia.md
+++ b/docs/pipes/ner/disorders/hemiplegia.md
@@ -1,6 +1,6 @@
-# Hemiplegia {: #edsnlp.pipelines.ner.disorders.hemiplegia.factory.create_component }
+# Hemiplegia {: #edsnlp.pipes.ner.disorders.hemiplegia.factory.create_component }
-::: edsnlp.pipelines.ner.disorders.hemiplegia.factory.create_component
+::: edsnlp.pipes.ner.disorders.hemiplegia.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/ner/disorders/leukemia.md b/docs/pipes/ner/disorders/leukemia.md
index 07487e6a7..21a2373e8 100644
--- a/docs/pipes/ner/disorders/leukemia.md
+++ b/docs/pipes/ner/disorders/leukemia.md
@@ -1,6 +1,6 @@
-# Leukemia {: #edsnlp.pipelines.ner.disorders.leukemia.factory.create_component }
+# Leukemia {: #edsnlp.pipes.ner.disorders.leukemia.factory.create_component }
-::: edsnlp.pipelines.ner.disorders.leukemia.factory.create_component
+::: edsnlp.pipes.ner.disorders.leukemia.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/ner/disorders/liver-disease.md b/docs/pipes/ner/disorders/liver-disease.md
index 262f8ed5a..872c206da 100644
--- a/docs/pipes/ner/disorders/liver-disease.md
+++ b/docs/pipes/ner/disorders/liver-disease.md
@@ -1,6 +1,6 @@
-# Liver disease {: #edsnlp.pipelines.ner.disorders.liver_disease.factory.create_component }
+# Liver disease {: #edsnlp.pipes.ner.disorders.liver_disease.factory.create_component }
-::: edsnlp.pipelines.ner.disorders.liver_disease.factory.create_component
+::: edsnlp.pipes.ner.disorders.liver_disease.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/ner/disorders/lymphoma.md b/docs/pipes/ner/disorders/lymphoma.md
index 20dea7ba2..ff770fa25 100644
--- a/docs/pipes/ner/disorders/lymphoma.md
+++ b/docs/pipes/ner/disorders/lymphoma.md
@@ -1,6 +1,6 @@
-# Lymphoma {: #edsnlp.pipelines.ner.disorders.lymphoma.factory.create_component }
+# Lymphoma {: #edsnlp.pipes.ner.disorders.lymphoma.factory.create_component }
-::: edsnlp.pipelines.ner.disorders.lymphoma.factory.create_component
+::: edsnlp.pipes.ner.disorders.lymphoma.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/ner/disorders/myocardial-infarction.md b/docs/pipes/ner/disorders/myocardial-infarction.md
index 8b01977ff..eae89a1fa 100644
--- a/docs/pipes/ner/disorders/myocardial-infarction.md
+++ b/docs/pipes/ner/disorders/myocardial-infarction.md
@@ -1,6 +1,6 @@
-# Myocardial infarction {: #edsnlp.pipelines.ner.disorders.myocardial_infarction.factory.create_component }
+# Myocardial infarction {: #edsnlp.pipes.ner.disorders.myocardial_infarction.factory.create_component }
-::: edsnlp.pipelines.ner.disorders.myocardial_infarction.factory.create_component
+::: edsnlp.pipes.ner.disorders.myocardial_infarction.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/ner/disorders/peptic-ulcer-disease.md b/docs/pipes/ner/disorders/peptic-ulcer-disease.md
index bb6089ead..4643ed2ae 100644
--- a/docs/pipes/ner/disorders/peptic-ulcer-disease.md
+++ b/docs/pipes/ner/disorders/peptic-ulcer-disease.md
@@ -1,6 +1,6 @@
-# Peptic ulcer disease {: #edsnlp.pipelines.ner.disorders.peptic_ulcer_disease.factory.create_component }
+# Peptic ulcer disease {: #edsnlp.pipes.ner.disorders.peptic_ulcer_disease.factory.create_component }
-::: edsnlp.pipelines.ner.disorders.peptic_ulcer_disease.factory.create_component
+::: edsnlp.pipes.ner.disorders.peptic_ulcer_disease.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/ner/disorders/peripheral-vascular-disease.md b/docs/pipes/ner/disorders/peripheral-vascular-disease.md
index df5000115..13d9eda06 100644
--- a/docs/pipes/ner/disorders/peripheral-vascular-disease.md
+++ b/docs/pipes/ner/disorders/peripheral-vascular-disease.md
@@ -1,6 +1,6 @@
-# Peripheral vascular disease {: #edsnlp.pipelines.ner.disorders.peripheral_vascular_disease.factory.create_component }
+# Peripheral vascular disease {: #edsnlp.pipes.ner.disorders.peripheral_vascular_disease.factory.create_component }
-::: edsnlp.pipelines.ner.disorders.peripheral_vascular_disease.factory.create_component
+::: edsnlp.pipes.ner.disorders.peripheral_vascular_disease.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/ner/disorders/solid-tumor.md b/docs/pipes/ner/disorders/solid-tumor.md
index e8e036ffb..a67b0472e 100644
--- a/docs/pipes/ner/disorders/solid-tumor.md
+++ b/docs/pipes/ner/disorders/solid-tumor.md
@@ -1,6 +1,6 @@
-# Solid tumor {: #edsnlp.pipelines.ner.disorders.solid_tumor.factory.create_component }
+# Solid tumor {: #edsnlp.pipes.ner.disorders.solid_tumor.factory.create_component }
-::: edsnlp.pipelines.ner.disorders.solid_tumor.factory.create_component
+::: edsnlp.pipes.ner.disorders.solid_tumor.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/ner/drugs.md b/docs/pipes/ner/drugs.md
index 7d1d448c4..6e19c5cc7 100644
--- a/docs/pipes/ner/drugs.md
+++ b/docs/pipes/ner/drugs.md
@@ -1,6 +1,6 @@
-# Drugs {: #edsnlp.pipelines.ner.drugs.factory.create_component }
+# Drugs {: #edsnlp.pipes.ner.drugs.factory.create_component }
-::: edsnlp.pipelines.ner.drugs.factory.create_component
+::: edsnlp.pipes.ner.drugs.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/ner/index.md b/docs/pipes/ner/index.md
index 01cb59140..b242840d0 100644
--- a/docs/pipes/ner/index.md
+++ b/docs/pipes/ner/index.md
@@ -4,13 +4,13 @@ We provide several Named Entity Recognition (NER) components.
Named Entity Recognition is the task of identifying short relevant spans of text, named entities, and classifying them into pre-defined categories.
In the case of clinical documents, these entities can be scores, disorders, behaviors, codes, dates, measurements, etc.
-## Span setters: where are stored extracted entities ? {: #edsnlp.pipelines.base.SpanSetterArg }
+## Span setters: where are stored extracted entities ? {: #edsnlp.pipes.base.SpanSetterArg }
A component assigns entities to a document by adding them to the `doc.ents` or `doc.spans[group]` attributes. `doc.ents` only supports non overlapping
entities, therefore, if two entities overlap, the longest one will be kept. `doc.spans[group]` on the other hand, can contain overlapping entities.
To control where entities are added, you can use the `span_setter` argument in any of these component.
-::: edsnlp.pipelines.base.SpanSetterArg
+::: edsnlp.pipes.base.SpanSetterArg
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/ner/scores/charlson.md b/docs/pipes/ner/scores/charlson.md
index bed0595a8..ac647969e 100644
--- a/docs/pipes/ner/scores/charlson.md
+++ b/docs/pipes/ner/scores/charlson.md
@@ -1,6 +1,6 @@
-# Charlson {: #edsnlp.pipelines.ner.scores.charlson.factory.create_component }
+# Charlson {: #edsnlp.pipes.ner.scores.charlson.factory.create_component }
-::: edsnlp.pipelines.ner.scores.charlson.factory.create_component
+::: edsnlp.pipes.ner.scores.charlson.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/ner/scores/elston-ellis.md b/docs/pipes/ner/scores/elston-ellis.md
index af8c080cf..d24e1adc6 100644
--- a/docs/pipes/ner/scores/elston-ellis.md
+++ b/docs/pipes/ner/scores/elston-ellis.md
@@ -1,6 +1,6 @@
-# Elston-Ellis {: #edsnlp.pipelines.ner.scores.elston_ellis.factory.create_component }
+# Elston-Ellis {: #edsnlp.pipes.ner.scores.elston_ellis.factory.create_component }
-::: edsnlp.pipelines.ner.scores.elston_ellis.factory.create_component
+::: edsnlp.pipes.ner.scores.elston_ellis.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/ner/scores/emergency-ccmu.md b/docs/pipes/ner/scores/emergency-ccmu.md
index 75b4f0707..0c816d204 100644
--- a/docs/pipes/ner/scores/emergency-ccmu.md
+++ b/docs/pipes/ner/scores/emergency-ccmu.md
@@ -1,6 +1,6 @@
-# Emergency CCMU {: #edsnlp.pipelines.ner.scores.emergency.ccmu.factory.create_component }
+# Emergency CCMU {: #edsnlp.pipes.ner.scores.emergency.ccmu.factory.create_component }
-::: edsnlp.pipelines.ner.scores.emergency.ccmu.factory.create_component
+::: edsnlp.pipes.ner.scores.emergency.ccmu.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/ner/scores/emergency-gemsa.md b/docs/pipes/ner/scores/emergency-gemsa.md
index 9597bb35d..739055f1f 100644
--- a/docs/pipes/ner/scores/emergency-gemsa.md
+++ b/docs/pipes/ner/scores/emergency-gemsa.md
@@ -1,6 +1,6 @@
-# Emergency GEMSA {: #edsnlp.pipelines.ner.scores.emergency.gemsa.factory.create_component }
+# Emergency GEMSA {: #edsnlp.pipes.ner.scores.emergency.gemsa.factory.create_component }
-::: edsnlp.pipelines.ner.scores.emergency.gemsa.factory.create_component
+::: edsnlp.pipes.ner.scores.emergency.gemsa.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/ner/scores/emergency-priority.md b/docs/pipes/ner/scores/emergency-priority.md
index 7a0205954..0188c3955 100644
--- a/docs/pipes/ner/scores/emergency-priority.md
+++ b/docs/pipes/ner/scores/emergency-priority.md
@@ -1,6 +1,6 @@
-# Emergency Priority {: #edsnlp.pipelines.ner.scores.emergency.priority.factory.create_component }
+# Emergency Priority {: #edsnlp.pipes.ner.scores.emergency.priority.factory.create_component }
-::: edsnlp.pipelines.ner.scores.emergency.priority.factory.create_component
+::: edsnlp.pipes.ner.scores.emergency.priority.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/ner/scores/sofa.md b/docs/pipes/ner/scores/sofa.md
index a1b5993c6..72b88dcdd 100644
--- a/docs/pipes/ner/scores/sofa.md
+++ b/docs/pipes/ner/scores/sofa.md
@@ -1,6 +1,6 @@
-# SOFA {: #edsnlp.pipelines.ner.scores.sofa.factory.create_component }
+# SOFA {: #edsnlp.pipes.ner.scores.sofa.factory.create_component }
-::: edsnlp.pipelines.ner.scores.sofa.factory.create_component
+::: edsnlp.pipes.ner.scores.sofa.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/ner/tnm.md b/docs/pipes/ner/tnm.md
index 7d0261226..96e0897c4 100644
--- a/docs/pipes/ner/tnm.md
+++ b/docs/pipes/ner/tnm.md
@@ -1,6 +1,6 @@
-# TNM {: #edsnlp.pipelines.ner.tnm.factory.create_component }
+# TNM {: #edsnlp.pipes.ner.tnm.factory.create_component }
-::: edsnlp.pipelines.ner.tnm.factory.create_component
+::: edsnlp.pipes.ner.tnm.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/ner/umls.md b/docs/pipes/ner/umls.md
index ead82c6af..cd6704dc4 100644
--- a/docs/pipes/ner/umls.md
+++ b/docs/pipes/ner/umls.md
@@ -1,6 +1,6 @@
-# UMLS {: #edsnlp.pipelines.ner.umls.factory.create_component }
+# UMLS {: #edsnlp.pipes.ner.umls.factory.create_component }
-::: edsnlp.pipelines.ner.umls.factory.create_component
+::: edsnlp.pipes.ner.umls.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/qualifiers/family.md b/docs/pipes/qualifiers/family.md
index 7b125231c..59e8c372f 100644
--- a/docs/pipes/qualifiers/family.md
+++ b/docs/pipes/qualifiers/family.md
@@ -1,6 +1,6 @@
-# Family Context {: #edsnlp.pipelines.qualifiers.family.factory.create_component }
+# Family Context {: #edsnlp.pipes.qualifiers.family.factory.create_component }
-::: edsnlp.pipelines.qualifiers.family.factory.create_component
+::: edsnlp.pipes.qualifiers.family.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/qualifiers/history.md b/docs/pipes/qualifiers/history.md
index ef755e385..271fa2cae 100644
--- a/docs/pipes/qualifiers/history.md
+++ b/docs/pipes/qualifiers/history.md
@@ -1,6 +1,6 @@
-# Medical History {: #edsnlp.pipelines.qualifiers.history.factory.create_component }
+# Medical History {: #edsnlp.pipes.qualifiers.history.factory.create_component }
-::: edsnlp.pipelines.qualifiers.history.factory.create_component
+::: edsnlp.pipes.qualifiers.history.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/qualifiers/hypothesis.md b/docs/pipes/qualifiers/hypothesis.md
index abe631f43..bbd062a53 100644
--- a/docs/pipes/qualifiers/hypothesis.md
+++ b/docs/pipes/qualifiers/hypothesis.md
@@ -1,6 +1,6 @@
-# Hypothesis {: #edsnlp.pipelines.qualifiers.hypothesis.factory.create_component }
+# Hypothesis {: #edsnlp.pipes.qualifiers.hypothesis.factory.create_component }
-::: edsnlp.pipelines.qualifiers.hypothesis.factory.create_component
+::: edsnlp.pipes.qualifiers.hypothesis.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/qualifiers/index.md b/docs/pipes/qualifiers/index.md
index 292417602..d4901777b 100644
--- a/docs/pipes/qualifiers/index.md
+++ b/docs/pipes/qualifiers/index.md
@@ -46,13 +46,13 @@ There is an obvious problem: none of these examples should lead us to include th
We show an English example just to explain the issue.
EDS-NLP remains a **French-language** medical NLP library.
-To curb this issue, EDS-NLP proposes rule-based pipelines that qualify entities to help the user make an informed decision about which patient should be included in a real-world data cohort.
+To curb this issue, EDS-NLP proposes rule-based pipes that qualify entities to help the user make an informed decision about which patient should be included in a real-world data cohort.
-## Where do we get our spans ? {: #edsnlp.pipelines.base.SpanGetterArg }
+## Where do we get our spans ? {: #edsnlp.pipes.base.SpanGetterArg }
A component get entities from a document by looking up `doc.ents` or `doc.spans[group]`. This behavior is set by the `span_getter` argument in components that support it.
-::: edsnlp.pipelines.base.SpanGetterArg
+::: edsnlp.pipes.base.SpanGetterArg
options:
heading_level: 2
show_bases: false
@@ -61,7 +61,7 @@ A component get entities from a document by looking up `doc.ents` or `doc.spans[
## Under the hood
-Our _qualifier_ pipelines all follow the same basic pattern:
+Our _qualifier_ pipes all follow the same basic pattern:
1. The pipeline extracts cues. We define three (possibly overlapping) kinds :
diff --git a/docs/pipes/qualifiers/negation.md b/docs/pipes/qualifiers/negation.md
index 4d1eb4dff..14673fd5d 100644
--- a/docs/pipes/qualifiers/negation.md
+++ b/docs/pipes/qualifiers/negation.md
@@ -1,6 +1,6 @@
-# Negation {: #edsnlp.pipelines.qualifiers.negation.factory.create_component }
+# Negation {: #edsnlp.pipes.qualifiers.negation.factory.create_component }
-::: edsnlp.pipelines.qualifiers.negation.factory.create_component
+::: edsnlp.pipes.qualifiers.negation.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/qualifiers/reported-speech.md b/docs/pipes/qualifiers/reported-speech.md
index 9d4ebd2cb..eaba83bf4 100644
--- a/docs/pipes/qualifiers/reported-speech.md
+++ b/docs/pipes/qualifiers/reported-speech.md
@@ -1,6 +1,6 @@
-# Reported Speech {: #edsnlp.pipelines.qualifiers.reported_speech.factory.create_component }
+# Reported Speech {: #edsnlp.pipes.qualifiers.reported_speech.factory.create_component }
-::: edsnlp.pipelines.qualifiers.reported_speech.factory.create_component
+::: edsnlp.pipes.qualifiers.reported_speech.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/trainable/embeddings/span_pooler.md b/docs/pipes/trainable/embeddings/span_pooler.md
index fab42f6ae..e1375c808 100644
--- a/docs/pipes/trainable/embeddings/span_pooler.md
+++ b/docs/pipes/trainable/embeddings/span_pooler.md
@@ -1,6 +1,6 @@
-# Span Pooler {: #edsnlp.pipelines.trainable.embeddings.span_pooler.factory.create_component }
+# Span Pooler {: #edsnlp.pipes.trainable.embeddings.span_pooler.factory.create_component }
-::: edsnlp.pipelines.trainable.embeddings.span_pooler.factory.create_component
+::: edsnlp.pipes.trainable.embeddings.span_pooler.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/trainable/embeddings/text_cnn.md b/docs/pipes/trainable/embeddings/text_cnn.md
index c8e513a56..907673165 100644
--- a/docs/pipes/trainable/embeddings/text_cnn.md
+++ b/docs/pipes/trainable/embeddings/text_cnn.md
@@ -1,6 +1,6 @@
-# Text CNN {: #edsnlp.pipelines.trainable.embeddings.text_cnn.factory.create_component }
+# Text CNN {: #edsnlp.pipes.trainable.embeddings.text_cnn.factory.create_component }
-::: edsnlp.pipelines.trainable.embeddings.text_cnn.factory.create_component
+::: edsnlp.pipes.trainable.embeddings.text_cnn.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/trainable/embeddings/transformer.md b/docs/pipes/trainable/embeddings/transformer.md
index 763a64808..ce3dcf6e5 100644
--- a/docs/pipes/trainable/embeddings/transformer.md
+++ b/docs/pipes/trainable/embeddings/transformer.md
@@ -1,6 +1,6 @@
-# Transformer {: #edsnlp.pipelines.trainable.embeddings.transformer.factory.create_component }
+# Transformer {: #edsnlp.pipes.trainable.embeddings.transformer.factory.create_component }
-::: edsnlp.pipelines.trainable.embeddings.transformer.factory.create_component
+::: edsnlp.pipes.trainable.embeddings.transformer.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/trainable/ner.md b/docs/pipes/trainable/ner.md
index ec0c15628..001314198 100644
--- a/docs/pipes/trainable/ner.md
+++ b/docs/pipes/trainable/ner.md
@@ -1,6 +1,6 @@
-# Trainable NER {: #edsnlp.pipelines.trainable.ner_crf.factory.create_component }
+# Trainable NER {: #edsnlp.pipes.trainable.ner_crf.factory.create_component }
-::: edsnlp.pipelines.trainable.ner_crf.factory.create_component
+::: edsnlp.pipes.trainable.ner_crf.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/pipes/trainable/span-qualifier.md b/docs/pipes/trainable/span-qualifier.md
index a3c8a7252..d46a02df1 100644
--- a/docs/pipes/trainable/span-qualifier.md
+++ b/docs/pipes/trainable/span-qualifier.md
@@ -1,6 +1,6 @@
-# Trainable Span Qualifier {: #edsnlp.pipelines.trainable.span_qualifier.factory.create_component }
+# Trainable Span Qualifier {: #edsnlp.pipes.trainable.span_qualifier.factory.create_component }
-::: edsnlp.pipelines.trainable.span_qualifier.factory.create_component
+::: edsnlp.pipes.trainable.span_qualifier.factory.create_component
options:
heading_level: 2
show_bases: false
diff --git a/docs/tutorials/aggregating-results.md b/docs/tutorials/aggregating-results.md
index bc1919687..7c458a03e 100644
--- a/docs/tutorials/aggregating-results.md
+++ b/docs/tutorials/aggregating-results.md
@@ -9,7 +9,7 @@ In some cases, you are not interested in individual extractions, but rather in d
- Set a threshold on the minimal number of entities that should be present in the document to aggregate them.
-## An example for the [disorders][disorders] pipelines
+## An example for the [disorders][disorders] pipes
Below is a simple implementation of this aggregation rule (this can be adapted for other comorbidity components and other qualification methods):
diff --git a/docs/tutorials/detecting-dates.md b/docs/tutorials/detecting-dates.md
index f9d2f93f2..9ea8a8c44 100644
--- a/docs/tutorials/detecting-dates.md
+++ b/docs/tutorials/detecting-dates.md
@@ -102,7 +102,7 @@ you may also give a value for `note_datetime`.
## What next?
-The `eds.dates` pipeline component's role is merely to detect and normalise dates.
+The `eds.dates` pipe component's role is merely to detect and normalise dates.
It is the user's responsibility to use this information in a downstream application.
For instance, you could use this pipeline to date medical entities. Let's do that.
diff --git a/docs/tutorials/endlines.md b/docs/tutorials/endlines.md
index 3d9d93c3d..cafa04cf0 100644
--- a/docs/tutorials/endlines.md
+++ b/docs/tutorials/endlines.md
@@ -25,7 +25,7 @@ Let's train the model using an example corpus of three documents:
```python
import edsnlp
-from edsnlp.pipelines.core.endlines.model import EndLinesModel
+from edsnlp.pipes.core.endlines.model import EndLinesModel
nlp = edsnlp.blank("eds")
@@ -70,7 +70,7 @@ PATH = "/tmp/path_to_model"
endlines.save(PATH)
```
-1. Initialize the [`EndLinesModel`][edsnlp.pipelines.core.endlines.model.EndLinesModel]
+1. Initialize the [`EndLinesModel`][edsnlp.pipes.core.endlines.model.EndLinesModel]
object and then fit (and predict) in the training corpus.
2. The corpus should be an iterable of edsnlp documents.
@@ -102,4 +102,4 @@ list(doc.sents)[0]
## Declared extensions
-It lets downstream matchers skip excluded tokens (see [normalisation](../pipelines/core/normalizer.md)) for more detail.
+It lets downstream matchers skip excluded tokens (see [normalisation](../pipes/core/normalizer.md)) for more detail.
diff --git a/docs/tutorials/matching-a-terminology.md b/docs/tutorials/matching-a-terminology.md
index 7efaf93c9..e7a7f871f 100644
--- a/docs/tutorials/matching-a-terminology.md
+++ b/docs/tutorials/matching-a-terminology.md
@@ -7,15 +7,15 @@ In this tutorial, we will cover :
- Matching a terminology using spaCy's matchers, as well as RegExps
- Matching on a specific attribute
-You should consider reading the [matcher's specific documentation](../pipelines/core/matcher.md) for a description.
+You should consider reading the [matcher's specific documentation](../pipes/core/matcher.md) for a description.
!!! note "Comparison to spaCy's matcher"
- spaCy's `Matcher` and `PhraseMatcher` use a very efficient algorithm that compare a hashed representation token by token. **They are not components** by themselves, but can underpin rule-based pipelines.
+ spaCy's `Matcher` and `PhraseMatcher` use a very efficient algorithm that compare a hashed representation token by token. **They are not components** by themselves, but can underpin rule-based pipes.
EDS-NLP's [`RegexMatcher`][edsnlp.matchers.regex.RegexMatcher] lets the user match entire expressions using regular expressions. To achieve this, the matcher has to get to the text representation, match on it, and get back to spaCy's abstraction.
- The `EDSPhraseMatcher` lets EDS-NLP reuse spaCy's efficient algorithm, while adding the ability to skip pollution tokens (see the [normalisation documentation](../pipelines/core/normalisation.md) for detail)
+ The `EDSPhraseMatcher` lets EDS-NLP reuse spaCy's efficient algorithm, while adding the ability to skip pollution tokens (see the [normalisation documentation](../pipes/core/normalisation.md) for detail)
## A simple use case : finding COVID19
@@ -174,7 +174,7 @@ doc.ents
2. We've added `pneumopathie à covid19` to the list of synonyms detected by the pipeline.
Note that in the synonym we provide, we kept the accentuated `à`, whereas the example
displays an unaccentuated `a`.
-3. The component can be configured. See the [specific documentation](../pipelines/core/normalizer.md) for detail.
+3. The component can be configured. See the [specific documentation](../pipes/core/normalizer.md) for detail.
4. The normalisation lives in the `NORM` attribute
5. We can tell the matcher to ignore excluded tokens (tokens tagged as pollution by the normalisation component).
This is not an obligation.
diff --git a/docs/tutorials/qualifying-entities.md b/docs/tutorials/qualifying-entities.md
index 27e4e2697..df8e6a62c 100644
--- a/docs/tutorials/qualifying-entities.md
+++ b/docs/tutorials/qualifying-entities.md
@@ -34,11 +34,11 @@ None of these expressions should be used to build a cohort: the detected entity
## The solution
-We can use EDS-NLP's qualifier pipelines to achieve that. Let's add specific components to our pipeline to detect these three modalities.
+We can use EDS-NLP's qualifier pipes to achieve that. Let's add specific components to our pipeline to detect these three modalities.
### Adding qualifiers
-Adding qualifier pipelines is straightforward:
+Adding qualifier pipes is straightforward:
```python hl_lines="25-29"
import edsnlp
@@ -68,11 +68,11 @@ nlp.add_pipe(
nlp.add_pipe("eds.sentences") # (1)
nlp.add_pipe("eds.negation") # Negation component
-nlp.add_pipe("eds.hypothesis") # Speculation pipeline
+nlp.add_pipe("eds.hypothesis") # Speculation pipe
nlp.add_pipe("eds.family") # Family context detection
```
-1. Qualifiers pipelines need sentence boundaries to be set (see the [specific documentation](../pipelines/qualifiers/index.md) for detail).
+1. Qualifiers pipes need sentence boundaries to be set (see the [specific documentation](../pipes/qualifiers/index.md) for detail).
This code is complete, and should run as is.
@@ -109,7 +109,7 @@ nlp.add_pipe(
nlp.add_pipe("eds.sentences")
nlp.add_pipe("eds.negation") # Negation component
-nlp.add_pipe("eds.hypothesis") # Speculation pipeline
+nlp.add_pipe("eds.hypothesis") # Speculation pipe
nlp.add_pipe("eds.family") # Family context detection
doc = nlp(text)
@@ -141,6 +141,6 @@ We get the following result:
## Conclusion
-The qualifier pipelines limits the number of false positives by detecting linguistic modulations such as negations or speculations.
-Go to the [full documentation](/pipelines/qualifiers/overview) for a complete presentation of the different pipelines,
+The qualifier pipes limits the number of false positives by detecting linguistic modulations such as negations or speculations.
+Go to the [full documentation](/pipes/qualifiers/overview) for a complete presentation of the different pipes,
their configuration options and validation performance.
diff --git a/docs/tutorials/quick-examples.md b/docs/tutorials/quick-examples.md
index 8ce5c6373..ad60a40a8 100644
--- a/docs/tutorials/quick-examples.md
+++ b/docs/tutorials/quick-examples.md
@@ -2,8 +2,8 @@
If you are
-- Developping a new pipeline
-- Testing various inputs on an existing pipeline
+- Developping a new component
+- Testing various inputs on an existing component
- ...
you might want to quickly apply a pipeline and display the output `doc` in a comprehensible way.
diff --git a/docs/tutorials/reason.md b/docs/tutorials/reason.md
index bf1b65dc7..69b5cda2d 100644
--- a/docs/tutorials/reason.md
+++ b/docs/tutorials/reason.md
@@ -1,6 +1,6 @@
# Detecting Reason of Hospitalisation
-In this tutorial we will use the pipeline `eds.reason` to :
+In this tutorial we will use the pipe `eds.reason` to :
- Identify spans that corresponds to the reason of hospitalisation
- Check if there are named entities overlapping with my span of 'reason of hospitalisation'
@@ -42,7 +42,7 @@ nlp.add_pipe("eds.reason", config=dict(use_sections=True))
doc = nlp(text)
```
-The pipeline `reason` will add a key of spans called `reasons`. We check the first item in this list.
+The pipe `reason` will add a key of spans called `reasons`. We check the first item in this list.
```python
# ↑ Omitted code above ↑
diff --git a/docs/tutorials/spacy101.md b/docs/tutorials/spacy101.md
index 2a10fd7e8..eee466635 100644
--- a/docs/tutorials/spacy101.md
+++ b/docs/tutorials/spacy101.md
@@ -16,7 +16,7 @@ To obtain a doc, run the following code:
```python
import edsnlp # (1)
-# Initialise a pipeline
+# Initialize a pipeline
nlp = edsnlp.blank("eds") # (2)
text = "Michel est un penseur latéral." # (3)
@@ -75,12 +75,12 @@ text = "Le 5 mai 2005, Jimothé a été invité à une fête organisée par Mich
doc = nlp(text)
```
-1. Like the name suggests, this pipeline is declared by EDS-NLP.
+1. Like the name suggests, this pipeline component is declared by EDS-NLP.
`eds.sentences` is a rule-based sentence boundary prediction.
- See [its documentation](/pipelines/core/sentences) for detail.
-2. Like the name suggests, this pipeline is declared by EDS-NLP.
+ See [its documentation](/pipes/core/sentences) for detail.
+2. Like the name suggests, this pipeline component is declared by EDS-NLP.
`eds.dates` is a date extraction and normalisation component.
- See [its documentation](/pipelines/misc/dates) for detail.
+ See [its documentation](/pipes/misc/dates) for detail.
The `doc` object just became more interesting!
diff --git a/docs/utilities/matchers.md b/docs/utilities/matchers.md
index b865f7654..1ef5121e9 100644
--- a/docs/utilities/matchers.md
+++ b/docs/utilities/matchers.md
@@ -6,7 +6,7 @@ We implemented three pattern matchers that are fit to clinical documents:
- the `RegexMatcher`
- the `SimstringMatcher`
-However, note that for most use-cases, you should instead use the `eds.matcher` pipeline that wraps these classes to annotate documents.
+However, note that for most use-cases, you should instead use the `eds.matcher` pipe that wraps these classes to annotate documents.
## EDSPhraseMatcher
diff --git a/edsnlp/__init__.py b/edsnlp/__init__.py
index 803312104..47a5b2f84 100644
--- a/edsnlp/__init__.py
+++ b/edsnlp/__init__.py
@@ -2,15 +2,21 @@
EDS-NLP
"""
+import sys
from pathlib import Path
from spacy import pipeline as _spacy_pipeline # noqa: F401
from . import extensions
from . import patch_spacy
from .core.pipeline import Pipeline, blank, load
from .core.registry import registry
-# from . import language
import edsnlp.data # noqa: F401
+import edsnlp.pipes
__version__ = "0.10.0"
BASE_DIR = Path(__file__).parent
+
+pipelines = edsnlp.pipes
+
+# Deprecated imports
+sys.modules["edsnlp.pipelines"] = edsnlp.pipes
diff --git a/edsnlp/core/torch_component.py b/edsnlp/core/torch_component.py
index e2b126929..afd990e5e 100644
--- a/edsnlp/core/torch_component.py
+++ b/edsnlp/core/torch_component.py
@@ -20,7 +20,7 @@
import torch
from spacy.tokens import Doc
-from edsnlp.pipelines.base import BaseComponent
+from edsnlp.pipes.base import BaseComponent
from edsnlp.utils.collections import batch_compress_dict, batchify, decompress_dict
BatchInput = TypeVar("BatchInput", bound=Dict[str, Any])
diff --git a/edsnlp/pipes/core/contextual_matcher/contextual_matcher.py b/edsnlp/pipes/core/contextual_matcher/contextual_matcher.py
index cd52a366b..116be6b48 100644
--- a/edsnlp/pipes/core/contextual_matcher/contextual_matcher.py
+++ b/edsnlp/pipes/core/contextual_matcher/contextual_matcher.py
@@ -14,7 +14,7 @@
from edsnlp.matchers.phrase import EDSPhraseMatcher
from edsnlp.matchers.regex import RegexMatcher, create_span
from edsnlp.matchers.utils import get_text
-from edsnlp.pipelines.base import BaseNERComponent, SpanSetterArg
+from edsnlp.pipes.base import BaseNERComponent, SpanSetterArg
from edsnlp.utils.collections import flatten_once
from . import models
diff --git a/edsnlp/pipes/core/contextual_matcher/factory.py b/edsnlp/pipes/core/contextual_matcher/factory.py
index cdb0b55af..38badbb6f 100644
--- a/edsnlp/pipes/core/contextual_matcher/factory.py
+++ b/edsnlp/pipes/core/contextual_matcher/factory.py
@@ -1,5 +1,5 @@
from edsnlp.core import registry
-from edsnlp.pipelines.core.contextual_matcher import ContextualMatcher
+from edsnlp.pipes.core.contextual_matcher import ContextualMatcher
DEFAULT_CONFIG = dict(
assign_as_span=False,
diff --git a/edsnlp/pipes/core/endlines/endlines.py b/edsnlp/pipes/core/endlines/endlines.py
index f613056d9..a2fb2edf6 100644
--- a/edsnlp/pipes/core/endlines/endlines.py
+++ b/edsnlp/pipes/core/endlines/endlines.py
@@ -6,7 +6,7 @@
from spacy.tokens import Doc, Span, Token
from edsnlp.core import PipelineProtocol
-from edsnlp.pipelines.core.matcher.matcher import GenericMatcher
+from edsnlp.pipes.core.matcher.matcher import GenericMatcher
from edsnlp.utils.filter import get_spans
from .functional import build_path
@@ -26,7 +26,7 @@ class EndLinesMatcher(GenericMatcher):
--------
```python
import edsnlp
- from edsnlp.pipelines.core.endlines.model import EndLinesModel
+ from edsnlp.pipes.core.endlines.model import EndLinesModel
nlp = edsnlp.blank("eds")
@@ -100,7 +100,7 @@ class EndLinesMatcher(GenericMatcher):
The pipeline also sets the `excluded` custom attribute on newlines that are
classified as spaces. It lets downstream matchers skip excluded tokens
- (see [normalisation](/pipelines/core/normalisation/)) for more detail.
+ (see [normalisation](/pipes/core/normalisation/)) for more detail.
Parameters
----------
diff --git a/edsnlp/pipes/core/matcher/matcher.py b/edsnlp/pipes/core/matcher/matcher.py
index 6a5a12211..a6645bfe3 100644
--- a/edsnlp/pipes/core/matcher/matcher.py
+++ b/edsnlp/pipes/core/matcher/matcher.py
@@ -8,7 +8,7 @@
from edsnlp.matchers.regex import RegexMatcher
from edsnlp.matchers.simstring import SimstringMatcher
from edsnlp.matchers.utils import Patterns
-from edsnlp.pipelines.base import BaseNERComponent, SpanSetterArg
+from edsnlp.pipes.base import BaseNERComponent, SpanSetterArg
class GenericMatcher(BaseNERComponent):
diff --git a/edsnlp/pipes/core/normalizer/accents/accents.py b/edsnlp/pipes/core/normalizer/accents/accents.py
index 59e98ddb9..688880adc 100644
--- a/edsnlp/pipes/core/normalizer/accents/accents.py
+++ b/edsnlp/pipes/core/normalizer/accents/accents.py
@@ -3,7 +3,7 @@
from spacy.tokens import Doc
from edsnlp.core import PipelineProtocol
-from edsnlp.pipelines.base import BaseComponent
+from edsnlp.pipes.base import BaseComponent
from . import patterns
diff --git a/edsnlp/pipes/core/normalizer/pollution/pollution.py b/edsnlp/pipes/core/normalizer/pollution/pollution.py
index 19306dd29..e7a0b61db 100644
--- a/edsnlp/pipes/core/normalizer/pollution/pollution.py
+++ b/edsnlp/pipes/core/normalizer/pollution/pollution.py
@@ -5,7 +5,7 @@
from edsnlp.core import PipelineProtocol
from edsnlp.matchers.regex import RegexMatcher
-from edsnlp.pipelines.base import BaseComponent
+from edsnlp.pipes.base import BaseComponent
from edsnlp.utils.filter import filter_spans
from . import patterns
diff --git a/edsnlp/pipes/core/normalizer/quotes/quotes.py b/edsnlp/pipes/core/normalizer/quotes/quotes.py
index fdbe71624..24b5d6a91 100644
--- a/edsnlp/pipes/core/normalizer/quotes/quotes.py
+++ b/edsnlp/pipes/core/normalizer/quotes/quotes.py
@@ -3,7 +3,7 @@
from spacy.tokens import Doc
from edsnlp.core import PipelineProtocol
-from edsnlp.pipelines.base import BaseComponent
+from edsnlp.pipes.base import BaseComponent
from .patterns import quotes_and_apostrophes
diff --git a/edsnlp/pipes/core/normalizer/spaces/spaces.py b/edsnlp/pipes/core/normalizer/spaces/spaces.py
index 8e3e9bb8e..20737fa7f 100644
--- a/edsnlp/pipes/core/normalizer/spaces/spaces.py
+++ b/edsnlp/pipes/core/normalizer/spaces/spaces.py
@@ -3,7 +3,7 @@
from spacy.tokens import Doc
from edsnlp.core import PipelineProtocol
-from edsnlp.pipelines.base import BaseComponent
+from edsnlp.pipes.base import BaseComponent
class SpacesTagger(BaseComponent):
diff --git a/edsnlp/pipes/core/terminology/terminology.py b/edsnlp/pipes/core/terminology/terminology.py
index 5f696afc5..b1a28a31f 100644
--- a/edsnlp/pipes/core/terminology/terminology.py
+++ b/edsnlp/pipes/core/terminology/terminology.py
@@ -9,7 +9,7 @@
from edsnlp.matchers.regex import RegexMatcher
from edsnlp.matchers.simstring import SimstringMatcher
from edsnlp.matchers.utils import Patterns
-from edsnlp.pipelines.base import BaseNERComponent, SpanSetterArg
+from edsnlp.pipes.base import BaseNERComponent, SpanSetterArg
class TerminologyMatcher(BaseNERComponent):
@@ -18,7 +18,7 @@ class TerminologyMatcher(BaseNERComponent):
pipeline that can match on terms or regular expressions.
The terminology matcher is very similar to the
- [generic matcher][edsnlp.pipelines.core.matcher.factory.create_component],
+ [generic matcher][edsnlp.pipes.core.matcher.factory.create_component],
although the use case differs slightly. The generic matcher is designed to extract
any entity, while the terminology matcher is specifically tailored towards high
volume terminologies.
diff --git a/edsnlp/pipes/misc/consultation_dates/consultation_dates.py b/edsnlp/pipes/misc/consultation_dates/consultation_dates.py
index fbc476992..5df1a7dec 100644
--- a/edsnlp/pipes/misc/consultation_dates/consultation_dates.py
+++ b/edsnlp/pipes/misc/consultation_dates/consultation_dates.py
@@ -4,8 +4,8 @@
from spacy.tokens import Doc, Span
from edsnlp.core import PipelineProtocol
-from edsnlp.pipelines.core.matcher.matcher import GenericMatcher
-from edsnlp.pipelines.misc.dates.factory import DEFAULT_CONFIG, DatesMatcher
+from edsnlp.pipes.core.matcher.matcher import GenericMatcher
+from edsnlp.pipes.misc.dates.factory import DEFAULT_CONFIG, DatesMatcher
from ...base import SpanSetterArg
from . import patterns as consult_regex
diff --git a/edsnlp/pipes/misc/dates/dates.py b/edsnlp/pipes/misc/dates/dates.py
index 37ef92ec2..f9639a884 100644
--- a/edsnlp/pipes/misc/dates/dates.py
+++ b/edsnlp/pipes/misc/dates/dates.py
@@ -10,7 +10,7 @@
from edsnlp.core import PipelineProtocol
from edsnlp.matchers.regex import RegexMatcher
-from edsnlp.pipelines.base import (
+from edsnlp.pipes.base import (
BaseNERComponent,
SpanGetterArg,
SpanSetterArg,
diff --git a/edsnlp/pipes/misc/dates/models.py b/edsnlp/pipes/misc/dates/models.py
index 3de69fdf9..35889e7b2 100644
--- a/edsnlp/pipes/misc/dates/models.py
+++ b/edsnlp/pipes/misc/dates/models.py
@@ -7,7 +7,7 @@
from pydantic import BaseModel, root_validator, validator
from spacy.tokens import Span
-from edsnlp.pipelines.misc.dates.patterns.relative import specific_dict
+from edsnlp.pipes.misc.dates.patterns.relative import specific_dict
class Direction(str, Enum):
diff --git a/edsnlp/pipes/misc/measurements/__init__.py b/edsnlp/pipes/misc/measurements/__init__.py
index c069f41c4..4a01c38ad 100644
--- a/edsnlp/pipes/misc/measurements/__init__.py
+++ b/edsnlp/pipes/misc/measurements/__init__.py
@@ -1,4 +1,4 @@
-from edsnlp.pipelines.misc.measurements.measurements import MeasurementsMatcher
-from edsnlp.pipelines.misc.measurements.patterns import *
+from edsnlp.pipes.misc.measurements.measurements import MeasurementsMatcher
+from edsnlp.pipes.misc.measurements.patterns import *
from . import factory
diff --git a/edsnlp/pipes/misc/measurements/measurements.py b/edsnlp/pipes/misc/measurements/measurements.py
index 6c3d607dd..62a1c7adc 100644
--- a/edsnlp/pipes/misc/measurements/measurements.py
+++ b/edsnlp/pipes/misc/measurements/measurements.py
@@ -14,14 +14,14 @@
from edsnlp.matchers.phrase import EDSPhraseMatcher
from edsnlp.matchers.regex import RegexMatcher
from edsnlp.matchers.utils import get_text
-from edsnlp.pipelines.base import (
+from edsnlp.pipes.base import (
BaseNERComponent,
SpanGetterArg,
SpanSetterArg,
get_spans,
validate_span_getter,
)
-from edsnlp.pipelines.misc.measurements import patterns
+from edsnlp.pipes.misc.measurements import patterns
from edsnlp.utils.filter import align_spans, filter_spans, get_span_group
__all__ = ["MeasurementsMatcher"]
diff --git a/edsnlp/pipes/misc/reason/reason.py b/edsnlp/pipes/misc/reason/reason.py
index b8c0c8e37..74cbb23cd 100644
--- a/edsnlp/pipes/misc/reason/reason.py
+++ b/edsnlp/pipes/misc/reason/reason.py
@@ -4,8 +4,8 @@
from spacy.tokens import Doc, Span
from edsnlp.core import PipelineProtocol
-from edsnlp.pipelines.core.matcher.matcher import GenericMatcher
-from edsnlp.pipelines.misc.reason import patterns
+from edsnlp.pipes.core.matcher.matcher import GenericMatcher
+from edsnlp.pipes.misc.reason import patterns
from edsnlp.utils.filter import get_spans
from edsnlp.utils.inclusion import check_inclusion
diff --git a/edsnlp/pipes/misc/sections/sections.py b/edsnlp/pipes/misc/sections/sections.py
index 9f611e18d..3baf13713 100644
--- a/edsnlp/pipes/misc/sections/sections.py
+++ b/edsnlp/pipes/misc/sections/sections.py
@@ -5,7 +5,7 @@
from spacy.util import filter_spans
from edsnlp.core import PipelineProtocol
-from edsnlp.pipelines.core.matcher.matcher import GenericMatcher
+from edsnlp.pipes.core.matcher.matcher import GenericMatcher
from . import patterns
diff --git a/edsnlp/pipes/misc/tables/factory.py b/edsnlp/pipes/misc/tables/factory.py
index 5e8d23845..47b10d7c2 100644
--- a/edsnlp/pipes/misc/tables/factory.py
+++ b/edsnlp/pipes/misc/tables/factory.py
@@ -1,5 +1,5 @@
from edsnlp.core import registry
-from edsnlp.pipelines.misc.tables import TablesMatcher
+from edsnlp.pipes.misc.tables import TablesMatcher
DEFAULT_CONFIG = dict(
tables_pattern=None,
diff --git a/edsnlp/pipes/misc/tables/tables.py b/edsnlp/pipes/misc/tables/tables.py
index 978bbcd37..7cda178eb 100644
--- a/edsnlp/pipes/misc/tables/tables.py
+++ b/edsnlp/pipes/misc/tables/tables.py
@@ -5,8 +5,8 @@
from spacy.tokens import Doc, Span
from edsnlp.core import PipelineProtocol
-from edsnlp.pipelines.core.matcher.matcher import GenericMatcher
-from edsnlp.pipelines.misc.tables import patterns
+from edsnlp.pipes.core.matcher.matcher import GenericMatcher
+from edsnlp.pipes.misc.tables import patterns
from edsnlp.utils.filter import get_spans
diff --git a/edsnlp/pipes/ner/adicap/adicap.py b/edsnlp/pipes/ner/adicap/adicap.py
index a97ec93cd..7a85664fb 100644
--- a/edsnlp/pipes/ner/adicap/adicap.py
+++ b/edsnlp/pipes/ner/adicap/adicap.py
@@ -5,8 +5,8 @@
from spacy.tokens import Doc, Span
from edsnlp.core import PipelineProtocol
-from edsnlp.pipelines.base import SpanSetterArg
-from edsnlp.pipelines.core.contextual_matcher import ContextualMatcher
+from edsnlp.pipes.base import SpanSetterArg
+from edsnlp.pipes.core.contextual_matcher import ContextualMatcher
from edsnlp.utils.resources import get_adicap_dict
from . import patterns
diff --git a/edsnlp/pipes/ner/behaviors/alcohol/alcohol.py b/edsnlp/pipes/ner/behaviors/alcohol/alcohol.py
index cfb9dbf09..951cbfc57 100644
--- a/edsnlp/pipes/ner/behaviors/alcohol/alcohol.py
+++ b/edsnlp/pipes/ner/behaviors/alcohol/alcohol.py
@@ -17,7 +17,7 @@ class AlcoholMatcher(DisorderMatcher):
??? info "Details of the used patterns"
```{ .python .no-check }
# fmt: off
- --8<-- "edsnlp/pipelines/ner/behaviors/alcohol/patterns.py"
+ --8<-- "edsnlp/pipes/ner/behaviors/alcohol/patterns.py"
# fmt: on
```
diff --git a/edsnlp/pipes/ner/behaviors/tobacco/tobacco.py b/edsnlp/pipes/ner/behaviors/tobacco/tobacco.py
index 052a47d0a..f259d000b 100644
--- a/edsnlp/pipes/ner/behaviors/tobacco/tobacco.py
+++ b/edsnlp/pipes/ner/behaviors/tobacco/tobacco.py
@@ -4,7 +4,7 @@
from spacy.tokens import Doc, Span
from edsnlp.core import PipelineProtocol
-from edsnlp.pipelines.base import SpanSetterArg
+from edsnlp.pipes.base import SpanSetterArg
from edsnlp.utils.numbers import parse_digit
from ...disorders.base import DisorderMatcher
@@ -18,7 +18,7 @@ class TobaccoMatcher(DisorderMatcher):
??? info "Details of the used patterns"
```{ .python .no-check }
# fmt: off
- --8<-- "edsnlp/pipelines/ner/behaviors/tobacco/patterns.py"
+ --8<-- "edsnlp/pipes/ner/behaviors/tobacco/patterns.py"
# fmt: on
```
diff --git a/edsnlp/pipes/ner/cim10/factory.py b/edsnlp/pipes/ner/cim10/factory.py
index 2c0f9286d..7ba67d4c8 100644
--- a/edsnlp/pipes/ner/cim10/factory.py
+++ b/edsnlp/pipes/ner/cim10/factory.py
@@ -3,7 +3,7 @@
from typing_extensions import Literal
from edsnlp.core import PipelineProtocol, registry
-from edsnlp.pipelines.core.terminology.terminology import TerminologyMatcher
+from edsnlp.pipes.core.terminology.terminology import TerminologyMatcher
from ...base import SpanSetterArg
from .patterns import get_patterns
diff --git a/edsnlp/pipes/ner/covid/factory.py b/edsnlp/pipes/ner/covid/factory.py
index a4c091370..8a9d6248b 100644
--- a/edsnlp/pipes/ner/covid/factory.py
+++ b/edsnlp/pipes/ner/covid/factory.py
@@ -1,7 +1,7 @@
from typing import Dict, List, Union
from edsnlp.core import PipelineProtocol, registry
-from edsnlp.pipelines.core.matcher.matcher import GenericMatcher
+from edsnlp.pipes.core.matcher.matcher import GenericMatcher
from ...base import SpanSetterArg
from .patterns import patterns
diff --git a/edsnlp/pipes/ner/disorders/aids/aids.py b/edsnlp/pipes/ner/disorders/aids/aids.py
index 1b0ad155c..e45ecf7f8 100644
--- a/edsnlp/pipes/ner/disorders/aids/aids.py
+++ b/edsnlp/pipes/ner/disorders/aids/aids.py
@@ -3,16 +3,16 @@
from typing import Any, Dict, List, Optional, Union
from edsnlp.core import PipelineProtocol
-from edsnlp.pipelines.base import SpanSetterArg
-from edsnlp.pipelines.ner.disorders.base import DisorderMatcher
-from edsnlp.pipelines.qualifiers.hypothesis import HypothesisQualifier
-from edsnlp.pipelines.qualifiers.hypothesis.factory import (
+from edsnlp.pipes.base import SpanSetterArg
+from edsnlp.pipes.ner.disorders.base import DisorderMatcher
+from edsnlp.pipes.qualifiers.hypothesis import HypothesisQualifier
+from edsnlp.pipes.qualifiers.hypothesis.factory import (
DEFAULT_CONFIG as DEFAULT_CONFIG_HYP,
)
-from edsnlp.pipelines.qualifiers.negation.factory import (
+from edsnlp.pipes.qualifiers.negation.factory import (
DEFAULT_CONFIG as DEFAULT_CONFIG_NEG,
)
-from edsnlp.pipelines.qualifiers.negation.negation import NegationQualifier
+from edsnlp.pipes.qualifiers.negation.negation import NegationQualifier
from .patterns import default_patterns
@@ -27,7 +27,7 @@ class AIDSMatcher(DisorderMatcher):
??? info "Details of the used patterns"
```{ .python .no-check }
# fmt: off
- --8<-- "edsnlp/pipelines/ner/disorders/AIDS/patterns.py"
+ --8<-- "edsnlp/pipes/ner/disorders/AIDS/patterns.py"
# fmt: on
```
diff --git a/edsnlp/pipes/ner/disorders/base.py b/edsnlp/pipes/ner/disorders/base.py
index 5b86f3592..abc5e5524 100644
--- a/edsnlp/pipes/ner/disorders/base.py
+++ b/edsnlp/pipes/ner/disorders/base.py
@@ -4,8 +4,8 @@
from spacy.tokens import Doc, Span
from edsnlp.core import PipelineProtocol
-from edsnlp.pipelines.base import SpanSetterArg
-from edsnlp.pipelines.core.contextual_matcher import ContextualMatcher
+from edsnlp.pipes.base import SpanSetterArg
+from edsnlp.pipes.core.contextual_matcher import ContextualMatcher
from edsnlp.utils.deprecation import deprecated_getter_factory
from edsnlp.utils.filter import filter_spans
diff --git a/edsnlp/pipes/ner/disorders/cerebrovascular_accident/cerebrovascular_accident.py b/edsnlp/pipes/ner/disorders/cerebrovascular_accident/cerebrovascular_accident.py
index 131c94a5a..12c4a9831 100644
--- a/edsnlp/pipes/ner/disorders/cerebrovascular_accident/cerebrovascular_accident.py
+++ b/edsnlp/pipes/ner/disorders/cerebrovascular_accident/cerebrovascular_accident.py
@@ -4,7 +4,7 @@
from spacy.tokens import Doc, Span
from edsnlp.core import PipelineProtocol
-from edsnlp.pipelines.base import SpanSetterArg
+from edsnlp.pipes.base import SpanSetterArg
from ..base import DisorderMatcher
from .patterns import default_patterns
@@ -21,7 +21,7 @@ class CerebrovascularAccidentMatcher(DisorderMatcher):
??? info "Details of the used patterns"
```{ .python .no-check }
# fmt: off
- --8<-- "edsnlp/pipelines/ner/disorders/cerebrovascular_accident/patterns.py"
+ --8<-- "edsnlp/pipes/ner/disorders/cerebrovascular_accident/patterns.py"
# fmt: on
```
diff --git a/edsnlp/pipes/ner/disorders/ckd/ckd.py b/edsnlp/pipes/ner/disorders/ckd/ckd.py
index 867460afc..59b85ae62 100644
--- a/edsnlp/pipes/ner/disorders/ckd/ckd.py
+++ b/edsnlp/pipes/ner/disorders/ckd/ckd.py
@@ -5,8 +5,8 @@
from spacy.tokens import Doc, Span
from edsnlp.core import PipelineProtocol
-from edsnlp.pipelines.base import SpanSetterArg
-from edsnlp.pipelines.ner.disorders.base import DisorderMatcher
+from edsnlp.pipes.base import SpanSetterArg
+from edsnlp.pipes.ner.disorders.base import DisorderMatcher
from .patterns import default_patterns
@@ -29,7 +29,7 @@ class CKDMatcher(DisorderMatcher):
??? info "Details of the used patterns"
```{ .python .no-check }
# fmt: off
- --8<-- "edsnlp/pipelines/ner/disorders/CKD/patterns.py"
+ --8<-- "edsnlp/pipes/ner/disorders/CKD/patterns.py"
# fmt: on
```
diff --git a/edsnlp/pipes/ner/disorders/congestive_heart_failure/congestive_heart_failure.py b/edsnlp/pipes/ner/disorders/congestive_heart_failure/congestive_heart_failure.py
index 61b0b1cf7..bb7b5a455 100644
--- a/edsnlp/pipes/ner/disorders/congestive_heart_failure/congestive_heart_failure.py
+++ b/edsnlp/pipes/ner/disorders/congestive_heart_failure/congestive_heart_failure.py
@@ -2,7 +2,7 @@
from typing import Any, Dict, List, Optional, Union
from edsnlp.core import PipelineProtocol
-from edsnlp.pipelines.base import SpanSetterArg
+from edsnlp.pipes.base import SpanSetterArg
from ..base import DisorderMatcher
from .patterns import default_patterns
@@ -21,7 +21,7 @@ class CongestiveHeartFailureMatcher(DisorderMatcher):
??? info "Details of the used patterns"
```{ .python .no-check }
# fmt: off
- --8<-- "edsnlp/pipelines/ner/disorders/congestive_heart_failure/patterns.py"
+ --8<-- "edsnlp/pipes/ner/disorders/congestive_heart_failure/patterns.py"
# fmt: on
```
diff --git a/edsnlp/pipes/ner/disorders/connective_tissue_disease/connective_tissue_disease.py b/edsnlp/pipes/ner/disorders/connective_tissue_disease/connective_tissue_disease.py
index e090ed3f6..676e5ea98 100644
--- a/edsnlp/pipes/ner/disorders/connective_tissue_disease/connective_tissue_disease.py
+++ b/edsnlp/pipes/ner/disorders/connective_tissue_disease/connective_tissue_disease.py
@@ -4,7 +4,7 @@
from spacy.tokens import Doc, Span
from edsnlp.core import PipelineProtocol
-from edsnlp.pipelines.base import SpanSetterArg
+from edsnlp.pipes.base import SpanSetterArg
from ..base import DisorderMatcher
from .patterns import default_patterns
@@ -18,7 +18,7 @@ class ConnectiveTissueDiseaseMatcher(DisorderMatcher):
??? info "Details of the used patterns"
```{ .python .no-check }
# fmt: off
- --8<-- "edsnlp/pipelines/ner/disorders/connective_tissue_disease/patterns.py"
+ --8<-- "edsnlp/pipes/ner/disorders/connective_tissue_disease/patterns.py"
# fmt: on
```
diff --git a/edsnlp/pipes/ner/disorders/copd/copd.py b/edsnlp/pipes/ner/disorders/copd/copd.py
index 6d0e5c76c..8247869b2 100644
--- a/edsnlp/pipes/ner/disorders/copd/copd.py
+++ b/edsnlp/pipes/ner/disorders/copd/copd.py
@@ -4,7 +4,7 @@
from spacy.tokens import Doc
from edsnlp.core import PipelineProtocol
-from edsnlp.pipelines.base import SpanSetterArg
+from edsnlp.pipes.base import SpanSetterArg
from ..base import DisorderMatcher
from .patterns import default_patterns
@@ -22,7 +22,7 @@ class COPDMatcher(DisorderMatcher):
??? info "Details of the used patterns"
```{ .python .no-check }
# fmt: off
- --8<-- "edsnlp/pipelines/ner/disorders/COPD/patterns.py"
+ --8<-- "edsnlp/pipes/ner/disorders/COPD/patterns.py"
# fmt: on
```
Extensions
diff --git a/edsnlp/pipes/ner/disorders/dementia/dementia.py b/edsnlp/pipes/ner/disorders/dementia/dementia.py
index cd46bbd0a..ba5ffc9c4 100644
--- a/edsnlp/pipes/ner/disorders/dementia/dementia.py
+++ b/edsnlp/pipes/ner/disorders/dementia/dementia.py
@@ -3,7 +3,7 @@
from typing import Any, Dict, List, Optional, Union
from edsnlp.core import PipelineProtocol
-from edsnlp.pipelines.base import SpanSetterArg
+from edsnlp.pipes.base import SpanSetterArg
from ..base import DisorderMatcher
from .patterns import default_patterns
@@ -16,7 +16,7 @@ class DementiaMatcher(DisorderMatcher):
??? info "Details of the used patterns"
```{ .python .no-check }
# fmt: off
- --8<-- "edsnlp/pipelines/ner/disorders/dementia/patterns.py"
+ --8<-- "edsnlp/pipes/ner/disorders/dementia/patterns.py"
# fmt: on
```
diff --git a/edsnlp/pipes/ner/disorders/diabetes/diabetes.py b/edsnlp/pipes/ner/disorders/diabetes/diabetes.py
index 59f219448..2cf1b6312 100644
--- a/edsnlp/pipes/ner/disorders/diabetes/diabetes.py
+++ b/edsnlp/pipes/ner/disorders/diabetes/diabetes.py
@@ -6,8 +6,8 @@
from edsnlp.core import PipelineProtocol
from edsnlp.matchers.regex import RegexMatcher
from edsnlp.matchers.utils import get_text
-from edsnlp.pipelines.base import SpanSetterArg
-from edsnlp.pipelines.core.contextual_matcher.contextual_matcher import (
+from edsnlp.pipes.base import SpanSetterArg
+from edsnlp.pipes.core.contextual_matcher.contextual_matcher import (
get_window,
)
@@ -22,7 +22,7 @@ class DiabetesMatcher(DisorderMatcher):
??? info "Details of the used patterns"
```{ .python .no-check }
# fmt: off
- --8<-- "edsnlp/pipelines/ner/disorders/diabetes/patterns.py"
+ --8<-- "edsnlp/pipes/ner/disorders/diabetes/patterns.py"
# fmt: on
```
diff --git a/edsnlp/pipes/ner/disorders/hemiplegia/hemiplegia.py b/edsnlp/pipes/ner/disorders/hemiplegia/hemiplegia.py
index 1cada4d17..e4d00d22b 100644
--- a/edsnlp/pipes/ner/disorders/hemiplegia/hemiplegia.py
+++ b/edsnlp/pipes/ner/disorders/hemiplegia/hemiplegia.py
@@ -2,7 +2,7 @@
from typing import Any, Dict, List, Optional, Union
from edsnlp.core import PipelineProtocol
-from edsnlp.pipelines.base import SpanSetterArg
+from edsnlp.pipes.base import SpanSetterArg
from ..base import DisorderMatcher
from .patterns import default_patterns
@@ -15,7 +15,7 @@ class HemiplegiaMatcher(DisorderMatcher):
??? info "Details of the used patterns"
```{ .python .no-check }
# fmt: off
- --8<-- "edsnlp/pipelines/ner/disorders/hemiplegia/patterns.py"
+ --8<-- "edsnlp/pipes/ner/disorders/hemiplegia/patterns.py"
# fmt: on
```
diff --git a/edsnlp/pipes/ner/disorders/leukemia/leukemia.py b/edsnlp/pipes/ner/disorders/leukemia/leukemia.py
index 26c8c40ad..75b54d435 100644
--- a/edsnlp/pipes/ner/disorders/leukemia/leukemia.py
+++ b/edsnlp/pipes/ner/disorders/leukemia/leukemia.py
@@ -2,7 +2,7 @@
from typing import Any, Dict, List, Optional, Union
from edsnlp.core import PipelineProtocol
-from edsnlp.pipelines.base import SpanSetterArg
+from edsnlp.pipes.base import SpanSetterArg
from ..base import DisorderMatcher
from .patterns import default_patterns
@@ -15,7 +15,7 @@ class LeukemiaMatcher(DisorderMatcher):
??? info "Details of the used patterns"
```{ .python .no-check }
# fmt: off
- --8<-- "edsnlp/pipelines/ner/disorders/leukemia/patterns.py"
+ --8<-- "edsnlp/pipes/ner/disorders/leukemia/patterns.py"
# fmt: on
```
diff --git a/edsnlp/pipes/ner/disorders/liver_disease/liver_disease.py b/edsnlp/pipes/ner/disorders/liver_disease/liver_disease.py
index 085d22666..011add2f8 100644
--- a/edsnlp/pipes/ner/disorders/liver_disease/liver_disease.py
+++ b/edsnlp/pipes/ner/disorders/liver_disease/liver_disease.py
@@ -4,7 +4,7 @@
from spacy.tokens import Doc, Span
from edsnlp.core import PipelineProtocol
-from edsnlp.pipelines.base import SpanSetterArg
+from edsnlp.pipes.base import SpanSetterArg
from ..base import DisorderMatcher
from .patterns import default_patterns
@@ -17,7 +17,7 @@ class LiverDiseaseMatcher(DisorderMatcher):
??? info "Details of the used patterns"
```{ .python .no-check }
# fmt: off
- --8<-- "edsnlp/pipelines/ner/disorders/liver_disease/patterns.py"
+ --8<-- "edsnlp/pipes/ner/disorders/liver_disease/patterns.py"
# fmt: on
```
diff --git a/edsnlp/pipes/ner/disorders/lymphoma/lymphoma.py b/edsnlp/pipes/ner/disorders/lymphoma/lymphoma.py
index e53b4a9f8..e450ad861 100644
--- a/edsnlp/pipes/ner/disorders/lymphoma/lymphoma.py
+++ b/edsnlp/pipes/ner/disorders/lymphoma/lymphoma.py
@@ -2,8 +2,8 @@
from typing import Any, Dict, List, Optional, Union
from edsnlp.core import PipelineProtocol
-from edsnlp.pipelines.base import SpanSetterArg
-from edsnlp.pipelines.ner.disorders.base import DisorderMatcher
+from edsnlp.pipes.base import SpanSetterArg
+from edsnlp.pipes.ner.disorders.base import DisorderMatcher
from .patterns import default_patterns
@@ -15,7 +15,7 @@ class LymphomaMatcher(DisorderMatcher):
??? info "Details of the used patterns"
```{ .python .no-check }
# fmt: off
- --8<-- "edsnlp/pipelines/ner/disorders/lymphoma/patterns.py"
+ --8<-- "edsnlp/pipes/ner/disorders/lymphoma/patterns.py"
# fmt: on
```
diff --git a/edsnlp/pipes/ner/disorders/myocardial_infarction/myocardial_infarction.py b/edsnlp/pipes/ner/disorders/myocardial_infarction/myocardial_infarction.py
index 4b907b8e2..ee10483ce 100644
--- a/edsnlp/pipes/ner/disorders/myocardial_infarction/myocardial_infarction.py
+++ b/edsnlp/pipes/ner/disorders/myocardial_infarction/myocardial_infarction.py
@@ -4,8 +4,8 @@
from spacy.tokens import Doc, Span
from edsnlp.core import PipelineProtocol
-from edsnlp.pipelines.base import SpanSetterArg
-from edsnlp.pipelines.ner.disorders.base import DisorderMatcher
+from edsnlp.pipes.base import SpanSetterArg
+from edsnlp.pipes.ner.disorders.base import DisorderMatcher
from .patterns import default_patterns
@@ -21,7 +21,7 @@ class MyocardialInfarctionMatcher(DisorderMatcher):
??? info "Details of the used patterns"
```{ .python .no-check }
# fmt: off
- --8<-- "edsnlp/pipelines/ner/disorders/myocardial_infarction/patterns.py"
+ --8<-- "edsnlp/pipes/ner/disorders/myocardial_infarction/patterns.py"
# fmt: on
```
diff --git a/edsnlp/pipes/ner/disorders/peptic_ulcer_disease/peptic_ulcer_disease.py b/edsnlp/pipes/ner/disorders/peptic_ulcer_disease/peptic_ulcer_disease.py
index 3df344e48..cad307f27 100644
--- a/edsnlp/pipes/ner/disorders/peptic_ulcer_disease/peptic_ulcer_disease.py
+++ b/edsnlp/pipes/ner/disorders/peptic_ulcer_disease/peptic_ulcer_disease.py
@@ -5,8 +5,8 @@
from spacy.tokens import Doc, Span
from edsnlp.core import PipelineProtocol
-from edsnlp.pipelines.base import SpanSetterArg
-from edsnlp.pipelines.ner.disorders.base import DisorderMatcher
+from edsnlp.pipes.base import SpanSetterArg
+from edsnlp.pipes.ner.disorders.base import DisorderMatcher
from .patterns import default_patterns
@@ -19,7 +19,7 @@ class PepticUlcerDiseaseMatcher(DisorderMatcher):
??? info "Details of the used patterns"
```{ .python .no-check }
# fmt: off
- --8<-- "edsnlp/pipelines/ner/disorders/peptic_ulcer_disease/patterns.py"
+ --8<-- "edsnlp/pipes/ner/disorders/peptic_ulcer_disease/patterns.py"
# fmt: on
```
diff --git a/edsnlp/pipes/ner/disorders/peripheral_vascular_disease/peripheral_vascular_disease.py b/edsnlp/pipes/ner/disorders/peripheral_vascular_disease/peripheral_vascular_disease.py
index 8d1c61218..02d11e4b7 100644
--- a/edsnlp/pipes/ner/disorders/peripheral_vascular_disease/peripheral_vascular_disease.py
+++ b/edsnlp/pipes/ner/disorders/peripheral_vascular_disease/peripheral_vascular_disease.py
@@ -4,8 +4,8 @@
from spacy.tokens import Doc, Span
from edsnlp.core import PipelineProtocol
-from edsnlp.pipelines.base import SpanSetterArg
-from edsnlp.pipelines.ner.disorders.base import DisorderMatcher
+from edsnlp.pipes.base import SpanSetterArg
+from edsnlp.pipes.ner.disorders.base import DisorderMatcher
from .patterns import default_patterns
@@ -18,7 +18,7 @@ class PeripheralVascularDiseaseMatcher(DisorderMatcher):
??? info "Details of the used patterns"
```{ .python .no-check }
# fmt: off
- --8<-- "edsnlp/pipelines/ner/disorders/peripheral_vascular_disease/patterns.py"
+ --8<-- "edsnlp/pipes/ner/disorders/peripheral_vascular_disease/patterns.py"
# fmt: on
```
diff --git a/edsnlp/pipes/ner/disorders/solid_tumor/solid_tumor.py b/edsnlp/pipes/ner/disorders/solid_tumor/solid_tumor.py
index 6d7e54694..ec95cc092 100644
--- a/edsnlp/pipes/ner/disorders/solid_tumor/solid_tumor.py
+++ b/edsnlp/pipes/ner/disorders/solid_tumor/solid_tumor.py
@@ -4,7 +4,7 @@
from spacy.tokens import Doc, Span
from edsnlp.core import PipelineProtocol
-from edsnlp.pipelines.base import SpanSetterArg
+from edsnlp.pipes.base import SpanSetterArg
from edsnlp.utils.numbers import parse_digit
from ..base import DisorderMatcher
@@ -19,7 +19,7 @@ class SolidTumorMatcher(DisorderMatcher):
??? info "Details of the used patterns"
```{ .python .no-check }
# fmt: off
- --8<-- "edsnlp/pipelines/ner/disorders/solid_tumor/patterns.py"
+ --8<-- "edsnlp/pipes/ner/disorders/solid_tumor/patterns.py"
# fmt: on
```
@@ -113,7 +113,7 @@ def __init__(
self.use_tnm = use_tnm
if use_tnm:
- from edsnlp.pipelines.ner.tnm import TNM
+ from edsnlp.pipes.ner.tnm import TNM
self.tnm = TNM(nlp, pattern=None, attr="TEXT")
diff --git a/edsnlp/pipes/ner/drugs/factory.py b/edsnlp/pipes/ner/drugs/factory.py
index d72a6268a..3109d1d6a 100644
--- a/edsnlp/pipes/ner/drugs/factory.py
+++ b/edsnlp/pipes/ner/drugs/factory.py
@@ -3,8 +3,8 @@
from typing_extensions import Literal
from edsnlp.core import PipelineProtocol, registry
-from edsnlp.pipelines.base import SpanSetterArg
-from edsnlp.pipelines.core.terminology.terminology import TerminologyMatcher
+from edsnlp.pipes.base import SpanSetterArg
+from edsnlp.pipes.core.terminology.terminology import TerminologyMatcher
from .patterns import get_patterns
diff --git a/edsnlp/pipes/ner/scores/__init__.py b/edsnlp/pipes/ner/scores/__init__.py
index 4619c3e5f..13395b410 100644
--- a/edsnlp/pipes/ner/scores/__init__.py
+++ b/edsnlp/pipes/ner/scores/__init__.py
@@ -1,3 +1,3 @@
-from edsnlp.pipelines.ner.scores.base_score import SimpleScoreMatcher
+from edsnlp.pipes.ner.scores.base_score import SimpleScoreMatcher
Score = SimpleScoreMatcher
diff --git a/edsnlp/pipes/ner/scores/base_score.py b/edsnlp/pipes/ner/scores/base_score.py
index 8e425a415..6ddb63f0a 100644
--- a/edsnlp/pipes/ner/scores/base_score.py
+++ b/edsnlp/pipes/ner/scores/base_score.py
@@ -5,8 +5,8 @@
from spacy.tokens import Doc, Span
from edsnlp.core import PipelineProtocol, registry
-from edsnlp.pipelines.base import SpanSetterArg
-from edsnlp.pipelines.core.contextual_matcher import ContextualMatcher
+from edsnlp.pipes.base import SpanSetterArg
+from edsnlp.pipes.core.contextual_matcher import ContextualMatcher
class SimpleScoreMatcher(ContextualMatcher):
diff --git a/edsnlp/pipes/ner/scores/charlson/factory.py b/edsnlp/pipes/ner/scores/charlson/factory.py
index 904b2aa0b..76d3d5bb8 100644
--- a/edsnlp/pipes/ner/scores/charlson/factory.py
+++ b/edsnlp/pipes/ner/scores/charlson/factory.py
@@ -2,9 +2,9 @@
from typing import Any, Callable, List, Optional, Union
from edsnlp.core import PipelineProtocol, registry
-from edsnlp.pipelines.base import SpanSetterArg
-from edsnlp.pipelines.ner.scores.base_score import SimpleScoreMatcher
-from edsnlp.pipelines.ner.scores.charlson import patterns
+from edsnlp.pipes.base import SpanSetterArg
+from edsnlp.pipes.ner.scores.base_score import SimpleScoreMatcher
+from edsnlp.pipes.ner.scores.charlson import patterns
DEFAULT_CONFIG = dict(
regex=patterns.regex,
diff --git a/edsnlp/pipes/ner/scores/elston_ellis/factory.py b/edsnlp/pipes/ner/scores/elston_ellis/factory.py
index b384ffd40..1490775ce 100644
--- a/edsnlp/pipes/ner/scores/elston_ellis/factory.py
+++ b/edsnlp/pipes/ner/scores/elston_ellis/factory.py
@@ -2,8 +2,8 @@
from typing import Any, Callable, List, Optional, Union
from edsnlp.core import PipelineProtocol, registry
-from edsnlp.pipelines.base import SpanSetterArg
-from edsnlp.pipelines.ner.scores.base_score import SimpleScoreMatcher
+from edsnlp.pipes.base import SpanSetterArg
+from edsnlp.pipes.ner.scores.base_score import SimpleScoreMatcher
from .patterns import regex, score_normalization_str, value_extract
diff --git a/edsnlp/pipes/ner/scores/emergency/ccmu/factory.py b/edsnlp/pipes/ner/scores/emergency/ccmu/factory.py
index 93fe8e9d6..f4e6e3967 100644
--- a/edsnlp/pipes/ner/scores/emergency/ccmu/factory.py
+++ b/edsnlp/pipes/ner/scores/emergency/ccmu/factory.py
@@ -2,9 +2,9 @@
from typing import Any, Callable, List, Optional, Union
from edsnlp.core import PipelineProtocol, registry
-from edsnlp.pipelines.base import SpanSetterArg
-from edsnlp.pipelines.ner.scores.base_score import SimpleScoreMatcher
-from edsnlp.pipelines.ner.scores.emergency.ccmu import patterns
+from edsnlp.pipes.base import SpanSetterArg
+from edsnlp.pipes.ner.scores.base_score import SimpleScoreMatcher
+from edsnlp.pipes.ner.scores.emergency.ccmu import patterns
DEFAULT_CONFIG = dict(
regex=patterns.regex,
diff --git a/edsnlp/pipes/ner/scores/emergency/gemsa/factory.py b/edsnlp/pipes/ner/scores/emergency/gemsa/factory.py
index eff348d73..9c936f249 100644
--- a/edsnlp/pipes/ner/scores/emergency/gemsa/factory.py
+++ b/edsnlp/pipes/ner/scores/emergency/gemsa/factory.py
@@ -2,9 +2,9 @@
from typing import Any, Callable, List, Optional, Union
from edsnlp.core import PipelineProtocol, registry
-from edsnlp.pipelines.base import SpanSetterArg
-from edsnlp.pipelines.ner.scores.base_score import SimpleScoreMatcher
-from edsnlp.pipelines.ner.scores.emergency.gemsa import patterns
+from edsnlp.pipes.base import SpanSetterArg
+from edsnlp.pipes.ner.scores.base_score import SimpleScoreMatcher
+from edsnlp.pipes.ner.scores.emergency.gemsa import patterns
DEFAULT_CONFIG = dict(
regex=patterns.regex,
diff --git a/edsnlp/pipes/ner/scores/emergency/priority/factory.py b/edsnlp/pipes/ner/scores/emergency/priority/factory.py
index 11dfaf162..15d468251 100644
--- a/edsnlp/pipes/ner/scores/emergency/priority/factory.py
+++ b/edsnlp/pipes/ner/scores/emergency/priority/factory.py
@@ -2,8 +2,8 @@
from typing import Any, Callable, List, Optional, Union
from edsnlp.core import PipelineProtocol, registry
-from edsnlp.pipelines.base import SpanSetterArg
-from edsnlp.pipelines.ner.scores.base_score import SimpleScoreMatcher
+from edsnlp.pipes.base import SpanSetterArg
+from edsnlp.pipes.ner.scores.base_score import SimpleScoreMatcher
from .patterns import regex, score_normalization_str, value_extract
diff --git a/edsnlp/pipes/ner/scores/factory.py b/edsnlp/pipes/ner/scores/factory.py
index 0f7000f06..d46b936dd 100644
--- a/edsnlp/pipes/ner/scores/factory.py
+++ b/edsnlp/pipes/ner/scores/factory.py
@@ -1,5 +1,5 @@
from edsnlp.core import registry
-from edsnlp.pipelines.ner.scores.base_score import SimpleScoreMatcher
+from edsnlp.pipes.ner.scores.base_score import SimpleScoreMatcher
DEFAULT_CONFIG = dict(
regex=None,
diff --git a/edsnlp/pipes/ner/scores/sofa/factory.py b/edsnlp/pipes/ner/scores/sofa/factory.py
index 16ac21bba..ef6c6b916 100644
--- a/edsnlp/pipes/ner/scores/sofa/factory.py
+++ b/edsnlp/pipes/ner/scores/sofa/factory.py
@@ -2,7 +2,7 @@
from typing import Any, Callable, Dict, List, Optional, Union
from edsnlp.core import PipelineProtocol, registry
-from edsnlp.pipelines.base import SpanSetterArg
+from edsnlp.pipes.base import SpanSetterArg
from .patterns import regex, score_normalization_str, value_extract
from .sofa import SofaMatcher
diff --git a/edsnlp/pipes/ner/scores/sofa/sofa.py b/edsnlp/pipes/ner/scores/sofa/sofa.py
index 6f52e1f98..8bf6d8704 100644
--- a/edsnlp/pipes/ner/scores/sofa/sofa.py
+++ b/edsnlp/pipes/ner/scores/sofa/sofa.py
@@ -2,7 +2,7 @@
from spacy.tokens import Doc, Span
-from edsnlp.pipelines.ner.scores.base_score import SimpleScoreMatcher
+from edsnlp.pipes.ner.scores.base_score import SimpleScoreMatcher
class SofaMatcher(SimpleScoreMatcher):
diff --git a/edsnlp/pipes/ner/tnm/tnm.py b/edsnlp/pipes/ner/tnm/tnm.py
index a0ce172fa..b1e0f9f82 100644
--- a/edsnlp/pipes/ner/tnm/tnm.py
+++ b/edsnlp/pipes/ner/tnm/tnm.py
@@ -6,7 +6,7 @@
from edsnlp.core import PipelineProtocol
from edsnlp.matchers.regex import RegexMatcher
-from edsnlp.pipelines.base import BaseNERComponent, SpanSetterArg
+from edsnlp.pipes.base import BaseNERComponent, SpanSetterArg
from edsnlp.utils.filter import filter_spans
from .model import TNM
diff --git a/edsnlp/pipes/ner/umls/factory.py b/edsnlp/pipes/ner/umls/factory.py
index 10f7469c0..5341ebdd9 100644
--- a/edsnlp/pipes/ner/umls/factory.py
+++ b/edsnlp/pipes/ner/umls/factory.py
@@ -3,7 +3,7 @@
from typing_extensions import Literal
from edsnlp.core import PipelineProtocol, registry
-from edsnlp.pipelines.core.terminology.terminology import TerminologyMatcher
+from edsnlp.pipes.core.terminology.terminology import TerminologyMatcher
from ...base import SpanSetterArg
from .patterns import get_patterns
diff --git a/edsnlp/pipes/qualifiers/base.py b/edsnlp/pipes/qualifiers/base.py
index e2f93cd02..7d669b191 100644
--- a/edsnlp/pipes/qualifiers/base.py
+++ b/edsnlp/pipes/qualifiers/base.py
@@ -7,7 +7,7 @@
from edsnlp.core import PipelineProtocol
from edsnlp.matchers.phrase import EDSPhraseMatcher
from edsnlp.matchers.regex import RegexMatcher
-from edsnlp.pipelines.base import BaseComponent, SpanGetterArg, validate_span_getter
+from edsnlp.pipes.base import BaseComponent, SpanGetterArg, validate_span_getter
def check_normalizer(nlp: PipelineProtocol) -> None:
diff --git a/edsnlp/pipes/qualifiers/family/family.py b/edsnlp/pipes/qualifiers/family/family.py
index 1b60912d0..5e18f0392 100644
--- a/edsnlp/pipes/qualifiers/family/family.py
+++ b/edsnlp/pipes/qualifiers/family/family.py
@@ -4,9 +4,9 @@
from spacy.tokens import Doc, Span, Token
from edsnlp.core import PipelineProtocol
-from edsnlp.pipelines.base import SpanGetterArg, get_spans
-from edsnlp.pipelines.qualifiers.base import RuleBasedQualifier
-from edsnlp.pipelines.terminations import termination as default_termination
+from edsnlp.pipes.base import SpanGetterArg, get_spans
+from edsnlp.pipes.qualifiers.base import RuleBasedQualifier
+from edsnlp.pipes.terminations import termination as default_termination
from edsnlp.utils.filter import consume_spans, filter_spans
from edsnlp.utils.inclusion import check_inclusion
diff --git a/edsnlp/pipes/qualifiers/history/history.py b/edsnlp/pipes/qualifiers/history/history.py
index 64ed9eb13..d5aa71ba8 100644
--- a/edsnlp/pipes/qualifiers/history/history.py
+++ b/edsnlp/pipes/qualifiers/history/history.py
@@ -6,9 +6,9 @@
from spacy.tokens import Doc, Span, Token
from edsnlp.core import PipelineProtocol
-from edsnlp.pipelines.base import SpanGetterArg, get_spans
-from edsnlp.pipelines.qualifiers.base import RuleBasedQualifier
-from edsnlp.pipelines.terminations import termination as default_termination
+from edsnlp.pipes.base import SpanGetterArg, get_spans
+from edsnlp.pipes.qualifiers.base import RuleBasedQualifier
+from edsnlp.pipes.terminations import termination as default_termination
from edsnlp.utils.deprecation import deprecated_getter_factory
from edsnlp.utils.filter import consume_spans, filter_spans
from edsnlp.utils.inclusion import check_inclusion, check_sent_inclusion
diff --git a/edsnlp/pipes/qualifiers/hypothesis/hypothesis.py b/edsnlp/pipes/qualifiers/hypothesis/hypothesis.py
index 5d5d0e33e..3f962ca42 100644
--- a/edsnlp/pipes/qualifiers/hypothesis/hypothesis.py
+++ b/edsnlp/pipes/qualifiers/hypothesis/hypothesis.py
@@ -3,9 +3,9 @@
from spacy.tokens import Doc, Span, Token
from edsnlp.core import PipelineProtocol
-from edsnlp.pipelines.base import SpanGetterArg, get_spans
-from edsnlp.pipelines.qualifiers.base import RuleBasedQualifier
-from edsnlp.pipelines.terminations import termination as default_termination
+from edsnlp.pipes.base import SpanGetterArg, get_spans
+from edsnlp.pipes.qualifiers.base import RuleBasedQualifier
+from edsnlp.pipes.terminations import termination as default_termination
from edsnlp.utils.filter import consume_spans, filter_spans
from edsnlp.utils.inclusion import check_inclusion
from edsnlp.utils.resources import get_verbs
diff --git a/edsnlp/pipes/qualifiers/negation/negation.py b/edsnlp/pipes/qualifiers/negation/negation.py
index 79972f077..eb8fe1aca 100644
--- a/edsnlp/pipes/qualifiers/negation/negation.py
+++ b/edsnlp/pipes/qualifiers/negation/negation.py
@@ -3,8 +3,8 @@
from spacy.tokens import Doc, Span, Token
from edsnlp.core import PipelineProtocol
-from edsnlp.pipelines.qualifiers.base import RuleBasedQualifier
-from edsnlp.pipelines.terminations import termination as default_termination
+from edsnlp.pipes.qualifiers.base import RuleBasedQualifier
+from edsnlp.pipes.terminations import termination as default_termination
from edsnlp.utils.deprecation import deprecated_getter_factory
from edsnlp.utils.filter import consume_spans, filter_spans
from edsnlp.utils.inclusion import check_inclusion
diff --git a/edsnlp/pipes/qualifiers/reported_speech/reported_speech.py b/edsnlp/pipes/qualifiers/reported_speech/reported_speech.py
index 6a521ec6a..985e1e8c0 100644
--- a/edsnlp/pipes/qualifiers/reported_speech/reported_speech.py
+++ b/edsnlp/pipes/qualifiers/reported_speech/reported_speech.py
@@ -4,7 +4,7 @@
from edsnlp.core import PipelineProtocol
from edsnlp.matchers.regex import RegexMatcher
-from edsnlp.pipelines.qualifiers.base import RuleBasedQualifier
+from edsnlp.pipes.qualifiers.base import RuleBasedQualifier
from edsnlp.utils.filter import consume_spans, filter_spans
from edsnlp.utils.inclusion import check_inclusion
from edsnlp.utils.resources import get_verbs
diff --git a/edsnlp/pipes/trainable/embeddings/span_pooler/span_pooler.py b/edsnlp/pipes/trainable/embeddings/span_pooler/span_pooler.py
index 3b7705caa..24459f646 100644
--- a/edsnlp/pipes/trainable/embeddings/span_pooler/span_pooler.py
+++ b/edsnlp/pipes/trainable/embeddings/span_pooler/span_pooler.py
@@ -13,8 +13,8 @@
from edsnlp.core import PipelineProtocol
from edsnlp.core.torch_component import BatchInput, BatchOutput
-from edsnlp.pipelines.base import BaseComponent
-from edsnlp.pipelines.trainable.embeddings.typing import (
+from edsnlp.pipes.base import BaseComponent
+from edsnlp.pipes.trainable.embeddings.typing import (
SpanEmbeddingComponent,
WordEmbeddingComponent,
)
diff --git a/edsnlp/pipes/trainable/embeddings/text_cnn/text_cnn.py b/edsnlp/pipes/trainable/embeddings/text_cnn/text_cnn.py
index d175bc0c5..13aa677c3 100644
--- a/edsnlp/pipes/trainable/embeddings/text_cnn/text_cnn.py
+++ b/edsnlp/pipes/trainable/embeddings/text_cnn/text_cnn.py
@@ -4,11 +4,11 @@
from typing_extensions import TypedDict
from edsnlp.core.torch_component import BatchInput
-from edsnlp.pipelines.trainable.embeddings.typing import (
+from edsnlp.pipes.trainable.embeddings.typing import (
WordEmbeddingBatchOutput,
WordEmbeddingComponent,
)
-from edsnlp.pipelines.trainable.layers.text_cnn import NormalizationPlacement, TextCnn
+from edsnlp.pipes.trainable.layers.text_cnn import NormalizationPlacement, TextCnn
from edsnlp.utils.torch import ActivationFunction
TextCnnBatchInput = TypedDict(
diff --git a/edsnlp/pipes/trainable/embeddings/transformer/transformer.py b/edsnlp/pipes/trainable/embeddings/transformer/transformer.py
index 4270ba0c6..bac4f7aac 100644
--- a/edsnlp/pipes/trainable/embeddings/transformer/transformer.py
+++ b/edsnlp/pipes/trainable/embeddings/transformer/transformer.py
@@ -11,7 +11,7 @@
from typing_extensions import TypedDict
from edsnlp import Pipeline
-from edsnlp.pipelines.trainable.embeddings.typing import WordEmbeddingComponent
+from edsnlp.pipes.trainable.embeddings.typing import WordEmbeddingComponent
from edsnlp.utils.span_getters import SpanGetterArg, get_spans
TransformerBatchInput = TypedDict(
diff --git a/edsnlp/pipes/trainable/ner_crf/ner_crf.py b/edsnlp/pipes/trainable/ner_crf/ner_crf.py
index 0b6c3dc49..c4f881741 100644
--- a/edsnlp/pipes/trainable/ner_crf/ner_crf.py
+++ b/edsnlp/pipes/trainable/ner_crf/ner_crf.py
@@ -11,12 +11,12 @@
from edsnlp import Pipeline
from edsnlp.core.torch_component import TorchComponent
-from edsnlp.pipelines.base import BaseNERComponent
-from edsnlp.pipelines.trainable.embeddings.typing import (
+from edsnlp.pipes.base import BaseNERComponent
+from edsnlp.pipes.trainable.embeddings.typing import (
BatchInput,
WordEmbeddingComponent,
)
-from edsnlp.pipelines.trainable.layers.crf import MultiLabelBIOULDecoder
+from edsnlp.pipes.trainable.layers.crf import MultiLabelBIOULDecoder
from edsnlp.utils.filter import align_spans, filter_spans
from edsnlp.utils.span_getters import (
SpanGetterArg,
diff --git a/edsnlp/pipes/trainable/span_qualifier/span_qualifier.py b/edsnlp/pipes/trainable/span_qualifier/span_qualifier.py
index ab6ae43ec..62c973a2a 100644
--- a/edsnlp/pipes/trainable/span_qualifier/span_qualifier.py
+++ b/edsnlp/pipes/trainable/span_qualifier/span_qualifier.py
@@ -22,8 +22,8 @@
from edsnlp.core import PipelineProtocol
from edsnlp.core.torch_component import BatchInput, BatchOutput, TorchComponent
-from edsnlp.pipelines.base import BaseComponent
-from edsnlp.pipelines.trainable.embeddings.typing import (
+from edsnlp.pipes.base import BaseComponent
+from edsnlp.pipes.trainable.embeddings.typing import (
SpanEmbeddingComponent,
)
from edsnlp.utils.bindings import (
diff --git a/edsnlp/train.py b/edsnlp/train.py
index 1a66f9a87..c17e6f02f 100644
--- a/edsnlp/train.py
+++ b/edsnlp/train.py
@@ -33,7 +33,7 @@
from edsnlp.core.pipeline import Pipeline
from edsnlp.core.registry import registry
from edsnlp.optimization import LinearSchedule, ScheduledOptimizer
-from edsnlp.pipelines.trainable.embeddings.transformer.transformer import Transformer
+from edsnlp.pipes.trainable.embeddings.transformer.transformer import Transformer
from edsnlp.scorers import Scorer
from edsnlp.utils.bindings import BINDING_SETTERS
from edsnlp.utils.collections import batchify
diff --git a/edsnlp/viz/quick_examples.py b/edsnlp/viz/quick_examples.py
index 39f2da649..af9ac2c8a 100644
--- a/edsnlp/viz/quick_examples.py
+++ b/edsnlp/viz/quick_examples.py
@@ -8,7 +8,7 @@
from edsnlp.core import PipelineProtocol
from edsnlp.matchers.utils import get_text
-from edsnlp.pipelines.qualifiers.base import get_qualifier_extensions
+from edsnlp.pipes.qualifiers.base import get_qualifier_extensions
from edsnlp.utils.extensions import rgetattr
@@ -47,7 +47,6 @@ def __call__(
return self.display(as_dataframe=as_dataframe)
def get_ents(self):
-
all_spans = {k: list(s) for k, s in self.doc.spans.items() if s}
all_spans["ents"] = list(self.doc.ents)
diff --git a/mkdocs.yml b/mkdocs.yml
index 588f869a8..a33843dea 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -52,76 +52,76 @@ nav:
- tutorials/make-a-training-script.md
- tutorials/quick-examples.md
- Pipes:
- - Overview: pipelines/index.md
+ - Overview: pipes/index.md
- Core Pipelines:
- - pipelines/core/index.md
- - pipelines/core/normalizer.md
- - pipelines/core/sentences.md
- - pipelines/core/matcher.md
- - pipelines/core/terminology.md
- - pipelines/core/contextual-matcher.md
- - pipelines/core/endlines.md
+ - pipes/core/index.md
+ - pipes/core/normalizer.md
+ - pipes/core/sentences.md
+ - pipes/core/matcher.md
+ - pipes/core/terminology.md
+ - pipes/core/contextual-matcher.md
+ - pipes/core/endlines.md
- Qualifiers:
- - pipelines/qualifiers/index.md
- - pipelines/qualifiers/negation.md
- - pipelines/qualifiers/family.md
- - pipelines/qualifiers/hypothesis.md
- - pipelines/qualifiers/reported-speech.md
- - pipelines/qualifiers/history.md
+ - pipes/qualifiers/index.md
+ - pipes/qualifiers/negation.md
+ - pipes/qualifiers/family.md
+ - pipes/qualifiers/hypothesis.md
+ - pipes/qualifiers/reported-speech.md
+ - pipes/qualifiers/history.md
- Miscellaneous:
- - pipelines/misc/index.md
- - pipelines/misc/dates.md
- - pipelines/misc/measurements.md
- - pipelines/misc/consultation-dates.md
- - pipelines/misc/sections.md
- - pipelines/misc/reason.md
- - pipelines/misc/tables.md
+ - pipes/misc/index.md
+ - pipes/misc/dates.md
+ - pipes/misc/measurements.md
+ - pipes/misc/consultation-dates.md
+ - pipes/misc/sections.md
+ - pipes/misc/reason.md
+ - pipes/misc/tables.md
- Named Entity Recognition:
- - Overview: pipelines/ner/index.md
+ - Overview: pipes/ner/index.md
- Scores:
- - pipelines/ner/scores/index.md
- - pipelines/ner/scores/charlson.md
- - pipelines/ner/scores/emergency-ccmu.md
- - pipelines/ner/scores/emergency-gemsa.md
- - pipelines/ner/scores/emergency-priority.md
- - pipelines/ner/scores/sofa.md
- - pipelines/ner/scores/elston-ellis.md
+ - pipes/ner/scores/index.md
+ - pipes/ner/scores/charlson.md
+ - pipes/ner/scores/emergency-ccmu.md
+ - pipes/ner/scores/emergency-gemsa.md
+ - pipes/ner/scores/emergency-priority.md
+ - pipes/ner/scores/sofa.md
+ - pipes/ner/scores/elston-ellis.md
- Disorders:
- - pipelines/ner/disorders/index.md
- - pipelines/ner/disorders/aids.md
- - pipelines/ner/disorders/ckd.md
- - pipelines/ner/disorders/copd.md
- - pipelines/ner/disorders/cerebrovascular-accident.md
- - pipelines/ner/disorders/congestive-heart-failure.md
- - pipelines/ner/disorders/connective-tissue-disease.md
- - pipelines/ner/disorders/dementia.md
- - pipelines/ner/disorders/diabetes.md
- - pipelines/ner/disorders/hemiplegia.md
- - pipelines/ner/disorders/leukemia.md
- - pipelines/ner/disorders/liver-disease.md
- - pipelines/ner/disorders/lymphoma.md
- - pipelines/ner/disorders/myocardial-infarction.md
- - pipelines/ner/disorders/peptic-ulcer-disease.md
- - pipelines/ner/disorders/peripheral-vascular-disease.md
- - pipelines/ner/disorders/solid-tumor.md
- - pipelines/ner/covid.md
+ - pipes/ner/disorders/index.md
+ - pipes/ner/disorders/aids.md
+ - pipes/ner/disorders/ckd.md
+ - pipes/ner/disorders/copd.md
+ - pipes/ner/disorders/cerebrovascular-accident.md
+ - pipes/ner/disorders/congestive-heart-failure.md
+ - pipes/ner/disorders/connective-tissue-disease.md
+ - pipes/ner/disorders/dementia.md
+ - pipes/ner/disorders/diabetes.md
+ - pipes/ner/disorders/hemiplegia.md
+ - pipes/ner/disorders/leukemia.md
+ - pipes/ner/disorders/liver-disease.md
+ - pipes/ner/disorders/lymphoma.md
+ - pipes/ner/disorders/myocardial-infarction.md
+ - pipes/ner/disorders/peptic-ulcer-disease.md
+ - pipes/ner/disorders/peripheral-vascular-disease.md
+ - pipes/ner/disorders/solid-tumor.md
+ - pipes/ner/covid.md
- Behaviors:
- - pipelines/ner/behaviors/index.md
- - pipelines/ner/behaviors/alcohol.md
- - pipelines/ner/behaviors/tobacco.md
- - pipelines/ner/adicap.md
- - pipelines/ner/tnm.md
- - pipelines/ner/umls.md
- - pipelines/ner/cim10.md
- - pipelines/ner/drugs.md
+ - pipes/ner/behaviors/index.md
+ - pipes/ner/behaviors/alcohol.md
+ - pipes/ner/behaviors/tobacco.md
+ - pipes/ner/adicap.md
+ - pipes/ner/tnm.md
+ - pipes/ner/umls.md
+ - pipes/ner/cim10.md
+ - pipes/ner/drugs.md
- Trainable components:
- - pipelines/trainable/index.md
- - pipelines/trainable/embeddings/transformer.md
- - pipelines/trainable/embeddings/text_cnn.md
- - pipelines/trainable/embeddings/span_pooler.md
- - pipelines/trainable/ner.md
- - pipelines/trainable/span-qualifier.md
+ - pipes/trainable/index.md
+ - pipes/trainable/embeddings/transformer.md
+ - pipes/trainable/embeddings/text_cnn.md
+ - pipes/trainable/embeddings/span_pooler.md
+ - pipes/trainable/ner.md
+ - pipes/trainable/span-qualifier.md
- tokenizers.md
- Data Connectors:
- data/index.md
diff --git a/notebooks/dates/user-guide.md b/notebooks/dates/user-guide.md
index 052dbecfb..03fe55ed1 100644
--- a/notebooks/dates/user-guide.md
+++ b/notebooks/dates/user-guide.md
@@ -18,7 +18,7 @@ import context
```
```python
-from edsnlp.pipelines.misc.dates import Dates, terms
+from edsnlp.pipes.misc.dates import Dates, terms
```
```python
diff --git a/notebooks/endlines/endlines-example.md b/notebooks/endlines/endlines-example.md
index d8a1236ad..0416170fb 100644
--- a/notebooks/endlines/endlines-example.md
+++ b/notebooks/endlines/endlines-example.md
@@ -21,7 +21,7 @@ import spacy
```
```python
-from edsnlp.pipelines.endlines.endlinesmodel import EndLinesModel
+from edsnlp.pipes.endlines.endlinesmodel import EndLinesModel
```
```python
diff --git a/notebooks/sentences/sentences.md b/notebooks/sentences/sentences.md
index 8a7c775a4..622870631 100644
--- a/notebooks/sentences/sentences.md
+++ b/notebooks/sentences/sentences.md
@@ -28,7 +28,7 @@ import spacy
```
```python
-from edsnlp.pipelines.sentences import SentenceSegmenter
+from edsnlp.pipes.sentences import SentenceSegmenter
```
# Sentences
diff --git a/pyproject.toml b/pyproject.toml
index bfe095557..cf0189dbd 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -106,117 +106,117 @@ where = ["."]
[project.entry-points."spacy_factories"]
# Core
-"eds.accents" = "edsnlp.pipelines.core.normalizer.accents.factory:create_component"
-"eds.contextual_matcher" = "edsnlp.pipelines.core.contextual_matcher.factory:create_component"
-"eds.endlines" = "edsnlp.pipelines.core.endlines.factory:create_component"
-"eds.matcher" = "edsnlp.pipelines.core.matcher.factory:create_component"
-"eds.normalizer" = "edsnlp.pipelines.core.normalizer.factory:create_component"
-"eds.pollution" = "edsnlp.pipelines.core.normalizer.pollution.factory:create_component"
-"eds.quotes" = "edsnlp.pipelines.core.normalizer.quotes.factory:create_component"
-"eds.remove_lowercase" = "edsnlp.pipelines.core.normalizer.remove_lowercase.factory:create_component"
-"eds.sentences" = "edsnlp.pipelines.core.sentences.factory:create_component"
-"eds.spaces" = "edsnlp.pipelines.core.normalizer.spaces.factory:create_component"
-"eds.terminology" = "edsnlp.pipelines.core.terminology.factory:create_component"
+"eds.accents" = "edsnlp.pipes.core.normalizer.accents.factory:create_component"
+"eds.contextual_matcher" = "edsnlp.pipes.core.contextual_matcher.factory:create_component"
+"eds.endlines" = "edsnlp.pipes.core.endlines.factory:create_component"
+"eds.matcher" = "edsnlp.pipes.core.matcher.factory:create_component"
+"eds.normalizer" = "edsnlp.pipes.core.normalizer.factory:create_component"
+"eds.pollution" = "edsnlp.pipes.core.normalizer.pollution.factory:create_component"
+"eds.quotes" = "edsnlp.pipes.core.normalizer.quotes.factory:create_component"
+"eds.remove_lowercase" = "edsnlp.pipes.core.normalizer.remove_lowercase.factory:create_component"
+"eds.sentences" = "edsnlp.pipes.core.sentences.factory:create_component"
+"eds.spaces" = "edsnlp.pipes.core.normalizer.spaces.factory:create_component"
+"eds.terminology" = "edsnlp.pipes.core.terminology.factory:create_component"
# NER
-"eds.adicap" = "edsnlp.pipelines.ner.adicap.factory:create_component"
-"eds.emergency_ccmu" = "edsnlp.pipelines.ner.scores.emergency.ccmu.factory:create_component"
-"eds.charlson" = "edsnlp.pipelines.ner.scores.charlson.factory:create_component"
-"eds.cim10" = "edsnlp.pipelines.ner.cim10.factory:create_component"
-"eds.covid" = "edsnlp.pipelines.ner.covid.factory:create_component"
-"eds.drugs" = "edsnlp.pipelines.ner.drugs.factory:create_component"
-"eds.elston_ellis" = "edsnlp.pipelines.ner.scores.elston_ellis.factory:create_component"
-"eds.emergency_gemsa" = "edsnlp.pipelines.ner.scores.emergency.gemsa.factory:create_component"
-"eds.emergency_priority" = "edsnlp.pipelines.ner.scores.emergency.priority.factory:create_component"
-"eds.score" = "edsnlp.pipelines.ner.scores.factory:create_component"
-"eds.sofa" = "edsnlp.pipelines.ner.scores.sofa.factory:create_component"
-"eds.tnm" = "edsnlp.pipelines.ner.tnm.factory:create_component"
-"eds.umls" = "edsnlp.pipelines.ner.umls.factory:create_component"
+"eds.adicap" = "edsnlp.pipes.ner.adicap.factory:create_component"
+"eds.emergency_ccmu" = "edsnlp.pipes.ner.scores.emergency.ccmu.factory:create_component"
+"eds.charlson" = "edsnlp.pipes.ner.scores.charlson.factory:create_component"
+"eds.cim10" = "edsnlp.pipes.ner.cim10.factory:create_component"
+"eds.covid" = "edsnlp.pipes.ner.covid.factory:create_component"
+"eds.drugs" = "edsnlp.pipes.ner.drugs.factory:create_component"
+"eds.elston_ellis" = "edsnlp.pipes.ner.scores.elston_ellis.factory:create_component"
+"eds.emergency_gemsa" = "edsnlp.pipes.ner.scores.emergency.gemsa.factory:create_component"
+"eds.emergency_priority" = "edsnlp.pipes.ner.scores.emergency.priority.factory:create_component"
+"eds.score" = "edsnlp.pipes.ner.scores.factory:create_component"
+"eds.sofa" = "edsnlp.pipes.ner.scores.sofa.factory:create_component"
+"eds.tnm" = "edsnlp.pipes.ner.tnm.factory:create_component"
+"eds.umls" = "edsnlp.pipes.ner.umls.factory:create_component"
# NER/Comorbidities
-"eds.aids" = "edsnlp.pipelines.ner.disorders.aids.factory:create_component"
-"eds.alcohol" = "edsnlp.pipelines.ner.behaviors.alcohol.factory:create_component"
-"eds.cerebrovascular_accident" = "edsnlp.pipelines.ner.disorders.cerebrovascular_accident.factory:create_component"
-"eds.ckd" = "edsnlp.pipelines.ner.disorders.ckd.factory:create_component"
-"eds.congestive_heart_failure" = "edsnlp.pipelines.ner.disorders.congestive_heart_failure.factory:create_component"
-"eds.connective_tissue_disease" = "edsnlp.pipelines.ner.disorders.connective_tissue_disease.factory:create_component"
-"eds.copd" = "edsnlp.pipelines.ner.disorders.copd.factory:create_component"
-"eds.dementia" = "edsnlp.pipelines.ner.disorders.dementia.factory:create_component"
-"eds.diabetes" = "edsnlp.pipelines.ner.disorders.diabetes.factory:create_component"
-"eds.hemiplegia" = "edsnlp.pipelines.ner.disorders.hemiplegia.factory:create_component"
-"eds.leukemia" = "edsnlp.pipelines.ner.disorders.leukemia.factory:create_component"
-"eds.liver_disease" = "edsnlp.pipelines.ner.disorders.liver_disease.factory:create_component"
-"eds.lymphoma" = "edsnlp.pipelines.ner.disorders.lymphoma.factory:create_component"
-"eds.myocardial_infarction" = "edsnlp.pipelines.ner.disorders.myocardial_infarction.factory:create_component"
-"eds.peptic_ulcer_disease" = "edsnlp.pipelines.ner.disorders.peptic_ulcer_disease.factory:create_component"
-"eds.peripheral_vascular_disease" = "edsnlp.pipelines.ner.disorders.peripheral_vascular_disease.factory:create_component"
-"eds.solid_tumor" = "edsnlp.pipelines.ner.disorders.solid_tumor.factory:create_component"
-"eds.tobacco" = "edsnlp.pipelines.ner.behaviors.tobacco.factory:create_component"
+"eds.aids" = "edsnlp.pipes.ner.disorders.aids.factory:create_component"
+"eds.alcohol" = "edsnlp.pipes.ner.behaviors.alcohol.factory:create_component"
+"eds.cerebrovascular_accident" = "edsnlp.pipes.ner.disorders.cerebrovascular_accident.factory:create_component"
+"eds.ckd" = "edsnlp.pipes.ner.disorders.ckd.factory:create_component"
+"eds.congestive_heart_failure" = "edsnlp.pipes.ner.disorders.congestive_heart_failure.factory:create_component"
+"eds.connective_tissue_disease" = "edsnlp.pipes.ner.disorders.connective_tissue_disease.factory:create_component"
+"eds.copd" = "edsnlp.pipes.ner.disorders.copd.factory:create_component"
+"eds.dementia" = "edsnlp.pipes.ner.disorders.dementia.factory:create_component"
+"eds.diabetes" = "edsnlp.pipes.ner.disorders.diabetes.factory:create_component"
+"eds.hemiplegia" = "edsnlp.pipes.ner.disorders.hemiplegia.factory:create_component"
+"eds.leukemia" = "edsnlp.pipes.ner.disorders.leukemia.factory:create_component"
+"eds.liver_disease" = "edsnlp.pipes.ner.disorders.liver_disease.factory:create_component"
+"eds.lymphoma" = "edsnlp.pipes.ner.disorders.lymphoma.factory:create_component"
+"eds.myocardial_infarction" = "edsnlp.pipes.ner.disorders.myocardial_infarction.factory:create_component"
+"eds.peptic_ulcer_disease" = "edsnlp.pipes.ner.disorders.peptic_ulcer_disease.factory:create_component"
+"eds.peripheral_vascular_disease" = "edsnlp.pipes.ner.disorders.peripheral_vascular_disease.factory:create_component"
+"eds.solid_tumor" = "edsnlp.pipes.ner.disorders.solid_tumor.factory:create_component"
+"eds.tobacco" = "edsnlp.pipes.ner.behaviors.tobacco.factory:create_component"
# Qualifiers
-"eds.family" = "edsnlp.pipelines.qualifiers.family.factory:create_component"
-"eds.history" = "edsnlp.pipelines.qualifiers.history.factory:create_component"
-"eds.hypothesis" = "edsnlp.pipelines.qualifiers.hypothesis.factory:create_component"
-"eds.negation" = "edsnlp.pipelines.qualifiers.negation.factory:create_component"
-"eds.reported_speech" = "edsnlp.pipelines.qualifiers.reported_speech.factory:create_component"
+"eds.family" = "edsnlp.pipes.qualifiers.family.factory:create_component"
+"eds.history" = "edsnlp.pipes.qualifiers.history.factory:create_component"
+"eds.hypothesis" = "edsnlp.pipes.qualifiers.hypothesis.factory:create_component"
+"eds.negation" = "edsnlp.pipes.qualifiers.negation.factory:create_component"
+"eds.reported_speech" = "edsnlp.pipes.qualifiers.reported_speech.factory:create_component"
# Misc
-"eds.consultation_dates" = "edsnlp.pipelines.misc.consultation_dates.factory:create_component"
-"eds.dates" = "edsnlp.pipelines.misc.dates.factory:create_component"
-"eds.measurements" = "edsnlp.pipelines.misc.measurements.factory:create_component"
-"eds.reason" = "edsnlp.pipelines.misc.reason.factory:create_component"
-"eds.sections" = "edsnlp.pipelines.misc.sections.factory:create_component"
-"eds.tables" = "edsnlp.pipelines.misc.tables.factory:create_component"
+"eds.consultation_dates" = "edsnlp.pipes.misc.consultation_dates.factory:create_component"
+"eds.dates" = "edsnlp.pipes.misc.dates.factory:create_component"
+"eds.measurements" = "edsnlp.pipes.misc.measurements.factory:create_component"
+"eds.reason" = "edsnlp.pipes.misc.reason.factory:create_component"
+"eds.sections" = "edsnlp.pipes.misc.sections.factory:create_component"
+"eds.tables" = "edsnlp.pipes.misc.tables.factory:create_component"
# Trainable
-"eds.transformer" = "edsnlp.pipelines.trainable.embeddings.transformer.factory:create_component"
-"eds.text_cnn" = "edsnlp.pipelines.trainable.embeddings.text_cnn.factory:create_component"
-"eds.span_pooler" = "edsnlp.pipelines.trainable.embeddings.span_pooler.factory:create_component"
-"eds.ner_crf" = "edsnlp.pipelines.trainable.ner_crf.factory:create_component"
-"eds.nested_ner" = "edsnlp.pipelines.trainable.ner_crf.factory:create_component"
-"eds.span_qualifier" = "edsnlp.pipelines.trainable.span_qualifier.factory:create_component"
+"eds.transformer" = "edsnlp.pipes.trainable.embeddings.transformer.factory:create_component"
+"eds.text_cnn" = "edsnlp.pipes.trainable.embeddings.text_cnn.factory:create_component"
+"eds.span_pooler" = "edsnlp.pipes.trainable.embeddings.span_pooler.factory:create_component"
+"eds.ner_crf" = "edsnlp.pipes.trainable.ner_crf.factory:create_component"
+"eds.nested_ner" = "edsnlp.pipes.trainable.ner_crf.factory:create_component"
+"eds.span_qualifier" = "edsnlp.pipes.trainable.span_qualifier.factory:create_component"
# Deprecated (links to the same factories as above)
-"SOFA" = "edsnlp.pipelines.ner.scores.sofa.factory:create_component"
-"accents" = "edsnlp.pipelines.core.normalizer.accents.factory:create_component"
-"charlson" = "edsnlp.pipelines.ner.scores.charlson.factory:create_component"
-"consultation_dates" = "edsnlp.pipelines.misc.consultation_dates.factory:create_component"
-"contextual-matcher" = "edsnlp.pipelines.core.contextual_matcher.factory:create_component"
-"eds.contextual-matcher" = "edsnlp.pipelines.core.contextual_matcher.factory:create_component"
-"dates" = "edsnlp.pipelines.misc.dates.factory:create_component"
-"eds.AIDS" = "edsnlp.pipelines.ner.disorders.aids.factory:create_component"
-"eds.CKD" = "edsnlp.pipelines.ner.disorders.ckd.factory:create_component"
-"eds.COPD" = "edsnlp.pipelines.ner.disorders.copd.factory:create_component"
-"eds.SOFA" = "edsnlp.pipelines.ner.scores.sofa.factory:create_component"
-"eds.TNM" = "edsnlp.pipelines.ner.tnm.factory:create_component"
-"eds.elston-ellis" = "edsnlp.pipelines.ner.scores.elston_ellis.factory:create_component"
-"eds.elstonellis" = "edsnlp.pipelines.ner.scores.elston_ellis.factory:create_component"
-"eds.emergency.ccmu" = "edsnlp.pipelines.ner.scores.emergency.ccmu.factory:create_component"
-"eds.emergency.gemsa" = "edsnlp.pipelines.ner.scores.emergency.gemsa.factory:create_component"
-"eds.emergency.priority" = "edsnlp.pipelines.ner.scores.emergency.priority.factory:create_component"
-"eds.measures" = "edsnlp.pipelines.misc.measurements.factory:create_component"
-"eds.remove-lowercase" = "edsnlp.pipelines.core.normalizer.remove_lowercase.factory:create_component"
-"emergency.ccmu" = "edsnlp.pipelines.ner.scores.emergency.ccmu.factory:create_component"
-"emergency.gemsa" = "edsnlp.pipelines.ner.scores.emergency.gemsa.factory:create_component"
-"emergency.priority" = "edsnlp.pipelines.ner.scores.emergency.priority.factory:create_component"
-"endlines" = "edsnlp.pipelines.core.endlines.factory:create_component"
-"family" = "edsnlp.pipelines.qualifiers.family.factory:create_component"
-"hypothesis" = "edsnlp.pipelines.qualifiers.hypothesis.factory:create_component"
-"matcher" = "edsnlp.pipelines.core.matcher.factory:create_component"
-"negation" = "edsnlp.pipelines.qualifiers.negation.factory:create_component"
-"normalizer" = "edsnlp.pipelines.core.normalizer.factory:create_component"
-"pollution" = "edsnlp.pipelines.core.normalizer.pollution.factory:create_component"
-"quotes" = "edsnlp.pipelines.core.normalizer.quotes.factory:create_component"
-"reason" = "edsnlp.pipelines.misc.reason.factory:create_component"
-"remove-lowercase" = "edsnlp.pipelines.core.normalizer.remove_lowercase.factory:create_component"
-"reported_speech" = "edsnlp.pipelines.qualifiers.reported_speech.factory:create_component"
-"rspeech" = "edsnlp.pipelines.qualifiers.reported_speech.factory:create_component"
-"score" = "edsnlp.pipelines.ner.scores.factory:create_component"
-"sections" = "edsnlp.pipelines.misc.sections.factory:create_component"
-"sentences" = "edsnlp.pipelines.core.sentences.factory:create_component"
-"spaces" = "edsnlp.pipelines.core.normalizer.spaces.factory:create_component"
-"tables" = "edsnlp.pipelines.misc.tables.factory:create_component"
-"terminology" = "edsnlp.pipelines.core.terminology.factory:create_component"
+"SOFA" = "edsnlp.pipes.ner.scores.sofa.factory:create_component"
+"accents" = "edsnlp.pipes.core.normalizer.accents.factory:create_component"
+"charlson" = "edsnlp.pipes.ner.scores.charlson.factory:create_component"
+"consultation_dates" = "edsnlp.pipes.misc.consultation_dates.factory:create_component"
+"contextual-matcher" = "edsnlp.pipes.core.contextual_matcher.factory:create_component"
+"eds.contextual-matcher" = "edsnlp.pipes.core.contextual_matcher.factory:create_component"
+"dates" = "edsnlp.pipes.misc.dates.factory:create_component"
+"eds.AIDS" = "edsnlp.pipes.ner.disorders.aids.factory:create_component"
+"eds.CKD" = "edsnlp.pipes.ner.disorders.ckd.factory:create_component"
+"eds.COPD" = "edsnlp.pipes.ner.disorders.copd.factory:create_component"
+"eds.SOFA" = "edsnlp.pipes.ner.scores.sofa.factory:create_component"
+"eds.TNM" = "edsnlp.pipes.ner.tnm.factory:create_component"
+"eds.elston-ellis" = "edsnlp.pipes.ner.scores.elston_ellis.factory:create_component"
+"eds.elstonellis" = "edsnlp.pipes.ner.scores.elston_ellis.factory:create_component"
+"eds.emergency.ccmu" = "edsnlp.pipes.ner.scores.emergency.ccmu.factory:create_component"
+"eds.emergency.gemsa" = "edsnlp.pipes.ner.scores.emergency.gemsa.factory:create_component"
+"eds.emergency.priority" = "edsnlp.pipes.ner.scores.emergency.priority.factory:create_component"
+"eds.measures" = "edsnlp.pipes.misc.measurements.factory:create_component"
+"eds.remove-lowercase" = "edsnlp.pipes.core.normalizer.remove_lowercase.factory:create_component"
+"emergency.ccmu" = "edsnlp.pipes.ner.scores.emergency.ccmu.factory:create_component"
+"emergency.gemsa" = "edsnlp.pipes.ner.scores.emergency.gemsa.factory:create_component"
+"emergency.priority" = "edsnlp.pipes.ner.scores.emergency.priority.factory:create_component"
+"endlines" = "edsnlp.pipes.core.endlines.factory:create_component"
+"family" = "edsnlp.pipes.qualifiers.family.factory:create_component"
+"hypothesis" = "edsnlp.pipes.qualifiers.hypothesis.factory:create_component"
+"matcher" = "edsnlp.pipes.core.matcher.factory:create_component"
+"negation" = "edsnlp.pipes.qualifiers.negation.factory:create_component"
+"normalizer" = "edsnlp.pipes.core.normalizer.factory:create_component"
+"pollution" = "edsnlp.pipes.core.normalizer.pollution.factory:create_component"
+"quotes" = "edsnlp.pipes.core.normalizer.quotes.factory:create_component"
+"reason" = "edsnlp.pipes.misc.reason.factory:create_component"
+"remove-lowercase" = "edsnlp.pipes.core.normalizer.remove_lowercase.factory:create_component"
+"reported_speech" = "edsnlp.pipes.qualifiers.reported_speech.factory:create_component"
+"rspeech" = "edsnlp.pipes.qualifiers.reported_speech.factory:create_component"
+"score" = "edsnlp.pipes.ner.scores.factory:create_component"
+"sections" = "edsnlp.pipes.misc.sections.factory:create_component"
+"sentences" = "edsnlp.pipes.core.sentences.factory:create_component"
+"spaces" = "edsnlp.pipes.core.normalizer.spaces.factory:create_component"
+"tables" = "edsnlp.pipes.misc.tables.factory:create_component"
+"terminology" = "edsnlp.pipes.core.terminology.factory:create_component"
[project.entry-points."spacy_scorers"]
"eds.ner_exact_scorer" = "edsnlp.scorers.ner:create_ner_exact_scorer"
@@ -304,7 +304,7 @@ ban-relative-imports = "parents"
[tool.ruff.extend-per-file-ignores]
"__init__.py" = ["F401"]
-"edsnlp/pipelines/factories.py" = [ "F401", "E501" ]
+"edsnlp/pipes/factories.py" = [ "F401", "E501" ]
[tool.ruff.isort]
known-first-party = ["edsnlp"]
diff --git a/scripts/conjugate_verbs.py b/scripts/conjugate_verbs.py
index 2fda1f87f..7e23b8b21 100644
--- a/scripts/conjugate_verbs.py
+++ b/scripts/conjugate_verbs.py
@@ -5,9 +5,9 @@
import typer
from edsnlp.conjugator import conjugate
-from edsnlp.pipelines.qualifiers.hypothesis.patterns import verbs_eds, verbs_hyp
-from edsnlp.pipelines.qualifiers.negation.patterns import verbs as neg_verbs
-from edsnlp.pipelines.qualifiers.reported_speech.patterns import verbs as rspeech_verbs
+from edsnlp.pipes.qualifiers.hypothesis.patterns import verbs_eds, verbs_hyp
+from edsnlp.pipes.qualifiers.negation.patterns import verbs as neg_verbs
+from edsnlp.pipes.qualifiers.reported_speech.patterns import verbs as rspeech_verbs
warnings.filterwarnings("ignore")
@@ -15,7 +15,7 @@
def conjugate_verbs(
output_path: Path = typer.Argument(
"edsnlp/resources/verbs.csv.gz", help="Path to the output CSV table."
- )
+ ),
) -> None:
"""
Convenience script to automatically conjugate a set of verbs,
diff --git a/setup.py b/setup.py
index 36f3c64b8..4b23d9844 100644
--- a/setup.py
+++ b/setup.py
@@ -21,7 +21,7 @@
}
MOD_NAMES = [
"edsnlp.matchers.phrase",
- "edsnlp.pipelines.core.sentences.fast_sentences",
+ "edsnlp.pipes.core.sentences.fast_sentences",
]
include_dirs = [
diff --git a/tests/pipelines/core/test_endlines.py b/tests/pipelines/core/test_endlines.py
index 6ce594a30..dcec58396 100644
--- a/tests/pipelines/core/test_endlines.py
+++ b/tests/pipelines/core/test_endlines.py
@@ -1,8 +1,8 @@
import spacy
from pytest import fixture
-from edsnlp.pipelines.core.endlines.functional import build_path
-from edsnlp.pipelines.core.endlines.model import EndLinesModel
+from edsnlp.pipes.core.endlines.functional import build_path
+from edsnlp.pipes.core.endlines.model import EndLinesModel
texts = [
"""Le patient est arrivé hier soir.
diff --git a/tests/pipelines/core/test_matcher.py b/tests/pipelines/core/test_matcher.py
index 1701e34e8..ae0fa41f0 100644
--- a/tests/pipelines/core/test_matcher.py
+++ b/tests/pipelines/core/test_matcher.py
@@ -1,7 +1,7 @@
import pytest
from pytest import fixture
-from edsnlp.pipelines.core.matcher import GenericMatcher
+from edsnlp.pipes.core.matcher import GenericMatcher
@fixture
@@ -23,7 +23,6 @@ def matcher_factory(nlp):
)
def factory(terms=None, regex=None, **kwargs):
-
assert terms or regex
config = dict(**default_config)
diff --git a/tests/pipelines/core/test_normalisation.py b/tests/pipelines/core/test_normalisation.py
index 4cfa7b039..02838888d 100644
--- a/tests/pipelines/core/test_normalisation.py
+++ b/tests/pipelines/core/test_normalisation.py
@@ -1,9 +1,9 @@
from pytest import fixture
from edsnlp.matchers.utils import get_text
-from edsnlp.pipelines.core.normalizer.accents.patterns import accents
-from edsnlp.pipelines.core.normalizer.pollution.patterns import pollution
-from edsnlp.pipelines.core.normalizer.quotes.patterns import quotes_and_apostrophes
+from edsnlp.pipes.core.normalizer.accents.patterns import accents
+from edsnlp.pipes.core.normalizer.pollution.patterns import pollution
+from edsnlp.pipes.core.normalizer.quotes.patterns import quotes_and_apostrophes
@fixture
@@ -25,7 +25,6 @@ def test_full_normalization(doc):
@fixture
def nlp_factory(blank_nlp):
def f(a=False, lc=False, q=False, p=False):
-
if a:
a = dict(accents=accents)
if q:
@@ -48,7 +47,6 @@ def f(a=False, lc=False, q=False, p=False):
def test_normalization_accents(nlp_factory, text):
-
nlp = nlp_factory(a=True)
doc = nlp(text)
@@ -58,7 +56,6 @@ def test_normalization_accents(nlp_factory, text):
def test_normalization_spaces(nlp_factory, text):
-
nlp = nlp_factory(a=True)
doc = nlp("Phrase avec des espaces \n et un retour à la ligne")
@@ -67,7 +64,6 @@ def test_normalization_spaces(nlp_factory, text):
def test_normalization_quotes(nlp_factory, text):
-
nlp = nlp_factory(q=True)
doc = nlp(text)
@@ -79,7 +75,6 @@ def test_normalization_quotes(nlp_factory, text):
def test_normalization_lowercase(nlp_factory, text):
-
nlp = nlp_factory(lc=True)
doc = nlp(text)
@@ -89,7 +84,6 @@ def test_normalization_lowercase(nlp_factory, text):
def test_normalization_pollution(nlp_factory, text):
-
nlp = nlp_factory(p=True)
doc = nlp(text)
diff --git a/tests/pipelines/core/test_sentences.py b/tests/pipelines/core/test_sentences.py
index e9e375199..f77369f62 100644
--- a/tests/pipelines/core/test_sentences.py
+++ b/tests/pipelines/core/test_sentences.py
@@ -2,7 +2,7 @@
from pytest import mark
from spacy.pipeline.sentencizer import Sentencizer
-from edsnlp.pipelines.core.sentences import SentenceSegmenter, terms
+from edsnlp.pipes.core.sentences import SentenceSegmenter, terms
text = (
"Le patient est admis pour des douleurs dans le bras droit. "
@@ -40,7 +40,6 @@ def test_sentences(nlp, endlines):
def test_false_positives(blank_nlp):
-
false_positives = [
"02.04.2018",
]
diff --git a/tests/pipelines/misc/test_consultation_date.py b/tests/pipelines/misc/test_consultation_date.py
index 4fad33336..83700b7bd 100644
--- a/tests/pipelines/misc/test_consultation_date.py
+++ b/tests/pipelines/misc/test_consultation_date.py
@@ -1,6 +1,6 @@
import pytest
-from edsnlp.pipelines.misc.consultation_dates import factory # noqa
+from edsnlp.pipes.misc.consultation_dates import factory # noqa
TEXT = """
Références : AMO/AMO
@@ -53,7 +53,6 @@
@pytest.mark.parametrize("date_pipeline", [True, False])
@pytest.mark.parametrize("example", [cons, cons_town, cons_town_doc])
def test_cons_dates(date_pipeline, example, blank_nlp):
-
blank_nlp.add_pipe(
"eds.normalizer",
config=dict(lowercase=True, accents=True, quotes=True, pollution=False),
diff --git a/tests/pipelines/misc/test_dates.py b/tests/pipelines/misc/test_dates.py
index 4b6938a3f..ad57bdbf6 100644
--- a/tests/pipelines/misc/test_dates.py
+++ b/tests/pipelines/misc/test_dates.py
@@ -6,7 +6,7 @@
from pytest import fixture
from edsnlp.core import PipelineProtocol
-from edsnlp.pipelines.misc.dates.models import AbsoluteDate, Relative
+from edsnlp.pipes.misc.dates.models import AbsoluteDate, Relative
from edsnlp.utils.examples import parse_example
TZ = pytz.timezone("Europe/Paris")
@@ -153,7 +153,6 @@ def test_dates_component(blank_nlp: PipelineProtocol):
def test_periods(blank_nlp: PipelineProtocol):
-
period_examples = [
"à partir de juin 2017 pendant trois semaines",
"du 5 juin au 6 juillet",
@@ -200,7 +199,6 @@ def test_time(with_time: bool):
def test_false_positives(blank_nlp: PipelineProtocol):
-
counter_examples = [
"page 1/1", # Often found in the form `1/1` only
"40 00",
@@ -225,7 +223,6 @@ def test_false_positives(blank_nlp: PipelineProtocol):
def test_dates_on_ents_only():
-
text = (
"Le patient est venu hier (le 04/09/2021) pour un test PCR.\n"
"Il est cas contact depuis la semaine dernière, "
diff --git a/tests/pipelines/misc/test_measurements.py b/tests/pipelines/misc/test_measurements.py
index 28ddad1a3..9b9702e82 100644
--- a/tests/pipelines/misc/test_measurements.py
+++ b/tests/pipelines/misc/test_measurements.py
@@ -5,7 +5,7 @@
from spacy.tokens.span import Span
from edsnlp.core import PipelineProtocol
-from edsnlp.pipelines.misc.measurements import MeasurementsMatcher
+from edsnlp.pipes.misc.measurements import MeasurementsMatcher
text = (
"Le patient fait 1 m 50 kg. La tumeur fait 2.0cm x 3cm. \n"
diff --git a/tests/pipelines/misc/test_sections.py b/tests/pipelines/misc/test_sections.py
index 904f92f58..c15bf8991 100644
--- a/tests/pipelines/misc/test_sections.py
+++ b/tests/pipelines/misc/test_sections.py
@@ -1,6 +1,6 @@
from pytest import fixture
-from edsnlp.pipelines.misc.sections import Sections, patterns
+from edsnlp.pipes.misc.sections import Sections, patterns
from edsnlp.utils.examples import parse_example
sections_text = (
@@ -31,7 +31,6 @@ def test_section_detection(doc):
@fixture
def sections_factory(blank_nlp):
-
default_config = dict(
sections=patterns.sections,
add_patterns=True,
@@ -40,7 +39,6 @@ def sections_factory(blank_nlp):
)
def factory(**kwargs):
-
config = dict(**default_config)
config.update(kwargs)
@@ -53,7 +51,6 @@ def factory(**kwargs):
def test_sections(blank_nlp, sections_factory):
-
blank_nlp.add_pipe("normalizer")
sections = sections_factory()
@@ -68,16 +65,13 @@ def test_sections(blank_nlp, sections_factory):
doc = sections(doc)
for entity, ent in zip(entities, doc.ents):
-
for modifier in entity.modifiers:
-
assert (
getattr(ent._, modifier.key) == modifier.value
), f"{modifier.key} labels don't match."
def test_empty_sections(blank_nlp, sections_factory):
-
blank_nlp.add_pipe("normalizer")
sections = sections_factory()
diff --git a/tests/pipelines/ner/test_score.py b/tests/pipelines/ner/test_score.py
index 6d0aab203..67b40f007 100644
--- a/tests/pipelines/ner/test_score.py
+++ b/tests/pipelines/ner/test_score.py
@@ -1,6 +1,6 @@
import re
-from edsnlp.pipelines.ner.scores import Score
+from edsnlp.pipes.ner.scores import Score
from edsnlp.utils.examples import parse_example
example = """
@@ -67,7 +67,6 @@ def testscore_normalization(raw_score: str):
doc = testscore(doc)
for entity, ent in zip(entities, doc.ents):
-
for modifier in entity.modifiers:
assert (
getattr(ent._, modifier.key) == modifier.value
diff --git a/tests/pipelines/ner/test_umls.py b/tests/pipelines/ner/test_umls.py
index e4ace7e0e..ae589bade 100644
--- a/tests/pipelines/ner/test_umls.py
+++ b/tests/pipelines/ner/test_umls.py
@@ -6,7 +6,7 @@
from pathlib import Path # noqa: E402
from edsnlp.core import PipelineProtocol # noqa: E402
-from edsnlp.pipelines.ner.umls.patterns import get_path, get_patterns # noqa: E402
+from edsnlp.pipes.ner.umls.patterns import get_path, get_patterns # noqa: E402
from edsnlp.utils.examples import parse_example # noqa: E402
examples = [
diff --git a/tests/pipelines/qualifiers/test_family.py b/tests/pipelines/qualifiers/test_family.py
index dcb362e93..706f59849 100644
--- a/tests/pipelines/qualifiers/test_family.py
+++ b/tests/pipelines/qualifiers/test_family.py
@@ -2,7 +2,7 @@
from pytest import fixture, mark
-from edsnlp.pipelines.qualifiers.family import FamilyContext
+from edsnlp.pipes.qualifiers.family import FamilyContext
from edsnlp.utils.examples import parse_example
examples: List[str] = [
@@ -29,7 +29,6 @@
@fixture
def family_factory(blank_nlp):
-
default_config = dict(
family=None,
termination=None,
@@ -39,7 +38,6 @@ def family_factory(blank_nlp):
)
def factory(on_ents_only, **kwargs):
-
config = dict(**default_config)
config.update(kwargs)
@@ -55,7 +53,6 @@ def factory(on_ents_only, **kwargs):
@mark.parametrize("on_ents_only", [True, False])
@mark.parametrize("use_sections", [True, False])
def test_family(blank_nlp, family_factory, on_ents_only, use_sections):
-
family = family_factory(
on_ents_only=on_ents_only,
use_sections=use_sections,
@@ -72,9 +69,7 @@ def test_family(blank_nlp, family_factory, on_ents_only, use_sections):
doc = family(doc)
for entity, ent in zip(entities, doc.ents):
-
for modifier in entity.modifiers:
-
assert bool(ent._.family_cues) == (modifier.value in {"FAMILY", True})
assert (
diff --git a/tests/pipelines/qualifiers/test_history.py b/tests/pipelines/qualifiers/test_history.py
index ce4aa3617..c4b8777aa 100644
--- a/tests/pipelines/qualifiers/test_history.py
+++ b/tests/pipelines/qualifiers/test_history.py
@@ -3,9 +3,9 @@
import spacy
from pytest import mark
-from edsnlp.pipelines.qualifiers.history import History
-from edsnlp.pipelines.qualifiers.history.patterns import history
-from edsnlp.pipelines.terminations import termination
+from edsnlp.pipes.qualifiers.history import History
+from edsnlp.pipes.qualifiers.history.patterns import history
+from edsnlp.pipes.terminations import termination
text = """COMPTE RENDU D'HOSPITALISATION du 11/07/2018 au 12/07/2018
diff --git a/tests/pipelines/qualifiers/test_hypothesis.py b/tests/pipelines/qualifiers/test_hypothesis.py
index 29d256915..b24320edb 100644
--- a/tests/pipelines/qualifiers/test_hypothesis.py
+++ b/tests/pipelines/qualifiers/test_hypothesis.py
@@ -2,7 +2,7 @@
from pytest import fixture, mark
-from edsnlp.pipelines.qualifiers.hypothesis import Hypothesis
+from edsnlp.pipes.qualifiers.hypothesis import Hypothesis
from edsnlp.utils.examples import parse_example
examples: List[str] = [
@@ -20,7 +20,6 @@
@fixture
def hypothesis_factory(blank_nlp):
-
default_config = dict(
pseudo=None,
preceding=None,
@@ -34,7 +33,6 @@ def hypothesis_factory(blank_nlp):
)
def factory(on_ents_only, **kwargs):
-
config = dict(**default_config)
config.update(kwargs)
@@ -49,7 +47,6 @@ def factory(on_ents_only, **kwargs):
@mark.parametrize("on_ents_only", [True, False])
def test_hypothesis(blank_nlp, hypothesis_factory, on_ents_only):
-
hypothesis = hypothesis_factory(on_ents_only)
for example in examples:
@@ -63,9 +60,7 @@ def test_hypothesis(blank_nlp, hypothesis_factory, on_ents_only):
doc = hypothesis(doc)
for entity, ent in zip(entities, doc.ents):
-
for modifier in entity.modifiers:
-
assert bool(ent._.hypothesis_cues) == (modifier.value in {"HYP", True})
assert getattr(ent._, modifier.key) == modifier.value
@@ -78,7 +73,6 @@ def test_hypothesis(blank_nlp, hypothesis_factory, on_ents_only):
def test_hypothesis_within_ents(blank_nlp, hypothesis_factory):
-
hypothesis = hypothesis_factory(True, within_ents=True)
examples = [
@@ -96,7 +90,5 @@ def test_hypothesis_within_ents(blank_nlp, hypothesis_factory):
doc = hypothesis(doc)
for entity, ent in zip(entities, doc.ents):
-
for modifier in entity.modifiers:
-
assert bool(ent._.hypothesis_cues) == (modifier.value in {"HYP", True})
diff --git a/tests/pipelines/qualifiers/test_negation.py b/tests/pipelines/qualifiers/test_negation.py
index 29d125d1e..128506f26 100644
--- a/tests/pipelines/qualifiers/test_negation.py
+++ b/tests/pipelines/qualifiers/test_negation.py
@@ -2,7 +2,7 @@
from pytest import fixture, mark
-from edsnlp.pipelines.qualifiers.negation import Negation
+from edsnlp.pipes.qualifiers.negation import Negation
from edsnlp.utils.examples import parse_example
negation_examples: List[str] = [
@@ -32,7 +32,6 @@
@fixture
def negation_factory(blank_nlp):
-
default_config = dict(
pseudo=None,
preceding=None,
@@ -45,7 +44,6 @@ def negation_factory(blank_nlp):
)
def factory(on_ents_only, **kwargs) -> Negation:
-
config = dict(**default_config)
config.update(kwargs)
@@ -60,7 +58,6 @@ def factory(on_ents_only, **kwargs) -> Negation:
@mark.parametrize("on_ents_only", [True, False])
def test_negation(blank_nlp, negation_factory, on_ents_only):
-
negation = negation_factory(on_ents_only=on_ents_only)
for example in negation_examples:
@@ -74,9 +71,7 @@ def test_negation(blank_nlp, negation_factory, on_ents_only):
doc = negation(doc)
for entity, ent in zip(entities, doc.ents):
-
for modifier in entity.modifiers:
-
assert bool(ent._.negation_cues) == (modifier.value in {True, "NEG"})
assert (
@@ -91,7 +86,6 @@ def test_negation(blank_nlp, negation_factory, on_ents_only):
def test_negation_within_ents(blank_nlp, negation_factory):
-
negation = negation_factory(on_ents_only=True, within_ents=True)
examples = [
@@ -109,9 +103,7 @@ def test_negation_within_ents(blank_nlp, negation_factory):
doc = negation(doc)
for entity, ent in zip(entities, doc.ents):
-
for modifier in entity.modifiers:
-
assert bool(ent._.negation_cues) == (modifier.value in {True, "NEG"})
assert (
diff --git a/tests/pipelines/qualifiers/test_reported_speech.py b/tests/pipelines/qualifiers/test_reported_speech.py
index 7823b1844..2f4c74a70 100644
--- a/tests/pipelines/qualifiers/test_reported_speech.py
+++ b/tests/pipelines/qualifiers/test_reported_speech.py
@@ -2,7 +2,7 @@
from pytest import fixture, mark
-from edsnlp.pipelines.qualifiers.reported_speech import ReportedSpeech
+from edsnlp.pipes.qualifiers.reported_speech import ReportedSpeech
from edsnlp.utils.examples import parse_example
examples: List[str] = [
@@ -52,7 +52,6 @@
@fixture
def reported_speech_factory(blank_nlp):
-
default_config = dict(
pseudo=None,
preceding=None,
@@ -65,7 +64,6 @@ def reported_speech_factory(blank_nlp):
)
def factory(on_ents_only, **kwargs):
-
config = dict(**default_config)
config.update(kwargs)
@@ -80,7 +78,6 @@ def factory(on_ents_only, **kwargs):
@mark.parametrize("on_ents_only", [True, False])
def test_reported_speech(blank_nlp, reported_speech_factory, on_ents_only):
-
reported_speech = reported_speech_factory(on_ents_only=on_ents_only)
for example in examples:
@@ -94,9 +91,7 @@ def test_reported_speech(blank_nlp, reported_speech_factory, on_ents_only):
doc = reported_speech(doc)
for entity, ent in zip(entities, doc.ents):
-
for modifier in entity.modifiers:
-
assert getattr(ent._, modifier.key) == modifier.value
if not on_ents_only:
@@ -105,7 +100,6 @@ def test_reported_speech(blank_nlp, reported_speech_factory, on_ents_only):
def test_reported_speech_within_ents(blank_nlp, reported_speech_factory):
-
reported_speech = reported_speech_factory(on_ents_only=True, within_ents=True)
examples = [
@@ -124,9 +118,7 @@ def test_reported_speech_within_ents(blank_nlp, reported_speech_factory):
doc = reported_speech(doc)
for entity, ent in zip(entities, doc.ents):
-
for modifier in entity.modifiers:
-
assert (
getattr(ent._, modifier.key) == modifier.value
), f"{modifier.key} labels don't match."
diff --git a/tests/pipelines/test_pipelines.py b/tests/pipelines/test_pipelines.py
index f37604f63..dc7197e2e 100644
--- a/tests/pipelines/test_pipelines.py
+++ b/tests/pipelines/test_pipelines.py
@@ -9,4 +9,4 @@ def test_pipelines(doc):
def test_import_all():
- import edsnlp.pipelines.factories # noqa: F401
+ import edsnlp.pipes.factories # noqa: F401
diff --git a/tests/pipelines/trainable/test_transformer.py b/tests/pipelines/trainable/test_transformer.py
index 831929b3e..1206da7ff 100644
--- a/tests/pipelines/trainable/test_transformer.py
+++ b/tests/pipelines/trainable/test_transformer.py
@@ -2,8 +2,8 @@
from spacy.tokens import Span
import edsnlp
-from edsnlp.pipelines.trainable.embeddings.transformer.transformer import Transformer
-from edsnlp.pipelines.trainable.span_qualifier.span_qualifier import (
+from edsnlp.pipes.trainable.embeddings.transformer.transformer import Transformer
+from edsnlp.pipes.trainable.span_qualifier.span_qualifier import (
TrainableSpanQualifier,
)
diff --git a/tests/test_pipeline.py b/tests/test_pipeline.py
index f607fdbea..ae46082ba 100644
--- a/tests/test_pipeline.py
+++ b/tests/test_pipeline.py
@@ -8,7 +8,7 @@
import edsnlp
from edsnlp import Pipeline, registry
-from edsnlp.pipelines.factories import normalizer, sentences
+from edsnlp.pipes.factories import normalizer, sentences
class CustomClass:
@@ -244,7 +244,7 @@ def test_add_pipe_validation_error():
assert str(e.value) == (
"1 validation error for "
- "edsnlp.pipelines.ner.covid.factory.create_component()\n"
+ "edsnlp.pipes.ner.covid.factory.create_component()\n"
"-> extractor.foo\n"
" unexpected keyword argument"
)
diff --git a/tests/test_span_args.py b/tests/test_span_args.py
index 0b73681e6..728d980b6 100644
--- a/tests/test_span_args.py
+++ b/tests/test_span_args.py
@@ -1,6 +1,6 @@
from pydantic import validate_arguments
-from edsnlp.pipelines.base import (
+from edsnlp.pipes.base import (
SpanGetterArg,
SpanSetterArg,
validate_span_getter,