improved performance of ParadigmsFin; merged Param with Res

This commit is contained in:
aarne
2006-02-05 14:19:00 +00:00
parent 827f9ab643
commit d752c36d0f
15 changed files with 614 additions and 672 deletions

View File

@@ -7,13 +7,101 @@
-- implement $Test$, it moreover contains regular lexical
-- patterns needed for $Lex$.
resource ResFin = ParamFin ** open Prelude in {
resource ResFin = ParamX ** open Prelude in {
flags optimize=all ;
oper
Compl : Type = {s : Str ; c : NPForm} ;
--2 Parameterd for $Noun$
-- This is the $Case$ as needed for both nouns and $NP$s.
param
Case = Nom | Gen | Part | Transl | Ess
| Iness | Elat | Illat | Adess | Ablat | Allat
| Abess ; -- Comit, Instruct in NForm
NForm = NCase Number Case
| NComit | NInstruct -- no number dist
| NPossNom | NPossGenPl | NPossTransl Number | NPossIllat Number ;
-- Agreement of $NP$ is a record. We'll add $Gender$ later.
oper
Agr = {n : Number ; p : Person} ;
--
--2 Adjectives
--
-- The major division is between the comparison degrees. A degree fixed,
-- an adjective is like common nouns, except for the adverbial form.
param
AForm = AN NForm | AAdv ;
oper
Adjective : Type = {s : Degree => AForm => Str} ;
--2 Noun phrases
--
-- Two forms of *virtual accusative* are needed for nouns in singular,
-- the nominative and the genitive one ("ostan talon"/"osta talo").
-- For nouns in plural, only a nominative accusative exist. Pronouns
-- have a uniform, special accusative form ("minut", etc).
param
NPForm = NPCase Case | NPAccNom | NPAccGen ;
--2 For $Verb$
-- A special form is needed for the negated plural imperative.
param
VForm =
Inf
| Presn Number Person
| Impf Number Person
| Condit Number Person
| Imper Number
| ImperP3 Number
| ImperP1Pl
| ImpNegPl
| Pass Bool
| PastPartAct AForm
| PastPartPass AForm
| Inf3Iness -- 5 forms acc. to Karlsson
| Inf3Elat
| Inf3Illat
| Inf3Adess
| Inf3Abess
;
SType = SDecl | SQuest ;
--2 For $Relative$
RAgr = RNoAg | RAg {n : Number ; p : Person} ;
--2 For $Numeral$
CardOrd = NCard | NOrd ;
DForm = unit | teen | ten ;
--2 Transformations between parameter types
oper
agrP3 : Number -> Agr = \n ->
{n = n ; p = P3} ;
conjAgr : Agr -> Agr -> Agr = \a,b -> {
n = conjNumber a.n b.n ;
p = conjPerson a.p b.p
} ;
---
Compl : Type = {s : Str ; c : NPForm ; isPre : Bool} ;
-- For $Verb$.