Skip to content

About

static word-list data for the Dale-Chall readability formula

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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. 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.

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.

About

static word-list data for the Dale-Chall readability formula

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages