for a speech-oriented CNL grammar formalism
09:45
<command> = <action> | (<action> and <command>);
<action> = stop {STOP} | start | pause | resume | finish {STOP};
Does not really fulfill the requirements...
Human says /one plus two/, machine responds by /one plus two is three/
App: 1234567890
Est: sada kaks kümmend kolm miljonit ja neli sada viis kümmend kuus tuhat
seitse sada kaheksa kümmend üheksa
Eng: one hundred and twenty three million four hundred and fifty six thousand
seven hundred and eighty nine
App: PI + 1.2 - (-3) * 400 / 5 ^ 6
Est: pii pluss üks koma kaks miinus miinus kolm korda neli sada
jagatud viis astmel kuus
Eng: pie plus one point two minus minus three times four hundred
divided by five to the power of six
App: convert 100.1 mi*h^-2 to m*s^-2
Est: sada koma üks miili ruut tunnis meetrites ruut sekundis
Eng: one hundred point one miles per hours squared to meters per seconds squared
USD
can be expressed by "dollar", "US dollar" or "American dollar"App: alarm 07 : 05
Est: ärata mind kell seitse null viis
Eng: wake me up at seven oh five
App: FROM Vanemuise 46, Tartu TO Lossi plats 2, Tallinn
Est: algus vanemuise nelikümend kuus tartu lõpp lossi plats kaks
Eng: (missing)
Shortcomings
(August) Weizenbergi (street) 39
Solution 1: integrate via JSGF or FSG
Solution 2: direct integration (future work)
# Convert PGF to JSGF (using GF Haskell runtime)
gf --make --output-format=jsgf $pgf
# Convert JSGF to FSG (using Sphinx)
sphinx_jsgf2fsg -jsgf $jsgf -fsm $fsm -symtab $sym
# Optimize the FSG (using OpenFst)
fstcompile --arc_type=log --acceptor --isymbols=$sym --keep_isymbols $fsm |\
fstdeterminize | fstminimize | fstrmepsilon | fstprint > $fsg
Compile time
Runtime
String
)ArrayList<String>
)Speaking to WolframAlpha via Kõnele + the Action-grammar (e.g. in Estonian)
via Kõnele's configuration panel (as an end-user)
Set the required EXTRAs
// Set of non-standard extras that K6nele supports
public static final String EXTRA_GRAMMAR_URL =
"ee.ioc.phon.android.extra.GRAMMAR_URL";
public static final String EXTRA_GRAMMAR_TARGET_LANG =
"ee.ioc.phon.android.extra.GRAMMAR_TARGET_LANG";
// ...
Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
intent.setComponent(new ComponentName(
"ee.ioc.phon.android.speak",
"ee.ioc.phon.android.speak.RecognizerIntentActivity"));
intent.putExtra(EXTRA_GRAMMAR_URL,
"http://kaljurand.github.io/Grammars/grammars/pgf/Action.pgf");
intent.putExtra(EXTRA_GRAMMAR_TARGET_LANG, "App");
Start the activity or service, and handle output extras.
// ...
startActivityForResult(intent, 1234);
// ...
Front-end to the Action-grammar
Setup
Runtime
URI
, then Arvutaja launches the ACTION_VIEW intent on this URIAndroid Market (viewed from Estonia), for one week in Dec 2011
Table of Contents | t |
---|---|
Exposé | ESC |
Full screen slides | e |
Presenter View | p |
Source Files | s |
Slide Numbers | n |
Toggle screen blanking | b |
Show/hide slide context | c |
Notes | 2 |
Help | h |