fixed infinitives and imperatives

This commit is contained in:
aarne
2005-01-24 15:56:28 +00:00
parent 8425fe4a87
commit e96a410e74
12 changed files with 120 additions and 94 deletions

View File

@@ -98,8 +98,8 @@ cat
VS ; -- sentence-compl. verb, e.g. "say", "prove" VS ; -- sentence-compl. verb, e.g. "say", "prove"
VV ; -- verb-compl. verb, e.g. "can", "want" 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"
VP ; -- verb phrase, e.g. "switch the light on", "don't run" VPI ; -- infin. or imp. verb phrase e.g. "switch the light on", "don't run"
--! --!
--3 Adverbs and prepositions/cases --3 Adverbs and prepositions/cases

View File

@@ -63,24 +63,24 @@ fun
-- have (or have not) a negation, but they are formed from verbal groups -- have (or have not) a negation, but they are formed from verbal groups
-- ($VG$), which have both positive and negative forms. -- ($VG$), which have both positive and negative forms.
PredV : V -> VG ; -- "walk", "doesn't walk" PredV : V -> VP ; -- "walk", "doesn't walk"
PredPassV : V -> VG ; -- "is seen", "is not seen" PredPassV : V -> VP ; -- "is seen", "is not seen"
PredV2 : V2 -> NP -> VG ; -- "sees John", "doesn't see John" PredV2 : V2 -> NP -> VP ; -- "sees John", "doesn't see John"
--- PredV3 : V3 -> NP -> NP -> VG ; -- "prefers wine to beer" --- PredV3 : V3 -> NP -> NP -> VG ; -- "prefers wine to beer"
PredV3 : V3 -> NP -> V2 ; -- "prefers wine (to beer)" PredV3 : V3 -> NP -> V2 ; -- "prefers wine (to beer)"
PredVS : VS -> S -> VG ; -- "says that I run", "doesn't say..." PredVS : VS -> S -> VP ; -- "says that I run", "doesn't say..."
PredVV : VV -> VG -> VG ; -- "can run", "can't run", "tries to run" PredVV : VV -> VPI -> VP ; -- "can run", "can't run", "tries to run"
PredNP : NP -> VG ; -- "is John", "is not John" PredNP : NP -> VP ; -- "is John", "is not John"
PredPP : PP -> VG ; -- "is in France", "is not in France" PredPP : PP -> VP ; -- "is in France", "is not in France"
PredAP : AP -> VG ; -- "is old", "isn't old" PredAP : AP -> VP ; -- "is old", "isn't old"
PredSuperl : ADeg -> VG ; -- "is the oldest" PredSuperl : ADeg -> VP ; -- "is the oldest"
PredCN : CN -> VG ; -- "is a man", "isn't a man" PredCN : CN -> VP ; -- "is a man", "isn't a man"
VTrans : V2 -> V ; -- "loves" VTrans : V2 -> V ; -- "loves"
--- PosVG,NegVG : VG -> VP ; -- --- PosVG,NegVG : VG -> VP ; --
PredVG : NP -> VG -> Cl ; -- preserves all pol/tense variation PredVP : NP -> VP -> Cl ; -- preserves all pol/tense variation
--! --!
--3 Adverbs --3 Adverbs
@@ -91,6 +91,7 @@ fun
AdvPP : PP -> Adv ; -- "in London", "after the war" AdvPP : PP -> Adv ; -- "in London", "after the war"
PrepNP : Prep -> NP -> PP ; -- "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" AdvVP : VP -> Adv -> VP ; -- "always walks", "walks in the park"
AdvCN : CN -> PP -> CN ; -- "house in London" AdvCN : CN -> PP -> CN ; -- "house in London"
AdvAP : AdA -> AP -> AP ; -- "very good" AdvAP : AdA -> AP -> AP ; -- "very good"
@@ -103,7 +104,7 @@ fun
--- PosSlashV2,NegSlashV2 : NP -> V2 -> Slash ; -- "John sees", "John doesn't see" --- PosSlashV2,NegSlashV2 : NP -> V2 -> Slash ; -- "John sees", "John doesn't see"
SlashV2 : NP -> V2 -> Slash ; -- "John sees", "John doesn't see" SlashV2 : NP -> V2 -> Slash ; -- "John sees", "John doesn't see"
--- OneVP : VP -> S ; -- "one walks" --- 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" --- ThereNP : NP -> S ; -- "there is a bar","there are 86 bars"
ExistCN : CN -> Cl ; -- "there is a bar" ExistCN : CN -> Cl ; -- "there is a bar"
ExistNumCN : Num -> CN -> Cl ; -- "there are (86) bars" ExistNumCN : Num -> CN -> Cl ; -- "there are (86) bars"
@@ -111,7 +112,7 @@ fun
IdRP : RP ; -- "which" IdRP : RP ; -- "which"
FunRP : N2 -> RP -> RP ; -- "the successor of which" FunRP : N2 -> RP -> RP ; -- "the successor of which"
--- RelVP : RP -> VP -> RCl ; -- "who walks", "who doesn't walk" --- 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" RelSlash : RP -> Slash -> RCl ; -- "that I wait for"/"for which I wait"
--- ModRC : CN -> RS -> CN ; -- "man who walks" --- ModRC : CN -> RS -> CN ; -- "man who walks"
ModRS : 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" NounIPOne, NounIPMany : CN -> IP ; -- "which car", "which cars"
---- NounIPHowMany : CN -> IP ; -- "how many cars" ---- NounIPHowMany : CN -> IP ; -- "how many cars"
QuestVG : NP -> VG -> QCl ; -- "does John walk"; "doesn't John walk" QuestVP : NP -> VP -> QCl ; -- "does John walk"; "doesn't John walk"
--- IntVP : IP -> VP -> QCl ; -- "who walks" IntVP : IP -> VP -> QCl ; -- "who walks"
IntVG : IP -> VG -> QCl ; -- "who walks"
IntSlash : IP -> Slash -> QCl ; -- "whom does John see" IntSlash : IP -> Slash -> QCl ; -- "whom does John see"
--- QuestAdv : IAdv -> NP -> VP -> QS ; -- "why do you walk" --- 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" --- IsThereNP : NP -> QS ; -- "is there a bar", "are there (86) bars"
ExistQCl : CN -> QCl ; -- "is there a bar", ExistQCl : CN -> QCl ; -- "is there a bar",
ExistNumQCl : Num -> CN -> QCl ; -- "are there (86) bars" 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 ?? ----rename these ??
IndicPhrase : S -> Phr ; -- "I walk." IndicPhrase : S -> Phr ; -- "I walk."
@@ -212,30 +213,30 @@ fun
PredVV2 : VV -> V2 -> V2 ; -- (which song do you) want to play PredVV2 : VV -> V2 -> V2 ; -- (which song do you) want to play
AdjPart : V -> A ; -- forgotten AdjPart : V -> A ; -- forgotten
ReflV2 : V2 -> VG ; ReflV2 : V2 -> VP ;
-- In these predications, the last argument gets its agreement -- In these predications, the last argument gets its agreement
-- features from the second, and cannot hence be made to produce -- features from the second, and cannot hence be made to produce
-- $V2A$/$V2S$. -- $V2A$/$V2S$.
PredV2A : V2A -> NP -> AP -> VG ; PredV2A : V2A -> NP -> AP -> VP ;
PredSubjV2V : V2V -> NP -> VG -> VG ; PredSubjV2V : V2V -> NP -> VPI -> VP ;
--- In these three it would be possible, but hardly useful... --- In these three it would be possible, but hardly useful...
PredObjV2V : V2V -> NP -> VG -> VG ; PredObjV2V : V2V -> NP -> VPI -> VP ;
PredV2S : V2S -> NP -> S -> VG ; PredV2S : V2S -> NP -> S -> VP ;
PredV2Q : V2Q -> NP -> QS -> VG ; PredV2Q : V2Q -> NP -> QS -> VP ;
PredAS : AS -> S -> Cl ; PredAS : AS -> S -> Cl ;
PredA2S : A2S -> NP -> AS ; PredA2S : A2S -> NP -> AS ;
PredAV : AV -> VG -> VG ; PredAV : AV -> VPI -> VP ;
PredSubjA2V : A2V -> NP -> VG -> VG ; PredSubjA2V : A2V -> NP -> VPI -> VP ;
PredObjA2V : A2V -> NP -> VG -> VG ; PredObjA2V : A2V -> NP -> VPI -> VP ;
PredV0 : V0 -> Cl ; PredV0 : V0 -> Cl ;
PredVQ : VQ -> QS -> VG ; PredVQ : VQ -> QS -> VP ;
PredVA : VA -> AP -> VG ; PredVA : VA -> AP -> VP ;
UseV2V : V2V -> VV ; UseV2V : V2V -> VV ;
UseV2S : V2S -> VS ; UseV2S : V2S -> VS ;
@@ -244,9 +245,11 @@ fun
UseA2V : A2V -> AV ; UseA2V : A2V -> AV ;
UseCl : TP -> Cl -> S ; UseCl : TP -> Cl -> S ;
UseVG : TP -> VG -> VP ;
UseRCl : TP -> RCl -> RS ; UseRCl : TP -> RCl -> RS ;
UseQCl : TP -> QCl -> QS ; UseQCl : TP -> QCl -> QS ;
PosVP, NegVP : Ant -> VP -> VPI ;
ProgVP : VPI -> VP ; -- he is eating
PosTP : Tense -> Ant -> TP ; PosTP : Tense -> Ant -> TP ;
NegTP : Tense -> Ant -> TP ; NegTP : Tense -> Ant -> TP ;

