diff options
Diffstat (limited to 'src/GF/API.hs')
| -rw-r--r-- | src/GF/API.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/GF/API.hs b/src/GF/API.hs index 768fa7d6b..950fed731 100644 --- a/src/GF/API.hs +++ b/src/GF/API.hs @@ -216,7 +216,7 @@ speechInput opt s = recognizeSpeech name language cfg cat number name = cncId s cfg = stateCFG s -- FIXME: use lang flag to select grammar language = fromMaybe "en_UK" (getOptVal opts speechLanguage) - cat = fromMaybe "S" (getOptVal opts gStartCat) ++ "{}.s" + cat = prCFCat (firstCatOpts opts s) ++ "{}.s" number = optIntOrN opts flagNumber 1 optLinearizeTreeVal :: Options -> GFGrammar -> Tree -> String @@ -327,7 +327,9 @@ prMultiGrammar opts = M.showMGrammar (oElem optimizeCanon opts) -- access to customizable commands optPrintGrammar :: Options -> StateGrammar -> String -optPrintGrammar opts = customOrDefault opts grammarPrinter customGrammarPrinter +optPrintGrammar opts = pg opts + where + pg = customOrDefault opts grammarPrinter customGrammarPrinter optPrintMultiGrammar :: Options -> CanonGrammar -> String optPrintMultiGrammar opts = encodeId . pmg opts . encode |
