Automated method and system for extraction and classification of statute facets from legal statutes
Current approaches for identifying statute facets consider facet type similar to rhetorical roles defined for statute text. However, the nature and content of statutes are quite different from court judgements and established set of rhetorical roles for court judgements are either not applicable for statutes or not sufficient to cover all the key aspects in statutes. Present disclosure provides method and system for extraction and classification of statute facets from legal statutes. The system first takes text of a statute as input. The system then automatically extracts candidate statute facets from statute text using dependency structure and then computes statute specificity for candidate statute facets. Thereafter, the system classifies candidate statute facets into facet types using weak supervision for validation purpose. Further, system selects statute facets from candidate statute facets based on statute specificity of candidate statute facet and statute facet type of candidate statute facet using customized filtering technique.
1 . A processor implemented method, comprising:
receiving, by a statute facets extraction system (SFES) via one or more hardware processors, a legal document, the legal document comprising a plurality of sections associated with a statute;
for each section of the plurality of sections present in the document, performing:
identifying, by the SFES via the one or more hardware processors, one or more sentences that are present in a section, and sequence of each sentence of the one or more sentences using a sentence splitting technique;
extracting, by the SFES via the one or more hardware processors, a plurality of candidate statute facets from each sentence of the one or more sentences using a natural language processing technique;
computing, by the SFES via the one or more hardware processors, statute specificity of each candidate statute facet of the plurality of candidate statute facets using a ranking function;
identifying, by the SFES via the one or more hardware processors, a statute facet type of each candidate statute facet using one or more weakly supervised models, wherein few-shots natural language inference (FS-NLI) and few-shots sentence pair classification using legal bidirectional encoder representations from transformers (FS-LBERT) are used as the weakly supervised models, wherein identifying a statute facet type of each using one or more weakly supervised model comprises:
for each candidate statute facet, performing:
identifying, by the SFES via the one or more hardware processors, a candidate statute facet as a premise;
accessing, by the SFES via the one or more hardware processors, a plurality of facet type definitions present in a hypothesis inventory, wherein the hypothesis inventory is maintained in the facet database;
for each facet type definition of the plurality of facet type definitions, performing:
identifying, by the SFES via the one or more hardware processors, a facet type definition as a hypothesis for the candidate statute facet;
determining, by the SFES via the one or more hardware processors, an entailment label and an entailment probability for the candidate statute facet based on the premise and the hypothesis identified for the respective candidate statute facet using a first weakly supervised model;
comparing, by the SFES via the one or more hardware processors, the entailment probability determined for the candidate statute facet with a predefined entailment probability threshold; and
saving, by the SFES via the one or more hardware processors, the entailment label and the entailment probability determined for the candidate statute facet corresponding to the hypothesis in an entailment probability list based on the comparison, wherein when the first weakly supervised model predicts entailment label with a probability above a predefined threshold, the type is considered as the predicted facet type for the given candidate statute facet, further comprising:
for each candidate statute facet, performing:
accessing, by the SFES via the one or more hardware processors, a sentence from which the candidate statute facet is extracted; and
determining, the SFES via the one or more hardware processors, a second facet type for the candidate statute facet based on the candidate statute facet and the accessed sentence using a second weakly supervised model;
selecting, by the SFES via the one or more hardware processors, one or more statute facets from the plurality of candidate statute facets based, at least in part, on the statute specificity of each candidate statute facet and the statute facet type of each candidate statute facet using a customized filtering technique;
identifying, by the SFES via the one or more hardware processors, the selected one or more statute facets as one or more final statute facets for the section; and
storing, by the SFES via the one or more hardware processors, the one or more final statute facets for the section in a facets database;
identifying, by the SFES via the one or more hardware processors, a plurality of statute facets for the statute by accessing the one or more final statute facets that are available for each section of the plurality of sections from the facets database; and
displaying, by the SFES via the one or more hardware processors, the plurality of statute facets for the statute on a user device, wherein the plurality of statute facets for the statute are stored in the facets database for further use by one or more downstream applications.
2 . The processor implemented method of claim 1 , wherein the step of extracting, by the SFES via the one or more hardware processors, the plurality of candidate statute facets from each sentence of the one or more sentences using the natural language processing technique comprises:
generating, by the SFES via the one or more hardware processors, a dependency parse tree of each sentence of the one or more sentences using the natural language processing technique;
determining, by the SFES via the one or more hardware processors, one or more noun phrases and one or more verb phrases present in each sentence based, at least in part, on the dependency parse tree of a respective sentence, one or more linguistic rules and a part of speech tags of word in the respective sentence; and
identifying, by the SFES via the one or more hardware processors, the one or more noun phrases and the one or more verb phrases that are determined for each sentence as the plurality of candidate statute facets for the respective sentence, wherein when the one or more noun phrases and the one or more verb phrases is not a stop word in the dependency parse tree of the respective sentence, then expand the dependency parse tree to get the one or more noun phrases and the one or more verb phrases, wherein ignore adjunct clauses associated with predefined dependency relations including adverbial clause and appositive clause, based on a plurality of linguistic rules stored in a database.
3 . The processor implemented method of claim 1 , wherein the step of computing, by the SFES via the one or more hardware processors, the statute specificity of each candidate statute facet of the plurality of candidate statute facets using the ranking function comprises:
passing, by the SFES via the one or more hardware processors, each candidate statute facet as a query on an index of statute documents to obtain a ranked list of statute documents using the ranking function, wherein the ranked list of statute documents comprises a rank of each statute document with respect to the passed candidate statute facet; and
computing, by the SFES via the one or more hardware processors, the statute specificity of each candidate statute facet based, at least in part, on the rank of the statute in the ranked list of statute documents.
4 . The processor implemented method of claim 1 , wherein the step of identifying, by the SFES via the one or more hardware processors, a statute facet type of each candidate statute facet using one or more weakly supervised models further comprises:
accessing, by the SFES via the one or more hardware processors, one or more entailment labels and one or more entailment probabilities stored for the candidate statute facet from the entailment probability list;
determining, by the SFES via the one or more hardware processors, an entailment label with a highest entailment probability among the one or more entailment probabilities;
selecting, by the SFES via the one or more hardware processors, the determined entailment label for the candidate statute facet; and
identifying, by the SFES via the one or more hardware processors, the selected entailment label for the candidate statute facet as a first facet type for the respective candidate statute facet.
5 . The processor implemented method of claim 4 , wherein the customized filtering technique comprises:
for each candidate statute facet, performing:
determining whether the statute specificity of the candidate statute facet is within a predefined statute specificity limit;
adding the candidate statute facet in an eligible list upon determining that statute specificity is within the predefined statute specificity limit;
for each candidate statute facet present in the eligible list, performing:
determining whether the first facet type and the second facet type of the candidate statute facet are identical;
adding the candidate statute facet in a final list upon determining that the first facet type and the second facet type of the candidate statute facet are identical; and
identifying the one or more candidate statute facets present in the final list as one or more statute facets.
6 . A statute facets extraction system, comprising:
a memory storing instructions;
one or more communication interfaces; and
one or more hardware processors coupled to the memory via the one or more communication interfaces, wherein the one or more hardware processors are configured by the instructions to:
receive a legal document, the legal document comprising a plurality of sections associated with a statute;
for each section of the plurality of sections present in the document, perform:
identify one or more sentences that are present in a section, and sequence of each sentence of the one or more sentences using a sentence splitting technique;
extract a plurality of candidate statute facets from each sentence of the one or more sentences using a natural language processing technique;
compute statute specificity of each candidate statute facet of the plurality of candidate statute facets using a ranking function;
identify a statute facet type of each candidate statute facet using one or more weakly supervised models, wherein few-shots natural language inference (FS-NLI) and few-shots sentence pair classification using legal bidirectional encoder representations from transformers (FS-LBERT) are used as the weakly supervised models, wherein identifying a statute facet type of each using one or more weakly supervised model comprises;
for each candidate statute facet, performing:
identifying, by the SFES via the one or more hardware processors, a candidate statute facet as a premise;
accessing, by the SFES via the one or more hardware processors, a plurality of facet type definitions present in a hypothesis inventory, wherein the hypothesis inventory is maintained in the facet database;
for each facet type definition of the plurality of facet type definitions, performing:
identifying, by the SFES via the one or more hardware processors, a facet type definition as a hypothesis for the candidate statute facet;
determining, by the SFES via the one or more hardware processors, an entailment label and an entailment probability for the candidate statute facet based on the premise and the hypothesis identified for the respective candidate statute facet using a first weakly supervised model;
comparing, by the SFES via the one or more hardware processors, the entailment probability determined for the candidate statute facet with a predefined entailment probability threshold; and
saving, by the SFES via the one or more hardware processors, the entailment label and the entailment probability determined for the candidate statute facet corresponding to the hypothesis in an entailment probability list based on the comparison, wherein when the first weakly supervised model predicts entailment label with a probability above a predefined threshold, the type is considered as the predicted facet type for the given candidate statute facet, further comprising:
for each candidate statute facet, performing:
accessing, by the SFES via the one or more hardware processors, a sentence from which the candidate statute facet is extracted; and
determining, the SFES via the one or more hardware processors, a second facet type for the candidate statute facet based on the candidate statute facet and the accessed sentence using a second weakly supervised model;
select one or more statute facets from the plurality of candidate statute facets based, at least in part, on the statute specificity of each candidate statute facet and the statute facet type of each candidate statute facet using a customized filtering technique;
identify the selected one or more statute facets as one or more final statute facets for the section; and
store the one or more final statute facets for the section in a facets database;
identify a plurality of statute facets for the statute by accessing the one or more final statute facets that are available for each section of the plurality of sections from the facets database; and
display the plurality of statute facets for the statute on a user device, wherein the plurality of statute facets for the statute are stored in the facets database for further use by one or more downstream applications.
7 . The statute facets extraction system of claim 6 , wherein for extracting the plurality of candidate statute facets from each sentence of the one or more sentences using the natural language processing technique, the one or more hardware processors are configured by the instructions to:
generate a dependency parse tree of each sentence of the one or more sentences using the natural language processing technique;
determine one or more noun phrases and one or more verb phrases present in each sentence based, at least in part, on the dependency parse tree of a respective sentence, one or more linguistic rules and a part of speech tags of word in the respective sentence; and
identify the one or more noun phrases and the one or more verb phrases that are determined for each sentence as the plurality of candidate statute facets for the respective sentence, wherein when the one or more noun phrases and the one or more verb phrases is not a stop word in the dependency parse tree of the respective sentence, then expand the dependency parse tree to get the one or more noun phrases and the one or more verb phrases, ignore adjunct clauses associated with predefined dependency relations including adverbial clause (advcl) and appositive clause (appos), based on a plurality of linguistic rules stored in a database.
8 . The statute facets extraction system of claim 6 , wherein for computing the statute specificity of each candidate statute facet of the plurality of candidate statute facets using the ranking function, the one or more hardware processors are configured by the instructions to:
pass each candidate statute facet as a query on an index of statute documents to obtain a ranked list of statute documents using the ranking function, wherein the ranked list of statute documents comprises a rank of each statute document with respect to the passed candidate statute facet; and
compute the statute specificity of each candidate statute facet based, at least in part, on the rank of the statute in the ranked list of statute documents.
9 . The statute facets extraction system of claim 6 , wherein for identifying a statute facet type of each candidate statute facet using one or more weakly supervised models, further the one or more hardware processors are configured by the instructions to:
access one or more entailment labels and one or more entailment probabilities stored for the candidate statute facet from the entailment probability list;
determine an entailment label with a highest entailment probability among the one or more entailment probabilities;
select the determined entailment label for the candidate statute facet; and
identify the selected entailment label for the candidate statute facet as a first facet type for the respective candidate statute facet.
10 . The statute facets extraction system of claim 6 , wherein the customized filtering technique comprises:
determine whether the statute specificity of the candidate statute facet is within a predefined statute specificity limit;
add the candidate statute facet in an eligible list upon determining that statute specificity is within the predefined statute specificity limit; and
for each candidate statute facet present in the eligible list, perform:
determine whether the first facet type and the second facet type of the candidate statute facet are identical;
add the candidate statute facet in a final list upon determining that the first facet type and the second facet type of the candidate statute facet are identical; and
identify the one or more candidate statute facets present in the final list as one or more statute facets.
11 . One or more non-transitory machine-readable information storage mediums comprising one or more instructions which when executed by one or more hardware processors cause:
receiving, by a statute facets extraction system (SFES), a legal document, the legal document comprising a plurality of sections associated with a statute;
for each section of the plurality of sections present in the document, performing:
identifying, by the SFES, one or more sentences that are present in a section, and sequence of each sentence of the one or more sentences using a sentence splitting technique;
extracting, by the SFES, a plurality of candidate statute facets from each sentence of the one or more sentences using a natural language processing technique;
computing, by the SFES, statute specificity of each candidate statute facet of the plurality of candidate statute facets using a ranking function;
identifying, by the SFES, a statute facet type of each candidate statute facet using one or more weakly supervised models, wherein few-shots natural language inference (FS-NLI) and few-shots sentence pair classification using legal bidirectional encoder representations from transformers (FS-LBERT) are used as the weakly supervised models, wherein identifying a statute facet type of each using one or more weakly supervised model comprises:
for each candidate statute facet, performing:
identifying, by the SFES via the one or more hardware processors, a candidate statute facet as a premise;
accessing, by the SFES via the one or more hardware processors, a plurality of facet type definitions present in a hypothesis inventory, wherein the hypothesis inventory is maintained in the facet database;
for each facet type definition of the plurality of facet type definitions, performing:
identifying, by the SFES via the one or more hardware processors, a facet type definition as a hypothesis for the candidate statute facet;
determining, by the SFES via the one or more hardware processors, an entailment label and an entailment probability for the candidate statute facet based on the premise and the hypothesis identified for the respective candidate statute facet using a first weakly supervised model;
comparing, by the SFES via the one or more hardware processors, the entailment probability determined for the candidate statute facet with a predefined entailment probability threshold; and
saving, by the SFES via the one or more hardware processors, the entailment label and the entailment probability determined for the candidate statute facet corresponding to the hypothesis in an entailment probability list based on the comparison, wherein when the first weakly supervised model predicts entailment label with a probability above a predefined threshold, the type is considered as the predicted facet type for the given candidate statute facet, further comprising:
for each candidate statute facet, performing:
accessing, by the SFES via the one or more hardware processors, a sentence from which the candidate statute facet is extracted; and
determining, the SFES via the one or more hardware processors, a second facet type for the candidate statute facet based on the candidate statute facet and the accessed sentence using a second weakly supervised model;
selecting, by the SFES, one or more statute facets from the plurality of candidate statute facets based, at least in part, on the statute specificity of each candidate statute facet and the statute facet type of each candidate statute facet using a customized filtering technique;
identifying, by the SFES, the selected one or more statute facets as one or more final statute facets for the section; and
storing, by the SFES, the one or more final statute facets for the section in a facets database;
identifying, by the SFES, a plurality of statute facets for the statute by accessing the one or more final statute facets that are available for each section of the plurality of sections from the facets database; and
displaying, by the SFES, the plurality of statute facets for the statute on a user device, wherein the plurality of statute facets for the statute are stored in the facets database for further use by one or more downstream applications.
12 . The one or more non-transitory machine-readable information storage mediums of claim 11 , wherein the step of extracting, by the SFES the plurality of candidate statute facets from each sentence of the one or more sentences using the natural language processing technique comprises:
generating, by the SFES, a dependency parse tree of each sentence of the one or more sentences using the natural language processing technique;
determining, by the SFES, one or more noun phrases and one or more verb phrases present in each sentence based, at least in part, on the dependency parse tree of a respective sentence, one or more linguistic rules and a part of speech tags of word in the respective sentence; and
identifying, by the SFES, the one or more noun phrases and the one or more verb phrases that are determined for each sentence as the plurality of candidate statute facets for the respective sentence, wherein when the one or more noun phrases and the one or more verb phrases is not a stop word in the dependency parse tree of the respective sentence, then expand the dependency parse tree to get the one or more noun phrases and the one or more verb phrases, wherein ignore adjunct clauses associated with predefined dependency relations including adverbial clause and appositive clause, based on a plurality of linguistic rules stored in a database.
13 . The one or more non-transitory machine-readable information storage mediums of claim 11 , wherein the step of computing, by the SFES the statute specificity of each candidate statute facet of the plurality of candidate statute facets using the ranking function comprises:
passing, by the SFES, each candidate statute facet as a query on an index of statute documents to obtain a ranked list of statute documents using the ranking function, wherein the ranked list of statute documents comprises a rank of each statute document with respect to the passed candidate statute facet; and
computing, by the SFES, the statute specificity of each candidate statute facet based, at least in part, on the rank of the statute in the ranked list of statute documents.
14 . The one or more non-transitory machine-readable information storage mediums of claim 11 , wherein the step of identifying, by the SFES a statute facet type of each candidate statute facet using one or more weakly supervised models further comprises:
accessing, by the SFES, one or more entailment labels and one or more entailment probabilities stored for the candidate statute facet from the entailment probability list;
determining, by the SFES, an entailment label with a highest entailment probability among the one or more entailment probabilities;
selecting, by the SFES, the determined entailment label for the candidate statute facet; and
identifying, by the SFES, the selected entailment label for the candidate statute facet as a first facet type for the respective candidate statute facet.
15 . The one or more non-transitory machine-readable information storage mediums of claim 14 , wherein the customized filtering technique comprises:
for each candidate statute facet, performing:
determining whether the statute specificity of the candidate statute facet is within a predefined statute specificity limit;
adding the candidate statute facet in an eligible list upon determining that statute specificity is within the predefined statute specificity limit;
for each candidate statute facet present in the eligible list, performing:
determining whether the first facet type and the second facet type of the candidate statute facet are identical;
adding the candidate statute facet in a final list upon determining that the first facet type and the second facet type of the candidate statute facet are identical; and
identifying the one or more candidate statute facets present in the final list as one or more statute facets.