bettergovph/gov-library
Philippine Legal Documents Dataset A comprehensive collection of Philippine legal documents from Lawphil.net, extracted from HTML to Markdown and organized for easy querying. Overview This dataset contains 114,340 legal documents spanning from 1900 to 2025, including: Jurisprudence (68,080 documents) - Supreme Court decisions Statutes (19,793 documents) - Republic Acts, Commonwealth Acts, Presidential Decrees, etc. Executive Issuances (26,458 documents) -… See the full description on the dataset page: https://huggingface.co/datasets/bettergovph/gov-library.
Philippine Legal Documents Dataset
A comprehensive collection of Philippine legal documents from Lawphil.net, extracted from HTML to Markdown and organized for easy querying.
Overview
This dataset contains 114,340 legal documents spanning from 1900 to 2025, including:
- Jurisprudence (68,080 documents) - Supreme Court decisions
- Statutes (19,793 documents) - Republic Acts, Commonwealth Acts, Presidential Decrees, etc.
- Executive Issuances (26,458 documents) - Administrative Orders, Executive Orders, Memorandum Orders, etc.
- Constitutions (9 documents) - Philippine constitutions from different periods
Categories
Source Details
Usage
Loading the Dataset
import pandas as pd
# Load the consolidated dataset
df = pd.read_parquet("lawphil_consolidated.parquet")
print(f"Total documents: {len(df):,}")
print(f"Columns: {df.columns.tolist()}")Filtering by Category
# Get all statutes
statutes = df[df['category'] == 'statutes']
# Get all jurisprudence
jurisprudence = df[df['category'] == 'juris']
# Get all executive issuances
executive = df[df['category'] == 'executive']Filtering by Source
# Get only Republic Acts
ra = df[df['source'] == 'repacts']
# Get only Executive Orders
eo = df[df['source'] == 'execord']
# Get only Administrative Orders
ao = df[df['source'] == 'ao']Filtering by Year
# Get documents from a specific year
docs_2020 = df[df['year'] == 2020]
# Get documents from a date range
docs_2000s = df[(df['year'] >= 2000) & (df['year'] < 2010)]Reading Document Content
# Get a specific document
doc = df.iloc[0]
print(f"Title: {doc['title']}")
print(f"Source: {doc['source']}")
print(f"Year: {doc['year']}")
print(f"Path: {doc['path']}")
print(f"\nContent:\n{doc['content'][:500]}...")Searching by Keyword
# Search in titles
results = df[df['title'].str.contains('labor', case=False, na=False)]
# Search in content
results = df[df['content'].str.contains('corruption', case=False, na=False)]Schema
Statistics
- Total Documents: 115,340
- Date Range: 1901-2025
- File Size: 753 MB (consolidated parquet)
- Sources: 14 different legal document types
Data Source
Documents were originally sourced from Lawphil.net, a project of the Arellano Law Foundation.
License
The original documents from Lawphil.net are licensed under Creative Commons Attribution-NonCommercial 4.0.
