mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-20 16:42:51 -06:00
More work on rom
This commit is contained in:
@@ -9,6 +9,8 @@ oper
|
|||||||
jean.g
|
jean.g
|
||||||
Sg ;
|
Sg ;
|
||||||
|
|
||||||
|
nounPhraseOn = mkNameNounPhrase "on" Masc ;
|
||||||
|
|
||||||
partitiveNounPhrase = \n,vin ->
|
partitiveNounPhrase = \n,vin ->
|
||||||
normalNounPhrase
|
normalNounPhrase
|
||||||
(table {
|
(table {
|
||||||
@@ -90,7 +92,8 @@ oper
|
|||||||
|
|
||||||
isTransVerbClit = \v -> case v.c of {
|
isTransVerbClit = \v -> case v.c of {
|
||||||
Acc => True ;
|
Acc => True ;
|
||||||
_ => False --- hmmm
|
Dat => True ;
|
||||||
|
_ => False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- The "ne - pas" negation.
|
-- The "ne - pas" negation.
|
||||||
|
|||||||
@@ -126,6 +126,13 @@ oper
|
|||||||
_ => Ton c
|
_ => Ton c
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
case2pformClit = \c -> case c of {
|
||||||
|
Nom => Aton Nom ;
|
||||||
|
Acc => Aton Acc ;
|
||||||
|
Dat => Aton Dat ;
|
||||||
|
_ => Ton c
|
||||||
|
} ;
|
||||||
|
|
||||||
-- Relative pronouns: the case-dependent parameter type.
|
-- Relative pronouns: the case-dependent parameter type.
|
||||||
|
|
||||||
param RelForm = RSimple Case | RComplex Gender Number Case ;
|
param RelForm = RSimple Case | RComplex Gender Number Case ;
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ oper
|
|||||||
jean.g
|
jean.g
|
||||||
Sg ;
|
Sg ;
|
||||||
|
|
||||||
|
nounPhraseOn = mkNameNounPhrase "si" Masc ; --- can be plural dep. on object
|
||||||
|
|
||||||
partitiveNounPhrase = \n,vino ->
|
partitiveNounPhrase = \n,vino ->
|
||||||
normalNounPhrase
|
normalNounPhrase
|
||||||
(table {
|
(table {
|
||||||
@@ -85,7 +87,8 @@ oper
|
|||||||
|
|
||||||
isTransVerbClit = \v -> case v.c of {
|
isTransVerbClit = \v -> case v.c of {
|
||||||
Acc => True ;
|
Acc => True ;
|
||||||
_ => False --- hmmm
|
CPrep P_a => True ; -- dative
|
||||||
|
_ => False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- The negation of a verb.
|
-- The negation of a verb.
|
||||||
|
|||||||
@@ -65,6 +65,13 @@ oper
|
|||||||
_ => Ton c
|
_ => Ton c
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
case2pformClit = \c -> case c of {
|
||||||
|
Nom => Aton Nom ;
|
||||||
|
Acc => Aton Acc ;
|
||||||
|
CPrep P_a => Aton c ;
|
||||||
|
_ => Ton c
|
||||||
|
} ;
|
||||||
|
|
||||||
-- Comparative adjectives are only sometimes formed morphologically
|
-- Comparative adjectives are only sometimes formed morphologically
|
||||||
-- (actually: by different morphemes).
|
-- (actually: by different morphemes).
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ oper
|
|||||||
mkNameNounPhrase : Str -> Gender -> NounPhrase = \jean,m ->
|
mkNameNounPhrase : Str -> Gender -> NounPhrase = \jean,m ->
|
||||||
nameNounPhrase (mkProperName jean m) ;
|
nameNounPhrase (mkProperName jean m) ;
|
||||||
|
|
||||||
nounPhraseOn = mkNameNounPhrase "on" Masc ;
|
nounPhraseOn : NounPhrase ;
|
||||||
|
|
||||||
normalNounPhrase : (CaseA => Str) -> Gender -> Number -> NounPhrase = \cs,g,n ->
|
normalNounPhrase : (CaseA => Str) -> Gender -> Number -> NounPhrase = \cs,g,n ->
|
||||||
{s = \\p => cs ! (pform2case p) ;
|
{s = \\p => cs ! (pform2case p) ;
|
||||||
@@ -459,7 +459,7 @@ oper
|
|||||||
|
|
||||||
complTransVerb : TransVerb -> NounPhrase -> VerbGroup = \aime,jean ->
|
complTransVerb : TransVerb -> NounPhrase -> VerbGroup = \aime,jean ->
|
||||||
{s = \\b,g,w => ---- BUG: v gives stack overflow
|
{s = \\b,g,w => ---- BUG: v gives stack overflow
|
||||||
let {Jean = jean.s ! (case2pform aime.c) ; Aime = aime.s ! w} in
|
let {Jean = jean.s ! (case2pformClit aime.c) ; Aime = aime.s ! w} in
|
||||||
if_then_Str (andB (isNounPhraseClit jean) (isTransVerbClit aime))
|
if_then_Str (andB (isNounPhraseClit jean) (isTransVerbClit aime))
|
||||||
(posNeg b (Jean ++ Aime) [])
|
(posNeg b (Jean ++ Aime) [])
|
||||||
(posNeg b Aime Jean)
|
(posNeg b Aime Jean)
|
||||||
@@ -490,23 +490,29 @@ oper
|
|||||||
|
|
||||||
DitransVerb = TransVerb ** {s3 : Preposition ; c3 : CaseA} ;
|
DitransVerb = TransVerb ** {s3 : Preposition ; c3 : CaseA} ;
|
||||||
|
|
||||||
mkDitransVerb : Verb -> Preposition -> CaseA -> Preposition -> CaseA -> DitransVerb =
|
mkDitransVerb :
|
||||||
|
Verb -> Preposition -> CaseA -> Preposition -> CaseA -> DitransVerb =
|
||||||
\v,p1,c1,p2,c2 ->
|
\v,p1,c1,p2,c2 ->
|
||||||
v ** {s2 = p1 ; c = c1 ; s3 = p2 ; c3 = c2} ;
|
v ** {s2 = p1 ; c = c1 ; s3 = p2 ; c3 = c2} ;
|
||||||
|
|
||||||
--- This must be completed to account for the cliticization of the second object.
|
--- This must be completed to account for the order of the clitics, and also, to
|
||||||
|
--- distinguish between different types of complements.
|
||||||
|
|
||||||
complDitransVerb :
|
complDitransVerb :
|
||||||
DitransVerb -> NounPhrase -> NounPhrase -> VerbGroup = \donner,jean,vin ->
|
DitransVerb -> NounPhrase -> NounPhrase -> VerbGroup = \donner,jean,vin ->
|
||||||
{s = \\b,g,w =>
|
{s = \\b,g,w =>
|
||||||
let
|
let
|
||||||
donne = donner.s ! w ;
|
donne = donner.s ! w ;
|
||||||
Jean = jean.s ! (case2pform donner.c) ;
|
cJean = isNounPhraseClit jean ;
|
||||||
duvin = vin.s ! (case2pform donner.c3) ;
|
cVin = isNounPhraseClit vin ;
|
||||||
|
Jean = jean.s ! (case2pformClit donner.c) ;
|
||||||
|
Vin = vin.s ! (case2pformClit donner.c3) ;
|
||||||
|
aJean = if_then_Str cJean [] Jean ;
|
||||||
|
duVin = if_then_Str cVin [] Vin ;
|
||||||
|
lui = if_then_Str cJean Jean [] ;
|
||||||
|
te = if_then_Str cVin Vin []
|
||||||
in
|
in
|
||||||
if_then_Str (andB (isNounPhraseClit jean) (isTransVerbClit donner))
|
posNeg b (te ++ lui ++ donne) (aJean ++ duVin)
|
||||||
(posNeg b (Jean ++ donne) duvin)
|
|
||||||
(posNeg b donne (Jean ++ duvin))
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- The following macro builds the "ne - pas" or "non" negation. The second
|
-- The following macro builds the "ne - pas" or "non" negation. The second
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ oper
|
|||||||
|
|
||||||
oper
|
oper
|
||||||
pform2case : NPFormA -> CaseA ;
|
pform2case : NPFormA -> CaseA ;
|
||||||
case2pform : CaseA -> NPFormA ;
|
case2pform, case2pformClit : CaseA -> NPFormA ;
|
||||||
|
|
||||||
prepCase : CaseA -> Str ;
|
prepCase : CaseA -> Str ;
|
||||||
|
|
||||||
@@ -101,8 +101,6 @@ oper
|
|||||||
|
|
||||||
-- Tonic forms are divided into four classes of clitic type.
|
-- Tonic forms are divided into four classes of clitic type.
|
||||||
-- The first value is used for never-clitic noun phrases.
|
-- The first value is used for never-clitic noun phrases.
|
||||||
-- This classification is incomplete, since we do not (yet) treat
|
|
||||||
-- ditransitive verbs.
|
|
||||||
--
|
--
|
||||||
-- Examples of each: "Giovanni" ; "io" ; "lui" ; "noi".
|
-- Examples of each: "Giovanni" ; "io" ; "lui" ; "noi".
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user