Skip to content

Instantly share code, notes, and snippets.

@pkra
Created February 26, 2016 16:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pkra/118dde95afdceec9dadd to your computer and use it in GitHub Desktop.
Save pkra/118dde95afdceec9dadd to your computer and use it in GitHub Desktop.
Simple SRE snippet
// `$ npm install speech-rule-engine`
var sre = require('speech-rule-engine');
var mathml = '<math xmlns="http://www.w3.org/1998/Math/MathML"> <mfrac> <mn>1</mn> <mn>2</mn> </mfrac> </math>';
sre.setupEngine({semantics: true, domain: "mathspeak", style: "brief"});
console.log(sre.processExpression(mathml));
// one-half
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment