mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-20 18:29:33 -06:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user