dale-chall 0.1.1

static word-list data for the Dale-Chall readability formula
Documentation
  • Coverage
  • 100%
    2 out of 2 items documented2 out of 2 items with examples
  • Size
  • Source code size: 42.7 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 198.5 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 2s Average build duration of successful builds.
  • all releases: 2s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • hey-jj/dale-chall
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • hey-jj

dale-chall

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. It does not compute the Dale-Chall formula.

The crate is #![no_std] and has no dependencies. The minimum supported Rust version is 1.65.

Install

[dependencies]
dale-chall = "0.1"

Use

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

Data

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.

License

Licensed under the MIT license.