diff options
| author | kr.angelov <kr.angelov@gmail.com> | 2013-11-06 10:21:46 +0000 |
|---|---|---|
| committer | kr.angelov <kr.angelov@gmail.com> | 2013-11-06 10:21:46 +0000 |
| commit | 2483dc772897eb0909664f1a88cc7f8ec50ebd5b (patch) | |
| tree | 4ecb223fc246458a9a5997a4b65329b6039ce309 /src/compiler/SimpleEditor/Convert.hs | |
| parent | 84ef5fa5fa976569370c58bed855f2ab1de5588c (diff) | |
the content of ParseEngAbs3.probs is now merged with ParseEngAbs.probs. The later is now retrained. Once the grammar is compiled with the .probs file now it doesn't need anything more to do robust parsing. The robustness itself is controlled by the flags 'heuristic_search_factor', 'meta_prob' and 'meta_token_prob' in ParseEngAbs.gf
Diffstat (limited to 'src/compiler/SimpleEditor/Convert.hs')
| -rw-r--r-- | src/compiler/SimpleEditor/Convert.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/compiler/SimpleEditor/Convert.hs b/src/compiler/SimpleEditor/Convert.hs index 3554e3342..86580834a 100644 --- a/src/compiler/SimpleEditor/Convert.hs +++ b/src/compiler/SimpleEditor/Convert.hs @@ -23,6 +23,7 @@ import GF.Grammar.Printer(ppParams,ppTerm,getAbs,TermPrintQual(..)) import GF.Grammar.Parser(runP,pModDef) import GF.Grammar.Lexer(Posn(..)) import GF.Data.ErrM +import PGF.Data(Literal(LStr)) import SimpleEditor.Syntax as S import SimpleEditor.JSON @@ -57,7 +58,10 @@ convAbstract (modid,src) = let cats = reverse cats0 funs = reverse funs0 flags = optionsGFO (mflags src) - startcat = maybe "-" id $ lookup "startcat" flags + startcat = + case lookup "startcat" flags of + Just (LStr cat) -> cat + _ -> "-" return $ Grammar (convId modid) extends (Abstract startcat cats funs) [] convExtends = mapM convExtend |