View File

@@ -29,5 +29,5 @@ fun
Important : A2S ; Important : A2S ;
Probable : AS ; Probable : AS ;
Easy : A2V ; Easy : A2V ;
Rain : V0 ;
} ; } ;

View File

@@ -118,9 +118,16 @@ instance SyntaxDan of SyntaxScand = TypesDan **
reflPron : Number -> Person -> Str = \n,p -> case <n,p> of { reflPron : Number -> Person -> Str = \n,p -> case <n,p> of {
<Sg,P1> => "mig" ; <Sg,P1> => "mig" ;
<Sg,P2> => "mig" ; <Sg,P2> => "dig" ;
<Pl,P1> => "os" ; <Pl,P1> => "os" ;
<Pl,P2> => "seg" ; --- ? dere ? <Pl,P2> => "seg" ; --- ? dere ?
_ => "seg" _ => "seg"
} ; } ;
progressiveVerbPhrase : VerbPhrase -> VerbGroup =
complVerbVerb
(verbVara **
{s3 = ["ved at"]}
) ;
} }

View File

@@ -70,5 +70,6 @@ lin
Important = extAdjective (aAbstrakt "viktig") ** {s2 = "for"} ; Important = extAdjective (aAbstrakt "viktig") ** {s2 = "for"} ;
Probable = extAdjective (aAbstrakt "sandsynlig") ; Probable = extAdjective (aAbstrakt "sandsynlig") ;
Easy = extAdjective (aRod "let") ** {s2 = "for"} ; Easy = extAdjective (aRod "let") ** {s2 = "for"} ;
Rain = extTransVerb (vNopart (vHusk "regn")) [] ;
} ; } ;

