Pipeline for Anatomic Therapeutic Chemical (ATC) Sentence Entity Resolver

Description

This advanced pipeline extracts DRUG entities from clinical texts and utilizes the sbiobert_base_cased_mli Sentence Bert Embeddings to map these entities to their corresponding Anatomic Therapeutic Chemical (ATC) codes.

Copy S3 URI

How to use


from sparknlp.pretrained import PretrainedPipeline

ner_pipeline = PretrainedPipeline("atc_resolver_pipeline", "en", "clinical/models")

result = ner_pipeline.annotate("""She was immediately given hydrogen peroxide 30 mg and amoxicillin twice daily for 10 days to treat the infection on her leg. She has a history of taking magnesium hydroxide.""")


import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline

val ner_pipeline = PretrainedPipeline("atc_resolver_pipeline", "en", "clinical/models")

val result = ner_pipeline.annotate("""She was immediately given hydrogen peroxide 30 mg and amoxicillin twice daily for 10 days to treat the infection on her leg. She has a history of taking magnesium hydroxide.""")

Results

|    | chunks              |   begin |   end | entities   | atc_code   | resolutions         |
|---:|:--------------------|--------:|------:|:-----------|:-----------|:--------------------|
|  0 | hydrogen peroxide   |      26 |    42 | DRUG       | A01AB02    | hydrogen peroxide   |
|  1 | amoxicillin         |      54 |    64 | DRUG       | J01CA04    | amoxicillin         |
|  2 | magnesium hydroxide |     153 |   171 | DRUG       | A02AA04    | magnesium hydroxide |

Model Information

Model Name: atc_resolver_pipeline
Type: pipeline
Compatibility: Healthcare NLP 5.2.1+
License: Licensed
Edition: Official
Language: en
Size: 2.2 GB

Included Models

  • DocumentAssembler
  • SentenceDetectorDLModel
  • TokenizerModel
  • WordEmbeddingsModel
  • MedicalNerModel
  • NerConverterInternalModel
  • Chunk2Doc
  • BertSentenceEmbeddings
  • SentenceEntityResolverModel