1
0
forked from GitHub/gf-rgl

17 Commits

Author SHA1 Message Date
Inari Listenmaa
8d40fdf79f (Lav) replace Case in VP and Prep by smaller param 2023-08-16 10:25:50 +03:00
Inari Listenmaa
91237f753c (May) don't use API due to problem with path 2023-08-14 15:43:27 +03:00
Krasimir Angelov
d25d648134 add linref for LN 2023-08-11 11:31:00 +02:00
Krasimir Angelov
531e2c2dd2 progress on the Names API 2023-08-07 21:15:48 +02:00
Krasimir Angelov
9fcee982e5 Merge branch 'master' of github.com:GrammaticalFramework/gf-rgl 2023-08-07 15:59:45 +02:00
Krasimir Angelov
1b696739be mkLN in Catalan, Italian and Portuguese 2023-08-07 15:59:19 +02:00
Krasimir Angelov
fb48791d6a fix definite articles 2023-08-06 21:30:30 +02:00
Inari Listenmaa
27e6295655 Merge pull request #430 from GrammaticalFramework/misc-malay-eng
Misc small things for Malay and English
2023-08-04 17:20:46 +08:00
Inari Listenmaa
dc8da4a212 (May) remove new lins from MissingMay 2023-08-04 17:19:40 +08:00
Inari Listenmaa
e91b613e1a (May) Misc new words and funs 2023-08-04 17:19:14 +08:00
Inari Listenmaa
f7e9357ed4 (Eng) ize~ise variants in us_britishV 2023-08-04 16:29:01 +08:00
Krasimir Angelov
22a168198b support for measurement units 2023-07-25 19:38:43 +02:00
Krasimir Angelov
5d912f78a4 floating point numerals 2023-07-24 20:06:01 +02:00
Krasimir Angelov
cb26429655 added missing param 2023-07-24 20:01:56 +02:00
Krasimir Angelov
1910ba1b2a Merge branch 'master' of github.com:GrammaticalFramework/gf-rgl 2023-07-24 17:30:43 +02:00
Krasimir Angelov
645de9955a started a separate module for names 2023-07-24 17:24:13 +02:00
Inari Listenmaa
2023af9a45 Merge pull request #429 from GrammaticalFramework/somali-verbs-contractions
(Som) Updates to verb morphology and adposition contractions
2023-06-11 21:17:31 +02:00
169 changed files with 1245 additions and 383 deletions

View File

@@ -128,7 +128,8 @@ abstract Cat = Common ** {
N3 ; -- three-place relational noun e.g. "connection"
GN ; -- given name e.g. "George"
SN ; -- second name e.g. "Washington"
PN ; -- proper name e.g. "Paris"
LN ; -- location name e.g. "Sweden"
PN ; -- proper name
-- DEPRECATED: QuantSg, QuantPl
--- QuantSg ;-- quantifier ('nucleus' of sing. Det) e.g. "every"

View File

@@ -44,4 +44,8 @@ abstract Common = {
Pol ; -- polarity e.g. positive, negative
Ant ; -- anteriority e.g. simultaneous, anterior
--2 Measures
MU ; -- unit of measurement e.g. "km", "cm", "%"
}

View File

@@ -14,6 +14,7 @@ fun
InflectionN2 : N2 -> Inflection ;
InflectionN3 : N3 -> Inflection ;
InflectionPN : PN -> Inflection ;
InflectionLN : LN -> Inflection ;
InflectionGN : GN -> Inflection ;
InflectionSN : SN -> Inflection ;
InflectionA : A -> Inflection ;

View File

@@ -297,12 +297,6 @@ fun
fun
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
AnaphPron : NP -> Pron ;

View File

@@ -19,6 +19,6 @@ abstract Grammar =
Structural,
Idiom,
Tense,
Names,
Transfer
;

14
src/abstract/Names.gf Normal file
View 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 ;
}

View File

@@ -58,6 +58,7 @@ abstract Noun = Cat ** {
data
NumDigits : Digits -> Card ; -- 51
NumFloat : Digits -> Digits -> Card ; -- 3.14
NumNumeral : Numeral -> Card ; -- fifty-one
-- The construction of numerals is defined in [Numeral Numeral.html].
@@ -155,4 +156,9 @@ abstract Noun = Cat ** {
AdjDAP : DAP -> AP -> DAP ; -- the large (one)
DetDAP : Det -> DAP ; -- this (or that)
--2 Quantities
QuantityNP : Digits -> MU -> NP ;
QuantityFloatNP : Digits -> Digits -> MU -> NP ;
}

View File

@@ -83,6 +83,6 @@ concrete CatAfr of Cat =
N = Noun ;
N2 = {s : NForm => Str ; g : Gender} ** {c2 : Preposition} ;
N3 = {s : NForm => Str ; g : Gender} ** {c2,c3 : Preposition} ;
GN, SN, PN = {s : NPCase => Str} ;
GN, SN, LN, PN = {s : NPCase => Str} ;
}

View File

@@ -28,6 +28,12 @@ lin
s2 = paragraph (pn.s ! NPNom)
} ;
InflectionLN = \ln -> {
t = "ln" ;
s1 = heading1 "Naam" ;
s2 = paragraph (ln.s ! NPNom)
} ;
InflectionGN = \pn -> {
t = "vnm" ;
s1 = heading1 "Voornaam" ;

View File

@@ -12,9 +12,4 @@ lin PassVPSlash vps =
PassAgentVPSlash vps np =
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 ;
} ;
}

View File

@@ -14,4 +14,5 @@ concrete GrammarAfr of Grammar =
TextX,
IdiomAfr,
StructuralAfr,
TenseX ;
TenseX,
NamesAfr ;