View File

@@ -118,10 +118,16 @@ instance SyntaxNor of SyntaxScand = TypesNor **
reflPron : Number -> Person -> Str = \n,p -> case <n,p> of { reflPron : Number -> Person -> Str = \n,p -> case <n,p> of {
<Sg,P1> => "meg" ; <Sg,P1> => "meg" ;
<Sg,P2> => "meg" ; <Sg,P2> => "deg" ;
<Pl,P1> => "oss" ; <Pl,P1> => "oss" ;
<Pl,P2> => "jer" ; <Pl,P2> => "jer" ;
_ => "seg" _ => "seg"
} ; } ;
progressiveVerbPhrase : VerbPhrase -> VerbGroup =
complVerbVerb
(verbVara **
{s3 = ["ved at"]}
) ;
} }

View File

@@ -68,6 +68,7 @@ lin
Important = extAdjective (aAbstrakt "viktig") ** {s2 = "for"} ; Important = extAdjective (aAbstrakt "viktig") ** {s2 = "for"} ;
Probable = extAdjective (aAbstrakt "sannsynlig") ; Probable = extAdjective (aAbstrakt "sannsynlig") ;
Easy = extAdjective (aRod "grei") ** {s2 = "for"} ; Easy = extAdjective (aRod "grei") ** {s2 = "for"} ;
Rain = extTransVerb (vNopart (vHusk "regn")) [] ;
} ; } ;

View File

@@ -33,9 +33,10 @@ lincat
V = Verb ; V = Verb ;
-- = {s : VerbForm => Str ; s1 : Str} ; -- = {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} ; 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 ; V2 = TransVerb ;
-- = Verb ** {s2 : Preposition} ; -- = Verb ** {s2 : Preposition} ;
V3 = TransVerb ** {s3 : Preposition} ; V3 = TransVerb ** {s3 : Preposition} ;

View File

