diff options
| author | kr.angelov <kr.angelov@gmail.com> | 2013-02-12 10:53:13 +0000 |
|---|---|---|
| committer | kr.angelov <kr.angelov@gmail.com> | 2013-02-12 10:53:13 +0000 |
| commit | 4922ab6cc495087f40399746f616cd88590fd884 (patch) | |
| tree | b180f222f96c7e286337681efdc6834b94f6e3e8 /src/compiler/GF/Compile | |
| parent | a4c9d20fc3a92dc2e80208d4fe7b4f54a64a17af (diff) | |
now the beam size for the statistical parser can be configured by using the flag beam_size in the top-level concrete module
Diffstat (limited to 'src/compiler/GF/Compile')
| -rw-r--r-- | src/compiler/GF/Compile/GrammarToPGF.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/GF/Compile/GrammarToPGF.hs b/src/compiler/GF/Compile/GrammarToPGF.hs index cc560ca1c..e10a2b13b 100644 --- a/src/compiler/GF/Compile/GrammarToPGF.hs +++ b/src/compiler/GF/Compile/GrammarToPGF.hs @@ -54,8 +54,8 @@ mkCanon2pgf opts gr am = do [((cPredefAbs,c), AbsCat (Just (L NoLoc []))) | c <- [cFloat,cInt,cString]] ++ Look.allOrigInfos gr am - flags = Map.fromList [(mkCId f,C.LStr x) | (f,x) <- optionsPGF aflags] - + flags = Map.fromList [(mkCId f,if f == "beam_size" then C.LFlt (read x) else C.LStr x) | (f,x) <- optionsPGF aflags] + funs = Map.fromList [(i2i f, (mkType [] ty, mkArrity ma, mkDef pty, 0, addr)) | ((m,f),AbsFun (Just (L _ ty)) ma pty _,addr) <- adefs] @@ -74,7 +74,7 @@ mkCanon2pgf opts gr am = do ([((cPredefAbs,c), CncCat (Just (L NoLoc GM.defLinType)) Nothing Nothing Nothing) | c <- [cInt,cFloat,cString]] ++ Look.allOrigInfos gr cm) - let flags = Map.fromList [(mkCId f,C.LStr x) | (f,x) <- optionsPGF cflags] + let flags = Map.fromList [(mkCId f,if f == "beam_size" then C.LFlt (read x) else C.LStr x) | (f,x) <- optionsPGF cflags] !(!fid_cnt1,!cnccats) = genCncCats gr am cm cdefs !(!fid_cnt2,!productions,!lindefs,!sequences,!cncfuns) |
