# Dataset: Legal Documents from STJ for Jurimetrics Research ## Dataset Overview This dataset contains legal documents from the **Superior Tribunal de Justiça (STJ)**, designed for research in **jurimetrics**, automatic text summarization, and retrieval-augmented generation (RAG). The dataset focuses on the challenges posed by **hierarchical structures**, **legal vocabulary**, **ambiguity**, and **citations** in legal texts. ## Contents The dataset includes: - **Ementas (Summaries):** Concise summaries of legal decisions. - **Document Types:** Classified by resource types (e.g., appeals, decisions, opinions). - **Tokens Count:** Pre-calculated token counts for analyzing document lengths. - **Metadata:** Additional attributes such as document dates, involved parties, and court sections. ## Dataset Features | Feature Name | Description | Data Type | |----------------------|-------------------------------------------------|-------------| | `id` | Unique identifier for the document. | String | | `type_of_resource` | Type of the legal document (e.g., appeal). | String | | `ementa` | Summary of the legal decision. | String | | `full_text` | Full content of the legal decision. | String | | `token_count` | Number of tokens in the document summary. | Integer | | `date` | Date of the decision (YYYY-MM-DD). | Date | | `metadata` | Additional information (parties, sections). | JSON Object | ## Dataset Usage This dataset can be used for tasks such as: 1. **Automatic Text Summarization:** Evaluating algorithms for generating or refining summaries. 2. **Document Classification:** Identifying the type or category of legal documents. 3. **Retrieval-Augmented Generation (RAG):** Improving legal text retrieval and contextual generation. 4. **Token Analysis:** Studying the distribution and challenges of token lengths in legal summaries. ## Data Source The data is sourced from publicly available legal decisions on the **Superior Tribunal de Justiça (STJ)**. Preprocessing steps were applied to ensure data consistency and usability for machine learning models. **Note:** Ensure compliance with ethical and legal considerations regarding the use of public legal documents. ## How to Load the Dataset Using the Hugging Face `datasets` library: ```python from datasets import load_dataset dataset = load_dataset("your-username/stj-legal-documents") print(dataset)