mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 19:42:50 -06:00
fixed infinitives and imperatives
This commit is contained in:
@@ -98,8 +98,8 @@ cat
|
||||
VS ; -- sentence-compl. verb, e.g. "say", "prove"
|
||||
VV ; -- verb-compl. verb, e.g. "can", "want"
|
||||
|
||||
VG ; -- verbal group, e.g. "switch the light on"
|
||||
VP ; -- verb phrase, e.g. "switch the light on", "don't run"
|
||||
VP ; -- verb phrase, e.g. "switch the light on"
|
||||
VPI ; -- infin. or imp. verb phrase e.g. "switch the light on", "don't run"
|
||||
|
||||
--!
|
||||
--3 Adverbs and prepositions/cases
|
||||
|
||||
@@ -63,24 +63,24 @@ fun
|
||||
-- have (or have not) a negation, but they are formed from verbal groups
|
||||
-- ($VG$), which have both positive and negative forms.
|
||||
|
||||
PredV : V -> VG ; -- "walk", "doesn't walk"
|
||||
PredPassV : V -> VG ; -- "is seen", "is not seen"
|
||||
PredV2 : V2 -> NP -> VG ; -- "sees John", "doesn't see John"
|
||||
PredV : V -> VP ; -- "walk", "doesn't walk"
|
||||
PredPassV : V -> VP ; -- "is seen", "is not seen"
|
||||
PredV2 : V2 -> NP -> VP ; -- "sees John", "doesn't see John"
|
||||
--- PredV3 : V3 -> NP -> NP -> VG ; -- "prefers wine to beer"
|
||||
PredV3 : V3 -> NP -> V2 ; -- "prefers wine (to beer)"
|
||||
PredVS : VS -> S -> VG ; -- "says that I run", "doesn't say..."
|
||||
PredVV : VV -> VG -> VG ; -- "can run", "can't run", "tries to run"
|
||||
PredVS : VS -> S -> VP ; -- "says that I run", "doesn't say..."
|
||||
PredVV : VV -> VPI -> VP ; -- "can run", "can't run", "tries to run"
|
||||
|
||||
PredNP : NP -> VG ; -- "is John", "is not John"
|
||||
PredPP : PP -> VG ; -- "is in France", "is not in France"
|
||||
PredAP : AP -> VG ; -- "is old", "isn't old"
|
||||
PredSuperl : ADeg -> VG ; -- "is the oldest"
|
||||
PredCN : CN -> VG ; -- "is a man", "isn't a man"
|
||||
PredNP : NP -> VP ; -- "is John", "is not John"
|
||||
PredPP : PP -> VP ; -- "is in France", "is not in France"
|
||||
PredAP : AP -> VP ; -- "is old", "isn't old"
|
||||
PredSuperl : ADeg -> VP ; -- "is the oldest"
|
||||
PredCN : CN -> VP ; -- "is a man", "isn't a man"
|
||||
VTrans : V2 -> V ; -- "loves"
|
||||
|
||||
--- PosVG,NegVG : VG -> VP ; --
|
||||
|
||||
PredVG : NP -> VG -> Cl ; -- preserves all pol/tense variation
|
||||
PredVP : NP -> VP -> Cl ; -- preserves all pol/tense variation
|
||||
|
||||
--!
|
||||
--3 Adverbs
|
||||
@@ -91,6 +91,7 @@ fun
|
||||
AdvPP : PP -> Adv ; -- "in London", "after the war"
|
||||
PrepNP : Prep -> NP -> PP ; -- "in London", "after the war"
|
||||
|
||||
--- AdvVP : VP -> Adv -> VP ; -- "always walks", "walks in the park"
|
||||
AdvVP : VP -> Adv -> VP ; -- "always walks", "walks in the park"
|
||||
AdvCN : CN -> PP -> CN ; -- "house in London"
|
||||
AdvAP : AdA -> AP -> AP ; -- "very good"
|
||||
@@ -103,7 +104,7 @@ fun
|
||||
--- PosSlashV2,NegSlashV2 : NP -> V2 -> Slash ; -- "John sees", "John doesn't see"
|
||||
SlashV2 : NP -> V2 -> Slash ; -- "John sees", "John doesn't see"
|
||||
--- OneVP : VP -> S ; -- "one walks"
|
||||
OneVG : VG -> Cl ; -- "one walks"
|
||||
OneVP : VP -> Cl ; -- "one walks"
|
||||
--- ThereNP : NP -> S ; -- "there is a bar","there are 86 bars"
|
||||
ExistCN : CN -> Cl ; -- "there is a bar"
|
||||
ExistNumCN : Num -> CN -> Cl ; -- "there are (86) bars"
|
||||
@@ -111,7 +112,7 @@ fun
|
||||
IdRP : RP ; -- "which"
|
||||
FunRP : N2 -> RP -> RP ; -- "the successor of which"
|
||||
--- RelVP : RP -> VP -> RCl ; -- "who walks", "who doesn't walk"
|
||||
RelVG : RP -> VG -> RCl ; -- "who walks", "who doesn't walk"
|
||||
RelVP : RP -> VP -> RCl ; -- "who walks", "who doesn't walk"
|
||||
RelSlash : RP -> Slash -> RCl ; -- "that I wait for"/"for which I wait"
|
||||
--- ModRC : CN -> RS -> CN ; -- "man who walks"
|
||||
ModRS : CN -> RS -> CN ; -- "man who walks"
|
||||
@@ -128,17 +129,17 @@ fun
|
||||
NounIPOne, NounIPMany : CN -> IP ; -- "which car", "which cars"
|
||||
---- NounIPHowMany : CN -> IP ; -- "how many cars"
|
||||
|
||||
QuestVG : NP -> VG -> QCl ; -- "does John walk"; "doesn't John walk"
|
||||
--- IntVP : IP -> VP -> QCl ; -- "who walks"
|
||||
IntVG : IP -> VG -> QCl ; -- "who walks"
|
||||
QuestVP : NP -> VP -> QCl ; -- "does John walk"; "doesn't John walk"
|
||||
IntVP : IP -> VP -> QCl ; -- "who walks"
|
||||
IntSlash : IP -> Slash -> QCl ; -- "whom does John see"
|
||||
--- QuestAdv : IAdv -> NP -> VP -> QS ; -- "why do you walk"
|
||||
QuestAdv : IAdv -> NP -> VG -> QCl ; -- "why do you walk"
|
||||
QuestAdv : IAdv -> NP -> VP -> QCl ; -- "why do you walk"
|
||||
--- IsThereNP : NP -> QS ; -- "is there a bar", "are there (86) bars"
|
||||
ExistQCl : CN -> QCl ; -- "is there a bar",
|
||||
ExistNumQCl : Num -> CN -> QCl ; -- "are there (86) bars"
|
||||
|
||||
ImperVP : VP -> Imp ; -- "be a man"
|
||||
--- ImperVP : VP -> Imp ; -- "be a man"
|
||||
ImperVP : VPI -> Imp ; -- "(don't) be a man"
|
||||
|
||||
----rename these ??
|
||||
IndicPhrase : S -> Phr ; -- "I walk."
|
||||
@@ -212,30 +213,30 @@ fun
|
||||
|
||||
PredVV2 : VV -> V2 -> V2 ; -- (which song do you) want to play
|
||||
AdjPart : V -> A ; -- forgotten
|
||||
ReflV2 : V2 -> VG ;
|
||||
ReflV2 : V2 -> VP ;
|
||||
|
||||
-- In these predications, the last argument gets its agreement
|
||||
-- features from the second, and cannot hence be made to produce
|
||||
-- $V2A$/$V2S$.
|
||||
|
||||
PredV2A : V2A -> NP -> AP -> VG ;
|
||||
PredSubjV2V : V2V -> NP -> VG -> VG ;
|
||||
PredV2A : V2A -> NP -> AP -> VP ;
|
||||
PredSubjV2V : V2V -> NP -> VPI -> VP ;
|
||||
|
||||
--- In these three it would be possible, but hardly useful...
|
||||
|
||||
PredObjV2V : V2V -> NP -> VG -> VG ;
|
||||
PredV2S : V2S -> NP -> S -> VG ;
|
||||
PredV2Q : V2Q -> NP -> QS -> VG ;
|
||||
PredObjV2V : V2V -> NP -> VPI -> VP ;
|
||||
PredV2S : V2S -> NP -> S -> VP ;
|
||||
PredV2Q : V2Q -> NP -> QS -> VP ;
|
||||
|
||||
PredAS : AS -> S -> Cl ;
|
||||
PredA2S : A2S -> NP -> AS ;
|
||||
PredAV : AV -> VG -> VG ;
|
||||
PredSubjA2V : A2V -> NP -> VG -> VG ;
|
||||
PredObjA2V : A2V -> NP -> VG -> VG ;
|
||||
PredAS : AS -> S -> Cl ;
|
||||
PredA2S : A2S -> NP -> AS ;
|
||||
PredAV : AV -> VPI -> VP ;
|
||||
PredSubjA2V : A2V -> NP -> VPI -> VP ;
|
||||
PredObjA2V : A2V -> NP -> VPI -> VP ;
|
||||
PredV0 : V0 -> Cl ;
|
||||
|
||||
PredVQ : VQ -> QS -> VG ;
|
||||
PredVA : VA -> AP -> VG ;
|
||||
PredVQ : VQ -> QS -> VP ;
|
||||
PredVA : VA -> AP -> VP ;
|
||||
|
||||
UseV2V : V2V -> VV ;
|
||||
UseV2S : V2S -> VS ;
|
||||
@@ -244,9 +245,11 @@ fun
|
||||
UseA2V : A2V -> AV ;
|
||||
|
||||
UseCl : TP -> Cl -> S ;
|
||||
UseVG : TP -> VG -> VP ;
|
||||
UseRCl : TP -> RCl -> RS ;
|
||||
UseQCl : TP -> QCl -> QS ;
|
||||
PosVP, NegVP : Ant -> VP -> VPI ;
|
||||
|
||||
ProgVP : VPI -> VP ; -- he is eating
|
||||
|
||||
PosTP : Tense -> Ant -> TP ;
|
||||
NegTP : Tense -> Ant -> TP ;
|
||||
|
||||
@@ -29,5 +29,5 @@ fun
|
||||
Important : A2S ;
|
||||
Probable : AS ;
|
||||
Easy : A2V ;
|
||||
|
||||
Rain : V0 ;
|
||||
} ;
|
||||
|
||||
@@ -118,9 +118,16 @@ instance SyntaxDan of SyntaxScand = TypesDan **
|
||||
|
||||
reflPron : Number -> Person -> Str = \n,p -> case <n,p> of {
|
||||
<Sg,P1> => "mig" ;
|
||||
<Sg,P2> => "mig" ;
|
||||
<Sg,P2> => "dig" ;
|
||||
<Pl,P1> => "os" ;
|
||||
<Pl,P2> => "seg" ; --- ? dere ?
|
||||
_ => "seg"
|
||||
} ;
|
||||
|
||||
progressiveVerbPhrase : VerbPhrase -> VerbGroup =
|
||||
complVerbVerb
|
||||
(verbVara **
|
||||
{s3 = ["ved at"]}
|
||||
) ;
|
||||
|
||||
}
|
||||
@@ -70,5 +70,6 @@ lin
|
||||
Important = extAdjective (aAbstrakt "viktig") ** {s2 = "for"} ;
|
||||
Probable = extAdjective (aAbstrakt "sandsynlig") ;
|
||||
Easy = extAdjective (aRod "let") ** {s2 = "for"} ;
|
||||
Rain = extTransVerb (vNopart (vHusk "regn")) [] ;
|
||||
|
||||
} ;
|
||||
|
||||
@@ -118,10 +118,16 @@ instance SyntaxNor of SyntaxScand = TypesNor **
|
||||
|
||||
reflPron : Number -> Person -> Str = \n,p -> case <n,p> of {
|
||||
<Sg,P1> => "meg" ;
|
||||
<Sg,P2> => "meg" ;
|
||||
<Sg,P2> => "deg" ;
|
||||
<Pl,P1> => "oss" ;
|
||||
<Pl,P2> => "jer" ;
|
||||
_ => "seg"
|
||||
} ;
|
||||
|
||||
progressiveVerbPhrase : VerbPhrase -> VerbGroup =
|
||||
complVerbVerb
|
||||
(verbVara **
|
||||
{s3 = ["ved at"]}
|
||||
) ;
|
||||
|
||||
}
|
||||
|
||||
@@ -68,6 +68,7 @@ lin
|
||||
Important = extAdjective (aAbstrakt "viktig") ** {s2 = "for"} ;
|
||||
Probable = extAdjective (aAbstrakt "sannsynlig") ;
|
||||
Easy = extAdjective (aRod "grei") ** {s2 = "for"} ;
|
||||
Rain = extTransVerb (vNopart (vHusk "regn")) [] ;
|
||||
|
||||
|
||||
} ;
|
||||
|
||||
@@ -33,9 +33,10 @@ lincat
|
||||
|
||||
V = Verb ;
|
||||
-- = {s : VerbForm => Str ; s1 : Str} ;
|
||||
VG = {s : SForm => Str ; s2 : Bool => Str ;
|
||||
VP = {s : SForm => Str ; s2 : Bool => Str ;
|
||||
s3 : SForm => Gender => Number => Person => Str} ;
|
||||
VP = {s : Str ; s2 : Str ; s3 : Gender => Number => Person => Str} ;
|
||||
VPI = {s : VIForm => Str ; s2 : Str ;
|
||||
s3 : VIForm => Gender => Number => Person => Str} ;
|
||||
V2 = TransVerb ;
|
||||
-- = Verb ** {s2 : Preposition} ;
|
||||
V3 = TransVerb ** {s3 : Preposition} ;
|
||||
|
||||
@@ -57,10 +57,12 @@ lin
|
||||
UseA2S x = x ;
|
||||
UseA2V x = x ;
|
||||
|
||||
UseCl tp cl = {s = \\o => tp.s ++ cl.s ! tp.b ! ClFinite tp.t tp.a o} ;
|
||||
|
||||
PosVP tp = predVerbGroup True tp.a ;
|
||||
NegVP tp = predVerbGroup False tp.a ;
|
||||
|
||||
UseCl tp cl = {s = \\o => tp.s ++ cl.s ! tp.b ! ClFinite tp.t tp.a o} ;
|
||||
UseVG tp = predVerbGroup tp.b tp.t tp.a ;
|
||||
ProgVP = progressiveVerbPhrase ;
|
||||
|
||||
PosTP t a = {s = t.s ++ a.s ; b = True ; t = t.t ; a = a.a} ;
|
||||
NegTP t a = {s = t.s ++ a.s ; b = False ; t = t.t ; a = a.a} ;
|
||||
@@ -71,7 +73,7 @@ lin
|
||||
ASimul = {s = [] ; a = Simul} ;
|
||||
AAnter = {s = [] ; a = Anter} ;
|
||||
|
||||
PredVG = predVerbGroupClause ;
|
||||
PredVP = predVerbGroupClause ;
|
||||
|
||||
PredV = predVerb ;
|
||||
PredAP = predAdjective ;
|
||||
@@ -111,11 +113,11 @@ lin
|
||||
(indefNounPhraseNum plural nu A)) ;
|
||||
|
||||
SlashV2 = slashTransVerb ;
|
||||
OneVG = predVerbGroupClause npMan ;
|
||||
OneVP = predVerbGroupClause npMan ;
|
||||
|
||||
IdRP = identRelPron ;
|
||||
FunRP = funRelPron ;
|
||||
RelVG = relVerbGroup ;
|
||||
RelVP = relVerbGroup ;
|
||||
RelSlash = relSlash ;
|
||||
ModRS = modRelClause ;
|
||||
RelCl = relSuch ;
|
||||
@@ -131,8 +133,8 @@ lin
|
||||
NounIPOne = nounIntPron singular ;
|
||||
NounIPMany = nounIntPron plural ;
|
||||
|
||||
QuestVG = questVerbPhrase ;
|
||||
IntVG = intVerbPhrase ;
|
||||
QuestVP = questVerbPhrase ;
|
||||
IntVP = intVerbPhrase ;
|
||||
IntSlash = intSlash ;
|
||||
QuestAdv = questAdverbial ;
|
||||
|
||||
@@ -151,7 +153,7 @@ lin
|
||||
|
||||
IndicPhrase = indicUtt ;
|
||||
QuestPhrase = interrogUtt ;
|
||||
ImperOne = imperUtterance singular ;
|
||||
ImperOne = imperUtterance singular ;
|
||||
ImperMany = imperUtterance plural ;
|
||||
|
||||
PrepS p = ss (p.s ++ ",") ;
|
||||
|
||||
@@ -479,6 +479,9 @@ param
|
||||
VFinite Tense Anteriority
|
||||
| VImperat
|
||||
| VInfinit Anteriority ;
|
||||
VIForm =
|
||||
VIImperat
|
||||
| VIInfinit ;
|
||||
|
||||
oper
|
||||
verbSForm : Verbum -> Voice -> SForm -> {fin,inf : Str} = \se,vo,sf ->
|
||||
@@ -504,9 +507,9 @@ oper
|
||||
VFinite Future Anter => compound auxSka (hasett vo) ;
|
||||
VFinite Condit Simul => compound auxSkulle (see vo) ;
|
||||
VFinite Condit Anter => compound auxSkulle (hasett vo) ;
|
||||
VImperat => simple (VF Imper) ; --- no passive
|
||||
VInfinit Simul => simple (VI (Inf vo)) ;
|
||||
VInfinit Anter => compound auxHa (sett vo)
|
||||
VImperat => simple (VF Imper) ; --- no passive
|
||||
VInfinit Simul => compound [] (se.s ! VI (Inf vo)) ;
|
||||
VInfinit Anter => compound [] (auxHa ++ sett vo)
|
||||
} ;
|
||||
|
||||
useVerb : Verb -> (Gender => Number => Person => Str) -> VerbGroup = \verb,arg ->
|
||||
@@ -522,9 +525,9 @@ oper
|
||||
-- to account for word order variations. No particle needs to be retained.
|
||||
|
||||
VerbPhrase : Type = {
|
||||
s : Str ;
|
||||
s : VIForm => Str ;
|
||||
s2 : Str ;
|
||||
s3 : Gender => Number => Person => Str
|
||||
s3 : VIForm => Gender => Number => Person => Str
|
||||
} ;
|
||||
VerbGroup : Type = {
|
||||
s : SForm => Str ;
|
||||
@@ -532,14 +535,22 @@ oper
|
||||
s3 : SForm => Gender => Number => Person => Str
|
||||
} ;
|
||||
|
||||
predVerbGroup : Bool -> Tense -> Anteriority -> VerbGroup -> VerbPhrase = \b,t,a,vg -> {
|
||||
s = vg.s ! VFinite t a ;
|
||||
predVerbGroup : Bool -> Anteriority -> VerbGroup -> VerbPhrase = \b,a,vg ->
|
||||
let
|
||||
vgs = vg.s ;
|
||||
vgs3 = vg.s3
|
||||
in
|
||||
{s = table {
|
||||
VIInfinit => vgs ! VInfinit a ;
|
||||
VIImperat => vgs ! VImperat
|
||||
} ;
|
||||
s2 = vg.s2 ! b ;
|
||||
s3 = vg.s3 ! VFinite t a
|
||||
s3 = table {
|
||||
VIInfinit => vgs3 ! VInfinit a ;
|
||||
VIImperat => vgs3 ! VImperat
|
||||
} ;
|
||||
} ;
|
||||
|
||||
predVerbGroupTrue = predVerbGroup True Present Simul ; ---- temporary
|
||||
|
||||
-- A simple verb can be made into a verb phrase with an empty complement.
|
||||
-- There are two versions, depending on if we want to negate the verb.
|
||||
-- N.B. negation is *not* a function applicable to a verb phrase, since
|
||||
@@ -552,6 +563,7 @@ oper
|
||||
predVerb0 : Verb -> Clause = \regna ->
|
||||
predVerbGroupClause npDet (predVerb regna) ;
|
||||
|
||||
progressiveVerbPhrase : VerbPhrase -> VerbGroup ;
|
||||
|
||||
-- Verb phrases can also be formed from adjectives ("är snäll"),
|
||||
-- common nouns ("är en man"), and noun phrases ("är den yngste mannen").
|
||||
@@ -693,13 +705,13 @@ oper
|
||||
advPre : Str -> Adverb = \alltid -> ss alltid ** {isPost = False} ;
|
||||
advPost : Str -> Adverb = \bra -> ss bra ** {isPost = True} ;
|
||||
|
||||
adVerbPhrase : VerbPhrase -> Adverb -> VerbPhrase = \spelar, bra ->
|
||||
adVerbPhrase : VerbGroup -> Adverb -> VerbGroup = \spelar, bra ->
|
||||
let {postp = bra.isPost} in
|
||||
{
|
||||
--- this unfortunately generates VP#2 ::= VP#2
|
||||
s = spelar.s ;
|
||||
s2 = (if_then_else Str postp [] bra.s) ++ spelar.s2 ;
|
||||
s3 = \\g,n,p => spelar.s3 ! g ! n ! p ++ (if_then_else Str postp bra.s [])
|
||||
s2 = \\b => (if_then_else Str postp [] bra.s) ++ spelar.s2 ! b ;
|
||||
s3 = \\sf,g,n,p => spelar.s3 ! sf ! g ! n ! p ++ (if_then_else Str postp bra.s [])
|
||||
} ;
|
||||
|
||||
advAdjPhrase : SS -> AdjPhrase -> AdjPhrase = \mycket, dyr ->
|
||||
@@ -741,22 +753,6 @@ oper
|
||||
-- This is the traditional $S -> NP VP$ rule. It takes care of both
|
||||
-- word order and agreement.
|
||||
|
||||
----- obsolete
|
||||
predVerbPhrase : NounPhrase -> VerbPhrase -> Sentence =
|
||||
\Jag, serdiginte ->
|
||||
let {
|
||||
jag = Jag.s ! PNom ;
|
||||
ser = serdiginte.s ;
|
||||
dig = serdiginte.s3 ! Jag.g ! Jag.n ! Jag.p ;
|
||||
inte = serdiginte.s2
|
||||
} in
|
||||
{s = table {
|
||||
Main => jag ++ ser ++ inte ++ dig ;
|
||||
Inv => ser ++ jag ++ inte ++ dig ;
|
||||
Sub => jag ++ inte ++ ser ++ dig
|
||||
}
|
||||
} ;
|
||||
|
||||
param
|
||||
ClForm =
|
||||
ClFinite Tense Anteriority Order
|
||||
@@ -826,13 +822,13 @@ oper
|
||||
|
||||
VerbVerb : Type = Verb ** {s3 : Str} ;
|
||||
|
||||
complVerbVerb : VerbVerb -> VerbGroup -> VerbGroup = \vilja, simma ->
|
||||
complVerbVerb : VerbVerb -> VerbPhrase -> VerbGroup = \vilja, simma ->
|
||||
useVerb vilja
|
||||
(\\g,n,p =>
|
||||
vilja.s1 ++
|
||||
vilja.s3 ++
|
||||
simma.s ! VInfinit Simul ++ simma.s2 ! True ++ ---- Anter!
|
||||
simma.s3 ! VInfinit Simul ! g ! n ! p) ;
|
||||
simma.s ! VIInfinit ++ simma.s2 ++ ---- Anter!
|
||||
simma.s3 ! VIInfinit ! g ! n ! p) ;
|
||||
|
||||
transVerbVerb : VerbVerb -> TransVerb -> TransVerb = \vilja,hitta ->
|
||||
{s = vilja.s ;
|
||||
@@ -841,40 +837,40 @@ oper
|
||||
s2 = hitta.s2
|
||||
} ;
|
||||
|
||||
complVerbAdj : Adjective -> VerbGroup -> VerbGroup = \grei, simma ->
|
||||
complVerbAdj : Adjective -> VerbPhrase -> VerbGroup = \grei, simma ->
|
||||
vara
|
||||
(\\g,n,p =>
|
||||
grei.s ! predFormAdj g n ! Nom ++
|
||||
infinAtt ++
|
||||
simma.s ! VInfinit Simul ++ simma.s2 ! True ++ ---- Anter!
|
||||
simma.s3 ! VInfinit Simul ! g ! n ! p) ;
|
||||
simma.s ! VIInfinit ++ simma.s2 ++ ---- Anter!
|
||||
simma.s3 ! VIInfinit ! g ! n ! p) ;
|
||||
|
||||
-- Notice agreement to object vs. subject:
|
||||
|
||||
DitransVerbVerb = TransVerb ** {s3 : Str} ;
|
||||
|
||||
complDitransVerbVerb :
|
||||
Bool -> DitransVerbVerb -> NounPhrase -> VerbGroup -> VerbGroup =
|
||||
Bool -> DitransVerbVerb -> NounPhrase -> VerbPhrase -> VerbGroup =
|
||||
\obj,be,dig,simma ->
|
||||
useVerb be
|
||||
(\\g,n,p => be.s1 ++ be.s2 ++ dig.s ! PAcc ++ be.s3 ++
|
||||
simma.s ! VInfinit Simul ++ simma.s2 ! True ++ ---- Anter!
|
||||
simma.s ! VIInfinit ++ simma.s2 ++ ---- Anter!
|
||||
if_then_Str obj
|
||||
(simma.s3 ! VInfinit Simul ! dig.g ! dig.n ! dig.p)
|
||||
(simma.s3 ! VInfinit Simul ! g ! n ! p)
|
||||
(simma.s3 ! VIInfinit ! dig.g ! dig.n ! dig.p)
|
||||
(simma.s3 ! VIInfinit ! g ! n ! p)
|
||||
) ;
|
||||
|
||||
complVerbAdj2 :
|
||||
Bool -> AdjCompl -> NounPhrase -> VerbGroup -> VerbGroup = \obj,grei,dig,simma ->
|
||||
Bool -> AdjCompl -> NounPhrase -> VerbPhrase -> VerbGroup = \obj,grei,dig,simma ->
|
||||
vara
|
||||
(\\g,n,p =>
|
||||
grei.s ! predFormAdj g n ! Nom ++
|
||||
grei.s2 ++ dig.s ! PAcc ++
|
||||
infinAtt ++
|
||||
simma.s ! VInfinit Simul ++ simma.s2 ! True ++ ---- Anter!
|
||||
simma.s ! VIInfinit ++ simma.s2 ++ ---- Anter!
|
||||
if_then_Str obj
|
||||
(simma.s3 ! VInfinit Simul ! dig.g ! dig.n ! dig.p)
|
||||
(simma.s3 ! VInfinit Simul ! g ! n ! p)
|
||||
(simma.s3 ! VIInfinit ! dig.g ! dig.n ! dig.p)
|
||||
(simma.s3 ! VIInfinit ! g ! n ! p)
|
||||
) ;
|
||||
|
||||
--2 Sentences missing noun phrases
|
||||
@@ -1161,10 +1157,12 @@ oper
|
||||
--
|
||||
-- We only consider second-person imperatives.
|
||||
|
||||
Imperative = SS1 Number ;
|
||||
Imperative = {s : Number => Str} ;
|
||||
|
||||
imperVerbPhrase : VerbPhrase -> Imperative = \titta ->
|
||||
{s = \\n => titta.s ++ titta.s2 ++ titta.s3 ! utrum ! n ! P2} ;
|
||||
{s = \\n =>
|
||||
titta.s ! VIImperat ++ titta.s2 ++ titta.s3 ! VIImperat ! utrum ! n ! P2
|
||||
} ;
|
||||
|
||||
imperUtterance : Number -> Imperative -> Utterance = \n,I ->
|
||||
ss (I.s ! n ++ "!") ;
|
||||
@@ -1330,7 +1328,7 @@ oper
|
||||
let {As = A.s ! Sub} in
|
||||
variants {if.s ++ As ++ "," ++ B ; B ++ "," ++ if.s ++ As} ;
|
||||
|
||||
subjunctVerbPhrase : VerbPhrase -> Subjunction -> Sentence -> VerbPhrase =
|
||||
subjunctVerbPhrase : VerbGroup -> Subjunction -> Sentence -> VerbGroup =
|
||||
\V, if, A ->
|
||||
adVerbPhrase V (advPost (if.s ++ A.s ! Sub)) ;
|
||||
|
||||
|
||||
@@ -124,9 +124,15 @@ instance SyntaxSwe of SyntaxScand = TypesSwe **
|
||||
|
||||
reflPron : Number -> Person -> Str = \n,p -> case <n,p> of {
|
||||
<Sg,P1> => "mig" ;
|
||||
<Sg,P2> => "mig" ;
|
||||
<Sg,P2> => "dig" ;
|
||||
<Pl,P1> => "oss" ;
|
||||
<Pl,P2> => "er" ;
|
||||
_ => "sig"
|
||||
} ;
|
||||
|
||||
progressiveVerbPhrase : VerbPhrase -> VerbGroup =
|
||||
complVerbVerb
|
||||
(mkVerb "hålla" "håller" "håll" "höll" "hållit" "hållen" **
|
||||
{s3 = ["på att"]}
|
||||
) ;
|
||||
}
|
||||
|
||||
@@ -67,6 +67,7 @@ lin
|
||||
Important = extAdjective (aFin "viktig") ** {s2 = "för"} ;
|
||||
Probable = extAdjective (aFin "sannolik") ;
|
||||
Easy = extAdjective (aAbstrakt "lätt") ** {s2 = "för"} ;
|
||||
Rain = extTransVerb (vNopart (vTala "regn")) [] ;
|
||||
|
||||
|
||||
} ;
|
||||
|
||||
Reference in New Issue
Block a user