readsight 1.0.2

Multilingual readability library — 86 languages, 17 formulas, TeX-based syllable counting via the Frank M. Liang algorithm.
Documentation
//! # ReadSight
//!
//! A multilingual readability library: **86 languages**, **17 readability
//! formulas**, plus a syllable counter and word hyphenator based on the
//! **Frank M. Liang (TeX) hyphenation algorithm**. Zero network access; all data
//! (language definitions and hyphenation patterns) is embedded in the crate.
//!
//! This is a byte-accurate Rust port of the canonical PHP library
//! [`MADEVAL/ReadSight`](https://github.com/MADEVAL/ReadSight); the
//! [`MADEVAL/ReadSightPy`](https://github.com/MADEVAL/ReadSightPy) Python port is
//! the secondary reference.
//!
//! ## Quick start
//!
//! ```
//! use readsight::ReadSight;
//!
//! let rs = ReadSight::new("en-us").unwrap();
//! assert_eq!(rs.syllable_count("banana"), 3);
//! assert_eq!(rs.split_word("hyphenation"), vec!["hy", "phen", "ation"]);
//!
//! let result = rs.flesch_reading_ease("The cat sat on the mat. It was a sunny day.").unwrap();
//! println!("{}: {} ({})", result.formula_name, result.score, result.interpretation);
//! ```

#![forbid(unsafe_code)]
#![warn(missing_docs)]

pub mod config;
pub mod engine;
pub mod error;
pub mod formula;
pub mod hyphenation;
pub mod language;
pub mod syllable;
pub mod text;

pub use config::{Config, DataSource};
pub use engine::ReadSight;
pub use error::{Error, Result};
pub use formula::{Formula, FormulaResult};
pub use language::{Language, Script};
pub use text::TextStatistics;

/// Alias for [`ReadSight`] matching the PHP class name.
pub type Engine = ReadSight;

#[cfg(doctest)]
#[doc = include_str!("../README.md")]
struct ReadmeDoctests;