diff --git a/lib/resource/finnish/CategoriesFin.gf b/lib/resource/finnish/CategoriesFin.gf new file mode 100644 index 000000000..37e42d8d6 --- /dev/null +++ b/lib/resource/finnish/CategoriesFin.gf @@ -0,0 +1,106 @@ +--# -path=.:../abstract:../../prelude + +--1 The Top-Level Finnish Resource Grammar: Linearization Types +-- +-- Aarne Ranta 2002 -- 2005 +-- +-- This is the English concrete syntax of the multilingual resource +-- grammar. Most of the work is done in the file $syntax.Eng.gf$. +-- However, for the purpose of documentation, we make here explicit the +-- linearization types of each category, so that their structures and +-- dependencies can be seen. +-- Another substantial part are the linearization rules of some +-- structural words. +-- +-- The users of the resource grammar should not look at this file for the +-- linearization rules, which are in fact hidden in the document version. +-- They should use $resource.Abs.gf$ to access the syntactic rules. +-- This file can be consulted in those, hopefully rare, occasions in which +-- one has to know how the syntactic categories are +-- implemented. The parameter types are defined in $TypesEng.gf$. + +concrete CategoriesFin of Categories = PredefCnc ** open Prelude, SyntaxFin in { + +lincat + N = CommNoun ; + -- = {s : NForm => Str ; g : Gender} + CN = CommNounPhrase ; + NP = {s : NPForm => Str ; n : Number ; p : NPPerson} ; + PN = {s : Case => Str} ; + Det = {s : Gender => Case => Str ; n : Number ; isNum : Bool} ; + NDet = {s : Gender => Case => Str ; isNum : Bool} ; + N2 = Function ; + -- = CommNounPhrase ** {c : NPForm} ; + N3 = Function ** {c2 : NPForm} ; + Num = {s : NPForm => Str ; isNum : Bool ; n : Number} ; + Prep = {s : Str ; c : Case ; isPrep : Bool} ; + + A = Adjective ; + -- = CommonNoun ; + A2 = Adjective ** {c : NPForm} ; + ADeg = {s : Degree => AForm => Str} ; + AP = {s : AdjPos => AForm => Str} ; + AS = Adjective ; --- "more difficult for him to come than..." + A2S = Adjective ** {c : NPForm} ; + AV = Adjective ; + A2V = Adjective ** {c : NPForm} ; + + V = Verb ; + -- = {s : VForm => Str} +---- VP = {s,s2 : Bool => SForm => Agr => Str ; isAux : Bool} ; +---- VPI = {s : VIForm => Agr => Str ; s1 : Str} ; -- s1 is "not" or [] +----- VP = Verb ** {s2 : VForm => Str ; c : ComplCase} ; +---- VG = {s,s2 : Bool => VForm => Str ; c : ComplCase} ; + V2 = TransVerb ; + -- = Verb ** {s3, s4 : Str ; c : ComplCase} ; + V3 = TransVerb ** {s5, s6 : Str ; c2 : ComplCase} ; + VS = Verb ; + VV = Verb ** {c : ComplCase} ; + VQ = Verb ; + VA = Verb ** {c : ComplCase} ; + + V2S = TransVerb ; + V2Q = TransVerb ; + V2V = TransVerb ; ---- + V2A = TransVerb ; ---- + V0 = Verb ; + +---- TP = {s : Str ; b : Bool ; t : Tense ; a : Anteriority} ; --- the Str field is dummy +---- Tense = {s : Str ; t : Tense} ; +---- Ant = {s : Str ; a : Anteriority} ; + + PP = {s : Str} ; + Adv = {s : Str} ; + AdV = {s : Str} ; + AdA = {s : Str} ; + AdC = {s : Str} ; + + S = {s : Str} ; +---- Cl = Clause ; + -- = {s : Order => Bool => SForm => Str} ; + + Slash = Sentence ** {s2 : Str ; c : Case} ; + + RP = {s : Number => Case => Str} ; +---- RCl = {s : Bool => SForm => Agr => Str} ; + RS = {s : Number => Str} ; + + IP = {s : NPForm => Str ; n : Number} ; + IDet = {s : Gender => Case => Str ; n : Number} ; + IAdv = {s : Str} ; +---- QCl = {s : Bool => SForm => QuestForm => Str} ; + QS = {s : Str} ; + Imp = {s : Number => Str} ; + Phr = {s : Str} ; + Text = {s : Str} ; + + Subj = {s : Str} ; + Conj = {s : Str ; n : Number} ; + ConjD = {s1 : Str ; s2 : Str ; n : Number} ; + + ListS = {s1 : Str ; s2 : Str} ; + ListAP = {s1,s2 : AdjPos => AForm => Str} ; + ListNP = {s1,s2 : NPForm => Str ; n : Number ; p : NPPerson} ; + ListAdv = {s1 : Str ; s2 : Str} ; + +} ; diff --git a/lib/resource/finnish/ParadigmsFin.gf b/lib/resource/finnish/ParadigmsFin.gf index ed5c3c862..bebcb2c5b 100644 --- a/lib/resource/finnish/ParadigmsFin.gf +++ b/lib/resource/finnish/ParadigmsFin.gf @@ -1,7 +1,7 @@ --# -path=.:../abstract:../../prelude resource ParadigmsFin = - open (Predef=Predef), Prelude, TypesFin, MorphoFin in { + open (Predef=Predef), Prelude, SyntaxFin, CategoriesFin in { -- The regular noun heuristic takes just one form and analyses its suffixes. diff --git a/lib/resource/finnish/SyntaxFin.gf b/lib/resource/finnish/SyntaxFin.gf index 7798b5543..052d60200 100644 --- a/lib/resource/finnish/SyntaxFin.gf +++ b/lib/resource/finnish/SyntaxFin.gf @@ -1,11 +1,12 @@ +--# -path=.:../../prelude + --1 A Small Finnish Resource Syntax -- --- Aarne Ranta 2003 +-- Aarne Ranta 2003-2005 -- -- This resource grammar contains definitions needed to construct -- indicative, interrogative, and imperative sentences in Finnish. -- --- The following files are presupposed: resource SyntaxFin = MorphoFin ** open Prelude, (CO = Coordination) in { @@ -490,7 +491,7 @@ oper -- of person and number: indicVerb : Verb -> Person -> Number -> Str = \v,p,n -> - v.s ! Ind n p ; + v.s ! Pres n p ; -- A simple verb can be made into a verb phrase with an empty complement, e.g. -- "ui" - []. @@ -598,12 +599,9 @@ oper CCase k => NPCase k ; CAcc => case b of { True => case v of { - Inf => NPAccNom ; - Ind _ _ => NPAccGen ; - Imper _ => NPAccNom ; - ImpNegPl => NPCase Part ; - Pass True => NPAccNom ; - Pass False => NPCase Part + Pres _ _ | Impf _ _ | PastPartAct _ => NPAccGen ; + ImpNegPl | Pass False => NPCase Part ; + _ => NPAccNom -- Inf | Imper _ | PastPartPass _ } ; _ => NPCase Part } @@ -738,7 +736,7 @@ oper 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) ; + ss (jussi.s ! c ++ uida.s ! Pres jussi.n p ++ uida.s2 ! Pres jussi.n p) ; --3 Sentence-complement verbs -- @@ -775,7 +773,7 @@ oper _ => predVerb {s = table { Imper Sg => haluta.s ! Imper Sg ; ImpNegPl => haluta.s ! ImpNegPl ; - _ => haluta.s ! Ind Sg P3 + _ => haluta.s ! Pres Sg P3 } } } @@ -811,7 +809,7 @@ nomVerbVerb : Verb -> VerbVerb = \v -> v ** {c = CCase Nom} ; predVerbPhrase jussi (predVerbGroup b (predVerb ostaa)) ** { s2 = ostaa.s3 ++ ostaa.s4 ; c = npForm2Case jussi.n - (complementCase b ostaa.c (Ind jussi.n (np2Person jussi.p))) + (complementCase b ostaa.c (Pres jussi.n (np2Person jussi.p))) } ; --2 Relative pronouns and relative clauses @@ -833,7 +831,7 @@ nomVerbVerb : Verb -> VerbVerb = \v -> v ** {c = CCase Nom} ; relVerbPhrase : RelPron -> VerbPhrase -> RelClause = \joka,ui -> {s = \\n => joka.s ! n ! npForm2Case n (complementCase True ui.c Inf) ++ - ui.s ! Ind n P3 ++ ui.s2 ! Ind n P3} ; + ui.s ! Pres n P3 ++ ui.s2 ! Pres n P3} ; relSlash : RelPron -> SentenceSlashNounPhrase -> RelClause = \joka,saat -> {s = \\n => joka.s ! n ! saat.c ++ saat.s2 ++ saat.s} ; @@ -933,7 +931,7 @@ oper -- particle attached to the verb part of the verb phrase. questVerbPhrase : NounPhrase -> VerbPhrase -> Question = \jussi,ui -> - let {np = Ind jussi.n (np2Person jussi.p)} in + let {np = Pres jussi.n (np2Person jussi.p)} in ss (ui.s ! np ++ koPart ++ jussi.s ! complementCase True ui.c Inf ++ ui.s2 ! np); onkoNounPhrase : NounPhrase -> Question = \kaljaa ->