forked from GitHub/gf-core
swe and eng ok
This commit is contained in:
@@ -145,7 +145,7 @@ fun
|
||||
ImperOne, ImperMany : Imp -> Phr ; -- "Be a man!", "Be men!"
|
||||
|
||||
AdvCl : Cl -> Adv -> Cl ; -- "John walks in the park"
|
||||
AdvVP : VPI -> Adv -> VPI ; -- "walk in the park"
|
||||
AdvVPI : VPI -> Adv -> VPI ; -- "walk in the park"
|
||||
AdCPhr : AdC -> S -> Phr ; -- "Therefore, 2 is prime."
|
||||
AdvPhr : Adv -> S -> Phr ; -- "In India, there are tigers."
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ abstract Verbphrase = Categories ** {
|
||||
|
||||
PosVP, NegVP : Ant -> VP -> VPI ; -- to eat, not to eat
|
||||
|
||||
---- AdvVP : VP -> AdV -> VP ; -- "always walks"
|
||||
AdvVP : VP -> AdV -> VP ; -- "always walks"
|
||||
SubjVP : VP -> Subj -> S -> VP ; -- "(a man who) sings when he runs"
|
||||
|
||||
}
|
||||
|
||||
@@ -148,8 +148,8 @@ lin
|
||||
ImperOne = imperUtterance singular ;
|
||||
ImperMany = imperUtterance plural ;
|
||||
|
||||
AdvCl = advClause ;
|
||||
AdvVP = advVerbPhrase ;
|
||||
AdvCl = advClause ;
|
||||
AdvVPI = advVerbPhrase ;
|
||||
|
||||
AdCPhr = advSentence ;
|
||||
AdvPhr = advSentence ;
|
||||
|
||||
@@ -340,8 +340,8 @@ oper
|
||||
|
||||
SForm =
|
||||
VFinite Tense Anteriority
|
||||
--- | VInfinit Anteriority
|
||||
--- | VPresPart
|
||||
| VInfinit Anteriority
|
||||
| VPresPart
|
||||
;
|
||||
|
||||
-- This is how the syntactic verb phrase forms are realized as
|
||||
@@ -349,53 +349,6 @@ oper
|
||||
|
||||
oper
|
||||
|
||||
{- --vg
|
||||
verbSForm : Bool -> Verb -> Bool -> SForm -> Agr -> {fin,inf : Str} =
|
||||
\isAux,verb,b,sf,agr ->
|
||||
let
|
||||
parts : Str -> Str -> {fin,inf : Str} = \x,y ->
|
||||
{fin = x ; inf = y} ;
|
||||
likes : Tense -> Str = \t -> verb.s ! case <t,agr> of {
|
||||
<Present,ASgP1> => Indic P1 ;
|
||||
<Present,ASgP3 _> => Indic P3 ;
|
||||
<Present,_> => Indic P2 ;
|
||||
<Past,ASgP1> => Pastt Pl ;
|
||||
<Past,ASgP3 _> => Pastt Sg ;
|
||||
_ => Pastt Pl --- Future doesn't matter
|
||||
} ;
|
||||
like = verb.s ! InfImp ;
|
||||
liked = verb.s ! PPart ;
|
||||
liking = verb.s ! PresPart ;
|
||||
has : Tense -> Str = \t -> auxHave b t agr ;
|
||||
have = "have" ;
|
||||
neg = if_then_Str b [] "not" ;
|
||||
does : Tense -> Str = \t -> auxTense b t agr
|
||||
in
|
||||
case sf of {
|
||||
VFinite Present Simul => case b of {
|
||||
True => parts (likes Present) [] ;
|
||||
False => case isAux of {
|
||||
True => parts (likes Present ++ "not") [] ;
|
||||
_ => parts (does Present) like
|
||||
}
|
||||
} ;
|
||||
VFinite Past Simul => case b of {
|
||||
True => parts (likes Past) [] ;
|
||||
False => case isAux of {
|
||||
True => parts (likes Past ++ "not") [] ;
|
||||
_ => parts (does Past) like
|
||||
}
|
||||
} ;
|
||||
VFinite t Simul => parts (does t) like ;
|
||||
VFinite Present Anter => parts (has Present) liked ;
|
||||
VFinite Past Anter => parts (has Past) liked ;
|
||||
VFinite t Anter => parts (does t) (have ++ liked) ;
|
||||
VInfinit Simul => parts neg like ;
|
||||
VInfinit Anter => parts neg (have ++ liked) ;
|
||||
VPresPart => parts neg liking
|
||||
} ;
|
||||
-}
|
||||
|
||||
auxHave : Bool -> Tense -> Agr -> Str = \b,t,a ->
|
||||
let has =
|
||||
case t of {
|
||||
@@ -461,6 +414,15 @@ oper
|
||||
s1 : Str -- "not" or []
|
||||
} ;
|
||||
|
||||
-- To form an infinitival group
|
||||
predVerbGroup : Bool -> {s : Str ; a : Anteriority} -> VerbGroup -> VerbPhrase =
|
||||
\b,ant,vg -> {
|
||||
s = table {
|
||||
VIInfinit => \\a => ant.s ++ vg.s2 ! b ! VInfinit ant.a ! a ;
|
||||
VIPresPart => \\a => ant.s ++ vg.s2 ! b ! VPresPart ! a
|
||||
} ;
|
||||
s1 = if_then_Str b [] "not"
|
||||
} ;
|
||||
|
||||
-- All negative verb phrase behave as auxiliary ones in questions.
|
||||
|
||||
@@ -794,7 +756,9 @@ oper
|
||||
has : Bool -> Tense -> Str = \b,t -> auxHave b t agr ;
|
||||
does : Bool -> Tense -> Str = \b,t -> auxTense b t agr
|
||||
in
|
||||
\\b => table {
|
||||
\\b =>
|
||||
let neg = if_then_Str b [] "not" in
|
||||
table {
|
||||
VFinite Present Simul => case b of {
|
||||
True => <it,goes Present,off> ;
|
||||
---- does b Present ++ it ++ go
|
||||
@@ -808,11 +772,10 @@ oper
|
||||
VFinite t Simul => <it,does b t, go> ;
|
||||
VFinite Present Anter => <it,has b Present, gone> ;
|
||||
VFinite Past Anter => <it,has b Past, gone> ;
|
||||
VFinite t Anter => <it,does b t, have ++ gone>
|
||||
--- ;
|
||||
--- VInfinit Simul => it ++ neg ++ go ;
|
||||
--- VInfinit Anter => it ++ neg ++ (have ++ gone) ;
|
||||
--- VPresPart => it ++ neg ++ going
|
||||
VFinite t Anter => <it,does b t, have ++ gone> ;
|
||||
VInfinit Simul => <it, neg, go> ;
|
||||
VInfinit Anter => <it, neg, have ++ gone> ;
|
||||
VPresPart => <it, neg, going>
|
||||
} ;
|
||||
|
||||
-- This is for auxiliaries.
|
||||
@@ -825,18 +788,6 @@ oper
|
||||
}
|
||||
} ;
|
||||
|
||||
{- ---
|
||||
predClauseGroup : Verb -> Complement -> VerbGroup = \verb,comp ->
|
||||
let
|
||||
nvg : Agr -> (Bool => SForm => (Str * Str * Str)) =
|
||||
\ag -> predVerbClauseGen {s = \\_ => [] ; a = ag} verb comp
|
||||
in
|
||||
{s = \\b,f,a => (nvg a ! b ! f).p2 ;
|
||||
s2 = \\b,f,a => (nvg a ! b ! f).p3 ;
|
||||
isAux = True
|
||||
} ;
|
||||
-}
|
||||
|
||||
predAuxClauseGen : NounPhrase -> AuxVerb -> Complement ->
|
||||
(Bool => SForm => (Str * Str * Str)) = \np,verb,comp ->
|
||||
let
|
||||
@@ -868,10 +819,10 @@ oper
|
||||
\\b =>
|
||||
table {
|
||||
VFinite t Simul => <it, is b t, begood t> ;
|
||||
VFinite t Anter => <it, has b t, beengood t>
|
||||
--- VInfinit Simul => it ++ begood Future ;
|
||||
--- VInfinit Anter => it ++ beengood Future ;
|
||||
--- VPresPart => it ++ "being" ++ good
|
||||
VFinite t Anter => <it, has b t, beengood t> ;
|
||||
VInfinit Simul => <it, [], begood Future> ;
|
||||
VInfinit Anter => <it, [], beengood Future> ;
|
||||
VPresPart => <it, [], "being" ++ good>
|
||||
} ;
|
||||
|
||||
auxVerbForm : AuxVerb -> Bool -> Tense -> Agr -> Str = \verb,b,t,a ->
|
||||
|
||||
@@ -57,9 +57,9 @@ concrete VerbphraseEng of Verbphrase = CategoriesEng **
|
||||
RelVP = relVerbPhrase ;
|
||||
IntVP = intVerbPhrase ;
|
||||
|
||||
-- PosVP tp = predVerbGroup True tp.a ;
|
||||
-- NegVP tp = predVerbGroup False tp.a ;
|
||||
PosVP = predVerbGroup True ;
|
||||
NegVP = predVerbGroup False ;
|
||||
|
||||
---- AdvVP = adVerbPhrase ;
|
||||
AdvVP = adVerbPhrase ;
|
||||
SubjVP = subjunctVerbPhrase ;
|
||||
}
|
||||
177
lib/resource/english/VerbsEngAbs.gf
Normal file
177
lib/resource/english/VerbsEngAbs.gf
Normal file
@@ -0,0 +1,177 @@
|
||||
abstract VerbsEngAbs = Categories ** {
|
||||
fun
|
||||
awake_V : V ;
|
||||
|
||||
bear_V : V ;
|
||||
beat_V : V ;
|
||||
become_V : V ;
|
||||
begin_V : V ;
|
||||
bend_V : V ;
|
||||
beset_V : V ;
|
||||
bet_V : V ;
|
||||
bid_V : V ;
|
||||
bind_V : V ;
|
||||
bite_V : V ;
|
||||
bleed_V : V ;
|
||||
blow_V : V ;
|
||||
break_V : V ;
|
||||
breed_V : V ;
|
||||
bring_V : V ;
|
||||
broadcast_V : V ;
|
||||
build_V : V ;
|
||||
burn_V : V ;
|
||||
burst_V : V ;
|
||||
buy_V : V ;
|
||||
cast_V : V ;
|
||||
catch_V : V ;
|
||||
choose_V : V ;
|
||||
cling_V : V ;
|
||||
come_V : V ;
|
||||
cost_V : V ;
|
||||
creep_V : V ;
|
||||
cut_V : V ;
|
||||
deal_V : V ;
|
||||
dig_V : V ;
|
||||
dive_V : V ;
|
||||
do_V : V ;
|
||||
draw_V : V ;
|
||||
dream_V : V ;
|
||||
drive_V : V ;
|
||||
drink_V : V ;
|
||||
eat_V : V ;
|
||||
fall_V : V ;
|
||||
feed_V : V ;
|
||||
feel_V : V ;
|
||||
fight_V : V ;
|
||||
find_V : V ;
|
||||
fit_V : V ;
|
||||
flee_V : V ;
|
||||
fling_V : V ;
|
||||
fly_V : V ;
|
||||
forbid_V : V ;
|
||||
forget_V : V ;
|
||||
forgive_V : V ;
|
||||
forsake_V : V ;
|
||||
freeze_V : V ;
|
||||
get_V : V ;
|
||||
give_V : V ;
|
||||
go_V : V ;
|
||||
grind_V : V ;
|
||||
grow_V : V ;
|
||||
hang_V : V ;
|
||||
have_V : V ;
|
||||
hear_V : V ;
|
||||
hide_V : V ;
|
||||
hit_V : V ;
|
||||
hold_V : V ;
|
||||
hurt_V : V ;
|
||||
keep_V : V ;
|
||||
kneel_V : V ;
|
||||
knit_V : V ;
|
||||
know_V : V ;
|
||||
lay_V : V ;
|
||||
lead_V : V ;
|
||||
leap_V : V ;
|
||||
learn_V : V ;
|
||||
leave_V : V ;
|
||||
lend_V : V ;
|
||||
let_V : V ;
|
||||
lie_V : V ;
|
||||
light_V : V ;
|
||||
lose_V : V ;
|
||||
make_V : V ;
|
||||
mean_V : V ;
|
||||
meet_V : V ;
|
||||
misspell_V : V ;
|
||||
mistake_V : V ;
|
||||
mow_V : V ;
|
||||
overcome_V : V ;
|
||||
overdo_V : V ;
|
||||
overtake_V : V ;
|
||||
overthrow_V : V ;
|
||||
pay_V : V ;
|
||||
plead_V : V ;
|
||||
prove_V : V ;
|
||||
put_V : V ;
|
||||
quit_V : V ;
|
||||
read_V : V ;
|
||||
rid_V : V ;
|
||||
ride_V : V ;
|
||||
ring_V : V ;
|
||||
rise_V : V ;
|
||||
run_V : V ;
|
||||
saw_V : V ;
|
||||
say_V : V ;
|
||||
see_V : V ;
|
||||
seek_V : V ;
|
||||
sell_V : V ;
|
||||
send_V : V ;
|
||||
set_V : V ;
|
||||
sew_V : V ;
|
||||
shake_V : V ;
|
||||
shave_V : V ;
|
||||
shear_V : V ;
|
||||
shed_V : V ;
|
||||
shine_V : V ;
|
||||
shoe_V : V ;
|
||||
shoot_V : V ;
|
||||
show_V : V ;
|
||||
shrink_V : V ;
|
||||
shut_V : V ;
|
||||
sing_V : V ;
|
||||
sink_V : V ;
|
||||
sit_V : V ;
|
||||
sleep_V : V ;
|
||||
slay_V : V ;
|
||||
slide_V : V ;
|
||||
sling_V : V ;
|
||||
slit_V : V ;
|
||||
smite_V : V ;
|
||||
sow_V : V ;
|
||||
speak_V : V ;
|
||||
speed_V : V ;
|
||||
spend_V : V ;
|
||||
spill_V : V ;
|
||||
spin_V : V ;
|
||||
spit_V : V ;
|
||||
split_V : V ;
|
||||
spread_V : V ;
|
||||
spring_V : V ;
|
||||
stand_V : V ;
|
||||
steal_V : V ;
|
||||
stick_V : V ;
|
||||
sting_V : V ;
|
||||
stink_V : V ;
|
||||
stride_V : V ;
|
||||
strike_V : V ;
|
||||
string_V : V ;
|
||||
strive_V : V ;
|
||||
swear_V : V ;
|
||||
sweep_V : V ;
|
||||
swell_V : V ;
|
||||
swim_V : V ;
|
||||
swing_V : V ;
|
||||
take_V : V ;
|
||||
teach_V : V ;
|
||||
tear_V : V ;
|
||||
tell_V : V ;
|
||||
think_V : V ;
|
||||
thrive_V : V ;
|
||||
throw_V : V ;
|
||||
thrust_V : V ;
|
||||
tread_V : V ;
|
||||
understand_V : V ;
|
||||
uphold_V : V ;
|
||||
upset_V : V ;
|
||||
wake_V : V ;
|
||||
wear_V : V ;
|
||||
weave_V : V ;
|
||||
wed_V : V ;
|
||||
weep_V : V ;
|
||||
wind_V : V ;
|
||||
win_V : V ;
|
||||
withhold_V : V ;
|
||||
withstand_V : V ;
|
||||
wring_V : V ;
|
||||
write_V : V ;
|
||||
}
|
||||
@@ -34,7 +34,8 @@ lincat
|
||||
|
||||
V = Verb ;
|
||||
-- = {s : VerbForm => Str ; s1 : Str} ;
|
||||
VP = {s : SForm => Str ;
|
||||
VP = {s : SForm => Str ;
|
||||
s2 : Bool => Str ; -- negation and adverbs like "alltid"
|
||||
s3 : SForm => Gender => Number => Person => Str} ;
|
||||
VPI = {s : VIForm => Gender => Number => Person => Str} ;
|
||||
V2 = TransVerb ;
|
||||
|
||||
@@ -133,7 +133,7 @@ lin
|
||||
ImperMany = imperUtterance plural ;
|
||||
|
||||
AdvCl = advClause ;
|
||||
---- AdvVP = advVerbPhrase ;
|
||||
AdvVPI = advVerbPhrase ;
|
||||
AdvPhr = advSentence ;
|
||||
AdCPhr = advSentence ;
|
||||
|
||||
|
||||
@@ -535,7 +535,7 @@ oper
|
||||
useVerb : Verb -> (Gender => Number => Person => Str) -> VerbGroup = \verb,arg ->
|
||||
let aer = verbSForm verb Act in {
|
||||
s = \\sf => (aer sf).fin ;
|
||||
--* s2 = negation ;
|
||||
s2 = negation ;
|
||||
s3 = \\sf,g,n,p => (aer sf).inf ++ arg ! g ! n ! p
|
||||
} ;
|
||||
|
||||
@@ -553,7 +553,7 @@ oper
|
||||
|
||||
VerbGroup : Type = {
|
||||
s : SForm => Str ;
|
||||
--* s2 : Bool => Str ;
|
||||
s2 : Bool => Str ;
|
||||
s3 : SForm => Gender => Number => Person => Str
|
||||
} ;
|
||||
|
||||
@@ -565,9 +565,9 @@ oper
|
||||
in
|
||||
{s = table {
|
||||
VIInfinit => \\g,n,p =>
|
||||
vg.s ! VInfinit a ++ ant.s ++ negation ! b ++ vg.s3 ! VInfinit a ! g ! n ! p ;
|
||||
vg.s ! VInfinit a ++ ant.s ++ vg.s2 ! b ++ vg.s3 ! VInfinit a ! g ! n ! p ;
|
||||
VIImperat bo => \\g,n,p =>
|
||||
vg.s ! VImperat ++ ant.s ++ negation ! bo ++ vg.s3 ! VImperat ! g ! n ! p
|
||||
vg.s ! VImperat ++ ant.s ++ vg.s2 ! bo ++ vg.s3 ! VImperat ! g ! n ! p
|
||||
} ---- bo shadows b
|
||||
} ;
|
||||
|
||||
@@ -664,7 +664,7 @@ oper
|
||||
passVerb : Verb -> VerbGroup = \se ->
|
||||
let ses = verbSForm se Pass in {
|
||||
s = \\sf => (ses sf).fin ;
|
||||
--* s2 = negation ;
|
||||
s2 = negation ;
|
||||
s3 = \\sf,g,n,_ => (ses sf).inf ++ se.s1
|
||||
} ;
|
||||
|
||||
@@ -738,7 +738,7 @@ oper
|
||||
{
|
||||
--- this unfortunately generates VP#2 ::= VP#2
|
||||
s = spelar.s ;
|
||||
--* s2 = \\b => ofta.s ++ spelar.s2 ! b ; ----* the essential use of s2
|
||||
s2 = \\b => ofta.s ++ spelar.s2 ! b ; ---- the essential use of s2
|
||||
s3 = \\sf,g,n,p => spelar.s3 ! sf ! g ! n ! p
|
||||
} ;
|
||||
|
||||
@@ -818,7 +818,7 @@ oper
|
||||
o = osf.o ;
|
||||
ser = serdiginte.s ! t ;
|
||||
dig = serdiginte.s3 ! t ! Jag.g ! Jag.n ! Jag.p ;
|
||||
inte = negation ! b --* serdiginte.s2 ! b
|
||||
inte = serdiginte.s2 ! b
|
||||
} in
|
||||
case o of {
|
||||
Main => jag ++ ser ++ inte ++ dig ;
|
||||
@@ -1000,7 +1000,7 @@ oper
|
||||
|
||||
relVerbPhrase : RelPron -> VerbGroup -> RelClause = \som,sover ->
|
||||
{s = \\b,sf,gn,p =>
|
||||
som.s ! RNom ! gn ++ negation ! b ++ sover.s ! sf ++
|
||||
som.s ! RNom ! gn ++ sover.s2 ! b ++ sover.s ! sf ++
|
||||
sover.s3 ! sf ! mkGenderRel som.g (genGN gn) ! numGN gn ! p
|
||||
} ;
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ incomplete concrete VerbphraseScand of Verbphrase = CategoriesScand **
|
||||
PosVP tp = predVerbGroup True tp ;
|
||||
NegVP tp = predVerbGroup False tp ;
|
||||
|
||||
---- AdvVP = adVerbPhrase ;
|
||||
AdvVP = adVerbPhrase ;
|
||||
SubjVP = subjunctVerbPhrase ;
|
||||
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
instance SyntaxSwe of SyntaxScand = TypesSwe **
|
||||
open Prelude, (CO = Coordination), MorphoSwe in {
|
||||
|
||||
flags optimize=parametrize ;
|
||||
|
||||
oper
|
||||
|
||||
extCommNounMasc : Subst -> CommNoun = \sb ->
|
||||
|
||||
Reference in New Issue
Block a user