View 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} ;
}

View File

@@ -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 } ;
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 } ;
OrdNumeral numeral = {s = \\af => numeral.s ! NOrd af} ;
@@ -177,4 +179,16 @@ concrete NounAfr of Noun = CatAfr ** open ResAfr, Prelude in {
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
} ;
}

View File

@@ -494,4 +494,6 @@ oper
--
--}
mkMU : Str -> MU = \s -> lin MU {s=s; isPre=False} ;
}

View File

@@ -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 : 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} ;
linref

View File

@@ -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} ;
GN = {s : Str; g : Sex} ;
SN = {s : Sex => Str; pl : Str} ;
LN = {s : Species => Str; c : Preposition; gn : GenNum} ;
PN = {s : Str; gn : GenNum} ;
lindef

View File

@@ -92,6 +92,21 @@ lin
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 -> {
t = "същ.с.л." ;
s1= heading1 (case gn.g of {

View File

@@ -303,27 +303,6 @@ lin UseDAP dap = {
lin UseComp_estar = 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 AnaphPron np =

View File

@@ -15,7 +15,8 @@ concrete GrammarBul of Grammar =
TextBul,
StructuralBul,
IdiomBul,
TenseX - [CAdv,IAdv,AdV,SC]
TenseX - [CAdv,IAdv,AdV,SC],
NamesBul
** {
flags coding=utf8 ;

View File

@@ -165,6 +165,7 @@ oper
NF Sg Indef => sg ;
NF Sg Def => case sg of {
_+"а"=>sg+"та" ;
_+"ю"=>sg+"та" ;
_+"я"=>sg+"та" ;
_+"о"=>sg+"то" ;
_+"у"=>sg+"то" ;

View File

@@ -291,6 +291,17 @@ oper
\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
--

56
src/bulgarian/NamesBul.gf Normal file
View 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
}
} ;
}

View File

@@ -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}} ;
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}} ;
OrdNumeral numeral = {s = \\aform => numeral.s ! NOrd aform} ;
@@ -238,4 +240,17 @@ concrete NounBul of Noun = CatBul ** open ResBul, Prelude in {
p = dap.p
} ;
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
} ;
}

View File

@@ -2116,4 +2116,7 @@ oper
adjAdv : A -> Str -> A =
\a,adv -> a ** {adv = adv} ;
mkMU : Str -> MU = \s -> lin MU {s=s; isPre=False} ;
}

View File

@@ -859,4 +859,9 @@ resource ResBul = ParamX ** open Prelude, Predef in {
Female => Fem
} ;
vyv_Str : Str
= pre { "в" ;
"във" / strs {"в" ; "ф" ; "В" ; "Ф"}
} ;
}

View File

@@ -44,9 +44,7 @@ concrete StructuralBul of Structural = CatBul **
if_Subj = ss "ако" ;
in8front_Prep = mkPrep "пред" ;
i_Pron = mkPron "аз" "мой" "моя" "моят" "моя" "моята" "мое" "моето" "мои" "моите" (GSg Masc) PronP1 ;
in_Prep = mkPrep (pre { "в" ;
"във" / strs {"в" ; "ф" ; "В" ; "Ф"}
}) ;
in_Prep = mkPrep vyv_Str ;
it_Pron = mkPron "то" "негов" "неговия" "неговият" "негова" "неговата" "негово" "неговото" "негови" "неговите" (GSg Neut) PronP3 ;
less_CAdv = X.mkCAdv "по-малко" "от" ;
many_Det = mkDeterminerPl "много" ;

View File

@@ -225,4 +225,7 @@ oper
polNegDirSubj = RPos ;
param
HasArt = NoArt | UseArt ;
}

View File

@@ -15,10 +15,4 @@ concrete ExtendCat of Extend = CatCat ** ExtendRomanceFunctor-- -
ParadigmsCat in {
-- put your own definitions here
lin GivenName, MaleSurname, FemaleSurname = \n -> n ;
lin FullName gn sn = {
s = gn.s ++ sn.s ;
g = gn.g
} ;
} ;

View File

@@ -14,7 +14,8 @@ concrete GrammarCat of Grammar =
TextX - [SC,Temp,Tense,Pol,PPos,PNeg],
IdiomCat,
StructuralCat,
TenseCat
TenseCat,
NamesCat
** {

9
src/catalan/NamesCat.gf Normal file
View 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
} ;
}

View File

@@ -139,6 +139,12 @@ oper
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
@@ -553,6 +559,6 @@ oper
mk2V2 : V -> Prep -> V2 ;
dirV2 : V -> V2 ;
mkMU : Str -> MU = \s -> lin MU {s=s; isPre=False} ;
} ;

View File

@@ -80,7 +80,7 @@ concrete CatChi of Cat = CommonX - [Tense, Temp, Ant, Adv] ** open ResChi, Prelu
N = ResChi.Noun ;
N2 = ResChi.Noun ** {c2 : Preposition} ;
N3 = ResChi.Noun ** {c2,c3 : Preposition} ;
GN, SN, PN = SS ;
GN, SN, LN, PN = SS ;
-- overridden

View File

