Legal NER Pipeline(Parties, Dates, Document Type)

Description

IMPORTANT: Don’t run this pretrained pipeline on the whole legal agreement. Instead:

  • Split by paragraphs. You can use notebook 1 in Finance or Legal as inspiration;
  • Use the legclf_introduction_clause Text Classifier to select only these paragraphs;

This is a Legal NER Pipeline, aimed to process the first page of the agreements when information can be found about:

  • Parties of the contract/agreement;
  • Aliases of those parties, or how those parties will be called further on in the document;
  • Document Type;
  • Effective Date of the agreement;

This pretrained pipeline can be used all along with its Relation Extraction model to retrieve the relations between these entities, called legre_contract_doc_parties

Other models can be found to detect other parts of the document, as Headers/Subheaders, Signers, “Will-do”, etc.

Copy S3 URI

How to use

legal_pipeline = nlp.PretrainedPipeline("legpipe_ner_contract_doc_parties_alias_former", "en", "legal/models")

text = ['''This Consulting Agreement (the "Agreement"), made this 27t h day of March, 2017 is entered into by Immunotolerance, Inc., a Delaware corporation (the "Company"), and Alan Crane, an individual (the "Consultant").''']

result = legal_pipeline.annotate(text)

Results


+------------------------+---------+
|chunk                   |ner_label|
+------------------------+---------+
|Consulting Agreement    |DOC      |
|"Agreement"             |ALIAS    |
|27t h day of March, 2017|EFFDATE  |
|Immunotolerance         |PARTY    |
|"Company"               |ALIAS    |
|Alan Crane              |PARTY    |
|"Consultant"            |ALIAS    |
+------------------------+---------+

Model Information

Model Name: legpipe_ner_contract_doc_parties_alias_former
Type: pipeline
Compatibility: Legal NLP 1.0.0+
License: Licensed
Edition: Official
Language: en
Size: 949.3 MB

Included Models

  • DocumentAssembler
  • SentenceDetector
  • TokenizerModel
  • ContextualParserModel
  • ContextualParserModel
  • RoBertaEmbeddings
  • LegalNerModel
  • NerConverterInternalModel
  • ZeroShotNerModel
  • NerConverterInternalModel
  • ChunkMergeModel