ttaw
talking to a wall, a piecemeal natural language processing library.
A couple caveats
- My implementation's aren't a sure thing :smile: If you encounter anything peculiar or unexpected, please raise an issue :heart: :heart:
Functionality
-
Determine if two words rhyme using the Double Metaphone phonetic encoding
-
Determine if two words rhyme using CMUdict phonetic encoding
-
Determine if two words alliterate using the Double Metaphone phonetic encoding
-
Determine if two words alliterate using CMUdict phonetic encoding
-
Get the CMUdict phonetic encoding of a word
-
Get the Double Metaphone phonetic encoding of a word (port of words/double-metahone library)
Rhyme
extern crate ttaw;
use ttaw;
// Initialize the CmuDict with a path to the existing serialized CMU dictionary
// or a directoy containing it. If the dictionary doesn't exisit, it will be
// downloaded and serialized at the location specified by the path parameter.
let cmudict = new.unwrap;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
// Deviations in cmu and metaphone
assert_eq!;
assert_eq!;
Alliteration
extern crate ttaw;
use ttaw;
// Initialize the CmuDict with a path to the existing serialized CMU dictionary
// or a directoy containing it. If the dictionary doesn't exisit, it will be
// downloaded and serialized at the location specified by the path parameter.
let cmudict = new.unwrap;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
CMUdict
extern crate ttaw;
use ttaw;
// Initialize the CmuDict with a path to the existing serialized CMU dictionary
// or a directoy containing it. If the dictionary doesn't exisit, it will be
// downloaded and serialized at the location specified by the path parameter.
let cmudict = new.unwrap;
assert_eq!
Double Metaphone
extern crate ttaw;
use ttaw;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;