Merge branch 'GrammaticalFramework:master' into master

This commit is contained in:
Ekaterina Voloshina
2024-02-16 09:49:43 +01:00
committed by GitHub
61 changed files with 864 additions and 214 deletions

View File

@@ -29,7 +29,9 @@ cat
Sub1000000000000 ; -- 1..999999999999 Sub1000000000000 ; -- 1..999999999999
data data
num : Sub1000000 -> Numeral ; -- 123456 [coercion to top category] num : Sub1000000 -> Numeral ; -- 123456 [coercion to top category]
---- num : Sub1000000000000 -> Numeral ; ---- should be this, but not yet available in most langs AR 6/2/2024
n2, n3, n4, n5, n6, n7, n8, n9 : Digit ; n2, n3, n4, n5, n6, n7, n8, n9 : Digit ;

View File

@@ -1,6 +1,6 @@
--# -path=.:../arabic:../common:../abstract:../prelude --# -path=.:../arabic:../common:../abstract:../prelude:../morphodict
resource TryAra = SyntaxAra, LexiconAra, ParadigmsAra - [mkAdN, mkAdv,mkOrd,mkQuant] ** resource TryAra = SyntaxAra, LexiconAra, MorphoDictAra, ParadigmsAra - [mkAdN, mkAdv,mkOrd,mkQuant] **
open (P = ParadigmsAra) in { open (P = ParadigmsAra) in {
} }

View File

@@ -0,0 +1,270 @@
--# -path=.:../abstract:../common
-- documenting Arabic inflection
---- so far with English titles and tags, AR 2024-01-31
concrete DocumentationAra of Documentation = CatAra ** open
ResAra,
Prelude,
HTML in {
lincat
Inflection = {t : Str; s1,s2 : Str} ;
Definition = {s : Str} ;
Document = {s : Str} ;
Tag = {s : Str} ;
lin
InflectionN, InflectionN2, InflectionN3 = \noun -> {
t = "n" ;
s1 = heading1 ("Noun" ++ case noun.g of {
Masc => "(masculine)";
Fem => "(feminine)"
}) ;
s2 = frameTable (
tr (th "" ++ th "nominative" ++ th "genitive" ++ th "accusative") ++
tr (th "singular" ++ td (noun.s ! Sg ! Indef ! Nom) ++ td (noun.s ! Sg ! Indef ! Gen) ++
td (noun.s ! Sg ! Indef ! Acc)) ++
tr (th "dual" ++ td (noun.s ! Dl ! Indef ! Nom) ++ td (noun.s ! Dl ! Indef ! Gen) ++
td (noun.s ! Dl ! Indef ! Acc)) ++
tr (th "plural" ++ td (noun.s ! Pl ! Indef ! Nom) ++ td (noun.s ! Pl ! Indef ! Gen) ++
td (noun.s ! Pl ! Indef ! Acc))
)
} ;
InflectionPN, InflectionLN, InflectionGN, InflectionSN = \pn -> { ---- TODO: special for LN, GN, SN
t = "pn" ;
s1 = heading1 ("Proper Name" ++
case pn.g of {
Masc => "(masculine)";
Fem => "(feminine)"
}) ;
s2 = frameTable (
tr (th "nominative" ++ th "genitive" ++ th "accusative") ++
tr (td (pn.s ! Nom) ++ td (pn.s ! Gen) ++ td (pn.s ! Acc))
)
} ;
InflectionA, InflectionA2 = \adj -> {
t = "a" ;
s1 = heading1 "Adjective" ;
s2 = frameTable (
tr (th "" ++ th "Nominative" ++ th "Genitive" ++ th "Accusative") ++
tr (th "Positive Masculine Singular" ++
td (adj.s ! APosit Masc Sg Indef Nom) ++
td (adj.s ! APosit Masc Sg Indef Gen) ++
td (adj.s ! APosit Masc Sg Indef Acc)
) ++
tr (th "Positive Masculine Dual" ++
td (adj.s ! APosit Masc Dl Indef Nom) ++
td (adj.s ! APosit Masc Dl Indef Gen) ++
td (adj.s ! APosit Masc Dl Indef Acc)
) ++
tr (th "Positive Masculine Plural" ++
td (adj.s ! APosit Masc Pl Indef Nom) ++
td (adj.s ! APosit Masc Pl Indef Gen) ++
td (adj.s ! APosit Masc Pl Indef Acc)
) ++
tr (th "Positive Feminine Singular" ++
td (adj.s ! APosit Fem Sg Indef Nom) ++
td (adj.s ! APosit Fem Sg Indef Gen) ++
td (adj.s ! APosit Fem Sg Indef Acc)
) ++
tr (th "Positive Feminine Dual" ++
td (adj.s ! APosit Fem Dl Indef Nom) ++
td (adj.s ! APosit Fem Dl Indef Gen) ++
td (adj.s ! APosit Fem Dl Indef Acc)
) ++
tr (th "Positive Feminine Plural" ++
td (adj.s ! APosit Fem Pl Indef Nom) ++
td (adj.s ! APosit Fem Pl Indef Gen) ++
td (adj.s ! APosit Fem Pl Indef Acc)
) ++
tr (th "Comparative" ++
td (adj.s ! AComp Indef Nom) ++
td (adj.s ! AComp Indef Gen) ++
td (adj.s ! AComp Indef Acc)
)
)
} ;
InflectionAdv, InflectionAdV, InflectionAdA, InflectionAdN = \adv -> {
t = "adv" ;
s1= heading1 "Adverb" ;
s2= paragraph (adv.s) ;
s3= ""
} ;
InflectionPrep = \prep -> {
t = "prep" ;
s1= heading1 "Preposition" ;
s2= paragraph (prep.s) ;
s3= ""
} ;
InflectionV,
InflectionV3, InflectionV2A, InflectionV2Q, InflectionV2S, InflectionV2V, InflectionVA, InflectionVQ, InflectionVS, InflectionVV ----
= \v -> {
t = "v" ;
s1= heading1 "Verb" ++
paragraph (v.s ! (VPerf Act (Per3 Masc Sg)) ++
pp "subject");
s2= inflVerb v
} ;
InflectionV2 v = {
t = "v" ;
s1= heading1 "Verb" ++
paragraph (v.s ! (VPerf Act (Per3 Masc Sg)) ++
pp "subject" ++
pp "object") ;
s2= inflVerb v
} ;
{-
InflectionV3 v = {
t = "v" ;
s1= heading1 "Verb" ++
paragraph (pp "subject" ++
v.s ! VInf ++ v.p ++
v.c2 ++ pp "arg1" ++
v.c3 ++ pp "arg2") ;
s2= inflVerb v
} ;
InflectionV2V v = {
t = "v" ;
s1= heading1 "Verb" ++
paragraph (pp "subject" ++
v.s ! VInf ++ v.p ++
v.c2 ++ pp "object" ++
v.c3 ++ case v.typ of {
VVAux => pp "verb" ;
VVInf => "to" ++ pp "verb" ;
VVPresPart => pp "verb+ing"
}) ;
s2= inflVerb v
} ;
InflectionV2S v = {
t = "v" ;
s1= heading1 "Verb" ++
paragraph (pp "subject" ++
v.s ! VInf ++ v.p ++
v.c2 ++ pp "object" ++
"that" ++ pp "sentence") ;
s2= inflVerb v
} ;
InflectionV2Q v = {
t = "v" ;
s1= heading1 "Verb" ++
paragraph (pp "subject" ++
v.s ! VInf ++ v.p ++
pp "question") ;
s2= inflVerb v
} ;
InflectionV2A v = {
t = "v" ;
s1= heading1 "Verb" ++
paragraph (pp "subject" ++
v.s ! VInf ++ v.p ++
v.c2 ++ pp "object" ++
pp "adjective") ;
s2= inflVerb v
} ;
InflectionVV v = {
t = "v" ;
s1= heading1 "Verb" ++
paragraph (pp "subject" ++
v.s ! VVF VInf ++ v.p ++
case v.typ of {
VVAux => pp "verb" ;
VVInf => "to" ++ pp "verb" ;
VVPresPart => pp "verb+ing"
}) ;
s2= frameTable (
tr (th "infitive" ++ td (v.s ! VVF VInf)) ++
tr (th "present" ++ td (v.s ! VVF VPres ++ " " ++ v.s ! VVPresNeg)) ++
tr (th "past" ++ td (v.s ! VVF VPast ++ " " ++ v.s ! VVPastNeg)) ++ --# notpresent
tr (th "past part." ++ td (v.s ! VVF VPPart)) ++
tr (th "present part." ++ td (v.s ! VVF VPresPart))
)
} ;
InflectionVS v = {
t = "v" ;
s1= heading1 "Verb" ++
paragraph (pp "subject" ++
v.s ! VInf ++ v.p ++
"that" ++ pp "sentence") ;
s2= inflVerb v
} ;
InflectionVQ v = {
t = "v" ;
s1= heading1 "Verb" ++
paragraph (pp "subject" ++
v.s ! VInf ++ v.p ++
pp "question") ;
s2= inflVerb v
} ;
InflectionVA v = {
t = "v" ;
s1= heading1 "Verb" ++
paragraph (pp "subject" ++
v.s ! VInf ++ v.p ++
pp "adjective") ;
s2= inflVerb v
} ;
-}
oper
inflVerb : Verb -> Str = \verb ->
frameTable (
tr (th "Active" ++ th "Perfect" ++ th "Imperfect Indicative" ++ th "Conjunctive" ++ th "Jussive" ++ th "Imperative") ++
inflVerbRow "3 Masculine Singular" (Per3 Masc Sg) verb ++
inflVerbRow "3 Feminine Singular" (Per3 Fem Sg) verb ++
inflVerbRow "2 Masculine Singular" (Per2 Masc Sg) verb ++
inflVerbRow "2 Feminine Singular" (Per2 Fem Sg) verb ++
inflVerbRow "1 Singular" (Per1 Sing) verb ++
inflVerbRow "3 Masculine Dual" (Per3 Masc Dl) verb ++
inflVerbRow "3 Feminine Dual" (Per3 Fem Dl) verb ++
inflVerbRow "2 Dual" (Per2 Masc Dl) verb ++
inflVerbRow "3 Masculine Plural" (Per3 Masc Pl) verb ++
inflVerbRow "3 Feminine Plural" (Per3 Fem Pl) verb ++
inflVerbRow "2 Masculine Plural" (Per2 Masc Pl) verb ++
inflVerbRow "2 Feminine Plural" (Per2 Fem Pl) verb ++
inflVerbRow "1 Plural" (Per1 Plur) verb
) ;
inflVerbRow : (h : Str) -> (pgn : PerGenNum) -> (verb : Verb) -> Str = \h, pgn, verb ->
tr (th h ++
td (verb.s ! (VPerf Act pgn)) ++
td (verb.s ! (VImpf Ind Act pgn)) ++
td (verb.s ! (VImpf Cnj Act pgn)) ++
td (verb.s ! (VImpf Jus Act pgn)) ++
td (imperativeForm pgn verb)
) ;
imperativeForm : PerGenNum -> Verb -> Str = \pgn, verb ->
case pgn of {
Per2 g n => verb.s ! VImp g n ;
_ => "-"
} ;
pp : Str -> Str = \s -> "<"+s+">";
lin
NoDefinition t = {s=t.s};
MkDefinition t d = {s="<p><b>Definition:</b>"++t.s++d.s++"</p>"};
MkDefinitionEx t d e = {s="<p><b>Definition:</b>"++t.s++d.s++"</p><p><b>Example:</b>"++e.s++"</p>"};
lin
MkDocument d i e = {s = i.s1 ++ d.s ++ i.s2 ++ paragraph e.s} ;
MkTag i = {s = i.t} ;
}

View File

@@ -6,7 +6,9 @@ concrete ExtendAra of Extend =
EmptyRelSlash, PredAPVP, EmptyRelSlash, PredAPVP,
ComplDirectVS, ComplDirectVQ, -- because of Utt ComplDirectVS, ComplDirectVQ, -- because of Utt
VPS, MkVPS, PredVPS, BaseVPS, ConsVPS, ConjVPS, VPS, MkVPS, PredVPS, BaseVPS, ConsVPS, ConjVPS,
EmbedSSlash, AdjAsNP, GerundNP EmbedSSlash, AdjAsNP, GerundNP,
PassVPSlash, ---- bogus implementation, see below
CompoundN
] ]
with (Grammar=GrammarAra) with (Grammar=GrammarAra)
** open ** open
@@ -91,4 +93,16 @@ lin
s = \\_ => np.s ! Nom ++ vps.s ! np.a.pgn -- first quick version with order always Nominal. s = \\_ => np.s ! Nom ++ vps.s ! np.a.pgn -- first quick version with order always Nominal.
} ; -- if necessary, change VPS into {s : PerGenNum => Order => {before,after : Str}} } ; -- if necessary, change VPS into {s : PerGenNum => Order => {before,after : Str}}
-- AR 24-02-08
PassVPSlash vpslash = vpslash ** {s = \\pgn, vpf => vpslash.s ! pgn ! vpf} ;
---- vpf does not have passive forms left,
---- so this function is not possible with the current lincat of VP and VPSlash
---- very unsure about this as well
CompoundN a b = b ** {
s = \\n, s, c => b.s ! n ! Const ! c ++ a.s ! n ! s ! c ;
s2 = \\n, s, c => b.s2 ! n ! Const ! c ++ a.s2 ! n ! s ! c
} ;
} }

View File

@@ -3,7 +3,8 @@
concrete LangAra of Lang = concrete LangAra of Lang =
GrammarAra, GrammarAra,
LexiconAra, LexiconAra,
ConstructionAra ConstructionAra,
DocumentationAra
** { ** {
flags startcat = Phr ; unlexer = text ; lexer = text ; coding = utf8 ; flags startcat = Phr ; unlexer = text ; lexer = text ; coding = utf8 ;

View File

@@ -491,6 +491,28 @@ oper
AComp d c => indeclN aHmar ! d ! c AComp d c => indeclN aHmar ! d ! c
}; };
-- NTable = Number => State => Case => Str;
-- Adj : Type = {s : AForm => Str} ;
-- AForm = APosit Gender Number State Case | AComp State Case ;
ntablesAdj : (masc, fem, comp : NTable) -> Adj = \masc, fem, comp -> {
s = table {
APosit Masc n d c => masc ! n ! d ! c ;
APosit Fem n d c => fem ! n ! d ! c ;
AComp d c => comp ! Sg ! d ! c
}
} ;
mascFemCompAdj : (kabir, kabira, akbar : Str) -> Adj =
\kabir, kabira, akbar ->
ntablesAdj (positAdj kabir ! Masc) (positAdj kabir ! Fem) (positAdj akbar ! Masc) ;
mascFemAdj : (kabir, kabira : Str) -> Adj = \kabir, kabira ->
mascFemCompAdj kabir kabira kabir ; ---- comp
mascAdj : (kabir : Str) -> Adj = \kabir ->
mascFemAdj kabir (kabir + "َة") ;
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
----------------------------------------------------------------------------- -----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
concrete NamesAra of Names = CatAra ** open ResAra, Prelude in { concrete NamesAra of Names = CatAra ** open ResAra, Prelude, (N=NounAra), (A=AdverbAra), (S=StructuralAra) in {
lin GivenName, MaleSurname, FemaleSurname, PlSurname = \n -> emptyNP ** { lin GivenName, MaleSurname, FemaleSurname, PlSurname = \n -> emptyNP ** {
s = n.s ; s = n.s ;
@@ -14,4 +14,6 @@ lin UseLN pn = emptyNP ** {
a = {pgn = Per3 pn.g Sg ; isPron = False} ; a = {pgn = Per3 pn.g Sg ; isPron = False} ;
} ; } ;
lin InLN n = A.PrepNP S.in_Prep (N.UsePN n) ; ---- TODO: alternative prepositions
} }

View File

@@ -9,15 +9,10 @@ lincat
n : Size } ; n : Size } ;
Sub10 = {s : DForm => CardOrd => Gender => State => Case => Str ; Sub10 = {s : DForm => CardOrd => Gender => State => Case => Str ;
n : Size } ; n : Size } ;
Sub100 = {s : CardOrd => Gender => State => Case => Str ; Sub100, Sub1000, Sub1000000, Sub1000000000, Sub1000000000000
n : Size} ; = {s : CardOrd => Gender => State => Case => Str ;
Sub1000 = {s : CardOrd => Gender => State => Case => Str ;
n : Size } ;
Sub1000000 = {s : CardOrd => Gender => State => Case => Str ;
n : Size} ; n : Size} ;
lin num x = x ; lin num x = x ;
lin n2 = num2 ** {n = Two }; lin n2 = num2 ** {n = Two };
@@ -109,6 +104,9 @@ lincat
--lin pot3plus n m = { --lin pot3plus n m = {
-- s = \\c => n.s ! NCard ++ "تهُْسَند" ++ m.s ! c ; n = Pl} ; -- s = \\c => n.s ! NCard ++ "تهُْسَند" ++ m.s ! c ; n = Pl} ;
lin pot3as4 n = n ;
lin pot4as5 n = n ;
-- numerals as sequences of digits -- numerals as sequences of digits
lincat lincat

View File

