CoolFace
Datasetpublic

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.

sourceHugging Faceupdated 8mo agoView on Hugging Face
1likes230downloads
Dataset Card

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

CategoryDescriptionSources
jurisSupreme Court decisions and jurisprudencejuris
statutesLegislative acts and statutesacts, repacts, comacts, bataspam, presdecs
executiveExecutive issuances and ordersao, execord, mo, mc, proc, genor
constiPhilippine constitutionsconsti

Source Details

SourceDescriptionYearsCount
jurisJurisprudence / Supreme Court decisions1901-202568,080
actsActs of the Philippine Commission/Assembly1900-19354,257
repactsRepublic Acts1946-202512,071
comactsCommonwealth Acts1935-1946733
bataspamBatas Pambansa1978-1994887
presdecsPresidential Decrees1972-19861,845
aoAdministrative Orders1936-20252,811
execordExecutive Orders1900s-2020s5,750
moMemorandum Orders1900s-2020s2,401
mcMemorandum Circulars1900s-2020s2,220
procProclamations1901-2020s13,195
genorGeneral Orders81
constiConstitutions1902, 1916, 1935, 1943, 1973, 1986, 19879

Usage

Loading the Dataset

python
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

python
# 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

python
# 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

python
# 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

python
# 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

python
# 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

ColumnTypeDescription
idstringUnique identifier (format: {source}:{path})
sourcestringDocument source (e.g., repacts, execord, juris)
categorystringHigh-level category (juris, statutes, executive, consti)
yearintYear of the document
monthintMonth of the document (for jurisprudence only)
pathstringFile path relative to project root
basenamestringFilename without extension
titlestringDocument title extracted from content
contentstringFull markdown content

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.