Datasets:
license: apache-2.0
task_categories:
- summarization
- text-generation
- feature-extraction
tags:
- legal
- droit
- jurisprudence
- cassation
- judilibre
pretty_name: >-
Training dataset for summarizing and titling decisions of the French Court of
Cassation
size_categories:
- 10K<n<100K
language:
- fr
Dataset Description
- Repository: https://huggingface.co/datasets/maurya/alpaca_ccass_motivations_sommaires_titres
- Leaderboard: N/A
- Point of Contact: Amaury Fouret
Training dataset for summarizing and titling decisions of the French Court of cassation based on motivations
This alpaca-format dataset is designed to train models for summarizing and titling French Supreme Court decisions based on the grounds of them. Created with a view to producing metadata for decisions not published in the bulletin, this dataset aims to simplify the development of annotation and categorization tools, and is positioned as a facilitator for jurisprudential processing and information organization.
Dataset Structure
The dataset includes hierarchical keyword extraction task that generates structured legal taxonomies from court decisions. The hierarchical keywords follow a specific format using special tokens to denote a hierarchical relationship between keywords of different levels.
Special Tokens
When fine-tuning models on this dataset, you will need to add the following special tokens to your tokenizer to properly handle the hierarchical keyword structure:
Required Special Tokens
additional_special_tokens = [
"<start_hierarchy>", "<end_hierarchy>",
"<start_level1>", "<end_level1>",
"<start_level2>", "<end_level2>",
"<start_level3>", "<end_level3>",
"<start_level4>", "<end_level4>",
"<start_level5>", "<end_level5>",
"<start_level6>", "<end_level6>",
"<start_level7>", "<end_level7>",
"<start_level8>", "<end_level8>",
"<start_level9>", "<end_level9>",
"<start_level10>", "<end_level10>",
"<start_level11>", "<end_level11>",
"<start_level12>", "<end_level12>",
"<start_level13>", "<end_level13>"
]
Example Output Format
The hierarchical keywords are structured as follows:
<start_hierarchy><start_level1>REPRESENTATION DES SALARIES<end_level1><start_level2>Comité d'entreprise<end_level2><start_level3>Fonctionnement<end_level3><start_level4>Réunion<end_level4><start_level5>Présidence<end_level5><end_hierarchy>
Implementation
Adding Special Tokens to Your Tokenizer
from transformers import AutoTokenizer
# Load your base tokenizer
tokenizer = AutoTokenizer.from_pretrained("your-base-model")
# Add the special tokens
tokenizer.add_tokens(additional_special_tokens, special_tokens=True)
# Don't forget to resize your model's token embeddings
model.resize_token_embeddings(len(tokenizer))
Configuration File Setup
For YAML configuration files:
special_tokens:
bos_token: "<s>"
eos_token: "</s>"
unk_token: "<unk>"
pad_token: "[PAD]"
additional_special_tokens:
- "<start_hierarchy>"
- "<end_hierarchy>"
- "<start_level1>"
- "<end_level1>"
# ... (include all tokens up to level 13)
Use Cases
- Legal Text Summarization: Generate concise summaries of court decisions
- Hierarchical Classification: Extract structured legal taxonomies
- Metadata Generation: Create standardized metadata for unpublished decisions
- Legal Research Tools: Facilitate automated categorization and search
Dataset Features
- Alpaca instruction format for easy integration with popular training frameworks
- Hierarchical keyword structures with up to 14 levels of legal classification
- Specialized for French Court of Cassation decisions and legal reasoning patterns
Feedback
If you have any feedback, please reach out at Amaury Fouret.