New things in english and german resources.

This commit is contained in:
aarne
2003-09-25 14:26:29 +00:00
parent a6a7abe6f6
commit 8ed7749eb6
14 changed files with 261 additions and 55 deletions

View File

@@ -115,6 +115,14 @@ oper
n = Pl
} ;
-- Constructions like "the idea that two is even" are formed at the
-- first place as common nouns, so that one can also have "a suggestion that...".
nounThatSentence : CommNounPhrase -> Sentence -> CommNounPhrase = \idea,x ->
{s = \\n,c => idea.s ! n ! c ++ "that" ++ x.s ;
g = idea.g
} ;
--2 Adjectives
--
@@ -128,6 +136,7 @@ oper
simpleAdjPhrase : Str -> AdjPhrase = \French ->
adj2adjPhrase (simpleAdj French) ;
--3 Comparison adjectives
--
-- Each of the comparison forms has a characteristic use:
@@ -205,7 +214,7 @@ oper
appFunComm : Function -> NounPhrase -> CommNounPhrase = \mother,john ->
{s = \\n => table {
Gen => nonExist ;
Gen => nonExist ; --- ?
_ => mother.s ! n ! Nom ++ mother.s2 ++ john.s ! GenSP
} ;
g = mother.g
@@ -226,7 +235,7 @@ oper
variants {
defNounPhrase nf (appFunComm mother john) ;
npGenDet nf john mother
} ;
} ;
-- The commonest case is functions with the preposition "of".
@@ -236,6 +245,17 @@ oper
funOfReg : Str -> Gender -> Function = \mother,g ->
funOf (nounReg mother ** {g = g}) ;
-- Two-place functions add one argument place.
Function2 = Function ** {s3 : Preposition} ;
-- There application starts by filling the first place.
appFun2 : Function2 -> NounPhrase -> Function = \train, paris ->
{s = \\n,c => train.s ! n ! c ++ train.s2 ++ paris.s ! AccP ;
g = train.g ;
s2 = train.s3
} ;
--2 Verbs
@@ -350,6 +370,46 @@ oper
mkTransVerbDir : VerbP3 -> TransVerb = \love ->
mkTransVerbPart love [] ;
-- Transitive verbs with accusative objects can be used passively.
-- The function does not check that the verb is transitive.
-- Therefore, the function can also be used for "he is swum", etc.
-- The syntax is the same as for adjectival predication.
passVerb : Bool -> Verb -> VerbPhrase = \b,love ->
predAdjective b (adj2adjPhrase (ss (love.s ! PPart))) ;
-- Transitive verbs can be used elliptically as verbs. The semantics
-- is left to applications. The definition is trivial, due to record
-- subtyping.
transAsVerb : TransVerb -> Verb = \love ->
love ;
-- *Ditransitive verbs* are verbs with three argument places.
-- We treat so far only the rule in which the ditransitive
-- verb takes both complements to form a verb phrase.
DitransVerb = TransVerb ** {s4 : Preposition} ;
mkDitransVerb : Verb -> Preposition -> Preposition -> DitransVerb = \v,p1,p2 ->
v ** {s3 = p1 ; s4 = p2} ;
complDitransVerb :
Bool -> DitransVerb -> NounPhrase -> NounPhrase -> VerbPhrase =
\b,give,you,beer ->
let {
youbeer = give.s1 ++ give.s3 ++ you.s ! AccP ++ give.s4 ++ beer.s ! AccP
} in
if_then_else VerbPhrase b
{s = give.s ;
s2 = \\_ => youbeer ;
isAux = False
}
{s = \\v => contractNot (verbP3Do.s ! v) ;
s2 = \\_ => give.s ! InfImp ++ youbeer ;
isAux = True
} ;
--2 Adverbials
--
@@ -373,6 +433,11 @@ oper
isAux = sings.isAux
} ;
advAdjPhrase : Adverb -> AdjPhrase -> AdjPhrase = \very, good ->
{s = very.s ++ good.s ;
p = good.p
} ;
-- Adverbials are typically generated by prefixing prepositions.
-- The rule for creating locative noun phrases by the preposition "in"
-- is a little shaky, since other prepositions may be preferred ("on", "at").
@@ -680,6 +745,14 @@ oper
imperUtterance : Number -> Imperative -> Utterance = \n,I ->
ss (I.s ! n ++ "!") ;
--2 Sentence adverbials
--
-- This class covers adverbials such as "otherwise", "therefore", which are prefixed
-- to a sentence to form a phrase.
advSentence : Adverb -> Sentence -> Utterance = \hence,itiseven ->
ss (hence.s ++ itiseven.s ++ ".") ;
--2 Coordination
--