Skip to main content

bauske_phonology/
lib.rs

1//! Source-grounded Relojban alphabet data and representative sound distances.
2//!
3//! The registry describes the acquired grammar snapshot `P01-S20261022`.
4//! `representatives-v1` is a project-selected categorical articulatory profile;
5//! it is not a measurement of perceived similarity. Comparisons are defined
6//! only within the consonant and vowel classes.
7//!
8//! # Examples
9//!
10//! ```
11//! use bauske_phonology::{DistanceModel, Segment};
12//!
13//! let result = DistanceModel::default().compare(
14//!     "p".parse::<Segment>()?,
15//!     "b".parse::<Segment>()?,
16//! )?;
17//! assert_eq!(result.total(), 1);
18//! # Ok::<(), Box<dyn std::error::Error>>(())
19//! ```
20
21mod clusters;
22mod context;
23mod distance;
24mod error;
25mod inventory;
26mod profiles;
27mod prosody;
28mod realization;
29mod types;
30
31pub use clusters::{
32    ClusterError, ClusterInspection, ClusterPosition, ClusterSourceTension, ClusterViolation,
33    initial_pairs, initial_triples, inspect_cluster,
34};
35pub use context::{
36    AnalysisDiagnostic, AnalysisError, DiagnosticKind, Nucleus, NucleusKind, WordAnalysis,
37    WordCluster, WordKind, analyze_word,
38};
39pub use distance::{
40    ConsonantWeights, DistanceExplanation, DistanceModel, FeatureContribution, FeatureDimension,
41    FeatureValue, VowelWeights,
42};
43pub use error::{CompareError, ParseSegmentError, ParseSymbolError};
44pub use inventory::{
45    DiphthongDistribution, DiphthongRecord, Glide, GlideDirection, OpenPolicy, SymbolKind,
46    SymbolRecord, alphabet, diphthongs, open_policies,
47};
48pub use profiles::{PronunciationProfile, profiles};
49pub use prosody::{
50    FollowingContext, ProsodyLimitation, ProsodySourceLimitation, StressAnalysis, StressChoice,
51    StressError, StressLevel, Syllabification, SyllabificationMode, Syllable, assign_stress,
52    syllabify,
53};
54pub use realization::{BufferEvent, RealizationError, RealizationPlan, plan_realization};
55pub use types::{
56    AlphabetSymbol, Backness, Features, Height, Manner, Place, Rounding, Segment, SegmentClass,
57    Voicing,
58};
59
60/// Stable identifier for the acquired language-source snapshot.
61pub const SOURCE_ID: &str = "P01-S20261022@0195f4b5b1f182ce8e21381210f766b326fb987f";
62/// Stable identifier for the project's selected feature encoding.
63pub const PROFILE_ID: &str = "representatives-v1";