COmpleted Finnish resource.

COmpleted Finnish resource.
Changed module names.
This commit is contained in:
aarne
2003-11-04 15:09:48 +00:00
parent 0dbf258ab5
commit f6d3b22027
5 changed files with 150 additions and 42 deletions

View File

@@ -5,9 +5,9 @@
-- This resource morphology contains definitions needed in the resource -- This resource morphology contains definitions needed in the resource
-- syntax. It moreover contains the most usual inflectional patterns. -- syntax. It moreover contains the most usual inflectional patterns.
-- --
-- We use the parameter types and word classes defined in $Types.gf$. -- We use the parameter types and word classes defined in $TypesFin.gf$.
resource Morpho = Types ** open (Predef = Predef), Prelude in { resource MorphoFin = TypesFin ** open (Predef = Predef), Prelude in {
--2 Nouns --2 Nouns
-- --
@@ -267,6 +267,32 @@ oper
(tilauks + ("i" + a)) (tilauks + ("i" + a))
(tilauks + "iin") ; (tilauks + "iin") ;
-- Some words have the three grades ("rakkaus","rakkauden","rakkautena"), which
-- are however derivable from the stem.
sRakkaus : Str -> CommonNoun = \rakkaus ->
let {
rakkau = Predef.tk 1 rakkaus ;
rakkaut = rakkau + "t" ;
rakkaute = rakkau + "te" ;
rakkaude = rakkau + "de" ;
rakkauksi = rakkau + "ksi" ;
u = Predef.dp 1 rakkau ;
a = ifTok Str u "u" "a" "ä"
}
in
mkSubst a
rakkaus
rakkaude
rakkaute
(rakkaut + ("t" + a))
(rakkaut + "een")
rakkauksi
rakkauksi
(rakkauksi + "en")
(rakkauksi + a)
(rakkauksi + "in") ;
-- The following covers nouns like "nauris" and adjectives like "kallis", "tyyris". -- The following covers nouns like "nauris" and adjectives like "kallis", "tyyris".
sNauris : (_ : Str) -> CommonNoun = \naurista -> sNauris : (_ : Str) -> CommonNoun = \naurista ->
@@ -526,7 +552,8 @@ caseTable : Number -> CommonNoun -> Case => Str = \n,cn ->
--3 Verbs --3 Verbs
-- --
mkVerb : (_,_,_,_,_ : Str) -> Verb = \tulla,tulen,tulee,tulevat,tulkaa -> mkVerb : (_,_,_,_,_,_ : Str) -> Verb =
\tulla,tulen,tulee,tulevat,tulkaa,tullaan ->
let { let {
tule = Predef.tk 1 tulen ; tule = Predef.tk 1 tulen ;
a = Predef.dp 1 tulkaa a = Predef.dp 1 tulkaa
@@ -541,7 +568,9 @@ caseTable : Number -> CommonNoun -> Case => Str = \n,cn ->
Ind Pl P3 => tulevat ; Ind Pl P3 => tulevat ;
Imper Sg => tule ; Imper Sg => tule ;
Imper Pl => tulkaa ; Imper Pl => tulkaa ;
ImpNegPl => Predef.tk 2 tulkaa + (ifTok Str a "a" "o" "ö") ImpNegPl => Predef.tk 2 tulkaa + (ifTok Str a "a" "o" "ö") ;
Pass True => tullaan ;
Pass False => Predef.tk 2 tullaan
} }
} ; } ;
@@ -558,7 +587,8 @@ caseTable : Number -> CommonNoun -> Case => Str = \n,cn ->
(sano + "n") (sano + "n")
(sano + o) (sano + o)
(sano + (("v" + a) + "t")) (sano + (("v" + a) + "t"))
(sano + (("k" + a) + a)) ; (sano + (("k" + a) + a))
(sano + ((("t" + a) + a) + "n")) ;
-- For "ottaa", "käyttää", "löytää", "huoltaa", "hiihtää", "siirtää". -- For "ottaa", "käyttää", "löytää", "huoltaa", "hiihtää", "siirtää".
@@ -566,14 +596,16 @@ caseTable : Number -> CommonNoun -> Case => Str = \n,cn ->
let { let {
a = Predef.dp 1 ottaa ; a = Predef.dp 1 ottaa ;
ota = Predef.tk 1 otan ; ota = Predef.tk 1 otan ;
otta = Predef.tk 1 ottaa otta = Predef.tk 1 ottaa ;
ote = Predef.tk 1 ota + "e"
} in } in
mkVerb mkVerb
ottaa ottaa
(ota + "n") (ota + "n")
ottaa ottaa
(otta + (("v" + a) + "t")) (otta + (("v" + a) + "t"))
(otta + (("k" + a) + a)) ; (otta + (("k" + a) + a))
(ote + ((("t" + a) + a) + "n")) ;
-- For "poistaa", "ryystää". -- For "poistaa", "ryystää".
@@ -593,7 +625,8 @@ caseTable : Number -> CommonNoun -> Case => Str = \n,cn ->
juoksen juoksen
(juokse + "e") (juokse + "e")
(juokse + (("v" + a) + "t")) (juokse + (("v" + a) + "t"))
(juos + (("k" + a) + a)) ; (juos + (("k" + a) + a))
(juosta + (a + "n")) ;
-- For "juoda", "syödä". -- For "juoda", "syödä".
@@ -607,16 +640,17 @@ caseTable : Number -> CommonNoun -> Case => Str = \n,cn ->
(juo + "n") (juo + "n")
juo juo
(juo + (("v" + a) + "t")) (juo + (("v" + a) + "t"))
(juo + (("k" + a) + a)) ; (juo + (("k" + a) + a))
(juoda + (a + "n")) ;
verbOlla : Verb = mkVerb "olla" "olen" "on" "ovat" "olkaa" ; verbOlla : Verb = mkVerb "olla" "olen" "on" "ovat" "olkaa" "ollaan" ;
-- The negating operator "ei" is actually a verb, which has has present -- The negating operator "ei" is actually a verb, which has present
-- indicative and imperative forms, but no infinitive. -- active indicative and imperative forms, but no infinitive.
verbEi : Verb = verbEi : Verb =
let {ei = mkVerb nonExist "en" "ei" "eivät" "älkää"} in let {ei = mkVerb nonExist "en" "ei" "eivät" "älkää" "ei"} in
{s = table { {s = table {
Ind Pl P3 => "eivät" ; Ind Pl P3 => "eivät" ;
v => ei.s ! v v => ei.s ! v

View File

@@ -15,9 +15,9 @@
-- They should use $resource.Abs.gf$ to access the syntactic rules. -- They should use $resource.Abs.gf$ to access the syntactic rules.
-- This file can be consulted in those, hopefully rare, occasions in which -- This file can be consulted in those, hopefully rare, occasions in which
-- one has to know how the syntactic categories are -- one has to know how the syntactic categories are
-- implemented. The parameter types are defined in $types.Fin.gf$. -- implemented. The parameter types are defined in $TypesFin.gf$.
concrete ResFin of ResAbs = open Prelude, Syntax in { concrete ResFin of ResAbs = open Prelude, SyntaxFin in {
flags flags
startcat=Phr ; startcat=Phr ;
@@ -42,7 +42,7 @@ lincat
V = Verb ; V = Verb ;
-- = {s : VForm => Str} -- = {s : VForm => Str}
VP = Verb ** {s2 : VForm => Str} ; VP = Verb ** {s2 : VForm => Str ; c : ComplCase} ;
TV = TransVerb ; TV = TransVerb ;
-- = Verb ** {s3, s4 : Str ; c : ComplCase} ; -- = Verb ** {s3, s4 : Str ; c : ComplCase} ;
V3 = TransVerb ** {s5, s6 : Str ; c2 : ComplCase} ; V3 = TransVerb ** {s5, s6 : Str ; c2 : ComplCase} ;
@@ -92,6 +92,8 @@ lin
DefOneNP = defNounPhrase singular ; DefOneNP = defNounPhrase singular ;
DefManyNP = defNounPhrase plural ; DefManyNP = defNounPhrase plural ;
CNthatS = nounThatSentence ;
PredVP = predVerbPhrase ; PredVP = predVerbPhrase ;
PosV = predVerb True ; PosV = predVerb True ;
NegV = predVerb False ; NegV = predVerb False ;
@@ -103,6 +105,8 @@ lin
NegTV = complTransVerb False ; NegTV = complTransVerb False ;
PosV3 = complDitransVerb True ; PosV3 = complDitransVerb True ;
NegV3 = complDitransVerb False ; NegV3 = complDitransVerb False ;
PosPassV = passVerb True ;
NegPassV = passVerb False ;
PosNP = predNounPhrase True ; PosNP = predNounPhrase True ;
NegNP = predNounPhrase False ; NegNP = predNounPhrase False ;
PosVS = complSentVerb True ; PosVS = complSentVerb True ;
@@ -116,6 +120,7 @@ lin
PosSlashTV = slashTransVerb True ; PosSlashTV = slashTransVerb True ;
NegSlashTV = slashTransVerb False ; NegSlashTV = slashTransVerb False ;
OneVP = passPredVerbPhrase ;
IdRP = identRelPron ; IdRP = identRelPron ;
FunRP = funRelPron ; FunRP = funRelPron ;
@@ -165,6 +170,7 @@ lin
SubjS = subjunctSentence ; SubjS = subjunctSentence ;
SubjImper = subjunctImperative ; SubjImper = subjunctImperative ;
SubjQu = subjunctQuestion ; SubjQu = subjunctQuestion ;
SubjVP = subjunctVerbPhrase ;
PhrNP = useNounPhrase ; PhrNP = useNounPhrase ;
PhrOneCN = useCommonNounPhrase singular ; PhrOneCN = useCommonNounPhrase singular ;

View File

@@ -7,11 +7,11 @@
-- --
-- The following files are presupposed: -- The following files are presupposed:
resource Syntax = Morpho ** open Prelude, (CO = Coordination) in { resource SyntaxFin = MorphoFin ** open Prelude, (CO = Coordination) in {
--2 Common Nouns --2 Common Nouns
-- --
-- Simple common nouns are defined as the type $CommNoun$ in $morpho.Fin.gf$. -- Simple common nouns are defined as the type $CommNoun$ in $MorphoFin$.
--3 Common noun phrases --3 Common noun phrases
@@ -187,6 +187,14 @@ oper
plurDet : CommNounPhrase -> NounPhrase = pluralNounPhrase ; plurDet : CommNounPhrase -> NounPhrase = pluralNounPhrase ;
-- Constructions like "huomio että kaksi on parillinen" are formed at the
-- first place as common nouns, so that one can also have
-- "kaikki ehdotukset että...".
nounThatSentence : CommNounPhrase -> Sentence -> CommNounPhrase = \idea,x ->
{s = \\p,n,c => idea.s ! p ! n ! c ++ "että" ++ x.s ;
g = idea.g
} ;
--2 Adjectives --2 Adjectives
-- --
@@ -370,8 +378,15 @@ oper
-- Verb phrases are discontinuous: the two parts of a verb phrase are -- Verb phrases are discontinuous: the two parts of a verb phrase are
-- (s) an inflected verb, (s2) a complement. -- (s) an inflected verb, (s2) a complement.
-- For instance: "on" - "kaunis" ; "ei" - "ole kaunis" ; "sisältää" - "rikkiä". -- For instance: "on" - "kaunis" ; "ei" - "ole kaunis" ; "sisältää" - "rikkiä".
-- Moreover, a subject case is needed, because of passive and 'have' verb
-- phrases ("minä uin" ; "minut valitaan" ; "minua odotetaan" ; "minulla on jano").
VerbPhrase = Verb ** {s2 : VForm => Str} ; VerbPhrase = Verb ** {s2 : VForm => Str ; c : ComplCase} ;
-- The normal subject case is the nominative.
nomVerbPhrase : (Verb ** {s2 : VForm => Str}) -> VerbPhrase = \v ->
v ** {c = CCase Nom} ;
-- From the inflection table, we select the finite form as function -- From the inflection table, we select the finite form as function
-- of person and number: -- of person and number:
@@ -398,7 +413,10 @@ oper
} }
} }
} }
in if_then_else VerbPhrase b (walk ** noCompl) (verbEi ** infCompl) ; in
if_then_else VerbPhrase b
(nomVerbPhrase (walk ** noCompl))
(nomVerbPhrase (verbEi ** infCompl)) ;
-- (N.B. local definitions workaround for poor type inference in GF 1.2). -- (N.B. local definitions workaround for poor type inference in GF 1.2).
@@ -432,8 +450,8 @@ oper
\\v => verbOlla.s ! vFormNeg ++ miehia ! v \\v => verbOlla.s ! vFormNeg ++ miehia ! v
} }
in if_then_else VerbPhrase b in if_then_else VerbPhrase b
(verbOlla ** {s2 = miehia}) (nomVerbPhrase (verbOlla ** {s2 = miehia}))
(verbEi ** {s2 = olemiehia}) ; (nomVerbPhrase (verbEi ** {s2 = olemiehia})) ;
predNounPhrase : Bool -> NounPhrase -> VerbPhrase = \b,jussi -> predNounPhrase : Bool -> NounPhrase -> VerbPhrase = \b,jussi ->
let {jussia : Bool => Number => Case => Str = \\_,_,_ => jussi.s ! NPCase Nom} let {jussia : Bool => Number => Case => Str = \\_,_,_ => jussi.s ! NPCase Nom}
@@ -465,7 +483,7 @@ oper
talon : VForm => Str = \\v => talon : VForm => Str = \\v =>
ostaa.s3 ++ talo.s ! complementCase b ostaa.c v ++ ostaa.s4 ostaa.s3 ++ talo.s ! complementCase b ostaa.c v ++ ostaa.s4
} }
in { in nomVerbPhrase {
s = ostan.s ; s = ostan.s ;
s2 = \\v => ostan.s2 ! v ++ talon ! v s2 = \\v => ostan.s2 ! v ++ talon ! v
} ; } ;
@@ -481,7 +499,9 @@ oper
Inf => NPAccNom ; Inf => NPAccNom ;
Ind _ _ => NPAccGen ; Ind _ _ => NPAccGen ;
Imper _ => NPAccNom ; Imper _ => NPAccNom ;
ImpNegPl => NPCase Part ImpNegPl => NPCase Part ;
Pass True => NPAccNom ;
Pass False => NPCase Part
} ; } ;
_ => NPCase Part _ => NPCase Part
} }
@@ -498,6 +518,21 @@ oper
mkTransVerbDir : Verb -> TransVerb = \ostaa -> mkTransVerbDir : Verb -> TransVerb = \ostaa ->
ostaa ** {s3 = [] ; s4 = [] ; c = CAcc} ; ostaa ** {s3 = [] ; s4 = [] ; c = CAcc} ;
-- Most two-place verbs can be used passively; the object case need not be
-- the accusative, and it becomes the subject case in the passive sentence.
passTransVerb : Bool -> TransVerb -> VerbPhrase = \b,tavata ->
{s = \\_ => if_then_else Str b (tavata.s ! Pass b) "ei" ;
s2 = \\_ => if_then_else Str b [] (tavata.s ! Pass b) ;
c = tavata.c
} ;
-- The API function does not demand that the verb is two-place.
-- Therefore, we can only give it the accusative case, as default.
passVerb : Bool -> Verb -> VerbPhrase = \b,uida ->
passTransVerb b (mkTransVerbDir uida) ;
-- Transitive verbs can be used elliptically as verbs. The semantics -- Transitive verbs can be used elliptically as verbs. The semantics
-- is left to applications. The definition is trivial, due to record -- is left to applications. The definition is trivial, due to record
-- subtyping. -- subtyping.
@@ -505,6 +540,15 @@ oper
transAsVerb : TransVerb -> Verb = \juoda -> transAsVerb : TransVerb -> Verb = \juoda ->
juoda ; juoda ;
-- The 'real' Finnish passive is unpersonal, equivalent to the
-- "man" construction in German. It is formed by inflecting the
-- bare verb phrase in passive, and putting the complement before
-- the verb ("auttaa minua" - "minua autetaan").
passPredVerbPhrase : VerbPhrase -> Sentence = \auttaaminua ->
let {p = Pass True} in
{s = auttaaminua.s2 ! p ++ auttaaminua.s ! p} ;
-- *Ditransitive verbs* are verbs with three argument places. -- *Ditransitive verbs* are verbs with three argument places.
-- We treat so far only the rule in which the ditransitive -- We treat so far only the rule in which the ditransitive
-- verb takes both complements to form a verb phrase. -- verb takes both complements to form a verb phrase.
@@ -521,7 +565,7 @@ oper
meille : VForm => Str = \\v => meille : VForm => Str = \\v =>
ostaa.s5 ++ me.s ! complementCase b ostaa.c2 v ++ ostaa.s6 ostaa.s5 ++ me.s ! complementCase b ostaa.c2 v ++ ostaa.s6
} }
in { in nomVerbPhrase {
s = ostan.s ; s = ostan.s ;
s2 = \\v => ostan.s2 ! v ++ talon ! v ++ meille ! v s2 = \\v => ostan.s2 ! v ++ talon ! v ++ meille ! v
} ; } ;
@@ -539,7 +583,8 @@ oper
adVerbPhrase : VerbPhrase -> Adverb -> VerbPhrase = \laulaa, hyvin -> adVerbPhrase : VerbPhrase -> Adverb -> VerbPhrase = \laulaa, hyvin ->
{s = laulaa.s ; {s = laulaa.s ;
s2 = \\v => bothWays (laulaa.s2 ! v) hyvin.s s2 = \\v => bothWays (laulaa.s2 ! v) hyvin.s ;
c = laulaa.c
} ; } ;
advAdjPhrase : Adverb -> AdjPhrase -> AdjPhrase = \liian, iso -> advAdjPhrase : Adverb -> AdjPhrase -> AdjPhrase = \liian, iso ->
@@ -581,8 +626,12 @@ oper
-- contain negation. -- contain negation.
predVerbPhrase : NounPhrase -> VerbPhrase -> Sentence = \jussi,uida -> predVerbPhrase : NounPhrase -> VerbPhrase -> Sentence = \jussi,uida ->
let {p = np2Person jussi.p} in let {
ss (jussi.s ! NPCase Nom ++ uida.s ! Ind jussi.n p ++ uida.s2 ! Ind jussi.n p) ; p = np2Person jussi.p ;
c = complementCase True uida.c Inf --- True,Inf don't matter here
}
in
ss (jussi.s ! c ++ uida.s ! Ind jussi.n p ++ uida.s2 ! Ind jussi.n p) ;
-- This is a macro for simultaneous predication and complementization. -- This is a macro for simultaneous predication and complementization.
@@ -603,7 +652,7 @@ oper
let { let {
sanon = predVerb b sanoa sanon = predVerb b sanoa
} }
in { in nomVerbPhrase {
s = sanon.s ; s = sanon.s ;
s2 = \\v => sanon.s2 ! v ++ conjEtta ++ jussiui.s s2 = \\v => sanon.s2 ! v ++ conjEtta ++ jussiui.s
} ; } ;
@@ -653,7 +702,8 @@ oper
RelClause : Type = {s : Number => Str} ; RelClause : Type = {s : Number => Str} ;
relVerbPhrase : RelPron -> VerbPhrase -> RelClause = \joka,ui -> relVerbPhrase : RelPron -> VerbPhrase -> RelClause = \joka,ui ->
{s = \\n => joka.s ! n ! Nom ++ ui.s ! Ind n P3 ++ ui.s2 ! Ind n P3} ; {s = \\n => joka.s ! n ! npForm2Case n (complementCase True ui.c Inf) ++
ui.s ! Ind n P3 ++ ui.s2 ! Ind n P3} ;
relSlash : RelPron -> SentenceSlashNounPhrase -> RelClause = \joka,saat -> relSlash : RelPron -> SentenceSlashNounPhrase -> RelClause = \joka,saat ->
{s = \\n => joka.s ! n ! saat.c ++ saat.s2 ++ saat.s} ; {s = \\n => joka.s ! n ! saat.c ++ saat.s2 ++ saat.s} ;
@@ -754,7 +804,7 @@ oper
questVerbPhrase : NounPhrase -> VerbPhrase -> Question = \jussi,ui -> questVerbPhrase : NounPhrase -> VerbPhrase -> Question = \jussi,ui ->
let {np = Ind jussi.n (np2Person jussi.p)} in let {np = Ind jussi.n (np2Person jussi.p)} in
ss (ui.s ! np ++ koPart ++ jussi.s ! NPCase Nom ++ ui.s2 ! np) ; ss (ui.s ! np ++ koPart ++ jussi.s ! complementCase True ui.c Inf ++ ui.s2 ! np);
--3 Wh-questions --3 Wh-questions
@@ -947,6 +997,10 @@ oper
subjunctVariants : Subjunction -> Str -> Str -> Str = \if,A,B -> subjunctVariants : Subjunction -> Str -> Str -> Str = \if,A,B ->
variants {if.s ++ A ++ commaPunct ++ B ; B ++ commaPunct ++ if.s ++ A} ; variants {if.s ++ A ++ commaPunct ++ B ; B ++ commaPunct ++ if.s ++ A} ;
subjunctVerbPhrase : VerbPhrase -> Subjunction -> Sentence -> VerbPhrase =
\V, if, A ->
adVerbPhrase V (ss (if.s ++ A.s)) ;
--2 One-word utterances --2 One-word utterances
-- --
-- An utterance can consist of one phrase of almost any category, -- An utterance can consist of one phrase of almost any category,