@@ -117,6 +117,12 @@ lin
s2 = n.s
} ;
InflectionLN = \n -> {
t = "v" ;
s1 = heading1 "Location Name" ;
s2 = n.s
} ;
InflectionGN = \n -> {
t = "v" ;
s1 = heading1 "Given Name" ;

View File

@@ -11,7 +11,7 @@ concrete ExtendChi of Extend = CatChi **
, MkVPI2, BaseVPI2, ConsVPI2, ConjVPI2, ComplVPI2
, ProDrop, ComplDirectVS, ComplDirectVQ
, PassVPSlash, PassAgentVPSlash
, GerundAdv, GerundNP, ByVP ]
, GerundAdv, GerundNP, ByVP, ApposNP ]
with (Grammar=GrammarChi) ** open
Prelude
, Coordination
@@ -83,13 +83,11 @@ concrete ExtendChi of Extend = CatChi **
AdvVP (UseV <lin V vq : V>)
(mkAdv (":" ++ quoted utt.s)) ; -- DEFAULT complement added as Adv in quotes
lin
ApposNP np1 np2 = {s = np1.s ++ np2.s; det = np1.det} ;
oper
mkAdv : Str -> CatChi.Adv ;
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
} ;
};

View File

@@ -14,7 +14,8 @@ concrete GrammarChi of Grammar =
TextChi,
StructuralChi,
IdiomChi,
TenseChi
TenseChi,
NamesChi
** {
flags startcat = Phr ; unlexer = text ; lexer = text ;

11
src/chinese/NamesChi.gf Normal file
View 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 = []} ;
}

View File

@@ -215,6 +215,8 @@ oper
= \s -> lin RP {s = table {True => [] ; False => word s}} ;
mkMU : Str -> MU = \s -> lin MU {s=s; isPre=False} ;
--. auxiliary
oper

View File

@@ -1,4 +1,4 @@
concrete CommonX of Common = open (R = ParamX) in {
concrete CommonX of Common = open (R = ParamX), Prelude in {
lincat
Text = {s : Str} ;
@@ -20,4 +20,6 @@ concrete CommonX of Common = open (R = ParamX) in {
Ant = {s : Str ; a : R.Anteriority} ;
Pol = {s : Str ; p : R.Polarity} ;
MU = {s : Str ; isPre : Bool} ;
}

View File

@@ -81,6 +81,6 @@ concrete CatDut of Cat =
N = Noun ;
N2 = {s : NForm => Str ; g : Gender} ** {c2 : Preposition} ;
N3 = {s : NForm => Str ; g : Gender} ** {c2,c3 : Preposition} ;
GN, SN, PN = {s : NPCase => Str} ;
GN, SN, LN, PN = {s : NPCase => Str} ;
}

View File

@@ -121,9 +121,4 @@ lin
isPron = False
} ;
lin GivenName, MaleSurname, FemaleSurname = \n -> n ;
lin FullName gn sn = {
s = \\c => gn.s ! NPNom ++ sn.s ! c
} ;
}

View File

@@ -14,4 +14,5 @@ concrete GrammarDut of Grammar =
TextX,
IdiomDut,
StructuralDut,
TenseX ;
TenseX,
NamesDut ;

9
src/dutch/NamesDut.gf Normal file
View 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} ;
}

View File

@@ -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 } ;
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 } ;
OrdNumeral numeral = {s = let tiende : AForm => Str = \\af => numeral.s ! NOrd af
in table {APred => tiende ! AAttr Utr ;
@@ -199,4 +201,16 @@ concrete NounDut of Noun = CatDut ** open ResDut, Prelude in {
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
} ;
}

View File

@@ -439,4 +439,6 @@ oper
--
--}
mkMU : Str -> MU = \s -> lin MU {s=s; isPre=False} ;
}

View File

@@ -107,6 +107,11 @@ concrete CatEng of Cat = CommonX - [Pol,CAdv] ** open ResEng, Prelude in {
N2 = {s : Number => Case => Str ; g : Gender} ** {c2 : Str} ;
N3 = {s : Number => Case => Str ; g : Gender} ** {c2,c3 : Str} ;
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
SSlash = \s -> {s = s; c2 = ""} ;

View File

@@ -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 -> {
t = "gn" ;
s1 = heading1 ("Given Name" ++

View File

@@ -474,13 +474,6 @@ lin CardCNCard card cn =
lin theyFem_Pron = mkPron "they" "them" "their" "theirs" plural P3 feminine ;
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 =
case np.a of {
AgP1 Sg => i_Pron ;

View File

@@ -14,7 +14,8 @@ concrete GrammarEng of Grammar =
TextX - [Pol,PPos,PNeg,SC,CAdv],
StructuralEng,
IdiomEng,
TenseX - [Pol,PPos,PNeg,SC,CAdv]
TenseX - [Pol,PPos,PNeg,SC,CAdv],
NamesEng
** open ResEng, Prelude in {
flags startcat = Phr ; unlexer = text ; lexer = text ;

31
src/english/NamesEng.gf Normal file
View 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) ;
} ;
}

View File

@@ -77,6 +77,8 @@ concrete NounEng of Noun = CatEng ** open MorphoEng, ResEng, Prelude in {
NumDigits n = {s,sp = \\_ => n.s ! NCard ; n = n.n} ;
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} ;
OrdNumeral numeral = {s = numeral.s ! True ! NOrd} ;
@@ -174,4 +176,14 @@ concrete NounEng of Noun = CatEng ** open MorphoEng, ResEng, Prelude in {
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
} ;
}

View File

@@ -129,6 +129,24 @@ oper
--
-- 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 : Str -> PN ;
@@ -598,6 +616,8 @@ mkVoc s = lin Voc (ss s) ;
us_britishV : Str -> V = \s -> case s of {
_ + ("el" | "al" | "ol") => regV s | mkV s (s + "s") (s + "led") (s + "led") (s + "ling") ;
_ + "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
} ;
@@ -777,6 +797,8 @@ mkVoc s = lin Voc (ss s) ;
mk2Conj : Str -> Str -> Number -> Conj = \x,y,n ->
lin Conj (sd2 x y ** {n = n}) ;
mkMU : Str -> MU = \s -> lin MU {s=s; isPre=False} ;
---- obsolete
-- Comparison adjectives may two more forms.

View File

@@ -91,7 +91,7 @@ concrete CatEst of Cat = CommonX ** open HjkEst, ResEst, Prelude in {
c2,c3 : Compl ;
isPre,isPre2 : Bool
} ;
GN, SN, PN = {s : Case => Str} ;
GN, SN, LN, PN = {s : Case => Str} ;
linref
VP = \vp -> linV vp.v ;

View File

@@ -436,10 +436,4 @@ concrete ExtendEst of Extend =
-- : VP -> Adv ; -- ilma raamatut nägemata
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
} ;
}

