From 2acb125f6fd05427a95ebe2a1c784e362512cf59 Mon Sep 17 00:00:00 2001 From: aarne Date: Wed, 17 Nov 2010 08:30:02 +0000 Subject: fixed some bugs in translation quiz --- src/compiler/GF/Quiz.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/compiler/GF/Quiz.hs') 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])] -- cgit v1.2.3