forked from GitHub/gf-rgl
started a separate module for names
This commit is contained in:
@@ -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"
|
||||||
|
|||||||
@@ -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 ;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -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} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 ;
|
||||||
|
|||||||
6
src/afrikaans/NamesAfr.gf
Normal file
6
src/afrikaans/NamesAfr.gf
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
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} ;
|
||||||
|
}
|
||||||
@@ -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,7 +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} ;
|
||||||
PN = {s : Str; gn : GenNum} ;
|
LN, PN = {s : Str; gn : GenNum} ;
|
||||||
|
|
||||||
lindef
|
lindef
|
||||||
SSlash = \s -> {s = \\_ => s; c2 = {s=""; c=Acc}};
|
SSlash = \s -> {s = \\_ => s; c2 = {s=""; c=Acc}};
|
||||||
|
|||||||
@@ -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 ;
|
||||||
|
|
||||||
|
|||||||
39
src/bulgarian/NamesBul.gf
Normal file
39
src/bulgarian/NamesBul.gf
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
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
|
||||||
|
} ;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -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
|
||||||
|
} ;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -79,7 +79,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 = ResChi.NP ;
|
GN, SN, LN, PN = ResChi.NP ;
|
||||||
|
|
||||||
-- overridden
|
-- overridden
|
||||||
|
|
||||||
|
|||||||
@@ -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 ]
|
, GerundAdv, GerundNP, ApposNP ]
|
||||||
with (Grammar=GrammarChi) ** open
|
with (Grammar=GrammarChi) ** open
|
||||||
Prelude
|
Prelude
|
||||||
, Coordination
|
, Coordination
|
||||||
@@ -79,13 +79,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} ;
|
||||||
|
|
||||||
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 ;
|
||||||
|
|||||||
8
src/chinese/NamesChi.gf
Normal file
8
src/chinese/NamesChi.gf
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
concrete NamesChi of Names = CatChi ** {
|
||||||
|
|
||||||
|
lin GivenName, MaleSurname, FemaleSurname, PlSurname = \n -> n ;
|
||||||
|
lin FullName gn sn = {
|
||||||
|
s = gn.s ++ sn.s
|
||||||
|
} ;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -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 ;
|
||||||
|
|||||||
7
src/dutch/NamesDut.gf
Normal file
7
src/dutch/NamesDut.gf
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
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} ;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -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"
|
||||||
|
a : Agr;
|
||||||
|
} ;
|
||||||
|
|
||||||
lindef
|
lindef
|
||||||
SSlash = \s -> {s = s; c2 = ""} ;
|
SSlash = \s -> {s = s; c2 = ""} ;
|
||||||
|
|||||||
@@ -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 = n.a
|
||||||
|
} ;
|
||||||
|
|
||||||
|
lin PlainLN n = {
|
||||||
|
s = \\c => n.s ! npcase2case c ;
|
||||||
|
a = n.a
|
||||||
|
} ;
|
||||||
|
|
||||||
|
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 ! n.a) (n.s ! c) ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -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 ;
|
||||||
|
a = agrP3 Sg} ;
|
||||||
|
|
||||||
|
mkLN : Str -> Number -> LN = \s,n ->
|
||||||
|
lin LN {s = table {Gen => s + "'s" ; _ => s} ;
|
||||||
|
p = "in" ;
|
||||||
|
art = False ;
|
||||||
|
a = agrP3 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 ;
|
||||||
|
|||||||
@@ -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 ;
|
||||||
|
|||||||
14
src/estonian/NamesEst.gf
Normal file
14
src/estonian/NamesEst.gf
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
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
|
||||||
|
} ;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -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 ;
|
||||||
|
|||||||
@@ -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 ;
|
||||||
|
|||||||
14
src/finnish/NamesFin.gf
Normal file
14
src/finnish/NamesFin.gf
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
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
|
||||||
|
} ;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -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 ;
|
||||||
|
|||||||
36
src/french/NamesFre.gf
Normal file
36
src/french/NamesFre.gf
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
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 -> Compl -> LN = \n,s -> n ** {p = s} ;
|
||||||
|
|
||||||
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
|
||||||
|
|||||||
@@ -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 ;
|
||||||
|
|||||||
38
src/german/NamesGer.gf
Normal file
38
src/german/NamesGer.gf
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
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 = []
|
||||||
|
} ;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -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
|
||||||
|
} ;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -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 ;
|
||||||
|
|||||||
9
src/korean/NamesKor.gf
Normal file
9
src/korean/NamesKor.gf
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
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
|
||||||
|
} ;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -118,7 +118,7 @@ concrete CatMlt of Cat = CommonX - [Adv] ** open ResMlt, Prelude in {
|
|||||||
N = Noun ;
|
N = Noun ;
|
||||||
N2 = Noun ** {c2 : Compl} ;
|
N2 = Noun ** {c2 : Compl} ;
|
||||||
N3 = Noun ** {c2, c3 : Compl} ;
|
N3 = Noun ** {c2, c3 : Compl} ;
|
||||||
GN, SN, PN = ProperNoun ;
|
GN, SN, LN, PN = ProperNoun ;
|
||||||
|
|
||||||
-- Overridden from CommonX
|
-- Overridden from CommonX
|
||||||
|
|
||||||
|
|||||||
@@ -24,10 +24,4 @@ concrete ExtraMlt of ExtraMltAbs = CatMlt **
|
|||||||
a = p.a ;
|
a = p.a ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
lin GivenName, MaleSurname, FemaleSurname, PlSurname = \n -> n ;
|
|
||||||
lin FullName gn sn = {
|
|
||||||
s = gn.s ++ sn.s ;
|
|
||||||
a = gn.a
|
|
||||||
} ;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,8 @@ concrete GrammarMlt of Grammar =
|
|||||||
TextX - [Adv],
|
TextX - [Adv],
|
||||||
StructuralMlt,
|
StructuralMlt,
|
||||||
IdiomMlt,
|
IdiomMlt,
|
||||||
TenseX - [Adv]
|
TenseX - [Adv],
|
||||||
|
NamesMlt
|
||||||
** {
|
** {
|
||||||
|
|
||||||
flags coding=utf8 ;
|
flags coding=utf8 ;
|
||||||
|
|||||||
16
src/maltese/NamesMlt.gf
Normal file
16
src/maltese/NamesMlt.gf
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
concrete NamesMlt of Names = CatMlt ** open ResMlt, Prelude in {
|
||||||
|
|
||||||
|
lin GivenName, MaleSurname, FemaleSurname, PlSurname = \n -> {
|
||||||
|
s = \\c => n.s ;
|
||||||
|
a = n.a ;
|
||||||
|
isPron = False ;
|
||||||
|
isDefn = False
|
||||||
|
} ;
|
||||||
|
lin FullName gn sn = {
|
||||||
|
s = \\c => gn.s ++ sn.s ;
|
||||||
|
a = gn.a ;
|
||||||
|
isPron = False ;
|
||||||
|
isDefn = False
|
||||||
|
} ;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -119,7 +119,7 @@ concrete CatPol of Cat = CommonX - [CAdv] ** open ResPol, Prelude, (R = ParamX)
|
|||||||
|
|
||||||
N3 = Noun ** { c1, c2 : Complement } ;
|
N3 = Noun ** { c1, c2 : Complement } ;
|
||||||
|
|
||||||
GN, SN, PN = NounPhrase;
|
GN, SN, LN, PN = NounPhrase;
|
||||||
|
|
||||||
CAdv = {s,p,sn,pn : Str} ;
|
CAdv = {s,p,sn,pn : Str} ;
|
||||||
|
|
||||||
|
|||||||
@@ -40,13 +40,4 @@ oper
|
|||||||
-- KA: PassVPSlash is derived from PassV2. Objects might be ignored
|
-- KA: PassVPSlash is derived from PassV2. Objects might be ignored
|
||||||
lin PassVPSlash vps = setImienne vps True;
|
lin PassVPSlash vps = setImienne vps True;
|
||||||
|
|
||||||
lin GivenName, MaleSurname, FemaleSurname = \n -> n ;
|
|
||||||
lin FullName gn sn = {
|
|
||||||
nom = gn.nom ++ sn.nom ;
|
|
||||||
voc = gn.nom ++ sn.voc ;
|
|
||||||
dep = \\c => gn.nom ++ sn.dep ! c ;
|
|
||||||
gn = gn.gn ;
|
|
||||||
p = gn.p
|
|
||||||
} ;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ concrete GrammarPol of Grammar =
|
|||||||
PhrasePol,
|
PhrasePol,
|
||||||
TenseX - [CAdv],
|
TenseX - [CAdv],
|
||||||
TextX - [CAdv],
|
TextX - [CAdv],
|
||||||
|
NamesPol,
|
||||||
StructuralPol,
|
StructuralPol,
|
||||||
IdiomPol
|
IdiomPol
|
||||||
** { flags startcat = Phr ; unlexer = text ; lexer = text ;} ;
|
** { flags startcat = Phr ; unlexer = text ; lexer = text ;} ;
|
||||||
|
|||||||
12
src/polish/NamesPol.gf
Normal file
12
src/polish/NamesPol.gf
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
concrete NamesPol of Names = CatPol ** {
|
||||||
|
|
||||||
|
lin GivenName, MaleSurname, FemaleSurname = \n -> n ;
|
||||||
|
lin FullName gn sn = {
|
||||||
|
nom = gn.nom ++ sn.nom ;
|
||||||
|
voc = gn.nom ++ sn.voc ;
|
||||||
|
dep = \\c => gn.nom ++ sn.dep ! c ;
|
||||||
|
gn = gn.gn ;
|
||||||
|
p = gn.p
|
||||||
|
} ;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -116,10 +116,4 @@ concrete ExtendPor of Extend = CatPor ** ExtendRomanceFunctor -
|
|||||||
youPolPlFem_Pron = pronAgr youPolPl_Pron Fem Pl P2 ;
|
youPolPlFem_Pron = pronAgr youPolPl_Pron Fem Pl P2 ;
|
||||||
theyFem_Pron = mkPronFrom S.they_Pron "elas" "as" "lhes" "elas" Fem Pl P3 ;
|
theyFem_Pron = mkPronFrom S.they_Pron "elas" "as" "lhes" "elas" Fem Pl P3 ;
|
||||||
|
|
||||||
lin GivenName, MaleSurname, FemaleSurname = \n -> n ;
|
|
||||||
lin FullName gn sn = {
|
|
||||||
s = gn.s ++ sn.s ;
|
|
||||||
g = gn.g
|
|
||||||
} ;
|
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -14,7 +14,8 @@ concrete GrammarPor of Grammar =
|
|||||||
TextPor - [SC,Temp,Tense,Pol,PPos,PNeg], -- special punctuation
|
TextPor - [SC,Temp,Tense,Pol,PPos,PNeg], -- special punctuation
|
||||||
IdiomPor,
|
IdiomPor,
|
||||||
StructuralPor,
|
StructuralPor,
|
||||||
TensePor
|
TensePor,
|
||||||
|
NamesPor
|
||||||
|
|
||||||
** {
|
** {
|
||||||
|
|
||||||
|
|||||||
9
src/portuguese/NamesPor.gf
Normal file
9
src/portuguese/NamesPor.gf
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
concrete NamesPor of Names = CatPor ** open ResPor in {
|
||||||
|
|
||||||
|
lin GivenName, MaleSurname, FemaleSurname = \n -> pn2np n ;
|
||||||
|
lin FullName gn sn = pn2np {
|
||||||
|
s = gn.s ++ sn.s ;
|
||||||
|
g = gn.g
|
||||||
|
} ;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -112,6 +112,13 @@ incomplete concrete CatRomance of Cat = CommonX - [SC,Pol]
|
|||||||
N3 = Noun ** {c2,c3 : Compl} ;
|
N3 = Noun ** {c2,c3 : Compl} ;
|
||||||
GN, SN, PN = {s : Str ; g : Gender} ;
|
GN, SN, PN = {s : Str ; g : Gender} ;
|
||||||
|
|
||||||
|
lincat LN = {s : Str;
|
||||||
|
p : Compl;
|
||||||
|
art : HasArt;
|
||||||
|
g : Gender;
|
||||||
|
num : Number;
|
||||||
|
} ;
|
||||||
|
|
||||||
-- tense augmented with passé simple
|
-- tense augmented with passé simple
|
||||||
lincat
|
lincat
|
||||||
Temp = {s : Str ; t : RTense ; a : Anteriority} ;
|
Temp = {s : Str ; t : RTense ; a : Anteriority} ;
|
||||||
|
|||||||
@@ -218,4 +218,6 @@ oper
|
|||||||
stare_V : Verb ;
|
stare_V : Verb ;
|
||||||
stare_V = essere_V ;
|
stare_V = essere_V ;
|
||||||
|
|
||||||
|
param HasArt ;
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ concrete CatRon of Cat =
|
|||||||
|
|
||||||
N3 = Noun ** {c2,c3 : Compl} ;
|
N3 = Noun ** {c2,c3 : Compl} ;
|
||||||
|
|
||||||
GN, SN, PN = {s : NCase => Str ; g : Gender ; n : Number; a : Animacy} ;
|
GN, SN, LN, PN = {s : NCase => Str ; g : Gender ; n : Number; a : Animacy} ;
|
||||||
|
|
||||||
Comp = {s : Agr => Str} ;
|
Comp = {s : Agr => Str} ;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
--# -path=.:../common:../abstract
|
--# -path=.:../common:../abstract
|
||||||
|
|
||||||
concrete ExtendRon of Extend =
|
concrete ExtendRon of Extend =
|
||||||
CatRon ** ExtendFunctor - [PassVPSlash, GivenName, MaleSurname, FemaleSurname, FullName]
|
CatRon ** ExtendFunctor - [PassVPSlash]
|
||||||
with
|
with
|
||||||
(Grammar = GrammarRon) **
|
(Grammar = GrammarRon) **
|
||||||
open ResRon in {
|
open ResRon in {
|
||||||
@@ -17,12 +17,4 @@ lin iFem_Pron = mkPronoun "eu" "mine" "mie" [] [] "meu" "mea" "mei" "mele" Fem S
|
|||||||
-- KA: derived from PassV2, objects are ignored
|
-- KA: derived from PassV2, objects are ignored
|
||||||
lin PassVPSlash vps = insertSimpObj (\\a => vps.s ! PPasse a.g a.n Indef ANomAcc) auxPassive ** {lock_VP = <>};
|
lin PassVPSlash vps = insertSimpObj (\\a => vps.s ! PPasse a.g a.n Indef ANomAcc) auxPassive ** {lock_VP = <>};
|
||||||
|
|
||||||
lin GivenName, MaleSurname, FemaleSurname = \n -> n ;
|
|
||||||
lin FullName gn sn = { -- KA: guessed
|
|
||||||
s = \\c => gn.s ! No ++ sn.s ! c ;
|
|
||||||
g = gn.g ;
|
|
||||||
n = gn.n ;
|
|
||||||
a = gn.a
|
|
||||||
} ;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,8 @@ concrete GrammarRon of Grammar =
|
|||||||
TextX - [CAdv,Temp,Tense],
|
TextX - [CAdv,Temp,Tense],
|
||||||
-- Prelude, MorphoRon, Coordination,
|
-- Prelude, MorphoRon, Coordination,
|
||||||
StructuralRon,
|
StructuralRon,
|
||||||
TenseRon
|
TenseRon,
|
||||||
|
NamesRon
|
||||||
** {
|
** {
|
||||||
|
|
||||||
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
||||||
|
|||||||
34
src/romanian/NamesRon.gf
Normal file
34
src/romanian/NamesRon.gf
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
concrete NamesRon of Names = CatRon ** open ResRon, Prelude in {
|
||||||
|
|
||||||
|
lin GivenName, MaleSurname, FemaleSurname = \pn -> -- KA: guessed
|
||||||
|
let
|
||||||
|
g = pn.g ;
|
||||||
|
n = pn.n ;
|
||||||
|
ag = agrP3 g n ;
|
||||||
|
hc = getClit pn.a
|
||||||
|
in {
|
||||||
|
s = \\c => {comp = pn.s ! c ;
|
||||||
|
clit = \\cs => if_then_Str hc ((genCliticsCase ag c).s ! cs) [] } ;
|
||||||
|
|
||||||
|
a = ag;
|
||||||
|
nForm = if_then_else NForm hc HasClit (HasRef False) ;
|
||||||
|
isPronoun = False ; isPol = False;
|
||||||
|
indForm = pn.s ! No
|
||||||
|
} ;
|
||||||
|
|
||||||
|
lin FullName gn sn = -- KA: guessed
|
||||||
|
let
|
||||||
|
g = gn.g ;
|
||||||
|
n = gn.n ;
|
||||||
|
ag = agrP3 g n ;
|
||||||
|
hc = getClit gn.a
|
||||||
|
in {
|
||||||
|
s = \\c => {comp = gn.s ! No ++ sn.s ! c ;
|
||||||
|
clit = \\cs => if_then_Str hc ((genCliticsCase ag c).s ! cs) [] } ;
|
||||||
|
a = ag;
|
||||||
|
nForm = if_then_else NForm hc HasClit (HasRef False) ;
|
||||||
|
isPronoun = False ; isPol = False;
|
||||||
|
indForm = gn.s ! No ++ sn.s ! No
|
||||||
|
} ;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
concrete CatRus of Cat = CommonX ** open ResRus, Prelude in {
|
concrete CatRus of Cat = CommonX ** open ResRus, Prelude in {
|
||||||
flags coding=utf8 ; optimize=all ;
|
flags coding=utf8 ; optimize=all ;
|
||||||
lincat
|
lincat
|
||||||
N, GN, SN, PN = ResRus.NounForms ;
|
N, GN, SN, LN, PN = ResRus.NounForms ;
|
||||||
N2 = ResRus.Noun2Forms ;
|
N2 = ResRus.Noun2Forms ;
|
||||||
N3 = ResRus.Noun3Forms ;
|
N3 = ResRus.Noun3Forms ;
|
||||||
|
|
||||||
|
|||||||
@@ -217,26 +217,4 @@ lin
|
|||||||
oper
|
oper
|
||||||
rus_quoted : Str -> Str = \s -> "«" ++ s ++ "»" ; ---- TODO bind ; move to Prelude?
|
rus_quoted : Str -> Str = \s -> "«" ++ s ++ "»" ; ---- TODO bind ; move to Prelude?
|
||||||
|
|
||||||
lin GivenName, MaleSurname, FemaleSurname, PlSurname = \n -> n ;
|
|
||||||
lin FullName gn sn = {
|
|
||||||
snom = gn.snom ++ sn.snom ;
|
|
||||||
sgen = gn.snom ++ sn.sgen ;
|
|
||||||
sdat = gn.snom ++ sn.sdat ;
|
|
||||||
sacc = gn.snom ++ sn.sacc ;
|
|
||||||
sins = gn.snom ++ sn.sins ;
|
|
||||||
sprep = gn.snom ++ sn.sprep ;
|
|
||||||
sloc = gn.snom ++ sn.sloc ;
|
|
||||||
sptv = gn.snom ++ sn.sptv ;
|
|
||||||
svoc = gn.snom ++ sn.svoc ;
|
|
||||||
pnom = gn.snom ++ sn.pnom ;
|
|
||||||
pgen = gn.snom ++ sn.pgen ;
|
|
||||||
pdat = gn.snom ++ sn.pdat ;
|
|
||||||
pacc = gn.snom ++ sn.pacc ;
|
|
||||||
pins = gn.snom ++ sn.pins ;
|
|
||||||
pprep = gn.snom ++ sn.pprep ;
|
|
||||||
g = gn.g ;
|
|
||||||
mayben = gn.mayben ;
|
|
||||||
anim = gn.anim
|
|
||||||
} ;
|
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -14,5 +14,6 @@ concrete GrammarRus of Grammar =
|
|||||||
TextX,
|
TextX,
|
||||||
StructuralRus,
|
StructuralRus,
|
||||||
IdiomRus,
|
IdiomRus,
|
||||||
TenseRus
|
TenseRus,
|
||||||
|
NamesRus
|
||||||
** { flags startcat = Phr ; unlexer = text ; lexer = text ; coding=utf8 ;} ;
|
** { flags startcat = Phr ; unlexer = text ; lexer = text ; coding=utf8 ;} ;
|
||||||
25
src/russian/NamesRus.gf
Normal file
25
src/russian/NamesRus.gf
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
concrete NamesRus of Names = CatRus ** open ResRus, Prelude in {
|
||||||
|
|
||||||
|
lin GivenName, MaleSurname, FemaleSurname, PlSurname = \pn ->
|
||||||
|
{ s=\\cas => (nounFormsNoun pn).s ! Sg ! cas ;
|
||||||
|
pron=False;
|
||||||
|
a=Ag (gennum pn.g Sg) P3
|
||||||
|
} ; -- Does NP need animacy?
|
||||||
|
|
||||||
|
lin FullName gn sn =
|
||||||
|
{ s= table {
|
||||||
|
Nom => gn.snom ++ sn.snom ;
|
||||||
|
Gen => gn.snom ++ sn.sgen ;
|
||||||
|
Dat => gn.snom ++ sn.sdat ;
|
||||||
|
Acc => gn.snom ++ sn.sacc ;
|
||||||
|
Ins => gn.snom ++ sn.sins ;
|
||||||
|
Pre => gn.snom ++ sn.sprep ;
|
||||||
|
Loc => gn.snom ++ sn.sloc ;
|
||||||
|
Ptv => gn.snom ++ sn.sptv ;
|
||||||
|
VocRus => gn.snom ++ sn.svoc
|
||||||
|
} ;
|
||||||
|
pron=False;
|
||||||
|
a=Ag (gennum gn.g Sg) P3
|
||||||
|
} ;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -108,7 +108,7 @@ incomplete concrete CatScand of Cat =
|
|||||||
-- {s : Number => Species => Case => Str ; g : Gender} ;
|
-- {s : Number => Species => Case => Str ; g : Gender} ;
|
||||||
N2 = Noun ** {c2 : Complement} ;
|
N2 = Noun ** {c2 : Complement} ;
|
||||||
N3 = Noun ** {c2,c3 : Complement} ;
|
N3 = Noun ** {c2,c3 : Complement} ;
|
||||||
GN, SN, PN = {s : Case => Str ; g : Gender} ;
|
GN, SN, LN, PN = {s : Case => Str ; g : Gender} ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ lincat
|
|||||||
|
|
||||||
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 : AGender; n : Number};
|
LN, PN = {s : Case => Str; g : AGender; n : Number};
|
||||||
|
|
||||||
linref
|
linref
|
||||||
V, VA, VS, V2, V3, V2A, V2S, V2Q, V2V = \v -> v.s ! VInf ++ v.refl ++ v.p;
|
V, VA, VS, V2, V3, V2A, V2S, V2Q, V2V = \v -> v.s ! VInf ++ v.refl ++ v.p;
|
||||||
|
|||||||
@@ -57,14 +57,5 @@ lin
|
|||||||
youPolPl_Pron = youPol_Pron ;
|
youPolPl_Pron = youPol_Pron ;
|
||||||
youPolPlFem_Pron = youPlFem_Pron ;
|
youPolPlFem_Pron = youPlFem_Pron ;
|
||||||
|
|
||||||
lin GivenName = \n -> {s = n.s; g = sex2agender n.g; n = Sg} ;
|
|
||||||
lin MaleSurname = \n -> {s = n.s ! Male; g = AMasc Animate; n = Sg} ;
|
|
||||||
lin FemaleSurname = \n -> {s = n.s ! Female; g = AFem; n = Sg} ;
|
|
||||||
lin FullName gn sn = {
|
|
||||||
s = \\c => gn.s ! Nom ++ sn.s ! gn.g ! c ;
|
|
||||||
g = sex2agender gn.g ;
|
|
||||||
n = Sg
|
|
||||||
} ;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,8 @@ concrete GrammarSlv of Grammar =
|
|||||||
TextX - [Pol,PPos,PNeg],
|
TextX - [Pol,PPos,PNeg],
|
||||||
StructuralSlv,
|
StructuralSlv,
|
||||||
IdiomSlv, ----AR
|
IdiomSlv, ----AR
|
||||||
TenseX
|
TenseX,
|
||||||
|
NamesSlv
|
||||||
** {
|
** {
|
||||||
|
|
||||||
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
||||||
|
|||||||
24
src/slovenian/NamesSlv.gf
Normal file
24
src/slovenian/NamesSlv.gf
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
concrete NamesSlv of Names = CatSlv ** open ResSlv, Prelude in {
|
||||||
|
|
||||||
|
lin GivenName = \n -> {
|
||||||
|
s = n.s;
|
||||||
|
a = {g=agender2gender (sex2agender n.g); n=Sg; p=P3};
|
||||||
|
isPron = False
|
||||||
|
} ;
|
||||||
|
lin MaleSurname = \n -> {
|
||||||
|
s = n.s ! Male;
|
||||||
|
a = {g=Masc; n=Sg; p=P3};
|
||||||
|
isPron = False
|
||||||
|
} ;
|
||||||
|
lin FemaleSurname = \n -> {
|
||||||
|
s = n.s ! Female;
|
||||||
|
a = {g=Fem; n=Sg; p=P3};
|
||||||
|
isPron = False
|
||||||
|
} ;
|
||||||
|
lin FullName gn sn = {
|
||||||
|
s = \\c => gn.s ! Nom ++ sn.s ! gn.g ! c ;
|
||||||
|
a = {g=agender2gender (sex2agender gn.g); n=Sg; p=P3};
|
||||||
|
isPron = False
|
||||||
|
} ;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -118,7 +118,7 @@ concrete CatSom of Cat = CommonX - [Adv,IAdv] ** open ResSom, Prelude in {
|
|||||||
N = ResSom.Noun ;
|
N = ResSom.Noun ;
|
||||||
N2 = ResSom.Noun2 ;
|
N2 = ResSom.Noun2 ;
|
||||||
N3 = ResSom.Noun3 ;
|
N3 = ResSom.Noun3 ;
|
||||||
GN, SN, PN = ResSom.PNoun ;
|
GN, SN, LN, PN = ResSom.PNoun ;
|
||||||
|
|
||||||
Adv = ResSom.Adverb ; -- Preposition of an adverbial can merge with obligatory complements of the verb.
|
Adv = ResSom.Adverb ; -- Preposition of an adverbial can merge with obligatory complements of the verb.
|
||||||
|
|
||||||
|
|||||||
@@ -17,10 +17,4 @@ lin
|
|||||||
-- FocusAdV : AdV -> S -> Utt ; -- never will I sleep
|
-- FocusAdV : AdV -> S -> Utt ; -- never will I sleep
|
||||||
-- FocusAP : AP -> NP -> Utt ; -- green was the tree
|
-- FocusAP : AP -> NP -> Utt ; -- green was the tree
|
||||||
|
|
||||||
lin GivenName, MaleSurname, FemaleSurname = \n -> n ;
|
|
||||||
lin FullName gn sn = {
|
|
||||||
s = gn.s ++ sn.s ;
|
|
||||||
a = gn.a
|
|
||||||
} ;
|
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -12,7 +12,8 @@ concrete GrammarSom of Grammar =
|
|||||||
TextX - [Adv,IAdv],
|
TextX - [Adv,IAdv],
|
||||||
StructuralSom,
|
StructuralSom,
|
||||||
IdiomSom,
|
IdiomSom,
|
||||||
TenseX - [Adv,IAdv]
|
TenseX - [Adv,IAdv],
|
||||||
|
NamesSom
|
||||||
** {
|
** {
|
||||||
|
|
||||||
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
||||||
|
|||||||
18
src/somali/NamesSom.gf
Normal file
18
src/somali/NamesSom.gf
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
concrete NamesSom of Names = CatSom ** open ResSom, Prelude in {
|
||||||
|
|
||||||
|
lin GivenName, MaleSurname, FemaleSurname = \n -> n ** {
|
||||||
|
s = \\c => n.s ;
|
||||||
|
isPron = False ;
|
||||||
|
st = Definite ;
|
||||||
|
empty = [] ;
|
||||||
|
};
|
||||||
|
|
||||||
|
lin FullName gn sn = {
|
||||||
|
s = \\c => gn.s ++ sn.s ;
|
||||||
|
a = gn.a ;
|
||||||
|
isPron = False ;
|
||||||
|
st = Definite ;
|
||||||
|
empty = [] ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -237,4 +237,7 @@ instance DiffSpa of DiffRomance - [iAdvQuestionInv,otherInv,partAgr,stare_V,vpAg
|
|||||||
|
|
||||||
polNegDirSubj = RPos ;
|
polNegDirSubj = RPos ;
|
||||||
|
|
||||||
|
param
|
||||||
|
HasArt = NoArt | UseArt ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -106,12 +106,6 @@ concrete ExtendSpa of Extend = CatSpa ** ExtendRomanceFunctor -
|
|||||||
lin UseComp_estar comp = insertComplement comp.s (predV I.estar_V) ;
|
lin UseComp_estar comp = insertComplement comp.s (predV I.estar_V) ;
|
||||||
UseComp_ser comp = insertComplement comp.s (predV copula) ;
|
UseComp_ser comp = insertComplement comp.s (predV copula) ;
|
||||||
|
|
||||||
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
|
||||||
vps (let by = <Grammar.by8agent_Prep : Prep> in by.s ++ (np.s ! by.c).ton) ;
|
vps (let by = <Grammar.by8agent_Prep : Prep> in by.s ++ (np.s ! by.c).ton) ;
|
||||||
|
|||||||
@@ -14,7 +14,8 @@ concrete GrammarSpa of Grammar =
|
|||||||
TextSpa - [SC,Temp,Tense,Pol,PPos,PNeg], -- special punctuation
|
TextSpa - [SC,Temp,Tense,Pol,PPos,PNeg], -- special punctuation
|
||||||
IdiomSpa,
|
IdiomSpa,
|
||||||
StructuralSpa,
|
StructuralSpa,
|
||||||
TenseSpa
|
TenseSpa,
|
||||||
|
NamesSpa
|
||||||
|
|
||||||
** {
|
** {
|
||||||
|
|
||||||
|
|||||||
52
src/spanish/NamesSpa.gf
Normal file
52
src/spanish/NamesSpa.gf
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
concrete NamesSpa of Names = CatSpa ** open Prelude, ResSpa, CommonRomance in {
|
||||||
|
|
||||||
|
lin GivenName, MaleSurname, FemaleSurname, PlSurname = \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 {
|
||||||
|
UseArt => case n.g of {
|
||||||
|
Fem => case n.num of {
|
||||||
|
Sg => "la" ++ n.s;
|
||||||
|
Pl => "las" ++ n.s} ;
|
||||||
|
Masc => case n.num of {
|
||||||
|
Sg => "el" ++ n.s;
|
||||||
|
Pl => "los" ++ n.s
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
NoArt => n.s
|
||||||
|
} ;
|
||||||
|
a = {g = n.g ; n = n.num ; p = P3}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
lin InLN n = {
|
||||||
|
s = n.p.s ++ case n.art of {
|
||||||
|
UseArt => case n.g of {
|
||||||
|
Fem => case n.num of {
|
||||||
|
Sg => "la" ++ n.s;
|
||||||
|
Pl => "las" ++ n.s} ;
|
||||||
|
Masc => case n.num of {
|
||||||
|
Sg => "el" ++ n.s;
|
||||||
|
Pl => "los" ++ n.s
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
NoArt => n.s
|
||||||
|
} ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
lin AdjLN ap n = n ** {
|
||||||
|
s = preOrPost ap.isPre (ap.s ! AF n.g n.num) n.s ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -137,6 +137,25 @@ oper
|
|||||||
-- Proper names need a string and a gender.
|
-- Proper names need a string and a gender.
|
||||||
-- The default gender is feminine for names ending with "a", otherwise masculine.
|
-- The default gender is feminine for names ending with "a", otherwise masculine.
|
||||||
|
|
||||||
|
mkLN = overload {
|
||||||
|
mkLN : Str -> Gender -> LN = \s,g ->
|
||||||
|
lin LN {s = s ;
|
||||||
|
p = {s = "en"; c = Nom; isDir = True} ;
|
||||||
|
art = NoArt ;
|
||||||
|
g = g ;
|
||||||
|
num = Sg} ;
|
||||||
|
|
||||||
|
mkLN : Str -> Gender -> Number -> LN = \s,g,num ->
|
||||||
|
lin LN {s = s ;
|
||||||
|
p = {s = "en"; c = Nom; isDir = True} ;
|
||||||
|
art = NoArt ;
|
||||||
|
g = g ;
|
||||||
|
num = num} ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
defLN : LN -> LN = \n -> n ** {art = UseArt} ;
|
||||||
|
|
||||||
mkPN : overload {
|
mkPN : overload {
|
||||||
mkPN : (Anna : Str) -> PN ; -- feminine for "-a"
|
mkPN : (Anna : Str) -> PN ; -- feminine for "-a"
|
||||||
mkPN : (Pilar : Str) -> Gender -> PN ; -- force gender
|
mkPN : (Pilar : Str) -> Gender -> PN ; -- force gender
|
||||||
|
|||||||
@@ -14,7 +14,8 @@ concrete GrammarSwa of Grammar =
|
|||||||
TextX,
|
TextX,
|
||||||
StructuralSwa,
|
StructuralSwa,
|
||||||
IdiomSwa,
|
IdiomSwa,
|
||||||
TenseX
|
TenseX,
|
||||||
|
NamesSwa
|
||||||
** {
|
** {
|
||||||
|
|
||||||
flags startcat = Phr ;
|
flags startcat = Phr ;
|
||||||
|
|||||||
1
src/swahili/NamesSwa.gf
Normal file
1
src/swahili/NamesSwa.gf
Normal file
@@ -0,0 +1 @@
|
|||||||
|
concrete NamesSwa of Names = CatSwa ** { }
|
||||||
@@ -393,10 +393,4 @@ lin UseDAPMasc, UseDAPFem = \dap ->
|
|||||||
lin CardCNCard card cn =
|
lin CardCNCard card cn =
|
||||||
{s = \\g => card.s ! cn.g ++ cn.s ! card.n ! DIndef ! Nom ; n = Pl} ;
|
{s = \\g => card.s ! cn.g ++ cn.s ! card.n ! DIndef ! Nom ; n = Pl} ;
|
||||||
|
|
||||||
lin GivenName, MaleSurname, FemaleSurname = \n -> n ;
|
|
||||||
lin FullName gn sn = {
|
|
||||||
s = \\c => gn.s ! Nom ++ sn.s ! c ;
|
|
||||||
g = gn.g
|
|
||||||
} ;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,8 @@ concrete GrammarSwe of Grammar =
|
|||||||
TextX -[Tense,Temp],
|
TextX -[Tense,Temp],
|
||||||
IdiomSwe,
|
IdiomSwe,
|
||||||
StructuralSwe,
|
StructuralSwe,
|
||||||
TenseSwe
|
TenseSwe,
|
||||||
|
NamesSwe
|
||||||
** {
|
** {
|
||||||
|
|
||||||
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
||||||
|
|||||||
14
src/swedish/NamesSwe.gf
Normal file
14
src/swedish/NamesSwe.gf
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
concrete NamesSwe of Names = CatSwe ** open CommonScand, ResSwe, Prelude in {
|
||||||
|
|
||||||
|
lin GivenName, MaleSurname, FemaleSurname = \pn -> {
|
||||||
|
s = \\c => pn.s ! caseNP c ;
|
||||||
|
a = agrP3 pn.g Sg ;
|
||||||
|
isPron = False
|
||||||
|
} ;
|
||||||
|
lin FullName gn sn = {
|
||||||
|
s = \\c => gn.s ! Nom ++ sn.s ! caseNP c ;
|
||||||
|
a = agrP3 gn.g Sg ;
|
||||||
|
isPron = False
|
||||||
|
} ;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -71,6 +71,6 @@ concrete CatTha of Cat = CommonX ** open ResTha, Prelude in {
|
|||||||
N = ResTha.Noun ;
|
N = ResTha.Noun ;
|
||||||
N2 = ResTha.Noun ** {c2 : Str} ;
|
N2 = ResTha.Noun ** {c2 : Str} ;
|
||||||
N3 = ResTha.Noun ** {c2,c3 : Str} ;
|
N3 = ResTha.Noun ** {c2,c3 : Str} ;
|
||||||
GN, SN, PN = ResTha.NP ;
|
GN, SN, LN, PN = ResTha.NP ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,8 @@ concrete GrammarTha of Grammar =
|
|||||||
TextTha,
|
TextTha,
|
||||||
StructuralTha,
|
StructuralTha,
|
||||||
IdiomTha,
|
IdiomTha,
|
||||||
TenseX
|
TenseX,
|
||||||
|
NamesTha
|
||||||
** {
|
** {
|
||||||
|
|
||||||
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
||||||
|
|||||||
1
src/thai/NamesTha.gf
Normal file
1
src/thai/NamesTha.gf
Normal file
@@ -0,0 +1 @@
|
|||||||
|
concrete NamesTha of Names = CatTha ** { }
|
||||||
@@ -49,7 +49,7 @@ concrete CatTur of Cat = CommonX - [CAdv,AdN] ** open ResTur, HarmonyTur, Prelud
|
|||||||
N = Noun ;
|
N = Noun ;
|
||||||
N2 = Noun ** {c : Prep} ;
|
N2 = Noun ** {c : Prep} ;
|
||||||
N3 = Noun ** {c1,c2 : Prep} ;
|
N3 = Noun ** {c1,c2 : Prep} ;
|
||||||
GN, SN, PN = {
|
GN, SN, LN, PN = {
|
||||||
s : Case => Str ;
|
s : Case => Str ;
|
||||||
h : Harmony ;
|
h : Harmony ;
|
||||||
n : Number
|
n : Number
|
||||||
|
|||||||
@@ -7,12 +7,4 @@ concrete ExtendTur of Extend = CatTur ** open ResTur in {
|
|||||||
a = {n=num.n; p=P3} ;
|
a = {n=num.n; p=P3} ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
lin GivenName, MaleSurname, FemaleSurname = \n -> n ** {n = Sg};
|
|
||||||
lin PlSurname = \n -> n ** {n = Pl};
|
|
||||||
lin FullName gn sn = {
|
|
||||||
s = \\c => gn.s ! Nom ++ sn.s ! c ;
|
|
||||||
h = sn.h ;
|
|
||||||
n = Sg
|
|
||||||
} ;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,8 @@ concrete GrammarTur of Grammar =
|
|||||||
StructuralTur,
|
StructuralTur,
|
||||||
PhraseTur,
|
PhraseTur,
|
||||||
IdiomTur,
|
IdiomTur,
|
||||||
TenseX - [CAdv, AdN]
|
TenseX - [CAdv, AdN],
|
||||||
|
NamesTur
|
||||||
** {
|
** {
|
||||||
|
|
||||||
flags startcat = Phr ;
|
flags startcat = Phr ;
|
||||||
|
|||||||
19
src/turkish/NamesTur.gf
Normal file
19
src/turkish/NamesTur.gf
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
concrete NamesTur of Names = CatTur ** open ResTur in {
|
||||||
|
|
||||||
|
lin GivenName, MaleSurname, FemaleSurname = \n -> {
|
||||||
|
s = \\c => n.s ! c;
|
||||||
|
h = n.h;
|
||||||
|
a = {n = Sg; p = P3}
|
||||||
|
} ;
|
||||||
|
lin PlSurname = \n -> {
|
||||||
|
s = \\c => n.s ! c;
|
||||||
|
h = n.h;
|
||||||
|
a = {n = Pl; p = P3}
|
||||||
|
} ;
|
||||||
|
lin FullName gn sn = {
|
||||||
|
s = \\c => gn.s ! Nom ++ sn.s ! c;
|
||||||
|
h = sn.h;
|
||||||
|
a = {n = Sg; p = P3}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user