View File

@@ -12,7 +12,8 @@ concrete GrammarEst of Grammar =
TextX,
IdiomEst,
StructuralEst,
TenseX
TenseX,
NamesEst
** {
flags startcat = Phr ; unlexer = finnish ; lexer = text ;

20
src/estonian/NamesEst.gf Normal file
View 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
} ;
}

View File

@@ -120,6 +120,11 @@ concrete NounEst of Noun = CatEst ** open ResEst, HjkEst, MorphoEst, Prelude in
} ;
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 = {
s = \\n,c => numeral.s ! NCard (NCase n c) ;
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
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
numN : NForm -> Number = \nf -> case nf of {
NCase n _ => n

View File

@@ -922,4 +922,6 @@ oper
mkAV a = a ;
mkA2V a p = mkA2 a p ;
mkMU : Str -> MU = \s -> lin MU {s=s; isPre=False} ;
} ;

View File

@@ -95,7 +95,7 @@ concrete CatFin of Cat = CommonX ** open ResFin, StemFin, Prelude in {
N = SNoun ;
N2 = SNoun ** {c2 : Compl ; isPre : Bool ; postmod : Number => Str} ;
N3 = SNoun ** {c2,c3 : Compl ; isPre,isPre2 : Bool} ;
GN, SN, PN = SPN ;
GN, SN, LN, PN = SPN ;
linref
SSlash = \ss -> ss.s ++ ss.c2.s.p1 ;

View File

@@ -37,6 +37,12 @@ lin
s2 = inflPN (\c -> pn.s ! c)
} ;
InflectionLN = \pn -> {
t = "s" ;
s1 = heading1 (heading noun_Category) ;
s2 = inflPN (\c -> pn.s ! c)
} ;
InflectionGN = \pn -> {
t = "s" ;
s1 = heading1 "Etunimi" ;

View File

@@ -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 AdjAsNP ap = MassNP (AdjAsCN ap) ;
lin GivenName, MaleSurname, FemaleSurname = \n -> n ;
lin FullName gn sn = {
s = \\c => gn.s ! Nom ++ sn.s ! c
} ;
}

View File

@@ -14,7 +14,8 @@ concrete GrammarFin of Grammar =
TextX,
IdiomFin,
StructuralFin,
TenseX
TenseX,
NamesFin
** {
flags startcat = Phr ; unlexer = finnish ; lexer = text ;

20
src/finnish/NamesFin.gf Normal file
View 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
} ;
}

View File

@@ -143,6 +143,11 @@ concrete NounFin of Noun = CatFin ** open ResFin, MorphoFin, StemFin, Prelude in
} ;
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 = {
s = \\n,c => numeral.s ! NCard (NCase n c) ;
n = numeral.n
@@ -291,6 +296,20 @@ concrete NounFin of Noun = CatFin ** open ResFin, MorphoFin, StemFin, Prelude in
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
numN : NForm -> Number = \nf -> case nf of {
NCase n _ => n ;

View File

@@ -1050,4 +1050,6 @@ mkVS = overload {
mkAV v = v ** {lock_A = <>} ;
--- mkA2V v p = mkA2 <v : A> p ** {lock_A2 = <>} ;
mkMU : Str -> MU = \s -> lin MU {s=s; isPre=False} ;
} ;

View File

@@ -338,4 +338,7 @@ instance DiffFre of DiffRomance - [
verbHyphen : Verb -> Str = \v -> v.s ! (VInfin True) ; --- kluge: use this field to store - or -t-
param
HasArt = NoArt | UseArt | AlwaysArt ;
} ;

View File

@@ -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
} ;
}

View File

@@ -14,7 +14,8 @@ concrete GrammarFre of Grammar =
TextX - [SC,Temp,Tense,Pol,PPos,PNeg],
IdiomFre,
StructuralFre,
TenseFre
TenseFre,
NamesFre
** {
flags startcat = Phr ;

35
src/french/NamesFre.gf Normal file
View 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 ;
} ;
}

View File

@@ -132,6 +132,27 @@ oper
-- 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.
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 : Str -> PN ; -- feminine if ends with "e", otherwise masculine
mkPN : Str -> Gender -> PN ; -- gender deviant from the simple rule
@@ -553,5 +574,6 @@ oper
_ => VFalse -- prend-il
} ;
mkMU : Str -> MU = \s -> lin MU {s=s; isPre=False} ;
} ;

View File

@@ -102,7 +102,7 @@ concrete CatGer of Cat =
N3 = ResGer.Noun ** {c2,c3 : Preposition} ;
GN = {s : Case => Str; g : Sex} ;
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

View File

@@ -142,16 +142,6 @@ lin
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 =
insertObj (\\_ => (PastPartAP vp).s ! APred) (predV werdenPass) **
{ c1 = subjPrep vp.c2 } ;

View File

