Struct rhyme::Rhyme [−][src]
pub struct Rhyme(_);
Wrapper around the Cmudict type
Methods
impl Rhyme
[src]
impl Rhyme
pub fn new() -> Result<Rhyme>
[src]
pub fn new() -> Result<Rhyme>
Constructs a new Rhyme struct
Will download a copy of the CMU Pronunciation dictionary. Use Rhyme::from_path
if you
want to use an already-saved copy of the dictionary
pub fn from_path<P: AsRef<Path>>(p: P) -> Result<Rhyme>
[src]
pub fn from_path<P: AsRef<Path>>(p: P) -> Result<Rhyme>
Constructs a new Rhyme object with the specified CMU Pronunciation dictionary
pub fn rhymes(&self, left: &str, right: &str) -> Option<bool>
[src]
pub fn rhymes(&self, left: &str, right: &str) -> Option<bool>
Looks up the two words and returns whether they exist or not
Returns None if one or both of the words are not in the dictionary