ditt o datt

This commit is contained in:
aarne
2004-04-23 13:45:07 +00:00
parent 23914ca726
commit 45fa5271d9
8 changed files with 39 additions and 33 deletions

View File

@@ -97,7 +97,7 @@ oper
sLukko : Str -> CommonNoun = \lukko ->
let a = getHarmony (last lukko)
in
sKukko lukko (weakGrade lukko + "n") (lukko + "n" + a) ;
sKukko lukko (weakGrade lukko + "n") (lukko + "j" + a) ;
-- The special case with no alternations: the vowel harmony is inferred from the
-- last letter - which must be one of "o", "u", "ö", "y".

View File

@@ -58,7 +58,7 @@ oper
-- singular nominative and genitive, and plural partitive.
-- Examples: "talo", "kukko", "huippu", "koira", "kukka", "syylä", "särki"...
nKukko : (kukko,kukon,kukkoja : Str) -> Gender -> N ;
nKukko : (kukko,kukon,kukkoja : Str) -> N ;
-- For convenience, we define 1-argument paradigms as producing the
-- nonhuman gender; the following function changes this:
@@ -107,7 +107,7 @@ oper
-- "susi", "vesi", "pieni". To get all stems and the vowel harmony, it takes
-- the singular nominative, genitive, and essive.
nSusi : (susi,suden,sutta : Str) -> Gender -> N ;
nSusi : (susi,suden,sutta : Str) -> N ;
-- Nouns ending with a long vowel, such as "puu", "pää", "pii", "leikkuu",
-- are inflected according to the following.
@@ -128,7 +128,7 @@ oper
-- The following covers some nouns ending with a consonant, e.g.
-- "tilaus", "kaulin", "paimen", "laidun".
nTilaus : (tilaus,tilauksena : Str) -> Gender -> N ;
nTilaus : (tilaus,tilauksena : Str) -> N ;
-- Special case:
@@ -244,7 +244,7 @@ oper
mkN = \a,b,c,d,e,f,g,h,i,j,k ->
mkNoun a b c d e f g h i j ** {g = k ; lock_N = <>} ;
nKukko = \a,b,c,g -> sKukko a b c ** {g = g ; lock_N = <>} ;
nKukko = \a,b,c -> sKukko a b c ** {g = nonhuman ; lock_N = <>} ;
humanN = \n -> {s = n.s ; lock_N = n.lock_N ; g = human} ;
@@ -255,13 +255,13 @@ oper
nLinux = \a -> sLinux a ** {g = nonhuman ; lock_N = <>} ;
nPeruna = \a -> sPeruna a ** {g = nonhuman ; lock_N = <>} ;
nRae = \a,b -> sRae a b ** {g = nonhuman ; lock_N = <>} ;
nSusi = \a,b,c,g -> sSusi a b c ** {g = g ; lock_N = <>} ;
nSusi = \a,b,c -> sSusi a b c ** {g = nonhuman ; lock_N = <>} ;
nPuu = \a -> sPuu a ** {g = nonhuman ; lock_N = <>} ;
nSuo = \a -> sSuo a ** {g = nonhuman ; lock_N = <>} ;
nNainen = \a -> sNainen a ** {g = nonhuman ; lock_N = <>} ;
nTilaus = \a,b,g -> sTilaus a b ** {g = g ; lock_N = <>} ;
nTilaus = \a,b -> sTilaus a b ** {g = nonhuman ; lock_N = <>} ;
nKulaus = \a -> nTilaus a (init a + "ksen" + getHarmony (last
(init a))) nonhuman ;
(init a))) ;
nNauris = \a -> sNauris a ** {g = nonhuman ; lock_N = <>} ;

View File

