Skip to main content

Github CI

Citation Utilities

citation-utils extracts and normalizes Philippine Supreme Court citations that include a docket, a report citation, or both. It composes citation-date and citation-report for the LawSQL data pipeline.

The package is corpus-driven. It preserves the reported citation components that are present in the source rather than inferring missing case metadata. It helps locate and normalize references; it does not authenticate a document or prove the correctness of an OCR reading. Retain source text and location for legal review.

Quick Example

from citation_utils import Citation

raw = "G.R. No. 147033, April 30, 2003, 374 Phil. 1"
citation = Citation.extract_citation(raw)

assert citation is not None
assert citation.model_dump() == {
    "cat": "gr",
    "num": "147033",
    "date": "2003-04-30",
    "phil": "374 phil. 1",
    "scra": None,
    "offg": None,
}

Documentation

See the documentation for source-review limits, extraction and counting behavior, supported docket types, SQLite-oriented output, and local development checks. The 1.0 release history compares the stable release with the previously pushed 0.5.0 package.

Boundaries

  • citation-date owns date grammar and date normalization.
  • citation-report owns reporter grammar and report normalization.
  • citation-utils owns docket grammar, joins dockets to reports, and provides database-ready citation records.

Administrative Matter and Bar Matter references can name rules rather than decisions. The default extraction flow excludes only known statutory serials using an exact canonical match; pass exclude_docket_rules=False only when the calling workflow needs those rule references as evidence.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

citation_utils-1.0.0.tar.gz (25.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

citation_utils-1.0.0-py3-none-any.whl (38.8 kB view details)

Uploaded Python 3

File details

Details for the file citation_utils-1.0.0.tar.gz.

File metadata

  • Download URL: citation_utils-1.0.0.tar.gz
  • Upload date:
  • Size: 25.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for citation_utils-1.0.0.tar.gz
Algorithm Hash digest
SHA256 b5e5c5350a627966e48209ba7e82bcfe8af0702781dfafc71654a0878b79e5aa
MD5 b6f70abcde7736192c3728d08fe9dcec
BLAKE2b-256 e794dcb68f2e2dcc5025c12b904fc0cd89cd101fe8a4eb28330f7f9b07ff6d69

See more details on using hashes here.

File details

Details for the file citation_utils-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: citation_utils-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 38.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for citation_utils-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 46aae9091e3955948f2700c6c0d4c6265845e1d92b688c5a8d0f29f49d5c0897
MD5 b288423005f90fbae30f9af448ce41d1
BLAKE2b-256 fddd931b60bd26383070124e58cec8315ba123a241fb86ac5d4b4bd6efaf79d5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page