mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-26 19:28:54 -06:00
VP romance
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
--# -path=.:../romance:../abstract:../../prelude
|
--# -path=.:../romance:../abstract:../../prelude
|
||||||
|
|
||||||
concrete ClauseFre of Clause = CategoriesFre **
|
concrete ClauseFre of Clause = CategoriesFre **
|
||||||
ClauseRomance with (SyntaxRomance=SyntaxFre) ;
|
ClauseI with (Rules=RulesFre), (Verbphrase=VerbphraseFre) ;
|
||||||
|
---- ClauseRomance with (SyntaxRomance=SyntaxFre) ;
|
||||||
|
|||||||
@@ -104,8 +104,10 @@ oper
|
|||||||
|
|
||||||
negVerb = \va -> elisNe ++ va ++ "pas" ;
|
negVerb = \va -> elisNe ++ va ++ "pas" ;
|
||||||
|
|
||||||
|
-- copula = \b,w -> let etre = (predVerb verbEtre).s in etre ! b ! Masc ! w ;
|
||||||
copula = verbEtre ;
|
copula = verbEtre ;
|
||||||
|
|
||||||
|
|
||||||
isClitCase = \c -> case c of {
|
isClitCase = \c -> case c of {
|
||||||
Acc => True ;
|
Acc => True ;
|
||||||
Dat => True ;
|
Dat => True ;
|
||||||
|
|||||||
3
lib/resource/french/VerbphraseFre.gf
Normal file
3
lib/resource/french/VerbphraseFre.gf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
--# -path=.:../romance:../abstract:../../prelude
|
||||||
|
concrete VerbphraseFre of Verbphrase = CategoriesFre **
|
||||||
|
VerbphraseRomance with (SyntaxScand=SyntaxFre) ;
|
||||||
@@ -406,6 +406,10 @@ oper
|
|||||||
VPF _ f => nombreVerb f
|
VPF _ f => nombreVerb f
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
personVerbPhrase : VPForm -> Person = \v -> case v of {
|
||||||
|
VPF _ f => personVerb f
|
||||||
|
} ;
|
||||||
|
|
||||||
isNotImperative : VPForm -> Bool = \v -> case v of {
|
isNotImperative : VPForm -> Bool = \v -> case v of {
|
||||||
VPF _ (VImper _) => False ;
|
VPF _ (VImper _) => False ;
|
||||||
_ => True
|
_ => True
|
||||||
@@ -724,33 +728,32 @@ param
|
|||||||
oper
|
oper
|
||||||
Clause = {s : Bool => ClForm => Str} ;
|
Clause = {s : Bool => ClForm => Str} ;
|
||||||
|
|
||||||
{-
|
---- VIForm = VIInfinit | VIImperat Bool Number ;
|
||||||
predVerbPhrase : NounPhrase -> VerbPhrase -> Sentence = \jean,dort ->
|
predVerbGroup : Bool -> {s : Str ; a : Anteriority} -> VerbGroup -> VerbPhrase =
|
||||||
{s = \\m => jean.s ! unstressed nominative ++
|
\b,ant,vg ->
|
||||||
dort.s ! pgen2gen jean.g ! VPF Simul (VFin (VPres m) jean.n jean.p)
|
{s = \\vi,g,n,p => ant.s ++ vg.s ! b ! g ! VPF ant.a VInfin ---- imper
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
predVerbGroup : Bool -> VerbGroup -> VerbPhrase = \b,vg -> {
|
|
||||||
s = vg.s ! b
|
|
||||||
} ;
|
|
||||||
|
|
||||||
|
|
||||||
oper
|
|
||||||
cl2vp : ClForm -> Number -> Person -> VPForm = \c,n,p -> case c of {
|
cl2vp : ClForm -> Number -> Person -> VPForm = \c,n,p -> case c of {
|
||||||
ClPres a m => VPF a (VFin (VPres m) n p) ;
|
ClPres a m => VPF a (VFin (VPres m) n p) ;
|
||||||
ClImperf a m => VPF a (VFin (VImperf m) n p) ;
|
ClImperf a m => VPF a (VFin (VImperf m) n p) ;
|
||||||
ClPasse a => VPF a (VFin VPasse n p) ;
|
ClPasse a => VPF a (VFin VPasse n p) ;
|
||||||
ClFut a => VPF a (VFin VFut n p) ;
|
ClFut a => VPF a (VFin VFut n p) ;
|
||||||
ClCondit a => VPF a (VFin VCondit n p)
|
ClCondit a => VPF a (VFin VCondit n p) ;
|
||||||
ClInfinit a => VPF a VInfin
|
ClInfinit a => VPF a VInfin
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
predVerbGroupClause : NounPhrase -> VerbGroup -> Clause = \jean,dort ->
|
vp2cl : VPForm -> ClForm = \vf -> case vf of {
|
||||||
{s = \\b,c =>
|
VPF a (VFin (VPres m) _ _) => ClPres a m ;
|
||||||
jean.s ! unstressed nominative ++
|
VPF a (VFin (VImperf m) _ _) => ClImperf a m ;
|
||||||
dort.s ! b ! pgen2gen jean.g ! cl2vp c jean.n jean.p
|
VPF a (VFin (VPasse) _ _) => ClPasse a ;
|
||||||
|
VPF a (VFin (VFut) _ _) => ClFut a ;
|
||||||
|
VPF a (VFin (VCondit) _ _) => ClCondit a ;
|
||||||
|
VPF a VInfin => ClInfinit a ;
|
||||||
|
_ => ClInfinit Simul ---- imper
|
||||||
} ;
|
} ;
|
||||||
-}
|
|
||||||
|
|
||||||
Complemnt = Gender => Number => Person => {clit, part, compl : Str} ; ---- ment
|
Complemnt = Gender => Number => Person => {clit, part, compl : Str} ; ---- ment
|
||||||
|
|
||||||
predVerbClause : NounPhrase -> Verb -> Complemnt -> Clause = \np,verb,comp ->
|
predVerbClause : NounPhrase -> Verb -> Complemnt -> Clause = \np,verb,comp ->
|
||||||
@@ -785,6 +788,28 @@ oper
|
|||||||
ClInfinit a => <jean, posNeg b (la ++ avoirr) (aimee ++ ici)>
|
ClInfinit a => <jean, posNeg b (la ++ avoirr) (aimee ++ ici)>
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
-- These three function are just to restore the $VerbGroup$ ($VP$) based structure.
|
||||||
|
|
||||||
|
predVerbGroupClause : NounPhrase -> VerbGroup -> Clause = \np,vp ->
|
||||||
|
let
|
||||||
|
it = np.s ! unstressed nominative
|
||||||
|
in
|
||||||
|
{s = \\b,cf => it ++ vp.s ! b ! pgen2gen np.g ! cl2vp cf np.n np.p} ;
|
||||||
|
|
||||||
|
predClauseGroup : Verb -> Complemnt -> VerbGroup = \verb,comp ->
|
||||||
|
let
|
||||||
|
nvg : PronGen -> Number -> Person -> (Bool => ClForm => (Str * Str)) =
|
||||||
|
\g,n,p ->
|
||||||
|
predVerbClauseGen {s = \\_ => [] ; g=g ; n=n ; p=p ; c=Clit0} verb comp
|
||||||
|
-- clit type irrelevant in subject position
|
||||||
|
in
|
||||||
|
{s = \\b,g,vf =>
|
||||||
|
(nvg (PGen g) (nombreVerbPhrase vf) (personVerbPhrase vf) ! b ! (vp2cl vf)).p2
|
||||||
|
} ;
|
||||||
|
|
||||||
|
predClauseBeGroup : Complemnt -> VerbGroup =
|
||||||
|
predClauseGroup copula ;
|
||||||
|
|
||||||
|
|
||||||
--3 Sentence-complement verbs
|
--3 Sentence-complement verbs
|
||||||
--
|
--
|
||||||
|
|||||||
@@ -178,6 +178,11 @@ oper
|
|||||||
_ => singular ---
|
_ => singular ---
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
personVerb : VF -> Person = \v -> case v of {
|
||||||
|
VFin _ _ p => p ;
|
||||||
|
_ => P3 ---
|
||||||
|
} ;
|
||||||
|
|
||||||
presInd = VPres Ind ;
|
presInd = VPres Ind ;
|
||||||
-- The imperative forms depend on number and person.
|
-- The imperative forms depend on number and person.
|
||||||
|
|
||||||
|
|||||||
67
lib/resource/romance/VerbphraseRomance.gf
Normal file
67
lib/resource/romance/VerbphraseRomance.gf
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
--# -path=.:../romance:../abstract:../../prelude
|
||||||
|
|
||||||
|
--1 The Top-Level Romance Resource Grammar: Verb Phrase Combination Rules
|
||||||
|
--
|
||||||
|
-- Aarne Ranta 2002 -- 2003
|
||||||
|
--
|
||||||
|
-- This is the English concrete syntax of the multilingual resource
|
||||||
|
-- grammar. Most of the work is done in the file $syntax.Eng.gf$.
|
||||||
|
-- However, for the purpose of documentation, we make here explicit the
|
||||||
|
-- linearization types of each category, so that their structures and
|
||||||
|
-- dependencies can be seen.
|
||||||
|
-- Another substantial part are the linearization rules of some
|
||||||
|
-- structural words.
|
||||||
|
--
|
||||||
|
-- The users of the resource grammar should not look at this file for the
|
||||||
|
-- linearization rules, which are in fact hidden in the document version.
|
||||||
|
-- They should use $resource.Abs.gf$ to access the syntactic rules.
|
||||||
|
-- This file can be consulted in those, hopefully rare, occasions in which
|
||||||
|
-- one has to know how the syntactic categories are
|
||||||
|
-- implemented. The parameter types are defined in $TypesEng.gf$.
|
||||||
|
|
||||||
|
incomplete concrete VerbphraseRomance of Verbphrase = CategoriesRomance **
|
||||||
|
open Prelude, SyntaxRomance in {
|
||||||
|
|
||||||
|
flags optimize=all ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
UseV v = predClauseGroup v (complVerb v) ;
|
||||||
|
UsePassV v = predClauseBeGroup (passVerb v) ;
|
||||||
|
ComplV2 v x = predClauseGroup v (complTransVerb v x) ;
|
||||||
|
ComplReflV2 v = predClauseGroup v (reflTransVerb v) ;
|
||||||
|
ComplVS v x = predClauseGroup v (complSentVerb v x) ;
|
||||||
|
ComplVV v x = predClauseGroup v (complVerbVerb v x) ;
|
||||||
|
ComplVQ v x = predClauseGroup v (complQuestVerb v x) ;
|
||||||
|
ComplVA v x = predClauseGroup v (complAdjVerb v x) ;
|
||||||
|
ComplV2A v x y = predClauseGroup v (complDitransAdjVerb v x y) ;
|
||||||
|
ComplSubjV2V v x y = predClauseGroup v (complDitransVerbVerb False v x y) ;
|
||||||
|
ComplObjV2V v x y = predClauseGroup v (complDitransVerbVerb True v x y) ;
|
||||||
|
---- ComplV2S v x y = predClauseGroup v (complDitransSentVerb v x y) ;
|
||||||
|
---- ComplV2Q v x y = predClauseGroup v (complDitransQuestVerb v x y) ;
|
||||||
|
|
||||||
|
PredAP v = predClauseBeGroup (complAdjective v) ;
|
||||||
|
PredSuperl a = predClauseBeGroup (complAdjective (superlAdjPhrase a)) ;
|
||||||
|
PredCN v = predClauseBeGroup (complCommNoun v) ;
|
||||||
|
PredNP v = predClauseBeGroup (complNounPhrase v) ;
|
||||||
|
PredPP v = predClauseBeGroup (complAdverb v) ;
|
||||||
|
|
||||||
|
PredAV v x = predClauseBeGroup (complVerbAdj v x) ;
|
||||||
|
---- PredObjA2V v x y = predClauseBeGroup (complVerbAdj2 True v x y) ;
|
||||||
|
|
||||||
|
---- PredProgVP = progressiveVerbPhrase ;
|
||||||
|
|
||||||
|
---- SPredProgVP = progressiveClause ;
|
||||||
|
|
||||||
|
-- Use VPs
|
||||||
|
|
||||||
|
PredVP = predVerbGroupClause ;
|
||||||
|
|
||||||
|
---- RelVP = relVerbPhrase ;
|
||||||
|
---- IntVP = intVerbPhrase ;
|
||||||
|
|
||||||
|
PosVP tp = predVerbGroup True tp ;
|
||||||
|
NegVP tp = predVerbGroup False tp ;
|
||||||
|
|
||||||
|
---- AdvVP = adVerbPhrase ;
|
||||||
|
---- SubjVP = subjunctVerbPhrase ;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user