summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraarne <unknown>2003-11-14 12:35:17 +0000
committeraarne <unknown>2003-11-14 12:35:17 +0000
commit37384dbe06913a0352d4459050c1382874a45a62 (patch)
treee87e5228f67d0150468b54f7c212519768da4c62
parent13de08f794424515edaf0c0087f32e1dfd7b60f9 (diff)
ResFra by sharing.
-rw-r--r--grammars/resource/french/ResFra.gf206
-rw-r--r--grammars/resource/french/SyntaxFra.gf4
-rw-r--r--grammars/resource/french/TypesFra.gf2
3 files changed, 5 insertions, 207 deletions
diff --git a/grammars/resource/french/ResFra.gf b/grammars/resource/french/ResFra.gf
index 549a12f55..a80729c66 100644
--- a/grammars/resource/french/ResFra.gf
+++ b/grammars/resource/french/ResFra.gf
@@ -1,205 +1,3 @@
---# -path=.:../abstract:../../prelude
+--# -path=.:../romance:../abstract:../../prelude
---1 The Top-Level French Resource Grammar
---
--- Aarne Ranta 2002 -- 2003
---
--- This is the French concrete syntax of the multilingual resource
--- grammar. Most of the work is done in the file
--- $syntax.Romance.gf$, some in $syntax.Fra.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. Most parameter types are defined in $types.Romance.gf$, some in
--- $types.Fra.gf$.
-
-concrete ResFra of ResAbs = open Prelude, TypesFra, MorphoFra, SyntaxFra in {
-
-flags
- startcat=Phr ;
- parser=chart ;
-
-lincat
- N = CommNoun ;
- -- = {s : Number => Str ; g : Gender} ;
- CN = CommNoun ;
- NP = {s : NPForm => Str ; g : PronGen ;
- n : Number ; p : Person ; c : ClitType} ;
- PN = {s : Str ; g : Gender} ;
- Det = {s : Gender => Str ; n : Number} ;
- Adj1 = Adjective ;
- -- = {s : Gender => Number => Str ; p : Bool} ;
- Adj2 = Adjective ** {s2 : Preposition ; c : Case} ;
- AdjDeg = {s : Degree => Gender => Number => Str ; p : Bool} ;
- AP = Adjective ;
- Fun = CommNoun ** {s2 : Preposition ; c : Case} ;
-
- V = Verb ;
- -- = {s : VF => Str} ;
- VP = {s : Gender => VF => Str} ;
- TV = Verb ** {s2 : Preposition ; c : Case} ;
- VS = Verb ** {mp,mn : Mode} ;
- AdV = {s : Str} ;
-
- S = Sentence ;
- -- = {s : Mode => Str} ;
- Slash = Sentence ** {s2 : Preposition ; c : Case} ;
-
- RP = {s : RelForm => Str ; g : RelGen} ;
- RC = {s : Mode => Gender => Number => Str} ;
-
- IP = {s : Case => Str ; g : Gender ; n : Number} ;
- Qu = {s : QuestForm => Str} ;
- Imp = {s : Gender => Number => Str} ;
- Phr = {s : Str} ;
-
- Conj = {s : Str ; n : Number} ;
- ConjD = {s1,s2 : Str ; n : Number} ;
-
- ListS = {s1,s2 : Mode => Str} ;
- ListAP = {s1,s2 : Gender => Number => Str ; p : Bool} ;
- ListNP = {s1,s2 : Case => Str ; g : PronGen ; n : Number ; p : Person} ;
-
---.
-
-lin
- UseN = noun2CommNounPhrase ;
- ModAdj = modCommNounPhrase ;
- ModGenOne = npGenDet singular ;
- ModGenMany = npGenDet plural ;
- UsePN = nameNounPhrase ;
- UseFun = funAsCommNounPhrase ; -- [SyntaxFra.noun2CommNounPhrase]
- AppFun = appFunComm ;
- AdjP1 = adj2adjPhrase ;
- ComplAdj = complAdj ;
- PositAdjP = positAdjPhrase ;
- ComparAdjP = comparAdjPhrase ;
- SuperlNP = superlNounPhrase ;
-
- DetNP = detNounPhrase ;
- IndefOneNP = indefNounPhrase singular ;
- IndefManyNP = indefNounPhrase plural ;
- DefOneNP = defNounPhrase singular ;
- DefManyNP = defNounPhrase plural ;
-
- PredVP = predVerbPhrase ;
- PosV = predVerb True ;
- NegV = predVerb False ;
- PosA = predAdjective True ;
- NegA = predAdjective False ;
- PosCN = predCommNoun True ;
- NegCN = predCommNoun False ;
- PosTV = complTransVerb True ;
- NegTV = complTransVerb False ;
- PosNP = predNounPhrase True ;
- NegNP = predNounPhrase False ;
- PosVS = complSentVerb True ;
- NegVS = complSentVerb False ;
-
-
- AdvVP = adVerbPhrase ;
- LocNP = locativeNounPhrase ;
- AdvCN = advCommNounPhrase ;
-
- PosSlashTV = slashTransVerb True ;
- NegSlashTV = slashTransVerb False ;
-
- IdRP = identRelPron ;
- FunRP = funRelPron ;
- RelVP = relVerbPhrase ;
- RelSlash = relSlash ;
- ModRC = modRelClause ;
- RelSuch = relSuch ;
-
- WhoOne = intPronWho singular ;
- WhoMany = intPronWho plural ;
- WhatOne = intPronWhat singular ;
- WhatMany = intPronWhat plural ;
- FunIP = funIntPron ;
- NounIPOne = nounIntPron singular ;
- NounIPMany = nounIntPron plural ;
-
- QuestVP = questVerbPhrase ;
- IntVP = intVerbPhrase ;
- IntSlash = intSlash ;
- QuestAdv = questAdverbial ;
-
- ImperVP = imperVerbPhrase ;
-
- IndicPhrase = indicUtt ;
- QuestPhrase = interrogUtt ;
- ImperOne = imperUtterance singular ;
- ImperMany = imperUtterance plural ;
-
-lin
- TwoS = twoSentence ;
- ConsS = consSentence ;
- ConjS = conjunctSentence ;
- ConjDS = conjunctDistrSentence ; -- [Coordination.conjunctDistrTable]
-
- TwoAP = twoAdjPhrase ;
- ConsAP = consAdjPhrase ;
- ConjAP = conjunctAdjPhrase ;
- ConjDAP = conjunctDistrAdjPhrase ;
-
- TwoNP = twoNounPhrase ;
- ConsNP = consNounPhrase ;
- ConjNP = conjunctNounPhrase ;
- ConjDNP = conjunctDistrNounPhrase ;
-
- SubjS = subjunctSentence ; -- stack
- SubjImper = subjunctImperative ;
- SubjQu = subjunctQuestion ;
-
- PhrNP = useNounPhrase ;
- PhrOneCN = useCommonNounPhrase singular ;
- PhrManyCN = useCommonNounPhrase plural ;
- PhrIP ip = ip ;
- PhrIAdv ia = ia ;
-
-
- INP = pronNounPhrase pronJe ;
- ThouNP = pronNounPhrase pronTu ;
- HeNP = pronNounPhrase pronIl ;
- SheNP = pronNounPhrase pronElle ;
- WeNP = pronNounPhrase pronNous ;
- YeNP = pronNounPhrase pronVous ;
- YouNP = pronNounPhrase pronVous ;
- TheyNP = pronNounPhrase pronIls ;
-
--- Here is a point where the API is really inadequate for French,
--- which distinguishes between masculine and feminine "they".
--- The following solution is not attractive.
-
---- TheyNP = pronNounPhrase (variants {pronIls ; pronElles}) ;
-
- EveryDet = chaqueDet ;
- AllDet = tousDet ; --- expected constr head instead of [SyntaxFra.mkDeterminer]
- WhichDet = quelDet ;
- MostDet = plupartDet ;
-
- HowIAdv = ss "comment" ;
- WhenIAdv = ss "quand" ;
- WhereIAdv = ss "oł" ;
- WhyIAdv = ss "pourquoi" ;
-
- AndConj = ss "et" ** {n = Pl} ;
- OrConj = ss "ou" ** {n = Sg} ;
- BothAnd = sd2 "et" "et" ** {n = Pl} ;
- EitherOr = sd2 "ou" "ou" ** {n = Sg} ;
- NeitherNor = sd2 "ni" "ni" ** {n = Sg} ; --- requires ne !
- IfSubj = ss siSubj ;
- WhenSubj = ss "quand" ;
-
- PhrYes = ss "Oui." ;
- PhrNo = ss "Non." ; --- and also Si!
-
-}
+concrete ResFra of ResAbs = ResRomance with (SyntaxRomance=SyntaxFra) ;
diff --git a/grammars/resource/french/SyntaxFra.gf b/grammars/resource/french/SyntaxFra.gf
index 98cec2966..925d48b20 100644
--- a/grammars/resource/french/SyntaxFra.gf
+++ b/grammars/resource/french/SyntaxFra.gf
@@ -129,7 +129,7 @@ oper
questVerbPhrase = \jean,dort ->
{s = table {
DirQ => optStr (estCeQue Acc) ++ (predVerbPhrase jean dort).s ! Ind ;
- IndirQ => siSubj ++ (predVerbPhrase jean dort).s ! Ind
+ IndirQ => elisSi ++ (predVerbPhrase jean dort).s ! Ind
}
} ;
@@ -286,7 +286,7 @@ oper
etetConj = sd2 "et" "et" ** {n = Pl} ;
ououConj = sd2 "ou" "ou" ** {n = Sg} ;
niniConj = sd2 "ni" "ni" ** {n = Sg} ; --- requires ne !
- siSubj = ss siSubj ;
+ siSubj = ss elisSi ;
quandSubj = ss "quand" ;
ouiPhr = ss ["Oui ."] ;
diff --git a/grammars/resource/french/TypesFra.gf b/grammars/resource/french/TypesFra.gf
index 5517ce6ec..71c12a437 100644
--- a/grammars/resource/french/TypesFra.gf
+++ b/grammars/resource/french/TypesFra.gf
@@ -59,7 +59,7 @@ oper
-- only approximatively correct, for "si" is not really elided before
-- the string "il" in general, but before the pronouns "il" and "ils".
- siSubj = pre {"si" ; "s'" / strs {"il"}} ;
+ elisSi = pre {"si" ; "s'" / strs {"il"}} ;
--2 Prepositions