Skip to main content

Crate dale_chall

Crate dale_chall 

Source
Expand description

List of easy American-English words: New Dale-Chall (1995).

This crate ships one thing: the New Dale-Chall familiar-word list as a sorted, deduplicated, lowercase slice of string literals. Readability tools use the list to decide whether a word is familiar when scoring text. The crate does not compute the Dale-Chall formula. It only provides the data.

The list holds 2942 entries. Every entry is lowercase ASCII. Most are plain letters. Nine words contain a hyphen and 47 contain a straight apostrophe (', U+0027). The slice is sorted ascending by byte order, which for this all-ASCII data matches Unicode code-point order. A caller can check membership with DALE_CHALL.binary_search(&word).is_ok().

Membership is exact and case sensitive. The data is already lowercase. The crate does not fold case or trim input. Callers normalize query words before a lookup.

The crate is #![no_std]. The data lives in core, so embedded and kernel callers can use it.

§Examples

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());

Constants§

DALE_CHALL
List of easy American-English words: New Dale-Chall (1995).