mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 08:58:55 -06:00
Compare commits
17 Commits
somali-ver
...
optimise-l
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8d40fdf79f | ||
|
|
91237f753c | ||
|
|
d25d648134 | ||
|
|
531e2c2dd2 | ||
|
|
9fcee982e5 | ||
|
|
1b696739be | ||
|
|
fb48791d6a | ||
|
|
27e6295655 | ||
|
|
dc8da4a212 | ||
|
|
e91b613e1a | ||
|
|
f7e9357ed4 | ||
|
|
22a168198b | ||
|
|
5d912f78a4 | ||
|
|
cb26429655 | ||
|
|
1910ba1b2a | ||
|
|
645de9955a | ||
|
|
2023af9a45 |
@@ -128,7 +128,8 @@ abstract Cat = Common ** {
|
|||||||
N3 ; -- three-place relational noun e.g. "connection"
|
N3 ; -- three-place relational noun e.g. "connection"
|
||||||
GN ; -- given name e.g. "George"
|
GN ; -- given name e.g. "George"
|
||||||
SN ; -- second name e.g. "Washington"
|
SN ; -- second name e.g. "Washington"
|
||||||
PN ; -- proper name e.g. "Paris"
|
LN ; -- location name e.g. "Sweden"
|
||||||
|
PN ; -- proper name
|
||||||
|
|
||||||
-- DEPRECATED: QuantSg, QuantPl
|
-- DEPRECATED: QuantSg, QuantPl
|
||||||
--- QuantSg ;-- quantifier ('nucleus' of sing. Det) e.g. "every"
|
--- QuantSg ;-- quantifier ('nucleus' of sing. Det) e.g. "every"
|
||||||
|
|||||||
@@ -44,4 +44,8 @@ abstract Common = {
|
|||||||
Pol ; -- polarity e.g. positive, negative
|
Pol ; -- polarity e.g. positive, negative
|
||||||
Ant ; -- anteriority e.g. simultaneous, anterior
|
Ant ; -- anteriority e.g. simultaneous, anterior
|
||||||
|
|
||||||
|
--2 Measures
|
||||||
|
|
||||||
|
MU ; -- unit of measurement e.g. "km", "cm", "%"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ fun
|
|||||||
InflectionN2 : N2 -> Inflection ;
|
InflectionN2 : N2 -> Inflection ;
|
||||||
InflectionN3 : N3 -> Inflection ;
|
InflectionN3 : N3 -> Inflection ;
|
||||||
InflectionPN : PN -> Inflection ;
|
InflectionPN : PN -> Inflection ;
|
||||||
|
InflectionLN : LN -> Inflection ;
|
||||||
InflectionGN : GN -> Inflection ;
|
InflectionGN : GN -> Inflection ;
|
||||||
InflectionSN : SN -> Inflection ;
|
InflectionSN : SN -> Inflection ;
|
||||||
InflectionA : A -> Inflection ;
|
InflectionA : A -> Inflection ;
|
||||||
|
|||||||
@@ -297,12 +297,6 @@ fun
|
|||||||
fun
|
fun
|
||||||
CardCNCard : Card -> CN -> Card ; -- three million, four lakh, six dozen etc
|
CardCNCard : Card -> CN -> Card ; -- three million, four lakh, six dozen etc
|
||||||
|
|
||||||
GivenName : GN -> PN ;
|
|
||||||
MaleSurname : SN -> PN ;
|
|
||||||
FemaleSurname : SN -> PN ;
|
|
||||||
PlSurname : SN -> PN ;
|
|
||||||
FullName : GN -> SN -> PN ;
|
|
||||||
|
|
||||||
fun
|
fun
|
||||||
AnaphPron : NP -> Pron ;
|
AnaphPron : NP -> Pron ;
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,6 @@ abstract Grammar =
|
|||||||
Structural,
|
Structural,
|
||||||
Idiom,
|
Idiom,
|
||||||
Tense,
|
Tense,
|
||||||
|
Names,
|
||||||
Transfer
|
Transfer
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|||||||
14
src/abstract/Names.gf
Normal file
14
src/abstract/Names.gf
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
abstract Names = Cat ** {
|
||||||
|
|
||||||
|
fun GivenName : GN -> NP ;
|
||||||
|
MaleSurname : SN -> NP ;
|
||||||
|
FemaleSurname : SN -> NP ;
|
||||||
|
PlSurname : SN -> NP ;
|
||||||
|
FullName : GN -> SN -> NP ;
|
||||||
|
|
||||||
|
fun UseLN : LN -> NP ;
|
||||||
|
PlainLN : LN -> NP ;
|
||||||
|
InLN : LN -> Adv ;
|
||||||
|
AdjLN : AP -> LN -> LN ;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -58,6 +58,7 @@ abstract Noun = Cat ** {
|
|||||||
|
|
||||||
data
|
data
|
||||||
NumDigits : Digits -> Card ; -- 51
|
NumDigits : Digits -> Card ; -- 51
|
||||||
|
NumFloat : Digits -> Digits -> Card ; -- 3.14
|
||||||
NumNumeral : Numeral -> Card ; -- fifty-one
|
NumNumeral : Numeral -> Card ; -- fifty-one
|
||||||
|
|
||||||
-- The construction of numerals is defined in [Numeral Numeral.html].
|
-- The construction of numerals is defined in [Numeral Numeral.html].
|
||||||
@@ -155,4 +156,9 @@ abstract Noun = Cat ** {
|
|||||||
AdjDAP : DAP -> AP -> DAP ; -- the large (one)
|
AdjDAP : DAP -> AP -> DAP ; -- the large (one)
|
||||||
DetDAP : Det -> DAP ; -- this (or that)
|
DetDAP : Det -> DAP ; -- this (or that)
|
||||||
|
|
||||||
|
--2 Quantities
|
||||||
|
|
||||||
|
QuantityNP : Digits -> MU -> NP ;
|
||||||
|
QuantityFloatNP : Digits -> Digits -> MU -> NP ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,6 +83,6 @@ concrete CatAfr of Cat =
|
|||||||
N = Noun ;
|
N = Noun ;
|
||||||
N2 = {s : NForm => Str ; g : Gender} ** {c2 : Preposition} ;
|
N2 = {s : NForm => Str ; g : Gender} ** {c2 : Preposition} ;
|
||||||
N3 = {s : NForm => Str ; g : Gender} ** {c2,c3 : Preposition} ;
|
N3 = {s : NForm => Str ; g : Gender} ** {c2,c3 : Preposition} ;
|
||||||
GN, SN, PN = {s : NPCase => Str} ;
|
GN, SN, LN, PN = {s : NPCase => Str} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,6 +28,12 @@ lin
|
|||||||
s2 = paragraph (pn.s ! NPNom)
|
s2 = paragraph (pn.s ! NPNom)
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
InflectionLN = \ln -> {
|
||||||
|
t = "ln" ;
|
||||||
|
s1 = heading1 "Naam" ;
|
||||||
|
s2 = paragraph (ln.s ! NPNom)
|
||||||
|
} ;
|
||||||
|
|
||||||
InflectionGN = \pn -> {
|
InflectionGN = \pn -> {
|
||||||
t = "vnm" ;
|
t = "vnm" ;
|
||||||
s1 = heading1 "Voornaam" ;
|
s1 = heading1 "Voornaam" ;
|
||||||
|
|||||||
@@ -12,9 +12,4 @@ lin PassVPSlash vps =
|
|||||||
PassAgentVPSlash vps np =
|
PassAgentVPSlash vps np =
|
||||||
insertAdv (appPrep "door" np.s) (insertInf (vps.s.s ! VPerf) (predV word_V)) ;
|
insertAdv (appPrep "door" np.s) (insertInf (vps.s.s ! VPerf) (predV word_V)) ;
|
||||||
|
|
||||||
lin GivenName, MaleSurname, FemaleSurname = \n -> n ;
|
|
||||||
lin FullName gn sn = {
|
|
||||||
s = \\c => gn.s ! NPNom ++ sn.s ! c ;
|
|
||||||
} ;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,4 +14,5 @@ concrete GrammarAfr of Grammar =
|
|||||||
TextX,
|
TextX,
|
||||||
IdiomAfr,
|
IdiomAfr,
|
||||||
StructuralAfr,
|
StructuralAfr,
|
||||||
TenseX ;
|
TenseX,
|
||||||
|
NamesAfr ;
|
||||||
|
|||||||
9
src/afrikaans/NamesAfr.gf
Normal file
9
src/afrikaans/NamesAfr.gf
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
concrete NamesAfr of Names = CatAfr ** open ResAfr, Prelude in {
|
||||||
|
|
||||||
|
lin GivenName, MaleSurname, FemaleSurname = \n -> {s = n.s ; a = agrP3 Sg ; isPron = False} ;
|
||||||
|
lin FullName gn sn =
|
||||||
|
{s = \\c => gn.s ! NPNom ++ sn.s ! c ; a = agrP3 Sg ; isPron = False} ;
|
||||||
|
|
||||||
|
lin UseLN pn = {s = pn.s ; a = agrP3 Sg ; isPron = False} ;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -77,6 +77,8 @@ concrete NounAfr of Noun = CatAfr ** open ResAfr, Prelude in {
|
|||||||
NumDigits numeral = {s = \\g,c => numeral.s ! NCard g c; n = numeral.n } ;
|
NumDigits numeral = {s = \\g,c => numeral.s ! NCard g c; n = numeral.n } ;
|
||||||
OrdDigits numeral = {s = \\af => numeral.s ! NOrd af} ;
|
OrdDigits numeral = {s = \\af => numeral.s ! NOrd af} ;
|
||||||
|
|
||||||
|
NumFloat n1 n2 = {s = \\g,c => n1.s ! NCard Neutr Nom ++ BIND ++ "." ++ BIND ++ n1.s ! NCard g c; n = Pl } ;
|
||||||
|
|
||||||
NumNumeral numeral = {s = \\g,c => numeral.s ! NCard g c; n = numeral.n } ;
|
NumNumeral numeral = {s = \\g,c => numeral.s ! NCard g c; n = numeral.n } ;
|
||||||
OrdNumeral numeral = {s = \\af => numeral.s ! NOrd af} ;
|
OrdNumeral numeral = {s = \\af => numeral.s ! NOrd af} ;
|
||||||
|
|
||||||
@@ -177,4 +179,16 @@ concrete NounAfr of Noun = CatAfr ** open ResAfr, Prelude in {
|
|||||||
isMod = cn.isMod
|
isMod = cn.isMod
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
QuantityNP n m = {
|
||||||
|
s = \\c => preOrPost m.isPre m.s (n.s ! NCard Neutr Nom) ;
|
||||||
|
a = agrP3 n.n ;
|
||||||
|
isPron = False
|
||||||
|
} ;
|
||||||
|
|
||||||
|
QuantityFloatNP n1 n2 m = {
|
||||||
|
s = \\c => preOrPost m.isPre m.s (n1.s ! NCard Neutr Nom ++ BIND ++ "." ++ BIND ++ n1.s ! NCard Neutr Nom) ;
|
||||||
|
a = agrP3 Pl ;
|
||||||
|
isPron = False
|
||||||
|
} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -494,4 +494,6 @@ oper
|
|||||||
--
|
--
|
||||||
--}
|
--}
|
||||||
|
|
||||||
|
mkMU : Str -> MU = \s -> lin MU {s=s; isPre=False} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ incomplete concrete CatBantu of Cat =
|
|||||||
-- N2 = {s : Number => Case => Str ; g : Gender} ** {c2 : Str} ;
|
-- N2 = {s : Number => Case => Str ; g : Gender} ** {c2 : Str} ;
|
||||||
N2 = {s : Number => Case => Str ; g : Gender} ** {c2 : Prep} ;
|
N2 = {s : Number => Case => Str ; g : Gender} ** {c2 : Prep} ;
|
||||||
N3 = {s : Number => Case => Str ; g : Gender} ** {c2,c3 : Prep} ;
|
N3 = {s : Number => Case => Str ; g : Gender} ** {c2,c3 : Prep} ;
|
||||||
GN, SN, PN = {s : Case => Str ; g : Gender} ;
|
GN, SN, LN, PN = {s : Case => Str ; g : Gender} ;
|
||||||
--Tense = {s : Str ; t : ResKam.Tense} ;
|
--Tense = {s : Str ; t : ResKam.Tense} ;
|
||||||
|
|
||||||
linref
|
linref
|
||||||
|
|||||||
@@ -88,6 +88,7 @@ concrete CatBul of Cat = CommonX - [IAdv,AdV] ** open ResBul, Prelude, Predef, (
|
|||||||
N3 = {s : NForm => Str; rel : AForm => Str; relType : NRelType; g : AGender} ** {c2,c3 : Preposition} ;
|
N3 = {s : NForm => Str; rel : AForm => Str; relType : NRelType; g : AGender} ** {c2,c3 : Preposition} ;
|
||||||
GN = {s : Str; g : Sex} ;
|
GN = {s : Str; g : Sex} ;
|
||||||
SN = {s : Sex => Str; pl : Str} ;
|
SN = {s : Sex => Str; pl : Str} ;
|
||||||
|
LN = {s : Species => Str; c : Preposition; gn : GenNum} ;
|
||||||
PN = {s : Str; gn : GenNum} ;
|
PN = {s : Str; gn : GenNum} ;
|
||||||
|
|
||||||
lindef
|
lindef
|
||||||
|
|||||||
@@ -92,6 +92,21 @@ lin
|
|||||||
s3 = ""
|
s3 = ""
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
InflectionLN = \n -> {
|
||||||
|
t = "същ.с." ;
|
||||||
|
s1= heading1 ("Име за Място"++
|
||||||
|
case n.gn of {
|
||||||
|
GSg Masc => "(м.р.)" ;
|
||||||
|
GSg Fem => "(ж.р.)" ;
|
||||||
|
GSg Neut => "(ср.р.)" ;
|
||||||
|
GPl => "(мн.ч.)"
|
||||||
|
}) ;
|
||||||
|
s2 = paragraph (n.s ! Indef) ++
|
||||||
|
heading1 ("Наречие") ++
|
||||||
|
paragraph (n.c.s ++ linCase n.c.c Pos ++ n.s ! Def) ;
|
||||||
|
s3 = ""
|
||||||
|
} ;
|
||||||
|
|
||||||
InflectionGN = \gn -> {
|
InflectionGN = \gn -> {
|
||||||
t = "същ.с.л." ;
|
t = "същ.с.л." ;
|
||||||
s1= heading1 (case gn.g of {
|
s1= heading1 (case gn.g of {
|
||||||
|
|||||||
@@ -303,27 +303,6 @@ lin UseDAP dap = {
|
|||||||
lin UseComp_estar = UseComp ;
|
lin UseComp_estar = UseComp ;
|
||||||
UseComp_ser = UseComp ;
|
UseComp_ser = UseComp ;
|
||||||
|
|
||||||
lin GivenName = \n -> {
|
|
||||||
s = n.s ;
|
|
||||||
gn = GSg (sex2gender n.g)
|
|
||||||
} ;
|
|
||||||
lin MaleSurname = \n -> {
|
|
||||||
s = n.s ! Male ;
|
|
||||||
gn = GSg Masc
|
|
||||||
} ;
|
|
||||||
lin FemaleSurname = \n -> {
|
|
||||||
s = n.s ! Female;
|
|
||||||
gn = GSg Fem
|
|
||||||
} ;
|
|
||||||
lin PlSurname = \n -> {
|
|
||||||
s = n.pl ;
|
|
||||||
gn = GPl
|
|
||||||
} ;
|
|
||||||
lin FullName gn sn = {
|
|
||||||
s = gn.s ++ sn.s ! gn.g ;
|
|
||||||
gn = GSg (sex2gender gn.g)
|
|
||||||
} ;
|
|
||||||
|
|
||||||
lin ProDrop pro = pro ;
|
lin ProDrop pro = pro ;
|
||||||
|
|
||||||
lin AnaphPron np =
|
lin AnaphPron np =
|
||||||
|
|||||||
@@ -15,7 +15,8 @@ concrete GrammarBul of Grammar =
|
|||||||
TextBul,
|
TextBul,
|
||||||
StructuralBul,
|
StructuralBul,
|
||||||
IdiomBul,
|
IdiomBul,
|
||||||
TenseX - [CAdv,IAdv,AdV,SC]
|
TenseX - [CAdv,IAdv,AdV,SC],
|
||||||
|
NamesBul
|
||||||
** {
|
** {
|
||||||
flags coding=utf8 ;
|
flags coding=utf8 ;
|
||||||
|
|
||||||
|
|||||||
@@ -165,6 +165,7 @@ oper
|
|||||||
NF Sg Indef => sg ;
|
NF Sg Indef => sg ;
|
||||||
NF Sg Def => case sg of {
|
NF Sg Def => case sg of {
|
||||||
_+"а"=>sg+"та" ;
|
_+"а"=>sg+"та" ;
|
||||||
|
_+"ю"=>sg+"та" ;
|
||||||
_+"я"=>sg+"та" ;
|
_+"я"=>sg+"та" ;
|
||||||
_+"о"=>sg+"то" ;
|
_+"о"=>sg+"то" ;
|
||||||
_+"у"=>sg+"то" ;
|
_+"у"=>sg+"то" ;
|
||||||
|
|||||||
@@ -291,6 +291,17 @@ oper
|
|||||||
\s,gn -> {s = s; gn = gn ; lock_PN = <>} ;
|
\s,gn -> {s = s; gn = gn ; lock_PN = <>} ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
mkLN = overload {
|
||||||
|
mkLN : Str -> LN = \s -> lin LN {s = \\_ => s; c = {s = vyv_Str; c = CPrep}; gn = GSg Masc} ;
|
||||||
|
mkLN : Str -> Gender -> LN =
|
||||||
|
\s,g -> lin LN {s = \\_ => s; c = {s = vyv_Str; c = CPrep}; gn = GSg g} ;
|
||||||
|
mkLN : Str -> GenNum -> LN =
|
||||||
|
\s,gn -> lin LN {s = \\_ => s; c = {s = vyv_Str; c = CPrep}; gn = gn} ;
|
||||||
|
mkLN : Str -> Str -> GenNum -> LN =
|
||||||
|
\s1,s2,gn -> lin LN {s = table Species [s2; s1]; c = {s = vyv_Str; c = CPrep}; gn = gn} ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
prepLN : LN -> Prep -> LN = \n,p -> n ** {c = p} ;
|
||||||
|
|
||||||
--2 IAdv
|
--2 IAdv
|
||||||
--
|
--
|
||||||
|
|||||||
56
src/bulgarian/NamesBul.gf
Normal file
56
src/bulgarian/NamesBul.gf
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
concrete NamesBul of Names = CatBul ** open ResBul in {
|
||||||
|
|
||||||
|
lin GivenName = \n -> {
|
||||||
|
s = table { RObj c => linCase c Pos ++ n.s;
|
||||||
|
_ => n.s
|
||||||
|
} ;
|
||||||
|
gn = GSg (sex2gender n.g) ;
|
||||||
|
p = NounP3 Pos
|
||||||
|
} ;
|
||||||
|
lin MaleSurname = \n -> {
|
||||||
|
s = table { RObj c => linCase c Pos ++ n.s ! Male;
|
||||||
|
_ => n.s ! Male
|
||||||
|
} ;
|
||||||
|
gn = GSg Masc ;
|
||||||
|
p = NounP3 Pos
|
||||||
|
} ;
|
||||||
|
lin FemaleSurname = \n -> {
|
||||||
|
s = table { RObj c => linCase c Pos ++ n.s ! Female;
|
||||||
|
_ => n.s ! Female
|
||||||
|
} ;
|
||||||
|
gn = GSg Fem ;
|
||||||
|
p = NounP3 Pos
|
||||||
|
} ;
|
||||||
|
lin PlSurname = \n -> {
|
||||||
|
s = table { RObj c => linCase c Pos ++ n.pl ;
|
||||||
|
_ => n.pl
|
||||||
|
} ;
|
||||||
|
gn = GPl ;
|
||||||
|
p = NounP3 Pos
|
||||||
|
} ;
|
||||||
|
lin FullName gn sn = {
|
||||||
|
s = table { RObj c => linCase c Pos ++ gn.s ++ sn.s ! gn.g ;
|
||||||
|
_ => gn.s ++ sn.s ! gn.g
|
||||||
|
} ;
|
||||||
|
gn = GSg (sex2gender gn.g) ;
|
||||||
|
p = NounP3 Pos
|
||||||
|
} ;
|
||||||
|
|
||||||
|
lin UseLN, PlainLN = \n -> {
|
||||||
|
s = table { RObj c => linCase c Pos ++ n.s ! Def ;
|
||||||
|
_ => n.s ! Def
|
||||||
|
} ;
|
||||||
|
gn = n.gn ;
|
||||||
|
p = NounP3 Pos
|
||||||
|
} ;
|
||||||
|
|
||||||
|
InLN n = {s = n.c.s ++ linCase n.c.c Pos ++ n.s ! Def} ;
|
||||||
|
|
||||||
|
AdjLN ap n = n ** {
|
||||||
|
s = \\sp => case ap.isPre of {
|
||||||
|
True => ap.s ! aform n.gn sp RSubj ! P3 ++ n.s ! Indef ;
|
||||||
|
False => n.s ! sp ++ ap.s ! aform n.gn sp RSubj ! P3
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -118,6 +118,8 @@ concrete NounBul of Noun = CatBul ** open ResBul, Prelude in {
|
|||||||
NumDigits n = {s = \\gspec => n.s ! NCard gspec; nn = case n.n of {Sg => NNum Sg; Pl => NCountable}} ;
|
NumDigits n = {s = \\gspec => n.s ! NCard gspec; nn = case n.n of {Sg => NNum Sg; Pl => NCountable}} ;
|
||||||
OrdDigits n = {s = \\aform => n.s ! NOrd aform} ;
|
OrdDigits n = {s = \\aform => n.s ! NOrd aform} ;
|
||||||
|
|
||||||
|
NumFloat n1 n2 = {s = \\gspec => n1.s ! NCard (CFMasc Indef NonHuman) ++ BIND ++ "." ++ BIND ++ n2.s ! NCard gspec ; nn = NCountable} ;
|
||||||
|
|
||||||
NumNumeral numeral = {s = \\gspec => numeral.s ! NCard gspec; nn = case numeral.n of {Sg => NNum Sg; Pl => NCountable}} ;
|
NumNumeral numeral = {s = \\gspec => numeral.s ! NCard gspec; nn = case numeral.n of {Sg => NNum Sg; Pl => NCountable}} ;
|
||||||
OrdNumeral numeral = {s = \\aform => numeral.s ! NOrd aform} ;
|
OrdNumeral numeral = {s = \\aform => numeral.s ! NOrd aform} ;
|
||||||
|
|
||||||
@@ -238,4 +240,17 @@ concrete NounBul of Noun = CatBul ** open ResBul, Prelude in {
|
|||||||
p = dap.p
|
p = dap.p
|
||||||
} ;
|
} ;
|
||||||
DetDAP det = det ;
|
DetDAP det = det ;
|
||||||
|
|
||||||
|
QuantityNP n m = {
|
||||||
|
s = \\role => preOrPost m.isPre m.s (n.s ! NCard (CFMasc Indef NonHuman)) ;
|
||||||
|
gn = gennum (AMasc NonHuman) n.n ;
|
||||||
|
p = NounP3 Pos
|
||||||
|
} ;
|
||||||
|
|
||||||
|
QuantityFloatNP n1 n2 m = {
|
||||||
|
s = \\role => preOrPost m.isPre m.s (n1.s ! NCard (CFMasc Indef NonHuman) ++ BIND ++ "." ++ BIND ++ n2.s ! NCard (CFMasc Indef NonHuman)) ;
|
||||||
|
gn = gennum (AMasc NonHuman) Pl ;
|
||||||
|
p = NounP3 Pos
|
||||||
|
} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2116,4 +2116,7 @@ oper
|
|||||||
|
|
||||||
adjAdv : A -> Str -> A =
|
adjAdv : A -> Str -> A =
|
||||||
\a,adv -> a ** {adv = adv} ;
|
\a,adv -> a ** {adv = adv} ;
|
||||||
|
|
||||||
|
mkMU : Str -> MU = \s -> lin MU {s=s; isPre=False} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -859,4 +859,9 @@ resource ResBul = ParamX ** open Prelude, Predef in {
|
|||||||
Female => Fem
|
Female => Fem
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
vyv_Str : Str
|
||||||
|
= pre { "в" ;
|
||||||
|
"във" / strs {"в" ; "ф" ; "В" ; "Ф"}
|
||||||
|
} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,9 +44,7 @@ concrete StructuralBul of Structural = CatBul **
|
|||||||
if_Subj = ss "ако" ;
|
if_Subj = ss "ако" ;
|
||||||
in8front_Prep = mkPrep "пред" ;
|
in8front_Prep = mkPrep "пред" ;
|
||||||
i_Pron = mkPron "аз" "мой" "моя" "моят" "моя" "моята" "мое" "моето" "мои" "моите" (GSg Masc) PronP1 ;
|
i_Pron = mkPron "аз" "мой" "моя" "моят" "моя" "моята" "мое" "моето" "мои" "моите" (GSg Masc) PronP1 ;
|
||||||
in_Prep = mkPrep (pre { "в" ;
|
in_Prep = mkPrep vyv_Str ;
|
||||||
"във" / strs {"в" ; "ф" ; "В" ; "Ф"}
|
|
||||||
}) ;
|
|
||||||
it_Pron = mkPron "то" "негов" "неговия" "неговият" "негова" "неговата" "негово" "неговото" "негови" "неговите" (GSg Neut) PronP3 ;
|
it_Pron = mkPron "то" "негов" "неговия" "неговият" "негова" "неговата" "негово" "неговото" "негови" "неговите" (GSg Neut) PronP3 ;
|
||||||
less_CAdv = X.mkCAdv "по-малко" "от" ;
|
less_CAdv = X.mkCAdv "по-малко" "от" ;
|
||||||
many_Det = mkDeterminerPl "много" ;
|
many_Det = mkDeterminerPl "много" ;
|
||||||
|
|||||||
@@ -225,4 +225,7 @@ oper
|
|||||||
|
|
||||||
polNegDirSubj = RPos ;
|
polNegDirSubj = RPos ;
|
||||||
|
|
||||||
|
param
|
||||||
|
HasArt = NoArt | UseArt ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,10 +15,4 @@ concrete ExtendCat of Extend = CatCat ** ExtendRomanceFunctor-- -
|
|||||||
ParadigmsCat in {
|
ParadigmsCat in {
|
||||||
-- put your own definitions here
|
-- put your own definitions here
|
||||||
|
|
||||||
lin GivenName, MaleSurname, FemaleSurname = \n -> n ;
|
|
||||||
lin FullName gn sn = {
|
|
||||||
s = gn.s ++ sn.s ;
|
|
||||||
g = gn.g
|
|
||||||
} ;
|
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -14,7 +14,8 @@ concrete GrammarCat of Grammar =
|
|||||||
TextX - [SC,Temp,Tense,Pol,PPos,PNeg],
|
TextX - [SC,Temp,Tense,Pol,PPos,PNeg],
|
||||||
IdiomCat,
|
IdiomCat,
|
||||||
StructuralCat,
|
StructuralCat,
|
||||||
TenseCat
|
TenseCat,
|
||||||
|
NamesCat
|
||||||
|
|
||||||
** {
|
** {
|
||||||
|
|
||||||
|
|||||||
9
src/catalan/NamesCat.gf
Normal file
9
src/catalan/NamesCat.gf
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
concrete NamesCat of Names = CatCat ** open ResCat in {
|
||||||
|
|
||||||
|
lin GivenName, MaleSurname, FemaleSurname = \n -> pn2np n ;
|
||||||
|
lin FullName gn sn = pn2np {
|
||||||
|
s = gn.s ++ sn.s ;
|
||||||
|
g = gn.g
|
||||||
|
} ;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -139,6 +139,12 @@ oper
|
|||||||
mkPN : N -> PN ;
|
mkPN : N -> PN ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
mkLN : Str -> LN = \s ->
|
||||||
|
lin LN {s = s ;
|
||||||
|
p = {s=""; c=CPrep P_a; isDir=True} ;
|
||||||
|
art = NoArt ;
|
||||||
|
g = Masc ;
|
||||||
|
num = Sg} ;
|
||||||
|
|
||||||
--2 Adjectives
|
--2 Adjectives
|
||||||
|
|
||||||
@@ -553,6 +559,6 @@ oper
|
|||||||
mk2V2 : V -> Prep -> V2 ;
|
mk2V2 : V -> Prep -> V2 ;
|
||||||
dirV2 : V -> V2 ;
|
dirV2 : V -> V2 ;
|
||||||
|
|
||||||
|
mkMU : Str -> MU = \s -> lin MU {s=s; isPre=False} ;
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ concrete CatChi of Cat = CommonX - [Tense, Temp, Ant, Adv] ** open ResChi, Prelu
|
|||||||
N = ResChi.Noun ;
|
N = ResChi.Noun ;
|
||||||
N2 = ResChi.Noun ** {c2 : Preposition} ;
|
N2 = ResChi.Noun ** {c2 : Preposition} ;
|
||||||
N3 = ResChi.Noun ** {c2,c3 : Preposition} ;
|
N3 = ResChi.Noun ** {c2,c3 : Preposition} ;
|
||||||
GN, SN, PN = SS ;
|
GN, SN, LN, PN = SS ;
|
||||||
|
|
||||||
-- overridden
|
-- overridden
|
||||||
|
|
||||||
|
|||||||
@@ -117,6 +117,12 @@ lin
|
|||||||
s2 = n.s
|
s2 = n.s
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
InflectionLN = \n -> {
|
||||||
|
t = "v" ;
|
||||||
|
s1 = heading1 "Location Name" ;
|
||||||
|
s2 = n.s
|
||||||
|
} ;
|
||||||
|
|
||||||
InflectionGN = \n -> {
|
InflectionGN = \n -> {
|
||||||
t = "v" ;
|
t = "v" ;
|
||||||
s1 = heading1 "Given Name" ;
|
s1 = heading1 "Given Name" ;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ concrete ExtendChi of Extend = CatChi **
|
|||||||
, MkVPI2, BaseVPI2, ConsVPI2, ConjVPI2, ComplVPI2
|
, MkVPI2, BaseVPI2, ConsVPI2, ConjVPI2, ComplVPI2
|
||||||
, ProDrop, ComplDirectVS, ComplDirectVQ
|
, ProDrop, ComplDirectVS, ComplDirectVQ
|
||||||
, PassVPSlash, PassAgentVPSlash
|
, PassVPSlash, PassAgentVPSlash
|
||||||
, GerundAdv, GerundNP, ByVP ]
|
, GerundAdv, GerundNP, ByVP, ApposNP ]
|
||||||
with (Grammar=GrammarChi) ** open
|
with (Grammar=GrammarChi) ** open
|
||||||
Prelude
|
Prelude
|
||||||
, Coordination
|
, Coordination
|
||||||
@@ -83,13 +83,11 @@ concrete ExtendChi of Extend = CatChi **
|
|||||||
AdvVP (UseV <lin V vq : V>)
|
AdvVP (UseV <lin V vq : V>)
|
||||||
(mkAdv (":" ++ quoted utt.s)) ; -- DEFAULT complement added as Adv in quotes
|
(mkAdv (":" ++ quoted utt.s)) ; -- DEFAULT complement added as Adv in quotes
|
||||||
|
|
||||||
|
lin
|
||||||
|
ApposNP np1 np2 = {s = np1.s ++ np2.s; det = np1.det} ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
mkAdv : Str -> CatChi.Adv ;
|
mkAdv : Str -> CatChi.Adv ;
|
||||||
mkAdv str = lin Adv {s = str ; advType = ATManner ; hasDe = False} ;
|
mkAdv str = lin Adv {s = str ; advType = ATManner ; hasDe = False} ;
|
||||||
|
|
||||||
lin GivenName, MaleSurname, FemaleSurname, PlSurname = \n -> n ;
|
|
||||||
lin FullName gn sn = {
|
|
||||||
s = gn.s ++ sn.s
|
|
||||||
} ;
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -14,7 +14,8 @@ concrete GrammarChi of Grammar =
|
|||||||
TextChi,
|
TextChi,
|
||||||
StructuralChi,
|
StructuralChi,
|
||||||
IdiomChi,
|
IdiomChi,
|
||||||
TenseChi
|
TenseChi,
|
||||||
|
NamesChi
|
||||||
** {
|
** {
|
||||||
|
|
||||||
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
||||||
|
|||||||
11
src/chinese/NamesChi.gf
Normal file
11
src/chinese/NamesChi.gf
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
concrete NamesChi of Names = CatChi ** {
|
||||||
|
|
||||||
|
lin GivenName, MaleSurname, FemaleSurname, PlSurname = \n -> n ** {det = []} ;
|
||||||
|
lin FullName gn sn = {
|
||||||
|
s = gn.s ++ sn.s ;
|
||||||
|
det = []
|
||||||
|
} ;
|
||||||
|
|
||||||
|
lin UseLN pn = pn ** {det = []} ;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -215,6 +215,8 @@ oper
|
|||||||
= \s -> lin RP {s = table {True => [] ; False => word s}} ;
|
= \s -> lin RP {s = table {True => [] ; False => word s}} ;
|
||||||
|
|
||||||
|
|
||||||
|
mkMU : Str -> MU = \s -> lin MU {s=s; isPre=False} ;
|
||||||
|
|
||||||
--. auxiliary
|
--. auxiliary
|
||||||
|
|
||||||
oper
|
oper
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
concrete CommonX of Common = open (R = ParamX) in {
|
concrete CommonX of Common = open (R = ParamX), Prelude in {
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
Text = {s : Str} ;
|
Text = {s : Str} ;
|
||||||
@@ -20,4 +20,6 @@ concrete CommonX of Common = open (R = ParamX) in {
|
|||||||
Ant = {s : Str ; a : R.Anteriority} ;
|
Ant = {s : Str ; a : R.Anteriority} ;
|
||||||
Pol = {s : Str ; p : R.Polarity} ;
|
Pol = {s : Str ; p : R.Polarity} ;
|
||||||
|
|
||||||
|
MU = {s : Str ; isPre : Bool} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,6 +81,6 @@ concrete CatDut of Cat =
|
|||||||
N = Noun ;
|
N = Noun ;
|
||||||
N2 = {s : NForm => Str ; g : Gender} ** {c2 : Preposition} ;
|
N2 = {s : NForm => Str ; g : Gender} ** {c2 : Preposition} ;
|
||||||
N3 = {s : NForm => Str ; g : Gender} ** {c2,c3 : Preposition} ;
|
N3 = {s : NForm => Str ; g : Gender} ** {c2,c3 : Preposition} ;
|
||||||
GN, SN, PN = {s : NPCase => Str} ;
|
GN, SN, LN, PN = {s : NPCase => Str} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,9 +121,4 @@ lin
|
|||||||
isPron = False
|
isPron = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
lin GivenName, MaleSurname, FemaleSurname = \n -> n ;
|
|
||||||
lin FullName gn sn = {
|
|
||||||
s = \\c => gn.s ! NPNom ++ sn.s ! c
|
|
||||||
} ;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,4 +14,5 @@ concrete GrammarDut of Grammar =
|
|||||||
TextX,
|
TextX,
|
||||||
IdiomDut,
|
IdiomDut,
|
||||||
StructuralDut,
|
StructuralDut,
|
||||||
TenseX ;
|
TenseX,
|
||||||
|
NamesDut ;
|
||||||
|
|||||||
9
src/dutch/NamesDut.gf
Normal file
9
src/dutch/NamesDut.gf
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
concrete NamesDut of Names = CatDut ** open Prelude, ResDut in {
|
||||||
|
|
||||||
|
lin GivenName, MaleSurname, FemaleSurname = \n -> noMerge ** {s = n.s ; a = agrP3 Sg ; isPron = False} ;
|
||||||
|
lin FullName gn sn =
|
||||||
|
noMerge ** {s = \\c => gn.s ! NPNom ++ sn.s ! c ; a = agrP3 Sg ; isPron = False} ;
|
||||||
|
|
||||||
|
lin UseLN pn = noMerge ** {s = pn.s ; a = agrP3 Sg ; isPron = False} ;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -85,6 +85,8 @@ concrete NounDut of Noun = CatDut ** open ResDut, Prelude in {
|
|||||||
NumDigits numeral = {s = \\g,c => numeral.s ! NCard g c; n = numeral.n } ;
|
NumDigits numeral = {s = \\g,c => numeral.s ! NCard g c; n = numeral.n } ;
|
||||||
OrdDigits numeral = {s = \\af => numeral.s ! NOrd af} ;
|
OrdDigits numeral = {s = \\af => numeral.s ! NOrd af} ;
|
||||||
|
|
||||||
|
NumFloat n1 n2 = {s = \\g,c => n1.s ! NCard Utr Nom ++ BIND ++ "." ++ BIND ++ n2.s ! NCard g c; n = Pl } ;
|
||||||
|
|
||||||
NumNumeral numeral = {s = \\g,c => numeral.s ! NCard g c; n = numeral.n } ;
|
NumNumeral numeral = {s = \\g,c => numeral.s ! NCard g c; n = numeral.n } ;
|
||||||
OrdNumeral numeral = {s = let tiende : AForm => Str = \\af => numeral.s ! NOrd af
|
OrdNumeral numeral = {s = let tiende : AForm => Str = \\af => numeral.s ! NOrd af
|
||||||
in table {APred => tiende ! AAttr Utr ;
|
in table {APred => tiende ! AAttr Utr ;
|
||||||
@@ -199,4 +201,16 @@ concrete NounDut of Noun = CatDut ** open ResDut, Prelude in {
|
|||||||
|
|
||||||
DetDAP det = det ;
|
DetDAP det = det ;
|
||||||
|
|
||||||
|
QuantityNP n m = noMerge ** {
|
||||||
|
s = \\c => preOrPost m.isPre m.s (n.s ! NCard Utr Nom) ;
|
||||||
|
a = agrP3 n.n ;
|
||||||
|
isPron = False
|
||||||
|
} ;
|
||||||
|
|
||||||
|
QuantityFloatNP n1 n2 m = noMerge ** {
|
||||||
|
s = \\role => preOrPost m.isPre m.s (n1.s ! NCard Utr Nom ++ BIND ++ "." ++ BIND ++ n2.s ! NCard Utr Nom) ;
|
||||||
|
a = agrP3 Pl ;
|
||||||
|
isPron = False
|
||||||
|
} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -439,4 +439,6 @@ oper
|
|||||||
--
|
--
|
||||||
--}
|
--}
|
||||||
|
|
||||||
|
mkMU : Str -> MU = \s -> lin MU {s=s; isPre=False} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -107,6 +107,11 @@ concrete CatEng of Cat = CommonX - [Pol,CAdv] ** open ResEng, Prelude in {
|
|||||||
N2 = {s : Number => Case => Str ; g : Gender} ** {c2 : Str} ;
|
N2 = {s : Number => Case => Str ; g : Gender} ** {c2 : Str} ;
|
||||||
N3 = {s : Number => Case => Str ; g : Gender} ** {c2,c3 : Str} ;
|
N3 = {s : Number => Case => Str ; g : Gender} ** {c2,c3 : Str} ;
|
||||||
GN, SN, PN = {s : Case => Str ; g : Gender} ;
|
GN, SN, PN = {s : Case => Str ; g : Gender} ;
|
||||||
|
LN = {s : Case => Str;
|
||||||
|
p : Str; -- preposition "in Scandinavia", "on the Balkans"
|
||||||
|
art : Bool; -- plain name "United States" vs "the United States"
|
||||||
|
n : Number;
|
||||||
|
} ;
|
||||||
|
|
||||||
lindef
|
lindef
|
||||||
SSlash = \s -> {s = s; c2 = ""} ;
|
SSlash = \s -> {s = s; c2 = ""} ;
|
||||||
|
|||||||
@@ -38,6 +38,23 @@ lin
|
|||||||
)
|
)
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
InflectionLN = \n -> {
|
||||||
|
t = "ln" ;
|
||||||
|
s1 = heading1 ("Location Name" ++
|
||||||
|
case n.n of {
|
||||||
|
Sg => "";
|
||||||
|
Pl => "(plural)"
|
||||||
|
}) ;
|
||||||
|
s2 = frameTable (
|
||||||
|
tr (th "nom" ++ th "gen") ++
|
||||||
|
tr (td (n.s ! Nom) ++ td (n.s ! Gen))
|
||||||
|
) ++
|
||||||
|
heading1 ("Adverb") ++
|
||||||
|
paragraph (n.p ++ case n.art of {
|
||||||
|
True => "the" ++ n.s ! Nom ;
|
||||||
|
False => n.s ! Nom}) ;
|
||||||
|
} ;
|
||||||
|
|
||||||
InflectionGN = \pn -> {
|
InflectionGN = \pn -> {
|
||||||
t = "gn" ;
|
t = "gn" ;
|
||||||
s1 = heading1 ("Given Name" ++
|
s1 = heading1 ("Given Name" ++
|
||||||
|
|||||||
@@ -474,13 +474,6 @@ lin CardCNCard card cn =
|
|||||||
lin theyFem_Pron = mkPron "they" "them" "their" "theirs" plural P3 feminine ;
|
lin theyFem_Pron = mkPron "they" "them" "their" "theirs" plural P3 feminine ;
|
||||||
lin theyNeutr_Pron = mkPron "they" "them" "their" "theirs" plural P3 nonhuman ;
|
lin theyNeutr_Pron = mkPron "they" "them" "their" "theirs" plural P3 nonhuman ;
|
||||||
|
|
||||||
lin GivenName gn = gn ;
|
|
||||||
lin MaleSurname, FemaleSurname = \sn -> sn ;
|
|
||||||
lin FullName gn sn = {
|
|
||||||
s = \\c => gn.s ! Nom ++ sn.s ! c ;
|
|
||||||
g = gn.g
|
|
||||||
} ;
|
|
||||||
|
|
||||||
lin AnaphPron np =
|
lin AnaphPron np =
|
||||||
case np.a of {
|
case np.a of {
|
||||||
AgP1 Sg => i_Pron ;
|
AgP1 Sg => i_Pron ;
|
||||||
|
|||||||
@@ -14,7 +14,8 @@ concrete GrammarEng of Grammar =
|
|||||||
TextX - [Pol,PPos,PNeg,SC,CAdv],
|
TextX - [Pol,PPos,PNeg,SC,CAdv],
|
||||||
StructuralEng,
|
StructuralEng,
|
||||||
IdiomEng,
|
IdiomEng,
|
||||||
TenseX - [Pol,PPos,PNeg,SC,CAdv]
|
TenseX - [Pol,PPos,PNeg,SC,CAdv],
|
||||||
|
NamesEng
|
||||||
** open ResEng, Prelude in {
|
** open ResEng, Prelude in {
|
||||||
|
|
||||||
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
||||||
|
|||||||
31
src/english/NamesEng.gf
Normal file
31
src/english/NamesEng.gf
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
concrete NamesEng of Names = CatEng ** open Prelude, ResEng in {
|
||||||
|
|
||||||
|
lin GivenName gn = {s = \\c => gn.s ! npcase2case c ; a = agrgP3 Sg gn.g} ;
|
||||||
|
lin MaleSurname, FemaleSurname = \sn -> {s = \\c => sn.s ! npcase2case c ; a = agrgP3 Sg sn.g} ;
|
||||||
|
lin FullName gn sn = {s = \\c => gn.s ! Nom ++ sn.s ! npcase2case c ; a = agrgP3 Sg gn.g} ;
|
||||||
|
|
||||||
|
lin UseLN n = {
|
||||||
|
s = \\c => case n.art of {
|
||||||
|
True => "the" ++ n.s ! npcase2case c ;
|
||||||
|
False => n.s ! npcase2case c
|
||||||
|
} ;
|
||||||
|
a = agrP3 n.n
|
||||||
|
} ;
|
||||||
|
|
||||||
|
lin PlainLN n = {
|
||||||
|
s = \\c => n.s ! npcase2case c ;
|
||||||
|
a = agrP3 n.n
|
||||||
|
} ;
|
||||||
|
|
||||||
|
lin InLN n = {
|
||||||
|
s = n.p ++ case n.art of {
|
||||||
|
True => "the" ++ n.s ! Nom ;
|
||||||
|
False => n.s ! Nom
|
||||||
|
} ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
lin AdjLN ap n = n ** {
|
||||||
|
s = \\c => preOrPost ap.isPre (ap.s ! agrP3 n.n) (n.s ! c) ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -77,6 +77,8 @@ concrete NounEng of Noun = CatEng ** open MorphoEng, ResEng, Prelude in {
|
|||||||
NumDigits n = {s,sp = \\_ => n.s ! NCard ; n = n.n} ;
|
NumDigits n = {s,sp = \\_ => n.s ! NCard ; n = n.n} ;
|
||||||
OrdDigits n = {s = n.s ! NOrd} ;
|
OrdDigits n = {s = n.s ! NOrd} ;
|
||||||
|
|
||||||
|
NumFloat n1 n2 = {s,sp = \\_,c => n1.s ! NCard ! Nom ++ BIND ++ "." ++ BIND ++ n2.s ! NCard ! c ; n = Pl} ;
|
||||||
|
|
||||||
NumNumeral numeral = {s,sp = \\d => numeral.s ! d ! NCard; n = numeral.n} ;
|
NumNumeral numeral = {s,sp = \\d => numeral.s ! d ! NCard; n = numeral.n} ;
|
||||||
OrdNumeral numeral = {s = numeral.s ! True ! NOrd} ;
|
OrdNumeral numeral = {s = numeral.s ! True ! NOrd} ;
|
||||||
|
|
||||||
@@ -174,4 +176,14 @@ concrete NounEng of Noun = CatEng ** open MorphoEng, ResEng, Prelude in {
|
|||||||
|
|
||||||
DetDAP d = d ;
|
DetDAP d = d ;
|
||||||
|
|
||||||
|
QuantityNP n m = {
|
||||||
|
s = \\c => preOrPost m.isPre m.s (n.s ! NCard ! Nom) ;
|
||||||
|
a = agrgP3 n.n Neutr
|
||||||
|
} ;
|
||||||
|
|
||||||
|
QuantityFloatNP n1 n2 m = {
|
||||||
|
s = \\c => preOrPost m.isPre m.s (n1.s ! NCard ! Nom ++ BIND ++ "." ++ BIND ++ n2.s ! NCard ! Nom) ;
|
||||||
|
a = agrgP3 Pl Neutr
|
||||||
|
} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -129,6 +129,24 @@ oper
|
|||||||
--
|
--
|
||||||
-- Proper names, with a regular genitive, are formed from strings.
|
-- Proper names, with a regular genitive, are formed from strings.
|
||||||
|
|
||||||
|
oper
|
||||||
|
mkLN = overload {
|
||||||
|
mkLN : Str -> LN = \s ->
|
||||||
|
lin LN {s = table {Gen => s + "'s" ; _ => s} ;
|
||||||
|
p = "in" ;
|
||||||
|
art = False ;
|
||||||
|
n = Sg} ;
|
||||||
|
|
||||||
|
mkLN : Str -> Number -> LN = \s,n ->
|
||||||
|
lin LN {s = table {Gen => s + "'s" ; _ => s} ;
|
||||||
|
p = "in" ;
|
||||||
|
art = False ;
|
||||||
|
n = n} ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
defLN : LN -> LN = \n -> n ** {art = True} ;
|
||||||
|
prepLN : LN -> Str -> LN = \n,s -> n ** {p = s} ;
|
||||||
|
|
||||||
mkPN : overload {
|
mkPN : overload {
|
||||||
|
|
||||||
mkPN : Str -> PN ;
|
mkPN : Str -> PN ;
|
||||||
@@ -598,6 +616,8 @@ mkVoc s = lin Voc (ss s) ;
|
|||||||
us_britishV : Str -> V = \s -> case s of {
|
us_britishV : Str -> V = \s -> case s of {
|
||||||
_ + ("el" | "al" | "ol") => regV s | mkV s (s + "s") (s + "led") (s + "led") (s + "ling") ;
|
_ + ("el" | "al" | "ol") => regV s | mkV s (s + "s") (s + "led") (s + "led") (s + "ling") ;
|
||||||
_ + "or" => regV s | regV (Predef.tk 2 s + "our") ;
|
_ + "or" => regV s | regV (Predef.tk 2 s + "our") ;
|
||||||
|
_ + "ise" => regV (Predef.tk 2 s + "ze") | regV s ;
|
||||||
|
_ + "ize" => regV s | regV (Predef.tk 2 s + "se") ;
|
||||||
_ => regV s
|
_ => regV s
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -777,6 +797,8 @@ mkVoc s = lin Voc (ss s) ;
|
|||||||
mk2Conj : Str -> Str -> Number -> Conj = \x,y,n ->
|
mk2Conj : Str -> Str -> Number -> Conj = \x,y,n ->
|
||||||
lin Conj (sd2 x y ** {n = n}) ;
|
lin Conj (sd2 x y ** {n = n}) ;
|
||||||
|
|
||||||
|
mkMU : Str -> MU = \s -> lin MU {s=s; isPre=False} ;
|
||||||
|
|
||||||
---- obsolete
|
---- obsolete
|
||||||
|
|
||||||
-- Comparison adjectives may two more forms.
|
-- Comparison adjectives may two more forms.
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ concrete CatEst of Cat = CommonX ** open HjkEst, ResEst, Prelude in {
|
|||||||
c2,c3 : Compl ;
|
c2,c3 : Compl ;
|
||||||
isPre,isPre2 : Bool
|
isPre,isPre2 : Bool
|
||||||
} ;
|
} ;
|
||||||
GN, SN, PN = {s : Case => Str} ;
|
GN, SN, LN, PN = {s : Case => Str} ;
|
||||||
|
|
||||||
linref
|
linref
|
||||||
VP = \vp -> linV vp.v ;
|
VP = \vp -> linV vp.v ;
|
||||||
|
|||||||
@@ -436,10 +436,4 @@ concrete ExtendEst of Extend =
|
|||||||
-- : VP -> Adv ; -- ilma raamatut nägemata
|
-- : VP -> Adv ; -- ilma raamatut nägemata
|
||||||
WithoutVP vp = {s = "ilma" ++ infVPdefault vp InfMata} ;
|
WithoutVP vp = {s = "ilma" ++ infVPdefault vp InfMata} ;
|
||||||
|
|
||||||
|
|
||||||
lin GivenName, MaleSurname, FemaleSurname = \n -> n ;
|
|
||||||
lin FullName gn sn = {
|
|
||||||
s = \\c => gn.s ! Nom ++ sn.s ! c
|
|
||||||
} ;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,8 @@ concrete GrammarEst of Grammar =
|
|||||||
TextX,
|
TextX,
|
||||||
IdiomEst,
|
IdiomEst,
|
||||||
StructuralEst,
|
StructuralEst,
|
||||||
TenseX
|
TenseX,
|
||||||
|
NamesEst
|
||||||
** {
|
** {
|
||||||
|
|
||||||
flags startcat = Phr ; unlexer = finnish ; lexer = text ;
|
flags startcat = Phr ; unlexer = finnish ; lexer = text ;
|
||||||
|
|||||||
20
src/estonian/NamesEst.gf
Normal file
20
src/estonian/NamesEst.gf
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
concrete NamesEst of Names = CatEst ** open ResEst, Prelude in {
|
||||||
|
|
||||||
|
lin GivenName, MaleSurname, FemaleSurname = \n -> emptyNP ** {
|
||||||
|
s = \\c => n.s ! npform2case Sg c ;
|
||||||
|
a = agrP3 Sg ;
|
||||||
|
isPron = False
|
||||||
|
} ;
|
||||||
|
lin FullName gn sn = emptyNP ** {
|
||||||
|
s = \\c => gn.s ! Nom ++ sn.s ! npform2case Sg c ;
|
||||||
|
a = agrP3 Sg ;
|
||||||
|
isPron = False
|
||||||
|
} ;
|
||||||
|
|
||||||
|
lin UseLN pn = emptyNP ** {
|
||||||
|
s = \\c => pn.s ! npform2case Sg c ;
|
||||||
|
a = agrP3 Sg ;
|
||||||
|
isPron = False
|
||||||
|
} ;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -120,6 +120,11 @@ concrete NounEst of Noun = CatEst ** open ResEst, HjkEst, MorphoEst, Prelude in
|
|||||||
} ;
|
} ;
|
||||||
OrdDigits numeral = {s = \\nc => numeral.s ! NOrd nc} ;
|
OrdDigits numeral = {s = \\nc => numeral.s ! NOrd nc} ;
|
||||||
|
|
||||||
|
NumFloat n1 n2 = {
|
||||||
|
s = \\n,c => n1.s ! NCard (NCase Sg Nom) ++ BIND ++ "." ++ BIND ++ n2.s ! NCard (NCase n c) ;
|
||||||
|
n = Pl
|
||||||
|
} ;
|
||||||
|
|
||||||
NumNumeral numeral = {
|
NumNumeral numeral = {
|
||||||
s = \\n,c => numeral.s ! NCard (NCase n c) ;
|
s = \\n,c => numeral.s ! NCard (NCase n c) ;
|
||||||
n = numeral.n
|
n = numeral.n
|
||||||
@@ -214,6 +219,18 @@ concrete NounEst of Noun = CatEst ** open ResEst, HjkEst, MorphoEst, Prelude in
|
|||||||
|
|
||||||
ApposCN cn np = cn ** {postmod = cn.postmod ++ linNP (NPCase Nom) np} ; --- luvun x
|
ApposCN cn np = cn ** {postmod = cn.postmod ++ linNP (NPCase Nom) np} ; --- luvun x
|
||||||
|
|
||||||
|
QuantityNP n m = emptyNP ** {
|
||||||
|
s = \\c => preOrPost m.isPre m.s (n.s ! NCard (NCase Sg Nom)) ;
|
||||||
|
a = agrP3 n.n ;
|
||||||
|
isPron = False
|
||||||
|
} ;
|
||||||
|
|
||||||
|
QuantityFloatNP n1 n2 m = emptyNP ** {
|
||||||
|
s = \\role => preOrPost m.isPre m.s (n1.s ! NCard (NCase Sg Nom) ++ BIND ++ "." ++ BIND ++ n2.s ! NCard (NCase Sg Nom)) ;
|
||||||
|
a = agrP3 Pl ;
|
||||||
|
isPron = False
|
||||||
|
} ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
numN : NForm -> Number = \nf -> case nf of {
|
numN : NForm -> Number = \nf -> case nf of {
|
||||||
NCase n _ => n
|
NCase n _ => n
|
||||||
|
|||||||
@@ -922,4 +922,6 @@ oper
|
|||||||
mkAV a = a ;
|
mkAV a = a ;
|
||||||
mkA2V a p = mkA2 a p ;
|
mkA2V a p = mkA2 a p ;
|
||||||
|
|
||||||
|
mkMU : Str -> MU = \s -> lin MU {s=s; isPre=False} ;
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ concrete CatFin of Cat = CommonX ** open ResFin, StemFin, Prelude in {
|
|||||||
N = SNoun ;
|
N = SNoun ;
|
||||||
N2 = SNoun ** {c2 : Compl ; isPre : Bool ; postmod : Number => Str} ;
|
N2 = SNoun ** {c2 : Compl ; isPre : Bool ; postmod : Number => Str} ;
|
||||||
N3 = SNoun ** {c2,c3 : Compl ; isPre,isPre2 : Bool} ;
|
N3 = SNoun ** {c2,c3 : Compl ; isPre,isPre2 : Bool} ;
|
||||||
GN, SN, PN = SPN ;
|
GN, SN, LN, PN = SPN ;
|
||||||
|
|
||||||
linref
|
linref
|
||||||
SSlash = \ss -> ss.s ++ ss.c2.s.p1 ;
|
SSlash = \ss -> ss.s ++ ss.c2.s.p1 ;
|
||||||
|
|||||||
@@ -37,6 +37,12 @@ lin
|
|||||||
s2 = inflPN (\c -> pn.s ! c)
|
s2 = inflPN (\c -> pn.s ! c)
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
InflectionLN = \pn -> {
|
||||||
|
t = "s" ;
|
||||||
|
s1 = heading1 (heading noun_Category) ;
|
||||||
|
s2 = inflPN (\c -> pn.s ! c)
|
||||||
|
} ;
|
||||||
|
|
||||||
InflectionGN = \pn -> {
|
InflectionGN = \pn -> {
|
||||||
t = "s" ;
|
t = "s" ;
|
||||||
s1 = heading1 "Etunimi" ;
|
s1 = heading1 "Etunimi" ;
|
||||||
|
|||||||
@@ -241,10 +241,4 @@ lin UttAccNP np = {s = P.addNegation np.isNeg ++ np.s ! NPAcc} ;
|
|||||||
lin AdjAsCN ap = {s = ap.s ! True ; postmod = \\_ => ap.p ; h = Back} ; ---- Harmony just a guess
|
lin AdjAsCN ap = {s = ap.s ! True ; postmod = \\_ => ap.p ; h = Back} ; ---- Harmony just a guess
|
||||||
lin AdjAsNP ap = MassNP (AdjAsCN ap) ;
|
lin AdjAsNP ap = MassNP (AdjAsCN ap) ;
|
||||||
|
|
||||||
lin GivenName, MaleSurname, FemaleSurname = \n -> n ;
|
|
||||||
lin FullName gn sn = {
|
|
||||||
s = \\c => gn.s ! Nom ++ sn.s ! c
|
|
||||||
} ;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,8 @@ concrete GrammarFin of Grammar =
|
|||||||
TextX,
|
TextX,
|
||||||
IdiomFin,
|
IdiomFin,
|
||||||
StructuralFin,
|
StructuralFin,
|
||||||
TenseX
|
TenseX,
|
||||||
|
NamesFin
|
||||||
** {
|
** {
|
||||||
|
|
||||||
flags startcat = Phr ; unlexer = finnish ; lexer = text ;
|
flags startcat = Phr ; unlexer = finnish ; lexer = text ;
|
||||||
|
|||||||
20
src/finnish/NamesFin.gf
Normal file
20
src/finnish/NamesFin.gf
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
concrete NamesFin of Names = CatFin ** open ResFin, StemFin, Prelude in {
|
||||||
|
|
||||||
|
lin GivenName, MaleSurname, FemaleSurname = \n -> {
|
||||||
|
s = snoun2np Sg n ;
|
||||||
|
a = agrP3 Sg ;
|
||||||
|
isPron = False ; isNeg = False
|
||||||
|
} ;
|
||||||
|
lin FullName gn sn = {
|
||||||
|
s = snoun2np Sg {s = \\c => gn.s ! Nom ++ sn.s ! c} ;
|
||||||
|
a = agrP3 Sg ;
|
||||||
|
isPron = False ; isNeg = False
|
||||||
|
} ;
|
||||||
|
|
||||||
|
lin UseLN pn = {
|
||||||
|
s = snoun2np Sg pn ;
|
||||||
|
a = agrP3 Sg ;
|
||||||
|
isPron = False ; isNeg = False
|
||||||
|
} ;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -143,6 +143,11 @@ concrete NounFin of Noun = CatFin ** open ResFin, MorphoFin, StemFin, Prelude in
|
|||||||
} ;
|
} ;
|
||||||
OrdDigits numeral = {s = \\f => numeral.s ! NOrd f} ;
|
OrdDigits numeral = {s = \\f => numeral.s ! NOrd f} ;
|
||||||
|
|
||||||
|
NumFloat n1 n2 = {
|
||||||
|
s = \\n,c => n1.s ! NCard (NCase Sg Nom) ++ BIND ++ "." ++ BIND ++ n2.s ! NCard (NCase n c) ;
|
||||||
|
n = Pl
|
||||||
|
} ;
|
||||||
|
|
||||||
NumNumeral numeral = {
|
NumNumeral numeral = {
|
||||||
s = \\n,c => numeral.s ! NCard (NCase n c) ;
|
s = \\n,c => numeral.s ! NCard (NCase n c) ;
|
||||||
n = numeral.n
|
n = numeral.n
|
||||||
@@ -291,6 +296,20 @@ concrete NounFin of Noun = CatFin ** open ResFin, MorphoFin, StemFin, Prelude in
|
|||||||
|
|
||||||
DetDAP d = d ;
|
DetDAP d = d ;
|
||||||
|
|
||||||
|
QuantityNP n m = {
|
||||||
|
s = \\c => preOrPost m.isPre m.s (n.s ! NCard (NCase Sg Nom)) ;
|
||||||
|
a = agrP3 n.n ;
|
||||||
|
isPron = False ;
|
||||||
|
isNeg = False
|
||||||
|
} ;
|
||||||
|
|
||||||
|
QuantityFloatNP n1 n2 m = {
|
||||||
|
s = \\role => preOrPost m.isPre m.s (n1.s ! NCard (NCase Sg Nom) ++ BIND ++ "." ++ BIND ++ n2.s ! NCard (NCase Sg Nom)) ;
|
||||||
|
a = agrP3 Pl ;
|
||||||
|
isPron = False ;
|
||||||
|
isNeg = False
|
||||||
|
} ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
numN : NForm -> Number = \nf -> case nf of {
|
numN : NForm -> Number = \nf -> case nf of {
|
||||||
NCase n _ => n ;
|
NCase n _ => n ;
|
||||||
|
|||||||
@@ -1050,4 +1050,6 @@ mkVS = overload {
|
|||||||
mkAV v = v ** {lock_A = <>} ;
|
mkAV v = v ** {lock_A = <>} ;
|
||||||
--- mkA2V v p = mkA2 <v : A> p ** {lock_A2 = <>} ;
|
--- mkA2V v p = mkA2 <v : A> p ** {lock_A2 = <>} ;
|
||||||
|
|
||||||
|
mkMU : Str -> MU = \s -> lin MU {s=s; isPre=False} ;
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -338,4 +338,7 @@ instance DiffFre of DiffRomance - [
|
|||||||
|
|
||||||
verbHyphen : Verb -> Str = \v -> v.s ! (VInfin True) ; --- kluge: use this field to store - or -t-
|
verbHyphen : Verb -> Str = \v -> v.s ! (VInfin True) ; --- kluge: use this field to store - or -t-
|
||||||
|
|
||||||
|
param
|
||||||
|
HasArt = NoArt | UseArt | AlwaysArt ;
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -59,10 +59,4 @@ lin ApposNP np1 np2 = np1 ** { -- guessed by KA
|
|||||||
} ;
|
} ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
lin GivenName, MaleSurname, FemaleSurname = \n -> n ;
|
|
||||||
lin FullName gn sn = {
|
|
||||||
s = gn.s ++ sn.s ;
|
|
||||||
g = gn.g
|
|
||||||
} ;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,8 @@ concrete GrammarFre of Grammar =
|
|||||||
TextX - [SC,Temp,Tense,Pol,PPos,PNeg],
|
TextX - [SC,Temp,Tense,Pol,PPos,PNeg],
|
||||||
IdiomFre,
|
IdiomFre,
|
||||||
StructuralFre,
|
StructuralFre,
|
||||||
TenseFre
|
TenseFre,
|
||||||
|
NamesFre
|
||||||
** {
|
** {
|
||||||
|
|
||||||
flags startcat = Phr ;
|
flags startcat = Phr ;
|
||||||
|
|||||||
35
src/french/NamesFre.gf
Normal file
35
src/french/NamesFre.gf
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
concrete NamesFre of Names = CatFre ** open Prelude, ResFre, CommonRomance, PhonoFre in {
|
||||||
|
|
||||||
|
lin GivenName, MaleSurname, FemaleSurname = \n -> pn2np n ;
|
||||||
|
lin FullName gn sn = pn2np {
|
||||||
|
s = gn.s ++ sn.s ;
|
||||||
|
g = gn.g
|
||||||
|
} ;
|
||||||
|
|
||||||
|
lin PlainLN n = heavyNP {
|
||||||
|
s = \\c => n.s;
|
||||||
|
a = {g = n.g ; n = n.num ; p = P3}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
lin UseLN n = heavyNP {
|
||||||
|
s = \\c => case n.art of {
|
||||||
|
AlwaysArt | UseArt => artDef True n.g n.num c ++ n.s ;
|
||||||
|
_ => n.s
|
||||||
|
} ;
|
||||||
|
a = {g = n.g ; n = n.num ; p = P3}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
lin InLN n = {
|
||||||
|
s = n.p.s ++ case n.art of {
|
||||||
|
AlwaysArt => artDef True n.g n.num n.p.c ++ n.s;
|
||||||
|
_ => prepCase n.p.c ++ n.s
|
||||||
|
} ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
lin AdjLN ap n = n ** {
|
||||||
|
s = preOrPost ap.isPre (ap.s ! AF n.g n.num) n.s ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -132,6 +132,27 @@ oper
|
|||||||
-- Proper names need a string and a gender. If no gender is given, the
|
-- Proper names need a string and a gender. If no gender is given, the
|
||||||
-- feminine is used for strings ending with "e", the masculine for other strings.
|
-- feminine is used for strings ending with "e", the masculine for other strings.
|
||||||
|
|
||||||
|
mkLN = overload {
|
||||||
|
mkLN : Str -> Gender -> LN = \s,g ->
|
||||||
|
lin LN {s = s ;
|
||||||
|
p = {s=""; c=CPrep P_a; isDir=True} ;
|
||||||
|
art = NoArt ;
|
||||||
|
g = g ;
|
||||||
|
num = Sg} ;
|
||||||
|
|
||||||
|
mkLN : Str -> Gender -> Number -> LN = \s,g,num ->
|
||||||
|
lin LN {s = s ;
|
||||||
|
p = {s=""; c=CPrep P_a; isDir=True} ;
|
||||||
|
art = NoArt ;
|
||||||
|
g = g ;
|
||||||
|
num = num} ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
defLN : LN -> LN = \n -> n ** {art = AlwaysArt} ;
|
||||||
|
useDefLN : LN -> LN = \n -> n ** {art = UseArt} ;
|
||||||
|
prepLN : LN -> Prep -> LN = \n,p -> n ** {p = p} ;
|
||||||
|
|
||||||
mkPN : overload {
|
mkPN : overload {
|
||||||
mkPN : Str -> PN ; -- feminine if ends with "e", otherwise masculine
|
mkPN : Str -> PN ; -- feminine if ends with "e", otherwise masculine
|
||||||
mkPN : Str -> Gender -> PN ; -- gender deviant from the simple rule
|
mkPN : Str -> Gender -> PN ; -- gender deviant from the simple rule
|
||||||
@@ -553,5 +574,6 @@ oper
|
|||||||
_ => VFalse -- prend-il
|
_ => VFalse -- prend-il
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
mkMU : Str -> MU = \s -> lin MU {s=s; isPre=False} ;
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ concrete CatGer of Cat =
|
|||||||
N3 = ResGer.Noun ** {c2,c3 : Preposition} ;
|
N3 = ResGer.Noun ** {c2,c3 : Preposition} ;
|
||||||
GN = {s : Case => Str; g : Sex} ;
|
GN = {s : Case => Str; g : Sex} ;
|
||||||
SN = {s : Sex => Case => Str} ;
|
SN = {s : Sex => Case => Str} ;
|
||||||
PN = {s : Case => Str; g : Gender; n : Number} ;
|
LN, PN = {s : Case => Str; g : Gender; n : Number} ;
|
||||||
|
|
||||||
-- tense with possibility to choose conjunctive forms
|
-- tense with possibility to choose conjunctive forms
|
||||||
|
|
||||||
|
|||||||
@@ -142,16 +142,6 @@ lin
|
|||||||
n = Pl
|
n = Pl
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
lin GivenName = \n -> { s = n.s; g = sex2gender n.g; n = Sg } ;
|
|
||||||
lin MaleSurname = \n -> { s = n.s ! Male ; g = Masc; n = Sg } ;
|
|
||||||
lin FemaleSurname = \n -> { s = n.s ! Female ; g = Fem; n = Sg } ;
|
|
||||||
lin PlSurname = \n -> { s = n.s ! Male ; g = Masc; n = Pl } ;
|
|
||||||
lin FullName gn sn = {
|
|
||||||
s = \\c => gn.s ! Nom ++ sn.s ! gn.g ! c ;
|
|
||||||
g = sex2gender gn.g ;
|
|
||||||
n = Sg
|
|
||||||
} ;
|
|
||||||
|
|
||||||
lin PassVPSlash vp =
|
lin PassVPSlash vp =
|
||||||
insertObj (\\_ => (PastPartAP vp).s ! APred) (predV werdenPass) **
|
insertObj (\\_ => (PastPartAP vp).s ! APred) (predV werdenPass) **
|
||||||
{ c1 = subjPrep vp.c2 } ;
|
{ c1 = subjPrep vp.c2 } ;
|
||||||
|
|||||||
@@ -14,7 +14,8 @@ concrete GrammarGer of Grammar =
|
|||||||
TextX - [Tense,Temp],
|
TextX - [Tense,Temp],
|
||||||
IdiomGer,
|
IdiomGer,
|
||||||
StructuralGer,
|
StructuralGer,
|
||||||
TenseGer
|
TenseGer,
|
||||||
|
NamesGer
|
||||||
** {
|
** {
|
||||||
|
|
||||||
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
||||||
|
|||||||
45
src/german/NamesGer.gf
Normal file
45
src/german/NamesGer.gf
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
concrete NamesGer of Names = CatGer ** open ResGer in {
|
||||||
|
|
||||||
|
lin GivenName gn = {
|
||||||
|
s = \\c => usePrepC c (\k -> gn.s ! k) ;
|
||||||
|
a = agrgP3 (sex2gender gn.g) Sg ;
|
||||||
|
w = WLight ;
|
||||||
|
rc, ext = []
|
||||||
|
} ;
|
||||||
|
|
||||||
|
lin MaleSurname sn = {
|
||||||
|
s = \\c => usePrepC c (\k -> sn.s ! Male ! k) ;
|
||||||
|
a = agrgP3 Masc Sg ;
|
||||||
|
w = WLight ;
|
||||||
|
rc, ext = []
|
||||||
|
} ;
|
||||||
|
|
||||||
|
lin FemaleSurname sn = {
|
||||||
|
s = \\c => usePrepC c (\k -> sn.s ! Female ! k) ;
|
||||||
|
a = agrgP3 Fem Sg ;
|
||||||
|
w = WLight ;
|
||||||
|
rc, ext = []
|
||||||
|
} ;
|
||||||
|
|
||||||
|
lin PlSurname sn = {
|
||||||
|
s = \\c => usePrepC c (\k -> sn.s ! Male ! k) ;
|
||||||
|
a = agrgP3 Masc Pl ;
|
||||||
|
w = WLight ;
|
||||||
|
rc, ext = []
|
||||||
|
} ;
|
||||||
|
|
||||||
|
lin FullName gn sn = {
|
||||||
|
s = \\c => usePrepC c (\k -> gn.s ! Nom ++ sn.s ! gn.g ! k) ;
|
||||||
|
a = agrgP3 (sex2gender gn.g) Sg ;
|
||||||
|
w = WLight ;
|
||||||
|
rc, ext = []
|
||||||
|
} ;
|
||||||
|
|
||||||
|
lin UseLN pn = {
|
||||||
|
s = \\c => usePrepC c (\k -> pn.s ! k) ;
|
||||||
|
a = agrgP3 pn.g pn.n ;
|
||||||
|
w = WLight ;
|
||||||
|
rc, ext = []
|
||||||
|
} ;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -122,6 +122,8 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
NumDigits numeral = {s = \\g,c => numeral.s ! NCard g c; n = numeral.n } ;
|
NumDigits numeral = {s = \\g,c => numeral.s ! NCard g c; n = numeral.n } ;
|
||||||
OrdDigits numeral = {s = \\af => numeral.s ! NOrd af} ;
|
OrdDigits numeral = {s = \\af => numeral.s ! NOrd af} ;
|
||||||
|
|
||||||
|
NumFloat dig1 dig2 = {s = \\g,c => dig1.s ! invNum ++ BIND ++ "." ++ BIND ++ dig2.s ! NCard g c ; n = Pl } ;
|
||||||
|
|
||||||
NumNumeral numeral = {s = \\g,c => numeral.s ! NCard g c; n = numeral.n } ;
|
NumNumeral numeral = {s = \\g,c => numeral.s ! NCard g c; n = numeral.n } ;
|
||||||
OrdNumeral numeral = {s = \\af => numeral.s ! NOrd af} ;
|
OrdNumeral numeral = {s = \\af => numeral.s ! NOrd af} ;
|
||||||
|
|
||||||
@@ -238,4 +240,20 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
|
|
||||||
DetDAP det = det ;
|
DetDAP det = det ;
|
||||||
|
|
||||||
|
QuantityNP dig m = {
|
||||||
|
s = \\c => preOrPost m.isPre m.s (dig.s ! invNum) ;
|
||||||
|
a = agrP3 Pl ;
|
||||||
|
w = WLight ;
|
||||||
|
rc = "" ;
|
||||||
|
ext = "" ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
QuantityFloatNP dig1 dig2 m = {
|
||||||
|
s = \\c => preOrPost m.isPre m.s (dig1.s ! invNum ++ BIND ++ "." ++ BIND ++ dig2.s ! invNum) ;
|
||||||
|
a = agrP3 Pl ;
|
||||||
|
w = WLight ;
|
||||||
|
rc = "" ;
|
||||||
|
ext = "" ;
|
||||||
|
} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -771,4 +771,6 @@ mkV2 : overload {
|
|||||||
mkV2 : V -> Case -> V2 = \v,c -> prepV2 v (lin Prep {s,s2 = [] ; c = c ; isPrep = False}) ;
|
mkV2 : V -> Case -> V2 = \v,c -> prepV2 v (lin Prep {s,s2 = [] ; c = c ; isPrep = False}) ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
mkMU : Str -> MU = \s -> lin MU {s=s; isPre=False} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -251,4 +251,7 @@ instance DiffIta of DiffRomance - [contractInf] = open CommonRomance, PhonoIta,
|
|||||||
|
|
||||||
polNegDirSubj = RPos ;
|
polNegDirSubj = RPos ;
|
||||||
|
|
||||||
|
param
|
||||||
|
HasArt = NoArt | UseArt ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,12 +16,6 @@ concrete ExtendIta of Extend = CatIta ** ExtendRomanceFunctor -
|
|||||||
ParadigmsIta in {
|
ParadigmsIta in {
|
||||||
-- put your own definitions here
|
-- put your own definitions here
|
||||||
|
|
||||||
lin GivenName, MaleSurname, FemaleSurname, PlSurname = \n -> n ;
|
|
||||||
lin FullName gn sn = {
|
|
||||||
s = gn.s ++ sn.s ;
|
|
||||||
g = gn.g
|
|
||||||
} ;
|
|
||||||
|
|
||||||
|
|
||||||
lin PassVPSlash vps = passVPSlash vps [] ;
|
lin PassVPSlash vps = passVPSlash vps [] ;
|
||||||
PassAgentVPSlash vps np = passVPSlash
|
PassAgentVPSlash vps np = passVPSlash
|
||||||
|
|||||||
@@ -14,7 +14,8 @@ concrete GrammarIta of Grammar =
|
|||||||
TextX - [SC,Temp,Tense,Pol,PPos,PNeg,TPres,TPast,TFut,TCond],
|
TextX - [SC,Temp,Tense,Pol,PPos,PNeg,TPres,TPast,TFut,TCond],
|
||||||
IdiomIta,
|
IdiomIta,
|
||||||
StructuralIta,
|
StructuralIta,
|
||||||
TenseIta
|
TenseIta,
|
||||||
|
NamesIta
|
||||||
|
|
||||||
** {
|
** {
|
||||||
|
|
||||||
|
|||||||
9
src/italian/NamesIta.gf
Normal file
9
src/italian/NamesIta.gf
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
concrete NamesIta of Names = CatIta ** open ResIta in {
|
||||||
|
|
||||||
|
lin GivenName, MaleSurname, FemaleSurname, PlSurname = \n -> pn2np n ;
|
||||||
|
lin FullName gn sn = pn2np {
|
||||||
|
s = gn.s ++ sn.s ;
|
||||||
|
g = gn.g
|
||||||
|
} ;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -145,6 +145,12 @@ oper
|
|||||||
mkPN : N -> PN ; -- get gender from noun
|
mkPN : N -> PN ; -- get gender from noun
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
mkLN : Str -> LN = \s ->
|
||||||
|
lin LN {s = s ;
|
||||||
|
p = {s=""; c=CPrep P_a; isDir=True} ;
|
||||||
|
art = NoArt ;
|
||||||
|
g = Masc ;
|
||||||
|
num = Sg} ;
|
||||||
|
|
||||||
|
|
||||||
--2 Adjectives
|
--2 Adjectives
|
||||||
@@ -558,4 +564,6 @@ oper
|
|||||||
mk2V2 : V -> Prep -> V2 ;
|
mk2V2 : V -> Prep -> V2 ;
|
||||||
dirV2 : V -> V2 ;
|
dirV2 : V -> V2 ;
|
||||||
|
|
||||||
|
mkMU : Str -> MU = \s -> lin MU {s=s; isPre=False} ;
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ concrete CatKor of Cat = CommonX ** open ResKor, Prelude in {
|
|||||||
N = ResKor.Noun ;
|
N = ResKor.Noun ;
|
||||||
N2 = ResKor.Noun2 ;
|
N2 = ResKor.Noun2 ;
|
||||||
N3 = ResKor.Noun3 ;
|
N3 = ResKor.Noun3 ;
|
||||||
GN, SN, PN = ResKor.NounPhrase ;
|
GN, SN, LN, PN = ResKor.NounPhrase ;
|
||||||
|
|
||||||
linref
|
linref
|
||||||
V, V2, V3 = linVerb ;
|
V, V2, V3 = linVerb ;
|
||||||
|
|||||||
@@ -9,10 +9,4 @@ concrete ExtendKor of Extend = CatKor
|
|||||||
-- : NP -> NP -> NP
|
-- : NP -> NP -> NP
|
||||||
ApposNP np1 np2 = np1 ** {s = \\nf => np1.s ! nf ++ np2.s ! nf} ;
|
ApposNP np1 np2 = np1 ** {s = \\nf => np1.s ! nf ++ np2.s ! nf} ;
|
||||||
|
|
||||||
lin GivenName, MaleSurname, FemaleSurname = \n -> n ;
|
|
||||||
lin FullName gn sn = {
|
|
||||||
s = \\nf => gn.s ! nf ++ sn.s ! nf ;
|
|
||||||
p = gn.p
|
|
||||||
} ;
|
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -12,7 +12,8 @@ concrete GrammarKor of Grammar =
|
|||||||
TextX,
|
TextX,
|
||||||
StructuralKor,
|
StructuralKor,
|
||||||
IdiomKor,
|
IdiomKor,
|
||||||
TenseX
|
TenseX,
|
||||||
|
NamesKor
|
||||||
** {
|
** {
|
||||||
|
|
||||||
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
||||||
|
|||||||
11
src/korean/NamesKor.gf
Normal file
11
src/korean/NamesKor.gf
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
concrete NamesKor of Names = CatKor ** open ResKor in {
|
||||||
|
|
||||||
|
lin GivenName, MaleSurname, FemaleSurname = \n -> n ;
|
||||||
|
lin FullName gn sn = {
|
||||||
|
s = \\nf => gn.s ! nf ++ sn.s ! nf ;
|
||||||
|
p = gn.p
|
||||||
|
} ;
|
||||||
|
|
||||||
|
UseLN pn = pn ;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -107,6 +107,12 @@ concrete NounKor of Noun = CatKor ** open ResKor, Prelude in {
|
|||||||
numtype = IsDig
|
numtype = IsDig
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
NumFloat dig1 dig2 = baseNum ** {
|
||||||
|
s = \\_,_ => dig1.s ! NCard ++ BIND ++ "." ++ BIND ++ dig2.s ! NCard ;
|
||||||
|
n = Pl ;
|
||||||
|
numtype = IsDig
|
||||||
|
} ;
|
||||||
|
|
||||||
-- : Numeral -> Card ;
|
-- : Numeral -> Card ;
|
||||||
NumNumeral num = num ;
|
NumNumeral num = num ;
|
||||||
|
|
||||||
|
|||||||
@@ -198,4 +198,6 @@ oper
|
|||||||
} ;
|
} ;
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
mkMU : Str -> MU = \s -> lin MU {s=s; isPre=False} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,12 +21,12 @@ lin
|
|||||||
-- e.g. "married to her"
|
-- e.g. "married to her"
|
||||||
ComplA2 a np = {
|
ComplA2 a np = {
|
||||||
s = \\d,g,n,c => case np.isPron of {
|
s = \\d,g,n,c => case np.isPron of {
|
||||||
False => a.s ! (AAdj Posit d g n c) ++ a.prep.s ++ np.s ! (a.prep.c ! (fromAgr np.agr).num) ;
|
False => a.s ! (AAdj Posit d g n c) ++ a.prep.s ++ np.s ! partcase2case (a.prep.c ! (fromAgr np.agr).num) ;
|
||||||
True => a.prep.s ++ np.s ! (a.prep.c ! (fromAgr np.agr).num) ++ a.s ! (AAdj Posit d g n c)
|
True => a.prep.s ++ np.s ! partcase2case (a.prep.c ! (fromAgr np.agr).num) ++ a.s ! (AAdj Posit d g n c)
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
ReflA2 a = { s = \\d,g,n,c => a.s ! (AAdj Posit d g n c) ++ a.prep.s ++ reflPron ! (a.prep.c ! n) } ;
|
ReflA2 a = { s = \\d,g,n,c => a.s ! (AAdj Posit d g n c) ++ a.prep.s ++ reflPron ! partcase2case (a.prep.c ! n) } ;
|
||||||
|
|
||||||
AdAP ada ap = { s = \\d,g,n,c => ada.s ++ ap.s ! d ! g ! n ! c } ;
|
AdAP ada ap = { s = \\d,g,n,c => ada.s ++ ap.s ! d ! g ! n ! c } ;
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ lin
|
|||||||
-- Prep -> NP -> Adv
|
-- Prep -> NP -> Adv
|
||||||
-- e.g. "in the house"
|
-- e.g. "in the house"
|
||||||
-- FIXME: postpozīcijas prievārdi
|
-- FIXME: postpozīcijas prievārdi
|
||||||
PrepNP prep np = {s = prep.s ++ np.s ! (prep.c ! (fromAgr np.agr).num) ; isPron = np.isPron} ;
|
PrepNP prep np = {s = prep.s ++ np.s ! partcase2case (prep.c ! (fromAgr np.agr).num) ; isPron = np.isPron} ;
|
||||||
|
|
||||||
-- CAdv -> A -> NP -> Adv
|
-- CAdv -> A -> NP -> Adv
|
||||||
-- e.g. "more warmly than John"
|
-- e.g. "more warmly than John"
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ lin
|
|||||||
-- NP -> V2 -> NP
|
-- NP -> V2 -> NP
|
||||||
-- e.g. 'the man seen'
|
-- e.g. 'the man seen'
|
||||||
PPartNP np v2 = {
|
PPartNP np v2 = {
|
||||||
s = \\c => v2.s ! Pos ! (VPart Pass (fromAgr np.agr).gend (fromAgr np.agr).num c) ++ np.s ! c ;
|
s = \\c => v2.s ! Pos ! (VPart Pass (fromAgr np.agr).gend (fromAgr np.agr).num (case2partcase c)) ++ np.s ! c ;
|
||||||
agr = np.agr ;
|
agr = np.agr ;
|
||||||
pol = np.pol ;
|
pol = np.pol ;
|
||||||
isRel = np.isRel ;
|
isRel = np.isRel ;
|
||||||
@@ -180,8 +180,8 @@ lin
|
|||||||
-- N2 -> NP -> CN
|
-- N2 -> NP -> CN
|
||||||
-- e.g. 'mother of the king'
|
-- e.g. 'mother of the king'
|
||||||
ComplN2 n2 np = {
|
ComplN2 n2 np = {
|
||||||
s = \\_,num,c => preOrPost n2.isPre
|
s = \\_,num,c => preOrPost n2.isPre
|
||||||
(n2.prep.s ++ np.s ! (n2.prep.c ! (fromAgr np.agr).num) ++ closeRelCl np.isRel)
|
(n2.prep.s ++ np.s ! partcase2case (n2.prep.c ! (fromAgr np.agr).num) ++ closeRelCl np.isRel)
|
||||||
(n2.s ! num ! c) ;
|
(n2.s ! num ! c) ;
|
||||||
gend = n2.gend ;
|
gend = n2.gend ;
|
||||||
isRel = False
|
isRel = False
|
||||||
@@ -190,8 +190,8 @@ lin
|
|||||||
-- N3 -> NP -> N2
|
-- N3 -> NP -> N2
|
||||||
-- e.g. 'distance from this city (to Paris)'
|
-- e.g. 'distance from this city (to Paris)'
|
||||||
ComplN3 n3 np = {
|
ComplN3 n3 np = {
|
||||||
s = \\num,c => preOrPost n3.isPre1
|
s = \\num,c => preOrPost n3.isPre1
|
||||||
(n3.prep1.s ++ np.s ! (n3.prep1.c ! (fromAgr np.agr).num) ++ closeRelCl np.isRel)
|
(n3.prep1.s ++ np.s ! partcase2case (n3.prep1.c ! (fromAgr np.agr).num) ++ closeRelCl np.isRel)
|
||||||
(n3.s ! num ! c) ;
|
(n3.s ! num ! c) ;
|
||||||
gend = n3.gend ;
|
gend = n3.gend ;
|
||||||
prep = n3.prep2 ;
|
prep = n3.prep2 ;
|
||||||
@@ -246,7 +246,7 @@ lin
|
|||||||
|
|
||||||
-- CN -> NP -> CN
|
-- CN -> NP -> CN
|
||||||
-- e.g. 'city Paris', 'numbers x and y'
|
-- e.g. 'city Paris', 'numbers x and y'
|
||||||
ApposCN cn np =
|
ApposCN cn np =
|
||||||
let num : Number = (fromAgr np.agr).num in {
|
let num : Number = (fromAgr np.agr).num in {
|
||||||
s = \\defin,num,c => cn.s ! defin ! num ! c ++ np.s ! c ;
|
s = \\defin,num,c => cn.s ! defin ! num ! c ++ np.s ! c ;
|
||||||
gend = cn.gend ;
|
gend = cn.gend ;
|
||||||
|
|||||||
@@ -65,10 +65,10 @@ oper
|
|||||||
-- Praksē lielākoties pietiek ar palīgverba noliegumu?
|
-- Praksē lielākoties pietiek ar palīgverba noliegumu?
|
||||||
-- TODO: Jāpieliek parametrs Tense: present = ziedošs, izsalkstošs; past = ziedējis, izsalcis.
|
-- TODO: Jāpieliek parametrs Tense: present = ziedošs, izsalkstošs; past = ziedējis, izsalcis.
|
||||||
-- Vai arī jāpadod Str "-is"/"-ošs" un pa tiešo jāizsauc mkParticiple, bet
|
-- Vai arī jāpadod Str "-is"/"-ošs" un pa tiešo jāizsauc mkParticiple, bet
|
||||||
-- kā šis mkA(Str) atšķirsies no citiem mkA(Str)?
|
-- kā šis mkA(Str) atšķirsies no citiem mkA(Str)?
|
||||||
mkAdjective_Participle : Verb -> Voice -> Adjective = \v,p -> {
|
mkAdjective_Participle : Verb -> Voice -> Adjective = \v,p -> {
|
||||||
s = table {
|
s = table {
|
||||||
AAdj Posit Indef g n c => v.s ! Pos ! (VPart p g n c) ;
|
AAdj Posit Indef g n c => v.s ! Pos ! (VPart p g n (case2partcase c)) ;
|
||||||
_ => NON_EXISTENT
|
_ => NON_EXISTENT
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -101,18 +101,18 @@ oper
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkVS = overload {
|
mkVS = overload {
|
||||||
mkVS : V -> Subj -> VS = \v,c -> lin VS {s = v.s ; leftVal = Nom ; conj = c} ;
|
mkVS : V -> Subj -> VS = \v,c -> lin VS {s = v.s ; leftVal = PartNom ; conj = c} ;
|
||||||
mkVS : V -> Subj -> Case -> VS = \v,c,s -> lin VS {s = v.s ; leftVal = s ; conj = c} ;
|
mkVS : V -> Subj -> Case -> VS = \v,c,s -> lin VS {s = v.s ; leftVal = case2partcase s ; conj = c} ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkVQ = overload {
|
mkVQ = overload {
|
||||||
mkVQ : V -> VQ = \v -> lin VQ {s = v.s ; leftVal = Nom} ;
|
mkVQ : V -> VQ = \v -> lin VQ {s = v.s ; leftVal = PartNom} ;
|
||||||
mkVQ : V -> Case -> VQ = \v,c -> lin VQ {s = v.s ; leftVal = c} ;
|
mkVQ : V -> Case -> VQ = \v,c -> lin VQ {s = v.s ; leftVal = case2partcase c} ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkVV = overload {
|
mkVV = overload {
|
||||||
mkVV : V -> VV = \v -> lin VV {s = v.s ; leftVal = Nom} ;
|
mkVV : V -> VV = \v -> lin VV {s = v.s ; leftVal = PartNom} ;
|
||||||
mkVV : V -> Case -> VV = \v,c -> lin VV {s = v.s ; leftVal = c} ;
|
mkVV : V -> Case -> VV = \v,c -> lin VV {s = v.s ; leftVal = case2partcase c} ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkV3 = overload {
|
mkV3 = overload {
|
||||||
@@ -131,8 +131,8 @@ oper
|
|||||||
-- Prepositions
|
-- Prepositions
|
||||||
|
|
||||||
mkPrep = overload {
|
mkPrep = overload {
|
||||||
mkPrep : Str -> Case -> Case -> Prep = \p,sg,pl -> lin Prep {s = p ; c = table {Sg => sg ; Pl => pl}} ;
|
mkPrep : Str -> Case -> Case -> Prep = \p,sg,pl -> lin Prep {s = p ; c = table {Sg => case2partcase sg ; Pl => case2partcase pl}} ;
|
||||||
mkPrep : Case -> Prep = \c -> lin Prep {s = [] ; c = \\_ => c} ;
|
mkPrep : Case -> Prep = \c -> lin Prep {s = [] ; c = \\_ => case2partcase c} ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
nom_Prep : Prep = mkPrep Nom ;
|
nom_Prep : Prep = mkPrep Nom ;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ oper
|
|||||||
Pos => (mkVerb_Pos lemma conj).s ;
|
Pos => (mkVerb_Pos lemma conj).s ;
|
||||||
Neg => (filter_Neg (mkVerb_Pos ("ne"+lemma) conj)).s
|
Neg => (filter_Neg (mkVerb_Pos ("ne"+lemma) conj)).s
|
||||||
} ;
|
} ;
|
||||||
leftVal = leftVal
|
leftVal = case2partcase leftVal
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- First conjugation
|
-- First conjugation
|
||||||
@@ -23,7 +23,7 @@ oper
|
|||||||
Pos => (mkVerbC1_Pos lemma lemma2 lemma3).s ;
|
Pos => (mkVerbC1_Pos lemma lemma2 lemma3).s ;
|
||||||
Neg => (filter_Neg (mkVerbC1_Pos ("ne"+lemma) ("ne"+lemma2) ("ne"+lemma3))).s
|
Neg => (filter_Neg (mkVerbC1_Pos ("ne"+lemma) ("ne"+lemma2) ("ne"+lemma3))).s
|
||||||
} ;
|
} ;
|
||||||
leftVal = leftVal
|
leftVal = case2partcase leftVal
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkVerb_Pos : Str -> Conjugation -> Verb_TMP = \lemma,conj ->
|
mkVerb_Pos : Str -> Conjugation -> Verb_TMP = \lemma,conj ->
|
||||||
@@ -378,7 +378,7 @@ oper
|
|||||||
x => (mkVerb_C1 "nebūt" "neesu" "nebiju").s ! x -- the incorrect 'neesu' will be overriden
|
x => (mkVerb_C1 "nebūt" "neesu" "nebiju").s ! x -- the incorrect 'neesu' will be overriden
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
leftVal = leftVal
|
leftVal = case2partcase leftVal
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkVerb_Irreg_Go : Case -> Verb = \leftVal -> mkVerb_Irreg_Go_Prefix "" leftVal ;
|
mkVerb_Irreg_Go : Case -> Verb = \leftVal -> mkVerb_Irreg_Go_Prefix "" leftVal ;
|
||||||
@@ -397,7 +397,7 @@ oper
|
|||||||
x => (mkVerb_C1 ("ne" + pref + "iet") ("ne" + pref + "eju") ("ne" + pref + "gāju")).s ! x
|
x => (mkVerb_C1 ("ne" + pref + "iet") ("ne" + pref + "eju") ("ne" + pref + "gāju")).s ! x
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
leftVal = leftVal
|
leftVal = case2partcase leftVal
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkVerb_Irreg_Sleep : Case -> Verb = \leftVal -> {
|
mkVerb_Irreg_Sleep : Case -> Verb = \leftVal -> {
|
||||||
@@ -429,7 +429,7 @@ oper
|
|||||||
x => (mkVerb_C3 "negulēt").s ! x
|
x => (mkVerb_C3 "negulēt").s ! x
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
leftVal = leftVal
|
leftVal = case2partcase leftVal
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- Auxiliaries: palatalization rules
|
-- Auxiliaries: palatalization rules
|
||||||
@@ -548,122 +548,110 @@ oper
|
|||||||
-- TODO: -ot, -am, -ām; -dams/dama, -damies/damās; -ams/ama, -āms/āma
|
-- TODO: -ot, -am, -ām; -dams/dama, -damies/damās; -ams/ama, -āms/āma
|
||||||
-- -ošs/oša ir tikai adjektīvi! Divdabji - tikai verbālās formas! (sk. Baibas sarakstu)
|
-- -ošs/oša ir tikai adjektīvi! Divdabji - tikai verbālās formas! (sk. Baibas sarakstu)
|
||||||
|
|
||||||
mkParticiple_IsUsi : Gender -> Number -> Case -> Str -> Str = \g,n,c,stem ->
|
mkParticiple_IsUsi : Gender -> Number -> PartCase -> Str -> Str = \g,n,c,stem ->
|
||||||
case g of {
|
case g of {
|
||||||
Masc => case n of {
|
Masc => case n of {
|
||||||
Sg => case c of {
|
Sg => case c of {
|
||||||
Nom => stem + "is" ;
|
PartNom => stem + "is" ;
|
||||||
Gen => stem + "uša" ;
|
PartGen => stem + "uša" ;
|
||||||
Dat => stem + "ušam" ;
|
PartDat => stem + "ušam" ;
|
||||||
Acc => stem + "ušu" ;
|
PartAcc => stem + "ušu" ;
|
||||||
Loc => stem + "ušā" ;
|
PartLoc => stem + "ušā"
|
||||||
Voc => NON_EXISTENT
|
|
||||||
} ;
|
} ;
|
||||||
Pl => case c of {
|
Pl => case c of {
|
||||||
Nom => stem + "uši" ;
|
PartNom => stem + "uši" ;
|
||||||
Gen => stem + "ušu" ;
|
PartGen => stem + "ušu" ;
|
||||||
Dat => stem + "ušiem" ;
|
PartDat => stem + "ušiem" ;
|
||||||
Acc => stem + "ušus" ;
|
PartAcc => stem + "ušus" ;
|
||||||
Loc => stem + "ušos" ;
|
PartLoc => stem + "ušos"
|
||||||
Voc => NON_EXISTENT
|
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
Fem => case n of {
|
Fem => case n of {
|
||||||
Sg => case c of {
|
Sg => case c of {
|
||||||
Nom => stem + "usi" ;
|
PartNom => stem + "usi" ;
|
||||||
Gen => stem + "ušas" ;
|
PartGen => stem + "ušas" ;
|
||||||
Dat => stem + "ušai" ;
|
PartDat => stem + "ušai" ;
|
||||||
Acc => stem + "ušu" ;
|
PartAcc => stem + "ušu" ;
|
||||||
Loc => stem + "ušā" ;
|
PartLoc => stem + "ušā"
|
||||||
Voc => NON_EXISTENT
|
|
||||||
} ;
|
} ;
|
||||||
Pl => case c of {
|
Pl => case c of {
|
||||||
Nom => stem + "ušas" ;
|
PartNom => stem + "ušas" ;
|
||||||
Gen => stem + "ušu" ;
|
PartGen => stem + "ušu" ;
|
||||||
Dat => stem + "ušām" ;
|
PartDat => stem + "ušām" ;
|
||||||
Acc => stem + "ušas" ;
|
PartAcc => stem + "ušas" ;
|
||||||
Loc => stem + "ušās" ;
|
PartLoc => stem + "ušās"
|
||||||
Voc => NON_EXISTENT
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkParticiple_TsTa : Gender -> Number -> Case -> Str -> Str = \g,n,c,stem ->
|
mkParticiple_TsTa : Gender -> Number -> PartCase -> Str -> Str = \g,n,c,stem ->
|
||||||
case g of {
|
case g of {
|
||||||
Masc => case n of {
|
Masc => case n of {
|
||||||
Sg => case c of {
|
Sg => case c of {
|
||||||
Nom => stem + "ts" ;
|
PartNom => stem + "ts" ;
|
||||||
Gen => stem + "ta" ;
|
PartGen => stem + "ta" ;
|
||||||
Dat => stem + "tam" ;
|
PartDat => stem + "tam" ;
|
||||||
Acc => stem + "tu" ;
|
PartAcc => stem + "tu" ;
|
||||||
Loc => stem + "tā" ;
|
PartLoc => stem + "tā"
|
||||||
Voc => NON_EXISTENT -- FIXME: -tais ?
|
|
||||||
} ;
|
} ;
|
||||||
Pl => case c of {
|
Pl => case c of {
|
||||||
Nom => stem + "ti" ;
|
PartNom => stem + "ti" ;
|
||||||
Gen => stem + "tu" ;
|
PartGen => stem + "tu" ;
|
||||||
Dat => stem + "tiem" ;
|
PartDat => stem + "tiem" ;
|
||||||
Acc => stem + "tus" ;
|
PartAcc => stem + "tus" ;
|
||||||
Loc => stem + "tos" ;
|
PartLoc => stem + "tos"
|
||||||
Voc => NON_EXISTENT -- FIXME: -tie ?
|
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
Fem => case n of {
|
Fem => case n of {
|
||||||
Sg => case c of {
|
Sg => case c of {
|
||||||
Nom => stem + "ta" ;
|
PartNom => stem + "ta" ;
|
||||||
Gen => stem + "tas" ;
|
PartGen => stem + "tas" ;
|
||||||
Dat => stem + "tai" ;
|
PartDat => stem + "tai" ;
|
||||||
Acc => stem + "tu" ;
|
PartAcc => stem + "tu" ;
|
||||||
Loc => stem + "tā" ;
|
PartLoc => stem + "tā"
|
||||||
Voc => NON_EXISTENT -- FIXME: -tā ?
|
|
||||||
} ;
|
} ;
|
||||||
Pl => case c of {
|
Pl => case c of {
|
||||||
Nom => stem + "tas" ;
|
PartNom => stem + "tas" ;
|
||||||
Gen => stem + "tu" ;
|
PartGen => stem + "tu" ;
|
||||||
Dat => stem + "tām" ;
|
PartDat => stem + "tām" ;
|
||||||
Acc => stem + "tas" ;
|
PartAcc => stem + "tas" ;
|
||||||
Loc => stem + "tās" ;
|
PartLoc => stem + "tās"
|
||||||
Voc => NON_EXISTENT -- FIXME: -tās ?
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkParticiple_IesUsies : Gender -> Number -> Case -> Str -> Str = \g,n,c,stem ->
|
mkParticiple_IesUsies : Gender -> Number -> PartCase -> Str -> Str = \g,n,c,stem ->
|
||||||
case g of {
|
case g of {
|
||||||
Masc => case n of {
|
Masc => case n of {
|
||||||
Sg => case c of {
|
Sg => case c of {
|
||||||
Nom => stem + "ies" ;
|
PartNom => stem + "ies" ;
|
||||||
Gen => NON_EXISTENT ;
|
PartGen => NON_EXISTENT ;
|
||||||
Dat => NON_EXISTENT ;
|
PartDat => NON_EXISTENT ;
|
||||||
Acc => stem + "ušos" ;
|
PartAcc => stem + "ušos" ;
|
||||||
Loc => NON_EXISTENT ;
|
PartLoc => NON_EXISTENT
|
||||||
Voc => NON_EXISTENT
|
|
||||||
} ;
|
} ;
|
||||||
Pl => case c of {
|
Pl => case c of {
|
||||||
Nom => stem + "ušies" ;
|
PartNom => stem + "ušies" ;
|
||||||
Gen => stem + "ušos" ;
|
PartGen => stem + "ušos" ;
|
||||||
Dat => NON_EXISTENT ;
|
PartDat => NON_EXISTENT ;
|
||||||
Acc => stem + "ušos" ;
|
PartAcc => stem + "ušos" ;
|
||||||
Loc => NON_EXISTENT ;
|
PartLoc => NON_EXISTENT
|
||||||
Voc => NON_EXISTENT
|
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
Fem => case n of {
|
Fem => case n of {
|
||||||
Sg => case c of {
|
Sg => case c of {
|
||||||
Nom => stem + "usies" ;
|
PartNom => stem + "usies" ;
|
||||||
Gen => stem + "ušās" ;
|
PartGen => stem + "ušās" ;
|
||||||
Dat => NON_EXISTENT ;
|
PartDat => NON_EXISTENT ;
|
||||||
Acc => stem + "ušos" ;
|
PartAcc => stem + "ušos" ;
|
||||||
Loc => NON_EXISTENT ;
|
PartLoc => NON_EXISTENT
|
||||||
Voc => NON_EXISTENT
|
|
||||||
} ;
|
} ;
|
||||||
Pl => case c of {
|
Pl => case c of {
|
||||||
Nom => stem + "ušās" ;
|
PartNom => stem + "ušās" ;
|
||||||
Gen => stem + "ušos" ;
|
PartGen => stem + "ušos" ;
|
||||||
Dat => NON_EXISTENT ;
|
PartDat => NON_EXISTENT ;
|
||||||
Acc => stem + "ušos" ;
|
PartAcc => stem + "ušos" ;
|
||||||
Loc => NON_EXISTENT ;
|
PartLoc => NON_EXISTENT
|
||||||
Voc => NON_EXISTENT
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ lin
|
|||||||
|
|
||||||
QuestVP ip vp = { s = \\m,p => ip.s ! Nom ++ buildVerb vp.v m p (AgrP3 ip.num Masc) Pos vp.rightPol } ;
|
QuestVP ip vp = { s = \\m,p => ip.s ! Nom ++ buildVerb vp.v m p (AgrP3 ip.num Masc) Pos vp.rightPol } ;
|
||||||
|
|
||||||
QuestSlash ip slash = { s = \\m,p => slash.prep.s ++ ip.s ! (slash.prep.c ! ip.num) ++ slash.s ! m ! p } ;
|
QuestSlash ip slash = { s = \\m,p => slash.prep.s ++ ip.s ! partcase2case (slash.prep.c ! ip.num) ++ slash.s ! m ! p } ;
|
||||||
|
|
||||||
QuestIAdv iadv cl = { s = \\m,p => iadv.s ++ cl.s ! m ! p } ;
|
QuestIAdv iadv cl = { s = \\m,p => iadv.s ++ cl.s ! m ! p } ;
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ lin
|
|||||||
num = ip.num
|
num = ip.num
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
PrepIP p ip = { s = p.s ++ ip.s ! (p.c ! ip.num) } ;
|
PrepIP p ip = { s = p.s ++ ip.s ! partcase2case (p.c ! ip.num) } ;
|
||||||
|
|
||||||
IdetCN idet cn = {
|
IdetCN idet cn = {
|
||||||
s = \\c => idet.s ! cn.gend ++ cn.s ! Def ! idet.num ! c ;
|
s = \\c => idet.s ! cn.gend ++ cn.s ! Def ! idet.num ! c ;
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ lin
|
|||||||
oper
|
oper
|
||||||
|
|
||||||
-- TODO: PassV2 verbs jāsaskaņo ar objektu, nevis subjektu (by8means_Prep: AgP3 Sg Masc) - done?
|
-- TODO: PassV2 verbs jāsaskaņo ar objektu, nevis subjektu (by8means_Prep: AgP3 Sg Masc) - done?
|
||||||
mkRelClause : RP -> CatLav.VP -> RCl = \rp,vp ->
|
mkRelClause : RP -> CatLav.VP -> RCl = \rp,vp ->
|
||||||
let subjInTopic : Bool = case <vp.voice, vp.leftVal> of {
|
let subjInTopic : Bool = case <vp.voice, partcase2case vp.leftVal> of {
|
||||||
<Act, Nom> => True ;
|
<Act, Nom> => True ;
|
||||||
<Act, _ > => False ;
|
<Act, _ > => False ;
|
||||||
<Pass, Acc> => False ;
|
<Pass, Acc> => False ;
|
||||||
@@ -34,7 +34,7 @@ oper
|
|||||||
} in
|
} in
|
||||||
case mood of { -- subject
|
case mood of { -- subject
|
||||||
Deb _ _ => rp.s ! Masc ! Dat ; --# notpresent
|
Deb _ _ => rp.s ! Masc ! Dat ; --# notpresent
|
||||||
_ => rp.s ! Masc ! vp.leftVal
|
_ => rp.s ! Masc ! partcase2case vp.leftVal
|
||||||
} ++
|
} ++
|
||||||
case vp.objPron of {
|
case vp.objPron of {
|
||||||
False => verb ++ vp.compl ! agr ;
|
False => verb ++ vp.compl ! agr ;
|
||||||
@@ -47,13 +47,13 @@ lin
|
|||||||
-- FIXME: vārdu secība - nevis 'kas mīl viņu' bet 'kas viņu mīl' (?)
|
-- FIXME: vārdu secība - nevis 'kas mīl viņu' bet 'kas viņu mīl' (?)
|
||||||
-- FIXME: Masc varētu nebūt labi
|
-- FIXME: Masc varētu nebūt labi
|
||||||
RelSlash rp slash = {
|
RelSlash rp slash = {
|
||||||
s = \\m,p,ag => slash.prep.s ++ rp.s ! Masc ! (slash.prep.c ! Sg) ++ slash.s ! m ! p
|
s = \\m,p,ag => slash.prep.s ++ rp.s ! Masc ! partcase2case (slash.prep.c ! Sg) ++ slash.s ! m ! p
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- FIXME: placeholder
|
-- FIXME: placeholder
|
||||||
-- TODO: jātestē, kautkas nav labi ar testpiemēru
|
-- TODO: jātestē, kautkas nav labi ar testpiemēru
|
||||||
FunRP p np rp = {
|
FunRP p np rp = {
|
||||||
s = \\g,c => p.s ++ rp.s ! g ! c ++ np.s ! (p.c ! (fromAgr np.agr).num)
|
s = \\g,c => p.s ++ rp.s ! g ! c ++ np.s ! partcase2case (p.c ! (fromAgr np.agr).num)
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
IdRP = {
|
IdRP = {
|
||||||
|
|||||||
@@ -48,8 +48,30 @@ param
|
|||||||
| VDeb
|
| VDeb
|
||||||
| VImp Number
|
| VImp Number
|
||||||
| VDebRel -- the relative subtype of debitive
|
| VDebRel -- the relative subtype of debitive
|
||||||
| VPart Voice Gender Number Case ;
|
| VPart Voice Gender Number PartCase ;
|
||||||
|
|
||||||
|
PartCase = PartNom | PartGen | PartDat | PartAcc | PartLoc ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
|
||||||
|
partcase2case : PartCase -> Case = \c -> case c of {
|
||||||
|
PartNom => Nom ;
|
||||||
|
PartDat => Dat ;
|
||||||
|
PartGen => Gen ;
|
||||||
|
PartAcc => Acc ;
|
||||||
|
PartLoc => Loc
|
||||||
|
} ;
|
||||||
|
|
||||||
|
case2partcase : Case -> PartCase = \c -> case c of {
|
||||||
|
Nom => PartNom ;
|
||||||
|
Gen => PartGen ;
|
||||||
|
Dat => PartDat ;
|
||||||
|
Acc => PartAcc ;
|
||||||
|
Loc => PartLoc ;
|
||||||
|
_ => PartNom
|
||||||
|
} ;
|
||||||
|
|
||||||
|
param
|
||||||
-- Number and gender has to be agreed in predicative nominal clauses
|
-- Number and gender has to be agreed in predicative nominal clauses
|
||||||
Agreement =
|
Agreement =
|
||||||
AgrP1 Number Gender
|
AgrP1 Number Gender
|
||||||
@@ -68,20 +90,20 @@ oper
|
|||||||
Noun : Type = {s : Number => Case => Str ; gend : Gender} ;
|
Noun : Type = {s : Number => Case => Str ; gend : Gender} ;
|
||||||
|
|
||||||
ProperNoun : Type = {s : Case => Str ; gend : Gender ; num : Number} ;
|
ProperNoun : Type = {s : Case => Str ; gend : Gender ; num : Number} ;
|
||||||
|
|
||||||
Pronoun : Type = {s : Case => Str ; agr : Agreement ; poss : Gender => Number => Case => Str ; pol : Polarity} ;
|
Pronoun : Type = {s : Case => Str ; agr : Agreement ; poss : Gender => Number => Case => Str ; pol : Polarity} ;
|
||||||
|
|
||||||
Adjective : Type = {s : AForm => Str} ;
|
Adjective : Type = {s : AForm => Str} ;
|
||||||
|
|
||||||
Preposition : Type = {s : Str ; c : Number => Case} ;
|
Preposition : Type = {s : Str ; c : Number => PartCase} ;
|
||||||
|
|
||||||
Verb : Type = {s : Polarity => VForm => Str ; leftVal : Case} ;
|
Verb : Type = {s : Polarity => VForm => Str ; leftVal : PartCase} ;
|
||||||
|
|
||||||
VP : Type = {
|
VP : Type = {
|
||||||
v : Verb ;
|
v : Verb ;
|
||||||
compl : Agreement => Str ; -- the subject-complement agreement
|
compl : Agreement => Str ; -- the subject-complement agreement
|
||||||
voice : Voice ;
|
voice : Voice ;
|
||||||
leftVal : Case ; -- the left valence (typically, the subject)
|
leftVal : PartCase ; -- the left valence (typically, the subject)
|
||||||
rightAgr : Agreement ; -- for the potential subject-verb agreement (the subject can be on the right side)
|
rightAgr : Agreement ; -- for the potential subject-verb agreement (the subject can be on the right side)
|
||||||
rightPol : Polarity ; -- for the potential double negation
|
rightPol : Polarity ; -- for the potential double negation
|
||||||
objPron : Bool -- true, if object is a Pron (for modifying the neutral word order)
|
objPron : Bool -- true, if object is a Pron (for modifying the neutral word order)
|
||||||
@@ -145,7 +167,7 @@ oper
|
|||||||
Masc => Masc
|
Masc => Masc
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
closeRelCl : Bool -> Str = \isRel ->
|
closeRelCl : Bool -> Str = \isRel ->
|
||||||
case isRel of {
|
case isRel of {
|
||||||
True => "," ;
|
True => "," ;
|
||||||
False => []
|
False => []
|
||||||
|
|||||||
@@ -66,8 +66,8 @@ lin
|
|||||||
|
|
||||||
oper
|
oper
|
||||||
-- TODO: PassV2 verbs jāsaskaņo ar objektu, nevis subjektu (by8means_Prep: AgP3 Sg Masc)
|
-- TODO: PassV2 verbs jāsaskaņo ar objektu, nevis subjektu (by8means_Prep: AgP3 Sg Masc)
|
||||||
mkClause : NP -> CatLav.VP -> Cl = \np,vp ->
|
mkClause : NP -> CatLav.VP -> Cl = \np,vp ->
|
||||||
let agr : Agreement = case <vp.voice, vp.leftVal> of {
|
let agr : Agreement = case <vp.voice, partcase2case vp.leftVal> of {
|
||||||
<Act, Nom> => np.agr ;
|
<Act, Nom> => np.agr ;
|
||||||
<Act, _ > => vp.rightAgr ;
|
<Act, _ > => vp.rightAgr ;
|
||||||
<Pass, Acc> => vp.rightAgr ;
|
<Pass, Acc> => vp.rightAgr ;
|
||||||
@@ -77,7 +77,7 @@ oper
|
|||||||
s = \\mood,pol =>
|
s = \\mood,pol =>
|
||||||
case mood of { -- subject
|
case mood of { -- subject
|
||||||
Deb _ _ => np.s ! Dat ; --# notpresent
|
Deb _ _ => np.s ! Dat ; --# notpresent
|
||||||
_ => np.s ! vp.leftVal
|
_ => np.s ! partcase2case vp.leftVal
|
||||||
} ++
|
} ++
|
||||||
closeRelCl np.isRel ++ -- comma, if necessary
|
closeRelCl np.isRel ++ -- comma, if necessary
|
||||||
case vp.objPron of {
|
case vp.objPron of {
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ lin
|
|||||||
-- V3 -> NP -> VPSlash
|
-- V3 -> NP -> VPSlash
|
||||||
-- e.g. 'give it (to her)'
|
-- e.g. 'give it (to her)'
|
||||||
Slash2V3 v3 np = insertObjSlash
|
Slash2V3 v3 np = insertObjSlash
|
||||||
(\\_ => v3.rightVal2.s ++ np.s ! (v3.rightVal2.c ! (fromAgr np.agr).num))
|
(\\_ => v3.rightVal2.s ++ np.s ! partcase2case (v3.rightVal2.c ! (fromAgr np.agr).num))
|
||||||
{
|
{
|
||||||
v = v3 ;
|
v = v3 ;
|
||||||
compl = \\_ => [] ; -- will be overriden
|
compl = \\_ => [] ; -- will be overriden
|
||||||
@@ -116,7 +116,7 @@ lin
|
|||||||
-- V3 -> NP -> VPSlash
|
-- V3 -> NP -> VPSlash
|
||||||
-- e.g. 'give (it) to her'
|
-- e.g. 'give (it) to her'
|
||||||
Slash3V3 v3 np = insertObjSlash
|
Slash3V3 v3 np = insertObjSlash
|
||||||
(\\_ => v3.rightVal2.s ++ np.s ! (v3.rightVal2.c ! (fromAgr np.agr).num))
|
(\\_ => v3.rightVal2.s ++ np.s ! partcase2case (v3.rightVal2.c ! (fromAgr np.agr).num))
|
||||||
{
|
{
|
||||||
v = v3 ;
|
v = v3 ;
|
||||||
compl = \\_ => [] ; -- will be overriden
|
compl = \\_ => [] ; -- will be overriden
|
||||||
@@ -194,8 +194,8 @@ lin
|
|||||||
}
|
}
|
||||||
} ++ vpslash.compl ! agr ;
|
} ++ vpslash.compl ! agr ;
|
||||||
-}
|
-}
|
||||||
compl = \\agr => vpslash.rightVal.s ++
|
compl = \\agr => vpslash.rightVal.s ++
|
||||||
np.s ! (vpslash.rightVal.c ! (fromAgr agr).num) ++
|
np.s ! partcase2case (vpslash.rightVal.c ! (fromAgr agr).num) ++
|
||||||
vpslash.compl ! agr ;
|
vpslash.compl ! agr ;
|
||||||
voice = vpslash.voice ;
|
voice = vpslash.voice ;
|
||||||
leftVal = vpslash.leftVal ;
|
leftVal = vpslash.leftVal ;
|
||||||
@@ -221,7 +221,7 @@ lin
|
|||||||
-- V2V -> NP -> VPSlash -> VPSlash
|
-- V2V -> NP -> VPSlash -> VPSlash
|
||||||
-- e.g. '-- beg me to buy'
|
-- e.g. '-- beg me to buy'
|
||||||
SlashV2VNP v2v np vpslash = insertObjSlash
|
SlashV2VNP v2v np vpslash = insertObjSlash
|
||||||
(\\_ => v2v.rightVal.s ++ np.s ! (v2v.rightVal.c ! (fromAgr np.agr).num))
|
(\\_ => v2v.rightVal.s ++ np.s ! partcase2case (v2v.rightVal.c ! (fromAgr np.agr).num))
|
||||||
{
|
{
|
||||||
v = v2v ;
|
v = v2v ;
|
||||||
compl = \\agr => buildVP vpslash Pos VInf agr ;
|
compl = \\agr => buildVP vpslash Pos VInf agr ;
|
||||||
@@ -238,7 +238,7 @@ lin
|
|||||||
-- VPSlash -> VP
|
-- VPSlash -> VP
|
||||||
-- e.g. 'love himself'
|
-- e.g. 'love himself'
|
||||||
ReflVP vpslash = insertObjPre
|
ReflVP vpslash = insertObjPre
|
||||||
(\\agr => vpslash.rightVal.s ++ reflPron ! (vpslash.rightVal.c ! (fromAgr agr).num))
|
(\\agr => vpslash.rightVal.s ++ reflPron ! partcase2case (vpslash.rightVal.c ! (fromAgr agr).num))
|
||||||
vpslash ;
|
vpslash ;
|
||||||
|
|
||||||
-- Comp -> VP
|
-- Comp -> VP
|
||||||
@@ -247,7 +247,7 @@ lin
|
|||||||
v = mkV "būt" ;
|
v = mkV "būt" ;
|
||||||
compl = \\agr => comp.s ! agr ;
|
compl = \\agr => comp.s ! agr ;
|
||||||
voice = Act ;
|
voice = Act ;
|
||||||
leftVal = Nom ;
|
leftVal = PartNom ;
|
||||||
rightAgr = AgrP3 Sg Masc ;
|
rightAgr = AgrP3 Sg Masc ;
|
||||||
rightPol = Pos ;
|
rightPol = Pos ;
|
||||||
objPron = False
|
objPron = False
|
||||||
@@ -313,7 +313,7 @@ lin
|
|||||||
oper
|
oper
|
||||||
|
|
||||||
-- FIXME: the type of the participle form - depending on what?! (currently fixed)
|
-- FIXME: the type of the participle form - depending on what?! (currently fixed)
|
||||||
buildVerb : Verb -> VMood -> Polarity -> Agreement -> Polarity -> Polarity -> Str =
|
buildVerb : Verb -> VMood -> Polarity -> Agreement -> Polarity -> Polarity -> Str =
|
||||||
\v,mood,pol,agr,leftPol,rightPol ->
|
\v,mood,pol,agr,leftPol,rightPol ->
|
||||||
let
|
let
|
||||||
finalPol : Polarity = case <leftPol, rightPol> of {
|
finalPol : Polarity = case <leftPol, rightPol> of {
|
||||||
@@ -323,7 +323,7 @@ oper
|
|||||||
} ;
|
} ;
|
||||||
agr = fromAgr agr
|
agr = fromAgr agr
|
||||||
; --# notpresent
|
; --# notpresent
|
||||||
part = v.s ! Pos ! (VPart Pass agr.gend agr.num Nom) --# notpresent
|
part = v.s ! Pos ! (VPart Pass agr.gend agr.num PartNom) --# notpresent
|
||||||
in case mood of {
|
in case mood of {
|
||||||
Ind Simul tense => v.s ! finalPol ! (VInd agr.pers agr.num tense)
|
Ind Simul tense => v.s ! finalPol ! (VInd agr.pers agr.num tense)
|
||||||
; --# notpresent
|
; --# notpresent
|
||||||
@@ -337,7 +337,7 @@ oper
|
|||||||
Deb Simul tense => (mkV "būt").s ! finalPol ! (VInd P3 Sg tense) ++ --# notpresent
|
Deb Simul tense => (mkV "būt").s ! finalPol ! (VInd P3 Sg tense) ++ --# notpresent
|
||||||
v.s ! Pos ! VDeb ; --# notpresent
|
v.s ! Pos ! VDeb ; --# notpresent
|
||||||
Deb Anter tense => (mkV "būt").s ! finalPol ! (VInd P3 Sg tense) ++ --# notpresent
|
Deb Anter tense => (mkV "būt").s ! finalPol ! (VInd P3 Sg tense) ++ --# notpresent
|
||||||
(mkV "būt").s ! Pos ! (VPart Pass Masc Sg Nom) ++ --# notpresent
|
(mkV "būt").s ! Pos ! (VPart Pass Masc Sg PartNom) ++ --# notpresent
|
||||||
v.s ! Pos ! VDeb ; --# notpresent
|
v.s ! Pos ! VDeb ; --# notpresent
|
||||||
|
|
||||||
Condit Simul => v.s ! finalPol ! (VInd agr.pers agr.num ParamX.Cond) ; --# notpresent
|
Condit Simul => v.s ! finalPol ! (VInd agr.pers agr.num ParamX.Cond) ; --# notpresent
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
concrete ConstructionMay of Construction = CatMay ** open ParadigmsMay in {
|
concrete ConstructionMay of Construction = CatMay ** open ParadigmsMay, (L=LexiconMay), (G=GrammarMay) in {
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
Timeunit = N ;
|
Timeunit = N ;
|
||||||
@@ -6,13 +6,15 @@ lincat
|
|||||||
Monthday = NP ;
|
Monthday = NP ;
|
||||||
Month = N ;
|
Month = N ;
|
||||||
Year = NP ;
|
Year = NP ;
|
||||||
{-
|
|
||||||
lin
|
lin
|
||||||
|
|
||||||
timeunitAdv n time =
|
has_age_VP card = G.ComplSlash (G.SlashV2a umur_V2) (G.DetCN (G.DetQuant G.IndefArt (G.NumCard card)) (G.UseN L.year_N)) ;
|
||||||
let n_card : Card = n ;
|
|
||||||
n_hours_NP : NP = mkNP n_card time ;
|
oper
|
||||||
in SyntaxMay.mkAdv for_Prep n_hours_NP | mkAdv (n_hours_NP.s ! R.npNom) ;
|
umur_V2 : V2 = mkV2 (mkV "umur") noPrep ;
|
||||||
|
|
||||||
|
{-
|
||||||
|
|
||||||
weekdayPunctualAdv w = ; -- on Sunday
|
weekdayPunctualAdv w = ; -- on Sunday
|
||||||
weekdayHabitualAdv w = ; -- on Sundays
|
weekdayHabitualAdv w = ; -- on Sundays
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
resource MissingMay = open GrammarMay, Prelude in {
|
resource MissingMay = open GrammarMay, Prelude in {
|
||||||
oper AdAP : AdA -> AP -> AP = notYet "AdAP" ;
|
oper AdAP : AdA -> AP -> AP = notYet "AdAP" ;
|
||||||
oper AdAdv : AdA -> Adv -> Adv = notYet "AdAdv" ;
|
oper AdAdv : AdA -> Adv -> Adv = notYet "AdAdv" ;
|
||||||
oper AdNum : AdN -> Card -> Card = notYet "AdNum" ;
|
|
||||||
oper AdVVP : AdV -> VP -> VP = notYet "AdVVP" ;
|
oper AdVVP : AdV -> VP -> VP = notYet "AdVVP" ;
|
||||||
oper AdVVPSlash : AdV -> VPSlash -> VPSlash = notYet "AdVVPSlash" ;
|
oper AdVVPSlash : AdV -> VPSlash -> VPSlash = notYet "AdVVPSlash" ;
|
||||||
oper AddAdvQVP : QVP -> IAdv -> QVP = notYet "AddAdvQVP" ;
|
oper AddAdvQVP : QVP -> IAdv -> QVP = notYet "AddAdvQVP" ;
|
||||||
@@ -54,7 +53,6 @@ oper IdetQuant : IQuant -> Num -> IDet = notYet "IdetQuant" ;
|
|||||||
oper ImpP3 : NP -> VP -> Utt = notYet "ImpP3" ;
|
oper ImpP3 : NP -> VP -> Utt = notYet "ImpP3" ;
|
||||||
oper ImpPl1 : VP -> Utt = notYet "ImpPl1" ;
|
oper ImpPl1 : VP -> Utt = notYet "ImpPl1" ;
|
||||||
oper ImpVP : VP -> Imp = notYet "ImpVP" ;
|
oper ImpVP : VP -> Imp = notYet "ImpVP" ;
|
||||||
oper OrdDigits : Digits -> Ord = notYet "OrdDigits" ;
|
|
||||||
oper OrdNumeral : Numeral -> Ord = notYet "OrdNumeral" ;
|
oper OrdNumeral : Numeral -> Ord = notYet "OrdNumeral" ;
|
||||||
oper OrdNumeralSuperl : Numeral -> A -> Ord = notYet "OrdNumeralSuperl" ;
|
oper OrdNumeralSuperl : Numeral -> A -> Ord = notYet "OrdNumeralSuperl" ;
|
||||||
oper OrdSuperl : A -> Ord = notYet "OrdSuperl" ;
|
oper OrdSuperl : A -> Ord = notYet "OrdSuperl" ;
|
||||||
@@ -113,14 +111,11 @@ oper art_N : N = notYet "art_N" ;
|
|||||||
oper as_CAdv : CAdv = notYet "as_CAdv" ;
|
oper as_CAdv : CAdv = notYet "as_CAdv" ;
|
||||||
oper ashes_N : N = notYet "ashes_N" ;
|
oper ashes_N : N = notYet "ashes_N" ;
|
||||||
oper ask_V2Q : V2Q = notYet "ask_V2Q" ;
|
oper ask_V2Q : V2Q = notYet "ask_V2Q" ;
|
||||||
oper at_least_AdN : AdN = notYet "at_least_AdN" ;
|
|
||||||
oper at_most_AdN : AdN = notYet "at_most_AdN" ;
|
|
||||||
oper baby_N : N = notYet "baby_N" ;
|
oper baby_N : N = notYet "baby_N" ;
|
||||||
oper back_N : N = notYet "back_N" ;
|
oper back_N : N = notYet "back_N" ;
|
||||||
oper bad_A : A = notYet "bad_A" ;
|
oper bad_A : A = notYet "bad_A" ;
|
||||||
oper bank_N : N = notYet "bank_N" ;
|
oper bank_N : N = notYet "bank_N" ;
|
||||||
oper bark_N : N = notYet "bark_N" ;
|
oper bark_N : N = notYet "bark_N" ;
|
||||||
oper because_Subj : Subj = notYet "because_Subj" ;
|
|
||||||
oper become_VA : VA = notYet "become_VA" ;
|
oper become_VA : VA = notYet "become_VA" ;
|
||||||
oper beer_N : N = notYet "beer_N" ;
|
oper beer_N : N = notYet "beer_N" ;
|
||||||
oper before_Prep : Prep = notYet "before_Prep" ;
|
oper before_Prep : Prep = notYet "before_Prep" ;
|
||||||
|
|||||||
@@ -104,13 +104,13 @@ concrete NounMay of Noun = CatMay ** open ResMay, Prelude in {
|
|||||||
-- : Numeral -> Card ;
|
-- : Numeral -> Card ;
|
||||||
NumNumeral num = num ;
|
NumNumeral num = num ;
|
||||||
|
|
||||||
{-
|
|
||||||
-- : AdN -> Card -> Card ;
|
-- : AdN -> Card -> Card ;
|
||||||
AdNum adn card = card ** { s = adn.s ++ card.s } ;
|
AdNum adn card = card ** { s = adn.s ++ card.s } ;
|
||||||
|
|
||||||
-- : Digits -> Ord ;
|
-- : Digits -> Ord ;
|
||||||
OrdDigits digs = digs ** { s = digs.s ! NOrd } ;
|
OrdDigits digs = digs ** { s = digs.s ! NOrd } ;
|
||||||
-}
|
|
||||||
-- : Numeral -> Ord ;
|
-- : Numeral -> Ord ;
|
||||||
OrdNumeral num = {
|
OrdNumeral num = {
|
||||||
s = num.ord
|
s = num.ord
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user