#letter #character #whether #test #language #vowel #romance

is-vowel

Heuristically test whether a character is a vowel letter

1 unstable release

0.1.0 Apr 11, 2021

#1146 in Text processing

Download history 17/week @ 2024-05-26 19/week @ 2024-06-02 11/week @ 2024-06-09 26/week @ 2024-06-16 25/week @ 2024-06-23 14/week @ 2024-06-30 28/week @ 2024-07-07 21/week @ 2024-07-14 15/week @ 2024-07-21 24/week @ 2024-07-28 17/week @ 2024-08-04 18/week @ 2024-08-11 9/week @ 2024-08-18 22/week @ 2024-08-25 18/week @ 2024-09-01 11/week @ 2024-09-08

62 downloads per month
Used in 2 crates

MIT license

9KB

Maintenance CI crates-io api-docs

is-vowel: heuristically test whether a character is a vowel letter

Bart Massey 2021 (version 0.1.0)

Test for vowels in Romance languages.

Deciding whether some grapheme is a "vowel" (represents a "vowel sound") is language dependent, and the author is not aware of any standardization efforts for vowel identification.

Even for the Romance languages, the situation is a bit complicated. The basic Romance vowels are "a", "e", "i", "o", "u". However, for example:

  • Uppercase versions are also vowels.
  • Accented versions are also vowels.
  • "Sometimes 'y', sometimes 'w'." These letters are consonant in some situations, vowels in others.

This code attempts to provide reasonable heuristic answers as to the Romance-language-"vowelness" of a Unicode codepoint.

No attempt is made here to deal with non-Romance languages, even though some non-Romance vowel letters are borrowed in Romance languages: for example, "æ" and "Æ" are used in some British English. It would be great to use vowel letter tables for a variety of languages, but so far the author has been unable to locate such tables (surprisingly).

License

This crate is made available under the "MIT license". Please see the file LICENSE in this distribution for license terms.

Acknowledgments

Thanks to the cargo-readme crate for generation of this README.

Dependencies

~1MB
~40K SLoC