@@ -57,10 +57,12 @@ lin
UseA2S x = x ; UseA2S x = x ;
UseA2V x = x ; UseA2V x = x ;
UseCl tp cl = {s = \\o => tp.s ++ cl.s ! tp.b ! ClFinite tp.t tp.a o} ; 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 ;
PosVP tp = predVerbGroup True tp.a ;
NegVP tp = predVerbGroup False tp.a ;
ProgVP = progressiveVerbPhrase ;
PosTP t a = {s = t.s ++ a.s ; b = True ; t = t.t ; a = a.a} ; 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} ; 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} ; ASimul = {s = [] ; a = Simul} ;
AAnter = {s = [] ; a = Anter} ; AAnter = {s = [] ; a = Anter} ;
PredVG = predVerbGroupClause ; PredVP = predVerbGroupClause ;
PredV = predVerb ; PredV = predVerb ;
PredAP = predAdjective ; PredAP = predAdjective ;
@@ -111,11 +113,11 @@ lin
(indefNounPhraseNum plural nu A)) ; (indefNounPhraseNum plural nu A)) ;
SlashV2 = slashTransVerb ; SlashV2 = slashTransVerb ;
OneVG = predVerbGroupClause npMan ; OneVP = predVerbGroupClause npMan ;
IdRP = identRelPron ; IdRP = identRelPron ;
FunRP = funRelPron ; FunRP = funRelPron ;
RelVG = relVerbGroup ; RelVP = relVerbGroup ;
RelSlash = relSlash ; RelSlash = relSlash ;
ModRS = modRelClause ; ModRS = modRelClause ;
RelCl = relSuch ; RelCl = relSuch ;
@@ -131,8 +133,8 @@ lin
NounIPOne = nounIntPron singular ; NounIPOne = nounIntPron singular ;
NounIPMany = nounIntPron plural ; NounIPMany = nounIntPron plural ;
QuestVG = questVerbPhrase ; QuestVP = questVerbPhrase ;
IntVG = intVerbPhrase ; IntVP = intVerbPhrase ;
IntSlash = intSlash ; IntSlash = intSlash ;
QuestAdv = questAdverbial ; QuestAdv = questAdverbial ;

View File