View File

@@ -1,7 +1,7 @@
-- use this path to read the grammar from the same directory -- use this path to read the grammar from the same directory
--# -path=.:../abstract:../../prelude --# -path=.:../abstract:../../prelude
concrete TestFin of TestAbs = ResFin ** open Prelude, Syntax in { concrete TestFin of TestAbs = ResFin ** open Prelude, SyntaxFin in {
flags startcat=Phr ; lexer=text ; parser=chart ; unlexer=text ; flags startcat=Phr ; lexer=text ; parser=chart ; unlexer=text ;
@@ -12,6 +12,11 @@ lin
Small = regAdjDegr (sSusi "pieni" "pienen" "pienenä") "pienempää" "pienintä" ; Small = regAdjDegr (sSusi "pieni" "pienen" "pienenä") "pienempää" "pienintä" ;
Old = regAdjDegr (sKukko "vanha" "vanhan" "vanhoja") "vanhempaa" "vanhinta" ; Old = regAdjDegr (sKukko "vanha" "vanhan" "vanhoja") "vanhempaa" "vanhinta" ;
Young = regAdjDegr (sSusi "nuori" "nuoren" "nuorena") "nuorempaa" "nuorinta" ; Young = regAdjDegr (sSusi "nuori" "nuoren" "nuorena") "nuorempaa" "nuorinta" ;
American = sNainen "amerikkalaista" ;
Finnish = sNainen "suomalaista" ;
Married = sKukko "vihitty" "vihityn" "vihittyjä" ** {c = NPCase Illat} ;
--- naimisissa !
Man = cnHum (mkNoun "mies" "miehen" "miehenä" "miestä" "mieheen" "miehinä" Man = cnHum (mkNoun "mies" "miehen" "miehenä" "miestä" "mieheen" "miehinä"
"miehissä" "miesten" "miehiä" "miehiin") ; "miehissä" "miesten" "miehiä" "miehiin") ;
@@ -27,9 +32,15 @@ lin
Send = mkTransVerbDir (vOttaa "lähettää" "lähetän") ; Send = mkTransVerbDir (vOttaa "lähettää" "lähetän") ;
Love = mkTransVerbCase (vPoistaa "rakastaa") Part ; Love = mkTransVerbCase (vPoistaa "rakastaa") Part ;
Wait = mkTransVerbCase (vOttaa "odottaa" "odotan") Part ; Wait = mkTransVerbCase (vOttaa "odottaa" "odotan") Part ;
Give = mkTransVerbDir (vOttaa "antaa" "annan") **
{s5 = [] ; s6 = [] ; c2 = CCase Allat} ;
Prefer = mkTransVerbDir (vOttaa "asettaa" "asetan") **
{s5 = [] ; s6 = "edelle" ; c2 = CCase Gen} ; --- pitää paremp(a/i)na
Mother = funGen (n2n (cnHum (sKukko "äiti" "äidin" "äitejä"))) ; Mother = funGen (n2n (cnHum (sKukko "äiti" "äidin" "äitejä"))) ;
Uncle = funGen (n2n (cnHum (sKukko "setä" "sedän" "setiä"))) ; --- eno! Uncle = funGen (n2n (cnHum (sKukko "setä" "sedän" "setiä"))) ; --- eno!
Connection = n2n (cnNoHum (sRakkaus "yhteys")) **
{c = NPCase Elat ; c2 = NPCase Illat} ; --- Tampereelle !
Always = ss "aina" ; Always = ss "aina" ;
Well = ss "hyvin" ; Well = ss "hyvin" ;

View File

@@ -8,7 +8,7 @@
-- --
-- We use the language-independent prelude. -- We use the language-independent prelude.
resource Types = open Prelude in { resource TypesFin = open Prelude in {
-- --
--2 Enumerated parameter types --2 Enumerated parameter types
@@ -74,7 +74,8 @@ oper
--3 Verbs --3 Verbs
-- --
-- We limit the grammar so far to verbs in the infinitive, second-person -- We limit the grammar so far to verbs in the infinitive, second-person
-- imperative, and present tense indicative. A special form is needed for -- imperative, and present tense indicative active and passive.
-- A special form is needed for
-- the negated plural imperative. -- the negated plural imperative.
param param
@@ -82,7 +83,9 @@ param
Inf Inf
| Ind Number Person | Ind Number Person
| Imper Number | Imper Number
| ImpNegPl ; | ImpNegPl
| Pass Bool
;
oper oper
Verb : Type = SS1 VForm ; Verb : Type = SS1 VForm ;
@@ -90,10 +93,10 @@ oper
vFormNeg = Imper Sg ; vFormNeg = Imper Sg ;
vform2number : VForm -> Number = \v -> case v of { vform2number : VForm -> Number = \v -> case v of {
Inf => Sg ;
Ind n _ => n ; Ind n _ => n ;
Imper n => n ; Imper n => n ;
ImpNegPl => Pl ImpNegPl => Pl ;
_ => Sg ---
} ; } ;
-- --