summaryrefslogtreecommitdiff
path: root/src-3.0/GF/Command
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2008-06-16 11:15:38 +0000
committeraarne <aarne@cs.chalmers.se>2008-06-16 11:15:38 +0000
commitea31c1e63ba137b943f7fd5e0ffe91cd64673875 (patch)
treeda25c50e9d0b0052eb8cbdf435b054af229fef25 /src-3.0/GF/Command
parent543ef3531ad4591dd6e6e3c88c8f734f983c875a (diff)
new languages in resource Make; moved GF-specific stuff from Quiz
Diffstat (limited to 'src-3.0/GF/Command')
-rw-r--r--src-3.0/GF/Command/Commands.hs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src-3.0/GF/Command/Commands.hs b/src-3.0/GF/Command/Commands.hs
index b68ad7470..f586125b2 100644
--- a/src-3.0/GF/Command/Commands.hs
+++ b/src-3.0/GF/Command/Commands.hs
@@ -454,3 +454,18 @@ allCommands pgf = Map.fromList [
-- ps -f -g s returns g (f s)
stringOps opts s = foldr app s (reverse (map prOpt opts)) where
app f = maybe id id (stringOp f)
+
+translationQuiz :: PGF -> Language -> Language -> Category -> IO ()
+translationQuiz pgf ig og cat = do
+ tts <- translationList pgf ig og cat infinity
+ mkQuiz "Welcome to GF Translation Quiz." tts
+
+morphologyQuiz :: PGF -> Language -> Category -> IO ()
+morphologyQuiz pgf ig cat = do
+ tts <- morphologyList pgf ig cat infinity
+ mkQuiz "Welcome to GF Morphology Quiz." tts
+
+-- | the maximal number of precompiled quiz problems
+infinity :: Int
+infinity = 256
+