MCPcopy Create free account
hub / github.com/daisy/MathCAT / build_speech_patterns

Method build_speech_patterns

src/speech.rs:2087–2099  ·  view source on GitHub ↗
(&mut self, patterns: &Yaml, file_name: &Path)

Source from the content-addressed store, hash-verified

2085 }
2086
2087 fn build_speech_patterns(&mut self, patterns: &Yaml, file_name: &Path) -> Result<()> {
2088 // Rule::SpeechPatternList
2089 let patterns_vec = patterns.as_vec();
2090 if patterns_vec.is_none() {
2091 bail!(yaml_type_err(patterns, "array"));
2092 }
2093 let patterns_vec = patterns.as_vec().unwrap();
2094
2095 for entry in patterns_vec.iter() {
2096 SpeechPattern::build(entry, file_name, self)?;
2097 }
2098 return Ok( () );
2099 }
2100
2101 fn read_unicode(&self, path: Option<PathBuf>, use_short: bool) -> Result<()> {
2102 let path = match path {

Callers 1

read_patternsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected