1
0
forked from GitHub/gf-rgl

more efficient way of compiling Finnish compounds

This commit is contained in:
aarne
2010-12-29 09:22:07 +00:00
parent af04e17595
commit df73038639
4 changed files with 15 additions and 3 deletions
+4 -2
View File
@@ -56,7 +56,7 @@ mkCompound compMap (w,ent) =
Just (e,b) -> return (w, ent {
word = word e,
tn = tn e,
par = "compoundNK " ++ par e ++ " " ++ quoted b,
par = unwords ["compoundNK",par e,quoted b],
isDummy = tn e == 0
}
)
@@ -112,7 +112,9 @@ mkRules e = do
| otherwise = putStrLn
mkFun fun cat = unwords ["fun",fun,":",cat,";"]
mkLin fun par w = unwords ["lin",fun,"=",par,quoted w,";"]
mkLin fun par w = case words par of
f@"compoundNK":p:v:_ -> unwords ["lin",fun,"=",f,v,"("++ p,quoted w ++")",";"]
_ -> unwords ["lin",fun,"=",par,quoted w,";"]
mkId = concatMap trim where
trim c = case fromEnum c of