Recognize Entities OntoNotes - ELECTRA Large

Description

A pre-trained pipeline containing NerDl Model. The NER model trained on OntoNotes 5.0 with electra_large_uncased embeddings. It can extract up to following 18 entities:

Predicted Entities

CARDINAL, DATE, EVENT, FAC, GPE, LANGUAGE, LAW, LOC, MONEY, NORP, ORDINAL, ORG, PERCENT, PERSON, PRODUCT, QUANTITY, TIME, WORK_OF_ART.

Live Demo Download Copy S3 URI

How to use

from sparknlp.pretrained import PretrainedPipeline

pipeline = PretrainedPipeline('onto_recognize_entities_electra_large')

result = pipeline.annotate("Johnson first entered politics when elected in 2001 as a member of Parliament. He then served eight years as the mayor of London, from 2008 to 2016, before rejoining Parliament.")
import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline

val pipeline = new PretrainedPipeline("onto_recognize_entities_electra_large")

val result = pipeline.annotate("Johnson first entered politics when elected in 2001 as a member of Parliament. He then served eight years as the mayor of London, from 2008 to 2016, before rejoining Parliament.")
import nlu
nlu.load("en.ner.onto.large").predict("""Johnson first entered politics when elected in 2001 as a member of Parliament. He then served eight years as the mayor of London, from 2008 to 2016, before rejoining Parliament.""")

Results

+------------+---------+
|chunk       |ner_label|
+------------+---------+
|Johnson     |PERSON   |
|first       |ORDINAL  |
|2001        |DATE     |
|eight years |DATE     |
|London      |GPE      |
|2008 to 2016|DATE     |
+------------+---------+

Model Information

Model Name: onto_recognize_entities_electra_large
Type: pipeline
Compatibility: Spark NLP 2.7.0+
Edition: Official
Language: en

Included Models

  • DocumentAssembler
  • SentenceDetectorDLModel
  • Tokenizer
  • BertEmbeddings
  • NerDLModel
  • NerConverter