fixed some bugs in translation quiz

This commit is contained in:
aarne
2010-11-17 08:30:02 +00:00
parent a995c94429
commit e9679e57af
3 changed files with 13 additions and 6 deletions

View File

@@ -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])]