Description: For any two sentences, there are three ways they could be related: one could entail the other, one could contradict the other, or they could be unrelated. Natural Language Inferencing (NLI) is a popular NLP problem that involves determining how pairs of sentences (consisting of a premise and a hypothesis) arerelated. Your task is to create an NLI model that assigns labels of 0, 1, or 2 (corresponding to entailment, neutral, and contradiction) to pairs of premises and hypotheses.
To make a contract analyzer that goes through large contract texts and helps the user understand whether the topic of concern is contradictory or not with the contract.IntroductionMost of us nowadays, sign legal contracts or documents without being able to read all of it and going into the tiniest details. But little do we know that these small details can be used for manipulating us and going through the legal procedure in our country is also a pain. Most of those affected by these mishaps are the uneducated and poor who can't read or write in their mother tongues too. What if there was an app that could assist regarding these matters? A friend or well-wisher you should consult before signing an important document? That is the purpose of our app.
Contract Contradiction Checker is an app, which helps you to do the following:
Scan through the longest documents within seconds and find the most appropriate result according to your search.
Mention whether the information you want to retrieve aligns with the contract text and give you appropriate answers as to whether, the text is a contradiction, a neutral statement, or an entailment.
This app was built to assist the poor and uneducated, who often fall into traps due to contract-based manipulation. Hence, we have tried to make it accessible to them using voice-based assistance and interactive elements.
Contract Contradiction Checker (CCC) Gradio app can be accessed in the following ways:
Open the app available in the GitHub repository. Use the commands:- pip install gradio sentence_transformers transformers torch stanza PyMuPDF selenium python-docx odfpy pypandoc sentencepiece to install dependencies, followed by python main2.py. Also, use git checkout single-pretrained-model to switch to the branch that has the same functionality but uses the single cross-encoder NLI DeBERTa model, thus saving resources and increasing accuracy.
In order to use the barebones NLI, head over to the "Main App" tab and choose any two languages.

You can now add your sentences to check, in any of the languages that are required and the NLI will provide an output to you.

Now, in order to use the main app, choose the language in which you will address your concern or problem. You will be greeted with a playable voice output and a translated welcome message in your language.
Now enter the Topic of Concern and Detailed Description. You can do so by Transliteration, ASR and Translation, and headers of all of them can be translated into user languages as well for ease of access.
After getting the text in your desired language, copy and paste your text using the copy option in the input dialog and paste by ctrl+v into the Topic of Concern box and Detail Problem Description Box. Hence, the Copy and Paste functionality is necessary. You can see the outputs of all the extra functionality below.
Now upload your contract text or image in the Upload your legal document box. You can provide text input also.

Select the language of the contract text/image and submit
You will receive the desired output, referring to whether you have a contradiction in any sentences in the related paragraphs of the legal document.
Analyse the output and take further steps according to it.
Voice-based assistance according to user language will be provided at each step making the app more interactive and easier to use.
Web-parsed version of Sanskrit OCR using Selenium.
Semantic Search paraphrase-multilingual-mpnet-base-v2.3) Transliteration API (Source: Bhashini)
Translation API (Source: Bhashini)
ASR API (Source: Bhashini)
Fine-tuning NLI model Deberta Base V3 for Hindi, Bengali, Gujarati, Marathi, and Punjabi from IndicXNLI
Pretrained cross-encoder NLI Deberta V3 base on SNLI and MNLI.
Pretrained MoritzLaurer/mDeBERTa-v3-base-xnli-multilingual-nli-2mil7 to support the English language.
Document text reader using PyMuPDF
All resources are available on the GitHub repository.
View the project report file here
Get the model files here.
Note: prefer to use single-pretrained-model branch because of it being more responsive, lightweight and accurate than this one.
Description: For any two sentences, there are three ways they could be related: one could entail the other, one could contradict the other, or they could be unrelated. Natural Language Inferencing (NLI) is a popular NLP problem that involves determining how pairs of sentences (consisting of a premise and a hypothesis) arerelated. Your task is to create an NLI model that assigns labels of 0, 1, or 2 (corresponding to entailment, neutral, and contradiction) to pairs of premises and hypotheses.
To make a contract analyzer that goes through large contract texts and helps the user understand whether the topic of concern is contradictory or not with the contract.IntroductionMost of us nowadays, sign legal contracts or documents without being able to read all of it and going into the tiniest details. But little do we know that these small details can be used for manipulating us and going through the legal procedure in our country is also a pain. Most of those affected by these mishaps are the uneducated and poor who can't read or write in their mother tongues too. What if there was an app that could assist regarding these matters? A friend or well-wisher you should consult before signing an important document? That is the purpose of our app.
Contract Contradiction Checker is an app, which helps you to do the following:
Scan through the longest documents within seconds and find the most appropriate result according to your search.
Mention whether the information you want to retrieve aligns with the contract text and give you appropriate answers as to whether, the text is a contradiction, a neutral statement, or an entailment.
This app was built to assist the poor and uneducated, who often fall into traps due to contract-based manipulation. Hence, we have tried to make it accessible to them using voice-based assistance and interactive elements.
Contract Contradiction Checker (CCC) Gradio app can be accessed in the following ways:
Open the app available in the GitHub repository. Use the commands:- pip install gradio sentence_transformers transformers torch stanza PyMuPDF selenium python-docx odfpy pypandoc sentencepiece to install dependencies, followed by python main2.py. Also, use git checkout single-pretrained-model to switch to the branch that has the same functionality but uses the single cross-encoder NLI DeBERTa model, thus saving resources and increasing accuracy.
In order to use the barebones NLI, head over to the "Main App" tab and choose any two languages.

You can now add your sentences to check, in any of the languages that are required and the NLI will provide an output to you.

Now, in order to use the main app, choose the language in which you will address your concern or problem. You will be greeted with a playable voice output and a translated welcome message in your language.
Now enter the Topic of Concern and Detailed Description. You can do so by Transliteration, ASR and Translation, and headers of all of them can be translated into user languages as well for ease of access.
After getting the text in your desired language, copy and paste your text using the copy option in the input dialog and paste by ctrl+v into the Topic of Concern box and Detail Problem Description Box. Hence, the Copy and Paste functionality is necessary. You can see the outputs of all the extra functionality below.
Now upload your contract text or image in the Upload your legal document box. You can provide text input also.

Select the language of the contract text/image and submit
You will receive the desired output, referring to whether you have a contradiction in any sentences in the related paragraphs of the legal document.
Analyse the output and take further steps according to it.
Voice-based assistance according to user language will be provided at each step making the app more interactive and easier to use.
Web-parsed version of Sanskrit OCR using Selenium.
Semantic Search paraphrase-multilingual-mpnet-base-v2.3) Transliteration API (Source: Bhashini)
Translation API (Source: Bhashini)
ASR API (Source: Bhashini)
Fine-tuning NLI model Deberta Base V3 for Hindi, Bengali, Gujarati, Marathi, and Punjabi from IndicXNLI
Pretrained cross-encoder NLI Deberta V3 base on SNLI and MNLI.
Pretrained MoritzLaurer/mDeBERTa-v3-base-xnli-multilingual-nli-2mil7 to support the English language.
Document text reader using PyMuPDF
All resources are available on the GitHub repository.
View the project report file here
Get the model files here.
Note: prefer to use single-pretrained-model branch because of it being more responsive, lightweight and accurate than this one.