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
//! # 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);
//! ```
pub use ;
pub use ReadSight;
pub use ;
pub use ;
pub use ;
pub use TextStatistics;
/// Alias for [`ReadSight`] matching the PHP class name.
pub type Engine = ReadSight;