forked from GitHub/gf-core
resources and new instantiation syntax
This commit is contained in:
@@ -31,7 +31,7 @@ lin
|
||||
bread_N = regN "bread" ;
|
||||
break_V2 = dirV2 (irregV "break" "broke" "broken") ;
|
||||
broad_ADeg = regADeg "broad" ;
|
||||
brother_N = regN "brother" ;
|
||||
brother_N2 = regN2 "brother" ;
|
||||
brown_ADeg = regADeg "brown" ;
|
||||
butter_N = regN "butter" ;
|
||||
buy_V2 = dirV2 (irregV "buy" "bought" "bought") ;
|
||||
@@ -66,7 +66,7 @@ lin
|
||||
eat_V2 = dirV2 (irregV "eat" "ate" "eaten") ;
|
||||
enemy_N = regN "enemy" ;
|
||||
factory_N = regN "factory" ;
|
||||
father_N = regN "father" ;
|
||||
father_N2 = regN2 "father" ;
|
||||
fear_VS = mkVS (regV "fear") ;
|
||||
find_V2 = dirV2 (irregV "find" "found" "found") ;
|
||||
fish_N = mk2N "fish" "fish" ;
|
||||
@@ -80,7 +80,7 @@ lin
|
||||
girl_N = regN "girl" ;
|
||||
glove_N = regN "glove" ;
|
||||
gold_N = regN "gold" ;
|
||||
good_ADeg = regADeg "good" ;
|
||||
good_ADeg = mkADeg "good" "better" "best" "well" ;
|
||||
go_V = (mkV "go" "goes" "went" "gone" "going") ;
|
||||
green_ADeg = regADeg "green" ;
|
||||
harbour_N = regN "harbour" ;
|
||||
@@ -93,7 +93,7 @@ lin
|
||||
horse_N = regN "horse" ;
|
||||
hot_ADeg = regADeg "hot" ;
|
||||
house_N = regN "house" ;
|
||||
important_ADeg = regADeg "important" ;
|
||||
important_ADeg = compoundADeg (regA "important") ;
|
||||
industry_N = regN "industry" ;
|
||||
iron_N = regN "iron" ;
|
||||
king_N = regN "king" ;
|
||||
@@ -115,7 +115,7 @@ lin
|
||||
meat_N = regN "meat" ;
|
||||
milk_N = regN "milk" ;
|
||||
moon_N = regN "moon" ;
|
||||
mother_N = regN "mother" ;
|
||||
mother_N2 = regN2 "mother" ;
|
||||
mountain_N = regN "mountain" ;
|
||||
music_N = regN "music" ;
|
||||
narrow_ADeg = regADeg "narrow" ;
|
||||
@@ -186,12 +186,12 @@ lin
|
||||
train_N = regN "train" ;
|
||||
travel_V = (regDuplV "travel") ;
|
||||
tree_N = regN "tree" ;
|
||||
trousers_N = regN "trousers" ;
|
||||
---- trousers_N = regN "trousers" ;
|
||||
ugly_ADeg = regADeg "ugly" ;
|
||||
understand_V2 = dirV2 (irregV "understand" "understood" "understood") ;
|
||||
university_N = regN "university" ;
|
||||
village_N = regN "village" ;
|
||||
wait_V2 = dirV2 (regV "wait") ;
|
||||
wait_V2 = mkV2 (regV "wait") "for" ;
|
||||
walk_V = (regV "walk") ;
|
||||
warm_ADeg = regADeg "warm" ;
|
||||
war_N = regN "war" ;
|
||||
@@ -207,4 +207,14 @@ lin
|
||||
write_V2 = dirV2 (irregV "write" "wrote" "written") ;
|
||||
yellow_ADeg = regADeg "yellow" ;
|
||||
young_ADeg = regADeg "young" ;
|
||||
|
||||
do_V2 = dirV2 (mkV "do" "does" "did" "done" "doing") ;
|
||||
now_Adv = mkAdv "now" ;
|
||||
already_Adv = mkAdv "already" ;
|
||||
song_N = regN "song" ;
|
||||
add_V3 = dirV3 (regV "add") "to" ;
|
||||
number_N = regN "number" ;
|
||||
put_V2 = mkV2 (irregDuplV "put" "put" "put") [] ;
|
||||
stop_V = regV "stop" ;
|
||||
jump_V = regV "jump" ;
|
||||
} ;
|
||||
|
||||
@@ -20,7 +20,8 @@ concrete ClauseEng of Clause = CategoriesEng **
|
||||
SPredV2S np v x y = predVerbGroupClause np (complDitransSentVerb v x y) ;
|
||||
SPredV2Q np v x y = predVerbGroupClause np (complDitransQuestVerb v x y) ;
|
||||
|
||||
SPredAP np v = predVerbGroupClause np (predAdjective v) ;
|
||||
SPredAP np v = predBeGroup np (\\_ => v.s ! AAdj) ;
|
||||
-- SPredAP np v = predVerbGroupClause np (predAdjective v) ;
|
||||
SPredSuperl np a = predVerbGroupClause np (predAdjective (superlAdjPhrase a)) ;
|
||||
SPredCN np v = predVerbGroupClause np (predCommNoun v) ;
|
||||
SPredNP np v = predVerbGroupClause np (predNounPhrase v) ;
|
||||
@@ -28,7 +29,6 @@ concrete ClauseEng of Clause = CategoriesEng **
|
||||
SPredAV np v x = predVerbGroupClause np (complVerbAdj v x) ;
|
||||
SPredObjA2V np v x y = predVerbGroupClause np (complVerbAdj2 True v x y) ;
|
||||
|
||||
|
||||
QPredV np v = intVerbPhrase np (predVerb v) ;
|
||||
QPredPassV np v = intVerbPhrase np (passVerb v) ;
|
||||
QPredV2 np v x = intVerbPhrase np (complTransVerb v x) ;
|
||||
@@ -53,6 +53,11 @@ concrete ClauseEng of Clause = CategoriesEng **
|
||||
QPredAV np v x = intVerbPhrase np (complVerbAdj v x) ;
|
||||
QPredObjA2V np v x y = intVerbPhrase np (complVerbAdj2 True v x y) ;
|
||||
|
||||
IPredV a v = predVerbGroupI True a (predVerb v) ;
|
||||
IPredV2 a v x = predVerbGroupI True a (complTransVerb v x) ;
|
||||
---- SPredAP np v = predBeGroup np (\\_ => v.s ! AAdj) ;
|
||||
IPredAP a v = predVerbGroupI True a (predAdjective v) ;
|
||||
|
||||
{-
|
||||
-- Use VPs
|
||||
|
||||
|
||||
@@ -142,8 +142,8 @@ lin
|
||||
IntSlash = intSlash ;
|
||||
QuestAdv = questAdverbial ;
|
||||
|
||||
PosImperVP = imperVerbPhrase True ;
|
||||
NegImperVP = imperVerbPhrase False ;
|
||||
PosImpVP = imperVerbPhrase True ;
|
||||
NegImpVP = imperVerbPhrase False ;
|
||||
|
||||
IndicPhrase = indicUtt ;
|
||||
QuestPhrase = interrogUtt ;
|
||||
|
||||
@@ -393,6 +393,22 @@ oper
|
||||
}
|
||||
in negAux b has ;
|
||||
|
||||
auxBe : Bool -> Tense -> Agr -> Str = \b,t,a ->
|
||||
let is =
|
||||
case t of {
|
||||
Present => case a of {
|
||||
ASgP3 _ => "is" ;
|
||||
ASgP1 => "am" ;
|
||||
_ => "are"
|
||||
} ;
|
||||
Past => case a of {
|
||||
ASgP3 _ => "was" ;
|
||||
_ => "were"
|
||||
} ;
|
||||
_ => "be" --- never used
|
||||
}
|
||||
in negAux b is ; ---- amn't
|
||||
|
||||
auxTense : Bool -> Tense -> Agr -> Str = \b,t,a ->
|
||||
case t of {
|
||||
Present => negAux b (case a of {
|
||||
@@ -451,6 +467,13 @@ oper
|
||||
s1 = if_then_Str b [] "not"
|
||||
} ;
|
||||
|
||||
predVerbGroupI : Bool -> {s : Str ; a : Anteriority} -> VerbGroup -> VerbPhrase =
|
||||
\b,ant,vg ->
|
||||
let vp = predVerbGroup b ant.a vg in
|
||||
{s = \\a => ant.s ++ vp.s ! a ;
|
||||
s1 = vp.s1
|
||||
} ;
|
||||
|
||||
-- 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
|
||||
@@ -476,11 +499,58 @@ oper
|
||||
predAdverb : PrepPhrase -> VerbGroup = \elsewhere ->
|
||||
beGroup (\\_ => elsewhere.s) ;
|
||||
|
||||
{- --- compiles to 25k lines gfr 3/2/2005
|
||||
predAdjSent : Adjective -> Sentence -> Clause = \bra,hansover ->
|
||||
predVerbGroupClause
|
||||
(pronNounPhrase pronIt)
|
||||
(beGroup (
|
||||
\\n => bra.s ! AAdj ++ "that" ++ hansover.s)) ;
|
||||
-}
|
||||
|
||||
predAdjSent : Adjective -> Sentence -> Clause = \bra,hansover ->
|
||||
predBeGroup (pronNounPhrase pronIt) (\\n => bra.s ! AAdj ++ "that" ++ hansover.s) ;
|
||||
|
||||
predBeGroup : NounPhrase -> (Agr => Str) -> Clause = \itt,goo ->
|
||||
let
|
||||
it = itt.s ! NomP ;
|
||||
good = goo ! itt.a ;
|
||||
begood : Tense -> Str = \t -> case t of {
|
||||
Present => good ;
|
||||
Past => good ;
|
||||
_ => "be" ++ good
|
||||
} ;
|
||||
beengood : Tense -> Str = \t -> case t of {
|
||||
Future => "have" ++ "been" ++ good ;
|
||||
Conditional => "have" ++ "been" ++ good ;
|
||||
_ => "been" ++ good
|
||||
} ;
|
||||
has : Bool -> Tense -> Str = \b,t -> case t of {
|
||||
Future => if_then_Str b "will" "won't" ;
|
||||
Conditional => negAux b "would" ;
|
||||
_ => auxHave b t itt.a
|
||||
} ;
|
||||
is : Bool -> Tense -> Str = \b,t -> case t of {
|
||||
Future => if_then_Str b "will" "won't" ;
|
||||
Conditional => negAux b "would" ;
|
||||
_ => auxBe b t itt.a
|
||||
}
|
||||
in
|
||||
{s = \\o,b,sf =>
|
||||
case sf of {
|
||||
VFinite t Simul => case o of {
|
||||
Dir => it ++ is b t ++ begood t ;
|
||||
Inv => is b t ++ it ++ begood t
|
||||
} ;
|
||||
VFinite t Anter => case o of {
|
||||
Dir => it ++ has b t ++ beengood t ;
|
||||
Inv => has b t ++ it ++ beengood t
|
||||
} ;
|
||||
VInfinit Simul => it ++ begood Future ;
|
||||
VInfinit Anter => it ++ beengood Future ;
|
||||
VPresPart => it ++ "being" ++ good
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
predAdjSent2 : AdjCompl -> NounPhrase -> Adjective = \bra,han ->
|
||||
{s = \\af => bra.s ! af ++ bra.s2 ++ han.s ! AccP} ;
|
||||
@@ -652,6 +722,7 @@ oper
|
||||
|
||||
param Order = Dir | Inv ;
|
||||
|
||||
---- compiles to 4k lines gfr. also relSlash, relVerbPhrase are bad
|
||||
oper
|
||||
predVerbGroupClause : NounPhrase -> VerbGroup -> Clause =
|
||||
\yo,dosleep -> {
|
||||
@@ -1050,10 +1121,13 @@ oper
|
||||
|
||||
Imperative = SS1 Number ;
|
||||
|
||||
imperVerbPhrase : Bool -> VerbGroup -> Imperative = \b,walk ->
|
||||
imperVerbPhrase : Bool -> VerbPhrase -> Imperative = \b,walk ->
|
||||
{s = \\n =>
|
||||
let a = toAgr n P2 human in
|
||||
walk.s ! b ! VInfinit Simul ! a ++ walk.s2 ! b ! VInfinit Simul ! a
|
||||
let
|
||||
a = toAgr n P2 human ;
|
||||
dont = if_then_Str b [] "don't"
|
||||
in
|
||||
dont ++ walk.s ! a
|
||||
} ;
|
||||
|
||||
imperUtterance : Number -> Imperative -> Utterance = \n,I ->
|
||||
|
||||
Reference in New Issue
Block a user