NerDLModel Anatomy


Pretrained named entity recognition deep learning model for anatomy terms. Includes Anatomical_system, Cell, Cellular_component, Developing_anatomical_structure, Immaterial_anatomical_entity, Multi-tissue_structure, Organ, Organism_subdivision, Organism_substance, Pathological_formation, and Tissue entities. The SparkNLP deep learning model (NerDL) is inspired by a former state of the art model for NER: Chiu & Nicols, Named Entity Recognition with Bidirectional LSTM-CNN.

Predicted Entities


Open in Colab Download

How to use

Use as part of an nlp pipeline with the following stages: DocumentAssembler, SentenceDetector, Tokenizer, WordEmbeddingsModel, NerDLModel. Add the NerConverter to the end of the pipeline to convert entity tokens into full entity chunks.

clinical_ner = NerDLModel.pretrained("ner_anatomy", "en", "clinical/models") \
  .setInputCols(["sentence", "token", "embeddings"]) \

nlpPipeline = Pipeline(stages=[clinical_ner])

empty_data = spark.createDataFrame([[""]]).toDF("text")

model =

results = model.transform(data)

val ner = NerDLModel.pretrained("ner_anatomy", "en", "clinical/models") \
  .setInputCols(["sentence", "token", "embeddings"]) \

val pipeline = new Pipeline().setStages(Array(ner))

val result =[String].toDS.toDF("text")).transform(data)


The output is a dataframe with a sentence per row and a “ner” column containing all of the entity labels in the sentence, entity character indices, and other metadata. To get only the tokens and entity labels, without the metadata, select “token.result” and “ner.result” from your output dataframe or add the “Finisher” to the end of your


Model Information

Model Name: ner_anatomy_en_2.4.2_2.4
Type: ner
Compatibility: Spark NLP 2.4.2
Edition: Official
License: Licensed
Input Labels: [sentence,token, embeddings]
Output Labels: [ner]
Language: [en]
Case sensitive: false

Data Source

Trained on the Anatomical Entity Mention (AnEM) corpus with ‘embeddings_clinical’.