A Rust port of the Python inflect library, used to generate plurals, ordinals, indefinite articles, and to convert numbers to words.
Find a file
2023-09-09 10:23:35 +01:00
.github/workflows ci badge 2023-09-09 10:22:48 +01:00
src ... -> no_classical 2023-09-09 10:06:35 +01:00
tests inflect to inflect-rs 2023-09-09 08:57:30 +01:00
.gitignore Initial commit 2023-09-09 02:04:34 +01:00
Cargo.toml work in progress commit - for crates.io 2023-09-09 09:55:42 +01:00
LICENSE.md keeping license.md consistent with the license in the o.g project 2023-09-09 04:21:25 +01:00
README.md spellcheck 2023-09-09 10:23:35 +01:00

inflect-rs

ci

inflect-rs is a Rust port of the Python inflect library, used to generate plurals, ordinals, indefinite articles, and to convert numbers to words.

fn test_si_pron() {
    assert_eq!("him", get_si_pron("acc", "them", Some("masculine")));
    assert_eq!("her", get_si_pron("acc", "them", Some("feminine")));
    assert_eq!("it", get_si_pron("acc", "them", Some("neuter")));
    assert_eq!("you", get_si_pron("acc", "you", None));
    assert_eq!("themselves", get_si_pron("acc", "itself", None));

    assert_ne!("him", get_si_pron("acc", "them", Some("feminine")));
    assert_ne!("her", get_si_pron("acc", "them", Some("masculine")));
}

inflect-rs is currently in-development, but is nearing completion, and so has been published for the sake of name-reservation. The first stable version should be here very soon.