mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-20 16:42:51 -06:00
gfcm in Java ; Finnish close to finished
This commit is contained in:
@@ -25,24 +25,24 @@ lin
|
|||||||
|
|
||||||
Drink = PresV2 (dirV2 drink_V) ;
|
Drink = PresV2 (dirV2 drink_V) ;
|
||||||
Eat = PresV2 (dirV2 eat_V) ;
|
Eat = PresV2 (dirV2 eat_V) ;
|
||||||
Bite = PresV2 (dirV2 bite_V) ;
|
Bite = PresV2 (partV2 bite_V) ;
|
||||||
Suck = PresV2 (dirV2 suck_V) ;
|
Suck = PresV2 (dirV2 suck_V) ;
|
||||||
See = PresV2 (dirV2 see_V) ;
|
See = PresV2 (dirV2 see_V) ;
|
||||||
Hear = PresV2 (dirV2 hear_V) ;
|
Hear = PresV2 (dirV2 hear_V) ;
|
||||||
Know = PresV2 (dirV2 know_V) ;
|
Know = PresV2 (dirV2 know_V) ;
|
||||||
Smell = PresV2 (dirV2 smell_V) ;
|
Smell = PresV2 (dirV2 smell_V) ;
|
||||||
Fear = PresV2 (dirV2 fear_V) ;
|
Fear = PresV2 (partV2 fear_V) ;
|
||||||
Kill = PresV2 (dirV2 kill_V) ;
|
Kill = PresV2 (dirV2 kill_V) ;
|
||||||
Fight = PresV2 (dirV2 fight_V) ;
|
Fight = PresV2 (mkV2 fight_V (postpP partitive "vastaan")) ;
|
||||||
Hunt = PresV2 (dirV2 hunt_V) ;
|
Hunt = PresV2 (partV2 hunt_V) ;
|
||||||
Hit = PresV2 (dirV2 hit_V) ;
|
Hit = PresV2 (partV2 hit_V) ;
|
||||||
Cut = PresV2 (dirV2 cut_V) ;
|
Cut = PresV2 (dirV2 cut_V) ;
|
||||||
Split = PresV2 (dirV2 split_V) ;
|
Split = PresV2 (dirV2 split_V) ;
|
||||||
Stab = PresV2 (dirV2 stab_V) ;
|
Stab = PresV2 (partV2 stab_V) ;
|
||||||
Scratch = PresV2 (dirV2 scratch_V) ;
|
Scratch = PresV2 (partV2 scratch_V) ;
|
||||||
Hold = PresV2 (dirV2 hold_V) ;
|
Hold = PresV2 (partV2 hold_V) ;
|
||||||
Squeeze = PresV2 (dirV2 squeeze_V) ;
|
Squeeze = PresV2 (dirV2 squeeze_V) ;
|
||||||
Rub = PresV2 (dirV2 rub_V) ;
|
Rub = PresV2 (partV2 rub_V) ;
|
||||||
Wash = PresV2 (dirV2 wash_V) ;
|
Wash = PresV2 (dirV2 wash_V) ;
|
||||||
Wipe = PresV2 (dirV2 wipe_V) ;
|
Wipe = PresV2 (dirV2 wipe_V) ;
|
||||||
Pull = PresV2 (dirV2 pull_V) ;
|
Pull = PresV2 (dirV2 pull_V) ;
|
||||||
@@ -79,7 +79,7 @@ lin
|
|||||||
Swell = PresV swell_V ;
|
Swell = PresV swell_V ;
|
||||||
Burn = PresV burn_V ;
|
Burn = PresV burn_V ;
|
||||||
|
|
||||||
---- Give = PresV3 (dirV3 give_V "to") ;
|
Give = PresV3 (dirV3 give_V allative) ;
|
||||||
|
|
||||||
-- Say = ;
|
-- Say = ;
|
||||||
|
|
||||||
@@ -198,8 +198,8 @@ lin
|
|||||||
Name = UseN name_N ;
|
Name = UseN name_N ;
|
||||||
|
|
||||||
-- NameOf = AppN2 name_N2 ;
|
-- NameOf = AppN2 name_N2 ;
|
||||||
----- MotherOf = AppN2 (mkN2 mother_N "of") ;
|
MotherOf = AppN2 (genN2 mother_N) ;
|
||||||
----- FatherOf = AppN2 (mkN2 father_N "of") ;
|
FatherOf = AppN2 (genN2 father_N) ;
|
||||||
|
|
||||||
Big = ModPosA big_ADeg ;
|
Big = ModPosA big_ADeg ;
|
||||||
Long = ModPosA long_ADeg ;
|
Long = ModPosA long_ADeg ;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ oper
|
|||||||
PresV2 : V2 -> NP -> NP -> Phr = \v,s,o -> PresCl (SPredV2 s v o) ;
|
PresV2 : V2 -> NP -> NP -> Phr = \v,s,o -> PresCl (SPredV2 s v o) ;
|
||||||
PresV3 : V3 -> NP -> NP -> NP -> Phr = \v,s,o,r -> PresCl (SPredV3 s v o r) ;
|
PresV3 : V3 -> NP -> NP -> NP -> Phr = \v,s,o,r -> PresCl (SPredV3 s v o r) ;
|
||||||
PresVasV2 : V -> NP -> NP -> Phr = \ v -> PresV2 (dirV2 v) ;
|
PresVasV2 : V -> NP -> NP -> Phr = \ v -> PresV2 (dirV2 v) ;
|
||||||
|
PresPartV2 : V -> NP -> NP -> Phr = \ v -> PresV2 (caseV2 v partitive) ;
|
||||||
|
|
||||||
PresCl : Cl -> Phr =
|
PresCl : Cl -> Phr =
|
||||||
\c -> { s = (UseCl (PosTP TPresent ASimul) c).s } ** {lock_Phr = <>} ;
|
\c -> { s = (UseCl (PosTP TPresent ASimul) c).s } ** {lock_Phr = <>} ;
|
||||||
@@ -12,4 +13,6 @@ oper
|
|||||||
ModPosA : ADeg -> CN -> CN = \a -> ModAP (PositADeg a) ;
|
ModPosA : ADeg -> CN -> CN = \a -> ModAP (PositADeg a) ;
|
||||||
ModA : A -> CN -> CN = \a -> ModAP (UseA a) ;
|
ModA : A -> CN -> CN = \a -> ModAP (UseA a) ;
|
||||||
|
|
||||||
|
partV2 : V -> V2 = \v -> caseV2 v partitive ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ instance SyntaxDan of SyntaxScand = TypesDan **
|
|||||||
auxSka = "vil" ;
|
auxSka = "vil" ;
|
||||||
auxSkulle = "ville" ;
|
auxSkulle = "ville" ;
|
||||||
|
|
||||||
infinAtt = "at" ;
|
infinAtt, subordAtt = "at" ;
|
||||||
|
|
||||||
varjeDet : Determiner = mkDeterminerSg (detSgInvar "hver") IndefP ;
|
varjeDet : Determiner = mkDeterminerSg (detSgInvar "hver") IndefP ;
|
||||||
allaDet : Determiner = mkDeterminerPl "alle" IndefP ;
|
allaDet : Determiner = mkDeterminerPl "alle" IndefP ;
|
||||||
|
|||||||
@@ -815,7 +815,7 @@ In two language families:
|
|||||||
<tr><td>Language</td> <td>v0.6</td> <td>v0.9 API</td> <td>Paradigms</td> <td>Basic lex</td> <td>Verbs</td></tr>
|
<tr><td>Language</td> <td>v0.6</td> <td>v0.9 API</td> <td>Paradigms</td> <td>Basic lex</td> <td>Verbs</td></tr>
|
||||||
<tr><td>Danish</td> <td>-</td> <td>X</td> <td>-</td> <td>-</td> <td>-</tr>
|
<tr><td>Danish</td> <td>-</td> <td>X</td> <td>-</td> <td>-</td> <td>-</tr>
|
||||||
<tr><td>English</td> <td>X</td> <td>X</td> <td>X</td> <td>X</td> <td>X</tr>
|
<tr><td>English</td> <td>X</td> <td>X</td> <td>X</td> <td>X</td> <td>X</tr>
|
||||||
<tr><td>Finnish</td> <td>X</td> <td>-</td> <td>-</td> <td>-</td> <td>-</tr>
|
<tr><td>Finnish</td> <td>X</td> <td>+</td> <td>X</td> <td>X</td> <td>0</tr>
|
||||||
<tr><td>French</td> <td>X</td> <td>X</td> <td>X</td> <td>X</td> <td>X</tr>
|
<tr><td>French</td> <td>X</td> <td>X</td> <td>X</td> <td>X</td> <td>X</tr>
|
||||||
<tr><td>German</td> <td>X</td> <td>-</td> <td>*</td> <td>-</td> <td>-</tr>
|
<tr><td>German</td> <td>X</td> <td>-</td> <td>*</td> <td>-</td> <td>-</tr>
|
||||||
<tr><td>Italian</td> <td>X</td> <td>X</td> <td>X</td> <td>X</td> <td>X</tr>
|
<tr><td>Italian</td> <td>X</td> <td>X</td> <td>X</td> <td>X</td> <td>X</tr>
|
||||||
@@ -826,10 +826,13 @@ In two language families:
|
|||||||
</table>
|
</table>
|
||||||
X = implemented (few exceptions may occur)
|
X = implemented (few exceptions may occur)
|
||||||
<br>
|
<br>
|
||||||
|
+ = implemented for a large part
|
||||||
|
<br>
|
||||||
* = linguistic material ready for implementation
|
* = linguistic material ready for implementation
|
||||||
<br>
|
<br>
|
||||||
- = not implemented
|
- = not implemented
|
||||||
|
<br>
|
||||||
|
0 = not applicable
|
||||||
|
|
||||||
|
|
||||||
<!-- NEW -->
|
<!-- NEW -->
|
||||||
@@ -842,7 +845,10 @@ Danish
|
|||||||
<p>
|
<p>
|
||||||
English:
|
English:
|
||||||
<p>
|
<p>
|
||||||
Finnish
|
Finnish:
|
||||||
|
missing many nominal forms of verbs;
|
||||||
|
the basic lexicon has some erroneous inflectional patterns;
|
||||||
|
possessive and interrogative suffixes have no proper lexer.
|
||||||
<p>
|
<p>
|
||||||
French:
|
French:
|
||||||
no inverted questions;
|
no inverted questions;
|
||||||
|
|||||||
@@ -10,18 +10,18 @@ flags
|
|||||||
lin
|
lin
|
||||||
|
|
||||||
airplane_N = regN "lentokone" ;
|
airplane_N = regN "lentokone" ;
|
||||||
answer_V2S = mkV2S (regV "vastata") allative [] [] ;
|
answer_V2S = mkV2S (caseV2 (regV "vastata") allative) ;
|
||||||
apartment_N = regN "asunto" ;
|
apartment_N = regN "asunto" ;
|
||||||
apple_N = regN "omena" ; --- omenia, not omenoita
|
apple_N = regN "omena" ; --- omenia, not omenoita
|
||||||
art_N = regN "taide" ;
|
art_N = regN "taide" ;
|
||||||
ask_V2Q = mkV2Q (regV "kysyä") ablative [] [] ;
|
ask_V2Q = mkV2Q (caseV2 (regV "kysyä") ablative) ;
|
||||||
baby_N = regN "vauva" ;
|
baby_N = regN "vauva" ;
|
||||||
bad_ADeg = mkADeg (regN "paha") "pahempi" "pahin" ;
|
bad_ADeg = mkADeg (regN "paha") "pahempi" "pahin" ;
|
||||||
bank_N = regN "pankki" ;
|
bank_N = regN "pankki" ;
|
||||||
beautiful_ADeg = mkADeg (regN "kaunis") "kauniimpi" "kaunein" ;
|
beautiful_ADeg = mkADeg (regN "kaunis") "kauniimpi" "kaunein" ;
|
||||||
become_VA = mkVA (regV "tulla") translative ;
|
become_VA = mkVA (regV "tulla") translative ;
|
||||||
beer_N = regN "olut" ;
|
beer_N = regN "olut" ;
|
||||||
beg_V2V = mkV2V (reg2V "pyytää" "pyysi") partitive inf_illative ;
|
beg_V2V = mkV2V (caseV2 (reg2V "pyytää" "pyysi") partitive) ;
|
||||||
big_ADeg = mkADeg (reg2N "suuri" "suuria") "suurempi" "suurin" ;
|
big_ADeg = mkADeg (reg2N "suuri" "suuria") "suurempi" "suurin" ;
|
||||||
bike_N = nLukko "polkupyörä" ; --- for correct vowel harmony
|
bike_N = nLukko "polkupyörä" ; --- for correct vowel harmony
|
||||||
bird_N = regN "lintu" ;
|
bird_N = regN "lintu" ;
|
||||||
@@ -68,7 +68,7 @@ lin
|
|||||||
dog_N = regN "koira" ;
|
dog_N = regN "koira" ;
|
||||||
door_N = reg2N "ovi" "ovia" ;
|
door_N = reg2N "ovi" "ovia" ;
|
||||||
drink_V2 = dirV2 (regV "juoda") ;
|
drink_V2 = dirV2 (regV "juoda") ;
|
||||||
easy_A2V = mkA2V (regN (mkA "helppo")) allative ;
|
easy_A2V = mkA2V (mkA2 (mkA (regN "helppo")) allative) ;
|
||||||
eat_V2 = dirV2 (regV "syödä") ;
|
eat_V2 = dirV2 (regV "syödä") ;
|
||||||
empty_ADeg = mkADeg (regN "tyhjä") "tyhjempi" "tyhjin" ;
|
empty_ADeg = mkADeg (regN "tyhjä") "tyhjempi" "tyhjin" ;
|
||||||
enemy_N = regN "vihollinen" ;
|
enemy_N = regN "vihollinen" ;
|
||||||
@@ -93,7 +93,7 @@ lin
|
|||||||
harbour_N = reg3N "satama" "sataman" "satamia" ;
|
harbour_N = reg3N "satama" "sataman" "satamia" ;
|
||||||
hate_V2 = dirV2 (regV "vihata") ;
|
hate_V2 = dirV2 (regV "vihata") ;
|
||||||
hat_N = regN "hattu" ;
|
hat_N = regN "hattu" ;
|
||||||
have_V2 = dirV2 (regV "omistaa") ; ---- olla
|
have_V2 = dirV2 (caseV adessive vOlla) ;
|
||||||
hear_V2 = dirV2 (regV "kuulla") ;
|
hear_V2 = dirV2 (regV "kuulla") ;
|
||||||
hill_N = regN "kukkula" ;
|
hill_N = regN "kukkula" ;
|
||||||
hope_VS = mkVS (regV "toivoa") ;
|
hope_VS = mkVS (regV "toivoa") ;
|
||||||
@@ -134,7 +134,7 @@ lin
|
|||||||
oil_N = regN "öljy" ;
|
oil_N = regN "öljy" ;
|
||||||
old_ADeg = mkADeg (regN "vanha") "vanhempi" "vanhin" ;
|
old_ADeg = mkADeg (regN "vanha") "vanhempi" "vanhin" ;
|
||||||
open_V2 = dirV2 (regV "avata") ;
|
open_V2 = dirV2 (regV "avata") ;
|
||||||
paint_V2A = mkV2A (regV "maalata") translative ;
|
paint_V2A = mkV2A (dirV2 (regV "maalata")) translative ;
|
||||||
paper_N = reg2N "paperi" "papereita" ;
|
paper_N = reg2N "paperi" "papereita" ;
|
||||||
peace_N = regN "rauha" ;
|
peace_N = regN "rauha" ;
|
||||||
pen_N = regN "kynä" ;
|
pen_N = regN "kynä" ;
|
||||||
@@ -145,14 +145,14 @@ lin
|
|||||||
priest_N = regN "pappi" ;
|
priest_N = regN "pappi" ;
|
||||||
probable_AS = mkAS (mkA (nNainen "todennäköistä")) ; --- for vowel harmony
|
probable_AS = mkAS (mkA (nNainen "todennäköistä")) ; --- for vowel harmony
|
||||||
queen_N = regN "kuningatar" ;
|
queen_N = regN "kuningatar" ;
|
||||||
radio_N = reg3N "radio" "radioita" ;
|
radio_N = reg2N "radio" "radioita" ;
|
||||||
rain_V0 = mkV0 (vHuoltaa "sataa" "sadan" "satoi" "sadoin") ;
|
rain_V0 = mkV0 (reg2V "sataa" "satoi") ;
|
||||||
read_V2 = dirV2 (regV "lukea") ;
|
read_V2 = dirV2 (regV "lukea") ;
|
||||||
red_ADeg = regADeg "punainen" ;
|
red_ADeg = regADeg "punainen" ;
|
||||||
religion_N = regN "uskonto" ;
|
religion_N = regN "uskonto" ;
|
||||||
restaurant_N = regN "ravintola" ;
|
restaurant_N = regN "ravintola" ;
|
||||||
river_N = nArpi "joki" ;
|
river_N = nArpi "joki" ;
|
||||||
rock_N = regN "kallio" "kallioita" ;
|
rock_N = reg2N "kallio" "kallioita" ;
|
||||||
roof_N = regN "katto" ;
|
roof_N = regN "katto" ;
|
||||||
rubber_N = regN "kumi" ;
|
rubber_N = regN "kumi" ;
|
||||||
run_V = reg2V "juosta" "juoksi" ;
|
run_V = reg2V "juosta" "juoksi" ;
|
||||||
@@ -189,7 +189,7 @@ lin
|
|||||||
switch8off_V2 = dirV2 (regV "sammuttaa") ; ---
|
switch8off_V2 = dirV2 (regV "sammuttaa") ; ---
|
||||||
switch8on_V2 = dirV2 (regV "sytyttää") ; ---
|
switch8on_V2 = dirV2 (regV "sytyttää") ; ---
|
||||||
table_N = regN "pöytä" ;
|
table_N = regN "pöytä" ;
|
||||||
talk_V3 = mkV3 (regV "puhua") allative elative ;
|
talk_V3 = mkV3 (regV "puhua") (caseP allative) (caseP elative) ;
|
||||||
teacher_N = regN "opettaja" ;
|
teacher_N = regN "opettaja" ;
|
||||||
teach_V2 = dirV2 (regV "opettaa") ;
|
teach_V2 = dirV2 (regV "opettaa") ;
|
||||||
television_N = reg2N "televisio" "telievisioita" ;
|
television_N = reg2N "televisio" "telievisioita" ;
|
||||||
|
|||||||
@@ -37,27 +37,27 @@ lincat
|
|||||||
|
|
||||||
A = Adjective ;
|
A = Adjective ;
|
||||||
-- = CommonNoun ;
|
-- = CommonNoun ;
|
||||||
A2 = Adjective ** {c : NPForm} ;
|
A2 = Adjective ** {c : ComplCase} ;
|
||||||
ADeg = {s : Degree => AForm => Str} ;
|
ADeg = {s : Degree => AForm => Str} ;
|
||||||
AP = {s : AdjPos => AForm => Str} ;
|
AP = {s : AdjPos => AForm => Str} ;
|
||||||
AS = Adjective ; --- "more difficult for him to come than..."
|
AS = Adjective ; --- "more difficult for him to come than..."
|
||||||
A2S = Adjective ** {c : NPForm} ;
|
A2S = Adjective ** {c : ComplCase} ;
|
||||||
AV = Adjective ;
|
AV = Adjective ;
|
||||||
A2V = Adjective ** {c : NPForm} ;
|
A2V = Adjective ** {c : ComplCase} ;
|
||||||
|
|
||||||
V = Verb ;
|
V = Verb1 ;
|
||||||
-- = {s : VForm => Str}
|
-- = {s : VForm => Str}
|
||||||
---- VP = {s,s2 : Bool => SForm => Agr => Str ; isAux : Bool} ;
|
---- VP = {s,s2 : Bool => SForm => Agr => Str ; isAux : Bool} ;
|
||||||
VPI = {s : VIForm => Str} ;
|
VPI = {s : VIForm => Str} ;
|
||||||
----- VP = Verb ** {s2 : VForm => Str ; c : ComplCase} ;
|
----- VP = Verb ** {s2 : VForm => Str ; c : ComplCase} ;
|
||||||
---- VG = {s,s2 : Bool => VForm => Str ; c : ComplCase} ;
|
---- VG = {s,s2 : Bool => VForm => Str ; c : ComplCase} ;
|
||||||
V2 = TransVerb ;
|
V2 = TransVerb ;
|
||||||
-- = Verb ** {s3, s4 : Str ; c : ComplCase} ;
|
-- = Verb ** {s3 : Str ; p : Bool ; c : ComplCase} ;
|
||||||
V3 = TransVerb ** {s5, s6 : Str ; c2 : ComplCase} ;
|
V3 = TransVerb ** {s5 : Str ; p2 : Bool ; c2 : ComplCase} ;
|
||||||
VS = Verb ;
|
VS = Verb1 ;
|
||||||
VV = Verb ** {c : ComplCase} ;
|
VV = Verb1 ** {i : VIForm} ;
|
||||||
VQ = Verb ;
|
VQ = Verb1 ;
|
||||||
VA = Verb ** {c : Case} ;
|
VA = Verb1 ** {c : Case} ;
|
||||||
|
|
||||||
V2S = TransVerb ;
|
V2S = TransVerb ;
|
||||||
V2Q = TransVerb ;
|
V2Q = TransVerb ;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ concrete ClauseFin of Clause = CategoriesFin **
|
|||||||
sats2clause (mkSatsObject np v y) ;
|
sats2clause (mkSatsObject np v y) ;
|
||||||
SPredV3 subj verb obj1 obj2 =
|
SPredV3 subj verb obj1 obj2 =
|
||||||
sats2clause (
|
sats2clause (
|
||||||
insertObject (mkSatsObject subj verb obj1) verb.c2 verb.s5 verb.s6 obj2) ;
|
insertObject (mkSatsObject subj verb obj1) verb.c2 verb.s5 verb.p obj2) ;
|
||||||
---- SPredReflV2 subj verb =
|
---- SPredReflV2 subj verb =
|
||||||
---- sats2clause (
|
---- sats2clause (
|
||||||
---- mkSatsObject subj
|
---- mkSatsObject subj
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ oper
|
|||||||
nominative : Case ;
|
nominative : Case ;
|
||||||
genitive : Case ;
|
genitive : Case ;
|
||||||
partitive : Case ;
|
partitive : Case ;
|
||||||
|
translative : Case ;
|
||||||
inessive : Case ;
|
inessive : Case ;
|
||||||
elative : Case ;
|
elative : Case ;
|
||||||
illative : Case ;
|
illative : Case ;
|
||||||
@@ -51,8 +52,10 @@ oper
|
|||||||
allative : Case ;
|
allative : Case ;
|
||||||
|
|
||||||
PPosition : Type ;
|
PPosition : Type ;
|
||||||
PPrep : Case -> Str -> PPosition ;
|
prepP : Case -> Str -> PPosition ;
|
||||||
PPostp : Case -> Str -> PPosition ;
|
postpP : Case -> Str -> PPosition ;
|
||||||
|
caseP : Case -> PPosition ;
|
||||||
|
accusative : PPosition ;
|
||||||
|
|
||||||
--2 Nouns
|
--2 Nouns
|
||||||
|
|
||||||
@@ -171,6 +174,8 @@ oper
|
|||||||
mkN2 : N -> Case -> N2 ;
|
mkN2 : N -> Case -> N2 ;
|
||||||
genN2 : N -> N2 ;
|
genN2 : N -> N2 ;
|
||||||
|
|
||||||
|
mkN3 : N -> Case -> Case -> N3 ;
|
||||||
|
|
||||||
-- Proper names can be formed by using declensions for nouns.
|
-- Proper names can be formed by using declensions for nouns.
|
||||||
-- The plural forms are filtered away by the compiler.
|
-- The plural forms are filtered away by the compiler.
|
||||||
|
|
||||||
@@ -185,7 +190,7 @@ oper
|
|||||||
|
|
||||||
-- Two-place adjectives need a case for the second argument.
|
-- Two-place adjectives need a case for the second argument.
|
||||||
|
|
||||||
mkA2 : N -> Case -> A2 ;
|
mkA2 : A -> Case -> A2 ;
|
||||||
|
|
||||||
-- Comparison adjectives have three forms. The comparative and the superlative
|
-- Comparison adjectives have three forms. The comparative and the superlative
|
||||||
-- are always inflected in the same way, so the nominative of them is actually
|
-- are always inflected in the same way, so the nominative of them is actually
|
||||||
@@ -232,6 +237,11 @@ oper
|
|||||||
|
|
||||||
vTuoda : (tuoda : Str) -> V ;
|
vTuoda : (tuoda : Str) -> V ;
|
||||||
|
|
||||||
|
-- All the patterns above have $nominative$ as subject case.
|
||||||
|
-- If another case is wanted, use the following.
|
||||||
|
|
||||||
|
caseV : Case -> V -> V ;
|
||||||
|
|
||||||
-- The verbs "be" and the negative auxiliary are special.
|
-- The verbs "be" and the negative auxiliary are special.
|
||||||
|
|
||||||
vOlla : V ;
|
vOlla : V ;
|
||||||
@@ -240,7 +250,7 @@ oper
|
|||||||
-- Two-place verbs need a case, and can have a pre- or postposition.
|
-- Two-place verbs need a case, and can have a pre- or postposition.
|
||||||
-- At least one of the latter is empty, $[]$.
|
-- At least one of the latter is empty, $[]$.
|
||||||
|
|
||||||
mkV2 : V -> PPostp -> V2 ;
|
mkV2 : V -> PPosition -> V2 ;
|
||||||
|
|
||||||
-- If both are empty, the following special function can be used.
|
-- If both are empty, the following special function can be used.
|
||||||
|
|
||||||
@@ -257,7 +267,7 @@ oper
|
|||||||
-- the first one or both can be absent.
|
-- the first one or both can be absent.
|
||||||
|
|
||||||
mkV3 : V -> PPosition -> PPosition -> V3 ; -- speak, with, about
|
mkV3 : V -> PPosition -> PPosition -> V3 ; -- speak, with, about
|
||||||
dirV3 : V -> PPosition -> V3 ; -- give,_,to
|
dirV3 : V -> Case -> V3 ; -- give,_,to
|
||||||
dirdirV3 : V -> V3 ; -- acc, allat
|
dirdirV3 : V -> V3 ; -- acc, allat
|
||||||
|
|
||||||
--3 Other complement patterns
|
--3 Other complement patterns
|
||||||
@@ -275,10 +285,10 @@ oper
|
|||||||
mkVQ : V -> VQ ;
|
mkVQ : V -> VQ ;
|
||||||
mkV2Q : V2 -> V2Q ;
|
mkV2Q : V2 -> V2Q ;
|
||||||
|
|
||||||
mkAS : A -> AS ;
|
mkAS : A -> AS ;
|
||||||
mkA2S : A -> Str -> A2S ;
|
mkA2S : A2 -> A2S ;
|
||||||
mkAV : A -> AV ;
|
mkAV : A -> AV ;
|
||||||
mkA2V : A -> Str -> A2V ;
|
mkA2V : A2 -> A2V ;
|
||||||
|
|
||||||
|
|
||||||
-- The definitions should not bother the user of the API. So they are
|
-- The definitions should not bother the user of the API. So they are
|
||||||
@@ -297,6 +307,7 @@ oper
|
|||||||
nominative = Nom ;
|
nominative = Nom ;
|
||||||
genitive = Gen ;
|
genitive = Gen ;
|
||||||
partitive = Part ;
|
partitive = Part ;
|
||||||
|
translative = Transl ;
|
||||||
inessive = Iness ;
|
inessive = Iness ;
|
||||||
elative = Elat ;
|
elative = Elat ;
|
||||||
illative = Illat ;
|
illative = Illat ;
|
||||||
@@ -304,11 +315,14 @@ oper
|
|||||||
ablative = Ablat ;
|
ablative = Ablat ;
|
||||||
allative = Allat ;
|
allative = Allat ;
|
||||||
|
|
||||||
PPosition : Type = {c : Case ; s1,s2 : Str} ;
|
PPosition : Type = {c : ComplCase ; s3 : Str ; p : Bool} ;
|
||||||
PPrep : Case -> Str -> PPosition =
|
prepP : Case -> Str -> PPosition =
|
||||||
\c,p -> {c = c ; s1 = p ; s2 = []} ;
|
\c,p -> {c = CCase c ; s3 = p ; p = True} ;
|
||||||
PPostp : Case -> Str -> PPosition =
|
postpP : Case -> Str -> PPosition =
|
||||||
\c,p -> {c = c ; s1 = [] ; s2 = p} ;
|
\c,p -> {c = CCase c ; s3 = p ; p = False} ;
|
||||||
|
caseP : Case -> PPosition =
|
||||||
|
\c -> {c = CCase c ; s3 = [] ; p = True} ;
|
||||||
|
accusative = {c = CAcc ; s3 = [] ; p = True} ;
|
||||||
|
|
||||||
mkN = \a,b,c,d,e,f,g,h,i,j,k ->
|
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 = <>} ;
|
mkNoun a b c d e f g h i j ** {g = k ; lock_N = <>} ;
|
||||||
@@ -414,11 +428,12 @@ reg3N = \vesi,veden,vesi
|
|||||||
|
|
||||||
nComp = \s,n -> {s = \\c => s ++ n.s ! c ; g = n.g ; lock_N = <>} ;
|
nComp = \s,n -> {s = \\c => s ++ n.s ! c ; g = n.g ; lock_N = <>} ;
|
||||||
mkN2 = \n,c -> n2n n ** {c = NPCase c ; lock_N2 = <>} ;
|
mkN2 = \n,c -> n2n n ** {c = NPCase c ; lock_N2 = <>} ;
|
||||||
|
mkN3 = \n,c,e -> n2n n ** {c = NPCase c ; c2 = NPCase e ; lock_N3 = <>} ;
|
||||||
genN2 = \n -> mkN2 n genitive ;
|
genN2 = \n -> mkN2 n genitive ;
|
||||||
mkPN n = mkProperName n ** {lock_PN = <>} ;
|
mkPN n = mkProperName n ** {lock_PN = <>} ;
|
||||||
|
|
||||||
mkA = \x -> noun2adj x ** {lock_A = <>} ;
|
mkA = \x -> noun2adj x ** {lock_A = <>} ;
|
||||||
mkA2 = \x,c -> mkA x ** {c = NPCase c ; lock_A2 = <>} ;
|
mkA2 = \x,c -> x ** {c = CCase c ; lock_A2 = <>} ;
|
||||||
mkADeg x kivempi kivin =
|
mkADeg x kivempi kivin =
|
||||||
let
|
let
|
||||||
a = last (x.s ! ((NCase Sg Part))) ; ---- gives "kivinta"
|
a = last (x.s ! ((NCase Sg Part))) ; ---- gives "kivinta"
|
||||||
@@ -434,7 +449,8 @@ reg3N = \vesi,veden,vesi
|
|||||||
(init (suur.s ! NCase Sg Gen) + "mpi")
|
(init (suur.s ! NCase Sg Gen) + "mpi")
|
||||||
(init (suur.s ! NCase Pl Ess)) ;
|
(init (suur.s ! NCase Pl Ess)) ;
|
||||||
|
|
||||||
mkV a b c d e f g h i j k l = mkVerb a b c d e f g h i j k l ** {lock_V = <>} ;
|
mkV a b c d e f g h i j k l = mkVerb a b c d e f g h i j k l **
|
||||||
|
{sc = Nom ; lock_V = <>} ;
|
||||||
|
|
||||||
regV soutaa =
|
regV soutaa =
|
||||||
let
|
let
|
||||||
@@ -455,7 +471,7 @@ regV soutaa =
|
|||||||
"da" | "dä" => vJuoda soutaa joi ;
|
"da" | "dä" => vJuoda soutaa joi ;
|
||||||
"ta" | "tä" => vOsata soutaa ;
|
"ta" | "tä" => vOsata soutaa ;
|
||||||
_ => vHukkua soutaa souda
|
_ => vHukkua soutaa souda
|
||||||
}} ** {lock_V = <>} ;
|
}} ** {sc = Nom ; lock_V = <>} ;
|
||||||
|
|
||||||
reg2V : (soutaa,souti : Str) -> V = \soutaa,souti ->
|
reg2V : (soutaa,souti : Str) -> V = \soutaa,souti ->
|
||||||
let
|
let
|
||||||
@@ -476,7 +492,7 @@ reg2V : (soutaa,souti : Str) -> V = \soutaa,souti ->
|
|||||||
"at" | "ät" => vPalkata soutaa souti ;
|
"at" | "ät" => vPalkata soutaa souti ;
|
||||||
"st" => vJuosta soutaa souden (juo + o+u+"t") (juo + "t"+u) ;
|
"st" => vJuosta soutaa souden (juo + o+u+"t") (juo + "t"+u) ;
|
||||||
_ => soudat
|
_ => soudat
|
||||||
}} ** {lock_V = <>} ;
|
}} ** {sc = Nom ; lock_V = <>} ;
|
||||||
|
|
||||||
reg3V soutaa soudan souti =
|
reg3V soutaa soudan souti =
|
||||||
let
|
let
|
||||||
@@ -496,43 +512,48 @@ reg3V soutaa soudan souti =
|
|||||||
"aa" | "ää" => vHuoltaa soutaa soudan souti soudin ;
|
"aa" | "ää" => vHuoltaa soutaa soudan souti soudin ;
|
||||||
"da" | "dä" => vJuoda soutaa souti ;
|
"da" | "dä" => vJuoda soutaa souti ;
|
||||||
_ => soudat
|
_ => soudat
|
||||||
}} ** {lock_V = <>} ;
|
}} ** {sc = Nom ; lock_V = <>} ;
|
||||||
|
|
||||||
|
vValua v = vSanoa v ** {sc = Nom ; lock_V = <>} ;
|
||||||
|
vKattaa v u = vOttaa v u ** {sc = Nom ; lock_V = <>} ;
|
||||||
|
vOstaa v = vPoistaa v ** {sc = Nom ; lock_V = <>} ;
|
||||||
|
vNousta v u = vJuosta v u [] [] ** {sc = Nom ; lock_V = <>} ; -----
|
||||||
|
vTuoda v = vJuoda v [] ** {sc = Nom ; lock_V = <>} ; -----
|
||||||
|
caseV c v = {s = v.s ; sc = c ; lock_V = <>} ;
|
||||||
|
|
||||||
|
vOlla = verbOlla ** {sc = Nom ; lock_V = <>} ;
|
||||||
|
vEi = verbEi ** {sc = Nom ; lock_V = <>} ;
|
||||||
|
|
||||||
vValua v = vSanoa v ** {lock_V = <>} ;
|
|
||||||
vKattaa v u = vOttaa v u ** {lock_V = <>} ;
|
|
||||||
vOstaa v = vPoistaa v ** {lock_V = <>} ;
|
|
||||||
vNousta v u = vJuosta v u [] [] ** {lock_V = <>} ; -----
|
|
||||||
vTuoda v = vJuoda v [] ** {lock_V = <>} ; -----
|
|
||||||
vOlla = verbOlla ** {lock_V = <>} ;
|
|
||||||
vEi = verbEi ** {lock_V = <>} ;
|
|
||||||
|
|
||||||
vHuoltaa : (_,_,_,_ : Str) -> Verb = \ottaa,otan,otti,otin ->
|
vHuoltaa : (_,_,_,_ : Str) -> Verb = \ottaa,otan,otti,otin ->
|
||||||
SyntaxFin.vHuoltaa ottaa otan otti otin ** {lock_V = <>} ;
|
SyntaxFin.vHuoltaa ottaa otan otti otin ** {sc = Nom ; lock_V = <>} ;
|
||||||
-- mkV2 = \v,c,p,o -> v ** {s3 = p ; s4 = o ; c = CCase c ; lock_V2 = <>} ;
|
mkV2 = \v,c -> v ** {s3 = c.s3 ; p = c.p ; c = c.c ; lock_V2 = <>} ;
|
||||||
-- caseV2 = \v,c -> mkV2 v c [] [] ;
|
caseV2 = \v,c -> mkV2 v (caseP c) ;
|
||||||
dirV2 v = mkTransVerbDir v ** {lock_V2 = <>} ;
|
dirV2 v = mkTransVerbDir v ** {lock_V2 = <>} ;
|
||||||
|
|
||||||
mkAdv : Str -> Adv = \s -> {s = s ; lock_Adv = <>} ;
|
mkAdv : Str -> Adv = \s -> {s = s ; lock_Adv = <>} ;
|
||||||
|
|
||||||
|
|
||||||
-- mkV3 : V -> PPosition -> PPosition -> V3 ; -- speak, with, about
|
mkV3 v p q = v **
|
||||||
-- dirV3 : V -> PPosition -> V3 ; -- give,_,to
|
{s3 = p.s3 ; p = p.p ; c = p.c ; s5 = q.s3 ; p2 = q.p ; c2 = q.c ;
|
||||||
-- dirdirV3 : V -> -> V3 ; -- acc, allat
|
lock_V3 = <>} ;
|
||||||
|
dirV3 v p = mkV3 v accusative (caseP p) ;
|
||||||
|
dirdirV3 v = dirV3 v allative ;
|
||||||
|
|
||||||
mkV0 v = v ** {lock_V0 = <>} ;
|
mkV0 v = v ** {lock_V0 = <>} ;
|
||||||
mkVS v = v ** {lock_VS = <>} ;
|
mkVS v = v ** {lock_VS = <>} ;
|
||||||
mkV2S v = v ** {lock_V2S = <>} ;
|
mkV2S v = v ** {lock_V2S = <>} ;
|
||||||
-- mkVV v = v ** {lock_VV = <>} ;
|
-- mkVV v = v ** {lock_VV = <>} ;
|
||||||
mkV2V v = v ** {lock_V2V = <>} ;
|
mkV2V v = v ** {lock_V2V = <>} ;
|
||||||
-- mkVA v c = v ** {c = c ; lock_V0 = <>} ;
|
mkVA v c = v ** {c = c ; lock_VA = <>} ;
|
||||||
-- mkV2A v c = v ** {c2 = c ; lock_V0 = <>} ;
|
mkV2A v c = v ** {c2 = c ; lock_V2A = <>} ;
|
||||||
mkVQ v = v ** {lock_VQ = <>} ;
|
mkVQ v = v ** {lock_VQ = <>} ;
|
||||||
mkV2Q v = v ** {lock_V2Q = <>} ;
|
mkV2Q v = v ** {lock_V2Q = <>} ;
|
||||||
|
|
||||||
mkAS v = v ** {lock_AS = <>} ;
|
mkAS v = v ** {lock_AS = <>} ;
|
||||||
-- mkA2S v c = v ** {c = c ; lock_AS = <>} ;
|
mkA2S v = v ** {lock_A2S = <>} ;
|
||||||
mkAV v = v ** {lock_AV = <>} ;
|
mkAV v = v ** {lock_AV = <>} ;
|
||||||
-- mkA2V v c = v ** {c = c ; lock_AS = <>} ;
|
mkA2V v = v ** {lock_A2V = <>} ;
|
||||||
|
|
||||||
-- inf_illative
|
-- inf_illative
|
||||||
-- infinitive
|
-- infinitive
|
||||||
|
|||||||
@@ -63,7 +63,8 @@ lin
|
|||||||
ComplA2 = complAdj ;
|
ComplA2 = complAdj ;
|
||||||
|
|
||||||
ComplAV av vpi = {s = \\_,a => av.s ! a ++ vpi.s ! VIInfinit} ;
|
ComplAV av vpi = {s = \\_,a => av.s ! a ++ vpi.s ! VIInfinit} ;
|
||||||
ComplObjA2V av obj vpi = {s = \\_,a => av.s ! a ++ obj.s ! av.c ++ vpi.s ! VIInfinit} ;
|
ComplObjA2V av obj vpi = {s = \\_,a => av.s ! a ++ obj.s ! complCase
|
||||||
|
True av.c VImperat ++ vpi.s ! VIInfinit} ;
|
||||||
|
|
||||||
PositADeg = positAdjPhrase ;
|
PositADeg = positAdjPhrase ;
|
||||||
ComparADeg = comparAdjPhrase ;
|
ComparADeg = comparAdjPhrase ;
|
||||||
@@ -73,10 +74,10 @@ lin
|
|||||||
|
|
||||||
PredAS adj sent = sats2clause (
|
PredAS adj sent = sats2clause (
|
||||||
insertComplement
|
insertComplement
|
||||||
(mkSats impersNounPhrase verbOlla)
|
(mkSats impersNounPhrase (vNom verbOlla))
|
||||||
(complAdjPhrase Sg (adj2adjPhrase adj) ++ sent.s)
|
(complAdjPhrase Sg (adj2adjPhrase adj) ++ sent.s)
|
||||||
) ;
|
) ;
|
||||||
PredV0 rain = sats2clause (mkSats impersNounPhrase rain) ;
|
PredV0 rain = sats2clause (mkSats impersNounPhrase (vNom rain)) ;
|
||||||
|
|
||||||
-- Partial saturation.
|
-- Partial saturation.
|
||||||
|
|
||||||
|
|||||||
@@ -27,8 +27,8 @@ concrete StructuralFin of Structural =
|
|||||||
both_AndConjD = sd2 "sekä" "että" ** {n = Pl} ;
|
both_AndConjD = sd2 "sekä" "että" ** {n = Pl} ;
|
||||||
by8agent_Prep = prepPostpGen "toimesta" ;
|
by8agent_Prep = prepPostpGen "toimesta" ;
|
||||||
by8means_Prep = prepPostpGen "avulla" ;
|
by8means_Prep = prepPostpGen "avulla" ;
|
||||||
can8know_VV = nomVerbVerb (vOsata "osata") ;
|
---- can8know_VV = nomVerbVerb (vOsata "osata") ;
|
||||||
can_VV = nomVerbVerb (vJuoda "voida" "voi") ;
|
---- can_VV = nomVerbVerb (vJuoda "voida" "voi") ;
|
||||||
during_Prep = prepPostpGen "aikana" ;
|
during_Prep = prepPostpGen "aikana" ;
|
||||||
either8or_ConjD = sd2 "joko" "tai" ** {n = Sg} ;
|
either8or_ConjD = sd2 "joko" "tai" ** {n = Sg} ;
|
||||||
everybody_NP = {
|
everybody_NP = {
|
||||||
@@ -55,7 +55,7 @@ concrete StructuralFin of Structural =
|
|||||||
most8many_Det = useimmatDet ;
|
most8many_Det = useimmatDet ;
|
||||||
most_Det = mkDeterminer singular (caseTable singular (sSuurin "enintä")) ;
|
most_Det = mkDeterminer singular (caseTable singular (sSuurin "enintä")) ;
|
||||||
much_Det = mkDeterminer singular (caseTable singular (sNauris "runsasta")) ;
|
much_Det = mkDeterminer singular (caseTable singular (sNauris "runsasta")) ;
|
||||||
must_VV = vHukkua "täytyä" "täydy" ** {c = CCase Gen} ;
|
---- must_VV = vHukkua "täytyä" "täydy" ** {c = CCase Gen} ;
|
||||||
no_Phr = ss ("Ei" ++ stopPunct) ;
|
no_Phr = ss ("Ei" ++ stopPunct) ;
|
||||||
on_Prep = prepCase Adess ;
|
on_Prep = prepCase Adess ;
|
||||||
or_Conj = ss "tai" ** {n = Sg} ;
|
or_Conj = ss "tai" ** {n = Sg} ;
|
||||||
@@ -92,7 +92,7 @@ concrete StructuralFin of Structural =
|
|||||||
to_Prep = prepCase Illat ; --- allat
|
to_Prep = prepCase Illat ; --- allat
|
||||||
under_Prep = prepPostpGen "alla" ;
|
under_Prep = prepPostpGen "alla" ;
|
||||||
very_Adv = ss "hyvin" ;
|
very_Adv = ss "hyvin" ;
|
||||||
want_VV = nomVerbVerb (vOsata "haluta") ;
|
---- want_VV = nomVerbVerb (vOsata "haluta") ;
|
||||||
we_NP = pronNounPhrase pronMe ;
|
we_NP = pronNounPhrase pronMe ;
|
||||||
what8many_IP = intPronWhat Pl ;
|
what8many_IP = intPronWhat Pl ;
|
||||||
what8one_IP = intPronWhat Sg ;
|
what8one_IP = intPronWhat Sg ;
|
||||||
|
|||||||
@@ -367,23 +367,22 @@ oper
|
|||||||
-- "tyytyväinen vaalitulokseen", "jaollinen kolmella"), which is not a possible
|
-- "tyytyväinen vaalitulokseen", "jaollinen kolmella"), which is not a possible
|
||||||
-- order for the accusative case.
|
-- order for the accusative case.
|
||||||
|
|
||||||
AdjCompl = Adjective ** {c : NPForm} ;
|
AdjCompl = Adjective ** {c : ComplCase} ;
|
||||||
|
|
||||||
|
--- Only the middle argument of $complCase$ matters, since
|
||||||
|
--- no accusatives come into question.
|
||||||
|
|
||||||
complAdj : AdjCompl -> NounPhrase -> AdjPhrase = \hyva,paini ->
|
complAdj : AdjCompl -> NounPhrase -> AdjPhrase = \hyva,paini ->
|
||||||
let {
|
let
|
||||||
hyvat : AForm => Str = \\a => hyva.s ! a ;
|
hyvat : AForm => Str = \\a => hyva.s ! a ;
|
||||||
painissa : Str = paini.s ! hyva.c
|
c : NPForm = complCase True hyva.c VImperat ;
|
||||||
}
|
painissa : Str = paini.s ! c
|
||||||
in
|
in
|
||||||
{s = table {
|
{s = table {
|
||||||
AAttr => \\a => painissa ++ hyvat ! a ;
|
AAttr => \\a => painissa ++ hyvat ! a ;
|
||||||
APred => \\a => if_then_else Str
|
APred => \\a => if_then_else Str
|
||||||
(isLocalNPForm hyva.c)
|
(isLocalNPForm c)
|
||||||
(variants {
|
(hyvat ! a ++ painissa)
|
||||||
hyvat ! a ++ painissa ;
|
|
||||||
painissa ++ hyvat ! a
|
|
||||||
}
|
|
||||||
)
|
|
||||||
(painissa ++ hyvat ! a)
|
(painissa ++ hyvat ! a)
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
@@ -479,6 +478,14 @@ oper
|
|||||||
--
|
--
|
||||||
--3 Verb phrases
|
--3 Verb phrases
|
||||||
--
|
--
|
||||||
|
-- In Finnish, verbs can have nominative subjects, but there are
|
||||||
|
-- also verbs with a special subject case ("täytyy").
|
||||||
|
|
||||||
|
Verb1 : Type = Verb ** {sc : Case} ;
|
||||||
|
|
||||||
|
vCase : Verb -> Case -> Verb1 = \v,c -> v ** {sc = c} ;
|
||||||
|
vNom : Verb -> Verb1 = \v -> vCase v Nom ;
|
||||||
|
|
||||||
-- These are parameters for clauses and sentences.
|
-- These are parameters for clauses and sentences.
|
||||||
|
|
||||||
param
|
param
|
||||||
@@ -528,27 +535,33 @@ oper
|
|||||||
|
|
||||||
questPart : Str -> Str = \s -> glueParticle s "ko" ; --- "kö"
|
questPart : Str -> Str = \s -> glueParticle s "ko" ; --- "kö"
|
||||||
|
|
||||||
mkSats : NounPhrase -> Verb -> Sats = \subj,verb ->
|
mkSats : NounPhrase -> Verb1 -> Sats = \subj,verb ->
|
||||||
{subj = subj.s ! NPCase Nom ; --- "minusta tulee poliisi"
|
let
|
||||||
|
np = case verb.sc of {
|
||||||
|
Nom => <subj.n, np2Person subj.p> ;
|
||||||
|
_ => <Sg, P3>
|
||||||
|
}
|
||||||
|
in
|
||||||
|
{subj = subj.s ! NPCase verb.sc ; -- "minusta tulee poliisi"
|
||||||
pred = \\b,sf =>
|
pred = \\b,sf =>
|
||||||
inflectVerb verb subj.n (np2Person subj.p) b sf ** {obj = []} ;
|
inflectVerb verb np.p1 np.p2 b sf ** {obj = []} ;
|
||||||
comp = []
|
comp = []
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkSatsObject : NounPhrase -> TransVerb -> NounPhrase -> Sats = \subj,verb,obj ->
|
mkSatsObject : NounPhrase -> TransVerb -> NounPhrase -> Sats = \subj,verb,obj ->
|
||||||
insertObject (mkSats subj verb) verb.c verb.s3 verb.s4 obj ;
|
insertObject (mkSats subj verb) verb.c verb.s3 verb.p obj ;
|
||||||
|
|
||||||
mkSatsCopula : NounPhrase -> Str -> Sats = \subj,comp ->
|
mkSatsCopula : NounPhrase -> Str -> Sats = \subj,comp ->
|
||||||
insertComplement (mkSats subj verbOlla) comp ;
|
insertComplement (mkSats subj (vNom verbOlla)) comp ;
|
||||||
|
|
||||||
insertObject : Sats -> ComplCase -> Str -> Str -> NounPhrase -> Sats =
|
insertObject : Sats -> ComplCase -> Str -> Bool -> NounPhrase -> Sats =
|
||||||
\sats, c, prep, postp, obj ->
|
\sats, c, prep, pos, obj ->
|
||||||
{subj = sats.subj ;
|
{subj = sats.subj ;
|
||||||
pred = \\b,sf =>
|
pred = \\b,sf =>
|
||||||
let spred = sats.pred ! b ! sf in
|
let spred = sats.pred ! b ! sf in
|
||||||
{fin = spred.fin ;
|
{fin = spred.fin ;
|
||||||
inf = spred.inf ;
|
inf = spred.inf ;
|
||||||
obj = spred.obj ++ prep ++ obj.s ! complCase b c sf ++ postp
|
obj = spred.obj ++ pPosit prep pos (obj.s ! complCase b c sf)
|
||||||
} ;
|
} ;
|
||||||
comp = sats.comp
|
comp = sats.comp
|
||||||
} ;
|
} ;
|
||||||
@@ -664,7 +677,7 @@ oper
|
|||||||
--3 Transitive verbs
|
--3 Transitive verbs
|
||||||
--
|
--
|
||||||
-- Transitive verbs are verbs with a case and, possibly, a preposition
|
-- Transitive verbs are verbs with a case and, possibly, a preposition
|
||||||
-- or a postposition for the complement,
|
-- or a postposition for the complement ($True$ = preposition),
|
||||||
-- in analogy with two-place adjectives and functions.
|
-- in analogy with two-place adjectives and functions.
|
||||||
-- One might prefer to use the term "2-place verb", since
|
-- One might prefer to use the term "2-place verb", since
|
||||||
-- "transitive" traditionally means that the inherent preposition is empty.
|
-- "transitive" traditionally means that the inherent preposition is empty.
|
||||||
@@ -674,7 +687,10 @@ param
|
|||||||
ComplCase = CCase Case | CAcc ;
|
ComplCase = CCase Case | CAcc ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
TransVerb : Type = Verb ** {s3, s4 : Str ; c : ComplCase} ;
|
TransVerb : Type = Verb1 ** {s3 : Str ; p : Bool ; c : ComplCase} ;
|
||||||
|
|
||||||
|
pPosit : Str -> Bool -> Str -> Str = \p,b,s ->
|
||||||
|
if_then_Str b (p ++ s) (s ++ p) ;
|
||||||
|
|
||||||
-- The rule for using transitive verbs is the complementization rule.
|
-- The rule for using transitive verbs is the complementization rule.
|
||||||
--
|
--
|
||||||
@@ -700,13 +716,13 @@ oper
|
|||||||
-- Verbs that take their object with a case other than the accusative,
|
-- Verbs that take their object with a case other than the accusative,
|
||||||
-- without pre- or postposition:
|
-- without pre- or postposition:
|
||||||
|
|
||||||
mkTransVerbCase : Verb -> Case -> TransVerb = \nauraa,c ->
|
mkTransVerbCase : Verb1 -> Case -> TransVerb = \nauraa,c ->
|
||||||
nauraa ** {s3 = [] ; s4 = [] ; c = CCase c} ;
|
nauraa ** {s3 = [] ; p = True ; c = CCase c} ;
|
||||||
|
|
||||||
-- Verbs that take direct object with the accusative:
|
-- Verbs that take direct object with the accusative:
|
||||||
|
|
||||||
mkTransVerbDir : Verb -> TransVerb = \ostaa ->
|
mkTransVerbDir : Verb1 -> TransVerb = \ostaa ->
|
||||||
ostaa ** {s3 = [] ; s4 = [] ; c = CAcc} ;
|
ostaa ** {s3 = [] ; p = True ; c = CAcc} ;
|
||||||
{-
|
{-
|
||||||
-- Most two-place verbs can be used passively; the object case need not be
|
-- 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.
|
-- the accusative, and it becomes the subject case in the passive sentence.
|
||||||
@@ -727,7 +743,7 @@ oper
|
|||||||
-- is left to applications. The definition is trivial, due to record
|
-- is left to applications. The definition is trivial, due to record
|
||||||
-- subtyping.
|
-- subtyping.
|
||||||
|
|
||||||
transAsVerb : TransVerb -> Verb = \juoda ->
|
transAsVerb : TransVerb -> Verb1 = \juoda ->
|
||||||
juoda ;
|
juoda ;
|
||||||
|
|
||||||
-- The 'real' Finnish passive is unpersonal, equivalent to the
|
-- The 'real' Finnish passive is unpersonal, equivalent to the
|
||||||
@@ -740,7 +756,7 @@ oper
|
|||||||
-- 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.
|
||||||
|
|
||||||
DitransVerb = TransVerb ** {s5, s6 : Str ; c2 : ComplCase} ;
|
DitransVerb = TransVerb ** {s5 : Str ; p2 : Bool ; c2 : ComplCase} ;
|
||||||
|
|
||||||
|
|
||||||
--2 Adverbials
|
--2 Adverbials
|
||||||
@@ -807,7 +823,7 @@ oper
|
|||||||
--
|
--
|
||||||
-- Sentence-complement verbs take sentences as complements.
|
-- Sentence-complement verbs take sentences as complements.
|
||||||
|
|
||||||
SentenceVerb : Type = Verb ;
|
SentenceVerb : Type = Verb1 ;
|
||||||
|
|
||||||
-- To generate "sanoo että Jussi ui" / "ei sano että Jussi ui"
|
-- To generate "sanoo että Jussi ui" / "ei sano että Jussi ui"
|
||||||
|
|
||||||
@@ -815,10 +831,8 @@ oper
|
|||||||
--3 Verb-complement verbs
|
--3 Verb-complement verbs
|
||||||
--
|
--
|
||||||
-- Verb-complement verbs take verb phrases as complements.
|
-- Verb-complement verbs take verb phrases as complements.
|
||||||
-- In Finnish, they can be ordinary verbs ("haluta", "yrittää"), but
|
|
||||||
-- also verbs with a special subject case ("täytyy", "on pakko").
|
|
||||||
|
|
||||||
VerbVerb : Type = Verb ** {c : ComplCase} ;
|
VerbVerb : Type = Verb1 ** {i : VIForm} ;
|
||||||
{-
|
{-
|
||||||
complVerbVerb : VerbVerb -> VerbGroup -> VerbGroup = \haluta, uida ->
|
complVerbVerb : VerbVerb -> VerbGroup -> VerbGroup = \haluta, uida ->
|
||||||
let
|
let
|
||||||
@@ -839,7 +853,7 @@ oper
|
|||||||
c = hc
|
c = hc
|
||||||
} ;
|
} ;
|
||||||
-}
|
-}
|
||||||
nomVerbVerb : Verb -> VerbVerb = \v -> v ** {c = CCase Nom} ;
|
|
||||||
|
|
||||||
--2 Sentences missing noun phrases
|
--2 Sentences missing noun phrases
|
||||||
--
|
--
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ instance SyntaxNor of SyntaxScand = TypesNor **
|
|||||||
auxSkulle = "ville" ;
|
auxSkulle = "ville" ;
|
||||||
|
|
||||||
infinAtt = "å" ;
|
infinAtt = "å" ;
|
||||||
|
subordAtt = "at" ;
|
||||||
|
|
||||||
varjeDet : Determiner = mkDeterminerSg (detSgInvar "hver") IndefP ;
|
varjeDet : Determiner = mkDeterminerSg (detSgInvar "hver") IndefP ;
|
||||||
allaDet : Determiner = mkDeterminerPl "alle" IndefP ;
|
allaDet : Determiner = mkDeterminerPl "alle" IndefP ;
|
||||||
|
|||||||
@@ -286,7 +286,7 @@ oper
|
|||||||
-- first place as common nouns, so that one can also have "ett förslag att...".
|
-- first place as common nouns, so that one can also have "ett förslag att...".
|
||||||
|
|
||||||
nounThatSentence : CommNounPhrase -> Sentence -> CommNounPhrase = \tanke,x ->
|
nounThatSentence : CommNounPhrase -> Sentence -> CommNounPhrase = \tanke,x ->
|
||||||
{s = \\n,d,c => tanke.s ! n ! d ! c ++ infinAtt ++ x.s ! Sub ;
|
{s = \\n,d,c => tanke.s ! n ! d ! c ++ subordAtt ++ x.s ! Sub ;
|
||||||
g = tanke.g ;
|
g = tanke.g ;
|
||||||
p = tanke.p
|
p = tanke.p
|
||||||
} ;
|
} ;
|
||||||
@@ -709,7 +709,7 @@ oper
|
|||||||
predVerbGroupClause
|
predVerbGroupClause
|
||||||
npDet
|
npDet
|
||||||
(vara (
|
(vara (
|
||||||
\\g,n,_ => bra.s ! predFormAdj g n ! Nom ++ infinAtt ++ hansover.s ! Sub)) ;
|
\\g,n,_ => bra.s ! predFormAdj g n ! Nom ++ subordAtt ++ hansover.s ! Sub)) ;
|
||||||
|
|
||||||
predAdjSent2 : AdjCompl -> NounPhrase -> Adjective = \bra,han ->
|
predAdjSent2 : AdjCompl -> NounPhrase -> Adjective = \bra,han ->
|
||||||
{s = \\af,c => bra.s ! af ! c ++ {-strPrep-} bra.s2 ++ han.s ! PAcc} ;
|
{s = \\af,c => bra.s ! af ! c ++ {-strPrep-} bra.s2 ++ han.s ! PAcc} ;
|
||||||
@@ -1026,7 +1026,7 @@ oper
|
|||||||
SentenceVerb : Type = Verb ;
|
SentenceVerb : Type = Verb ;
|
||||||
|
|
||||||
complSentVerb : SentenceVerb -> Sentence -> VerbGroup = \se,duler ->
|
complSentVerb : SentenceVerb -> Sentence -> VerbGroup = \se,duler ->
|
||||||
useVerb se (\\_,_,_ => optStr infinAtt ++ duler.s ! Sub) ;
|
useVerb se (\\_,_,_ => optStr subordAtt ++ duler.s ! Sub) ;
|
||||||
|
|
||||||
complQuestVerb : SentenceVerb -> QuestionSent -> VerbGroup = \se,omduler ->
|
complQuestVerb : SentenceVerb -> QuestionSent -> VerbGroup = \se,omduler ->
|
||||||
useVerb se (\\_,_,_ => omduler.s ! IndirQ) ;
|
useVerb se (\\_,_,_ => omduler.s ! IndirQ) ;
|
||||||
@@ -1034,7 +1034,7 @@ oper
|
|||||||
complDitransSentVerb : TransVerb -> NounPhrase -> Sentence -> VerbGroup =
|
complDitransSentVerb : TransVerb -> NounPhrase -> Sentence -> VerbGroup =
|
||||||
\sa,honom,duler ->
|
\sa,honom,duler ->
|
||||||
useVerb sa
|
useVerb sa
|
||||||
(\\_,_,_ => {-strPrep-} sa.s2 ++ honom.s ! PAcc ++ optStr infinAtt ++ duler.s ! Main) ;
|
(\\_,_,_ => {-strPrep-} sa.s2 ++ honom.s ! PAcc ++ optStr subordAtt ++ duler.s ! Main) ;
|
||||||
|
|
||||||
complDitransQuestVerb : TransVerb -> NounPhrase -> QuestionSent -> VerbGroup =
|
complDitransQuestVerb : TransVerb -> NounPhrase -> QuestionSent -> VerbGroup =
|
||||||
\sa,honom,omduler ->
|
\sa,honom,omduler ->
|
||||||
@@ -1212,7 +1212,7 @@ oper
|
|||||||
-- "tal x sådant att x är primt".
|
-- "tal x sådant att x är primt".
|
||||||
|
|
||||||
relSuch : Clause -> RelClause = \A ->
|
relSuch : Clause -> RelClause = \A ->
|
||||||
{s = \\b,sf,g,p => pronSådan ! g ++ infinAtt ++ A.s ! b ! s2cl sf Sub} ;
|
{s = \\b,sf,g,p => pronSådan ! g ++ subordAtt ++ A.s ! b ! s2cl sf Sub} ;
|
||||||
|
|
||||||
-- The main use of relative clauses is to modify common nouns.
|
-- The main use of relative clauses is to modify common nouns.
|
||||||
-- The result is a common noun, out of which noun phrases can be formed
|
-- The result is a common noun, out of which noun phrases can be formed
|
||||||
@@ -1687,7 +1687,7 @@ oper
|
|||||||
|
|
||||||
auxHar, auxHade, auxHa, auxSka, auxSkulle : Str ;
|
auxHar, auxHade, auxHa, auxSka, auxSkulle : Str ;
|
||||||
|
|
||||||
infinAtt : Str ;
|
infinAtt, subordAtt : Str ;
|
||||||
prepÄn : Str ;
|
prepÄn : Str ;
|
||||||
negInte : Str ;
|
negInte : Str ;
|
||||||
conjOm : Str ;
|
conjOm : Str ;
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ instance SyntaxSwe of SyntaxScand = TypesSwe **
|
|||||||
auxSka = "ska" ;
|
auxSka = "ska" ;
|
||||||
auxSkulle = "skulle" ;
|
auxSkulle = "skulle" ;
|
||||||
|
|
||||||
infinAtt = "att" ;
|
infinAtt,subordAtt = "att" ;
|
||||||
|
|
||||||
varjeDet : Determiner = mkDeterminerSg (detSgInvar "varje") IndefP ;
|
varjeDet : Determiner = mkDeterminerSg (detSgInvar "varje") IndefP ;
|
||||||
allaDet : Determiner = mkDeterminerPl "alla" IndefP ;
|
allaDet : Determiner = mkDeterminerPl "alla" IndefP ;
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import javax.swing.filechooser.*;
|
|||||||
|
|
||||||
public class GrammarFilter extends FileFilter {
|
public class GrammarFilter extends FileFilter {
|
||||||
|
|
||||||
// Accept all directories and all gf, gfm files.
|
// Accept all directories and all gf, gfcm files.
|
||||||
public boolean accept(File f) {
|
public boolean accept(File f) {
|
||||||
if (f.isDirectory()) {
|
if (f.isDirectory()) {
|
||||||
return true;
|
return true;
|
||||||
@@ -29,7 +29,7 @@ public class GrammarFilter extends FileFilter {
|
|||||||
String extension = Utils.getExtension(f);
|
String extension = Utils.getExtension(f);
|
||||||
if (extension != null) {
|
if (extension != null) {
|
||||||
if (extension.equals(Utils.gf) ||
|
if (extension.equals(Utils.gf) ||
|
||||||
extension.equals(Utils.gfm)) {
|
extension.equals(Utils.gfcm)) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
@@ -41,6 +41,6 @@ public class GrammarFilter extends FileFilter {
|
|||||||
|
|
||||||
// The description of this filter
|
// The description of this filter
|
||||||
public String getDescription() {
|
public String getDescription() {
|
||||||
return "Just Grammars (*.gf, *.gfm)";
|
return "Just Grammars (*.gf, *.gfcm)";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ public class Utils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static final String gf = "gf";
|
public static final String gf = "gf";
|
||||||
public static final String gfm = "gfm";
|
public static final String gfcm = "gfcm";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Get the extension of a file.
|
* Get the extension of a file.
|
||||||
|
|||||||
Reference in New Issue
Block a user