Skip to main content

Crate partial_date

Crate partial_date 

Source
Expand description

§partial-date

Deterministic partial date extraction from natural language text.

Unlike full-date parsers, this library handles partial dates — inputs where only some of day, month, or year are present. Missing components can be left as models::Extracted::NotFound or filled with a caller-supplied default via models::Extracted::Defaulted.

§Quick start

use partial_date::models::{Input, PartialDate};

let input = Input {
    utterance: "12 June".to_string(),
    config: None,
};

// let result: PartialDate = partial_date::extract::extract(input);

Modules§

extract
Public extraction API.
levenshtein
Levenshtein distance and ratio algorithms.
models
Core types for the partial-date library.
word_numbers
Word-number recognition and substitution.