Home

The database

All of Lebanese law, as one database.

The library behind this site is a relational PostgreSQL database. This page describes its tables.

Download it free. The whole database is public on Hugging Face: taktekhq/lebanese-legislation. One Parquet file per table, including the graph of how texts amend and cite each other. Load it with pandas, DuckDB or the datasets library. The tables below are the ones behind every page of this site, with their live row counts. Questions: [email protected].

How it is kept

  • Every table is exported as sorted text files under version control, so every change to a law is a line in the history.
  • Every row records the page of the Centre it was read from, so each text can be traced to its source.

The tables

agreement
Treaties and agreements, with the text that ratified them. (1,973 rows)
amendment
Every change one text made to another, read from the amending article: which article, what it did, the new wording, from what date, and whether it was applied. (3,891 rows)
article_version
Each amended article's versions, oldest first, each with its date and the amendment that made it. (3,913 rows)
centre_error
Errors in the Lebanese University's own text of an article (one article repeating another, a stray letter), noted next to the article and never corrected in it. (3 rows)
code
The principal codes, with stable addresses. (24 rows)
court
The courts and chambers. (12 rows)
date_correction
Dates the Lebanese University printed wrong (a text signed after its own publication, a year typo, a placeholder): the printed date, the corrected one, how it was settled and the evidence. (583 rows)
doctrine_article
Articles from legal periodicals, with abstracts. (2,574 rows)
gazette_entry
Which texts each issue published, on which page. (104,049 rows)
gazette_issue
Official Gazette issues. (6,808 rows)
graph_edge
(269,857 rows)
legislation
Every law, decree and decision: kind, number, date, title, status, Official Gazette publication. (103,121 rows)
legislation_alias
The old address of a scanned text the Lebanese University has since published, and the text it now points to. (49 rows)
legislation_article
Each article, consolidated, in Arabic and in French where published, with its amendment notes. (389,149 rows)
legislation_kind
The 49 kinds of text, with English and French names. (53 rows)
legislation_scan
Texts the Lebanese University has not published yet, read by machine from scans of the Gazette's pages: where the scans came from, how many pages, and how far the two readings agree. Words they disagree on are marked in the text: U+E000 reading one, U+E001 reading two, U+E002. (1,456 rows)
legislation_section
Books, parts, chapters and sections, nested. (109,626 rows)
legislation_title_en
An unofficial English rendering of each text's subject line, written by a model (Claude Sonnet) from the Arabic title alone and labelled unofficial on the site. The Arabic title and text are the official version and the more accurate one; the English is there to help people and search engines find a text, and the text itself is never translated. (103,115 rows)
noindex_page
Pages kept out of search results and the sitemaps, with the reason: articles that are only a publication or repeal clause, documents with no title or no text. They stay on the site and linked. (100,329 rows)
opinion
Advisory opinions. (3,633 rows)
page_state
When each text, ruling, Gazette issue and document last changed, with a hash of what its page shows: the date the sitemaps give as lastmod. (165,774 rows)
reference
Every link from a document to a text or article, and whether the Centre's editors, our rules or a model made it. (20,964 rows)
research
Studies. (50 rows)
ruling
Court rulings: court, number, date, panel, text. (47,615 rows)
ruling_file
The scanned full judgment behind a ruling page (a PDF served at /ruling-files/<id>.pdf, not in the database): its size, SHA-256, when it was fetched and its page count once read. (43,910 rows)
ruling_page
The text of those scans, one row per page, read by machine. It may contain errors; the scan is the reference. (974 rows)
source_page
The raw page behind every row: address, archive path, SHA-256. (265,983 rows)

Examples

Every article of the Code of Obligations and Contracts that mentions «التضامن», with a ready citation:

SELECT number, citation, text_ar
FROM article_cited
WHERE law_id = 244226
  AND search_stem @@ websearch_to_tsquery('arabic', 'التضامن')
ORDER BY position;

The texts most often cited by the Court of Cassation, with how many rulings cite each:

SELECT l.title, count(DISTINCT r.from_id) AS rulings
FROM reference r JOIN legislation l ON l.id = r.law_id
JOIN ruling x ON x.id = r.from_id AND r.from_type = 'ruling'
WHERE x.court LIKE 'تمييز%'
GROUP BY l.title ORDER BY rulings DESC LIMIT 20;

Every text that repealed another, and what it repealed:

SELECT a.title AS repealing, b.title AS repealed
FROM reference r
JOIN legislation a ON a.id = r.from_id
JOIN legislation b ON b.id = r.law_id
WHERE r.from_type = 'legislation' AND r.relation = 'repeals';

Where it comes from

Every row records the page of the Lebanese University's Centre for Legal Informatics it was read from, with the SHA-256 of the page as served (source_page). Links between documents say who made them: the Centre's editors, our parser, or an AI model (reference.method).

Licence and credit

We don't own this data. The laws, rulings and Gazette issues are public texts of the Lebanese state, and the Lebanese University's مركز الدراسات والأبحاث في المعلوماتية القانونية collected and published them. We read them from the Centre's public site and add no rights or restrictions of our own. If you reuse them, credit the Centre: Source: Centre for Research and Studies in Legal Informatics, Lebanese University.