use-word 0.1.0

Composable word-level text primitives for RustUse.
Documentation
  • Coverage
  • 100%
    16 out of 16 items documented1 out of 14 items with examples
  • Size
  • Source code size: 8.8 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 429.54 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 15s Average build duration of successful builds.
  • all releases: 15s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-text
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-word

Composable word-level text primitives for RustUse.

use-word builds on conservative word boundaries and normalized lowercase comparisons. It is meant for practical text inspection, not stemming, language modeling, or linguistic analysis.

Included primitives

  • word_count
  • unique_words
  • normalize_word
  • contains_word
  • starts_with_word
  • ends_with_word
  • words

Example

use use_word::{contains_word, unique_words, word_count};

assert_eq!(word_count("Hello, hello world"), 3);
assert!(contains_word("Hello, world", "world"));
assert_eq!(unique_words("Hello, hello world").len(), 2);