@@ -6,24 +6,26 @@ N!nLukko: ha/ttu hatun -- hattuja
N!nLukko: hui/ppu huipun -- huippuja
N!nLukko: hy/ppy hypyn -- hyppyjä
N!nTalo: tal/o |talon|talossa|talosta| --taloja
N!nTalo: tal/o |talon|talossa|talosta| taloja taloa
N!nTalo: hal/u |halun|halussa|talusta| haluja
N!nTalo: sär/ö |särön|särössä|säröstä| --säröjä
N!nTalo: säv/y |sävyn|sävyssä|sävystä| --sävyjä
N!nTalo: sär/ö |särön|särössä|säröstä| säröjä halua
N!nTalo: säv/y |sävyn|sävyssä|sävystä| sävyjä
N!nArpi: ar/pi (arvessa|arvella|arvissa|arvilla)
N!nSylki: syl/ki (syljessä|syljellä|syljissä|syljillä)
-- nKoira: koir/a koiran koiria -- koirien
-- nKoira: syyl/ä syylän syyliä
N!nKukko: koir/a +koiran +koiria
N!nKukko: syyl/ä +syylän +syyliä
N!nLinux: linux/ia linux
N!nLinux: syrinx/iä syrinx
N!nLinux: linux/ia linux linuxin
N!nLinux: syrinx/iä syrinx syrinxin
N!nRae: ta/e |takeeseen|
N!nRae: perh/e |perheeseen|
N!nRae: sa/de |sateeseen|
N!nRae: ta/e +takeena
N!nRae: perh/e +perhee
N!nRae: sa/de +sateena
-- N!nSusi: su/si suden suteen
N!nSusi: su/si +suden +sutta
N!nSusi: pie/ni +pienen +pientä
N!nSusi: ka/nsi +kannen +kantta
N!nPuu: m/aa maahan |maassa|maasta|
N!nPuu: p/uu puuhun
@@ -38,22 +40,22 @@ N!nSuo: t/y
N!nNainen: nai/sta nainen -- naisen
N!nNainen: hyi/stä hyinen
N!nTilaus: til/aus tilauksen
N!nTilaus: til/aus +tilauksena
N!nNauris: naur/is |naurista|nauriin|
V!vValua: san/oa |sanon|sanoo| |sanoi|sanoin|sanoit| |sanoisi|sanoisin|sanoisit|
V!vValua: kys/yä |kysyn|kysyy| |kysyi|kysyin|kysyit| |kysyisi|kysyisin|kysyisit|
V!vValua: kul/ua [kylun|kuluu| |kului|kuluin| |kuluisi|
Verb!vValua: san/oa |sanon|sanoo| |sanoi|sanoin|sanoit| |sanoisi|sanoisin|sanoisit|
Verb!vValua: kys/yä |kysyn|kysyy| |kysyi|kysyin|kysyit| |kysyisi|kysyisin|kysyisit|
Verb!vValua: kul/ua [kylun|kuluu| |kului|kuluin| |kuluisi|
V!vOstaa: ost/aa |ostan|ostat| |osti|ostin| |ostanut|
V!vOstaa: est/ää |estän|estät| |esti|estin| |estänyt|
Verb!vOstaa: ost/aa |ostan|ostat| |osti|ostin| |ostanut|
Verb!vOstaa: est/ää |estän|estät| |esti|estin| |estänyt|
--
-- To do then:
-- grep fun koe >LexAbs.gf
-- grep lin koe >LexEng.gf
-- And prefix these files with
-- abstract LexAbs = Shallow ** {
-- --# -path=.:..:../../../prelude:../../abstract:../../english
-- concrete LexFin of LexAbs = ShallowFin ** open ParadigmsFin in {
-- abstract FinAbs = Shallow ** {
-- --# -path=.:..:../../../prelude:../../abstract:../../finnish
-- concrete FinFin of FinAbs = ShallowFin ** open ParadigmsFin in {

View File

@@ -30,12 +30,12 @@ prCFFun :: CFFun -> String
prCFFun = prCFFun' True ---- False -- print profiles for debug
prCFFun' :: Bool -> CFFun -> String
prCFFun' profs (CFFun (t, p)) = prt t ++ pp p where
prCFFun' profs (CFFun (t, p)) = prt_ t ++ pp p where
pp p = if (not profs || normal p) then "" else "_" ++ concat (map show p)
normal p = and [x==y && null b | ((b,x),y) <- zip p (map (:[]) [0..])]
prCFCat :: CFCat -> String
prCFCat (CFCat (c,l)) = prt c ++ "-" ++ prt l ----
prCFCat (CFCat (c,l)) = prt_ c ++ "-" ++ prt_ l ----
prCFItem (CFNonterm c) = prCFCat c
prCFItem (CFTerm a) = prRegExp a

View File

@@ -56,6 +56,8 @@ stripTerm t = case t of
TComp ty -> TComp $ stripTerm ty
TWild ty -> TWild $ stripTerm ty
_ -> ti
R [] -> EInt 8 --- GF 1.2 parser doesn't accept empty records
RecType [] -> Cn "Int" ---
_ -> composSafeOp stripTerm t
stripPattern p = case p of

View File

@@ -61,7 +61,7 @@ instance Print Char where
prtList s = ["\"" ++ concatMap mkEsc s ++ "\""]
mkEsc s = case s of
_ | elem s "\\\"'" -> '\\':[s]
_ | elem s "\\\"" -> '\\':[s]
'\n' -> "\\n"
'\t' -> "\\t"
_ -> [s]

View File

@@ -191,7 +191,9 @@ customTermCommand =
(exp2termCommand gr (computeAbsTerm gr) t))
,(strCI "paraphrase", \g t -> let gr = grammar g in
exp2termlistCommand gr (mkParaphrases gr) t)
---- ,(strCI "typecheck", \g t -> err (const []) return (checkIfValidExp g t))
,(strCI "typecheck", \g t -> let gr = grammar g in
err (const []) (return . const t)
(checkIfValidExp gr (tree2exp t)))
,(strCI "solve", \g t -> err (const [t]) (return . loc2tree)
(uniqueRefinements (grammar g) (tree2loc t)))
,(strCI "context", \g t -> err (const [t]) (return . loc2tree)

View File

@@ -1 +1 @@
module Today where today = "Mon Apr 19 17:59:02 CEST 2004"
module Today where today = "Wed Apr 21 17:20:17 CEST 2004"