Datasets:
|
Download README.md from Azzindani/ID_REG_MD_KG: direct link, hf CLI and curl.
- Browser
- Download file 4.64 kB
-
https://huggingface.co/datasets/Azzindani/ID_REG_MD_KG/resolve/main/README.md
- Command line
-
hf download hf://datasets/Azzindani/ID_REG_MD_KG/README.md
-
curl -L -o README.md https://huggingface.co/datasets/Azzindani/ID_REG_MD_KG/resolve/main/README.md
4.64 kB
metadata
license: apache-2.0
language:
- id
tags:
- legal
- indonesia
- regulations
- knowledge-graph
- rag
task_categories:
- text-retrieval
- question-answering
size_categories:
- 100K<n<1M
ποΈ Indonesian Legal RAG Dataset with Knowledge Graph Enhancement
π What is this dataset?
This dataset contains Indonesian legal documents enhanced with Knowledge Graph features for building better RAG (Retrieval-Augmented Generation) systems. It includes regulations, laws, and legal documents from Indonesia with smart scoring and relationship mapping.
π― Perfect for: Legal AI, Indonesian NLP, RAG systems, legal research, and chatbots
β¨ Key Features
- π 50,000+ Indonesian legal documents
- π§ Knowledge Graph with legal entity relationships
- βοΈ Authority scores based on Indonesian legal hierarchy
- β° Temporal scores for document freshness
- π Cross-reference analysis between documents
- π Legal concept clustering (sanctions, rights, procedures, etc.)
- π― Ready-to-use embeddings preserved from source
- π Optimized for RAG retrieval systems
π What's Enhanced?
Original Fields (Preserved)
- Document text and metadata
- Embeddings and TF-IDF vectors
- Regulation details and dates
π New Knowledge Graph Fields
kg_entities- Extracted legal entities and referenceskg_concepts- Legal concepts with relationshipsauthority_score- Regulatory importance (0-1)temporal_score- Time-based relevance (0-1)legal_richness- Legal terminology density (0-1)cross_ref_strength- Citation connectivity (0-1)kg_connectivity- Graph relationship richness (0-1)
π Data Schema
| Field | Type | Description | Example |
|---|---|---|---|
π global_id |
string | Unique document ID | "legal_doc_001" |
π regulation_type |
string | Type of regulation | "UU", "PP", "PERPRES" |
ποΈ enacting_body |
string | Government entity | "Kementerian Hukum" |
π’ regulation_number |
string | Official number | "No. 8 Tahun 1999" |
π
year |
string | Year enacted | "1999" |
π about |
string | Document topic | "Perlindungan Konsumen" |
π content |
string | Full document text | "Pasal 1..." |
π― embedding |
list | Dense vectors | [0.1, 0.2, ...] |
π·οΈ kg_entities |
JSON string | Legal entities | See example above |
π§ kg_concepts |
JSON string | Concept relationships | See example above |
βοΈ authority_score |
float | Legal importance (0-1) | 0.85 |
β° temporal_score |
float | Document freshness (0-1) | 0.72 |
π legal_richness |
float | Content quality (0-1) | 0.68 |
ποΈ How It Was Built
1. π§ Knowledge Graph Construction
- Legal Hierarchy: Indonesian regulatory levels (UUD β UU β PP β PERPRES...)
- Entity Extraction: Regex patterns for laws, articles, government entities
- Concept Clustering: Groups related legal terms (sanctions, rights, procedures)
- Relationship Mapping: Connects legal concepts through semantic similarity
2. π Scoring Algorithms
- Authority Score: Based on Indonesian legal hierarchy (Constitution = highest)
- Temporal Score: Recent documents get higher scores
- Legal Richness: Density of legal terminology
- Cross-Reference: How often document is cited by others
- KG Connectivity: Richness of concept relationships
3. πΎ Memory-Efficient Processing
- Streaming data processing to handle large datasets
- Progressive saving to avoid memory issues
- Batch processing with cleanup
π Dataset Stats
- π Documents: 50,000+
- π·οΈ Entities per doc: 12.4 average
- π§ Concepts per doc: 8.7 average
- βοΈ Authority score: 0.72 Β± 0.18
- β° Temporal score: 0.68 Β± 0.22
- π― Processing success: 98.7%
β οΈ Important Notes
β What This Dataset Is Good For:
- π€ Building Indonesian legal RAG systems
- π Legal document search and retrieval
- π Legal analytics and research
- π― Training legal AI models
- π Understanding Indonesian legal structure
β What This Dataset Is NOT:
- βοΈ Not legal advice - for research only!
- π― Not 100% accurate - always verify with official sources
- π Not for other legal systems - specific to Indonesia
- β° Not always current - laws change over time
π Happy Legal AI Building! ποΈβ¨
Made with β€οΈ for the Indonesian NLP and Legal AI community