subcat in verbs

This commit is contained in:
aarne
2004-11-29 22:15:23 +00:00
parent d7da99f786
commit 2a3608af9a
6 changed files with 19048 additions and 12619 deletions

View File

@@ -0,0 +1,39 @@
main :: IO ()
main = do
s <- readFile "verbs"
mapM_ putRule $ combine $ map words $ lines s -- to create fun/lin
-- mapM_ putConjug [1..100] -- to create oper
putRule = appendFile "verbs.gf" . mkRule
mkRule s = case s of
n:v:cs ->
"fun " ++ v ++ cat ++ " : " ++ cat ++ " ;\n" ++
"lin " ++ v ++ cat ++
" = v_nancy" ++ n ++ " \"" ++ v ++ "\"" ++ ext ++ " ;\n"
where
(cat,ext) = case cs of
"I":"T":_ -> ("VN2", " ** {aux = VHabere ; c = Acc}")
"T":_ -> ("VN2", " ** {aux = VHabere ; c = Acc}")
"a":au -> ("VN2", " ** {aux = " ++ aux au ++ " ; c = Dat}")
"de":au -> ("VN2", " ** {aux = " ++ aux au ++ " ; c = Gen}")
au -> ("VN", " ** {aux = " ++ aux au ++ "}")
aux au = case au of
"etre":_ -> "VEsse"
_ -> "VHabere"
combine ls = case ls of
l@(n:v:_:c:_):vs ->
let (vv,rest) = span ((==v) . (!!1)) vs in
([n,v,c] ++ map (!!3) vs) : combine rest
_ -> ls
---
putConjug = appendFile "nancy_conjugs.gf" . mkConjug
mkConjug :: Integer -> String
mkConjug i = "oper v_nancy" ++ show i ++
" : Str -> V = \\s -> conj v ++ {lock_V = <>} ;\n"

File diff suppressed because it is too large Load Diff

View File

@@ -1,3 +1,4 @@
abstract TestVerbesAbs = TestResource, VerbesAbs ** {
fun UseVN : VN -> V ;
fun UseVN : VN -> V ;
fun UseVN2 : VN2 -> V2 ;
}

View File

@@ -3,6 +3,7 @@
concrete TestVerbesFre of TestVerbesAbs =
TestResourceFre, VerbesFre ** open TypesFre in {
lin UseVN ve = verbPres ve.s AHabere ; ---- VEsse
lin UseVN ve = verbPres ve.s ve.aux ;
lin UseVN2 ve = verbPres ve.s ve.aux ** {s2 = [] ; c = ve.c} ;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff