towards completing French API

This commit is contained in:
aarne
2005-02-21 16:26:01 +00:00
parent 6dc5c19c9e
commit 6ff1cfc233
3 changed files with 41 additions and 6 deletions

View File

@@ -2,7 +2,7 @@
--1 A Small English Resource Syntax
--
-- Aarne Ranta 2002
-- Aarne Ranta 2002 - 2005
--
-- This resource grammar contains definitions needed to construct
-- indicative, interrogative, and imperative sentences in English.

View File

@@ -21,6 +21,8 @@ lin
DefNumNP = defNounPhraseNum ;
DetNP = detNounPhrase ;
NDetNP = numDetNounPhrase ;
NDetNum = justNumDetNounPhrase ;
MassNP = partitiveNounPhrase singular ;
AppN2 = appFunComm ;
@@ -43,7 +45,19 @@ lin
ComparADeg = comparAdjPhrase ;
SuperlNP = superlNounPhrase ;
UseV2 = transAsVerb ;
---- PredAS = predAdjSent ;
---- PredV0 rain = predVerbClause (pronNounPhrase pronIt) rain (complVerb rain) ;
-- Partial saturation.
---- UseV2 = transAsVerb ;
---- ComplV3 = complDitransVerb ;
---- ComplA2S = predAdjSent2 ;
---- AdjPart = adjPastPart ;
UseV2V x = x ** {isAux = False} ;
UseV2S x = x ;
@@ -115,8 +129,11 @@ lin
ImperOne = imperUtterance singular ;
ImperMany = imperUtterance plural ;
----- PrepS p = p ;
----- AdvS = advSentence ;
---- AdvCl = advClause ;
---- AdvVPI = advVerbPhrase ;
---- AdCPhr = advSentence ;
---- AdvPhr = advSentence ;
TwoS = twoSentence ;
ConsS = consSentence ;
@@ -148,6 +165,7 @@ lin
PhrManyCN = useCommonNounPhrase plural ;
PhrIP ip = postfixSS "?" ip ;
PhrIAdv ia = postfixSS "?" ia ;
---- PhrVPI = verbUtterance ;
OnePhr p = p ;
ConsPhr = cc2 ;

View File

@@ -81,7 +81,7 @@ oper
-- The determiner determines the number of the argument noun.
Determiner : Type = {s : Gender => Str ; n : Number} ;
NumDeterminer : Type = {s : Gender => Str} ;
DeterminerNum : Type = {s : Gender => Str} ;
detNounPhrase : Determiner -> CommNoun -> NounPhrase = \tout, homme ->
normalNounPhrase
@@ -89,6 +89,23 @@ oper
homme.g
tout.n ;
numDetNounPhrase : DeterminerNum -> Numeral -> CommNounPhrase -> NounPhrase =
\tous, six, homme ->
normalNounPhrase
(\\c => prepCase c ++ tous.s ! homme.g ++ six.s ! homme.g ++ homme.s ! Pl)
homme.g
Pl ;
--- Here one would like to provide a feminine variant as well.
justNumDetNounPhrase : DeterminerNum -> Numeral -> NounPhrase =
\tous, six ->
normalNounPhrase
(\\c => prepCase c ++ tous.s ! Masc ++ six.s ! Masc)
Masc
Pl ;
-- The following macros are sufficient to define most determiners,
-- as shown by the examples that follow.
@@ -98,7 +115,7 @@ oper
mkDeterminer1 : Number -> Str -> Determiner = \n,chaque ->
mkDeterminer n chaque chaque ;
mkDeterminerNum : Str -> Str -> NumDeterminer =
mkDeterminerNum : Str -> Str -> DeterminerNum =
\tous,toutes ->
{s = \\g => genForms tous toutes ! g} ;