CoolFace
Datasetpublic

Maathis-com/ohada-ccja-graph

OHADA-CCJA Legal Knowledge Graph Dataset Description A heterogeneous knowledge graph extracted from 4,059 court decisions of the Cour Commune de Justice et d'Arbitrage (CCJA), the supranational court of the Organisation pour l'Harmonisation en Afrique du Droit des Affaires (OHADA). The graph captures the relational structure of pan-African business law jurisprudence across 17 member states, spanning 1997–2023. This is the graph companion to the tabular OHADA-CCJA… See the full description on the dataset page: https://huggingface.co/datasets/Maathis-com/ohada-ccja-graph.

sourceHugging Facecc-by-4.0updated 6mo agoView on Hugging Face
0likes59downloads
Dataset Card

OHADA-CCJA Legal Knowledge Graph

Dataset Description

A heterogeneous knowledge graph extracted from 4,059 court decisions of the Cour Commune de Justice et d'Arbitrage (CCJA), the supranational court of the Organisation pour l'Harmonisation en Afrique du Droit des Affaires (OHADA). The graph captures the relational structure of pan-African business law jurisprudence across 17 member states, spanning 1997–2023.

This is the graph companion to the tabular OHADA-CCJA Court Decisions Corpus. The tabular dataset provides the raw text and metadata; this dataset provides the extracted relational structure for graph ML research.

[image]

Why a Graph?

Legal reasoning is inherently relational. Courts cite prior decisions, apply specific legal articles, and resolve disputes between named parties under particular branches of law. These relationships are invisible in a flat tabular format but become first-class features in a graph. This dataset makes them explicit, enabling research at the intersection of legal NLP and graph machine learning — a combination that has received almost no attention for African legal systems.

Graph Schema

The graph contains 11,131 nodes across 6 types and 33,408 edges across 6 relation types.

Node Types

Node TypeCountDescription
Case4,059CCJA court decisions, with metadata (year, legal domain, source)
Legal Domain16Branches of OHADA law (e.g., enforcement, commercial companies, arbitration)
OHADA Member State17Countries in the OHADA zone (Benin through Togo)
Acte Uniforme9OHADA Uniform Acts — the harmonized legal instruments
Article669Individual legal articles cited in decisions
Party6,361Litigants (companies, individuals, institutions)

Edge Types

RelationSourceTargetCountDescription
citesCaseCase796Inter-case citation (precedent references)
classified_asCaseLegal Domain4,049Legal domain classification
originates_fromCaseMember State4,318Geographic origin of the dispute
referencesCaseActe Uniforme1,577Which Uniform Act the decision applies
cites_articleCaseArticle15,668Specific legal articles cited
involvesCaseParty7,000Plaintiff (3,526) and defendant (3,474) relationships

Graph Statistics

MetricValue
Total nodes11,131
Total edges33,408
Average degree (Case nodes)~8.2
Case-cites-Case resolved to known cases151 (19%)
Case-cites-Case unresolved (external citations)645
Unique citing cases604
Most cited articleArticle 13 (1,363 citations)
Most connected countryCôte d'Ivoire (1,437 cases)
Most referenced Acte UniformeAUPSRVE (984 cases)

Geographic Distribution

CountryCasesCountryCases
Côte d'Ivoire1,437Mali121
Cameroun839Guinée83
Sénégal494Congo-Brazzaville76
Burkina Faso442Congo-RDC65
Niger187Centrafrique47
Togo166Tchad37
Gabon154Guinée Equatoriale6
Bénin154Guinée-Bissau5
Comores5

Acte Uniforme Distribution

CodeFull NameCases
AUPSRVEProcédures simplifiées de recouvrement et voies d'exécution984
AUSCGIEDroit des sociétés commerciales et GIE169
AUDCGDroit commercial général162
AUPCProcédures collectives103
AUSOrganisation des sûretés92
AUADroit de l'arbitrage63
AUCTMRContrats de transport de marchandises par route2
AUSCOOPDroit des sociétés coopératives2

Supported ML Tasks

TaskTypeDescription
Legal citation predictionLink predictionGiven a new case, predict which prior CCJA decisions it will cite
Legal domain classificationNode classificationClassify cases using graph topology, text features, or both
Knowledge graph completionKGCPredict missing articles cited, legal domains, or party roles
Temporal jurisprudence analysisTemporal graphTrack how citation patterns and legal domains evolve over 25 years
Community detectionClusteringDiscover clusters of related jurisprudence
Graph-based legal retrievalGNN retrievalRetrieve relevant precedents using graph structure
Multi-relational reasoningHeterogeneous GNNJoint reasoning over cases, articles, parties, and countries

Dataset Structure

File Layout

ohada_graph/
├── nodes/
│   ├── cases.csv              # 4,059 case nodes with metadata
│   ├── legal_domains.csv      # 16 legal domain nodes
│   ├── member_states.csv      # 17 OHADA member state nodes
│   ├── actes_uniformes.csv    # 9 Acte Uniforme nodes
│   ├── articles.csv           # 669 legal article nodes
│   └── parties.csv            # 6,361 party nodes
├── edges/
│   ├── case_cites_case.csv          # 796 inter-case citations
│   ├── case_classified_as_domain.csv # 4,049 domain classifications
│   ├── case_originates_from_state.csv # 4,318 geographic edges
│   ├── case_references_acte.csv      # 1,577 Acte Uniforme references
│   ├── case_cites_article.csv        # 15,668 article citations
│   └── case_involves_party.csv       # 7,000 party involvement edges
├── load_pyg.py               # PyTorch Geometric HeteroData loader
└── import_neo4j.cypher       # Neo4j Cypher import script

