mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 17:08:54 -06:00
Merge branch 'master' of https://github.com/GrammaticalFramework/gf-rgl
This commit is contained in:
@@ -4,3 +4,6 @@ gt MkDocument (NoDefinition "") (InflectionN ?) "" | l | wf -file="example-table
|
|||||||
gt MkDocument (NoDefinition "") (InflectionA ?) "" | l | wf -append -file="example-tables.html"
|
gt MkDocument (NoDefinition "") (InflectionA ?) "" | l | wf -append -file="example-tables.html"
|
||||||
gt MkDocument (NoDefinition "") (InflectionV ?) "" | l | wf -append -file="example-tables.html"
|
gt MkDocument (NoDefinition "") (InflectionV ?) "" | l | wf -append -file="example-tables.html"
|
||||||
gt MkDocument (NoDefinition "") (InflectionV2 ?) "" | l | wf -append -file="example-tables.html"
|
gt MkDocument (NoDefinition "") (InflectionV2 ?) "" | l | wf -append -file="example-tables.html"
|
||||||
|
gt MkDocument (NoDefinition "") (InflectionV3 ?) "" | l | wf -append -file="example-tables.html"
|
||||||
|
gt MkDocument (NoDefinition "") (InflectionVV ?) "" | l | wf -append -file="example-tables.html"
|
||||||
|
gt MkDocument (NoDefinition "") (InflectionV2V ?) "" | l | wf -append -file="example-tables.html"
|
||||||
|
|||||||
@@ -45,6 +45,13 @@ abstract Extend = Cat ** {
|
|||||||
MkVPS : Temp -> Pol -> VP -> VPS ; -- hasn't slept
|
MkVPS : Temp -> Pol -> VP -> VPS ; -- hasn't slept
|
||||||
ConjVPS : Conj -> [VPS] -> VPS ; -- has walked and won't sleep
|
ConjVPS : Conj -> [VPS] -> VPS ; -- has walked and won't sleep
|
||||||
PredVPS : NP -> VPS -> S ; -- she [has walked and won't sleep]
|
PredVPS : NP -> VPS -> S ; -- she [has walked and won't sleep]
|
||||||
|
SQuestVPS : NP -> VPS -> QS ; -- has she walked
|
||||||
|
QuestVPS : IP -> VPS -> QS ; -- who has walked
|
||||||
|
|
||||||
|
-- existentials that work in the absence of Cl
|
||||||
|
ExistS : Temp -> Pol -> NP -> S ; -- there was a party
|
||||||
|
ExistNPQS : Temp -> Pol -> NP -> QS ; -- was there a party
|
||||||
|
ExistIPQS : Temp -> Pol -> IP -> QS ; -- what was there
|
||||||
|
|
||||||
MkVPI : VP -> VPI ; -- to sleep (TODO: Ant and Pol)
|
MkVPI : VP -> VPI ; -- to sleep (TODO: Ant and Pol)
|
||||||
ConjVPI : Conj -> [VPI] -> VPI ; -- to sleep and to walk
|
ConjVPI : Conj -> [VPI] -> VPI ; -- to sleep and to walk
|
||||||
|
|||||||
@@ -1180,6 +1180,8 @@ incomplete resource Constructors = open Grammar in { --%
|
|||||||
= \a,p -> TUseQCl TPres a p ; --%
|
= \a,p -> TUseQCl TPres a p ; --%
|
||||||
mkQS : (Tense) -> (Ant) -> (Pol) -> QCl -> QS -- who wouldn't have slept
|
mkQS : (Tense) -> (Ant) -> (Pol) -> QCl -> QS -- who wouldn't have slept
|
||||||
= TUseQCl ; --%
|
= TUseQCl ; --%
|
||||||
|
mkQS : Temp -> Pol -> QCl -> QS -- who wouldn't have slept --%
|
||||||
|
= UseQCl ; --%
|
||||||
|
|
||||||
-- Since 'yes-no' question clauses can be built from clauses (see below),
|
-- Since 'yes-no' question clauses can be built from clauses (see below),
|
||||||
-- we give a shortcut
|
-- we give a shortcut
|
||||||
|
|||||||
@@ -117,6 +117,14 @@ lin
|
|||||||
UttDatIP ip = UttAccIP (lin IP ip) ; -- whom (dative) ; DEFAULT who
|
UttDatIP ip = UttAccIP (lin IP ip) ; -- whom (dative) ; DEFAULT who
|
||||||
UttVPShort = UttVP ; -- have fun, as opposed to "to have fun" ; DEFAULT UttVP
|
UttVPShort = UttVP ; -- have fun, as opposed to "to have fun" ; DEFAULT UttVP
|
||||||
|
|
||||||
|
SQuestVPS = variants {} ; -- : NP -> VPS -> QS ; -- has she walked
|
||||||
|
QuestVPS = variants {} ; -- : IP -> VPS -> QS ; -- who has walked
|
||||||
|
|
||||||
|
-- these will probably not need language-specific implementations
|
||||||
|
ExistS t p np = UseCl t p (ExistNP np) ;
|
||||||
|
ExistNPQS t p np = UseQCl t p (QuestCl (ExistNP np)) ;
|
||||||
|
ExistIPQS t p np = UseQCl t p (ExistIP np) ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
quoted : Str -> Str = \s -> "\"" ++ s ++ "\"" ; ---- TODO bind ; move to Prelude?
|
quoted : Str -> Str = \s -> "\"" ++ s ++ "\"" ; ---- TODO bind ; move to Prelude?
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
UseV,ComplVV,ComplVS,ComplVQ,ComplVA,SlashV2a,SlashV2V,SlashV2A,SlashV2S,Slash2V3,Slash3V3,UseComp,ProgrVP,PassV2 {"not","don't","doesn't","didn't","haven't","hasn't","hadn't","wouldn't","won't","isn't","aren't","wasn't","weren't"} PART neg head
|
UseV,ComplVV,ComplVS,ComplVQ,ComplVA,SlashV2a,SlashV2V,SlashV2A,SlashV2S,Slash2V3,Slash3V3,UseComp,CompAdv,CompNP,CompAP,CompCN,ProgrVP,PassV2 {"not","don't","doesn't","didn't","haven't","hasn't","hadn't","wouldn't","won't","isn't","aren't","wasn't","weren't"} PART neg head
|
||||||
UseV,ComplVV,ComplVS,ComplVQ,ComplVA,SlashV2a,SlashV2V,SlashV2A,SlashV2S,Slash2V3,Slash3V3,UseComp,ProgrVP,PassV2 {"has","had","have","will","would","do","does","did"} AUX aux head
|
UseV,ComplVV,ComplVS,ComplVQ,ComplVA,SlashV2a,SlashV2V,SlashV2A,SlashV2S,Slash2V3,Slash3V3,UseComp,CompAdv,CompNP,CompAP,CompCN,ProgrVP,PassV2 {"has","had","have","will","would","do","does","did"} AUX aux head
|
||||||
UseV,UseComp {"to"} PART mark head
|
UseV,UseComp {"to"} PART mark head
|
||||||
UseComp,ProgrVP,QuestIComp {"is","are","am","was","were","been","be"} VERB cop head
|
UseComp,CompAdv,CompAP,CompNP,CompCN,ProgrVP,QuestIComp {"is","are","am","was","were","been","be"} VERB cop head
|
||||||
CompCN {"a","an"} DET det head
|
CompCN {"a","an"} DET det head
|
||||||
PassV2 {"is","are","am","was","were""been","be"} VERB auxpass head
|
PassV2 {"is","are","am","was","were""been","be"} VERB auxpass head
|
||||||
ComplVV {"to"} PART mark xcomp
|
ComplVV {"to"} PART mark xcomp
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ concrete ExtendFin of Extend =
|
|||||||
MkVPI2,ConjVPI2,ComplVPI2,ComplVPIVV
|
MkVPI2,ConjVPI2,ComplVPI2,ComplVPIVV
|
||||||
,ExistCN, ExistMassCN, ICompAP, ByVP
|
,ExistCN, ExistMassCN, ICompAP, ByVP
|
||||||
,CompoundN, GenNP, GenIP, AdvIsNP, EmbedSSlash
|
,CompoundN, GenNP, GenIP, AdvIsNP, EmbedSSlash
|
||||||
|
,PassVPSlash, PassAgentVPSlash
|
||||||
]
|
]
|
||||||
with
|
with
|
||||||
(Grammar = GrammarFin) **
|
(Grammar = GrammarFin) **
|
||||||
@@ -160,4 +161,15 @@ lin
|
|||||||
NPSep => mikaInt ! Sg ! Nom }
|
NPSep => mikaInt ! Sg ! Nom }
|
||||||
} ;
|
} ;
|
||||||
in {s = appCompl True Pos ss.c2 thatWhich ++ ss.s} ;
|
in {s = appCompl True Pos ss.c2 thatWhich ++ ss.s} ;
|
||||||
|
|
||||||
|
PassVPSlash vp = S.passVP vp vp.c2 ;
|
||||||
|
|
||||||
|
PassAgentVPSlash vp np = {
|
||||||
|
s = {s = vp.s.s ; h = vp.s.h ; p = vp.s.p ; sc = npform2subjcase vp.c2.c} ;
|
||||||
|
s2 = \\b,p,a => np.s ! NPSep ++ vp.s2 ! b ! p ! a ;
|
||||||
|
adv = vp.adv ;
|
||||||
|
ext = vp.ext ;
|
||||||
|
vptyp = vp.vptyp ;
|
||||||
|
} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -599,6 +599,8 @@ mkVS = overload {
|
|||||||
<nukk + "e", nuk + "een"> => dRae ukko ukon ;
|
<nukk + "e", nuk + "een"> => dRae ukko ukon ;
|
||||||
<arp + "i", arv + "en"> => dArpi ukko ukon ;
|
<arp + "i", arv + "en"> => dArpi ukko ukon ;
|
||||||
<_ + ("us" | "ys"), _ + "den"> => dLujuus ukko ;
|
<_ + ("us" | "ys"), _ + "den"> => dLujuus ukko ;
|
||||||
|
<laid + ("u"|"a"|"ä") + "n", laitu + "men">
|
||||||
|
=> dLiitin ukko ukon ; -- laidun,hapan,sydän not caught in previous
|
||||||
<_, _ + "n"> => ukot ;
|
<_, _ + "n"> => ukot ;
|
||||||
_ =>
|
_ =>
|
||||||
Predef.error (["second argument should end in n, not"] ++ ukon)
|
Predef.error (["second argument should end in n, not"] ++ ukon)
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ concrete PhraseFin of Phrase = CatFin ** open ResFin, StemFin, (P = Prelude) in
|
|||||||
PConjConj conj = {s = conj.s2} ;
|
PConjConj conj = {s = conj.s2} ;
|
||||||
|
|
||||||
NoVoc = {s = []} ;
|
NoVoc = {s = []} ;
|
||||||
VocNP np = {s = "," ++ np.s ! NPSep} ;
|
VocNP np = {s = P.SOFT_BIND ++ "," ++ np.s ! NPSep} ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
addNegation : P.Bool -> Str = \isNeg -> case isNeg of {P.True => "ei" ; _ => []} ;
|
addNegation : P.Bool -> Str = \isNeg -> case isNeg of {P.True => "ei" ; _ => []} ;
|
||||||
|
|||||||
@@ -61,10 +61,10 @@ concrete SentenceFin of Sentence = CatFin ** open Prelude, ResFin, StemFin in {
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
AdvS a s = {s = a.s ++ s.s} ;
|
AdvS a s = {s = a.s ++ s.s} ;
|
||||||
ExtAdvS a s = {s = a.s ++ "," ++ s.s} ;
|
ExtAdvS a s = {s = a.s ++ SOFT_BIND ++ "," ++ s.s} ;
|
||||||
|
|
||||||
RelS s r = {s = s.s ++ "," ++ r.s ! agrP3 Sg} ; ---- mikä
|
RelS s r = {s = s.s ++ SOFT_BIND ++ "," ++ r.s ! agrP3 Sg} ; ---- mikä
|
||||||
|
|
||||||
SSubjS a subj b = {s = a.s ++ "," ++ subj.s ++ b.s} ;
|
SSubjS a subj b = {s = a.s ++ SOFT_BIND ++ "," ++ subj.s ++ b.s} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ lin
|
|||||||
MkSymb s = s ;
|
MkSymb s = s ;
|
||||||
|
|
||||||
BaseSymb = infixSS "ja" ;
|
BaseSymb = infixSS "ja" ;
|
||||||
ConsSymb = infixSS "," ;
|
ConsSymb = infixSS (SOFT_BIND ++ ",") ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -29,8 +29,8 @@ concrete VerbFin of Verb = CatFin ** open Prelude, ResFin, StemFin in {
|
|||||||
}
|
}
|
||||||
) ;
|
) ;
|
||||||
|
|
||||||
ComplVS v s = insertExtrapos ("," ++ etta_Conj ++ s.s) (predSV v) ;
|
ComplVS v s = insertExtrapos (SOFT_BIND ++ "," ++ etta_Conj ++ s.s) (predSV v) ;
|
||||||
ComplVQ v q = insertExtrapos ("," ++ q.s) (predSV v) ;
|
ComplVQ v q = insertExtrapos (SOFT_BIND ++ "," ++ q.s) (predSV v) ;
|
||||||
ComplVA v ap =
|
ComplVA v ap =
|
||||||
insertObj
|
insertObj
|
||||||
(\\_,b,agr =>
|
(\\_,b,agr =>
|
||||||
@@ -39,9 +39,9 @@ concrete VerbFin of Verb = CatFin ** open Prelude, ResFin, StemFin in {
|
|||||||
(predSV v) ;
|
(predSV v) ;
|
||||||
|
|
||||||
SlashV2S v s =
|
SlashV2S v s =
|
||||||
insertExtrapos ("," ++ etta_Conj ++ s.s) (predSV v) ** {c2 = v.c2} ;
|
insertExtrapos (SOFT_BIND ++ "," ++ etta_Conj ++ s.s) (predSV v) ** {c2 = v.c2} ;
|
||||||
SlashV2Q v q =
|
SlashV2Q v q =
|
||||||
insertExtrapos ("," ++ q.s) (predSV v) ** {c2 = v.c2} ;
|
insertExtrapos (SOFT_BIND ++ "," ++ q.s) (predSV v) ** {c2 = v.c2} ;
|
||||||
SlashV2V v vp =
|
SlashV2V v vp =
|
||||||
insertObj (\\_,b,a => infVP v.sc b a vp (vvtype2infform v.vi)) (predSV v) ** {c2 = v.c2} ;
|
insertObj (\\_,b,a => infVP v.sc b a vp (vvtype2infform v.vi)) (predSV v) ** {c2 = v.c2} ;
|
||||||
SlashV2A v ap =
|
SlashV2A v ap =
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ lin
|
|||||||
bad_A = prefA (mkADeg (regA "mauvais") (regA "pire")) ;
|
bad_A = prefA (mkADeg (regA "mauvais") (regA "pire")) ;
|
||||||
bank_N = regGenN "banque" feminine ;
|
bank_N = regGenN "banque" feminine ;
|
||||||
beautiful_A =
|
beautiful_A =
|
||||||
prefA (compADeg (mkA "beau" "bel" "beaux" "belle" "bellement")) ;
|
prefA (compADeg (mkA "beau" "bel" "belle" "beaux" "bellement")) ;
|
||||||
become_VA = mkVA devenir_V ;
|
become_VA = mkVA devenir_V ;
|
||||||
beer_N = regGenN "bière" feminine ;
|
beer_N = regGenN "bière" feminine ;
|
||||||
beg_V2V = mkV2V (regV "demander") accusative dative ;
|
beg_V2V = mkV2V (regV "demander") accusative dative ;
|
||||||
@@ -129,11 +129,11 @@ lin
|
|||||||
music_N = regGenN "musique" feminine ;
|
music_N = regGenN "musique" feminine ;
|
||||||
narrow_A = regA "étroit" ;
|
narrow_A = regA "étroit" ;
|
||||||
new_A =
|
new_A =
|
||||||
prefA (compADeg (mkA "nouveau" "nouvel" "nouveaux" "nouvelle" "nouvellement")) ;
|
prefA (compADeg (mkA "nouveau" "nouvel" "nouvelle" "nouveaux" "nouvellement")) ;
|
||||||
newspaper_N = regGenN "journal" masculine ;
|
newspaper_N = regGenN "journal" masculine ;
|
||||||
oil_N = regGenN "huile" feminine ;
|
oil_N = regGenN "huile" feminine ;
|
||||||
old_A =
|
old_A =
|
||||||
prefA (compADeg (mkA "vieux" "vieil" "vieux" "vieille" "vieillement")) ;
|
prefA (compADeg (mkA "vieux" "vieil" "vieille" "vieux" "vieillement")) ;
|
||||||
open_V2 = ouvrir_V2 ;
|
open_V2 = ouvrir_V2 ;
|
||||||
paint_V2A = mkV2A (v2V peindre_V2) accusative (mkPrep "en") ;
|
paint_V2A = mkV2A (v2V peindre_V2) accusative (mkPrep "en") ;
|
||||||
paper_N = regGenN "papier" masculine ;
|
paper_N = regGenN "papier" masculine ;
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ oper
|
|||||||
-- Here are some patterns. First one that describes the worst case.
|
-- Here are some patterns. First one that describes the worst case.
|
||||||
|
|
||||||
mkAdj' : (_,_,_,_,_ : Str) -> Adj ;
|
mkAdj' : (_,_,_,_,_ : Str) -> Adj ;
|
||||||
mkAdj' vieux vieil vieuxs vieille vieillement = {
|
mkAdj' vieux vieil vieille vieuxs vieillement = {
|
||||||
s = table {
|
s = table {
|
||||||
ASg Masc _ => pre {#voyelle => vieil ; "h" => vieil ; _ => vieux} ;
|
ASg Masc _ => pre {#voyelle => vieil ; "h" => vieil ; _ => vieux} ;
|
||||||
ASg Fem _ => vieille ;
|
ASg Fem _ => vieille ;
|
||||||
@@ -83,7 +83,7 @@ oper
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkAdj : (_,_,_,_ : Str) -> Adj ;
|
mkAdj : (_,_,_,_ : Str) -> Adj ;
|
||||||
mkAdj bleu bleus bleue bleuement = mkAdj' bleu bleu bleus bleue bleuement ;
|
mkAdj bleu bleue bleus bleuement = mkAdj' bleu bleu bleue bleus bleuement ;
|
||||||
|
|
||||||
-- Then the regular and invariant patterns.
|
-- Then the regular and invariant patterns.
|
||||||
|
|
||||||
@@ -106,44 +106,44 @@ oper
|
|||||||
_ => grand + "e"
|
_ => grand + "e"
|
||||||
}
|
}
|
||||||
in
|
in
|
||||||
mkAdj grand (grand + "s") grande (grande + "ment") ;
|
mkAdj grand grande (grand + "s") (grande + "ment") ;
|
||||||
|
|
||||||
-- Masculine form used for adverbial; also covers "carré".
|
-- Masculine form used for adverbial; also covers "carré".
|
||||||
|
|
||||||
adjJoli : Str -> Adj = \joli ->
|
adjJoli : Str -> Adj = \joli ->
|
||||||
mkAdj joli (joli + "s") (joli + "e") (joli + "ment") ;
|
mkAdj joli (joli + "e") (joli + "s") (joli + "ment") ;
|
||||||
|
|
||||||
adjHeureux : Str -> Adj = \heureux ->
|
adjHeureux : Str -> Adj = \heureux ->
|
||||||
let {heureu = Predef.tk 1 heureux} in
|
let {heureu = Predef.tk 1 heureux} in
|
||||||
mkAdj heureux heureux (heureu+"se") (heureu+"sement") ;
|
mkAdj heureux (heureu+"se") heureux (heureu+"sement") ;
|
||||||
|
|
||||||
adjBanal : Str -> Adj = \banal ->
|
adjBanal : Str -> Adj = \banal ->
|
||||||
let {bana = Predef.tk 1 banal} in
|
let {bana = Predef.tk 1 banal} in
|
||||||
mkAdj banal (bana + "ux") (banal+"e") (banal+"ement") ;
|
mkAdj banal (banal + "e") (bana+"ux") (banal+"ement") ;
|
||||||
|
|
||||||
adjJeune : Str -> Adj = \jeune ->
|
adjJeune : Str -> Adj = \jeune ->
|
||||||
mkAdj jeune (jeune+"s") jeune (jeune+"ment") ;
|
mkAdj jeune jeune (jeune+"s") (jeune+"ment") ;
|
||||||
|
|
||||||
adjIndien : Str -> Adj = \indien ->
|
adjIndien : Str -> Adj = \indien ->
|
||||||
mkAdj indien (indien+"s") (indien+"ne") (indien+"nement") ;
|
mkAdj indien (indien+"ne") (indien+"s") (indien+"nement") ;
|
||||||
|
|
||||||
adjTel : Str -> Adj = \tel ->
|
adjTel : Str -> Adj = \tel ->
|
||||||
mkAdj tel (tel+"s") (tel+"le") (tel+"lement") ;
|
mkAdj tel (tel+"le") (tel+"s") (tel+"lement") ;
|
||||||
|
|
||||||
adjFrancais : Str -> Adj = \francais ->
|
adjFrancais : Str -> Adj = \francais ->
|
||||||
mkAdj francais francais (francais+"e") (francais+"ement") ;
|
mkAdj francais (francais+"e") francais (francais+"ement") ;
|
||||||
|
|
||||||
adjCher : Str -> Adj = \cher ->
|
adjCher : Str -> Adj = \cher ->
|
||||||
let {ch = Predef.tk 2 cher} in
|
let {ch = Predef.tk 2 cher} in
|
||||||
mkAdj cher (cher + "s") (ch + "ère") (ch + "èrement") ;
|
mkAdj cher (ch + "ère") (cher + "s") (ch + "èrement") ;
|
||||||
|
|
||||||
adjPublic : Str -> Adj = \public ->
|
adjPublic : Str -> Adj = \public ->
|
||||||
let publique = init public + "que" in
|
let publique = init public + "que" in
|
||||||
mkAdj public (public+"s") (publique) (publique+"ment") ;
|
mkAdj public publique (public+"s") (publique+"ment") ;
|
||||||
|
|
||||||
adjVif : Str -> Adj = \vif ->
|
adjVif : Str -> Adj = \vif ->
|
||||||
let vive = init vif + "ve" in
|
let vive = init vif + "ve" in
|
||||||
mkAdj vif (vif+"s") (vive) (vive+"ment") ;
|
mkAdj vif vive (vif+"s") (vive+"ment") ;
|
||||||
|
|
||||||
mkAdjReg : Str -> Adj = \creux ->
|
mkAdjReg : Str -> Adj = \creux ->
|
||||||
case Predef.dp 3 creux of {
|
case Predef.dp 3 creux of {
|
||||||
|
|||||||
@@ -394,7 +394,7 @@ oper
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
mk4A masc fem mascpl aa = mk5A masc masc fem mascpl aa ;
|
mk4A masc fem mascpl aa = mk5A masc masc fem mascpl aa ;
|
||||||
mk5A masc masc fem mascpl aa = compADeg {s = \\_ => (mkAdj' masc masc mascpl fem aa).s ; isPre = False ; copTyp = serCopula ; lock_A = <>} ;
|
mk5A masc mascv fem mascpl aa = compADeg {s = \\_ => (mkAdj' masc mascv fem mascpl aa).s ; isPre = False ; copTyp = serCopula ; lock_A = <>} ;
|
||||||
regA a = compADeg {s = \\_ => (mkAdjReg a).s ; isPre = False ; copTyp = serCopula ; lock_A = <>} ;
|
regA a = compADeg {s = \\_ => (mkAdjReg a).s ; isPre = False ; copTyp = serCopula ; lock_A = <>} ;
|
||||||
prefA a = {s = a.s ; isPre = True ; copTyp = a.copTyp ; lock_A = <>} ;
|
prefA a = {s = a.s ; isPre = True ; copTyp = a.copTyp ; lock_A = <>} ;
|
||||||
adjCopula a cop = a ** {copTyp = cop} ;
|
adjCopula a cop = a ** {copTyp = cop} ;
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ concrete CatGer of Cat =
|
|||||||
V, VS, VQ = ResGer.Verb ; -- = {s : VForm => Str} ;
|
V, VS, VQ = ResGer.Verb ; -- = {s : VForm => Str} ;
|
||||||
VV = Verb ** {isAux : Bool} ;
|
VV = Verb ** {isAux : Bool} ;
|
||||||
V2, VA, V2A, V2S, V2Q = Verb ** {c2 : Preposition} ;
|
V2, VA, V2A, V2S, V2Q = Verb ** {c2 : Preposition} ;
|
||||||
V2V = Verb ** {c2 : Preposition ; isAux : Bool} ;
|
V2V = Verb ** {c2 : Preposition ; isAux : Bool ; ctrl : Control} ;
|
||||||
V3 = Verb ** {c2, c3 : Preposition} ;
|
V3 = Verb ** {c2, c3 : Preposition} ;
|
||||||
|
|
||||||
A = {s : Degree => AForm => Str} ;
|
A = {s : Degree => AForm => Str} ;
|
||||||
@@ -106,7 +106,7 @@ concrete CatGer of Cat =
|
|||||||
Tense = {s : Str ; t : ResGer.Tense ; m : Mood} ;
|
Tense = {s : Str ; t : ResGer.Tense ; m : Mood} ;
|
||||||
|
|
||||||
linref
|
linref
|
||||||
NP = \np -> np.s!(NPC Nom) ++ np.adv ++ np.ext ++ np.rc ; -- HL 6/2019
|
NP = \np -> np.s!(NPC Nom) ++ np.ext ++ np.rc ; -- HL 6/2019
|
||||||
CN = \cn -> cn.s ! Strong ! Pl ! Nom ++ cn.adv ++ cn.ext ++ cn.rc ! Pl ;
|
CN = \cn -> cn.s ! Strong ! Pl ! Nom ++ cn.adv ++ cn.ext ++ cn.rc ! Pl ;
|
||||||
|
|
||||||
SSlash = \ss -> ss.s ! Main ++ ss.c2.s ;
|
SSlash = \ss -> ss.s ! Main ++ ss.c2.s ;
|
||||||
|
|||||||
@@ -16980,7 +16980,7 @@ lin
|
|||||||
heldin_N = mkN "Heldin" "Heldinnen" feminine ;
|
heldin_N = mkN "Heldin" "Heldinnen" feminine ;
|
||||||
heldisch_A = mk3A "heldisch" "heldischer" "heldischste" ;
|
heldisch_A = mk3A "heldisch" "heldischer" "heldischste" ;
|
||||||
helena_N = mkN "Helena" "Helenas" feminine ;
|
helena_N = mkN "Helena" "Helenas" feminine ;
|
||||||
helfen_V = irregV "helfen" "helft" "half" "hälfe" "geholfen" ;
|
helfen_V = irregV "helfen" "hilft" "half" "hälfe" "geholfen" ;
|
||||||
helfensteiner_N = mkN "Helfensteiner" "Helfensteiner" masculine ;
|
helfensteiner_N = mkN "Helfensteiner" "Helfensteiner" masculine ;
|
||||||
helfer_N = mkN "Helfer" "Helfer" masculine ;
|
helfer_N = mkN "Helfer" "Helfer" masculine ;
|
||||||
helferlein_N = mkN "Helferlein" "Helferlein" neuter ;
|
helferlein_N = mkN "Helferlein" "Helferlein" neuter ;
|
||||||
@@ -26112,7 +26112,7 @@ lin
|
|||||||
nachgruebeln_V = prefixV "nach" (regV "grübeln") ;
|
nachgruebeln_V = prefixV "nach" (regV "grübeln") ;
|
||||||
nachhaken_5_V = prefixV "nach" (regV "haken") ;
|
nachhaken_5_V = prefixV "nach" (regV "haken") ;
|
||||||
nachhaltig_A = mk3A "nachhaltig" "nachhaltiger" "nachhaltigste" ;
|
nachhaltig_A = mk3A "nachhaltig" "nachhaltiger" "nachhaltigste" ;
|
||||||
nachhelfen_6_V = prefixV "nach" (irregV "helfen" "helft" "half" "hälfe" "geholfen") ;
|
nachhelfen_6_V = prefixV "nach" (irregV "helfen" "hilft" "half" "hälfe" "geholfen") ;
|
||||||
nachher_Adv = mkAdv "nachher" ;
|
nachher_Adv = mkAdv "nachher" ;
|
||||||
nachhilfe_N = mkN "Nachhilfe" "Nachhilfen" feminine ;
|
nachhilfe_N = mkN "Nachhilfe" "Nachhilfen" feminine ;
|
||||||
nachhut_N = mkN "Nachhut" "Nachhuten" feminine ;
|
nachhut_N = mkN "Nachhut" "Nachhuten" feminine ;
|
||||||
|
|||||||
@@ -1032,8 +1032,8 @@ lin
|
|||||||
aussortieren_V2 = dirV2 (prefixV "aus" (regV "sortieren")) ;
|
aussortieren_V2 = dirV2 (prefixV "aus" (regV "sortieren")) ;
|
||||||
ausspeichern_V2 = dirV2 (prefixV "aus" (regV "speichern")) ;
|
ausspeichern_V2 = dirV2 (prefixV "aus" (regV "speichern")) ;
|
||||||
ausspionieren_V2 = dirV2 (prefixV "aus" (regV "spionieren")) ;
|
ausspionieren_V2 = dirV2 (prefixV "aus" (regV "spionieren")) ;
|
||||||
aussprechen_V2 = dirV2 (prefixV "aus" (irregV "sprechen" "sprecht" "sprach" "spräche" "gesprochen")) ;
|
aussprechen_V2 = dirV2 (prefixV "aus" (irregV "sprechen" "spricht" "sprach" "spräche" "gesprochen")) ;
|
||||||
aussprechen_VS = mkVS (prefixV "aus" (irregV "sprechen" "sprecht" "sprach" "spräche" "gesprochen")) ;
|
aussprechen_VS = mkVS (prefixV "aus" (irregV "sprechen" "spricht" "sprach" "spräche" "gesprochen")) ;
|
||||||
ausspucken_vor_V2 = prepV2 (prefixV "aus" (regV "spucken")) (mkPrep "vor" dative) ;
|
ausspucken_vor_V2 = prepV2 (prefixV "aus" (regV "spucken")) (mkPrep "vor" dative) ;
|
||||||
ausspucken_V = prefixV "aus" (regV "spucken") ;
|
ausspucken_V = prefixV "aus" (regV "spucken") ;
|
||||||
ausstatten_mit_V3 = dirV3 (prefixV "aus" (regV "statten")) mit_Prep ;
|
ausstatten_mit_V3 = dirV3 (prefixV "aus" (regV "statten")) mit_Prep ;
|
||||||
@@ -1358,8 +1358,8 @@ lin
|
|||||||
besorgen_dat_V3 = accdatV3 (regV "besorgen") ;
|
besorgen_dat_V3 = accdatV3 (regV "besorgen") ;
|
||||||
besorgen_V2 = dirV2 (regV "besorgen") ;
|
besorgen_V2 = dirV2 (regV "besorgen") ;
|
||||||
bespassen_V2 = dirV2 (regV "bespaßen") ;
|
bespassen_V2 = dirV2 (regV "bespaßen") ;
|
||||||
besprechen_mit_V3 = dirV3 (irregV "besprechen" "besprecht" "besprach" "bespräche" "besprochen") mit_Prep ;
|
besprechen_mit_V3 = dirV3 (irregV "besprechen" "bespricht" "besprach" "bespräche" "besprochen") mit_Prep ;
|
||||||
besprechen_plV2 = pldirV2 (irregV "besprechen" "besprecht" "besprach" "bespräche" "besprochen") ;
|
besprechen_plV2 = pldirV2 (irregV "besprechen" "bespricht" "besprach" "bespräche" "besprochen") ;
|
||||||
bespruehen_mit_V3 = dirV3 (regV "besprühen") mit_Prep ;
|
bespruehen_mit_V3 = dirV3 (regV "besprühen") mit_Prep ;
|
||||||
bespruehen_V2 = dirV2 (regV "besprühen") ;
|
bespruehen_V2 = dirV2 (regV "besprühen") ;
|
||||||
besseren_rV = reflV (regV "besseren") accusative ;
|
besseren_rV = reflV (regV "besseren") accusative ;
|
||||||
@@ -2146,8 +2146,8 @@ lin
|
|||||||
entsichern_V2 = dirV2 (irregV "entsichern" "entsichert" "entsicherte" "entsicherte" "entsichert") ;
|
entsichern_V2 = dirV2 (irregV "entsichern" "entsichert" "entsicherte" "entsicherte" "entsichert") ;
|
||||||
entsorgen_V2 = dirV2 (irregV "entsorgen" "entsorgt" "entsorgte" "entsorgte" "entsorgt") ;
|
entsorgen_V2 = dirV2 (irregV "entsorgen" "entsorgt" "entsorgte" "entsorgte" "entsorgt") ;
|
||||||
entspannen_rV = reflV (irregV "entspannen" "entspannt" "entspannte" "entspannte" "entspannt") accusative ;
|
entspannen_rV = reflV (irregV "entspannen" "entspannt" "entspannte" "entspannte" "entspannt") accusative ;
|
||||||
entsprechen_dat_V2 = mkV2 (irregV "entsprechen" "entsprecht" "entsprach" "entspräche" "entsprochen") datPrep ;
|
entsprechen_dat_V2 = mkV2 (irregV "entsprechen" "entspricht" "entsprach" "entspräche" "entsprochen") datPrep ;
|
||||||
entsprechen_rcV = reciV (irregV "entsprechen" "entsprecht" "entsprach" "entspräche" "entsprochen") dative ;
|
entsprechen_rcV = reciV (irregV "entsprechen" "entspricht" "entsprach" "entspräche" "entsprochen") dative ;
|
||||||
entspringen_loc_V2 = prepV2 (irregV "entspringen" "entspringt" "entsprang" "entspränge" "entsprungen") loc_Prep ;
|
entspringen_loc_V2 = prepV2 (irregV "entspringen" "entspringt" "entsprang" "entspränge" "entsprungen") loc_Prep ;
|
||||||
entstaatlichen_V2 = dirV2 (irregV "entstaatlichen" "entstaatlicht" "entstaatlichte" "entstaatlichte" "entstaatlicht") ;
|
entstaatlichen_V2 = dirV2 (irregV "entstaatlichen" "entstaatlicht" "entstaatlichte" "entstaatlichte" "entstaatlicht") ;
|
||||||
entstammen_gen_V2 = mkV2 (irregV "entstammen" "entstammt" "entstammte" "entstammte" "entstammt") genPrep ;
|
entstammen_gen_V2 = mkV2 (irregV "entstammen" "entstammt" "entstammte" "entstammte" "entstammt") genPrep ;
|
||||||
@@ -3019,8 +3019,8 @@ lin
|
|||||||
heissen_V3 = dirV3 (irregV "heißen" "heißt" "hieß" "hieße" "geheißen") accPrep ;
|
heissen_V3 = dirV3 (irregV "heißen" "heißt" "hieß" "hieße" "geheißen") accPrep ;
|
||||||
heizen_V2 = dirV2 (regV "heizen") ;
|
heizen_V2 = dirV2 (regV "heizen") ;
|
||||||
heizen_V = regV "heizen" ;
|
heizen_V = regV "heizen" ;
|
||||||
|
helfen_dat_V2V = mkV2V (irregV "helfen" "hilft" "half" "hälfe" "geholfen") datPrep ;
|
||||||
helfen_dat_bei_V3 = mkV3 (irregV "helfen" "hilft" "half" "hülfe" "geholfen") datPrep bei_Prep ;
|
helfen_dat_bei_V3 = mkV3 (irregV "helfen" "hilft" "half" "hülfe" "geholfen") datPrep bei_Prep ;
|
||||||
-- helfen_V = irregV "helfen" "helft" "half" "hälfe" "geholfen" ;
|
|
||||||
hellen_es_esV = esV (regV "hellen") ;
|
hellen_es_esV = esV (regV "hellen") ;
|
||||||
hellenisieren_V2 = dirV2 (regV "hellenisieren") ;
|
hellenisieren_V2 = dirV2 (regV "hellenisieren") ;
|
||||||
hemmen_sV2 = dassV2 (regV "hemmen") accPrep ;
|
hemmen_sV2 = dassV2 (regV "hemmen") accPrep ;
|
||||||
@@ -4142,8 +4142,8 @@ lin
|
|||||||
nachgruebeln_ueber_V2 = prepV2 (prefixV "nach" (regV "grübeln")) (mkPrep "über" dative) ;
|
nachgruebeln_ueber_V2 = prepV2 (prefixV "nach" (regV "grübeln")) (mkPrep "über" dative) ;
|
||||||
nachhaken_bei_V2 = prepV2 (prefixV "nach" (regV "haken")) bei_Prep ;
|
nachhaken_bei_V2 = prepV2 (prefixV "nach" (regV "haken")) bei_Prep ;
|
||||||
nachhaken_V = prefixV "nach" (regV "haken") ;
|
nachhaken_V = prefixV "nach" (regV "haken") ;
|
||||||
nachhelfen_dat_V2 = mkV2 (prefixV "nach" (irregV "helfen" "helft" "half" "hälfe" "geholfen")) datPrep ;
|
nachhelfen_dat_V2 = mkV2 (prefixV "nach" (irregV "helfen" "hilft" "half" "hälfe" "geholfen")) datPrep ;
|
||||||
nachhelfen_dat_V2V = mkV2V (prefixV "nach" (irregV "helfen" "helft" "half" "hälfe" "geholfen")) datPrep ;
|
nachhelfen_dat_V2V = mkV2V (prefixV "nach" (irregV "helfen" "hilft" "half" "hälfe" "geholfen")) datPrep ;
|
||||||
nachkarten_V = prefixV "nach" (regV "karten") ;
|
nachkarten_V = prefixV "nach" (regV "karten") ;
|
||||||
nachlassen_dat_V3 = accdatV3 (prefixV "nach" (irregV "lassen" "lasst" "ließ" "ließe" "gelassen")) ;
|
nachlassen_dat_V3 = accdatV3 (prefixV "nach" (irregV "lassen" "lasst" "ließ" "ließe" "gelassen")) ;
|
||||||
nachlassen_im_V2 = prepV2 (prefixV "nach" (irregV "lassen" "lasst" "ließ" "ließe" "gelassen")) (mkPrep "in" dative) ;
|
nachlassen_im_V2 = prepV2 (prefixV "nach" (irregV "lassen" "lasst" "ließ" "ließe" "gelassen")) (mkPrep "in" dative) ;
|
||||||
@@ -6492,7 +6492,7 @@ lin
|
|||||||
verspielen_rV = reflV (irregV "verspielen" "verspielt" "verspielte" "verspielte" "verspielt") accusative ;
|
verspielen_rV = reflV (irregV "verspielen" "verspielt" "verspielte" "verspielte" "verspielt") accusative ;
|
||||||
verspielen_V2 = dirV2 (irregV "verspielen" "verspielt" "verspielte" "verspielte" "verspielt") ;
|
verspielen_V2 = dirV2 (irregV "verspielen" "verspielt" "verspielte" "verspielte" "verspielt") ;
|
||||||
verspotten_V2 = dirV2 (irregV "verspotten" "verspottet" "verspottete" "verspotte" "verspottet") ;
|
verspotten_V2 = dirV2 (irregV "verspotten" "verspottet" "verspottete" "verspotte" "verspottet") ;
|
||||||
versprechen_dat_V2V = mkV2V (irregV "versprechen" "versprecht" "versprach" "verspräche" "versprochen") datPrep ;
|
versprechen_dat_V2V = mkV2V (irregV "versprechen" "verspricht" "versprach" "verspräche" "versprochen") datPrep ;
|
||||||
versprengen_V2 = dirV2 (irregV "versprengen" "versprengt" "versprengte" "versprengte" "versprengt") ;
|
versprengen_V2 = dirV2 (irregV "versprengen" "versprengt" "versprengte" "versprengte" "versprengt") ;
|
||||||
verspueren_V2 = dirV2 (irregV "verspüren" "verspürt" "verspürte" "verspürte" "verspürt") ;
|
verspueren_V2 = dirV2 (irregV "verspüren" "verspürt" "verspürte" "verspürte" "verspürt") ;
|
||||||
verstaatlichen_V2 = dirV2 (irregV "verstaatlichen" "verstaatlicht" "verstaatlichte" "verstaatlichte" "verstaatlicht") ;
|
verstaatlichen_V2 = dirV2 (irregV "verstaatlichen" "verstaatlicht" "verstaatlichte" "verstaatlichte" "verstaatlicht") ;
|
||||||
|
|||||||
@@ -2882,6 +2882,7 @@ fun
|
|||||||
heissen_V3 : V3 ;
|
heissen_V3 : V3 ;
|
||||||
heizen_V2 : V2 ;
|
heizen_V2 : V2 ;
|
||||||
heizen_V : V ;
|
heizen_V : V ;
|
||||||
|
helfen_dat_V2V : V2V ;
|
||||||
helfen_dat_bei_V3 : V3 ;
|
helfen_dat_bei_V3 : V3 ;
|
||||||
hellen_es_esV : V ;
|
hellen_es_esV : V ;
|
||||||
hellenisieren_V2 : V2 ;
|
hellenisieren_V2 : V2 ;
|
||||||
|
|||||||
@@ -13,7 +13,8 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
|||||||
ConjVPI = conjunctDistrTable Bool ;
|
ConjVPI = conjunctDistrTable Bool ;
|
||||||
|
|
||||||
ComplVPIVV v vpi =
|
ComplVPIVV v vpi =
|
||||||
insertInf (vpi.s ! v.isAux) (
|
-- insertInf (vpi.s ! v.isAux) (
|
||||||
|
insertInf {s=(vpi.s ! v.isAux);isAux=v.isAux;ctrl=SubjC} ( -- HL ??
|
||||||
predVGen v.isAux v) ; ----
|
predVGen v.isAux v) ; ----
|
||||||
{-
|
{-
|
||||||
insertExtrapos vpi.p3 (
|
insertExtrapos vpi.p3 (
|
||||||
@@ -42,15 +43,19 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
|||||||
DetNPMasc det = {
|
DetNPMasc det = {
|
||||||
s = \\c => det.sp ! Masc ! c ; ---- genders
|
s = \\c => det.sp ! Masc ! c ; ---- genders
|
||||||
a = agrP3 det.n ;
|
a = agrP3 det.n ;
|
||||||
isPron = False ;
|
-- isPron = False ;
|
||||||
ext, adv, rc = []
|
-- isLight = True ;
|
||||||
|
w = WLight ;
|
||||||
|
ext, rc = []
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
DetNPFem det = {
|
DetNPFem det = {
|
||||||
s = \\c => det.sp ! Fem ! c ; ---- genders
|
s = \\c => det.sp ! Fem ! c ; ---- genders
|
||||||
a = agrP3 det.n ;
|
a = agrP3 det.n ;
|
||||||
isPron = False ;
|
-- isPron = False ;
|
||||||
ext, adv, rc = []
|
-- isLight = True ;
|
||||||
|
w = WLight ;
|
||||||
|
ext, rc = []
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
EmptyRelSlash slash = {
|
EmptyRelSlash slash = {
|
||||||
@@ -63,7 +68,7 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
|||||||
PassVPSlash vp =
|
PassVPSlash vp =
|
||||||
let c = case <vp.c2.c,vp.c2.isPrep> of {
|
let c = case <vp.c2.c,vp.c2.isPrep> of {
|
||||||
<NPC Acc,False> => NPC Nom ;
|
<NPC Acc,False> => NPC Nom ;
|
||||||
_ => vp.c2.c}
|
_ => vp.c2.c}
|
||||||
in insertObj (\\_ => (PastPartAP vp).s ! APred) (predV werdenPass) **
|
in insertObj (\\_ => (PastPartAP vp).s ! APred) (predV werdenPass) **
|
||||||
{subjc = vp.c2 ** {c= c}} ;
|
{subjc = vp.c2 ** {c= c}} ;
|
||||||
-- regulates passivised object: accusative objects -> nom; all others: same case
|
-- regulates passivised object: accusative objects -> nom; all others: same case
|
||||||
@@ -73,8 +78,12 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
|||||||
PassAgentVPSlash vp np = ---- "von" here, "durch" in StructuralGer
|
PassAgentVPSlash vp np = ---- "von" here, "durch" in StructuralGer
|
||||||
insertObj (\\_ => (PastPartAgentAP (lin VPSlash vp) (lin NP np)).s ! APred) (predV werdenPass) ;
|
insertObj (\\_ => (PastPartAgentAP (lin VPSlash vp) (lin NP np)).s ! APred) (predV werdenPass) ;
|
||||||
|
|
||||||
|
Pass3V3 v = -- HL 7/19
|
||||||
|
let bekommenPass : Verb = P.habenV (P.irregV "bekommen" "bekommt" "bekam" "bekäme" "bekommen")
|
||||||
|
in insertObj (\\_ => (v.s ! VPastPart APred)) (predV bekommenPass) ** { subjc = PrepNom ; c2 = v.c2 } ;
|
||||||
|
|
||||||
PastPartAP vp = {
|
PastPartAP vp = {
|
||||||
s = \\af => (vp.nn ! agrP3 Sg).p1 ++ (vp.nn ! agrP3 Sg).p2 ++ (vp.nn ! agrP3 Sg).p3 ++ vp.a2 ++ vp.inf ++
|
s = \\af => (vp.nn ! agrP3 Sg).p1 ++ (vp.nn ! agrP3 Sg).p2 ++ (vp.nn ! agrP3 Sg).p3 ++ vp.a2 ++ vp.inf.s ++
|
||||||
vp.ext ++ vp.infExt ++ vp.s.s ! VPastPart af ;
|
vp.ext ++ vp.infExt ++ vp.s.s ! VPastPart af ;
|
||||||
isPre = True ;
|
isPre = True ;
|
||||||
c = <[],[]> ;
|
c = <[],[]> ;
|
||||||
@@ -85,7 +94,7 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
|||||||
let agent = appPrepNP P.von_Prep np
|
let agent = appPrepNP P.von_Prep np
|
||||||
in {
|
in {
|
||||||
s = \\af => (vp.nn ! agrP3 Sg).p1 ++ (vp.nn ! agrP3 Sg).p2 ++ (vp.nn ! agrP3 Sg).p3 ++ vp.a2 ++ agent ++
|
s = \\af => (vp.nn ! agrP3 Sg).p1 ++ (vp.nn ! agrP3 Sg).p2 ++ (vp.nn ! agrP3 Sg).p3 ++ vp.a2 ++ agent ++
|
||||||
vp.inf ++
|
vp.inf.s ++
|
||||||
vp.c2.s ++ --- junk if not TV
|
vp.c2.s ++ --- junk if not TV
|
||||||
vp.ext ++ vp.infExt ++ vp.s.s ! VPastPart af ;
|
vp.ext ++ vp.infExt ++ vp.s.s ! VPastPart af ;
|
||||||
isPre = True ;
|
isPre = True ;
|
||||||
@@ -129,7 +138,7 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
|||||||
m = tm.m ;
|
m = tm.m ;
|
||||||
subj = [] ;
|
subj = [] ;
|
||||||
verb = vps.s ! ord ! agr ! VPFinite m t a ;
|
verb = vps.s ! ord ! agr ! VPFinite m t a ;
|
||||||
neg = tm.s ++ p.s ++ vp.a1 ! b ;
|
neg = tm.s ++ p.s ++ vp.a1 ++ negation ! b ; -- HL 8/19 ++ vp.a1 ! b ;
|
||||||
-- obj1 = (vp.nn ! agr).p1 ;
|
-- obj1 = (vp.nn ! agr).p1 ;
|
||||||
-- obj = (vp.nn ! agr).p2 ;
|
-- obj = (vp.nn ! agr).p2 ;
|
||||||
-- compl = obj1 ++ neg ++ obj ++ vp.a2 ; -- from EG 15/5
|
-- compl = obj1 ++ neg ++ obj ++ vp.a2 ; -- from EG 15/5
|
||||||
@@ -137,19 +146,19 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
|||||||
obj2 = (vp.nn ! agr).p3 ; -- pp-objects
|
obj2 = (vp.nn ! agr).p3 ; -- pp-objects
|
||||||
obj3 = (vp.nn ! agr).p4 ++ vp.adj ++ vp.a2 ; -- pred.AP|CN|Adv, via useComp HL 6/2019
|
obj3 = (vp.nn ! agr).p4 ++ vp.adj ++ vp.a2 ; -- pred.AP|CN|Adv, via useComp HL 6/2019
|
||||||
compl = obj1 ++ neg ++ obj2 ++ obj3 ;
|
compl = obj1 ++ neg ++ obj2 ++ obj3 ;
|
||||||
inf = vp.inf ++ verb.inf ++ verb.inf2 ;
|
inf = vp.inf.s ++ verb.inf ++ verb.inf2 ;
|
||||||
extra = vp.ext ;
|
extra = vp.ext ;
|
||||||
infE : Str = -- HL 30/6/2019
|
infE : Str = -- HL 30/6/2019
|
||||||
case <t,a,vp.isAux> of {
|
case <t,a,vp.isAux> of {
|
||||||
<Fut|Cond,Simul,True> => inf ; --# notpresent
|
<Fut|Cond,Simul,True> => inf ; --# notpresent
|
||||||
<Fut|Cond,Anter,True> -- Duden 318: kommen wollen haben => haben kommen wollen --# notpresent
|
<Fut|Cond,Anter,True> -- Duden 318: kommen wollen haben => haben kommen wollen --# notpresent
|
||||||
=> verb.inf2 ++ vp.inf ++ verb.inf ; --# notpresent
|
=> verb.inf2 ++ vp.inf.s ++ verb.inf ; --# notpresent
|
||||||
<_,Anter,True> => inf ; --# notpresent
|
<_,Anter,True> => inf ; --# notpresent
|
||||||
_ => verb.inf ++ verb.inf2 ++ vp.inf } ;
|
_ => verb.inf ++ verb.inf2 ++ vp.inf.s } ;
|
||||||
inffin : Str =
|
inffin : Str =
|
||||||
case <t,a,vp.isAux> of {
|
case <t,a,vp.isAux> of {
|
||||||
<Fut|Cond,Anter,True> -- ... wird|würde haben kommen wollen --# notpresent
|
<Fut|Cond,Anter,True> -- ... wird|würde haben kommen wollen --# notpresent
|
||||||
=> verb.fin ++ verb.inf2 ++ vp.inf ++ verb.inf ; --# notpresent
|
=> verb.fin ++ verb.inf2 ++ vp.inf.s ++ verb.inf ; --# notpresent
|
||||||
<_,Anter,True> --# notpresent
|
<_,Anter,True> --# notpresent
|
||||||
=> verb.fin ++ inf ; -- double inf --# notpresent
|
=> verb.fin ++ inf ; -- double inf --# notpresent
|
||||||
_ => inf ++ verb.fin --- or just auxiliary vp
|
_ => inf ++ verb.fin --- or just auxiliary vp
|
||||||
@@ -204,8 +213,8 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
|||||||
|
|
||||||
lin
|
lin
|
||||||
EsVV vv vp = predV vv ** {
|
EsVV vv vp = predV vv ** {
|
||||||
nn = \\a => let n = vp.nn ! a in <"es" ++ n.p1 , n.p2 , n.p3, n.p4> ;
|
nn = \\a => let n = vp.nn ! a in <"es" ++ n.p1, n.p2, n.p3, n.p4, n.p5, n.p6> ;
|
||||||
inf = vp.s.s ! (VInf True) ++ vp.inf ; -- ich genieße es zu versuchen zu gehen; alternative word order could be produced by vp.inf ++ vp.s.s... (zu gehen zu versuchen)
|
inf = vp.inf ** {s = vp.s.s ! (VInf True) ++ vp.inf.s} ; -- ich genieße es zu versuchen zu gehen; alternative word order could be produced by vp.inf ++ vp.s.s... (zu gehen zu versuchen)
|
||||||
a1 = vp.a1 ;
|
a1 = vp.a1 ;
|
||||||
a2 = vp.a2 ;
|
a2 = vp.a2 ;
|
||||||
ext = vp.ext ;
|
ext = vp.ext ;
|
||||||
@@ -213,7 +222,7 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
|||||||
adj = vp.adj } ;
|
adj = vp.adj } ;
|
||||||
|
|
||||||
EsV2A v2a ap s = predV v2a ** {
|
EsV2A v2a ap s = predV v2a ** {
|
||||||
nn = \\_ => <"es",[],[],[]> ;
|
nn = \\_ => <"es",[],[],[],[],[]> ;
|
||||||
adj = ap.s ! APred ;
|
adj = ap.s ! APred ;
|
||||||
ext = "," ++ "dass" ++ s.s ! Sub} ;
|
ext = "," ++ "dass" ++ s.s ! Sub} ;
|
||||||
|
|
||||||
@@ -228,7 +237,7 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
|||||||
let vp = predV werdenPass ;
|
let vp = predV werdenPass ;
|
||||||
in vp ** {
|
in vp ** {
|
||||||
subj = esSubj ;
|
subj = esSubj ;
|
||||||
inf = v.s ! VPastPart APred } ; -- construct the formal clause
|
inf = vp.inf ** {s = v.s ! VPastPart APred } } ; -- construct the formal clause
|
||||||
|
|
||||||
AdvFor adv fcl = fcl ** {a2 = adv.s} ;
|
AdvFor adv fcl = fcl ** {a2 = adv.s} ;
|
||||||
|
|
||||||
@@ -244,9 +253,12 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
|||||||
|
|
||||||
esSubj : NP = lin NP {
|
esSubj : NP = lin NP {
|
||||||
s = \\_ => "es" ;
|
s = \\_ => "es" ;
|
||||||
rc, ext, adv = [] ;
|
rc, ext = [] ;
|
||||||
a = Ag Neutr Sg P3 ;
|
a = Ag Neutr Sg P3 ;
|
||||||
isPron = True} ;
|
-- isLight = True ;
|
||||||
|
-- isPron = True
|
||||||
|
w = WPron
|
||||||
|
} ;
|
||||||
|
|
||||||
DisToCl : Str -> Agr -> FClause -> Clause = \subj,agr,vp ->
|
DisToCl : Str -> Agr -> FClause -> Clause = \subj,agr,vp ->
|
||||||
let vps = useVP vp in {
|
let vps = useVP vp in {
|
||||||
@@ -257,11 +269,11 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
|||||||
_ => False
|
_ => False
|
||||||
} ;
|
} ;
|
||||||
verb = vps.s ! ord ! agr ! VPFinite m t a ;
|
verb = vps.s ! ord ! agr ! VPFinite m t a ;
|
||||||
neg = vp.a1 ! b ;
|
neg = vp.a1 ++ negation ! b ; -- HL 8/19 vp.a1 ! b ;
|
||||||
obj1 = (vp.nn ! agr).p1 ;
|
obj1 = (vp.nn ! agr).p1 ;
|
||||||
obj2 = (vp.nn ! agr).p2 ++ (vp.nn ! agr).p3 ;
|
obj2 = (vp.nn ! agr).p2 ++ (vp.nn ! agr).p3 ;
|
||||||
compl = obj1 ++ neg ++ vp.adj ++ obj2 ++ vp.a2 ; -- adj added
|
compl = obj1 ++ neg ++ vp.adj ++ obj2 ++ vp.a2 ; -- adj added
|
||||||
inf = vp.inf ++ verb.inf ; -- not used for linearisation of Main/Inv
|
inf = vp.inf.s ++ verb.inf ; -- not used for linearisation of Main/Inv
|
||||||
extra = vp.ext ;
|
extra = vp.ext ;
|
||||||
inffin : Str =
|
inffin : Str =
|
||||||
case <a,vp.isAux> of {
|
case <a,vp.isAux> of {
|
||||||
@@ -270,8 +282,8 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
|||||||
}
|
}
|
||||||
in
|
in
|
||||||
case o of {
|
case o of {
|
||||||
Main => subj ++ verb.fin ++ compl ++ vp.infExt ++ verb.inf ++ extra ++ vp.inf ;
|
Main => subj ++ verb.fin ++ compl ++ vp.infExt ++ verb.inf ++ extra ++ vp.inf.s ;
|
||||||
Inv => verb.fin ++ compl ++ vp.infExt ++ verb.inf ++ extra ++ vp.inf ;
|
Inv => verb.fin ++ compl ++ vp.infExt ++ verb.inf ++ extra ++ vp.inf.s ;
|
||||||
Sub => compl ++ vp.infExt ++ inffin ++ extra }
|
Sub => compl ++ vp.infExt ++ inffin ++ extra }
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|||||||
@@ -26,4 +26,5 @@ abstract ExtraGerAbs = Extra [
|
|||||||
AdvFor : Adv -> FClause -> FClause ; -- es wird heute gelacht - addition of adverbs
|
AdvFor : Adv -> FClause -> FClause ; -- es wird heute gelacht - addition of adverbs
|
||||||
FtoCl : FClause -> Cl ; -- embedding FClause within the RGL, to allow generation of S, Utt, etc.
|
FtoCl : FClause -> Cl ; -- embedding FClause within the RGL, to allow generation of S, Utt, etc.
|
||||||
|
|
||||||
|
Pass3V3 : V3 -> VPSlash ; -- wir bekommen den Beweis erklärt
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,10 +20,12 @@ oper
|
|||||||
mkPrep : Str -> PCase -> Preposition = \s,c ->
|
mkPrep : Str -> PCase -> Preposition = \s,c ->
|
||||||
{s = s ; s2 = [] ; c = c ; isPrep = True} ;
|
{s = s ; s2 = [] ; c = c ; isPrep = True} ;
|
||||||
|
|
||||||
nameNounPhrase : {s : Case => Str} -> {s : PCase => Str ; a : Agr ; isPron : Bool ; ext,adv,rc : Str} = \name -> heavyNP {
|
nameNounPhrase : {s : Case => Str} -> {s : PCase => Str ; a : Agr ;
|
||||||
|
-- isLight, isPron : Bool ;
|
||||||
|
w : Weight ;
|
||||||
|
ext,rc : Str} = \name -> heavyNP {
|
||||||
s = \\c => usePrepC c (\k -> name.s ! k) ;
|
s = \\c => usePrepC c (\k -> name.s ! k) ;
|
||||||
a = agrP3 Sg ;
|
a = agrP3 Sg
|
||||||
ext, adv, rc = [] -- added
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
detLikeAdj : Bool -> Number -> Str ->
|
detLikeAdj : Bool -> Number -> Str ->
|
||||||
|
|||||||
@@ -2,39 +2,46 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
|
|
||||||
flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
|
-- Remark: np.isLight makes ResGer.insertObjNP expensive, for ComplSlash, SlashVP
|
||||||
|
|
||||||
lin
|
lin
|
||||||
DetCN det cn = {
|
DetCN det cn = {
|
||||||
s = \\c => det.s ! cn.g ! c ++
|
s = \\c => det.s ! cn.g ! c ++
|
||||||
(let k = (prepC c).c in cn.s ! adjfCase det.a k ! det.n ! k) ;
|
(let k = (prepC c).c in cn.s ! adjfCase det.a k ! det.n ! k ++ cn.adv) ;
|
||||||
a = agrgP3 cn.g det.n ;
|
a = agrgP3 cn.g det.n ;
|
||||||
-- isPron = det.isDef ; -- ich sehe den Mann nicht vs. ich sehe nicht einen Mann
|
-- isLight = det.isDef ; -- ich sehe den Mann nicht vs. ich sehe nicht einen Mann
|
||||||
isPron = False ; -- HL 6/2019 (but:) sehe (die|einige) Männer nicht
|
-- isPron = False ; -- HL 6/2019 (but:) sehe (die|einige) Männer nicht
|
||||||
rc = cn.rc ! det.n ; -- don't see a|no man = sehe keinen Mann
|
-- don't see a|no man = sehe keinen Mann
|
||||||
adv = cn.adv ;
|
w = case det.isDef of { True => WLight ; _ => WHeavy } ;
|
||||||
|
rc = cn.rc ! det.n ;
|
||||||
ext = cn.ext
|
ext = cn.ext
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
DetNP det = {
|
DetNP det = {
|
||||||
s = \\c => det.sp ! Neutr ! c ; -- more genders in ExtraGer -- HL: der+er,den+en ; der drei,den drei+en
|
s = \\c => det.sp ! Neutr ! c ; -- more genders in ExtraGer -- HL: der+er,den+en ; der drei,den drei+en
|
||||||
a = agrP3 det.n ;
|
a = agrP3 det.n ;
|
||||||
-- isPron = det.isDef ;
|
-- isLight = det.isDef ;
|
||||||
isPron = False ; -- HL 6/2019: don't apply pronoun switch: ich gebe ihr das vs. ich gebe es ihr
|
-- isPron = False ; -- HL 6/2019: don't apply pronoun switch: ich gebe ihr das vs. ich gebe es ihr
|
||||||
rc, adv, ext = []
|
w = case det.isDef of { True => WLight ; _ => WHeavy } ;
|
||||||
|
rc, ext = []
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
UsePN pn = {
|
UsePN pn = {
|
||||||
s = \\c => usePrepC c (\k -> pn.s ! k) ;
|
s = \\c => usePrepC c (\k -> pn.s ! k) ;
|
||||||
a = agrgP3 pn.g Sg ;
|
a = agrgP3 pn.g Sg ;
|
||||||
-- isPron = True ; --- means: this is not a heavy NP, but comes before negation
|
-- isLight = True ; -- means: this is not a heavy NP, but comes before negation
|
||||||
isPron = False ; -- HL 6/2019: to regulate Pron/NonPronNP order
|
-- isPron = False ; -- HL 6/2019: to regulate Pron/NonPronNP order
|
||||||
rc, adv, ext = []
|
w = WLight ;
|
||||||
|
rc, ext = []
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
UsePron pron = {
|
UsePron pron = {
|
||||||
s = \\c => usePrepC c (\k -> pron.s ! NPCase k) ;
|
s = \\c => usePrepC c (\k -> pron.s ! NPCase k) ;
|
||||||
a = pron.a ;
|
a = pron.a ;
|
||||||
isPron = True ;
|
-- isLight = True ;
|
||||||
rc, adv, ext = []
|
-- isPron = True ;
|
||||||
|
w = WPron ;
|
||||||
|
rc, ext = []
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
PredetNP pred np =
|
PredetNP pred np =
|
||||||
@@ -43,25 +50,32 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
let c = case pred.c.k of {NoCase => c0 ; PredCase k => k} in
|
let c = case pred.c.k of {NoCase => c0 ; PredCase k => k} in
|
||||||
pred.s ! numberAgr ag ! genderAgr np.a ! c0 ++ pred.c.p ++ np.s ! c ;
|
pred.s ! numberAgr ag ! genderAgr np.a ! c0 ++ pred.c.p ++ np.s ! c ;
|
||||||
a = ag ;
|
a = ag ;
|
||||||
isPron = False
|
-- isLight = False ;
|
||||||
|
-- isPron = False
|
||||||
|
w = WHeavy
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
PPartNP np v2 = np ** {
|
PPartNP np v2 = np ** {
|
||||||
s = \\c => np.s ! c ++ v2.s ! VPastPart APred ; --- invar part
|
s = \\c => np.s ! c ++ embedInCommas (v2.s ! VPastPart APred) ; --- invar part
|
||||||
isPron = False
|
-- isPron = False
|
||||||
|
w = WHeavy
|
||||||
} ;
|
} ;
|
||||||
{- possibly structures such as
|
{- "eine erfolgreiche Frau, geliebt von vielen," but only with v2 not possible in German?
|
||||||
"sie ist eine erfolgreiche Frau geliebt von vielen"
|
HL: PPartNP np vps|vp: "der Autor, heute vergessen" , "der Mond, gerade aufgegangen,"
|
||||||
but only with v2 not possible in German? -}
|
-}
|
||||||
|
|
||||||
AdvNP np adv = np ** {
|
AdvNP np adv = np ** {
|
||||||
adv = np.adv ++ adv.s ;
|
s = \\c => np.s ! c ++ adv.s ;
|
||||||
isPron = False
|
-- isLight = False ;
|
||||||
|
-- isPron = False
|
||||||
|
w = WHeavy
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
ExtAdvNP np adv = np ** {
|
ExtAdvNP np adv = np ** {
|
||||||
adv = np.adv ++ embedInCommas adv.s ;
|
s = \\c => np.s ! c ++ embedInCommas adv.s ;
|
||||||
isPron = False
|
-- isLight = False ;
|
||||||
|
-- isPron = False
|
||||||
|
w = WHeavy
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
DetQuantOrd quant num ord =
|
DetQuantOrd quant num ord =
|
||||||
@@ -151,19 +165,20 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
MassNP cn = {
|
MassNP cn = {
|
||||||
s = \\c => usePrepC c (\k -> cn.s ! Strong ! Sg ! k) ;
|
s = \\c => usePrepC c (\k -> cn.s ! Strong ! Sg ! k) ++ cn.adv ;
|
||||||
a = agrgP3 cn.g Sg ;
|
a = agrgP3 cn.g Sg ;
|
||||||
isPron = False ;
|
-- isLight = True ; -- ich trinke Bier nicht vs. ich trinke kein Bier
|
||||||
rc = cn.rc ! Sg ;
|
-- isPron = False ;
|
||||||
adv = cn.adv ;
|
w = WLight ;
|
||||||
ext = cn.ext
|
rc = cn.rc ! Sg ;
|
||||||
|
ext = cn.ext
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
UseN, UseN2 = \n -> {
|
UseN, UseN2 = \n -> {
|
||||||
s = \\_ => n.s ;
|
s = \\_ => n.s ;
|
||||||
g = n.g ;
|
g = n.g ;
|
||||||
rc = \\_ => [] ;
|
rc = \\_ => [] ;
|
||||||
ext,adv = []
|
ext,adv = []
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
ComplN2 f x = {
|
ComplN2 f x = {
|
||||||
@@ -182,8 +197,6 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
} ;
|
} ;
|
||||||
g = f.g ;
|
g = f.g ;
|
||||||
c2 = f.c3 ;
|
c2 = f.c3 ;
|
||||||
rc = \\_ => [] ;
|
|
||||||
ext,adv = []
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
Use2N3 f = f ;
|
Use2N3 f = f ;
|
||||||
@@ -209,7 +222,9 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
|
|
||||||
RelNP np rs = np ** {
|
RelNP np rs = np ** {
|
||||||
rc = (np.rc ++ embedInCommas (rs.s ! RGenNum (gennum (genderAgr np.a) (numberAgr np.a)))) ;
|
rc = (np.rc ++ embedInCommas (rs.s ! RGenNum (gennum (genderAgr np.a) (numberAgr np.a)))) ;
|
||||||
isPron = False } ;
|
-- isPron = False
|
||||||
|
w = case isPron np of { True => WLight ; _ => np.w }
|
||||||
|
} ;
|
||||||
|
|
||||||
SentCN cn s = cn ** {ext = cn.ext ++ embedInCommas s.s} ;
|
SentCN cn s = cn ** {ext = cn.ext ++ embedInCommas s.s} ;
|
||||||
|
|
||||||
|
|||||||
@@ -302,7 +302,7 @@ mkV2 : overload {
|
|||||||
mkV0 : V -> V0 ; --%
|
mkV0 : V -> V0 ; --%
|
||||||
mkVS : V -> VS ;
|
mkVS : V -> VS ;
|
||||||
|
|
||||||
mkV2V : overload { -- with zu
|
mkV2V : overload { -- with zu; object-control
|
||||||
mkV2V : V -> V2V ;
|
mkV2V : V -> V2V ;
|
||||||
mkV2V : V -> Prep -> V2V ;
|
mkV2V : V -> Prep -> V2V ;
|
||||||
} ;
|
} ;
|
||||||
@@ -310,6 +310,8 @@ mkV2 : overload {
|
|||||||
auxV2V : V -> V2V ;
|
auxV2V : V -> V2V ;
|
||||||
auxV2V : V -> Prep -> V2V ;
|
auxV2V : V -> Prep -> V2V ;
|
||||||
} ;
|
} ;
|
||||||
|
subjV2V : V2V -> V2V ; -- force subject-control
|
||||||
|
|
||||||
mkV2A : overload {
|
mkV2A : overload {
|
||||||
mkV2A : V -> V2A ;
|
mkV2A : V -> V2A ;
|
||||||
mkV2A : V -> Prep -> V2A ;
|
mkV2A : V -> Prep -> V2A ;
|
||||||
@@ -596,24 +598,25 @@ mkV2 : overload {
|
|||||||
auxVV v = v ** {isAux = True ; lock_VV = <>} ;
|
auxVV v = v ** {isAux = True ; lock_VV = <>} ;
|
||||||
|
|
||||||
V0 : Type = V ;
|
V0 : Type = V ;
|
||||||
-- V2S, V2V, V2Q : Type = V2 ;
|
|
||||||
AS, A2S, AV : Type = A ;
|
AS, A2S, AV : Type = A ;
|
||||||
A2V : Type = A2 ;
|
A2V : Type = A2 ;
|
||||||
|
|
||||||
mkV0 v = v ** {lock_V = <>} ;
|
mkV0 v = v ** {lock_V = <>} ;
|
||||||
|
|
||||||
mkV2V = overload {
|
mkV2V = overload { -- default: object-control
|
||||||
mkV2V : V -> V2V
|
mkV2V : V -> V2V
|
||||||
= \v -> dirV2 v ** {isAux = False ; lock_V2V = <>} ;
|
= \v -> dirV2 v ** {isAux = False ; ctrl = ObjC ; lock_V2V = <>} ;
|
||||||
mkV2V : V -> Prep -> V2V
|
mkV2V : V -> Prep -> V2V
|
||||||
= \v,p -> prepV2 v p ** {isAux = False ; lock_V2V = <>} ;
|
= \v,p -> prepV2 v p ** {isAux = False ; ctrl = ObjC ; lock_V2V = <>} ;
|
||||||
} ;
|
} ;
|
||||||
auxV2V = overload {
|
auxV2V = overload {
|
||||||
auxV2V : V -> V2V
|
auxV2V : V -> V2V
|
||||||
= \v -> dirV2 v ** {isAux = True ; lock_V2V = <>} ;
|
= \v -> dirV2 v ** {isAux = True ; ctrl = ObjC ; lock_V2V = <>} ;
|
||||||
auxV2V : V -> Prep -> V2V
|
auxV2V : V -> Prep -> V2V
|
||||||
= \v,p -> prepV2 v p ** {isAux = True ; lock_V2V = <>} ;
|
= \v,p -> prepV2 v p ** {isAux = True ; ctrl = ObjC ; lock_V2V = <>} ;
|
||||||
} ;
|
} ;
|
||||||
|
subjV2V v = v ** {ctrl = SubjC} ;
|
||||||
|
|
||||||
mkV2A = overload {
|
mkV2A = overload {
|
||||||
mkV2A : V -> V2A
|
mkV2A : V -> V2A
|
||||||
= \v -> dirV2 v ** {isAux = False ; lock_V2A = <>} ;
|
= \v -> dirV2 v ** {isAux = False ; lock_V2A = <>} ;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
--# -path=.:../abstract:../common:prelude
|
--# -path=.:../abstract:../common:../prelude:
|
||||||
|
|
||||||
--1 German auxiliary operations.
|
--1 German auxiliary operations.
|
||||||
--
|
--
|
||||||
@@ -74,7 +74,7 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
|
|
||||||
-- Predeterminers sometimes require a case ("ausser mir"), sometimes not ("nur ich").
|
-- Predeterminers sometimes require a case ("ausser mir"), sometimes not ("nur ich").
|
||||||
-- A number is sometimes inherited ("alle Menschen"),
|
-- A number is sometimes inherited ("alle Menschen"),
|
||||||
-- sometimes forced ("jeder von Mwnschen").
|
-- sometimes forced ("jeder von den Menschen").
|
||||||
|
|
||||||
param
|
param
|
||||||
PredetCase = NoCase | PredCase PCase ;
|
PredetCase = NoCase | PredCase PCase ;
|
||||||
@@ -82,6 +82,16 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
oper
|
oper
|
||||||
noCase : {p : Str ; k : PredetCase} = {p = [] ; k = NoCase} ;
|
noCase : {p : Str ; k : PredetCase} = {p = [] ; k = NoCase} ;
|
||||||
|
|
||||||
|
-- Pronominal nps are ordered differently, and light nps come before negation in clauses.
|
||||||
|
-- (To save space, reduce isPron * isLight = 4 values to the following three.) HL 9/19
|
||||||
|
param
|
||||||
|
Weight = WPron | WLight | WHeavy ;
|
||||||
|
oper
|
||||||
|
isPron : {w : Weight} -> Bool = \np ->
|
||||||
|
case np.w of {WPron => True ; _ => False} ;
|
||||||
|
isLight : {w : Weight} -> Bool = \np ->
|
||||||
|
case np.w of {WHeavy => False ; _ => True} ;
|
||||||
|
|
||||||
--2 For $Adjective$
|
--2 For $Adjective$
|
||||||
|
|
||||||
-- The predicative form of adjectives is not inflected further.
|
-- The predicative form of adjectives is not inflected further.
|
||||||
@@ -114,7 +124,11 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
|
|
||||||
param VType = VAct | VRefl Case ;
|
param VType = VAct | VRefl Case ;
|
||||||
|
|
||||||
-- The order of sentence is depends on whether it is used as a main
|
-- Implicit subject of embedded vp equals subject resp. object of matrix verb v:V2V:
|
||||||
|
|
||||||
|
param Control = SubjC | ObjC | NoC ; -- NoC : verb without infinite vp-complement
|
||||||
|
|
||||||
|
-- The order of a sentence depends on whether it is used as a main
|
||||||
-- clause, inverted, or subordinate.
|
-- clause, inverted, or subordinate.
|
||||||
|
|
||||||
param
|
param
|
||||||
@@ -239,11 +253,13 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
|
|
||||||
NP : Type = {
|
NP : Type = {
|
||||||
s : PCase => Str ;
|
s : PCase => Str ;
|
||||||
rc : Str ; -- die Frage , [rc die ich gestellt habe]
|
rc : Str ; -- die Frage , [rc die ich gestellt habe]
|
||||||
ext : Str ; -- die Frage , [sc wo sie schläft])
|
ext : Str ; -- die Frage , [sc wo sie schläft] ; die Regel , [vp kein Fleisch zu essen] | [s dass ...]
|
||||||
adv : Str ; -- die Frage [a von Max]
|
-- adv : Str ; -- die Frage [a von Max] -- HL: cannot be extracted
|
||||||
a : Agr ;
|
a : Agr ;
|
||||||
isPron : Bool } ;
|
-- isLight : Bool ; -- light NPs come before negation in simple clauses (expensive)
|
||||||
|
-- isPron : Bool } ; -- needed to put accPron before datPron
|
||||||
|
w : Weight } ;
|
||||||
|
|
||||||
mkN : (x1,_,_,_,_,x6,x7 : Str) -> Gender -> Noun =
|
mkN : (x1,_,_,_,_,x6,x7 : Str) -> Gender -> Noun =
|
||||||
\Mann, Mannen, Manne, Mannes, Maenner, Maennern, Mann_, g -> {
|
\Mann, Mannen, Manne, Mannes, Maenner, Maennern, Mann_, g -> {
|
||||||
@@ -398,7 +414,10 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
|
|
||||||
-- Prepositions for complements indicate the complement case.
|
-- Prepositions for complements indicate the complement case.
|
||||||
|
|
||||||
Preposition : Type = {s : Str ; s2 : Str ; c : PCase ; isPrep : Bool} ; -- s2 is postposition
|
Preposition : Type = {s : Str ; s2 : Str ; c : PCase ; isPrep : Bool} ;
|
||||||
|
|
||||||
|
-- HL 7/19: German has very few circumpositions: um (Gen) Willen, von (Adv) an|ab|aus
|
||||||
|
-- ? bis (Adv) hin|her. So maybe we should skip s2 (and save readings with empty preps).
|
||||||
|
|
||||||
-- To apply a preposition to a complement.
|
-- To apply a preposition to a complement.
|
||||||
|
|
||||||
@@ -409,10 +428,9 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
prep.s ++ np.s ! prep.c ++ bigNP np ++ prep.s2 ;
|
prep.s ++ np.s ! prep.c ++ bigNP np ++ prep.s2 ;
|
||||||
-- revised appPrep for discontinuous NPs
|
-- revised appPrep for discontinuous NPs
|
||||||
|
|
||||||
bigNP : NP -> Str = \np ->
|
bigNP : NP -> Str = \np -> np.ext ++ np.rc ;
|
||||||
np.adv ++ np.ext ++ np.rc ;
|
|
||||||
|
|
||||||
-- To build a preposition from just a case.
|
-- To build a preposition from just a case. -- HL 9/19: no longer used in RGL
|
||||||
|
|
||||||
noPreposition : Case -> Preposition = \c ->
|
noPreposition : Case -> Preposition = \c ->
|
||||||
{s,s2 = [] ; c = NPC c ; isPrep = False} ;
|
{s,s2 = [] ; c = NPC c ; isPrep = False} ;
|
||||||
@@ -503,27 +521,27 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
VPC : Type = {
|
VPC : Type = {
|
||||||
s : Bool => Agr => VPForm => { -- True = prefix glued to verb
|
s : Bool => Agr => VPForm => { -- True = prefix glued to verb
|
||||||
fin : Str ; -- wird
|
fin : Str ; -- wird
|
||||||
inf:Str;inf2 : Str -- lesen,[] | gelesen,haben | können,haben (= gekonnt,haben)
|
inf, inf2 : Str -- lesen,[] | gelesen,haben | können,haben (= gekonnt,haben)
|
||||||
} -- HL 11/6/2019 Fut Anter: lesen gekonnt haben => haben lesen können
|
} -- HL 11/6/2019 Fut Anter: lesen gekonnt haben => haben lesen können
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
VP : Type = {
|
VP : Type = {
|
||||||
s : Verb ; -- HL 6/2019: <refl|pron,NP,PP,AP|CN|Adv>
|
s : Verb ; -- HL 6/2019: <refl|pron,NP,PP,AP|CN|Adv,ObjInf,EmbedInfs>
|
||||||
nn : Agr => Str * Str * Str * Str ; -- <sich|ihr,deine Frau,an sie,gut>
|
nn : Agr => Str * Str * Str * Str -- <sich|ihr,deine Frau,an sie,gut,
|
||||||
a1 : Polarity => Str ; -- nicht = adV
|
* Str * Str ; -- splitInfExt: (rate) dir, dich zu bemühen mir zu helfen>
|
||||||
|
a1 : Str ; -- adv before negation, adV
|
||||||
a2 : Str ; -- heute = adv
|
a2 : Str ; -- heute = adv
|
||||||
adj : Str ; -- space for adjectival complements ("ich finde dich schön")
|
adj : Str ; -- adjectival complement ("ich finde dich schön")
|
||||||
isAux : Bool ; -- is a double infinitive
|
isAux : Bool ; -- is a double infinitive
|
||||||
inf : Str ; -- sagen
|
inf : {s:Str ; isAux:Bool ; ctrl:Control} ; -- infinitival complement of VV or V2V
|
||||||
ext : Str ; -- dass sie kommt
|
ext : Str ; -- dass sie kommt
|
||||||
infExt : Str ; -- infinitival complements of inf e.g. ich hoffe [zu gehen] zu versuchen
|
infExt : Str ; -- infinitival complements of inf
|
||||||
subjc : Preposition -- determines case of "subj"
|
-- e.g. ich hoffe [ihr zu helfen] zu versuchen
|
||||||
} ;
|
subjc : Preposition -- case of subject
|
||||||
|
} ;
|
||||||
|
|
||||||
predV : Verb -> VPSlash = predVGen False ;
|
VPSlash = VP ** {c2 : Preposition ;
|
||||||
|
objCtrl : Bool } ; -- True = embedded reflexives agree with object
|
||||||
predVc : Verb ** {c2 : Preposition} -> VPSlash = \v ->
|
|
||||||
predV v ** {c2 = v.c2} ;
|
|
||||||
|
|
||||||
useVP : VP -> VPC = \vp ->
|
useVP : VP -> VPC = \vp ->
|
||||||
let
|
let
|
||||||
@@ -578,6 +596,11 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
predV : Verb -> VPSlash = predVGen False ;
|
||||||
|
|
||||||
|
predVc : Verb ** {c2 : Preposition} -> VPSlash = \v ->
|
||||||
|
predV v ** {c2 = v.c2 ; objCtrl = False} ;
|
||||||
|
|
||||||
predVGen : Bool -> Verb -> VPSlash = \isAux, verb -> {
|
predVGen : Bool -> Verb -> VPSlash = \isAux, verb -> {
|
||||||
s = {
|
s = {
|
||||||
s = verb.s ;
|
s = verb.s ;
|
||||||
@@ -586,19 +609,18 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
aux = verb.aux ;
|
aux = verb.aux ;
|
||||||
vtype = verb.vtype
|
vtype = verb.vtype
|
||||||
} ;
|
} ;
|
||||||
|
a1,a2 : Str = [] ;
|
||||||
a1 : Polarity => Str = negation ;
|
nn : Agr => Str * Str * Str * Str * Str * Str = case verb.vtype of {
|
||||||
a2 : Str = [] ;
|
VAct => \\_ => <[],[],[],[],[],[]> ;
|
||||||
nn : Agr => Str * Str * Str * Str = case verb.vtype of {
|
VRefl c => \\a => <reflPron ! a ! c,[],[],[],[],[]>
|
||||||
VAct => \\_ => <[],[],[],[]> ;
|
|
||||||
VRefl c => \\a => <reflPron ! a ! c,[],[],[]>
|
|
||||||
} ;
|
} ;
|
||||||
isAux = isAux ; ----
|
isAux = isAux ; ----
|
||||||
inf,ext,infExt,adj : Str = [] ;
|
inf = {s=[]; isAux=True; ctrl=NoC} ; -- default infinitive complement
|
||||||
|
ext,infExt,adj : Str = [] ; -- (isAux=True => no endcomma)
|
||||||
subjc = PrepNom ;
|
subjc = PrepNom ;
|
||||||
-- Dummy values for subtyping.
|
-- Dummy values for subtyping.
|
||||||
c2 = noPreposition Nom ;
|
c2 = PrepNom ;
|
||||||
missingAdv = False
|
objCtrl = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
auxPerfect : Verb -> VForm => Str = \verb ->
|
auxPerfect : Verb -> VForm => Str = \verb ->
|
||||||
@@ -658,34 +680,59 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
Neg => "nicht"
|
Neg => "nicht"
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
VPSlash = VP ** {c2 : Preposition ; missingAdv : Bool } ;
|
|
||||||
|
|
||||||
-- IL 24/04/2018 Fixing the scope of reflexives
|
-- IL 24/04/2018 Fixing the scope of reflexives
|
||||||
objAgr : { a : Agr } -> VP -> VP = \obj,vp -> vp ** {
|
objAgr : { a : Agr } -> VP -> VP = \obj,vp -> vp ** {
|
||||||
nn = \\a => vp.nn ! obj.a } ;
|
nn = \\a => vp.nn ! obj.a } ;
|
||||||
|
-- HL: if reflexive only: <vp.nn.p1 ! np.a, vp.nn.p1 ! a, ..>
|
||||||
|
|
||||||
-- Extending a verb phrase with new constituents.
|
-- Extending a verb phrase with new constituents.
|
||||||
|
|
||||||
insertObj : (Agr => Str) -> VPSlash -> VPSlash = \obj,vp -> -- obj:Comp A|Adv|CN
|
insertObj : (Agr => Str) -> VPSlash -> VPSlash = \obj,vp -> -- obj:Comp A|Adv|CN
|
||||||
vp ** { nn = \\a => let vpnn = vp.nn ! a in <vpnn.p1, vpnn.p2, vpnn.p3, obj ! a ++ vpnn.p4> } ;
|
vp ** { nn = \\a => let vpnn = vp.nn ! a
|
||||||
|
in <vpnn.p1, vpnn.p2, vpnn.p3, obj ! a ++ vpnn.p4, vpnn.p5, vpnn.p6> } ;
|
||||||
|
|
||||||
insertObjc : (Agr => Str) -> VPSlash -> VPSlash = \obj,vp ->
|
insertObjc : (Agr => Str) -> VPSlash -> VPSlash = \obj,vp ->
|
||||||
insertObj obj vp ** {c2 = vp.c2 ; missingAdv = vp.missingAdv } ;
|
insertObj obj vp ** {c2 = vp.c2 ; objCtrl = vp.objCtrl } ;
|
||||||
|
|
||||||
insertObjNP : NP -> Preposition -> VPSlash -> VPSlash = \np,prep,vp ->
|
insertObjNP : NP -> Preposition -> VPSlash -> VPSlash = \np,prep,vp ->
|
||||||
let c = case prep.c of { NPC cc => cc ; _ => Nom } ;
|
let c = case prep.c of { NPC cc => cc ; _ => Nom } ;
|
||||||
obj : Agr => Str = \\_ => appPrepNP prep np ;
|
obj : Agr => Str = \\_ => appPrepNP prep np ;
|
||||||
in vp ** {
|
in vp ** {
|
||||||
nn = \\a => -- HL 11/6/19: rough objNP order:
|
nn = \\a => -- HL 11/6/19: rough objNP order: (p5,p6 = splitInfExt)
|
||||||
let vpnn = vp.nn ! a in -- vfin < accPron < refl < (gen|dat)Pron < nonPronNP < neg < prepNP < vinf|comp
|
let vpnn = vp.nn ! a in -- vfin < accPron < refl < (gen|dat)Pron < nonPronNP < neg < prepNP < vinf|comp
|
||||||
case <np.isPron,prep.isPrep,c> of { -- (assuming v.c2=acc) nonPron: dat < acc|gen (acc < gen not enforced)
|
{- less expensive if isLight is removed from NPs:
|
||||||
<True, False,Acc> => <obj ! a ++ vpnn.p1, vpnn.p2, vpnn.p3, vpnn.p4> ; -- <es|ihn sich, np, pp, comp>
|
case <np.isPron,prep.isPrep,c> of {
|
||||||
<True, False,_> => <vpnn.p1 ++ obj ! a, vpnn.p2, vpnn.p3, vpnn.p4> ; -- <sich ihm, np, pp, comp>
|
-- (assuming v.c2=acc) nonPron: dat < acc|gen (acc < gen not enforced)
|
||||||
<False,False,Dat> => <vpnn.p1, obj ! a ++ vpnn.p2, vpnn.p3, vpnn.p4> ; -- <prons, dat ++ np, pp, comp>
|
<True, False,Acc> => -- <es|ihn sich, np, pp, comp, _,_>
|
||||||
<False,False,_> => <vpnn.p1, vpnn.p2 ++ obj ! a, vpnn.p3, vpnn.p4> ; -- <prons, np ++ gen|acc, pp, comp>
|
<obj ! a ++ vpnn.p1, vpnn.p2, vpnn.p3, vpnn.p4, vpnn.p5, vpnn.p6> ;
|
||||||
<_, True, _> => <vpnn.p1, vpnn.p2, vpnn.p3 ++ obj ! a, vpnn.p4> -- <prons, np, mit ihr|np, compl>
|
<True, False,_ > => -- <sich ihm, np, pp, comp>
|
||||||
|
<vpnn.p1 ++ obj ! a, vpnn.p2, vpnn.p3, vpnn.p4, vpnn.p5, vpnn.p6> ;
|
||||||
|
<False,False,Dat> => -- <prons, dat ++ np, pp, comp>
|
||||||
|
<vpnn.p1, obj ! a ++ vpnn.p2, vpnn.p3, vpnn.p4, vpnn.p5, vpnn.p6> ;
|
||||||
|
<False,False,_ > => -- <prons, np ++ gen|acc, pp, comp>
|
||||||
|
<vpnn.p1, vpnn.p2 ++ obj ! a, vpnn.p3, vpnn.p4, vpnn.p5, vpnn.p6> ;
|
||||||
|
<_, True,_ > => -- <prons, np, pp++pp, compl>
|
||||||
|
<vpnn.p1, vpnn.p2, vpnn.p3 ++ obj ! a, vpnn.p4, vpnn.p5, vpnn.p6>
|
||||||
}
|
}
|
||||||
} ; -- the ordering of objects of v:V3 (and v:V4) is also determined by Slash?V3 (and Slash?V4)
|
-}
|
||||||
|
-- expensive: -- vfin < accPron < refl < (gen|dat)Pron < lightNP < neg < heavyNP|PP < vinf|comp
|
||||||
|
case <prep.isPrep, np.w, c> of {
|
||||||
|
<True, _,_> => -- <prons, light, heavy++pp, compl,_,_>
|
||||||
|
<vpnn.p1, vpnn.p2, vpnn.p3 ++ obj ! a, vpnn.p4, vpnn.p5, vpnn.p6> ;
|
||||||
|
<False,WPron, Acc> => -- <ihn ++ sich, light, heavy, comp, _,_>
|
||||||
|
<obj ! a ++ vpnn.p1, vpnn.p2, vpnn.p3, vpnn.p4, vpnn.p5, vpnn.p6> ;
|
||||||
|
<False,WPron, _ > => -- <sich ++ ihm|seiner, light, heavy, comp>
|
||||||
|
<vpnn.p1 ++ obj ! a, vpnn.p2, vpnn.p3, vpnn.p4, vpnn.p5, vpnn.p6> ;
|
||||||
|
<False,WLight,Dat> => -- (assuming v.c2=acc) nonPron: dat < acc|gen
|
||||||
|
-- <prons, dat ++ np, heavy, comp>
|
||||||
|
<vpnn.p1, obj ! a ++ vpnn.p2, vpnn.p3, vpnn.p4, vpnn.p5, vpnn.p6> ;
|
||||||
|
<False,WHeavy,Dat> => -- <prons, light, dat ++ np, comp>
|
||||||
|
<vpnn.p1, vpnn.p2, obj ! a ++ vpnn.p3, vpnn.p4, vpnn.p5, vpnn.p6> ;
|
||||||
|
<False,WLight,_ > => -- <prons, np ++ gen|acc, heavy, comp>
|
||||||
|
<vpnn.p1, vpnn.p2 ++ obj ! a, vpnn.p3, vpnn.p4, vpnn.p5, vpnn.p6> ;
|
||||||
|
<False,WHeavy,_ > => -- <prons, light, dat ++ np, comp>
|
||||||
|
<vpnn.p1, vpnn.p2, vpnn.p3 ++ obj ! a, vpnn.p4, vpnn.p5, vpnn.p6> }
|
||||||
|
} ; -- the ordering of objects of v:V3 (and v:V4) is also determined by Slash?V3 (and Slash?V4)
|
||||||
|
|
||||||
insertObjRefl : VPSlash -> VPSlash = \vp -> -- HL 6/2019, to order reflPron < neg < prep+reflPron
|
insertObjRefl : VPSlash -> VPSlash = \vp -> -- HL 6/2019, to order reflPron < neg < prep+reflPron
|
||||||
let prep = vp.c2 ;
|
let prep = vp.c2 ;
|
||||||
@@ -696,12 +743,12 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
nn = \\a =>
|
nn = \\a =>
|
||||||
let vpnn = vp.nn ! a in
|
let vpnn = vp.nn ! a in
|
||||||
case b of {
|
case b of {
|
||||||
True => <obj ! a ++ vpnn.p1, vpnn.p2, vpnn.p3, vpnn.p4> ;
|
True => <obj ! a ++ vpnn.p1, vpnn.p2, vpnn.p3, vpnn.p4, vpnn.p5, vpnn.p6> ;
|
||||||
False => <vpnn.p1, obj ! a ++ vpnn.p2, vpnn.p3, vpnn.p4> }
|
False => <vpnn.p1, obj ! a ++ vpnn.p2, vpnn.p3, vpnn.p4, vpnn.p5, vpnn.p6> }
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
insertAdV : Str -> VP -> VP = \adv,vp -> vp ** {
|
insertAdV : Str -> VP -> VP = \adv,vp -> vp ** { -- not used in RGL, so VP.a1 can be skipped
|
||||||
a1 = \\a => adv ++ vp.a1 ! a } ; -- immer nicht
|
a1 = adv ++ vp.a1 } ; -- cf. AdvVP(Slash),AdVVP(Slash)
|
||||||
|
|
||||||
insertAdv : Str -> VP -> VP = \adv,vp -> vp ** {
|
insertAdv : Str -> VP -> VP = \adv,vp -> vp ** {
|
||||||
a2 = vp.a2 ++ adv } ;
|
a2 = vp.a2 ++ adv } ;
|
||||||
@@ -712,13 +759,24 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
insertInfExt : Str -> VPSlash -> VPSlash = \infExt,vp -> vp ** {
|
insertInfExt : Str -> VPSlash -> VPSlash = \infExt,vp -> vp ** {
|
||||||
infExt = vp.infExt ++ infExt } ;
|
infExt = vp.infExt ++ infExt } ;
|
||||||
|
|
||||||
insertInf : Str -> VPSlash -> VPSlash = \inf,vp -> vp ** {
|
-- HL: to handle infExt in ComplVV and SlashVV, SlashV2V
|
||||||
inf = inf ++ vp.inf } ;
|
insertInfExtraObj : (Agr => Str) -> VPSlash -> VPSlash = \objs,vp -> vp ** {
|
||||||
|
nn = \\a => let vpnn = vp.nn ! a in
|
||||||
|
<vpnn.p1, vpnn.p2, vpnn.p3, vpnn.p4, objs ! a ++ vpnn.p5, vpnn.p6>
|
||||||
|
} ;
|
||||||
|
insertInfExtraInf : (Agr => Str) -> VPSlash -> VPSlash = \inf,vp -> vp ** {
|
||||||
|
nn = \\a => let vpnn = vp.nn ! a in
|
||||||
|
<vpnn.p1, vpnn.p2, vpnn.p3, vpnn.p4, vpnn.p5, vpnn.p6 ++ inf ! a>
|
||||||
|
} ;
|
||||||
|
|
||||||
|
insertInf : {s:Str;isAux:Bool;ctrl:Control} -> VPSlash -> VPSlash = \inf,vp -> vp ** {
|
||||||
|
inf = {s = inf.s ++ vp.inf.s ; isAux = inf.isAux ; ctrl=inf.ctrl} } ;
|
||||||
|
|
||||||
insertAdj : Str -> Str * Str -> Str -> VPSlash -> VPSlash = \adj,c,ext,vp -> vp ** {
|
insertAdj : Str -> Str * Str -> Str -> VPSlash -> VPSlash = \adj,c,ext,vp -> vp ** {
|
||||||
nn = \\a =>
|
nn = \\a =>
|
||||||
let vpnn = vp.nn ! a in <vpnn.p1, vpnn.p2 ++ c.p1, vpnn.p3, vpnn.p4> ; -- ihr? | der Frau treu
|
let vpnn = vp.nn ! a in <vpnn.p1, vpnn.p2 ++ c.p1, -- der Frau treu
|
||||||
adj = vp.adj ++ adj ++ c.p2 ; -- neugierig auf das Buch
|
vpnn.p3, vpnn.p4, vpnn.p5, vpnn.p6> ;
|
||||||
|
adj = vp.adj ++ adj ++ c.p2 ; -- neugierig auf das Buch
|
||||||
ext = vp.ext ++ ext} ;
|
ext = vp.ext ++ ext} ;
|
||||||
|
|
||||||
--------------------------------------------
|
--------------------------------------------
|
||||||
@@ -739,34 +797,56 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
_ => False
|
_ => False
|
||||||
} ;
|
} ;
|
||||||
verb = vps.s ! ord ! agr ! VPFinite m t a ;
|
verb = vps.s ! ord ! agr ! VPFinite m t a ;
|
||||||
neg = vp.a1 ! b ;
|
neg = negation ! b ;
|
||||||
obj1 = (vp.nn ! agr).p1 ++ (vp.nn ! agr).p2 ; -- refl ++ pronouns ++ nonpronouns
|
obj1 = (vp.nn ! agr).p1 ++ (vp.nn ! agr).p2 ; -- refl ++ pronouns ++ light nps
|
||||||
obj2 = (vp.nn ! agr).p3 ; -- pp-objects
|
obj2 = (vp.nn ! agr).p3 ; -- pp-objects and heavy nps
|
||||||
obj3 = (vp.nn ! agr).p4 ++ vp.adj ++ vp.a2 ; -- pred.AP|CN|Adv, via useComp HL 6/2019
|
obj3 = (vp.nn ! agr).p4 ++ vp.adj ++ vp.a2 ; -- pred.AP|CN|Adv, via useComp HL 6/2019
|
||||||
compl = obj1 ++ neg ++ obj2 ++ obj3 ;
|
compl = obj1 ++ neg ++ obj2 ++ obj3 ;
|
||||||
inf = vp.inf ++ verb.inf ++ verb.inf2 ; -- zu kommen gebeten haben
|
-- leave inf-complement of +auxV(2)V in place,
|
||||||
extra = vp.ext ; -- * kommen (gewollt|wollen) haben
|
-- extract infzu-complement of -auxV(2)V: (ComplVV, SlashV2V)
|
||||||
infE : Str = -- HL 30/6/2019
|
infExt : Str * Str = case vp.inf.isAux of
|
||||||
|
{ True => <(vp.nn!agr).p6,[]> ; _ => <[],(vp.nn!agr).p6> } ;
|
||||||
|
extra = infExt.p2 ++ vp.ext ;
|
||||||
|
infCompls = -- () tun | ihn (es tun) lassen | ihm [es zu tun] versprechen
|
||||||
|
(vp.nn ! agr).p5 ++ infExt.p1 ++ vp.inf.s ;
|
||||||
|
comma = case orB vp.isAux (case vp.inf.ctrl of { NoC => True ; _ => False }) of {
|
||||||
|
True => [] ; _ => bindComma} ;
|
||||||
|
inf : Str =
|
||||||
case <t,a,vp.isAux> of {
|
case <t,a,vp.isAux> of {
|
||||||
<Fut|Cond,Simul,True> => inf ; --# notpresent
|
<Fut|Cond,Anter,True> => --# notpresent
|
||||||
<Fut|Cond,Anter,True> -- Duden 318: kommen wollen haben => haben kommen wollen --# notpresent
|
-- haben () tun wollen |
|
||||||
=> verb.inf2 ++ vp.inf ++ verb.inf ; --# notpresent
|
-- ihn haben (es tun) lassen wollen () |
|
||||||
<_,Anter,True> => inf ; --# notpresent
|
-- ihm haben () versprechen wollen (, es zu tun)
|
||||||
_ => verb.inf ++ verb.inf2 ++ vp.inf } ;
|
(vp.nn ! agr).p5 ++ verb.inf2 ++ infExt.p1 ++ vp.inf.s ++ verb.inf ; --# notpresent
|
||||||
|
<_, Anter,True> => --# notpresent
|
||||||
|
-- tun wollen [] | ihn (es tun) lassen wollen [] |
|
||||||
|
-- ihm () versprechen wollen [] (, es zu tun)
|
||||||
|
infCompls ++ verb.inf ++ verb.inf2 ; --# notpresent
|
||||||
|
<Fut|Cond,Simul,True> => --# notpresent
|
||||||
|
infCompls ++ verb.inf ++ verb.inf2 ; --# notpresent
|
||||||
|
<Fut|Cond,Anter,False> => --# notpresent
|
||||||
|
-- gebeten haben , es zu tun () | gebeten haben , ihn (es tun) zu lassen
|
||||||
|
verb.inf ++ verb.inf2 ++ comma ++ infCompls ; --# notpresent
|
||||||
|
_ => verb.inf2 ++ verb.inf ++ comma ++ infCompls } ;
|
||||||
inffin : Str =
|
inffin : Str =
|
||||||
case <t,a,vp.isAux> of {
|
case <t,a,vp.isAux> of {
|
||||||
<Fut|Cond,Anter,True> -- ... wird|würde haben kommen wollen --# notpresent
|
<Fut|Cond,Anter,True> -- ... wird|würde haben kommen wollen --# notpresent
|
||||||
=> verb.fin ++ verb.inf2 ++ vp.inf ++ verb.inf ; --# notpresent
|
=> (vp.nn ! agr).p5 ++ verb.fin --# notpresent
|
||||||
<_,Anter,True> --# notpresent
|
++ verb.inf2 ++ infExt.p1 ++ vp.inf.s ++ verb.inf ; --# notpresent
|
||||||
=> verb.fin ++ inf ; -- double inf --# notpresent
|
<Pres|Past,Anter,True> --# notpresent
|
||||||
_ => inf ++ verb.fin --- or just auxiliary vp
|
=> (vp.nn ! agr).p5 ++ infExt.p1 ++ verb.fin --# notpresent
|
||||||
|
++ vp.inf.s ++ verb.inf ++ verb.inf2 ; -- double inf --# notpresent
|
||||||
|
<_, _ ,True>
|
||||||
|
=> infCompls ++ verb.inf ++ verb.inf2 ++ verb.fin ; -- or just auxiliary vp
|
||||||
|
<_, _ ,False>
|
||||||
|
=> verb.inf ++ verb.inf2 ++ verb.fin ++ comma ++ infCompls
|
||||||
} ;
|
} ;
|
||||||
in
|
in
|
||||||
case o of {
|
case o of {
|
||||||
Main => subj ++ verb.fin ++ compl ++ vp.infExt ++ infE ++ extra ;
|
Main => subj ++ verb.fin ++ compl ++ inf ++ extra ;
|
||||||
Inv => verb.fin ++ subj ++ compl ++ vp.infExt ++ infE ++ extra ;
|
Inv => verb.fin ++ subj ++ compl ++ inf ++ extra ;
|
||||||
Sub => subj ++ compl ++ vp.infExt ++ inffin ++ extra
|
Sub => subj ++ compl ++ inffin ++ extra
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
{-
|
{-
|
||||||
@@ -786,11 +866,12 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
es wird nicht besser
|
es wird nicht besser
|
||||||
-}
|
-}
|
||||||
|
|
||||||
infVP : Bool -> VP -> ((Agr => Str) * Str * Str * Str) = \isAux, vp -> let vps = useVP vp in
|
infVP : Bool -> VP -> ((Agr => Str) * Str * Str * Str) =
|
||||||
|
\isAux, vp -> let vps = useVP vp in
|
||||||
<
|
<
|
||||||
\\agr => (vp.nn ! agr).p1 ++ (vp.nn ! agr).p2 ++ (vp.nn ! agr).p3 ++ (vp.nn ! agr).p4 ++ vp.a2,
|
\\agr => (vp.nn ! agr).p1 ++ (vp.nn ! agr).p2 ++ (vp.nn ! agr).p3 ++ (vp.nn ! agr).p4 ++ vp.a2,
|
||||||
vp.a1 ! Pos ++ vp.adj ++ (vps.s ! (notB isAux) ! agrP3 Sg ! VPInfinit Simul).inf,
|
vp.a1 ++ vp.adj ++ (vps.s ! (notB isAux) ! agrP3 Sg ! VPInfinit Simul).inf, -- vp.a1 ! Pos
|
||||||
vp.inf,
|
vp.inf.s,
|
||||||
vp.infExt ++ vp.ext
|
vp.infExt ++ vp.ext
|
||||||
> ;
|
> ;
|
||||||
|
|
||||||
@@ -798,6 +879,17 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
let vpi = infVP isAux vp in
|
let vpi = infVP isAux vp in
|
||||||
vpi.p1 ! agrP3 Sg ++ vpi.p3 ++ vpi.p2 ++ vpi.p4 ;
|
vpi.p1 ! agrP3 Sg ++ vpi.p3 ++ vpi.p2 ++ vpi.p4 ;
|
||||||
|
|
||||||
|
infzuVP : Bool -> Control -> Anteriority -> Polarity -> VP -- HL
|
||||||
|
-> { objs:(Agr => Str) ; pred:{s:Str;isAux:Bool;ctrl:Control} ; inf:Str ; ext:Str } =
|
||||||
|
\isAux, ctrl, ant, pol, vp -> let vps = useVP vp in
|
||||||
|
{ objs = \\agr => (vp.nn ! agr).p1 ++ (vp.nn ! agr).p2 ++ negation ! pol ++ (vp.nn ! agr).p3
|
||||||
|
++ vp.a2 ++ (vp.nn ! agr).p4 ; -- objects + predicative A|CN|NP
|
||||||
|
pred = { s = vp.a1 ++ vp.adj ++ (vps.s ! (notB isAux) ! agrP3 Sg ! VPInfinit ant).inf ;
|
||||||
|
isAux = vp.isAux ; ctrl = ctrl } ;
|
||||||
|
inf = vp.inf.s ;
|
||||||
|
ext = vp.ext
|
||||||
|
} ;
|
||||||
|
|
||||||
-- The nominative case is not used as reflexive, but defined here
|
-- The nominative case is not used as reflexive, but defined here
|
||||||
-- so that we can reuse this in personal pronouns.
|
-- so that we can reuse this in personal pronouns.
|
||||||
-- The missing Sg "ihrer" shows that a dependence on gender would
|
-- The missing Sg "ihrer" shows that a dependence on gender would
|
||||||
@@ -855,8 +947,8 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
infPart : Bool -> Str = \b -> if_then_Str b [] "zu" ;
|
infPart : Bool -> Str = \b -> if_then_Str b [] "zu" ;
|
||||||
|
|
||||||
heavyNP :
|
heavyNP :
|
||||||
{s : PCase => Str ; a : Agr} -> {s : PCase => Str ; a : Agr ; isPron : Bool ; adv,ext,rc : Str} = \np ->
|
{s : PCase => Str ; a : Agr} -> {s : PCase => Str ; a : Agr ; w : Weight ; ext,rc : Str} = \np ->
|
||||||
np ** {isPron = False; adv,ext,rc = []} ; -- this could be wrong
|
np ** {w = WHeavy ; ext,rc = []} ; -- this could be wrong
|
||||||
|
|
||||||
relPron : RelGenNum => Case => Str = \\rgn,c =>
|
relPron : RelGenNum => Case => Str = \\rgn,c =>
|
||||||
case rgn of {
|
case rgn of {
|
||||||
@@ -872,14 +964,12 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- Function that allows the construction of non-nominative subjects.
|
-- Function that allows the construction of non-nominative subjects.
|
||||||
mkSubj : NP -> Preposition -> Str * Agr = \np, subjc ->
|
mkSubj : NP -> Preposition -> Str * Agr = \np, subjc ->
|
||||||
let
|
let
|
||||||
sub = subjc ;
|
sub = subjc ;
|
||||||
agr = case sub.c of {
|
agr = case sub.c of { NPC Nom => np.a ; _ => Ag Masc Sg P3 } ;
|
||||||
NPC Nom => np.a ;
|
subj = appPrepNP sub np
|
||||||
_ => Ag Masc Sg P3 } ;
|
in <subj , agr> ;
|
||||||
subj = appPrepNP sub np
|
|
||||||
in <subj , agr> ;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,10 +26,11 @@ concrete SentenceGer of Sentence = CatGer ** open ResGer, Prelude in {
|
|||||||
} ;
|
} ;
|
||||||
agr = Ag Fem (numImp n) ps.p1 ; --- g does not matter
|
agr = Ag Fem (numImp n) ps.p1 ; --- g does not matter
|
||||||
verb = vps.s ! False ! agr ! VPImperat ps.p3 ;
|
verb = vps.s ! False ! agr ! VPImperat ps.p3 ;
|
||||||
inf = vp.inf ++ verb.inf ; -- HL .nn
|
inf = vp.inf.s ++ verb.inf ; -- HL .nn
|
||||||
obj = (vp.nn ! agr).p2 ++ (vp.nn ! agr).p3 ++ (vp.nn ! agr).p4
|
obj = (vp.nn ! agr).p2 ++ (vp.nn ! agr).p3 ++ (vp.nn ! agr).p4
|
||||||
in
|
in
|
||||||
verb.fin ++ ps.p2 ++ (vp.nn ! agr).p1 ++ vp.a1 ! pol ++ obj ++ vp.a2 ++ inf ++ vp.ext
|
-- verb.fin ++ ps.p2 ++ (vp.nn ! agr).p1 ++ vp.a1 ! pol ++ obj ++ vp.a2 ++ inf ++ vp.ext
|
||||||
|
verb.fin ++ ps.p2 ++ (vp.nn ! agr).p1 ++ vp.a1 ++ negation ! pol ++ obj ++ vp.a2 ++ inf ++ vp.ext
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
SlashVP np vp =
|
SlashVP np vp =
|
||||||
@@ -49,7 +50,7 @@ concrete SentenceGer of Sentence = CatGer ** open ResGer, Prelude in {
|
|||||||
(insertExtrapos (conjThat ++ slash.s ! Sub) (predV vs)) **
|
(insertExtrapos (conjThat ++ slash.s ! Sub) (predV vs)) **
|
||||||
{c2 = slash.c2} ;
|
{c2 = slash.c2} ;
|
||||||
|
|
||||||
EmbedS s = {s = conjThat ++ s.s ! Sub} ;
|
EmbedS s = {s = conjThat ++ s.s ! Sub} ; -- no leading comma, if sentence-initial
|
||||||
EmbedQS qs = {s = qs.s ! QIndir} ;
|
EmbedQS qs = {s = qs.s ! QIndir} ;
|
||||||
EmbedVP vp = {s = useInfVP False vp} ;
|
EmbedVP vp = {s = useInfVP False vp} ;
|
||||||
|
|
||||||
|
|||||||
@@ -11,21 +11,27 @@ lin
|
|||||||
CNIntNP cn i = {
|
CNIntNP cn i = {
|
||||||
s = \\c => cn.s ! Weak ! Sg ! Nom ++ i.s ;
|
s = \\c => cn.s ! Weak ! Sg ! Nom ++ i.s ;
|
||||||
a = agrP3 Sg ;
|
a = agrP3 Sg ;
|
||||||
isPron = False ;
|
-- isPron = False ;
|
||||||
ext,rc,adv = [] -- added
|
-- isLight = True ;
|
||||||
|
w = WLight ;
|
||||||
|
ext,rc = [] -- added
|
||||||
} ;
|
} ;
|
||||||
CNSymbNP det cn xs = let g = cn.g in {
|
CNSymbNP det cn xs = let g = cn.g in {
|
||||||
s = \\c => det.s ! g ! c ++
|
s = \\c => det.s ! g ! c ++
|
||||||
(let k = (prepC c).c in cn.s ! adjfCase det.a k ! det.n ! k) ++ xs.s ;
|
(let k = (prepC c).c in cn.s ! adjfCase det.a k ! det.n ! k) ++ xs.s ;
|
||||||
a = agrP3 det.n ;
|
a = agrP3 det.n ;
|
||||||
isPron = False ;
|
-- isPron = False ;
|
||||||
ext,rc,adv = [] -- added
|
-- isLight = True ;
|
||||||
|
w = WLight ;
|
||||||
|
ext,rc = [] -- added
|
||||||
} ;
|
} ;
|
||||||
CNNumNP cn i = {
|
CNNumNP cn i = {
|
||||||
s = \\c => artDefContr (GSg cn.g) c ++ cn.s ! Weak ! Sg ! Nom ++ i.s ! Neutr ! (prepC c).c ;
|
s = \\c => artDefContr (GSg cn.g) c ++ cn.s ! Weak ! Sg ! Nom ++ i.s ! Neutr ! (prepC c).c ;
|
||||||
a = agrP3 Sg ;
|
a = agrP3 Sg ;
|
||||||
isPron = False ;
|
-- isPron = False ;
|
||||||
ext,rc,adv = [] -- added
|
-- isLight = True ;
|
||||||
|
w = WLight ;
|
||||||
|
ext,rc = [] -- added
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
SymbS sy = {s = \\_ => sy.s} ;
|
SymbS sy = {s = \\_ => sy.s} ;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ concrete VerbGer of Verb = CatGer ** open Prelude, ResGer, Coordination in {
|
|||||||
|
|
||||||
lin
|
lin
|
||||||
UseV = predV ;
|
UseV = predV ;
|
||||||
|
{-
|
||||||
ComplVV v vp =
|
ComplVV v vp =
|
||||||
let
|
let
|
||||||
vpi = infVP v.isAux vp ;
|
vpi = infVP v.isAux vp ;
|
||||||
@@ -14,6 +14,32 @@ concrete VerbGer of Verb = CatGer ** open Prelude, ResGer, Coordination in {
|
|||||||
insertInfExt vpi.p3 (
|
insertInfExt vpi.p3 (
|
||||||
insertInf vpi.p2 (
|
insertInf vpi.p2 (
|
||||||
insertObjc vpi.p1 vps))) ;
|
insertObjc vpi.p1 vps))) ;
|
||||||
|
-}
|
||||||
|
-- HL 7/19
|
||||||
|
ComplVV v vp = -- will|wage (es ([]|zu) tun [] | ihn [es tun] ([]|zu) lassen
|
||||||
|
let
|
||||||
|
vps = predVGen v.isAux v ;
|
||||||
|
vpi = infzuVP v.isAux SubjC Simul Pos vp ;
|
||||||
|
-- { objs: ihm ; pred: []/zu versprechen, objInf: sich/es zu tun }
|
||||||
|
-- (ich) vfin:werde (ihm ([]/zu) versprechen) vinf:(wollen/gewagt haben) (, es zu tun)
|
||||||
|
-- (ich) vfin:werde (ihn (es tun) lassen)/[] vinf:(wollen/gewagt haben) []/(, ihn (es tun) zu lassen)
|
||||||
|
extInfzu = case <vp.isAux,vp.inf.isAux> of {<True,False> => (vp.nn!(Ag Masc Sg P3)).p6 ; _ => []} ;
|
||||||
|
comma = case vp.inf.ctrl of { NoC => [] ; _ => bindComma} ; -- es (zu) tun
|
||||||
|
embeddedInf : Agr => Str =
|
||||||
|
case <vp.isAux,vp.inf.isAux> of { -- vv + vp + [embeddedInf]
|
||||||
|
-- will [es lesen] können | will ihn [es lesen] lassen
|
||||||
|
<True,True> => \\agr => (vp.nn!agr).p5 ++ (vp.nn!agr).p6 ++ vpi.inf ;
|
||||||
|
-- will ihn [euch (extInfzu) bitten] lassen
|
||||||
|
<True,False> => \\agr => (vp.nn!agr).p5 ++ vpi.inf ; -- ++ (vp.nn!agr).p6 => extInfzu
|
||||||
|
-- will es lesen [] | will ihn bitten [, es zu lesen] | will ihn bitten [, sie es lesen zu lassen]
|
||||||
|
<False,True> => \\agr => comma ++ (vp.nn!agr).p5 ++ (vp.nn!agr).p6 ++ vpi.inf ;
|
||||||
|
-- will ihn bitten [, ihr zu helfen, es zu lesen]
|
||||||
|
<False,False> => \\agr => comma ++ (vp.nn!agr).p5 ++ vpi.inf ++ (vp.nn!agr).p6 }
|
||||||
|
in
|
||||||
|
insertExtrapos (extInfzu ++ vpi.ext) ( -- vps.ext <- vp's extracted embedded infzu + vp's object-sentence
|
||||||
|
insertInf vpi.pred ( -- vps.inf <- vp's infinite main verb
|
||||||
|
insertInfExtraObj vpi.objs ( -- vps.nn.p5 <- vp's object nps
|
||||||
|
insertInfExtraInf embeddedInf vps))) ;
|
||||||
|
|
||||||
ComplVS v s =
|
ComplVS v s =
|
||||||
insertExtrapos (comma ++ conjThat ++ s.s ! Sub) (predV v) ;
|
insertExtrapos (comma ++ conjThat ++ s.s ! Sub) (predV v) ;
|
||||||
@@ -21,52 +47,90 @@ concrete VerbGer of Verb = CatGer ** open Prelude, ResGer, Coordination in {
|
|||||||
insertExtrapos (comma ++ q.s ! QIndir) (predV v) ;
|
insertExtrapos (comma ++ q.s ! QIndir) (predV v) ;
|
||||||
ComplVA v ap = insertAdj (v.c2.s ++ ap.s ! APred) ap.c ap.ext (predV v) ; -- changed
|
ComplVA v ap = insertAdj (v.c2.s ++ ap.s ! APred) ap.c ap.ext (predV v) ; -- changed
|
||||||
|
|
||||||
SlashV2a v = (predVc v) ** {missingAdv = True} ; -- HL 12/6/2019 for reflexive verbs with objects, rV2:V2, rV3:V3
|
SlashV2a v = (predVc v) ;
|
||||||
|
|
||||||
Slash2V3 v np = insertObjNP np v.c2 (predV v) ** {c2 = v.c3 ; missingAdv = True} ;
|
Slash2V3 v np = insertObjNP np v.c2 (predVc v) ** {c2 = v.c3} ;
|
||||||
Slash3V3 v np = insertObjNP np v.c3 (predV v) ** {c2 = v.c2 ; missingAdv = True} ;
|
Slash3V3 v np = insertObjNP np v.c3 (predVc v) ;
|
||||||
|
|
||||||
SlashV2S v s =
|
SlashV2S v s =
|
||||||
insertExtrapos (conjThat ++ s.s ! Sub) (predVc v) ;
|
insertExtrapos (comma ++ conjThat ++ s.s ! Sub) (predVc v) ;
|
||||||
SlashV2Q v q =
|
SlashV2Q v q =
|
||||||
insertExtrapos (q.s ! QIndir) (predVc v) ;
|
insertExtrapos (comma ++ q.s ! QIndir) (predVc v) ;
|
||||||
|
{-
|
||||||
SlashV2V v vp =
|
SlashV2V v vp =
|
||||||
let
|
let
|
||||||
vpi = infVP v.isAux vp ;
|
vpi = infVP v.isAux vp ;
|
||||||
vps = predVGen v.isAux v ** {c2 = v.c2} ;
|
vps = predVGen v.isAux v ** {c2 = v.c2} ;
|
||||||
in vps **
|
in vps **
|
||||||
insertExtrapos vpi.p3 (
|
insertExtrapos vpi.p4 ( -- inplace vp; better extract it!
|
||||||
insertInf vpi.p2 (
|
insertInfExt vpi.p3 (
|
||||||
insertObj vpi.p1 vps)) ;
|
insertInf vpi.p2 (
|
||||||
|
insertObjc vpi.p1 vps))) ;
|
||||||
|
-}
|
||||||
|
SlashV2V v vp = -- jmdn bitten, (\agr => sich!agr das Buch zu merken) HL 7/19
|
||||||
|
let
|
||||||
|
vps = (predVGen v.isAux v) ** { c2 = v.c2 ; objCtrl = case v.ctrl of {ObjC => True ; _ => False}} ;
|
||||||
|
vpi = infzuVP v.isAux v.ctrl Simul Pos vp ;
|
||||||
|
comma : Str = case <vp.isAux,vp.inf.ctrl> of { <True,_> | <_,NoC> => [] ; _ => bindComma} ;
|
||||||
|
embeddedInf : Agr => Str = case vp.inf.isAux of {
|
||||||
|
True => \\agr => comma ++ (vp.nn!agr).p5 ++ (vp.nn!agr).p6 ++ vpi.inf ; -- ihn es lesen (zu) lassen
|
||||||
|
False => \\agr => comma ++ (vp.nn!agr).p5 ++ vpi.inf ++ (vp.nn!agr).p6 } -- ihn (zu) bitten , es zu lesen
|
||||||
|
in
|
||||||
|
insertExtrapos vpi.ext ( -- vps.ext <- vp's object-sentence ++ extractedInfzu?
|
||||||
|
insertInf vpi.pred ( -- vps.inf <- vp's infinite main verb
|
||||||
|
insertInfExtraObj vpi.objs ( -- vps.nn.p5 <- vp's object nps
|
||||||
|
insertInfExtraInf embeddedInf vps))) ;
|
||||||
|
|
||||||
SlashV2A v ap =
|
SlashV2A v ap =
|
||||||
insertAdj (ap.s ! APred) ap.c ap.ext (predVc v) ;
|
insertAdj (ap.s ! APred) ap.c ap.ext (predVc v) ;
|
||||||
|
|
||||||
ComplSlash vps np =
|
ComplSlash vps np =
|
||||||
let vp = insertObjNP np vps.c2 vps ;
|
let vp = insertObjNP np vps.c2 vps ;
|
||||||
in case vp.missingAdv of {
|
-- IL 24/04/2018 force reflexive in the VPSlash to take the agreement of np.
|
||||||
True => vp ;
|
in case vps.objCtrl of { True => objAgr np vp ; _ => vp } ;
|
||||||
False => objAgr np vp } ; -- IL 24/04/2018 force reflexive in the VPSlash to take the agreement of the object introduced by ComplSlash.
|
{-
|
||||||
|
|
||||||
SlashVV v vp =
|
SlashVV v vp =
|
||||||
let
|
let
|
||||||
vpi = infVP v.isAux vp ;
|
vpi = infVP v.isAux vp ;
|
||||||
vps = predVGen v.isAux v ** {c2 = vp.c2} ;
|
vps = predVGen v.isAux v ** {c2 = vp.c2 } ;
|
||||||
in vps **
|
in vps **
|
||||||
insertExtrapos vpi.p3 (
|
insertExtrapos vpi.p3 (
|
||||||
insertInf vpi.p2 (
|
insertInf {s=vpi.p2;isAux=vp.isAux;ctrl=SubjC} ( -- insertInf vpi.p2 (
|
||||||
insertObj vpi.p1 vps)) ;
|
insertObj vpi.p1 vps)) ;
|
||||||
|
-}
|
||||||
|
SlashVV v vp = -- will|hoffe ((zu) lesen | ihr (zu) geben | (zu) bitten, es zu lesen)
|
||||||
|
let
|
||||||
|
vps = (predVGen v.isAux v) ** { c2 = vp.c2 } ;
|
||||||
|
vpi = infzuVP v.isAux SubjC Simul Pos vp ; -- (zu) (lesen | ihr geben | bitten, es zu lesen)
|
||||||
|
comma : Str = case <vp.isAux,vp.inf.ctrl> of { <True,_> | <_,NoC> => [] ; _ => bindComma} ;
|
||||||
|
embeddedInf : Agr => Str = case vp.inf.isAux of {
|
||||||
|
True => \\agr => comma ++ (vp.nn!agr).p5 ++ (vp.nn!agr).p6 ++ vpi.inf ; -- es lesen (zu) lassen
|
||||||
|
False => \\agr => comma ++ (vp.nn!agr).p5 ++ vpi.inf ++ (vp.nn!agr).p6 } -- (zu) bitten, es zu lesen
|
||||||
|
in
|
||||||
|
insertExtrapos vpi.ext ( -- vps.ext <- vp's object-sentence ++ extractedInfzu?
|
||||||
|
insertInf vpi.pred ( -- vps.inf <- vp's infinite main verb
|
||||||
|
insertInfExtraObj vpi.objs ( -- vps.nn.p5 <- vp's object nps
|
||||||
|
insertInfExtraInf embeddedInf vps))) ;
|
||||||
|
|
||||||
|
-- {- HL 8/19: this slightly modified SlashV2VNP is expensive even with NP.w:Weight
|
||||||
|
|
||||||
|
-- order of embedded objects wrong:
|
||||||
|
-- Lang> p "the woman that you beg me to listen to" | l
|
||||||
|
-- the woman that you beg me to listen to
|
||||||
|
-- die Frau , der ihr mich zuzuhören bittet
|
||||||
|
-- better: die Frau , der zuzuhören ihr mich bittet
|
||||||
|
|
||||||
SlashV2VNP v np vp =
|
SlashV2VNP v np vp =
|
||||||
let
|
let
|
||||||
vpi = infVP v.isAux vp ;
|
vpi = infVP v.isAux vp ;
|
||||||
vps = predVGen v.isAux v ** {c2 = v.c2} ;
|
vps = predVGen v.isAux v ** {c2 = vp.c2} ; -- objCtrl = ?
|
||||||
in vps **
|
in vps **
|
||||||
insertExtrapos vpi.p3 (
|
insertExtrapos vpi.p3 (
|
||||||
insertInf vpi.p2 (
|
insertInf {s=vpi.p2;isAux=v.isAux;ctrl=v.ctrl} ( -- insertInf vpi.p2
|
||||||
insertObj vpi.p1 (
|
insertObj vpi.p1 (
|
||||||
insertObj (\\_ => appPrepNP v.c2 np) vps))) ;
|
insertObj (\\_ => appPrepNP v.c2 np) vps))) ;
|
||||||
-- insertObjNP v.c2 np vps))) ;
|
|
||||||
|
-- HL: version with infzuVP in tests/german/TestLangGer.gf, too expensive
|
||||||
|
|
||||||
UseComp comp =
|
UseComp comp =
|
||||||
insertExtrapos comp.ext (insertObj comp.s (predV sein_V)) ; -- agr not used
|
insertExtrapos comp.ext (insertObj comp.s (predV sein_V)) ; -- agr not used
|
||||||
@@ -76,7 +140,7 @@ concrete VerbGer of Verb = CatGer ** open Prelude, ResGer, Coordination in {
|
|||||||
UseCopula = predV sein_V ;
|
UseCopula = predV sein_V ;
|
||||||
|
|
||||||
CompAP ap = {s = \\_ => ap.c.p1 ++ ap.s ! APred ++ ap.c.p2 ; ext = ap.ext} ;
|
CompAP ap = {s = \\_ => ap.c.p1 ++ ap.s ! APred ++ ap.c.p2 ; ext = ap.ext} ;
|
||||||
CompNP np = {s = \\_ => np.s ! NPC Nom ++ np.adv ++ np.rc ; ext = np.ext} ;
|
CompNP np = {s = \\_ => np.s ! NPC Nom ++ np.rc ; ext = np.ext} ;
|
||||||
CompAdv a = {s = \\_ => a.s ; ext = []} ;
|
CompAdv a = {s = \\_ => a.s ; ext = []} ;
|
||||||
|
|
||||||
CompCN cn = {s = \\a => case numberAgr a of {
|
CompCN cn = {s = \\a => case numberAgr a of {
|
||||||
@@ -112,14 +176,16 @@ concrete VerbGer of Verb = CatGer ** open Prelude, ResGer, Coordination in {
|
|||||||
|
|
||||||
from "we live (in the city : Adv) : Cl"
|
from "we live (in the city : Adv) : Cl"
|
||||||
|
|
||||||
But in German we cannot move the NP part of an Adv, we only have the
|
In German we cannot move the NP part of an Adv, we only have the
|
||||||
full relative clauses like
|
full relative clauses like
|
||||||
|
|
||||||
die Stadt, in der wir leben,
|
die Stadt, in der wir leben,
|
||||||
die Stadt, worin wir leben, --contracted Prep+Rel
|
die Stadt, worin wir leben, --contracted Prep+Rel
|
||||||
|
|
||||||
but nothing like "die Stadt wir leben in".
|
But: VPSlashPrep is used to parse "sie ist mit mir verheiratet",
|
||||||
|
(ist verheiratet:VP mit:Prep):VPSlash,
|
||||||
|
ComplA2 is used to parse "sie ist verheiratet mit mir"
|
||||||
-}
|
-}
|
||||||
VPSlashPrep vp prep = vp ** {c2 = prep ; missingAdv = True} ;
|
VPSlashPrep vp prep = vp ** {c2 = prep ; objCtrl = False} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,12 +8,12 @@ concrete AdjectiveLat of Adjective = CatLat ** open ResLat, Prelude in {
|
|||||||
|
|
||||||
-- ComparA : A -> NP -> AP ; -- warmer than I
|
-- ComparA : A -> NP -> AP ; -- warmer than I
|
||||||
ComparA a np = {
|
ComparA a np = {
|
||||||
s = \\ag => a.s ! Compar ! ag ++ "quam" ++ (combineNounPhrase np) ! PronNonDrop ! Nom ;
|
s = \\ag => a.s ! Compar ! ag ++ "quam" ++ (combineNounPhrase np) ! PronNonDrop ! APostN ! DPreN ! Nom ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- ComplA2 : A2 -> NP -> AP ; -- married to her
|
-- ComplA2 : A2 -> NP -> AP ; -- married to her
|
||||||
ComplA2 a np = {
|
ComplA2 a np = {
|
||||||
s = \\ag => a.s ! Posit ! ag ++ a.c.s ++ (combineNounPhrase np) ! PronNonDrop ! a.c.c ;
|
s = \\ag => a.s ! Posit ! ag ++ a.c.s ++ (combineNounPhrase np) ! PronNonDrop ! APostN ! DPreN ! a.c.c ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- ReflA2 : A2 -> AP -- married to myself
|
-- ReflA2 : A2 -> AP -- married to myself
|
||||||
@@ -31,7 +31,7 @@ concrete AdjectiveLat of Adjective = CatLat ** open ResLat, Prelude in {
|
|||||||
|
|
||||||
-- CAdvAP : CAdv -> AP -> NP -> AP ; -- as cool as John
|
-- CAdvAP : CAdv -> AP -> NP -> AP ; -- as cool as John
|
||||||
CAdvAP cadv ap np =
|
CAdvAP cadv ap np =
|
||||||
{ s = \\ag => cadv.s ++ ap.s ! ag ++ cadv.p ++ (combineNounPhrase np) ! PronNonDrop ! Nom } ;
|
{ s = \\ag => cadv.s ++ ap.s ! ag ++ cadv.p ++ (combineNounPhrase np) ! PronNonDrop ! APostN ! DPreN ! Nom } ;
|
||||||
|
|
||||||
-- The superlative use is covered in $Ord$.
|
-- The superlative use is covered in $Ord$.
|
||||||
|
|
||||||
|
|||||||
@@ -8,16 +8,16 @@ concrete AdverbLat of Adverb = CatLat ** open ResLat, Prelude, ParadigmsLat in
|
|||||||
|
|
||||||
-- PrepNP : Prep -> NP -> Adv ; -- in the house
|
-- PrepNP : Prep -> NP -> Adv ; -- in the house
|
||||||
PrepNP prep np =
|
PrepNP prep np =
|
||||||
mkAdv (prep.s ++ np.adv ++ (combineNounPhrase np) ! PronNonDrop ! prep.c ) ;
|
mkAdv (prep.s ++ (combineNounPhrase np) ! PronNonDrop ! APostN ! DPreN ! prep.c ) ;
|
||||||
|
|
||||||
|
|
||||||
-- ComparAdvAdj : CAdv -> A -> NP -> Adv ; -- more warmly than John
|
-- ComparAdvAdj : CAdv -> A -> NP -> Adv ; -- more warmly than John
|
||||||
ComparAdvAdj cadv a np =
|
ComparAdvAdj cadv a np =
|
||||||
mkAdv (cadv.s ++ a.adv.s ! Compar ++ cadv.p ++ (combineNounPhrase np) ! PronNonDrop ! Nom) ;
|
mkAdv (cadv.s ++ a.adv.s ! Compar ++ cadv.p ++ (combineNounPhrase np) ! PronNonDrop ! APostN ! DPreN ! Nom) ;
|
||||||
|
|
||||||
-- ComparAdvAdjS : CAdv -> A -> S -> Adv ; -- more warmly than he runs
|
-- ComparAdvAdjS : CAdv -> A -> S -> Adv ; -- more warmly than he runs
|
||||||
ComparAdvAdjS cadv a s =
|
ComparAdvAdjS cadv a s =
|
||||||
mkAdv (cadv.s ++ a.adv.s ! Compar ++ cadv.p ++ combineSentence s ! SPreS ! PreV ! CPreV ! SOV ) ;
|
mkAdv (cadv.s ++ a.adv.s ! Compar ++ cadv.p ++ defaultSentence s ! SOV ) ;
|
||||||
|
|
||||||
-- AdAdv : AdA -> Adv -> Adv ; -- very quickly
|
-- AdAdv : AdA -> Adv -> Adv ; -- very quickly
|
||||||
AdAdv ada adv = mkAdv (ada.s ++ (adv.s ! Posit) ) ;
|
AdAdv ada adv = mkAdv (ada.s ++ (adv.s ! Posit) ) ;
|
||||||
@@ -29,7 +29,7 @@ concrete AdverbLat of Adverb = CatLat ** open ResLat, Prelude, ParadigmsLat in
|
|||||||
-- Subordinate clauses can function as adverbs.
|
-- Subordinate clauses can function as adverbs.
|
||||||
|
|
||||||
-- SubjS : Subj -> S -> Adv ; -- when she sleeps
|
-- SubjS : Subj -> S -> Adv ; -- when she sleeps
|
||||||
SubjS subj s = mkAdv (subj.s ++ combineSentence s ! SPreS ! PreV ! CPreV ! SOV ) ;
|
SubjS subj s = mkAdv (subj.s ++ defaultSentence s ! SOV ) ;
|
||||||
|
|
||||||
-- AdnCAdv : CAdv -> AdN ; -- less (than five)
|
-- AdnCAdv : CAdv -> AdN ; -- less (than five)
|
||||||
AdnCAdv cadv = {s = cadv.s ++ cadv.p} ;
|
AdnCAdv cadv = {s = cadv.s ++ cadv.p} ;
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ concrete CatLat of Cat = CommonX-[Adv] ** open ResLat, ParamX, Prelude in {
|
|||||||
--
|
--
|
||||||
S = Sentence ;
|
S = Sentence ;
|
||||||
QS = {s : QForm => Str} ;
|
QS = {s : QForm => Str} ;
|
||||||
|
RS = { s : Gender => Number => Str } ; -- Sentence ;
|
||||||
-- RS = {s : Agr => Str ; c : Case} ; -- c for it clefts
|
-- RS = {s : Agr => Str ; c : Case} ; -- c for it clefts
|
||||||
-- SSlash = {s : Str ; c2 : Str} ;
|
-- SSlash = {s : Str ; c2 : Str} ;
|
||||||
--
|
--
|
||||||
@@ -28,11 +29,11 @@ concrete CatLat of Cat = CommonX-[Adv] ** open ResLat, ParamX, Prelude in {
|
|||||||
--
|
--
|
||||||
---- Relative
|
---- Relative
|
||||||
--
|
--
|
||||||
-- RCl = {
|
RCl = { s : Gender => Number => Clause };
|
||||||
-- s : ResLat.Tense => Anteriority => CPolarity => Agr => Str ;
|
-- s : ResLat.Tense => Anteriority => CPolarity => Agr => Str ;
|
||||||
-- c : Case
|
-- c : Case
|
||||||
-- } ;
|
-- } ;
|
||||||
-- RP = {s : RCase => Str ; a : RAgr} ;
|
RP = {s : Agr => Str } ;
|
||||||
--
|
--
|
||||||
---- Verb
|
---- Verb
|
||||||
--
|
--
|
||||||
@@ -87,9 +88,9 @@ concrete CatLat of Cat = CommonX-[Adv] ** open ResLat, ParamX, Prelude in {
|
|||||||
A2 = Adjective ** { c : Prep} ;
|
A2 = Adjective ** { c : Prep} ;
|
||||||
|
|
||||||
linref
|
linref
|
||||||
NP = \np -> combineNounPhrase np ! PronNonDrop ! Nom ;
|
NP = \np -> combineNounPhrase np ! PronNonDrop ! APreN ! DPostN ! Nom ;
|
||||||
VP = \vp -> vp.adv ++ vp.inf ! VInfActPres ++ vp.obj ++ vp.compl ! Ag Masc Sg Nom ;
|
VP = \vp -> vp.adv ++ vp.inf ! VInfActPres ++ vp.obj ++ vp.compl ! Ag Masc Sg Nom ;
|
||||||
S = \s -> combineSentence s ! SPreO ! PreO ! CPreV ! SOV ;
|
S = \s -> defaultSentence s ! SOV ;
|
||||||
V, VS, VQ, VA, VV = \v -> v.act ! (VAct VSim (VPres VInd) Sg P1) ;
|
V, VS, VQ, VA, VV = \v -> v.act ! (VAct VSim (VPres VInd) Sg P1) ;
|
||||||
V2, V2A, V2Q, V2S = \v -> v.act ! (VAct VSim (VPres VInd) Sg P1) ;
|
V2, V2A, V2Q, V2S = \v -> v.act ! (VAct VSim (VPres VInd) Sg P1) ;
|
||||||
Pron = \p -> p.pers.s ! PronNonDrop ! PronNonRefl ! Nom ;
|
Pron = \p -> p.pers.s ! PronNonDrop ! PronNonRefl ! Nom ;
|
||||||
|
|||||||
@@ -11,14 +11,16 @@ concrete ConjunctionLat of Conjunction =
|
|||||||
ConjS conj ss = {
|
ConjS conj ss = {
|
||||||
-- s = \\apos => coord conj.c { init = (ss.s ! conj.c).init ! SPreS ! apos ! CPreV ! SOV ;
|
-- s = \\apos => coord conj.c { init = (ss.s ! conj.c).init ! SPreS ! apos ! CPreV ! SOV ;
|
||||||
-- last = (ss.s ! conj.c).last ! SPreS ! apos ! CPreV ! SOV} ;
|
-- last = (ss.s ! conj.c).last ! SPreS ! apos ! CPreV ! SOV} ;
|
||||||
s = \\apos => conj.s1 ++ (ss.s ! conj.c).init ! SPreS ! apos ! CPreV ! SOV ++ conj.s2 ++
|
s = \\apos => conj.s1 ++ (ss.s ! conj.c).init ! SAPreS ! apos ! DPreN ! VReg ! CPreV ! SOV ++ conj.s2 ++
|
||||||
(ss.s ! conj.c).last ! SPreS ! apos ! CPreV ! SOV ++ conj.s3 ;
|
(ss.s ! conj.c).last ! SAPreS ! apos ! DPreN ! VReg ! CPreV ! SOV ++ conj.s3 ;
|
||||||
o = \\_ => [] ;
|
o = \\_ => [] ;
|
||||||
v = \\_,_ => [] ;
|
v = \\_ => [] ;
|
||||||
neg = \\_ => [] ;
|
neg = \\_ => [] ;
|
||||||
|
compl = [] ;
|
||||||
p = ss.p ;
|
p = ss.p ;
|
||||||
sadv = [] ;
|
sadv = [] ;
|
||||||
t = ss.t
|
t = ss.t ;
|
||||||
|
det = { s, sp = \\_ => [] } ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- ConjAdv : Conj -> ListAdv -> Adv ; -- here or there
|
-- ConjAdv : Conj -> ListAdv -> Adv ; -- here or there
|
||||||
@@ -34,14 +36,13 @@ concrete ConjunctionLat of Conjunction =
|
|||||||
-- } ;
|
-- } ;
|
||||||
-- c => (conjunctDistrTable Case conj (nps.l ! Et)).s
|
-- c => (conjunctDistrTable Case conj (nps.l ! Et)).s
|
||||||
-- } ;
|
-- } ;
|
||||||
s = \\pd,ca => conj.s1 ++ (nps.s ! conj.c).init ! pd ! ca ++ conj.s2 ++ (nps.s ! conj.c).last ! pd ! ca ++ conj.s3 ;
|
s = \\pd,ca => conj.s1 ++ (nps.s ! conj.c).init ! pd ! APreN ! DPreN ! ca ++ conj.s2 ++ (nps.s ! conj.c).last ! pd ! APreN ! DPreN ! ca ++ conj.s3;
|
||||||
n = case conj.c of { Et => Pl ; _ => nps.n } ;
|
n = case conj.c of { Et => Pl ; _ => nps.n } ;
|
||||||
g = nps.g ;
|
g = nps.g ;
|
||||||
p = nps.p ;
|
p = nps.p ;
|
||||||
adv = nps.adv ;
|
adv = "" ;
|
||||||
preap = nps.preap ;
|
preap , postap = { s = \\_ => "" };
|
||||||
postap = nps.postap ;
|
det = { s , sp = \\_ => ""} ;
|
||||||
det = nps.det
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- ConjAP : Conj -> ListAP -> AP ;
|
-- ConjAP : Conj -> ListAP -> AP ;
|
||||||
@@ -61,8 +62,12 @@ concrete ConjunctionLat of Conjunction =
|
|||||||
-- isPre = ss.isPre
|
-- isPre = ss.isPre
|
||||||
-- } ;
|
-- } ;
|
||||||
---}
|
---}
|
||||||
--
|
--
|
||||||
---- These fun's are generated from the list cat's.
|
|
||||||
|
-- ConjRS : Conj -> ListRS -> RS
|
||||||
|
ConjRS conj rss = { s = \\g,n => conj.s1 ++ (rss.s ! conj.c).init ! g ! n ++ conj.s2 ++ (rss.s ! conj.c).last ! g ! n++ conj.s3 };
|
||||||
|
|
||||||
|
---- These fun's are generated from the list cat's.
|
||||||
--
|
--
|
||||||
|
|
||||||
-- BaseS : S -> S -> ListS
|
-- BaseS : S -> S -> ListS
|
||||||
@@ -77,7 +82,7 @@ concrete ConjunctionLat of Conjunction =
|
|||||||
-- ConsS x xs = { l = \\_ => consrSS bindComma (ss (x.s ! PreS)) (xs.l ! Comma) };
|
-- ConsS x xs = { l = \\_ => consrSS bindComma (ss (x.s ! PreS)) (xs.l ! Comma) };
|
||||||
ConsS s ss = {
|
ConsS s ss = {
|
||||||
s = \\co =>
|
s = \\co =>
|
||||||
{ init = \\s,a,c,o => coord co { init = (ss.s ! co).init ! s ! a ! c ! o ; last = (ss.s ! co).last ! s ! a ! c ! o } ;
|
{ init = \\s,a,d,v,c,o => coord co { init = (ss.s ! co).init ! s ! a ! d ! v ! c ! o ; last = (ss.s ! co).last ! s ! a ! d ! v ! c ! o } ;
|
||||||
last = combineSentence s } ;
|
last = combineSentence s } ;
|
||||||
p = s.p ;
|
p = s.p ;
|
||||||
t = s.t
|
t = s.t
|
||||||
@@ -99,29 +104,21 @@ concrete ConjunctionLat of Conjunction =
|
|||||||
-- -- BaseNP : NP -> NP -> ListNP ; -- John, Mary
|
-- -- BaseNP : NP -> NP -> ListNP ; -- John, Mary
|
||||||
BaseNP x y = {
|
BaseNP x y = {
|
||||||
-- s = \\c => twoTable Case x y ;
|
-- s = \\c => twoTable Case x y ;
|
||||||
s = \\c => { init = x.s ; last = y.s } ;
|
s = \\c => { init = combineNounPhrase x ; last = combineNounPhrase y } ;
|
||||||
g = Masc ; -- Just guessing (but maybe sexist bullshit)
|
g = Neutr ; -- Trying to avoid trouble by choosing a gender
|
||||||
n = matchNumber x.n y.n ;
|
n = matchNumber x.n y.n ;
|
||||||
p = P3 ;
|
p = P3 ;
|
||||||
adv = x.adv ++ y.adv ;
|
|
||||||
preap = lin AP { s = \\a => x.preap.s ! a ++ y.preap.s ! a } ;
|
|
||||||
postap = lin AP { s = \\a => x.postap.s ! a ++ y.postap.s ! a } ;
|
|
||||||
isBase = True ;
|
isBase = True ;
|
||||||
det = lin Det { s = \\g,c => x.det.s ! g ! c ++ y.det.s ! g ! c ; sp = \\g,c => x.det.sp ! g ! c ++ y.det.sp ! g ! c ; n = matchNumber x.det.n y.det.n } ;
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- -- ConsNP : NP -> ListNP -> ListNP ; -- John, Mary, Bill
|
-- -- ConsNP : NP -> ListNP -> ListNP ; -- John, Mary, Bill
|
||||||
ConsNP x xs = {
|
ConsNP x xs = {
|
||||||
-- s = \\_ => consrTable Case bindComma x ( xs.s ! Comma );
|
-- s = \\_ => consrTable Case bindComma x ( xs.s ! Comma );
|
||||||
s = \\co => { init = \\pd,ca => coord co { init = (xs.s ! co).init ! pd ! ca ; last = (xs.s ! co).last ! pd ! ca} ; last = x.s } ;
|
s = \\co => { init = \\pd,ap,dp,ca => coord co { init = (xs.s ! co).init ! pd ! ap ! dp ! ca ; last = (xs.s ! co).last ! pd ! ap ! dp ! ca} ; last = combineNounPhrase x } ;
|
||||||
n = matchNumber x.n xs.n ;
|
n = matchNumber x.n xs.n ;
|
||||||
g = xs.g ;
|
g = xs.g ;
|
||||||
p = xs.p ;
|
p = xs.p ;
|
||||||
adv = x.adv ++ xs.adv ;
|
|
||||||
preap = lin AP { s = \\a => x.preap.s ! a ++ xs.preap.s ! a } ;
|
|
||||||
postap = lin AP { s = \\a => x.postap.s ! a ++ xs.postap.s ! a } ;
|
|
||||||
isBase = False ;
|
isBase = False ;
|
||||||
det = lin Det { s = \\g,c => x.det.s ! g ! c ++ xs.det.s ! g ! c ; sp = \\g,c => x.det.sp ! g ! c ++ xs.det.sp ! g ! c ; n = matchNumber x.det.n xs.det.n } ; -- try to combine the determiners, probably not what we want
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- -- BaseAP : AP -> AP -> ListAP
|
-- -- BaseAP : AP -> AP -> ListAP
|
||||||
@@ -130,13 +127,21 @@ concrete ConjunctionLat of Conjunction =
|
|||||||
-- -- ConsAP : AP -> ListAP -> ListAP
|
-- -- ConsAP : AP -> ListAP -> ListAP
|
||||||
-- ConsAP x xs =
|
-- ConsAP x xs =
|
||||||
-- { l = \\_ => consrTable Agr and_Conj.s2 x (xs.l ! Comma ) } ;
|
-- { l = \\_ => consrTable Agr and_Conj.s2 x (xs.l ! Comma ) } ;
|
||||||
|
|
||||||
|
-- BaseRS : RS -> RS -> ListRS ;
|
||||||
|
BaseRS rs1 rs2 = { s = \\co => { init = rs1.s ; last = rs2.s }} ;
|
||||||
|
|
||||||
|
-- ConsRS : RS -> List RS -> ListRS ;
|
||||||
|
ConsRS rs rss = { s = \\co => { init = rs.s ; last = \\g,n => coord co { init = (rss.s ! co).init ! g ! n ; last = (rss.s ! co).last ! g ! n } } } ;
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
lincat
|
lincat
|
||||||
[S] = { s : Coordinator => {init,last : SAdvPos => AdvPos => ComplPos => Order => Str} ; p : Pol ; t : Tense } ; -- TO FIX
|
[S] = { s : Coordinator => {init,last : SAdvPos => AdvPos => DetPos => VPos => ComplPos => Order => Str} ; p : Pol ; t : Tense } ; -- TO FIX
|
||||||
[Adv] = { s: Coordinator => {init,last : Str}} ;
|
[Adv] = { s: Coordinator => {init,last : Str}} ;
|
||||||
[NP] = { s : Coordinator => {init,last : PronDropForm => Case => Str} ; g : Gender ; n : Number ; p : Person ; adv : Str ; preap : AP ; postap : AP ; isBase : Bool ; det : Det } ;
|
[NP] = { s : Coordinator => {init,last : PronDropForm => AdvPos => DetPos => Case => Str} ; g : Gender ; n : Number ; p : Person ; isBase : Bool } ;
|
||||||
[AP] = {s : Coordinator => {init,last : Agr => Str } } ;
|
[AP] = {s : Coordinator => {init,last : Agr => Str } } ;
|
||||||
|
[RS] = { s : Coordinator => { init, last : Gender => Number => Str }} ;
|
||||||
oper
|
oper
|
||||||
-- Generates a new number value given two number values.
|
-- Generates a new number value given two number values.
|
||||||
-- Pl if any of the two is Pl
|
-- Pl if any of the two is Pl
|
||||||
|
|||||||
21027
src/latin/DictLat.gf
21027
src/latin/DictLat.gf
File diff suppressed because it is too large
Load Diff
74126
src/latin/DictLatAbs.gf
74126
src/latin/DictLatAbs.gf
File diff suppressed because it is too large
Load Diff
@@ -1,9 +1,262 @@
|
|||||||
concrete ExtendLat of Extend = CatLat ** ExtendFunctor-[VPS,ComplDirectVQ,ComplDirectVS,CompIQuant,EmptyRelSlash,ExistsNP,ExistCN,ExistMassCN,ExistPluralCN,GenModNP,PredAPVP,PredIAdvVP,SlashBareV2S,StrandQuestSlash,StrandRelSlash] with (Grammar=GrammarLat) ** open MissingLat in {
|
--1 Extensions of core RGL syntax (the Grammar module)
|
||||||
lincat
|
|
||||||
VPS = Comp ;
|
-- This module defines syntax rules that are not yet implemented in all
|
||||||
|
-- languages, and perhaps never implementable either. But all rules are given
|
||||||
|
-- a default implementation in common/ExtendFunctor.gf so that they can be included
|
||||||
|
-- in the library API. The default implementations are meant to be overridden in each
|
||||||
|
-- xxxxx/ExtendXxx.gf when the work proceeds.
|
||||||
|
--
|
||||||
|
-- This module is aimed to replace the original Extra.gf, which is kept alive just
|
||||||
|
-- for backwardcommon compatibility. It will also replace translator/Extensions.gf
|
||||||
|
-- and thus eliminate the often duplicated work in those two modules.
|
||||||
|
--
|
||||||
|
-- (c) Aarne Ranta 2017-08-20 under LGPL and BSD
|
||||||
|
|
||||||
|
|
||||||
|
concrete ExtendLat of Extend = CatLat ** open ResLat in {
|
||||||
|
|
||||||
lin
|
lin
|
||||||
-- ComplDirectVS : VS -> Utt -> VP ; -- say: "today"
|
-- GenNP : NP -> Quant ; -- this man's
|
||||||
ComplDirectVS vs utt = AdvVP (UseV <lin V vs : V>) (lin Adv {s = \\_ => ":" ++ quoted utt.s}) ; -- DEFAULT complement added as Adv in quotes
|
GenNP np = { s = \\_ => combineNounPhrase np ! PronNonDrop ! APostN ! DPreN ! Gen ; sp = \\_ => ""} ;
|
||||||
-- ComplDirectVQ : VQ -> Utt -> VP ; -- ask: "when"
|
-- GenIP : IP -> IQuant ; -- whose
|
||||||
ComplDirectVQ vq utt = AdvVP (UseV <lin V vq : V>) (lin Adv {s = \\_ => ":" ++ quoted utt.s}) ; -- DEFAULT complement added as Adv in quotes
|
-- GenRP : Num -> CN -> RP ; -- whose car
|
||||||
} ;
|
|
||||||
|
-- -- In case the first two are not available, the following applications should in any case be.
|
||||||
|
|
||||||
|
-- GenModNP : Num -> NP -> CN -> NP ; -- this man's car(s)
|
||||||
|
-- GenModIP : Num -> IP -> CN -> IP ; -- whose car(s)
|
||||||
|
|
||||||
|
-- CompBareCN : CN -> Comp ; -- (is) teacher
|
||||||
|
|
||||||
|
-- StrandQuestSlash : IP -> ClSlash -> QCl ; -- whom does John live with
|
||||||
|
-- StrandRelSlash : RP -> ClSlash -> RCl ; -- that he lives in
|
||||||
|
-- EmptyRelSlash : ClSlash -> RCl ; -- he lives in
|
||||||
|
|
||||||
|
|
||||||
|
-- -- $VP$ conjunction, separate categories for finite and infinitive forms (VPS and VPI, respectively)
|
||||||
|
-- -- covering both in the same category leads to spurious VPI parses because VPS depends on many more tenses
|
||||||
|
|
||||||
|
-- cat
|
||||||
|
-- VPS ; -- finite VP's with tense and polarity
|
||||||
|
-- [VPS] {2} ;
|
||||||
|
-- VPI ;
|
||||||
|
-- [VPI] {2} ; -- infinitive VP's (TODO: with anteriority and polarity)
|
||||||
|
|
||||||
|
-- fun
|
||||||
|
-- MkVPS : Temp -> Pol -> VP -> VPS ; -- hasn't slept
|
||||||
|
-- ConjVPS : Conj -> [VPS] -> VPS ; -- has walked and won't sleep
|
||||||
|
-- PredVPS : NP -> VPS -> S ; -- she [has walked and won't sleep]
|
||||||
|
|
||||||
|
-- MkVPI : VP -> VPI ; -- to sleep (TODO: Ant and Pol)
|
||||||
|
-- ConjVPI : Conj -> [VPI] -> VPI ; -- to sleep and to walk
|
||||||
|
-- ComplVPIVV : VV -> VPI -> VP ; -- must sleep and walk
|
||||||
|
|
||||||
|
-- -- the same for VPSlash, taking a complement with shared V2 verbs
|
||||||
|
|
||||||
|
-- cat
|
||||||
|
-- VPS2 ; -- have loved (binary version of VPS)
|
||||||
|
-- [VPS2] {2} ; -- has loved, hates"
|
||||||
|
-- VPI2 ; -- to love (binary version of VPI)
|
||||||
|
-- [VPI2] {2} ; -- to love, to hate
|
||||||
|
|
||||||
|
-- fun
|
||||||
|
-- MkVPS2 : Temp -> Pol -> VPSlash -> VPS2 ; -- has loved
|
||||||
|
-- ConjVPS2 : Conj -> [VPS2] -> VPS2 ; -- has loved and now hates
|
||||||
|
-- ComplVPS2 : VPS2 -> NP -> VPS ; -- has loved and now hates that person
|
||||||
|
|
||||||
|
-- MkVPI2 : VPSlash -> VPI2 ; -- to love
|
||||||
|
-- ConjVPI2 : Conj -> [VPI2] -> VPI2 ; -- to love and hate
|
||||||
|
-- ComplVPI2 : VPI2 -> NP -> VPI ; -- to love and hate that person
|
||||||
|
|
||||||
|
-- fun
|
||||||
|
-- ProDrop : Pron -> Pron ; -- unstressed subject pronoun becomes empty: "am tired"
|
||||||
|
|
||||||
|
-- ICompAP : AP -> IComp ; -- "how old"
|
||||||
|
-- IAdvAdv : Adv -> IAdv ; -- "how often"
|
||||||
|
|
||||||
|
-- CompIQuant : IQuant -> IComp ; -- which (is it) [agreement to NP]
|
||||||
|
|
||||||
|
-- PrepCN : Prep -> CN -> Adv ; -- by accident [Prep + CN without article]
|
||||||
|
|
||||||
|
-- -- fronted/focal constructions, only for main clauses
|
||||||
|
|
||||||
|
-- fun
|
||||||
|
-- FocusObj : NP -> SSlash -> Utt ; -- her I love
|
||||||
|
-- FocusAdv : Adv -> S -> Utt ; -- today I will sleep
|
||||||
|
-- FocusAdV : AdV -> S -> Utt ; -- never will I sleep
|
||||||
|
-- FocusAP : AP -> NP -> Utt ; -- green was the tree
|
||||||
|
|
||||||
|
-- -- participle constructions
|
||||||
|
-- PresPartAP : VP -> AP ; -- (the man) looking at Mary
|
||||||
|
-- EmbedPresPart : VP -> SC ; -- looking at Mary (is fun)
|
||||||
|
|
||||||
|
-- PastPartAP : VPSlash -> AP ; -- lost (opportunity) ; (opportunity) lost in space
|
||||||
|
PastPartAP vp = { s = \\ag => vp.part ! VPassPerf ! ag ++ vp.adv ++ vp.c.s} ; -- TODO
|
||||||
|
-- PastPartAgentAP : VPSlash -> NP -> AP ; -- (opportunity) lost by the company
|
||||||
|
|
||||||
|
-- -- this is a generalization of Verb.PassV2 and should replace it in the future.
|
||||||
|
|
||||||
|
-- PassVPSlash : VPSlash -> VP ; -- be forced to sleep
|
||||||
|
PassVPSlash vp = vp ** {
|
||||||
|
s = \\a => case a of { VAct _ t n p => vp.pass ! VPass t n p } ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- -- the form with an agent may result in a different linearization
|
||||||
|
-- -- from an adverbial modification by an agent phrase.
|
||||||
|
|
||||||
|
-- PassAgentVPSlash : VPSlash -> NP -> VP ; -- be begged by her to go
|
||||||
|
|
||||||
|
-- -- publishing of the document
|
||||||
|
|
||||||
|
-- NominalizeVPSlashNP : VPSlash -> NP -> NP ;
|
||||||
|
|
||||||
|
-- -- counterpart to ProgrVP, for VPSlash
|
||||||
|
|
||||||
|
-- ProgrVPSlash : VPSlash -> VPSlash;
|
||||||
|
|
||||||
|
-- -- existential for mathematics
|
||||||
|
|
||||||
|
-- ExistsNP : NP -> Cl ; -- there exists a number / there exist numbers
|
||||||
|
|
||||||
|
-- -- existentials with a/no variation
|
||||||
|
|
||||||
|
-- ExistCN : CN -> Cl ; -- there is a car / there is no car
|
||||||
|
-- ExistMassCN : CN -> Cl ; -- there is beer / there is no beer
|
||||||
|
-- ExistPluralCN : CN -> Cl ; -- there are trees / there are no trees
|
||||||
|
|
||||||
|
-- -- generalisation of existential, with adverb as a parameter
|
||||||
|
-- AdvIsNP : Adv -> NP -> Cl ; -- here is the tree / here are the trees
|
||||||
|
-- AdvIsNPAP : Adv -> NP -> AP -> Cl ; -- here are the instructions documented
|
||||||
|
|
||||||
|
-- -- infinitive for purpose AR 21/8/2013
|
||||||
|
|
||||||
|
-- PurposeVP : VP -> Adv ; -- to become happy
|
||||||
|
|
||||||
|
-- -- object S without "that"
|
||||||
|
|
||||||
|
-- ComplBareVS : VS -> S -> VP ; -- say she runs
|
||||||
|
-- SlashBareV2S : V2S -> S -> VPSlash ; -- answer (to him) it is good
|
||||||
|
|
||||||
|
-- ComplDirectVS : VS -> Utt -> VP ; -- say: "today"
|
||||||
|
-- ComplDirectVQ : VQ -> Utt -> VP ; -- ask: "when"
|
||||||
|
|
||||||
|
-- -- front the extraposed part
|
||||||
|
|
||||||
|
-- FrontComplDirectVS : NP -> VS -> Utt -> Cl ; -- "I am here", she said
|
||||||
|
-- FrontComplDirectVQ : NP -> VQ -> Utt -> Cl ; -- "where", she asked
|
||||||
|
|
||||||
|
-- -- proper structure of "it is AP to VP"
|
||||||
|
|
||||||
|
-- PredAPVP : AP -> VP -> Cl ; -- it is good to walk
|
||||||
|
|
||||||
|
-- -- to use an AP as CN or NP without CN
|
||||||
|
|
||||||
|
-- AdjAsCN : AP -> CN ; -- a green one ; en grön (Swe)
|
||||||
|
-- AdjAsNP : AP -> NP ; -- green (is good)
|
||||||
|
AdjAsNP ap = {
|
||||||
|
s = \\_,c => ap.s ! (Ag Neutr Sg c) ;
|
||||||
|
adv = "" ;
|
||||||
|
det = { s, sp = \\_ => "" } ;
|
||||||
|
g = Neutr ;
|
||||||
|
n = Sg ;
|
||||||
|
p = P3 ;
|
||||||
|
postap = { s = \\_ => "" } ;
|
||||||
|
preap = { s = \\_ => "" } ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- -- infinitive complement for IAdv
|
||||||
|
|
||||||
|
-- PredIAdvVP : IAdv -> VP -> QCl ; -- how to walk?
|
||||||
|
|
||||||
|
-- -- alternative to EmbedQS. For English, EmbedQS happens to work,
|
||||||
|
-- -- because "what" introduces question and relative. The default linearization
|
||||||
|
-- -- could be e.g. "the thing we did (was fun)".
|
||||||
|
|
||||||
|
-- EmbedSSlash : SSlash -> SC ; -- what we did (was fun)
|
||||||
|
|
||||||
|
-- -- reflexive noun phrases: a generalization of Verb.ReflVP, which covers just reflexive pronouns
|
||||||
|
-- -- This is necessary in languages like Swedish, which have special reflexive possessives.
|
||||||
|
-- -- However, it is also needed in application grammars that want to treat "brush one's teeth" as a one-place predicate.
|
||||||
|
|
||||||
|
-- cat
|
||||||
|
-- RNP ; -- reflexive noun phrase, e.g. "my family and myself"
|
||||||
|
-- RNPList ; -- list of reflexives to be coordinated, e.g. "my family, myself, everyone"
|
||||||
|
|
||||||
|
-- -- Notice that it is enough for one NP in RNPList to be RNP.
|
||||||
|
|
||||||
|
-- fun
|
||||||
|
-- ReflRNP : VPSlash -> RNP -> VP ; -- love my family and myself
|
||||||
|
|
||||||
|
-- ReflPron : RNP ; -- myself
|
||||||
|
-- ReflPoss : Num -> CN -> RNP ; -- my car(s)
|
||||||
|
|
||||||
|
-- PredetRNP : Predet -> RNP -> RNP ; -- all my brothers
|
||||||
|
|
||||||
|
-- ConjRNP : Conj -> RNPList -> RNP ; -- my family, John and myself
|
||||||
|
|
||||||
|
-- Base_rr_RNP : RNP -> RNP -> RNPList ; -- my family, myself
|
||||||
|
-- Base_nr_RNP : NP -> RNP -> RNPList ; -- John, myself
|
||||||
|
-- Base_rn_RNP : RNP -> NP -> RNPList ; -- myself, John
|
||||||
|
-- Cons_rr_RNP : RNP -> RNPList -> RNPList ; -- my family, myself, John
|
||||||
|
-- Cons_nr_RNP : NP -> RNPList -> RNPList ; -- John, my family, myself
|
||||||
|
-- ---- Cons_rn_RNP : RNP -> ListNP -> RNPList ; -- myself, John, Mary
|
||||||
|
|
||||||
|
|
||||||
|
-- --- from Extensions
|
||||||
|
|
||||||
|
-- ComplGenVV : VV -> Ant -> Pol -> VP -> VP ; -- want not to have slept
|
||||||
|
-- ---- SlashV2V : V2V -> Ant -> Pol -> VPS -> VPSlash ; -- force (her) not to have slept
|
||||||
|
|
||||||
|
-- CompoundN : N -> N -> N ; -- control system / controls system / control-system
|
||||||
|
-- CompoundAP : N -> A -> AP ; -- language independent / language-independent
|
||||||
|
|
||||||
|
-- GerundCN : VP -> CN ; -- publishing of the document (can get a determiner)
|
||||||
|
-- GerundNP : VP -> NP ; -- publishing the document (by nature definite)
|
||||||
|
-- GerundAdv : VP -> Adv ; -- publishing the document (prepositionless adverb)
|
||||||
|
|
||||||
|
-- WithoutVP : VP -> Adv ; -- without publishing the document
|
||||||
|
-- ByVP : VP -> Adv ; -- by publishing the document
|
||||||
|
-- InOrderToVP : VP -> Adv ; -- (in order) to publish the document
|
||||||
|
|
||||||
|
-- ApposNP : NP -> NP -> NP ; -- Mr Macron, the president of France,
|
||||||
|
|
||||||
|
-- AdAdV : AdA -> AdV -> AdV ; -- almost always
|
||||||
|
-- UttAdV : AdV -> Utt ; -- always(!)
|
||||||
|
-- PositAdVAdj : A -> AdV ; -- (that she) positively (sleeps)
|
||||||
|
|
||||||
|
-- CompS : S -> Comp ; -- (the fact is) that she sleeps
|
||||||
|
-- CompQS : QS -> Comp ; -- (the question is) who sleeps
|
||||||
|
-- CompVP : Ant -> Pol -> VP -> Comp ; -- (she is) to go
|
||||||
|
|
||||||
|
-- -- very language-specific things
|
||||||
|
|
||||||
|
-- -- Eng
|
||||||
|
-- UncontractedNeg : Pol ; -- do not, etc, as opposed to don't
|
||||||
|
-- UttVPShort : VP -> Utt ; -- have fun, as opposed to "to have fun"
|
||||||
|
-- ComplSlashPartLast : VPSlash -> NP -> VP ; -- set it apart, as opposed to "set apart it"
|
||||||
|
|
||||||
|
-- -- Romance
|
||||||
|
-- DetNPMasc : Det -> NP ;
|
||||||
|
-- DetNPFem : Det -> NP ;
|
||||||
|
|
||||||
|
-- UseComp_estar : Comp -> VP ; -- (Cat, Spa, Por) "está cheio" instead of "é cheio"
|
||||||
|
|
||||||
|
-- SubjRelNP : NP -> RS -> NP ; -- Force RS in subjunctive: lo que les *resulte* mejor
|
||||||
|
|
||||||
|
-- iFem_Pron : Pron ; -- I (Fem)
|
||||||
|
-- youFem_Pron : Pron ; -- you (Fem)
|
||||||
|
-- weFem_Pron : Pron ; -- we (Fem)
|
||||||
|
-- youPlFem_Pron : Pron ; -- you plural (Fem)
|
||||||
|
-- theyFem_Pron : Pron ; -- they (Fem)
|
||||||
|
-- youPolFem_Pron : Pron ; -- you polite (Fem)
|
||||||
|
-- youPolPl_Pron : Pron ; -- you polite plural (Masc)
|
||||||
|
-- youPolPlFem_Pron : Pron ; -- you polite plural (Fem)
|
||||||
|
|
||||||
|
-- -- German
|
||||||
|
-- UttAccNP : NP -> Utt ; -- him (accusative)
|
||||||
|
-- UttDatNP : NP -> Utt ; -- him (dative)
|
||||||
|
-- UttAccIP : IP -> Utt ; -- whom (accusative)
|
||||||
|
-- UttDatIP : IP -> Utt ; -- whom (dative)
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
concrete ExtraLat of ExtraLatAbs =
|
concrete ExtraLat of ExtraLatAbs =
|
||||||
CatLat, ConjunctionLat **
|
CatLat, ConjunctionLat **
|
||||||
open ResLat, ParadigmsLat, Coordination, Prelude in {
|
open ResLat, ParadigmsLat, RelativeLat, NounLat, Prelude in {
|
||||||
lincat CS = Str ;
|
lincat CS = SAdvPos => AdvPos => DetPos => VPos => ComplPos => Order => Str ;
|
||||||
|
TestRS = { s : Gender => Number => SAdvPos => AdvPos => DetPos => VPos => ComplPos => Order => Str } ;
|
||||||
lin
|
lin
|
||||||
useS s = combineSentence s ! SPreO ! PreO ! CPreV ! SOV ;
|
useS s = combineSentence s ;
|
||||||
-- PastPartAP : VPSlash -> AP ; -- lost (opportunity) ; (opportunity) lost in space
|
-- PastPartAP : VPSlash -> AP ; -- lost (opportunity) ; (opportunity) lost in space
|
||||||
-- PastPartAP vp = { s = vp.part ! VPassPerf } ;
|
-- PastPartAP vp = { s = vp.part ! VPassPerf } ;
|
||||||
|
|
||||||
@@ -50,4 +51,83 @@ concrete ExtraLat of ExtraLatAbs =
|
|||||||
Abl_Prep = mkPrep "" Abl ;
|
Abl_Prep = mkPrep "" Abl ;
|
||||||
inAbl_Prep = mkPrep "in" Abl ;
|
inAbl_Prep = mkPrep "in" Abl ;
|
||||||
onAbl_Prep = mkPrep "in" Abl ; -- L...
|
onAbl_Prep = mkPrep "in" Abl ; -- L...
|
||||||
|
|
||||||
|
-- UttS_SVO : S -> Utt
|
||||||
|
UttS_SVO s = { s = defaultSentence s ! SVO };
|
||||||
|
-- UttS_VInS : S -> Utt
|
||||||
|
UttS_VInS s = { s = combineSentence s ! SAPreS ! APreV ! DPostN ! VInS ! CPostV ! SVO } ;
|
||||||
|
|
||||||
|
TestRCl t p cl = {
|
||||||
|
s = \\g,n => combineSentence (combineClause (cl.s ! g ! n) (lin Tense t) t.a (lin Pol p) VQFalse) ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- UseRCl_OSV : Temp -> Pol -> RCl -> RS ;
|
||||||
|
UseRCl_OSV t p cl = {
|
||||||
|
s = \\g,n => combineSentence (combineClause (cl.s ! g ! n) (lin Tense t) t.a (lin Pol p) VQFalse) ! SAPreO ! APreV ! DPreN ! VReg ! CPostV ! OSV ;
|
||||||
|
} ;
|
||||||
|
-- UseRCl_OVS : Temp -> Pol -> RCl -> RS ;
|
||||||
|
UseRCl_OVS t p cl = {
|
||||||
|
s = \\g,n => combineSentence (combineClause (cl.s ! g ! n) (lin Tense t) t.a (lin Pol p) VQFalse) ! SAPreO ! APreV ! DPreN ! VReg ! CPostV ! OVS ; -- SAPreO APreV DPreN VReg CPostV OVS
|
||||||
|
} ;
|
||||||
|
-- UseRCl_SOV : Temp -> Pol -> RCl -> RS ;
|
||||||
|
UseRCl_SOV t p cl = {
|
||||||
|
s = \\g,n => combineSentence (combineClause (cl.s ! g ! n) (lin Tense t) t.a (lin Pol p) VQFalse) ! SAPreS ! APreV ! DPreN ! VReg ! CPostV ! SOV ;
|
||||||
|
} ;
|
||||||
|
-- UseRCl_SVO : Temp -> Pol -> RCl -> RS ;
|
||||||
|
UseRCl_SVO t p cl = {
|
||||||
|
s = \\g,n => combineSentence (combineClause (cl.s ! g ! n) (lin Tense t) t.a (lin Pol p) VQFalse) ! SAPreS ! APreV ! DPreN ! VReg ! CPostV ! SVO ;
|
||||||
|
} ;
|
||||||
|
-- PrepNP_DPostN : Prep -> NP -> Adv ; -- in the house
|
||||||
|
PrepNP_DPostN prep np =
|
||||||
|
mkAdv (prep.s ++ (combineNounPhrase np) ! PronNonDrop ! APostN ! DPostN ! prep.c ) ;
|
||||||
|
|
||||||
|
-- ApposCN_DPostN : CN -> NP -> CN
|
||||||
|
ApposCN_DPostN cn np =
|
||||||
|
cn **
|
||||||
|
{
|
||||||
|
s = \\n,c => cn.s ! n ! c ++ (combineNounPhrase np) ! PronNonDrop ! APostN ! DPostN ! c ;
|
||||||
|
} ; -- massable = cn.massable } ;
|
||||||
|
|
||||||
|
-- CompNP_DPostN : NP -> Comp ; -- (be) the man
|
||||||
|
CompNP np = {s = \\_ =>
|
||||||
|
(combineNounPhrase np) ! PronNonDrop ! DPostN ! Nom
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- DetNP_Fem : Det -> NP ; -- these five
|
||||||
|
DetNP_Fem det = {
|
||||||
|
s = \\_ => det.s ! Fem ;
|
||||||
|
g = Fem ;
|
||||||
|
n = det.n ;
|
||||||
|
p = P3 ;
|
||||||
|
adv = "" ;
|
||||||
|
preap, postap = { s = \\_ => "" } ;
|
||||||
|
det = { s,sp = \\_ => "" ; n = det.n } ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- AdjAsNP_Fem : AP -> NP ; -- green (is good)
|
||||||
|
AdjAsNP_Fem ap = {
|
||||||
|
s = \\_,c => ap.s ! (Ag Fem Sg c) ;
|
||||||
|
adv = "" ;
|
||||||
|
det = { s, sp = \\_ => "" } ;
|
||||||
|
g = Fem ;
|
||||||
|
n = Sg ;
|
||||||
|
p = P3 ;
|
||||||
|
postap = { s = \\_ => "" } ;
|
||||||
|
preap = { s = \\_ => "" } ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- PredVP_VP_Ellipsis : NP -> VP -> Cl
|
||||||
|
PredVP_VP_Ellipsis np =
|
||||||
|
mkClause np emptyVP ;
|
||||||
|
|
||||||
|
-- SlashVP_VP_Ellipsis : NP -> VPSlash -> ClSlash ; -- (whom) he sees
|
||||||
|
SlashVP_VP_Ellipsis np =
|
||||||
|
mkClause np emptyVP ;
|
||||||
|
|
||||||
|
-- FunRP_RP_Ellipsis : Prep -> NP -> RP ;
|
||||||
|
FunRP_RP_Ellipsis p np = FunRP p np (lin RP { s = \\_ => "" }) ;
|
||||||
|
|
||||||
|
RelNP_NP_Ellipsis rs = RelNP emptyNP rs ;
|
||||||
|
|
||||||
|
comma_Conj = mkConj "" "," "" Pl Comma ;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
abstract ExtraLatAbs =
|
abstract ExtraLatAbs =
|
||||||
Extra, Conjunction
|
Conjunction
|
||||||
** {
|
** {
|
||||||
cat CS ;
|
cat CS ;
|
||||||
|
TestRS ;
|
||||||
fun
|
fun
|
||||||
useS : S -> CS ;
|
useS : S -> CS ;
|
||||||
-- do not drop pronouns
|
-- do not drop pronouns
|
||||||
@@ -29,4 +30,27 @@ abstract ExtraLatAbs =
|
|||||||
-- Preposition with alternate case
|
-- Preposition with alternate case
|
||||||
inAbl_Prep : Prep ;
|
inAbl_Prep : Prep ;
|
||||||
onAbl_Prep : Prep ;
|
onAbl_Prep : Prep ;
|
||||||
|
|
||||||
|
-- Add other word orders
|
||||||
|
UttS_SVO : S -> Utt ;
|
||||||
|
UttS_VInS : S -> Utt ;
|
||||||
|
TestRCl : Temp -> Pol -> RCl -> TestRS ;
|
||||||
|
UseRCl_OSV : Temp -> Pol -> RCl -> RS ;
|
||||||
|
UseRCl_OVS : Temp -> Pol -> RCl -> RS ;
|
||||||
|
UseRCl_SOV : Temp -> Pol -> RCl -> RS ;
|
||||||
|
UseRCl_SVO : Temp -> Pol -> RCl -> RS ;
|
||||||
|
|
||||||
|
PrepNP_DPostN : Prep -> NP -> Adv ;
|
||||||
|
ApposCN_DPostN : CN -> NP -> CN ;
|
||||||
|
|
||||||
|
-- More genders
|
||||||
|
DetNP_Fem : Det -> NP ;
|
||||||
|
AdjAsNP_Fem : AP -> NP ;
|
||||||
|
|
||||||
|
-- Ellipsis
|
||||||
|
PredVP_VP_Ellipsis : NP -> Cl ;
|
||||||
|
SlashVP_VP_Ellipsis : NP -> ClSlash ;
|
||||||
|
FunRP_RP_Ellipsis : Prep -> NP -> RP ;
|
||||||
|
RelNP_NP_Ellipsis : RS -> NP ;
|
||||||
|
comma_Conj : Conj ;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ concrete GrammarLat of Grammar =
|
|||||||
NumeralLat,
|
NumeralLat,
|
||||||
SentenceLat,
|
SentenceLat,
|
||||||
QuestionLat,
|
QuestionLat,
|
||||||
-- RelativeLat,
|
RelativeLat,
|
||||||
ConjunctionLat,
|
ConjunctionLat,
|
||||||
PhraseLat,
|
PhraseLat,
|
||||||
TextX-[Adv],
|
TextX-[Adv],
|
||||||
|
|||||||
@@ -2,142 +2,78 @@ resource MissingLat = open GrammarLat, Prelude in {
|
|||||||
|
|
||||||
-- temporary definitions to enable the compilation of RGL API
|
-- temporary definitions to enable the compilation of RGL API
|
||||||
oper AdNum : AdN -> Card -> Card = notYet "AdNum" ;
|
oper AdNum : AdN -> Card -> Card = notYet "AdNum" ;
|
||||||
|
oper AddAdvQVP : QVP -> IAdv -> QVP = notYet "AddAdvQVP" ;
|
||||||
|
oper AdjDAP : DAP -> AP -> DAP = notYet "AdjDAP" ;
|
||||||
oper AdvCN : CN -> Adv -> CN = notYet "AdvCN" ;
|
oper AdvCN : CN -> Adv -> CN = notYet "AdvCN" ;
|
||||||
oper AdvIAdv : IAdv -> Adv -> IAdv = notYet "AdvIAdv" ;
|
oper AdvIAdv : IAdv -> Adv -> IAdv = notYet "AdvIAdv" ;
|
||||||
oper AdvIP : IP -> Adv -> IP = notYet "AdvIP" ;
|
oper AdvIP : IP -> Adv -> IP = notYet "AdvIP" ;
|
||||||
|
oper AdvQVP : VP -> IAdv -> QVP = notYet "AdvQVP" ;
|
||||||
oper AdvSlash : ClSlash -> Adv -> ClSlash = notYet "AdvSlash" ;
|
oper AdvSlash : ClSlash -> Adv -> ClSlash = notYet "AdvSlash" ;
|
||||||
oper BaseAP : AP -> AP -> ListAP = notYet "BaseAP" ;
|
oper BaseAP : AP -> AP -> ListAP = notYet "BaseAP" ;
|
||||||
oper BaseRS : RS -> RS -> ListRS = notYet "BaseRS" ;
|
oper BaseAdV : AdV -> AdV -> ListAdV = notYet "BaseAdV" ;
|
||||||
|
oper BaseCN : CN -> CN -> ListCN = notYet "BaseCN" ;
|
||||||
|
oper BaseDAP : DAP -> DAP -> ListDAP = notYet "BaseDAP" ;
|
||||||
|
oper BaseIAdv : IAdv -> IAdv -> ListIAdv = notYet "BaseIAdv" ;
|
||||||
oper CleftAdv : Adv -> S -> Cl = notYet "CleftAdv" ;
|
oper CleftAdv : Adv -> S -> Cl = notYet "CleftAdv" ;
|
||||||
oper CleftNP : NP -> RS -> Cl = notYet "CleftNP" ;
|
oper CleftNP : NP -> RS -> Cl = notYet "CleftNP" ;
|
||||||
oper CompIP : IP -> IComp = notYet "CompIP" ;
|
oper CompIP : IP -> IComp = notYet "CompIP" ;
|
||||||
oper ComplN2 : N2 -> NP -> CN = notYet "ComplN2" ;
|
oper ComplN2 : N2 -> NP -> CN = notYet "ComplN2" ;
|
||||||
oper ComplN3 : N3 -> NP -> N2 = notYet "ComplN3" ;
|
oper ComplN3 : N3 -> NP -> N2 = notYet "ComplN3" ;
|
||||||
oper ConjAdv : Conj -> ListAdv -> Adv = notYet "ConjAdv" ;
|
oper ComplSlashIP : VPSlash -> IP -> QVP = notYet "ComplSlashIP" ;
|
||||||
oper ConjAP : Conj -> ListAP -> AP = notYet "ConjAP" ;
|
oper ConjAP : Conj -> ListAP -> AP = notYet "ConjAP" ;
|
||||||
oper ConjRS : Conj -> ListRS -> RS = notYet "ConjRS" ;
|
oper ConjAdV : Conj -> ListAdV -> AdV = notYet "ConjAdV" ;
|
||||||
|
oper ConjAdv : Conj -> ListAdv -> Adv = notYet "ConjAdv" ;
|
||||||
|
oper ConjCN : Conj -> ListCN -> CN = notYet "ConjCN" ;
|
||||||
|
oper ConjDet : Conj -> ListDAP -> Det = notYet "ConjDet" ;
|
||||||
|
oper ConjIAdv : Conj -> ListIAdv -> IAdv = notYet "ConjIAdv" ;
|
||||||
|
-- Error: No type found for ConjNPque
|
||||||
oper ConsAP : AP -> ListAP -> ListAP = notYet "ConsAP" ;
|
oper ConsAP : AP -> ListAP -> ListAP = notYet "ConsAP" ;
|
||||||
oper ConsRS : RS -> ListRS -> ListRS = notYet "ConsRS" ;
|
oper ConsAdV : AdV -> ListAdV -> ListAdV = notYet "ConsAdV" ;
|
||||||
|
oper ConsCN : CN -> ListCN -> ListCN = notYet "ConsCN" ;
|
||||||
|
oper ConsDAP : DAP -> ListDAP -> ListDAP = notYet "ConsDAP" ;
|
||||||
|
oper ConsIAdv : IAdv -> ListIAdv -> ListIAdv = notYet "ConsIAdv" ;
|
||||||
|
oper DetDAP : Det -> DAP = notYet "DetDAP" ;
|
||||||
oper DetQuantOrd : Quant -> Num -> Ord -> Det = notYet "DetQuantOrd" ;
|
oper DetQuantOrd : Quant -> Num -> Ord -> Det = notYet "DetQuantOrd" ;
|
||||||
oper EmbedQS : QS -> SC = notYet "EmbedQS" ;
|
oper EmbedQS : QS -> SC = notYet "EmbedQS" ;
|
||||||
oper EmbedS : S -> SC = notYet "EmbedS" ;
|
oper EmbedS : S -> SC = notYet "EmbedS" ;
|
||||||
oper EmbedVP : VP -> SC = notYet "EmbedVP" ;
|
oper EmbedVP : VP -> SC = notYet "EmbedVP" ;
|
||||||
oper ExistIP : IP -> QCl = notYet "ExistIP" ;
|
oper ExistIP : IP -> QCl = notYet "ExistIP" ;
|
||||||
oper ExistNP : NP -> Cl = notYet "ExistNP" ;
|
oper ExistNP : NP -> Cl = notYet "ExistNP" ;
|
||||||
oper FunRP : Prep -> NP -> RP -> RP = notYet "FunRP" ;
|
oper ExtAdvS : Adv -> S -> S = notYet "ExtAdvS" ;
|
||||||
|
oper ExtAdvVP : VP -> Adv -> VP = notYet "ExtAdvVP" ;
|
||||||
oper GenericCl : VP -> Cl = notYet "GenericCl" ;
|
oper GenericCl : VP -> Cl = notYet "GenericCl" ;
|
||||||
oper IdetCN : IDet -> CN -> IP = notYet "IdetCN" ;
|
oper IdetCN : IDet -> CN -> IP = notYet "IdetCN" ;
|
||||||
oper IdetIP : IDet -> IP = notYet "IdetIP" ;
|
oper IdetIP : IDet -> IP = notYet "IdetIP" ;
|
||||||
oper IdetQuant : IQuant -> Num -> IDet = notYet "IdetQuant" ;
|
oper IdetQuant : IQuant -> Num -> IDet = notYet "IdetQuant" ;
|
||||||
oper IdRP : RP = notYet "IdRP" ;
|
|
||||||
oper ImpersCl : VP -> Cl = notYet "ImpersCl" ;
|
|
||||||
oper ImpPl1 : VP -> Utt = notYet "ImpPl1" ;
|
oper ImpPl1 : VP -> Utt = notYet "ImpPl1" ;
|
||||||
oper ImpVP : VP -> Imp = notYet "ImpVP" ;
|
oper ImpVP : VP -> Imp = notYet "ImpVP" ;
|
||||||
|
oper ImpersCl : VP -> Cl = notYet "ImpersCl" ;
|
||||||
oper NumDigits : Digits -> Card = notYet "NumDigits" ;
|
oper NumDigits : Digits -> Card = notYet "NumDigits" ;
|
||||||
oper NumNumeral : Numeral -> Card = notYet "NumNumeral" ;
|
|
||||||
oper OrdDigits : Digits -> Ord = notYet "OrdDigits" ;
|
oper OrdDigits : Digits -> Ord = notYet "OrdDigits" ;
|
||||||
oper OrdNumeral : Numeral -> Ord = notYet "OrdNumeral" ;
|
oper OrdNumeralSuperl : Numeral -> A -> Ord = notYet "OrdNumeralSuperl" ;
|
||||||
oper OrdSuperl : A -> Ord = notYet "OrdSuperl" ;
|
oper OrdSuperl : A -> Ord = notYet "OrdSuperl" ;
|
||||||
oper PossPron : Pron -> Quant = notYet "PossPron" ;
|
|
||||||
oper PPartNP : NP -> V2 -> NP = notYet "PPartNP" ;
|
oper PPartNP : NP -> V2 -> NP = notYet "PPartNP" ;
|
||||||
|
oper PartNP : CN -> NP -> CN = notYet "PartNP" ;
|
||||||
|
oper PossNP : CN -> NP -> CN = notYet "PossNP" ;
|
||||||
oper PredSCVP : SC -> VP -> Cl = notYet "PredSCVP" ;
|
oper PredSCVP : SC -> VP -> Cl = notYet "PredSCVP" ;
|
||||||
oper PrepIP : Prep -> IP -> IAdv = notYet "PrepIP" ;
|
oper PrepIP : Prep -> IP -> IAdv = notYet "PrepIP" ;
|
||||||
oper ProgrVP : VP -> VP = notYet "ProgrVP" ;
|
oper ProgrVP : VP -> VP = notYet "ProgrVP" ;
|
||||||
oper QuestCl : Cl -> QCl = notYet "QuestCl" ;
|
|
||||||
oper QuestIAdv : IAdv -> Cl -> QCl = notYet "QuestIAdv" ;
|
|
||||||
oper QuestIComp : IComp -> NP -> QCl = notYet "QuestIComp" ;
|
|
||||||
oper QuestSlash : IP -> ClSlash -> QCl = notYet "QuestSlash" ;
|
|
||||||
oper QuestVP : IP -> VP -> QCl = notYet "QuestVP" ;
|
|
||||||
oper ReflVP : VPSlash -> VP = notYet "ReflVP" ;
|
|
||||||
oper RelCl : Cl -> RCl = notYet "RelCl" ;
|
|
||||||
oper RelCN : CN -> RS -> CN = notYet "RelCN" ;
|
|
||||||
oper RelSlash : RP -> ClSlash -> RCl = notYet "RelSlash" ;
|
|
||||||
oper RelVP : RP -> VP -> RCl = notYet "RelVP" ;
|
|
||||||
oper SentCN : CN -> SC -> CN = notYet "SentCN" ;
|
|
||||||
oper SlashV2S : V2S -> S -> VPSlash = notYet "SlashV2S" ;
|
|
||||||
oper SlashV2V : V2V -> VP -> VPSlash = notYet "SlashV2V" ;
|
|
||||||
oper SlashV2VNP : V2V -> NP -> VPSlash -> VPSlash = notYet "SlashV2VNP" ;
|
|
||||||
oper SlashVS : NP -> VS -> SSlash -> ClSlash = notYet "SlashVS" ;
|
|
||||||
oper SlashVV : VV -> VPSlash -> VPSlash = notYet "SlashVV" ;
|
|
||||||
oper Use2N3 : N3 -> N2 = notYet "Use2N3" ;
|
|
||||||
oper UseQCl : Temp -> Pol -> QCl -> QS = notYet "UseQCl" ;
|
|
||||||
oper UseRCl : Temp -> Pol -> RCl -> RS = notYet "UseRCl" ;
|
|
||||||
oper UseSlash : Temp -> Pol -> ClSlash -> SSlash = notYet "UseSlash" ;
|
|
||||||
oper AddAdvQVP : QVP -> IAdv -> QVP = notYet "AddAdvQVP" ;
|
|
||||||
oper AdjDAP : DAP -> AP -> DAP = notYet "AdjDAP" ;
|
|
||||||
oper AdNum : AdN -> Card -> Card = notYet "AdNum" ;
|
|
||||||
oper AdvCN : CN -> Adv -> CN = notYet "AdvCN" ;
|
|
||||||
oper AdvIAdv : IAdv -> Adv -> IAdv = notYet "AdvIAdv" ;
|
|
||||||
oper AdvIP : IP -> Adv -> IP = notYet "AdvIP" ;
|
|
||||||
oper AdvQVP : VP -> IAdv -> QVP = notYet "AdvQVP" ;
|
|
||||||
oper AdvSlash : ClSlash -> Adv -> ClSlash = notYet "AdvSlash" ;
|
|
||||||
oper BaseAdV : AdV -> AdV -> ListAdV = notYet "BaseAdV" ;
|
|
||||||
oper BaseAP : AP -> AP -> ListAP = notYet "BaseAP" ;
|
|
||||||
oper BaseCN : CN -> CN -> ListCN = notYet "BaseCN" ;
|
|
||||||
oper BaseDAP : DAP -> DAP -> ListDAP = notYet "BaseDAP" ;
|
|
||||||
oper BaseIAdv : IAdv -> IAdv -> ListIAdv = notYet "BaseIAdv" ;
|
|
||||||
oper BaseRS : RS -> RS -> ListRS = notYet "BaseRS" ;
|
|
||||||
oper CompIP : IP -> IComp = notYet "CompIP" ;
|
|
||||||
oper ComplN2 : N2 -> NP -> CN = notYet "ComplN2" ;
|
|
||||||
oper ComplN3 : N3 -> NP -> N2 = notYet "ComplN3" ;
|
|
||||||
oper ComplSlashIP : VPSlash -> IP -> QVP = notYet "ComplSlashIP" ;
|
|
||||||
oper ConjAdv : Conj -> ListAdv -> Adv = notYet "ConjAdv" ;
|
|
||||||
oper ConjAdV : Conj -> ListAdV -> AdV = notYet "ConjAdV" ;
|
|
||||||
oper ConjAP : Conj -> ListAP -> AP = notYet "ConjAP" ;
|
|
||||||
oper ConjCN : Conj -> ListCN -> CN = notYet "ConjCN" ;
|
|
||||||
oper ConjDet : Conj -> ListDAP -> Det = notYet "ConjDet" ;
|
|
||||||
oper ConjIAdv : Conj -> ListIAdv -> IAdv = notYet "ConjIAdv" ;
|
|
||||||
oper ConjRS : Conj -> ListRS -> RS = notYet "ConjRS" ;
|
|
||||||
oper ConsAdV : AdV -> ListAdV -> ListAdV = notYet "ConsAdV" ;
|
|
||||||
oper ConsAP : AP -> ListAP -> ListAP = notYet "ConsAP" ;
|
|
||||||
oper ConsCN : CN -> ListCN -> ListCN = notYet "ConsCN" ;
|
|
||||||
oper ConsDAP : DAP -> ListDAP -> ListDAP = notYet "ConsDAP" ;
|
|
||||||
oper ConsIAdv : IAdv -> ListIAdv -> ListIAdv = notYet "ConsIAdv" ;
|
|
||||||
oper ConsRS : RS -> ListRS -> ListRS = notYet "ConsRS" ;
|
|
||||||
oper CountNP : Det -> NP -> NP = notYet "CountNP" ;
|
|
||||||
oper DetDAP : Det -> DAP = notYet "DetDAP" ;
|
|
||||||
oper DetQuantOrd : Quant -> Num -> Ord -> Det = notYet "DetQuantOrd" ;
|
|
||||||
oper EmbedQS : QS -> SC = notYet "EmbedQS" ;
|
|
||||||
oper EmbedS : S -> SC = notYet "EmbedS" ;
|
|
||||||
oper EmbedVP : VP -> SC = notYet "EmbedVP" ;
|
|
||||||
oper ExtAdvS : Adv -> S -> S = notYet "ExtAdvS" ;
|
|
||||||
oper ExtAdvVP : VP -> Adv -> VP = notYet "ExtAdvVP" ;
|
|
||||||
oper IdetCN : IDet -> CN -> IP = notYet "IdetCN" ;
|
|
||||||
oper IdetIP : IDet -> IP = notYet "IdetIP" ;
|
|
||||||
oper IdetQuant : IQuant -> Num -> IDet = notYet "IdetQuant" ;
|
|
||||||
oper ImpVP : VP -> Imp = notYet "ImpVP" ;
|
|
||||||
oper NumDigits : Digits -> Card = notYet "NumDigits" ;
|
|
||||||
oper NumNumeral : Numeral -> Card = notYet "NumNumeral" ;
|
|
||||||
oper OrdDigits : Digits -> Ord = notYet "OrdDigits" ;
|
|
||||||
oper OrdNumeral : Numeral -> Ord = notYet "OrdNumeral" ;
|
|
||||||
oper OrdNumeralSuperl : Numeral -> A -> Ord = notYet "OrdNumeralSuperl" ;
|
|
||||||
oper OrdSuperl : A -> Ord = notYet "OrdSuperl" ;
|
|
||||||
oper PartNP : CN -> NP -> CN = notYet "PartNP" ;
|
|
||||||
oper PossNP : CN -> NP -> CN = notYet "PossNP" ;
|
|
||||||
oper PossPron : Pron -> Quant = notYet "PossPron" ;
|
|
||||||
oper PPartNP : NP -> V2 -> NP = notYet "PPartNP" ;
|
|
||||||
oper PredSCVP : SC -> VP -> Cl = notYet "PredSCVP" ;
|
|
||||||
oper PrepIP : Prep -> IP -> IAdv = notYet "PrepIP" ;
|
|
||||||
oper QuestCl : Cl -> QCl = notYet "QuestCl" ;
|
|
||||||
oper QuestIAdv : IAdv -> Cl -> QCl = notYet "QuestIAdv" ;
|
|
||||||
oper QuestIComp : IComp -> NP -> QCl = notYet "QuestIComp" ;
|
|
||||||
oper QuestQVP : IP -> QVP -> QCl = notYet "QuestQVP" ;
|
oper QuestQVP : IP -> QVP -> QCl = notYet "QuestQVP" ;
|
||||||
oper QuestSlash : IP -> ClSlash -> QCl = notYet "QuestSlash" ;
|
oper QuestSlash : IP -> ClSlash -> QCl = notYet "QuestSlash" ;
|
||||||
oper QuestVP : IP -> VP -> QCl = notYet "QuestVP" ;
|
|
||||||
oper ReflVP : VPSlash -> VP = notYet "ReflVP" ;
|
oper ReflVP : VPSlash -> VP = notYet "ReflVP" ;
|
||||||
oper RelCN : CN -> RS -> CN = notYet "RelCN" ;
|
oper RelCN : CN -> RS -> CN = notYet "RelCN" ;
|
||||||
|
oper RelCl : Cl -> RCl = notYet "RelCl" ;
|
||||||
oper RelS : S -> RS -> S = notYet "RelS" ;
|
oper RelS : S -> RS -> S = notYet "RelS" ;
|
||||||
|
oper SSubjS : S -> Subj -> S -> S = notYet "SSubjS" ;
|
||||||
oper SentCN : CN -> SC -> CN = notYet "SentCN" ;
|
oper SentCN : CN -> SC -> CN = notYet "SentCN" ;
|
||||||
oper SlashV2S : V2S -> S -> VPSlash = notYet "SlashV2S" ;
|
oper SlashV2S : V2S -> S -> VPSlash = notYet "SlashV2S" ;
|
||||||
oper SlashV2V : V2V -> VP -> VPSlash = notYet "SlashV2V" ;
|
oper SlashV2V : V2V -> VP -> VPSlash = notYet "SlashV2V" ;
|
||||||
oper SlashV2VNP : V2V -> NP -> VPSlash -> VPSlash = notYet "SlashV2VNP" ;
|
oper SlashV2VNP : V2V -> NP -> VPSlash -> VPSlash = notYet "SlashV2VNP" ;
|
||||||
oper SlashVS : NP -> VS -> SSlash -> ClSlash = notYet "SlashVS" ;
|
oper SlashVS : NP -> VS -> SSlash -> ClSlash = notYet "SlashVS" ;
|
||||||
oper SlashVV : VV -> VPSlash -> VPSlash = notYet "SlashVV" ;
|
oper SlashVV : VV -> VPSlash -> VPSlash = notYet "SlashVV" ;
|
||||||
oper SSubjS : S -> Subj -> S -> S = notYet "SSubjS" ;
|
|
||||||
oper Use2N3 : N3 -> N2 = notYet "Use2N3" ;
|
oper Use2N3 : N3 -> N2 = notYet "Use2N3" ;
|
||||||
oper Use3N3 : N3 -> N2 = notYet "Use3N3" ;
|
oper Use3N3 : N3 -> N2 = notYet "Use3N3" ;
|
||||||
oper UseQCl : Temp -> Pol -> QCl -> QS = notYet "UseQCl" ;
|
-- Error: No type found for UsePronNonDrop
|
||||||
oper UseRCl : Temp -> Pol -> RCl -> RS = notYet "UseRCl" ;
|
|
||||||
oper UseSlash : Temp -> Pol -> ClSlash -> SSlash = notYet "UseSlash" ;
|
oper UseSlash : Temp -> Pol -> ClSlash -> SSlash = notYet "UseSlash" ;
|
||||||
oper VPSlashPrep : VP -> Prep -> VPSlash = notYet "VPSlashPrep" ;
|
oper VPSlashPrep : VP -> Prep -> VPSlash = notYet "VPSlashPrep" ;
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ concrete NounLat of Noun = CatLat ** open ResLat, Prelude, ConjunctionLat in {
|
|||||||
adv = cn.adv ;
|
adv = cn.adv ;
|
||||||
preap = cn.preap ;
|
preap = cn.preap ;
|
||||||
postap = cn.postap ;
|
postap = cn.postap ;
|
||||||
det = det
|
det = { s = det.s ! cn.g ; sp = det.sp ! cn.g } ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- UsePN : PN -> NP ; -- John
|
-- UsePN : PN -> NP ; -- John
|
||||||
@@ -22,7 +22,7 @@ concrete NounLat of Noun = CatLat ** open ResLat, Prelude, ConjunctionLat in {
|
|||||||
p = P3 ;
|
p = P3 ;
|
||||||
adv = "" ;
|
adv = "" ;
|
||||||
preap, postap = { s = \\_ => "" } ;
|
preap, postap = { s = \\_ => "" } ;
|
||||||
det = { s,sp = \\_,_ => "" ; n = Sg }
|
det = { s,sp = \\_ => "" ; n = Sg }
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- UsePron : Pron -> NP ; -- he
|
-- UsePron : Pron -> NP ; -- he
|
||||||
@@ -33,13 +33,13 @@ concrete NounLat of Noun = CatLat ** open ResLat, Prelude, ConjunctionLat in {
|
|||||||
s = \\pd,c => p.pers.s ! pd ! PronNonRefl ! c;
|
s = \\pd,c => p.pers.s ! pd ! PronNonRefl ! c;
|
||||||
adv = "" ;
|
adv = "" ;
|
||||||
preap, postap = { s = \\_ => "" } ;
|
preap, postap = { s = \\_ => "" } ;
|
||||||
det = { s,sp = \\_,_ => "" ; n = p.pers.n } ;
|
det = { s,sp = \\_ => "" ; n = p.pers.n } ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- PredetNP : Predet -> NP -> NP ; -- only the man
|
-- PredetNP : Predet -> NP -> NP ; -- only the man
|
||||||
PredetNP predet np =
|
PredetNP predet np =
|
||||||
np ** {
|
np ** {
|
||||||
det = np.det ** { s = \\g,c => predet.s ++ np.det.s ! g ! c }
|
det = { s = \\c => predet.s ++ np.det.s ! c ; sp = np.det.sp }
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- PPartNP : NP -> V2 -> NP ; -- the man seen
|
-- PPartNP : NP -> V2 -> NP ; -- the man seen
|
||||||
@@ -64,7 +64,7 @@ concrete NounLat of Noun = CatLat ** open ResLat, Prelude, ConjunctionLat in {
|
|||||||
ExtAdvNP = AdvNP ;
|
ExtAdvNP = AdvNP ;
|
||||||
|
|
||||||
-- RelNP : NP -> RS -> NP ; -- Paris, which is here
|
-- RelNP : NP -> RS -> NP ; -- Paris, which is here
|
||||||
RelNP np rs = np ** { adv = rs.s ++ np.adv } ;
|
RelNP np rs = np ** { adv = bindComma ++ rs.s ! np.g ! np.n ++ np.adv } ;
|
||||||
|
|
||||||
-- DetNP : Det -> NP ; -- these five
|
-- DetNP : Det -> NP ; -- these five
|
||||||
DetNP det = {
|
DetNP det = {
|
||||||
@@ -74,7 +74,7 @@ concrete NounLat of Noun = CatLat ** open ResLat, Prelude, ConjunctionLat in {
|
|||||||
p = P3 ;
|
p = P3 ;
|
||||||
adv = "" ;
|
adv = "" ;
|
||||||
preap, postap = { s = \\_ => "" } ;
|
preap, postap = { s = \\_ => "" } ;
|
||||||
det = { s,sp = \\_,_ => "" ; n = det.n } ;
|
det = { s,sp = \\_ => "" ; n = det.n } ;
|
||||||
} ;
|
} ;
|
||||||
--
|
--
|
||||||
-- DetQuantOrd quant num ord = {
|
-- DetQuantOrd quant num ord = {
|
||||||
@@ -85,13 +85,13 @@ concrete NounLat of Noun = CatLat ** open ResLat, Prelude, ConjunctionLat in {
|
|||||||
--
|
--
|
||||||
DetQuant quant num = {
|
DetQuant quant num = {
|
||||||
s = \\g,c => quant.s ! Ag g num.n c ++ num.s ! g ! c ;
|
s = \\g,c => quant.s ! Ag g num.n c ++ num.s ! g ! c ;
|
||||||
sp = \\g,c => quant.sp ! Ag g num.n c ++ num.s ! g ! c ;
|
sp = \\g,c => quant.sp ! Ag g num.n c ;
|
||||||
n = num.n
|
n = num.n
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- PossPron p = {
|
PossPron p = { s = \\a => p.poss.s ! PronNonRefl ! a ; sp = \\_ => "" } ;
|
||||||
-- s = \\_,_ => p.s ! Gen ;
|
-- s = \\_,_ => p.s ! Gen ;
|
||||||
-- sp = \\_,_ => p.sp
|
-- sp = \\_,_ => p.sp
|
||||||
-- } ;
|
-- } ;
|
||||||
@@ -105,8 +105,10 @@ concrete NounLat of Noun = CatLat ** open ResLat, Prelude, ConjunctionLat in {
|
|||||||
-- OrdDigits n = {s = n.s ! NOrd} ;
|
-- OrdDigits n = {s = n.s ! NOrd} ;
|
||||||
--
|
--
|
||||||
lin
|
lin
|
||||||
-- NumNumeral numeral = numeral.s ;
|
-- NumNumeral : Numeral -> Card ; -- fifty-one
|
||||||
-- OrdNumeral numeral = numeral.ord ;
|
NumNumeral numeral = { s = numeral.s ; n = numeral.n } ;
|
||||||
|
-- OrdNumeral : Numeral -> Ord ; -- fifty-first
|
||||||
|
OrdNumeral numeral = { s = numeral.ord } ;
|
||||||
--
|
--
|
||||||
-- AdNum adn num = {s = adn.s ++ num.s ; n = num.n} ;
|
-- AdNum adn num = {s = adn.s ++ num.s ; n = num.n} ;
|
||||||
--
|
--
|
||||||
@@ -128,7 +130,7 @@ concrete NounLat of Noun = CatLat ** open ResLat, Prelude, ConjunctionLat in {
|
|||||||
-- s = case cn.massable of { True => cn.s ! Sg ; False => \\_ => nonExist } ;
|
-- s = case cn.massable of { True => cn.s ! Sg ; False => \\_ => nonExist } ;
|
||||||
n = Sg ;
|
n = Sg ;
|
||||||
p = P3 ;
|
p = P3 ;
|
||||||
det = { s,sp = \\_,_ => "" ; n = Sg } ;
|
det = { s,sp = \\_ => "" ; n = Sg } ;
|
||||||
};
|
};
|
||||||
|
|
||||||
UseN n = -- N -> CN
|
UseN n = -- N -> CN
|
||||||
@@ -175,6 +177,11 @@ concrete NounLat of Noun = CatLat ** open ResLat, Prelude, ConjunctionLat in {
|
|||||||
ApposCN cn np =
|
ApposCN cn np =
|
||||||
cn **
|
cn **
|
||||||
{
|
{
|
||||||
s = \\n,c => cn.s ! n ! c ++ (combineNounPhrase np) ! PronNonDrop ! c ;
|
s = \\n,c => cn.s ! n ! c ++ (combineNounPhrase np) ! PronNonDrop ! APostN ! DPreN ! c ;
|
||||||
} ; -- massable = cn.massable } ;
|
} ; -- massable = cn.massable } ;
|
||||||
}
|
|
||||||
|
-- CountNP : Det -> NP -> NP ; -- three of them, some of the boys
|
||||||
|
CountNP det np = np ** {
|
||||||
|
det = { s = \\c => det.s ! np.g ! c ++ np.det.s ! c ; sp = \\c => det.sp ! np.g ! c ++ np.det.sp ! c } ;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -18,111 +18,136 @@ concrete NumeralLat of Numeral = CatLat, ParamX[Number] ** open ParadigmsLat, Pr
|
|||||||
n9 = lin Digit ( mkDigit "novem" "undeviginti" "nonaginta" "nongenti" "nonus" "centum" No9 ) ;
|
n9 = lin Digit ( mkDigit "novem" "undeviginti" "nonaginta" "nongenti" "nonus" "centum" No9 ) ;
|
||||||
|
|
||||||
-- 1
|
-- 1
|
||||||
pot01 = { s = n1.s ! one ; d = n1.s ; n = singular ; below8 = n1.below8 } ;
|
pot01 = {
|
||||||
|
s = n1.s ! one ;
|
||||||
|
d = { num, ord = n1.s } ;
|
||||||
|
n = singular ;
|
||||||
|
below8 = n1.below8 ;
|
||||||
|
ord = n1.ord ! one
|
||||||
|
} ;
|
||||||
-- d * 1
|
-- d * 1
|
||||||
pot0 d = {
|
pot0 d = {
|
||||||
s = d.s ! one ;
|
s = d.s ! one ;
|
||||||
d = table {
|
d = { num,ord = table {
|
||||||
thousand => \\g,c => d.s ! one ! g ! c ++ d.s ! thousand ! g ! c ;
|
thousand => \\g,c => d.s ! one ! g ! c ++ d.s ! thousand ! g ! c ;
|
||||||
u => \\g,c => d.s ! u ! g ! c
|
u => \\g,c => d.s ! u ! g ! c
|
||||||
} ;
|
}
|
||||||
|
};
|
||||||
n = plural ;
|
n = plural ;
|
||||||
below8 = d.below8
|
below8 = d.below8 ;
|
||||||
|
ord = d.ord ! one ;
|
||||||
} ;
|
} ;
|
||||||
-- 10
|
-- 10
|
||||||
pot110 = {
|
pot110 = {
|
||||||
s = n1.s ! ten ;
|
s = n1.s ! ten ;
|
||||||
d = table {
|
d = { num, ord = table {
|
||||||
thousand => \\g,c => n1.s ! ten ! g ! c ++ n1.s ! thousand ! g ! c ;
|
thousand => \\g,c => n1.s ! ten ! g ! c ++ n1.s ! thousand ! g ! c ;
|
||||||
u => \\g,c => n1.s ! u ! g ! c
|
u => \\g,c => n1.s ! u ! g ! c
|
||||||
} ;
|
}
|
||||||
|
};
|
||||||
n = singular ;
|
n = singular ;
|
||||||
below8 = Yes
|
below8 = Yes ;
|
||||||
|
ord = n1.ord ! ten
|
||||||
} ;
|
} ;
|
||||||
-- 11
|
-- 11
|
||||||
pot111 = pot1to19 n1 ;
|
pot111 = pot1to19 n1 ;
|
||||||
-- 10 + d
|
-- 10 + d
|
||||||
pot1to19 d = {
|
pot1to19 d = {
|
||||||
s = d.s ! eleven ;
|
s = d.s ! eleven ;
|
||||||
d = table {
|
d = { num, ord = table {
|
||||||
thousand => \\g,c => d.s ! eleven ! g ! c ++ n1.s ! thousand ! g ! c ;
|
thousand => \\g,c => d.s ! eleven ! g ! c ++ n1.s ! thousand ! g ! c ;
|
||||||
u => \\g,c => d.s ! u ! g ! c
|
u => \\g,c => d.s ! u ! g ! c
|
||||||
} ;
|
}
|
||||||
|
};
|
||||||
n = plural ;
|
n = plural ;
|
||||||
below8 = Ign
|
below8 = Ign ;
|
||||||
|
ord = n1.ord ! eleven
|
||||||
} ;
|
} ;
|
||||||
-- coercion of 1..9
|
-- coercion of 1..9
|
||||||
pot0as1 n = n ;
|
pot0as1 n = n ;
|
||||||
-- d * 10
|
-- d * 10
|
||||||
pot1 d = {
|
pot1 d = {
|
||||||
s = d.s ! ten ;
|
s = d.s ! ten ;
|
||||||
d = table {
|
d = { num, ord = table {
|
||||||
thousand => \\g,c => d.s ! ten ! g ! c ++ n1.s ! thousand ! g ! c ;
|
thousand => \\g,c => d.s ! ten ! g ! c ++ n1.s ! thousand ! g ! c ;
|
||||||
u => \\g,c => d.s ! u ! g ! c
|
u => \\g,c => d.s ! u ! g ! c
|
||||||
} ;
|
}
|
||||||
|
};
|
||||||
n = plural ;
|
n = plural ;
|
||||||
below8 = Yes
|
below8 = Yes ;
|
||||||
|
ord = d.ord ! ten
|
||||||
} ;
|
} ;
|
||||||
-- d * 10 + n
|
-- d * 10 + n
|
||||||
pot1plus d n =
|
pot1plus d n =
|
||||||
let
|
let
|
||||||
newS : Gender => Case => Str = \\g,c => case n.below8 of {
|
newS : Gender => Case => Str = \\g,c => case n.below8 of {
|
||||||
No8 => "duo" ++ Prelude.BIND ++ "-" ++ Prelude.BIND ++ "de" ++ Prelude.BIND ++ "-" ++ Prelude.BIND ++ d.tenNext ;
|
No8 => "duo" ++ Prelude.BIND ++ "de" ++ Prelude.BIND ++ d.tenNext ;
|
||||||
No9 => "un" ++ Prelude.BIND ++ "-" ++ Prelude.BIND ++ "de" ++ Prelude.BIND ++ "-" ++ Prelude.BIND ++ d.tenNext ;
|
No9 => "un" ++ Prelude.BIND ++ "de" ++ Prelude.BIND ++ d.tenNext ;
|
||||||
_ => d.s ! ten ! g ! c ++ n.s ! g ! c
|
_ => d.s ! ten ! g ! c ++ n.s ! g ! c
|
||||||
} in
|
} in
|
||||||
{
|
{
|
||||||
s = newS ;
|
s = newS ;
|
||||||
d = table {
|
d = { num, ord = table {
|
||||||
thousand => \\g,c => newS ! g ! c ++ n1.s ! thousand ! g ! c ;
|
thousand => \\g,c => newS ! g ! c ++ n1.s ! thousand ! g ! c ;
|
||||||
u => \\g,c => n.d ! u ! g ! c
|
u => \\g,c => n.d.num ! u ! g ! c
|
||||||
} ;
|
}
|
||||||
|
};
|
||||||
below8 = Ign ;
|
below8 = Ign ;
|
||||||
n = plural
|
n = plural ;
|
||||||
|
ord = \\_,_,_ => nonExist -- TODO
|
||||||
} ;
|
} ;
|
||||||
-- coercion of 1..99
|
-- coercion of 1..99
|
||||||
pot1as2 n = n ;
|
pot1as2 n = n ;
|
||||||
-- m * 100
|
-- m * 100
|
||||||
pot2 n = {
|
pot2 n = {
|
||||||
s = n.d ! hundred ;
|
s = n.d.num ! hundred ;
|
||||||
d = table {
|
d = { num, ord = table {
|
||||||
thousand => \\g,c => n.d ! hundred ! g ! c ++ n1.s ! thousand ! g ! c ;
|
thousand => \\g,c => n.d.num ! hundred ! g ! c ++ n1.s ! thousand ! g ! c ;
|
||||||
u => \\g,c => n.d ! u ! g ! c
|
u => \\g,c => n.d.num ! u ! g ! c
|
||||||
} ;
|
}
|
||||||
|
};
|
||||||
n = plural ;
|
n = plural ;
|
||||||
below8 = Yes} ;
|
below8 = Yes ;
|
||||||
|
ord = \\_,_,_ => nonExist -- TODO
|
||||||
|
} ;
|
||||||
-- d * 100 + n
|
-- d * 100 + n
|
||||||
pot2plus d n =
|
pot2plus d n =
|
||||||
let
|
let
|
||||||
newS : Gender => Case => Str = \\g,c => d.d ! hundred ! g ! c ++ "et" ++ n.s ! g ! c
|
newS : Gender => Case => Str = \\g,c => d.d.num ! hundred ! g ! c ++ "et" ++ n.s ! g ! c
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
s = newS ;
|
s = newS ;
|
||||||
d = table {
|
d = { num, ord = table {
|
||||||
thousand => \\g,c => newS ! g ! c ++ n1.s ! thousand ! g ! c ;
|
thousand => \\g,c => newS ! g ! c ++ n1.s ! thousand ! g ! c ;
|
||||||
u => \\g,c => n.d ! u ! g ! c
|
u => \\g,c => n.d.num ! u ! g ! c
|
||||||
} ;
|
}
|
||||||
|
};
|
||||||
below8 = Ign ;
|
below8 = Ign ;
|
||||||
n = plural
|
n = plural;
|
||||||
|
ord = \\_,_,_ => nonExist -- TODO
|
||||||
} ;
|
} ;
|
||||||
-- coercion of 1..999
|
-- coercion of 1..999
|
||||||
pot2as3 n = n ;
|
pot2as3 n = n ;
|
||||||
-- m * 1000
|
-- m * 1000
|
||||||
pot3 n = {
|
pot3 n = {
|
||||||
s = \\g,c => n.s ! g ! c ++ n.d ! thousand ! g ! c ;
|
s = \\g,c => n.s ! g ! c ++ n.d.num ! thousand ! g ! c ;
|
||||||
d = table { thousand => \\g,c => n.s ! g ! c ++ n.d ! thousand ! g ! c ;
|
d = { num,ord = table {
|
||||||
u => \\g,c => n.d ! u ! g ! c
|
thousand => \\g,c => n.s ! g ! c ++ n.d.num ! thousand ! g ! c ;
|
||||||
|
u => \\g,c => n.d.num ! u ! g ! c
|
||||||
|
}
|
||||||
} ;
|
} ;
|
||||||
below8 = Ign ;
|
below8 = Ign ;
|
||||||
n = plural
|
n = plural ;
|
||||||
|
ord = \\_,_,_ => nonExist -- TODO
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- d * 1000 + n
|
-- d * 1000 + n
|
||||||
pot3plus d n = {
|
pot3plus d n = {
|
||||||
s = \\g,c => d.d ! thousand ! g ! c ++ "et" ++ n.s ! g ! c ;
|
s = \\g,c => d.d.num ! thousand ! g ! c ++ "et" ++ n.s ! g ! c ;
|
||||||
d = n.d ;
|
d = n.d ; -- ???
|
||||||
below8 = Ign ;
|
below8 = Ign ;
|
||||||
n = plural
|
n = plural ;
|
||||||
|
ord = \\_,_,_ => nonExist -- TODO
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
@@ -146,14 +171,15 @@ concrete NumeralLat of Numeral = CatLat, ParamX[Number] ** open ParadigmsLat, Pr
|
|||||||
hundred_thousand => \\_,_ => nonExist
|
hundred_thousand => \\_,_ => nonExist
|
||||||
} ;
|
} ;
|
||||||
-- n = case ones of { "unus" => singular ; _ => plural } ;
|
-- n = case ones of { "unus" => singular ; _ => plural } ;
|
||||||
-- ord =
|
ord =
|
||||||
-- \\_,_ => [] ;
|
table { one => ordFlex ord1 ;
|
||||||
-- -- table { one => (mkA ord1).s ! Posit;
|
eleven => \\_,_,_ => nonExist ;
|
||||||
-- -- ten => (mkA ord10).s ! Posit ;
|
ten => ordFlex ord10 ;
|
||||||
-- -- hundred => (mkA ord100).s ! Posit ;
|
hundred => ordFlex ord100 ;
|
||||||
-- -- thousand => \\_,_ => nonExist ;
|
thousand => \\_,_,_ => nonExist ;
|
||||||
-- -- ten_thousand => \\_ => nonExist ;
|
ten_thousand => \\_,_,_ => nonExist ;
|
||||||
-- -- hundred_thousand => \\_ => nonExist } ;
|
hundred_thousand => \\_,_,_ => nonExist
|
||||||
|
} ;
|
||||||
tenNext = tenNext ;
|
tenNext = tenNext ;
|
||||||
below8 = b8
|
below8 = b8
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ concrete PhraseLat of Phrase = CatLat ** open Prelude, ResLat in {
|
|||||||
PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
|
PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
|
||||||
--
|
--
|
||||||
-- UttS : S -> Utt
|
-- UttS : S -> Utt
|
||||||
UttS s = { s = combineSentence s ! SPreS ! PreS ! CPreV ! SOV };
|
UttS s = { s = defaultSentence s ! SOV };
|
||||||
|
|
||||||
-- UttQS : QS -> Utt
|
-- UttQS : QS -> Utt
|
||||||
UttQS qs = {s = qs.s ! QDir } ;
|
UttQS qs = {s = qs.s ! QDir } ;
|
||||||
@@ -18,7 +18,7 @@ concrete PhraseLat of Phrase = CatLat ** open Prelude, ResLat in {
|
|||||||
-- UttIAdv : IAdv -> Utt
|
-- UttIAdv : IAdv -> Utt
|
||||||
UttIAdv iadv = iadv ;
|
UttIAdv iadv = iadv ;
|
||||||
-- UttNP : NP -> Utt
|
-- UttNP : NP -> Utt
|
||||||
UttNP np = {s = np.adv ++ (combineNounPhrase np) ! PronNonDrop ! Nom} ;
|
UttNP np = {s = np.adv ++ (combineNounPhrase np) ! PronNonDrop ! APostN ! DPreN ! Nom} ;
|
||||||
-- UttVP : VP -> Utt
|
-- UttVP : VP -> Utt
|
||||||
UttVP vp = ss (vp.inf ! VInfActPres) ;
|
UttVP vp = ss (vp.inf ! VInfActPres) ;
|
||||||
|
|
||||||
@@ -36,6 +36,6 @@ concrete PhraseLat of Phrase = CatLat ** open Prelude, ResLat in {
|
|||||||
PConjConj conj = {s = conj.s2} ; ---
|
PConjConj conj = {s = conj.s2} ; ---
|
||||||
--
|
--
|
||||||
NoVoc = {s = []} ;
|
NoVoc = {s = []} ;
|
||||||
VocNP np = {s = "," ++ (combineNounPhrase np) ! PronNonDrop ! ResLat.Voc} ; ---- what is the compiler error here? AR 1/2/2014 -- answer: clash with the type name Voc 3/2
|
VocNP np = {s = bindComma ++ (combineNounPhrase np) ! PronNonDrop ! APostN ! DPreN ! ResLat.Voc} ; ---- what is the compiler error here? AR 1/2/2014 -- answer: clash with the type name Voc 3/2
|
||||||
--
|
--
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ concrete QuestionLat of Question = CatLat ** open ResLat, IrregLat, Prelude in {
|
|||||||
lin
|
lin
|
||||||
-- QuestCl : Cl -> QCl ; -- does John walk
|
-- QuestCl : Cl -> QCl ; -- does John walk
|
||||||
QuestCl cl = cl ** {
|
QuestCl cl = cl ** {
|
||||||
v = \\t,a,_,ap,cp => cl.v ! t ! a ! VQTrue ! ap ! cp ;
|
v = \\t,a,_,ap => cl.v ! t ! a ! VQTrue ! ap ;
|
||||||
q = ""
|
q = ""
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -17,7 +17,9 @@ concrete QuestionLat of Question = CatLat ** open ResLat, IrregLat, Prelude in {
|
|||||||
neg = \\_,_ => "" ;
|
neg = \\_,_ => "" ;
|
||||||
o = \\_ => vp.obj ;
|
o = \\_ => vp.obj ;
|
||||||
q = ip.s ! Nom ;
|
q = ip.s ! Nom ;
|
||||||
v = \\t,a,_,ap,cp => vp.s ! VAct (anteriorityToVAnter a) (tenseToVTense t) ip.n P3 ! VQFalse
|
v = \\t,a,_,ap => vp.s ! VAct (anteriorityToVAnter a) (tenseToVTense t) ip.n P3 ! VQFalse ;
|
||||||
|
compl = vp.compl ! Ag Masc ip.n Nom ; -- default gender masculine
|
||||||
|
det = { s, sp = \\_ => [] ; n = ip.n } ;
|
||||||
} ;
|
} ;
|
||||||
-- let qcl = mkQuestion { s = ip.s ! Nom } ( mkClause emptyNP vp )
|
-- let qcl = mkQuestion { s = ip.s ! Nom } ( mkClause emptyNP vp )
|
||||||
-- in {s = \\t,a,b,qd => qcl.s ! t ! a ! b ! qd} ;
|
-- in {s = \\t,a,b,qd => qcl.s ! t ! a ! b ! qd} ;
|
||||||
@@ -37,9 +39,11 @@ concrete QuestionLat of Question = CatLat ** open ResLat, IrregLat, Prelude in {
|
|||||||
s = \\_ => "" ;
|
s = \\_ => "" ;
|
||||||
adv = "" ;
|
adv = "" ;
|
||||||
neg = \\_,_ => "" ;
|
neg = \\_,_ => "" ;
|
||||||
o = \\_ => combineNounPhrase np ! PronNonDrop ! Nom ; -- Should probably not go into the object field
|
o = \\_ => combineNounPhrase np ! PronNonDrop ! APostN ! DPreN ! Nom ; -- Should probably not go into the object field
|
||||||
q = icomp.s ;
|
q = icomp.s ;
|
||||||
v = \\t,a,_,ap,cp => esseAux.act ! VAct (anteriorityToVAnter a) (tenseToVTense t) np.n P3 ;
|
v = \\t,a,_,ap => esseAux.act ! VAct (anteriorityToVAnter a) (tenseToVTense t) np.n P3 ;
|
||||||
|
det = { s , sp = \\_=> [] ; n = Sg } ; -- default number singilar
|
||||||
|
compl = "" ;
|
||||||
} ;
|
} ;
|
||||||
--
|
--
|
||||||
--
|
--
|
||||||
|
|||||||
@@ -2,14 +2,14 @@ concrete RelativeLat of Relative = CatLat ** open ResLat in {
|
|||||||
--
|
--
|
||||||
-- flags optimize=all_subs ;
|
-- flags optimize=all_subs ;
|
||||||
--
|
--
|
||||||
-- lin
|
lin
|
||||||
--
|
--
|
||||||
-- RelCl cl = {
|
-- RelCl cl = {
|
||||||
-- s = \\t,a,p,_ => "such" ++ "that" ++ cl.s ! t ! a ! p ! ODir ;
|
-- s = \\t,a,p,_ => "such" ++ "that" ++ cl.s ! t ! a ! p ! ODir ;
|
||||||
-- c = Nom
|
-- c = Nom
|
||||||
-- } ;
|
-- } ;
|
||||||
--
|
--
|
||||||
-- RelVP rp vp = {
|
RelVP rp vp = { s = \\g,n => mkClause (emptyNP ** { s = \\_,c => rp.s ! (Ag g n c) ; g = g ; n = n } ) vp };
|
||||||
-- s = \\t,ant,b,ag =>
|
-- s = \\t,ant,b,ag =>
|
||||||
-- let
|
-- let
|
||||||
-- agr = case rp.a of {
|
-- agr = case rp.a of {
|
||||||
@@ -25,19 +25,43 @@ concrete RelativeLat of Relative = CatLat ** open ResLat in {
|
|||||||
---- Pied piping: "at which we are looking". Stranding and empty
|
---- Pied piping: "at which we are looking". Stranding and empty
|
||||||
---- relative are defined in $ExtraLat.gf$ ("that we are looking at",
|
---- relative are defined in $ExtraLat.gf$ ("that we are looking at",
|
||||||
---- "we are looking at").
|
---- "we are looking at").
|
||||||
--
|
--
|
||||||
-- RelSlash rp slash = {
|
-- RelSlash : RP -> ClSlash -> RCl ;
|
||||||
|
RelSlash rp slash = { s = \\g,n => slash ** { adv = rp.s ! Ag g n Gen } } ; -- abuse adverbs again
|
||||||
-- s = \\t,a,p,agr =>
|
-- s = \\t,a,p,agr =>
|
||||||
-- slash.c2 ++ rp.s ! RPrep (fromAgr agr).g ++ slash.s ! t ! a ! p ! ODir ;
|
-- slash.c2 ++ rp.s ! RPrep (fromAgr agr).g ++ slash.s ! t ! a ! p ! ODir ;
|
||||||
-- c = Acc
|
-- c = Acc
|
||||||
-- } ;
|
|
||||||
--
|
--
|
||||||
-- FunRP p np rp = {
|
FunRP p np rp = {
|
||||||
-- s = \\c => (combineNounPhrase np) ! PronNonDrop ! Acc ++ p.s ++ rp.s ! RPrep (fromAgr np.a).g ;
|
s = \\a => case a of { Ag g n c => rp.s ! a ++ p.s ++ (combineNounPhrase np) ! PronNonDrop ! APostN ! DPreN ! Acc };
|
||||||
-- a = RAg np.a
|
-- s = \\c => (combineNounPhrase np) ! PronNonDrop ! Acc ++ p.s ++ rp.s ! RPrep (fromAgr np.a).g ;
|
||||||
-- } ;
|
-- a = RAg np.a
|
||||||
|
} ;
|
||||||
--
|
--
|
||||||
-- IdRP =
|
IdRP = {
|
||||||
|
s = table {
|
||||||
|
Ag Masc Sg (Nom | Voc) => "qui" ;
|
||||||
|
Ag Fem Sg (Nom | Voc) => "quae" ;
|
||||||
|
Ag Neutr Sg (Nom | Voc) => "quod" ;
|
||||||
|
Ag _ Sg Gen => "cuius" ;
|
||||||
|
Ag _ Sg Dat => "cui" ;
|
||||||
|
Ag Masc Sg Acc => "quem" ;
|
||||||
|
Ag Fem Sg Acc => "quam" ;
|
||||||
|
Ag Neutr Sg Acc => "quod" ;
|
||||||
|
Ag (Masc | Neutr) Sg Abl => "quo" ;
|
||||||
|
Ag Fem Sg Abl => "qua" ;
|
||||||
|
Ag Masc Pl (Nom | Voc) => "qui" ;
|
||||||
|
Ag (Fem | Neutr) Pl (Nom | Voc) => "quae" ;
|
||||||
|
Ag (Masc | Neutr) Pl Gen => "quorum" ;
|
||||||
|
Ag Fem Pl Gen => "quarum" ;
|
||||||
|
Ag _ Pl Dat => "quibus" ;
|
||||||
|
Ag Masc Pl Acc => "quos" ;
|
||||||
|
Ag Fem Pl Acc => "quas" ;
|
||||||
|
Ag Neutr Pl Acc => "quae" ;
|
||||||
|
Ag _ Pl Abl => "cui"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
;
|
||||||
-- let varr : Str -> Str = \x -> variants {x ; "that"} --- for bwc
|
-- let varr : Str -> Str = \x -> variants {x ; "that"} --- for bwc
|
||||||
-- in {
|
-- in {
|
||||||
-- s = table {
|
-- s = table {
|
||||||
|
|||||||
@@ -22,13 +22,22 @@ param
|
|||||||
adv : Str ;
|
adv : Str ;
|
||||||
preap : {s : Agr => Str } ;
|
preap : {s : Agr => Str } ;
|
||||||
postap : {s : Agr => Str } ;
|
postap : {s : Agr => Str } ;
|
||||||
det : Determiner
|
det : { s, sp : Case => Str } ;
|
||||||
} ;
|
} ;
|
||||||
param
|
param
|
||||||
|
-- Parameters to determine word order
|
||||||
|
-- top level order, e.g. subject verb object
|
||||||
Order = SVO | VSO | VOS | OSV | OVS | SOV ;
|
Order = SVO | VSO | VOS | OSV | OVS | SOV ;
|
||||||
AdvPos = PreS | PreV | PreO | PreNeg | InV | InS ; -- | InO
|
-- determiner position in a noun phrase, e.g. before or after noun
|
||||||
|
DetPos = DPreN | DPostN ;
|
||||||
|
-- verb position, eithe regular or interleaved in the subject
|
||||||
|
VPos = VReg | VInS ;
|
||||||
|
-- (verb-modifying) adverb position
|
||||||
|
AdvPos = APreS | APreV | APreO | APreNeg | AInV | AInS | APreN | APostN ; -- | InO
|
||||||
|
-- verb complement position in relation to verb
|
||||||
ComplPos = CPreV | CPostV ;
|
ComplPos = CPreV | CPostV ;
|
||||||
SAdvPos = SPreS | SPreV | SPreO | SPreNeg ;
|
-- sentence adverb position
|
||||||
|
SAdvPos = SAPreS | SAPreV | SAPreO | SAPreNeg ;
|
||||||
param
|
param
|
||||||
Agr = Ag Gender Number Case ; -- Agreement for NP et al.
|
Agr = Ag Gender Number Case ; -- Agreement for NP et al.
|
||||||
oper
|
oper
|
||||||
@@ -141,15 +150,20 @@ param
|
|||||||
p = P3;
|
p = P3;
|
||||||
adv = "" ;
|
adv = "" ;
|
||||||
preap, postap = { s = \\_ => "" } ;
|
preap, postap = { s = \\_ => "" } ;
|
||||||
det = { s = \\_,_ => "" ; sp = \\_,_ => "" ; n = n} ;
|
det = { s,sp = \\_ => "" ; n = n} ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
dummyNP : Str -> NounPhrase = \s -> regNP s s s s s s Masc Sg ;
|
dummyNP : Str -> NounPhrase = \s -> regNP s s s s s s Masc Sg ;
|
||||||
|
|
||||||
emptyNP : NounPhrase = { s = \\_,_ => ""; g = Masc; n = Sg; p = P1 ; adv = "" ; preap, postap = { s = \\_ => "" } ; det = { s = \\_,_ => "" ; sp = \\_,_ => "" ; n = Sg } ;};
|
emptyNP : NounPhrase = { s = \\_,_ => ""; g = Masc; n = Sg; p = P3 ; adv = "" ; preap, postap = { s = \\_ => "" } ; det = { s , sp = \\_ => "" ; n = Sg } ;};
|
||||||
|
|
||||||
combineNounPhrase : NounPhrase -> PronDropForm => Case => Str = \np ->
|
combineNounPhrase : NounPhrase -> PronDropForm => AdvPos => DetPos => Case => Str = \np ->
|
||||||
\\pd,c => np.det.s ! np.g ! c ++ np.adv ++ np.preap.s ! (Ag np.g np.n c) ++ np.s ! pd ! c ++ np.postap.s ! (Ag np.g np.n c) ++ np.det.sp ! np.g ! c ;
|
let detpren : DetPos -> { s , sp : Case => Str} = \dp -> case dp of { DPreN => np.det ; _ => { s, sp = \\_ => [] } } ;
|
||||||
|
detpostn : DetPos -> { s , sp : Case => Str} = \dp -> case dp of { DPostN => np.det ; _ => { s, sp = \\_ => [] } } ;
|
||||||
|
apren : AdvPos -> Str = \ap -> case ap of { APreN => np.adv ; _ => [] } ;
|
||||||
|
apostn : AdvPos -> Str = \ap -> case ap of { APostN => np.adv ; _ => [] } ;
|
||||||
|
in
|
||||||
|
\\pd,ap,dp,c => apren ap ++ (detpren dp).s ! c ++ np.preap.s ! (Ag np.g np.n c) ++ np.s ! pd ! c ++ np.postap.s ! (Ag np.g np.n c) ++ (detpren dp).sp ! c ++ (detpostn dp).s ! c ++ apostn ap ;
|
||||||
-- also used for adjectives and so on
|
-- also used for adjectives and so on
|
||||||
|
|
||||||
-- adjectives
|
-- adjectives
|
||||||
@@ -264,7 +278,8 @@ param
|
|||||||
oper
|
oper
|
||||||
VerbPhrase : Type = {
|
VerbPhrase : Type = {
|
||||||
s : VActForm => VQForm => Str ;
|
s : VActForm => VQForm => Str ;
|
||||||
part : VPartForm =>Agr => Str ;
|
pass : VPassForm => VQForm => Str ;
|
||||||
|
part : VPartForm => Agr => Str ;
|
||||||
inf : VInfForm => Str ;
|
inf : VInfForm => Str ;
|
||||||
imp : VImpForm => Str ;
|
imp : VImpForm => Str ;
|
||||||
obj : Str ;
|
obj : Str ;
|
||||||
@@ -274,6 +289,17 @@ param
|
|||||||
|
|
||||||
ObjectVerbPhrase : Type = VerbPhrase ** {c : Preposition} ;
|
ObjectVerbPhrase : Type = VerbPhrase ** {c : Preposition} ;
|
||||||
|
|
||||||
|
emptyVP : VerbPhrase = {
|
||||||
|
s = \\_,_ => "" ;
|
||||||
|
pass = \\_,_ => "" ;
|
||||||
|
part = \\_,_ => "" ;
|
||||||
|
inf = \\_ => "" ;
|
||||||
|
imp = \\_ => "" ;
|
||||||
|
obj = "";
|
||||||
|
compl = \\_ => "" ;
|
||||||
|
adv = ""
|
||||||
|
} ;
|
||||||
|
|
||||||
Verb : Type = {
|
Verb : Type = {
|
||||||
act : VActForm => Str ;
|
act : VActForm => Str ;
|
||||||
pass : VPassForm => Str ;
|
pass : VPassForm => Str ;
|
||||||
@@ -351,6 +377,7 @@ param
|
|||||||
VAct VSim (VPres VInd) Sg P1 => -- Present Indicative
|
VAct VSim (VPres VInd) Sg P1 => -- Present Indicative
|
||||||
( case pres_ind_base of {
|
( case pres_ind_base of {
|
||||||
_ + "a" => ( init pres_ind_base ) ;
|
_ + "a" => ( init pres_ind_base ) ;
|
||||||
|
-- | _ + "ui" => ( init pres_ind_base ) ;
|
||||||
_ => pres_ind_base
|
_ => pres_ind_base
|
||||||
}
|
}
|
||||||
) + "o" ; --actPresEnding Sg P1 ;
|
) + "o" ; --actPresEnding Sg P1 ;
|
||||||
@@ -1235,6 +1262,7 @@ oper
|
|||||||
|
|
||||||
predV : Verb -> VerbPhrase = \v -> {
|
predV : Verb -> VerbPhrase = \v -> {
|
||||||
s = \\a,q => v.act ! a ++ case q of { VQTrue => Prelude.BIND ++ "ne"; VQFalse => "" };
|
s = \\a,q => v.act ! a ++ case q of { VQTrue => Prelude.BIND ++ "ne"; VQFalse => "" };
|
||||||
|
pass = \\p,q => v.pass ! p ++ case q of { VQTrue => Prelude.BIND ++ "ne"; VQFalse => "" };
|
||||||
part = v.part;
|
part = v.part;
|
||||||
imp = v.imp ;
|
imp = v.imp ;
|
||||||
inf = v.inf ;
|
inf = v.inf ;
|
||||||
@@ -1253,20 +1281,22 @@ oper
|
|||||||
|
|
||||||
insertObj : NounPhrase -> Preposition -> VerbPhrase -> VerbPhrase = \np,prep,vp -> {
|
insertObj : NounPhrase -> Preposition -> VerbPhrase -> VerbPhrase = \np,prep,vp -> {
|
||||||
s = vp.s ;
|
s = vp.s ;
|
||||||
|
pass = vp.pass ;
|
||||||
part = vp.part ;
|
part = vp.part ;
|
||||||
imp = vp.imp ;
|
imp = vp.imp ;
|
||||||
inf = vp.inf ;
|
inf = vp.inf ;
|
||||||
obj = np.det.s ! np.g ! prep.c ++ np.preap.s ! (Ag np.g np.n prep.c) ++ (appPrep prep (np.s ! PronNonDrop)) ++ np.postap.s ! (Ag np.g np.n prep.c) ++ np.det.sp ! np.g ! prep.c ++ vp.obj ;
|
obj = np.det.s ! prep.c ++ np.preap.s ! (Ag np.g np.n prep.c) ++ (appPrep prep (np.s ! PronNonDrop)) ++ np.postap.s ! (Ag np.g np.n prep.c) ++ np.det.sp ! prep.c ++ vp.obj ;
|
||||||
compl = vp.compl ;
|
compl = vp.compl ;
|
||||||
adv = vp.adv ++ np.adv
|
adv = vp.adv ++ np.adv
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
insertObjc: NounPhrase -> VPSlash -> VPSlash = \np,vp -> {
|
insertObjc: NounPhrase -> VPSlash -> VPSlash = \np,vp -> {
|
||||||
s = vp.s ;
|
s = vp.s ;
|
||||||
|
pass = vp.pass ;
|
||||||
part = vp.part ;
|
part = vp.part ;
|
||||||
imp = vp.imp ;
|
imp = vp.imp ;
|
||||||
inf = vp.inf ;
|
inf = vp.inf ;
|
||||||
obj = np.det.s ! np.g ! vp.c.c ++ np.preap.s ! (Ag np.g np.n vp.c.c) ++ (appPrep vp.c (np.s ! PronNonDrop)) ++ np.postap.s ! (Ag np.g np.n vp.c.c) ++ np.det.sp ! np.g ! vp.c.c ++ vp.obj ;
|
obj = np.det.s ! vp.c.c ++ np.preap.s ! (Ag np.g np.n vp.c.c) ++ (appPrep vp.c (np.s ! PronNonDrop)) ++ np.postap.s ! (Ag np.g np.n vp.c.c) ++ np.det.sp ! vp.c.c ++ vp.obj ;
|
||||||
compl = vp.compl ;
|
compl = vp.compl ;
|
||||||
c = vp.c ;
|
c = vp.c ;
|
||||||
adv = vp.adv ++ np.adv
|
adv = vp.adv ++ np.adv
|
||||||
@@ -1274,6 +1304,7 @@ oper
|
|||||||
|
|
||||||
insertAdj : (Agr => Str) -> VerbPhrase -> VerbPhrase = \adj,vp -> {
|
insertAdj : (Agr => Str) -> VerbPhrase -> VerbPhrase = \adj,vp -> {
|
||||||
s = vp.s ;
|
s = vp.s ;
|
||||||
|
pass = vp.pass ;
|
||||||
part = vp.part ;
|
part = vp.part ;
|
||||||
imp = vp.imp ;
|
imp = vp.imp ;
|
||||||
inf = vp.inf ;
|
inf = vp.inf ;
|
||||||
@@ -1284,6 +1315,7 @@ oper
|
|||||||
|
|
||||||
insertAdv : Adverb -> VerbPhrase -> VerbPhrase = \a,vp -> {
|
insertAdv : Adverb -> VerbPhrase -> VerbPhrase = \a,vp -> {
|
||||||
s = vp.s ;
|
s = vp.s ;
|
||||||
|
pass = vp.pass ;
|
||||||
part = vp.part ;
|
part = vp.part ;
|
||||||
imp = vp.imp ;
|
imp = vp.imp ;
|
||||||
inf = vp.inf ;
|
inf = vp.inf ;
|
||||||
@@ -1296,13 +1328,22 @@ oper
|
|||||||
Sentence =
|
Sentence =
|
||||||
{
|
{
|
||||||
s,o,neg : AdvPos => Str ; -- Subject, verbphrase, object and negation particle plus potential adverb
|
s,o,neg : AdvPos => Str ; -- Subject, verbphrase, object and negation particle plus potential adverb
|
||||||
v : AdvPos => ComplPos => Str ;
|
v : AdvPos => Str ;
|
||||||
t : C.Tense ; -- tense marker
|
t : C.Tense ; -- tense marker
|
||||||
p : C.Pol ; -- polarity marker
|
p : C.Pol ; -- polarity marker
|
||||||
sadv : Str -- sentence adverb¡
|
sadv : Str ; -- sentence adverb¡
|
||||||
|
det : { s , sp : Case => Str } ;
|
||||||
|
compl : Str -- verb complement
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
Clause = {s,o : AdvPos => Str ; v : Tense => Anteriority => VQForm => AdvPos => ComplPos => Str ; neg : Polarity => AdvPos => Str ; adv : Str } ;
|
Clause =
|
||||||
|
{s : AdvPos => Str ;
|
||||||
|
o : AdvPos => Str ;
|
||||||
|
v : Tense => Anteriority => VQForm => AdvPos => Str ;
|
||||||
|
det : { s , sp : Case => Str } ;
|
||||||
|
compl : Str ;
|
||||||
|
neg : Polarity => AdvPos => Str ;
|
||||||
|
adv : Str } ;
|
||||||
QClause = {s : C.Tense => Anteriority => C.Pol => QForm => Str} ;
|
QClause = {s : C.Tense => Anteriority => C.Pol => QForm => Str} ;
|
||||||
|
|
||||||
mkClause : NounPhrase -> VerbPhrase -> Clause = \np,vp ->
|
mkClause : NounPhrase -> VerbPhrase -> Clause = \np,vp ->
|
||||||
@@ -1313,39 +1354,35 @@ oper
|
|||||||
compl = vp.compl ! Ag np.g np.n Nom ;
|
compl = vp.compl ! Ag np.g np.n Nom ;
|
||||||
-- helper functions to either place the adverb in the designated position
|
-- helper functions to either place the adverb in the designated position
|
||||||
-- or an empty string instead
|
-- or an empty string instead
|
||||||
pres : AdvPos -> Str = \ap -> case ap of { PreS => adv ; _ => [] } ;
|
pres : AdvPos -> Str = \ap -> case ap of { APreS => adv ; _ => [] } ;
|
||||||
prev : AdvPos -> Str = \ap -> case ap of { PreV => adv ; _ => [] } ;
|
prev : AdvPos -> Str = \ap -> case ap of { APreV => adv ; _ => [] } ;
|
||||||
preo : AdvPos -> Str = \ap -> case ap of { PreO => adv ; _ => [] } ;
|
preo : AdvPos -> Str = \ap -> case ap of { APreO => adv ; _ => [] } ;
|
||||||
preneg : AdvPos -> Str = \ap -> case ap of { PreNeg => adv ; _ => [] } ;
|
preneg : AdvPos -> Str = \ap -> case ap of { APreNeg => adv ; _ => [] } ;
|
||||||
ins : AdvPos -> Str = \ap -> case ap of { InS => adv ; _ => [] } ;
|
ins : AdvPos -> Str = \ap -> case ap of { AInS => adv ; _ => [] } ;
|
||||||
inv : AdvPos -> Str = \ap -> case ap of { InV => adv ; _ => [] } ;
|
inv : AdvPos -> Str = \ap -> case ap of { AInV => adv ; _ => [] } ;
|
||||||
cprev : ComplPos -> Str = \cp -> case cp of { CPreV => compl ; _ => [] } ;
|
|
||||||
cpostv : ComplPos -> Str = \cp -> case cp of { CPostV => compl ; _ => [] }
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
-- subject part of the clause:
|
-- subject part of the clause:
|
||||||
-- advpos is the adverb position in the clause
|
-- advpos is the adverb position in the clause
|
||||||
s = \\advpos =>
|
s = \\advpos =>
|
||||||
pres advpos ++ -- adverbs can be placed in the beginning of the clause
|
pres advpos ++ -- adverbs can be placed in the beginning of the clause
|
||||||
np.det.s ! np.g ! Nom ++ -- the determiner, if any
|
|
||||||
np.preap.s ! (Ag np.g np.n Nom) ++ -- adjectives which come before the subject noun, agreeing with it
|
np.preap.s ! (Ag np.g np.n Nom) ++ -- adjectives which come before the subject noun, agreeing with it
|
||||||
ins advpos ++ -- adverbs can be placed within the subject noun phrase
|
ins advpos ++ -- adverbs can be placed within the subject noun phrase
|
||||||
np.s ! PronDrop ! Nom ++ -- the noun of the subject noun phrase in nominative
|
np.s ! PronDrop ! Nom ++ -- the noun of the subject noun phrase in nominative
|
||||||
np.postap .s ! (Ag np.g np.n Nom) ++ -- adjectives which come after the subject noun, agreeing with it
|
np.postap .s ! (Ag np.g np.n Nom) ; -- adjectives which come after the subject noun, agreeing with it
|
||||||
np.det.sp ! np.g ! Nom ; -- second part of split determiners
|
|
||||||
-- verb part of the clause:
|
-- verb part of the clause:
|
||||||
-- tense and anter(ority) for the verb tense
|
-- tense and anter(ority) for the verb tense
|
||||||
-- vqf is the VQForm parameter which defines if the ordinary verbform or the quistion form with suffix "-ne" will be used
|
-- vqf is the VQForm parameter which defines if the ordinary verbform or the quistion form with suffix "-ne" will be used
|
||||||
-- advposis the adverb position in the clause
|
-- advposis the adverb position in the clause
|
||||||
-- comppos is the position of the verb complement
|
-- comppos is the position of the verb complement
|
||||||
v = \\tense,anter,vqf,advpos,complpos =>
|
v = \\tense,anter,vqf,advpos =>
|
||||||
prev advpos ++ -- adverbs can be placed in the before the verb phrase
|
prev advpos ++ -- adverbs can be placed in the before the verb phrase
|
||||||
cprev complpos ++ -- verb phrase complement, e.g. predicative expression, agreeing with the subject, can go before the verb
|
|
||||||
inv advpos ++ -- adverbs can be placed within the verb phrase
|
inv advpos ++ -- adverbs can be placed within the verb phrase
|
||||||
-- verb form with conversion between different forms of tense and aspect
|
-- verb form with conversion between different forms of tense and aspect
|
||||||
vp.s ! VAct ( anteriorityToVAnter anter ) ( tenseToVTense tense ) np.n np.p ! vqf ++
|
vp.s ! VAct ( anteriorityToVAnter anter ) ( tenseToVTense tense ) np.n np.p ! vqf ; -- ++
|
||||||
cpostv complpos ; -- complement can also go after the verb
|
det = np.det ;
|
||||||
|
-- verb complement
|
||||||
|
compl = compl ;
|
||||||
-- object part of the clause
|
-- object part of the clause
|
||||||
o = \\advpos => preo advpos ++ vp.obj ;
|
o = \\advpos => preo advpos ++ vp.obj ;
|
||||||
-- optional negation particle, adverbs can be placed before the negation
|
-- optional negation particle, adverbs can be placed before the negation
|
||||||
@@ -1354,41 +1391,79 @@ oper
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
combineClause : Clause -> C.Tense -> Anteriority -> C.Pol -> VQForm -> Sentence = \cl,tense,anter,pol,vqf ->
|
combineClause : Clause -> C.Tense -> Anteriority -> C.Pol -> VQForm -> Sentence = \cl,tense,anter,pol,vqf ->
|
||||||
{ s = cl.s ;
|
cl **
|
||||||
o = cl.o ;
|
{
|
||||||
v = cl.v ! tense.t ! anter ! vqf ;
|
v = \\advpos => cl.v ! tense.t ! anter ! vqf ! advpos ;
|
||||||
neg = cl.neg ! pol.p ;
|
neg = cl.neg ! pol.p ;
|
||||||
sadv = "" ;
|
sadv = cl.adv ;
|
||||||
t = tense ;
|
t = tense ;
|
||||||
p = pol
|
p = pol ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
combineSentence : Sentence -> ( SAdvPos => AdvPos => ComplPos => Order => Str ) = \s ->
|
combineSentence : Sentence -> ( SAdvPos => AdvPos => DetPos => VPos => ComplPos => Order => Str ) = \s ->
|
||||||
let
|
let
|
||||||
pres : SAdvPos -> Str = \ap -> case ap of { SPreS => s.sadv ; _ => [] } ;
|
advpres : SAdvPos -> Str = \ap -> case ap of { SAPreS => s.sadv ; _ => [] } ;
|
||||||
prev : SAdvPos -> Str = \ap -> case ap of { SPreV => s.sadv ; _ => [] } ;
|
advprev : SAdvPos -> Str = \ap -> case ap of { SAPreV => s.sadv ; _ => [] } ;
|
||||||
preo : SAdvPos -> Str = \ap -> case ap of { SPreO => s.sadv ; _ => [] } ;
|
advpreo : SAdvPos -> Str = \ap -> case ap of { SAPreO => s.sadv ; _ => [] } ;
|
||||||
preneg : SAdvPos -> Str = \ap -> case ap of { SPreNeg => s.sadv ; _ => [] }
|
advpreneg : SAdvPos -> Str = \ap -> case ap of { SAPreNeg => s.sadv ; _ => [] } ;
|
||||||
|
detpren : DetPos -> { s, sp : Case => Str } = \dp -> case dp of { DPreN => s.det; _ => { s,sp = \\_ => [] } } ;
|
||||||
|
detpostn : DetPos -> { s, sp : Case => Str } = \dp -> case dp of { DPostN => s.det ; _ => { s , sp = \\_ => [] } } ;
|
||||||
|
verbins : VPos -> ResLat.AdvPos => Str = \vp -> case vp of { VInS => s.v ; _ => \\_ => [] } ;
|
||||||
|
verbreg : VPos -> ResLat.AdvPos => Str = \vp -> case vp of { VReg => s.v ; _ => \\_ => [] } ;
|
||||||
|
complprev : ComplPos -> Str = \cp -> case cp of { CPreV => s.compl ; _ => [] } ;
|
||||||
|
complpostv : ComplPos -> Str = \cp -> case cp of { CPostV => s.compl ; _ => [] }
|
||||||
in
|
in
|
||||||
-- sap is the position of the sentence adverbial
|
-- sadvpos is the position of the sentence adverbial
|
||||||
-- ap is the position of the adverb
|
-- advpos is the position of the adverb
|
||||||
-- cp is the position of the verb complement
|
-- detpos is the position of the determiner (relative to the noun)
|
||||||
\\sap,ap,cp,order => case order of {
|
-- vpos is the position of the main verb (either regular or interleaved)
|
||||||
SVO => s.t.s ++ s.p.s ++ pres sap ++ s.s ! ap ++ preneg sap ++ s.neg ! ap ++ prev sap ++ s.v ! ap ! cp ++ preo sap ++ s.o ! ap;
|
-- complosp is the position of the verb complement
|
||||||
VSO => s.t.s ++ s.p.s ++ preneg sap ++ s.neg ! ap ++ prev sap ++ s.v ! ap ! cp ++ pres sap ++ s.s ! ap ++ preo sap ++ s.o ! ap;
|
\\sadvpos,advpos,detpos,verbpos,complpos,order => case order of {
|
||||||
VOS => s.t.s ++ s.p.s ++ preneg sap ++ s.neg ! ap ++ prev sap ++ s.v ! ap ! cp ++ preo sap ++ s.o ! ap ++ pres sap ++ s.s ! ap ;
|
SVO =>
|
||||||
OSV => s.t.s ++ s.p.s ++ preo sap ++ s.o ! ap ++ pres sap ++ s.s ! ap ++ preneg sap ++ s.neg ! ap ++ prev sap ++ s.v ! ap ! cp;
|
s.t.s ++ s.p.s ++
|
||||||
OVS => s.t.s ++ s.p.s ++ preo sap ++ s.o ! ap ++ preneg sap ++ s.neg ! ap ++ prev sap ++ s.v ! ap ! cp ++ pres sap ++ s.s ! ap ;
|
advpres sadvpos ++ (detpren detpos).s ! Nom ++ s.s ! advpos ++ (verbins verbpos) ! advpos ++ (detpostn detpos).s ! Nom ++ (detpren detpos).sp ! Nom ++
|
||||||
SOV => s.t.s ++ s.p.s ++ pres sap ++ s.s ! ap ++ preo sap ++ s.o ! ap ++ preneg sap ++ s.neg ! ap ++ prev sap ++ s.v ! ap ! cp
|
advpreneg sadvpos ++ s.neg ! advpos ++
|
||||||
|
advprev sadvpos ++ (complprev complpos) ++ (verbreg verbpos) ! advpos ++ (complpostv complpos) ++
|
||||||
|
advpreo sadvpos ++ s.o ! advpos;
|
||||||
|
VSO =>
|
||||||
|
s.t.s ++ s.p.s ++
|
||||||
|
advpreneg sadvpos ++ s.neg ! advpos ++
|
||||||
|
advprev sadvpos ++ (complprev complpos) ++ (verbreg verbpos) ! advpos ++ (complpostv complpos) ++
|
||||||
|
advpres sadvpos ++ (detpren detpos).s ! Nom ++ s.s ! advpos ++ (verbins verbpos) ! advpos ++ (detpostn detpos).s ! Nom ++ (detpren detpos).sp ! Nom ++
|
||||||
|
advpreo sadvpos ++ s.o ! advpos;
|
||||||
|
VOS =>
|
||||||
|
s.t.s ++ s.p.s ++
|
||||||
|
advpreneg sadvpos ++ s.neg ! advpos ++
|
||||||
|
advprev sadvpos ++ (complprev complpos) ++ (verbreg verbpos) ! advpos ++ (complpostv complpos) ++
|
||||||
|
advpreo sadvpos ++ s.o ! advpos ++
|
||||||
|
advpres sadvpos ++ (detpren detpos).s ! Nom ++ s.s ! advpos ++ (verbins verbpos) ! advpos ++ (detpostn detpos).s ! Nom ++ (detpren detpos).sp ! Nom ;
|
||||||
|
OSV =>
|
||||||
|
s.t.s ++ s.p.s ++
|
||||||
|
advpreo sadvpos ++ s.o ! advpos ++
|
||||||
|
advpres sadvpos ++ (detpren detpos).s ! Nom ++ s.s ! advpos ++ (verbins verbpos) ! advpos ++ (detpostn detpos).s ! Nom ++ (detpren detpos).sp ! Nom++
|
||||||
|
advpreneg sadvpos ++ s.neg ! advpos ++
|
||||||
|
advprev sadvpos ++ (complprev complpos) ++ (verbreg verbpos) ! advpos ++ (complpostv complpos) ;
|
||||||
|
OVS =>
|
||||||
|
s.t.s ++ s.p.s ++
|
||||||
|
advpreo sadvpos ++ s.o ! advpos ++
|
||||||
|
advpreneg sadvpos ++ s.neg ! advpos ++
|
||||||
|
advprev sadvpos ++ (complprev complpos) ++ (verbreg verbpos) ! advpos ++ (complpostv complpos) ++
|
||||||
|
advpres sadvpos ++ (detpren detpos).s ! Nom ++ s.s ! advpos ++ (verbins verbpos) ! advpos ++ (detpostn detpos).s ! Nom ++ (detpren detpos).sp ! Nom ;
|
||||||
|
SOV =>
|
||||||
|
s.t.s ++ s.p.s ++
|
||||||
|
advpres sadvpos ++ (detpren detpos).s ! Nom ++ s.s ! advpos ++ (verbins verbpos) ! advpos ++ (detpostn detpos).s ! Nom ++ (detpren detpos).sp ! Nom ++
|
||||||
|
advpreo sadvpos ++ s.o ! advpos ++
|
||||||
|
advpreneg sadvpos ++ s.neg ! advpos ++
|
||||||
|
advprev sadvpos ++ (complprev complpos) ++ (verbreg verbpos) ! advpos ++ (complpostv complpos)
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
defaultSentence : Sentence -> Order => Str = \s -> combineSentence s ! SAPreS ! APreV ! DPreN ! VReg ! CPreV ;
|
||||||
|
|
||||||
-- questions
|
-- questions
|
||||||
mkQuestion : SS -> Clause -> QClause = \ss,cl -> {
|
mkQuestion : SS -> Clause -> QClause = \ss,cl -> {
|
||||||
s = \\tense,anter,pol,form => case form of {
|
s = \\tense,anter,pol,form => case form of {
|
||||||
QDir => ss.s ++ (combineSentence (combineClause cl tense anter pol VQFalse)) ! SPreS ! PreS ! CPreV ! OVS ;
|
QDir => ss.s ++ (defaultSentence (combineClause cl tense anter pol VQFalse)) ! OVS ;
|
||||||
QIndir => ss.s ++ (combineSentence (combineClause cl tense anter pol VQFalse)) ! SPreO ! PreO ! CPreV ! OSV
|
QIndir => ss.s ++ (combineSentence (combineClause cl tense anter pol VQFalse)) ! SAPreO ! APreO ! DPreN ! VReg ! CPreV ! OSV
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1472,8 +1547,8 @@ oper
|
|||||||
Below8 = Yes | No8 | No9 | Ign ;
|
Below8 = Yes | No8 | No9 | Ign ;
|
||||||
oper
|
oper
|
||||||
-- Numerals are by default cardinal numbers but have a field for ordinal numbers
|
-- Numerals are by default cardinal numbers but have a field for ordinal numbers
|
||||||
TDigit : Type = { s : Unit => Gender => Case => Str ; tenNext : Str ; below8 : Below8 } ; -- ord : Unit => Agr => Str } ;
|
TDigit : Type = { s : Unit => Gender => Case => Str ; tenNext : Str ; below8 : Below8 ; ord : Unit => Gender => Number => Case => Str } ;
|
||||||
TNumeral : Type = { s : Gender => Case => Str ; d : Unit => Gender => Case => Str ; n : Number ; below8 : Below8 } ; -- ord : Unit => Agr => Str } ;
|
TNumeral : Type = { s : Gender => Case => Str ; d : { num, ord : Unit => Gender => Case => Str } ; n : Number ; below8 : Below8 ; ord : Gender => Number => Case => Str } ;
|
||||||
|
|
||||||
-- Inflection for cardinal numbers
|
-- Inflection for cardinal numbers
|
||||||
cardFlex : Str -> Gender => Case => Str =
|
cardFlex : Str -> Gender => Case => Str =
|
||||||
@@ -1496,21 +1571,21 @@ oper
|
|||||||
} ;
|
} ;
|
||||||
_ => \\_,_ => c
|
_ => \\_,_ => c
|
||||||
} ;
|
} ;
|
||||||
-- ordFlex : Gender => Number => Case => Str =
|
ordFlex : Str -> Gender => Number => Case => Str =
|
||||||
-- case o of {
|
\o -> case o of {
|
||||||
-- stem + "us" => table {
|
stem + "us" => table {
|
||||||
-- Masc => table Number [ table Case [ stem + "us" ; stem + "um" ; stem + "i" ; stem + "o" ; stem + "o" ; stem + "e" ] ;
|
Masc => table Number [ table Case [ stem + "us" ; stem + "um" ; stem + "i" ; stem + "o" ; stem + "o" ; stem + "e" ] ;
|
||||||
-- table Case [ stem + "i" ; stem + "os" ; stem + "orum" ; stem + "is" ; stem + "is" ; stem + "i" ] ;
|
table Case [ stem + "i" ; stem + "os" ; stem + "orum" ; stem + "is" ; stem + "is" ; stem + "i" ] ;
|
||||||
-- ];
|
];
|
||||||
-- Fem => table Number [ table Case [ stem + "a" ; stem + "am" ; stem + "ae" ; stem + "ae" ; stem + "a" ; stem + "a" ] ;
|
Fem => table Number [ table Case [ stem + "a" ; stem + "am" ; stem + "ae" ; stem + "ae" ; stem + "a" ; stem + "a" ] ;
|
||||||
-- table Case [ stem + "ae" ; stem + "as" ; stem + "arum" ; stem + "is" ; stem + "is" ; stem + "ae" ] ;
|
table Case [ stem + "ae" ; stem + "as" ; stem + "arum" ; stem + "is" ; stem + "is" ; stem + "ae" ] ;
|
||||||
-- ] ;
|
] ;
|
||||||
-- Neutr => table Number [ table Case [ stem + "um" ; stem + "um" ; stem + "i" ; stem + "o" ; stem + "o" ; stem + "um" ] ;
|
Neutr => table Number [ table Case [ stem + "um" ; stem + "um" ; stem + "i" ; stem + "o" ; stem + "o" ; stem + "um" ] ;
|
||||||
-- table Case [ stem + "a" ; stem + "a" ; stem + "orum" ; stem + "is" ; stem + "is" ; stem + "a" ] ;
|
table Case [ stem + "a" ; stem + "a" ; stem + "orum" ; stem + "is" ; stem + "is" ; stem + "a" ] ;
|
||||||
-- ]
|
]
|
||||||
-- } ;
|
} ;
|
||||||
-- _ => error "unsupported ordinal form"
|
_ => error "unsupported ordinal form"
|
||||||
-- }
|
} ;
|
||||||
-- in
|
-- in
|
||||||
-- { s = cardFlex ; n = case c of { "unus" => Sg ; _ => Pl } ; ord = ordFlex } ;
|
-- { s = cardFlex ; n = case c of { "unus" => Sg ; _ => Pl } ; ord = ordFlex } ;
|
||||||
|
|
||||||
|
|||||||
@@ -52,29 +52,31 @@ concrete SentenceLat of Sentence = CatLat ** open Prelude, ResLat in {
|
|||||||
{
|
{
|
||||||
s = let qs = combineClause cl t t.a p VQTrue in
|
s = let qs = combineClause cl t t.a p VQTrue in
|
||||||
\\q => case q of {
|
\\q => case q of {
|
||||||
QDir => cl.q ++ combineSentence qs ! SPreS ! PreV ! CPostV ! SVO ; -- t.s ++ p.s ++ cl.q ++ cl.s ! PreV ++ cl.v ! t.t ! t.a ! VQTrue ! PreV ! CPostV ++ cl.o ! PreV ;
|
QDir => cl.q ++ defaultSentence qs ! SVO ; -- t.s ++ p.s ++ cl.q ++ cl.s ! PreV ++ cl.v ! t.t ! t.a ! VQTrue ! PreV ! CPostV ++ cl.o ! PreV ;
|
||||||
QIndir => cl.q ++ combineSentence qs ! SPreS ! PreV ! CPostV ! SOV -- t.s ++ p.s ++ cl.q ++ cl.s ! PreV ++ cl.o ! PreV ++ cl.v ! t.t ! t.a ! VQTrue ! PreV ! CPostV
|
QIndir => cl.q ++ defaultSentence qs ! SOV -- t.s ++ p.s ++ cl.q ++ cl.s ! PreV ++ cl.o ! PreV ++ cl.v ! t.t ! t.a ! VQTrue ! PreV ! CPostV
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
-- UseRCl : Temp -> Pol -> RCl -> RS ;
|
||||||
-- UseRCl t p cl = {
|
UseRCl t p cl = {
|
||||||
|
s = \\g,n => defaultSentence (combineClause (cl.s ! g ! n) (lin Tense t) t.a (lin Pol p) VQFalse) ! SOV ;
|
||||||
-- s = \\r => t.s ++ p.s ++ cl.s ! t.t ! t.a ! ctr p.p ! r ;
|
-- s = \\r => t.s ++ p.s ++ cl.s ! t.t ! t.a ! ctr p.p ! r ;
|
||||||
-- c = cl.c
|
-- c = cl.c
|
||||||
-- } ;
|
} ;
|
||||||
-- UseSlash t p cl = {
|
-- UseSlash t p cl = {
|
||||||
-- s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! ctr p.p ! ODir ;
|
-- s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! ctr p.p ! ODir ;
|
||||||
-- c2 = cl.c2
|
-- c2 = cl.c2
|
||||||
-- } ;
|
-- } ;
|
||||||
--
|
--
|
||||||
-- AdvS : Adv -> S -> S
|
-- AdvS : Adv -> S -> S
|
||||||
AdvS adv s = { s = s.s ; o = s.o ; v = s.v ; neg = s.neg ; t = s.t ; p = s.p ; sadv = adv.s ! Posit ++ s.sadv } ;
|
AdvS adv s = -- { s = s.s ; o = s.o ; v = s.v ; neg = s.neg ; t = s.t ; p = s.p ; sadv = adv.s ! Posit ++ s.sadv } ;
|
||||||
|
s ** { sadv = adv.s ! Posit ++ s.sadv } ;
|
||||||
|
|
||||||
-- This covers subjunctive clauses, but they can also be added to the end.
|
-- This covers subjunctive clauses, but they can also be added to the end.
|
||||||
-- SSubjS : S -> Subj -> S -> S ; -- I go home if she comes
|
-- SSubjS : S -> Subj -> S -> S ; -- I go home if she comes
|
||||||
-- TO FIX
|
-- TO FIX
|
||||||
-- SSubjS s1 subj s2 = { s = \\_ => subj.s ++ s2.s ! PreS ++ s1.s ! PreS ; sadv = lin Adv (mkAdverb []) } ;
|
-- SSubjS s1 subj s2 = { s = \\_ => subj.s ++ s2.s ! PreS ++ s1.s ! PreS ; sadv = lin Adv (mkAdverb []) } ;
|
||||||
|
|
||||||
-- RelS s r = {s = s.s ++ "," ++ r.s ! agrP3 Sg} ;
|
-- RelS s r = {s = s.s ! APreV ++ "," ++ r.s } ;
|
||||||
--
|
--
|
||||||
-- oper
|
-- oper
|
||||||
-- ctr = contrNeg True ; -- contracted negations
|
-- ctr = contrNeg True ; -- contracted negations
|
||||||
|
|||||||
@@ -2,51 +2,58 @@
|
|||||||
|
|
||||||
concrete SymbolLat of Symbol = CatLat ** open Prelude, ResLat, ParadigmsLat, TenseX in {
|
concrete SymbolLat of Symbol = CatLat ** open Prelude, ResLat, ParadigmsLat, TenseX in {
|
||||||
|
|
||||||
lin
|
lin
|
||||||
SymbPN i = {s = \\c => i.s ; g = Neutr ; n = Sg } ; --- c
|
-- SymbPN : Symb -> PN ;
|
||||||
IntPN i = {s = \\c => i.s ; g = Neutr ; n = Sg } ; --- c
|
SymbPN i = {s = \\c => i.s ; g = Neutr ; n = Sg } ; --- c
|
||||||
FloatPN i = {s = \\c => i.s ; g = Neutr ; n = Sg } ; --- c
|
-- IntPN : Int -> PN ;
|
||||||
NumPN i = {s = \\c => i.s ! Neutr ! c; g = Neutr ; n = Pl } ; --- c
|
IntPN i = {s = \\c => i.s ; g = Neutr ; n = Sg } ; --- c
|
||||||
CNIntNP cn i = {
|
-- FloatPN : Float -> PN ;
|
||||||
s = \\_,c => (cn.s ! Sg ! Nom ++ i.s) ;
|
FloatPN i = {s = \\c => i.s ; g = Neutr ; n = Sg } ; --- c
|
||||||
g = cn.g ;
|
-- NumPN : Num -> PN ;
|
||||||
n = Sg ;
|
NumPN i = {s = \\c => i.s ! Neutr ! c; g = Neutr ; n = Pl } ; --- c
|
||||||
adv = [] ;
|
-- CNIntNP : CN -> Int -> NP ;
|
||||||
det = { s = \\_,_ => [] ; n = Sg ; sp = \\_,_ => [] } ;
|
CNIntNP cn i = {
|
||||||
p = P3 ;
|
s = \\_,c => (cn.s ! Sg ! Nom ++ i.s) ;
|
||||||
postap = { s = \\_ => [] } ;
|
g = cn.g ;
|
||||||
preap = { s = \\_ => [] } ;
|
n = Sg ;
|
||||||
} ;
|
adv = [] ;
|
||||||
CNSymbNP det cn xs = {
|
det = { s , sp = \\_ => [] ; n = Sg } ;
|
||||||
s = \\_,c => (cn.s ! Sg ! Nom ++ xs.s ) ;
|
p = P3 ;
|
||||||
g = cn.g ;
|
preap , postap = { s = \\_ => [] } ;
|
||||||
n = det.n ;
|
} ;
|
||||||
adv = [] ;
|
--CNSymbNP : CN -> Symb -> NP ;
|
||||||
det = det ;
|
CNSymbNP det cn xs = {
|
||||||
p = P3 ;
|
s = \\_,c => (cn.s ! Sg ! Nom ++ xs.s ) ;
|
||||||
postap = { s = \\_ => [] } ;
|
g = cn.g ;
|
||||||
preap = { s = \\_ => [] } ;
|
n = det.n ;
|
||||||
} ;
|
adv = [] ;
|
||||||
|
det = { s = det.s ! cn.g ; sp = det.sp ! cn.g } ;
|
||||||
|
p = P3 ;
|
||||||
|
preap , postap = { s = \\_ => [] } ;
|
||||||
|
} ;
|
||||||
-- s = \\c => det.s ++ cn.s ! det.n ! c ++ xs.s ;
|
-- s = \\c => det.s ++ cn.s ! det.n ! c ++ xs.s ;
|
||||||
-- a = agrgP3 det.n cn.g
|
-- a = agrgP3 det.n cn.g
|
||||||
-- } ;
|
-- } ;
|
||||||
-- } ;
|
-- } ;
|
||||||
CNNumNP cn i = {
|
|
||||||
s = \\_,c => (cn.s ! Sg ! Nom ++ i.s ! cn.g ! Nom ) ;
|
-- CNNumNP : CN -> Num -> NP ;
|
||||||
g = cn.g ;
|
CNNumNP cn i = {
|
||||||
n = Sg ;
|
s = \\_,c => (cn.s ! Sg ! Nom ++ i.s ! cn.g ! Nom ) ;
|
||||||
adv = [] ;
|
g = cn.g ;
|
||||||
det = { s = \\_,_ => [] ; n = Sg ; sp = \\_,_ => [] } ;
|
n = Sg ;
|
||||||
p = P3 ;
|
adv = [] ;
|
||||||
postap = { s = \\_ => [] } ;
|
det = { s , sp = \\_ => [] ; n = Sg };
|
||||||
preap = { s = \\_ => [] } ;
|
p = P3 ;
|
||||||
} ;
|
preap , postap = { s = \\_ => [] } ;
|
||||||
|
} ;
|
||||||
--
|
--
|
||||||
|
-- SymbS : Symb -> S ;
|
||||||
|
SymbS sy = { s = \\_ => sy.s ; o , neg = \\_ => "" ; p = PPos ; sadv = "" ; t = TPres ; v = \\_ => "" ; compl = "" ; det = { s , sp = \\_ => [] ; n = Sg } } ;
|
||||||
|
|
||||||
SymbS sy = { s = \\_ => sy.s ; neg = \\_ => "" ; o = \\_ => "" ; p = PPos ; sadv = "" ; t = TPres ; v = \\_,_ => "" } ;
|
-- SymbNum : Symb -> Num
|
||||||
--
|
SymbNum sy = {s = \\_,_ => sy.s ; n = Pl } ;
|
||||||
SymbNum sy = {s = \\_,_ => sy.s ; n = Pl } ;
|
-- SymbOrd : Symb -> Ord
|
||||||
SymbOrd sy = { s = \\g,n,c => sy.s } ; -- does not inflect properly
|
SymbOrd sy = { s = \\g,n,c => sy.s } ; -- does not inflect properly
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
Symb, [Symb] = SS ;
|
Symb, [Symb] = SS ;
|
||||||
|
|||||||
@@ -19,15 +19,17 @@ concrete VerbLat of Verb = CatLat ** open (S=StructuralLat),ResLat,IrregLat,Extr
|
|||||||
-- ComplVS : VS -> S -> VP ; -- say that she runs
|
-- ComplVS : VS -> S -> VP ; -- say that she runs
|
||||||
ComplVS vs s = -- insertObj ( dummyNP (S.that_Subj.s ++ s.s ! PreS)) Nom_Prep (predV v) ;
|
ComplVS vs s = -- insertObj ( dummyNP (S.that_Subj.s ++ s.s ! PreS)) Nom_Prep (predV v) ;
|
||||||
vs ** {
|
vs ** {
|
||||||
s = \\af,qf => vs.act ! af ;
|
s = \\a,q => vs.act ! a ++ case q of { VQTrue => Prelude.BIND ++ "ne"; VQFalse => "" };
|
||||||
compl = \\ag => combineSentence s ! SPreS ! PreV ! CPostV ! SOV ; -- s.s ! QIndir ;
|
pass = \\p,q => vs.pass ! p ++ case q of { VQTrue => Prelude.BIND ++ "ne"; VQFalse => "" };
|
||||||
|
compl = \\ag => defaultSentence s ! SOV ; -- s.s ! QIndir ;
|
||||||
adv = [] ;
|
adv = [] ;
|
||||||
obj = []
|
obj = []
|
||||||
} ;
|
} ;
|
||||||
-- ComplVQ : VQ -> QS -> VP ; -- wonder who runs
|
-- ComplVQ : VQ -> QS -> VP ; -- wonder who runs
|
||||||
ComplVQ vq qs = -- insertObj (dummyNP (q.s ! QIndir)) Nom_Prep (predV v) ;
|
ComplVQ vq qs = -- insertObj (dummyNP (q.s ! QIndir)) Nom_Prep (predV v) ;
|
||||||
vq ** {
|
vq ** {
|
||||||
s = \\af,qf => vq.act ! af ;
|
s = \\a,q => vq.act ! a ++ case q of { VQTrue => Prelude.BIND ++ "ne"; VQFalse => "" };
|
||||||
|
pass = \\p,q => vq.pass ! p ++ case q of { VQTrue => Prelude.BIND ++ "ne"; VQFalse => "" };
|
||||||
compl = \\ag => qs.s ! QIndir ;
|
compl = \\ag => qs.s ! QIndir ;
|
||||||
adv = [] ;
|
adv = [] ;
|
||||||
obj = []
|
obj = []
|
||||||
@@ -115,7 +117,7 @@ concrete VerbLat of Verb = CatLat ** open (S=StructuralLat),ResLat,IrregLat,Extr
|
|||||||
|
|
||||||
-- CompNP : NP -> Comp ; -- (be) the man
|
-- CompNP : NP -> Comp ; -- (be) the man
|
||||||
CompNP np = {s = \\_ =>
|
CompNP np = {s = \\_ =>
|
||||||
(combineNounPhrase np) ! PronNonDrop ! Nom
|
(combineNounPhrase np) ! PronNonDrop ! APostN ! DPreN ! Nom ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- CompAdv : Adv -> Comp ; -- (be) here
|
-- CompAdv : Adv -> Comp ; -- (be) here
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
import PGF
|
import PGF
|
||||||
import System.Environment
|
import System.Environment
|
||||||
|
import Data.List
|
||||||
|
import Data.Maybe
|
||||||
main =
|
main =
|
||||||
do
|
do
|
||||||
args <- getArgs -- first one should be pgf file and second one should be the file containing the errors/warnings about missing things
|
args <- getArgs -- first one should be pgf file and second one should be the file containing the errors/warnings about missing things
|
||||||
pgf <- PGF.readPGF (args !! 0) -- "tmp/Lang.pgf"
|
pgf <- PGF.readPGF (args !! 0) -- "tmp/Lang.pgf"
|
||||||
ms <- readFile (args !! 1) {- "tmp/MissingLat.tmp" -} >>= return . map (last . words) . lines
|
ms <- readFile (args !! 1) {- "tmp/MissingLat.tmp" -} >>= return . nub . sort . map (last . words) . lines
|
||||||
let ts = [PGF.showType [] t | m <- ms, Just t <- [PGF.functionType pgf (PGF.mkCId m)]]
|
let ts = [maybe ("-- Error: No type found for " ++ m) (\t -> "oper " ++ m ++ " : " ++ PGF.showType [] t ++ " = notYet \"" ++ m ++ "\" ;") $ PGF.functionType pgf (PGF.mkCId m) | m <- ms ]
|
||||||
putStrLn $ unlines ["oper " ++ f ++ " : " ++ t ++ " = notYet \"" ++ f ++ "\" ;" | (f,t) <- zip ms ts]
|
putStrLn $ unlines ts -- ["oper " ++ f ++ " : " ++ t ++ " = notYet \"" ++ f ++ "\" ;" | (f,t) <- zip ms ts]
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
echo "Create tmp dir"
|
echo "Create tmp dir"
|
||||||
mkdir tmp/
|
mkdir tmp/
|
||||||
echo "Remove old file"
|
echo "Remove old file"
|
||||||
|
rm -Rfv tmp/*
|
||||||
echo "resource MissingLat = {} " > MissingLat.gf
|
echo "resource MissingLat = {} " > MissingLat.gf
|
||||||
echo "Look for missing functions"
|
echo "Look for missing functions"
|
||||||
# gf -src -i .. -batch TryLat.gf 2>&1 | grep "Warning: no linearization of" | sort -u > tmp/MissingLat.tmp
|
# gf -src -i .. -batch TryLat.gf 2>&1 | grep "Warning: no linearization of" | sort -u > tmp/MissingLat.tmp
|
||||||
|
|||||||
@@ -42,6 +42,10 @@ param
|
|||||||
|
|
||||||
CardOrd = NCard Gender | NOrd Gender Number ;
|
CardOrd = NCard Gender | NOrd Gender Number ;
|
||||||
|
|
||||||
|
--- a workaround for a lost constructor used e.g. in Attempto: AR 2019-09-11
|
||||||
|
oper
|
||||||
|
AF : Gender -> Number -> AForm = \g,n -> case n of {Sg => ASg g AAttr ; Pl => APl g} ;
|
||||||
|
|
||||||
-- The following coercions are useful:
|
-- The following coercions are useful:
|
||||||
|
|
||||||
oper
|
oper
|
||||||
|
|||||||
@@ -65,6 +65,8 @@ lincat
|
|||||||
perf :Str;
|
perf :Str;
|
||||||
root : Str;
|
root : Str;
|
||||||
--morphs : Res.VFormMini => Res.VerbMorphPos =>Str;
|
--morphs : Res.VFormMini => Res.VerbMorphPos =>Str;
|
||||||
|
isPresBlank :Bool;
|
||||||
|
isPerfBlank : Bool;
|
||||||
compl : Str; -- after verb: complement, adverbs
|
compl : Str; -- after verb: complement, adverbs
|
||||||
isCompApStem : Bool;
|
isCompApStem : Bool;
|
||||||
whichRel: Res.RForm
|
whichRel: Res.RForm
|
||||||
@@ -78,6 +80,8 @@ lincat
|
|||||||
pres: Str;
|
pres: Str;
|
||||||
perf:Str;
|
perf:Str;
|
||||||
--morphs : Res.VFormMini => Res.VerbMorphPos =>Str; --; compl : Str -- after verb: complement, adverbs
|
--morphs : Res.VFormMini => Res.VerbMorphPos =>Str; --; compl : Str -- after verb: complement, adverbs
|
||||||
|
isPresBlank : Bool;
|
||||||
|
isPerfBlank : Bool;
|
||||||
ap:Str;
|
ap:Str;
|
||||||
isRegular:Bool;
|
isRegular:Bool;
|
||||||
adv:Str;
|
adv:Str;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
abstract DictEngAbs = Cat ** {
|
abstract DictCggAbs = Cat ** {
|
||||||
|
|
||||||
{- --beginning of comment
|
{- --beginning of comment
|
||||||
|
|
||||||
|
|||||||
5
src/rukiga/ExtraCatAbs.gf
Normal file
5
src/rukiga/ExtraCatAbs.gf
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
abstract ExtraCatAbs = Cat **{
|
||||||
|
cat
|
||||||
|
TenseExtra;
|
||||||
|
TempExtra;
|
||||||
|
}
|
||||||
16
src/rukiga/ExtraCggAbs.gf
Normal file
16
src/rukiga/ExtraCggAbs.gf
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
abstract ExtraCggAbs = Cat **{
|
||||||
|
|
||||||
|
-- there is a default linearization for abstract
|
||||||
|
-- categories Tense and Temp
|
||||||
|
-- these in TenseX
|
||||||
|
--
|
||||||
|
cat
|
||||||
|
AllTenses;
|
||||||
|
--TempExtra;
|
||||||
|
fun
|
||||||
|
UseClExtra : TempExtra -> Pol -> Cl -> S ; -- she had not slept
|
||||||
|
UseQClExtra : TempExtra -> Pol -> QCl -> QS ; -- who had not slept
|
||||||
|
UseRClExtra : TempExtra -> Pol -> RCl -> RS ; -- that had not slept
|
||||||
|
UseSlashExtra : TempExtra -> Pol -> ClSlash -> SSlash ; -- (that) she had not seen
|
||||||
|
|
||||||
|
}
|
||||||
14
src/rukiga/ExtraCggAbsCgg.gf
Normal file
14
src/rukiga/ExtraCggAbsCgg.gf
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
concrete ExtraCggAbsCgg of ExtraCggAbs = CatCgg
|
||||||
|
open (R=ResCgg), (P=ParamX) in {
|
||||||
|
|
||||||
|
lincat
|
||||||
|
AllTenses = {s : Str ; t : P.Tense; tExtra : R.TensesExtra } ;
|
||||||
|
TempExtra = {s : Str ; t : R.TensesExtra } ;
|
||||||
|
--TempExtraWithAspects = {s : Str ; t : P.Tense ; a : R.AspectsExtra } ;
|
||||||
|
fun
|
||||||
|
UseClExtra : TempTempExtra -> Pol -> Cl -> S ; -- she had not slept
|
||||||
|
UseQClExtra : TempTempExtra -> Pol -> QCl -> QS ; -- who had not slept
|
||||||
|
UseRClExtra : TempTempExtra -> Pol -> RCl -> RS ; -- that had not slept
|
||||||
|
UseSlashExtra : TempTempExtra -> Pol -> ClSlash -> SSlash ; -- (that) she had not seen
|
||||||
|
|
||||||
|
}
|
||||||
@@ -145,7 +145,7 @@ lin
|
|||||||
|
|
||||||
--today_Adv = mkAdv "erizooba" AgrNo;
|
--today_Adv = mkAdv "erizooba" AgrNo;
|
||||||
|
|
||||||
father_N2 = mkN2 (mkN "tata" MU_BA) (lin Prep (mkPrep [] [] True)) ;
|
father_N2 = mkN2 (mkN "tata" ZERO_BAA) (lin Prep (mkPrep [] [] True)) ;
|
||||||
|
|
||||||
distance_N3 = mkN3 (mkN "orugyendo" ZERO_BU) (lin Prep (mkPrep "kurunga" "" False)) (lin Prep (mkPrep "mpáka" "" False)); --could orugyendo work in its place?
|
distance_N3 = mkN3 (mkN "orugyendo" ZERO_BU) (lin Prep (mkPrep "kurunga" "" False)) (lin Prep (mkPrep "mpáka" "" False)); --could orugyendo work in its place?
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ concrete QuestionCgg of Question = CatCgg ** open ResCgg, Prelude in {
|
|||||||
|
|
||||||
lin
|
lin
|
||||||
--QuestCl : Cl -> QCl ; -- does John walk
|
--QuestCl : Cl -> QCl ; -- does John walk
|
||||||
|
|
||||||
QuestCl cl = cl ** {posibleSubAgr = mkSubjCliticTable};
|
QuestCl cl = cl ** {posibleSubAgr = mkSubjCliticTable};
|
||||||
--QuestVP : IP -> VP -> QCl ; -- who walks
|
--QuestVP : IP -> VP -> QCl ; -- who walks
|
||||||
|
|
||||||
@@ -17,6 +18,8 @@ concrete QuestionCgg of Question = CatCgg ** open ResCgg, Prelude in {
|
|||||||
root = vp.s;
|
root = vp.s;
|
||||||
pres = vp.pres;
|
pres = vp.pres;
|
||||||
perf = vp.perf;
|
perf = vp.perf;
|
||||||
|
isPresBlank = vp.isPresBlank;
|
||||||
|
isPerfBlank = vp.isPerfBlank;
|
||||||
--morphs = vp.morphs;
|
--morphs = vp.morphs;
|
||||||
{-
|
{-
|
||||||
inf : Str;
|
inf : Str;
|
||||||
@@ -45,6 +48,8 @@ concrete QuestionCgg of Question = CatCgg ** open ResCgg, Prelude in {
|
|||||||
root = clSlash.s;
|
root = clSlash.s;
|
||||||
pres = clSlash.pres;
|
pres = clSlash.pres;
|
||||||
perf = clSlash.perf;
|
perf = clSlash.perf;
|
||||||
|
isPresBlank = clSlash.isPresBlank;
|
||||||
|
isPerfBlank = clSlash.isPerfBlank;
|
||||||
--morphs = clSlash.morphs;
|
--morphs = clSlash.morphs;
|
||||||
{-
|
{-
|
||||||
inf : Str;
|
inf : Str;
|
||||||
@@ -66,6 +71,8 @@ concrete QuestionCgg of Question = CatCgg ** open ResCgg, Prelude in {
|
|||||||
pres = cl.pres;
|
pres = cl.pres;
|
||||||
perf = cl.perf;
|
perf = cl.perf;
|
||||||
--morphs = cl.morphs;
|
--morphs = cl.morphs;
|
||||||
|
isPresBlank = cl.isPresBlank;
|
||||||
|
isPerfBlank = cl.isPerfBlank;
|
||||||
{-
|
{-
|
||||||
inf : Str;
|
inf : Str;
|
||||||
pres : Str;
|
pres : Str;
|
||||||
@@ -90,6 +97,8 @@ concrete QuestionCgg of Question = CatCgg ** open ResCgg, Prelude in {
|
|||||||
pres = be_Copula.pres;
|
pres = be_Copula.pres;
|
||||||
perf = be_Copula.perf;
|
perf = be_Copula.perf;
|
||||||
--morphs = be_Copula.morphs;
|
--morphs = be_Copula.morphs;
|
||||||
|
isPresBlank = be_Copula.isPresBlank;
|
||||||
|
isPerfBlank = be_Copula.isPerfBlank;
|
||||||
{-
|
{-
|
||||||
inf : Str;
|
inf : Str;
|
||||||
pres : Str;
|
pres : Str;
|
||||||
@@ -108,6 +117,8 @@ concrete QuestionCgg of Question = CatCgg ** open ResCgg, Prelude in {
|
|||||||
pres = be_Copula.pres;
|
pres = be_Copula.pres;
|
||||||
perf = be_Copula.perf;
|
perf = be_Copula.perf;
|
||||||
--morphs = be_Copula.morphs;
|
--morphs = be_Copula.morphs;
|
||||||
|
isPresBlank = be_Copula.isPresBlank;
|
||||||
|
isPerfBlank = be_Copula.isPerfBlank;
|
||||||
{-
|
{-
|
||||||
inf : Str;
|
inf : Str;
|
||||||
pres : Str;
|
pres : Str;
|
||||||
@@ -126,6 +137,8 @@ concrete QuestionCgg of Question = CatCgg ** open ResCgg, Prelude in {
|
|||||||
pres = be_Copula.pres;
|
pres = be_Copula.pres;
|
||||||
perf = be_Copula.perf;
|
perf = be_Copula.perf;
|
||||||
--morphs = be_Copula.morphs;
|
--morphs = be_Copula.morphs;
|
||||||
|
isPresBlank = be_Copula.isPresBlank;
|
||||||
|
isPerfBlank = be_Copula.isPerfBlank;
|
||||||
{-
|
{-
|
||||||
inf : Str;
|
inf : Str;
|
||||||
pres : Str;
|
pres : Str;
|
||||||
|
|||||||
@@ -32,6 +32,8 @@ lin
|
|||||||
perf =cl.perf;
|
perf =cl.perf;
|
||||||
root = cl.root;
|
root = cl.root;
|
||||||
--morphs = cl.morphs;
|
--morphs = cl.morphs;
|
||||||
|
isPresBlank = cl.isPresBlank;
|
||||||
|
isPerfBlank = cl.isPerfBlank;
|
||||||
compl =cl.compl;
|
compl =cl.compl;
|
||||||
isCompApStem = False;
|
isCompApStem = False;
|
||||||
whichRel = Such_That;
|
whichRel = Such_That;
|
||||||
@@ -52,6 +54,8 @@ lin
|
|||||||
perf =vp.perf;
|
perf =vp.perf;
|
||||||
root = vp.s;
|
root = vp.s;
|
||||||
--morphs = vp.morphs;
|
--morphs = vp.morphs;
|
||||||
|
isPresBlank = vp.isPresBlank;
|
||||||
|
isPerfBlank = vp.isPerfBlank;
|
||||||
compl =vp.comp;
|
compl =vp.comp;
|
||||||
isCompApStem = vp.isCompApStem;
|
isCompApStem = vp.isCompApStem;
|
||||||
whichRel = RF RSubj;
|
whichRel = RF RSubj;
|
||||||
@@ -76,9 +80,11 @@ lin
|
|||||||
rp = rp.s;
|
rp = rp.s;
|
||||||
--rObjVariant2 = rp.rObjVariant2;
|
--rObjVariant2 = rp.rObjVariant2;
|
||||||
pres = clSlash.pres;
|
pres = clSlash.pres;
|
||||||
perf = clSlash.perf;
|
perf = clSlash.perf;
|
||||||
root = clSlash.root;
|
root = clSlash.root;
|
||||||
--morphs = clSlash.morphs;
|
--morphs = clSlash.morphs;
|
||||||
|
isPresBlank = clSlash.isPresBlank;
|
||||||
|
isPerfBlank = clSlash.isPerfBlank;
|
||||||
compl = comp;
|
compl = comp;
|
||||||
isCompApStem = isCompApStem;
|
isCompApStem = isCompApStem;
|
||||||
whichRel = RF RObj;
|
whichRel = RF RObj;
|
||||||
|
|||||||
@@ -62,6 +62,13 @@ param
|
|||||||
-- may not need it
|
-- may not need it
|
||||||
NounCat = ComNoun | PropNoun; --prepositions agree with nouns to form adverbial Phrases
|
NounCat = ComNoun | PropNoun; --prepositions agree with nouns to form adverbial Phrases
|
||||||
PrepForm = Form1 | Form2; -- omu and omuri, aha, ahari
|
PrepForm = Form1 | Form2; -- omu and omuri, aha, ahari
|
||||||
|
-- for Extra Tenses not implemented
|
||||||
|
-- would be better if I had alliases
|
||||||
|
TensesExtra = RemotePast | ImmediatePast | RemoteFuture;
|
||||||
|
|
||||||
|
-- for Extra Aspects not implemented
|
||||||
|
-- would be better if I had alliases
|
||||||
|
Aspect = Performative | Perfect | Resultative | Retrospective | Habitual | Progressive | Persitive;
|
||||||
{-
|
{-
|
||||||
Complete = Nouns with IV,
|
Complete = Nouns with IV,
|
||||||
Incomplete = Nouns without IV: important for use with pre-determiners
|
Incomplete = Nouns without IV: important for use with pre-determiners
|
||||||
@@ -100,6 +107,8 @@ oper
|
|||||||
s = rad;
|
s = rad;
|
||||||
pres = end1;
|
pres = end1;
|
||||||
perf = end2;
|
perf = end2;
|
||||||
|
isPresBlank = False;
|
||||||
|
isPerfBlank = False;
|
||||||
--morphs = mkVerbMorphs;
|
--morphs = mkVerbMorphs;
|
||||||
isRegular = False;
|
isRegular = False;
|
||||||
};
|
};
|
||||||
@@ -109,6 +118,8 @@ oper
|
|||||||
pres = "a";
|
pres = "a";
|
||||||
perf = "ire";
|
perf = "ire";
|
||||||
--morphs = mkVerbMorphs;
|
--morphs = mkVerbMorphs;
|
||||||
|
isPresBlank = False;
|
||||||
|
isPerfBlank = False;
|
||||||
isRegular = True;
|
isRegular = True;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1105,6 +1116,8 @@ mkSubjPrefix : Agreement -> Str =\a ->case a of {
|
|||||||
pres:Str;
|
pres:Str;
|
||||||
perf:Str;
|
perf:Str;
|
||||||
--morphs: VFormMini => VerbMorphPos=> Str;
|
--morphs: VFormMini => VerbMorphPos=> Str;
|
||||||
|
isPresBlank : Bool;
|
||||||
|
isPerfBlank : Bool;
|
||||||
isRegular:Bool
|
isRegular:Bool
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1139,7 +1152,9 @@ mkSubjPrefix : Agreement -> Str =\a ->case a of {
|
|||||||
s:Str;
|
s:Str;
|
||||||
pres:Str;
|
pres:Str;
|
||||||
perf:Str;
|
perf:Str;
|
||||||
--morphs: VMorphs ;
|
--morphs: VMorphs ;
|
||||||
|
isPresBlank : Bool;
|
||||||
|
isPerfBlank : Bool;
|
||||||
isRegular:Bool;
|
isRegular:Bool;
|
||||||
comp:Str ;
|
comp:Str ;
|
||||||
comp2:Str;
|
comp2:Str;
|
||||||
@@ -1177,13 +1192,17 @@ mkSubjPrefix : Agreement -> Str =\a ->case a of {
|
|||||||
s = "ri" ;
|
s = "ri" ;
|
||||||
pres=[];
|
pres=[];
|
||||||
perf=[];
|
perf=[];
|
||||||
--morphs= mkVerbMorphs;
|
--morphs= mkVerbMorphs;
|
||||||
|
isPresBlank = True;
|
||||||
|
isPerfBlank = True;
|
||||||
isRegular=False
|
isRegular=False
|
||||||
};
|
};
|
||||||
mkBecome : Verb ={
|
mkBecome : Verb ={
|
||||||
s = "b" ;
|
s = "b" ;
|
||||||
pres="a";
|
pres="a";
|
||||||
perf="ire";
|
perf="ire";
|
||||||
|
isPresBlank = False;
|
||||||
|
isPerfBlank = False;
|
||||||
--morphs= mkVerbMorphs;
|
--morphs= mkVerbMorphs;
|
||||||
isRegular=False
|
isRegular=False
|
||||||
};
|
};
|
||||||
@@ -1339,7 +1358,9 @@ mkSubjPrefix : Agreement -> Str =\a ->case a of {
|
|||||||
s:Str;
|
s:Str;
|
||||||
pres:Str;
|
pres:Str;
|
||||||
perf:Str;
|
perf:Str;
|
||||||
--morphs: VMorphs;
|
--morphs: VMorphs;
|
||||||
|
isPresBlank : Bool;
|
||||||
|
isPerfBlank : Bool;
|
||||||
comp: Str;
|
comp: Str;
|
||||||
comp2:Str;
|
comp2:Str;
|
||||||
ap:Str;
|
ap:Str;
|
||||||
@@ -1362,6 +1383,8 @@ mkSubjPrefix : Agreement -> Str =\a ->case a of {
|
|||||||
root : Str;
|
root : Str;
|
||||||
pres: Str;
|
pres: Str;
|
||||||
perf: Str;
|
perf: Str;
|
||||||
|
isPresBlank : Bool;
|
||||||
|
isPerfBlank : Bool;
|
||||||
--morphs : VFormMini => VerbMorphPos =>Str;
|
--morphs : VFormMini => VerbMorphPos =>Str;
|
||||||
{-
|
{-
|
||||||
inf : Str;
|
inf : Str;
|
||||||
@@ -1371,9 +1394,12 @@ mkSubjPrefix : Agreement -> Str =\a ->case a of {
|
|||||||
pastPart : Str; -- subject
|
pastPart : Str; -- subject
|
||||||
--root : Str ; -- dep. on Pol,Temp, e.g. "does","sleep"
|
--root : Str ; -- dep. on Pol,Temp, e.g. "does","sleep"
|
||||||
-}
|
-}
|
||||||
compl : Str -- after verb: complement, adverbs
|
compl : Str -- after verb: complement, adverbs
|
||||||
} ;
|
} ;
|
||||||
Comp : Type = {s:Str};
|
param
|
||||||
|
CompSource = NounP | ADverb | AdjP | CommonNoun;
|
||||||
|
oper
|
||||||
|
Comp : Type = {s:Str; source : CompSource };
|
||||||
|
|
||||||
|
|
||||||
--Conjunctions
|
--Conjunctions
|
||||||
|
|||||||
@@ -24,54 +24,110 @@ lin
|
|||||||
compl = cl.compl
|
compl = cl.compl
|
||||||
in
|
in
|
||||||
case <temp.t,temp.a, pol.p> of {
|
case <temp.t,temp.a, pol.p> of {
|
||||||
<Pres,Simul, Pos> => {s = subj ++ clitic ++ --Predef.BIND ++
|
<Pres,Simul, Pos> => case cl.isPresBlank of {
|
||||||
root ++ Predef.BIND ++ presRestOfVerb ++ compl};
|
True => {s = subj ++ clitic ++ root ++ compl};
|
||||||
|
False => {s = subj ++ clitic ++ root ++ Predef.BIND ++ compl}
|
||||||
|
};
|
||||||
{-Note: when I use pol.s instead of ti, the word alignment instead becomes worse-}
|
{-Note: when I use pol.s instead of ti, the word alignment instead becomes worse-}
|
||||||
<Pres,Simul, Neg> => {s = subj ++ "ti" ++ Predef.BIND ++ clitic ++ --Predef.BIND ++
|
<Pres,Simul, Neg> => case cl.isPresBlank of {
|
||||||
root ++ presRestOfVerb ++ compl};
|
True => {s = subj ++ "ti" ++ Predef.BIND ++ clitic ++ root ++ compl};
|
||||||
<Pres,Anter, Pos> => {s = subj ++ clitic ++ --Predef.BIND ++
|
False => {s = subj ++ "ti" ++ Predef.BIND ++ clitic ++
|
||||||
vMorphs!VFPresAnt!TAMarker ++ root ++ Predef.BIND ++ pastRestOfVerb ++ compl};
|
root ++ Predef.BIND ++ presRestOfVerb ++ compl}
|
||||||
<Pres,Anter, Neg> =>{s = subj ++ "ti" ++ Predef.BIND ++ clitic ++ --Predef.BIND ++
|
};
|
||||||
vMorphs!VFPresAnt!TAMarker ++ root ++ Predef.BIND ++ pastRestOfVerb ++ compl};
|
<Pres,Anter, Pos> => case cl.isPerfBlank of {
|
||||||
|
True => {s = subj ++ clitic ++ root ++ compl};
|
||||||
|
False => {s = subj ++ clitic ++ root ++ Predef.BIND ++ pastRestOfVerb ++ compl}
|
||||||
|
};
|
||||||
|
<Pres,Anter, Neg> => case cl.isPerfBlank of {
|
||||||
|
True => {s = subj ++ clitic ++ root ++ compl};
|
||||||
|
False => {s = subj ++ "ti" ++ Predef.BIND ++ clitic ++
|
||||||
|
root ++ Predef.BIND ++ pastRestOfVerb ++ compl}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
<Past,Simul, Pos> => {s = subj ++ clitic ++ --Predef.BIND ++
|
<Past,Simul, Pos> => case cl.isPerfBlank of {
|
||||||
root ++ Predef.BIND ++ pastRestOfVerb ++ compl};
|
True => {s = subj ++ clitic ++ "ka" ++ Predef.BIND ++ root ++ compl};
|
||||||
|
False => {s = subj ++ clitic ++ root ++ Predef.BIND ++ pastRestOfVerb ++ compl}
|
||||||
|
};
|
||||||
{-Note: when I use pol.s instead of ti, the word alignment instead becomes worse-}
|
{-Note: when I use pol.s instead of ti, the word alignment instead becomes worse-}
|
||||||
<Past,Simul, Neg> => {s = subj ++ "ti" ++ Predef.BIND ++ clitic ++ --Predef.BIND ++
|
<Past,Simul, Neg> => case cl.isPerfBlank of {
|
||||||
root ++ pastRestOfVerb ++ compl};
|
True => {s = subj ++ "ti" ++ Predef.BIND ++ clitic ++ root ++ compl};
|
||||||
<Past,Anter, Pos> => {s = subj ++ clitic ++ "bire" ++ clitic ++ --Predef.BIND ++
|
False => {s = subj ++ "ti" ++ Predef.BIND ++ clitic ++
|
||||||
vMorphs!VFPastAnt!TAMarker ++ root ++ Predef.BIND ++ pastRestOfVerb ++ compl};
|
root ++ pastRestOfVerb ++ compl}
|
||||||
<Past,Anter, Neg> =>{s = subj ++ clitic ++ "bire" ++ clitic ++ "ta"--Predef.BIND ++ ant!TAMarker
|
};
|
||||||
++ root ++ Predef.BIND ++ pastRestOfVerb ++ compl};
|
|
||||||
|
|
||||||
<Fut,Simul, Pos> => {s = subj ++ "ni" ++ Predef.BIND ++clitic ++ "za ku" ++ Predef.BIND ++ --choice of za over ija
|
<Past,Anter, Pos> => case cl.isPerfBlank of {
|
||||||
root ++ Predef.BIND ++ presRestOfVerb ++ compl};
|
True => {s = subj ++ clitic ++ "kaba" ++Predef.BIND ++ clitic ++
|
||||||
|
root ++ compl};
|
||||||
|
False => {s = subj ++ clitic ++ "kaba" ++ clitic ++ "a" ++ Predef.BIND ++
|
||||||
|
root ++ Predef.BIND ++ pastRestOfVerb ++ compl}
|
||||||
|
};
|
||||||
|
<Past,Anter, Neg> =>case cl.isPerfBlank of {
|
||||||
|
True => {s = subj ++ clitic ++ "ka" ++Predef.BIND ++ clitic ++
|
||||||
|
root ++ compl};
|
||||||
|
False => {s = subj ++ clitic ++ "kaba" ++ clitic ++ "taa" ++ Predef.BIND ++
|
||||||
|
root ++ Predef.BIND ++ pastRestOfVerb ++ compl}
|
||||||
|
};
|
||||||
|
|
||||||
|
<Fut,Simul, Pos> => case cl.isPresBlank of {
|
||||||
|
True => {s = subj ++ "ni" ++ Predef.BIND ++clitic ++ "za ku" ++ Predef.BIND ++ --choice of za over ija
|
||||||
|
root ++ compl};
|
||||||
|
False => {s = subj ++ "ni" ++ Predef.BIND ++clitic ++ "za ku" ++ Predef.BIND ++ --choice of za over ija
|
||||||
|
root ++ Predef.BIND ++ presRestOfVerb ++ compl}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
{-Note: when I use pol.s instead of ti, the word alignment instead becomes worse-}
|
{-Note: when I use pol.s instead of ti, the word alignment instead becomes worse-}
|
||||||
<Fut,Simul, Neg> => {s = subj ++ "ti" ++ Predef.BIND ++ clitic ++ "kuza ku" ++ Predef.BIND ++
|
<Fut,Simul, Neg> => case cl.isPresBlank of {
|
||||||
root ++ presRestOfVerb ++ compl};
|
True => {s = subj ++ "ti" ++ Predef.BIND ++ clitic ++ "kuza ku" ++ Predef.BIND ++
|
||||||
<Fut,Anter, Pos> => {s = subj ++ "ni" ++ Predef.BIND ++clitic ++ "za kuba" ++ Predef.BIND ++ --choice of za over ija
|
root ++ compl};
|
||||||
root ++ Predef.BIND ++ pastRestOfVerb ++ compl};
|
False => {s = subj ++ "ti" ++ Predef.BIND ++ clitic ++ "kuza ku" ++ Predef.BIND ++
|
||||||
<Fut,Anter, Neg> =>{s = subj ++ "ni" ++ Predef.BIND ++ clitic ++ "za kuba" ++ clitic ++ "taka" ++ Predef.BIND ++
|
root ++ BIND ++ presRestOfVerb ++ compl}
|
||||||
root ++ pastRestOfVerb ++ compl};
|
};
|
||||||
|
<Fut,Anter, Pos> => case cl.isPerfBlank of {
|
||||||
|
True => {s = subj ++ "ni" ++ Predef.BIND ++clitic ++ "za kuba" ++ Predef.BIND ++ clitic ++ --choice of za over ija
|
||||||
<Cond,Simul, Pos> => {s = subj ++ clitic ++ "kaa" ++Predef.BIND ++
|
root ++ Predef.BIND ++ "ire" ++ compl};
|
||||||
root ++ Predef.BIND ++ presRestOfVerb ++ compl};
|
False => {s = subj ++ "ni" ++ Predef.BIND ++clitic ++ "za kuba" ++ Predef.BIND ++ clitic ++ --choice of za over ija
|
||||||
|
root ++ Predef.BIND ++ pastRestOfVerb ++ compl}
|
||||||
|
};
|
||||||
|
|
||||||
|
<Fut,Anter, Neg> => case cl.isPerfBlank of {
|
||||||
|
True => {s = subj ++ "ni" ++ Predef.BIND ++ clitic ++ "za kuba" ++ clitic ++ Predef.BIND ++
|
||||||
|
root ++ "ire" ++ compl};
|
||||||
|
False => {s = subj ++ "ni" ++ Predef.BIND ++ clitic ++ "za kuba" ++ clitic ++ "taka" ++ Predef.BIND ++
|
||||||
|
root ++ pastRestOfVerb ++ compl}
|
||||||
|
};
|
||||||
|
<Cond,Simul, Pos> => case cl.isPresBlank of {
|
||||||
|
True => {s = subj ++ clitic ++ "kaa" ++Predef.BIND ++ root ++ compl};
|
||||||
|
False => {s = subj ++ clitic ++ "kaa" ++Predef.BIND ++
|
||||||
|
root ++ Predef.BIND ++ presRestOfVerb ++ compl}
|
||||||
|
};
|
||||||
{-Note: when I use pol.s instead of ti, the word alignment instead becomes worse-}
|
{-Note: when I use pol.s instead of ti, the word alignment instead becomes worse-}
|
||||||
<Cond,Simul, Neg> => {s = subj ++ "ti" ++ Predef.BIND ++ clitic ++ "kaa" ++ Predef.BIND ++
|
<Cond,Simul, Neg> =>case cl.isPresBlank of {
|
||||||
root ++ presRestOfVerb ++ compl};
|
True => {s = subj ++ "ti" ++ Predef.BIND ++ clitic ++ "kaa" ++ Predef.BIND ++
|
||||||
<Cond,Anter, Pos> => {s = subj ++ clitic ++ "kaa"--Predef.BIND ++
|
root ++ "ire" ++ compl};
|
||||||
++ root ++ Predef.BIND ++ pastRestOfVerb ++ compl};
|
False => {s = subj ++ "ti" ++ Predef.BIND ++ clitic ++ "kaa" ++ Predef.BIND ++
|
||||||
<Cond,Anter, Neg> =>{s = subj ++ "ti" ++ Predef.BIND ++ clitic ++ "kaa" ++Predef.BIND
|
root ++ presRestOfVerb ++ compl}
|
||||||
|
};
|
||||||
|
|
||||||
|
<Cond,Anter, Pos> => case cl.isPerfBlank of {
|
||||||
|
True => {s = subj ++ clitic ++ "kaa" ++ root ++ compl};
|
||||||
|
False => {s = subj ++ clitic ++ "kaa" ++ root ++ Predef.BIND ++ pastRestOfVerb ++ compl}
|
||||||
|
};
|
||||||
|
|
||||||
|
<Cond,Anter, Neg> =>case cl.isPerfBlank of {
|
||||||
|
True => {s = subj ++ "ti" ++ Predef.BIND ++ clitic ++ "kaa" ++Predef.BIND
|
||||||
|
++ root ++ Predef.BIND ++ "ire" ++ compl};
|
||||||
|
False => {s = subj ++ "ti" ++ Predef.BIND ++ clitic ++ "kaa" ++Predef.BIND
|
||||||
++ root ++ Predef.BIND ++ pastRestOfVerb ++ compl}
|
++ root ++ Predef.BIND ++ pastRestOfVerb ++ compl}
|
||||||
|
}
|
||||||
}; --: Temp -> Pol -> QCl -> QS ; -- has John walked
|
}; --: Temp -> Pol -> QCl -> QS ; -- has John walked
|
||||||
|
|
||||||
-- These are the 2 x 4 x 4 = 16 forms generated by different
|
-- These are the 2 x 4 x 4 = 16 forms generated by different
|
||||||
-- combinations of tense, polarity, and
|
-- combinations of tense, polarity, and
|
||||||
-- anteriority, which are defined in [``Common`` Common.html].
|
-- anteriority, which are defined in [``Common`` Common.html].
|
||||||
UseQCl = UseCl; -- : Temp -> Pol -> Cl -> S ; -- John has not walked
|
UseQCl = UseCl; -- : Temp -> Pol -> Cl -> S ; -- John has not walked
|
||||||
QuestCl qcl = qcl; --: Cl -> QCl ; -- does John (not) walk
|
|
||||||
|
|
||||||
--UseRCl : Temp -> Pol -> RCl -> RS ; -- that had not slept
|
--UseRCl : Temp -> Pol -> RCl -> RS ; -- that had not slept
|
||||||
UseRCl temp pol rcl = let
|
UseRCl temp pol rcl = let
|
||||||
@@ -231,6 +287,8 @@ lin
|
|||||||
perf = vp.perf;
|
perf = vp.perf;
|
||||||
root = vp.s;
|
root = vp.s;
|
||||||
--morphs = vp.morphs;
|
--morphs = vp.morphs;
|
||||||
|
isPresBlank = vp.isPresBlank;
|
||||||
|
isPerfBlank = vp.isPerfBlank;
|
||||||
{-
|
{-
|
||||||
inf = mkVerbInrf vp.root;
|
inf = mkVerbInrf vp.root;
|
||||||
pres = mkVerbPres vp.root;
|
pres = mkVerbPres vp.root;
|
||||||
@@ -248,6 +306,8 @@ lin
|
|||||||
perf = vp.perf;
|
perf = vp.perf;
|
||||||
root = vp.s;
|
root = vp.s;
|
||||||
--morphs = vp.morphs;
|
--morphs = vp.morphs;
|
||||||
|
isPresBlank = vp.isPresBlank;
|
||||||
|
isPerfBlank = vp.isPerfBlank;
|
||||||
{-
|
{-
|
||||||
inf = mkVerbInrf vp.root;
|
inf = mkVerbInrf vp.root;
|
||||||
pres = mkVerbPres vp.root;
|
pres = mkVerbPres vp.root;
|
||||||
@@ -256,7 +316,7 @@ lin
|
|||||||
pastPart = mkVerbPastPart vp.root; -- subject
|
pastPart = mkVerbPastPart vp.root; -- subject
|
||||||
-}
|
-}
|
||||||
--root = vp.root ;
|
--root = vp.root ;
|
||||||
compl = mkSubjClitic np.agr ++ Predef.BIND ++ vp.comp --mkSubjClitic np.agr ++ Predef.BIND ++ vp.comp
|
compl = mkSubjClitic np.agr ++ vp.comp --mkSubjClitic np.agr ++ Predef.BIND ++ vp.comp
|
||||||
}
|
}
|
||||||
};--: NP -> VP -> Cl ; -- John walks / John does not walk
|
};--: NP -> VP -> Cl ; -- John walks / John does not walk
|
||||||
|
|
||||||
@@ -309,6 +369,8 @@ lin
|
|||||||
pres = vpslash.pres;
|
pres = vpslash.pres;
|
||||||
perf = vpslash.perf;
|
perf = vpslash.perf;
|
||||||
--morphs = vpslash.morphs;
|
--morphs = vpslash.morphs;
|
||||||
|
isPresBlank = vpslash.isPresBlank;
|
||||||
|
isPerfBlank = vpslash.isPerfBlank;
|
||||||
ap = vpslash.ap;
|
ap = vpslash.ap;
|
||||||
isRegular = vpslash.isRegular;
|
isRegular = vpslash.isRegular;
|
||||||
adv = vpslash.adv;
|
adv = vpslash.adv;
|
||||||
|
|||||||
33
src/rukiga/SentenceCggAbsCgg.gf
Normal file
33
src/rukiga/SentenceCggAbsCgg.gf
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
concrete SentenceCggAbsCgg of SentenceCggAbs = CatCgg
|
||||||
|
open (R=ResCgg) in {
|
||||||
|
|
||||||
|
lincat
|
||||||
|
ExtTense = {s : Str ; t : R.TensesExtra } ;
|
||||||
|
TempExtra = {s : Str ; t : R.TensesExtra a : R.Aspects} ;
|
||||||
|
Aspect = {s : Str ; a : R.AspectsExtra } ;
|
||||||
|
lin
|
||||||
|
--TAspect -> ExtTense ->Ant -> TempExtra ;
|
||||||
|
TAspect extT a ={s = extT.s ++ a.s; t = exT.t; a = a.a};
|
||||||
|
--TRPast : ExtTense ; -- bakagyenda [Remote past]
|
||||||
|
TRPast = {s = [] ; t = R.Remotepast };
|
||||||
|
--TIPast : ExtTense ; -- baagyenda [Immediate Past or Memorial ]
|
||||||
|
TIPast = {s =[] ; t = R.ImmediatePast};
|
||||||
|
--TRFut : ExtTense ; -- I sleep/slept [simultaneous, not compound]
|
||||||
|
TRFut = {s = [] ; t = R.RemoteFut};
|
||||||
|
|
||||||
|
--APerformative : Aspect ; -- I slept [past, "imperfect"] --# notpresent
|
||||||
|
APerformative = {s = []; a = R.Performative };
|
||||||
|
APerfect = {s = []; a = R.Perfect }; -- I will sleep [future] --# notpresent
|
||||||
|
ARes = {s = []; a = R.Resultative }; -- I would sleep [conditional] --# notpresent
|
||||||
|
ARetr = {s = []; a = R.Retrospective }; -- I have slept/had slept [anterior, "compound", "perfect"] --# notpresent
|
||||||
|
AHab = {s = []; a = R.Habitual };
|
||||||
|
AProg = {s = []; a = R.Progrssive };
|
||||||
|
APer = {s = []; a = R.Persitive };
|
||||||
|
UseClExtra : TempExtra -> Pol -> Cl -> S ; -- she had not slept
|
||||||
|
|
||||||
|
|
||||||
|
--UseQClExtra : TempExtra -> Pol -> QCl -> QS ; -- who had not slept
|
||||||
|
--UseRClExtra : TempExtra -> Pol -> RCl -> RS ; -- that had not slept
|
||||||
|
--UseSlashExtra : TempExtra -> Pol -> ClSlash -> SSlash ; -- (that) she had not seen
|
||||||
|
|
||||||
|
}
|
||||||
3
src/rukiga/SentenceCggExtra.gf
Normal file
3
src/rukiga/SentenceCggExtra.gf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
abstract SentenceCggExtra = Cat **{
|
||||||
|
|
||||||
|
}
|
||||||
25
src/rukiga/SentenceCggExtraAbs.gf
Normal file
25
src/rukiga/SentenceCggExtraAbs.gf
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
abstract SentenceCggExtraAbs = Cat **{
|
||||||
|
|
||||||
|
cat
|
||||||
|
ExtTense;
|
||||||
|
TempExtra;
|
||||||
|
Aspect;
|
||||||
|
fun
|
||||||
|
TAspect -> ExtTense ->Ant -> TempExtra ;
|
||||||
|
TRPast : ExtTense ; -- bakagyenda [Remote past]
|
||||||
|
TIPast : ExtTense ; -- baagyenda [Immediate Past or Memorial ]
|
||||||
|
TRFut : ExtTense ; -- I sleep/slept [simultaneous, not compound]
|
||||||
|
APerformative : Aspect ; -- I slept [past, "imperfect"] --# notpresent
|
||||||
|
APerfect : Aspect ; -- I will sleep [future] --# notpresent
|
||||||
|
ARes : Aspect ; -- I would sleep [conditional] --# notpresent
|
||||||
|
ARetr : Aspect ; -- I have slept/had slept [anterior, "compound", "perfect"] --# notpresent
|
||||||
|
AHab : Aspect ;
|
||||||
|
AProg : Aspect ;
|
||||||
|
APer : Aspect ;
|
||||||
|
|
||||||
|
|
||||||
|
UseClExtra : TempExtra -> Pol -> Cl -> S ; -- she had not slept
|
||||||
|
UseQClExtra : TempExtra -> Pol -> QCl -> QS ; -- who had not slept
|
||||||
|
UseRClExtra : TempExtra -> Pol -> RCl -> RS ; -- that had not slept
|
||||||
|
UseSlashExtra : TempExtra -> Pol -> ClSlash -> SSlash ; -- (that) she had not seen
|
||||||
|
}
|
||||||
@@ -97,7 +97,8 @@ lin
|
|||||||
n = Sg
|
n = Sg
|
||||||
};
|
};
|
||||||
|
|
||||||
have_V2 ={s= "ine"; pres=[]; perf =[]; morphs = mkVerbMorphs; comp = []; isRegular=False}; --: V2 ;
|
have_V2 ={s= "ine"; pres=[]; perf =[]; isPresBlank = False;
|
||||||
|
isPerfBlank = False; morphs = mkVerbMorphs; comp = []; isRegular=False}; --: V2 ;
|
||||||
|
|
||||||
{-
|
{-
|
||||||
All Predeterminers are given here.
|
All Predeterminers are given here.
|
||||||
@@ -203,12 +204,16 @@ lin
|
|||||||
doesAgree = True
|
doesAgree = True
|
||||||
};--: Det ;
|
};--: Det ;
|
||||||
|
|
||||||
want_VV = {s = "yend"; pres="da"; perf = "zire"; morphs=mkVerbMorphs; isRegular=True; inf=[]; whenUsed = VVBoth};
|
want_VV = {s = "yend"; pres="da"; perf = "zire"; isPresBlank = False;
|
||||||
can8know_VV = {s = "baas"; pres="a"; perf = "ize"; morphs=mkVerbMorphs; isRegular=True; inf=[]; whenUsed = VVBoth};--: VV ; -- can (capacity)
|
isPerfBlank = False; morphs=mkVerbMorphs; isRegular=True; inf=[]; whenUsed = VVBoth};
|
||||||
can_VV = {s = "baas"; pres="a"; perf = "ize"; morphs=mkVerbMorphs; isRegular=True; inf=[]; whenUsed = VVBoth};--: VV ; -- can (possibility)
|
can8know_VV = {s = "baas"; pres="a"; perf = "ize"; isPresBlank = False;
|
||||||
|
isPerfBlank = False; morphs=mkVerbMorphs; isRegular=True; inf=[]; whenUsed = VVBoth};--: VV ; -- can (capacity)
|
||||||
|
can_VV = {s = "baas"; pres="a"; perf = "ize"; isPresBlank = False;
|
||||||
|
isPerfBlank = False; morphs=mkVerbMorphs; isRegular=True; inf=[]; whenUsed = VVBoth};--: VV ; -- can (possibility)
|
||||||
-- must_VV used especially in the perfective mood: see dictionary entry shemerera on Pg 501 of Mpairwe
|
-- must_VV used especially in the perfective mood: see dictionary entry shemerera on Pg 501 of Mpairwe
|
||||||
-- must has no passive form
|
-- must has no passive form
|
||||||
must_VV = {s = "shemere"; pres="ra"; perf = "ire"; morphs=mkVerbMorphs; isRegular=False; inf=[]; whenUsed = VVPerf}; --VV
|
must_VV = {s = "shemere"; pres="ra"; perf = "ire"; isPresBlank = False;
|
||||||
|
isPerfBlank = False; morphs=mkVerbMorphs; isRegular=False; inf=[]; whenUsed = VVPerf}; --VV
|
||||||
--somebody_NP = {}; --: NP ;
|
--somebody_NP = {}; --: NP ;
|
||||||
--something_NP : NP ;
|
--something_NP : NP ;
|
||||||
--somewhere_Adv : Adv ;
|
--somewhere_Adv : Adv ;
|
||||||
|
|||||||
@@ -8,7 +8,9 @@ lin
|
|||||||
s = v.s ;
|
s = v.s ;
|
||||||
pres =v.pres;
|
pres =v.pres;
|
||||||
perf = v.perf;
|
perf = v.perf;
|
||||||
--morphs = v.morphs;
|
--morphs = v.morphs;
|
||||||
|
isPresBlank = v.isPresBlank;
|
||||||
|
isPerfBlank = v.isPerfBlank;
|
||||||
comp =[];
|
comp =[];
|
||||||
comp2 = [];
|
comp2 = [];
|
||||||
ap =[];
|
ap =[];
|
||||||
@@ -23,14 +25,35 @@ lin
|
|||||||
|
|
||||||
-- UseComp : Comp -> VP ; -- be warm means complement of a copula especially adjectival Phrase
|
-- UseComp : Comp -> VP ; -- be warm means complement of a copula especially adjectival Phrase
|
||||||
--AdjectivalPhrase : Type = {s : Str ; post : Str; isPre : Bool; isProper : Bool; isPrep: Bool};
|
--AdjectivalPhrase : Type = {s : Str ; post : Str; isPre : Bool; isProper : Bool; isPrep: Bool};
|
||||||
UseComp comp = let auxBe = mkBecome
|
UseComp comp =
|
||||||
|
--let auxBe = mkBecome
|
||||||
in
|
--in
|
||||||
{
|
case comp.source of{
|
||||||
s = auxBe.s ++ BIND ++auxBe.pres++ comp.s; --Assuming there is no AP which is prepositional
|
AdjP => {
|
||||||
|
s = mkBecome.s ++ BIND ++ mkBecome.pres; --Assuming there is no AP which is prepositional
|
||||||
|
pres =[];
|
||||||
|
perf = [];
|
||||||
|
isPresBlank = True;
|
||||||
|
isPerfBlank = True;
|
||||||
|
--morphs=\\form,morphs=>[];
|
||||||
|
comp = comp.s;
|
||||||
|
comp2 = [];
|
||||||
|
ap = [];
|
||||||
|
isCompApStem = True;
|
||||||
|
agr = AgrNo;
|
||||||
|
isRegular = False;
|
||||||
|
adv = [];
|
||||||
|
containsAdv =False;
|
||||||
|
adV =[];
|
||||||
|
containsAdV = False
|
||||||
|
};
|
||||||
|
_ => {
|
||||||
|
s = mkBecome.s ++ BIND ++mkBecome.pres++ comp.s; --Assuming there is no AP which is prepositional
|
||||||
pres =[];
|
pres =[];
|
||||||
perf = [];
|
perf = [];
|
||||||
--morphs=\\form,morphs=>[];
|
--morphs=\\form,morphs=>[];
|
||||||
|
isPresBlank = True;
|
||||||
|
isPerfBlank = True;
|
||||||
comp = [];
|
comp = [];
|
||||||
comp2 = [];
|
comp2 = [];
|
||||||
ap = [];
|
ap = [];
|
||||||
@@ -41,27 +64,32 @@ lin
|
|||||||
containsAdv =False;
|
containsAdv =False;
|
||||||
adV =[];
|
adV =[];
|
||||||
containsAdV = False
|
containsAdV = False
|
||||||
}; --its not generating any sentence
|
}
|
||||||
|
}; --its not generating any sentence
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- CompAP : AP -> Comp; -- (be) small
|
-- CompAP : AP -> Comp; -- (be) small
|
||||||
CompAP ap = {s=ap.s! AgP3 Sg KI_BI}; -- used a hack.
|
CompAP ap = {s=ap.s! AgP3 Sg KI_BI; source = AdjP}; -- used a hack.
|
||||||
|
|
||||||
-- CompNP : NP -> Comp ; -- (be) the man
|
-- CompNP : NP -> Comp ; -- (be) the man
|
||||||
CompNP np = {s= np.s ! Acc}; --{s =[] ; post =np.s; isPre = False; isProper = Bool; isPrep: Bool};
|
CompNP np = {s= np.s ! Acc; source = NounP}; --{s =[] ; post =np.s; isPre = False; isProper = Bool; isPrep: Bool};
|
||||||
|
|
||||||
-- CompAdv : Adv -> Comp ; -- (be) here
|
-- CompAdv : Adv -> Comp ; -- (be) here
|
||||||
CompAdv adv =adv;
|
CompAdv adv ={ s= adv.s; source = ADverb};
|
||||||
{-
|
{-
|
||||||
This has been a hack to simply pick the sigular and complete noun.
|
This has been a hack to simply pick the sigular and complete noun.
|
||||||
-}
|
-}
|
||||||
--CompCN : CN -> Comp ; -- (be) a man/men
|
--CompCN : CN -> Comp ; -- (be) a man/men
|
||||||
CompCN cn = {s =cn.s ! Sg ! Complete} ; -- (be) a man/men
|
CompCN cn = {s =cn.s ! Sg ! Complete; source = CommonNoun} ; -- (be) a man/men
|
||||||
-- SlashV2a : V2 -> VPSlash ; -- love (it)
|
-- SlashV2a : V2 -> VPSlash ; -- love (it)
|
||||||
SlashV2a v2 ={
|
SlashV2a v2 ={
|
||||||
s =v2.s;
|
s =v2.s;
|
||||||
pres =v2.pres;
|
pres =v2.pres;
|
||||||
perf = v2.perf;
|
perf = v2.perf;
|
||||||
--morphs = v2.morphs;
|
--morphs = v2.morphs;
|
||||||
|
isPresBlank = v2.isPresBlank;
|
||||||
|
isPerfBlank = v2.isPerfBlank;
|
||||||
comp = [];
|
comp = [];
|
||||||
comp2 =[];
|
comp2 =[];
|
||||||
ap =[];
|
ap =[];
|
||||||
@@ -76,7 +104,9 @@ lin
|
|||||||
s =v3.s;
|
s =v3.s;
|
||||||
pres =v3.pres;
|
pres =v3.pres;
|
||||||
perf = v3.perf;
|
perf = v3.perf;
|
||||||
--morphs = v3.morphs;
|
--morphs = v3.morphs;
|
||||||
|
isPresBlank = v3.isPresBlank;
|
||||||
|
isPerfBlank = v3.isPerfBlank;
|
||||||
comp = np.s ! Acc;
|
comp = np.s ! Acc;
|
||||||
comp2 =[];
|
comp2 =[];
|
||||||
ap =[];
|
ap =[];
|
||||||
@@ -93,6 +123,8 @@ lin
|
|||||||
pres =v3.pres;
|
pres =v3.pres;
|
||||||
perf = v3.perf;
|
perf = v3.perf;
|
||||||
--morphs = v3.morphs;
|
--morphs = v3.morphs;
|
||||||
|
isPresBlank = v3.isPresBlank;
|
||||||
|
isPerfBlank = v3.isPerfBlank;
|
||||||
comp = np.s ! Acc;
|
comp = np.s ! Acc;
|
||||||
comp2 = np.s ! Acc; -- what is the meaning of this function?
|
comp2 = np.s ! Acc; -- what is the meaning of this function?
|
||||||
ap = [];
|
ap = [];
|
||||||
@@ -107,8 +139,13 @@ lin
|
|||||||
s =vv.s;
|
s =vv.s;
|
||||||
pres =vv.pres;
|
pres =vv.pres;
|
||||||
perf = vv.perf;
|
perf = vv.perf;
|
||||||
--morphs = vv.morphs;
|
--morphs = vv.morphs;
|
||||||
comp = vpslash.s ++ BIND ++ vpslash.pres;
|
isPresBlank = vv.isPresBlank;
|
||||||
|
isPerfBlank = vv.isPerfBlank;
|
||||||
|
comp = case vv.isPresBlank of {
|
||||||
|
False => vpslash.s ++ BIND ++ vpslash.pres;
|
||||||
|
_ => vpslash.s
|
||||||
|
};
|
||||||
comp2 = [];
|
comp2 = [];
|
||||||
ap = [];
|
ap = [];
|
||||||
isRegular = vv.isRegular;
|
isRegular = vv.isRegular;
|
||||||
@@ -127,7 +164,9 @@ lin
|
|||||||
s =vpslash.s;
|
s =vpslash.s;
|
||||||
pres =vpslash.pres;
|
pres =vpslash.pres;
|
||||||
perf = vpslash.perf;
|
perf = vpslash.perf;
|
||||||
--morphs = vpslash.morphs;
|
--morphs = vpslash.morphs;
|
||||||
|
isPresBlank = vpslash.isPresBlank;
|
||||||
|
isPerfBlank = vpslash.isPerfBlank;
|
||||||
comp = vpslash.comp ++ np.s ! Acc;
|
comp = vpslash.comp ++ np.s ! Acc;
|
||||||
comp2 =vpslash.comp2; --should be empty
|
comp2 =vpslash.comp2; --should be empty
|
||||||
ap = [];
|
ap = [];
|
||||||
@@ -146,7 +185,9 @@ lin
|
|||||||
s=vp.s;
|
s=vp.s;
|
||||||
pres =vp.pres;
|
pres =vp.pres;
|
||||||
perf = vp.perf;
|
perf = vp.perf;
|
||||||
--morphs = vp.morphs;
|
--morphs = vp.morphs;
|
||||||
|
isPresBlank = vp.isPresBlank;
|
||||||
|
isPerfBlank = vp.isPerfBlank;
|
||||||
comp = adv.s;
|
comp = adv.s;
|
||||||
comp2 = [];
|
comp2 = [];
|
||||||
ap =[];
|
ap =[];
|
||||||
@@ -164,9 +205,11 @@ lin
|
|||||||
s=vp.s;
|
s=vp.s;
|
||||||
pres =vp.pres;
|
pres =vp.pres;
|
||||||
perf = vp.perf;
|
perf = vp.perf;
|
||||||
--morphs = vp.morphs;
|
--morphs = vp.morphs;
|
||||||
|
isPresBlank = vp.isPresBlank;
|
||||||
|
isPerfBlank = vp.isPerfBlank;
|
||||||
comp = vp.comp;
|
comp = vp.comp;
|
||||||
comp2 =vp.comp;
|
comp2 =vp.comp2;
|
||||||
ap = [];
|
ap = [];
|
||||||
isCompApStem = False;
|
isCompApStem = False;
|
||||||
agr = AgrNo;
|
agr = AgrNo;
|
||||||
@@ -187,7 +230,9 @@ lin
|
|||||||
s =vpslash.s;
|
s =vpslash.s;
|
||||||
pres =vpslash.pres;
|
pres =vpslash.pres;
|
||||||
perf = vpslash.perf;
|
perf = vpslash.perf;
|
||||||
--morphs = vpslash.morphs;
|
--morphs = vpslash.morphs;
|
||||||
|
isPresBlank = vpslash.isPresBlank;
|
||||||
|
isPerfBlank = vpslash.isPerfBlank;
|
||||||
comp = vpslash.comp;
|
comp = vpslash.comp;
|
||||||
comp2 = vpslash.comp2;
|
comp2 = vpslash.comp2;
|
||||||
ap = [];
|
ap = [];
|
||||||
@@ -207,7 +252,9 @@ lin
|
|||||||
s =vpslash.s;
|
s =vpslash.s;
|
||||||
pres =vpslash.pres;
|
pres =vpslash.pres;
|
||||||
perf = vpslash.perf;
|
perf = vpslash.perf;
|
||||||
--morphs = vpslash.morphs;
|
--morphs = vpslash.morphs;
|
||||||
|
isPresBlank = vpslash.isPresBlank;
|
||||||
|
isPerfBlank = vpslash.isPerfBlank;
|
||||||
comp = vpslash.comp;
|
comp = vpslash.comp;
|
||||||
comp2 = vpslash.comp2;
|
comp2 = vpslash.comp2;
|
||||||
ap = [];
|
ap = [];
|
||||||
@@ -231,7 +278,9 @@ lin
|
|||||||
s= vv.s ++ BIND ++ vv.perf ++ vpPres;
|
s= vv.s ++ BIND ++ vv.perf ++ vpPres;
|
||||||
pres = [];--vv.pres;
|
pres = [];--vv.pres;
|
||||||
perf= []; -- vv.perf;
|
perf= []; -- vv.perf;
|
||||||
--morphs = vv.morphs;
|
--morphs = vv.morphs;
|
||||||
|
isPresBlank = True;
|
||||||
|
isPerfBlank = True;
|
||||||
comp=vp.comp ;
|
comp=vp.comp ;
|
||||||
comp2 = vp.comp2;
|
comp2 = vp.comp2;
|
||||||
ap = [];
|
ap = [];
|
||||||
@@ -246,7 +295,9 @@ lin
|
|||||||
s= vv.s ++ BIND ++ vv.pres ++ vpPres;
|
s= vv.s ++ BIND ++ vv.pres ++ vpPres;
|
||||||
pres = [];--vv.pres;
|
pres = [];--vv.pres;
|
||||||
perf= [];--vv.perf;
|
perf= [];--vv.perf;
|
||||||
--morphs = vv.morphs;
|
--morphs = vv.morphs;
|
||||||
|
isPresBlank = True;
|
||||||
|
isPerfBlank = True;
|
||||||
comp=vp.comp ;
|
comp=vp.comp ;
|
||||||
comp2 = vp.comp2;
|
comp2 = vp.comp2;
|
||||||
ap = [];
|
ap = [];
|
||||||
@@ -265,7 +316,9 @@ lin
|
|||||||
s= vs.s;
|
s= vs.s;
|
||||||
pres =vs.pres;
|
pres =vs.pres;
|
||||||
perf=vs.perf;
|
perf=vs.perf;
|
||||||
--morphs = vs.morphs;
|
--morphs = vs.morphs;
|
||||||
|
isPresBlank = vs.isPresBlank;
|
||||||
|
isPerfBlank = vs.isPerfBlank;
|
||||||
comp=s.s ;
|
comp=s.s ;
|
||||||
comp2 = [];
|
comp2 = [];
|
||||||
ap = [];
|
ap = [];
|
||||||
@@ -286,7 +339,9 @@ lin
|
|||||||
s= vq.s;
|
s= vq.s;
|
||||||
pres =vq.pres;
|
pres =vq.pres;
|
||||||
perf=vq.perf;
|
perf=vq.perf;
|
||||||
--morphs = vq.morphs;
|
--morphs = vq.morphs;
|
||||||
|
isPresBlank = vq.isPresBlank;
|
||||||
|
isPerfBlank = vq.isPerfBlank;
|
||||||
comp=qs.s ;
|
comp=qs.s ;
|
||||||
comp2 = [];
|
comp2 = [];
|
||||||
ap = [];
|
ap = [];
|
||||||
@@ -312,7 +367,9 @@ lin
|
|||||||
s= va.s;
|
s= va.s;
|
||||||
pres =va.pres;
|
pres =va.pres;
|
||||||
perf=va.perf;
|
perf=va.perf;
|
||||||
--morphs = va.morphs;
|
--morphs = va.morphs;
|
||||||
|
isPresBlank = va.isPresBlank;
|
||||||
|
isPerfBlank = va.isPerfBlank;
|
||||||
comp=[] ;
|
comp=[] ;
|
||||||
comp2 = [];
|
comp2 = [];
|
||||||
ap = ap.s! AgP3 Sg KI_BI;
|
ap = ap.s! AgP3 Sg KI_BI;
|
||||||
@@ -327,7 +384,7 @@ lin
|
|||||||
|
|
||||||
-- Copula alone
|
-- Copula alone
|
||||||
--UseCopula : VP ; -- be
|
--UseCopula : VP ; -- be
|
||||||
UseCopula = mkBecome ** {
|
UseCopula = be_Copula ** {
|
||||||
comp=[];
|
comp=[];
|
||||||
comp2 = [];
|
comp2 = [];
|
||||||
ap = [];
|
ap = [];
|
||||||
|
|||||||
@@ -8,12 +8,15 @@ concrete AdjectiveSom of Adjective = CatSom ** open ResSom, Prelude in {
|
|||||||
-- elliptic-relational.
|
-- elliptic-relational.
|
||||||
|
|
||||||
-- : A -> AP ;
|
-- : A -> AP ;
|
||||||
PositA a = a ;
|
PositA a = a ** {
|
||||||
|
compar = [] ;
|
||||||
|
} ;
|
||||||
|
|
||||||
-- : A -> NP -> AP ;
|
-- : A -> NP -> AP ;
|
||||||
-- ComparA a np = a ** {
|
ComparA a np = a ** {
|
||||||
-- s = \\agr => np.s ! Abs ++ "ka" ++ a.s ! AF Compar ;
|
s = \\af => "ka" ++ a.s ! af ;
|
||||||
-- } ;
|
compar = np.s ! Abs
|
||||||
|
} ;
|
||||||
|
|
||||||
-- : A2 -> NP -> AP ; -- married to her
|
-- : A2 -> NP -> AP ; -- married to her
|
||||||
-- ComplA2 a2 np = a2 ** { } ;
|
-- ComplA2 a2 np = a2 ** { } ;
|
||||||
@@ -25,7 +28,10 @@ concrete AdjectiveSom of Adjective = CatSom ** open ResSom, Prelude in {
|
|||||||
UseA2 = PositA ;
|
UseA2 = PositA ;
|
||||||
|
|
||||||
-- : A -> AP ; -- warmer
|
-- : A -> AP ; -- warmer
|
||||||
--UseComparA a = a ** {} ;
|
UseComparA a = a ** {
|
||||||
|
s = \\af => "ka" ++ a.s ! af ;
|
||||||
|
compar = []
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
-- : CAdv -> AP -> NP -> AP ; -- as cool as John
|
-- : CAdv -> AP -> NP -> AP ; -- as cool as John
|
||||||
@@ -34,13 +40,17 @@ concrete AdjectiveSom of Adjective = CatSom ** open ResSom, Prelude in {
|
|||||||
-- The superlative use is covered in $Ord$.
|
-- The superlative use is covered in $Ord$.
|
||||||
|
|
||||||
-- : Ord -> AP ; -- warmest
|
-- : Ord -> AP ; -- warmest
|
||||||
-- AdjOrd ord = ord ** {} ;
|
AdjOrd ord = ord ** {
|
||||||
|
compar = []
|
||||||
|
} ;
|
||||||
|
|
||||||
-- Sentence and question complements defined for all adjectival
|
-- Sentence and question complements defined for all adjectival
|
||||||
-- phrases, although the semantics is only clear for some adjectives.
|
-- phrases, although the semantics is only clear for some adjectives.
|
||||||
|
|
||||||
-- : AP -> SC -> AP ; -- good that she is here
|
-- : AP -> SC -> AP ; -- good that she is here
|
||||||
-- SentAP ap sc = ap ** { } ;
|
SentAP ap sc = ap ** {
|
||||||
|
s = \\af => ap.s ! af ++ sc.s -- TODO check
|
||||||
|
} ;
|
||||||
|
|
||||||
-- An adjectival phrase can be modified by an *adadjective*, such as "very".
|
-- An adjectival phrase can be modified by an *adadjective*, such as "very".
|
||||||
|
|
||||||
|
|||||||
@@ -11,14 +11,7 @@ lin
|
|||||||
-- ComparAdvAdjS : CAdv -> A -> S -> Adv ; -- more warmly than he runs
|
-- ComparAdvAdjS : CAdv -> A -> S -> Adv ; -- more warmly than he runs
|
||||||
|
|
||||||
-- : Prep -> NP -> Adv ;
|
-- : Prep -> NP -> Adv ;
|
||||||
PrepNP prep np = prep ** {
|
PrepNP = prepNP ;
|
||||||
np = case prep.isPoss of {
|
|
||||||
True => nplite emptyNP ;
|
|
||||||
False => nplite np } ;
|
|
||||||
miscAdv = case prep.isPoss of {
|
|
||||||
True => np.s ! Abs ++ prep.miscAdv ! np.a ;
|
|
||||||
False => prep.miscAdv ! Sg3 Masc }
|
|
||||||
} ;
|
|
||||||
|
|
||||||
-- Adverbs can be modified by 'adadjectives', just like adjectives.
|
-- Adverbs can be modified by 'adadjectives', just like adjectives.
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
concrete CatSom of Cat = CommonX - [Adv] ** open ResSom, Prelude in {
|
concrete CatSom of Cat = CommonX - [Adv,IAdv] ** open ResSom, Prelude in {
|
||||||
|
|
||||||
flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
@@ -16,17 +16,18 @@ concrete CatSom of Cat = CommonX - [Adv] ** open ResSom, Prelude in {
|
|||||||
Cl = ResSom.ClSlash ;
|
Cl = ResSom.ClSlash ;
|
||||||
ClSlash = ResSom.ClSlash ;
|
ClSlash = ResSom.ClSlash ;
|
||||||
SSlash = ResSom.Sentence ; -- sentence missing NP; e.g. "she has looked at"
|
SSlash = ResSom.Sentence ; -- sentence missing NP; e.g. "she has looked at"
|
||||||
Imp = SS ; -- imperative e.g. "look at this"
|
Imp = {s : Number => Polarity => Str} ; -- imperative e.g. "look at this"
|
||||||
|
|
||||||
--2 Questions and interrogatives
|
--2 Questions and interrogatives
|
||||||
|
|
||||||
-- Constructed in QuestionSom.
|
-- Constructed in QuestionSom.
|
||||||
|
|
||||||
QCl = ResSom.QClause ;
|
QCl = ResSom.QClause ;
|
||||||
IP = ResSom.NounPhrase ;
|
IComp = SS ; -- interrogative complement of copula e.g. "where"
|
||||||
IComp = SS ; -- interrogative complement of copula e.g. "where"
|
|
||||||
IDet = ResSom.Determiner ; -- interrogative determiner e.g. "how many"
|
IDet = ResSom.Determiner ; -- interrogative determiner e.g. "how many"
|
||||||
IQuant = ResSom.Quant ; -- interrogative quantifier e.g. "which"
|
IQuant = ResSom.Quant ; -- interrogative quantifier e.g. "which"
|
||||||
|
IP = ResSom.NounPhrase ** {contractSTM : Bool} ; -- like NP but may contract with STM
|
||||||
|
IAdv = ResSom.IAdv ;
|
||||||
|
|
||||||
--2 Subord clauses and pronouns
|
--2 Subord clauses and pronouns
|
||||||
|
|
||||||
@@ -65,7 +66,10 @@ concrete CatSom of Cat = CommonX - [Adv] ** open ResSom, Prelude in {
|
|||||||
Predet = {s : Str ; da : DefArticle ; isPoss : Bool} ;
|
Predet = {s : Str ; da : DefArticle ; isPoss : Bool} ;
|
||||||
Quant = ResSom.Quant ;
|
Quant = ResSom.Quant ;
|
||||||
Num = ResSom.Num ;
|
Num = ResSom.Num ;
|
||||||
Ord = {s : Str ; n : Number} ;
|
Ord = {
|
||||||
|
s : AForm => Str ; -- Ord can came from AP and become AP again
|
||||||
|
n : Number -- Ord can come from Num, which has inherent number
|
||||||
|
} ;
|
||||||
DAP = ResSom.Determiner ;
|
DAP = ResSom.Determiner ;
|
||||||
|
|
||||||
|
|
||||||
@@ -84,11 +88,7 @@ concrete CatSom of Cat = CommonX - [Adv] ** open ResSom, Prelude in {
|
|||||||
-- Constructed in StructuralSom.
|
-- Constructed in StructuralSom.
|
||||||
Conj = {s2 : State => Str ; s1 : Str ; n : Number } ;
|
Conj = {s2 : State => Str ; s1 : Str ; n : Number } ;
|
||||||
Subj = SS ;
|
Subj = SS ;
|
||||||
Prep = ResSom.Prep ** {
|
Prep = ResSom.Prep ;
|
||||||
isPoss : Bool ;
|
|
||||||
c2 : Preposition ;
|
|
||||||
berri, sii, dhex : Str ;
|
|
||||||
miscAdv : Agreement => Str } ;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -97,18 +97,18 @@ concrete CatSom of Cat = CommonX - [Adv] ** open ResSom, Prelude in {
|
|||||||
-- These are constructed in LexiconSom and in
|
-- These are constructed in LexiconSom and in
|
||||||
-- additional lexicon modules.
|
-- additional lexicon modules.
|
||||||
|
|
||||||
V,
|
|
||||||
VS, -- sentence-complement verb e.g. "claim"
|
VS, -- sentence-complement verb e.g. "claim"
|
||||||
-- TODO: eventually different lincats
|
-- TODO: eventually different lincats
|
||||||
VQ, -- question-complement verb e.g. "wonder"
|
VQ, -- question-complement verb e.g. "wonder"
|
||||||
VA, -- adjective-complement verb e.g. "look"
|
VA, -- adjective-complement verb e.g. "look"
|
||||||
V2V, -- verb with NP and V complement e.g. "cause"
|
V = ResSom.Verb ;
|
||||||
V2S, -- verb with NP and S complement e.g. "tell"
|
|
||||||
V2Q, -- verb with NP and Q complement e.g. "ask"
|
|
||||||
V2A = ResSom.Verb ; -- verb with NP and AP complement e.g. "paint"
|
|
||||||
|
|
||||||
VV = ResSom.VV ; -- verb-phrase-complement verb e.g. "want"
|
VV = ResSom.VV ; -- verb-phrase-complement verb e.g. "want"
|
||||||
|
|
||||||
|
V2A, -- verb with NP and AP complement e.g. "paint"
|
||||||
|
V2V, -- verb with NP and V complement e.g. "cause"
|
||||||
|
V2S, -- verb with NP and S complement e.g. "tell"
|
||||||
|
V2Q, -- verb with NP and Q complement e.g. "ask"
|
||||||
V2 = ResSom.Verb2 ;
|
V2 = ResSom.Verb2 ;
|
||||||
V3 = ResSom.Verb3 ;
|
V3 = ResSom.Verb3 ;
|
||||||
|
|
||||||
@@ -126,5 +126,5 @@ linref
|
|||||||
-- Cl = linCl ;
|
-- Cl = linCl ;
|
||||||
VP = infVP ;
|
VP = infVP ;
|
||||||
CN = linCN ;
|
CN = linCN ;
|
||||||
Prep = \prep -> prep.s ! P3_Prep ++ prep.sii ++ prep.dhex ++ prep.miscAdv ! Sg3 Masc ;
|
Prep = \prep -> prep.s ! P3_Prep ++ prep.sii ++ prep.dhex ++ prep.hoostiisa ! Sg3 Masc ;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
--# -path=.:../common:../abstract
|
--# -path=.:../common:../abstract
|
||||||
|
|
||||||
concrete ExtendSom of Extend = CatSom
|
concrete ExtendSom of Extend = CatSom
|
||||||
-- ** ExtendFunctor -- Add this back when all relevant functions are implemented
|
** ExtendFunctor - [GenModNP, FocusObj, ComplDirectVS, ComplDirectVQ]
|
||||||
-- with (Grammar=GrammarSom)
|
with (Grammar=GrammarSom)
|
||||||
** open Prelude, ResSom in {
|
** open Prelude, ResSom, NounSom in {
|
||||||
|
|
||||||
lin
|
lin
|
||||||
|
|
||||||
|
-- : Num -> NP -> CN -> NP ; -- this man's car(s)
|
||||||
|
GenModNP num np cn = DetCN (DetQuant IndefArt num) (genModCN cn np) ;
|
||||||
|
|
||||||
-- : NP -> SSlash -> Utt ; -- her I love -- Saeed p. 189-
|
-- : NP -> SSlash -> Utt ; -- her I love -- Saeed p. 189-
|
||||||
FocusObj np sslash = -- FIXME: preposition disappears in negative sentences
|
FocusObj np sslash = {s = sslash.s ! False ++ objpron np ! Abs} ;
|
||||||
let ss = sslash.s ! False ;
|
|
||||||
ssSub = sslash.s ! True ; -- the negative particle is the same as subordinate, but verb forms come from main clause
|
|
||||||
obj = objpron np ! Abs ;
|
|
||||||
in {s = ssSub.beforeSTM ++ "waxa" ++ ssSub.stm ++ ss.afterSTM ++ obj} ;
|
|
||||||
|
|
||||||
-- FocusAdv : Adv -> S -> Utt ; -- today I will sleep
|
-- FocusAdv : Adv -> S -> Utt ; -- today I will sleep
|
||||||
-- FocusAdV : AdV -> S -> Utt ; -- never will I sleep
|
-- FocusAdV : AdV -> S -> Utt ; -- never will I sleep
|
||||||
|
|||||||
@@ -9,10 +9,10 @@ concrete GrammarSom of Grammar =
|
|||||||
RelativeSom,
|
RelativeSom,
|
||||||
ConjunctionSom,
|
ConjunctionSom,
|
||||||
PhraseSom,
|
PhraseSom,
|
||||||
TextX - [Adv],
|
TextX - [Adv,IAdv],
|
||||||
StructuralSom,
|
StructuralSom,
|
||||||
IdiomSom,
|
IdiomSom,
|
||||||
TenseX - [Adv]
|
TenseX - [Adv,IAdv]
|
||||||
** {
|
** {
|
||||||
|
|
||||||
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
||||||
|
|||||||
@@ -1,27 +1,26 @@
|
|||||||
|
|
||||||
--1 Idiom: Idiomatic Expressions
|
--1 Idiom: Idiomatic Expressions
|
||||||
|
|
||||||
concrete IdiomSom of Idiom = CatSom ** open Prelude, ResSom, VerbSom in {
|
concrete IdiomSom of Idiom = CatSom ** open Prelude, ResSom, VerbSom, NounSom, StructuralSom in {
|
||||||
|
|
||||||
-- This module defines constructions that are formed in fixed ways,
|
-- This module defines constructions that are formed in fixed ways,
|
||||||
-- often different even in closely related languages.
|
-- often different even in closely related languages.
|
||||||
|
|
||||||
lin
|
lin
|
||||||
|
|
||||||
-- : VP -> Cl ; -- it is hot
|
-- ImpersCl : VP -> Cl ; -- it is hot
|
||||||
--ImpersCl = ;
|
-- GenericCl : VP -> Cl ; -- one sleeps
|
||||||
|
ImpersCl,
|
||||||
-- : VP -> Cl ; -- one sleeps
|
GenericCl = \vp -> predVP impersNP (passVP vp) ;
|
||||||
GenericCl vp = predVP impersNP (passVP vp) ;
|
|
||||||
|
|
||||||
{-
|
{-
|
||||||
CleftNP : NP -> RS -> Cl ; -- it is I who did it
|
CleftNP : NP -> RS -> Cl ; -- it is I who did it
|
||||||
CleftAdv : Adv -> S -> Cl ; -- it is here she slept
|
CleftAdv : Adv -> S -> Cl ; -- it is here she slept
|
||||||
-}
|
-}
|
||||||
-- : NP -> Cl ; -- there is a house
|
-- : NP -> Cl ; -- there is a house
|
||||||
-- ExistNP np =
|
ExistNP np =
|
||||||
-- let vp = UseComp (CompNP np)
|
let vp = UseComp (CompNP np)
|
||||||
-- in ;
|
in predVP impersNP vp ;
|
||||||
|
|
||||||
{- ExistIP : IP -> QCl ; -- which houses are there
|
{- ExistIP : IP -> QCl ; -- which houses are there
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ lin add_V3 = mkV3 "dar" ku NoPrep ;
|
|||||||
-- lin alas_Interj = mkInterj "" ;
|
-- lin alas_Interj = mkInterj "" ;
|
||||||
-- lin already_Adv = mkA "" ;
|
-- lin already_Adv = mkA "" ;
|
||||||
lin animal_N = mkN "xayawaan" ;
|
lin animal_N = mkN "xayawaan" ;
|
||||||
-- lin answer_V2S = mkV2 "" ;
|
lin answer_V2S = mkV2S "jawaab" ku ;
|
||||||
-- lin apartment_N = mkN "" ;
|
-- lin apartment_N = mkN "" ;
|
||||||
-- lin apple_N = mkN "" ;
|
-- lin apple_N = mkN "" ;
|
||||||
-- lin art_N = mkN "" ;
|
-- lin art_N = mkN "" ;
|
||||||
@@ -252,8 +252,8 @@ lin name_N = mkN "magac" ;
|
|||||||
--
|
--
|
||||||
-- lin oil_N = mkN "" ;
|
-- lin oil_N = mkN "" ;
|
||||||
-- lin old_A = mkA "" ;
|
-- lin old_A = mkA "" ;
|
||||||
-- lin open_V2 = mkV2 "" ;
|
lin open_V2 = mkV2 "fur" ;
|
||||||
-- lin paint_V2A = mkV2 "" ;
|
lin paint_V2A = mkV2A "rinjiyee" ;
|
||||||
-- lin paper_N = mkN "" ;
|
-- lin paper_N = mkN "" ;
|
||||||
-- lin paris_PN = mkPN "Paris" ;
|
-- lin paris_PN = mkPN "Paris" ;
|
||||||
-- lin peace_N = mkN "" ;
|
-- lin peace_N = mkN "" ;
|
||||||
|
|||||||
@@ -21,43 +21,28 @@ oper AdvSlash : ClSlash -> Adv -> ClSlash = notYet "AdvSlash" ;
|
|||||||
oper ApposCN : CN -> NP -> CN = notYet "ApposCN" ;
|
oper ApposCN : CN -> NP -> CN = notYet "ApposCN" ;
|
||||||
oper BaseAP : AP -> AP -> ListAP = notYet "BaseAP" ;
|
oper BaseAP : AP -> AP -> ListAP = notYet "BaseAP" ;
|
||||||
oper BaseAdV : AdV -> AdV -> ListAdV = notYet "BaseAdV" ;
|
oper BaseAdV : AdV -> AdV -> ListAdV = notYet "BaseAdV" ;
|
||||||
oper BaseAdv : Adv -> Adv -> ListAdv = notYet "BaseAdv" ;
|
|
||||||
oper BaseCN : CN -> CN -> ListCN = notYet "BaseCN" ;
|
oper BaseCN : CN -> CN -> ListCN = notYet "BaseCN" ;
|
||||||
oper BaseIAdv : IAdv -> IAdv -> ListIAdv = notYet "BaseIAdv" ;
|
oper BaseIAdv : IAdv -> IAdv -> ListIAdv = notYet "BaseIAdv" ;
|
||||||
oper BaseNP : NP -> NP -> ListNP = notYet "BaseNP" ;
|
|
||||||
oper BaseRS : RS -> RS -> ListRS = notYet "BaseRS" ;
|
|
||||||
oper BaseS : S -> S -> ListS = notYet "BaseS" ;
|
oper BaseS : S -> S -> ListS = notYet "BaseS" ;
|
||||||
oper CAdvAP : CAdv -> AP -> NP -> AP = notYet "CAdvAP" ;
|
oper CAdvAP : CAdv -> AP -> NP -> AP = notYet "CAdvAP" ;
|
||||||
oper CleftAdv : Adv -> S -> Cl = notYet "CleftAdv" ;
|
oper CleftAdv : Adv -> S -> Cl = notYet "CleftAdv" ;
|
||||||
oper CleftNP : NP -> RS -> Cl = notYet "CleftNP" ;
|
oper CleftNP : NP -> RS -> Cl = notYet "CleftNP" ;
|
||||||
oper CompAdv : Adv -> Comp = notYet "CompAdv" ;
|
|
||||||
oper CompIAdv : IAdv -> IComp = notYet "CompIAdv" ;
|
|
||||||
oper CompIP : IP -> IComp = notYet "CompIP" ;
|
|
||||||
oper ComparA : A -> NP -> AP = notYet "ComparA" ;
|
|
||||||
oper ComparAdvAdj : CAdv -> A -> NP -> Adv = notYet "ComparAdvAdj" ;
|
oper ComparAdvAdj : CAdv -> A -> NP -> Adv = notYet "ComparAdvAdj" ;
|
||||||
oper ComparAdvAdjS : CAdv -> A -> S -> Adv = notYet "ComparAdvAdjS" ;
|
oper ComparAdvAdjS : CAdv -> A -> S -> Adv = notYet "ComparAdvAdjS" ;
|
||||||
oper ComplA2 : A2 -> NP -> AP = notYet "ComplA2" ;
|
oper ComplA2 : A2 -> NP -> AP = notYet "ComplA2" ;
|
||||||
oper ComplN3 : N3 -> NP -> N2 = notYet "ComplN3" ;
|
oper ComplN3 : N3 -> NP -> N2 = notYet "ComplN3" ;
|
||||||
oper ComplSlashIP : VPSlash -> IP -> QVP = notYet "ComplSlashIP" ;
|
oper ComplSlashIP : VPSlash -> IP -> QVP = notYet "ComplSlashIP" ;
|
||||||
oper ComplVA : VA -> AP -> VP = notYet "ComplVA" ;
|
|
||||||
oper ComplVQ : VQ -> QS -> VP = notYet "ComplVQ" ;
|
oper ComplVQ : VQ -> QS -> VP = notYet "ComplVQ" ;
|
||||||
oper ComplVS : VS -> S -> VP = notYet "ComplVS" ;
|
|
||||||
oper ConjAP : Conj -> ListAP -> AP = notYet "ConjAP" ;
|
oper ConjAP : Conj -> ListAP -> AP = notYet "ConjAP" ;
|
||||||
oper ConjAdV : Conj -> ListAdV -> AdV = notYet "ConjAdV" ;
|
oper ConjAdV : Conj -> ListAdV -> AdV = notYet "ConjAdV" ;
|
||||||
oper ConjAdv : Conj -> ListAdv -> Adv = notYet "ConjAdv" ;
|
|
||||||
oper ConjCN : Conj -> ListCN -> CN = notYet "ConjCN" ;
|
oper ConjCN : Conj -> ListCN -> CN = notYet "ConjCN" ;
|
||||||
oper ConjDet : Conj -> ListDAP -> Det = notYet "ConjDet" ;
|
oper ConjDet : Conj -> ListDAP -> Det = notYet "ConjDet" ;
|
||||||
oper ConjIAdv : Conj -> ListIAdv -> IAdv = notYet "ConjIAdv" ;
|
oper ConjIAdv : Conj -> ListIAdv -> IAdv = notYet "ConjIAdv" ;
|
||||||
oper ConjNP : Conj -> ListNP -> NP = notYet "ConjNP" ;
|
|
||||||
oper ConjRS : Conj -> ListRS -> RS = notYet "ConjRS" ;
|
|
||||||
oper ConjS : Conj -> ListS -> S = notYet "ConjS" ;
|
oper ConjS : Conj -> ListS -> S = notYet "ConjS" ;
|
||||||
oper ConsAP : AP -> ListAP -> ListAP = notYet "ConsAP" ;
|
oper ConsAP : AP -> ListAP -> ListAP = notYet "ConsAP" ;
|
||||||
oper ConsAdV : AdV -> ListAdV -> ListAdV = notYet "ConsAdV" ;
|
oper ConsAdV : AdV -> ListAdV -> ListAdV = notYet "ConsAdV" ;
|
||||||
oper ConsAdv : Adv -> ListAdv -> ListAdv = notYet "ConsAdv" ;
|
|
||||||
oper ConsCN : CN -> ListCN -> ListCN = notYet "ConsCN" ;
|
oper ConsCN : CN -> ListCN -> ListCN = notYet "ConsCN" ;
|
||||||
oper ConsIAdv : IAdv -> ListIAdv -> ListIAdv = notYet "ConsIAdv" ;
|
oper ConsIAdv : IAdv -> ListIAdv -> ListIAdv = notYet "ConsIAdv" ;
|
||||||
oper ConsNP : NP -> ListNP -> ListNP = notYet "ConsNP" ;
|
|
||||||
oper ConsRS : RS -> ListRS -> ListRS = notYet "ConsRS" ;
|
|
||||||
oper ConsS : S -> ListS -> ListS = notYet "ConsS" ;
|
oper ConsS : S -> ListS -> ListS = notYet "ConsS" ;
|
||||||
oper CountNP : Det -> NP -> NP = notYet "CountNP" ;
|
oper CountNP : Det -> NP -> NP = notYet "CountNP" ;
|
||||||
oper DefArt : Quant = notYet "DefArt" ;
|
oper DefArt : Quant = notYet "DefArt" ;
|
||||||
@@ -68,23 +53,16 @@ oper DetNP : Det -> NP = notYet "DetNP" ;
|
|||||||
oper DetQuant : Quant -> Num -> Det = notYet "DetQuant" ;
|
oper DetQuant : Quant -> Num -> Det = notYet "DetQuant" ;
|
||||||
oper DetQuantOrd : Quant -> Num -> Ord -> Det = notYet "DetQuantOrd" ;
|
oper DetQuantOrd : Quant -> Num -> Ord -> Det = notYet "DetQuantOrd" ;
|
||||||
oper EmbedQS : QS -> SC = notYet "EmbedQS" ;
|
oper EmbedQS : QS -> SC = notYet "EmbedQS" ;
|
||||||
oper EmbedS : S -> SC = notYet "EmbedS" ;
|
|
||||||
oper EmbedVP : VP -> SC = notYet "EmbedVP" ;
|
|
||||||
oper ExistIP : IP -> QCl = notYet "ExistIP" ;
|
oper ExistIP : IP -> QCl = notYet "ExistIP" ;
|
||||||
oper ExistIPAdv : IP -> Adv -> QCl = notYet "ExistIPAdv" ;
|
oper ExistIPAdv : IP -> Adv -> QCl = notYet "ExistIPAdv" ;
|
||||||
oper ExistNP : NP -> Cl = notYet "ExistNP" ;
|
|
||||||
oper ExistNPAdv : NP -> Adv -> Cl = notYet "ExistNPAdv" ;
|
oper ExistNPAdv : NP -> Adv -> Cl = notYet "ExistNPAdv" ;
|
||||||
oper ExtAdvS : Adv -> S -> S = notYet "ExtAdvS" ;
|
oper ExtAdvS : Adv -> S -> S = notYet "ExtAdvS" ;
|
||||||
oper ExtAdvVP : VP -> Adv -> VP = notYet "ExtAdvVP" ;
|
oper ExtAdvVP : VP -> Adv -> VP = notYet "ExtAdvVP" ;
|
||||||
oper FunRP : Prep -> NP -> RP -> RP = notYet "FunRP" ;
|
oper FunRP : Prep -> NP -> RP -> RP = notYet "FunRP" ;
|
||||||
oper GenericCl : VP -> Cl = notYet "GenericCl" ;
|
|
||||||
oper IdRP : RP = notYet "IdRP" ;
|
oper IdRP : RP = notYet "IdRP" ;
|
||||||
oper IdetIP : IDet -> IP = notYet "IdetIP" ;
|
oper IdetIP : IDet -> IP = notYet "IdetIP" ;
|
||||||
oper IdetQuant : IQuant -> Num -> IDet = notYet "IdetQuant" ;
|
|
||||||
oper ImpP3 : NP -> VP -> Utt = notYet "ImpP3" ;
|
oper ImpP3 : NP -> VP -> Utt = notYet "ImpP3" ;
|
||||||
oper ImpPl1 : VP -> Utt = notYet "ImpPl1" ;
|
oper ImpPl1 : VP -> Utt = notYet "ImpPl1" ;
|
||||||
oper ImpVP : VP -> Imp = notYet "ImpVP" ;
|
|
||||||
oper ImpersCl : VP -> Cl = notYet "ImpersCl" ;
|
|
||||||
oper NumCard : Card -> Num = notYet "NumCard" ;
|
oper NumCard : Card -> Num = notYet "NumCard" ;
|
||||||
oper NumDigits : Digits -> Card = notYet "NumDigits" ;
|
oper NumDigits : Digits -> Card = notYet "NumDigits" ;
|
||||||
oper NumNumeral : Numeral -> Card = notYet "NumNumeral" ;
|
oper NumNumeral : Numeral -> Card = notYet "NumNumeral" ;
|
||||||
@@ -102,21 +80,10 @@ oper PossPron : Pron -> Quant = notYet "PossPron" ;
|
|||||||
oper PredSCVP : SC -> VP -> Cl = notYet "PredSCVP" ;
|
oper PredSCVP : SC -> VP -> Cl = notYet "PredSCVP" ;
|
||||||
oper PredetNP : Predet -> NP -> NP = notYet "PredetNP" ;
|
oper PredetNP : Predet -> NP -> NP = notYet "PredetNP" ;
|
||||||
oper PrepIP : Prep -> IP -> IAdv = notYet "PrepIP" ;
|
oper PrepIP : Prep -> IP -> IAdv = notYet "PrepIP" ;
|
||||||
oper ProgrVP : VP -> VP = notYet "ProgrVP" ;
|
|
||||||
oper QuestCl : Cl -> QCl = notYet "QuestCl" ;
|
|
||||||
oper QuestIAdv : IAdv -> Cl -> QCl = notYet "QuestIAdv" ;
|
|
||||||
oper QuestIComp : IComp -> NP -> QCl = notYet "QuestIComp" ;
|
|
||||||
oper QuestQVP : IP -> QVP -> QCl = notYet "QuestQVP" ;
|
oper QuestQVP : IP -> QVP -> QCl = notYet "QuestQVP" ;
|
||||||
oper QuestSlash : IP -> ClSlash -> QCl = notYet "QuestSlash" ;
|
|
||||||
oper QuestVP : IP -> VP -> QCl = notYet "QuestVP" ;
|
|
||||||
oper ReflA2 : A2 -> AP = notYet "ReflA2" ;
|
oper ReflA2 : A2 -> AP = notYet "ReflA2" ;
|
||||||
oper RelCN : CN -> RS -> CN = notYet "RelCN" ;
|
|
||||||
oper RelCl : Cl -> RCl = notYet "RelCl" ;
|
oper RelCl : Cl -> RCl = notYet "RelCl" ;
|
||||||
oper RelNP : NP -> RS -> NP = notYet "RelNP" ;
|
|
||||||
oper RelS : S -> RS -> S = notYet "RelS" ;
|
oper RelS : S -> RS -> S = notYet "RelS" ;
|
||||||
oper RelSlash : RP -> ClSlash -> RCl = notYet "RelSlash" ;
|
|
||||||
oper RelVP : RP -> VP -> RCl = notYet "RelVP" ;
|
|
||||||
oper SSubjS : S -> Subj -> S -> S = notYet "SSubjS" ;
|
|
||||||
oper SelfAdVVP : VP -> VP = notYet "SelfAdVVP" ;
|
oper SelfAdVVP : VP -> VP = notYet "SelfAdVVP" ;
|
||||||
oper SelfAdvVP : VP -> VP = notYet "SelfAdvVP" ;
|
oper SelfAdvVP : VP -> VP = notYet "SelfAdvVP" ;
|
||||||
oper SelfNP : NP -> NP = notYet "SelfNP" ;
|
oper SelfNP : NP -> NP = notYet "SelfNP" ;
|
||||||
@@ -125,10 +92,8 @@ oper SentCN : CN -> SC -> CN = notYet "SentCN" ;
|
|||||||
oper SlashPrep : Cl -> Prep -> ClSlash = notYet "SlashPrep" ;
|
oper SlashPrep : Cl -> Prep -> ClSlash = notYet "SlashPrep" ;
|
||||||
oper SlashV2A : V2A -> AP -> VPSlash = notYet "SlashV2A" ;
|
oper SlashV2A : V2A -> AP -> VPSlash = notYet "SlashV2A" ;
|
||||||
oper SlashV2Q : V2Q -> QS -> VPSlash = notYet "SlashV2Q" ;
|
oper SlashV2Q : V2Q -> QS -> VPSlash = notYet "SlashV2Q" ;
|
||||||
oper SlashV2S : V2S -> S -> VPSlash = notYet "SlashV2S" ;
|
|
||||||
oper SlashV2V : V2V -> VP -> VPSlash = notYet "SlashV2V" ;
|
oper SlashV2V : V2V -> VP -> VPSlash = notYet "SlashV2V" ;
|
||||||
oper SlashV2VNP : V2V -> NP -> VPSlash -> VPSlash = notYet "SlashV2VNP" ;
|
oper SlashV2VNP : V2V -> NP -> VPSlash -> VPSlash = notYet "SlashV2VNP" ;
|
||||||
oper SlashVP : NP -> VPSlash -> ClSlash = notYet "SlashVP" ;
|
|
||||||
oper SlashVS : NP -> VS -> SSlash -> ClSlash = notYet "SlashVS" ;
|
oper SlashVS : NP -> VS -> SSlash -> ClSlash = notYet "SlashVS" ;
|
||||||
oper SlashVV : VV -> VPSlash -> VPSlash = notYet "SlashVV" ;
|
oper SlashVV : VV -> VPSlash -> VPSlash = notYet "SlashVV" ;
|
||||||
oper SubjS : Subj -> S -> Adv = notYet "SubjS" ;
|
oper SubjS : Subj -> S -> Adv = notYet "SubjS" ;
|
||||||
|
|||||||
@@ -13,15 +13,15 @@ concrete NounSom of Noun = CatSom ** open ResSom, Prelude in {
|
|||||||
a = getAgr det.n (gender cn) } where {
|
a = getAgr det.n (gender cn) } where {
|
||||||
sTable : Case => Str = \\c =>
|
sTable : Case => Str = \\c =>
|
||||||
let nfc : {nf : NForm ; c : Case} =
|
let nfc : {nf : NForm ; c : Case} =
|
||||||
case <det.isNum,c,cn.hasMod,det.st,det.n> of {
|
case <det.numtype,c,cn.modtype,det.st,det.n> of {
|
||||||
-- Numbers
|
-- Numbers
|
||||||
<True,_,_,_,_> => {nf=Numerative ; c=c} ;
|
<Basic|Compound,_,_,_,_> => {nf=Numerative ; c=c} ;
|
||||||
|
|
||||||
-- special form for fem. nouns
|
-- special form for fem. nouns
|
||||||
<_,Nom,False,Indefinite,Sg> => {nf=NomSg ; c=c} ;
|
<_,Nom,NoMod|OtherMod,Indefinite,Sg> => {nf=NomSg ; c=c} ;
|
||||||
|
|
||||||
-- If cn has modifier, Nom ending attaches to the modifier
|
-- If cn has modifier, Nom ending attaches to the modifier
|
||||||
<_,Nom,True,_,_> => {nf=Def det.n ; c=Abs} ;
|
<_,Nom,AMod,_,_> => {nf=Def det.n ; c=Abs} ;
|
||||||
|
|
||||||
-- a Det with st=Indefinite uses Indef forms
|
-- a Det with st=Indefinite uses Indef forms
|
||||||
<_,_,_,Indefinite,n> => {nf=Indef n ; c=c} ;
|
<_,_,_,Indefinite,n> => {nf=Indef n ; c=c} ;
|
||||||
@@ -30,13 +30,24 @@ concrete NounSom of Noun = CatSom ** open ResSom, Prelude in {
|
|||||||
_ => {nf=Def det.n ; c=c}
|
_ => {nf=Def det.n ; c=c}
|
||||||
} ;
|
} ;
|
||||||
art = gda2da cn.gda ! det.n ;
|
art = gda2da cn.gda ! det.n ;
|
||||||
num = case det.isNum of {True => Sg ; _ => det.n} ;
|
num = case isNum det.numtype of {True => Sg ; _ => det.n} ;
|
||||||
dt : {pref,s : Str} =
|
dt : {pref,s : Str} =
|
||||||
case <nfc.nf,cn.isPoss,andB det.isPoss cn.shortPoss> of {
|
case <nfc.nf,cn.isPoss,andB det.isPoss cn.shortPoss> of {
|
||||||
<Numerative,_,_> => {s = [] ; pref = det.s ! art ! nfc.c} ; -- determiner comes before CN
|
-- Det is a cardinal number. The number is the head of the NP,
|
||||||
<_, True,_> => {pref = [] ; s = det.sp ! gender cn ! nfc.c} ; -- CN has undergone ComplN2 and is already quantified
|
-- and CN becomes its modifier. If CN has modifiers of its own,
|
||||||
<_,_, True> => {pref = [] ; s = BIND ++ det.shortPoss ! art} ;
|
-- we insert the conjunction "oo" between the number and the CN.
|
||||||
_ => {pref = [] ; s = det.s ! art ! nfc.c}
|
<Numerative,_,_> =>
|
||||||
|
let oo = case det.numtype of {Compound => "oo" ; _ => []}
|
||||||
|
in {s = [] ; pref = det.s ! art ! nfc.c ++ oo} ;
|
||||||
|
|
||||||
|
-- CN has undergone ComplN2 and is already quantified
|
||||||
|
<_,True,_> => {pref = [] ; s = det.sp ! gender cn ! nfc.c} ;
|
||||||
|
|
||||||
|
-- CN is e.g. a kinship term and takes short possessive
|
||||||
|
<_,_,True> => {pref = [] ; s = BIND ++ det.shortPoss ! art} ;
|
||||||
|
|
||||||
|
-- Default case
|
||||||
|
_ => {pref = [] ; s = det.s ! art ! nfc.c}
|
||||||
} ;
|
} ;
|
||||||
in dt.pref -- if det is numeral
|
in dt.pref -- if det is numeral
|
||||||
++ cn.s ! nfc.nf
|
++ cn.s ! nfc.nf
|
||||||
@@ -56,15 +67,15 @@ concrete NounSom of Noun = CatSom ** open ResSom, Prelude in {
|
|||||||
UsePron pron = pron ** {st = Definite} ;
|
UsePron pron = pron ** {st = Definite} ;
|
||||||
|
|
||||||
-- : Predet -> NP -> NP ; -- only the man
|
-- : Predet -> NP -> NP ; -- only the man
|
||||||
PredetNP predet np =
|
PredetNP predet np =
|
||||||
let qnt = PossPron (pronTable ! np.a) ;
|
let qnt = PossPron (pronTable ! np.a) ;
|
||||||
det = qnt.shortPoss ! predet.da ;
|
det = qnt.shortPoss ! predet.da ;
|
||||||
predetS : Str = case predet.isPoss of {
|
predetS : Str = case predet.isPoss of {
|
||||||
True => glue predet.s det ;
|
True => glue predet.s det ;
|
||||||
False => predet.s
|
False => predet.s
|
||||||
} ;
|
} ;
|
||||||
in np ** {
|
in np ** {
|
||||||
s = \\c =>
|
s = \\c =>
|
||||||
case <np.isPron,predet.isPoss> of {
|
case <np.isPron,predet.isPoss> of {
|
||||||
<True,True> => np.empty ++ predetS ;
|
<True,True> => np.empty ++ predetS ;
|
||||||
_ => np.s ! c ++ predetS} ;
|
_ => np.s ! c ++ predetS} ;
|
||||||
@@ -120,30 +131,26 @@ concrete NounSom of Noun = CatSom ** open ResSom, Prelude in {
|
|||||||
-- : Quant -> Num -> Det ;
|
-- : Quant -> Num -> Det ;
|
||||||
DetQuant quant num = let indep = Hal in quant ** {
|
DetQuant quant num = let indep = Hal in quant ** {
|
||||||
s = \\da,c =>
|
s = \\da,c =>
|
||||||
case num.isNum of {
|
case isNum num.numtype of {
|
||||||
True => num.s ! indep ++ quant.s ! num.da ! c ++ num.thousand ;
|
True => num.s ! indep ++ quant.s ! num.da ! c ++ num.thousand ;
|
||||||
False => num.s ! indep ++ quant.s ! da ! c ++ num.thousand } ;
|
False => num.s ! indep ++ quant.s ! da ! c ++ num.thousand } ;
|
||||||
|
|
||||||
sp = \\g,c => case <num.n,g> of { -- TODO check what happens when num.isNum
|
sp = \\g,c => case <num.n,g> of {
|
||||||
<Sg,Masc> => num.s ! indep ++ quant.sp ! SgMasc ! c ++ num.thousand ;
|
<Sg,Masc> => num.s ! indep ++ quant.sp ! SgMasc ! c ++ num.thousand ;
|
||||||
<Sg,Fem> => num.s ! indep ++ quant.sp ! SgFem ! c ++ num.thousand ;
|
<Sg,Fem> => num.s ! indep ++ quant.sp ! SgFem ! c ++ num.thousand ;
|
||||||
-- Independent form uses plural morpheme, not gender-flipped allomorph
|
-- Independent form uses plural morpheme, not gender-flipped allomorph
|
||||||
<Pl,_> => num.s ! indep ++ quant.sp ! PlInv ! c ++ num.thousand } ;
|
<Pl,_> => num.s ! indep ++ quant.sp ! PlInv ! c ++ num.thousand } ;
|
||||||
isNum = num.isNum ;
|
numtype = num.numtype ;
|
||||||
n = num.n ;
|
n = num.n ;
|
||||||
shortPoss = \\da => quant.shortPoss ! da ++ num.s ! indep
|
shortPoss = \\da => quant.shortPoss ! da ++ num.s ! indep
|
||||||
} ;
|
} ;
|
||||||
-- d = case <num.isNum,quant.st> of {
|
|
||||||
-- <True,_> => Numerative ;
|
|
||||||
-- <False,Definite> => Def num.n quant.v ;
|
|
||||||
-- <False,Indefinite> => Indef num.n } ;
|
|
||||||
|
|
||||||
-- : Quant -> Num -> Ord -> Det ; -- these five best
|
-- : Quant -> Num -> Ord -> Det ; -- these five best
|
||||||
DetQuantOrd quant num ord =
|
DetQuantOrd quant num ord =
|
||||||
let theseFive = DetQuant quant num in theseFive ** {
|
let theseFive = DetQuant quant num in theseFive ** {
|
||||||
s = \\g,c => theseFive.s ! g ! c ++ ord.s ;
|
s = \\g,c => theseFive.s ! g ! c ++ ord.s ! AF num.n c ;
|
||||||
sp = \\g,c => theseFive.sp ! g ! c ++ ord.s ;
|
sp = \\g,c => theseFive.sp ! g ! c ++ ord.s ! AF num.n c ;
|
||||||
shortPoss = \\da => theseFive.shortPoss ! da ++ ord.s
|
shortPoss = \\da => theseFive.shortPoss ! da ++ ord.s ! AF num.n Abs
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- Whether the resulting determiner is singular or plural depends on the
|
-- Whether the resulting determiner is singular or plural depends on the
|
||||||
@@ -157,7 +164,11 @@ concrete NounSom of Noun = CatSom ** open ResSom, Prelude in {
|
|||||||
NumPl = baseNum ** {n = Pl} ;
|
NumPl = baseNum ** {n = Pl} ;
|
||||||
|
|
||||||
-- : Card -> Num ;
|
-- : Card -> Num ;
|
||||||
NumCard card = card ** {isNum = True} ;
|
NumCard card = card ** {
|
||||||
|
numtype = case card.hasThousand of {
|
||||||
|
True => Compound ;
|
||||||
|
False => Basic }
|
||||||
|
} ;
|
||||||
|
|
||||||
-- : Digits -> Card ;
|
-- : Digits -> Card ;
|
||||||
-- NumDigits dig = { s = dig.s ! NCard ; n = dig.n } ;
|
-- NumDigits dig = { s = dig.s ! NCard ; n = dig.n } ;
|
||||||
@@ -173,17 +184,20 @@ concrete NounSom of Noun = CatSom ** open ResSom, Prelude in {
|
|||||||
OrdDigits digs = digs ** { s = digs.s ! NOrd } ;
|
OrdDigits digs = digs ** { s = digs.s ! NOrd } ;
|
||||||
-}
|
-}
|
||||||
-- : Numeral -> Ord ;
|
-- : Numeral -> Ord ;
|
||||||
OrdNumeral num = num ** {s = num.ord} ;
|
OrdNumeral num = num ** {
|
||||||
|
s = \\_ => num.ord
|
||||||
|
} ;
|
||||||
|
|
||||||
{-
|
|
||||||
-- : A -> Ord ;
|
-- : A -> Ord ;
|
||||||
OrdSuperl a = { } ;
|
OrdSuperl a = {
|
||||||
|
s = \\af => "ugu" ++ a.s ! af ;
|
||||||
|
n = Sg -- ?? is this meaningful?
|
||||||
|
} ;
|
||||||
|
|
||||||
-- One can combine a numeral and a superlative.
|
-- One can combine a numeral and a superlative.
|
||||||
|
|
||||||
-- : Numeral -> A -> Ord ; -- third largest
|
-- : Numeral -> A -> Ord ; -- third largest
|
||||||
OrdNumeralSuperl num a = num ** { } ;
|
-- OrdNumeralSuperl num a = num ** { } ;
|
||||||
-}
|
|
||||||
|
|
||||||
-- : Quant
|
-- : Quant
|
||||||
DefArt = defQuant "a" "kan" "tan" "kuwan" False ;
|
DefArt = defQuant "a" "kan" "tan" "kuwan" False ;
|
||||||
@@ -212,21 +226,7 @@ concrete NounSom of Noun = CatSom ** open ResSom, Prelude in {
|
|||||||
UseN,UseN2 = ResSom.useN ;
|
UseN,UseN2 = ResSom.useN ;
|
||||||
|
|
||||||
-- : N2 -> NP -> CN ; -- Sahra hooyadeed
|
-- : N2 -> NP -> CN ; -- Sahra hooyadeed
|
||||||
ComplN2 n2 np = let cn = useN n2 in cn ** {s = \\nf =>
|
ComplN2 n2 np = genModCN (useN n2) np ;
|
||||||
let num = case nf of {
|
|
||||||
Def n => n ;
|
|
||||||
Indef n => n ;
|
|
||||||
_ => Sg } ;
|
|
||||||
art = gda2da cn.gda ! num ;
|
|
||||||
qnt = PossPron (pronTable ! np.a) ;
|
|
||||||
det = case cn.shortPoss of {
|
|
||||||
True => qnt.shortPoss ! art ;
|
|
||||||
_ => qnt.s ! sg n2.gda ! Abs } ;
|
|
||||||
noun = case np.isPron of {
|
|
||||||
True => (pronTable ! np.a).sp ! Abs ; -- long subject pronoun
|
|
||||||
False => np.s ! Abs }
|
|
||||||
in noun ++ cn.s ! Def num ++ BIND ++ det ;
|
|
||||||
isPoss = True} ;
|
|
||||||
|
|
||||||
{-
|
{-
|
||||||
-- : N3 -> NP -> N2 ; -- distance from this city (to Paris)
|
-- : N3 -> NP -> N2 ; -- distance from this city (to Paris)
|
||||||
@@ -242,22 +242,28 @@ concrete NounSom of Noun = CatSom ** open ResSom, Prelude in {
|
|||||||
Use3N3 n3 = lin N2 n3 ;
|
Use3N3 n3 = lin N2 n3 ;
|
||||||
-- : AP -> CN -> CN
|
-- : AP -> CN -> CN
|
||||||
AdjCN ap cn = cn ** {
|
AdjCN ap cn = cn ** {
|
||||||
s = table { NomSg => cn.s ! Indef Sg ; -- When an adjective is added, noun loses case marker.
|
s = table { -- Add oo after Numerative only if this is CN's first modifier.
|
||||||
x => cn.s ! x } ;
|
Numerative => cn.s ! Numerative
|
||||||
|
++ andConj Indefinite (notMod cn.modtype) ;
|
||||||
|
NomSg => cn.s ! Indef Sg ; -- Add adj -> noun loses case marker
|
||||||
|
nf => cn.s ! nf } ;
|
||||||
mod = \\st,n,c =>
|
mod = \\st,n,c =>
|
||||||
cn.mod ! st ! n ! Abs -- If there was something before, it is now in Abs
|
cn.mod ! st ! n ! Abs -- If there was something before, it is now in Abs
|
||||||
++ andConj st cn.hasMod -- If the sentence is already modified, any new modifier needs to be introduced with conjunction
|
++ andConj st cn.modtype -- If the sentence is already modified, any new modifier needs to be introduced with conjunction
|
||||||
++ ap.s ! AF n c ;
|
++ ap.s ! AF n c ;
|
||||||
hasMod = True
|
modtype = AMod
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- : CN -> RS -> CN ;
|
-- : CN -> RS -> CN ;
|
||||||
RelCN cn rs = cn ** {
|
RelCN cn rs = cn ** {
|
||||||
|
s = table {
|
||||||
|
Numerative => cn.s ! Numerative ++ andConj Indefinite (notMod cn.modtype) ;
|
||||||
|
nf => cn.s ! nf } ;
|
||||||
mod = \\st,n,c => --what to do with subject case if there's both adj and RS?
|
mod = \\st,n,c => --what to do with subject case if there's both adj and RS?
|
||||||
cn.mod ! st ! n ! Abs
|
cn.mod ! st ! n ! Abs
|
||||||
++ andConj st cn.hasMod
|
++ andConj st cn.modtype
|
||||||
++ rs.s ! st ! gennum cn Sg ! c ; -- gennum cn Sg, because plural form is only for 1st person plural
|
++ rs.s ! st ! gennum cn Sg ! c ; -- gennum cn Sg, because plural form is only for 1st person plural
|
||||||
hasMod = True ;
|
modtype = AMod
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
{-
|
{-
|
||||||
@@ -286,11 +292,23 @@ concrete NounSom of Noun = CatSom ** open ResSom, Prelude in {
|
|||||||
PossNP cn np = cn ** { -- guriga Axmed, not Axmed gurigiisa
|
PossNP cn np = cn ** { -- guriga Axmed, not Axmed gurigiisa
|
||||||
mod = \\st,n,c => cn.mod ! st ! n ! c ++ objpron np ! Abs
|
mod = \\st,n,c => cn.mod ! st ! n ! c ++ objpron np ! Abs
|
||||||
} ;
|
} ;
|
||||||
{-
|
|
||||||
-- : CN -> NP -> CN ; -- glass of wine / two kilos of red apples
|
-- : CN -> NP -> CN ; -- glass of wine / two kilos of red apples
|
||||||
PartNP cn np = cn ** { } ;
|
PartNP cn np = cn ** {
|
||||||
|
s = table {
|
||||||
|
Numerative => cn.s ! Numerative ++ andConj Indefinite (notMod cn.modtype) ;
|
||||||
|
nf => cn.s ! nf } ;
|
||||||
|
mod = \\st,n,c =>
|
||||||
|
cn.mod ! st ! n ! c
|
||||||
|
++ andConj st cn.modtype -- If the sentence is already modified, any new modifier needs to be introduced with conjunction
|
||||||
|
++ objpron np ! Abs
|
||||||
|
++ "ah" ;
|
||||||
|
modtype = case cn.modtype of {
|
||||||
|
AMod => AMod ;
|
||||||
|
_ => OtherMod }
|
||||||
|
} ;
|
||||||
|
|
||||||
|
{-
|
||||||
|
|
||||||
-- This is different from the partitive, as shown by many languages.
|
-- This is different from the partitive, as shown by many languages.
|
||||||
|
|
||||||
@@ -308,10 +326,28 @@ concrete NounSom of Noun = CatSom ** open ResSom, Prelude in {
|
|||||||
-}
|
-}
|
||||||
|
|
||||||
oper
|
oper
|
||||||
andConj : State -> Bool -> Str = \st,hasMod ->
|
andConj : State -> ModType -> Str = \st,mod ->
|
||||||
case <st,hasMod> of {
|
case <st,mod> of {
|
||||||
<Indefinite,True> => "oo" ;
|
<Indefinite,AMod|OtherMod> => "oo" ;
|
||||||
<Definite,True> => "ee" ;
|
<Definite,AMod|OtherMod> => "ee" ;
|
||||||
_ => []
|
_ => []
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
genModCN : CN -> NP -> CN = \cn,np -> cn ** {
|
||||||
|
s = \\nf =>
|
||||||
|
let num = case nf of {
|
||||||
|
Def n => n ;
|
||||||
|
Indef n => n ;
|
||||||
|
_ => Sg } ;
|
||||||
|
art = gda2da cn.gda ! num ;
|
||||||
|
qnt = PossPron (pronTable ! np.a) ;
|
||||||
|
det = case cn.shortPoss of {
|
||||||
|
True => qnt.shortPoss ! art ;
|
||||||
|
_ => qnt.s ! sg cn.gda ! Abs } ;
|
||||||
|
noun = case np.isPron of {
|
||||||
|
True => (pronTable ! np.a).sp ! Abs ; -- long subject pronoun
|
||||||
|
False => np.s ! Abs }
|
||||||
|
in noun ++ cn.s ! Def num ++ BIND ++ det ;
|
||||||
|
isPoss = True} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ lincat
|
|||||||
Sub10, Sub100, Sub1000, Sub1000000 = {
|
Sub10, Sub100, Sub1000, Sub1000000 = {
|
||||||
s : DForm => Str ;
|
s : DForm => Str ;
|
||||||
thousand : Str ; -- TODO figure out if this really works so
|
thousand : Str ; -- TODO figure out if this really works so
|
||||||
|
hasThousand : Bool ;
|
||||||
ord : Str ;
|
ord : Str ;
|
||||||
da : DefArticle ;
|
da : DefArticle ;
|
||||||
n : Number
|
n : Number
|
||||||
@@ -64,25 +65,28 @@ lin n7 = mkNum2 "toddoba" "toddobaatan" ;
|
|||||||
lin n8 = mkNum2Masc "siddeed" "siddeetan" ;
|
lin n8 = mkNum2Masc "siddeed" "siddeetan" ;
|
||||||
lin n9 = mkNum2Masc "sagaal" "sagaashan" ;
|
lin n9 = mkNum2Masc "sagaal" "sagaashan" ;
|
||||||
|
|
||||||
lin pot01 = n1.unit ** {n = Sg ; thousand = []} ;
|
lin pot01 = n1.unit ** {n = Sg ; thousand = [] ; hasThousand = False} ;
|
||||||
|
|
||||||
lin pot0 d = d.unit ** {n = Pl ; thousand = []} ;
|
lin pot0 d = d.unit ** {n = Pl ; thousand = [] ; hasThousand = False} ;
|
||||||
|
|
||||||
lin pot110 = n1.ten ** {
|
lin pot110 = n1.ten ** {
|
||||||
s = \\df => n1.ten.s ;
|
s = \\df => n1.ten.s ;
|
||||||
thousand = [] ;
|
thousand = [] ;
|
||||||
|
hasThousand = False ;
|
||||||
n = Pl
|
n = Pl
|
||||||
} ;
|
} ;
|
||||||
lin pot111 = {
|
lin pot111 = {
|
||||||
s = \\_ => "koob iyo" ++ n1.ten.s ;
|
s = \\_ => "koob iyo" ++ n1.ten.s ;
|
||||||
ord = "koob iyo" ++ n1.ten.ord ;
|
ord = "koob iyo" ++ n1.ten.ord ;
|
||||||
thousand = [] ;
|
thousand = [] ;
|
||||||
|
hasThousand = False ;
|
||||||
da = M KA ;
|
da = M KA ;
|
||||||
n = Pl
|
n = Pl
|
||||||
} ;
|
} ;
|
||||||
lin pot1to19 d = {
|
lin pot1to19 d = {
|
||||||
s = \\_ => d.unit.s ! Hal ++ "iyo" ++ n1.ten.s ;
|
s = \\_ => d.unit.s ! Hal ++ "iyo" ++ n1.ten.s ;
|
||||||
thousand = [] ;
|
thousand = [] ;
|
||||||
|
hasThousand = False ;
|
||||||
ord = d.unit.s ! Hal ++ "iyo" ++ n1.ten.ord ;
|
ord = d.unit.s ! Hal ++ "iyo" ++ n1.ten.ord ;
|
||||||
da = M KA ;
|
da = M KA ;
|
||||||
n = Pl
|
n = Pl
|
||||||
@@ -91,26 +95,31 @@ lin pot0as1 n = n ;
|
|||||||
lin pot1 d = d.ten ** {
|
lin pot1 d = d.ten ** {
|
||||||
s = \\df => d.ten.s ;
|
s = \\df => d.ten.s ;
|
||||||
thousand = [] ;
|
thousand = [] ;
|
||||||
|
hasThousand = False ;
|
||||||
n = Pl
|
n = Pl
|
||||||
} ;
|
} ;
|
||||||
lin pot1plus d e = d.ten ** {
|
lin pot1plus d e = d.ten ** {
|
||||||
s = \\b => e.s ! b ++ "iyo" ++ d.ten.s ;
|
s = \\b => e.s ! b ++ "iyo" ++ d.ten.s ;
|
||||||
ord = e.s ! Hal ++ "iyo" ++ d.ten.ord ;
|
ord = e.s ! Hal ++ "iyo" ++ d.ten.ord ;
|
||||||
thousand = [] ;
|
thousand = [] ;
|
||||||
|
hasThousand = False ;
|
||||||
n = Pl ;
|
n = Pl ;
|
||||||
} ;
|
} ;
|
||||||
lin pot1as2 n = n ;
|
lin pot1as2 n = n ;
|
||||||
lin pot2 d = d ** {
|
lin pot2 d = d ** {
|
||||||
thousand = "boqol" ;
|
thousand = "boqol" ;
|
||||||
|
hasThousand = True ;
|
||||||
ord = d.s ! Hal ++ "boqlaad"
|
ord = d.s ! Hal ++ "boqlaad"
|
||||||
} ;
|
} ;
|
||||||
lin pot2plus d e = d ** {
|
lin pot2plus d e = d ** {
|
||||||
thousand = "boqol iyo" ++ e.s ! Hal ;
|
thousand = "boqol iyo" ++ e.s ! Hal ;
|
||||||
|
hasThousand = True ;
|
||||||
ord = d.s ! Hal ++ "boqol iyo" ++ e.ord ;
|
ord = d.s ! Hal ++ "boqol iyo" ++ e.ord ;
|
||||||
n = Pl} ;
|
n = Pl} ;
|
||||||
lin pot2as3 n = n ;
|
lin pot2as3 n = n ;
|
||||||
lin pot3 n = n ** {
|
lin pot3 n = n ** {
|
||||||
thousand = n.thousand ++ "kun" ;
|
thousand = n.thousand ++ "kun" ;
|
||||||
|
hasThousand = True ;
|
||||||
ord = n.s ! Hal ++ "kunaad" ;
|
ord = n.s ! Hal ++ "kunaad" ;
|
||||||
n = Pl } ;
|
n = Pl } ;
|
||||||
|
|
||||||
@@ -119,9 +128,7 @@ lin pot3plus n m = n ** {
|
|||||||
ord = n.ord ++ "kun iyo" ++ m.ord ;
|
ord = n.ord ++ "kun iyo" ++ m.ord ;
|
||||||
n = Pl} ;
|
n = Pl} ;
|
||||||
|
|
||||||
--TODO:
|
|
||||||
-- two thousand small cats
|
|
||||||
-- => laba kun oo bisadood oo yar (kun and bisadood are both attributes)
|
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
|
|
||||||
lincat Dig = TDigit ;
|
lincat Dig = TDigit ;
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ oper
|
|||||||
u : Preposition ;
|
u : Preposition ;
|
||||||
noPrep : Preposition ;
|
noPrep : Preposition ;
|
||||||
|
|
||||||
-- TODO: add subjunctive too!
|
|
||||||
VVForm : Type ; -- Argument to give to mkVV
|
VVForm : Type ; -- Argument to give to mkVV
|
||||||
infinitive : VVForm ; -- Takes its complement in infinitive
|
infinitive : VVForm ; -- Takes its complement in infinitive
|
||||||
subjunctive : VVForm ; -- Takes its complement as a clause in subjunctive
|
subjunctive : VVForm ; -- Takes its complement as a clause in subjunctive
|
||||||
@@ -46,7 +45,6 @@ oper
|
|||||||
mkN : (shimbir : Str) -> (fem : Gender) -> N ; -- Unpredictable gender
|
mkN : (shimbir : Str) -> (fem : Gender) -> N ; -- Unpredictable gender
|
||||||
-- mkN : (nin, niman : Str) -> N ; -- Monosyllable word with unpredictable plural
|
-- mkN : (nin, niman : Str) -> N ; -- Monosyllable word with unpredictable plural
|
||||||
mkN : (maalin,maalmo : Str) -> Gender -> N ; -- Consonant cluster in stem
|
mkN : (maalin,maalmo : Str) -> Gender -> N ; -- Consonant cluster in stem
|
||||||
--mkN : N -> Gender -> N ; -- Otherwise predictable but not gender (TODO does this even happen?)
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkN2 : overload {
|
mkN2 : overload {
|
||||||
@@ -94,21 +92,28 @@ oper
|
|||||||
mkVV : overload {
|
mkVV : overload {
|
||||||
mkVV : (kar : Str) -> VV ; -- VV that takes its complement in infinitive.
|
mkVV : (kar : Str) -> VV ; -- VV that takes its complement in infinitive.
|
||||||
mkVV : (rab : Str) -> VVForm -> VV ; -- Specify complement type: infinitive or subjunctive.
|
mkVV : (rab : Str) -> VVForm -> VV ; -- Specify complement type: infinitive or subjunctive.
|
||||||
mkVV : V -> VVForm -> VV ; -- VV out of an existing V
|
mkVV : V -> VVForm -> VV ; -- VV out of an existing V
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- TODO: actual constructors
|
mkV2S : overload {
|
||||||
-- mkVA : Str -> VA = \s -> lin VA (mkVerb s) ;
|
mkV2S : Str -> V2S ; -- Predictable verb, no preposition.
|
||||||
--
|
mkV2S : Str -> Preposition -> V2S ; -- Predictable verb, preposition given as second argument.
|
||||||
-- mkV2A : Str -> V2A = \s -> lin V2A (mkVerb s) ;
|
mkV2S : V -> Preposition -> V2S -- Unpredictable verb, preposition.
|
||||||
-- mkVQ : Str -> VQ = \s -> lin VQ (mkVerb s) ;
|
} ;
|
||||||
-- mkVS : Str -> VS = \s -> lin VS (mkVerb s) ;
|
|
||||||
--
|
|
||||||
-- mkV2V : Str -> V2V = \s -> lin V2V (mkVerb s) ;
|
|
||||||
-- mkV2S : Str -> V2S = \s -> lin V2S (mkVerb s) ;
|
|
||||||
-- mkV2Q : Str -> V2Q = \s -> lin V2Q (mkVerb s) ;
|
|
||||||
-- mkV3 : Str -> V3 = \s -> lin V3 (mkVerb s) ;
|
|
||||||
|
|
||||||
|
mkVA : Str -> VA
|
||||||
|
= \s -> lin VA (regV s) ;
|
||||||
|
mkVQ : Str -> VQ
|
||||||
|
= \s -> lin VQ (regV s) ;
|
||||||
|
mkVS : Str -> VS
|
||||||
|
= \s -> lin VS (regV s) ;
|
||||||
|
|
||||||
|
mkV2A : Str -> V2A
|
||||||
|
= \s -> lin V2A (regV s ** {c2 = noPrep}) ;
|
||||||
|
mkV2V : Str -> V2V
|
||||||
|
= \s -> lin V2V (regV s ** {c2 = noPrep}) ;
|
||||||
|
mkV2Q : Str -> V2Q
|
||||||
|
= \s -> lin V2Q (regV s ** {c2 = noPrep}) ;
|
||||||
|
|
||||||
-----
|
-----
|
||||||
|
|
||||||
@@ -246,8 +251,17 @@ oper
|
|||||||
in lin VV (dummyV ** {vvtype=b ; s = \\_ => "in"})
|
in lin VV (dummyV ** {vvtype=b ; s = \\_ => "in"})
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
mkV2S = overload {
|
||||||
|
mkV2S : Str -> V2S -- Predictable verb, no preposition.
|
||||||
|
= \s -> lin V2S (regV s ** {c2 = noPrep}) ;
|
||||||
|
mkV2S : Str -> Preposition -> V2S -- Predictable verb, preposition given as second argument.
|
||||||
|
= \s,pr -> lin V2S (regV s ** {c2 = pr}) ;
|
||||||
|
mkV2S : V -> Preposition -> V2S -- Unpredictable verb, preposition.
|
||||||
|
= \v,pr -> lin V2S (v ** {c2 = pr})
|
||||||
|
} ;
|
||||||
|
|
||||||
possPrep : N -> CatSom.Prep = \dhex -> emptyPrep ** {
|
possPrep : N -> CatSom.Prep = \dhex -> emptyPrep ** {
|
||||||
miscAdv = \\agr =>
|
hoostiisa = \\agr =>
|
||||||
let qnt = PossPron (pronTable ! agr) ;
|
let qnt = PossPron (pronTable ! agr) ;
|
||||||
num = getNum agr ;
|
num = getNum agr ;
|
||||||
art = gda2da dhex.gda ! Sg ;
|
art = gda2da dhex.gda ! Sg ;
|
||||||
@@ -258,7 +272,7 @@ oper
|
|||||||
|
|
||||||
emptyPrep : CatSom.Prep = lin Prep {
|
emptyPrep : CatSom.Prep = lin Prep {
|
||||||
sii,berri,dhex = [] ;
|
sii,berri,dhex = [] ;
|
||||||
miscAdv = \\_ => [] ;
|
hoostiisa = \\_ => [] ;
|
||||||
s = \\_ => [] ;
|
s = \\_ => [] ;
|
||||||
c2 = noPrep ;
|
c2 = noPrep ;
|
||||||
isPoss = False
|
isPoss = False
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ oper
|
|||||||
case n.gda of {FM _ _ => Fem ; _ => Masc} ;
|
case n.gda of {FM _ _ => Fem ; _ => Masc} ;
|
||||||
|
|
||||||
gennum : {gda : GenderDefArt} -> Number -> GenNum = \gda,n ->
|
gennum : {gda : GenderDefArt} -> Number -> GenNum = \gda,n ->
|
||||||
case n of {Pl => PlInv ; Sg =>
|
case n of {Pl => PlInv ; Sg =>
|
||||||
case gda.gda of {FM _ _ => SgFem ; _ => SgMasc}
|
case gda.gda of {FM _ _ => SgFem ; _ => SgMasc}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -210,12 +210,29 @@ param
|
|||||||
|
|
||||||
CardOrd = NOrd | NCard ;
|
CardOrd = NOrd | NCard ;
|
||||||
|
|
||||||
|
-- to know whether to put oo in between numeral and CN
|
||||||
|
NumType = NoNum | Basic | Compound ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
isNum : NumType -> Bool = \nt -> case nt of {
|
||||||
|
NoNum => False ;
|
||||||
|
_ => True
|
||||||
|
} ;
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
-- Adjectives
|
-- Adjectives
|
||||||
|
|
||||||
param
|
param
|
||||||
AForm = AF Number Case ; ---- TODO: past tense
|
AForm = AF Number Case ; ---- TODO: past tense
|
||||||
|
|
||||||
|
ModType = NoMod | AMod | OtherMod ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
-- to flip ModType
|
||||||
|
notMod : ModType -> ModType = \mt -> case mt of {
|
||||||
|
NoMod => OtherMod ;
|
||||||
|
_ => NoMod
|
||||||
|
} ;
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
-- Prepositions
|
-- Prepositions
|
||||||
|
|
||||||
@@ -223,7 +240,7 @@ param
|
|||||||
Preposition = U | Ku | Ka | La | NoPrep ;
|
Preposition = U | Ku | Ka | La | NoPrep ;
|
||||||
|
|
||||||
PrepCombination = Ugu | Uga | Ula | Kaga | Kula | Kala
|
PrepCombination = Ugu | Uga | Ula | Kaga | Kula | Kala
|
||||||
| Passive | Lagu | Laga | Loo | Lala -- TODO all combinations with impersonal la
|
| Passive | Loo | Lagu | Laga | Lala -- TODO all combinations with impersonal la: Loogu, Looga, Loola, Lagaga, Lagula, Lagala
|
||||||
| Single Preposition ;
|
| Single Preposition ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
@@ -244,6 +261,15 @@ oper
|
|||||||
Single _ => oneWay ! p1 ! p2 ;
|
Single _ => oneWay ! p1 ! p2 ;
|
||||||
z => z } ;
|
z => z } ;
|
||||||
|
|
||||||
|
combinePassive : Preposition -> PrepCombination = \p ->
|
||||||
|
case p of {
|
||||||
|
U => Loo ;
|
||||||
|
Ku => Lagu ;
|
||||||
|
Ka => Laga ;
|
||||||
|
La => Lala ;
|
||||||
|
_ => Passive
|
||||||
|
} ;
|
||||||
|
|
||||||
isPassive : {c2 : PrepCombination} -> Bool = \vp ->
|
isPassive : {c2 : PrepCombination} -> Bool = \vp ->
|
||||||
case vp.c2 of {
|
case vp.c2 of {
|
||||||
Passive | Lagu | Laga | Loo | Lala => True ;
|
Passive | Lagu | Laga | Loo | Lala => True ;
|
||||||
@@ -336,6 +362,6 @@ oper
|
|||||||
|
|
||||||
param
|
param
|
||||||
|
|
||||||
ClType = Statement | Question | Subord ;
|
ClType = Statement | PolarQuestion | WhQuestion | Subord ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,17 +5,19 @@ concrete PhraseSom of Phrase = CatSom ** open Prelude, ResSom in {
|
|||||||
|
|
||||||
UttS s = {s = s.s ! False} ;
|
UttS s = {s = s.s ! False} ;
|
||||||
UttQS qs = qs ;
|
UttQS qs = qs ;
|
||||||
|
UttIAdv iadv = iadv ;
|
||||||
|
|
||||||
UttImpSg pol imp =
|
UttImpSg pol imp =
|
||||||
let ma = case pol.p of { Pos => [] ; Neg => "ma" }
|
let ha = case pol.p of {Pos => [] ; Neg => "ha"}
|
||||||
in { s = ma ++ imp.s } ;
|
in {s = ha ++ imp.s ! Sg ! pol.p} ;
|
||||||
UttImpPl = UttImpSg ;
|
UttImpPl pol imp =
|
||||||
|
let ha = case pol.p of {Pos => [] ; Neg => "ha"}
|
||||||
|
in {s = ha ++ imp.s ! Pl ! pol.p} ;
|
||||||
UttImpPol = UttImpSg ;
|
UttImpPol = UttImpSg ;
|
||||||
|
|
||||||
UttIP ip = { s = ip.s ! Abs} ;
|
UttIP ip = {s = ip.s ! Abs} ;
|
||||||
UttIAdv iadv = iadv ;
|
UttNP np = {s = np.s ! Abs} ;
|
||||||
UttNP np = { s = np.s ! Abs} ;
|
UttVP vp = {s = infVP vp} ;
|
||||||
UttVP vp = { s = infVP vp } ;
|
|
||||||
UttAdv adv = {s = linAdv adv} ;
|
UttAdv adv = {s = linAdv adv} ;
|
||||||
UttCN n = {s = linCN n} ;
|
UttCN n = {s = linCN n} ;
|
||||||
UttCard n = {s = n.s ! Mid} ;
|
UttCard n = {s = n.s ! Mid} ;
|
||||||
|
|||||||
@@ -1,40 +1,69 @@
|
|||||||
concrete QuestionSom of Question = CatSom ** open
|
concrete QuestionSom of Question = CatSom ** open
|
||||||
Prelude, ResSom, (VS=VerbSom), (NS=NounSom), (AS=AdverbSom) in {
|
Prelude, ResSom, ParadigmsSom, (VS=VerbSom), (NS=NounSom), (SS=StructuralSom) in {
|
||||||
|
|
||||||
-- A question can be formed from a clause ('yes-no question') or
|
-- A question can be formed from a clause ('yes-no question') or
|
||||||
-- with an interrogative.
|
-- with an interrogative.
|
||||||
|
|
||||||
lin
|
lin
|
||||||
-- : Cl -> QCl ;
|
-- : Cl -> QCl ;
|
||||||
QuestCl = cl2qcl ;
|
QuestCl = cl2qcl PolarQuestion True;
|
||||||
|
|
||||||
-- : IP -> VP -> QCl ;
|
-- : IP -> VP -> QCl ;
|
||||||
QuestVP ip vp = -- TODO: if we want to contract baa + subj. pronoun, change ResSom.predVP
|
QuestVP ip vp = -- TODO: if we want to contract baa + subj. pronoun, change ResSom.predVP
|
||||||
let clRaw : ClSlash = predVP ip vp ;
|
let cls : ClSlash = predVP ip vp ;
|
||||||
cl : ClSlash = clRaw ** {
|
baan : Str = case ip.contractSTM of {True => "aan" ; _ => "baa aan"} ;
|
||||||
stm = \\clt,p => case <clt,p> of {
|
cl : ClSlash = cls ** {
|
||||||
<_,Pos> => "baa" ;
|
stm = modSTM "baa" baan cls.stm
|
||||||
_ => clRaw.stm ! clt ! p }
|
} ;
|
||||||
}
|
in cl2qcl PolarQuestion (notB ip.contractSTM) cl ;
|
||||||
in cl2qcl cl ;
|
|
||||||
|
|
||||||
-- : IP -> ClSlash -> QCl ; -- whom does John love
|
-- : IP -> ClSlash -> QCl ; -- whom does John love
|
||||||
--QuestSlash ip cls = ;
|
QuestSlash ip cls =
|
||||||
|
let baan : Str = case ip.contractSTM of {True => "aan" ; _ => "baa aan"} ;
|
||||||
|
clsIPFocus = cls ** {
|
||||||
|
subj = cls.subj ** { -- keep old subject pronoun,
|
||||||
|
noun = ip.s ! Nom -- and place IP first.
|
||||||
|
} ;
|
||||||
|
obj = cls.obj ** { -- move old subject noun before object.
|
||||||
|
s = cls.subj.noun ++ cls.obj.s
|
||||||
|
} ;
|
||||||
|
stm = modSTM "baa" baan cls.stm
|
||||||
|
} ;
|
||||||
|
in cl2qclslash (notB ip.contractSTM) clsIPFocus ;
|
||||||
|
|
||||||
-- : IAdv -> Cl -> QCl ; -- why does John walk
|
-- : IAdv -> Cl -> QCl ; -- why does John walk
|
||||||
-- QuestIAdv iadv cl = { } ;
|
QuestIAdv iadv cls =
|
||||||
|
let clRaw : ClSlash = insertIAdv iadv cls ;
|
||||||
|
sbj = clRaw.subj ;
|
||||||
|
cl : ClSlash = clRaw ** {
|
||||||
|
stm = \\clt,p => case <clt,p> of {
|
||||||
|
-- IAdv is focused with baa, and subject comes after
|
||||||
|
<_,Pos> => case iadv.contractSTM of {
|
||||||
|
True => [] ; _ => "baa"}
|
||||||
|
++ sbj.pron ++ sbj.noun ;
|
||||||
|
_ => case iadv.contractSTM of {
|
||||||
|
True => [] ; _ => clRaw.stm ! WhQuestion ! p}
|
||||||
|
++ sbj.pron ++ sbj.noun } ;
|
||||||
|
subj = sbj ** {noun, pron = []} -- to force subject after baa
|
||||||
|
} ;
|
||||||
|
in cl2qcl WhQuestion True cl ; -- True because we handle STM placement in cl.stm
|
||||||
|
|
||||||
-- : IComp -> NP -> QCl ; -- where is John?
|
-- : IComp -> NP -> QCl ; -- where is John?
|
||||||
-- QuestIComp icomp np = ;
|
QuestIComp icomp np =
|
||||||
|
let cls = predVP np (VS.UseComp (icomp2comp icomp)) ;
|
||||||
|
-- cl = cls ** { -- TODO: neg. questions
|
||||||
|
-- stm : ClType=>Polarity=>Str = \\_,_ => "waa"
|
||||||
|
-- }
|
||||||
|
in cl2sentence False cls ; -- copula is dropped and STM is waa
|
||||||
|
|
||||||
-- Interrogative pronouns can be formed with interrogative
|
-- Interrogative pronouns can be formed with interrogative
|
||||||
-- determiners, with or without a noun.
|
-- determiners, with or without a noun.
|
||||||
|
|
||||||
-- : IDet -> CN -> IP ; -- which five songs
|
-- : IDet -> CN -> IP ; -- which five songs
|
||||||
IdetCN = NS.DetCN ;
|
IdetCN idet cn = {contractSTM = False} ** NS.DetCN idet cn ;
|
||||||
|
|
||||||
-- : IDet -> IP ; -- which five
|
-- : IDet -> IP ; -- which five
|
||||||
IdetIP = NS.DetNP ;
|
IdetIP idet = {contractSTM = False} ** NS.DetNP idet ;
|
||||||
|
|
||||||
-- They can be modified with adverbs.
|
-- They can be modified with adverbs.
|
||||||
-- : IP -> Adv -> IP ; -- who in Paris
|
-- : IP -> Adv -> IP ; -- who in Paris
|
||||||
@@ -47,21 +76,21 @@ concrete QuestionSom of Question = CatSom ** open
|
|||||||
|
|
||||||
-- Interrogative adverbs can be formed prepositionally.
|
-- Interrogative adverbs can be formed prepositionally.
|
||||||
-- : Prep -> IP -> IAdv ; -- with whom
|
-- : Prep -> IP -> IAdv ; -- with whom
|
||||||
PrepIP prep ip = let a = AS.PrepNP prep ip in a ** {s = a.berri} ;
|
PrepIP prep ip = SS.prepIP prep (ip.s ! Abs) False ;
|
||||||
|
|
||||||
-- They can be modified with other adverbs.
|
-- They can be modified with other adverbs.
|
||||||
|
|
||||||
-- : IAdv -> Adv -> IAdv ; -- where in Paris
|
-- : IAdv -> Adv -> IAdv ; -- where in Paris
|
||||||
AdvIAdv iadv adv = iadv ** {s = iadv.s ++ adv.berri} ;
|
-- AdvIAdv iadv adv = iadv ** {s = iadv.s ++ adv.berri} ; -- TODO do we need PrepCombination in IAdv?
|
||||||
|
|
||||||
-- Interrogative complements to copulas can be both adverbs and
|
-- Interrogative complements to copulas can be both adverbs and
|
||||||
-- pronouns.
|
-- pronouns.
|
||||||
|
|
||||||
-- : IAdv -> IComp ;
|
-- : IAdv -> IComp ;
|
||||||
CompIAdv iadv = iadv ; -- where (is it)
|
CompIAdv iadv = iadv ; -- where (is it)
|
||||||
|
|
||||||
-- : IP -> IComp ;
|
-- : IP -> IComp ;
|
||||||
CompIP ip = { s = ip.s ! Abs } ; -- who (is it)
|
CompIP ip = {s = ip.s ! Abs} ; -- who (is it)
|
||||||
|
|
||||||
{-
|
{-
|
||||||
-- More $IP$, $IDet$, and $IAdv$ are defined in $Structural$.
|
-- More $IP$, $IDet$, and $IAdv$ are defined in $Structural$.
|
||||||
@@ -78,4 +107,25 @@ concrete QuestionSom of Question = CatSom ** open
|
|||||||
QuestQVP : IP -> QVP -> QCl ; -- who buys what where
|
QuestQVP : IP -> QVP -> QCl ; -- who buys what where
|
||||||
-}
|
-}
|
||||||
|
|
||||||
|
oper
|
||||||
|
|
||||||
|
icomp2comp : SS -> Complement = \icomp -> icomp ** {
|
||||||
|
aComp = \\_ => [] ;
|
||||||
|
nComp = icomp.s ;
|
||||||
|
compar = [] ;
|
||||||
|
stm = Waa NoCopula
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- Question clauses: subject pronoun not included, STM is
|
||||||
|
cl2qcl : ClType -> Bool -> ClSlash -> Clause = \cltyp ->
|
||||||
|
let hasSubjPron : Bool = False ;
|
||||||
|
isRel : Bool = False ;
|
||||||
|
in mkClause cltyp isRel hasSubjPron ;
|
||||||
|
|
||||||
|
-- Question clause with wh-word as object: subject pronoun is included
|
||||||
|
cl2qclslash : Bool -> ClSlash -> Clause =
|
||||||
|
let hasSubjPron : Bool = True ;
|
||||||
|
isRel : Bool = False ;
|
||||||
|
in mkClause PolarQuestion isRel hasSubjPron ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,4 +36,28 @@ lin
|
|||||||
-- : Prep -> NP -> RP -> RP ; -- the mother of whom
|
-- : Prep -> NP -> RP -> RP ; -- the mother of whom
|
||||||
--FunRP prep np rp = {} ;
|
--FunRP prep np rp = {} ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
|
||||||
|
-- RelVP: subject pronoun is never included
|
||||||
|
cl2rcl : ClSlash -> Clause =
|
||||||
|
let hasSubjPron : Bool = False ;
|
||||||
|
hasSTM : Bool = False ;
|
||||||
|
isRel : Bool = True ;
|
||||||
|
in mkClause Subord isRel hasSubjPron hasSTM ;
|
||||||
|
|
||||||
|
-- No subject pronoun, no STM, but use verb forms from Statement
|
||||||
|
cl2rclNom : ClSlash -> Clause = \cls ->
|
||||||
|
let hasSubjPron : Bool = False ;
|
||||||
|
hasSTM : Bool = False ;
|
||||||
|
isRel : Bool = True ;
|
||||||
|
in mkClause Statement isRel hasSubjPron hasSTM cls ;
|
||||||
|
|
||||||
|
-- RelSlash: subject pronoun is included if it's not 3rd person
|
||||||
|
-- TODO check this rule with more example sentences
|
||||||
|
cl2relslash : ClSlash -> Clause =
|
||||||
|
let hasSubjPron : Bool = True ;
|
||||||
|
hasSTM : Bool = False ;
|
||||||
|
isRel : Bool = True ;
|
||||||
|
in mkClause Subord isRel hasSubjPron hasSTM ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ oper
|
|||||||
CNoun : Type = Noun ** {
|
CNoun : Type = Noun ** {
|
||||||
mod : State -- for conjunctions: oo for indef, ee for def
|
mod : State -- for conjunctions: oo for indef, ee for def
|
||||||
=> Number => Case => Str ;
|
=> Number => Case => Str ;
|
||||||
hasMod : Bool ;
|
modtype : ModType ;
|
||||||
isPoss : Bool -- to prevent impossible forms in ComplN2 with Ns that have short possessive, e.g. "father"
|
isPoss : Bool -- to prevent impossible forms in ComplN2 with Ns that have short possessive, e.g. "father"
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -46,12 +46,16 @@ oper
|
|||||||
magacya + "da" => magacya ;
|
magacya + "da" => magacya ;
|
||||||
wiila + "sha" => wiila ;
|
wiila + "sha" => wiila ;
|
||||||
_ => wiilal} ;
|
_ => wiilal} ;
|
||||||
bisadi : Str = case gender of
|
bisadi : Str = case gender of {
|
||||||
{ Fem => case wiil of { _ + #c => wiil+"i" ; _ => wiil} ;
|
Fem => case wiil of {
|
||||||
Masc => wiil } ;
|
_ + #c => wiil+"i" ;
|
||||||
bisadood : Str = case gender of
|
_ => wiil } ;
|
||||||
{ Fem => case wiilal of {_ + "o" => wiilal+"od" ; _ => wiil} ;
|
Masc => wiil } ;
|
||||||
Masc => wiil }
|
bisadood : Str = case gender of {
|
||||||
|
Fem => case wiilal of {
|
||||||
|
_ + "o" => wiilal+"od" ;
|
||||||
|
_ => wiil } ;
|
||||||
|
Masc => wiil }
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
-------------------------
|
-------------------------
|
||||||
@@ -155,7 +159,7 @@ oper
|
|||||||
False => np.s} ;
|
False => np.s} ;
|
||||||
|
|
||||||
useN : Noun -> CNoun ** BaseNP = \n -> n **
|
useN : Noun -> CNoun ** BaseNP = \n -> n **
|
||||||
{ mod = \\_,_,_ => [] ; hasMod = False ;
|
{ mod = \\_,_,_ => [] ; modtype = NoMod ;
|
||||||
a = Sg3 (gender n) ; isPron,isPoss = False ;
|
a = Sg3 (gender n) ; isPron,isPoss = False ;
|
||||||
empty = [] ; st = Indefinite
|
empty = [] ; st = Indefinite
|
||||||
} ;
|
} ;
|
||||||
@@ -170,6 +174,8 @@ oper
|
|||||||
|
|
||||||
impersNP : NounPhrase = pronTable ! Impers ;
|
impersNP : NounPhrase = pronTable ! Impers ;
|
||||||
|
|
||||||
|
indeclNP : Str -> NounPhrase = \s -> emptyNP ** {s = \\c => s} ;
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
-- Pronouns
|
-- Pronouns
|
||||||
|
|
||||||
@@ -182,11 +188,11 @@ oper
|
|||||||
sp : Case => Str ;
|
sp : Case => Str ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
{- Saeed p.115: "This combination of possessive and article [kay-ga, tay-da]
|
{- Saeed p.115: "This combination of possessive and article [kay-ga, tay-da]
|
||||||
is the basic form but possessives occur with the full range of determiners,
|
is the basic form but possessives occur with the full range of determiners,
|
||||||
with associated meanings, for example:
|
with associated meanings, for example:
|
||||||
remote article kii/tii: gurigaagii 'your house (remote)'
|
remote article kii/tii: gurigaagii 'your house (remote)'
|
||||||
demonstrative kaas/taas: gurigaagaas 'that house of yours'
|
demonstrative kaas/taas: gurigaagaas 'that house of yours'
|
||||||
interrogative kee/tee: gurigaagee? 'which house of yours?'"
|
interrogative kee/tee: gurigaagee? 'which house of yours?'"
|
||||||
|
|
||||||
Since RGL abstract syntax doesn't allow combining two Quants, the way to go is
|
Since RGL abstract syntax doesn't allow combining two Quants, the way to go is
|
||||||
@@ -273,7 +279,7 @@ oper
|
|||||||
Determiner : Type = BaseQuant ** {
|
Determiner : Type = BaseQuant ** {
|
||||||
sp : Gender => Case => Str ;
|
sp : Gender => Case => Str ;
|
||||||
n : Number ;
|
n : Number ;
|
||||||
isNum : Bool ; -- placement in NP + whether to choose Numerative from CN
|
numtype : NumType ; -- placement in NP + whether to choose Numerative from CN
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
Quant : Type = BaseQuant ** {
|
Quant : Type = BaseQuant ** {
|
||||||
@@ -283,6 +289,7 @@ oper
|
|||||||
BaseNum : Type = {
|
BaseNum : Type = {
|
||||||
s : DForm => Str ; -- independent or attribute
|
s : DForm => Str ; -- independent or attribute
|
||||||
thousand : Str ; -- TODO check where possessive suffix goes
|
thousand : Str ; -- TODO check where possessive suffix goes
|
||||||
|
hasThousand : Bool ;
|
||||||
da : DefArticle ;
|
da : DefArticle ;
|
||||||
n : Number
|
n : Number
|
||||||
} ;
|
} ;
|
||||||
@@ -290,13 +297,14 @@ oper
|
|||||||
baseNum : Num = {
|
baseNum : Num = {
|
||||||
s = \\_ => [] ;
|
s = \\_ => [] ;
|
||||||
thousand = [] ;
|
thousand = [] ;
|
||||||
|
hasThousand = False ;
|
||||||
da = M KA ;
|
da = M KA ;
|
||||||
n = Sg ;
|
n = Sg ;
|
||||||
isNum = False
|
numtype = NoNum
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
Num : Type = BaseNum ** {
|
Num : Type = BaseNum ** {
|
||||||
isNum : Bool -- whether to choose Numerative as the value of NForm
|
numtype : NumType -- whether to choose Numerative as the value of NForm
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
Numeral : Type = BaseNum ** {
|
Numeral : Type = BaseNum ** {
|
||||||
@@ -327,7 +335,7 @@ oper
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
defIQuant : Str -> Quant = \ee ->
|
defIQuant : Str -> Quant = \ee ->
|
||||||
let quantRaw = defQuant ee ("k"+ee) ("t"+ee) ("kuw"+ee) False
|
let quantRaw = defQuant ee ("k"+ee) ("t"+ee) ("kuw"+ee) False
|
||||||
in quantRaw ** {
|
in quantRaw ** {
|
||||||
s = \\da,c => quantRaw.s ! da ! Abs ;
|
s = \\da,c => quantRaw.s ! da ! Abs ;
|
||||||
sp = \\gn,c => quantRaw.sp ! gn ! Abs } ;
|
sp = \\gn,c => quantRaw.sp ! gn ! Abs } ;
|
||||||
@@ -344,9 +352,14 @@ oper
|
|||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
-- Prepositions
|
-- Prepositions
|
||||||
|
|
||||||
Prep : Type = {s : PrepAgr => Str} ;
|
Prep : Type = {
|
||||||
|
s : PrepAgr => Str ;
|
||||||
|
c2 : Preposition ;
|
||||||
|
isPoss : Bool ;
|
||||||
|
berri, sii, dhex : Str ;
|
||||||
|
hoostiisa : Agreement => Str } ;
|
||||||
|
|
||||||
mkPrep : (x1,_,_,_,_,x6 : Str) -> Prep = \ku,ii,kuu,noo,idiin,isku -> {
|
mkPrep : (x1,_,_,_,_,x6 : Str) -> {s : PrepAgr => Str} = \ku,ii,kuu,noo,idiin,isku -> {
|
||||||
s = table {
|
s = table {
|
||||||
P3_Prep => ku ;
|
P3_Prep => ku ;
|
||||||
Sg1_Prep => ii ;
|
Sg1_Prep => ii ;
|
||||||
@@ -357,9 +370,10 @@ oper
|
|||||||
Reflexive_Prep => isku
|
Reflexive_Prep => isku
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
prep : Preposition -> (Prep ** {c2 : Preposition}) = \p -> prepTable ! p ** {c2 = p} ;
|
prep : Preposition -> {s : PrepAgr => Str ; c2 : Preposition} = \p ->
|
||||||
|
prepTable ! p ** {c2 = p} ;
|
||||||
|
|
||||||
prepTable : Preposition => Prep = table {
|
prepTable : Preposition => {s : PrepAgr => Str} = table {
|
||||||
Ku => mkPrep "ku" "igu" "kugu" "nagu" "idinku" "isku" ;
|
Ku => mkPrep "ku" "igu" "kugu" "nagu" "idinku" "isku" ;
|
||||||
Ka => mkPrep "ka" "iga" "kaa" "naga" "idinka" "iska" ;
|
Ka => mkPrep "ka" "iga" "kaa" "naga" "idinka" "iska" ;
|
||||||
La => mkPrep "la" "ila" "kula" "nala" "idinla" "isla" ;
|
La => mkPrep "la" "ila" "kula" "nala" "idinla" "isla" ;
|
||||||
@@ -396,12 +410,6 @@ oper
|
|||||||
Passive => "laydin" ; Loo => "laydiin" ; Lala => "laydinla" ;
|
Passive => "laydin" ; Loo => "laydiin" ; Lala => "laydinla" ;
|
||||||
Lagu => "laydinku" ; Laga => "laydinka" ;
|
Lagu => "laydinku" ; Laga => "laydinka" ;
|
||||||
Single p => (prepTable ! p).s ! Pl2_Prep } ;
|
Single p => (prepTable ! p).s ! Pl2_Prep } ;
|
||||||
-- Impers_Prep => -- TODO: put these later into other tables
|
|
||||||
-- table { Ugu => "loogu" ; Uga => "looga" ;
|
|
||||||
-- Ula => "loola" ; Kaga => "lagaga" ;
|
|
||||||
-- Kula => "lagula" ; Kala => "lagala" ;
|
|
||||||
-- Passive => "la" ;
|
|
||||||
-- Lagu => "lagu" ; Laga => "laga" ; } ;
|
|
||||||
Reflexive_Prep => -- TODO check every form
|
Reflexive_Prep => -- TODO check every form
|
||||||
table { Ugu => "isugu" ; Uga => "isuga" ; Ula => "isula" ;
|
table { Ugu => "isugu" ; Uga => "isuga" ; Ula => "isula" ;
|
||||||
Kaga => "iskaga" ; Kula => "iskula" ; Kala => "iskala" ;
|
Kaga => "iskaga" ; Kula => "iskula" ; Kala => "iskala" ;
|
||||||
@@ -420,17 +428,9 @@ oper
|
|||||||
|
|
||||||
-- Sequences of adjectives follow the rules for restrictive relatives clauses, i.e. are linked by oo 'and' on an indefinite head NounPhrase and by ee 'and' on a definite NounPhrase (8.1).
|
-- Sequences of adjectives follow the rules for restrictive relatives clauses, i.e. are linked by oo 'and' on an indefinite head NounPhrase and by ee 'and' on a definite NounPhrase (8.1).
|
||||||
|
|
||||||
-- Komparativ
|
|
||||||
-- För att uttrycka motsvarigheten till svenskans komparativ placerar man på somaliska helt enkelt prepositionen ká 'från, av, än' framför adjektivet i fråga. Adjektivet får ingen ändelse.
|
|
||||||
-- Shan waa ay ká yar tahay siddéed. Fem är mindre än åtta.
|
|
||||||
-- Superlativ
|
|
||||||
-- Motsvarigheten till svenskans superlativ bildas med prepositionsklustret ugú som till sin betydelse närmast motsvarar svenskans allra, t.ex.
|
|
||||||
-- ugu horrayntii (det att komma) allra först
|
|
||||||
|
|
||||||
Adjective : Type = {s : AForm => Str} ;
|
Adjective : Type = {s : AForm => Str} ;
|
||||||
Adjective2 : Type = Adjective ** {c2 : Preposition} ;
|
Adjective2 : Type = Adjective ** {c2 : Preposition} ;
|
||||||
|
|
||||||
|
|
||||||
duplA : Str -> Adjective = \yar ->
|
duplA : Str -> Adjective = \yar ->
|
||||||
let yaryar = duplicate yar
|
let yaryar = duplicate yar
|
||||||
in mkAdj yar yaryar ;
|
in mkAdj yar yaryar ;
|
||||||
@@ -462,7 +462,7 @@ oper
|
|||||||
=> q + a + y + b + sg ; --qayb+qaybsan, fiic+fiican
|
=> q + a + y + b + sg ; --qayb+qaybsan, fiic+fiican
|
||||||
_ => sg + sg } ;
|
_ => sg + sg } ;
|
||||||
|
|
||||||
AdjPhrase : Type = Adjective ;
|
AdjPhrase : Type = Adjective ** {compar : Str} ;
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
-- Verbs
|
-- Verbs
|
||||||
|
|
||||||
@@ -515,8 +515,10 @@ oper
|
|||||||
_ + ("i"|"e") => "ey" ;
|
_ + ("i"|"e") => "ey" ;
|
||||||
_ => "ay" } ;
|
_ => "ay" } ;
|
||||||
n : Str = case arag of {
|
n : Str = case arag of {
|
||||||
_ + #v => "nn" ; -- n duplicates after vowel
|
_ + #v => "nn" ; -- n duplicates after vowel
|
||||||
_ => "n" } ;
|
_ + "r" => "r" ; -- Saeed p. 35: agreement marker n (1PL)
|
||||||
|
_ + "l" => "l" ; -- assimilates to stem final r or.
|
||||||
|
_ => "n" } ;
|
||||||
an : Str = case qaado of {
|
an : Str = case qaado of {
|
||||||
_ + "o" => "an" ; -- Allomorph for imperatives
|
_ + "o" => "an" ; -- Allomorph for imperatives
|
||||||
_ => "in" } ;
|
_ => "in" } ;
|
||||||
@@ -557,7 +559,7 @@ oper
|
|||||||
VNegPast Progressive => progr + "n" ;
|
VNegPast Progressive => progr + "n" ;
|
||||||
|
|
||||||
-- TODO check conjugations 2 and 3
|
-- TODO check conjugations 2 and 3
|
||||||
VNegCond PlInv => arag + n + "een" ;
|
VNegCond PlInv => arag + n + "een" ;
|
||||||
VNegCond SgMasc => qaat + "een" ; -- for most verbs same as VPast Simple Pl3_
|
VNegCond SgMasc => qaat + "een" ; -- for most verbs same as VPast Simple Pl3_
|
||||||
VNegCond SgFem => arag + t + "een" ; -- for most verbs same as VPast Simple Pl2_
|
VNegCond SgFem => arag + t + "een" ; -- for most verbs same as VPast Simple Pl2_
|
||||||
|
|
||||||
@@ -636,11 +638,11 @@ oper
|
|||||||
VPast _ Pl2_ => "ahaydeen" ;
|
VPast _ Pl2_ => "ahaydeen" ;
|
||||||
VPast _ Pl3_ => "ahaayeen" ;
|
VPast _ Pl3_ => "ahaayeen" ;
|
||||||
VNegPast _ => "ahi" ;
|
VNegPast _ => "ahi" ;
|
||||||
VNegCond SgMasc => "ahaadeen" ; -- 1SG/3 SG M/3PL
|
VNegCond SgMasc => "ahaadeen" ; -- 1SG/3 SG M/3PL
|
||||||
VNegCond SgFem => "ahaateen" ; -- 2SG/3 SG F/2PL
|
VNegCond SgFem => "ahaateen" ; -- 2SG/3 SG F/2PL
|
||||||
VNegCond PlInv => "ahaanneen" ; -- 1PL
|
VNegCond PlInv => "ahaanneen" ; -- 1PL
|
||||||
VRel _ => "ah" ; -- All persons: see Nilsson p. 78. TODO check Saeed p. 103
|
VRel _ => "ah" ; -- All persons: see Nilsson p. 78. TODO check Saeed p. 103
|
||||||
VRelNeg => "ahayni" ; -- Saeed
|
VRelNeg => "ahayni" ; -- Saeed
|
||||||
VInf => "ahaan" ;
|
VInf => "ahaan" ;
|
||||||
VImp Sg pol => if_then_Pol pol "ahaw" "ahaanin" ;
|
VImp Sg pol => if_then_Pol pol "ahaw" "ahaanin" ;
|
||||||
VImp Pl pol => if_then_Pol pol "ahaada" "ahaanina" ;
|
VImp Pl pol => if_then_Pol pol "ahaada" "ahaanina" ;
|
||||||
@@ -674,8 +676,25 @@ oper
|
|||||||
x => hold_V.s ! x }
|
x => hold_V.s ! x }
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
fail_V : Verb =
|
||||||
|
let waa_V : Verb = cSug "waay" in waa_V ** {
|
||||||
|
s = table {
|
||||||
|
VPres _ Sg2_Sg3Fem _
|
||||||
|
=> "waayday" ;
|
||||||
|
VPast _ Sg1_Sg3Masc
|
||||||
|
=> "waayey" ;
|
||||||
|
VPast _ Sg2_Sg3Fem
|
||||||
|
=> "weydey" ;
|
||||||
|
VPast _ Pl1_ => "weyney" ;
|
||||||
|
VPast _ Pl2_ => "weydeen" ;
|
||||||
|
VPast _ Pl3_ => "waayeen" ;
|
||||||
|
VInf => "waayi" ;
|
||||||
|
x => waa_V.s ! x -- TODO actual forms
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
------------------
|
------------------
|
||||||
-- VP
|
-- Adv
|
||||||
|
|
||||||
BaseAdv : Type = {
|
BaseAdv : Type = {
|
||||||
sii, -- sii, soo, wala, kada go inside VP.
|
sii, -- sii, soo, wala, kada go inside VP.
|
||||||
@@ -689,34 +708,55 @@ oper
|
|||||||
np : NPLite ; -- NP from PrepNP can be promoted into a core argument.
|
np : NPLite ; -- NP from PrepNP can be promoted into a core argument.
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
IAdv : Type = Adverb ** {
|
||||||
|
contractSTM : Bool ;
|
||||||
|
s : Str -- alone, in one-word question, e.g. Waayo? 'Why?'
|
||||||
|
} ;
|
||||||
|
|
||||||
|
prepNP : Prep -> NounPhrase -> Adverb = \prep,np -> prep ** {
|
||||||
|
np = case prep.isPoss of {
|
||||||
|
True => nplite emptyNP ;
|
||||||
|
False => nplite np } ;
|
||||||
|
miscAdv = case prep.isPoss of {
|
||||||
|
True => np.s ! Abs ++ prep.hoostiisa ! np.a ;
|
||||||
|
False => prep.hoostiisa ! Sg3 Masc }
|
||||||
|
} ;
|
||||||
|
|
||||||
|
------------------
|
||||||
|
-- VP
|
||||||
|
|
||||||
Complement : Type = {
|
Complement : Type = {
|
||||||
comp : Agreement => {p1,p2 : Str} ; -- Agreement for AP complements
|
aComp : Agreement => Str ;
|
||||||
|
nComp : Str ;
|
||||||
|
compar : Str ; -- comparative is discontinuous
|
||||||
stm : STM ; -- to choose right sentence type marker
|
stm : STM ; -- to choose right sentence type marker
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
VerbPhrase : Type = BaseVerb ** Complement ** BaseAdv ** {
|
VerbPhrase : Type = BaseVerb ** Complement ** BaseAdv ** {
|
||||||
c2 : PrepCombination ; -- Prepositions can combine together and with object pronoun.
|
c2 : PrepCombination ; -- Prepositions can combine together and with object pronoun.
|
||||||
obj2 : NPLite ; -- {s : Str ; a : PrepAgr}
|
obj : NPLite ; -- {s : Str ; a : PrepAgr}
|
||||||
secObj : Str ; -- if two overt pronoun objects
|
obj2 : Str ; -- if two overt pronoun objects
|
||||||
vComp : {subjunc : Str ; -- "waa in" or subjunctive construction: "in" is placed here
|
vComp : {subjunc : Str ; -- "waa in" or subjunctive construction: "in" is placed here
|
||||||
inf : Str ; -- auxiliary VV with infinitive argument
|
inf : Str ; -- auxiliary VV with infinitive argument
|
||||||
subcl : Agreement => Str} -- VV complement if it's a subordinate clause
|
subcl : Agreement => Str} -- VV complement if it's a subordinate clause
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
VPSlash : Type = VerbPhrase ;
|
VPSlash : Type = VerbPhrase ;
|
||||||
|
|
||||||
useV : Verb -> VerbPhrase = \v -> v ** {
|
useV : Verb -> VerbPhrase = \v -> v ** {
|
||||||
comp = \\_ => <[],[]> ;
|
|
||||||
stm = case v.isCopula of { -- can change into Waxa in ComplVV
|
stm = case v.isCopula of { -- can change into Waxa in ComplVV
|
||||||
True => Waa Copula ;
|
True => Waa Copula ;
|
||||||
False => Waa NoPred
|
False => Waa NoPred
|
||||||
} ;
|
} ;
|
||||||
|
compar = [] ;
|
||||||
|
nComp = [] ;
|
||||||
|
aComp = \\_ => [] ;
|
||||||
vComp = {subjunc, inf = [] ;
|
vComp = {subjunc, inf = [] ;
|
||||||
subcl = \\_ => []} ;
|
subcl = \\_ => []} ;
|
||||||
berri,miscAdv = [] ;
|
berri,miscAdv = [] ;
|
||||||
c2 = Single NoPrep ;
|
c2 = Single NoPrep ;
|
||||||
obj2 = {s = [] ; a = P3_Prep} ;
|
obj = {s = [] ; a = P3_Prep} ;
|
||||||
secObj = []
|
obj2 = []
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
useVc : Verb2 -> VPSlash = \v2 -> useV v2 ** {
|
useVc : Verb2 -> VPSlash = \v2 -> useV v2 ** {
|
||||||
@@ -731,57 +771,61 @@ oper
|
|||||||
|
|
||||||
passVP : VerbPhrase -> VerbPhrase = \vp -> vp ** {
|
passVP : VerbPhrase -> VerbPhrase = \vp -> vp ** {
|
||||||
c2 = case vp.c2 of {
|
c2 = case vp.c2 of {
|
||||||
Single NoPrep => Passive ;
|
Single p => combinePassive p ;
|
||||||
Single Ku => Lagu ;
|
|
||||||
Single Ka => Laga ;
|
|
||||||
Single U => Loo ;
|
|
||||||
Single La => Lala ;
|
|
||||||
_ => vp.c2 }
|
_ => vp.c2 }
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
complSlash : VPSlash -> VerbPhrase = \vps -> let np = vps.obj2 in vps ** {
|
|
||||||
comp = \\agr => let cmp = vps.comp ! agr in
|
|
||||||
{p1 = np.s ++ cmp.p1 ; -- if object is a noun, it will come before verb in the sentence.
|
|
||||||
-- if object is a pronoun, np.s is empty.
|
|
||||||
p2 = cmp.p2 ++ prepCombTable ! np.a ! vps.c2} -- object combines with the preposition of the verb.
|
|
||||||
} ;
|
|
||||||
|
|
||||||
insertRefl : VPSlash -> VPSlash = \vps -> vps ** {
|
insertRefl : VPSlash -> VPSlash = \vps -> vps ** {
|
||||||
obj2 = vps.obj2 ** {a = Reflexive_Prep} ;
|
obj = vps.obj ** {a = Reflexive_Prep} ;
|
||||||
|
|
||||||
-- If old obj2 was something else than P3, it is now shown in secObj
|
-- If old obj was something else than P3, it is now shown in obj2
|
||||||
secObj = vps.secObj ++ secondObject ! vps.obj2.a ;
|
obj2 = vps.obj2 ++ secondObject ! vps.obj.a ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
insertComp : VPSlash -> NounPhrase -> VerbPhrase = \vp,np ->
|
insertComp : VPSlash -> NounPhrase -> VerbPhrase = \vp,np ->
|
||||||
insertCompLite vp (nplite np) ;
|
vp ** insertCompLite vp (nplite np) ;
|
||||||
|
|
||||||
insertCompLite : VPSlash -> NPLite -> VerbPhrase = \vp,nplite ->
|
insertCompCl : ClSlash -> NounPhrase -> ClSlash = \cls,np ->
|
||||||
case vp.obj2.a of {
|
cls ** insertCompLite cls (nplite np) ;
|
||||||
|
|
||||||
|
insertAdv : VerbPhrase -> Adverb -> VerbPhrase = \vp,adv ->
|
||||||
|
vp ** insertAdvLite vp adv ;
|
||||||
|
|
||||||
|
insertIAdv : Adverb -> ClSlash -> ClSlash = \adv,cls ->
|
||||||
|
cls ** insertAdvLite cls adv ;
|
||||||
|
|
||||||
|
-- To generalise insertAdv and insertComp
|
||||||
|
VPLite : Type = {
|
||||||
|
c2 : PrepCombination ;
|
||||||
|
obj : NPLite ;
|
||||||
|
sii,dhex,berri,miscAdv,obj2 : Str} ;
|
||||||
|
|
||||||
|
insertCompLite : VPLite -> NPLite -> VPLite = \vp,nplite ->
|
||||||
|
case vp.obj.a of {
|
||||||
-- If the old object is 3rd person (or nonexistent), we replace its agreement.
|
-- If the old object is 3rd person (or nonexistent), we replace its agreement.
|
||||||
-- We keep both old and new string (=noun, if there was one) in obj2.s.
|
-- We keep both old and new string (=noun, if there was one) in obj.s.
|
||||||
P3_Prep =>
|
P3_Prep =>
|
||||||
vp ** {obj2 = nplite ** {
|
vp ** {obj = nplite ** {
|
||||||
s = vp.obj2.s ++ nplite.s}
|
s = nplite.s ++ vp.obj.s}
|
||||||
} ; -- no secObj, because there's ≤1 non-3rd-person pronoun.
|
} ; -- no obj2, because there's ≤1 non-3rd-person pronoun.
|
||||||
|
|
||||||
-- If old object was non-3rd person, we keep its agreement.
|
-- If old object was non-3rd person, we keep its agreement.
|
||||||
-- The new object is put in the secondObject field.
|
-- The new object is put in the secondObject field.
|
||||||
_ =>
|
_ =>
|
||||||
vp ** {obj2 = vp.obj2 ** {
|
vp ** {obj = vp.obj ** {
|
||||||
s = vp.obj2.s ++ nplite.s
|
s = nplite.s ++ vp.obj.s
|
||||||
} ;
|
} ;
|
||||||
secObj = vp.secObj ++ secondObject ! nplite.a}
|
obj2 = vp.obj2 ++ secondObject ! nplite.a}
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
insertAdv : VerbPhrase -> Adverb -> VerbPhrase = \vp,adv ->
|
insertAdvLite : VPLite -> Adverb -> VPLite = \vp,adv ->
|
||||||
case adv.c2 of {
|
case adv.c2 of {
|
||||||
NoPrep => vp ** adv'' ; -- the adverb is not formed with PrepNP, e.g. "tomorrow"
|
NoPrep => vp ** adv'' ; -- the adverb is not formed with PrepNP, e.g. "tomorrow"
|
||||||
_ => case vp.c2 of {
|
_ => case vp.c2 of {
|
||||||
-- if free complement slots, introduce adv.np with insertComp
|
-- if free complement slots, introduce adv.np with insertComp
|
||||||
Single NoPrep => insertCompLite (vp ** {c2 = Single adv.c2}) adv.np ** adv' ;
|
Single NoPrep => insertCompLite (vp ** {c2 = Single adv.c2}) adv.np ** adv' ;
|
||||||
Single p => insertCompLite (vp ** {c2 = combine p adv.c2}) adv.np ** adv' ;
|
Single p => insertCompLite (vp ** {c2 = combine p adv.c2}) adv.np ** adv' ;
|
||||||
|
Passive => insertCompLite (vp ** {c2 = combinePassive adv.c2}) adv.np ** adv' ;
|
||||||
|
|
||||||
-- if complement slots are full, just insert strings.
|
-- if complement slots are full, just insert strings.
|
||||||
_ => vp ** adv''
|
_ => vp ** adv''
|
||||||
@@ -801,15 +845,16 @@ oper
|
|||||||
|
|
||||||
|
|
||||||
{- After PredVP, we might still want to add more adverbs (QuestIAdv),
|
{- After PredVP, we might still want to add more adverbs (QuestIAdv),
|
||||||
but we're done with verb inflection.
|
but we're done with verb inflection.
|
||||||
-}
|
-}
|
||||||
ClSlash : Type = BaseAdv ** {
|
ClSlash : Type = BaseAdv ** {
|
||||||
-- Fixed in Cl
|
-- Fixed in Cl
|
||||||
subj : {noun, pron : Str ; isP3 : Bool} ; -- noun and subject pronoun if applicable
|
subj : {noun, pron : Str ; isP3 : Bool} ; -- noun and subject pronoun if applicable
|
||||||
obj2 : NPLite ;
|
obj : NPLite ;
|
||||||
secObj : Str ;
|
obj2 : Str ;
|
||||||
c2 : PrepCombination ; -- NB. QuestIAdv can add more prepositions
|
c2 : PrepCombination ; -- NB. QuestIAdv can add more prepositions
|
||||||
comp : {p1,p2 : Str} ;
|
aComp : Str ;
|
||||||
|
nComp : Str ;
|
||||||
vComp : {inf,subcl,subjunc : Str} ;
|
vComp : {inf,subcl,subjunc : Str} ;
|
||||||
|
|
||||||
-- Still open
|
-- Still open
|
||||||
@@ -826,28 +871,20 @@ oper
|
|||||||
|
|
||||||
predVP : NounPhrase -> VerbPhrase -> ClSlash = \np,vps -> vp ** {
|
predVP : NounPhrase -> VerbPhrase -> ClSlash = \np,vps -> vp ** {
|
||||||
subj = {noun = subjnoun ; pron = subjpron ; isP3 = isP3 subj.a} ;
|
subj = {noun = subjnoun ; pron = subjpron ; isP3 = isP3 subj.a} ;
|
||||||
pred = \\cltyp,t,a,p =>
|
obj = vp.obj ** {s = vp.obj.s ++ vp.compar} ;
|
||||||
|
pred = \\cltyp,t,a,p =>
|
||||||
let predRaw = vf cltyp t a p subj.a vp ;
|
let predRaw = vf cltyp t a p subj.a vp ;
|
||||||
in case <cltyp, p, t, vp.stm, subj.a> of {
|
in case <cltyp, p, t, vp.stm, subj.a> of {
|
||||||
<Statement, Pos, Pres, Waa NoCopula, Sg3 _|Pl3> -- VP comes from CompNP/CompCN + P3 subject
|
<Statement, Pos, Pres, Waa NoCopula, Sg3 _|Pl3> -- VP comes from CompNP/CompCN + P3 subject
|
||||||
=> [] ;
|
=> [] ;
|
||||||
|
|
||||||
<_, _, Pres, Waa (Copula|NoCopula), _> -- Comp* present tense + any subject
|
<_, _, Pres, Waa (Copula|NoCopula), _> -- Comp* present tense + any subject
|
||||||
=> presCopula ! {agr=subj.a ; pol=p} ;
|
=> presCopula ! {agr=subj.a ; pol=p} ;
|
||||||
|
|
||||||
_ => predRaw -- Any other verb
|
_ => predRaw -- Any other verb
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
stm = \\cltyp,pol =>
|
stm = mkStm subj.a vp.stm ;
|
||||||
case <cltyp,pol> of {
|
aComp = vp.aComp ! subj.a ;
|
||||||
<Statement,Pos> => showSTM vp.stm ;
|
|
||||||
<Statement,Neg> => "ma" ;
|
|
||||||
<Question,Pos> => "ma" ;
|
|
||||||
<Question,Neg> => "sow" ;
|
|
||||||
<Subord,Pos> => [] ;
|
|
||||||
<Subord,Neg> => "aan"
|
|
||||||
} ;
|
|
||||||
comp = vp.comp ! subj.a ;
|
|
||||||
vComp = vp.vComp ** {
|
vComp = vp.vComp ** {
|
||||||
subcl = vp.vComp.subcl ! subj.a
|
subcl = vp.vComp.subcl ! subj.a
|
||||||
}
|
}
|
||||||
@@ -856,7 +893,7 @@ oper
|
|||||||
True => insertComp vps np ;
|
True => insertComp vps np ;
|
||||||
_ => vps } ;
|
_ => vps } ;
|
||||||
subj : NounPhrase = case isPassive vps of {
|
subj : NounPhrase = case isPassive vps of {
|
||||||
True => impersNP ;
|
True => impersNP ;
|
||||||
_ => np } ;
|
_ => np } ;
|
||||||
subjnoun : Str = case np.isPron of {
|
subjnoun : Str = case np.isPron of {
|
||||||
True => np.empty ;
|
True => np.empty ;
|
||||||
@@ -867,45 +904,8 @@ oper
|
|||||||
=> np.empty ;
|
=> np.empty ;
|
||||||
_ => (pronTable ! subj.a).s ! Nom
|
_ => (pronTable ! subj.a).s ! Nom
|
||||||
}
|
}
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- just like complSlash but for Cl
|
|
||||||
complCl : ClSlash -> ClSlash = \cl -> let np = cl.obj2 in cl ** {
|
|
||||||
comp = {p1 = np.s ++ cl.comp.p1 ;
|
|
||||||
p2 = cl.comp.p2 ++ prepCombTable ! np.a ! cl.c2}
|
|
||||||
} ;
|
|
||||||
|
|
||||||
|
|
||||||
-- RelVP: subject pronoun is never included
|
|
||||||
cl2rcl : ClSlash -> Clause =
|
|
||||||
let hasSubjPron : Bool = False ;
|
|
||||||
hasSTM : Bool = False ;
|
|
||||||
isRel : Bool = True ;
|
|
||||||
in wordOrder Subord isRel hasSubjPron hasSTM ;
|
|
||||||
|
|
||||||
-- No subject pronoun, no STM, but use verb forms from Statement
|
|
||||||
cl2rclNom : ClSlash -> Clause = \cls ->
|
|
||||||
let hasSubjPron : Bool = False ;
|
|
||||||
hasSTM : Bool = False ;
|
|
||||||
isRel : Bool = True ;
|
|
||||||
in wordOrder Statement isRel hasSubjPron hasSTM cls ;
|
|
||||||
|
|
||||||
-- RelSlash: subject pronoun is included if it's not 3rd person
|
|
||||||
-- TODO check this rule with more example sentences
|
|
||||||
cl2relslash : ClSlash -> Clause =
|
|
||||||
let hasSubjPron : Bool = True ;
|
|
||||||
hasSTM : Bool = False ;
|
|
||||||
isRel : Bool = True ;
|
|
||||||
in wordOrder Subord isRel hasSubjPron hasSTM ;
|
|
||||||
|
|
||||||
-- Question clauses: subject pronoun not included, STM is
|
|
||||||
cl2qcl : ClSlash -> Clause =
|
|
||||||
let hasSubjPron : Bool = False ;
|
|
||||||
hasSTM : Bool = True ;
|
|
||||||
isRel : Bool = False ;
|
|
||||||
in wordOrder Question isRel hasSubjPron hasSTM ;
|
|
||||||
|
|
||||||
-- Sentence: include subject pronoun and STM.
|
-- Sentence: include subject pronoun and STM.
|
||||||
-- When subordinate, include "in".
|
-- When subordinate, include "in".
|
||||||
cl2sentence : Bool -> ClSlash -> Clause = \isSubord,cls -> {
|
cl2sentence : Bool -> ClSlash -> Clause = \isSubord,cls -> {
|
||||||
@@ -914,36 +914,52 @@ oper
|
|||||||
True => Subord ;
|
True => Subord ;
|
||||||
False => Statement } ;
|
False => Statement } ;
|
||||||
cl : ClSlash = case isSubord of { -- add "in" to the clause if used as subordinate
|
cl : ClSlash = case isSubord of { -- add "in" to the clause if used as subordinate
|
||||||
True => cls ** {vComp = cls.vComp ** {subjunc = "in"}} ;
|
True => cls ** {
|
||||||
|
vComp = cls.vComp ** {subjunc = "in"}
|
||||||
|
} ;
|
||||||
False => cls } ;
|
False => cls } ;
|
||||||
sent = wordOrder cltyp False True True cl
|
isRel = False ;
|
||||||
|
hasSubjPron = True ;
|
||||||
|
hasSTM = True ;
|
||||||
|
sent = mkClause cltyp isRel hasSubjPron hasSTM cl
|
||||||
in sent.s ! t ! a ! p
|
in sent.s ! t ! a ! p
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
mkClause : ClType -> (rel,sp,stm : Bool) -> ClSlash -> Clause =
|
||||||
wordOrder : ClType -> (rel,sp,stm : Bool) -> ClSlash -> Clause = \cltyp,isRel,hasSubjPron,hasSTM,incomplCl -> {
|
\cltyp,isRel,hasSubjPron,hasSTM,cl -> {
|
||||||
s = \\t,a,p =>
|
s = \\t,a,p =>
|
||||||
let -- Put all arguments in their right place
|
let -- Put all arguments in their right place
|
||||||
cl : ClSlash = complCl incomplCl ;
|
--cl : ClSlash = complCl incomplCl ;
|
||||||
|
prepComb = prepCombTable ! cl.obj.a ! cl.c2 ;
|
||||||
|
|
||||||
-- Contractions
|
-- Contractions
|
||||||
bind : Str = case <isPassive cl, cl.obj2.a, cl.c2> of {
|
bind : Str = case <isPassive cl, cl.obj.a, cl.c2> of {
|
||||||
<False,P3_Prep,Single NoPrep> => [] ; -- nothing to attach to the STM
|
<False,P3_Prep,Single NoPrep> => [] ; -- nothing to attach to the STM
|
||||||
_ => BIND } ; -- something to attach, use BIND
|
_ => BIND } ; -- something to attach, use BIND
|
||||||
obj : {p1,p2 : Str} = case <cltyp,p> of {
|
prepCombNeg : Str = case <cltyp,p> of {
|
||||||
<Statement,Neg> -- object pronoun and prepositions contract with negation
|
<Statement,Neg> => prepComb ++ bind ;
|
||||||
=> {p2 = [] ; p1 = cl.comp.p1 ++ cl.comp.p2 ++ bind} ;
|
_ => []
|
||||||
_ => cl.comp } ;
|
} ;
|
||||||
|
prepCombPos : Str = case <cltyp,p> of {
|
||||||
|
<Statement,Neg> => [] ;
|
||||||
|
_ => prepComb
|
||||||
|
} ;
|
||||||
|
|
||||||
-- Placement of object noun varies depending on type of clause
|
-- Placement of object noun varies depending on type of clause
|
||||||
statementNounObj = case cltyp of {
|
statementNounObj = case cltyp of {
|
||||||
Statement => obj.p1 ;
|
Statement => cl.obj.s ;
|
||||||
_ => [] } ;
|
_ => [] } ;
|
||||||
|
statementNounComp = case cltyp of {
|
||||||
|
Statement => cl.nComp ;
|
||||||
|
_ => [] } ;
|
||||||
|
|
||||||
|
-- for subord and question, NP predicatives and objects behave the same
|
||||||
subordNounObj = case cltyp of {
|
subordNounObj = case cltyp of {
|
||||||
Subord => obj.p1 ;
|
Subord => cl.obj.s ++ cl.nComp ;
|
||||||
_ => [] } ;
|
_ => [] } ;
|
||||||
questionNounObj = case cltyp of {
|
questionNounObj = case cltyp of {
|
||||||
Question => obj.p1 ;
|
PolarQuestion|WhQuestion
|
||||||
|
=> cl.obj.s ++ cl.nComp ;
|
||||||
_ => [] } ;
|
_ => [] } ;
|
||||||
|
|
||||||
-- Control whether to include subject pronoun and STM
|
-- Control whether to include subject pronoun and STM
|
||||||
@@ -953,22 +969,27 @@ oper
|
|||||||
_ => [] } ;
|
_ => [] } ;
|
||||||
stm : Str = case <hasSTM,p> of {
|
stm : Str = case <hasSTM,p> of {
|
||||||
<True,_> => cl.stm ! cltyp ! p ;
|
<True,_> => cl.stm ! cltyp ! p ;
|
||||||
<_,Neg> => cl.stm ! cltyp ! p ; -- negation overrides hasSTM=False
|
<_,Neg> => cl.stm ! cltyp ! p ; -- negation overrides hasSTM=False. To override the override, set STM to [] in the function that calls this. /IL
|
||||||
_ => [] }
|
_ => [] }
|
||||||
in cl.berri -- AdV
|
in cl.berri -- AdV
|
||||||
++ cl.subj.noun -- subject if it's a noun
|
++ cl.subj.noun -- subject if it's a noun
|
||||||
++ statementNounObj -- noun object if it's a statement
|
++ statementNounObj -- noun object if it's a statement
|
||||||
|
|
||||||
|
++ prepCombNeg -- prepositions and pron. objects in negative statement
|
||||||
++ stm
|
++ stm
|
||||||
|
|
||||||
++ cl.vComp.subjunc -- "waa in" construction /
|
++ cl.vComp.subjunc -- "waa in" construction /
|
||||||
++ subjpron -- subject pronoun
|
++ subjpron -- subject pronoun
|
||||||
|
|
||||||
++ subordNounObj -- noun object if it's subordinate clause: "timir aan /laf/ lahayn" (Saeed p. 210-211)
|
++ subordNounObj -- noun object if it's subordinate clause: "timir aan /laf/ lahayn" (Saeed p. 210-211)
|
||||||
++ obj.p2 -- object if it's a pronoun
|
++ cl.aComp -- AP complement, regardless of cltype
|
||||||
|
++ statementNounComp -- NP complement if it's direct statement
|
||||||
|
|
||||||
|
++ prepCombPos -- prepositions + pron. objects in positive sentence
|
||||||
|
|
||||||
++ cl.sii -- restricted set of particles
|
++ cl.sii -- restricted set of particles
|
||||||
++ cl.dhex -- restricted set of nouns/adverbials
|
++ cl.dhex -- restricted set of nouns/adverbials
|
||||||
++ cl.secObj -- "second object"
|
++ cl.obj2 -- "second object"
|
||||||
++ cl.vComp.inf -- VV complement, if it's infinitive
|
++ cl.vComp.inf -- VV complement, if it's infinitive
|
||||||
++ cl.pred ! cltyp ! t ! a ! p -- the inflecting verb
|
++ cl.pred ! cltyp ! t ! a ! p -- the inflecting verb
|
||||||
++ questionNounObj -- noun object if it's a question
|
++ questionNounObj -- noun object if it's a question
|
||||||
@@ -981,7 +1002,9 @@ oper
|
|||||||
-> Str ;
|
-> Str ;
|
||||||
|
|
||||||
vf : ClType -> VFun = \clt -> case clt of {
|
vf : ClType -> VFun = \clt -> case clt of {
|
||||||
Subord => vfSubord ; _ => vfStatement } ;
|
Subord => vfSubord ;
|
||||||
|
WhQuestion => vfQuestion ; -- INF + waayaa 'why did you fail to go'
|
||||||
|
_ => vfStatement } ;
|
||||||
|
|
||||||
vfStatement : VFun = \t,ant,p,agr,vp ->
|
vfStatement : VFun = \t,ant,p,agr,vp ->
|
||||||
case <t,ant,p> of {
|
case <t,ant,p> of {
|
||||||
@@ -994,20 +1017,26 @@ oper
|
|||||||
<Fut,Simul> => vp.s ! VInf ++ presV (cSug "doon") ;
|
<Fut,Simul> => vp.s ! VInf ++ presV (cSug "doon") ;
|
||||||
<Fut,Anter> => vp.s ! VInf ++ pastV (cSug "doon")
|
<Fut,Anter> => vp.s ! VInf ++ pastV (cSug "doon")
|
||||||
}
|
}
|
||||||
where {
|
where {
|
||||||
agrPol : {agr:Agreement ; pol:Polarity} = {agr=agr; pol=p} ;
|
agrPol : {agr:Agreement ; pol:Polarity} = {agr=agr; pol=p} ;
|
||||||
pastV : BaseVerb -> Str = \v ->
|
pastV : BaseVerb -> Str = \v ->
|
||||||
case p of { Neg => v.s ! VNegPast Simple ;
|
case p of { Neg => v.s ! VNegPast Simple ;
|
||||||
Pos => v.s ! VPast Simple (agr2vagr agr) } ;
|
Pos => v.s ! VPast Simple (agr2vagr agr) } ;
|
||||||
|
|
||||||
presV : BaseVerb -> Str = \v -> v.s ! VPres Simple (agr2vagr agr) p ;
|
presV : BaseVerb -> Str = \v -> v.s ! VPres Simple (agr2vagr agr) p ;
|
||||||
|
|
||||||
condNegV : BaseVerb -> Str = \v -> case agr of {
|
condNegV : BaseVerb -> Str = \v -> case agr of {
|
||||||
Sg2|Sg3 Fem
|
Sg2|Sg3 Fem
|
||||||
|Pl2 => v.s ! VNegCond SgFem ;
|
|Pl2 => v.s ! VNegCond SgFem ;
|
||||||
Pl1 _ => v.s ! VNegCond PlInv ;
|
Pl1 _ => v.s ! VNegCond PlInv ;
|
||||||
_ => v.s ! VNegCond SgMasc --Sg1|Sg3 Masc|Pl3|Impers
|
_ => v.s ! VNegCond SgMasc --Sg1|Sg3 Masc|Pl3|Impers
|
||||||
}
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
vfQuestion : VFun = \t,ant,p,agr,vp ->
|
||||||
|
case <t,ant,p> of {
|
||||||
|
<_,_,Neg> => vp.s ! VInf ++ vfStatement t ant Pos agr (useV fail_V) ;
|
||||||
|
_ => vfStatement t ant p agr vp
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
vfSubord : VFun = \t,ant,p,agr,vp ->
|
vfSubord : VFun = \t,ant,p,agr,vp ->
|
||||||
@@ -1018,78 +1047,81 @@ oper
|
|||||||
|
|
||||||
infVP : VerbPhrase -> Str = linVP VInf Statement ;
|
infVP : VerbPhrase -> Str = linVP VInf Statement ;
|
||||||
|
|
||||||
waaContr : Agreement => Polarity => Str = \\a,b =>
|
STMarker : Type = ClType => Polarity => Str ;
|
||||||
let stm = if_then_Pol b "w" "m"
|
|
||||||
in stm + subjpron ! a ;
|
|
||||||
|
|
||||||
waaNoContr : Agreement => Polarity => {p1,p2 : Str} = \\a,p =>
|
-- NB. Agreement is used only for negative questions. If we want to change it
|
||||||
case p of {
|
-- in other sentence types, we need to change predVP and mkClause accordingly;
|
||||||
Pos => {p1 = "waa" ; p2 = subjpron ! a} ;
|
-- certain VVs put stuff between STM and subject pronoun. Some VVs render now
|
||||||
Neg => {p1 = "ma" ; p2 = []} } ;
|
-- incorrectly in negative questions.
|
||||||
|
mkStm : Agreement -> STM -> STMarker = \agr,stm ->
|
||||||
waxaNoContr : Agreement => Polarity => {p1,p2 : Str} = \\a,p =>
|
\\cltyp,pol =>
|
||||||
case p of {
|
case <cltyp,pol> of {
|
||||||
Pos => {p1 = "waxa" ; p2 = subjpron ! a} ;
|
<Statement,Pos> => showSTM stm ;
|
||||||
Neg => {p1 = "ma" ; p2 = []} } ; -- TODO: find out how to properly negate waxa clauses!
|
<Statement,Neg> => "ma" ;
|
||||||
|
<Subord,Pos> => [] ;
|
||||||
subjpron : Agreement => Str = table {
|
<Subord,Neg> => "aan" ;
|
||||||
Sg1|Pl1 Excl => "aan" ;
|
<WhQuestion,_> => "ma" ; -- neg. wh-questions are formed with waayaa 'fail to do sth', so they are syntactically positive
|
||||||
Pl1 Incl => "aynu" ;
|
<PolarQuestion,Pos> => "ma" ;
|
||||||
Sg2|Pl2 => "aad" ;
|
<PolarQuestion,Neg> => case agr of { -- Negative question in past tense has only one form, need subject pronoun to know what the subject is.
|
||||||
Sg3 Masc => "uu" ;
|
Sg1 => "miyaanan" ; -- Saeed p. 200
|
||||||
Impers => [] ;
|
Sg2 => "miyaanad" ; -- Saeed p. 200
|
||||||
_ => "ay" } ;
|
Sg3 Masc => "miyaanu" ; -- Saeed p. 200
|
||||||
|
Sg3 Fem => "miyaanay" ; -- ???
|
||||||
|
Pl1 Excl => "miyaanaannu" ; -- ???
|
||||||
|
Pl1 Incl => "miyaanaynu" ; -- ???
|
||||||
|
Pl2 => "miyaanaydin" ; -- ???
|
||||||
|
Pl3 => "miyaanay" ; -- ???
|
||||||
|
Impers => "ma aan" } -- not merged
|
||||||
|
} ;
|
||||||
|
|
||||||
|
modSTM : (pos, neg : Str) -> STMarker -> STMarker = \pos,neg,stm ->
|
||||||
|
\\cltyp,pol =>
|
||||||
|
case pol of {
|
||||||
|
Pos => pos ;
|
||||||
|
_ => neg
|
||||||
|
} ;
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
-- linrefs
|
-- linrefs
|
||||||
|
|
||||||
oper
|
oper
|
||||||
linVP : VForm -> ClType -> VerbPhrase -> Str = \vf,cltyp,vp ->
|
|
||||||
let pred = vp.s ! vf ;
|
|
||||||
vp' = complSlash vp ;
|
|
||||||
stm = case <cltyp,isNeg vf> of {
|
|
||||||
<Subord,True> => {p1 = "aan" ; p2 = []} ;
|
|
||||||
_ => {p1,p2 = []}
|
|
||||||
} ;
|
|
||||||
wo = wordOrderOld (Sg3 Masc) [] stm (vp'.comp ! pagr2agr vp.obj2.a) pred vp' cltyp ;
|
|
||||||
in wo.beforeSTM ++ wo.stm ++ wo.afterSTM ;
|
|
||||||
|
|
||||||
linCN : CNoun -> Str = \cn -> cn.s ! Indef Sg ++ cn.mod ! Indefinite ! Sg ! Abs ;
|
linCN : CNoun -> Str = \cn -> cn.s ! Indef Sg ++ cn.mod ! Indefinite ! Sg ! Abs ;
|
||||||
linAdv : Adverb -> Str = \adv ->
|
linAdv : Adverb -> Str = \adv ->
|
||||||
adv.berri
|
adv.berri
|
||||||
++ adv.sii
|
++ adv.sii
|
||||||
++ (prepTable ! adv.c2).s ! adv.np.a
|
++ (prepTable ! adv.c2).s ! adv.np.a
|
||||||
++ adv.dhex
|
++ adv.dhex
|
||||||
++ adv.np.s
|
++ adv.np.s
|
||||||
++ adv.miscAdv ;
|
++ adv.miscAdv ;
|
||||||
linBaseCl : BaseCl -> Str = \b -> b.beforeSTM ++ b.stm ++ b.afterSTM ;
|
|
||||||
|
|
||||||
|
linVP : VForm -> ClType -> VerbPhrase -> Str = \vf,cltyp,vp ->
|
||||||
|
let pred = vp.s ! vf ;
|
||||||
|
pr = prepCombTable ! vp.obj.a ! vp.c2 ;
|
||||||
|
neg = case <cltyp,isNeg vf> of {
|
||||||
|
<Subord,True> => "aan" ;
|
||||||
|
_ => []
|
||||||
|
} ;
|
||||||
|
in wordOrder cltyp neg pred pr vp ;
|
||||||
|
|
||||||
-- TODO: deprecate eventually
|
-- Light version of the word order complexity in mkClause.
|
||||||
BaseCl : Type = {beforeSTM, stm, afterSTM : Str} ; -- adverbs, subjects, all that comes before sentence type marker. Eventual Subj attaches to the part after STM.
|
wordOrder : ClType -> (neg,pred,prepcomb : Str) -> VerbPhrase -> Str =
|
||||||
|
\cltyp,neg,pred,pr,vp ->
|
||||||
|
vp.berri -- AdV
|
||||||
|
++ case cltyp of {
|
||||||
|
Subord => [] ;
|
||||||
|
_ => vp.obj.s } -- noun object if it's a statement
|
||||||
|
++ neg
|
||||||
|
++ vp.vComp.subjunc -- "waa in" construction
|
||||||
|
++ case cltyp of {
|
||||||
|
Subord => vp.obj.s ; -- noun object if it's subordinate clause
|
||||||
|
_ => [] }
|
||||||
|
++ vp.aComp ! pagr2agr vp.obj.a -- AP complement agreeing with object
|
||||||
|
++ pr -- object if it's a pronoun
|
||||||
|
++ vp.sii -- restricted set of particles
|
||||||
|
++ vp.dhex -- restricted set of nouns/adverbials
|
||||||
|
++ vp.obj2 -- "second object"
|
||||||
|
++ vp.vComp.inf -- VV complement, if it's infinitive
|
||||||
|
++ pred -- the verb inflected
|
||||||
|
++ vp.vComp.subcl ! Sg3 Masc -- VV complement, if it's subordinate clause
|
||||||
|
++ vp.miscAdv ; ---- NB. Only used if there are several adverbs, or for "waa in" construction.
|
||||||
|
|
||||||
wordOrderOld : Agreement -> (sn : Str) -> (stm,obj : {p1,p2 : Str}) -> Str -> VerbPhrase -> ClType -> BaseCl =
|
|
||||||
\agr,subjnoun,stm,obj,pred,vp,cltyp -> {
|
|
||||||
beforeSTM = vp.berri -- AdV
|
|
||||||
++ subjnoun -- subject if it's a noun
|
|
||||||
++ case cltyp of {
|
|
||||||
Subord => [] ;
|
|
||||||
_ => obj.p1 } ; -- noun object if it's a statement
|
|
||||||
|
|
||||||
stm = stm.p1 ; -- sentence type marker; empty if subordinate and positive
|
|
||||||
|
|
||||||
afterSTM = vp.vComp.subjunc -- "waa in" construction
|
|
||||||
++ stm.p2 -- possible subj. pronoun
|
|
||||||
++ case cltyp of {
|
|
||||||
Subord => obj.p1 ; -- noun object if it's subordinate clause
|
|
||||||
_ => [] }
|
|
||||||
++ obj.p2 -- object if it's a pronoun
|
|
||||||
++ vp.sii -- restricted set of particles
|
|
||||||
++ vp.dhex -- restricted set of nouns/adverbials
|
|
||||||
++ vp.secObj -- "second object"
|
|
||||||
++ vp.vComp.inf -- VV complement, if it's infinitive
|
|
||||||
++ pred -- the verb inflected
|
|
||||||
++ vp.vComp.subcl ! agr -- VV complement, if it's subordinate clause
|
|
||||||
++ vp.miscAdv } ; ---- NB. Only used if there are several adverbs, or for "waa in" construction.
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,33 +28,35 @@ lin
|
|||||||
-}
|
-}
|
||||||
-- : Temp -> Pol -> ClSlash -> SSlash ; -- (that) she had not seen
|
-- : Temp -> Pol -> ClSlash -> SSlash ; -- (that) she had not seen
|
||||||
UseSlash t p cls = {
|
UseSlash t p cls = {
|
||||||
s = \\isSubord => let cl = cl2sentence isSubord cls in
|
s = \\isSubord =>
|
||||||
t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p
|
let cls' : ClSlash = cls ** {
|
||||||
|
stm = modSTM "waxa" "waxa aan" cls.stm -- Saeed p. 195
|
||||||
|
} ;
|
||||||
|
cl : Clause = cl2sentence isSubord cls' in
|
||||||
|
t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
--2 Imperatives
|
--2 Imperatives
|
||||||
-- : VP -> Imp ;
|
-- : VP -> Imp ;
|
||||||
--ImpVP vp = { s = linVP vp } ;
|
ImpVP vp = {s = \\num,pol => linVP (VImp num pol) Statement vp} ;
|
||||||
|
|
||||||
--2 Embedded sentences
|
--2 Embedded sentences
|
||||||
|
|
||||||
{-
|
|
||||||
-- : S -> SC ;
|
-- : S -> SC ;
|
||||||
EmbedS s = { } ;
|
EmbedS s = {s = s.s ! True} ; -- choose subordinate
|
||||||
|
|
||||||
-- : QS -> SC ;
|
-- : QS -> SC ;
|
||||||
EmbedQS qs = { } ;
|
-- EmbedQS qs = { } ;
|
||||||
|
|
||||||
-- : VP -> SC ;
|
-- : VP -> SC ;
|
||||||
EmbedVP vp = { s = linVP vp } ;
|
EmbedVP vp = {s = infVP vp} ;
|
||||||
|
|
||||||
--2 Sentences
|
--2 Sentences
|
||||||
|
|
||||||
-}
|
|
||||||
-- : Temp -> Pol -> Cl -> S ;
|
-- : Temp -> Pol -> Cl -> S ;
|
||||||
UseCl t p cls = {
|
UseCl t p cls = {
|
||||||
s = \\isSubord => let cl = cl2sentence isSubord cls in
|
s = \\isSubord => let cl = cl2sentence isSubord cls in
|
||||||
t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p
|
t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- : Temp -> Pol -> QCl -> QS ;
|
-- : Temp -> Pol -> QCl -> QS ;
|
||||||
|
|||||||
@@ -15,14 +15,15 @@ lin very_AdA = mkAdA "" ;
|
|||||||
lin as_CAdv = { s = "" ; p = [] } ;
|
lin as_CAdv = { s = "" ; p = [] } ;
|
||||||
lin less_CAdv = { s = "" ; p = [] } ;
|
lin less_CAdv = { s = "" ; p = [] } ;
|
||||||
lin more_CAdv = { s = "" ; p = [] } ;
|
lin more_CAdv = { s = "" ; p = [] } ;
|
||||||
|
-}
|
||||||
|
lin how_IAdv = mkIAdv u "sidee" False ;
|
||||||
|
|
||||||
lin how_IAdv = ss "" ;
|
-- lin how8much_IAdv = ss "" ;
|
||||||
lin how8much_IAdv = ss "" ;
|
-- lin when_IAdv = ss "" ;
|
||||||
lin when_IAdv = ss "" ;
|
lin where_IAdv = mkIAdv noPrep "xaggee" False ;
|
||||||
lin where_IAdv = ss "" ;
|
lin why_IAdv = let mx = mkIAdv u "maxaa" True in mx ** {s = "waayo"} ;
|
||||||
lin why_IAdv = ss "" ;
|
|
||||||
|
|
||||||
lin always_AdV = ss "" ;
|
{-lin always_AdV = ss "" ;
|
||||||
|
|
||||||
lin everywhere_Adv = ss "" ;
|
lin everywhere_Adv = ss "" ;
|
||||||
lin here7from_Adv = ss "" ;
|
lin here7from_Adv = ss "" ;
|
||||||
@@ -39,10 +40,10 @@ lin there_Adv = ss "" ;
|
|||||||
-- Conj
|
-- Conj
|
||||||
|
|
||||||
lin and_Conj = {s2 = table {Definite => "ee" ; Indefinite => "oo"} ; s1 = [] ; n = Pl} ;
|
lin and_Conj = {s2 = table {Definite => "ee" ; Indefinite => "oo"} ; s1 = [] ; n = Pl} ;
|
||||||
lin or_Conj = {s2 = \\_ => "ama" ; s1 = [] ; n = Sg} ; -- mise with interrogatives
|
lin or_Conj = {s2 = \\_ => "ama" ; s1 = [] ; n = Sg} ; -- mise with interrogatives; Saeed p. 122-123: "Note that the clause introduced by misé has the form of a declarative not an interrogative though the whole sentence is interpreted as a question."
|
||||||
-- lin if_then_Conj = mkConj
|
-- lin if_then_Conj = mkConj
|
||||||
-- lin both7and_DConj = mkConj "" "" pl ;
|
-- lin both7and_DConj = mkConj "" "" pl ;
|
||||||
-- lin either7or_DConj = mkConj "" "" pl ;
|
lin either7or_DConj = {s2 = \\_ => "ama" ; s1 = "ama" ; n = Sg} ;
|
||||||
--
|
--
|
||||||
-- lin but_PConj = ss "" ;
|
-- lin but_PConj = ss "" ;
|
||||||
-- lin otherwise_PConj = ss "" ;
|
-- lin otherwise_PConj = ss "" ;
|
||||||
@@ -67,7 +68,8 @@ lin much_Det = R.indefDet "" sg ;
|
|||||||
-}
|
-}
|
||||||
lin somePl_Det = {
|
lin somePl_Det = {
|
||||||
sp = \\_,_ => "qaar" ;
|
sp = \\_,_ => "qaar" ;
|
||||||
isPoss, isNum = False ;
|
isPoss = False ;
|
||||||
|
numtype = NoNum ;
|
||||||
st = Definite ; -- NB. Indefinite means actually only IndefArt.
|
st = Definite ; -- NB. Indefinite means actually only IndefArt.
|
||||||
n = Pl ;
|
n = Pl ;
|
||||||
s = \\x,_ => BIND ++ defStems ! x ++ BIND ++ "a qaarkood" ;
|
s = \\x,_ => BIND ++ defStems ! x ++ BIND ++ "a qaarkood" ;
|
||||||
@@ -127,7 +129,7 @@ lin on_Prep = mkPrep ku ;
|
|||||||
-- lin possess_Prep = mkPrep ;
|
-- lin possess_Prep = mkPrep ;
|
||||||
-- lin through_Prep = mkPrep ;
|
-- lin through_Prep = mkPrep ;
|
||||||
-- lin to_Prep = mkPrep ;
|
-- lin to_Prep = mkPrep ;
|
||||||
lin under_Prep =
|
lin under_Prep =
|
||||||
let hoos : CatSom.Prep = possPrep (nUl "hoos")
|
let hoos : CatSom.Prep = possPrep (nUl "hoos")
|
||||||
in hoos ** {c2 = Ku} ;
|
in hoos ** {c2 = Ku} ;
|
||||||
lin with_Prep = mkPrep la ;
|
lin with_Prep = mkPrep la ;
|
||||||
@@ -147,13 +149,11 @@ lin with_Prep = mkPrep la ;
|
|||||||
we_Pron = pronTable ! Pl1 Incl ;
|
we_Pron = pronTable ! Pl1 Incl ;
|
||||||
youPl_Pron = pronTable ! Pl2 ;
|
youPl_Pron = pronTable ! Pl2 ;
|
||||||
they_Pron = pronTable ! Pl3 ;
|
they_Pron = pronTable ! Pl3 ;
|
||||||
{-
|
|
||||||
lin whatPl_IP = ;
|
|
||||||
lin whatSg_IP = ;
|
|
||||||
lin whoPl_IP = ;
|
|
||||||
lin whoSg_IP = ;
|
|
||||||
|
|
||||||
-}
|
--lin whatPl_IP = ;
|
||||||
|
lin whatSg_IP = mkIP "maxay" "maxaa" True ;
|
||||||
|
--lin whoPl_IP = ;
|
||||||
|
lin whoSg_IP = mkIP "ayo" "yaa" True ;
|
||||||
|
|
||||||
-------
|
-------
|
||||||
-- Subj
|
-- Subj
|
||||||
@@ -188,4 +188,20 @@ lin want_VV = mkVV (mkV "rabid" "rab" "rab") subjunctive ;
|
|||||||
{-
|
{-
|
||||||
lin please_Voc = ss "" ;
|
lin please_Voc = ss "" ;
|
||||||
-}
|
-}
|
||||||
|
oper
|
||||||
|
mkIAdv : Preposition -> Str -> Bool -> ResSom.IAdv = \pr ->
|
||||||
|
let pr' : Prep = ParadigmsSom.mkPrep pr ;
|
||||||
|
in prepIP pr' ;
|
||||||
|
|
||||||
|
mkIP : (maxay, maxaa : Str) -> Bool -> IP = \maxay,maxaa,b -> emptyNP ** {
|
||||||
|
s = table {
|
||||||
|
Nom => maxaa ; -- together with STM
|
||||||
|
Abs => maxay } ; -- alone, no STM (used in UttIP and IComp)
|
||||||
|
contractSTM = b ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
prepIP : Prep -> Str -> Bool -> ResSom.IAdv = \pr,str,b ->
|
||||||
|
let adv : Adverb = prepNP (mkPrep pr str [] []) emptyNP ;
|
||||||
|
in adv ** {contractSTM = b ; s = linAdv adv} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,14 +18,14 @@ lin
|
|||||||
ComplVV vv vp = let vc = vp.vComp in case vv.vvtype of {
|
ComplVV vv vp = let vc = vp.vComp in case vv.vvtype of {
|
||||||
Waa_In => vp ** {
|
Waa_In => vp ** {
|
||||||
vComp = vc ** {subjunc = vv.s ! VInf} ; -- it's always the word "in", and it will be placed before subject pronoun. it's placed in vv.s!VInf so that the VV would contribute with some string. /IL
|
vComp = vc ** {subjunc = vv.s ! VInf} ; -- it's always the word "in", and it will be placed before subject pronoun. it's placed in vv.s!VInf so that the VV would contribute with some string. /IL
|
||||||
obj2 = vp.obj2 ** {s = []} ; -- word order hack to avoid more parameters:
|
obj = vp.obj ** {s = []} ; -- word order hack to avoid more parameters:
|
||||||
miscAdv = vp.miscAdv ++ vp.obj2.s -- dump the object to miscAdv
|
miscAdv = vp.miscAdv ++ vp.obj.s -- dump the object to miscAdv
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
Subjunctive => useV vv ** {
|
Subjunctive => useV vv ** {
|
||||||
stm = Waxa ;
|
stm = Waxa ;
|
||||||
vComp = vc ** { -- The whole previous VP becomes the subordinate clause
|
vComp = vc ** { -- The whole previous VP becomes the subordinate clause
|
||||||
subcl = \\agr =>
|
subcl = \\agr =>
|
||||||
let subj = pronTable ! agr ;
|
let subj = pronTable ! agr ;
|
||||||
cls = predVPslash subj vp ;
|
cls = predVPslash subj vp ;
|
||||||
scl = cl2sentence True cls ;
|
scl = cl2sentence True cls ;
|
||||||
@@ -39,14 +39,14 @@ lin
|
|||||||
inf = vc.inf ++ vp.s ! VInf
|
inf = vc.inf ++ vp.s ! VInf
|
||||||
} ;
|
} ;
|
||||||
stm = Waa NoPred ;
|
stm = Waa NoPred ;
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- : VS -> S -> VP ;
|
-- : VS -> S -> VP ;
|
||||||
ComplVS vs s =
|
ComplVS vs s =
|
||||||
let vps = useV vs ;
|
let vps = useV vs ;
|
||||||
subord = SubjS {s="in"} s ;
|
subord = SubjS {s="in"} s ;
|
||||||
in vps ** {obj2 = {s = subord.berri ; a = P3_Prep}} ;
|
in vps ** {obj = {s = subord.berri ; a = P3_Prep}} ;
|
||||||
|
|
||||||
{-
|
{-
|
||||||
-- : VQ -> QS -> VP ;
|
-- : VQ -> QS -> VP ;
|
||||||
@@ -66,21 +66,26 @@ lin
|
|||||||
-- : V3 -> NP -> VPSlash ; -- give (it) to her
|
-- : V3 -> NP -> VPSlash ; -- give (it) to her
|
||||||
Slash2V3,
|
Slash2V3,
|
||||||
Slash3V3 = \v3 -> insertComp (useVc3 v3) ;
|
Slash3V3 = \v3 -> insertComp (useVc3 v3) ;
|
||||||
|
|
||||||
|
-- : V2S -> S -> VPSlash ; -- answer (to him) that it is good
|
||||||
|
SlashV2S v2s s =
|
||||||
|
let vps = useVc v2s ;
|
||||||
|
subord = SubjS {s="in"} s ;
|
||||||
|
in vps ** {obj = {s = subord.berri ; a = P3_Prep}} ;
|
||||||
|
|
||||||
{-
|
{-
|
||||||
-- : V2V -> VP -> VPSlash ; -- beg (her) to go
|
-- : V2V -> VP -> VPSlash ; -- beg (her) to go
|
||||||
SlashV2V v2v vp = ;
|
SlashV2V v2v vp = ;
|
||||||
|
|
||||||
-- : V2S -> S -> VPSlash ; -- answer (to him) that it is good
|
|
||||||
SlashV2S v2s s = ;
|
|
||||||
|
|
||||||
-- : V2Q -> QS -> VPSlash ; -- ask (him) who came
|
-- : V2Q -> QS -> VPSlash ; -- ask (him) who came
|
||||||
SlashV2Q v2q qs = ;
|
SlashV2Q v2q qs = ;
|
||||||
|
|
||||||
-- : V2A -> AP -> VPSlash ; -- paint (it) red
|
|
||||||
SlashV2A v2a ap = slashDObj v2a **
|
|
||||||
{ comp = (CompAP ap).s } ;
|
|
||||||
|
|
||||||
-}
|
-}
|
||||||
|
-- : V2A -> AP -> VPSlash ; -- paint (it) red
|
||||||
|
-- TODO: is "red" plural in "paint them red"?
|
||||||
|
SlashV2A v2a ap = useVc v2a ** {
|
||||||
|
aComp = \\_ => (CompAP ap).aComp ! Sg3 Masc
|
||||||
|
} ;
|
||||||
|
|
||||||
-- : VPSlash -> NP -> VP
|
-- : VPSlash -> NP -> VP
|
||||||
ComplSlash = insertComp ;
|
ComplSlash = insertComp ;
|
||||||
|
|
||||||
@@ -120,10 +125,9 @@ 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)
|
||||||
-- NB. We need possibly a MissingArg kind of solution here too
|
VPSlashPrep vp prep =
|
||||||
-- VPSlashPrep vp prep = vp **
|
let adv = prepNP prep emptyNP
|
||||||
-- { c2 = case vp.c2 of { NoPrep => prep.prep ;
|
in insertAdv vp adv ;
|
||||||
-- x => x }} ;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -132,32 +136,36 @@ lin
|
|||||||
|
|
||||||
-- Adjectival phrases, noun phrases, and adverbs can be used.
|
-- Adjectival phrases, noun phrases, and adverbs can be used.
|
||||||
|
|
||||||
-- the house is big
|
|
||||||
-- the houses are big
|
|
||||||
-- I am [a house that sleeps here]
|
|
||||||
-- we are [houses that sleep here]
|
|
||||||
|
|
||||||
-- : AP -> Comp ;
|
-- : AP -> Comp ;
|
||||||
CompAP ap = {
|
CompAP ap = {
|
||||||
comp = \\a => <[], ap.s ! AF (getNum a) Abs> ;
|
aComp = \\a => ap.s ! AF (getNum a) Abs ;
|
||||||
|
nComp = [] ;
|
||||||
|
compar = ap.compar ;
|
||||||
stm = Waa Copula ;
|
stm = Waa Copula ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- : CN -> Comp ;
|
-- : CN -> Comp ;
|
||||||
CompCN cn = {
|
CompCN cn = {
|
||||||
comp = \\a => <[], cn2str Sg Abs cn> ;
|
-- I am [a house that sleeps here] vs. we are [houses that sleep here]
|
||||||
|
aComp = \\a => cn2str (getNum a) Abs cn ;
|
||||||
|
nComp = [] ;
|
||||||
|
compar = [] ;
|
||||||
stm = Waa NoCopula ;
|
stm = Waa NoCopula ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- NP -> Comp ;
|
-- NP -> Comp ;
|
||||||
CompNP np = {
|
CompNP np = {
|
||||||
comp = \\a => <[], np.s ! Abs> ;
|
aComp = \\a => [] ;
|
||||||
|
nComp = np.s ! Abs ;
|
||||||
|
compar = [] ;
|
||||||
stm = Waa NoCopula ;
|
stm = Waa NoCopula ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- : Adv -> Comp ;
|
-- : Adv -> Comp ;
|
||||||
CompAdv adv = {
|
CompAdv adv = {
|
||||||
comp = \\a => <[], linAdv adv> ;
|
aComp = \\a => linAdv adv ; -- TODO check placement
|
||||||
|
nComp = [] ;
|
||||||
|
compar = [] ;
|
||||||
stm = Waa Copula ;
|
stm = Waa Copula ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
------------------
|
||||||
|
-- Conjunctions --
|
||||||
|
------------------
|
||||||
|
|
||||||
-- LangEng: the big black bird
|
-- LangEng: the big black bird
|
||||||
LangSom: shimbir BIND ta madow ee weyn
|
LangSom: shimbir BIND ta madow ee weyn
|
||||||
Lang: PhrUtt NoPConj (UttNP (DetCN (DetQuant DefArt NumSg) (AdjCN (PositA big_A) (AdjCN (PositA black_A) (UseN bird_N))))) NoVoc
|
Lang: PhrUtt NoPConj (UttNP (DetCN (DetQuant DefArt NumSg) (AdjCN (PositA big_A) (AdjCN (PositA black_A) (UseN bird_N))))) NoVoc
|
||||||
@@ -5,3 +9,24 @@ Lang: PhrUtt NoPConj (UttNP (DetCN (DetQuant DefArt NumSg) (AdjCN (PositA big_A)
|
|||||||
-- LangEng: a big black bird
|
-- LangEng: a big black bird
|
||||||
LangSom: shimbir madow oo weyn
|
LangSom: shimbir madow oo weyn
|
||||||
Lang: PhrUtt NoPConj (UttNP (DetCN (DetQuant IndefArt NumSg) (AdjCN (PositA big_A) (AdjCN (PositA black_A) (UseN bird_N))))) NoVoc
|
Lang: PhrUtt NoPConj (UttNP (DetCN (DetQuant IndefArt NumSg) (AdjCN (PositA big_A) (AdjCN (PositA black_A) (UseN bird_N))))) NoVoc
|
||||||
|
|
||||||
|
-----------------
|
||||||
|
-- Comparative --
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
-- Examples from Saeed p. 107
|
||||||
|
-- LangEng: that cat is bigger
|
||||||
|
LangSom: bisad BIND daasi waa ka weyn tahay
|
||||||
|
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (DetCN (DetQuant that_Quant NumSg) (UseN cat_N)) (UseComp (CompAP (UseComparA big_A)))))) NoVoc
|
||||||
|
|
||||||
|
-- LangEng: that cat is bigger than this cat
|
||||||
|
LangSom: bisad BIND daasi bisad BIND dan waa ka weyn tahay
|
||||||
|
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (DetCN (DetQuant that_Quant NumSg) (UseN cat_N)) (UseComp (CompAP (ComparA big_A (DetCN (DetQuant this_Quant NumSg) (UseN cat_N)))))))) NoVoc
|
||||||
|
|
||||||
|
-- LangEng: that cat is biggest
|
||||||
|
LangSom: bisad BIND daasi waa ugu weyn tahay
|
||||||
|
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (DetCN (DetQuant that_Quant NumSg) (UseN cat_N)) (UseComp (CompAP (AdjOrd (OrdSuperl big_A))))))) NoVoc
|
||||||
|
|
||||||
|
-- LangEng: cat is the biggest animal that I saw
|
||||||
|
LangSom: bisadi waa xayawaan BIND ka ugu weyn aan arkay
|
||||||
|
Lang: UseCl (TTAnt TPres ASimul) PPos (PredVP (MassNP (UseN cat_N)) (UseComp (CompNP (DetCN (DetQuantOrd DefArt NumSg (OrdSuperl big_A)) (RelCN (UseN animal_N) (UseRCl (TTAnt TPast ASimul) PPos (RelSlash IdRP (SlashVP (UsePron i_Pron) (SlashV2a see_V2)))))))))
|
||||||
|
|||||||
@@ -79,9 +79,3 @@ Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (RelNP (UseP
|
|||||||
--LangEng: he , that sees the men , is this
|
--LangEng: he , that sees the men , is this
|
||||||
LangSom: isagu oo niman BIND ka arkaa waa kan
|
LangSom: isagu oo niman BIND ka arkaa waa kan
|
||||||
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (RelNP (UsePron he_Pron) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant DefArt NumPl) (UseN man_N)))))) (UseComp (CompNP (DetNP (DetQuant this_Quant NumSg))))))) NoVoc
|
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (RelNP (UsePron he_Pron) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant DefArt NumPl) (UseN man_N)))))) (UseComp (CompNP (DetNP (DetQuant this_Quant NumSg))))))) NoVoc
|
||||||
|
|
||||||
-- Question clauses
|
|
||||||
|
|
||||||
-- LangEng: which cat teaches him
|
|
||||||
LangSom: bisad BIND dee baa ku bartaa
|
|
||||||
Lang: PhrUtt NoPConj (UttQS (UseQCl (TTAnt TPres ASimul) PPos (QuestVP (IdetCN (IdetQuant which_IQuant NumSg) (UseN cat_N)) (ComplSlash (SlashV2a teach_V2) (UsePron he_Pron))))) NoVoc
|
|
||||||
|
|||||||
62
src/somali/unittest/inflection.gftest
Normal file
62
src/somali/unittest/inflection.gftest
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
-- Examples from Saeed p. 119
|
||||||
|
|
||||||
|
--------------
|
||||||
|
-- Positive --
|
||||||
|
--------------
|
||||||
|
|
||||||
|
-- Declarative
|
||||||
|
-- LangEng: he/she/it waits (for him/her/it)
|
||||||
|
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron it_Pron) (ComplSlash (SlashV2a wait_V2) (UsePron it_Pron))))) NoVoc
|
||||||
|
LangSom: waa sugaa
|
||||||
|
|
||||||
|
-- Interrogative
|
||||||
|
-- LangEng: does he/she/it wait (for him/her/it)
|
||||||
|
Lang: PhrUtt NoPConj (UttQS (UseQCl (TTAnt TPres ASimul) PPos (QuestCl (PredVP (UsePron it_Pron) (ComplSlash (SlashV2a wait_V2) (UsePron it_Pron)))))) NoVoc
|
||||||
|
LangSom: ma sugaa
|
||||||
|
|
||||||
|
-- Imperative
|
||||||
|
-- LangEng: wait for it (sg and pl)
|
||||||
|
Lang: PhrUtt NoPConj (UttImpSg PPos (ImpVP (ComplSlash (SlashV2a wait_V2) (UsePron it_Pron)))) NoVoc
|
||||||
|
LangSom: sug
|
||||||
|
|
||||||
|
Lang: PhrUtt NoPConj (UttImpPl PPos (ImpVP (ComplSlash (SlashV2a wait_V2) (UsePron it_Pron)))) NoVoc
|
||||||
|
LangSom: suga
|
||||||
|
|
||||||
|
-- Conditional
|
||||||
|
-- LangEng: he/she/it would wait (for him/her/it)
|
||||||
|
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TCond ASimul) PPos (PredVP (UsePron it_Pron) (ComplSlash (SlashV2a wait_V2) (UsePron it_Pron))))) NoVoc
|
||||||
|
LangSom: waa sugi lahaa
|
||||||
|
|
||||||
|
-- Optative and potential not implemented (yet?)
|
||||||
|
|
||||||
|
|
||||||
|
--------------
|
||||||
|
-- Negative --
|
||||||
|
--------------
|
||||||
|
|
||||||
|
-- Declarative
|
||||||
|
-- LangEng: he/she/it doesn't wait (for him/her/it)
|
||||||
|
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PNeg (PredVP (UsePron it_Pron) (ComplSlash (SlashV2a wait_V2) (UsePron it_Pron))))) NoVoc
|
||||||
|
LangSom: ma sugo
|
||||||
|
|
||||||
|
-- Interrogative 1: TODO
|
||||||
|
-- LangEng: does he/she/it wait (for him/her/it)
|
||||||
|
Lang: PhrUtt NoPConj (UttQS (UseQCl (TTAnt TPres ASimul) PNeg (QuestCl (PredVP (UsePron it_Pron) (ComplSlash (SlashV2a wait_V2) (UsePron it_Pron)))))) NoVoc
|
||||||
|
LangSom: ma aan sugo
|
||||||
|
|
||||||
|
-- LangEng: why doesn't it wait for it
|
||||||
|
Lang: PhrUtt NoPConj (UttQS (UseQCl (TTAnt TPres ASimul) PNeg (QuestIAdv why_IAdv (PredVP (UsePron it_Pron) (ComplSlash (SlashV2a wait_V2) (UsePron it_Pron)))))) NoVoc
|
||||||
|
LangSom: maxaa u sugi waayaa
|
||||||
|
|
||||||
|
-- Imperative
|
||||||
|
-- LangEng: don't wait for it (sg and pl)
|
||||||
|
Lang: PhrUtt NoPConj (UttImpSg PNeg (ImpVP (ComplSlash (SlashV2a wait_V2) (UsePron it_Pron)))) NoVoc
|
||||||
|
LangSom: ha sugin
|
||||||
|
|
||||||
|
Lang: PhrUtt NoPConj (UttImpPl PNeg (ImpVP (ComplSlash (SlashV2a wait_V2) (UsePron it_Pron)))) NoVoc
|
||||||
|
LangSom: ha sugina
|
||||||
|
|
||||||
|
-- Conditional
|
||||||
|
-- LangEng: he/she/it wouldn't wait (for him/her/it)
|
||||||
|
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TCond ASimul) PNeg (PredVP (UsePron it_Pron) (ComplSlash (SlashV2a wait_V2) (UsePron it_Pron))))) NoVoc
|
||||||
|
LangSom: ma sugeen
|
||||||
@@ -1,8 +1,11 @@
|
|||||||
|
-------------------------------
|
||||||
|
-- Numerals with determiners --
|
||||||
|
-------------------------------
|
||||||
|
|
||||||
-- LangEng: the two cats
|
-- LangEng: the two cats
|
||||||
LangSom: laba BIND da bisadood
|
LangSom: laba BIND da bisadood
|
||||||
Lang: PhrUtt NoPConj (UttNP (DetCN (DetQuant DefArt (NumCard (NumNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n2)))))))) (UseN cat_N))) NoVoc
|
Lang: PhrUtt NoPConj (UttNP (DetCN (DetQuant DefArt (NumCard (NumNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n2)))))))) (UseN cat_N))) NoVoc
|
||||||
|
|
||||||
|
|
||||||
-- LangEng: those three men
|
-- LangEng: those three men
|
||||||
LangSom: saddex BIND daas nin
|
LangSom: saddex BIND daas nin
|
||||||
Lang: PhrUtt NoPConj (UttNP (DetCN (DetQuant that_Quant (NumCard (NumNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n3)))))))) (UseN man_N))) NoVoc
|
Lang: PhrUtt NoPConj (UttNP (DetCN (DetQuant that_Quant (NumCard (NumNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n3)))))))) (UseN man_N))) NoVoc
|
||||||
@@ -25,4 +28,28 @@ Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron he_
|
|||||||
|
|
||||||
-- LangEng: he is my first man
|
-- LangEng: he is my first man
|
||||||
LangSom: waa nin BIND kayg BIND a kowaad
|
LangSom: waa nin BIND kayg BIND a kowaad
|
||||||
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron he_Pron) (UseComp (CompNP (DetCN (DetQuantOrd (PossPron i_Pron) NumSg (OrdNumeral (num (pot2as3 (pot1as2 (pot0as1 pot01)))))) (UseN man_N))))))) NoVoc
|
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron he_Pron) (UseComp (CompNP (DetCN (DetQuantOrd (PossPron i_Pron) NumSg (OrdNumeral (num (pot2as3 (pot1as2 (pot0as1 pot01)))))) (UseN man_N))))))) NoVoc
|
||||||
|
|
||||||
|
--------------------------------------
|
||||||
|
-- Numerals with multiple modifiers --
|
||||||
|
--------------------------------------
|
||||||
|
|
||||||
|
-- LangEng: two cats
|
||||||
|
LangSom: laba bisadood
|
||||||
|
Lang: PhrUtt NoPConj (UttNP (DetCN (DetQuant IndefArt (NumCard (NumNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n2)))))))) (UseN cat_N))) NoVoc
|
||||||
|
|
||||||
|
-- LangEng: two small cats
|
||||||
|
LangSom: laba bisadood oo yar
|
||||||
|
Lang: PhrUtt NoPConj (UttNP (DetCN (DetQuant IndefArt (NumCard (NumNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n2)))))))) (AdjCN (PositA small_A) (UseN cat_N)))) NoVoc
|
||||||
|
|
||||||
|
-- LangEng: two small cats that have meat
|
||||||
|
LangSom: laba bisadood oo yar oo hilib leh
|
||||||
|
Lang: PhrUtt NoPConj (UttNP (DetCN (DetQuant IndefArt (NumCard (NumNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n2)))))))) (RelCN (AdjCN (PositA small_A) (UseN cat_N)) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (ComplSlash (SlashV2a have_V2) (MassNP (UseN meat_N)))))))) NoVoc
|
||||||
|
|
||||||
|
-- LangEng: two thousand cats
|
||||||
|
LangSom: laba kun oo bisadood
|
||||||
|
Lang: PhrUtt NoPConj (UttNP (DetCN (DetQuant IndefArt (NumCard (NumNumeral (num (pot3 (pot1as2 (pot0as1 (pot0 n2)))))))) (UseN cat_N))) NoVoc
|
||||||
|
|
||||||
|
-- LangEng: two thousand small cats
|
||||||
|
LangSom: laba kun oo bisadood oo yar
|
||||||
|
Lang: PhrUtt NoPConj (UttNP (DetCN (DetQuant IndefArt (NumCard (NumNumeral (num (pot3 (pot1as2 (pot0as1 (pot0 n2)))))))) (AdjCN (PositA small_A) (UseN cat_N)))) NoVoc
|
||||||
|
|||||||
70
src/somali/unittest/qcl.gftest
Normal file
70
src/somali/unittest/qcl.gftest
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
|
||||||
|
-- Question clauses
|
||||||
|
|
||||||
|
-- Polar questions
|
||||||
|
-- LangEng: do you teach the cat
|
||||||
|
Lang: PhrUtt NoPConj (UttQS (UseQCl (TTAnt TPres ASimul) PPos (QuestCl (PredVP (UsePron youSg_Pron) (ComplSlash (SlashV2a teach_V2) (DetCN (DetQuant DefArt NumSg) (UseN cat_N))))))) NoVoc
|
||||||
|
LangSom: ma ku bartaa bisad BIND da
|
||||||
|
|
||||||
|
-- LangEng: don't you teach the cat
|
||||||
|
Lang: PhrUtt NoPConj (UttQS (UseQCl (TTAnt TPres ASimul) PNeg (QuestCl (PredVP (UsePron youSg_Pron) (ComplSlash (SlashV2a teach_V2) (DetCN (DetQuant DefArt NumSg) (UseN cat_N))))))) NoVoc
|
||||||
|
LangSom: miyaanad ku barto bisad BIND da
|
||||||
|
|
||||||
|
-- Wh-questions
|
||||||
|
-- LangEng: who wants to go
|
||||||
|
-- subject pronoun not included, because who is a subject. STM merged to pron.
|
||||||
|
LangSom: yaa rabaa in uu tago
|
||||||
|
Lang: PhrUtt NoPConj (UttQS (UseQCl (TTAnt TPres ASimul) PPos (QuestVP whoSg_IP (ComplVV want_VV (UseV go_V))))) NoVoc
|
||||||
|
|
||||||
|
-- to whom did mother give the meat
|
||||||
|
-- subject pronoun 'ay' included, because whom is an object. STM merged.
|
||||||
|
LangSom: yaa ay siisey hooyo hilib BIND ka
|
||||||
|
Lang: PhrUtt NoPConj (UttQS (UseQCl (TTAnt TPast ASimul) PPos (QuestSlash whoSg_IP (SlashVP (MassNP (UseN2 mother_N2)) (Slash3V3 give_V3 (DetCN (DetQuant DefArt NumSg) (UseN meat_N))))))) NoVoc
|
||||||
|
|
||||||
|
-- LangEng: which cat teaches him
|
||||||
|
-- subject pronoun not included, STM not merged.
|
||||||
|
LangSom: bisad BIND dee baa ku bartaa
|
||||||
|
Lang: PhrUtt NoPConj (UttQS (UseQCl (TTAnt TPres ASimul) PPos (QuestVP (IdetCN (IdetQuant which_IQuant NumSg) (UseN cat_N)) (ComplSlash (SlashV2a teach_V2) (UsePron he_Pron))))) NoVoc
|
||||||
|
|
||||||
|
-- LangEng: which woman did you see
|
||||||
|
-- subject pronoun included, STM not merged.
|
||||||
|
LangSom: naag BIND tee baa aad aragtay
|
||||||
|
Lang: PhrUtt NoPConj (UttQS (UseQCl (TTAnt TPast ASimul) PPos (QuestSlash (IdetCN (IdetQuant which_IQuant NumSg) (UseN woman_N)) (SlashVP (UsePron youSg_Pron) (SlashV2a see_V2))))) NoVoc
|
||||||
|
|
||||||
|
-- LangEng: where did you go
|
||||||
|
-- subject pronoun included, because IAdv xaggee 'where' is fronted and aad 'you' is subject. STM not merged.
|
||||||
|
LangSom: xaggee baa aad tagtay
|
||||||
|
Lang: PhrUtt NoPConj (UttQS (UseQCl (TTAnt TPast ASimul) PPos (QuestIAdv where_IAdv (PredVP (UsePron youSg_Pron) (UseV go_V))))) NoVoc
|
||||||
|
|
||||||
|
-- LangEng: why did you go
|
||||||
|
-- subject pronoun included, STM merged.
|
||||||
|
LangSom: maxaa aad u tagtay
|
||||||
|
Lang: PhrUtt NoPConj (UttQS (UseQCl (TTAnt TPast ASimul) PPos (QuestIAdv why_IAdv (PredVP (UsePron youSg_Pron) (UseV go_V))))) NoVoc
|
||||||
|
|
||||||
|
-- Negative wh-question, Saeed p. 203
|
||||||
|
-- LangEng: why didn't you go
|
||||||
|
LangSom: maxaa aad u tagi weydey
|
||||||
|
Lang: PhrUtt NoPConj (UttQS (UseQCl (TTAnt TPast ASimul) PNeg (QuestIAdv why_IAdv (PredVP (UsePron youSg_Pron) (UseV go_V))))) NoVoc
|
||||||
|
|
||||||
|
-- IComp
|
||||||
|
-- LangEng: who is the man
|
||||||
|
-- Saeed p. 212 Ninkii ay raaceen waa ayo? man-the they accompanied DM who
|
||||||
|
-- 'The man they travelled with is who?'
|
||||||
|
LangSom: nin BIND ku waa ayo
|
||||||
|
Lang: PhrUtt NoPConj (UttQS (UseQCl (TTAnt TPres ASimul) PPos (QuestIComp (CompIP whoSg_IP) (DetCN (DetQuant DefArt NumSg) (UseN man_N))))) NoVoc
|
||||||
|
|
||||||
|
--- Longer example, unsure about word order -- TODO check
|
||||||
|
-- LangEng: how does your mother paint the house black
|
||||||
|
LangSom: sidee baa ay hooya BIND daa madow u rinjiyeysaa guri BIND ga
|
||||||
|
Lang: PhrUtt NoPConj (UttQS (UseQCl (TTAnt TPres ASimul) PPos (QuestIAdv how_IAdv (PredVP (DetCN (DetQuant (PossPron youSg_Pron) NumSg) (UseN2 mother_N2)) (ComplSlash (SlashV2A paint_V2A (PositA black_A)) (DetCN (DetQuant DefArt NumSg) (UseN house_N))))))) NoVoc
|
||||||
|
|
||||||
|
-- Some examples from Nilsson, adjusted to the GF lexicon
|
||||||
|
-- Maxaa ay u samaysay sidaas? Varför gjorde hon så?
|
||||||
|
--LangEng: why did she eat the meat
|
||||||
|
LangSom: maxaa ay u cuntay hilib BIND ka
|
||||||
|
Lang: PhrUtt NoPConj (UttQS (UseQCl (TTAnt TPast ASimul) PPos (QuestIAdv why_IAdv (PredVP (UsePron she_Pron) (ComplSlash (SlashV2a eat_V2) (DetCN (DetQuant DefArt NumSg) (UseN meat_N))))))) NoVoc
|
||||||
|
|
||||||
|
-- Maxaa ay ahaa dharka cusub ee Faadumo loo iibiyay? Vad/Vilka var de nya kläder som man köpt åt Fadumo? TODO why is there subject pronoun here?
|
||||||
|
--LangEng: what was the meat that was eaten
|
||||||
|
LangSom: maxaa uu ahaa hilib BIND ka la cunay
|
||||||
|
Lang: PhrUtt NoPConj (UttQS (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)))))))))) NoVoc
|
||||||
@@ -56,11 +56,11 @@ LangSom: rooti waa uu is siiyey
|
|||||||
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPast ASimul) PPos (PredVP (UsePron he_Pron) (ReflVP (Slash2V3 give_V3 (MassNP (UseN bread_N))))))) NoVoc
|
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPast ASimul) PPos (PredVP (UsePron he_Pron) (ReflVP (Slash2V3 give_V3 (MassNP (UseN bread_N))))))) NoVoc
|
||||||
|
|
||||||
-- LangEng: one adds salt to the meat
|
-- LangEng: one adds salt to the meat
|
||||||
LangSom: hilib BIND ka cusbo waa lagu daraa
|
LangSom: cusbo hilib BIND ka waa lagu daraa
|
||||||
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (GenericCl (ComplSlash (Slash3V3 add_V3 (DetCN (DetQuant DefArt NumSg) (UseN meat_N))) (MassNP (UseN salt_N)))))) NoVoc
|
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (GenericCl (ComplSlash (Slash3V3 add_V3 (DetCN (DetQuant DefArt NumSg) (UseN meat_N))) (MassNP (UseN salt_N)))))) NoVoc
|
||||||
|
|
||||||
-- LangEng: one can add salt to meat
|
-- LangEng: one can add salt to meat
|
||||||
LangSom: hilib cusbo waa lagu dari karaa
|
LangSom: cusbo hilib waa lagu dari karaa
|
||||||
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (GenericCl (ComplVV can_VV (ComplSlash (Slash3V3 add_V3 (MassNP (UseN meat_N))) (MassNP (UseN salt_N))))))) NoVoc
|
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (GenericCl (ComplVV can_VV (ComplSlash (Slash3V3 add_V3 (MassNP (UseN meat_N))) (MassNP (UseN salt_N))))))) NoVoc
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
@@ -116,4 +116,3 @@ Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_P
|
|||||||
-- LangEng: my mother lives under the sea
|
-- LangEng: my mother lives under the sea
|
||||||
LangSom: hooya BIND day waa ku nool tahay bad BIND da hoos BIND teed BIND a
|
LangSom: hooya BIND day waa ku nool tahay bad BIND da hoos BIND teed BIND a
|
||||||
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (DetCN (DetQuant (PossPron i_Pron) NumSg) (UseN2 mother_N2)) (AdvVP (UseV live_V) (PrepNP under_Prep (DetCN (DetQuant DefArt NumSg) (UseN sea_N))))))) NoVoc
|
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (DetCN (DetQuant (PossPron i_Pron) NumSg) (UseN2 mother_N2)) (AdvVP (UseV live_V) (PrepNP under_Prep (DetCN (DetQuant DefArt NumSg) (UseN sea_N))))))) NoVoc
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
abstract TestLang =
|
abstract TestLang =
|
||||||
Grammar,
|
Grammar,
|
||||||
Lexicon
|
TestLexiconGerAbs
|
||||||
, TestLexiconGerAbs
|
-- , Construction
|
||||||
, Construction
|
|
||||||
** {
|
** {
|
||||||
flags startcat=Phr ;
|
flags startcat=Phr ;
|
||||||
|
|
||||||
|
fun
|
||||||
|
SlashV2Vneg : V2V -> VP -> VPSlash ; -- negative use of VP: promise, not to vp
|
||||||
cat
|
cat
|
||||||
VPSlashSlash ;
|
VPSlashSlash ;
|
||||||
fun
|
fun
|
||||||
@@ -17,4 +19,17 @@ abstract TestLang =
|
|||||||
Slash4V4 : V4 -> NP -> VPSlashSlash ;
|
Slash4V4 : V4 -> NP -> VPSlashSlash ;
|
||||||
|
|
||||||
ComplSlashSlash: VPSlashSlash -> NP -> VPSlash ;
|
ComplSlashSlash: VPSlashSlash -> NP -> VPSlash ;
|
||||||
|
|
||||||
|
-- Passive
|
||||||
|
PastPartAP : VPSlash -> AP ; -- lost (opportunity) ; (opportunity) lost in space
|
||||||
|
PassVPSlash : VPSlash -> VP ; -- from ExtraGer, to be corrected
|
||||||
|
|
||||||
|
PassV2S : V2S -> S -> VP ;
|
||||||
|
PassV2Q : V2Q -> QS -> VP ;
|
||||||
|
PassV2V : V2V -> VP -> VP ;
|
||||||
|
|
||||||
|
Pass3V3 : V3 -> NP -> VP ; -- den Beweis erklärt bekommen
|
||||||
|
Pass2V3 : V3 -> NP -> VP ; -- uns erklärt werden ; Eng give_V3[indir,dir]: we are given the book
|
||||||
|
|
||||||
|
Pass2V4 : V4 -> NP -> VPSlash ; -- bei dir (für Gold) gekauft werden
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -2,26 +2,54 @@
|
|||||||
-- --# -path=.:../abstract:../common:../api:../prelude
|
-- --# -path=.:../abstract:../common:../api:../prelude
|
||||||
|
|
||||||
concrete TestLangEng of TestLang =
|
concrete TestLangEng of TestLang =
|
||||||
GrammarEng,
|
GrammarEng
|
||||||
LexiconEng
|
|
||||||
, TestLexiconEng
|
, TestLexiconEng
|
||||||
, ConstructionEng
|
-- , ConstructionEng
|
||||||
** open (R=ResEng),(P=ParadigmsEng),Prelude in {
|
** open (R=ResEng), (P=ParadigmsEng), Prelude, (E=ExtendEng)
|
||||||
|
in {
|
||||||
|
|
||||||
flags
|
flags
|
||||||
startcat = Phr ; unlexer = text ; lexer = text ;
|
startcat = Phr ; unlexer = text ; lexer = text ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
SlashV2Vneg v vp =
|
||||||
|
R.insertObjc (\\a => v.c3 ++ R.infVP v.typ vp False R.Simul (R.CNeg True) a) (R.predVc v) ;
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
VPSlashSlash = VPSlash ** {c3 : Str} ;
|
VPSlashSlash = VPSlash ** {c3 : Str} ;
|
||||||
lin
|
lin
|
||||||
ReflVPSlash v3 = (R.predVc ((P.reflV (lin V v3)) ** {c2 = v3.c3 ; missingAdv = True}));
|
ReflVPSlash v3 = (R.predVc ((P.reflV (lin V v3)) ** {c2 = v3.c3 ; missingAdv = True}));
|
||||||
|
|
||||||
ComplSlashSlash vpss np = R.insertObjc (appPrep vpss.c2 (lin NP np)) (vpss ** {c2 = vpss.c3 ; missingAdv = True }) ;
|
ComplSlashSlash vpss np = R.insertObjc
|
||||||
|
(appPrep vpss.c2 (lin NP np)) (vpss ** {c2 = vpss.c3 ; missingAdv = True }) ;
|
||||||
|
|
||||||
Slash2V4 v np = (lin VPSlash (R.insertObjc (appPrep v.c2 (lin NP np)) (R.predVc v) ** {c2 = v.c3 ; missingAdv = True})) ** { c3 = v.c4 } ;
|
Slash2V4 v np = (lin VPSlash (R.insertObjc (appPrep v.c2 (lin NP np)) (R.predVc v)
|
||||||
Slash3V4 v np = (lin VPSlash (R.insertObjc (appPrep v.c3 (lin NP np)) (R.predVc v) ** {c2 = v.c2 ; missingAdv = True})) ** { c3 = v.c4 } ;
|
** {c2 = v.c3 ; missingAdv = True})) ** { c3 = v.c4 } ;
|
||||||
Slash4V4 v np = (lin VPSlash (R.insertObjc (appPrep v.c4 (lin NP np)) (R.predVc v) ** {c2 = v.c2 ; missingAdv = True})) ** { c3 = v.c3 } ;
|
Slash3V4 v np = (lin VPSlash (R.insertObjc (appPrep v.c3 (lin NP np)) (R.predVc v)
|
||||||
|
** {c2 = v.c2 ; missingAdv = True})) ** { c3 = v.c4 } ;
|
||||||
|
Slash4V4 v np = (lin VPSlash (R.insertObjc (appPrep v.c4 (lin NP np)) (R.predVc v)
|
||||||
|
** {c2 = v.c2 ; missingAdv = True})) ** { c3 = v.c3 } ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
appPrep : Str -> NP -> (R.Agr => Str) = \p,np -> \\_ => p ++ np.s ! R.NPAcc ;
|
appPrep : Str -> NP -> (R.Agr => Str) = \p,np -> \\_ => p ++ np.s ! R.NPAcc ;
|
||||||
|
|
||||||
|
-- Passive
|
||||||
|
lin
|
||||||
|
Pass2V3 v np =
|
||||||
|
let vps = R.insertObj (\\_ => v.s ! R.VPPart ++ v.p) (R.predAux R.auxBe) ** {c2 = v.c3}
|
||||||
|
in R.insertObj (\\_ => vps.c2 ++ np.s ! R.NPAcc) vps ;
|
||||||
|
|
||||||
|
Pass3V3 v np =
|
||||||
|
let vps = R.insertObj (\\_ => v.s ! R.VPPart ++ v.p) (R.predAux R.auxBe) ** {c2 = v.c2}
|
||||||
|
in R.insertObj (\\_ => vps.c2 ++ np.s ! R.NPAcc) vps ;
|
||||||
|
|
||||||
|
PastPartAP = E.PastPartAP ;
|
||||||
|
PassVPSlash = E.PassVPSlash ;
|
||||||
|
|
||||||
|
Pass2V4 v np =
|
||||||
|
let vpss = R.insertObj (\\_ => v.s ! R.VPPart ++ v.p) (R.predAux R.auxBe) ** {c2 = v.c3 ; c3 = v.c4}
|
||||||
|
in R.insertObj (\\_ => vpss.c3 ++ np.s ! R.NPAcc) vpss ** {c2 = vpss.c2 ;
|
||||||
|
missingAdv = True ;
|
||||||
|
gapInMiddle = False } ;
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -1,28 +1,173 @@
|
|||||||
--# -path=.:../../src/abstract:../../src/common:../../src/api:../../src/prelude:../../src/german
|
--# -path=.:../../src/abstract:../../src/common:../../src/api:../../src/prelude:../../src/german
|
||||||
-- --# -path=.:../abstract:../common:../api:../prelude
|
-- use the modified files in gf-rgl/src/german
|
||||||
|
|
||||||
concrete TestLangGer of TestLang =
|
concrete TestLangGer of TestLang =
|
||||||
GrammarGer,
|
GrammarGer - [PassV2] -- to improve these ,ComplVV,SlashVV,SlashV2V,SlashV2VNP
|
||||||
LexiconGer
|
, TestLexiconGer - [helfen_V2V, warnen_V2V, versprechen_dat_V2V, lassen_V2V]
|
||||||
, TestLexiconGer
|
-- , ConstructionGer -- needs SlashV2VNP of VerbGer
|
||||||
, ConstructionGer
|
** open ResGer,Prelude,(P=ParadigmsGer) in {
|
||||||
** open (R=ResGer),Prelude in {
|
|
||||||
|
|
||||||
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
||||||
|
optimize=all_subs ;
|
||||||
|
{-
|
||||||
lincat
|
lincat
|
||||||
VPSlashSlash = VPSlash ** {c3 : R.Preposition} ;
|
VPSlashSlash = CatGer.VPSlash ** {c3 : Preposition} ;
|
||||||
lin
|
lin
|
||||||
ReflVPSlash v3 = (R.insertObjRefl (R.predVc v3) ** {c2 = v3.c3 ; missingAdv = True}); -- reflexive use of v:V3, untested
|
SlashV3a v = (predVc v) ** {c3 = v.c3} ;
|
||||||
|
|
||||||
-- SlashV3a v = (R.predVc v) ** {c3 = v.c3} ;
|
|
||||||
|
|
||||||
Slash2V4 v np = (lin VPSlash (R.insertObjNP np v.c2 (R.predV v) ** {c2 = v.c3 ; missingAdv = True})) ** { c3 = v.c4 } ;
|
|
||||||
Slash3V4 v np = (lin VPSlash (R.insertObjNP np v.c3 (R.predV v) ** {c2 = v.c2 ; missingAdv = True})) ** { c3 = v.c4 } ;
|
|
||||||
Slash4V4 v np = (lin VPSlash (R.insertObjNP np v.c4 (R.predV v) ** {c2 = v.c2 ; missingAdv = True})) ** { c3 = v.c3 } ;
|
|
||||||
|
|
||||||
ComplSlashSlash vpss np = R.insertObjNP np vpss.c2 vpss ** {c2 = vpss.c3 ; missingAdv = True } ;
|
|
||||||
|
|
||||||
|
Slash2V4 v np = insertObjNP np v.c2 (predV v) ** {c2 = v.c3 ; c3 = v.c4 } ;
|
||||||
|
Slash3V4 v np = insertObjNP np v.c3 (predV v) ** {c2 = v.c2 ; c3 = v.c4 } ;
|
||||||
|
Slash4V4 v np = insertObjNP np v.c4 (predV v) ** {c2 = v.c2 ; c3 = v.c3 } ;
|
||||||
|
|
||||||
|
ComplSlashSlash vpss np = insertObjNP np vpss.c2 vpss ** {c2 = vpss.c3} ;
|
||||||
-- linref
|
-- linref
|
||||||
-- V4 = \v -> useInfVP False (R.predV v) ++ v.c2.s ++ v.c3.s ++ v.c4.s ;
|
-- V4 = \v -> useInfVP False (predV v) ++ v.c2.s ++ v.c3.s ++ v.c4.s ;
|
||||||
|
-}
|
||||||
|
lin
|
||||||
|
ReflVPSlash v3 = -- reflexive use of v:V3, untested
|
||||||
|
(insertObjRefl (predVc v3) ** {c2 = v3.c3});
|
||||||
|
|
||||||
} ;
|
PassV2 v = -- insertObj (\\_ => v.s ! VPastPart APred) (predV werdenPass) ;
|
||||||
|
let c = case <v.c2.c, v.c2.isPrep> of {
|
||||||
|
<NPC Acc, False> => NPC Nom ; _ => v.c2.c} -- acc object -> nom; all others: same PCase
|
||||||
|
in insertObjc (\\_ => v.s ! VPastPart APred) (predV werdenPass) ** { subjc = v.c2 ** {c = c} } ;
|
||||||
|
|
||||||
|
PassV2Q v q =
|
||||||
|
let c = case <v.c2.c, v.c2.isPrep> of {
|
||||||
|
<NPC Acc, False> => NPC Nom ; _ => v.c2.c} ; -- acc;pcase object -> nom;pcase subject
|
||||||
|
vp = insertObjc (\\_ => v.s ! VPastPart APred) (predV werdenPass)
|
||||||
|
** { subjc = v.c2 ** {c = c} }
|
||||||
|
in insertExtrapos (bindComma ++ q.s ! QIndir) vp ;
|
||||||
|
|
||||||
|
PassV2S v s =
|
||||||
|
let c = case <v.c2.c, v.c2.isPrep> of {
|
||||||
|
<NPC Acc, False> => NPC Nom ; _ => v.c2.c} ; -- acc;pcase object -> nom;pcase subject
|
||||||
|
vp = insertObjc (\\_ => v.s ! VPastPart APred) (predV werdenPass)
|
||||||
|
** { subjc = v.c2 ** {c = c} }
|
||||||
|
in insertExtrapos (bindComma ++ conjThat ++ s.s ! Sub) vp ;
|
||||||
|
|
||||||
|
PassV2V v vp =
|
||||||
|
let c = case <v.c2.c, v.c2.isPrep> of {
|
||||||
|
<NPC Acc, False> => NPC Nom ; _ => v.c2.c} ; -- acc;pcase object -> nom;pcase subject
|
||||||
|
vp2 = insertObjc (\\_ => v.s ! VPastPart APred) (predV werdenPass)
|
||||||
|
** { subjc = v.c2 ** {c = c} }
|
||||||
|
in insertExtrapos (bindComma ++ (useInfVP False vp)) vp2 ; -- misses subject agr for vp = ReflVP vps
|
||||||
|
{-
|
||||||
|
PassVPSlash vp =
|
||||||
|
let c = case <vp.c2.c,vp.c2.isPrep> of {
|
||||||
|
<NPC Acc, False> => NPC Nom ; _ => vp.c2.c}
|
||||||
|
in insertObjc (\\_ => (PastPartAP vp).s ! APred) (predV werdenPass)
|
||||||
|
** {ext = vp.ext ; subjc = vp.c2 ** {c = c}} ;
|
||||||
|
-- regulates passivised object: accusative objects -> nom; all others: same case
|
||||||
|
-- this also gives "mit dir wird gerechnet" ;
|
||||||
|
-- the alternative linearisation ("es wird mit dir gerechnet") is not implemented
|
||||||
|
-- HL: does not work for vp = (Slash2V3 v np): uns wird den Beweis erklärt
|
||||||
|
-- vp = (SlashV2V v2v reflVP): wir werden gebeten, uns zu fragen , ob S
|
||||||
|
PastPartAP vp = {
|
||||||
|
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.inf.s ++ vp.infExt ++ vp.s.s ! VPastPart af ;
|
||||||
|
isPre = True ;
|
||||||
|
c = <[],[]> ;
|
||||||
|
adj = [] ;
|
||||||
|
ext = vp.ext
|
||||||
|
} ;
|
||||||
|
-}
|
||||||
|
Pass2V3 v np = -- HL 7/19: making the (active) direct object to the (passive) subject
|
||||||
|
let vps = insertObjc (\\_ => (v.s ! VPastPart APred)) (predV werdenPass)
|
||||||
|
** { subjc = PrepNom ; c2 = v.c3 }
|
||||||
|
in insertObjNP np vps.c2 vps ;
|
||||||
|
|
||||||
|
Pass3V3 v np = -- HL 7/19: making the (active) indirect object to the (passive) subject
|
||||||
|
let bekommen : Verb = P.habenV (P.irregV "bekommen" "bekommt" "bekam" "bekäme" "bekommen") ;
|
||||||
|
vps = insertObjc (\\_ => (v.s ! VPastPart APred)) (predV bekommen)
|
||||||
|
** { subjc = PrepNom ; c2 = v.c2 }
|
||||||
|
in insertObjNP np vps.c2 vps ;
|
||||||
|
{-
|
||||||
|
Pass2V4 v np =
|
||||||
|
let vps = -- : VPSlashSlash =
|
||||||
|
insertObj (\\_ => (v.s ! VPastPart APred)) (predV werdenPass)
|
||||||
|
** { subjc = PrepNom ; c2 = v.c3 ; c3 = v.c4 }
|
||||||
|
in (insertObjNP np vps.c3 vps) ;
|
||||||
|
|
||||||
|
-- Todo: Pass?V2S, Pass?V2Q, PassVS, PassVQ Pass?V2V
|
||||||
|
-}
|
||||||
|
|
||||||
|
SlashV2Vneg v vp = -- versprechen, (\agr => sich!agr es nicht zu merken)
|
||||||
|
let
|
||||||
|
vps = (predVGen v.isAux v) ** { c2 = v.c2 } ; --; ctrl = v.ctrl } ;
|
||||||
|
vpi = infzuVP v.isAux v.ctrl Simul Neg vp ;
|
||||||
|
comma = case orB vp.isAux (case vp.inf.ctrl of { NoC => True ; _ => False }) of {True => [] ; _ => bindComma} ;
|
||||||
|
embeddedInf : Agr => Str = case vp.inf.isAux of {
|
||||||
|
True => \\agr => comma ++ (vp.nn!agr).p5 ++ (vp.nn!agr).p6 ++ vpi.inf ; -- ihn es lesen (zu) lassen
|
||||||
|
False => \\agr => comma ++ (vp.nn!agr).p5 ++ vpi.inf ++ (vp.nn!agr).p6 } -- ihn (zu) bitten , es zu lesen
|
||||||
|
in
|
||||||
|
insertExtrapos vpi.ext (
|
||||||
|
insertInf vpi.pred (
|
||||||
|
insertInfExtraObj vpi.objs (
|
||||||
|
insertInfExtraInf embeddedInf vps))) ;
|
||||||
|
|
||||||
|
lin -- with param Control in ../../src/german/ParadigmsGer.gf
|
||||||
|
helfen_V2V = P.mkV2V (P.irregV "helfen" "hilft" "half" "hälfe" "geholfen") P.datPrep ;
|
||||||
|
warnen_V2V = P.mkV2V (P.regV "warnen") P.accPrep ;
|
||||||
|
versprechen_dat_V2V =
|
||||||
|
P.subjV2V (P.mkV2V (P.irregV "versprechen" "verspricht" "versprach" "verspräche" "versprochen") P.datPrep) ;
|
||||||
|
lassen_V2V = P.auxV2V (P.irregV "lassen" "lasst" "ließ" "ließe" "gelassen") P.accPrep ; -- lasse dich (*zu) arbeiten
|
||||||
|
|
||||||
|
-- SlashV2VNP : V2V -> NP -> VPSlash -> VPSlash ; -- beg me to buy
|
||||||
|
-- -- (the book) that (she (begged:V2V me:NP (to buy ()):VPSlash):VPSlash):ClSlash
|
||||||
|
|
||||||
|
-- very expensive:
|
||||||
|
-- + SlashV2V 2332800 (6480,40)
|
||||||
|
-- + SlashV2VNP 2267481600 (4320,270) vs. (1080,90) in VerbGer, 305460 msec
|
||||||
|
-- Languages: TestLangGer
|
||||||
|
-- 623657 msec
|
||||||
|
{-
|
||||||
|
SlashV2VNP v np vp =
|
||||||
|
let
|
||||||
|
vps = (predVGen v.isAux v) ** { c2 = vp.c2 } ; -- objCtrl =
|
||||||
|
vpi = infzuVP v.isAux v.ctrl Simul Pos vp ;
|
||||||
|
-- comma = case <vp.isAux,vp.inf.ctrl> of { <True,_> => [] ; <_,NoC> => [] ; _ => bindComma} ;
|
||||||
|
embeddedInf : Agr => Str =
|
||||||
|
\\agr => "[" ++ (vp.nn!agr).p5 ++ (vp.nn!agr).p6 ++ vpi.inf ++ "]";
|
||||||
|
-- embeddedInf : Agr => Str = case vp.inf.isAux of {
|
||||||
|
-- True => \\agr => comma ++ (vp.nn!agr).p5 ++ (vp.nn!agr).p6 ++ vpi.inf ; -- ihn es lesen (zu) lassen
|
||||||
|
-- False => \\agr => comma ++ (vp.nn!agr).p5 ++ vpi.inf ++ (vp.nn!agr).p6 } -- ihn (zu) bitten , es zu lesen
|
||||||
|
in
|
||||||
|
insertExtrapos vpi.ext ( -- vps.ext <- vp's object-sentence ++ extractedInfzu?
|
||||||
|
insertInf vpi.pred ( -- vps.inf <- vp's infinite main verb
|
||||||
|
insertInfExtraObj vpi.objs ( -- vps.nn.p5 <- vp's object nps
|
||||||
|
insertInfExtraInf embeddedInf (
|
||||||
|
insertObjNP np v.c2 vps )))) ;
|
||||||
|
-}
|
||||||
|
{-
|
||||||
|
TestLang> p "the book that we beg her to promise him to read" | l
|
||||||
|
the book that we beg her to promise him to read
|
||||||
|
das Buch , das wir sie bitten , ihn zu versprechen [ [ ] zu lesen ]
|
||||||
|
|
||||||
|
TestLang> p "the book that we beg her to beg him to read" | l
|
||||||
|
the book that we beg her to beg him to read
|
||||||
|
das Buch , das wir sie bitten , ihn zu bitten [ [ ] zu lesen ]
|
||||||
|
|
||||||
|
TestLang: DetCN (DetQuant DefArt NumSg) (RelCN (UseN book_N) (UseRCl (TTAnt TPres ASimul) PPos (RelSlash IdRP (SlashVP (UsePron we_Pron) (SlashV2VNP versprechen_dat_V2V (UsePron she_Pron) (SlashV2a read_V2))))))
|
||||||
|
TestLangEng: the book that we promise her to read
|
||||||
|
TestLangGer: das Buch , dem wir ihr versprechen , zu lesen Bug: dem => das
|
||||||
|
|
||||||
|
TestLang> p "the book that we beg her to sell to him" | l
|
||||||
|
the book that we beg her to sell to him
|
||||||
|
das Buch , das wir ihm sie bitten , zu verkaufen
|
||||||
|
=> das Buch , das wir sie bitten , ihm zu verkaufen
|
||||||
|
~~> das Buch , das ihm zu verkaufen wir sie bitten
|
||||||
|
~~ das Buch , an das zu glauben wir sie bitten
|
||||||
|
|
||||||
|
Wrong in gf-3.9 as well:
|
||||||
|
Lang> p "the woman that we beg him to listen to" | l
|
||||||
|
the woman that we beg him to listen to
|
||||||
|
die Frau , die wir ihn zuzuhören bitten (Bug: die => der)
|
||||||
|
|
||||||
|
Lang> p "the book that we beg her to sell to him" | l
|
||||||
|
the book that we beg her to sell to him
|
||||||
|
das Buch , das wir ihn sie zu verkaufen bitten (Bug: ihn sie => sie ihm)
|
||||||
|
=> das Buch, das wir sie bitten, ihm zu verkaufen
|
||||||
|
-}
|
||||||
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
-- translations and corresponding c2,c3,c4-objects under Slash?V3, Slash?V4.
|
-- translations and corresponding c2,c3,c4-objects under Slash?V3, Slash?V4.
|
||||||
|
|
||||||
concrete TestLexiconEng of TestLexiconGerAbs =
|
concrete TestLexiconEng of TestLexiconGerAbs =
|
||||||
CatEng ** open (R=ResEng), (P=Prelude), ParadigmsEng
|
LexiconEng ** open (R=ResEng), (P=Prelude), ParadigmsEng, (I=IrregEng)
|
||||||
in {
|
in {
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
@@ -20,6 +20,8 @@ oper
|
|||||||
mkV4 : V -> Prep -> Prep -> Prep -> V4 =
|
mkV4 : V -> Prep -> Prep -> Prep -> V4 =
|
||||||
\v,p2,p3,p4 -> lin V4 (v ** { c2=p2.s ; c3=p3.s ; c4=p4.s }) ;
|
\v,p2,p3,p4 -> lin V4 (v ** { c2=p2.s ; c3=p3.s ; c4=p4.s }) ;
|
||||||
dirV4 : V -> Prep -> Prep -> V4 = \v,c,d -> mkV4 v noPrep c d ;
|
dirV4 : V -> Prep -> Prep -> V4 = \v,c,d -> mkV4 v noPrep c d ;
|
||||||
|
-- control verbs:
|
||||||
|
defaultV2V : V -> V2V = \v -> lin V2V (dirV2 v ** {c3=[] ; typ = R.VVInf}) ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
aendern_rV = (regV "change") ;
|
aendern_rV = (regV "change") ;
|
||||||
@@ -27,6 +29,7 @@ lin
|
|||||||
compl : Str = "an effort"
|
compl : Str = "an effort"
|
||||||
in {s = \\vf => v.s!vf ++ compl ; isRefl = P.False ; p = []} ;
|
in {s = \\vf => v.s!vf ++ compl ; isRefl = P.False ; p = []} ;
|
||||||
|
|
||||||
|
gedenken_gen_V2 = dirV2 (regV "remember") ;
|
||||||
bedienen_gen_rV2 = dirV2 (regV "use") ;
|
bedienen_gen_rV2 = dirV2 (regV "use") ;
|
||||||
stuetzen_auf_rV2 = mkV2 (irregV "rely" "relied" "relied") (mkPrep "on") ;
|
stuetzen_auf_rV2 = mkV2 (irregV "rely" "relied" "relied") (mkPrep "on") ;
|
||||||
ergeben_dat_rV2 = mkV2 (regV "surrender") (mkPrep "to") ;
|
ergeben_dat_rV2 = mkV2 (regV "surrender") (mkPrep "to") ;
|
||||||
@@ -36,6 +39,7 @@ lin
|
|||||||
erklaeren_dat_V3 = dirV3 (regV "explain") (mkPrep "to") ;
|
erklaeren_dat_V3 = dirV3 (regV "explain") (mkPrep "to") ;
|
||||||
erinnern_an_V3 = dirV3 (regV "remind") (mkPrep "of") ;
|
erinnern_an_V3 = dirV3 (regV "remind") (mkPrep "of") ;
|
||||||
danken_dat_fuer_V3 = dirV3 (regV "thank") (mkPrep "for") ;
|
danken_dat_fuer_V3 = dirV3 (regV "thank") (mkPrep "for") ;
|
||||||
|
debattieren_mit_ueber_V3 = mkV3 (regV "debate") (mkPrep "with") (mkPrep "about") ;
|
||||||
lehren_V3 = mkV3 (irregV "teach" "taught" "taught") noPrep noPrep ;
|
lehren_V3 = mkV3 (irregV "teach" "taught" "taught") noPrep noPrep ;
|
||||||
|
|
||||||
abschauen_bei_rV3 = dirV3 (regV "copy") (mkPrep "from") ;
|
abschauen_bei_rV3 = dirV3 (regV "copy") (mkPrep "from") ;
|
||||||
@@ -48,4 +52,12 @@ lin
|
|||||||
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") ;
|
neugierig_auf_A2 = mkA2 (regA "curious") (mkPrep "about") ;
|
||||||
|
|
||||||
|
wagen_VV = mkVV (regV "dare") ; -- typ=VVInf
|
||||||
|
versuchen_VV = mkVV (irregV "try" "tried" "tried") ; -- typ=VVInf
|
||||||
|
helfen_V2V = defaultV2V (regV "help") ;
|
||||||
|
warnen_V2V = defaultV2V (regV "warn") ; -- typ=VVInf
|
||||||
|
versprechen_dat_V2V = defaultV2V (regV "promise") ; -- typ=VVInf
|
||||||
|
lassen_V2V = ParadigmsEng.mkV2V (I.let_V) ; -- typ=VVAux
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
--# -path=.:../abstract:../common:../prelude:
|
--# -path=.:../abstract:../common:../prelude:
|
||||||
|
|
||||||
concrete TestLexiconGer of TestLexiconGerAbs =
|
concrete TestLexiconGer of TestLexiconGerAbs =
|
||||||
CatGer ** open (R=ResGer), (P=Prelude), ParadigmsGer
|
LexiconGer ** open (R=ResGer), (P=Prelude), ParadigmsGer
|
||||||
in {
|
in {
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
@@ -16,25 +16,30 @@ oper
|
|||||||
|
|
||||||
bei_Prep = mkPrep "bei" dative ;
|
bei_Prep = mkPrep "bei" dative ;
|
||||||
fuer_Prep = mkPrep "für" accusative ;
|
fuer_Prep = mkPrep "für" accusative ;
|
||||||
|
mit_Prep = mkPrep "mit" dative ;
|
||||||
|
|
||||||
-- quaternary verbs:
|
-- quaternary verbs:
|
||||||
mkV4 : V -> Prep -> Prep -> Prep -> V4 =
|
mkV4 : V -> Prep -> Prep -> Prep -> V4 =
|
||||||
\v,p2,p3,p4 -> lin V4 (v ** { c2=p2 ; c3=p3 ; c4=p4 }) ;
|
\v,p2,p3,p4 -> lin V4 (v ** { c2=p2 ; c3=p3 ; c4=p4 }) ;
|
||||||
dirV4 : V -> Prep -> Prep -> V4 = \v,c,d -> mkV4 v accPrep c d ;
|
dirV4 : V -> Prep -> Prep -> V4 = \v,c,d -> mkV4 v accPrep c d ;
|
||||||
|
-- control verbs
|
||||||
|
dirV2V : V -> V2V = \v -> mkV2V v ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
aendern_rV = reflV (regV "ändern") accusative ;
|
aendern_rV = reflV (regV "ändern") accusative ;
|
||||||
anstrengen_rV = reflV (prefixV "an" (regV "strengen")) accusative ;
|
anstrengen_rV = reflV (prefixV "an" (regV "strengen")) accusative ;
|
||||||
|
|
||||||
|
gedenken_gen_V2 = mkV2 (irregV "gedenken" "gedenkt" "gedachte" "gedächte" "gedacht") genPrep ;
|
||||||
bedienen_gen_rV2 = reflV2 (regV "bedienen") accusative genPrep ;
|
bedienen_gen_rV2 = reflV2 (regV "bedienen") accusative genPrep ;
|
||||||
stuetzen_auf_rV2 = reflV2 (regV "stützen") accusative (mkPrep "auf" accusative) ;
|
stuetzen_auf_rV2 = reflV2 (regV "stützen") accusative (mkPrep "auf" accusative) ;
|
||||||
ergeben_dat_rV2 = reflV2 (irregV "ergeben" "ergibt" "ergab" "ergäbe" "ergeben") accusative datPrep ;
|
ergeben_dat_rV2 = reflV2 (irregV "ergeben" "ergibt" "ergab" "ergäbe" "ergeben") accusative datPrep ;
|
||||||
merken_rV2 = reflV2 (regV "merken") dative accPrep ;
|
merken_rV2 = reflV2 (regV "merken") dative accPrep ;
|
||||||
|
|
||||||
erklaeren_dat_V3 = accdatV3 (irregV "erklären" "erklärt" "erklärte" "erklärte" "erklärt") ;
|
erklaeren_dat_V3 = mkV3 (irregV "erklären" "erklärt" "erklärte" "erklärte" "erklärt") ;
|
||||||
anklagen_gen_V3 = dirV3 (prefixV "an" (regV "klagen")) genPrep ;
|
anklagen_gen_V3 = dirV3 (prefixV "an" (regV "klagen")) genPrep ;
|
||||||
erinnern_an_V3 = dirV3 (irregV "erinnern" "erinnert" "erinnerte" "erinnerte" "erinnert") (mkPrep "an" accusative) ;
|
erinnern_an_V3 = dirV3 (irregV "erinnern" "erinnert" "erinnerte" "erinnerte" "erinnert") (mkPrep "an" accusative) ;
|
||||||
danken_dat_fuer_V3 = mkV3 (regV "danken") datPrep (mkPrep "für" accusative) ;
|
danken_dat_fuer_V3 = mkV3 (regV "danken") datPrep (mkPrep "für" accusative) ;
|
||||||
|
debattieren_mit_ueber_V3 = mkV3 (irregV "debattieren" "debattiert" "debattierte" "debattierte" "debattiert") mit_Prep (mkPrep "über" accusative) ;
|
||||||
lehren_V3 = dirV3 (regV "lehren") accPrep ;
|
lehren_V3 = dirV3 (regV "lehren") accPrep ;
|
||||||
|
|
||||||
abschauen_bei_rV3 = reflV3 (prefixV "ab" (irregV "schauen" "schaut" "schaute" "schaute" "geschaut")) dative accPrep bei_Prep ;
|
abschauen_bei_rV3 = reflV3 (prefixV "ab" (irregV "schauen" "schaut" "schaute" "schaute" "geschaut")) dative accPrep bei_Prep ;
|
||||||
@@ -49,4 +54,12 @@ lin
|
|||||||
|
|
||||||
neugierig_auf_A2 = mkA2 (mk3A "neugierig" "neugieriger" "neugierigste") (mkPrep "auf" accusative) ;
|
neugierig_auf_A2 = mkA2 (mk3A "neugierig" "neugieriger" "neugierigste") (mkPrep "auf" accusative) ;
|
||||||
|
|
||||||
|
wagen_VV = mkVV (regV "wagen") ;
|
||||||
|
versuchen_VV = mkVV (irregV "versuchen" "versucht" "versuchte" "versuchte" "versucht") ;
|
||||||
|
|
||||||
|
helfen_V2V = mkV2V (irregV "helfen" "hilft" "half" "hälfe" "geholfen") datPrep ;
|
||||||
|
warnen_V2V = dirV2V (regV "warnen") ;
|
||||||
|
-- versprechen_dat_V2V = subjV2V (mkV2V (irregV "versprechen" "verspricht" "versprach" "verspräche" "versprochen") datPrep) ;
|
||||||
|
lassen_V2V = auxV2V (irregV "lassen" "lasst" "ließ" "ließe" "gelassen") accPrep ; -- lasse dich (*zu) arbeiten
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
--# -path=.:../abstract:../common:../prelude: -- partially extracted from DictVerbsGerAbs
|
--# -path=.:../abstract:../common:../prelude: -- partially extracted from DictVerbsGerAbs
|
||||||
abstract TestLexiconGerAbs = Cat ** {
|
abstract TestLexiconGerAbs = Lexicon ** {
|
||||||
cat
|
|
||||||
V4 ;
|
|
||||||
|
|
||||||
fun
|
fun
|
||||||
aendern_rV : V ;
|
aendern_rV : V ;
|
||||||
anstrengen_rV : V ;
|
anstrengen_rV : V ;
|
||||||
|
|
||||||
|
gedenken_gen_V2 : V2 ;
|
||||||
bedienen_gen_rV2 : V2 ;
|
bedienen_gen_rV2 : V2 ;
|
||||||
stuetzen_auf_rV2 : V2 ;
|
stuetzen_auf_rV2 : V2 ;
|
||||||
ergeben_dat_rV2 : V2 ;
|
ergeben_dat_rV2 : V2 ;
|
||||||
@@ -17,6 +16,7 @@ fun
|
|||||||
lehren_V3 : V3 ;
|
lehren_V3 : V3 ;
|
||||||
erinnern_an_V3 : V3 ;
|
erinnern_an_V3 : V3 ;
|
||||||
danken_dat_fuer_V3 : V3 ;
|
danken_dat_fuer_V3 : V3 ;
|
||||||
|
debattieren_mit_ueber_V3 : V3 ;
|
||||||
|
|
||||||
abschauen_bei_rV3 : V3 ;
|
abschauen_bei_rV3 : V3 ;
|
||||||
leihen_von_rV3 : V3 ;
|
leihen_von_rV3 : V3 ;
|
||||||
@@ -24,9 +24,20 @@ 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 ;
|
||||||
|
versuchen_VV : VV ;
|
||||||
|
|
||||||
|
helfen_V2V : V2V ; -- -aux(zu-inf), object control
|
||||||
|
warnen_V2V : V2V ; -- -aux, object control
|
||||||
|
versprechen_dat_V2V : V2V ; -- -aux, subject control
|
||||||
|
lassen_V2V : V2V ; -- +aux(inf), object control
|
||||||
|
|
||||||
|
cat
|
||||||
|
V4 ;
|
||||||
|
fun
|
||||||
kaufen_bei_fuer_V4 : V4 ;
|
kaufen_bei_fuer_V4 : V4 ;
|
||||||
mieten_von_fuer_V4 : V4 ;
|
mieten_von_fuer_V4 : V4 ;
|
||||||
|
|
||||||
neugierig_auf_A2 : A2 ;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -331,3 +331,29 @@ ich bin nicht auf ihn neugierig -- reject
|
|||||||
|
|
||||||
-- done
|
-- done
|
||||||
|
|
||||||
|
-- Passive of VPSlash and V3
|
||||||
|
|
||||||
|
sie gibt uns den Wagen -- accept
|
||||||
|
|
||||||
|
der Wagen wird uns gegeben -- accept, via PassVPSlash or Pass2V3
|
||||||
|
uns wird der Wagen gegeben -- accept, word order variant (not recognized)
|
||||||
|
wir bekommen den Wagen gegeben -- accept, via Pass3V3
|
||||||
|
|
||||||
|
sie schickte uns den Wagen -- accept (Eng with prep)
|
||||||
|
|
||||||
|
der Wagen wurde uns geschickt -- accept, via PassVPSlash
|
||||||
|
uns wurde der Wagen geschickt -- accept, word order variant (not recognized)
|
||||||
|
wir bekamen den Wagen geschickt -- accept, via Pass3V3
|
||||||
|
|
||||||
|
der Wagen würde uns geschickt werden -- accept
|
||||||
|
der Wagen würde uns nicht geschickt werden -- accept
|
||||||
|
wir würden den Wagen geschickt bekommen -- accept
|
||||||
|
wir würden den Wagen nicht geschickt bekommen -- accept
|
||||||
|
wir würden nicht den Wagen geschickt bekommen -- accept ?
|
||||||
|
|
||||||
|
der Wagen sei uns geschickt worden -- accept
|
||||||
|
wir hätten den Wagen geschickt bekommen -- accept
|
||||||
|
|
||||||
|
wir wollen den Wagen geschickt bekommen -- accept
|
||||||
|
wir würden den Wagen geschickt bekommen wollen haben -- accept
|
||||||
|
|
||||||
|
|||||||
15
tests/german/infinitives.gfs
Normal file
15
tests/german/infinitives.gfs
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
-- usage: gf --run < infinitives.gfs or gf> eh infinitives.gfs
|
||||||
|
--? echo "loading TestLangGer.gf and TestLangEng.gf ..."
|
||||||
|
--i TestLangGer.gf TestLangEng.gf
|
||||||
|
? ls -l infinitives.lin.out infinitives.lin.tmp
|
||||||
|
? echo "remove infinitives.lin.tmp"
|
||||||
|
? rm infinitives.lin.tmp
|
||||||
|
? echo "linearizing infinitives.trees to infinitives.lin.tmp ... "
|
||||||
|
rf -file="infinitives.trees" -lines -tree | l -lang="Ger,Eng" -treebank | wf -file="infinitives.lin.tmp"
|
||||||
|
rf -file="infinitives.trees" -lines -tree | l -lang=Ger -table | wf -file="infinitives.lin.tmp.txt"
|
||||||
|
? ls -l infinitives.lin.out infinitives.lin.tmp
|
||||||
|
? echo "diff infinitives.lin.out infinitives.lin.tmp"
|
||||||
|
? diff infinitives.lin.out infinitives.lin.tmp
|
||||||
|
? ls -l infinitives.lin.out.txt infinitives.lin.tmp.txt
|
||||||
|
--? echo "diff infinitives.lin.out.txt infinitives.lin.tmp.txt"
|
||||||
|
--? diff infinitives.lin.out.txt infinitives.lin.tmp.txt
|
||||||
258
tests/german/infinitives.lin.out
Normal file
258
tests/german/infinitives.lin.out
Normal file
@@ -0,0 +1,258 @@
|
|||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplSlash (SlashV2V versprechen_dat_V2V (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))) (UsePron youPl_Pron))
|
||||||
|
TestLangGer: ich verspreche euch , das Buch zu lesen
|
||||||
|
TestLangEng: I promise you to read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplSlash (SlashV2V lassen_V2V (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))) (UsePron youPl_Pron))
|
||||||
|
TestLangGer: ich lasse euch das Buch lesen
|
||||||
|
TestLangEng: I let you read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplSlash (SlashV2V beg_V2V (ComplSlash (SlashV2V versprechen_dat_V2V (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))) (UsePron we_Pron))) (UsePron youSg_Pron))
|
||||||
|
TestLangGer: ich bitte dich , uns zu versprechen , das Buch zu lesen
|
||||||
|
TestLangEng: I beg you to promise us to read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplSlash (SlashV2V lassen_V2V (ComplSlash (SlashV2V versprechen_dat_V2V (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))) (UsePron we_Pron))) (UsePron youSg_Pron))
|
||||||
|
TestLangGer: ich lasse dich uns versprechen , das Buch zu lesen
|
||||||
|
TestLangEng: I let you promise us to read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplSlash (SlashV2V beg_V2V (ComplSlash (SlashV2V lassen_V2V (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))) (UsePron we_Pron))) (UsePron youSg_Pron))
|
||||||
|
TestLangGer: ich bitte dich , uns das Buch lesen zu lassen
|
||||||
|
TestLangEng: I beg you to let us read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplSlash (SlashV2V lassen_V2V (ComplSlash (SlashV2V lassen_V2V (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))) (UsePron we_Pron))) (UsePron youSg_Pron))
|
||||||
|
TestLangGer: ich lasse dich uns das Buch lesen lassen
|
||||||
|
TestLangEng: I let you let us read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplVV want_VV (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N))))
|
||||||
|
TestLangGer: ich will das Buch lesen
|
||||||
|
TestLangEng: I want to read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplVV wagen_VV (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N))))
|
||||||
|
TestLangGer: ich wage , das Buch zu lesen
|
||||||
|
TestLangEng: I dare to read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplVV must_VV (ComplSlash (SlashV2V versprechen_dat_V2V (UseV sleep_V)) (UsePron she_Pron)))
|
||||||
|
TestLangGer: ich muss ihr versprechen , zu schlafen
|
||||||
|
TestLangEng: I must promise her to sleep
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplVV wagen_VV (ComplSlash (SlashV2V versprechen_dat_V2V (UseV sleep_V)) (UsePron she_Pron)))
|
||||||
|
TestLangGer: ich wage , ihr zu versprechen , zu schlafen
|
||||||
|
TestLangEng: I dare to promise her to sleep
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplVV must_VV (ComplSlash (SlashV2V lassen_V2V (UseV sleep_V)) (UsePron she_Pron)))
|
||||||
|
TestLangGer: ich muss sie schlafen lassen
|
||||||
|
TestLangEng: I must let her sleep
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplVV wagen_VV (ComplSlash (SlashV2V lassen_V2V (UseV sleep_V)) (UsePron she_Pron)))
|
||||||
|
TestLangGer: ich wage , sie schlafen zu lassen
|
||||||
|
TestLangEng: I dare to let her sleep
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplVV must_VV (ComplSlash (SlashV2V versprechen_dat_V2V (ComplSlash (SlashV2V lassen_V2V (UseV sleep_V)) (UsePron she_Pron))) (UsePron she_Pron)))
|
||||||
|
TestLangGer: ich muss ihr versprechen , sie schlafen zu lassen
|
||||||
|
TestLangEng: I must promise her to let her sleep
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplVV must_VV (ComplSlash (SlashV2V lassen_V2V (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))) (UsePron she_Pron)))
|
||||||
|
TestLangGer: ich muss sie das Buch lesen lassen
|
||||||
|
TestLangEng: I must let her read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplVV want_VV (ComplSlash (SlashV2V versprechen_dat_V2V (ComplSlash (SlashV2V lassen_V2V (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))) (UsePron she_Pron))) (UsePron he_Pron)))
|
||||||
|
TestLangGer: ich will ihm versprechen , sie das Buch lesen zu lassen
|
||||||
|
TestLangEng: I want to promise him to let her read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplVV must_VV (ComplVV want_VV (ComplSlash (SlashV2V versprechen_dat_V2V (ComplSlash (SlashV2V lassen_V2V (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))) (UsePron she_Pron))) (UsePron he_Pron))))
|
||||||
|
TestLangGer: ich muss ihm versprechen wollen , sie das Buch lesen zu lassen
|
||||||
|
TestLangEng: I must want to promise him to let her read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplSlash (SlashVV must_VV (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))
|
||||||
|
TestLangGer: ich muss das Buch lesen
|
||||||
|
TestLangEng: I must read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplSlash (SlashVV want_VV (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))
|
||||||
|
TestLangGer: ich will das Buch lesen
|
||||||
|
TestLangEng: I want to read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplSlash (SlashVV wagen_VV (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))
|
||||||
|
TestLangGer: ich wage das Buch , zu lesen -- wrong
|
||||||
|
TestLangEng: I dare to read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplVV must_VV (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N))))
|
||||||
|
TestLangGer: ich muss das Buch lesen
|
||||||
|
TestLangEng: I must read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplVV want_VV (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N))))
|
||||||
|
TestLangGer: ich will das Buch lesen
|
||||||
|
TestLangEng: I want to read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplVV wagen_VV (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N))))
|
||||||
|
TestLangGer: ich wage , das Buch zu lesen
|
||||||
|
TestLangEng: I dare to read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplSlash (SlashVV must_VV (SlashVV want_VV (SlashV2a read_V2))) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))
|
||||||
|
TestLangGer: ich muss das Buch lesen wollen
|
||||||
|
TestLangEng: I must want to read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplSlash (SlashVV must_VV (SlashVV wagen_VV (SlashV2a read_V2))) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))
|
||||||
|
TestLangGer: ich muss das Buch wagen , zu lesen -- wrong
|
||||||
|
TestLangEng: I must dare to read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplSlash (SlashVV want_VV (SlashVV wagen_VV (SlashV2a read_V2))) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))
|
||||||
|
TestLangGer: ich will das Buch wagen , zu lesen -- wrong
|
||||||
|
TestLangEng: I want to dare to read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplSlash (SlashVV wagen_VV (SlashVV want_VV (SlashV2a read_V2))) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))
|
||||||
|
TestLangGer: ich wage das Buch , lesen zu wollen -- wrong
|
||||||
|
TestLangEng: I dare to want to read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplVV must_VV (ComplSlash (SlashVV want_VV (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (UseN book_N))))
|
||||||
|
TestLangGer: ich muss das Buch lesen wollen
|
||||||
|
TestLangEng: I must want to read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplVV must_VV (ComplSlash (SlashVV wagen_VV (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (UseN book_N))))
|
||||||
|
TestLangGer: ich muss das Buch wagen , zu lesen -- wrong
|
||||||
|
TestLangEng: I must dare to read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplVV want_VV (ComplSlash (SlashVV wagen_VV (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (UseN book_N))))
|
||||||
|
TestLangGer: ich will das Buch wagen , zu lesen -- wrong
|
||||||
|
TestLangEng: I want to dare to read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplVV wagen_VV (ComplSlash (SlashVV want_VV (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (UseN book_N))))
|
||||||
|
TestLangGer: ich wage , das Buch lesen zu wollen
|
||||||
|
TestLangEng: I dare to want to read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplVV must_VV (ComplVV want_VV (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))))
|
||||||
|
TestLangGer: ich muss das Buch lesen wollen
|
||||||
|
TestLangEng: I must want to read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplVV must_VV (ComplVV wagen_VV (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))))
|
||||||
|
TestLangGer: ich muss wagen , das Buch zu lesen
|
||||||
|
TestLangEng: I must dare to read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplVV want_VV (ComplVV wagen_VV (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))))
|
||||||
|
TestLangGer: ich will wagen , das Buch zu lesen
|
||||||
|
TestLangEng: I want to dare to read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplVV wagen_VV (ComplVV want_VV (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))))
|
||||||
|
TestLangGer: ich wage , das Buch lesen zu wollen
|
||||||
|
TestLangEng: I dare to want to read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplVV must_VV (ComplSlash (SlashVV want_VV (SlashVV wagen_VV (SlashV2a read_V2))) (DetCN (DetQuant DefArt NumSg) (UseN book_N))))
|
||||||
|
TestLangGer: ich muss das Buch wagen wollen , zu lesen -- wrong
|
||||||
|
TestLangEng: I must want to dare to read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplVV must_VV (ComplVV want_VV (ComplSlash (SlashVV wagen_VV (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))))
|
||||||
|
TestLangGer: ich muss das Buch wagen wollen , zu lesen -- wrong
|
||||||
|
TestLangEng: I must want to dare to read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplVV must_VV (ComplVV want_VV (ComplVV wagen_VV (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N))))))
|
||||||
|
TestLangGer: ich muss wagen wollen , das Buch zu lesen
|
||||||
|
TestLangEng: I must want to dare to read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplSlash (SlashVV must_VV (SlashVV wagen_VV (SlashVV want_VV (SlashV2a read_V2)))) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))
|
||||||
|
TestLangGer: ich muss das Buch wagen , lesen zu wollen -- wrong
|
||||||
|
TestLangEng: I must dare to want to read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplSlash (SlashVV must_VV (SlashVV want_VV (SlashVV wagen_VV (SlashV2a read_V2)))) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))
|
||||||
|
TestLangGer: ich muss das Buch wagen , zu lesen wollen -- wrong
|
||||||
|
TestLangEng: I must want to dare to read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplVV must_VV (ComplSlash (SlashVV wagen_VV (SlashVV want_VV (SlashV2a read_V2))) (DetCN (DetQuant DefArt NumSg) (UseN book_N))))
|
||||||
|
TestLangGer: ich muss das Buch wagen , lesen zu wollen -- wrong
|
||||||
|
TestLangEng: I must dare to want to read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplVV must_VV (ComplVV wagen_VV (ComplSlash (SlashVV want_VV (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))))
|
||||||
|
TestLangGer: ich muss wagen , das Buch lesen zu wollen
|
||||||
|
TestLangEng: I must dare to want to read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplVV must_VV (ComplVV wagen_VV (ComplVV want_VV (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N))))))
|
||||||
|
TestLangGer: ich muss wagen , das Buch lesen zu wollen
|
||||||
|
TestLangEng: I must dare to want to read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplSlash (SlashV2V lassen_V2V (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))) (UsePron he_Pron))
|
||||||
|
TestLangGer: ich lasse ihn das Buch lesen
|
||||||
|
TestLangEng: I let him read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplSlash (SlashV2V beg_V2V (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))) (UsePron he_Pron))
|
||||||
|
TestLangGer: ich bitte ihn , das Buch zu lesen
|
||||||
|
TestLangEng: I beg him to read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplSlash (SlashV2V versprechen_dat_V2V (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))) (UsePron he_Pron))
|
||||||
|
TestLangGer: ich verspreche ihm , das Buch zu lesen
|
||||||
|
TestLangEng: I promise him to read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplSlash (SlashV2V beg_V2V (ComplSlash (SlashV2V lassen_V2V (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))) (UsePron he_Pron))) (DetNP (DetQuant DefArt NumPl)))
|
||||||
|
TestLangGer: ich bitte die , ihn das Buch lesen zu lassen
|
||||||
|
TestLangEng: I beg them to let him read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplSlash (SlashV2V beg_V2V (ComplSlash (SlashV2V lassen_V2V (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))) (UsePron he_Pron))) (UsePron they_Pron))
|
||||||
|
TestLangGer: ich bitte sie , ihn das Buch lesen zu lassen
|
||||||
|
TestLangEng: I beg them to let him read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplSlash (SlashV2V versprechen_dat_V2V (ComplSlash (SlashV2V beg_V2V (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))) (UsePron he_Pron))) (DetNP (DetQuant DefArt NumPl)))
|
||||||
|
TestLangGer: ich verspreche denen , ihn zu bitten , das Buch zu lesen
|
||||||
|
TestLangEng: I promise them to beg him to read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplSlash (SlashV2V versprechen_dat_V2V (ComplSlash (SlashV2V beg_V2V (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))) (UsePron he_Pron))) (UsePron they_Pron))
|
||||||
|
TestLangGer: ich verspreche ihnen , ihn zu bitten , das Buch zu lesen
|
||||||
|
TestLangEng: I promise them to beg him to read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplSlash (SlashV2V beg_V2V (ComplSlash (SlashV2V versprechen_dat_V2V (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))) (UsePron he_Pron))) (UsePron he_Pron))
|
||||||
|
TestLangGer: ich bitte ihn , ihm zu versprechen , das Buch zu lesen
|
||||||
|
TestLangEng: I beg him to promise him to read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplSlash (SlashV2VNP lassen_V2V (UsePron he_Pron) (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))
|
||||||
|
TestLangGer: ich lasse das Buch ihn lesen -- wrong object order (3.9 SlashV2VNP)
|
||||||
|
TestLangEng: I let him read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplSlash (SlashV2VNP beg_V2V (UsePron he_Pron) (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))
|
||||||
|
TestLangGer: ich bitte das Buch ihn , zu lesen -- wrong (SlashV2VNP)
|
||||||
|
TestLangEng: I beg him to read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplSlash (SlashV2VNP versprechen_dat_V2V (UsePron he_Pron) (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))
|
||||||
|
TestLangGer: ich verspreche das Buch ihm , zu lesen -- wrong (SlashV2VNP)
|
||||||
|
TestLangEng: I promise him to read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplSlash (SlashV2VNP beg_V2V (DetNP (DetQuant DefArt NumPl)) (SlashV2VNP lassen_V2V (UsePron he_Pron) (SlashV2a read_V2))) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))
|
||||||
|
TestLangGer: ich bitte das Buch ihn die , zu lassen lesen -- wrong (SlahV2VNP) bitte die, ihn es lesen zu lassen
|
||||||
|
TestLangEng: I beg them to let him read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplSlash (SlashV2VNP beg_V2V (UsePron they_Pron) (SlashV2VNP lassen_V2V (UsePron he_Pron) (SlashV2a read_V2))) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))
|
||||||
|
TestLangGer: ich bitte das Buch ihn sie , zu lassen lesen -- wrong (SlashV2VNP)
|
||||||
|
TestLangEng: I beg them to let him read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplSlash (SlashV2V beg_V2V (ComplSlash (SlashV2VNP lassen_V2V (UsePron he_Pron) (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))) (DetNP (DetQuant DefArt NumPl)))
|
||||||
|
TestLangGer: ich bitte die , das Buch ihn lesen zu lassen -- wrong obj order
|
||||||
|
TestLangEng: I beg them to let him read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplSlash (SlashV2V beg_V2V (ComplSlash (SlashV2VNP lassen_V2V (UsePron he_Pron) (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))) (UsePron they_Pron))
|
||||||
|
TestLangGer: ich bitte sie , das Buch ihn lesen zu lassen -- wrong obj order
|
||||||
|
TestLangEng: I beg them to let him read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplSlash (SlashV2VNP versprechen_dat_V2V (DetNP (DetQuant DefArt NumPl)) (SlashV2VNP beg_V2V (UsePron he_Pron) (SlashV2a read_V2))) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))
|
||||||
|
TestLangGer: ich verspreche das Buch ihn denen , zu bitten zu lesen -- wrong (SlashV2VNP gf-3.9))
|
||||||
|
TestLangEng: I promise them to beg him to read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplSlash (SlashV2VNP versprechen_dat_V2V (UsePron they_Pron) (SlashV2VNP beg_V2V (UsePron he_Pron) (SlashV2a read_V2))) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))
|
||||||
|
TestLangGer: ich verspreche das Buch ihn ihnen , zu bitten zu lesen -- wrong (SlashV2VNP)
|
||||||
|
TestLangEng: I promise them to beg him to read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplSlash (SlashV2V versprechen_dat_V2V (ComplSlash (SlashV2VNP beg_V2V (UsePron he_Pron) (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))) (DetNP (DetQuant DefArt NumPl)))
|
||||||
|
TestLangGer: ich verspreche denen , das Buch ihn zu bitten , zu lesen -- wrong obj order
|
||||||
|
TestLangEng: I promise them to beg him to read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplSlash (SlashV2V versprechen_dat_V2V (ComplSlash (SlashV2VNP beg_V2V (UsePron he_Pron) (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))) (UsePron they_Pron))
|
||||||
|
TestLangGer: ich verspreche ihnen , das Buch ihn zu bitten , zu lesen -- wrong obj order
|
||||||
|
TestLangEng: I promise them to beg him to read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplSlash (SlashV2VNP beg_V2V (UsePron he_Pron) (SlashV2VNP versprechen_dat_V2V (UsePron he_Pron) (SlashV2a read_V2))) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))
|
||||||
|
TestLangGer: ich bitte das Buch ihm ihn , zu versprechen zu lesen -- wrong (SlashV2VNP)
|
||||||
|
TestLangEng: I beg him to promise him to read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplSlash (SlashV2V beg_V2V (ComplSlash (SlashV2VNP versprechen_dat_V2V (UsePron he_Pron) (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))) (UsePron he_Pron))
|
||||||
|
TestLangGer: ich bitte ihn , das Buch ihm zu versprechen , zu lesen -- wrong (SlashV2VNP)
|
||||||
|
TestLangEng: I beg him to promise him to read the book
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplSlash (SlashV2V beg_V2V (ReflVP (SlashV2a love_V2))) (UsePron youSg_Pron))
|
||||||
|
TestLangGer: ich bitte dich , dich zu lieben
|
||||||
|
TestLangEng: I beg you to love yourself
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplSlash (SlashV2V warnen_V2V (ReflVP (SlashV2a hate_V2))) (UsePron youPl_Pron))
|
||||||
|
TestLangGer: ich warne euch , euch zu hassen
|
||||||
|
TestLangEng: I warn you to hate yourselves
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplSlash (SlashV2V versprechen_dat_V2V (ReflVP (SlashV2a love_V2))) (UsePron she_Pron))
|
||||||
|
TestLangGer: ich verspreche ihr , mich zu lieben
|
||||||
|
TestLangEng: I promise her to love herself -- wrong: myself
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplSlash (SlashV2V versprechen_dat_V2V (ComplVV want_VV (ReflVP (SlashV2a love_V2)))) (UsePron she_Pron))
|
||||||
|
TestLangGer: ich verspreche ihr , mich lieben zu wollen
|
||||||
|
TestLangEng: I promise her to want to love herself -- wrong: myself
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplVV want_VV (ComplSlash (SlashV2V beg_V2V (ComplSlash (SlashV2Vneg versprechen_dat_V2V (ReflVP (SlashV2a hate_V2))) (UsePron youSg_Pron))) (UsePron she_Pron)))
|
||||||
|
TestLangGer: ich will sie bitten , dir zu versprechen , sich nicht zu hassen
|
||||||
|
TestLangEng: I want to beg her to promise you not to hate yourself -- wrong: herself
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplSlash (SlashV2V versprechen_dat_V2V (ComplSlash (ReflVPSlash entschuldigen_bei_fuer_rV3) (UsePron it_Pron))) (UsePron she_Pron))
|
||||||
|
TestLangGer: ich verspreche ihr , mich bei mir für es zu entschuldigen
|
||||||
|
TestLangEng: I promise her to apologize for it itself -- wrong: myself
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplSlash (SlashV2V versprechen_dat_V2V (ComplSlash (ReflVPSlash give_V3) (UsePron it_Pron))) (UsePron we_Pron))
|
||||||
|
TestLangGer: ich verspreche uns , es mir zu geben
|
||||||
|
TestLangEng: I promise us to give it itself -- wrong: myself
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplVV want_VV (ComplSlash (SlashV2V versprechen_dat_V2V (ComplSlash (SlashV2Vneg beg_V2V (ReflVP (SlashV2a hate_V2))) (UsePron youSg_Pron))) (UsePron she_Pron)))
|
||||||
|
TestLangGer: ich will ihr versprechen , dich zu bitten , dich nicht zu hassen
|
||||||
|
TestLangEng: I want to promise her to beg you to not hate yourself
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplSlash (SlashV2V beg_V2V (ComplSlash (ReflVPSlash entschuldigen_bei_fuer_rV3) (UsePron it_Pron))) (UsePron youSg_Pron))
|
||||||
|
TestLangGer: ich bitte dich , dich bei dir für es zu entschuldigen
|
||||||
|
TestLangEng: I beg you to apologize for it itself -- wrong: yourself
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplSlash (SlashV2V beg_V2V (ComplSlash (SlashV2V versprechen_dat_V2V (ReflVP (SlashV2a love_V2))) (UsePron i_Pron))) (UsePron youSg_Pron))
|
||||||
|
TestLangGer: ich bitte dich , mir zu versprechen , dich zu lieben
|
||||||
|
TestLangEng: I beg you to promise me to love myself
|
||||||
|
TestLang: PredVP (UsePron i_Pron) (ComplSlash (SlashV2V helfen_V2V (ComplSlash (SlashV2V versprechen_dat_V2V (ReflVP (SlashV2a love_V2))) (UsePron i_Pron))) (UsePron youSg_Pron))
|
||||||
|
TestLangGer: ich helfe dir , mir zu versprechen , dich zu lieben
|
||||||
|
TestLangEng: I help you to promise me to love myself
|
||||||
|
TestLang: DetCN (DetQuant DefArt NumSg) (RelCN (UseN book_N) (UseRCl (TTAnt TPast ASimul) PNeg (RelSlash IdRP (SlashVP (UsePron we_Pron) (SlashVV want_VV (SlashV2a read_V2))))))
|
||||||
|
TestLangGer: das Buch , das wir nicht lesen wollten
|
||||||
|
TestLangEng: the book that we didn't want to read
|
||||||
|
TestLang: DetCN (DetQuant DefArt NumSg) (RelCN (UseN book_N) (UseRCl (TTAnt TPast ASimul) PNeg (RelSlash IdRP (SlashVP (UsePron we_Pron) (SlashVV must_VV (SlashV2a read_V2))))))
|
||||||
|
TestLangGer: das Buch , das wir nicht lesen mussten
|
||||||
|
TestLangEng: the book that we hadn't to read
|
||||||
|
TestLang: DetCN (DetQuant DefArt NumSg) (RelCN (UseN book_N) (UseRCl (TTAnt TPast ASimul) PNeg (RelSlash IdRP (SlashVP (UsePron we_Pron) (SlashVV wagen_VV (SlashV2a read_V2))))))
|
||||||
|
TestLangGer: das Buch , das wir nicht wagten , zu lesen
|
||||||
|
TestLangEng: the book that we didn't dare to read
|
||||||
|
TestLang: DetCN (DetQuant DefArt NumSg) (RelCN (UseN book_N) (UseRCl (TTAnt TPast ASimul) PNeg (RelSlash IdRP (SlashVP (UsePron we_Pron) (SlashVV wagen_VV (Slash3V3 erklaeren_dat_V3 (UsePron she_Pron)))))))
|
||||||
|
TestLangGer: das Buch , das wir nicht wagten , ihr zu erklären
|
||||||
|
TestLangEng: the book that we didn't dare to explain to her
|
||||||
|
TestLang: DetCN (DetQuant DefArt NumSg) (RelCN (UseN book_N) (UseRCl (TTAnt TPres ASimul) PPos (RelSlash IdRP (SlashVP (UsePron we_Pron) (SlashV2VNP versprechen_dat_V2V (UsePron she_Pron) (SlashV2a read_V2))))))
|
||||||
|
TestLangGer: das Buch , das wir ihr versprechen , zu lesen -- wrong: das zu lesen wir ihr versprechen
|
||||||
|
TestLangEng: the book that we promise her to read
|
||||||
|
TestLang: DetCN (DetQuant DefArt NumSg) (RelCN (UseN book_N) (UseRCl (TTAnt TPres ASimul) PPos (RelSlash IdRP (SlashVP (UsePron we_Pron) (SlashV2VNP lassen_V2V (UsePron she_Pron) (SlashV2a read_V2))))))
|
||||||
|
TestLangGer: das Buch , das wir sie lesen lassen
|
||||||
|
TestLangEng: the book that we let her read
|
||||||
|
TestLang: DetCN (DetQuant DefArt NumSg) (RelCN (UseN boy_N) (UseRCl (TTAnt TPres ASimul) PPos (RelSlash IdRP (SlashVP (UsePron i_Pron) (SlashV2V lassen_V2V (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N))))))))
|
||||||
|
TestLangGer: der Junge , den ich das Buch lesen lasse
|
||||||
|
TestLangEng: the boy that I let read the book
|
||||||
|
TestLang: DetCN (DetQuant DefArt NumSg) (RelCN (UseN boy_N) (UseRCl (TTAnt TPres ASimul) PPos (RelSlash IdRP (SlashVP (UsePron i_Pron) (SlashV2V versprechen_dat_V2V (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N))))))))
|
||||||
|
TestLangGer: der Junge , dem ich verspreche , das Buch zu lesen
|
||||||
|
TestLangEng: the boy that I promise to read the book
|
||||||
|
TestLang: DetCN (DetQuant DefArt NumSg) (RelCN (UseN boy_N) (UseRCl (TTAnt TPres ASimul) PPos (RelSlash IdRP (SlashVP (UsePron i_Pron) (SlashV2V versprechen_dat_V2V (ComplSlash (SlashVV want_VV (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (UseN book_N))))))))
|
||||||
|
TestLangGer: der Junge , dem ich verspreche , das Buch lesen zu wollen
|
||||||
|
TestLangEng: the boy that I promise to want to read the book
|
||||||
|
TestLang: DetCN (DetQuant DefArt NumSg) (RelCN (UseN boy_N) (UseRCl (TTAnt TPres ASimul) PPos (RelSlash IdRP (SlashVP (UsePron i_Pron) (SlashV2V versprechen_dat_V2V (ComplVV want_VV (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))))))))
|
||||||
|
TestLangGer: der Junge , dem ich verspreche , das Buch lesen zu wollen
|
||||||
|
TestLangEng: the boy that I promise to want to read the book
|
||||||
|
TestLang: DetCN (DetQuant DefArt NumSg) (RelCN (UseN boy_N) (UseRCl (TTAnt TPres ASimul) PPos (RelSlash IdRP (SlashVP (UsePron i_Pron) (SlashV2V helfen_V2V (ReflVP (SlashV2a wash_V2)))))))
|
||||||
|
TestLangGer: der Junge , dem ich helfe , mich zu waschen -- wrong: sich zu waschen
|
||||||
|
TestLangEng: the boy that I help to wash myself -- wrong: wash himself
|
||||||
|
TestLang: PredVP (UsePN john_PN) (ComplVS say_VS (UseCl (TTAnt TPast ASimul) PPos (PredVP (UsePron we_Pron) (ComplVV want_VV (ComplSlash (SlashV2V lassen_V2V (ComplSlash (SlashV2V helfen_V2V (ComplSlash (SlashV2A paint_V2A (PositA blue_A)) (DetCN (DetQuant DefArt NumSg) (UseN house_N)))) (UsePron he_Pron))) (DetCN (DetQuant DefArt NumPl) (UseN child_N)))))))
|
||||||
|
TestLangGer: Johann sagt , dass wir die Kinder ihm helfen lassen wollten , das Haus blau zu malen
|
||||||
|
TestLangEng: John says that we wanted to let the children help him to paint the house blue
|
||||||
195
tests/german/infinitives.trees
Normal file
195
tests/german/infinitives.trees
Normal file
@@ -0,0 +1,195 @@
|
|||||||
|
-- V2V o V2 and V2V o V2V o V2 works:
|
||||||
|
|
||||||
|
-- -auxV2V o V2
|
||||||
|
|
||||||
|
(PredVP (UsePron i_Pron) (ComplSlash (SlashV2V versprechen_dat_V2V (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))) (UsePron youPl_Pron)))
|
||||||
|
|
||||||
|
-- +auxV2V o V2
|
||||||
|
|
||||||
|
(PredVP (UsePron i_Pron) (ComplSlash (SlashV2V lassen_V2V (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))) (UsePron youPl_Pron)))
|
||||||
|
|
||||||
|
-- -auxV2V o -auxV2V
|
||||||
|
|
||||||
|
(PredVP (UsePron i_Pron) (ComplSlash (SlashV2V beg_V2V (ComplSlash (SlashV2V versprechen_dat_V2V (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))) (UsePron we_Pron))) (UsePron youSg_Pron)))
|
||||||
|
|
||||||
|
-- +auxV2V o -auxV2V
|
||||||
|
|
||||||
|
(PredVP (UsePron i_Pron) (ComplSlash (SlashV2V lassen_V2V (ComplSlash (SlashV2V versprechen_dat_V2V (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))) (UsePron we_Pron))) (UsePron youSg_Pron)))
|
||||||
|
|
||||||
|
-- -auxV2V o +auxV2V
|
||||||
|
|
||||||
|
(PredVP (UsePron i_Pron) (ComplSlash (SlashV2V beg_V2V (ComplSlash (SlashV2V lassen_V2V (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))) (UsePron we_Pron))) (UsePron youSg_Pron)))
|
||||||
|
|
||||||
|
-- +auxV2V o +auxV2V
|
||||||
|
|
||||||
|
(PredVP (UsePron i_Pron) (ComplSlash (SlashV2V lassen_V2V (ComplSlash (SlashV2V lassen_V2V (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))) (UsePron we_Pron))) (UsePron youSg_Pron)))
|
||||||
|
|
||||||
|
-- ---------- VV combined with V2 and V2V ----------
|
||||||
|
|
||||||
|
-- VV o V2 ok
|
||||||
|
|
||||||
|
(PredVP (UsePron i_Pron) (ComplVV want_VV (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))))
|
||||||
|
|
||||||
|
(PredVP (UsePron i_Pron) (ComplVV wagen_VV (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))))
|
||||||
|
|
||||||
|
-- VV o -auxV2V ok:
|
||||||
|
|
||||||
|
(PredVP (UsePron i_Pron) (ComplVV must_VV (ComplSlash (SlashV2V versprechen_dat_V2V (UseV sleep_V)) (UsePron she_Pron))))
|
||||||
|
|
||||||
|
(PredVP (UsePron i_Pron) (ComplVV wagen_VV (ComplSlash (SlashV2V versprechen_dat_V2V (UseV sleep_V)) (UsePron she_Pron))))
|
||||||
|
|
||||||
|
-- VV o +auxV2V ok:
|
||||||
|
|
||||||
|
(PredVP (UsePron i_Pron) (ComplVV must_VV (ComplSlash (SlashV2V lassen_V2V (UseV sleep_V)) (UsePron she_Pron))))
|
||||||
|
|
||||||
|
(PredVP (UsePron i_Pron) (ComplVV wagen_VV (ComplSlash (SlashV2V lassen_V2V (UseV sleep_V)) (UsePron she_Pron))))
|
||||||
|
|
||||||
|
-- +auxVV o -auxV2V o +auxV2V:
|
||||||
|
|
||||||
|
(PredVP (UsePron i_Pron) (ComplVV must_VV (ComplSlash (SlashV2V versprechen_dat_V2V (ComplSlash (SlashV2V lassen_V2V (UseV sleep_V)) (UsePron she_Pron))) (UsePron she_Pron))))
|
||||||
|
|
||||||
|
-- +auxVV o +auxV2V o V2:
|
||||||
|
|
||||||
|
(PredVP (UsePron i_Pron) (ComplVV must_VV (ComplSlash (SlashV2V lassen_V2V (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))) (UsePron she_Pron))))
|
||||||
|
|
||||||
|
-- +auxVV o -auxV2V o +auxV2V o V2:
|
||||||
|
|
||||||
|
(PredVP (UsePron i_Pron) (ComplVV want_VV (ComplSlash (SlashV2V versprechen_dat_V2V (ComplSlash (SlashV2V lassen_V2V (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))) (UsePron she_Pron))) (UsePron he_Pron))))
|
||||||
|
|
||||||
|
-- +auxVV o +auxVV o -auxV2V o +auxV2V o V2:
|
||||||
|
|
||||||
|
(PredVP (UsePron i_Pron) (ComplVV must_VV (ComplVV want_VV (ComplSlash (SlashV2V versprechen_dat_V2V (ComplSlash (SlashV2V lassen_V2V (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))) (UsePron she_Pron))) (UsePron he_Pron)))))
|
||||||
|
|
||||||
|
-- ComplSlash o SlashVV
|
||||||
|
(PredVP (UsePron i_Pron) (ComplSlash (SlashVV must_VV (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (UseN book_N))))
|
||||||
|
(PredVP (UsePron i_Pron) (ComplSlash (SlashVV want_VV (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (UseN book_N))))
|
||||||
|
(PredVP (UsePron i_Pron) (ComplSlash (SlashVV wagen_VV (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (UseN book_N))))
|
||||||
|
|
||||||
|
-- ComplVV o ComplSlash
|
||||||
|
(PredVP (UsePron i_Pron) (ComplVV must_VV (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))))
|
||||||
|
(PredVP (UsePron i_Pron) (ComplVV want_VV (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))))
|
||||||
|
(PredVP (UsePron i_Pron) (ComplVV wagen_VV (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))))
|
||||||
|
|
||||||
|
-- ComplSlash o SlashVV o SlashVV
|
||||||
|
(PredVP (UsePron i_Pron) (ComplSlash (SlashVV must_VV (SlashVV want_VV (SlashV2a read_V2))) (DetCN (DetQuant DefArt NumSg) (UseN book_N))))
|
||||||
|
(PredVP (UsePron i_Pron) (ComplSlash (SlashVV must_VV (SlashVV wagen_VV (SlashV2a read_V2))) (DetCN (DetQuant DefArt NumSg) (UseN book_N))))
|
||||||
|
(PredVP (UsePron i_Pron) (ComplSlash (SlashVV want_VV (SlashVV wagen_VV (SlashV2a read_V2))) (DetCN (DetQuant DefArt NumSg) (UseN book_N))))
|
||||||
|
(PredVP (UsePron i_Pron) (ComplSlash (SlashVV wagen_VV (SlashVV want_VV (SlashV2a read_V2))) (DetCN (DetQuant DefArt NumSg) (UseN book_N))))
|
||||||
|
|
||||||
|
-- ComplVV o ComplSlash o SlashVV
|
||||||
|
(PredVP (UsePron i_Pron) (ComplVV must_VV (ComplSlash (SlashVV want_VV (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))))
|
||||||
|
(PredVP (UsePron i_Pron) (ComplVV must_VV (ComplSlash (SlashVV wagen_VV (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))))
|
||||||
|
(PredVP (UsePron i_Pron) (ComplVV want_VV (ComplSlash (SlashVV wagen_VV (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))))
|
||||||
|
(PredVP (UsePron i_Pron) (ComplVV wagen_VV (ComplSlash (SlashVV want_VV (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))))
|
||||||
|
|
||||||
|
-- ComplVV o ComplVV o ComplSlash
|
||||||
|
(PredVP (UsePron i_Pron) (ComplVV must_VV (ComplVV want_VV (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N))))))
|
||||||
|
(PredVP (UsePron i_Pron) (ComplVV must_VV (ComplVV wagen_VV (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N))))))
|
||||||
|
(PredVP (UsePron i_Pron) (ComplVV want_VV (ComplVV wagen_VV (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N))))))
|
||||||
|
(PredVP (UsePron i_Pron) (ComplVV wagen_VV (ComplVV want_VV (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N))))))
|
||||||
|
|
||||||
|
-- ComplVV o ComplSlash o SlashVV o SlashVV
|
||||||
|
(PredVP (UsePron i_Pron) (ComplVV must_VV (ComplSlash (SlashVV want_VV (SlashVV wagen_VV (SlashV2a read_V2))) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))))
|
||||||
|
|
||||||
|
- ComplVV o ComplVV o ComplSlash o SlashVV
|
||||||
|
(PredVP (UsePron i_Pron) (ComplVV must_VV (ComplVV want_VV (ComplSlash (SlashVV wagen_VV (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (UseN book_N))))))
|
||||||
|
|
||||||
|
-- ComplVV o ComplVV o ComplVV o ComplSlash
|
||||||
|
(PredVP (UsePron i_Pron) (ComplVV must_VV (ComplVV want_VV (ComplVV wagen_VV (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))))))
|
||||||
|
|
||||||
|
-- ComplSlash o SlashVV o SlashVV o SlashVV
|
||||||
|
(PredVP (UsePron i_Pron) (ComplSlash (SlashVV must_VV (SlashVV wagen_VV (SlashVV want_VV (SlashV2a read_V2)))) (DetCN (DetQuant DefArt NumSg) (UseN book_N))))
|
||||||
|
(PredVP (UsePron i_Pron) (ComplSlash (SlashVV must_VV (SlashVV want_VV (SlashVV wagen_VV (SlashV2a read_V2)))) (DetCN (DetQuant DefArt NumSg) (UseN book_N))))
|
||||||
|
|
||||||
|
-- ComplVV o ComplSlash o SlashVV o SlashVV
|
||||||
|
(PredVP (UsePron i_Pron) (ComplVV must_VV (ComplSlash (SlashVV wagen_VV (SlashVV want_VV (SlashV2a read_V2))) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))))
|
||||||
|
|
||||||
|
-- ComplVV o ComplVV o ComplSlash o SlashVV
|
||||||
|
(PredVP (UsePron i_Pron) (ComplVV must_VV (ComplVV wagen_VV (ComplSlash (SlashVV want_VV (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (UseN book_N))))))
|
||||||
|
|
||||||
|
-- ComplVV o ComplVV o ComplVV o ComplSlash
|
||||||
|
(PredVP (UsePron i_Pron) (ComplVV must_VV (ComplVV wagen_VV (ComplVV want_VV (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))))))
|
||||||
|
|
||||||
|
-- ComplSlash o SlashV2V o ComplSlash
|
||||||
|
(PredVP (UsePron i_Pron) (ComplSlash (SlashV2V lassen_V2V (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))) (UsePron he_Pron)))
|
||||||
|
(PredVP (UsePron i_Pron) (ComplSlash (SlashV2V beg_V2V (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))) (UsePron he_Pron)))
|
||||||
|
(PredVP (UsePron i_Pron) (ComplSlash (SlashV2V versprechen_dat_V2V (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))) (UsePron he_Pron)))
|
||||||
|
-- ComplSlash o SlashV2V o ComplSlash o SlashV2V o ComplSlash
|
||||||
|
(PredVP (UsePron i_Pron) (ComplSlash (SlashV2V beg_V2V (ComplSlash (SlashV2V lassen_V2V (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))) (UsePron he_Pron))) (DetNP (DetQuant DefArt NumPl))))
|
||||||
|
(PredVP (UsePron i_Pron) (ComplSlash (SlashV2V beg_V2V (ComplSlash (SlashV2V lassen_V2V (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))) (UsePron he_Pron))) (UsePron they_Pron)))
|
||||||
|
(PredVP (UsePron i_Pron) (ComplSlash (SlashV2V versprechen_dat_V2V (ComplSlash (SlashV2V beg_V2V (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))) (UsePron he_Pron))) (DetNP (DetQuant DefArt NumPl))))
|
||||||
|
(PredVP (UsePron i_Pron) (ComplSlash (SlashV2V versprechen_dat_V2V (ComplSlash (SlashV2V beg_V2V (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))) (UsePron he_Pron))) (UsePron they_Pron)))
|
||||||
|
(PredVP (UsePron i_Pron) (ComplSlash (SlashV2V beg_V2V (ComplSlash (SlashV2V versprechen_dat_V2V (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))) (UsePron he_Pron))) (UsePron he_Pron)))
|
||||||
|
|
||||||
|
|
||||||
|
(PredVP (UsePron i_Pron) (ComplSlash (SlashV2VNP lassen_V2V (UsePron he_Pron) (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (UseN book_N))))
|
||||||
|
(PredVP (UsePron i_Pron) (ComplSlash (SlashV2VNP beg_V2V (UsePron he_Pron) (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (UseN book_N))))
|
||||||
|
(PredVP (UsePron i_Pron) (ComplSlash (SlashV2VNP versprechen_dat_V2V (UsePron he_Pron) (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (UseN book_N))))
|
||||||
|
(PredVP (UsePron i_Pron) (ComplSlash (SlashV2VNP beg_V2V (DetNP (DetQuant DefArt NumPl)) (SlashV2VNP lassen_V2V (UsePron he_Pron) (SlashV2a read_V2))) (DetCN (DetQuant DefArt NumSg) (UseN book_N))))
|
||||||
|
(PredVP (UsePron i_Pron) (ComplSlash (SlashV2VNP beg_V2V (UsePron they_Pron) (SlashV2VNP lassen_V2V (UsePron he_Pron) (SlashV2a read_V2))) (DetCN (DetQuant DefArt NumSg) (UseN book_N))))
|
||||||
|
(PredVP (UsePron i_Pron) (ComplSlash (SlashV2V beg_V2V (ComplSlash (SlashV2VNP lassen_V2V (UsePron he_Pron) (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))) (DetNP (DetQuant DefArt NumPl))))
|
||||||
|
(PredVP (UsePron i_Pron) (ComplSlash (SlashV2V beg_V2V (ComplSlash (SlashV2VNP lassen_V2V (UsePron he_Pron) (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))) (UsePron they_Pron)))
|
||||||
|
(PredVP (UsePron i_Pron) (ComplSlash (SlashV2VNP versprechen_dat_V2V (DetNP (DetQuant DefArt NumPl)) (SlashV2VNP beg_V2V (UsePron he_Pron) (SlashV2a read_V2))) (DetCN (DetQuant DefArt NumSg) (UseN book_N))))
|
||||||
|
(PredVP (UsePron i_Pron) (ComplSlash (SlashV2VNP versprechen_dat_V2V (UsePron they_Pron) (SlashV2VNP beg_V2V (UsePron he_Pron) (SlashV2a read_V2))) (DetCN (DetQuant DefArt NumSg) (UseN book_N))))
|
||||||
|
(PredVP (UsePron i_Pron) (ComplSlash (SlashV2V versprechen_dat_V2V (ComplSlash (SlashV2VNP beg_V2V (UsePron he_Pron) (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))) (DetNP (DetQuant DefArt NumPl))))
|
||||||
|
(PredVP (UsePron i_Pron) (ComplSlash (SlashV2V versprechen_dat_V2V (ComplSlash (SlashV2VNP beg_V2V (UsePron he_Pron) (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))) (UsePron they_Pron)))
|
||||||
|
(PredVP (UsePron i_Pron) (ComplSlash (SlashV2VNP beg_V2V (UsePron he_Pron) (SlashV2VNP versprechen_dat_V2V (UsePron he_Pron) (SlashV2a read_V2))) (DetCN (DetQuant DefArt NumSg) (UseN book_N))))
|
||||||
|
(PredVP (UsePron i_Pron) (ComplSlash (SlashV2V beg_V2V (ComplSlash (SlashV2VNP versprechen_dat_V2V (UsePron he_Pron) (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))) (UsePron he_Pron)))
|
||||||
|
|
||||||
|
-- V2V o ReflVP with object control (default)
|
||||||
|
(PredVP (UsePron i_Pron) (ComplSlash (SlashV2V beg_V2V (ReflVP (SlashV2a love_V2))) (UsePron youSg_Pron)))
|
||||||
|
(PredVP (UsePron i_Pron) (ComplSlash (SlashV2V warnen_V2V (ReflVP (SlashV2a hate_V2))) (UsePron youPl_Pron)))
|
||||||
|
|
||||||
|
-- V2V o ReflVP with subject control
|
||||||
|
(PredVP (UsePron i_Pron) (ComplSlash (SlashV2V versprechen_dat_V2V (ReflVP (SlashV2a love_V2))) (UsePron she_Pron)))
|
||||||
|
(PredVP (UsePron i_Pron) (ComplSlash (SlashV2V versprechen_dat_V2V (ComplVV want_VV (ReflVP (SlashV2a love_V2)))) (UsePron she_Pron)))
|
||||||
|
|
||||||
|
-- +auxVV o (V2V object control) o (V2V subject control) o ReflVP
|
||||||
|
(PredVP (UsePron i_Pron) (ComplVV want_VV (ComplSlash (SlashV2V beg_V2V (ComplSlash (SlashV2Vneg versprechen_dat_V2V (ReflVP (SlashV2a hate_V2))) (UsePron youSg_Pron))) (UsePron she_Pron))))
|
||||||
|
|
||||||
|
-- V2V o ReflVPSlash with subject control
|
||||||
|
|
||||||
|
PredVP (UsePron i_Pron) (ComplSlash (SlashV2V versprechen_dat_V2V (ComplSlash (ReflVPSlash entschuldigen_bei_fuer_rV3) (UsePron it_Pron))) (UsePron she_Pron))
|
||||||
|
(PredVP (UsePron i_Pron) (ComplSlash (SlashV2V versprechen_dat_V2V (ComplSlash (ReflVPSlash give_V3) (UsePron it_Pron))) (UsePron we_Pron)))
|
||||||
|
|
||||||
|
(PredVP (UsePron i_Pron) (ComplVV want_VV (ComplSlash (SlashV2V versprechen_dat_V2V (ComplSlash (SlashV2Vneg beg_V2V (ReflVP (SlashV2a hate_V2))) (UsePron youSg_Pron))) (UsePron she_Pron))))
|
||||||
|
|
||||||
|
-- V2V o ReflVPSlash with object control
|
||||||
|
PredVP (UsePron i_Pron) (ComplSlash (SlashV2V beg_V2V (ComplSlash (ReflVPSlash entschuldigen_bei_fuer_rV3) (UsePron it_Pron))) (UsePron youSg_Pron))
|
||||||
|
|
||||||
|
-- SlashV2V o SlashV2V o ReflVP with object control o subject control
|
||||||
|
|
||||||
|
PredVP (UsePron i_Pron) (ComplSlash (SlashV2V beg_V2V (ComplSlash (SlashV2V versprechen_dat_V2V (ReflVP (SlashV2a love_V2))) (UsePron i_Pron))) (UsePron youSg_Pron))
|
||||||
|
|
||||||
|
PredVP (UsePron i_Pron) (ComplSlash (SlashV2V helfen_V2V (ComplSlash (SlashV2V versprechen_dat_V2V (ReflVP (SlashV2a love_V2))) (UsePron i_Pron))) (UsePron youSg_Pron))
|
||||||
|
|
||||||
|
-- VP.inf with extracted NP (testing SlashVV, SlashV2VNP)
|
||||||
|
|
||||||
|
DetCN (DetQuant DefArt NumSg) (RelCN (UseN book_N) (UseRCl (TTAnt TPast ASimul) PNeg (RelSlash IdRP (SlashVP (UsePron we_Pron) (SlashVV want_VV (SlashV2a read_V2))))))
|
||||||
|
|
||||||
|
DetCN (DetQuant DefArt NumSg) (RelCN (UseN book_N) (UseRCl (TTAnt TPast ASimul) PNeg (RelSlash IdRP (SlashVP (UsePron we_Pron) (SlashVV must_VV (SlashV2a read_V2))))))
|
||||||
|
|
||||||
|
DetCN (DetQuant DefArt NumSg) (RelCN (UseN book_N) (UseRCl (TTAnt TPast ASimul) PNeg (RelSlash IdRP (SlashVP (UsePron we_Pron) (SlashVV wagen_VV (SlashV2a read_V2))))))
|
||||||
|
|
||||||
|
DetCN (DetQuant DefArt NumSg) (RelCN (UseN book_N) (UseRCl (TTAnt TPast ASimul) PNeg (RelSlash IdRP (SlashVP (UsePron we_Pron) (SlashVV wagen_VV (Slash3V3 erklaeren_dat_V3 (UsePron she_Pron)))))))
|
||||||
|
|
||||||
|
DetCN (DetQuant DefArt NumSg) (RelCN (UseN book_N) (UseRCl (TTAnt TPres ASimul) PPos (RelSlash IdRP (SlashVP (UsePron we_Pron) (SlashV2VNP versprechen_dat_V2V (UsePron she_Pron) (SlashV2a read_V2))))))
|
||||||
|
|
||||||
|
DetCN (DetQuant DefArt NumSg) (RelCN (UseN book_N) (UseRCl (TTAnt TPres ASimul) PPos (RelSlash IdRP (SlashVP (UsePron we_Pron) (SlashV2VNP lassen_V2V (UsePron she_Pron) (SlashV2a read_V2))))))
|
||||||
|
|
||||||
|
--
|
||||||
|
|
||||||
|
DetCN (DetQuant DefArt NumSg) (RelCN (UseN boy_N) (UseRCl (TTAnt TPres ASimul) PPos (RelSlash IdRP (SlashVP (UsePron i_Pron) (SlashV2V lassen_V2V (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N))))))))
|
||||||
|
|
||||||
|
DetCN (DetQuant DefArt NumSg) (RelCN (UseN boy_N) (UseRCl (TTAnt TPres ASimul) PPos (RelSlash IdRP (SlashVP (UsePron i_Pron) (SlashV2V versprechen_dat_V2V (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N))))))))
|
||||||
|
|
||||||
|
DetCN (DetQuant DefArt NumSg) (RelCN (UseN boy_N) (UseRCl (TTAnt TPres ASimul) PPos (RelSlash IdRP (SlashVP (UsePron i_Pron) (SlashV2V versprechen_dat_V2V (ComplSlash (SlashVV want_VV (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (UseN book_N))))))))
|
||||||
|
|
||||||
|
DetCN (DetQuant DefArt NumSg) (RelCN (UseN boy_N) (UseRCl (TTAnt TPres ASimul) PPos (RelSlash IdRP (SlashVP (UsePron i_Pron) (SlashV2V versprechen_dat_V2V (ComplVV want_VV (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (UseN book_N)))))))))
|
||||||
|
|
||||||
|
DetCN (DetQuant DefArt NumSg) (RelCN (UseN boy_N) (UseRCl (TTAnt TPres ASimul) PPos (RelSlash IdRP (SlashVP (UsePron i_Pron) (SlashV2V helfen_V2V (ReflVP (SlashV2a wash_V2)))))))
|
||||||
|
|
||||||
|
-- Shieber's example
|
||||||
|
|
||||||
|
PredVP (UsePN john_PN) (ComplVS say_VS (UseCl (TTAnt TPast ASimul) PPos (PredVP (UsePron we_Pron) (ComplVV want_VV (ComplSlash (SlashV2V lassen_V2V (ComplSlash (SlashV2V helfen_V2V (ComplSlash (SlashV2A paint_V2A (PositA blue_A)) (DetCN (DetQuant DefArt NumSg) (UseN house_N)))) (UsePron he_Pron))) (DetCN (DetQuant DefArt NumPl) (UseN child_N)))))))
|
||||||
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user