Legal Contract NLI


This is a text-to-text generation model (encode-decoder architecture) that has undergone fine-tuning on contract for Natural Language Inference on in-house curated dataset, aiming to streamline and expedite the contract review process. The objective of this task is to provide a system with a set of hypotheses, like “Some obligations of Agreement may survive termination,” along with a contract, and task it with classifying whether each hypothesis is entailed, contradicted, or not mentioned (neutral) by the contract.

Predicted Entities

Contradiction, Entailment, Neutral

Copy S3 URI

How to use

document_assembler = nlp.DocumentAssembler()\

flant5 = legal.TextGenerator.pretrained('leggen_contract_nli','en','legal/models')\

pipeline = nlp.Pipeline(stages=[document_assembler, flant5])

data = spark.createDataFrame([
   [1, '''mnli hypothesis:
Receiving Party shall not use any Confidential Information for any purpose other than the purposes stated in Agreement.
(a) furnish only that portion of the Proprietary Information which in its reasonable opinion, based upon advice of counsel, it is legally compelled to disclose, and (b) at the other Party's cost, cooperate with the efforts of the Party to obtain order or other reliable assurance that confidential treat will he accorded to such portion of the Proprietary Information as may be disclosed.
''']]).toDF('id', 'text')

results ="generated.result").show(truncate=False)


|result   |

Model Information

Model Name: leggen_contract_nli
Compatibility: Legal NLP 1.0.0+
License: Licensed
Edition: Official
Language: en
Size: 1.6 GB