summaryrefslogtreecommitdiff
path: root/src/GF/Command/Interpreter.hs
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2008-12-12 08:12:24 +0000
committeraarne <aarne@cs.chalmers.se>2008-12-12 08:12:24 +0000
commit6e511e5fbddf3f388ff16c45030e2db470029758 (patch)
treea99630758db7009a5ee24e9b81fff5525a74b7cb /src/GF/Command/Interpreter.hs
parenta3328e5abb048d0e6ef1c4fbb80249d4014ed926 (diff)
morphological analyser in shell state - now reasonably fast
Diffstat (limited to 'src/GF/Command/Interpreter.hs')
-rw-r--r--src/GF/Command/Interpreter.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/GF/Command/Interpreter.hs b/src/GF/Command/Interpreter.hs
index 82b8ae7af..7e9ebb653 100644
--- a/src/GF/Command/Interpreter.hs
+++ b/src/GF/Command/Interpreter.hs
@@ -13,6 +13,7 @@ import GF.Command.Parse
import PGF
import PGF.Data
import PGF.Macros
+import PGF.Morphology
import GF.System.Signal
import GF.Infra.UseIO
@@ -22,13 +23,16 @@ import qualified Data.Map as Map
data CommandEnv = CommandEnv {
multigrammar :: PGF,
+ morphos :: Map.Map Language Morpho,
commands :: Map.Map String CommandInfo,
commandmacros :: Map.Map String CommandLine,
expmacros :: Map.Map String Tree
}
mkCommandEnv :: String -> PGF -> CommandEnv
-mkCommandEnv enc pgf = CommandEnv pgf (allCommands enc pgf) Map.empty Map.empty
+mkCommandEnv enc pgf =
+ let mos = Map.fromList [(la,buildMorpho pgf la) | la <- languages pgf] in
+ CommandEnv pgf mos (allCommands enc (pgf, mos)) Map.empty Map.empty
emptyCommandEnv :: CommandEnv
emptyCommandEnv = mkCommandEnv "utf8" emptyPGF