edsnlp.connectors.omop
OmopConnector [source]
Bases: object
[summary]
Parameters
| PARAMETER | DESCRIPTION |
|---|---|
nlp | The pipeline instance TYPE: |
start_char | Name of the column containing the start character index of the entity, by default "start_char" TYPE: |
end_char | Name of the column containing the end character index of the entity, by default "end_char" TYPE: |
preprocess [source]
Preprocess the input OMOP tables: modification of the column names.
Parameters
| PARAMETER | DESCRIPTION |
|---|---|
note | OMOP TYPE: |
note_nlp | OMOP TYPE: |
| RETURNS | DESCRIPTION |
|---|---|
note | OMOP TYPE: |
note_nlp | OMOP TYPE: |
postprocess [source]
Postprocess the input OMOP tables: modification of the column names.
Parameters
| PARAMETER | DESCRIPTION |
|---|---|
note | OMOP TYPE: |
note_nlp | OMOP TYPE: |
| RETURNS | DESCRIPTION |
|---|---|
note | OMOP TYPE: |
note_nlp | OMOP TYPE: |
omop2docs [source]
Transforms OMOP tables to a list of spaCy documents.
Parameters
| PARAMETER | DESCRIPTION |
|---|---|
note | OMOP TYPE: |
note_nlp | OMOP TYPE: |
extensions | Extensions to keep, by default None TYPE: |
| RETURNS | DESCRIPTION |
|---|---|
List[Doc] | List of spaCy documents. |
docs2omop [source]
Transforms a list of spaCy documents to a pair of OMOP tables.
Parameters
| PARAMETER | DESCRIPTION |
|---|---|
docs | List of spaCy documents. TYPE: |
extensions | Extensions to keep, by default None TYPE: |
| RETURNS | DESCRIPTION |
|---|---|
note | OMOP TYPE: |
note_nlp | OMOP TYPE: |
omop2docs [source]
Transforms an OMOP-formatted pair of dataframes into a list of documents.
Parameters
| PARAMETER | DESCRIPTION |
|---|---|
note | The OMOP TYPE: |
note_nlp | The OMOP TYPE: |
nlp | The pipeline instance TYPE: |
extensions | Extensions to keep, by default None TYPE: |
| RETURNS | DESCRIPTION |
|---|---|
List[Doc] : | List of spaCy documents |
docs2omop [source]
Transforms a list of spaCy docs to a pair of OMOP tables.
Parameters
| PARAMETER | DESCRIPTION |
|---|---|
docs | List of documents to transform. TYPE: |
extensions | Extensions to keep, by default None TYPE: |
| RETURNS | DESCRIPTION |
|---|---|
Tuple[DataFrame, DataFrame] | Pair of OMOP tables ( |