@@ -95,6 +95,16 @@ resource ParadigmsAra = open
= mkFullPN ; = mkFullPN ;
} ; } ;
mkLN = overload {
mkLN : Str -> LN -- Predictable LN from a Str: fem hum if ends in ة, otherwise masc hum.
= \s -> lin LN (smartPN s) ;
mkLN : N -> LN -- Make a LN out of N. The LN is in construct state.
= \n -> lin LN (n ** {
s = \\c => n.s ! Sg ! Const ! c
++ n.s2 ! Sg ! Def ! c -- NB this hack works for idaafa constructions (if you used mkN : N -> N -> N), but wrong for mkN : N -> A -> N. /IL
}) ;
} ;
--3 Relational nouns --3 Relational nouns
mkN2 : overload { mkN2 : overload {
@@ -128,6 +138,13 @@ resource ParadigmsAra = open
= \s,a -> a ** {s = table {af => s ++ a.s ! af}} = \s,a -> a ** {s = table {af => s ++ a.s ! af}}
} ; } ;
mascA : (kabir : Str) -> A
= \kabir -> lin A (mascAdj kabir) ;
mascFemA : (kabir, kabira : Str) -> A
= \kabir, kabira -> lin A (mascFemAdj kabir kabira) ;
mascFemCompA : (kabir, kabira, akbar : Str) -> A
= \kabir, kabira, akbar -> lin A (mascFemCompAdj kabir kabira akbar) ;
nisbaA : Str -> Adj ; -- Forms relative adjectives with the suffix ِيّ. Takes either the stem and adds يّ, or the whole word ending in يّ and just adds declension. nisbaA : Str -> Adj ; -- Forms relative adjectives with the suffix ِيّ. Takes either the stem and adds يّ, or the whole word ending in يّ and just adds declension.
idaafaA : N -> A -> A ; -- Forms adjectives of type غَيْرُ طَيِّبٍ 'not good'. Noun is in construct state but inflects in case. Adjective is in genitive, but inflects in gender, number and state. idaafaA : N -> A -> A ; -- Forms adjectives of type غَيْرُ طَيِّبٍ 'not good'. Noun is in construct state but inflects in case. Adjective is in genitive, but inflects in gender, number and state.
@@ -715,6 +732,15 @@ resource ParadigmsAra = open
} }
}; };
commonA : (pos, comp : Str) -> Adj =
\kabIr, akbar ->
{
s = table {
APosit g n d c => positAdj kabIr ! g ! n ! d ! c ;
AComp d c => indeclN akbar ! d ! c
}
};
irregFemA : (masc : A) -> (fem : A) -> A = \m,f -> m ** { irregFemA : (masc : A) -> (fem : A) -> A = \m,f -> m ** {
s = table { s = table {
APosit Masc n d c => m.s ! APosit Masc n d c ; APosit Masc n d c => m.s ! APosit Masc n d c ;
@@ -869,7 +895,7 @@ param VerbForm =
FormI | FormII | FormIII | FormIV | FormV | FormVI | FormVII | FormVIII | FormX | FormXI ; FormI | FormII | FormIII | FormIV | FormV | FormVI | FormVII | FormVIII | FormX | FormXI ;
{- temporarily moved to wiktionary/MoreAra.gf
-- paradigms for Wiktionary extraction -- paradigms for Wiktionary extraction
---- TODO: better usage of information in Wiktionary ---- TODO: better usage of information in Wiktionary
@@ -913,25 +939,25 @@ oper
wmkA : {masc_sg, masc_pl, root, sg_patt : Str} -> A wmkA : {masc_sg, masc_pl, root, sg_patt : Str} -> A
= \r -> mkA r.root r.sg_patt ; = \r -> mkA r.root r.sg_patt ;
wmkA : {masc_sg, fem_sg, masc_pl, fem_pl, root, pl_patt : Str} -> A wmkA : {masc_sg, fem_sg, masc_pl, fem_pl, root, pl_patt : Str} -> A
= \r -> mkA r.root ; ---- = \r -> mascFemAdj r.masc_sg r.fem_sg ;
wmkA : {masc_sg, fem_sg, masc_pl, fem_pl, root : Str} -> A wmkA : {masc_sg, fem_sg, masc_pl, fem_pl, root : Str} -> A
= \r -> mkA r.root ; ---- = \r -> mascFemAdj r.masc_sg r.fem_sg ;
wmkA : {masc_sg, fem_sg, root : Str} -> A wmkA : {masc_sg, fem_sg, root : Str} -> A
= \r -> mkA r.root ; ---- = \r -> mkA r.root ; ----
wmkA : {masc_sg, fem_sg, masc_pl, fem_pl, pl_patt : Str} -> A wmkA : {masc_sg, fem_sg, masc_pl, fem_pl, pl_patt : Str} -> A
= \r -> mkA r.masc_sg ; ---- = \r -> mascFemAdj r.masc_sg r.fem_sg ;
wmkA : {masc_sg : Str; fem_sg : Str; fem_pl : Str} -> A wmkA : {masc_sg : Str; fem_sg : Str; fem_pl : Str} -> A
= \r -> mkA r.masc_sg ; ---- = \r -> mascFemAdj r.masc_sg r.fem_sg ;
wmkA : {masc_sg : Str; fem_sg : Str; root : Str ; sg_patt : Str} -> A wmkA : {masc_sg : Str; fem_sg : Str; root : Str ; sg_patt : Str} -> A
= \r -> mkA r.root r.sg_patt ; = \r -> mkA r.root r.sg_patt ;
wmkA : {masc_sg : Str; fem_sg : Str} -> A wmkA : {masc_sg : Str; fem_sg : Str} -> A
= \r -> mkA r.masc_sg ; ---- = \r -> mascFemAdj r.masc_sg r.fem_sg ;
wmkA : {masc_sg : Str; masc_pl : Str; fem_sg : Str; fem_pl : Str} -> A wmkA : {masc_sg : Str; masc_pl : Str; fem_sg : Str; fem_pl : Str} -> A
= \r -> mkA r.masc_sg ; ---- = \r -> mascFemAdj r.masc_sg r.fem_sg ;
wmkA : {masc_sg : Str; masc_pl : Str; fem_sg : Str; root : Str} -> A wmkA : {masc_sg : Str; masc_pl : Str; fem_sg : Str; root : Str} -> A
= \r -> mkA r.root ; = \r -> mkA r.root ;
wmkA : {masc_sg : Str; masc_pl : Str; fem_sg : Str} -> A wmkA : {masc_sg : Str; masc_pl : Str; fem_sg : Str} -> A
= \r -> mkA r.masc_sg ; ---- = \r -> mascFemAdj r.masc_sg r.fem_sg ;
wmkA : {masc_sg : Str; masc_pl : Str; root : Str} -> A wmkA : {masc_sg : Str; masc_pl : Str; root : Str} -> A
= \r -> mkA r.root ; = \r -> mkA r.root ;
wmkA : {masc_sg : Str; masc_pl, pl_patt : Str; root : Str} -> A wmkA : {masc_sg : Str; masc_pl, pl_patt : Str; root : Str} -> A
@@ -939,28 +965,28 @@ oper
wmkA : {masc_sg : Str; masc_pl, pl_patt, sg_patt : Str; root : Str} -> A wmkA : {masc_sg : Str; masc_pl, pl_patt, sg_patt : Str; root : Str} -> A
= \r -> mkA r.sg_patt r.pl_patt ; = \r -> mkA r.sg_patt r.pl_patt ;
wmkA : {masc_sg : Str; masc_pl : Str} -> A wmkA : {masc_sg : Str; masc_pl : Str} -> A
= \r -> mkA r.masc_sg ; ---- = \r -> mascA r.masc_sg ; ----
wmkA : {masc_sg : Str; masc_pl, pl_patt : Str} -> A wmkA : {masc_sg : Str; masc_pl, pl_patt : Str} -> A
= \r -> mkA r.masc_sg ; ---- = \r -> mascA r.masc_sg ; ----
wmkA : {masc_sg : Str; root : Str} -> A wmkA : {masc_sg : Str; root : Str} -> A
= \r -> mkA r.root ; = \r -> mkA r.root ;
wmkA : {masc_sg : Str} -> A wmkA : {masc_sg : Str} -> A
= \r -> mkA r.masc_sg ; ---- = \r -> mascA r.masc_sg ; ----
} ; } ;
wmkV = overload { wmkV = overload {
wmkV : {perfect : Str; cls : VerbForm; root : Str} -> V wmkV : {perfect : Str; cls : VerbForm; root : Str} -> V
= \r -> mkV r.root r.cls ; ---- = \r -> mkV r.root r.cls ; ----
wmkV : {perfect : Str; cls : VerbForm} -> V wmkV : {perfect : Str; cls : VerbForm} -> V
= \r -> mkV r.perfect r.cls ; ---- = \r -> mkV r.perfect r.cls ; ---- expects root
wmkV : {perfect : Str; imperfect : Str; cls : VerbForm; root : Str} -> V wmkV : {perfect : Str; imperfect : Str; cls : VerbForm; root : Str} -> V
= \r -> mkV r.root r.cls ; ---- = \r -> mkV r.root r.cls ; ----
wmkV : {perfect : Str; imperfect : Str; cls : VerbForm} -> V wmkV : {perfect : Str; imperfect : Str; cls : VerbForm} -> V
= \r -> mkV r.perfect r.cls ; ---- = \r -> mkV r.perfect r.cls ; ---- expects root
wmkV : {root : Str ; cls : VerbForm} -> V wmkV : {root : Str ; cls : VerbForm} -> V
= \r -> mkV r.root r.cls ; = \r -> mkV r.root r.cls ;
wmkV : {imperfect : Str} -> V wmkV : {imperfect : Str} -> V
= \r -> variants {} ; ---- mkV r.imperfect ; = \r -> variants {} ; ---- mkV r.imperfect ; -- expects cls I
} ; } ;
-}
} ; } ;

View File

@@ -130,6 +130,6 @@ concrete VerbAra of Verb = CatAra ** open Prelude, ResAra, ParamX in {
CompNP np = {s = \\_,_ => [] ; CompNP np = {s = \\_,_ => [] ;
obj = {s = np.s ! Nom ; a = agrLite np.a} ; obj = {s = np.s ! Nom ; a = agrLite np.a} ;
isNP = True} ; isNP = True} ;
--
-- --
} }

View File

@@ -243,8 +243,8 @@ lin kilometre_1_N = 'كَمّ_N' ; -- 647 [['quantity, multitude'], ['quantum']]
-- lin kilometre_1_N = 'كِمّ_N' ; -- 6304 [['calyx of a flower, the envelope or spathe of a palm-tree or the like']] -- lin kilometre_1_N = 'كِمّ_N' ; -- 6304 [['calyx of a flower, the envelope or spathe of a palm-tree or the like']]
-- lin kilometre_1_N = 'كُمّ_N' ; -- 16436 [['sleeve of a garment']] -- lin kilometre_1_N = 'كُمّ_N' ; -- 16436 [['sleeve of a garment']]
lin kina_N = mkN "كينا" ; --- guess from كينا lin kina_N = mkN "كينا" ; --- guess from كينا
lin king_1_N = 'مَلَك_N' ; -- 1462 [['angel']] -- lin king_1_N = 'مَلَك_N' ; -- 1462 [['angel']]
-- lin king_1_N = 'مَلِك_N' ; -- 11923 [['king, sovereign, monarch']] lin king_1_N = 'مَلِك_N' ; -- 11923 [['king, sovereign, monarch']]
-- lin king_1_N = 'مَلَك_1_N' ; -- 14484 [['possession, property'], ['food and water, resources; anything which regulates, maintains, or sustains; essentials, supplies, utilities'], ['foundation of ones existence'], ['foundation of ones existence', 'agent or effective cause']] -- lin king_1_N = 'مَلَك_1_N' ; -- 14484 [['possession, property'], ['food and water, resources; anything which regulates, maintains, or sustains; essentials, supplies, utilities'], ['foundation of ones existence'], ['foundation of ones existence', 'agent or effective cause']]
-- lin king_1_N = 'مِلْك_N' ; -- 117902 [['verbal noun of مَلَكَ (malaka) (form I)'], ['property, possession, goods and chattels, fortune, wealth'], ['estate'], ['real estate, landed property']] -- lin king_1_N = 'مِلْك_N' ; -- 117902 [['verbal noun of مَلَكَ (malaka) (form I)'], ['property, possession, goods and chattels, fortune, wealth'], ['estate'], ['real estate, landed property']]
-- lin king_1_N = 'مُلْك_N' ; -- 117903 [['verbal noun of مَلَكَ (malaka) (form I)'], ['rule, reign, supreme authority, dominion, dominance, sway, power'], ['sovereignty, kingship, royalty'], ['monarchy']] -- lin king_1_N = 'مُلْك_N' ; -- 117903 [['verbal noun of مَلَكَ (malaka) (form I)'], ['rule, reign, supreme authority, dominion, dominance, sway, power'], ['sovereignty, kingship, royalty'], ['monarchy']]

View File

@@ -123,7 +123,7 @@ lin IFrac d i = {
if_then_Str d.hasDot BIND (BIND++"."++BIND) ++ if_then_Str d.hasDot BIND (BIND++"."++BIND) ++
i.s ! co ; i.s ! co ;
n = Pl ; n = Pl ;
hasDot=False hasDot=True
} ; } ;
} }

View File

@@ -140,11 +140,12 @@ param
Dig = TDigit ; Dig = TDigit ;
lin lin
IDig d = d ; IDig d = d ** {tail = T1} ;
IIDig d i = { IIDig d i = {
s = \\o => d.s ! NCard Masc ++ BIND ++ i.s ! o ; s = \\o => d.s ! NCard Masc ++ spaceIf i.tail ++ i.s ! o ;
n = Pl n = Pl ;
tail = inc i.tail
} ; } ;
D_0 = mkDig "0" ; D_0 = mkDig "0" ;
@@ -166,12 +167,24 @@ param
} ; } ;
IFrac d i = { IFrac d i = {
s = \\o => d.s ! NCard Masc ++ s = \\o => d.s ! NCard Masc ++
if_then_Str d.hasDot BIND (BIND++"."++BIND) ++ if_then_Str d.hasDot BIND (BIND++","++BIND) ++
i.s ! o ; i.s ! o ;
n = Pl ; n = Pl ;
hasDot=True hasDot=True
} ; } ;
oper
spaceIf : DTail -> Str = \t -> case t of {
T3 => SOFT_SPACE ;
_ => BIND
} ;
inc : DTail -> DTail = \t -> case t of {
T1 => T2 ;
T2 => T3 ;
T3 => T1
} ;
oper oper
mk2Dig : Str -> Str -> TDigit = \c,o -> mk3Dig c o Pl ; mk2Dig : Str -> Str -> TDigit = \c,o -> mk3Dig c o Pl ;
mkDig : Str -> TDigit = \c -> mk2Dig c (c + ":o") ; mkDig : Str -> TDigit = \c -> mk2Dig c (c + ":o") ;

View File

@@ -157,7 +157,7 @@ oper
if_then_Str d.hasDot BIND (BIND++"."++BIND) ++ if_then_Str d.hasDot BIND (BIND++"."++BIND) ++
i.s ! o ; i.s ! o ;
n = Pl ; n = Pl ;
hasDot=False hasDot=True
} ; } ;
oper oper

View File

@@ -97,7 +97,7 @@ concrete CatFin of Cat = CommonX ** open ResFin, StemFin, Prelude in {
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} ;
PN = SPN ; PN = SPN ;
LN = SPN ** {n : Number} ; LN = SPN ** {n : Number ; extCase : Bool} ; -- extCase=True -> Adessive, Ablative, Allative
GN = SPN ** {g : Sex} ; GN = SPN ** {g : Sex} ;
SN = {s : Sex => SPN; pl : SPN} ; SN = {s : Sex => SPN; pl : SPN} ;

View File

@@ -74,9 +74,10 @@ lin
yearAdv y = SyntaxFin.mkAdv (prePrep nominative "vuonna") y ; yearAdv y = SyntaxFin.mkAdv (prePrep nominative "vuonna") y ;
dayMonthAdv d m = ParadigmsFin.mkAdv ((mkUtt d).s ++ BIND ++ "." ++ (mkUtt (mkNP m)).s) ; dayMonthAdv d m = ParadigmsFin.mkAdv ((mkUtt d).s ++ BIND ++ "." ++ (mkUtt (mkNP m)).s) ;
monthYearAdv m y = SyntaxFin.mkAdv in_Prep (mkNP (mkNP m) (SyntaxFin.mkAdv (casePrep nominative) y)) ; monthYearAdv m y = SyntaxFin.mkAdv in_Prep (mkNP (mkNP m) (SyntaxFin.mkAdv (casePrep nominative) y)) ;
---- dayMonthYearAdv d m y = dayMonthYearAdv d m y =
---- lin Adv {s = d.s ! R.NPCase R.Nom ++ BIND ++ "." ++ m.s ! R.NCase R.Sg R.Part ++ y.s ! R.NPCase R.Nom} ; ParadigmsFin.mkAdv ((mkUtt d).s ++ BIND ++ "." ++
(SyntaxFin.mkAdv part_Prep (mkNP m)).s ++
(SyntaxFin.mkAdv (casePrep nominative) y).s) ;
intYear = symb ; intYear = symb ;
intMonthday = symb ; intMonthday = symb ;

View File

@@ -33,7 +33,7 @@ lin
InflectionPN = \pn -> { InflectionPN = \pn -> {
t = "s" ; t = "s" ;
s1 = heading1 "Oikea Nimi" ; s1 = heading1 "Erisnimi" ;
s2 = inflPN (\c -> pn.s ! c) s2 = inflPN (\c -> pn.s ! c)
} ; } ;

View File

@@ -32,12 +32,8 @@ lin UseLN, PlainLN = \ln -> {
isPron = False ; isNeg = False isPron = False ; isNeg = False
} ; } ;
lin InLP ln = { lin InLN ln =
s = appCompl True Pos ln.c { s = snoun2np ln.n ln ; let c = case ln.extCase of {True => Adess ; False => Iness}
a = agrP3 ln.n ; in {s = ln.s ! c} ;
isPron = False ;
isNeg = False
}
} ;
} }

View File

