ttaw 0.1.0

talking to a wall, a piecemeal natural language processing library
Documentation

Build Status Coverage Status Crates.io Version Crates.io LICENSE

ttaw

talking to a wall, a piecemeal natural language processing library.

A couple caveats

  • Double Metphone isn't a sure thing, it's a there's a "pretty good chance" thing. So there's the potential for behavior that deviates from what you'd expect.
  • My implementation's aren't a sure thing either :smile: If you encounter anything peculiar or unexpected, please raise an issue :heart: :heart:

Functionality

  • Determine if two words rhyme (perfect single, or general syllabic).
  • Determine if there exists consecutive alliteration in an &str.
  • Double Metaphone phonetic encoding, port of words/double-metahone library.

Rhyme

extern crate ttaw;
use ttaw::pronounciation;
assert_eq!(true, pronounciation::rhyme("here", "near"));
assert_eq!(false, pronounciation::rhyme("shopping", "cart"));

Alliteration

extern crate ttaw;
use ttaw::pronounciation;
assert_eq!(true, pronounciation::alliteration("a group of bounding bears"));
assert_eq!(true, pronounciation::alliteration("boucing bears are everywhere"));
assert_eq!(false, pronounciation::alliteration("The quick brown fox jumps over the lazy dog."));

Double Metaphone

extern crate ttaw;
use ttaw::pronounciation;
assert_eq!(pronounciation::double_metaphone("Arnow").primary, "ARN");
assert_eq!(pronounciation::double_metaphone("Arnow").secondary, "ARNF");

assert_eq!(pronounciation::double_metaphone("detestable").primary, "TTSTPL");
assert_eq!(pronounciation::double_metaphone("detestable").secondary, "TTSTPL");