summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Quiz.hs
diff options
context:
space:
mode:
authoraarne <aarne@chalmers.se>2010-11-17 08:30:02 +0000
committeraarne <aarne@chalmers.se>2010-11-17 08:30:02 +0000
commit2acb125f6fd05427a95ebe2a1c784e362512cf59 (patch)
treef4fda490b6bfe7c8bc5cda4458dc69896b326952 /src/compiler/GF/Quiz.hs
parent7a2ab26f9f742f30b6068dc3cc95aa9965042a61 (diff)
fixed some bugs in translation quiz
Diffstat (limited to 'src/compiler/GF/Quiz.hs')
-rw-r--r--src/compiler/GF/Quiz.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/GF/Quiz.hs b/src/compiler/GF/Quiz.hs
index 0b37660c8..aaeae34a8 100644
--- a/src/compiler/GF/Quiz.hs
+++ b/src/compiler/GF/Quiz.hs
@@ -46,8 +46,10 @@ translationList mex pgf ig og typ number = do
Nothing -> generateRandom gen pgf typ
return $ map mkOne $ ts
where
- mkOne t = (norml (linearize pgf ig t), map (norml . linearize pgf og) (homonyms t))
+ mkOne t = (norml (linearize pgf ig t),
+ map norml (concatMap lins (homonyms t)))
homonyms = parse pgf ig typ . linearize pgf ig
+ lins = nub . concatMap (map snd) . tabularLinearizes pgf og
morphologyList ::
Maybe Expr -> PGF -> Language -> Type -> Int -> IO [(String,[String])]