Explore interactively the API.
Alternative reference to the API generated by ReDoc.
Explore interactively the API.
We assume you need a textual representation of a specific section of the judgment document, for instance The Facts.
We also assume that you do not want to use SQL but rather a python library such as pandas
.
First, you need to load the file containing all the information about all cases: build/unstructured/cases.json
.
content
. The field content
contains itself a dictionary of documents related to a case.
{ 'content': "paragraph_or_section_title" 'elements': [] }
For first level nodes, corresponding to the main sections of the judgment, there is an attribute section_name
to identify specific sections.
It is then enough to find the node with the attribute section_name": "facts"
.
With the content of the section, if you need just the full text, you need to recursively reconstruct it.
This can be done by recursively aggregating each node using the following function: