1
0
forked from GitHub/gf-core

relatives, except Finnish

This commit is contained in:
aarne
2005-09-01 12:43:41 +00:00
parent eaee717f99
commit 347473ccd4
23 changed files with 427 additions and 239 deletions

View File

@@ -101,6 +101,7 @@ cat
VP ; -- verb phrase, e.g. "switch the light on"
VPI ; -- infinitive verb phrase e.g. "switch the light on", "not have run"
VCl ; -- same (variable ant.) e.g. "walk"/"have walked"
--!
--3 Adverbs and prepositions/cases
@@ -184,5 +185,6 @@ cat
TP ; -- tense x polarity selector
Tense ; -- (abstract) tense
Ant ; -- (abstract) anteriority
Pol ; -- polarity (positive or negative)
}

View File

@@ -2,11 +2,40 @@
--1 Rules for predication forming clauses
--
-- This module treats predications in a shallow way, without right-branching
-- $VP$ structures, which have the disadvantage of duplicating rules but the
-- advantage of fast parsing due to elimination of discontinuous constituents.
-- $VP$ structures. This has the disadvantage of duplicating rules but the
-- advantage of fast parsing due to elimination of discontinuous
-- constituents. Also the canonical GF structures (in $.gfc$) files
-- get smaller, because much more pruning of case alternatives can
-- be performed at compile time.
--
-- The principal way of forming sentences ($S$) is by combining a noun phrase
-- with a verb and its complements.
-- Each of the rules below has the following structure:
--
-- "Subject -> Verb -> Complements -> Clause"
--
-- What complements are needed depends on the type of the verb.
-- For instance, $V$ takes no complement, $V2$ takes one $NP$
-- complement, $VS$ takes an $S$ complement, etc. There is an elegant
-- way of expressing this using dependent types:
--
-- (v : VType) -> Subj -> Verb v -> Compl v -> Clause
--
-- Since there are 12 verb types in our category system, using this
-- rule would be economical. The effect is amplified by another
-- distinction that the rules make: there are separate sets of
-- rules just differing in what type the subject and
-- the resulting clause have. There are four different types:
--
--* $SPred$ (declarative clause, from $NP$ to $Cl$),
--* $QPred$ (interrogative clause, from $IP$ to $QCl$),
--* $RPred$ (relative clause, from $RP$ to $RCl$),
--* $IPred$ (infinitive clause, from no subject to $VCl$).
--
-- The ultimate dependent type formalization of all the 4x12 rules is
--
-- (n : NType) -> (v : VType) -> Subj n -> Verb v -> Compl v -> Clause n
--
-- In the following, however, an expanded set of rules with no
-- dependent types is shown.
abstract Clause = Categories ** {
@@ -20,11 +49,11 @@ fun
SPredVV : NP -> VV -> VPI -> Cl ; -- "John must walk"
SPredVQ : NP -> VQ -> QS -> Cl ; -- "John asks who will come"
SPredVA : NP -> VA -> AP -> Cl ; -- "John looks ill"
SPredV2A : NP -> V2A -> NP ->AP ->Cl ; -- "John paints the house red"
SPredSubjV2V : NP -> V2V -> NP ->VPI ->Cl ; -- "John promises Mary to leave"
SPredObjV2V : NP -> V2V -> NP -> VPI -> Cl ; -- "John asks me to come"
SPredV2S : NP -> V2S -> NP -> S -> Cl ; -- "John told me that it is good"
SPredV2Q : NP -> V2Q -> NP -> QS -> Cl ; -- "John asked me if it is good"
SPredV2A : NP -> V2A -> NP -> AP -> Cl ; -- "John paints the house red"
SPredSubjV2V : NP -> V2V -> NP -> VPI -> Cl ; -- "John promises Mary to leave"
SPredObjV2V : NP -> V2V -> NP -> VPI -> Cl ; -- "John asks me to come"
SPredV2S : NP -> V2S -> NP -> S -> Cl ; -- "John told me that it is good"
SPredV2Q : NP -> V2Q -> NP -> QS -> Cl ; -- "John asked me if it is good"
SPredAP : NP -> AP -> Cl ; -- "John is old"
SPredCN : NP -> CN -> Cl ; -- "John is a man"
@@ -54,7 +83,7 @@ fun
QPredAdv : IP -> Adv -> QCl ; -- "who is in France"
QPredProgVP : IP -> VPI -> QCl ; -- "who is eating"
{-
RPredV : RP -> V -> RCl ; -- "who walks"
RPredPassV : RP -> V -> RCl ; -- "who is seen"
RPredV2 : RP -> V2 -> NP -> RCl ; -- "who sees Mary"
@@ -64,11 +93,11 @@ fun
RPredVV : RP -> VV -> VPI -> RCl ; -- "who must walk"
RPredVQ : RP -> VQ -> QS -> RCl ; -- "who asks who will come"
RPredVA : RP -> VA -> AP -> RCl ; -- "who looks ill"
RPredV2A : RP -> V2A -> NP ->AP ->RCl ; -- "who paints the house red"
RPredSubjV2V : RP -> V2V -> NP ->VPI ->RCl ; -- "who promises Mary to leave"
RPredObjV2V : RP -> V2V -> NP -> VPI -> RCl ; -- "who asks me to come"
RPredV2S : RP -> V2S -> NP -> S -> RCl ; -- "who told me that it is good"
RPredV2Q : RP -> V2Q -> NP -> QS -> RCl ; -- "who asked me if it is good"
RPredV2A : RP -> V2A -> NP -> AP -> RCl ; -- "who paints the house red"
RPredSubjV2V : RP -> V2V -> NP -> VPI -> RCl ; -- "who promises Mary to leave"
RPredObjV2V : RP -> V2V -> NP -> VPI -> RCl ; -- "who asks me to come"
RPredV2S : RP -> V2S -> NP -> S -> RCl ; -- "who told me that it is good"
RPredV2Q : RP -> V2Q -> NP -> QS -> RCl ; -- "who asked me if it is good"
RPredAP : RP -> AP -> RCl ; -- "who is old"
RPredCN : RP -> CN -> RCl ; -- "who is a man"
@@ -76,28 +105,28 @@ fun
RPredAdv : RP -> Adv -> RCl ; -- "who is in France"
RPredProgVP : RP -> VPI -> RCl ; -- "who is eating"
-}
IPredV : Ant -> V -> VPI ; -- "walk"
IPredPassV : Ant -> V -> VPI ; -- "be seen"
IPredV2 : Ant -> V2 -> NP -> VPI ; -- "see Mary"
IPredV3 : Ant -> V3 -> NP -> NP -> VPI ; -- "give Mary food"
IPredReflV2 : Ant -> V2 -> VPI ; -- "love himself"
IPredVS : Ant -> VS -> S -> VPI ; -- "say that Mary runs"
IPredVV : Ant -> VV -> VPI -> VPI ; -- "want to walk"
IPredVQ : Ant -> VQ -> QS -> VPI ; -- "ask who will come"
IPredVA : Ant -> VA -> AP -> VPI ; -- "look ill"
IPredV2A : Ant -> V2A -> NP ->AP ->VPI ; -- "paint the house red"
IPredSubjV2V : Ant -> V2V -> NP ->VPI ->VPI ; -- "promise Mary to leave"
IPredObjV2V : Ant -> V2V -> NP -> VPI ->VPI ; -- "ask me to come"
IPredV2S : Ant -> V2S -> NP -> S -> VPI ; -- "tell me that it is good"
IPredV2Q : Ant -> V2Q -> NP -> QS -> VPI ; -- "ask me if it is good"
IPredAP : Ant -> AP -> VPI ; -- "be old"
IPredCN : Ant -> CN -> VPI ; -- "be a man"
IPredNP : Ant -> NP -> VPI ; -- "be Bill"
IPredAdv : Ant -> Adv -> VPI ; -- "be in France"
IPredV : V -> VCl ; -- "walk"
IPredPassV : V -> VCl ; -- "be seen"
IPredV2 : V2 -> NP -> VCl ; -- "see Mary"
IPredV3 : V3 -> NP -> NP -> VCl ; -- "give Mary food"
IPredReflV2 : V2 -> VCl ; -- "love himself"
IPredVS : VS -> S -> VCl ; -- "say that Mary runs"
IPredVV : VV -> VPI -> VCl ; -- "want to walk"
IPredVQ : VQ -> QS -> VCl ; -- "ask who will come"
IPredVA : VA -> AP -> VCl ; -- "look ill"
IPredV2A : V2A -> NP -> AP -> VCl ; -- "paint the house red"
IPredSubjV2V : V2V -> NP -> VPI -> VCl ; -- "promise Mary to leave"
IPredObjV2V : V2V -> NP -> VPI -> VCl ; -- "ask me to come"
IPredV2S : V2S -> NP -> S -> VCl ; -- "tell me that it is good"
IPredV2Q : V2Q -> NP -> QS -> VCl ; -- "ask me if it is good"
IPredProgVP : Ant -> VPI -> VPI ; -- "be eating"
IPredAP : AP -> VCl ; -- "be old"
IPredCN : CN -> VCl ; -- "be a man"
IPredNP : NP -> VCl ; -- "be Bill"
IPredAdv : Adv -> VCl ; -- "be in France"
IPredProgVP : VPI -> VCl ; -- "be eating"
{-

View File

@@ -50,27 +50,49 @@ incomplete concrete ClauseI of Clause = open Rules, Verbphrase in {
QPredProgVP np vp = IntVP np (PredProgVP vp) ;
IPredV a v = PosVP a (UseV v) ;
IPredV2 a v x = PosVP a (ComplV2 v x) ;
IPredPassV a v = PosVP a (UsePassV v) ;
IPredV3 a v x y = PosVP a (ComplV3 v x y) ;
IPredReflV2 a v = PosVP a (ComplReflV2 v) ;
IPredVS a v x = PosVP a (ComplVS v x) ;
IPredVV a v x = PosVP a (ComplVV v x) ;
IPredVQ a v x = PosVP a (ComplVQ v x) ;
IPredVA a v x = PosVP a (ComplVA v x) ;
IPredV2A a v x y = PosVP a (ComplV2A v x y) ;
IPredSubjV2V a v x y = PosVP a (ComplSubjV2V v x y) ;
IPredObjV2V a v x y = PosVP a (ComplObjV2V v x y) ;
IPredV2S a v x y = PosVP a (ComplV2S v x y) ;
IPredV2Q a v x y = PosVP a (ComplV2Q v x y) ;
RPredV np v = RelVP np (UseV v) ;
RPredPassV np v = RelVP np (UsePassV v) ;
RPredV2 np v x = RelVP np (ComplV2 v x) ;
RPredV3 np v x y = RelVP np (ComplV3 v x y) ;
RPredReflV2 np v = RelVP np (ComplReflV2 v) ;
RPredVS np v x = RelVP np (ComplVS v x) ;
RPredVV np v x = RelVP np (ComplVV v x) ;
RPredVQ np v x = RelVP np (ComplVQ v x) ;
RPredVA np v x = RelVP np (ComplVA v x) ;
RPredV2A np v x y = RelVP np (ComplV2A v x y) ;
RPredSubjV2V np v x y = RelVP np (ComplSubjV2V v x y) ;
RPredObjV2V np v x y = RelVP np (ComplObjV2V v x y) ;
RPredV2S np v x y = RelVP np (ComplV2S v x y) ;
RPredV2Q np v x y = RelVP np (ComplV2Q v x y) ;
IPredAP a v = PosVP a (PredAP v) ;
IPredCN a v = PosVP a (PredCN v) ;
IPredNP a v = PosVP a (PredNP v) ;
IPredAdv a v = PosVP a (PredAdv v) ;
RPredAP np v = RelVP np (PredAP v) ;
RPredCN np v = RelVP np (PredCN v) ;
RPredNP np v = RelVP np (PredNP v) ;
RPredAdv np v = RelVP np (PredAdv v) ;
IPredProgVP a vp = PosVP a (PredProgVP vp) ;
RPredProgVP np vp = RelVP np (PredProgVP vp) ;
IPredV v = UseVP (UseV v) ;
IPredV2 v x = UseVP (ComplV2 v x) ;
IPredPassV v = UseVP (UsePassV v) ;
IPredV3 v x y = UseVP (ComplV3 v x y) ;
IPredReflV2 v = UseVP (ComplReflV2 v) ;
IPredVS v x = UseVP (ComplVS v x) ;
IPredVV v x = UseVP (ComplVV v x) ;
IPredVQ v x = UseVP (ComplVQ v x) ;
IPredVA v x = UseVP (ComplVA v x) ;
IPredV2A v x y = UseVP (ComplV2A v x y) ;
IPredSubjV2V v x y = UseVP (ComplSubjV2V v x y) ;
IPredObjV2V v x y = UseVP (ComplObjV2V v x y) ;
IPredV2S v x y = UseVP (ComplV2S v x y) ;
IPredV2Q v x y = UseVP (ComplV2Q v x y) ;
IPredAP v = UseVP (PredAP v) ;
IPredCN v = UseVP (PredCN v) ;
IPredNP v = UseVP (PredNP v) ;
IPredAdv v = UseVP (PredAdv v) ;
IPredProgVP vp = UseVP (PredProgVP vp) ;
{-
-- Use VPs

View File

@@ -82,7 +82,7 @@ fun
UseA2S : A2S -> AS ;
UseA2V : A2V -> AV ;
-- Formation of infinitival phrases.
-- Formation of tensed phrases.
AdjPart : V -> A ; -- past participle, e.g. "forgotten"
@@ -90,6 +90,8 @@ fun
UseRCl : TP -> RCl -> RS ;
UseQCl : TP -> QCl -> QS ;
UseVCl : Pol -> Ant -> VCl -> VPI ;
PosTP : Tense -> Ant -> TP ;
NegTP : Tense -> Ant -> TP ;
@@ -101,6 +103,9 @@ fun
ASimul : Ant ;
AAnter : Ant ;
PPos : Pol ;
PNeg : Pol ;
--!
--3 Adverbs
--

View File

@@ -46,7 +46,7 @@ abstract Verbphrase = Categories ** {
RelVP : RP -> VP -> RCl ; -- "who walks", "who doesn't walk"
IntVP : IP -> VP -> QCl ; -- "who walks"
PosVP, NegVP : Ant -> VP -> VPI ; -- to eat, not to eat
UseVP : VP -> VCl ; -- to eat, not to eat
AdvVP : VP -> AdV -> VP ; -- "always walks"
SubjVP : VP -> Subj -> S -> VP ; -- "(a man who) sings when he runs"

View File

@@ -20,13 +20,13 @@ ExactTime h = ss (h.s ++ "akkurat") ;
NumHour n = {s = n.s ! Neutr} ;
NumMinute n = {s = n.s ! Neutr} ;
monday = regN "mandag" masculine ;
tuesday = regN "tirsdag" masculine ;
wednesday = regN "onsdag" masculine ;
thursday = regN "torsdag" masculine ;
friday = regN "fredag" masculine ;
saturday = regN "lørdag" masculine ;
sunday = regN "søndag" masculine ;
monday = regN "mandag" utrum ;
tuesday = regN "tirsdag" utrum ;
wednesday = regN "onsdag" utrum ;
thursday = regN "torsdag" utrum ;
friday = regN "fredag" utrum ;
saturday = regN "lørdag" utrum ;
sunday = regN "søndag" utrum ;

View File

@@ -50,6 +50,7 @@ lincat
-- = {s : VForm => Str ; s1 : Particle}
VP = {s,s2 : Bool => SForm => Agr => Str ; isAux : Bool} ;
VPI = {s : VIForm => Agr => Str ; s1 : Str} ; -- s1 is "not" or []
VCl = {s : Bool => Anteriority => VIForm => Agr => Str ; s1 : Bool => Str} ;
V2 = TransVerb ;
-- = Verb ** {s3 : Preposition} ;
V3 = TransVerb ** {s4 : Preposition} ;
@@ -69,6 +70,7 @@ lincat
TP = {s : Str ; b : Bool ; t : Tense ; a : Anteriority} ; --- the Str field is dummy
Tense = {s : Str ; t : Tense} ;
Pol = {s : Str ; p : Bool} ;
Ant = {s : Str ; a : Anteriority} ;
PP = {s : Str} ;

View File

@@ -51,27 +51,50 @@ concrete ClauseEng of Clause = CategoriesEng **
QPredProgVP np vp = predBeGroupQ np (vp.s ! VIPresPart) ;
IPredV a v = predVerbI True a v (complVerb v) ;
IPredPassV a v = predVerbI True a v (passVerb v) ;
IPredV2 a v x = predVerbI True a v (complTransVerb v x) ;
IPredReflV2 a v = predVerbI True a v (reflTransVerb v) ;
IPredV3 a v x y = predVerbI True a v (complDitransVerb v x y) ;
IPredVS a v x = predVerbI True a v (complSentVerb v x) ;
IPredVV a v x = predVerbI True a (aux2verb v) (complVerbVerb v x) ;
IPredVQ a v x = predVerbI True a v (complQuestVerb v x) ;
IPredVA a v x = predVerbI True a v (complAdjVerb v x) ;
IPredV2A a v x y = predVerbI True a v (complDitransAdjVerb v x y) ;
IPredSubjV2V a v x y = predVerbI True a v (complDitransVerbVerb False v x y) ;
IPredObjV2V a v x y = predVerbI True a v (complDitransVerbVerb True v x y) ;
IPredV2S a v x y = predVerbI True a v (complDitransSentVerb v x y) ;
IPredV2Q a v x y = predVerbI True a v (complDitransQuestVerb v x y) ;
IPredAP a v = predBeGroupI True a v.s ;
IPredCN a v = predBeGroupI True a (complCommNoun v) ;
IPredNP a v = predBeGroupI True a (complNounPhrase v) ;
IPredAdv a v = predBeGroupI True a (complAdverb v) ;
RPredV np v = relVerbClause np v (complVerb v) ;
RPredPassV np v = predBeGroupR np (passVerb v) ;
RPredV2 np v x = relVerbClause np v (complTransVerb v x) ;
RPredReflV2 np v = relVerbClause np v (reflTransVerb v) ;
RPredV3 np v x y = relVerbClause np v (complDitransVerb v x y) ;
RPredVS np v x = relVerbClause np v (complSentVerb v x) ;
RPredVV np v x = relVerbClause np (aux2verb v) (complVerbVerb v x) ;
RPredVQ np v x = relVerbClause np v (complQuestVerb v x) ;
RPredVA np v x = relVerbClause np v (complAdjVerb v x) ;
RPredV2A np v x y = relVerbClause np v (complDitransAdjVerb v x y) ;
RPredSubjV2V np v x y = relVerbClause np v (complDitransVerbVerb False v x y) ;
RPredObjV2V np v x y = relVerbClause np v (complDitransVerbVerb True v x y) ;
RPredV2S np v x y = relVerbClause np v (complDitransSentVerb v x y) ;
RPredV2Q np v x y = relVerbClause np v (complDitransQuestVerb v x y) ;
IPredProgVP a vp = predBeGroupI True a (vp.s ! VIPresPart) ;
RPredAP np v = predBeGroupR np v.s ;
RPredCN np v = predBeGroupR np (complCommNoun v) ;
RPredNP np v = predBeGroupR np (complNounPhrase v) ;
RPredAdv np v = predBeGroupR np (complAdverb v) ;
RPredProgVP np vp = predBeGroupR np (vp.s ! VIPresPart) ;
IPredV v = predVerbI v (complVerb v) ;
IPredPassV v = predVerbI v (passVerb v) ;
IPredV2 v x = predVerbI v (complTransVerb v x) ;
IPredReflV2 v = predVerbI v (reflTransVerb v) ;
IPredV3 v x y = predVerbI v (complDitransVerb v x y) ;
IPredVS v x = predVerbI v (complSentVerb v x) ;
IPredVV v x = predVerbI (aux2verb v) (complVerbVerb v x) ;
IPredVQ v x = predVerbI v (complQuestVerb v x) ;
IPredVA v x = predVerbI v (complAdjVerb v x) ;
IPredV2A v x y = predVerbI v (complDitransAdjVerb v x y) ;
IPredSubjV2V v x y = predVerbI v (complDitransVerbVerb False v x y) ;
IPredObjV2V v x y = predVerbI v (complDitransVerbVerb True v x y) ;
IPredV2S v x y = predVerbI v (complDitransSentVerb v x y) ;
IPredV2Q v x y = predVerbI v (complDitransQuestVerb v x y) ;
IPredAP v = predBeGroupI v.s ;
IPredCN v = predBeGroupI (complCommNoun v) ;
IPredNP v = predBeGroupI (complNounPhrase v) ;
IPredAdv v = predBeGroupI (complAdverb v) ;
IPredProgVP vp = predBeGroupI (vp.s ! VIPresPart) ;
{-
-- Use VPs

View File

@@ -91,6 +91,10 @@ lin
UseCl tp cl = {s = tp.s ++ cl.s ! Dir ! tp.b ! VFinite tp.t tp.a} ;
UseQCl tp cl = {s = \\q => tp.s ++ cl.s ! tp.b ! VFinite tp.t tp.a ! q} ;
UseRCl tp cl = {s = \\a => tp.s ++ cl.s ! tp.b ! VFinite tp.t tp.a ! a} ;
UseVCl p a cl = {
s = \\v,ag => p.s ++ a.s ++ cl.s ! p.p ! a.a ! v ! ag ;
s1 = cl.s1 ! p.p
} ;
PosTP t a = {s = t.s ++ a.s ; b = True ; t = t.t ; a = a.a} ;
NegTP t a = {s = t.s ++ a.s ; b = False ; t = t.t ; a = a.a} ;
@@ -103,6 +107,9 @@ lin
ASimul = {s = [] ; a = Simul} ;
AAnter = {s = [] ; a = Anter} ;
PPos = {s = [] ; p = True} ;
PNeg = {s = [] ; p = False} ;
-- Adverbs.
AdjAdv a = ss (a.s ! AAdv) ;

View File

@@ -428,7 +428,14 @@ oper
s1 : Str -- "not" or []
} ;
VerbClause = {
s : Bool => Anteriority => VIForm => Agr => Str ;
s1 : Bool => Str -- "not" or []
} ;
-- To form an infinitival group
{- ---- obsolete
predVerbGroup : Bool -> {s : Str ; a : Anteriority} -> VerbGroup -> VerbPhrase =
\b,ant,vg -> {
s = table {
@@ -437,23 +444,22 @@ oper
} ;
s1 = if_then_Str b [] "not"
} ;
-}
-- All negative verb phrase behave as auxiliary ones in questions.
predVerbI : Bool -> {s : Str ; a : Anteriority} -> Verb -> Complement -> VerbPhrase =
\b,ant,verb,comp ->
let
ans = ant.s ; --- just to avoid ? in parsing
inf = case ant.a of {
Simul => verb.s ! InfImp ;
Anter => "have" ++ verb.s ! PPart
}
in
{s = table {
VIInfinit => \\a => ans ++ inf ++ verb.s1 ++ comp ! a ;
VIPresPart => \\a => ans ++ verb.s ! PresPart ++ comp ! a
predVerbI : Verb -> Complement -> VerbClause =
\verb,comp ->
{s = \\p,a =>
let
inf = case a of {
Simul => verb.s ! InfImp ;
Anter => "have" ++ verb.s ! PPart
}
in
table {
VIInfinit => \\ag => inf ++ verb.s1 ++ comp ! ag ;
VIPresPart => \\ag => verb.s ! PresPart ++ comp ! ag
} ;
s1 = if_then_Str b [] "not"
s1 = \\b => if_then_Str b [] "not"
} ;
-- A simple verb can be made into a verb phrase with an empty complement.
@@ -489,16 +495,16 @@ oper
Complement = Agr => Str ;
predBeGroupI : Bool -> {s : Str ; a : Anteriority} -> Complement -> VerbPhrase =
\b,ant,vg ->
{s = table {
VIInfinit => \\a => ant.s ++ case ant.a of {
predBeGroupI : Complement -> VerbClause =
\vg ->
{s = \\b,ant => table {
VIInfinit => \\a => case ant of {
Simul => "be" ++ vg ! a ;
Anter => "have" ++ "been" ++ vg ! a
} ;
VIPresPart => \\a => "being" ++ vg ! a
} ;
s1 = if_then_Str b [] "not" ;
s1 = \\b => if_then_Str b [] "not" ;
} ;
@@ -981,9 +987,12 @@ oper
slashVerbVerb : NounPhrase -> VerbVerb -> TransVerb -> ClauseSlashNounPhrase =
\you,want,lookat ->
let youlookat = (predVerbClause you (aux2verb want)
(complVerbVerb want (predVerbI True {s = [] ; a = Simul} lookat
(complVerb lookat)))).s
let
tolook = predVerbI lookat (complVerb lookat) ;
youlookat =
(predVerbClause you (aux2verb want)
(complVerbVerb want
{s = tolook.s ! True ! Simul ; s1 = tolook.s1 ! True})).s
in
{s = table {
DirQ => youlookat ! Inv ;
@@ -1036,6 +1045,25 @@ oper
(predVerbGroupClause (relNounPhrase who wa.g wa.n) walks).s ! Dir ! b ! sf
} ;
relVerbClause : RelPron -> Verb -> Complement -> RelClause = \who,walk,here ->
{s = \\b,sf,a =>
let
wa = fromAgr a ;
who : NounPhrase = relNounPhrase who wa.g wa.n ;
whowalks : Clause = predVerbClause who walk here
in
whowalks.s ! Dir ! b ! sf
} ;
predBeGroupR : RelPron -> Complement -> RelClause = \who,old ->
{s = \\b,sf,a =>
let
wa = fromAgr a ;
whoisold = predBeGroup (relNounPhrase who wa.g wa.n) old
in
whoisold.s ! Dir ! b ! sf
} ;
relSlash : RelPron -> ClauseSlashNounPhrase -> RelClause = \who,yousee ->
{s = \\b,sf,a =>
let

View File

@@ -137,6 +137,14 @@ oper
param RelForm = RSimple Case | RComplex Gender Number Case ;
oper RelFormA = RelForm ;
npRelForm : NPFormA -> RelFormA = \np -> case np of {
Ton c => RSimple c ;
Aton c => RSimple c ;
Poss _ _ => RSimple genitive
} ;
oper RelFormA = RelForm ;
-- Verbs: conversion from full verbs to present-tense verbs.

View File

@@ -97,6 +97,14 @@ oper
oper RelFormA = RelForm ;
npRelForm : NPFormA -> RelFormA = \np -> case np of {
Ton c => RSimple c ;
Aton c => RSimple c ;
Poss _ _ => RSimple genitive
} ;
oper RelFormA = RelForm ;
--2 Relative pronouns
--
-- The simple (atonic) relative pronoun shows genuine variation in all of the

View File

@@ -56,6 +56,7 @@ lincat
-- = {s : VF => Str} ;
VP = {s : Bool => Gender => VPForm => Str} ;
VPI = {s : VIForm => Gender => Number => Person => Str} ;
VCl = {s : Bool => Anteriority => VIForm => Gender => Number => Person => Str} ;
V2 = TransVerb ;
-- = Verb ** {s2 : Preposition ; c : CaseA} ;
V3 = TransVerb ** {s3 : Preposition ; c3 : CaseA} ;
@@ -73,6 +74,7 @@ lincat
TP = {s : Str ; b : Bool ; t : Tense ; a : Anteriority} ; --- s-field is dummy
Tense = {s : Str ; t : Tense} ;
Ant = {s : Str ; a : Anteriority} ;
Pol = {s : Str ; p : Bool} ;
Adv = {s : Str} ;
AdV = {s : Str} ;

View File

@@ -143,8 +143,6 @@ incomplete concrete ClauseRomance of Clause = CategoriesRomance **
(\\_ => prepCase verb.c ++ vp.s ! VIInfinit ! subj.g ! subj.n ! P3)
) ;
-- QPredProgVP
QPredAP subj adj =
sats2quest (mkSatsCopula (intNounPhrase subj) (adj.s ! AF subj.g subj.n)) ;
QPredCN subj cn =
@@ -156,81 +154,159 @@ incomplete concrete ClauseRomance of Clause = CategoriesRomance **
QPredProgVP np vp = sats2quest (progressiveSats (intNounPhrase np) vp) ;
-----------
RPredV np v =
sats2rel (mkSats (relNounPhrase np) v) ;
RPredPassV subj v =
sats2rel (mkSatsCopula (relNounPhrase subj) (v.s ! VPart
(pgen2gen subj.g) Sg)) ; ---- subj.n
RPredV2 np v y =
sats2rel (mkSatsObject (relNounPhrase np) v y) ;
RPredV3 subj verb obj1 obj2 =
sats2rel (
insertObject (mkSatsObject (relNounPhrase subj) verb obj1) verb.c3 verb.s3 obj2
) ;
RPredReflV2 subj verb =
sats2rel (
mkSatsObject (relNounPhrase subj)
{s = verb.s ; s2 = [] ; c = accusative ; aux = AEsse}
(reflPronNounPhrase (pgen2gen subj.g) Sg P3)) ;
RPredVS subj verb sent =
sats2rel (
insertExtrapos (mkSats (relNounPhrase subj) verb)
(\\b => embedConj ++ sent.s ! subordMode verb b)) ; ---- mn
RPredVQ subj verb quest =
sats2rel (
insertExtrapos (mkSats (relNounPhrase subj) verb) (\\_ => quest.s ! IndirQ)) ;
RPredV2S subj verb obj sent =
sats2rel (
insertExtrapos
(mkSatsObject (relNounPhrase subj) verb obj)
(\\b => embedConj ++ sent.s ! subordMode verb b)
) ; ---- mn ;
RPredV2Q subj verb obj quest =
sats2rel (
insertExtrapos
(mkSatsObject (relNounPhrase subj) verb obj)
(\\_ => quest.s ! IndirQ)) ;
RPredVA subj verb adj =
sats2rel (
insertExtrapos (mkSats (relNounPhrase subj) verb)
(\\_ => adj.s ! AF (pgen2gen subj.g) Sg)) ; ---- subj.n, etc
RPredV2A subj verb obj adj =
sats2rel (
insertExtrapos
(mkSatsObject (relNounPhrase subj) verb obj)
(\\_ => adj.s ! AF (pgen2gen obj.g) obj.n)) ;
RPredVV subj verb vp =
sats2rel (
insertExtrapos
(mkSats (relNounPhrase subj) verb)
(\\_ => prepCase verb.c ++
vp.s ! VIInfinit ! (pgen2gen subj.g) ! (relNounPhrase subj).n ! P3)
) ;
RPredObjV2V subj verb obj vp =
sats2rel (
insertExtrapos
(mkSatsObject (relNounPhrase subj) verb obj)
(\\_ => prepCase verb.c ++ vp.s ! VIInfinit ! pgen2gen obj.g ! obj.n ! obj.p)
) ;
RPredSubjV2V subj verb obj vp =
sats2rel (
insertExtrapos
(mkSatsObject (relNounPhrase subj) verb obj)
(\\_ => prepCase verb.c ++ vp.s ! VIInfinit ! (pgen2gen subj.g) ! Sg ! P3)
) ;
RPredAP subj adj =
sats2rel (mkSatsCopula (relNounPhrase subj) (adj.s ! AF (pgen2gen subj.g) Sg)) ;
RPredCN subj cn =
sats2rel (mkSatsCopula (relNounPhrase subj) (indefNoun Sg cn)) ;
RPredNP subj np =
sats2rel (mkSatsCopula (relNounPhrase subj) (np.s ! stressed nominative)) ;
RPredAdv subj adv =
sats2rel (mkSatsCopula (relNounPhrase subj) adv.s) ;
RPredProgVP np vp = sats2rel (progressiveSats (relNounPhrase np) vp) ;
----- gender and number of Adj
IPredV a v =
sats2verbPhrase a (mkSats pronImpers v) ;
IPredV2 a v y =
sats2verbPhrase a (mkSatsObject pronImpers v y) ;
IPredAP a adj =
sats2verbPhrase a (mkSatsCopula pronImpers (adj.s ! AF Masc Sg)) ;
IPredPassV a v =
sats2verbPhrase a (mkSatsCopula pronImpers (v.s ! VPart (pgen2gen pronImpers.g) pronImpers.n)) ;
IPredV3 a verb obj1 obj2 =
sats2verbPhrase a (insertObject (mkSatsObject pronImpers verb obj1) verb.c3 verb.s3 obj2) ;
IPredReflV2 a verb =
sats2verbPhrase a (
IPredV v =
sats2verbPhrase (mkSats pronImpers v) ;
IPredV2 v y =
sats2verbPhrase (mkSatsObject pronImpers v y) ;
IPredAP adj =
sats2verbPhrase (mkSatsCopula pronImpers (adj.s ! AF Masc Sg)) ;
IPredPassV v =
sats2verbPhrase (mkSatsCopula pronImpers (v.s ! VPart (pgen2gen pronImpers.g) pronImpers.n)) ;
IPredV3 verb obj1 obj2 =
sats2verbPhrase (insertObject (mkSatsObject pronImpers verb obj1) verb.c3 verb.s3 obj2) ;
IPredReflV2 verb =
sats2verbPhrase (
mkSatsObject pronImpers
{s = verb.s ; s2 = [] ; c = accusative ; aux = AEsse}
---- {s = verb.s ; s2 = verb.s2 ; c = verb.c ; aux = AEsse}
---- this produces huge cf - find out why! AR 16/3/2005
(reflPronNounPhrase (pgen2gen pronImpers.g) pronImpers.n pronImpers.p)) ;
IPredVS a verb sent =
sats2verbPhrase a (
IPredVS verb sent =
sats2verbPhrase (
insertExtrapos (mkSats pronImpers verb)
(\\b => embedConj ++ sent.s ! subordMode verb b)) ; ---- mn
IPredVQ a verb quest =
sats2verbPhrase a (
IPredVQ verb quest =
sats2verbPhrase (
insertExtrapos (mkSats pronImpers verb) (\\_ => quest.s ! IndirQ)) ;
IPredV2S a verb obj sent =
sats2verbPhrase a (
IPredV2S verb obj sent =
sats2verbPhrase (
insertExtrapos
(mkSatsObject pronImpers verb obj)
(\\b => embedConj ++ sent.s ! subordMode verb b)
) ; ---- mn ;
IPredV2Q a verb obj quest =
sats2verbPhrase a (
IPredV2Q verb obj quest =
sats2verbPhrase (
insertExtrapos
(mkSatsObject pronImpers verb obj)
(\\_ => quest.s ! IndirQ)) ;
IPredVA a verb adj =
sats2verbPhrase a (
IPredVA verb adj =
sats2verbPhrase (
insertExtrapos (mkSats pronImpers verb) (\\_ => adj.s ! AF (pgen2gen pronImpers.g) pronImpers.n)) ;
IPredV2A a verb obj adj =
sats2verbPhrase a (
IPredV2A verb obj adj =
sats2verbPhrase (
insertExtrapos
(mkSatsObject pronImpers verb obj)
(\\_ => adj.s ! AF (pgen2gen obj.g) obj.n)) ;
IPredVV a verb vp =
sats2verbPhrase a (
IPredVV verb vp =
sats2verbPhrase (
insertExtrapos
(mkSats pronImpers verb)
(\\_ => prepCase verb.c ++ vp.s ! VIInfinit ! pgen2gen pronImpers.g ! pronImpers.n ! pronImpers.p)
) ;
IPredObjV2V a verb obj vp =
sats2verbPhrase a (
IPredObjV2V verb obj vp =
sats2verbPhrase (
insertExtrapos
(mkSatsObject pronImpers verb obj)
(\\_ => prepCase verb.c ++ vp.s ! VIInfinit ! pgen2gen obj.g ! obj.n ! obj.p)
) ;
IPredSubjV2V a verb obj vp =
sats2verbPhrase a (
IPredSubjV2V verb obj vp =
sats2verbPhrase (
insertExtrapos
(mkSatsObject pronImpers verb obj)
(\\_ => prepCase verb.c ++ vp.s ! VIInfinit ! pgen2gen pronImpers.g ! pronImpers.n ! pronImpers.p)
) ;
IPredCN a cn =
sats2verbPhrase a (mkSatsCopula pronImpers (indefNoun pronImpers.n cn)) ;
IPredNP a np =
sats2verbPhrase a (mkSatsCopula pronImpers (np.s ! stressed nominative)) ;
IPredAdv a adv =
sats2verbPhrase a (mkSatsCopula pronImpers adv.s) ;
IPredCN cn =
sats2verbPhrase (mkSatsCopula pronImpers (indefNoun pronImpers.n cn)) ;
IPredNP np =
sats2verbPhrase (mkSatsCopula pronImpers (np.s ! stressed nominative)) ;
IPredAdv adv =
sats2verbPhrase (mkSatsCopula pronImpers adv.s) ;
IPredProgVP a vp = sats2verbPhrase a (progressiveSats pronImpers vp) ;
IPredProgVP vp = sats2verbPhrase (progressiveSats pronImpers vp) ;

View File

@@ -84,6 +84,9 @@ lin
ASimul = {s = [] ; a = Simul} ;
AAnter = {s = [] ; a = Anter} ;
PPos = {s = [] ; p = True} ;
PNeg = {s = [] ; p = False} ;
-- Adverbs.
AdjAdv a = {s = a.s ! AA} ;

View File

@@ -434,6 +434,7 @@ param
oper
VerbPhrase = {s : VIForm => Gender => Number => Person => Str} ;
VerbClause = {s : Bool => Anteriority => VIForm => Gender => Number => Person => Str} ;
vpf2vf : VPForm -> VF = \vpf -> case vpf of {
VPF _ vf => vf
@@ -737,7 +738,7 @@ oper
RelSentence : Type = {s : Mode => Gender => Number => Person => Str} ;
mkGenRel : RelGen -> Gender -> Gender = \rg,g -> case rg of {
RG gen => gen ;
PGen gen => gen ;
_ => g
} ;
@@ -1312,12 +1313,32 @@ oper
in
{s = \\b,f,_ => cl.s ! b ! f} ;
sats2verbPhrase : {s : Str ; a : Anteriority} -> Sats -> VerbPhrase =
\ant,sats -> {s = \\vi,g,n,p => ---- b,cf =>
{- ---- this does not yet get agrement right; have to integrate these two
RP = {s : RelForm => Str ; g : RelGen} ;
NP = {s : NPFormA => Str ; g : PronGen ;
n : Number ; p : Person ; c : ClitType} ;
RCl = {s : Bool => ClForm => Gender => Number => Person => Str} ;
RelGen = RNoGen | RG Gender ;
-}
sats2rel : Sats -> RelClause = \x ->
let cl = sats2clause x
in
{s = \\b,f,_,_,_ => cl.s ! b ! f} ;
relNounPhrase : RelPron -> NounPhrase = \r -> {
s = \\np => r.s ! npRelForm np ;
g = r.g ;
n = Sg ; ----
p = P3 ; ----
c = Clit0 ;
} ;
sats2verbPhrase : Sats -> VerbClause =
\sats -> {s = \\b,ant,vi,g,n,p =>
let
b = True ; ----
lui = sats.s3 ;
dire = verbVIForm {s = sats.s4 ; aux = sats.aux} ant.a
dire = verbVIForm {s = sats.s4 ; aux = sats.aux} ant
vi g n p sats.g2 sats.n2 ;
ai = dire.p1 ;
dit = dire.p2 ;
@@ -1328,7 +1349,6 @@ oper
oui = sats.s7 ! b
in
ne ++ lui ++ ai ++ toujours ++ pas ++ dit ++ directement ++ oui
++ ant.s --- always [] ; hack to avoid ? in parsing
} ;
---- What happens to polarity and anteriority ?

View File

@@ -25,8 +25,10 @@ param
-- language. The same concerns those parameter types that depend on case.
-- Certain cases can however be defined.
param
RelGen = RNoGen | RG Gender ;
oper
RelGen = PronGen ;
RNoGen = PNoGen ;
RG = PGen ;
oper
CaseA : PType ;
@@ -43,6 +45,8 @@ oper
RelFormA : PType ;
npRelForm : NPFormA -> RelFormA ;
-- The genitive and dative cases are expressed by prepositions, except for
-- clitic pronouns. The accusative case only makes a difference for pronouns.

View File

@@ -30,6 +30,7 @@ lincat
V = Verb ;
-- = {s : VerbForm => Str ; s1 : Str} ;
VP = VerbGroup ;
VCl = {s : Bool => Anteriority => VIForm => Gender => Number => Person => Str} ;
VPI = {s : VIForm => Gender => Number => Person => Str} ;
V2 = TransVerb ;
-- = Verb ** {s2 : Preposition} ;
@@ -48,6 +49,7 @@ lincat
TP = {s : Str ; b : Bool ; t : Tense ; a : Anteriority} ; --- the Str field is dummy
Tense = {s : Str ; t : Tense} ;
Pol = {s : Str ; p : Bool} ;
Ant = {s : Str ; a : Anteriority} ;
@@ -68,7 +70,7 @@ lincat
RS = {s : GenNum => Person => Str} ;
RCl = {s : Bool => SForm => GenNum => Person => Str} ;
IP = NounPhrase ;
IP = IntPron ; -- = NounPhrase ;
IDet = {s : NounGender => Str ; n : Number ; b : SpeciesP} ;
QS = {s : QuestForm => Str} ;
QCl = {s : Bool => SForm => QuestForm => Str} ;

View File

@@ -1,82 +0,0 @@
--# -path=.:../abstract:../../prelude
incomplete concrete ClauseScand of Clause = CategoriesScand **
open Prelude, SyntaxScand in {
flags optimize=all ;
lin
SPredV np v = predVerbGroupClause np (predVerb v) ;
SPredPassV np v = predVerbGroupClause np (passVerb v) ;
SPredV2 np v x = predVerbGroupClause np (complTransVerb v x) ;
SPredReflV2 np v = predVerbGroupClause np (reflTransVerb v) ;
SPredV3 np v x y = predVerbGroupClause np (complDitransVerb v x y) ;
SPredVS np v x = predVerbGroupClause np (complSentVerb v x) ;
SPredVV np v x = predVerbGroupClause np (complVerbVerb v x) ;
SPredVQ np v x = predVerbGroupClause np (complQuestVerb v x) ;
SPredVA np v x = predVerbGroupClause np (complAdjVerb v x) ;
SPredV2A np v x y = predVerbGroupClause np (complDitransAdjVerb v x y) ;
SPredSubjV2V np v x y = predVerbGroupClause np (complDitransVerbVerb
False v x y) ;
SPredObjV2V np v x y = predVerbGroupClause np (complDitransVerbVerb
True v x y) ;
SPredV2S np v x y = predVerbGroupClause np (complDitransSentVerb v x y) ;
SPredV2Q np v x y = predVerbGroupClause np (complDitransQuestVerb v x y) ;
SPredAP np v = predVerbGroupClause np (predAdjective v) ;
SPredSuperl np a = predVerbGroupClause np (predAdjective (superlAdjPhrase a)) ;
SPredCN np v = predVerbGroupClause np (predCommNoun v) ;
SPredNP np v = predVerbGroupClause np (predNounPhrase v) ;
SPredPP np v = predVerbGroupClause np (predAdverb v) ;
SPredAV np v x = predVerbGroupClause np (complVerbAdj v x) ;
SPredObjA2V np v x y = predVerbGroupClause np (complVerbAdj2 True v x y) ;
SPredProgVP = progressiveClause ;
QPredV np v = intVerbPhrase np (predVerb v) ;
QPredPassV np v = intVerbPhrase np (passVerb v) ;
QPredV2 np v x = intVerbPhrase np (complTransVerb v x) ;
QPredReflV2 np v = intVerbPhrase np (reflTransVerb v) ;
QPredV3 np v x y = intVerbPhrase np (complDitransVerb v x y) ;
QPredVS np v x = intVerbPhrase np (complSentVerb v x) ;
QPredVV np v x = intVerbPhrase np (complVerbVerb v x) ;
QPredVQ np v x = intVerbPhrase np (complQuestVerb v x) ;
QPredVA np v x = intVerbPhrase np (complAdjVerb v x) ;
QPredV2A np v x y = intVerbPhrase np (complDitransAdjVerb v x y) ;
QPredSubjV2V np v x y = intVerbPhrase np (complDitransVerbVerb
False v x y) ;
QPredObjV2V np v x y = intVerbPhrase np (complDitransVerbVerb
True v x y) ;
QPredV2S np v x y = intVerbPhrase np (complDitransSentVerb v x y) ;
QPredV2Q np v x y = intVerbPhrase np (complDitransQuestVerb v x y) ;
QPredAP np v = intVerbPhrase np (predAdjective v) ;
QPredSuperl np a = intVerbPhrase np (predAdjective (superlAdjPhrase a)) ;
QPredCN np v = intVerbPhrase np (predCommNoun v) ;
QPredNP np v = intVerbPhrase np (predNounPhrase v) ;
QPredPP np v = intVerbPhrase np (predAdverb v) ;
QPredAV np v x = intVerbPhrase np (complVerbAdj v x) ;
QPredObjA2V np v x y = intVerbPhrase np (complVerbAdj2 True v x y) ;
QPredProgVP np v = intVerbPhrase np (progressiveVerbPhrase v) ;
IPredV a v = predVerbGroupI True a (predVerb v) ;
IPredV2 a v x = predVerbGroupI True a (complTransVerb v x) ;
IPredAP a v = predVerbGroupI True a (predAdjective v) ;
{-
-- Use VPs
PredVP = predVerbGroupClause ;
IntVP = intVerbPhrase ;
RelVP = relVerbPhrase ;
PosVP tp = predVerbGroup True tp.a ;
NegVP tp = predVerbGroup False tp.a ;
AdvVP = adVerbPhrase ;
SubjVP = subjunctVerbPhrase ;
-}
}

View File

@@ -79,6 +79,9 @@ lin
UseRCl tp cl =
{s = \\gn,p => tp.s ++ cl.s ! tp.b ! VFinite tp.t tp.a ! gn ! p} ;
UseQCl tp cl = {s = \\q => tp.s ++ cl.s ! tp.b ! VFinite tp.t tp.a ! q} ;
UseVCl po a cl = {
s = \\v,g,n,p => po.s ++ a.s ++ cl.s ! po.p ! a.a ! v ! g ! n ! p ;
} ;
PosTP t a = {s = t.s ++ a.s ; b = True ; t = t.t ; a = a.a} ;
NegTP t a = {s = t.s ++ a.s ; b = False ; t = t.t ; a = a.a} ;
@@ -91,6 +94,9 @@ lin
ASimul = {s = [] ; a = Simul} ;
AAnter = {s = [] ; a = Anter} ;
PPos = {s = [] ; p = True} ;
PNeg = {s = [] ; p = False} ;
-- Adverbs.
AdjAdv a = advPost (a.s ! adverbForm ! Nom) ;

View File

@@ -559,6 +559,9 @@ oper
VerbPhrase : Type = {
s : VIForm => Gender => Number => Person => Str
} ;
VerbClause : Type = {
s : Bool => Anteriority => VIForm => Gender => Number => Person => Str
} ;
-------------------------
@@ -659,8 +662,21 @@ oper
} ---- bo shadows b
} ;
predVerbGroupI : Bool -> {s : Str ; a : Anteriority} -> VerbGroup -> VerbPhrase =
predVerbGroup ;
predVerbGroupI : VerbGroup -> VerbClause = \vg ->
let
vgs = vg.s1 ;
vgs3 : SForm => Gender => Number => Person => Str = \\sf,g,n,p =>
vg.s4 ! sf ++ vg.s5 ! g ! n ! p ++ vg.s6 ++ vg.s7 ;
in
{s = \\b,a =>
table {
VIInfinit => \\g,n,p =>
vgs ! VInfinit a ++ vg.s3 ! b ++ vgs3 ! VInfinit a ! g ! n ! p ;
VIImperat bo => \\g,n,p =>
vgs ! VImperat ++ vg.s3 ! b ++ vgs3 ! VImperat ! g ! n ! p
}
} ;
{- ----
\b,ant,vg ->
let vp = predVerbGroup b ant vg in

View File

@@ -51,8 +51,9 @@ incomplete concrete VerbphraseScand of Verbphrase = CategoriesScand **
RelVP = relVerbPhrase ;
IntVP = intVerbPhrase ;
PosVP tp = predVerbGroup True tp ;
NegVP tp = predVerbGroup False tp ;
-- PosVP tp = predVerbGroup True tp ;
-- NegVP tp = predVerbGroup False tp ;
UseVP = predVerbGroupI ;
AdvVP = adVerbPhrase ;
SubjVP = subjunctVerbPhrase ;

View File

@@ -93,6 +93,12 @@ oper
oper RelFormA = RelForm ;
npRelForm : NPFormA -> RelFormA = \np -> case np of {
Ton c => RSimple c ;
Aton c => RSimple c ;
Poss _ _ => RSimple genitive
} ;
--2 Relative pronouns
--
-- The simple (atonic) relative pronoun shows genuine variation in all of the