@@ -191,7 +191,7 @@ oper
if_then_Str d.hasDot BIND (BIND++"."++BIND) ++ if_then_Str d.hasDot BIND (BIND++"."++BIND) ++
i.s ! o ; i.s ! o ;
n = Pl ; n = Pl ;
hasDot=False hasDot=True
} ; } ;
oper oper

View File

@@ -843,10 +843,14 @@ mkVS = overload {
} ; } ;
mkLN = overload { mkLN = overload {
mkLN : Str -> LN = \s -> lin LN (snoun2spn (mk1N s) ** {n = Sg}) ; mkLN : Str -> LN = \s -> lin LN (snoun2spn (mk1N s) ** {n = Sg ; extCase = False}) ;
mkLN : Str -> Number -> LN = \s,n -> lin LN (snoun2spn (mk1N s) ** {n = n}) ; mkLN : Str -> Number -> LN = \s,n -> lin LN (snoun2spnGen (mk1N s) n ** {n = n ;
mkLN : N -> LN = \noun -> lin LN (snoun2spn noun ** {n = Sg}) ; extCase = case n of {Pl => True ; Sg => False}}) ; -- default case for Sg is In, for Pl is On
mkLN : N -> Number -> LN = \noun,n -> lin LN (snoun2spn noun ** {n = n}) ; mkLN : N -> LN = \noun -> lin LN (snoun2spn noun ** {n = Sg ; extCase = False}) ;
mkLN : N -> Number -> LN = \noun,n -> lin LN (snoun2spnGen noun n ** {n = n ;
extCase = case n of {Pl => True ; Sg => False}}) ;
mkLN : Str -> Number -> Bool -> LN = \s,n,c -> lin LN (snoun2spnGen (mk1N s) n ** {n = n ; extCase = c}) ;
mkLN : N -> Number -> Bool -> LN = \noun,n,c -> lin LN (snoun2spnGen noun n ** {n = n ; extCase = c}) ;
} ; } ;
mkGN = overload { mkGN = overload {

View File

@@ -38,7 +38,9 @@ oper
SPN : Type = {s : Case => Str} ; SPN : Type = {s : Case => Str} ;
snoun2spn : SNoun -> SPN = \n -> {s = \\c => n.s ! NCase Sg c} ;
snoun2spn : SNoun -> SPN = \n -> snoun2spnGen n Sg ;
snoun2spnGen : SNoun -> Number -> SPN = \n,nb -> {s = \\c => n.s ! NCase nb c} ;
exceptNomSNoun : SNoun -> Str -> SNoun = \noun,nom -> { exceptNomSNoun : SNoun -> Str -> SNoun = \noun,nom -> {
s = table { s = table {

View File

@@ -153,11 +153,12 @@ oper hyphen = BIND ++ "-" ++ BIND ;
Dig = TDigit ; Dig = TDigit ;
lin lin
IDig d = d ; IDig d = d ** {tail = T1} ;
IIDig d i = { IIDig d i = {
s = \\o => d.s ! NCard Masc ++ BIND ++ i.s ! o ; s = \\o => d.s ! NCard Masc ++ spaceIf i.tail ++ i.s ! o ;
n = Pl n = Pl ;
tail = inc i.tail
} ; } ;
D_0 = mkDig "0" ; D_0 = mkDig "0" ;
@@ -179,12 +180,24 @@ oper hyphen = BIND ++ "-" ++ BIND ;
} ; } ;
IFrac d i = { IFrac d i = {
s = \\o => d.s ! NCard Masc ++ s = \\o => d.s ! NCard Masc ++
if_then_Str d.hasDot BIND (BIND++"."++BIND) ++ if_then_Str d.hasDot BIND (BIND++","++BIND) ++
i.s ! o ; i.s ! o ;
n = Pl ; n = Pl ;
hasDot=True hasDot=True
} ; } ;
oper
spaceIf : DTail -> Str = \t -> case t of {
T3 => SOFT_SPACE ;
_ => BIND
} ;
inc : DTail -> DTail = \t -> case t of {
T1 => T2 ;
T2 => T3 ;
T3 => T1
} ;
oper oper
mk2Dig : Str -> Str -> TDigit = \c,o -> mk3Dig c o Pl ; mk2Dig : Str -> Str -> TDigit = \c,o -> mk3Dig c o Pl ;
mkDig : Str -> TDigit = \c -> mk2Dig c (c + "ème") ; mkDig : Str -> TDigit = \c -> mk2Dig c (c + "ème") ;

View File

@@ -3,29 +3,28 @@ concrete AdjectiveGer of Adjective = CatGer ** open ResGer, Prelude in {
flags optimize=all_subs ; flags optimize=all_subs ;
lin lin
PositA a = { PositA a = {
s = a.s ! Posit ; s = a.s ! Posit ;
s2 = \\_ => [] ;
isPre = True ; isPre = True ;
c = <[],[]> ; c = <[],[]> ;
ext = [] ext = []
} ; } ;
ComparA a np = ComparA a np = {
let nps = np.s ! False ! Nom ++ bigNP np s = \\af => a.s ! Compar ! af ;
in { s2 = \\c => conjThan ++ np.s ! False ! c ++ np.ext ++ np.rc ;
s = \\af => a.s ! Compar ! af ++ conjThan ++ nps ;
isPre = True ; isPre = True ;
c = <[],[]> ; c = <[],[]> ;
ext = [] ext = []
} ; } ;
CAdvAP ad ap np = CAdvAP adv ap np = ap ** {
let nps = np.s ! False ! Nom ++ bigNP np in s = \\af => adv.s ++ ap.s ! af ;
ap ** { s2 = \\c => adv.p ++ np.s ! False ! c ++ np.ext ++ np.rc ;
s = \\af => ad.s ++ ap.s ! af ++ ad.p ++ nps ; isPre = True -- HL 1/2023
isPre = False
} ; } ;
UseComparA a = { UseComparA a = {
s = \\af => a.s ! Compar ! af ; s = \\af => a.s ! Compar ! af ;
s2 = \\_ => [] ;
isPre = True ; isPre = True ;
c = <[],[]> ; c = <[],[]> ;
ext = [] ext = []
@@ -33,6 +32,7 @@ concrete AdjectiveGer of Adjective = CatGer ** open ResGer, Prelude in {
AdjOrd a = { AdjOrd a = {
s = a.s ; s = a.s ;
s2 = \\_ => [] ;
isPre = True ; isPre = True ;
c = <[],[]> ; c = <[],[]> ;
ext = [] ext = []
@@ -41,25 +41,24 @@ concrete AdjectiveGer of Adjective = CatGer ** open ResGer, Prelude in {
-- $SuperlA$ belongs to determiner syntax in $Noun$. -- $SuperlA$ belongs to determiner syntax in $Noun$.
ComplA2 a np = ComplA2 a np =
let CExt = case a.c2.t of { let
isCase => <appPrepNP a.c2 np, []> ; obj = appPrepNP a.c2 np
_ => <[], appPrepNP a.c2 np> }
in { in {
s = a.s ! Posit ; s = a.s ! Posit ;
isPre = True ; s2 = \\_ => [] ;
c = CExt ; isPre = True ;
ext = [] c = case a.c2.t of {isCase => <obj, []> ; _ => <[], obj>} ;
ext = []
} ; } ;
ReflA2 a = ReflA2 a =
let let
compl = appPrep a.c2 (reflPron ! agrP3 Sg) ; obj = appPrep a.c2 (reflPron ! agrP3 Sg) ;
CExt = case a.c2.t of
{isCase => <compl, []> ; _ => <[], compl> }
in { in {
s = a.s ! Posit ; s = a.s ! Posit ;
s2 = \\_ => [] ;
isPre = True ; isPre = True ;
c = CExt ; c = case a.c2.t of {isCase => <obj, []> ; _ => <[], obj>} ;
ext = [] ext = []
} ; } ;
@@ -72,9 +71,12 @@ concrete AdjectiveGer of Adjective = CatGer ** open ResGer, Prelude in {
UseA2 a = { UseA2 a = {
s = a.s ! Posit ; s = a.s ! Posit ;
s2 = \\_ => [] ;
isPre = True ; isPre = True ;
c = <[],[]> ; c = <[],[]> ;
ext = [] ext = []
} ; } ;
AdvAP ap adv = ap ** {s = \\a => adv.s ++ ap.s ! a} ; -- HL 1/2024
} }

View File

@@ -44,10 +44,13 @@ concrete CatGer of Cat =
-- Adjective (HL 7/23: we need c : Agr => Str * Str to handle reflexive objects, cf ReflA2) -- Adjective (HL 7/23: we need c : Agr => Str * Str to handle reflexive objects, cf ReflA2)
AP = {s : AForm => Str ; isPre : Bool ; c: Str * Str ; ext : Str} ; AP = {
-- ich bin [c1 ihm] treu s : AForm => Str ; -- (strong) adjective paradigm
-- du bist so klug gewesen [ext ihn zu lesen] s2 : Case => Str ; -- comparison np, e.g. [s kleineres] (Tier) [s2 als den Hund] HL 1/34
-- ich bin stolz [c2 auf dich] isPre : Bool ; -- pre-nominal as attribute, e.g. False with sentential complement
c: Str * Str ; -- np,pp-complement, e.g. (ich bin) [c1 ihm] treu ; stolz [c2 auf dich]
ext : Str -- s,inf-complement, (du bist) so klug (gewesen) [ext ihn zu lesen]
} ;
-- Noun -- Noun
@@ -65,7 +68,8 @@ concrete CatGer of Cat =
DAP = {s,sp : Gender => Case => Str ; n : Number ; a : Adjf ; isDef,hasDefArt : Bool} ; DAP = {s,sp : Gender => Case => Str ; n : Number ; a : Adjf ; isDef,hasDefArt : Bool} ;
Quant = { Quant = {
s,sp : GenNum => Case => Str ; s : Bool => GenNum => Case => Str ; -- True if leading DefArtSg is dropped
sp : GenNum => Case => Str ; -- and contracted with preposition
a : Adjf ; a : Adjf ;
isDefArt : Bool ; isDefArt : Bool ;
delCardOne : Bool -- delete following cardinal 1 (IndefArt and no_Quant) delCardOne : Bool -- delete following cardinal 1 (IndefArt and no_Quant)
@@ -127,7 +131,7 @@ concrete CatGer of Cat =
VP = \vp -> useInfVP False vp ; VP = \vp -> useInfVP False vp ;
VPSlash = \vps -> useInfVP False vps ++ vps.c2.s ! GPl ++ vps.ext; VPSlash = \vps -> useInfVP False vps ++ vps.c2.s ! GPl ++ vps.ext;
AP = \ap -> ap.c.p1 ++ ap.s ! APred ++ ap.c.p2 ++ ap.ext ; AP = \ap -> ap.c.p1 ++ ap.s ! APred ++ ap.c.p2 ++ ap.s2 ! Nom ++ ap.ext ;
A2 = \a2 -> a2.s ! Posit ! APred ++ a2.c2.s ! GPl ; A2 = \a2 -> a2.s ! Posit ! APred ++ a2.c2.s ! GPl ;
V, VS, VQ, VA = \v -> useInfVP False (predV v) ; V, VS, VQ, VA = \v -> useInfVP False (predV v) ;

View File

@@ -20,6 +20,7 @@ concrete ConjunctionGer of Conjunction =
in (conjAgr agr ss.a) }) ; in (conjAgr agr ss.a) }) ;
ConjAP conj ss = conjunctDistrTable AForm conj ss ** { ConjAP conj ss = conjunctDistrTable AForm conj ss ** {
s2 = \\c => [] ; -- comparison np of ap = {s:AForm => Str; s2:Case => Str} HL 1/23
isPre = ss.isPre ; c = ss.c ; ext = ss.ext} ; isPre = ss.isPre ; c = ss.c ; ext = ss.ext} ;
ConjRS conj ss = conjunctDistrTable RelGenNum conj ss ** { ConjRS conj ss = conjunctDistrTable RelGenNum conj ss ** {
@@ -87,8 +88,8 @@ concrete ConjunctionGer of Conjunction =
[CN] = {s1,s2 : Adjf => Number => Case => Str ; g : Gender} ; [CN] = {s1,s2 : Adjf => Number => Case => Str ; g : Gender} ;
oper oper
bigAP : AP -> AForm => Str = \ap -> bigAP : AP -> AForm => Str = \ap -> -- HL 1/23: not always ok:
\\a => ap.c.p1 ++ ap.s ! a ++ ap.c.p2 ++ ap.ext; \\a => ap.c.p1 ++ ap.s ! a ++ ap.c.p2 ++ ap.ext ++ ap.s2 ! Nom ; -- comparison np in Nom
bigCN : CN -> Adjf => Number => Case => Str = \cn -> bigCN : CN -> Adjf => Number => Case => Str = \cn ->
\\a,n,c => cn.s ! a ! n ! c ++ cn.adv ++ cn.ext ++ cn.rc ! n ; \\a,n,c => cn.s ! a ! n ! c ++ cn.adv ++ cn.ext ++ cn.rc ! n ;

View File

@@ -26,11 +26,14 @@ concrete ExtendGer of Extend =
(P = ParadigmsGer) in { (P = ParadigmsGer) in {
lin lin
GenNP np = { GenNP np =
s,sp = \\gn,c => np.s ! False ! Gen ++ np.ext ++ np.rc ; let tab : GenNum => Case => Str =
a = Strong ; \\gn,c => np.s ! False ! Gen ++ np.ext ++ np.rc
isDefArt = False ; in {s = \\_ => tab ;
delCardOne = False sp = tab ;
a = Strong ;
isDefArt = False ;
delCardOne = False
} ; } ;
EmptyRelSlash slash = { EmptyRelSlash slash = {
@@ -164,6 +167,7 @@ concrete ExtendGer of Extend =
let a = agrP3 Sg in { let a = agrP3 Sg in {
s = \\af => (vp.nn ! a).p1 ++ (vp.nn ! a).p2 ++ (vp.nn ! a).p3 ++ vp.a2 ++ vp.adj s = \\af => (vp.nn ! a).p1 ++ (vp.nn ! a).p2 ++ (vp.nn ! a).p3 ++ vp.a2 ++ vp.adj
++ vp.inf.inpl.p2 ++ (vp.inf.extr ! a) ++ vp.s.s ! VPastPart af ; ++ vp.inf.inpl.p2 ++ (vp.inf.extr ! a) ++ vp.s.s ! VPastPart af ;
s2 = \\_ => [] ;
isPre = True ; isPre = True ;
c = <[],[]> ; c = <[],[]> ;
ext = vp.ext ext = vp.ext
@@ -177,6 +181,7 @@ concrete ExtendGer of Extend =
++ vp.a2 ++ agent ++ vp.adj ++ vp.inf.inpl.p2 ++ vp.a2 ++ agent ++ vp.adj ++ vp.inf.inpl.p2
++ vp.c2.s ! GPl -- junk if not TV ++ vp.c2.s ! GPl -- junk if not TV
++ vp.ext ++ (vp.inf.extr ! a) ++ vp.s.s ! VPastPart af ; ++ vp.ext ++ (vp.inf.extr ! a) ++ vp.s.s ! VPastPart af ;
s2 = \\_ => [] ;
isPre = True ; isPre = True ;
c = <[],[]> ; c = <[],[]> ;
ext = [] ext = []
@@ -291,6 +296,7 @@ concrete ExtendGer of Extend =
compl = appPrep adj.c2 (rnp.s ! agrP3 Sg) ; -- we use a fixed agreement compl = appPrep adj.c2 (rnp.s ! agrP3 Sg) ; -- we use a fixed agreement
in { in {
s = adj.s ! Posit ; s = adj.s ! Posit ;
s2 = \\_ => [] ;
isPre = True ; isPre = True ;
c = case adj.c2.t of {isCase => <compl, []> ; _ => <[], compl>} ; c = case adj.c2.t of {isCase => <compl, []> ; _ => <[], compl>} ;
ext = rnp.ext ++ rnp.rc ext = rnp.ext ++ rnp.rc

View File

@@ -71,6 +71,7 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
let a = agrP3 Sg in { let a = agrP3 Sg in {
s = \\af => (vp.nn ! a).p1 ++ (vp.nn ! a).p2 ++ (vp.nn ! a).p3 ++ vp.a2 ++ vp.adj s = \\af => (vp.nn ! a).p1 ++ (vp.nn ! a).p2 ++ (vp.nn ! a).p3 ++ vp.a2 ++ vp.adj
++ vp.inf.inpl.p2 ++ (vp.inf.extr ! a) ++ vp.s.s ! VPastPart af ; ++ vp.inf.inpl.p2 ++ (vp.inf.extr ! a) ++ vp.s.s ! VPastPart af ;
s2 = \\_ => [] ;
isPre = True ; isPre = True ;
c = <[],[]> ; c = <[],[]> ;
ext = vp.ext ext = vp.ext
@@ -84,6 +85,7 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
++ vp.a2 ++ agent ++ vp.adj ++ vp.inf.inpl.p2 ++ vp.a2 ++ agent ++ vp.adj ++ vp.inf.inpl.p2
++ vp.c2.s ! GPl -- junk if not TV ++ vp.c2.s ! GPl -- junk if not TV
++ vp.ext ++ (vp.inf.extr ! a) ++ vp.s.s ! VPastPart af ; ++ vp.ext ++ (vp.inf.extr ! a) ++ vp.s.s ! VPastPart af ;
s2 = \\_ => [] ;
isPre = True ; isPre = True ;
c = <[],[]> ; c = <[],[]> ;
ext = [] ext = []
@@ -230,6 +232,7 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
compl = appPrep adj.c2 (rnp.s ! agrP3 Sg) ; -- we use a fixed agreement compl = appPrep adj.c2 (rnp.s ! agrP3 Sg) ; -- we use a fixed agreement
in { in {
s = adj.s ! Posit ; s = adj.s ! Posit ;
s2 = \\_ => [] ;
isPre = True ; isPre = True ;
c = case adj.c2.t of {isCase => <compl, []> ; _ => <[], compl>} ; c = case adj.c2.t of {isCase => <compl, []> ; _ => <[], compl>} ;
ext = rnp.ext ++ rnp.rc ext = rnp.ext ++ rnp.rc

View File

@@ -27,11 +27,13 @@ oper
-- e.g. das selbe -- e.g. das selbe
mmkQuant : Quant -> A -> Quant = \q,a -> q ** { mmkQuant : Quant -> A -> Quant = \q,a -> q ** {
s,sp = \\gn,c => q.s ! gn ! c ++ a.s ! Posit ! agrAdj q.a gn c s = \\b,gn,c => q.s ! b ! gn ! c ++ a.s ! Posit ! agrAdj q.a gn c ;
sp = \\gn,c => q.s ! False ! gn ! c ++ a.s ! Posit ! agrAdj q.a gn c
} ; } ;
-- e.g. derjenige -- e.g. derjenige
mmbQuant : Quant -> A -> Quant = \q,a -> q ** { mmbQuant : Quant -> A -> Quant = \q,a -> q ** {
s,sp = \\gn,c => q.s ! gn ! c + a.s ! Posit ! agrAdj q.a gn c s = \\b,gn,c => q.s ! b ! gn ! c + a.s ! Posit ! agrAdj q.a gn c ;
sp = \\gn,c => q.s ! False ! gn ! c + a.s ! Posit ! agrAdj q.a gn c
} ; } ;
} }

View File

@@ -71,11 +71,6 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
} ; } ;
oper oper
dropDefArtSg : Number -> Bool -> (GenNum => Case => Str) -> (Bool => GenNum => Case => Str) =
\n,isDefArt,qnt -> case <n,isDefArt> of {
<Sg,True> => table{True => \\gn,c => [] ; False => qnt} ;
_ => \\b => qnt
} ;
einziger : AForm => Str = table{AMod gn c => "einzig" + adjEnding ! gn ! c ; _ => "einziges"} ; einziger : AForm => Str = table{AMod gn c => "einzig" + adjEnding ! gn ! c ; _ => "einziges"} ;
lin lin
@@ -85,7 +80,6 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
a = quant.a ; a = quant.a ;
d = quant.isDefArt ; d = quant.isDefArt ;
isCardOne = case n of {Sg => num.isNum ; _ => False} ; isCardOne = case n of {Sg => num.isNum ; _ => False} ;
qunt : Bool => GenNum => Case => Str = dropDefArtSg n d quant.s ;
nums : AForm => Str = \\af => case af of { nums : AForm => Str = \\af => case af of {
AMod (GSg g) c => case <quant.delCardOne,isCardOne> of { AMod (GSg g) c => case <quant.delCardOne,isCardOne> of {
<True,True> => einziger ! af ; -- (ein,kein) einziger <True,True> => einziger ! af ; -- (ein,kein) einziger
@@ -94,7 +88,7 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
_ => num.s ! APred} _ => num.s ! APred}
in { in {
s,sp = \\b,g,c => let gn = gennum g n in s,sp = \\b,g,c => let gn = gennum g n in
qunt ! b ! gn ! c ++ nums ! agrAdj a gn c ++ ord.s ! agrAdj a gn c ; quant.s ! b ! gn ! c ++ nums ! agrAdj a gn c ++ ord.s ! agrAdj a gn c ;
n = n ; n = n ;
a = a ; a = a ;
isDef = case a of {Strong => False ; _ => True} ; isDef = case a of {Strong => False ; _ => True} ;
@@ -107,9 +101,8 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
a = quant.a ; a = quant.a ;
d = quant.isDefArt ; d = quant.isDefArt ;
isCardOne = case n of {Sg => num.isNum ; _ => False} ; isCardOne = case n of {Sg => num.isNum ; _ => False} ;
quants = dropDefArtSg n d quant.s ;
quantsp : Bool => GenNum => Case => Str = quantsp : Bool => GenNum => Case => Str =
dropDefArtSg n d (case num.isNum of {True => quant.s ; False => quant.sp}) ; case num.isNum of {True => quant.s ; False => \\b => quant.sp} ;
nums : AForm => Str = \\af => case af of { nums : AForm => Str = \\af => case af of {
AMod (GSg g) c => case <quant.delCardOne,isCardOne> of { AMod (GSg g) c => case <quant.delCardOne,isCardOne> of {
<True,True> => einziger ! af ; -- (k)ein einziger, drop cardinal "ein" of num <True,True> => einziger ! af ; -- (k)ein einziger, drop cardinal "ein" of num
@@ -119,7 +112,7 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
APred => num.s ! APred} APred => num.s ! APred}
in { in {
s = \\b,g,c => let gn = gennum g n in s = \\b,g,c => let gn = gennum g n in
quants ! b ! gn ! c ++ nums ! agrAdj a gn c ; quant.s ! b ! gn ! c ++ nums ! agrAdj a gn c ;
sp = \\b,g,c => let gn = gennum g n in sp = \\b,g,c => let gn = gennum g n in
quantsp ! b ! gn ! c ++ nums ! agrAdj a gn c ; quantsp ! b ! gn ! c ++ nums ! agrAdj a gn c ;
n = n ; n = n ;
@@ -129,8 +122,8 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
} ; } ;
PossPron p = { PossPron p = {
s = \\gn,c => p.s ! NPPoss gn c ; -- mein (dritter) s = \\_,gn,c => p.s ! NPPoss gn c ; -- mein (dritter)
sp = \\gn,c => p.sp ! PossF gn c ; -- meiner sp = \\gn,c => p.sp ! PossF gn c ; -- meiner
a = Mixed ; a = Mixed ;
isDefArt = False ; isDefArt = False ;
delCardOne = False ; delCardOne = False ;
@@ -166,7 +159,7 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
af => n.s ! NOrd APred ++ BIND ++ a.s ! Superl ! af} -- drittbeste af => n.s ! NOrd APred ++ BIND ++ a.s ! Superl ! af} -- drittbeste
} ; } ;
DefArt = { DefArt = {
s = \\gn,c => artDef ! gn ! c ; s = \\b,gn,c => case <b,gn> of {<True,GSg _> => [] ; _ => artDef ! gn ! c} ;
sp = \\gn,c => case <gn,c> of { sp = \\gn,c => case <gn,c> of {
<GSg Masc,Gen> => "dessen" ; <GSg Masc,Gen> => "dessen" ;
<GSg Fem, Gen> => "derer" ; <GSg Fem, Gen> => "derer" ;
@@ -180,8 +173,8 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
} ; } ;
IndefArt = { IndefArt = {
s = table {GSg g => \\c => "ein" + pronEnding ! (GSg g) ! c ; s = \\_ => table {GSg g => \\c => "ein" + pronEnding ! (GSg g) ! c ;
GPl => \\c => []} ; GPl => \\c => []} ;
sp = table {GSg g => \\c => "ein" + detEnding ! (GSg g) ! c ; sp = table {GSg g => \\c => "ein" + detEnding ! (GSg g) ! c ;
GPl => caselist "einige" "einige" "einigen" "einiger"} ; GPl => caselist "einige" "einige" "einigen" "einiger"} ;
a = MixedStrong ; -- Sg Mixed, Pl Strong a = MixedStrong ; -- Sg Mixed, Pl Strong
@@ -233,10 +226,12 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
let let
g = cn.g g = cn.g
in cn ** { in cn ** {
s = \\a,n,c => s = case ap.isPre of { -- HL 1/2023 False only for ap = SentAP ap' sc
preOrPost ap.isPre True => \\a,n,c => -- besserer cn als a.s2 [instead: cn, besser als a.s2,]
(ap.c.p1 ++ ap.c.p2 ++ ap.s ! agrAdj a (gennum g n) c) (ap.c.p1 ++ ap.c.p2 ++ ap.s ! agrAdj a (gennum g n) c)
(cn.s ! a ! n ! c) ++ ap.ext ; -- comparison part of ap HL 11/2023; ++ (cn.s ! a ! n ! c) ++ ap.s2 ! c ++ ap.ext ;
False => \\a,n,c => cn.s ! a ! n ! c ++ -- postnominal ap with sc
embedInCommas (ap.c.p1 ++ ap.c.p2 ++ ap.s ! APred ++ ap.s2 ! c ++ ap.ext)} ;
g = g g = g
} ; } ;

View File

@@ -103,17 +103,18 @@ concrete StructuralGer of Structural = CatGer **
} ; } ;
something_NP = nameNounPhrase Neutr {s = \\_ => "etwas"} ; something_NP = nameNounPhrase Neutr {s = \\_ => "etwas"} ;
somewhere_Adv = ss "irgendwo" ; somewhere_Adv = ss "irgendwo" ;
that_Quant = { that_Quant = let jener : GenNum => Case => Str = \\gn,c => "jen" + detEnding ! gn ! c
s,sp = \\gn,c => "jen" + detEnding ! gn ! c ; a = Weak ; isDefArt,delCardOne = False} ; in {s = \\_ => jener ; sp = jener ; a = Weak ; isDefArt,delCardOne = False} ;
---b that_NP = nameNounPhrase Neutr {s = caselist "das" "das" "dem" "dessen"} ; ---- ---b that_NP = nameNounPhrase Neutr {s = caselist "das" "das" "dem" "dessen"} ; ----
there_Adv = ss "da" ; --- no variants in the rgl | ss "dort" ; there_Adv = ss "da" ; --- no variants in the rgl | ss "dort" ;
there7to_Adv = ss "dahin" ; there7to_Adv = ss "dahin" ;
there7from_Adv = ss ["daher"] ; there7from_Adv = ss ["daher"] ;
therefore_PConj = ss "deshalb" ; therefore_PConj = ss "deshalb" ;
---b these_NP = {s = caselist "diese" "diese" "diesen" "dieser" ; a = agrP3 Pl} ; ---b these_NP = {s = caselist "diese" "diese" "diesen" "dieser" ; a = agrP3 Pl} ;
they_Pron = mkPronPers "sie" "sie" "ihnen" "ihrer" "ihr" Fem Pl P3 ; they_Pron = mkPronPers "sie" "sie" "ihnen" "ihrer" "ihr" Fem Pl P3 ;
this_Quant = { this_Quant = let dieser : GenNum => Case => Str = \\gn,c => "dies" + detEnding ! gn ! c
s,sp = \\gn,c => "dies" + detEnding ! gn ! c ; a = Weak ; isDefArt, delCardOne = False} ; in {s = \\_ => dieser ; sp = dieser ; a = Weak ; isDefArt, delCardOne = False} ;
---b this_NP = nameNounPhrase Neutr {s = caselist "dies" "dies" "diesem" "dieses"} ; ---- ---b this_NP = nameNounPhrase Neutr {s = caselist "dies" "dies" "diesem" "dieses"} ; ----
---b those_NP = {s = caselist "jene" "jene" "jenen" "jener" ; a = agrP3 Pl} ; ---b those_NP = {s = caselist "jene" "jene" "jenen" "jener" ; a = agrP3 Pl} ;
through_Prep = mkPrep "durch" P.accusative ; through_Prep = mkPrep "durch" P.accusative ;
@@ -148,8 +149,8 @@ concrete StructuralGer of Structural = CatGer **
not_Predet = {s = \\_,_,_ => "nicht" ; c = noCase ; a = PAgNone} ; not_Predet = {s = \\_,_,_ => "nicht" ; c = noCase ; a = PAgNone} ;
no_Quant = { no_Quant = {
s = table {GSg g => \\c => "kein" + pronEnding ! GSg g ! c ; s = \\_ => table {GSg g => \\c => "kein" + pronEnding ! GSg g ! c ;
GPl => \\c => "kein" + detEnding ! GPl ! c} ; GPl => \\c => "kein" + detEnding ! GPl ! c} ;
sp = \\gn,c => "kein" + detEnding ! gn ! c ; sp = \\gn,c => "kein" + detEnding ! gn ! c ;
a = Mixed ; isDefArt = False ; delCardOne = True} ; -- HL kein+ein(er) => kein(er) a = Mixed ; isDefArt = False ; delCardOne = True} ; -- HL kein+ein(er) => kein(er)
if_then_Conj = {s1 = "wenn" ; s2 = "dann" ; n = Sg ; lock_Conj = <>} ; if_then_Conj = {s1 = "wenn" ; s2 = "dann" ; n = Sg ; lock_Conj = <>} ;

View File

@@ -37,7 +37,7 @@ concrete VerbGer of Verb = CatGer ** open Prelude, ResGer, Coordination in {
insertInf inf vps) ** {c2 = v.c2 ; objCtrl = v.objCtrl} ; insertInf inf vps) ** {c2 = v.c2 ; objCtrl = v.objCtrl} ;
SlashV2A v ap = SlashV2A v ap =
insertAdj (ap.s ! APred) ap.c ap.ext (predV v) ** {c2 = v.c2; objCtrl = False} ; insertAdj (ap.s ! APred ++ ap.s2 ! Nom) ap.c ap.ext (predV v) ** {c2 = v.c2; objCtrl = False} ;
ComplSlash vps np = ComplSlash vps np =
-- IL 24/04/2018 force reflexive in the VPSlash to take the agreement of np. -- IL 24/04/2018 force reflexive in the VPSlash to take the agreement of np.

View File

@@ -302,7 +302,7 @@ Xilias : CardOrd -> (CardOrd => Str) -> Number -> Str = \co,d,n ->
if_then_Str d.hasDot BIND (BIND++"."++BIND) ++ if_then_Str d.hasDot BIND (BIND++"."++BIND) ++
i.s ! o ; i.s ! o ;
n = Pl ; n = Pl ;
hasDot=False hasDot=True
} ; } ;
oper oper

View File

@@ -120,11 +120,12 @@ param Pred = pred | indip ;
Dig = TDigit ; Dig = TDigit ;
lin lin
IDig d = d ; IDig d = d ** {tail = T1} ;
IIDig d i = { IIDig d i = {
s = \\o => d.s ! NCard Masc ++ BIND ++ i.s ! o ; s = \\o => d.s ! NCard Masc ++ spaceIf i.tail ++ i.s ! o ;
n = Pl n = Pl ;
tail = inc i.tail
} ; } ;
D_0 = mkDig "0" ; D_0 = mkDig "0" ;
@@ -146,12 +147,24 @@ param Pred = pred | indip ;
} ; } ;
IFrac d i = { IFrac d i = {
s = \\o => d.s ! NCard Masc ++ s = \\o => d.s ! NCard Masc ++
if_then_Str d.hasDot BIND (BIND++"."++BIND) ++ if_then_Str d.hasDot BIND (BIND++","++BIND) ++
i.s ! o; i.s ! o;
n = Pl ; n = Pl ;
hasDot=True hasDot=True
} ; } ;
oper
spaceIf : DTail -> Str = \t -> case t of {
T3 => SOFT_SPACE ;
_ => BIND
} ;
inc : DTail -> DTail = \t -> case t of {
T1 => T2 ;
T2 => T3 ;
T3 => T1
} ;
oper oper
mkDig : Str -> TDigit = \c -> mk2Dig c Pl ; mkDig : Str -> TDigit = \c -> mk2Dig c Pl ;

View File

@@ -61,6 +61,7 @@ concrete AdjectiveMay of Adjective = CatMay ** open ResMay, Prelude in {
-- AdAP ada ap = ap ** { } ; -- AdAP ada ap = ap ** { } ;
-- It can also be postmodified by an adverb, typically a prepositional phrase. -- It can also be postmodified by an adverb, typically a prepositional phrase.

View File

@@ -20,9 +20,13 @@ lin
--AdAdv : AdA -> Adv -> Adv ; -- very quickly --AdAdv : AdA -> Adv -> Adv ; -- very quickly
-- AdAdv ada adv = adv ** -- AdAdv ada adv = adv **
-- Like adverbs, adadjectives can be produced by adjectives. -- Like adverbs, adadjectives can be produced by adjectives.
AdAdv ada adv = adv ** {
s = ada.s ++ adv.s ;
} ;
-- : A -> AdA ; -- extremely -- : A -> AdA ; -- extremely
-- PositAdAAdj a = { } ; -- PositAdAAdj a = { } ;
-- PositAdAAdj a = {s = a.s} ;
-- Subordinate clauses can function as adverbs. -- Subordinate clauses can function as adverbs.

View File

@@ -8,6 +8,7 @@ concrete ExtendMay of Extend = CatMay
, ListVPI -- infinitive VP's (TODO: with anteriority and polarity) , ListVPI -- infinitive VP's (TODO: with anteriority and polarity)
, MkVPS , MkVPS
, PredVPS, RelVPS, QuestVPS, SQuestVPS , PredVPS, RelVPS, QuestVPS, SQuestVPS
, PassVPSlash, PassAgentVPSlash
-- excluded because RGL funs needed for them not implemented yet -- excluded because RGL funs needed for them not implemented yet
, PredAPVP , PredAPVP
@@ -79,6 +80,7 @@ concrete ExtendMay of Extend = CatMay
PastPartAP vp = { PastPartAP vp = {
s = linVP vp s = linVP vp
} ; } ;
-- GenModNP : Num -> NP -> CN -> NP ; -- this man's car(s) -- GenModNP : Num -> NP -> CN -> NP ; -- this man's car(s)
GenModNP n np cn = variants {}; GenModNP n np cn = variants {};
@@ -100,6 +102,22 @@ concrete ExtendMay of Extend = CatMay
ByVP vp = cc2 by8means_Prep (GerundAdv vp) ; ByVP vp = cc2 by8means_Prep (GerundAdv vp) ;
-- PassVPSlash : VPS -> VP ;
-- be begged to sleep
PassVPSlash vps = vps ** {
s = \\vf,pol => vps.s ! Passive ! pol ++ vps.adjCompl;
};
-- PassAgentVPSlash : VPSlash -> NP -> VP ; -- be begged by her to go
PassAgentVPSlash vps np = {
s = \\vf,pol => vps.s ! Passive ! pol ++ vps.adjCompl ++ (applyPrep by8agent_Prep np);
};
-- PassAgentVPSlash vps np = {
-- s = \\vf,pol => vps.s ! Passive ! pol ++ (applyPrep by8agent_Prep np) ;
-- };
-- MkVPS2 : Temp -> Pol -> VPSlash -> VPS2 ; -- has loved -- MkVPS2 : Temp -> Pol -> VPSlash -> VPS2 ; -- has loved
-- ConjVPS2 : Conj -> [VPS2] -> VPS2 ; -- has loved and now hates -- ConjVPS2 : Conj -> [VPS2] -> VPS2 ; -- has loved and now hates
-- ComplVPS2 : VPS2 -> NP -> VPS ; -- has loved and now hates that person -- ComplVPS2 : VPS2 -> NP -> VPS ; -- has loved and now hates that person

View File

@@ -27,7 +27,7 @@ lin bank_N = mkN "bank" ;
lin beautiful_A = mkA "cantik" ; lin beautiful_A = mkA "cantik" ;
-- lin become_VA = mkVA "jadi" ; -- lin become_VA = mkVA "jadi" ;
lin beer_N = mkN "bir" ; lin beer_N = mkN "bir" ;
-- lin beg_V2V = mkV2 "" ; lin beg_V2V = mkV2 "rayu" ;
-- lin belly_N = mkN "" ; -- lin belly_N = mkN "" ;
lin big_A = mkA "besar" ; lin big_A = mkA "besar" ;
lin bike_N = mkN "basikal" ; lin bike_N = mkN "basikal" ;
@@ -95,8 +95,9 @@ lin day_N = mkN "hari" ;
-- lin doctor_N = mkN "" ; -- lin doctor_N = mkN "" ;
lin dog_N = mkN "anjing" ; lin dog_N = mkN "anjing" ;
lin door_N = mkN "pintu" ; lin door_N = mkN "pintu" ;
lin drink_V2 = let drink' : V2 = mkV2 "minum" in drink' ** { lin drink_V2 = let drink' : V2 = mkV2 "minum" in drink' ** { s = table {
s = \\_ => "minum" ; Passive => "diminum" ;
_ => "minum"} ;
}; };
-- lin dry_A = mkA "" ; -- lin dry_A = mkA "" ;
-- lin dull_A = mkA "" ; -- lin dull_A = mkA "" ;
@@ -108,7 +109,9 @@ lin drink_V2 = let drink' : V2 = mkV2 "minum" in drink' ** {
-- lin ear_N = mkN "" ; -- lin ear_N = mkN "" ;
-- lin earth_N = mkN "" ; -- lin earth_N = mkN "" ;
lin eat_V2 = let eat' : V2 = mkV2 "makan" in eat' ** { lin eat_V2 = let eat' : V2 = mkV2 "makan" in eat' ** {
s = \\_ => "makan" ; s = table {
Passive => "dimakan" ;
_ => "makan"} ;
}; };
-- lin egg_N = mkN "" ; -- lin egg_N = mkN "" ;
-- lin empty_A = mkA "" ; -- lin empty_A = mkA "" ;
@@ -208,15 +211,16 @@ lin king_N = mkN "raja" ;
-- lin language_N = mkN "" ; -- lin language_N = mkN "" ;
-- lin laugh_V = mkV "" ; -- lin laugh_V = mkV "" ;
-- lin leaf_N = mkN "" ; -- lin leaf_N = mkN "" ;
lin learn_V2 = mkV2 (prefixV (mkV "ajar" Ber)) emptyPrep ; lin learn_V2 = mkV2 (prefixV (mkV "belajar" NoPrefix)) emptyPrep ;
-- lin leather_N = mkN "" ; -- lin leather_N = mkN "" ;
-- lin leave_V2 = mkV2 "" ; -- lin leave_V2 = mkV2 "" ;
-- lin leg_N = mkN "" ; -- lin leg_N = mkN "" ;
-- lin lie_V = mkV "" ; -- lin lie_V = mkV "" ;
lin like_V2 = let like' : V2 = mkV2 "suka" in like' ** { lin like_V2 = let like' : V2 = mkV2 "suka" in like' ** {
s = \\_ => "suka" ; s = table {
passive = "disukai" ; Passive => "disukai" ;
} ; _ => "suka"} ;
};
-- lin listen_V2 = mkV2 "" ; -- lin listen_V2 = mkV2 "" ;
-- lin live_V = mkV ""; -- lin live_V = mkV "";
-- lin liver_N = mkN "" ; -- lin liver_N = mkN "" ;
@@ -224,11 +228,12 @@ lin long_A = mkA "panjang" ;
-- lin lose_V2 = mkV2 "" ; -- lin lose_V2 = mkV2 "" ;
-- lin louse_N = mkN "" ; -- lin louse_N = mkN "" ;
-- lin love_N = mkN "" ; -- lin love_N = mkN "" ;
-- lin love_V2 = let love' : V2 = mkV2 "cinta" in love' ** { lin love_V2 = let love' : V2 = mkV2 "cinta" in love' ** {
-- s = \\_ => "mencintai" ; s = table {
-- passive = "dicintai" ; Passive => "dicintai" ;
-- } ; _ => "mencintai" };
lin love_V2 = mkV4 "cinta" "i"; };
-- lin love_V2 = mkV4 "cinta" "i";
---- ----
-- M -- M
@@ -288,7 +293,7 @@ lin queen_N = mkN "ratu" ;
-- lin radio_N = mkN "" ; -- lin radio_N = mkN "" ;
lin rain_N = mkN "hujan" ; lin rain_N = mkN "hujan" ;
lin rain_V0 = mkV "hujan" ; lin rain_V0 = mkV "hujan" ;
lin read_V2 = mkV2 "baca" ; lin read_V2 = mkV2 (prefixV (mkV "baca" Meng)) emptyPrep ;
-- lin ready_A = mkA "" ; -- lin ready_A = mkA "" ;
-- lin reason_N = mkN "" ; -- lin reason_N = mkN "" ;
-- lin red_A = mkA "" ; -- lin red_A = mkA "" ;
@@ -336,7 +341,7 @@ lin sing_V = mkV "nyanyi" ;
-- lin sit_V = mkV "" ; -- lin sit_V = mkV "" ;
-- lin skin_N = mkN "" ; -- lin skin_N = mkN "" ;
-- lin sky_N = mkN "" ; -- lin sky_N = mkN "" ;
-- lin sleep_V = mkV "" ; lin sleep_V = mkV "tidur" ;
lin small_A = mkA "kecil" ; lin small_A = mkA "kecil" ;
-- lin smell_V = mkV "" ; -- lin smell_V = mkV "" ;
-- lin smoke_N = mkN "" ; -- lin smoke_N = mkN "" ;
@@ -345,7 +350,8 @@ lin small_A = mkA "kecil" ;
-- lin snow_N = mkN "" ; -- lin snow_N = mkN "" ;
-- lin sock_N = mkN "" ; -- lin sock_N = mkN "" ;
lin song_N = mkN "lagu" ; lin song_N = mkN "lagu" ;
-- lin speak_V2 = mkV2 "" ; lin speak_V2 = mkV2 (prefixV (mkV "cakap" Ber)) emptyPrep ;
-- lin spit_V = mkV "" ; -- lin spit_V = mkV "" ;
-- lin split_V2 = mkV2 "" ; -- lin split_V2 = mkV2 "" ;
-- lin squeeze_V2 = mkV2 "" ; -- lin squeeze_V2 = mkV2 "" ;
@@ -372,7 +378,7 @@ lin stop_V = mkV "henti" ;
-- lin table_N = mkN "" ; -- lin table_N = mkN "" ;
-- lin tail_N = mkN "" ; -- lin tail_N = mkN "" ;
lin talk_V3 = mkV3 (mkV "cakap" Ber) (mkPrep "tentang") (mkPrep "dengan") ; lin talk_V3 = mkV3 (mkV "cakap" Ber) (mkPrep "tentang") (mkPrep "dengan") ;
lin teach_V2 = mkV2 "ajar" ; lin teach_V2 = mkV2 (prefixV (mkV "ajar" Meng)) emptyPrep;
-- lin teacher_N = mkN "" ; -- lin teacher_N = mkN "" ;
-- lin television_N = mkN "" ; -- lin television_N = mkN "" ;
-- lin thick_A = mkA "" ; -- lin thick_A = mkA "" ;
@@ -402,7 +408,7 @@ lin ugly_A = mkA "jelek" ;
-- W - Y -- W - Y
-- lin wait_V2 = mkV2 "" ; -- lin wait_V2 = mkV2 "" ;
lin walk_V = mkV "jalan" ; lin walk_V = (prefixV (mkV "jalan" Ber)) ;
-- lin war_N = mkN "" ; -- lin war_N = mkN "" ;
-- lin warm_A = mkA "" ; -- lin warm_A = mkA "" ;
-- lin wash_V2 = mkV2 "" ; -- lin wash_V2 = mkV2 "" ;

View File

@@ -13,7 +13,7 @@ concrete NounMay of Noun = CatMay ** open ResMay, Prelude in {
-- TODO classifier is necessary if numeral comes after noun. See Mintz p. 298. -- TODO classifier is necessary if numeral comes after noun. See Mintz p. 298.
-- ++ if_then_Str (isNum det.n) "buah" [] -- TODO store classifier in CN -- ++ if_then_Str (isNum det.n) "buah" [] -- TODO store classifier in CN
++ case det.poss of { ++ case det.poss of {
Bare => cn.s ! NF (toNum det.n) poss ; Bare => cn.s ! NF (toNum det.n) det.poss ;
_ => cn.s ! NF (toNum det.n) det.poss -- TODO check if this make sense _ => cn.s ! NF (toNum det.n) det.poss -- TODO check if this make sense
} ++ det.s ++ cn.heavyMod ; } ++ det.s ++ cn.heavyMod ;
} ; } ;

View File

@@ -75,12 +75,16 @@ oper
-- mkVQ : Str -> VQ -- mkVQ : Str -> VQ
-- = \s -> lin VQ (regV s) ; -- = \s -> lin VQ (regV s) ;
mkV2A : overload {
mkV2A : Str -> V2A ;
} ;
-- --
-- mkV2A : Str -> V2A -- mkV2A : Str -> V2A
-- = \s -> lin V2A (regV s ** {c2 = noPrep}) ; -- = \s -> lin V2A (regV s ** {c2 = noPrep}) ;
-- mkV2Q : Str -> V2Q mkV2Q : overload {
-- = \s -> lin V2Q (regV s ** {c2 = noPrep}) ; mkV2Q : Str -> V2Q ;
mkV2Q : V -> Prep -> V2Q ;
} ;
----- -----

View File

@@ -27,9 +27,12 @@ oper
prefix : Prefix -> Str -> Str = \p -> case p of { prefix : Prefix -> Str -> Str = \p -> case p of {
Meng => prefixMeng ; Meng => prefixMeng ;
Ber => prefixBer Ber => prefixBer ;
NoPrefix => prefixNone
} ; } ;
prefixNone : Str -> Str = \belajar -> belajar ;
prefixMeng : Str -> Str = \makan -> case makan of { prefixMeng : Str -> Str = \makan -> case makan of {
? + ? + ? => "menge" + makan ; ? + ? + ? => "menge" + makan ;
@@ -63,8 +66,6 @@ oper
} ; } ;
prefixBer : Str -> Str = \jalan -> case jalan of { prefixBer : Str -> Str = \jalan -> case jalan of {
-- Exception
"ajar" => "belajar" ;
-- Drop the r -- Drop the r
(#c + "er" + _ -- be+kerja (#c + "er" + _ -- be+kerja
@@ -149,6 +150,7 @@ param
Prefix = Prefix =
Meng Meng
| Ber | Ber
| NoPrefix
; -- TODO more? ; -- TODO more?
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------

View File

@@ -7,9 +7,9 @@ concrete PhraseMay of Phrase = CatMay ** open Prelude, ResMay in {
UttQS qs = qs ; UttQS qs = qs ;
UttIAdv iadv = iadv ; UttIAdv iadv = iadv ;
UttNP np = {s = np.s ! Bare} ; UttNP np = {s = np.s ! Bare} ;
UttIP ip = {s = ip.sp ! NF Sg Bare} ; UttIP ip = {s = ip.s ! Bare} ;
UttImpSg pol imp = {s = pol.s ++ imp.s ! Sg ! pol.p } ; UttImpSg pol imp = {s = pol.s ++ imp.s ! Sg ! pol.p } ;
UttImpPol pol imp = {s = pol.s ++ imp.s ! Sg ! pol.p} ; UttImpPol pol imp = {s = "tolong" ++ pol.s ++ imp.s ! Sg ! pol.p} ;
UttImpPl pol imp = {s = pol.s ++ imp.s ! Pl ! pol.p} ; UttImpPl pol imp = {s = pol.s ++ imp.s ! Pl ! pol.p} ;
UttVP vp = {s = linVP vp} ; UttVP vp = {s = linVP vp} ;
UttAP ap = {s = ap.s} ; UttAP ap = {s = ap.s} ;

View File

@@ -8,9 +8,18 @@ concrete QuestionMay of Question = CatMay ** open
-- determiners, with or without a noun. -- determiners, with or without a noun.
lin lin
-- : IDet -> CN -> IP ; -- which five songs -- : IDet -> CN -> IP ; -- which five songs
IdetCN idet cn = NM.DetCN idet cn ** { -- IdetCN idet cn = NM.DetCN idet cn ** {
sp = \\nf => idet.sp ! nf ++ cn.s ! nf -- sp = \\nf => idet.sp ! nf ++ cn.s ! nf
} ; -- } ;
IdetCN idet cn = emptyNP ** {
s = \\poss =>
idet.pr
++ case idet.poss of {
Bare => cn.s ! NF (toNum idet.n) idet.poss ;
_ => cn.s ! NF (toNum idet.n) idet.poss -- TODO check if this make sense
} ++ idet.s ++ cn.heavyMod ;
sp = \\nf => idet.sp ! nf ++ cn.s ! nf;
} ;
-- : IDet -> IP ; -- which five -- : IDet -> IP ; -- which five
IdetIP idet = NM.DetNP idet ** {sp = idet.sp}; IdetIP idet = NM.DetNP idet ** {sp = idet.sp};

View File

@@ -230,7 +230,7 @@ oper
-- VV : Type = Verb ** {vvtype : VVForm} ; -- VV : Type = Verb ** {vvtype : VVForm} ;
regVerb : Str -> Prefix -> Verb = \str,p -> regVerb : Str -> Prefix -> Verb = \str,p ->
mkVerb str (prefix p str) ("di" + str) (str + "kan") ; mkVerb str (prefix p str) ("di" + str) (str ++ BIND ++ "kan") ;
mkVerb : (makan, memakan, dimakan, makankan : Str) -> Verb = \rt,act,pass,imp -> { mkVerb : (makan, memakan, dimakan, makankan : Str) -> Verb = \rt,act,pass,imp -> {
s = table { s = table {
@@ -251,7 +251,7 @@ oper
mkVerb4 : Verb -> Preposition -> Str -> Verb4 = \v,pr,str -> v ** { mkVerb4 : Verb -> Preposition -> Str -> Verb4 = \v,pr,str -> v ** {
s = \\_ => v.s ! Active ++ str; s = \\_ => v.s ! Active ++ str;
c2 = pr ; c2 = pr ;
passive = "di" ++ BIND ++ v.s ! Root ++ str -- passive = "di" ++ BIND ++ v.s ! Root ++ str
} ; } ;
copula : Verb = {s = \\_ => "ada"} ; -- TODO copula : Verb = {s = \\_ => "ada"} ; -- TODO
@@ -294,6 +294,9 @@ oper
} ; } ;
useComp : Str -> VerbPhrase = \s -> { useComp : Str -> VerbPhrase = \s -> {
s = \\vf,pol => verbneg pol ++ s ;
} ;
useCompN : Str -> VerbPhrase = \s -> {
s = \\vf,pol => nounneg pol ++ s ; s = \\vf,pol => nounneg pol ++ s ;
} ; } ;

View File

@@ -95,7 +95,7 @@ lin
oper oper
advS : (comma : Str) -> Adverb -> S -> S = \comma,a,sent -> sent ** { advS : (comma : Str) -> Adverb -> S -> S = \comma,a,sent -> sent ** {
s = sent.s ++ comma ++ a.s s = a.s ++ comma ++ sent.s
} ; } ;
} }

View File

@@ -47,9 +47,9 @@ lin or_Conj = {s2 = "atau" ; s1 = [] ; n = Sg} ;
-- lin both7and_DConj = mkConj "" "" pl ; -- lin both7and_DConj = mkConj "" "" pl ;
-- lin either7or_DConj = {s2 = \\_ => "" ; s1 = "" ; n = Sg} ; -- lin either7or_DConj = {s2 = \\_ => "" ; s1 = "" ; n = Sg} ;
-- --
-- lin but_PConj = ss "" ; lin but_PConj = ss "tetapi" ;
-- lin otherwise_PConj = ss "" ; -- lin otherwise_PConj = ss "" ;
-- lin therefore_PConj = ss "" ; lin therefore_PConj = ss "oleh itu" ;
----------------- -----------------
@@ -104,7 +104,7 @@ lin by8agent_Prep = mkPrep "oleh" ; -- for pronoun agent, see Mintz p. 170, 5.4.
lin by8means_Prep = mkPrep "dengan" ; lin by8means_Prep = mkPrep "dengan" ;
-- lin during_Prep = mkPrep ; -- lin during_Prep = mkPrep ;
-- lin except_Prep = mkPrep ; -- lin except_Prep = mkPrep ;
-- lin for_Prep = mkPrep ; lin for_Prep = mkPrep "untuk" ;
-- lin from_Prep = mkPrep "" ; -- lin from_Prep = mkPrep "" ;
-- lin in8front_Prep = mkPrep "" ; -- lin in8front_Prep = mkPrep "" ;
lin in_Prep = mkPrep "di" ; lin in_Prep = mkPrep "di" ;

View File

@@ -1,4 +1,4 @@
concrete VerbMay of Verb = CatMay ** open ResMay, AdverbMay, Prelude in { concrete VerbMay of Verb = CatMay ** open ResMay, AdverbMay, StructuralMay, Prelude in {
lin lin
@@ -16,7 +16,7 @@ lin
-- : VV -> VP -> VP ; -- : VV -> VP -> VP ;
ComplVV vv vp = vp ** useV { ComplVV vv vp = vp ** useV {
s = \\vf => vv.s ++ linVP vp s = \\vf => vv.s ++ vp.s ! Root! Pos;
} ; } ;
-- : VA -> AP -> VP ; -- they become red -- : VA -> AP -> VP ; -- they become red
@@ -56,7 +56,13 @@ lin
-- : V3 -> NP -> VPSlash ; -- give (it) to her -- : V3 -> NP -> VPSlash ; -- give (it) to her
Slash3V3 v3 iobj = useV { Slash3V3 v3 iobj = useV {
s = \\vf => v3.s ! vf ++ applyPrep v3.c3 emptyNP ++ iobj.s ! Bare; s = \\vf => v3.s ! vf ++
case iobj.a of {
IsPron p => applyPrep v3.c2 emptyNP ++ applyPrep v3.c3 iobj ;
_ => applyPrep v3.c2 iobj ++ applyPrep v3.c3 emptyNP
}
-- ++ applyPrep v3.c2 iobj ++
-- applyPrep v3.c3 emptyNP ;
--iobj.s ! Bare -- applyPrep v3.c3 iobj -- TODO check if this works for all -- probably not --iobj.s ! Bare -- applyPrep v3.c3 iobj -- TODO check if this works for all -- probably not
} ** { } ** {
c2 = v3.c2 ;-- Now the VPSlash is missing only the direct object c2 = v3.c2 ;-- Now the VPSlash is missing only the direct object
@@ -72,20 +78,24 @@ lin
} ; } ;
-- : V2V -> VP -> VPSlash ; -- beg (her) to go -- : V2V -> VP -> VPSlash ; -- beg (her) to go
SlashV2V v2 vp = vp ** useV { SlashV2V v2 vp = useV {
s = \\vf => v2.s ! vf ++ (linVP vp); s = \\vf => v2.s ! vf;
} ** { } ** {
c2 = v2.c2; c2 = v2.c2 ;
adjCompl = [] ; adjCompl = for_Prep.s ++ vp.s ! Root ! Pos;
} ; } ;
-- : V2S -> S -> VPSlash ; -- answer (to him) that it is good -- : V2S -> S -> VPSlash ; -- answer (to him) that it is good
SlashV2S v2 s = useV v2 ** { SlashV2S v2 s = useV v2 ** {
c2 = v2.c2; c2 = v2.c2;
adjCompl = "yang" ++ s.s ; -- TODO check /Inari adjCompl = "yang" ++ s.s ; -- TODO check /Inari
} ; } ;
-- : V2Q -> QS -> VPSlash ; -- ask (him) who came
-- SlashV2Q v2q qs = useV v2q ** {
-- s =
-- };
{- {-
-- : V2S -> S -> VPSlash ; -- answer (to him) that it is good -- : V2S -> S -> VPSlash ; -- answer (to him) that it is good
@@ -102,12 +112,9 @@ lin
-- : VPSlash -> NP -> VP -- : VPSlash -> NP -> VP
ComplSlash vps np = vps ** { ComplSlash vps np = vps ** {
s = \\vf,pol => s = \\vf,pol =>
vps.s ! vf ! pol vps.s ! vf ! pol ++ applyPrep vps.c2 np ++ vps.adjCompl
++ applyPrep vps.c2 np ++ vps.adjCompl
-- s = \\vf,pol => vps.s ! vf ! pol ++ applyPrep vps.c2 np
} ; } ;
-- : VV -> VPSlash -> VPSlash ; -- : VV -> VPSlash -> VPSlash ;
SlashVV vv vps = ComplVV vv vps ** { SlashVV vv vps = ComplVV vv vps ** {
c2 = vps.c2 ; -- like ComplVV except missing object c2 = vps.c2 ; -- like ComplVV except missing object
@@ -141,7 +148,12 @@ lin
AdVVPSlash adv vps = vps ** { adv = adv.s ++ vps.adv } ; AdVVPSlash adv vps = vps ** { adv = adv.s ++ vps.adv } ;
-} -}
-- : VP -> Prep -> VPSlash ; -- live in (it) -- : VP -> Prep -> VPSlash ; -- live in (it)
-- VPSlashPrep vp prep = vp ** {c2 = prep} ; VPSlashPrep vp prep = vp ** {
s = \\vf,pol => vp.s ! vf ! pol ;
} ** {
c2 = prep ;
adjCompl =[] ;
} ;
--2 Complements to copula --2 Complements to copula
@@ -152,10 +164,10 @@ lin
CompAP ap = useComp ap.s ; CompAP ap = useComp ap.s ;
-- : CN -> Comp ; -- : CN -> Comp ;
CompCN cn = useComp (cn.s ! NF Sg Bare) ; CompCN cn = useCompN (cn.s ! NF Sg Bare) ;
-- NP -> Comp ; -- NP -> Comp ;
CompNP np = useComp (np.s ! Bare) ; CompNP np = useCompN (np.s ! Bare) ;
-- : Adv -> Comp ; -- : Adv -> Comp ;
--"Both bukan and tidak may negate prepositional phrases. The choice of either --"Both bukan and tidak may negate prepositional phrases. The choice of either

View File

@@ -4,6 +4,7 @@ LangMay: dia memberi kucing kepadaku
Lang: UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron he_Pron) (ComplSlash (Slash3V3 give_V3 (UsePron i_Pron)) (MassNP (UseN cat_N))))) Lang: UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron he_Pron) (ComplSlash (Slash3V3 give_V3 (UsePron i_Pron)) (MassNP (UseN cat_N)))))
LangMay: dia memberi aku kucing LangMay: dia memberi aku kucing
-- dia memberi aku kepada kucing
-- Sentence complements -- Sentence complements

View File

@@ -16,4 +16,4 @@ LangMay: buku itu dibaca
Lang: UseCl (TTAnt TPres ASimul) PPos (PredVP (DetCN (DetQuant that_Quant NumSg) (UseN book_N)) (AdvVP (PassV2 read_V2) (PrepNP to_Prep (UsePron youSg_Pron)))) Lang: UseCl (TTAnt TPres ASimul) PPos (PredVP (DetCN (DetQuant that_Quant NumSg) (UseN book_N)) (AdvVP (PassV2 read_V2) (PrepNP to_Prep (UsePron youSg_Pron))))
LangEng: that book is read to you LangEng: that book is read to you
LangMay: buku itu dibacakan kepada kamu LangMay: buku itu dibaca kepadamu

View File

@@ -8,7 +8,7 @@ LangMay: kamu suka lagu-lagu yang mana
Lang: PhrUtt NoPConj (UttQS (UseQCl (TTAnt TPres ASimul) PPos (QuestSlash (IdetCN how8many_IDet (UseN cat_N)) (SlashVP (UsePron youPl_Pron) (SlashV2a have_V2))))) NoVoc Lang: PhrUtt NoPConj (UttQS (UseQCl (TTAnt TPres ASimul) PPos (QuestSlash (IdetCN how8many_IDet (UseN cat_N)) (SlashVP (UsePron youPl_Pron) (SlashV2a have_V2))))) NoVoc
LangEng: how many cats do you have LangEng: how many cats do you have
LangMay: kamu ada berapa kucing LangMay: kamu ada berapa banyak kucing
Lang: PhrUtt NoPConj (UttIP (IdetCN how8many_IDet (UseN cat_N))) NoVoc Lang: PhrUtt NoPConj (UttIP (IdetCN how8many_IDet (UseN cat_N))) NoVoc
LangEng: how many cats LangEng: how many cats
@@ -71,3 +71,11 @@ LangMay: mengapa dia makan daging
Lang: UseQCl (TTAnt TPast ASimul) PPos (QuestVP whatSg_IP (UseComp (CompNP (DetCN (DetQuant DefArt NumSg) (RelCN (UseN meat_N) (UseRCl (TTAnt TPast ASimul) PPos (RelVP IdRP (PassV2 eat_V2)))))))) Lang: UseQCl (TTAnt TPast ASimul) PPos (QuestVP whatSg_IP (UseComp (CompNP (DetCN (DetQuant DefArt NumSg) (RelCN (UseN meat_N) (UseRCl (TTAnt TPast ASimul) PPos (RelVP IdRP (PassV2 eat_V2))))))))
LangEng: what was the meat that was eaten LangEng: what was the meat that was eaten
LangMay: apa daging yang dimakan LangMay: apa daging yang dimakan
AllEngAbs: (PassAgentVPSlash (SlashV2V beg_V2V (UseV go_V)) (UsePron i_Pron))
AllEng: be begged to go by me
AllMay: dirayu untuk pergi olehku
AllEngAbs: (PassVPSlash (SlashV2V beg_V2V (UseV sleep_V)))
AllEng: be begged to sleep
AllMay: dirayu untuk tidur

View File

@@ -49,7 +49,7 @@ LangMay: bapanya memberi buku kepadanya
-- 2. A book that her father gave her -- 2. A book that her father gave her
-- TODO: would it be better as "buku yang bapanya beri kepadanya"? (Or any other variation?) -- TODO: would it be better as "buku yang bapanya beri kepadanya"? (Or any other variation?)
Lang: DetCN (DetQuant DefArt NumSg) (RelCN (UseN book_N) (UseRCl (TTAnt TPast ASimul) PPos (RelSlash IdRP (SlashVP (DetCN (DetQuant DefArt NumSg) (ComplN2 father_N2 (UsePron she_Pron))) (Slash3V3 give_V3 (UsePron she_Pron)))))) Lang: DetCN (DetQuant DefArt NumSg) (RelCN (UseN book_N) (UseRCl (TTAnt TPast ASimul) PPos (RelSlash IdRP (SlashVP (DetCN (DetQuant DefArt NumSg) (ComplN2 father_N2 (UsePron she_Pron))) (Slash3V3 give_V3 (UsePron she_Pron))))))
LangMay: buku yang bapanya memberi kepada dia LangMay: buku yang bapanya memberi kepadanya
-- The preposition "kepada" comes from the definition of give_V3 in LexiconMay.gf. -- The preposition "kepada" comes from the definition of give_V3 in LexiconMay.gf.
-- If "buku yang bapanya beri kepadanya" is correct in general, but sometimes -- If "buku yang bapanya beri kepadanya" is correct in general, but sometimes
@@ -64,7 +64,7 @@ LangMay: buku yang bapanya memberi kepada dia
-- I want to read the book that my father gave me -- I want to read the book that my father gave me
-- TODO check: would "aku mahu baca buku yang bapaku beri kepadaku" be better? -- TODO check: would "aku mahu baca buku yang bapaku beri kepadaku" be better?
Lang: UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashVV want_VV (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (RelCN (UseN book_N) (UseRCl (TTAnt TPast ASimul) PPos (RelSlash IdRP (SlashVP (DetCN (DetQuant DefArt NumSg) (ComplN2 father_N2 (UsePron i_Pron))) (Slash3V3 give_V3 (UsePron i_Pron))))))))) Lang: UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashVV want_VV (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (RelCN (UseN book_N) (UseRCl (TTAnt TPast ASimul) PPos (RelSlash IdRP (SlashVP (DetCN (DetQuant DefArt NumSg) (ComplN2 father_N2 (UsePron i_Pron))) (Slash3V3 give_V3 (UsePron i_Pron)))))))))
LangMay: aku mahu membaca buku yang bapaku memberi kepada aku LangMay: aku mahu membaca buku yang bapaku memberi kepadaku
-- I want to read the book that my father read -- I want to read the book that my father read
Lang: UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashVV want_VV (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (RelCN (UseN book_N) (UseRCl (TTAnt TPast ASimul) PPos (RelSlash IdRP (SlashVP (DetCN (DetQuant DefArt NumSg) (ComplN2 father_N2 (UsePron i_Pron))) (SlashV2a read_V2)))))))) Lang: UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashVV want_VV (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (RelCN (UseN book_N) (UseRCl (TTAnt TPast ASimul) PPos (RelSlash IdRP (SlashVP (DetCN (DetQuant DefArt NumSg) (ComplN2 father_N2 (UsePron i_Pron))) (SlashV2a read_V2))))))))

View File

@@ -13,8 +13,9 @@ Lang: UseCl (TTAnt TFut ASimul) PPos (PredVP (DetCN (DetQuant DefArt NumSg) (Use
LangEng: the cat will walk LangEng: the cat will walk
LangMay: kucing akan berjalan LangMay: kucing akan berjalan
Lang: PredVP (UsePron i_Pron) (ComplSlash (SlashV2V beg_V2V (UseV go_V)) (UsePron she_Pron)) Lang: UttS (UseCl (TTAnt TPast ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2V beg_V2V (UseV go_V)) (DetNP (DetQuant (PossPron she_Pron) NumPl)))))
LangEng: I begged her to go LangEng: I begged her to go
LangMay: aku merayu dia untuk pergi
------------- -------------
-- Conditions -- Conditions

View File

@@ -108,14 +108,14 @@ LangMay: sekiranya tidak hujan sekarang , aku akan berjalan
Lang: UttImpSg PPos (ImpVP (ComplSlash (SlashV2a open_V2) (DetCN (DetQuant DefArt NumSg) (UseN door_N)))) Lang: UttImpSg PPos (ImpVP (ComplSlash (SlashV2a open_V2) (DetCN (DetQuant DefArt NumSg) (UseN door_N))))
LangEng: open the door LangEng: open the door
LangMay: buka pintu LangMay: bukakan pintu
Lang: UttImpSg PNeg (ImpVP (ComplSlash (SlashV2a open_V2) (DetCN (DetQuant DefArt NumSg) (UseN door_N)))) Lang: UttImpSg PNeg (ImpVP (ComplSlash (SlashV2a open_V2) (DetCN (DetQuant DefArt NumSg) (UseN door_N))))
LangEng: don't open the door LangEng: don't open the door
LangMay: jangan buka pintu LangMay: jangan bukakan pintu
Lang: UttImpPol PPos (ImpVP (ComplSlash (SlashV2a open_V2) (DetCN (DetQuant DefArt NumSg) (UseN door_N)))) Lang: UttImpPol PPos (ImpVP (ComplSlash (SlashV2a open_V2) (DetCN (DetQuant DefArt NumSg) (UseN door_N))))
LangEng: open the door LangEng: open the door
LangMay: bukakan pintu LangMay: tolong bukakan pintu
---------------------------------------- ----------------------------------------
-- Questions -- Questions

View File

@@ -0,0 +1,144 @@
resource MorphoDictAra = CatAra ** open ParadigmsAra, SyntaxAra, (S=StructuralAra), (L=LexiconAra) in {
--- this should be abstract + concrete, but this serves the first purpose to support WordNetAra.
-- AR 2024-02-08
oper 'صِينِيَّة_N' = wmkN { g = fem ; sg = "صِينِيَّة" } ;
oper 'دارِيَّة_N' = wmkN { g = fem ; sg = "دارِيَّة" } ;
oper 'تَطْوِير_N' = wmkN { g = masc ; sg = "تَطْوِير" } ;
oper 'إِيطالِيَّة_N' = wmkN { g = fem ; sg = "إِيطالِيَّة" } ;
oper 'كَرون_N' = wmkN { g = fem ; sg = "كَرون" } ;
oper 'لاتفية_N' = wmkN { g = fem ; sg = "لاتفية" } ;
oper 'وَصِي_N' = wmkN { g = masc ; pl = "أوصياء" ; sg = "وَصِي" } ;
oper 'اِحْتِياطَي_N' = wmkN { g = masc ; sg = "اِحْتِياطَي" } ;
oper 'إِسْبانِيَّة_N' = wmkN { g = fem ; sg = "إِسْبانِيَّة" } ;
oper 'إِرْهابِي_N' = wmkN { g = masc ; sg = "إِرْهابِي" } ;
oper 'عَاصِمَة_N' = wmkN { g = fem ; pl = "عَوَاصِم" ; root = "عصم" ; sg = "عَاصِمَة" } ;
oper 'رِعايَة_N' = wmkN { g = fem ; root = "رعي" ; sg = "رِعايَة" } ;
oper 'طِفْل_N' = wmkN { g = masc ; pl = "أَطْفَال" ; root = "طفل" ; sg = "طِفْل" } ;
oper 'طِفْل_N' = wmkN { g = masc ; pl = "أَطْفَال" ; root = "طفل" ; sg = "طِفْل" } ;
oper 'مَدِينَة_N' = wmkN { g = fem ; pl = "مُدُن" ; root = "مدن" ; sg = "مَدِينَة" } ;
oper 'دَوْلَة_N' = wmkN { g = fem ; pl = "دُوَل" ; sg = "دَوْلَة" } ;
oper 'دَوْلَة_N' = wmkN { g = fem ; pl = "دُوَل" ; sg = "دَوْلَة" } ;
oper 'ثَقَافَة_N' = wmkN { g = fem ; pl = "ثَقَافَات" ; root = "ثقف" ; sg = "ثَقَافَة" } ;
oper 'اِنْخِفَاض_N' = wmkN { g = masc ; pl = "اِنْخِفَاضَات" ; sg = "اِنْخِفَاض" } ;
oper 'تَوْزِيع_N' = wmkN { g = masc ; sg = "تَوْزِيع" } ;
oper 'اِقْتِصَاد_N' = wmkN { g = masc ; sg = "اِقْتِصَاد" } ;
oper 'تَعْلِيم_N' = wmkN { g = masc ; pl = "تَعْلِيماتٌ" ; root = "علم" ; sg = "تَعْلِيم" } ;
oper 'خُصُوبَة_N' = wmkN { g = fem ; root = "خصب" ; sg = "خُصُوبَة" } ;
oper 'طَعَام_N' = wmkN { g = masc ; pl = "أَطْعِمَة" ; root = "طعم" ; sg = "طَعَام" } ;
oper 'حُرِّيَّة_N' = wmkN { g = fem ; pl = "حُرِّيَّات" ; root = "حرر" ; sg = "حُرِّيَّة" } ;
oper 'حُكُومَة_N' = wmkN { g = fem ; pl = "حُكُومَات" ; root = "حكم" ; sg = "حُكُومَة" } ;
oper 'نُمُو_N' = wmkN { g = masc ; root = "نمو" ; sg = "نُمُو" } ;
oper 'صِحِّيَّة_N' = wmkN { g = fem ; sg = "صِحِّيَّة" } ;
oper 'إِنْسَان_N' = wmkN { g = masc ; pl = "أَنَاسِيّ" ; root = "ءنس" ; sg = "إِنْسَان" } ;
oper 'كِيلُومِتْر_N' = wmkN { g = masc ; pl = "كِيلُومِتْرَات" ; sg = "كِيلُومِتْر" } ;
oper 'لُغَة_N' = wmkN { g = fem ; pl = "لُغَات" ; root = "لغو" ; sg = "لُغَة" } ;
oper 'قَائِد_N' = wmkN { g = masc ; pl = "قَائِدُونَ" ; sg = "قَائِد" } ;
oper 'عُضْو_N' = wmkN { g = masc ; pl = "أَعْضَاء" ; root = "عضو" ; sg = "عُضْو" } ;
oper 'وَزِير_N' = wmkN { g = masc ; pl = "وُزَرَاء" ; root = "وزر" ; sg = "وَزِير" } ;
oper 'جَرِيدَة_N' = wmkN { g = fem ; pl = "جَرَائِد" ; root = "جرد" ; sg = "جَرِيدَة" } ;
oper 'مَكْتَب_N' = wmkN { g = masc ; pl = "مَكاتِب" ; root = "كتب" ; sg = "مَكْتَب" } ;
oper 'سِيَاسَة_N' = wmkN { g = fem ; pl = "سِيَاسَات" ; root = "سوس" ; sg = "سِيَاسَة" } ;
oper 'جُنَيْه_N' = wmkN { g = masc ; pl = "جُنَيْهَات" ; sg = "جُنَيْه" } ;
oper 'تَأْجِير_N' = wmkN { g = masc ; root = "ءجر" ; sg = "تَأْجِير" } ;
oper 'رِيَاضَة_N' = wmkN { g = fem ; pl = "رِيَاضَات" ; root = "روض" ; sg = "رِيَاضَة" } ;
oper 'نِظَام_N' = wmkN { g = masc ; pl = "نُظُم" ; root = "نظم" ; sg = "نِظَام" } ;
oper 'ضَرِيبَة_N' = wmkN { pl = "ضَرَائِب" ; root = "ضرب" ; sg = "ضَرِيبَة" } ;
oper 'وَحْدَة_N' = wmkN { g = fem ; pl = "وَحَدَات" ; sg = "وَحْدَة" } ;
oper 'قِيمَة_N' = wmkN { g = fem ; pl = "قِيَم" ; root = "قوم" ; sg = "قِيمَة" } ;
oper 'اِمْرَأَة_N' = wmkN { g = fem ; pl = "نِسَاء" ; root = "مرء" ; sg = "اِمْرَأَة" } ;
oper 'أَفْغَانِي_N' = wmkN { g = masc ; pl = "أَفْغَان" ; sg = "أَفْغَانِي" } ;
oper 'آشُورِي_N' = wmkN { g = masc ; pl = "آشُورِيُّون" ; sg = "آشُورِي" } ;
oper 'مَنْع_N' = wmkN { g = masc ; root = "منع" ; sg = "مَنْع" } ;
oper 'بِيلَارُوسِي_N' = wmkN { g = masc ; sg = "بِيلَارُوسِي" } ;
oper 'حُدُود_N' = wmkN { g = fem ; sg = "حُدُود" } ;
oper 'بُلْغَارِيَّة_N' = wmkN { g = fem ; pl = "بُلْغَارِيَّات" ; sg = "بُلْغَارِيَّة" } ;
oper 'رَئِيس_N' = wmkN { g = masc ; pl = "رُؤَسَاء" ; root = "رءس" ; sg = "رَئِيس" } ;
oper 'نَصْرَانِيَّة_N' = wmkN { g = fem ; sg = "نَصْرَانِيَّة" } ;
oper 'هُولَنْدِي_N' = wmkN { g = masc ; pl = "هُولَنْدِيُّونَ" ; sg = "هُولَنْدِي" } ;
oper 'مُسَاوَاة_N' = wmkN { g = fem ; sg = "مُسَاوَاة" } ;
oper 'عَيْب_N' = wmkN { g = masc ; pl = "عُيُوب" ; sg = "عَيْب" } ;
oper 'دَقِيق_N' = wmkN { g = masc ; sg = "دَقِيق" } ;
oper 'فَرَنْسِيَّة_N' = wmkN { g = fem ; pl = "فَرَنْسِيَّات" ; sg = "فَرَنْسِيَّة" } ;
oper 'فُنْدُق_N' = wmkN { g = masc ; pl = "فَنَادِق" ; sg = "فُنْدُق" } ;
oper 'فِهْرِس_N' = wmkN { g = masc ; pl = "فَهَارِس" ; sg = "فِهْرِس" } ;
oper 'تَضَخُّم_N' = wmkN { g = masc ; root = "ضخم" ; sg = "تَضَخُّم" } ;
oper 'مَوْضِع_N' = wmkN { g = masc ; pl = "مَوَاضِع" ; root = "وضع" ; sg = "مَوْضِع" } ;
oper 'رَئِيس_N' = wmkN { g = masc ; pl = "رُؤَسَاء" ; root = "رءس" ; sg = "رَئِيس" } ;
oper 'رَئِيس_N' = wmkN { g = masc ; pl = "رُؤَسَاء" ; root = "رءس" ; sg = "رَئِيس" } ;
oper 'مُنْتَج_N' = wmkN { g = masc ; pl = "مُنْتَجَات" ; sg = "مُنْتَج" } ;
oper 'مَلِكَة_N' = wmkN { g = fem ; pl = "مَلِكَات" ; sg = "مَلِكَة" } ;
oper 'مُعَدَّل_N' = wmkN { g = masc ; root = "عدل" ; sg = "مُعَدَّل" } ;
oper 'مُعَدَّل_N' = wmkN { g = masc ; root = "عدل" ; sg = "مُعَدَّل" } ;
oper 'مَاء_N' = wmkN { g = masc ; pl = "مِيَاه" ; root = "موه" ; sg = "مَاء" } ;
oper 'عَالَم_N' = wmkN { g = masc ; pl = "عَالَمُون" ; sg = "عَالَم" } ;
oper 'عَالَم_N' = wmkN { g = masc ; pl = "عَالَمُون" ; sg = "عَالَم" } ;
oper 'مَنْطِقَة_N' = wmkN { g = fem ; pl = "مَنْطِقَات" ; root = "نطق" ; sg = "مَنْطِقَة" } ;
oper 'كِتَاب_N' = wmkN { g = masc ; pl = "كُتُب" ; sg = "كِتَاب" } ;
oper 'عُمْلَة_N' = wmkN { g = fem ; pl = "عُمْلَات" ; root = "عمل" ; sg = "عُمْلَة" } ;
oper 'دِيمُقْرَاطِيَّة_N' = wmkN { g = fem ; pl = "دِيمُقْرَاطِيَّات" ; sg = "دِيمُقْرَاطِيَّة" } ;
oper 'شَرْق_N' = wmkN { g = masc ; sg = "شَرْق" } ;
oper 'رَأْس_N' = wmkN { g = masc ; pl = "رُؤُوس" ; sg = "رَأْس" } ;
oper 'سُكّان_N' = wmkN { g = fem ; sg = "سُكّان" } ;
oper 'مَلَكِيَّة_N' = wmkN { g = fem ; pl = "مَلَكِيَّات" ; root = "ملك" ; sg = "مَلَكِيَّة" } ;
oper 'سُكّان_N' = wmkN { g = fem ; sg = "سُكّان" } ;
oper 'جُمْهُورِيَّة_N' = wmkN { g = fem ; pl = "جُمْهُورِيَّات" ; sg = "جُمْهُورِيَّة" } ;
oper 'رُوسِيَّة_N' = wmkN { g = fem ; pl = "رُوسِيَّات" ; sg = "رُوسِيَّة" } ;
oper 'جَنُوب_N' = wmkN { g = masc ; root = "جنب" ; sg = "جَنُوب" } ;
oper 'تَايْلَانْدِيَّة_N' = wmkN { g = fem ; sg = "تَايْلَانْدِيَّة" } ;
oper 'تُرْكِيَّة_N' = wmkN { g = fem ; sg = "تُرْكِيَّة" } ;
oper 'سَنَة_N' = wmkN { g = fem ; pl = "سَنَوَات" ; sg = "سَنَة" } ;
oper 'دَخْل_N' = wmkN { g = masc ; sg = "دَخْل" } ;
oper 'شَمَال_N' = wmkN { g = fem ; root = "شمل" ; sg = "شَمَال" } ;
oper 'عَلَم_N' = wmkN { g = masc ; pl = "أَعْلَام" ; sg = "عَلَم" } ;
oper 'دِين_N' = wmkN { g = masc ; pl = "أَدْيَان" ; sg = "دِين" } ;
oper 'أُم_N' = wmkN { g = fem ; pl = "أُمَّهَات" ; root = "ءمم" ; sg = "أُم" } ;
oper 'نَشَاء_N' = wmkN { g = masc ; root = "نشو" ; sg = "نَشَاء" } ;
oper 'عُمْر_N' = wmkN { g = masc ; pl = "أَعْمَار" ; root = "عمر" ; sg = "عُمْر" } ;
oper 'غَرْب_N' = wmkN { g = masc ; sg = "غَرْب" } ;
oper 'مَلِك_N' = wmkN { g = masc ; pl = "مُلُوك" ; sg = "مَلِك" } ;
oper 'بِير_N' = wmkN { g = masc ; pl = "بيرات" ; sg = "بِير" } ;
oper 'مُضاف_A' = wmkA { fem_sg = "nan" ; masc_sg = "مُضاف" } ;
oper 'اِسْتِبْدادِي_A' = wmkA { fem_sg = "nan" ; masc_sg = "اِسْتِبْدادِي" } ;
oper 'الوَسِيط_A' = wmkA { fem_sg = "nan" ; masc_sg = "الوَسِيط" } ;
oper 'الشَّمال_A' = wmkA { fem_sg = "nan" ; masc_sg = "الشَّمال" } ;
oper 'مَحَلِّي_A' = wmkA { fem_pl = "مَحَلِّيَّات" ; fem_sg = "مَحَلِّيَّة" ; masc_pl = "مَحَلِّيُّون" ; masc_sg = "مَحَلِّي" } ;
oper 'تَالِي_A' = wmkA { fem_sg = "تَالِية" ; masc_sg = "تَالِي" } ;
oper 'مُمْتَلِئ_A' = wmkA { fem_pl = "مُمْتَلِئَات" ; fem_sg = "مُمْتَلِئَة" ; masc_pl = "مُمْتَلِئُون" ; masc_sg = "مُمْتَلِئ" ; root = "ملء" } ;
oper 'إِجْمَالِي_A' = wmkA { fem_pl = "إِجْمَالِيَّات" ; fem_sg = "إِجْمَالِيَّة" ; masc_pl = "إِجْمَالِيُّون" ; masc_sg = "إِجْمَالِي" ; root = "جمل" } ;
oper 'فَرْدِي_A' = wmkA { fem_pl = "فَرْدِيَّات" ; fem_sg = "فَرْدِيَّة" ; masc_pl = "فَرْدِيُّون" ; masc_sg = "فَرْدِي" ; root = "فرد" } ;
oper 'مُعْتَدِل_A' = wmkA { fem_pl = "مُعْتَدِلَات" ; fem_sg = "مُعْتَدِلَة" ; masc_pl = "مُعْتَدِلُون" ; masc_sg = "مُعْتَدِل" ; root = "عدل" } ;
oper 'مُطْلَق_A' = wmkA { fem_pl = "مُطْلَقَات" ; fem_sg = "مُطْلَقَة" ; masc_pl = "مُطْلَقُون" ; masc_sg = "مُطْلَق" ; root = "طلق" } ;
oper 'حَاكِم_A' = wmkA { fem_pl = "حَاكِمَات" ; fem_sg = "حَاكِمَة" ; masc_pl = "حَاكِمُون" ; masc_sg = "حَاكِم" ; root = "حكم" } ;
oper 'شُيُوعِي_A' = wmkA { fem_pl = "شُيُوعِيَّات" ; fem_sg = "شُيُوعِيَّة" ; masc_pl = "شُيُوعِيُّون" ; masc_sg = "شُيُوعِي" } ;
oper 'دُسْتُورِي_A' = wmkA { fem_pl = "دُسْتُورِيَّات" ; fem_sg = "دُسْتُورِيَّة" ; masc_pl = "دُسْتُورِيُّون" ; masc_sg = "دُسْتُورِي" } ;
oper 'دِيمُقْرَاطِي_A' = wmkA { fem_pl = "دِيمُقْرَاطِيَّات" ; fem_sg = "دِيمُقْرَاطِيَّة" ; masc_pl = "دِيمُقْرَاطِيُّون" ; masc_sg = "دِيمُقْرَاطِي" } ;
oper 'سَابِق_A' = wmkA { fem_pl = "سَابِقَات" ; fem_sg = "سَابِقَة" ; masc_pl = "سُبَّاق" ; masc_sg = "سَابِق" ; root = "سبق" } ;
oper 'عَالِي_A' = wmkA { fem_sg = "nan" ; masc_sg = "nan" } ;
oper 'كَبِير_A' = wmkA { fem_pl = "كَبِيرَات" ; fem_sg = "كَبِيرَة" ; masc_pl = "كُبَرَاء" ; masc_sg = "كَبِير" ; root = "كبر" } ;
oper 'قَلِيل_A' = wmkA { fem_pl = "قَلِيلَات" ; fem_sg = "قَلِيلَة" ; masc_pl = "أَقِلَّاء" ; masc_sg = "قَلِيل" ; root = "قلل" } ;
oper 'عَسْكَرِي_A' = wmkA { fem_pl = "عَسْكَرِيَّات" ; fem_sg = "عَسْكَرِيَّة" ; masc_pl = "عَسَاكِر" ; masc_sg = "عَسْكَرِي" } ;
oper 'وَاجِب_A' = wmkA { fem_pl = "وَاجِبَات" ; fem_sg = "وَاجِبَة" ; masc_pl = "وَاجِبُون" ; masc_sg = "وَاجِب" ; root = "وجب" } ;
oper 'بَرْلَمَانِي_A' = wmkA { fem_pl = "بَرْلَمَانِيَّات" ; fem_sg = "بَرْلَمَانِيَّة" ; masc_pl = "بَرْلَمَانِيُّون" ; masc_sg = "بَرْلَمَانِي" } ;
oper 'مَجْمُوع_A' = wmkA { fem_pl = "مَجْمُوعَات" ; fem_sg = "مَجْمُوعَة" ; masc_pl = "مَجْمُوعُون" ; masc_sg = "مَجْمُوع" ; root = "جمع" } ;
oper 'عَرَبِي_A' = wmkA { fem_pl = "عَرَبِيَّات" ; fem_sg = "عَرَبِيَّة" ; masc_pl = "عَرَب" ; masc_sg = "عَرَبِي" } ;
oper 'حُر_A' = wmkA { fem_pl = "حُرَّات" ; fem_sg = "حُرَّة" ; masc_pl = "أَحْرَار" ; masc_sg = "حُر" ; root = "حرر" } ;
oper 'هَجِين_A' = wmkA { fem_pl = "هَجَائِن" ; fem_sg = "هَجِين" ; masc_pl = "هِجَان" ; masc_sg = "هَجِين" ; root = "هجن" } ;
oper 'رَسْمِي_A' = wmkA { fem_pl = "رَسْمِيَّات" ; fem_sg = "رَسْمِيَّة" ; masc_pl = "رَسْمِيُّون" ; masc_sg = "رَسْمِي" } ;
oper 'رَسْمِي_A' = wmkA { fem_pl = "رَسْمِيَّات" ; fem_sg = "رَسْمِيَّة" ; masc_pl = "رَسْمِيُّون" ; masc_sg = "رَسْمِي" } ;
oper 'أُرْثُوذُكْسِيَّة_A' = wmkA { fem_sg = "nan" ; masc_sg = "nan" } ;
oper 'مُرَبَّع_A' = wmkA { fem_pl = "مُرَبَّعَات" ; fem_sg = "مُرَبَّعَة" ; masc_pl = "مُرَبَّعُون" ; masc_sg = "مُرَبَّع" } ;
oper 'مُسْلِم_A' = wmkA { fem_pl = "مُسْلِمَات" ; fem_sg = "مُسْلِمَة" ; masc_pl = "مُسْلِمُون" ; masc_sg = "مُسْلِم" ; root = "سلم" } ;
oper 'حَاضِر_A' = wmkA { fem_pl = "حَاضِرَات" ; fem_sg = "حَاضِرَة" ; masc_pl = "حُضُور" ; masc_sg = "حَاضِر" ; root = "حضر" } ;
oper 'مُمَثِّل_A' = wmkA { fem_sg = "مُمَثِّلة" ; masc_sg = "مُمَثِّل" ; root = "مثل" } ;
oper 'اِعْتَبَر_V' = wmkV { cls = FormVIII ; imperfect = "يَعْتَبِر" ; perfect = "اِعْتَبَر" ; root = "عبر" } ;
oper 'نَجَح_V' = wmkV { cls = FormI ; imperfect = "يَنْجَح" ; perfect = "نَجَح" ; root = "نجح" } ;
oper 'صَنَّف_V' = wmkV { cls = FormII ; imperfect = "يُصَنِّف" ; perfect = "صَنَّف" ; root = "صنف" } ;
oper 'عَيَّن_V' = wmkV { cls = FormII ; imperfect = "يُعَيِّن" ; perfect = "عَيَّن" ; root = "عين" } ;
oper 'وَصَل_V' = wmkV { cls = FormI ; imperfect = "يَصِل" ; perfect = "وَصَل" ; root = "وصل" } ;
oper 'تَكَلَّم_V' = wmkV { cls = FormV ; imperfect = "يَتَكَلَّم" ; perfect = "تَكَلَّم" ; root = "كلم" } ;
oper 'مَلَك_V' = wmkV { cls = FormI ; imperfect = "يَمْلِك" ; perfect = "مَلَك" ; root = "ملك" } ;
oper 'عَرَض_V' = wmkV { cls = FormI ; imperfect = "يَعْرِض" ; perfect = "عَرَض" ; root = "عرض" } ;
}

View File

@@ -189,11 +189,12 @@ concrete NumeralPor of Numeral = CatPor [Numeral,Digits,Decimal] **
Dig = TDigit ; Dig = TDigit ;
lin lin
IDig d = d ; IDig d = d ** {tail = T1} ;
IIDig d i = { IIDig d i = {
s = \\o => d.s ! NCard Masc ++ BIND ++ i.s ! o ; s = \\o => d.s ! NCard Masc ++ spaceIf i.tail ++ i.s ! o ;
n = Pl n = Pl ;
tail = inc i.tail
} ; } ;
D_0 = mkDig "0" Sg ; D_0 = mkDig "0" Sg ;
@@ -215,12 +216,24 @@ concrete NumeralPor of Numeral = CatPor [Numeral,Digits,Decimal] **
} ; } ;
IFrac d i = { IFrac d i = {
s = \\o => d.s ! NCard Masc ++ s = \\o => d.s ! NCard Masc ++
if_then_Str d.hasDot BIND (BIND++"."++BIND) ++ if_then_Str d.hasDot BIND (BIND++","++BIND) ++
i.s ! o; i.s ! o;
n = Pl ; n = Pl ;
hasDot=True hasDot=True
} ; } ;
oper
spaceIf : DTail -> Str = \t -> case t of {
T3 => SOFT_SPACE ;
_ => BIND
} ;
inc : DTail -> DTail = \t -> case t of {
T1 => T2 ;
T2 => T3 ;
T3 => T1
} ;
oper oper
mk4Dig : Str -> Str -> Str -> Number -> TDigit = \c,o,a,n -> { mk4Dig : Str -> Str -> Str -> Number -> TDigit = \c,o,a,n -> {
s = table { s = table {

View File

@@ -89,7 +89,7 @@ incomplete concrete CatRomance of Cat = CommonX - [SC,Pol,MU]
-- Numeral -- Numeral
Numeral = {s : CardOrd => Str ; n : Number} ; Numeral = {s : CardOrd => Str ; n : Number} ;
Digits = {s : CardOrd => Str ; n : Number} ; Digits = {s : CardOrd => Str ; n : Number ; tail : DTail} ;
Decimal = {s : CardOrd => Str ; n : Number ; hasDot : Bool} ; Decimal = {s : CardOrd => Str ; n : Number ; hasDot : Bool} ;
-- Structural -- Structural

View File

@@ -114,11 +114,12 @@ param
Dig = TDigit ; Dig = TDigit ;
lin lin
IDig d = d ; IDig d = d ** {tail = T1} ;
IIDig d i = { IIDig d i = {
s = \\o => d.s ! NCard Masc ++ BIND ++ i.s ! o ; s = \\o => d.s ! NCard Masc ++ spaceIf i.tail ++ i.s ! o ;
n = Pl n = Pl ;
tail = inc i.tail
} ; } ;
D_0 = mkDig "0" ; D_0 = mkDig "0" ;
@@ -140,12 +141,24 @@ param
} ; } ;
IFrac d i = { IFrac d i = {
s = \\o => d.s ! NCard Masc ++ s = \\o => d.s ! NCard Masc ++
if_then_Str d.hasDot BIND (BIND++"."++BIND) ++ if_then_Str d.hasDot BIND (BIND++","++BIND) ++
i.s ! o ; i.s ! o ;
n = Pl ; n = Pl ;
hasDot=True hasDot=True
} ; } ;
oper
spaceIf : DTail -> Str = \t -> case t of {
T3 => SOFT_SPACE ;
_ => BIND
} ;
inc : DTail -> DTail = \t -> case t of {
T1 => T2 ;
T2 => T3 ;
T3 => T1
} ;
oper oper
mk2Dig : Str -> Str -> TDigit = \c,o -> mk3Dig c o Pl ; mk2Dig : Str -> Str -> TDigit = \c,o -> mk3Dig c o Pl ;
mkDig : Str -> TDigit = \c -> mk2Dig c (c + ":o") ; mkDig : Str -> TDigit = \c -> mk2Dig c (c + ":o") ;

View File

@@ -1,3 +1,5 @@
--# -path=.:../abstract
concrete NumeralSwe of Numeral = CatSwe [Numeral,Digits,Decimal] ** open ResSwe, MorphoSwe, Prelude in { concrete NumeralSwe of Numeral = CatSwe [Numeral,Digits,Decimal] ** open ResSwe, MorphoSwe, Prelude in {
flags coding=utf8 ; flags coding=utf8 ;
@@ -50,21 +52,24 @@ lin
{s = \\g => n.s ! invNum ++ BIND ++ "tusen" ++ m.s ! g ; n = Pl} ; {s = \\g => n.s ! invNum ++ BIND ++ "tusen" ++ m.s ! g ; n = Pl} ;
pot3as4 n = n ; pot3as4 n = n ;
pot41 = numPl (cardOrd "miljon" "miljonde") ; pot41 = numPl (cardOrd "en miljon" "miljonde") ;
pot4 n = pot4 n =
numPl (\\g => n.s ! NCard Utr ++ numPl (\\g => n.s ! NCard Utr ++
cardOrd (case n.n of { cardOrd (case n.n of {
Sg => "miljon" ; Sg => "miljon" ;
Pl => "miljoner" Pl => "miljoner"
}) })
"miljonde" ! g) ; "miljonte" ! g) ;
pot4plus n m = pot4plus n m =
{s = \\g => n.s ! NCard Utr ++ BIND ++ "miljon" ++ m.s ! g ; n = Pl} ; {s = \\g => n.s ! NCard Utr ++ case n.n of {
Sg => "miljon" ;
Pl => "miljoner"
} ++ m.s ! g ; n = Pl} ;
pot4as5 n = n ; pot4as5 n = n ;
pot4decimal d = pot4decimal d =
numPl (\\g => d.s ! NCard Utr ++ cardOrd "miljoner" "miljonde" ! g) ; numPl (\\g => d.s ! NCard Utr ++ cardOrd "miljoner" "miljonte" ! g) ;
pot51 = numPl (cardOrd "miljard" "miljarde") ; pot51 = numPl (cardOrd "en miljard" "miljarde") ;
pot5 n = pot5 n =
numPl (\\g => n.s ! NCard Utr ++ numPl (\\g => n.s ! NCard Utr ++
cardOrd (case n.n of { cardOrd (case n.n of {
@@ -73,7 +78,7 @@ lin
}) })
"miljarde" ! g) ; "miljarde" ! g) ;
pot5plus n m = pot5plus n m =
{s = \\g => n.s ! NCard Utr ++ BIND ++ "miljard" ++ m.s ! g ; n = Pl} ; {s = \\g => n.s ! NCard Utr ++ "miljard" ++ m.s ! g ; n = Pl} ;
pot5decimal d = pot5decimal d =
numPl (\\g => d.s ! NCard Utr ++ cardOrd "miljarder" "miljarde" ! g) ; numPl (\\g => d.s ! NCard Utr ++ cardOrd "miljarder" "miljarde" ! g) ;

View File

@@ -69,6 +69,7 @@ concrete TestLangGer of TestLang =
s = \\af => (vp.nn ! agrP3 Sg).p1 ++ (vp.nn ! agrP3 Sg).p2 ++ s = \\af => (vp.nn ! agrP3 Sg).p1 ++ (vp.nn ! agrP3 Sg).p2 ++
(vp.nn ! agrP3 Sg).p3 ++ (vp.nn ! agrP3 Sg).p4 ++ vp.adj ++ vp.a2 (vp.nn ! agrP3 Sg).p3 ++ (vp.nn ! agrP3 Sg).p4 ++ vp.adj ++ vp.a2
++ vp.inf.inpl.p2 ++ vp.s.s ! VPastPart af ; ++ vp.inf.inpl.p2 ++ vp.s.s ! VPastPart af ;
s2 = \\_ => [] ;
isPre = True ; isPre = True ;
c = <[],[]> ; c = <[],[]> ;
adj = [] ; adj = [] ;
@@ -183,7 +184,7 @@ gr -tr (PredVP (UsePron ?) (ComplSlash (SlashV2V lassen_V2V (ReflVP (SlashV2a wa
s = \\m,t,a,p => s = \\m,t,a,p =>
let let
cls = slash.s ! m ! t ! a ! p ; cls = slash.s ! m ! t ! a ! p ;
who = appPrepC slash.c2 ip.s ; who = appPrep slash.c2 ip.s ;
in table { in table {
QDir => who ++ cls ! Inv ! (RGenNum gn); QDir => who ++ cls ! Inv ! (RGenNum gn);
QIndir => who ++ cls ! Sub ! (RGenNum gn) QIndir => who ++ cls ! Sub ! (RGenNum gn)
@@ -201,10 +202,10 @@ gr -tr (PredVP (UsePron ?) (ComplSlash (SlashV2V lassen_V2V (ReflVP (SlashV2a wa
} ; } ;
SlashVS np vs slash = SlashVS np vs slash =
let subj = mkSubj np PrepNom ; let subj = mkSubject np PrepNom ;
vps = insertExtrapos (conjThat ++ slash.s ! Sub) (predV vs) vps = insertExtrapos (conjThat ++ slash.s ! Sub) (predV vs)
** {c2 = slash.c2 ; objCtrl = False} -- default objCtrl guessed ** {c2 = slash.c2 ; objCtrl = False} -- default objCtrl guessed
in mkClSlash subj.p1 subj.p2 vps ; in mkClSlash subj.s subj.a vps ;
UseSlash t p cl = { UseSlash t p cl = {
s = \\o => t.s ++ p.s ++ cl.s ! t.m ! t.t ! t.a ! p.p ! o ! RSentence ; s = \\o => t.s ++ p.s ++ cl.s ! t.m ! t.t ! t.a ! p.p ! o ! RSentence ;
@@ -213,9 +214,9 @@ gr -tr (PredVP (UsePron ?) (ComplSlash (SlashV2V lassen_V2V (ReflVP (SlashV2a wa
oper oper
gnToAgr : RelGenNum -> Agr = \gn -> gnToAgr : RelGenNum -> Agr = \gn ->
case gn of {RGenNum (GSg g) => Ag g Sg P3 ; case gn of {RGenNum (GSg g) => AgSgP3 g ;
RGenNum GPl => Ag Neutr Pl P3 ; RGenNum GPl => AgPl P3 ;
RSentence => Ag Neutr Sg P3} ; RSentence => AgSgP3 Neutr} ;
mkClSlash : Str -> Agr -> ResGer.VPSlash -> ClauseSlash = \subj,agr,vp -> mkClSlash : Str -> Agr -> ResGer.VPSlash -> ClauseSlash = \subj,agr,vp ->
@@ -227,7 +228,8 @@ gr -tr (PredVP (UsePron ?) (ComplSlash (SlashV2V lassen_V2V (ReflVP (SlashV2a wa
Sub => True ; -- glue prefix to verb Sub => True ; -- glue prefix to verb
_ => False _ => False
} ; } ;
verb = vps.s ! ord ! agr ! VPFinite m t a ; vagr = agr2vagr agr ;
verb = vps.s ! ord ! vagr ! VPFinite m t a ;
haben = verb.inf2 ; haben = verb.inf2 ;
neg = negation ! b ; neg = negation ! b ;
ag : Agr = case vp.objCtrl of {True => gnToAgr gn ; _ => agr} ; ag : Agr = case vp.objCtrl of {True => gnToAgr gn ; _ => agr} ;

View File

@@ -51,8 +51,6 @@ lin
kaufen_bei_fuer_V4 = dirV4 (irregV "buy" "bought" "bought") (mkPrep "from") (mkPrep "for") ; kaufen_bei_fuer_V4 = dirV4 (irregV "buy" "bought" "bought") (mkPrep "from") (mkPrep "for") ;
mieten_von_fuer_V4 = dirV4 (regV "rent") (mkPrep "from") (mkPrep "for") ; mieten_von_fuer_V4 = dirV4 (regV "rent") (mkPrep "from") (mkPrep "for") ;
neugierig_auf_A2 = mkA2 (regA "curious") (mkPrep "about") ;
wagen_VV = mkVV (regV "dare") ; -- typ=VVInf wagen_VV = mkVV (regV "dare") ; -- typ=VVInf
versuchen_VV = mkVV (irregV "try" "tried" "tried") ; -- typ=VVInf versuchen_VV = mkVV (irregV "try" "tried" "tried") ; -- typ=VVInf
helfen_V2V = defaultV2V (regV "help") ; helfen_V2V = defaultV2V (regV "help") ;
@@ -62,4 +60,10 @@ lin
-- aci verb: -- aci verb:
sehen_V2V = mkV2V (I.see_V) ; sehen_V2V = mkV2V (I.see_V) ;
hoeren_V2V = mkV2V (I.hear_V) ; hoeren_V2V = mkV2V (I.hear_V) ;
-- Adjectives
neugierig_auf_A2 = mkA2 (regA "curious") (mkPrep "about") ;
treu_A2 = mkA2 (compoundA (mkA "faithful")) (mkPrep "to") ;
stolz_A2 = mkA2 (mkA "proud" "prouder") (mkPrep "of") ;
} }

View File

@@ -55,8 +55,6 @@ lin
kaufen_bei_fuer_V4 = dirV4 (regV "kaufen") bei_Prep fuer_Prep ; kaufen_bei_fuer_V4 = dirV4 (regV "kaufen") bei_Prep fuer_Prep ;
mieten_von_fuer_V4 = dirV4 (regV "mieten") von_Prep fuer_Prep ; mieten_von_fuer_V4 = dirV4 (regV "mieten") von_Prep fuer_Prep ;
neugierig_auf_A2 = mkA2 (mk3A "neugierig" "neugieriger" "neugierigste") (mkPrep "auf" accusative) ;
-- verbs with infinitival object (non-modal): -- verbs with infinitival object (non-modal):
wagen_VV = mkVV (regV "wagen") ; wagen_VV = mkVV (regV "wagen") ;
versuchen_VV = mkVV (irregV "versuchen" "versucht" "versuchte" "versuchte" "versucht") ; versuchen_VV = mkVV (irregV "versuchen" "versucht" "versuchte" "versuchte" "versucht") ;
@@ -72,4 +70,11 @@ lin
-- aci verb: -- aci verb:
sehen_V2V = auxV2V (irregV "sehen" "sieht" "sah" "sähe" "gesehen") accPrep ; sehen_V2V = auxV2V (irregV "sehen" "sieht" "sah" "sähe" "gesehen") accPrep ;
hoeren_V2V = auxV2V (regV "hören") accPrep ; hoeren_V2V = auxV2V (regV "hören") accPrep ;
-- Adjectives
neugierig_auf_A2 = mkA2 (mk3A "neugierig" "neugieriger" "neugierigste") (mkPrep "auf" accusative) ;
treu_A2 = mkA2 (mk3A "treu" "treuer" "treueste") datPrep ;
stolz_A2 = mkA2 (mk3A "stolz" "stolzer" "stolzeste") (mkPrep "auf" accusative) ;
} }

View File

@@ -24,8 +24,6 @@ fun
entschuldigen_bei_fuer_rV3 : V3 ; entschuldigen_bei_fuer_rV3 : V3 ;
raechen_am_fuer_rV3 : V3 ; raechen_am_fuer_rV3 : V3 ;
neugierig_auf_A2 : A2 ;
wagen_VV : VV ; wagen_VV : VV ;
versuchen_VV : VV ; versuchen_VV : VV ;
@@ -43,4 +41,10 @@ fun
kaufen_bei_fuer_V4 : V4 ; kaufen_bei_fuer_V4 : V4 ;
mieten_von_fuer_V4 : V4 ; mieten_von_fuer_V4 : V4 ;
-- Adjectives
neugierig_auf_A2 : A2 ;
treu_A2 : A2 ; -- Ger: dative complement
stolz_A2 : A2 ;
} }