forked from GitHub/gf-core
Romance clitics almost OK ; bug fix in tb -c
This commit is contained in:
@@ -49,15 +49,16 @@ mkTreebank opts sh com trees = putInXML opts "treebank" comm (concatMap mkItem t
|
|||||||
tris = zip trees [1..]
|
tris = zip trees [1..]
|
||||||
|
|
||||||
testTreebank :: Options -> ShellState -> String -> Res
|
testTreebank :: Options -> ShellState -> String -> Res
|
||||||
testTreebank opts sh = putInXML opts "diff" [] . concatMap testOne . getTreebank . lines
|
testTreebank opts sh = putInXML opts "testtreebank" [] . concatMap testOne . getTreebank . lines
|
||||||
where
|
where
|
||||||
testOne (e,lang,str) = do
|
testOne (e,lang,str0) = do
|
||||||
let tr = annot gr e
|
let tr = annot gr e
|
||||||
let str0 = linearize sh lang tr
|
let str = linearize sh lang tr
|
||||||
if str == str0 then ret else putInXML opts "diff" [] $ do
|
if str == str0 then ret else putInXML opts "diff" [] $ concat [
|
||||||
putInXML opts "tree" [] (puts $ showTree tr)
|
putInXML opts "tree" [] (puts $ showTree tr),
|
||||||
putInXML opts "old" (" lang=" ++ show (prt_ (zIdent lang))) $ puts str0
|
putInXML opts "old" (" lang=" ++ show (prt_ (zIdent lang))) $ puts str0,
|
||||||
putInXML opts "new" (" lang=" ++ show (prt_ (zIdent lang))) $ puts str
|
putInXML opts "new" (" lang=" ++ show (prt_ (zIdent lang))) $ puts str
|
||||||
|
]
|
||||||
gr = firstStateGrammar sh
|
gr = firstStateGrammar sh
|
||||||
|
|
||||||
-- string vs. IO
|
-- string vs. IO
|
||||||
|
|||||||
Reference in New Issue
Block a user