The New Dale-Chall (1995) list of easy American-English words, as static Rust data.
Readability tools use this list to decide whether a word is familiar when scoring text. This crate ships the data only. Computing the formula is up to the caller.
The crate is #![no_std] and has no dependencies. The minimum supported Rust
version is 1.65.
[dependencies]
dale-chall = "0.1"use dale_chall::DALE_CHALL;
assert_eq!(DALE_CHALL.len(), 2942);
assert_eq!(DALE_CHALL[0], "a");
assert!(DALE_CHALL.binary_search(&"old-fashioned").is_ok());
assert!(DALE_CHALL.binary_search(&"xylophone").is_err());DALE_CHALL is a &'static [&'static str] of 2942 words. The list is sorted
ascending by byte order and holds no duplicates. Every entry is lowercase ASCII.
Nine words contain a hyphen and 47 contain a straight apostrophe (', U+0027).
The slice is sorted, so check membership with
DALE_CHALL.binary_search(&word).is_ok(). The check is exact and case
sensitive. The data is already lowercase, so lowercase the query first if the
input may carry other casing.
Licensed under the MIT license.