forked from GitHub/gf-rgl
editor command pc n ; resource/finnish
This commit is contained in:
@@ -294,7 +294,7 @@ oper
|
|||||||
vOlla = verbOlla ** {lock_V = <>} ;
|
vOlla = verbOlla ** {lock_V = <>} ;
|
||||||
vEi = verbEi ** {lock_V = <>} ;
|
vEi = verbEi ** {lock_V = <>} ;
|
||||||
|
|
||||||
mkTV = \v,c,p,o -> v ** {s3 = p ; s4 = o ; c = c ; lock_TV = <>} ;
|
---- mkTV = \v,c,p,o -> v ** {s3 = p ; s4 = o ; c = c ; lock_TV = <>} ;
|
||||||
tvCase = \v,c -> mkTV v c [] [] ;
|
tvCase = \v,c -> mkTV v c [] [] ;
|
||||||
tvDir v = mkTransVerbDir v ** {lock_TV = <>} ;
|
tvDir v = mkTransVerbDir v ** {lock_TV = <>} ;
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
--# -path=.:../../prelude
|
--# -path=.:../../prelude
|
||||||
|
|
||||||
---- abstract Resource = Rules, Verbphrase ** {} ;
|
|
||||||
abstract Resource = Rules, Clause, Structural ** {} ;
|
abstract Resource = Rules, Clause, Structural ** {} ;
|
||||||
|
|||||||
@@ -54,9 +54,9 @@ oper
|
|||||||
nominative : Case ;
|
nominative : Case ;
|
||||||
genitive : Case ;
|
genitive : Case ;
|
||||||
|
|
||||||
-- Prepositions used in many-argument functions are just strings.
|
-- Prepositions are used in many-argument functions for rection.
|
||||||
|
|
||||||
Preposition : Type = Str ;
|
Preposition : Type ;
|
||||||
|
|
||||||
|
|
||||||
--2 Nouns
|
--2 Nouns
|
||||||
@@ -187,9 +187,13 @@ oper
|
|||||||
|
|
||||||
--2 Prepositions
|
--2 Prepositions
|
||||||
--
|
--
|
||||||
-- A preposition is just a string.
|
-- A preposition as used for rection in the lexicon, as well as to
|
||||||
|
-- build $PP$s in the resource API, just requires a string.
|
||||||
|
|
||||||
mkPreposition : Str -> Preposition ;
|
mkPreposition : Str -> Preposition ;
|
||||||
|
mkPrep : Str -> Prep ;
|
||||||
|
|
||||||
|
-- (These two functions are synonyms.)
|
||||||
|
|
||||||
--2 Verbs
|
--2 Verbs
|
||||||
--
|
--
|
||||||
@@ -282,6 +286,8 @@ oper
|
|||||||
nominative = Nom ;
|
nominative = Nom ;
|
||||||
genitive = Gen ;
|
genitive = Gen ;
|
||||||
|
|
||||||
|
Preposition = Str ;
|
||||||
|
|
||||||
regN = \ray ->
|
regN = \ray ->
|
||||||
let
|
let
|
||||||
ra = Predef.tk 1 ray ;
|
ra = Predef.tk 1 ray ;
|
||||||
@@ -360,6 +366,7 @@ oper
|
|||||||
mkAdA x = ss x ** {lock_AdA = <>} ;
|
mkAdA x = ss x ** {lock_AdA = <>} ;
|
||||||
|
|
||||||
mkPreposition p = p ;
|
mkPreposition p = p ;
|
||||||
|
mkPrep p = ss p ** {lock_Prep = <>} ;
|
||||||
|
|
||||||
mkV a b c d e = mkVerbP3worst a b c d e ** {s1 = [] ; lock_V = <>} ;
|
mkV a b c d e = mkVerbP3worst a b c d e ** {s1 = [] ; lock_V = <>} ;
|
||||||
|
|
||||||
|
|||||||
1009
resource/finnish/MorphoFin.gf
Normal file
1009
resource/finnish/MorphoFin.gf
Normal file
File diff suppressed because it is too large
Load Diff
1160
resource/finnish/SyntaxFin.gf
Normal file
1160
resource/finnish/SyntaxFin.gf
Normal file
File diff suppressed because it is too large
Load Diff
134
resource/finnish/TypesFin.gf
Normal file
134
resource/finnish/TypesFin.gf
Normal file
@@ -0,0 +1,134 @@
|
|||||||
|
--1 Finnish Word Classes and Morphological Parameters
|
||||||
|
--
|
||||||
|
-- This is a resource module for Finnish morphology, defining the
|
||||||
|
-- morphological parameters and word classes of Finnish. It is aimed
|
||||||
|
-- to be complete w.r.t. the description of word forms.
|
||||||
|
-- However, it only includes those parameters that are needed for
|
||||||
|
-- analysing individual words: such parameters are defined in syntax modules.
|
||||||
|
--
|
||||||
|
-- We use the language-independent prelude.
|
||||||
|
|
||||||
|
resource TypesFin = open Prelude in {
|
||||||
|
|
||||||
|
--
|
||||||
|
--2 Enumerated parameter types
|
||||||
|
--
|
||||||
|
-- These types are the ones found in school grammars.
|
||||||
|
-- Their parameter values are atomic. The accusative cases are only
|
||||||
|
-- defined in syntax; in morphology, there is a special accusative for
|
||||||
|
-- pronouns.
|
||||||
|
|
||||||
|
param
|
||||||
|
Number = Sg | Pl ;
|
||||||
|
Case = Nom | Gen | Part | Transl | Ess
|
||||||
|
| Iness | Elat | Illat | Adess | Ablat | Allat
|
||||||
|
| Abess ; -- Comit, Instruct in NForm
|
||||||
|
Person = P1 | P2 | P3 ;
|
||||||
|
Degree = Pos | Comp | Sup ;
|
||||||
|
Gender = NonHuman | Human ;
|
||||||
|
|
||||||
|
-- For data abstraction, we define
|
||||||
|
|
||||||
|
oper
|
||||||
|
singular = Sg ;
|
||||||
|
plural = Pl ;
|
||||||
|
|
||||||
|
--2 Word classes and hierarchical parameter types
|
||||||
|
--
|
||||||
|
-- Real parameter types (i.e. ones on which words and phrases depend)
|
||||||
|
-- are often hierarchical. The alternative would be cross-products of
|
||||||
|
-- simple parameters, but this would usually overgenerate.
|
||||||
|
--
|
||||||
|
|
||||||
|
--3 Common nouns
|
||||||
|
--
|
||||||
|
-- Common nouns are inflected in number and noun case. In noun case, we include
|
||||||
|
-- forms used in connection with possessive suffixes.
|
||||||
|
|
||||||
|
param
|
||||||
|
NForm = NCase Number Case
|
||||||
|
| NComit | NInstruct -- no number dist
|
||||||
|
| NPossNom | NPossGenPl | NPossTransl Number | NPossIllat Number ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
CommonNoun : Type = {s : NForm => Str} ;
|
||||||
|
|
||||||
|
useNForm : NForm -> (Number => Case => Str) -> Str = \nf,f -> case nf of {
|
||||||
|
NCase n c => f ! n ! c ;
|
||||||
|
NPossNom => f ! Sg ! Nom ; ---- "iso autoni"; also "isot autoni" etc
|
||||||
|
NPossGenPl => f ! Pl ! Gen ;
|
||||||
|
NPossTransl n => f ! n ! Transl ;
|
||||||
|
NPossIllat n => f ! n ! Illat ;
|
||||||
|
_ => f ! Sg ! Nom --- NComit, NInstruct ; should not happen
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
--3 Adjectives
|
||||||
|
--
|
||||||
|
-- The major division is between the comparison degrees, but it
|
||||||
|
-- is also good to leave room for adjectives that cannon be compared.
|
||||||
|
-- Such adjectives are like common nouns, except for the adverbial form.
|
||||||
|
|
||||||
|
param
|
||||||
|
AForm = AN NForm | AAdv ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
Adjective : Type = {s : AForm => Str} ;
|
||||||
|
AdjDegr : Type = {s : Degree => AForm => Str} ;
|
||||||
|
|
||||||
|
--3 Verbs
|
||||||
|
--
|
||||||
|
-- We limit the grammar so far to verbs in the infinitive, second-person
|
||||||
|
-- imperative, and present tense indicative active and passive.
|
||||||
|
-- A special form is needed for
|
||||||
|
-- the negated plural imperative.
|
||||||
|
|
||||||
|
param
|
||||||
|
VForm =
|
||||||
|
Inf
|
||||||
|
| Pres Number Person
|
||||||
|
| Impf Number Person
|
||||||
|
| Imper Number
|
||||||
|
| ImpNegPl
|
||||||
|
| Pass Bool
|
||||||
|
;
|
||||||
|
|
||||||
|
oper
|
||||||
|
Verb : Type = SS1 VForm ;
|
||||||
|
|
||||||
|
vFormNeg = Imper Sg ;
|
||||||
|
|
||||||
|
vform2number : VForm -> Number = \v -> case v of {
|
||||||
|
Pres n _ => n ;
|
||||||
|
Impf n _ => n ;
|
||||||
|
Imper n => n ;
|
||||||
|
ImpNegPl => Pl ;
|
||||||
|
_ => Sg ---
|
||||||
|
} ;
|
||||||
|
|
||||||
|
--
|
||||||
|
--3 Pronouns
|
||||||
|
--
|
||||||
|
-- For pronouns, we need the noun case forms, plus an accusative.
|
||||||
|
|
||||||
|
param
|
||||||
|
PForm = PCase Case | PAcc ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
Pronoun : Type = {s : PForm => Str ; n : Number ; p : Person} ;
|
||||||
|
|
||||||
|
--3 Proper names
|
||||||
|
--
|
||||||
|
-- Proper names only need case forms.
|
||||||
|
|
||||||
|
ProperName : Type = SS1 Case ;
|
||||||
|
|
||||||
|
|
||||||
|
--3 Relative pronouns
|
||||||
|
--
|
||||||
|
-- Relative pronouns are inflected like nouns, except for possessive suffixes.
|
||||||
|
|
||||||
|
RelPron : Type = {s : Number => Case => Str} ;
|
||||||
|
|
||||||
|
} ;
|
||||||
Reference in New Issue
Block a user