@@ -479,6 +479,9 @@ param
VFinite Tense Anteriority VFinite Tense Anteriority
| VImperat | VImperat
| VInfinit Anteriority ; | VInfinit Anteriority ;
VIForm =
VIImperat
| VIInfinit ;
oper oper
verbSForm : Verbum -> Voice -> SForm -> {fin,inf : Str} = \se,vo,sf -> verbSForm : Verbum -> Voice -> SForm -> {fin,inf : Str} = \se,vo,sf ->
@@ -505,8 +508,8 @@ oper
VFinite Condit Simul => compound auxSkulle (see vo) ; VFinite Condit Simul => compound auxSkulle (see vo) ;
VFinite Condit Anter => compound auxSkulle (hasett vo) ; VFinite Condit Anter => compound auxSkulle (hasett vo) ;
VImperat => simple (VF Imper) ; --- no passive VImperat => simple (VF Imper) ; --- no passive
VInfinit Simul => simple (VI (Inf vo)) ; VInfinit Simul => compound [] (se.s ! VI (Inf vo)) ;
VInfinit Anter => compound auxHa (sett vo) VInfinit Anter => compound [] (auxHa ++ sett vo)
} ; } ;
useVerb : Verb -> (Gender => Number => Person => Str) -> VerbGroup = \verb,arg -> 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. -- to account for word order variations. No particle needs to be retained.
VerbPhrase : Type = { VerbPhrase : Type = {
s : Str ; s : VIForm => Str ;
s2 : Str ; s2 : Str ;
s3 : Gender => Number => Person => Str s3 : VIForm => Gender => Number => Person => Str
} ; } ;
VerbGroup : Type = { VerbGroup : Type = {
s : SForm => Str ; s : SForm => Str ;
@@ -532,13 +535,21 @@ oper
s3 : SForm => Gender => Number => Person => Str s3 : SForm => Gender => Number => Person => Str
} ; } ;
predVerbGroup : Bool -> Tense -> Anteriority -> VerbGroup -> VerbPhrase = \b,t,a,vg -> { predVerbGroup : Bool -> Anteriority -> VerbGroup -> VerbPhrase = \b,a,vg ->
s = vg.s ! VFinite t a ; let
s2 = vg.s2 ! b ; vgs = vg.s ;
s3 = vg.s3 ! VFinite t a vgs3 = vg.s3
in
{s = table {
VIInfinit => vgs ! VInfinit a ;
VIImperat => vgs ! VImperat
} ;
s2 = vg.s2 ! b ;
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. -- 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. -- There are two versions, depending on if we want to negate the verb.
@@ -552,6 +563,7 @@ oper
predVerb0 : Verb -> Clause = \regna -> predVerb0 : Verb -> Clause = \regna ->
predVerbGroupClause npDet (predVerb regna) ; predVerbGroupClause npDet (predVerb regna) ;
progressiveVerbPhrase : VerbPhrase -> VerbGroup ;
-- Verb phrases can also be formed from adjectives ("är snäll"), -- Verb phrases can also be formed from adjectives ("är snäll"),
-- common nouns ("är en man"), and noun phrases ("är den yngste mannen"). -- 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} ; advPre : Str -> Adverb = \alltid -> ss alltid ** {isPost = False} ;
advPost : Str -> Adverb = \bra -> ss bra ** {isPost = True} ; 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 let {postp = bra.isPost} in
{ {
--- this unfortunately generates VP#2 ::= VP#2 --- this unfortunately generates VP#2 ::= VP#2
s = spelar.s ; s = spelar.s ;
s2 = (if_then_else Str postp [] bra.s) ++ spelar.s2 ; s2 = \\b => (if_then_else Str postp [] bra.s) ++ spelar.s2 ! b ;
s3 = \\g,n,p => spelar.s3 ! g ! n ! p ++ (if_then_else Str postp bra.s []) s3 = \\sf,g,n,p => spelar.s3 ! sf ! g ! n ! p ++ (if_then_else Str postp bra.s [])
} ; } ;
advAdjPhrase : SS -> AdjPhrase -> AdjPhrase = \mycket, dyr -> advAdjPhrase : SS -> AdjPhrase -> AdjPhrase = \mycket, dyr ->
@@ -741,22 +753,6 @@ oper
-- This is the traditional $S -> NP VP$ rule. It takes care of both -- This is the traditional $S -> NP VP$ rule. It takes care of both
-- word order and agreement. -- 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 param
ClForm = ClForm =
ClFinite Tense Anteriority Order ClFinite Tense Anteriority Order
@@ -826,13 +822,13 @@ oper
VerbVerb : Type = Verb ** {s3 : Str} ; VerbVerb : Type = Verb ** {s3 : Str} ;
complVerbVerb : VerbVerb -> VerbGroup -> VerbGroup = \vilja, simma -> complVerbVerb : VerbVerb -> VerbPhrase -> VerbGroup = \vilja, simma ->
useVerb vilja useVerb vilja
(\\g,n,p => (\\g,n,p =>
vilja.s1 ++ vilja.s1 ++
vilja.s3 ++ vilja.s3 ++
simma.s ! VInfinit Simul ++ simma.s2 ! True ++ ---- Anter! simma.s ! VIInfinit ++ simma.s2 ++ ---- Anter!
simma.s3 ! VInfinit Simul ! g ! n ! p) ; simma.s3 ! VIInfinit ! g ! n ! p) ;
transVerbVerb : VerbVerb -> TransVerb -> TransVerb = \vilja,hitta -> transVerbVerb : VerbVerb -> TransVerb -> TransVerb = \vilja,hitta ->
{s = vilja.s ; {s = vilja.s ;
@@ -841,40 +837,40 @@ oper
s2 = hitta.s2 s2 = hitta.s2
} ; } ;
complVerbAdj : Adjective -> VerbGroup -> VerbGroup = \grei, simma -> complVerbAdj : Adjective -> VerbPhrase -> VerbGroup = \grei, simma ->
vara vara
(\\g,n,p => (\\g,n,p =>
grei.s ! predFormAdj g n ! Nom ++ grei.s ! predFormAdj g n ! Nom ++
infinAtt ++ infinAtt ++
simma.s ! VInfinit Simul ++ simma.s2 ! True ++ ---- Anter! simma.s ! VIInfinit ++ simma.s2 ++ ---- Anter!
simma.s3 ! VInfinit Simul ! g ! n ! p) ; simma.s3 ! VIInfinit ! g ! n ! p) ;
-- Notice agreement to object vs. subject: -- Notice agreement to object vs. subject:
DitransVerbVerb = TransVerb ** {s3 : Str} ; DitransVerbVerb = TransVerb ** {s3 : Str} ;
complDitransVerbVerb : complDitransVerbVerb :
Bool -> DitransVerbVerb -> NounPhrase -> VerbGroup -> VerbGroup = Bool -> DitransVerbVerb -> NounPhrase -> VerbPhrase -> VerbGroup =
\obj,be,dig,simma -> \obj,be,dig,simma ->
useVerb be useVerb be
(\\g,n,p => be.s1 ++ be.s2 ++ dig.s ! PAcc ++ be.s3 ++ (\\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 if_then_Str obj
(simma.s3 ! VInfinit Simul ! dig.g ! dig.n ! dig.p) (simma.s3 ! VIInfinit ! dig.g ! dig.n ! dig.p)
(simma.s3 ! VInfinit Simul ! g ! n ! p) (simma.s3 ! VIInfinit ! g ! n ! p)
) ; ) ;
complVerbAdj2 : complVerbAdj2 :
Bool -> AdjCompl -> NounPhrase -> VerbGroup -> VerbGroup = \obj,grei,dig,simma -> Bool -> AdjCompl -> NounPhrase -> VerbPhrase -> VerbGroup = \obj,grei,dig,simma ->
vara vara
(\\g,n,p => (\\g,n,p =>
grei.s ! predFormAdj g n ! Nom ++ grei.s ! predFormAdj g n ! Nom ++
grei.s2 ++ dig.s ! PAcc ++ grei.s2 ++ dig.s ! PAcc ++
infinAtt ++ infinAtt ++
simma.s ! VInfinit Simul ++ simma.s2 ! True ++ ---- Anter! simma.s ! VIInfinit ++ simma.s2 ++ ---- Anter!
if_then_Str obj if_then_Str obj
(simma.s3 ! VInfinit Simul ! dig.g ! dig.n ! dig.p) (simma.s3 ! VIInfinit ! dig.g ! dig.n ! dig.p)
(simma.s3 ! VInfinit Simul ! g ! n ! p) (simma.s3 ! VIInfinit ! g ! n ! p)
) ; ) ;
--2 Sentences missing noun phrases --2 Sentences missing noun phrases
@@ -1161,10 +1157,12 @@ oper
-- --
-- We only consider second-person imperatives. -- We only consider second-person imperatives.
Imperative = SS1 Number ; Imperative = {s : Number => Str} ;
imperVerbPhrase : VerbPhrase -> Imperative = \titta -> 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 -> imperUtterance : Number -> Imperative -> Utterance = \n,I ->
ss (I.s ! n ++ "!") ; ss (I.s ! n ++ "!") ;
@@ -1330,7 +1328,7 @@ oper
let {As = A.s ! Sub} in let {As = A.s ! Sub} in
variants {if.s ++ As ++ "," ++ B ; B ++ "," ++ if.s ++ As} ; variants {if.s ++ As ++ "," ++ B ; B ++ "," ++ if.s ++ As} ;
subjunctVerbPhrase : VerbPhrase -> Subjunction -> Sentence -> VerbPhrase = subjunctVerbPhrase : VerbGroup -> Subjunction -> Sentence -> VerbGroup =
\V, if, A -> \V, if, A ->
adVerbPhrase V (advPost (if.s ++ A.s ! Sub)) ; adVerbPhrase V (advPost (if.s ++ A.s ! Sub)) ;

View File

@@ -124,9 +124,15 @@ instance SyntaxSwe of SyntaxScand = TypesSwe **
reflPron : Number -> Person -> Str = \n,p -> case <n,p> of { reflPron : Number -> Person -> Str = \n,p -> case <n,p> of {
<Sg,P1> => "mig" ; <Sg,P1> => "mig" ;
<Sg,P2> => "mig" ; <Sg,P2> => "dig" ;
<Pl,P1> => "oss" ; <Pl,P1> => "oss" ;
<Pl,P2> => "er" ; <Pl,P2> => "er" ;
_ => "sig" _ => "sig"
} ; } ;
progressiveVerbPhrase : VerbPhrase -> VerbGroup =
complVerbVerb
(mkVerb "hålla" "håller" "håll" "höll" "hållit" "hållen" **
{s3 = ["på att"]}
) ;
} }

View File

@@ -67,6 +67,7 @@ lin
Important = extAdjective (aFin "viktig") ** {s2 = "för"} ; Important = extAdjective (aFin "viktig") ** {s2 = "för"} ;
Probable = extAdjective (aFin "sannolik") ; Probable = extAdjective (aFin "sannolik") ;
Easy = extAdjective (aAbstrakt "lätt") ** {s2 = "för"} ; Easy = extAdjective (aAbstrakt "lätt") ** {s2 = "för"} ;
Rain = extTransVerb (vNopart (vTala "regn")) [] ;
} ; } ;