@@ -14,7 +14,8 @@ concrete GrammarGer of Grammar =
TextX - [Tense,Temp],
IdiomGer,
StructuralGer,
TenseGer
TenseGer,
NamesGer
** {
flags startcat = Phr ; unlexer = text ; lexer = text ;

45
src/german/NamesGer.gf Normal file
View 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 = []
} ;
}

View File

@@ -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 } ;
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 } ;
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 ;
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 = "" ;
} ;
}

View File

@@ -771,4 +771,6 @@ mkV2 : overload {
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} ;
}

View File

@@ -251,4 +251,7 @@ instance DiffIta of DiffRomance - [contractInf] = open CommonRomance, PhonoIta,
polNegDirSubj = RPos ;
param
HasArt = NoArt | UseArt ;
}

View File

@@ -16,12 +16,6 @@ concrete ExtendIta of Extend = CatIta ** ExtendRomanceFunctor -
ParadigmsIta in {
-- 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 [] ;
PassAgentVPSlash vps np = passVPSlash

View File

@@ -14,7 +14,8 @@ concrete GrammarIta of Grammar =
TextX - [SC,Temp,Tense,Pol,PPos,PNeg,TPres,TPast,TFut,TCond],
IdiomIta,
StructuralIta,
TenseIta
TenseIta,
NamesIta
** {

9
src/italian/NamesIta.gf Normal file
View 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
} ;
}

View File

@@ -145,6 +145,12 @@ oper
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
@@ -558,4 +564,6 @@ oper
mk2V2 : V -> Prep -> V2 ;
dirV2 : V -> V2 ;
mkMU : Str -> MU = \s -> lin MU {s=s; isPre=False} ;
} ;

View File

@@ -115,7 +115,7 @@ concrete CatKor of Cat = CommonX ** open ResKor, Prelude in {
N = ResKor.Noun ;
N2 = ResKor.Noun2 ;
N3 = ResKor.Noun3 ;
GN, SN, PN = ResKor.NounPhrase ;
GN, SN, LN, PN = ResKor.NounPhrase ;
linref
V, V2, V3 = linVerb ;

View File

@@ -9,10 +9,4 @@ concrete ExtendKor of Extend = CatKor
-- : NP -> NP -> NP
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
} ;
} ;

View File

@@ -12,7 +12,8 @@ concrete GrammarKor of Grammar =
TextX,
StructuralKor,
IdiomKor,
TenseX
TenseX,
NamesKor
** {
flags startcat = Phr ; unlexer = text ; lexer = text ;

11
src/korean/NamesKor.gf Normal file
View 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 ;
}

View File

@@ -107,6 +107,12 @@ concrete NounKor of Noun = CatKor ** open ResKor, Prelude in {
numtype = IsDig
} ;
NumFloat dig1 dig2 = baseNum ** {
s = \\_,_ => dig1.s ! NCard ++ BIND ++ "." ++ BIND ++ dig2.s ! NCard ;
n = Pl ;
numtype = IsDig
} ;
-- : Numeral -> Card ;
NumNumeral num = num ;

View File

@@ -198,4 +198,6 @@ oper
} ;
--------------------------------------------------------------------------------
mkMU : Str -> MU = \s -> lin MU {s=s; isPre=False} ;
}

View File

@@ -21,12 +21,12 @@ lin
-- e.g. "married to her"
ComplA2 a np = {
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) ;
True => a.prep.s ++ np.s ! (a.prep.c ! (fromAgr np.agr).num) ++ a.s ! (AAdj Posit d g n c)
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 ! 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 } ;

View File

@@ -16,7 +16,7 @@ lin
-- Prep -> NP -> Adv
-- e.g. "in the house"
-- 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
-- e.g. "more warmly than John"

View File

