summaryrefslogtreecommitdiff
path: root/src/GF/UseGrammar
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2006-02-14 20:42:36 +0000
committeraarne <aarne@cs.chalmers.se>2006-02-14 20:42:36 +0000
commitb087db0871005c810a5b5e2f4d525ffd428b0fc1 (patch)
tree566bf8246e44348ea95beddd4fefda1b66be73fe /src/GF/UseGrammar
parent167a6dd60a8bd5806a9f21d76d4a51aa5bf53e3a (diff)
Romance clitics almost OK ; bug fix in tb -c
Diffstat (limited to 'src/GF/UseGrammar')
-rw-r--r--src/GF/UseGrammar/Treebank.hs13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/GF/UseGrammar/Treebank.hs b/src/GF/UseGrammar/Treebank.hs
index 606d72266..cf1652ae9 100644
--- a/src/GF/UseGrammar/Treebank.hs
+++ b/src/GF/UseGrammar/Treebank.hs
@@ -49,15 +49,16 @@ mkTreebank opts sh com trees = putInXML opts "treebank" comm (concatMap mkItem t
tris = zip trees [1..]
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
- testOne (e,lang,str) = do
+ testOne (e,lang,str0) = do
let tr = annot gr e
- let str0 = linearize sh lang tr
- if str == str0 then ret else putInXML opts "diff" [] $ do
- putInXML opts "tree" [] (puts $ showTree tr)
- putInXML opts "old" (" lang=" ++ show (prt_ (zIdent lang))) $ puts str0
+ let str = linearize sh lang tr
+ if str == str0 then ret else putInXML opts "diff" [] $ concat [
+ putInXML opts "tree" [] (puts $ showTree tr),
+ putInXML opts "old" (" lang=" ++ show (prt_ (zIdent lang))) $ puts str0,
putInXML opts "new" (" lang=" ++ show (prt_ (zIdent lang))) $ puts str
+ ]
gr = firstStateGrammar sh
-- string vs. IO