1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//! Core library for working with UniMorph morphological data.
//!
//! This crate provides types, storage, and query capabilities for UniMorph
//! datasets. It is designed for high-performance lookups (conjugation/declension
//! queries) while also supporting bulk export for ML pipelines.
//!
//! # Quick Start
//!
//! ```ignore
//! use unimorph_core::{Repository, Store};
//!
//! #[tokio::main]
//! async fn main() -> unimorph_core::Result<()> {
//! // Initialize repository (handles downloads and caching)
//! let repo = Repository::new()?;
//!
//! // Ensure Italian dataset is available
//! repo.ensure("ita").await?;
//!
//! // Open the store for queries
//! let store = repo.store()?;
//!
//! // Look up all forms of "parlare"
//! for entry in store.inflect("ita", "parlare")? {
//! println!("{} -> {} ({})", entry.lemma, entry.form, entry.features);
//! }
//!
//! // Reverse lookup: what lemmas produce "parlo"?
//! for entry in store.analyze("ita", "parlo")? {
//! println!("{} <- {} ({})", entry.form, entry.lemma, entry.features);
//! }
//! Ok(())
//! }
//! ```
//!
//! # Architecture
//!
//! - **SQLite backend**: All data stored in a single file at `~/.cache/unimorph/datasets.db`
//! - **Pre-computed stats**: Aggregate statistics cached at import time
//! - **Iterator-based queries**: Results stream from SQLite, won't OOM on large datasets
//! - **Parquet export**: For users who need DataFrame integration
pub use ;
pub use ParquetExportOptions;
pub use QueryBuilder;
pub use ;
pub use Store;
pub use ;