- Semantic Interpretation for Speech Recognition
-
Semantic Interpretation for Speech Recognition (SISR) definiert die Syntax und Semantik von Anmerkungen für Grammatikregeln in der Speech Recognition Grammar Specification (SRGS). Seit 5. April 2007 ist SISR eine Empfehlung des World Wide Web Consortiums.[1]
Auf SRGS-Grammatiken aufbauend, erlaubt es Voicebrowsern über ECMAScript, komplexe Grammatik zu interpretieren und die Information zurück zum Programm zu liefern. Zum Beispiel erlaubt es, dass Äußerungen, wie "Ich hätte gerne eine Coca Cola und drei große Pizzen mit Peperoni und Pilzen." in ein Objekt interpretiert werden, dass von anderen Programmen verstanden werden kann. Zum Beispiel könnte die Äußerung das folgende Objekt, genannt Bestellung produzieren:
{ getränk: { flüssigkeit:"coke", größe:"mittel"}, pizza: { anzahl: "3", pizzagröße: "groß", belag: [ "Peperoni", "Pilze" ] } }
Angewandt auf die Grammatik, die zusätzlich zu SRGS-Grammatik noch SISR-Markup enthält:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE grammar PUBLIC "-//W3C//DTD GRAMMAR 1.0//EN" "http://www.w3.org/TR/speech-grammar/grammar.dtd"> <grammar xmlns="http://www.w3.org/2001/06/grammar" xml:lang="en" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/2001/06/grammar http://www.w3.org/TR/speech-grammar/grammar.xsd" version="1.0" mode="voice" tag-format="semantics/1.0" root="order"> <rule id="order"> Ich hätte gerne eine <ruleref uri="#drink"/> <tag>out.drink = new Object(); out.drink.liquid=rules.drink.type; out.drink.drinksize=rules.drink.drinksize;</tag> und <ruleref uri="#pizza"/> <tag>out.pizza=rules.pizza;</tag> </rule> <rule id="kindofdrink"> <one-of> <item>coke</item> <item>pepsi</item> <item>coca cola<tag>out="coke";</tag></item> </one-of> </rule> <rule id="foodsize"> <tag>out="medium";</tag> <!-- "medium" is default if nothing said --> <item repeat="0-1"> <one-of> <item>small<tag>out="small";</tag></item> <item>medium</item> <item>large<tag>out="large";</tag></item> <item>regular<tag>out="medium";</tag></item> </one-of> </item> </rule> <!-- Construct Array of toppings, return Array --> <rule id="tops"> <tag>out=new Array;</tag> <ruleref uri="#top"/> <tag>out.push(rules.top);</tag> <item repeat="1-"> and <ruleref uri="#top"/> <tag>out.push(rules.top);</tag> </item> </rule> <rule id="top"> <one-of> <item>anchovies</item> <item>peperoni</item> <item>mushroom<tag>out="mushrooms";</tag></item> <item>mushrooms</item> </one-of> </rule> <!-- Two properties (drinksize, type) on left hand side Rule Variable --> <rule id="drink"> <ruleref uri="#foodsize"/> <ruleref uri="#kindofdrink"/> <tag>out.drinksize=rules.foodsize; out.type=rules.kindofdrink;</tag> </rule> <!-- Three properties on rules.pizza --> <rule id="pizza"> <ruleref uri="#number"/> <ruleref uri="#foodsize"/> <tag>out.pizzasize=rules.foodsize; out.number=rules.number;</tag> pizzas with <ruleref uri="#tops"/> <tag>out.topping=rules.tops;</tag> </rule> <rule id="number"> <one-of> <item> <tag>out=1;</tag> <one-of> <item>a</item> <item>one</item> </one-of> </item> <item>two<tag>out=2;</tag></item> <item>three<tag>out=3;</tag></item> </one-of> </rule> </grammar>
Siehe auch
Quellen
Weblinks
- SRGS-Spezification (W3C Recommendation)
- SISR-Spezification (W3C Recommendation)
- W3C's Voice Browser Working Group
Empfehlungen (Recommendations): ATAG | Canonical XML | CSS | CharMod | CC/PP | DDR Simple API | DOM | EXI | Element Traversal | EMMA | GRDDL | HTML | ITS | MathML | OWL | P3P | PICS | PLS | PNG | POWDER | RDF | RDF-Schema | Ruby | SISR | SKOS | SML | SMIL | SOAP | SOAP MTOM | SPARQL | SRGS | SSML | SVG | SSML | UAAG | VoiceXML | WCAG | Webarch | WebCGM | WSDL | WS-Adressing | WS-Policy | XHTML | XML | XInclude | XKMS | XLink | XML Base | XMLEnc-Decrypt | XML Events | XML Information Set | XML Namespace | XML Schema | XML Signature | XOP | XForms | XPath | XPointer | XProc | XQuery | XSL | XSLT
Arbeitsentwürfe (Working Drafts) und Kandidaten (Candidate Recommendations): Capture API | CCXML | CDF | Clipboard API | Contacts API | Cross-Origin Resource Sharing | CURIE | EARL | File API | HTML5 | HTML Canvas | HTML Microdata | Indexed Database API | InkML | LTLI | RIF | Selectors API | System Information API | WAI-ARIA | Web IDL | Web Sockets API | Web SQL Database | WICD | Widgets | XFrames | XBL
Wikimedia Foundation.