reorganize

This commit is contained in:
Brandon Thomas committed 2016-02-10 04:11:01 -05:00
1 parent 9555aeff18
commit c1860ee33d
1 file changed
+8 -8
+8 -8
View File
@@ -10,6 +10,14 @@ use std::path::{Path, PathBuf};
pub type VoiceName = String;
#[derive(RustcDecodable, RustcEncodable)]
pub struct VocabularyLibrary {
/**
* A map of several vocabularies with their associated speaker.
*/
pub library: HashMap<VoiceName, Vocabulary>
}
#[derive(RustcDecodable, RustcEncodable)]
pub struct Vocabulary {
/**
@@ -19,14 +27,6 @@ pub struct Vocabulary {
pub words: Vec<String>
}
#[derive(RustcDecodable, RustcEncodable)]
pub struct VocabularyLibrary {
/**
* A map of several vocabularies with their associated speaker.
*/
pub library: HashMap<VoiceName, Vocabulary>
}
impl VocabularyLibrary {
/** Read all of the vocabularies under a directory. */
pub fn read_from_directory(directory: &Path) ->