Crate reporters_db

Crate reporters_db 

Source
Expand description

§Reporters Database

A Rust port of the Free Law Project’s database of court reporters with zero runtime overhead.

This library provides access to a comprehensive database of legal court reporters, including their variations, editions, and citation formats. All data is embedded at compile time using Perfect Hash Functions (PHF) for optimal performance.

§Quick Start

use reporters_db::{get_reporters, get_variations_only};

// Get the main reporters database
let reporters = get_reporters();
if let Some(reporter_list) = reporters.get("A.2d") {
    println!("Found {} reporters for 'A.2d'", reporter_list.len());
}

// Get variation mappings
let variations = get_variations_only();
if let Some(canonical_forms) = variations.get("Atlantic Reporter") {
    println!("Canonical forms: {:?}", canonical_forms);
}

§Main API Functions

§Performance

This library uses compile-time Perfect Hash Functions (PHF) for all data access, providing O(1) lookups with zero runtime overhead. All data is validated and embedded during compilation.

Re-exports§

pub use case_name_part_abbreviations::CaseNamePartAbbreviationMap;
pub use journals::Journal;
pub use journals::JournalsMap;
pub use laws::Law;
pub use laws::LawsMap;
pub use regexes::RegexTemplate;
pub use regexes::ResolvedRegex;
pub use regexes::UnresolvedRegex;
pub use reporters::CiteType;
pub use reporters::Edition;
pub use reporters::Reporter;
pub use reporters::ReportersMap;
pub use state_abbreviations::StateAbbreviationMap;

Modules§

case_name_part_abbreviations
journals
laws
regexes
Regular expression templates for citation pattern matching.
reporters
Legal court reporters database module.
state_abbreviations
types
utils
Utility functions for processing and accessing reporter database information.

Enums§

Error

Functions§

get_case_name_abbreviations
Get case name part abbreviations used in legal case names.
get_editions
Get editions mapping that maps edition keys to their root reporter name.
get_journals
Get the legal journals database.
get_laws
Get the laws database for statute citations.
get_names_to_editions
Get names to editions mapping that maps reporter names to their edition abbreviations.
get_regex_variables
Get processed regex variables for citation pattern matching.
get_reporters
Get the main reporters database containing legal court reporters and their metadata.
get_special_formats
Get special formats mapping for non-standard citation formats.
get_state_abbreviations
Get state abbreviations mapping for US states.
get_variations_only
Get variations mapping that maps variation names to canonical reporter abbreviations.