Welcome to the webpage of ContractFrames, a framework able to translate natural language texts referring to the different events related to the status of a purchase contract to logic clauses from a legal reasoning system called PROLEG. Diverse frames and rules have been developed for the extraction and storage of this information before its conversion to logic clauses. Our framework uses natural language tools and rules to extract relevant information, store them in the form of frames, and return the PROLEG version of the input text. The information is also expressed in the form of Linked Data. The framework has been tested in a syntethic dataset, and shows promising results.

Data Model To access to the Data Model, please click here.

Example of input text and expected output

The following text is an example of input of our framework.

`person A' bought this_real_estate from `person B' at the price of 200000 dollars by contract0 on 1/January/2018. But `person A' rescinded contract0 because `person A' is a minor on 1/March/2018. However, this rescission was made because `person B' threatened `person A' on 1/February/2018. It is because `person B' would like to sell this_real_estate to `person C' in the higher price. So, `person A' rescinded rescission of contract0 on 1/April/2018.

The expected output in PROLEG clauses is the following:

agreement_of_purchase_contract(personA,personB,this_real_estate,200000,2018 year 01 month 01 day,contract0).
manifestation_fact(rescission(contract0),personA,personB,2018 year 03 month 01 day).
fact_of_duress(personB,personA,rescission(contract0),2018 year 02 month 01 day).
manifestation_fact(rescission(rescission(contract0)),personA,personB,2018 year 04 month 01 day).

These facts will be added to the PROLEG fact base so the rule base can infer new knowledge. An extract of the rule base is shown below:







The reasoning process derived is depicted in the following image

Contract Frames: representation and pipeline

The frames developed for representing the different situations that can involve a contract:

Although ContractFrames can detect additional information related to contracts, such as if one of the parts is a minor, most relevant facts are related to these three frames. ContractFrame's pipeline to extract the information from the text, populate the frames and translate them to PROLEG clauses it the following:

Besides the PROLEG clauses output, also an XML file with the events and relevant named entities extracted for visualization purposes is generated. An example of this XML (opened with GATE) is shown below:

Finally, an example of the kind of paraphrasing the framework is able to handle is depicted below. The following image is a capture of the CoreNLP tool online demo. The output of these three different phrases, since all of them provide the very same information, can be found right below.

agreement_of_purchase_contract(partB,partA,landL,20000,2017 year 10 month 13 day,contractC).


This work has been recently submitted to JURIX and JURISIN 2018, so no paper for citation can be provided for now. Code in GitHub is freely downloadable under a GNU General Public License v3.0 license.

If you plan to publish a work using this resource please refer to this webpage and the GitHub repository (and come back in a few months, hopefully we will have a paper to refer to!)