Node Schemas

cases.csv: case_id, case_number, date, year, legal_domain, jurisdiction, source, text_length

legal_domains.csv: domain_id, name, case_count

member_states.csv: state_id, name

actes_uniformes.csv: acte_id, full_name, domain

articles.csv: article_number, article_id

parties.csv: party_id, name

Edge Schemas

case_cites_case.csv: source_case_id, source_case_number, cited_case_number, cited_case_id (Note: cited_case_id is null for citations to decisions outside this corpus)

case_classified_as_domain.csv: case_id, domain_id, domain_name

case_originates_from_state.csv: case_id, state_id, state_name

case_references_acte.csv: case_id, acte_id

case_cites_article.csv: case_id, article_number

case_involves_party.csv: case_id, party_name, role (role: plaintiff or defendant)

Usage

Loading with PyTorch Geometric

python
# Download the repo, then:
from load_pyg import load_ohada_graph

data = load_ohada_graph('.')
print(data)
# HeteroData(
#   case={ num_nodes=4059, x=[4059, 1] },
#   domain={ num_nodes=16 },
#   state={ num_nodes=17 },
#   acte={ num_nodes=9 },
#   article={ num_nodes=669 },
#   party={ num_nodes=6361 },
#   (case, cites, case)={ edge_index=[2, ...] },
#   (case, classified_as, domain)={ edge_index=[2, 4049] },
#   ...
# )

Loading with NetworkX

python
import pandas as pd
import networkx as nx

G = nx.MultiDiGraph()

# Add case nodes
cases = pd.read_csv('nodes/cases.csv')
for _, row in cases.iterrows():
    G.add_node(row['case_id'], type='case', year=row['year'], domain=row['legal_domain'])

# Add citation edges
cites = pd.read_csv('edges/case_cites_case.csv')
for _, row in cites.dropna(subset=['cited_case_id']).iterrows():
    G.add_edge(row['source_case_id'], row['cited_case_id'], relation='cites')

print(f"Nodes: {G.number_of_nodes()}, Edges: {G.number_of_edges()}")

Loading into Neo4j

Import the graph using the provided Cypher script. Copy node/edge CSVs to your Neo4j import/ directory, then run:

bash
cat import_neo4j.cypher | cypher-shell -u neo4j -p your_password

Combining with the Tabular Dataset

For text+graph multimodal models, load both datasets:

python
from datasets import load_dataset
from load_pyg import load_ohada_graph

# Text features
text_data = load_dataset('Maathis-com/ohada-ccja-corpus')

# Graph structure
graph_data = load_ohada_graph('.')

# Join on case_id to combine text embeddings with graph topology

Dataset Creation

Extraction Pipeline

The graph was extracted from the OHADA-CCJA Court Decisions Corpus using regex-based extraction:

  1. 1.Case citations: Pattern matching on "Arrêt n° XXX/YYYY" references in full text, with self-citation filtering and deduplication
  2. 2.Country/state: Keyword matching on OHADA member state names and major city names (e.g., Abidjan → Côte d'Ivoire, Douala → Cameroun), with word-boundary disambiguation (e.g., "Niger" not matching "Nigeria")
  3. 3.Acte Uniforme: Regex matching on the 9 standardized OHADA Uniform Act names with accent-tolerant patterns
  4. 4.Article citations: Pattern matching on "Article(s) NNN" references, filtered to article numbers under 1,000, deduplicated per case
  5. 5.Parties: Direct extraction from structured plaintiff and defendant fields
  6. 6.Legal domain: Direct mapping from the legal_domain field

Limitations

  • —Citation resolution: Only 19% of inter-case citations could be resolved to cases within this corpus. The remaining 81% reference decisions not included in the dataset (older decisions, lower court rulings, or decisions from national courts). These unresolved edges are preserved with the cited case number for potential future linking.
  • —Party deduplication: Party names are extracted as-is. The same entity may appear under slightly different names (e.g., "BICICI" vs "Banque Internationale pour le Commerce et l'Industrie de la Côte d'Ivoire"). Entity resolution is left as a downstream task.
  • —Article disambiguation: Article numbers are extracted without always resolving which specific Acte Uniforme they belong to. Article 13 of the OHADA Treaty and Article 13 of an Acte Uniforme are currently treated as the same node.
  • —Country attribution: A case mentioning "Abidjan" is tagged as Côte d'Ivoire, but some cases involve parties from multiple countries. The graph captures all mentioned countries, not just the primary jurisdiction.

Ethical Considerations

Same as the tabular dataset: all data comes from public court records. Party names are as published in official decisions. See the tabular dataset card for full ethical discussion.

License

CC-BY-4.0

Suggested Baselines

  • —Node classification (legal domain): GCN, GAT, or GraphSAGE on the heterogeneous graph, with or without text features
  • —Link prediction (citation): TransE, DistMult, or R-GCN on the case-cites-case subgraph
  • —Text+Graph: CamemBERT or multilingual BERT embeddings as node features, combined with GNN message passing
  • —Temporal: Temporal graph networks (TGN) on the citation network, using decision dates as timestamps

Citation

bibtex
@dataset{ohada_ccja_graph_2026,
  title={OHADA-CCJA Legal Knowledge Graph: A Heterogeneous Graph Dataset for African Legal AI},
  author={Foutse Yuehgoh, Priyanka N, Patrick NGUETCHOUESSI},
  year={2026},
  url={https://huggingface.co/datasets/Maathis-com/ohada-ccja-graph},
  note={Submitted at Deep Learning Indaba 2026, Nigeria}
}

Related Datasets

Contact

For questions, please open an issue on the HuggingFace repository.