@@ -54,7 +54,7 @@ lin
-- NP -> V2 -> NP
-- e.g. 'the man seen'
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 ;
pol = np.pol ;
isRel = np.isRel ;
@@ -180,8 +180,8 @@ lin
-- N2 -> NP -> CN
-- e.g. 'mother of the king'
ComplN2 n2 np = {
s = \\_,num,c => preOrPost n2.isPre
(n2.prep.s ++ np.s ! (n2.prep.c ! (fromAgr np.agr).num) ++ closeRelCl np.isRel)
s = \\_,num,c => preOrPost n2.isPre
(n2.prep.s ++ np.s ! partcase2case (n2.prep.c ! (fromAgr np.agr).num) ++ closeRelCl np.isRel)
(n2.s ! num ! c) ;
gend = n2.gend ;
isRel = False
@@ -190,8 +190,8 @@ lin
-- N3 -> NP -> N2
-- e.g. 'distance from this city (to Paris)'
ComplN3 n3 np = {
s = \\num,c => preOrPost n3.isPre1
(n3.prep1.s ++ np.s ! (n3.prep1.c ! (fromAgr np.agr).num) ++ closeRelCl np.isRel)
s = \\num,c => preOrPost n3.isPre1
(n3.prep1.s ++ np.s ! partcase2case (n3.prep1.c ! (fromAgr np.agr).num) ++ closeRelCl np.isRel)
(n3.s ! num ! c) ;
gend = n3.gend ;
prep = n3.prep2 ;
@@ -246,7 +246,7 @@ lin
-- CN -> NP -> CN
-- e.g. 'city Paris', 'numbers x and y'
ApposCN cn np =
ApposCN cn np =
let num : Number = (fromAgr np.agr).num in {
s = \\defin,num,c => cn.s ! defin ! num ! c ++ np.s ! c ;
gend = cn.gend ;

View File

@@ -65,10 +65,10 @@ oper
-- Praksē lielākoties pietiek ar palīgverba noliegumu?
-- 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
-- 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 -> {
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
}
};

View File

@@ -101,18 +101,18 @@ oper
} ;
mkVS = overload {
mkVS : V -> Subj -> VS = \v,c -> lin VS {s = v.s ; leftVal = Nom ; conj = c} ;
mkVS : V -> Subj -> Case -> VS = \v,c,s -> lin VS {s = v.s ; leftVal = s ; 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 = case2partcase s ; conj = c} ;
} ;
mkVQ = overload {
mkVQ : V -> VQ = \v -> lin VQ {s = v.s ; leftVal = Nom} ;
mkVQ : V -> Case -> VQ = \v,c -> lin VQ {s = v.s ; leftVal = c} ;
mkVQ : V -> VQ = \v -> lin VQ {s = v.s ; leftVal = PartNom} ;
mkVQ : V -> Case -> VQ = \v,c -> lin VQ {s = v.s ; leftVal = case2partcase c} ;
} ;
mkVV = overload {
mkVV : V -> VV = \v -> lin VV {s = v.s ; leftVal = Nom} ;
mkVV : V -> Case -> VV = \v,c -> lin VV {s = v.s ; leftVal = c} ;
mkVV : V -> VV = \v -> lin VV {s = v.s ; leftVal = PartNom} ;
mkVV : V -> Case -> VV = \v,c -> lin VV {s = v.s ; leftVal = case2partcase c} ;
} ;
mkV3 = overload {
@@ -131,8 +131,8 @@ oper
-- Prepositions
mkPrep = overload {
mkPrep : Str -> Case -> Case -> Prep = \p,sg,pl -> lin Prep {s = p ; c = table {Sg => sg ; Pl => pl}} ;
mkPrep : Case -> Prep = \c -> lin Prep {s = [] ; c = \\_ => c} ;
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 = \\_ => case2partcase c} ;
} ;
nom_Prep : Prep = mkPrep Nom ;

View File

@@ -14,7 +14,7 @@ oper
Pos => (mkVerb_Pos lemma conj).s ;
Neg => (filter_Neg (mkVerb_Pos ("ne"+lemma) conj)).s
} ;
leftVal = leftVal
leftVal = case2partcase leftVal
} ;
-- First conjugation
@@ -23,7 +23,7 @@ oper
Pos => (mkVerbC1_Pos lemma lemma2 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 ->
@@ -378,7 +378,7 @@ oper
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 ;
@@ -397,7 +397,7 @@ oper
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 -> {
@@ -429,7 +429,7 @@ oper
x => (mkVerb_C3 "negulēt").s ! x
}
} ;
leftVal = leftVal
leftVal = case2partcase leftVal
} ;
-- Auxiliaries: palatalization rules
@@ -548,122 +548,110 @@ oper
-- 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)
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 {
Masc => case n of {
Sg => case c of {
Nom => stem + "is" ;
Gen => stem + "uša" ;
Dat => stem + "ušam" ;
Acc => stem + "ušu" ;
Loc => stem + "ušā" ;
Voc => NON_EXISTENT
PartNom => stem + "is" ;
PartGen => stem + "uša" ;
PartDat => stem + "ušam" ;
PartAcc => stem + "ušu" ;
PartLoc => stem + "ušā"
} ;
Pl => case c of {
Nom => stem + "uši" ;
Gen => stem + "ušu" ;
Dat => stem + "ušiem" ;
Acc => stem + "ušus" ;
Loc => stem + "ušos" ;
Voc => NON_EXISTENT
PartNom => stem + "uši" ;
PartGen => stem + "ušu" ;
PartDat => stem + "ušiem" ;
PartAcc => stem + "ušus" ;
PartLoc => stem + "ušos"
}
} ;
Fem => case n of {
Sg => case c of {
Nom => stem + "usi" ;
Gen => stem + "ušas" ;
Dat => stem + "ušai" ;
Acc => stem + "ušu" ;
Loc => stem + "ušā" ;
Voc => NON_EXISTENT
PartNom => stem + "usi" ;
PartGen => stem + "ušas" ;
PartDat => stem + "ušai" ;
PartAcc => stem + "ušu" ;
PartLoc => stem + "ušā"
} ;
Pl => case c of {
Nom => stem + "ušas" ;
Gen => stem + "ušu" ;
Dat => stem + "ušām" ;
Acc => stem + "ušas" ;
Loc => stem + "ušās" ;
Voc => NON_EXISTENT
PartNom => stem + "ušas" ;
PartGen => stem + "ušu" ;
PartDat => stem + "ušām" ;
PartAcc => stem + "ušas" ;
PartLoc => stem + "ušās"
}
}
} ;
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 {
Masc => case n of {
Sg => case c of {
Nom => stem + "ts" ;
Gen => stem + "ta" ;
Dat => stem + "tam" ;
Acc => stem + "tu" ;
Loc => stem + "tā" ;
Voc => NON_EXISTENT -- FIXME: -tais ?
PartNom => stem + "ts" ;
PartGen => stem + "ta" ;
PartDat => stem + "tam" ;
PartAcc => stem + "tu" ;
PartLoc => stem + "tā"
} ;
Pl => case c of {
Nom => stem + "ti" ;
Gen => stem + "tu" ;
Dat => stem + "tiem" ;
Acc => stem + "tus" ;
Loc => stem + "tos" ;
Voc => NON_EXISTENT -- FIXME: -tie ?
PartNom => stem + "ti" ;
PartGen => stem + "tu" ;
PartDat => stem + "tiem" ;
PartAcc => stem + "tus" ;
PartLoc => stem + "tos"
}
} ;
Fem => case n of {
Sg => case c of {
Nom => stem + "ta" ;
Gen => stem + "tas" ;
Dat => stem + "tai" ;
Acc => stem + "tu" ;
Loc => stem + "tā" ;
Voc => NON_EXISTENT -- FIXME: -tā ?
PartNom => stem + "ta" ;
PartGen => stem + "tas" ;
PartDat => stem + "tai" ;
PartAcc => stem + "tu" ;
PartLoc => stem + "tā"
} ;
Pl => case c of {
Nom => stem + "tas" ;
Gen => stem + "tu" ;
Dat => stem + "tām" ;
Acc => stem + "tas" ;
Loc => stem + "tās" ;
Voc => NON_EXISTENT -- FIXME: -tās ?
PartNom => stem + "tas" ;
PartGen => stem + "tu" ;
PartDat => stem + "tām" ;
PartAcc => stem + "tas" ;
PartLoc => stem + "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 {
Masc => case n of {
Sg => case c of {
Nom => stem + "ies" ;
Gen => NON_EXISTENT ;
Dat => NON_EXISTENT ;
Acc => stem + "ušos" ;
Loc => NON_EXISTENT ;
Voc => NON_EXISTENT
PartNom => stem + "ies" ;
PartGen => NON_EXISTENT ;
PartDat => NON_EXISTENT ;
PartAcc => stem + "ušos" ;
PartLoc => NON_EXISTENT
} ;
Pl => case c of {
Nom => stem + "ušies" ;
Gen => stem + "ušos" ;
Dat => NON_EXISTENT ;
Acc => stem + "ušos" ;
Loc => NON_EXISTENT ;
Voc => NON_EXISTENT
PartNom => stem + "ušies" ;
PartGen => stem + "ušos" ;
PartDat => NON_EXISTENT ;
PartAcc => stem + "ušos" ;
PartLoc => NON_EXISTENT
}
} ;
Fem => case n of {
Sg => case c of {
Nom => stem + "usies" ;
Gen => stem + "ušās" ;
Dat => NON_EXISTENT ;
Acc => stem + "ušos" ;
Loc => NON_EXISTENT ;
Voc => NON_EXISTENT
PartNom => stem + "usies" ;
PartGen => stem + "ušās" ;
PartDat => NON_EXISTENT ;
PartAcc => stem + "ušos" ;
PartLoc => NON_EXISTENT
} ;
Pl => case c of {
Nom => stem + "ušās" ;
Gen => stem + "ušos" ;
Dat => NON_EXISTENT ;
Acc => stem + "ušos" ;
Loc => NON_EXISTENT ;
Voc => NON_EXISTENT
PartNom => stem + "ušās" ;
PartGen => stem + "ušos" ;
PartDat => NON_EXISTENT ;
PartAcc => stem + "ušos" ;
PartLoc => NON_EXISTENT
}
}
} ;

View File

@@ -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 } ;
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 } ;
@@ -38,7 +38,7 @@ lin
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 = {
s = \\c => idet.s ! cn.gend ++ cn.s ! Def ! idet.num ! c ;

View File

@@ -19,8 +19,8 @@ lin
oper
-- TODO: PassV2 verbs jāsaskaņo ar objektu, nevis subjektu (by8means_Prep: AgP3 Sg Masc) - done?
mkRelClause : RP -> CatLav.VP -> RCl = \rp,vp ->
let subjInTopic : Bool = case <vp.voice, vp.leftVal> of {
mkRelClause : RP -> CatLav.VP -> RCl = \rp,vp ->
let subjInTopic : Bool = case <vp.voice, partcase2case vp.leftVal> of {
<Act, Nom> => True ;
<Act, _ > => False ;
<Pass, Acc> => False ;
@@ -34,7 +34,7 @@ oper
} in
case mood of { -- subject
Deb _ _ => rp.s ! Masc ! Dat ; --# notpresent
_ => rp.s ! Masc ! vp.leftVal
_ => rp.s ! Masc ! partcase2case vp.leftVal
} ++
case vp.objPron of {
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: Masc varētu nebūt labi
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
-- TODO: jātestē, kautkas nav labi ar testpiemēru
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 = {

View File

@@ -48,8 +48,30 @@ param
| VDeb
| VImp Number
| 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
Agreement =
AgrP1 Number Gender
@@ -68,20 +90,20 @@ oper
Noun : Type = {s : Number => Case => Str ; gend : Gender} ;
ProperNoun : Type = {s : Case => Str ; gend : Gender ; num : Number} ;
Pronoun : Type = {s : Case => Str ; agr : Agreement ; poss : Gender => Number => Case => Str ; pol : Polarity} ;
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 = {
v : Verb ;
compl : Agreement => Str ; -- the subject-complement agreement
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)
rightPol : Polarity ; -- for the potential double negation
objPron : Bool -- true, if object is a Pron (for modifying the neutral word order)
@@ -145,7 +167,7 @@ oper
Masc => Masc
} ;
closeRelCl : Bool -> Str = \isRel ->
closeRelCl : Bool -> Str = \isRel ->
case isRel of {
True => "," ;
False => []

View File

@@ -66,8 +66,8 @@ lin
oper
-- TODO: PassV2 verbs jāsaskaņo ar objektu, nevis subjektu (by8means_Prep: AgP3 Sg Masc)
mkClause : NP -> CatLav.VP -> Cl = \np,vp ->
let agr : Agreement = case <vp.voice, vp.leftVal> of {
mkClause : NP -> CatLav.VP -> Cl = \np,vp ->
let agr : Agreement = case <vp.voice, partcase2case vp.leftVal> of {
<Act, Nom> => np.agr ;
<Act, _ > => vp.rightAgr ;
<Pass, Acc> => vp.rightAgr ;
@@ -77,7 +77,7 @@ oper
s = \\mood,pol =>
case mood of { -- subject
Deb _ _ => np.s ! Dat ; --# notpresent
_ => np.s ! vp.leftVal
_ => np.s ! partcase2case vp.leftVal
} ++
closeRelCl np.isRel ++ -- comma, if necessary
case vp.objPron of {

View File

@@ -98,7 +98,7 @@ lin
-- V3 -> NP -> VPSlash
-- e.g. 'give it (to her)'
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 ;
compl = \\_ => [] ; -- will be overriden
@@ -116,7 +116,7 @@ lin
-- V3 -> NP -> VPSlash
-- e.g. 'give (it) to her'
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 ;
compl = \\_ => [] ; -- will be overriden
@@ -194,8 +194,8 @@ lin
}
} ++ vpslash.compl ! agr ;
-}
compl = \\agr => vpslash.rightVal.s ++
np.s ! (vpslash.rightVal.c ! (fromAgr agr).num) ++
compl = \\agr => vpslash.rightVal.s ++
np.s ! partcase2case (vpslash.rightVal.c ! (fromAgr agr).num) ++
vpslash.compl ! agr ;
voice = vpslash.voice ;
leftVal = vpslash.leftVal ;
@@ -221,7 +221,7 @@ lin
-- V2V -> NP -> VPSlash -> VPSlash
-- e.g. '-- beg me to buy'
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 ;
compl = \\agr => buildVP vpslash Pos VInf agr ;
@@ -238,7 +238,7 @@ lin
-- VPSlash -> VP
-- e.g. 'love himself'
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 ;
-- Comp -> VP
@@ -247,7 +247,7 @@ lin
v = mkV "būt" ;
compl = \\agr => comp.s ! agr ;
voice = Act ;
leftVal = Nom ;
leftVal = PartNom ;
rightAgr = AgrP3 Sg Masc ;
rightPol = Pos ;
objPron = False
@@ -313,7 +313,7 @@ lin
oper
-- 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 ->
let
finalPol : Polarity = case <leftPol, rightPol> of {
@@ -323,7 +323,7 @@ oper
} ;
agr = fromAgr agr
; --# 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 {
Ind Simul tense => v.s ! finalPol ! (VInd agr.pers agr.num tense)
; --# notpresent
@@ -337,7 +337,7 @@ oper
Deb Simul tense => (mkV "būt").s ! finalPol ! (VInd P3 Sg tense) ++ --# notpresent
v.s ! Pos ! VDeb ; --# 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
Condit Simul => v.s ! finalPol ! (VInd agr.pers agr.num ParamX.Cond) ; --# notpresent

View File

@@ -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
Timeunit = N ;
@@ -6,13 +6,15 @@ lincat
Monthday = NP ;
Month = N ;
Year = NP ;
{-
lin
timeunitAdv n time =
let n_card : Card = n ;
n_hours_NP : NP = mkNP n_card time ;
in SyntaxMay.mkAdv for_Prep n_hours_NP | mkAdv (n_hours_NP.s ! R.npNom) ;
has_age_VP card = G.ComplSlash (G.SlashV2a umur_V2) (G.DetCN (G.DetQuant G.IndefArt (G.NumCard card)) (G.UseN L.year_N)) ;
oper
umur_V2 : V2 = mkV2 (mkV "umur") noPrep ;
{-
weekdayPunctualAdv w = ; -- on Sunday
weekdayHabitualAdv w = ; -- on Sundays

View File

@@ -1,7 +1,6 @@
resource MissingMay = open GrammarMay, Prelude in {
oper AdAP : AdA -> AP -> AP = notYet "AdAP" ;
oper AdAdv : AdA -> Adv -> Adv = notYet "AdAdv" ;
oper AdNum : AdN -> Card -> Card = notYet "AdNum" ;
oper AdVVP : AdV -> VP -> VP = notYet "AdVVP" ;
oper AdVVPSlash : AdV -> VPSlash -> VPSlash = notYet "AdVVPSlash" ;
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 ImpPl1 : VP -> Utt = notYet "ImpPl1" ;
oper ImpVP : VP -> Imp = notYet "ImpVP" ;
oper OrdDigits : Digits -> Ord = notYet "OrdDigits" ;
oper OrdNumeral : Numeral -> Ord = notYet "OrdNumeral" ;
oper OrdNumeralSuperl : Numeral -> A -> Ord = notYet "OrdNumeralSuperl" ;
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 ashes_N : N = notYet "ashes_N" ;
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 back_N : N = notYet "back_N" ;
oper bad_A : A = notYet "bad_A" ;
oper bank_N : N = notYet "bank_N" ;
oper bark_N : N = notYet "bark_N" ;
oper because_Subj : Subj = notYet "because_Subj" ;
oper become_VA : VA = notYet "become_VA" ;
oper beer_N : N = notYet "beer_N" ;
oper before_Prep : Prep = notYet "before_Prep" ;

View File

@@ -104,13 +104,13 @@ concrete NounMay of Noun = CatMay ** open ResMay, Prelude in {
-- : Numeral -> Card ;
NumNumeral num = num ;
{-
-- : AdN -> Card -> Card ;
AdNum adn card = card ** { s = adn.s ++ card.s } ;
-- : Digits -> Ord ;
OrdDigits digs = digs ** { s = digs.s ! NOrd } ;
-}
-- : Numeral -> Ord ;
OrdNumeral num = {
s = num.ord

Some files were not shown because too many files have changed in this diff Show More