mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-06-03 07:08:54 -06:00
resource = resource-1.0
This commit is contained in:
231
lib/resource-0.9/english/BasicEng.gf
Normal file
231
lib/resource-0.9/english/BasicEng.gf
Normal file
@@ -0,0 +1,231 @@
|
||||
--# -path=.:../abstract:../../prelude
|
||||
--# -val
|
||||
|
||||
concrete BasicEng of Basic = CategoriesEng ** open ParadigmsEng in {
|
||||
|
||||
flags
|
||||
startcat=Phr ; lexer=textlit ; unlexer=text ;
|
||||
optimize=all ;
|
||||
|
||||
lin
|
||||
airplane_N = regN "airplane" ;
|
||||
answer_V2S = mkV2S (regV "answer") "to" ;
|
||||
apartment_N = regN "apartment" ;
|
||||
apple_N = regN "apple" ;
|
||||
art_N = regN "art" ;
|
||||
ask_V2Q = mkV2Q (regV "ask") [] ;
|
||||
baby_N = regN "baby" ;
|
||||
bad_ADeg = regADeg "bad" ;
|
||||
bank_N = regN "bank" ;
|
||||
beautiful_ADeg = regADeg "beautiful" ;
|
||||
become_VA = mkVA (irregV "become" "became" "become") ;
|
||||
beer_N = regN "beer" ;
|
||||
beg_V2V = mkV2V (regDuplV "beg") [] "to" ;
|
||||
big_ADeg = regADeg "big" ;
|
||||
bike_N = regN "bike" ;
|
||||
bird_N = regN "bird" ;
|
||||
black_ADeg = regADeg "black" ;
|
||||
blue_ADeg = regADeg "blue" ;
|
||||
boat_N = regN "boat" ;
|
||||
book_N = regN "book" ;
|
||||
boot_N = regN "boot" ;
|
||||
boss_N = regN "boss" ;
|
||||
boy_N = regN "boy" ;
|
||||
bread_N = regN "bread" ;
|
||||
break_V2 = dirV2 (irregV "break" "broke" "broken") ;
|
||||
broad_ADeg = regADeg "broad" ;
|
||||
brother_N2 = regN2 "brother" ;
|
||||
brown_ADeg = regADeg "brown" ;
|
||||
butter_N = regN "butter" ;
|
||||
buy_V2 = dirV2 (irregV "buy" "bought" "bought") ;
|
||||
camera_N = regN "camera" ;
|
||||
cap_N = regN "cap" ;
|
||||
car_N = regN "car" ;
|
||||
carpet_N = regN "carpet" ;
|
||||
cat_N = regN "cat" ;
|
||||
ceiling_N = regN "ceiling" ;
|
||||
chair_N = regN "chair" ;
|
||||
cheese_N = regN "cheese" ;
|
||||
child_N = mk2N "child" "children" ;
|
||||
church_N = regN "church" ;
|
||||
city_N = regN "city" ;
|
||||
clean_ADeg = regADeg "clean" ;
|
||||
clever_ADeg = regADeg "clever" ;
|
||||
close_V2 = dirV2 (regV "close") ;
|
||||
coat_N = regN "coat" ;
|
||||
cold_ADeg = regADeg "cold" ;
|
||||
come_V = (irregV "come" "came" "come") ;
|
||||
computer_N = regN "computer" ;
|
||||
country_N = regN "country" ;
|
||||
cousin_N = regN "cousin" ;
|
||||
cow_N = regN "cow" ;
|
||||
die_V = (regV "die") ;
|
||||
dirty_ADeg = regADeg "dirty" ;
|
||||
distance_N3 = mkN3 (regN "distance") "from" "to" ;
|
||||
doctor_N = regN "doctor" ;
|
||||
dog_N = regN "dog" ;
|
||||
door_N = regN "door" ;
|
||||
drink_V2 = dirV2 (irregV "drink" "drank" "drunk") ;
|
||||
easy_A2V = mkA2V (regA "easy") "for" ;
|
||||
eat_V2 = dirV2 (irregV "eat" "ate" "eaten") ;
|
||||
empty_ADeg = regADeg "empty" ;
|
||||
enemy_N = regN "enemy" ;
|
||||
factory_N = regN "factory" ;
|
||||
father_N2 = regN2 "father" ;
|
||||
fear_VS = mkVS (regV "fear") ;
|
||||
find_V2 = dirV2 (irregV "find" "found" "found") ;
|
||||
fish_N = mk2N "fish" "fish" ;
|
||||
floor_N = regN "floor" ;
|
||||
forget_V2 = dirV2 (irregV "forget" "forgot" "forgotten") ;
|
||||
fridge_N = regN "fridge" ;
|
||||
friend_N = regN "friend" ;
|
||||
fruit_N = regN "fruit" ;
|
||||
fun_AV = mkAV (regA "fun") ;
|
||||
garden_N = regN "garden" ;
|
||||
girl_N = regN "girl" ;
|
||||
glove_N = regN "glove" ;
|
||||
gold_N = regN "gold" ;
|
||||
good_ADeg = mkADeg "good" "well" "better" "best" ;
|
||||
go_V = (mkV "go" "goes" "went" "gone" "going") ;
|
||||
green_ADeg = regADeg "green" ;
|
||||
harbour_N = regN "harbour" ;
|
||||
hate_V2 = dirV2 (regV "hate") ;
|
||||
hat_N = regN "hat" ;
|
||||
have_V2 = dirV2 (mkV "have" "has" "had" "had" "having") ;
|
||||
hear_V2 = dirV2 (irregV "hear" "heard" "heard") ;
|
||||
hill_N = regN "hill" ;
|
||||
hope_VS = mkVS (regV "hope") ;
|
||||
horse_N = regN "horse" ;
|
||||
hot_ADeg = regADeg "hot" ;
|
||||
house_N = regN "house" ;
|
||||
important_ADeg = compoundADeg (regA "important") ;
|
||||
industry_N = regN "industry" ;
|
||||
iron_N = regN "iron" ;
|
||||
king_N = regN "king" ;
|
||||
know_V2 = dirV2 (irregV "know" "knew" "known") ;
|
||||
lake_N = regN "lake" ;
|
||||
lamp_N = regN "lamp" ;
|
||||
learn_V2 = dirV2 (regV "learn") ;
|
||||
leather_N = regN "leather" ;
|
||||
leave_V2 = dirV2 (irregV "leave" "left" "left") ;
|
||||
like_V2 = dirV2 (regV "like") ;
|
||||
listen_V2 = dirV2 (regV "listen") ;
|
||||
live_V = (regV "live") ;
|
||||
long_ADeg = regADeg "long" ;
|
||||
lose_V2 = dirV2 (irregV "lose" "lost" "lost") ;
|
||||
love_N = regN "love" ;
|
||||
love_V2 = dirV2 (regV "love") ;
|
||||
man_N = mk2N "man" "men" ;
|
||||
married_A2 = mkA2 (regA "married") "to" ;
|
||||
meat_N = regN "meat" ;
|
||||
milk_N = regN "milk" ;
|
||||
moon_N = regN "moon" ;
|
||||
mother_N2 = regN2 "mother" ;
|
||||
mountain_N = regN "mountain" ;
|
||||
music_N = regN "music" ;
|
||||
narrow_ADeg = regADeg "narrow" ;
|
||||
new_ADeg = regADeg "new" ;
|
||||
newspaper_N = regN "newspaper" ;
|
||||
oil_N = regN "oil" ;
|
||||
old_ADeg = regADeg "old" ;
|
||||
open_V2 = dirV2 (regV "open") ;
|
||||
paint_V2A = mkV2A (regV "paint") [] ;
|
||||
paper_N = regN "paper" ;
|
||||
peace_N = regN "peace" ;
|
||||
pen_N = regN "pen" ;
|
||||
planet_N = regN "planet" ;
|
||||
plastic_N = regN "plastic" ;
|
||||
play_V2 = dirV2 (regV "play") ;
|
||||
policeman_N = regN "policeman" ;
|
||||
priest_N = regN "priest" ;
|
||||
probable_AS = mkAS (regA "probable") ;
|
||||
queen_N = regN "queen" ;
|
||||
radio_N = regN "radio" ;
|
||||
rain_V0 = mkV0 (regV "rain") ;
|
||||
read_V2 = dirV2 (irregV "read" "read" "read") ;
|
||||
red_ADeg = regADeg "red" ;
|
||||
religion_N = regN "religion" ;
|
||||
restaurant_N = regN "restaurant" ;
|
||||
river_N = regN "river" ;
|
||||
rock_N = regN "rock" ;
|
||||
roof_N = regN "roof" ;
|
||||
rubber_N = regN "rubber" ;
|
||||
run_V = (irregDuplV "run" "ran" "run") ;
|
||||
say_VS = mkVS (irregV "say" "said" "said") ;
|
||||
school_N = regN "school" ;
|
||||
science_N = regN "science" ;
|
||||
sea_N = regN "sea" ;
|
||||
seek_V2 = dirV2 (irregV "seek" "sought" "sought") ;
|
||||
see_V2 = dirV2 (irregV "see" "saw" "seen") ;
|
||||
sell_V3 = dirV3 (irregV "sell" "sold" "sold") "to" ;
|
||||
send_V3 = dirV3 (irregV "send" "sent" "sent") "to" ;
|
||||
sheep_N = mk2N "sheep" "sheep" ;
|
||||
ship_N = regN "ship" ;
|
||||
shirt_N = regN "shirt" ;
|
||||
shoe_N = regN "shoe" ;
|
||||
shop_N = regN "shop" ;
|
||||
short_ADeg = regADeg "short" ;
|
||||
silver_N = regN "silver" ;
|
||||
sister_N = regN "sister" ;
|
||||
sleep_V = (irregV "sleep" "slept" "slept") ;
|
||||
small_ADeg = regADeg "small" ;
|
||||
snake_N = regN "snake" ;
|
||||
sock_N = regN "sock" ;
|
||||
speak_V2 = dirV2 (irregV "speak" "spoke" "spoken") ;
|
||||
star_N = regN "star" ;
|
||||
steel_N = regN "steel" ;
|
||||
stone_N = regN "stone" ;
|
||||
stove_N = regN "stove" ;
|
||||
student_N = regN "student" ;
|
||||
stupid_ADeg = regADeg "stupid" ;
|
||||
sun_N = regN "sun" ;
|
||||
switch8off_V2 = dirV2 (partV (regV "switch") "off") ;
|
||||
switch8on_V2 = dirV2 (partV (regV "switch") "on") ;
|
||||
table_N = regN "table" ;
|
||||
talk_V3 = mkV3 (regV "talk") "to" "about" ;
|
||||
teacher_N = regN "teacher" ;
|
||||
teach_V2 = dirV2 (irregV "teach" "taught" "taught") ;
|
||||
television_N = regN "television" ;
|
||||
thick_ADeg = regADeg "thick" ;
|
||||
thin_ADeg = regADeg "thin" ;
|
||||
train_N = regN "train" ;
|
||||
travel_V = (regDuplV "travel") ;
|
||||
tree_N = regN "tree" ;
|
||||
---- 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 = mkV2 (regV "wait") "for" ;
|
||||
walk_V = (regV "walk") ;
|
||||
warm_ADeg = regADeg "warm" ;
|
||||
war_N = regN "war" ;
|
||||
watch_V2 = dirV2 (regV "watch") ;
|
||||
water_N = regN "water" ;
|
||||
white_ADeg = regADeg "white" ;
|
||||
window_N = regN "window" ;
|
||||
wine_N = regN "wine" ;
|
||||
win_V2 = dirV2 (irregV "win" "won" "won") ;
|
||||
woman_N = mk2N "woman" "women" ;
|
||||
wonder_VQ = mkVQ (regV "wonder") ;
|
||||
wood_N = regN "wood" ;
|
||||
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 = regDuplV "stop" ;
|
||||
jump_V = regV "jump" ;
|
||||
here_Adv = mkAdv "here" ;
|
||||
here7to_Adv = mkAdv ["to here"] ;
|
||||
here7from_Adv = mkAdv ["from here"] ;
|
||||
there_Adv = mkAdv "there" ;
|
||||
there7to_Adv = mkAdv "there" ;
|
||||
there7from_Adv = mkAdv ["from there"] ;
|
||||
} ;
|
||||
107
lib/resource-0.9/english/CategoriesEng.gf
Normal file
107
lib/resource-0.9/english/CategoriesEng.gf
Normal file
@@ -0,0 +1,107 @@
|
||||
--# -path=.:../abstract:../../prelude
|
||||
|
||||
--1 The Top-Level English Resource Grammar: Combination Rules
|
||||
--
|
||||
-- Aarne Ranta 2002 -- 2003
|
||||
--
|
||||
-- This is the English concrete syntax of the multilingual resource
|
||||
-- grammar. Most of the work is done in the file $syntax.Eng.gf$.
|
||||
-- However, for the purpose of documentation, we make here explicit the
|
||||
-- linearization types of each category, so that their structures and
|
||||
-- dependencies can be seen.
|
||||
-- Another substantial part are the linearization rules of some
|
||||
-- structural words.
|
||||
--
|
||||
-- The users of the resource grammar should not look at this file for the
|
||||
-- linearization rules, which are in fact hidden in the document version.
|
||||
-- They should use $resource.Abs.gf$ to access the syntactic rules.
|
||||
-- This file can be consulted in those, hopefully rare, occasions in which
|
||||
-- one has to know how the syntactic categories are
|
||||
-- implemented. The parameter types are defined in $TypesEng.gf$.
|
||||
|
||||
concrete CategoriesEng of Categories = PredefCnc ** open Prelude, SyntaxEng in {
|
||||
|
||||
lincat
|
||||
N = CommNoun ;
|
||||
-- = {s : Number => Case => Str}
|
||||
CN = CommNounPhrase ;
|
||||
-- = CommNoun ** {g : Gender}
|
||||
NP = {s : NPForm => Str ; a : Agr} ;
|
||||
PN = {s : Case => Str ; g : Gender} ;
|
||||
Det = {s : Str ; n : Number} ;
|
||||
NDet = {s : Str} ;
|
||||
N2 = Function ;
|
||||
-- = CommNounPhrase ** {s2 : Preposition} ;
|
||||
N3 = Function ** {s3 : Preposition} ;
|
||||
Num = {s : Case => Str ; n : Number} ;
|
||||
Prep = {s : Str} ;
|
||||
|
||||
A = Adjective ;
|
||||
-- = {s : AForm => Str}
|
||||
A2 = Adjective ** {s2 : Preposition} ;
|
||||
ADeg = {s : Degree => AForm => Str} ;
|
||||
AP = {s : Agr => Str ; p : Bool} ;
|
||||
AS = Adjective ; --- "more difficult for him to come than..."
|
||||
A2S = Adjective ** {s2 : Preposition} ;
|
||||
AV = Adjective ;
|
||||
A2V = Adjective ** {s2 : Preposition} ;
|
||||
|
||||
V = Verb ;
|
||||
-- = {s : VForm => Str ; s1 : Particle}
|
||||
VP = {s,s2 : Bool => SForm => Agr => Str ; isAux : Bool} ;
|
||||
VPI = {s : VIForm => Agr => Str ; s1 : Str} ; -- s1 is "not" or []
|
||||
VCl = {s : Bool => Anteriority => VIForm => Agr => Str ; s1 : Bool => Str} ;
|
||||
V2 = TransVerb ;
|
||||
-- = Verb ** {s3 : Preposition} ;
|
||||
V3 = TransVerb ** {s4 : Preposition} ;
|
||||
VS = Verb ;
|
||||
VV = AuxVerb ** {isAux : Bool} ;
|
||||
|
||||
VS = Verb ;
|
||||
VQ = Verb ;
|
||||
VA = Verb ;
|
||||
|
||||
V2S = TransVerb ;
|
||||
V2Q = TransVerb ;
|
||||
V2V = TransVerb ** {s4 : Str} ;
|
||||
----V2V = {s : VForm => Str ; s1 : Particle ; s3, s4 : Str} ;
|
||||
V2A = TransVerb ;
|
||||
V0 = Verb ;
|
||||
|
||||
TP = {s : Str ; b : Bool ; t : Tense ; a : Anteriority} ; --- the Str field is dummy
|
||||
Tense = {s : Str ; t : Tense} ;
|
||||
Pol = {s : Str ; p : Bool} ;
|
||||
Ant = {s : Str ; a : Anteriority} ;
|
||||
|
||||
PP = {s : Str} ;
|
||||
Adv = {s : Str} ;
|
||||
AdV = {s : Str} ;
|
||||
AdA = {s : Str} ;
|
||||
AdC = {s : Str} ;
|
||||
|
||||
S = {s : Str} ;
|
||||
Cl = Clause ;
|
||||
-- = {s : Order => Bool => SForm => Str} ;
|
||||
Slash = {s : QuestForm => Bool => SForm => Str ; s2 : Preposition} ;
|
||||
RP = {s : Gender => Number => NPForm => Str} ;
|
||||
RCl = {s : (Bool * SForm * Agr) => Str} ;
|
||||
RS = {s : Agr => Str} ;
|
||||
|
||||
IP = {s : NPForm => Str ; n : Number ; g : Gender} ;
|
||||
IDet = {s : Str ; n : Number} ;
|
||||
IAdv = {s : Str} ;
|
||||
QCl = {s : Bool => SForm => QuestForm => Str} ;
|
||||
QS = {s : QuestForm => Str} ;
|
||||
Imp = {s : Number => Str} ;
|
||||
Phr = {s : Str} ;
|
||||
Text = {s : Str} ;
|
||||
|
||||
Conj = {s : Str ; n : Number} ;
|
||||
ConjD = {s1 : Str ; s2 : Str ; n : Number} ;
|
||||
|
||||
ListS = {s1 : Str ; s2 : Str} ;
|
||||
ListAP = {s1,s2 : Agr => Str ; p : Bool} ;
|
||||
ListNP = {s1,s2 : NPForm => Str ; a : Agr} ;
|
||||
ListAdv = {s1 : Str ; s2 : Str} ;
|
||||
|
||||
} ;
|
||||
97
lib/resource-0.9/english/ClauseEng.gf
Normal file
97
lib/resource-0.9/english/ClauseEng.gf
Normal file
@@ -0,0 +1,97 @@
|
||||
--# -path=.:../abstract:../../prelude
|
||||
|
||||
concrete ClauseEng of Clause = CategoriesEng **
|
||||
|
||||
open Prelude, SyntaxEng in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
|
||||
lin
|
||||
SPredV np v = predVerbClause np v (complVerb v) ;
|
||||
SPredPassV np v = predBeGroup np (passVerb v) ;
|
||||
SPredV2 np v x = predVerbClause np v (complTransVerb v x) ;
|
||||
SPredReflV2 np v = predVerbClause np v (reflTransVerb v) ;
|
||||
SPredV3 np v x y = predVerbClause np v (complDitransVerb v x y) ;
|
||||
SPredVS np v x = predVerbClause np v (complSentVerb v x) ;
|
||||
SPredVV np v x = predVerbClause np (aux2verb v) (complVerbVerb v x) ;
|
||||
SPredVQ np v x = predVerbClause np v (complQuestVerb v x) ;
|
||||
SPredVA np v x = predVerbClause np v (complAdjVerb v x) ;
|
||||
SPredV2A np v x y = predVerbClause np v (complDitransAdjVerb v x y) ;
|
||||
SPredSubjV2V np v x y = predVerbClause np v (complDitransVerbVerb False v x y) ;
|
||||
SPredObjV2V np v x y = predVerbClause np v (complDitransVerbVerb True v x y) ;
|
||||
SPredV2S np v x y = predVerbClause np v (complDitransSentVerb v x y) ;
|
||||
SPredV2Q np v x y = predVerbClause np v (complDitransQuestVerb v x y) ;
|
||||
|
||||
SPredAP np v = predBeGroup np v.s ;
|
||||
SPredCN np v = predBeGroup np (complCommNoun v) ;
|
||||
SPredNP np v = predBeGroup np (complNounPhrase v) ;
|
||||
SPredAdv np v = predBeGroup np (complAdverb v) ;
|
||||
|
||||
SPredProgVP = progressiveClause ;
|
||||
|
||||
QPredV np v = intVerbClause np v (complVerb v) ;
|
||||
QPredPassV np v = predBeGroupQ np (passVerb v) ;
|
||||
QPredV2 np v x = intVerbClause np v (complTransVerb v x) ;
|
||||
QPredReflV2 np v = intVerbClause np v (reflTransVerb v) ;
|
||||
QPredV3 np v x y = intVerbClause np v (complDitransVerb v x y) ;
|
||||
QPredVS np v x = intVerbClause np v (complSentVerb v x) ;
|
||||
QPredVV np v x = intVerbClause np (aux2verb v) (complVerbVerb v x) ;
|
||||
QPredVQ np v x = intVerbClause np v (complQuestVerb v x) ;
|
||||
QPredVA np v x = intVerbClause np v (complAdjVerb v x) ;
|
||||
QPredV2A np v x y = intVerbClause np v (complDitransAdjVerb v x y) ;
|
||||
QPredSubjV2V np v x y = intVerbClause np v (complDitransVerbVerb False v x y) ;
|
||||
QPredObjV2V np v x y = intVerbClause np v (complDitransVerbVerb True v x y) ;
|
||||
QPredV2S np v x y = intVerbClause np v (complDitransSentVerb v x y) ;
|
||||
QPredV2Q np v x y = intVerbClause np v (complDitransQuestVerb v x y) ;
|
||||
|
||||
QPredAP np v = predBeGroupQ np v.s ;
|
||||
QPredCN np v = predBeGroupQ np (complCommNoun v) ;
|
||||
QPredNP np v = predBeGroupQ np (complNounPhrase v) ;
|
||||
QPredAdv np v = predBeGroupQ np (complAdverb v) ;
|
||||
|
||||
QPredProgVP np vp = predBeGroupQ np (vp.s ! VIPresPart) ;
|
||||
|
||||
RPredV np v = relVerbClause np v (complVerb v) ;
|
||||
RPredPassV np v = predBeGroupR np (passVerb v) ;
|
||||
RPredV2 np v x = relVerbClause np v (complTransVerb v x) ;
|
||||
RPredReflV2 np v = relVerbClause np v (reflTransVerb v) ;
|
||||
RPredV3 np v x y = relVerbClause np v (complDitransVerb v x y) ;
|
||||
RPredVS np v x = relVerbClause np v (complSentVerb v x) ;
|
||||
RPredVV np v x = relVerbClause np (aux2verb v) (complVerbVerb v x) ;
|
||||
RPredVQ np v x = relVerbClause np v (complQuestVerb v x) ;
|
||||
RPredVA np v x = relVerbClause np v (complAdjVerb v x) ;
|
||||
RPredV2A np v x y = relVerbClause np v (complDitransAdjVerb v x y) ;
|
||||
RPredSubjV2V np v x y = relVerbClause np v (complDitransVerbVerb False v x y) ;
|
||||
RPredObjV2V np v x y = relVerbClause np v (complDitransVerbVerb True v x y) ;
|
||||
RPredV2S np v x y = relVerbClause np v (complDitransSentVerb v x y) ;
|
||||
RPredV2Q np v x y = relVerbClause np v (complDitransQuestVerb v x y) ;
|
||||
|
||||
RPredAP np v = predBeGroupR np v.s ;
|
||||
RPredCN np v = predBeGroupR np (complCommNoun v) ;
|
||||
RPredNP np v = predBeGroupR np (complNounPhrase v) ;
|
||||
RPredAdv np v = predBeGroupR np (complAdverb v) ;
|
||||
|
||||
RPredProgVP np vp = predBeGroupR np (vp.s ! VIPresPart) ;
|
||||
|
||||
IPredV v = predVerbI v (complVerb v) ;
|
||||
IPredPassV v = predVerbI v (passVerb v) ;
|
||||
IPredV2 v x = predVerbI v (complTransVerb v x) ;
|
||||
IPredReflV2 v = predVerbI v (reflTransVerb v) ;
|
||||
IPredV3 v x y = predVerbI v (complDitransVerb v x y) ;
|
||||
IPredVS v x = predVerbI v (complSentVerb v x) ;
|
||||
IPredVV v x = predVerbI (aux2verb v) (complVerbVerb v x) ;
|
||||
IPredVQ v x = predVerbI v (complQuestVerb v x) ;
|
||||
IPredVA v x = predVerbI v (complAdjVerb v x) ;
|
||||
IPredV2A v x y = predVerbI v (complDitransAdjVerb v x y) ;
|
||||
IPredSubjV2V v x y = predVerbI v (complDitransVerbVerb False v x y) ;
|
||||
IPredObjV2V v x y = predVerbI v (complDitransVerbVerb True v x y) ;
|
||||
IPredV2S v x y = predVerbI v (complDitransSentVerb v x y) ;
|
||||
IPredV2Q v x y = predVerbI v (complDitransQuestVerb v x y) ;
|
||||
|
||||
IPredAP v = predBeGroupI v.s ;
|
||||
IPredCN v = predBeGroupI (complCommNoun v) ;
|
||||
IPredNP v = predBeGroupI (complNounPhrase v) ;
|
||||
IPredAdv v = predBeGroupI (complAdverb v) ;
|
||||
|
||||
IPredProgVP vp = predBeGroupI (vp.s ! VIPresPart) ;
|
||||
}
|
||||
5
lib/resource-0.9/english/ClauseEngVP.gf
Normal file
5
lib/resource-0.9/english/ClauseEngVP.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:../abstract:../../prelude
|
||||
--# -opt
|
||||
|
||||
concrete ClauseEngVP of Clause = CategoriesEng **
|
||||
ClauseI with (Rules=RulesEng), (Verbphrase=VerbphraseEng) ;
|
||||
27
lib/resource-0.9/english/CountryEng.gf
Normal file
27
lib/resource-0.9/english/CountryEng.gf
Normal file
@@ -0,0 +1,27 @@
|
||||
concrete CountryEng of Country = open CategoriesEng, ParadigmsEng in {
|
||||
|
||||
lincat
|
||||
Country = PN ;
|
||||
Nationality = A ;
|
||||
Language = N ;
|
||||
|
||||
lin
|
||||
Denmark = regPN "Denmark" nonhuman ;
|
||||
England = regPN "England" nonhuman ;
|
||||
Finland = regPN "Finland" nonhuman ;
|
||||
France = regPN "France" nonhuman ;
|
||||
Germany = regPN "Germany" nonhuman ;
|
||||
Italy = regPN "Italy" nonhuman ;
|
||||
Norway = regPN "Norway" nonhuman ;
|
||||
Russia = regPN "Russia" nonhuman ;
|
||||
Spain = regPN "Spain" nonhuman ;
|
||||
Sweden = regPN "Sweden" nonhuman ;
|
||||
|
||||
Danish = regA "Danish" ;
|
||||
English = regA "English" ;
|
||||
|
||||
DanishLang = regN "Danish" ;
|
||||
EnglishLang = regN "English" ;
|
||||
|
||||
|
||||
} ;
|
||||
9
lib/resource-0.9/english/DemResEng.gf
Normal file
9
lib/resource-0.9/english/DemResEng.gf
Normal file
@@ -0,0 +1,9 @@
|
||||
instance DemResEng of DemRes = open Prelude, ResourceEng, SyntaxEng in {
|
||||
|
||||
oper
|
||||
msS : S -> Str = \x -> x.s ;
|
||||
msQS : QS -> Str = \x -> x.s ! DirQ ;
|
||||
msImp : Imp -> Str = \x -> x.s ! Sg ;
|
||||
|
||||
|
||||
} ;
|
||||
7
lib/resource-0.9/english/DemonstrativeEng.gf
Normal file
7
lib/resource-0.9/english/DemonstrativeEng.gf
Normal file
@@ -0,0 +1,7 @@
|
||||
--# -path=.:../abstract:../../prelude
|
||||
|
||||
concrete DemonstrativeEng of Demonstrative =
|
||||
CategoriesEng ** DemonstrativeI with
|
||||
(Resource = ResourceEng),
|
||||
(Basic = BasicEng),
|
||||
(DemRes = DemResEng) ;
|
||||
43
lib/resource-0.9/english/DeptypEng.gf
Normal file
43
lib/resource-0.9/english/DeptypEng.gf
Normal file
@@ -0,0 +1,43 @@
|
||||
---- to be merged in TypesEng
|
||||
|
||||
resource DeptypEng = open Prelude, TypesEng in {
|
||||
|
||||
param
|
||||
VComp =
|
||||
CVt_
|
||||
| CVt CComp
|
||||
| CVtN CPrep CComp ;
|
||||
|
||||
CComp =
|
||||
CCtN CPrep
|
||||
| CCtS
|
||||
| CCtV
|
||||
| CCtQ
|
||||
| CCtA ;
|
||||
|
||||
CPrep = CP_ | CP_at | CP_in | CP_on | CP_to ;
|
||||
|
||||
oper
|
||||
strCPrep : CPrep -> Str = \p -> case p of {
|
||||
CP_ => [] ;
|
||||
CP_at => "at" ;
|
||||
CP_in => "in" ;
|
||||
CP_on => "on" ;
|
||||
CP_to => "to"
|
||||
} ;
|
||||
|
||||
cprep1, cprep2 : VComp -> Str -> Str ;
|
||||
|
||||
cprep1 c s = case c of {
|
||||
CVt (CCtN cp) => strCPrep cp ++ s ;
|
||||
CVtN cp _ => strCPrep cp ++ s ;
|
||||
_ => s
|
||||
} ;
|
||||
|
||||
cprep2 c s = case c of {
|
||||
CVtN _ (CCtN cp) => strCPrep cp ++ s ;
|
||||
_ => s
|
||||
} ;
|
||||
|
||||
|
||||
}
|
||||
26
lib/resource-0.9/english/LangEng.gf
Normal file
26
lib/resource-0.9/english/LangEng.gf
Normal file
@@ -0,0 +1,26 @@
|
||||
--# -path=.:../abstract:../../prelude
|
||||
|
||||
-- # -path=.:resource/english:resource/abstract:prelude
|
||||
|
||||
concrete LangEng of Lang =
|
||||
RulesEng,
|
||||
ClauseEng,
|
||||
StructuralEng,
|
||||
BasicEng,
|
||||
TimeEng,
|
||||
CountryEng,
|
||||
MathEng
|
||||
|
||||
** open Prelude, ParadigmsEng in {
|
||||
|
||||
lin
|
||||
AdvDate d = prefixSS "on" d ;
|
||||
AdvTime t = prefixSS "at" t ;
|
||||
NWeekday w = w ;
|
||||
PNWeekday w = nounPN w ;
|
||||
|
||||
PNCountry x = x ;
|
||||
ANationality x = x ;
|
||||
NLanguage x = x ;
|
||||
|
||||
}
|
||||
6
lib/resource-0.9/english/LangVPEng.gf
Normal file
6
lib/resource-0.9/english/LangVPEng.gf
Normal file
@@ -0,0 +1,6 @@
|
||||
--# -path=.:../abstract:../../prelude
|
||||
|
||||
concrete LangVPEng of LangVP =
|
||||
LangEng,
|
||||
VerbphraseEng,
|
||||
** {} ;
|
||||
43
lib/resource-0.9/english/MathEng.gf
Normal file
43
lib/resource-0.9/english/MathEng.gf
Normal file
@@ -0,0 +1,43 @@
|
||||
--# -path=.:../abstract:../../prelude
|
||||
|
||||
concrete MathEng of Math = CategoriesEng ** open Prelude, SyntaxEng, ParadigmsEng in {
|
||||
|
||||
lin
|
||||
SymbPN i = {s = \\c => caseSymb c i.s ; g = Neutr} ;
|
||||
IntPN i = {s = \\c => caseSymb c i.s ; g = Neutr} ;
|
||||
IntNP cn i = nameNounPhrase {
|
||||
s = \\c => (cn.s ! Sg ! Nom ++ caseSymb c i.s) ;
|
||||
g = Neutr
|
||||
} ;
|
||||
|
||||
IndefSymbNumNP nu cn xs =
|
||||
addSymbNounPhrase (indefNounPhraseNum plural nu cn) xs.s ;
|
||||
DefSymbNumNP nu cn xs =
|
||||
addSymbNounPhrase (defNounPhraseNum plural nu cn) xs.s ;
|
||||
NDetSymbNP det nu cn xs =
|
||||
addSymbNounPhrase (numDetNounPhrase det nu cn) xs.s ;
|
||||
|
||||
lincat
|
||||
SymbList = SS ;
|
||||
|
||||
lin
|
||||
SymbTwo = infixSS "and" ;
|
||||
SymbMore = infixSS "," ;
|
||||
|
||||
LetImp x np = {s = \\_ => "let" ++ x.s ! NomP ++ "be" ++ np.s ! NomP} ;
|
||||
ExistNP np = predVerbClause
|
||||
(nameNounPhraseN (fromAgr np.a).n (nameReg "there" Neutr))
|
||||
(regV "exist")
|
||||
(complNounPhrase np) ;
|
||||
|
||||
-- Moved from $RulesEng$.
|
||||
|
||||
SymbCN cn s =
|
||||
{s = \\n,c => cn.s ! n ! Nom ++ caseSymb c s.s ;
|
||||
g = cn.g} ;
|
||||
IntCN cn s =
|
||||
{s = \\n,c => cn.s ! n ! Nom ++ caseSymb c s.s ;
|
||||
g = cn.g} ;
|
||||
|
||||
|
||||
}
|
||||
34
lib/resource-0.9/english/MinimalEng.gf
Normal file
34
lib/resource-0.9/english/MinimalEng.gf
Normal file
@@ -0,0 +1,34 @@
|
||||
--# -path=.:../abstract:../../prelude
|
||||
|
||||
concrete MinimalEng of Minimal = CategoriesEng ** open ParadigmsEng in {
|
||||
|
||||
flags
|
||||
optimize=all ;
|
||||
|
||||
lin
|
||||
man_N = mk2N "man" "men" ;
|
||||
wine_N = regN "wine" ;
|
||||
mother_N2 = regN2 "mother" ;
|
||||
distance_N3 = mkN3 (regN "distance") "from" "to" ;
|
||||
john_PN = regPN "John" masculine ;
|
||||
blue_ADeg = regADeg "blue" ;
|
||||
american_A = regA "american" ;
|
||||
married_A2 = mkA2 (regA "married") "to" ;
|
||||
probable_AS = mkAS (regA "probable") ;
|
||||
important_A2S = mkA2S (regA "important") "to" ;
|
||||
easy_A2V = mkA2V (regA "easy") "for" ;
|
||||
now_Adv = mkAdv "now" ;
|
||||
walk_V = (regV "walk") ;
|
||||
love_V2 = dirV2 (regV "love") ;
|
||||
give_V3 = dirV3 (irregV "give" "gave" "given") "to" ;
|
||||
believe_VS = mkVS (regV "believe") ;
|
||||
try_VV = mkVV (regV "try") ;
|
||||
wonder_VQ = mkVQ (regV "wonder") ;
|
||||
become_VA = mkVA (irregV "become" "became" "become") ;
|
||||
paint_V2A = mkV2A (regV "paint") [] ;
|
||||
promise_V2V = mkV2V (regV "promise") [] "to" ;
|
||||
ask_V2Q = mkV2Q (regV "ask") [] ;
|
||||
tell_V2S = mkV2S (irregV "tell" "told" "told") [] ;
|
||||
rain_V0 = mkV0 (regV "rain") ;
|
||||
|
||||
} ;
|
||||
52
lib/resource-0.9/english/MkVerbs.hs
Normal file
52
lib/resource-0.9/english/MkVerbs.hs
Normal file
@@ -0,0 +1,52 @@
|
||||
module Main where
|
||||
|
||||
import List
|
||||
|
||||
-- create a GF file from a word form list:
|
||||
-- one entry per line, newline or tab separated;
|
||||
-- variants separated by /
|
||||
-- comments are lines starting with --
|
||||
-- example line: bid bid/bade bid/bidden
|
||||
-- example resource: http://www2.gsu.edu/~wwwesl/egw/verbs.htm
|
||||
|
||||
-- parameters, depending on language
|
||||
|
||||
infile = "norwegian/web2.txt"
|
||||
outfile = "Verbs.gf"
|
||||
preamble = ""
|
||||
{-
|
||||
"resource VerbsEng = open ResourceEng, MorphoEng in {\n" ++
|
||||
" oper vIrreg : Str -> Str -> Str -> V = \\x,y,z ->\n" ++
|
||||
" mkVerbIrreg x y z ** {s1 = [] ; lock_V = <>} ;\n\n"
|
||||
-}
|
||||
oper = "irregV"
|
||||
cat = "V"
|
||||
name s = s ++ "_V"
|
||||
|
||||
ending = "}\n"
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
ss <- readFile infile >>= return . filter (not . null) . lines
|
||||
writeFile outfile preamble
|
||||
mapM_ (appendFile outfile . mkOne . words) (filter notComment ss)
|
||||
appendFile outfile ending
|
||||
|
||||
notComment = (/="--") . take 2
|
||||
|
||||
mkOne :: [String] -> String
|
||||
mkOne ws@(v:_) =
|
||||
" fun " ++ name v ++ " : " ++ cat ++ " ;\n" ++
|
||||
" lin " ++ name v ++ " : " ++ cat ++ " = " ++
|
||||
oper ++ " " ++ unwords (map arg ws) ++ " ;\n"
|
||||
where
|
||||
arg w = case variants w of
|
||||
[s] -> quote s
|
||||
vs -> "(variants {" ++
|
||||
unwords (intersperse ";" (map quote vs)) ++ "})"
|
||||
quote s = "\"" ++ s ++ "\""
|
||||
variants = chopBy '/'
|
||||
|
||||
chopBy c s = case span (/= c) s of
|
||||
(w1,_:w2) -> w1 : chopBy c w2
|
||||
(w1,_) -> [w1]
|
||||
341
lib/resource-0.9/english/MorphoEng.gf
Normal file
341
lib/resource-0.9/english/MorphoEng.gf
Normal file
@@ -0,0 +1,341 @@
|
||||
--# -path=.:../../prelude
|
||||
|
||||
--1 A Simple English Resource Morphology
|
||||
--
|
||||
-- Aarne Ranta 2002
|
||||
--
|
||||
-- This resource morphology contains definitions needed in the resource
|
||||
-- syntax. It moreover contains the most usual inflectional patterns.
|
||||
--
|
||||
-- We use the parameter types and word classes defined in $Types.gf$.
|
||||
|
||||
resource MorphoEng = TypesEng ** open Prelude, (Predef=Predef) in {
|
||||
|
||||
--2 Phonology
|
||||
--
|
||||
-- To regulate the use of endings for both nouns, adjectives, and verbs:
|
||||
|
||||
oper
|
||||
y2ie : Str -> Str -> Str = \fly,s ->
|
||||
let y = last (init fly) in
|
||||
case y of {
|
||||
"a" => fly + s ;
|
||||
"e" => fly + s ;
|
||||
"o" => fly + s ;
|
||||
"u" => fly + s ;
|
||||
_ => init fly + "ie" + s
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
--2 Nouns
|
||||
--
|
||||
-- For conciseness and abstraction, we define a worst-case macro for
|
||||
-- noun inflection. It is used for defining special case that
|
||||
-- only need one string as argument.
|
||||
|
||||
oper
|
||||
mkNoun : (_,_,_,_ : Str) -> CommonNoun =
|
||||
\man,men, mans, mens -> {s = table {
|
||||
Sg => table {Nom => man ; Gen => mans} ;
|
||||
Pl => table {Nom => men ; Gen => mens}
|
||||
}} ;
|
||||
|
||||
nounReg : Str -> CommonNoun = \dog ->
|
||||
mkNoun dog (dog + "s") (dog + "'s") (dog + "s'");
|
||||
|
||||
nounS : Str -> CommonNoun = \kiss ->
|
||||
mkNoun kiss (kiss + "es") (kiss + "'s") (kiss + "es'") ;
|
||||
|
||||
nounY : Str -> CommonNoun = \fl ->
|
||||
mkNoun (fl + "y") (fl + "ies") (fl + "y's") (fl + "ies'") ;
|
||||
|
||||
nounGen : Str -> CommonNoun = \dog -> case last dog of {
|
||||
"y" => nounY "dog" ;
|
||||
"s" => nounS (init "dog") ;
|
||||
_ => nounReg "dog"
|
||||
} ;
|
||||
|
||||
--3 Proper names
|
||||
--
|
||||
-- Regular proper names are inflected with "'s" in the genitive.
|
||||
|
||||
nameReg : Str -> Gender -> ProperName = \john,g ->
|
||||
{s = table {Nom => john ; Gen => john + "'s"} ; g = g} ;
|
||||
|
||||
|
||||
--2 Pronouns
|
||||
--
|
||||
-- Here we define personal and relative pronouns.
|
||||
|
||||
mkPronoun : (_,_,_,_ : Str) -> Number -> Person -> Gender -> Pronoun =
|
||||
\I,me,my,mine,n,p,g ->
|
||||
{s = table {NomP => I ; AccP => me ; GenP => my ; GenSP => mine} ;
|
||||
n = n ; p = p ; g = g} ;
|
||||
|
||||
human : Gender = Masc ; --- doesn't matter
|
||||
|
||||
pronI = mkPronoun "I" "me" "my" "mine" Sg P1 human ;
|
||||
pronYouSg = mkPronoun "you" "you" "your" "yours" Sg P2 human ; -- verb form still OK
|
||||
pronHe = mkPronoun "he" "him" "his" "his" Sg P3 Masc ;
|
||||
pronShe = mkPronoun "she" "her" "her" "hers" Sg P3 Fem ;
|
||||
pronIt = mkPronoun "it" "it" "its" "it" Sg P3 Neutr ;
|
||||
|
||||
pronWe = mkPronoun "we" "us" "our" "ours" Pl P1 human ;
|
||||
pronYouPl = mkPronoun "you" "you" "your" "yours" Pl P2 human ;
|
||||
pronThey = mkPronoun "they" "them" "their" "theirs" Pl P3 human ; ---
|
||||
|
||||
-- Relative pronouns in the accusative have the 'no pronoun' variant.
|
||||
-- The simple pronouns do not really depend on number.
|
||||
|
||||
relPron : RelPron = {s = table {
|
||||
Neutr => \\_ => table {
|
||||
NomP => variants {"that" ; "which"} ;
|
||||
AccP => variants {"that" ; "which" ; []} ;
|
||||
GenP => variants {"whose"} ;
|
||||
GenSP => variants {"which"}
|
||||
} ;
|
||||
_ => \\_ => table {
|
||||
NomP => variants {"that" ; "who"} ;
|
||||
AccP => variants {"that" ; "who" ; "whom" ; []} ;
|
||||
GenP => variants {"whose"} ;
|
||||
GenSP => variants {"whom"}
|
||||
}
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
--3 Determiners
|
||||
--
|
||||
-- We have just a heuristic definition of the indefinite article.
|
||||
-- There are lots of exceptions: consonantic "e" ("euphemism"), consonantic
|
||||
-- "o" ("one-sided"), vocalic "u" ("umbrella").
|
||||
|
||||
artIndef = pre {"a" ;
|
||||
"an" / strs {"a" ; "e" ; "i" ; "o" ; "A" ; "E" ; "I" ; "O" }} ;
|
||||
|
||||
artDef = "the" ;
|
||||
|
||||
--2 Adjectives
|
||||
--
|
||||
-- To form the adjectival and the adverbial forms, two strings are needed
|
||||
-- in the worst case.
|
||||
|
||||
mkAdjective : Str -> Str -> Adjective = \free,freely -> {
|
||||
s = table {
|
||||
AAdj => free ;
|
||||
AAdv => freely
|
||||
}
|
||||
} ;
|
||||
|
||||
-- However, the ending "iy" is sufficient for most cases. This function
|
||||
-- automatically changes the word-final "y" to "i" ("happy" - "happily").
|
||||
-- N.B. this is not correct for "shy", but $mkAdjective$ has to be used.
|
||||
|
||||
regAdjective : Str -> Adjective = \free ->
|
||||
let
|
||||
y = Predef.dp 1 free
|
||||
in mkAdjective
|
||||
free
|
||||
(ifTok Str y "y" (Predef.tk 1 free + ("ily")) (free + "ly")) ;
|
||||
|
||||
-- For the comparison of adjectives, six forms are needed to cover all cases.
|
||||
-- But there is no adjective that actually needs all these.
|
||||
|
||||
mkAdjDegrWorst : (_,_,_,_,_,_ : Str) -> AdjDegr =
|
||||
\good,well,better,betterly,best,bestly ->
|
||||
{s = table {
|
||||
Pos => (mkAdjective good well).s ;
|
||||
Comp => (mkAdjective better betterly).s ;
|
||||
Sup => (mkAdjective best bestly).s
|
||||
}
|
||||
} ;
|
||||
|
||||
-- What is usually needed for irregular comparisons are just three forms,
|
||||
-- since the adverbial form is the same (in comparative or superlative)
|
||||
-- or formed in the regular way (positive).
|
||||
|
||||
adjDegrIrreg : (_,_,_ : Str) -> AdjDegr = \bad,worse,worst ->
|
||||
let badly = (regAdjective bad).s ! AAdv
|
||||
in mkAdjDegrWorst bad badly worse worse worst worst ;
|
||||
|
||||
-- Like above, the regular formation takes account of final "y".
|
||||
|
||||
adjDegrReg : Str -> AdjDegr = \happy ->
|
||||
let happi = ifTok Str (Predef.dp 1 happy) "y" (Predef.tk 1 happy + "i") happy
|
||||
in adjDegrIrreg happy (happi + "er") (happi + "est") ;
|
||||
|
||||
-- Many adjectives are 'inflected' by adding a comparison word.
|
||||
|
||||
adjDegrLong : Str -> AdjDegr = \ridiculous ->
|
||||
adjDegrIrreg ridiculous ("more" ++ ridiculous) ("most" ++ ridiculous) ;
|
||||
|
||||
|
||||
--3 Verbs
|
||||
--
|
||||
-- Except for "be", the worst case needs four forms.
|
||||
|
||||
mkVerbP3worst : (_,_,_,_,_: Str) -> VerbP3 = \go,goes,went,gone,going ->
|
||||
{s = table {
|
||||
InfImp => go ;
|
||||
Indic Sg => goes ;
|
||||
Indic _ => go ;
|
||||
Pastt => went ;
|
||||
PPart => gone ;
|
||||
PresPart => going
|
||||
}
|
||||
} ;
|
||||
|
||||
mkVerbP3 : (_,_,_,_: Str) -> VerbP3 = \go,goes,went,gone ->
|
||||
let going = case last go of {
|
||||
"e" => init go + "ing" ;
|
||||
_ => go + "ing"
|
||||
}
|
||||
in
|
||||
mkVerbP3worst go goes went gone going ;
|
||||
|
||||
-- This is what we use to derive the irregular forms in almost all cases
|
||||
|
||||
mkVerbIrreg : (_,_,_ : Str) -> VerbP3 = \bite,bit,bitten ->
|
||||
let bites = case last bite of {
|
||||
"y" => y2ie bite "s" ;
|
||||
"s" => init bite + "es" ;
|
||||
_ => bite + "s"
|
||||
}
|
||||
in mkVerbP3 bite bites bit bitten ;
|
||||
|
||||
-- This is used to derive regular forms.
|
||||
|
||||
mkVerbReg : Str -> VerbP3 = \soak ->
|
||||
let
|
||||
soaks = case last soak of {
|
||||
"y" => y2ie soak "s" ;
|
||||
"s" => init soak + "es" ;
|
||||
_ => soak + "s"
|
||||
} ;
|
||||
soaked = case last soak of {
|
||||
"e" => init soak + "s" ;
|
||||
_ => soak + "ed"
|
||||
}
|
||||
in
|
||||
mkVerbP3 soak soaks soaked soaked ;
|
||||
|
||||
mkVerb : (_,_,_ : Str) -> VerbP3 = \ring,rang,rung ->
|
||||
mkVerbP3 ring (ring + "s") rang rung ;
|
||||
|
||||
regVerbP3 : Str -> VerbP3 = \walk ->
|
||||
mkVerb walk (walk + "ed") (walk + "ed") ;
|
||||
|
||||
verbP3s : Str -> VerbP3 = \kiss ->
|
||||
mkVerbP3 kiss (kiss + "es") (kiss + "ed") (kiss + "ed") ;
|
||||
|
||||
verbP3e : Str -> VerbP3 = \love ->
|
||||
mkVerbP3 love (love + "s") (love + "d") (love + "d") ;
|
||||
|
||||
verbP3y : Str -> VerbP3 = \cr ->
|
||||
mkVerbP3 (cr + "y") (cr + "ies") (cr + "ied") (cr + "ied") ;
|
||||
|
||||
verbGen : Str -> VerbP3 = \kill -> case last kill of {
|
||||
"y" => verbP3y (init kill) ;
|
||||
"e" => verbP3y (init kill) ;
|
||||
"s" => verbP3s (init kill) ;
|
||||
_ => regVerbP3 kill
|
||||
} ;
|
||||
|
||||
verbP3Have = mkVerbP3 "have" "has" "had" "had" ;
|
||||
|
||||
verbP3Do = mkVerbP3 "do" "does" "did" "done" ;
|
||||
|
||||
auxVerbBe : AuxVerb = {s = table {
|
||||
AInfImp => "be" ;
|
||||
AIndic P1 b => if_then_Str b "am" ["am not"] ;
|
||||
AIndic P2 b => negAux b "are" ;
|
||||
AIndic P3 b => negAux b "is" ;
|
||||
APastt Sg b => negAux b "was" ;
|
||||
APastt Pl b => negAux b "were" ;
|
||||
APPart => "been" ;
|
||||
APresPart => "being"
|
||||
}
|
||||
} ;
|
||||
|
||||
-- The negative forms are not used;
|
||||
--- the particle $want.s1$ disappears - is it ever needed?
|
||||
|
||||
verb2aux : Verb -> AuxVerb = \want -> {s = table {
|
||||
AInfImp => want.s ! InfImp ;
|
||||
AIndic P3 b => want.s ! Indic Sg ;
|
||||
AIndic _ b => want.s ! Indic Pl ;
|
||||
APastt _ b => want.s ! Pastt ;
|
||||
APPart => want.s ! PPart ;
|
||||
APresPart => want.s ! PresPart
|
||||
}
|
||||
} ;
|
||||
|
||||
aux2verb : AuxVerb -> Verb = \want -> {s = table {
|
||||
InfImp => want.s ! AInfImp ;
|
||||
Indic Sg => want.s ! AIndic P3 True ;
|
||||
Indic _ => want.s ! AIndic P2 True ;
|
||||
Pastt => want.s ! APastt Pl True ;
|
||||
PPart => want.s ! APPart ;
|
||||
PresPart => want.s ! APresPart
|
||||
} ;
|
||||
s1 = []
|
||||
} ;
|
||||
|
||||
-- The three most important example auxiliaries.
|
||||
|
||||
mkVerbAux : (_,_,_,_: Str) -> AuxVerb = \beable, can, could, beenable ->
|
||||
{s = table {
|
||||
AInfImp => beable ;
|
||||
AIndic _ b => negAux b can ;
|
||||
APastt _ b => negAux b could ;
|
||||
APPart => beenable ;
|
||||
APrepPart => nonExist ---- fix!
|
||||
} ;
|
||||
} ;
|
||||
|
||||
|
||||
verbPart : VerbP3 -> Particle -> Verb = \v,p ->
|
||||
v ** {s1 = p} ;
|
||||
|
||||
verbNoPart : VerbP3 -> Verb = \v -> verbPart v [] ;
|
||||
|
||||
negAux : Bool -> Str -> Str = \b,is -> if_then_Str b is (is + "n't") ;
|
||||
|
||||
-- The optional negation contraction is a useful macro e.g. for "do".
|
||||
|
||||
contractNot : Str -> Str = \is -> variants {is ++ "not" ; is + "n't"} ;
|
||||
|
||||
dont = contractNot (verbP3Do.s ! InfImp) ;
|
||||
|
||||
-- From $numerals$.
|
||||
|
||||
param
|
||||
DForm = unit | teen | ten ;
|
||||
CardOrd = NCard | NOrd ;
|
||||
|
||||
oper
|
||||
mkNum : Str -> Str -> Str -> Str -> {s : DForm => CardOrd => Str} =
|
||||
\two -> \twelve -> \twenty -> \second ->
|
||||
{s = table {
|
||||
unit => table {NCard => two ; NOrd => second} ;
|
||||
teen => \\c => mkCard c twelve ;
|
||||
ten => \\c => mkCard c twenty
|
||||
}
|
||||
} ;
|
||||
|
||||
regNum : Str -> {s : DForm => CardOrd => Str} =
|
||||
\six -> mkNum six (six + "teen") (six + "ty") (regOrd six) ;
|
||||
|
||||
regCardOrd : Str -> {s : CardOrd => Str} = \ten ->
|
||||
{s = table {NCard => ten ; NOrd => regOrd ten}} ;
|
||||
|
||||
mkCard : CardOrd -> Str -> Str = \c,ten -> (regCardOrd ten).s ! c ;
|
||||
|
||||
regOrd : Str -> Str = \ten -> case last ten of {
|
||||
"y" => init ten + "ieth" ;
|
||||
_ => ten + "th"
|
||||
} ;
|
||||
|
||||
} ;
|
||||
|
||||
8
lib/resource-0.9/english/MultimodalEng.gf
Normal file
8
lib/resource-0.9/english/MultimodalEng.gf
Normal file
@@ -0,0 +1,8 @@
|
||||
--# -path=.:../abstract:../../prelude
|
||||
|
||||
concrete MultimodalEng of Multimodal =
|
||||
RulesEng, StructuralEng, BasicEng, TimeEng, DemonstrativeEng ** MultimodalI with
|
||||
(Resource = ResourceEng),
|
||||
(Basic = BasicEng),
|
||||
(Lang = LangEng),
|
||||
(DemRes = DemResEng) ;
|
||||
45
lib/resource-0.9/english/NumeralsEng.gf
Normal file
45
lib/resource-0.9/english/NumeralsEng.gf
Normal file
@@ -0,0 +1,45 @@
|
||||
concrete NumeralsEng of Numerals = open Prelude, MorphoEng in {
|
||||
|
||||
lincat Numeral = {s : CardOrd => Str ; n : Number} ;
|
||||
lincat Digit = {s : DForm => CardOrd => Str} ;
|
||||
lincat
|
||||
Sub10 = {s : DForm => CardOrd => Str ; n : Number} ;
|
||||
Sub100 = {s : CardOrd => Str ; n : Number} ;
|
||||
Sub1000 = {s : CardOrd => Str ; n : Number} ;
|
||||
Sub1000000 = {s : CardOrd => Str ; n : Number} ;
|
||||
|
||||
lin num x = x ;
|
||||
lin n2 = let two = mkNum "two" "twelve" "twenty" "second" in
|
||||
{s = \\f,c => case <f,c> of {
|
||||
<teen,NOrd> => "twelfth" ;
|
||||
_ => two.s ! f ! c
|
||||
}
|
||||
} ;
|
||||
|
||||
lin n3 = mkNum "three" "thirteen" "thirty" "third" ;
|
||||
lin n4 = mkNum "four" "fourteen" "forty" "fourth" ;
|
||||
lin n5 = mkNum "five" "fifteen" "fifty" "fifth" ;
|
||||
lin n6 = regNum "six" ;
|
||||
lin n7 = regNum "seven" ;
|
||||
lin n8 = mkNum "eight" "eighteen" "eighty" "eighth" ;
|
||||
lin n9 = regNum "nine" ;
|
||||
|
||||
lin pot01 = mkNum "one" "eleven" "ten" "first" ** {n = Sg} ;
|
||||
lin pot0 d = d ** {n = Pl} ;
|
||||
lin pot110 = regCardOrd "ten" ** {n = Pl} ;
|
||||
lin pot111 = regCardOrd "eleven" ** {n = Pl} ;
|
||||
lin pot1to19 d = {s = d.s ! teen} ** {n = Pl} ;
|
||||
lin pot0as1 n = {s = n.s ! unit} ** {n = n.n} ;
|
||||
lin pot1 d = {s = d.s ! ten} ** {n = Pl} ;
|
||||
lin pot1plus d e = {
|
||||
s = \\c => d.s ! ten ! NCard ++ "-" ++ e.s ! unit ! c ; n = Pl} ;
|
||||
lin pot1as2 n = n ;
|
||||
lin pot2 d = {s = \\c => d.s ! unit ! NCard ++ mkCard c "hundred"} ** {n = Pl} ;
|
||||
lin pot2plus d e = {
|
||||
s = \\c => d.s ! unit ! NCard ++ "hundred" ++ "and" ++ e.s ! c ; n = Pl} ;
|
||||
lin pot2as3 n = n ;
|
||||
lin pot3 n = {
|
||||
s = \\c => n.s ! NCard ++ mkCard c "thousand" ; n = Pl} ;
|
||||
lin pot3plus n m = {
|
||||
s = \\c => n.s ! NCard ++ "thousand" ++ m.s ! c ; n = Pl} ;
|
||||
}
|
||||
300
lib/resource-0.9/english/OldParadigmsEng.gf
Normal file
300
lib/resource-0.9/english/OldParadigmsEng.gf
Normal file
@@ -0,0 +1,300 @@
|
||||
--# -path=.:../abstract:../../prelude
|
||||
|
||||
--1 English Lexical Paradigms
|
||||
--
|
||||
-- Aarne Ranta 2003
|
||||
--
|
||||
-- This is an API to the user of the resource grammar
|
||||
-- for adding lexical items. It give shortcuts for forming
|
||||
-- expressions of basic categories: nouns, adjectives, verbs.
|
||||
--
|
||||
-- Closed categories (determiners, pronouns, conjunctions) are
|
||||
-- accessed through the resource syntax API, $Structural.gf$.
|
||||
--
|
||||
-- The main difference with $MorphoEng.gf$ is that the types
|
||||
-- referred to are compiled resource grammar types. We have moreover
|
||||
-- had the design principle of always having existing forms, rather
|
||||
-- than stems, as string
|
||||
-- arguments of the paradigms.
|
||||
--
|
||||
-- The following modules are presupposed:
|
||||
|
||||
resource OldParadigmsEng = open (Predef=Predef), Prelude, SyntaxEng, ResourceEng in {
|
||||
|
||||
--2 Parameters
|
||||
--
|
||||
-- To abstract over gender names, we define the following identifiers.
|
||||
|
||||
oper
|
||||
Gender : Type ;
|
||||
|
||||
human : Gender ;
|
||||
nonhuman : Gender ;
|
||||
|
||||
-- To abstract over number names, we define the following.
|
||||
Number : Type ;
|
||||
|
||||
singular : Number ;
|
||||
plural : Number ;
|
||||
|
||||
-- To abstract over case names, we define the following.
|
||||
Case : Type ;
|
||||
|
||||
nominative : Case ;
|
||||
genitive : Case ;
|
||||
|
||||
|
||||
--2 Nouns
|
||||
|
||||
-- Worst case: give all four forms and the semantic gender.
|
||||
-- In practice the worst case is just: give singular and plural nominative.
|
||||
|
||||
oper
|
||||
mkN : (man,men,man's,men's : Str) -> Gender -> N ;
|
||||
nMan : (man,men : Str) -> Gender -> N ;
|
||||
|
||||
-- Regular nouns, nouns ending with "s", "y", or "o", and nouns with the same
|
||||
-- plural form as the singular.
|
||||
|
||||
nReg : Str -> Gender -> N ; -- dog, dogs
|
||||
nKiss : Str -> Gender -> N ; -- kiss, kisses
|
||||
nFly : Str -> Gender -> N ; -- fly, flies
|
||||
nHero : Str -> Gender -> N ; -- hero, heroes (= nKiss !)
|
||||
nSheep : Str -> Gender -> N ; -- sheep, sheep
|
||||
|
||||
-- These use general heuristics, that recognizes the last letter. *N.B* it
|
||||
-- does not get right with "boy", "rush", since it only looks at one letter.
|
||||
|
||||
nHuman : Str -> N ; -- gambler/actress/nanny
|
||||
nNonhuman : Str -> N ; -- dog/kiss/fly
|
||||
|
||||
-- Nouns used as functions need a preposition. The most common is "of".
|
||||
|
||||
mkN2 : N -> Preposition -> N2 ;
|
||||
|
||||
funHuman : Str -> N2 ; -- the father/mistress/daddy of
|
||||
funNonhuman : Str -> N2 ; -- the successor/address/copy of
|
||||
|
||||
-- Proper names, with their regular genitive.
|
||||
|
||||
pnReg : (John : Str) -> PN ; -- John, John's
|
||||
|
||||
-- The most common cases on the higher-level category $CN$ have shortcuts.
|
||||
-- The regular "y"/"s" variation is taken into account.
|
||||
|
||||
cnNonhuman : Str -> CN ;
|
||||
cnHuman : Str -> CN ;
|
||||
npReg : Str -> NP ;
|
||||
|
||||
-- In some cases, you may want to make a complex $CN$ into a function.
|
||||
|
||||
mkN2CN : CN -> Preposition -> N2 ;
|
||||
funOfCN : CN -> N2 ;
|
||||
|
||||
|
||||
--2 Adjectives
|
||||
|
||||
-- Non-comparison one-place adjectives just have one form.
|
||||
|
||||
mkA : (even : Str) -> A ;
|
||||
|
||||
-- Two-place adjectives need a preposition as second argument.
|
||||
|
||||
mkA2 : (divisible, by : Str) -> A2 ;
|
||||
|
||||
-- Comparison adjectives have three forms. The common irregular
|
||||
-- cases are ones ending with "y" and a consonant that is duplicated;
|
||||
-- the "y" ending is recognized by the function $aReg$.
|
||||
|
||||
mkADeg : (good,better,best : Str) -> ADeg ;
|
||||
|
||||
aReg : (long : Str) -> ADeg ; -- long, longer, longest
|
||||
aFat : (fat : Str) -> ADeg ; -- fat, fatter, fattest
|
||||
aRidiculous : (ridiculous : Str) -> ADeg ; -- -/more/most ridiculous
|
||||
|
||||
-- On higher level, there are adjectival phrases. The most common case is
|
||||
-- just to use a one-place adjective.
|
||||
|
||||
apReg : Str -> AP ;
|
||||
|
||||
--2 Adverbs
|
||||
|
||||
-- Adverbs are not inflected. Most lexical ones have position not
|
||||
-- before the verb. Some can be preverbal (e.g. "always").
|
||||
|
||||
mkAdv : Str -> Adv ;
|
||||
mkAdvPre : Str -> Adv ;
|
||||
|
||||
-- Adverbs modifying adjectives and sentences can also be formed.
|
||||
|
||||
mkAdA : Str -> AdA ;
|
||||
mkAdC : Str -> AdC ;
|
||||
|
||||
-- Prepositional phrases are another productive form of adverbials.
|
||||
|
||||
mkPP : Str -> NP -> Adv ;
|
||||
|
||||
--2 Verbs
|
||||
--
|
||||
-- The fragment now has all verb forms, except the gerund/present participle.
|
||||
-- Except for "be", the worst case needs four forms: the infinitive and
|
||||
-- the third person singular present, the past indicative, and the past participle.
|
||||
|
||||
mkV : (go, goes, went, gone : Str) -> V ;
|
||||
|
||||
vReg : (walk : Str) -> V ; -- walk, walks
|
||||
vKiss : (kiss : Str) -> V ; -- kiss, kisses
|
||||
vFly : (fly : Str) -> V ; -- fly, flies
|
||||
vGo : (go : Str) -> V ; -- go, goes (= vKiss !)
|
||||
|
||||
-- This generic function recognizes the special cases where the last
|
||||
-- character is "y", "s", or "z". It is not right for "finish" and "convey".
|
||||
|
||||
vGen : Str -> V ; -- walk/kiss/fly
|
||||
|
||||
-- The verbs "be" and "have" are special.
|
||||
|
||||
---- vBe : V ;
|
||||
vHave : V ;
|
||||
|
||||
-- Verbs with a particle.
|
||||
|
||||
vPart : (go, goes, went, gone, up : Str) -> V ;
|
||||
vPartReg : (get, up : Str) -> V ;
|
||||
|
||||
-- Two-place verbs, and the special case with direct object.
|
||||
-- Notice that a particle can already be included in $V$.
|
||||
|
||||
mkV2 : V -> Str -> V2 ; -- look for, kill
|
||||
|
||||
tvGen : (look, for : Str) -> V2 ; -- look for, talk about
|
||||
tvDir : V -> V2 ; -- switch off
|
||||
tvGenDir : (kill : Str) -> V2 ; -- kill
|
||||
|
||||
-- Regular two-place verbs with a particle.
|
||||
|
||||
tvPartReg : Str -> Str -> Str -> V2 ; -- get, along, with
|
||||
|
||||
-- Ditransitive verbs.
|
||||
|
||||
mkV3 : V -> Str -> Str -> V3 ; -- speak, with, about
|
||||
v3Dir : V -> Str -> V3 ; -- give,_,to
|
||||
v3DirDir : V -> V3 ; -- give,_,_
|
||||
|
||||
-- The definitions should not bother the user of the API. So they are
|
||||
-- hidden from the document.
|
||||
--.
|
||||
|
||||
Gender = SyntaxEng.Gender ;
|
||||
Number = SyntaxEng.Number ;
|
||||
Case = SyntaxEng.Case ;
|
||||
human = Masc ;
|
||||
nonhuman = Neutr ;
|
||||
singular = Sg ;
|
||||
plural = Pl ;
|
||||
|
||||
nominative = Nom ;
|
||||
genitive = Nom ;
|
||||
|
||||
mkN = \man,men,man's,men's,g ->
|
||||
mkNoun man men man's men's ** {g = g ; lock_N = <>} ;
|
||||
nReg a g = addGenN nounReg a g ;
|
||||
nKiss n g = addGenN nounS n g ;
|
||||
nFly = \fly -> addGenN nounY (Predef.tk 1 fly) ;
|
||||
nMan = \man,men -> mkN man men (man + "'s") (men + "'s") ;
|
||||
nHero = nKiss ;
|
||||
nSheep = \sheep -> nMan sheep sheep ;
|
||||
|
||||
nHuman = \s -> nGen s human ;
|
||||
nNonhuman = \s -> nGen s nonhuman ;
|
||||
|
||||
nGen : Str -> Gender -> N = \fly,g -> let {
|
||||
fl = Predef.tk 1 fly ;
|
||||
y = Predef.dp 1 fly ;
|
||||
eqy = ifTok (Str -> Gender -> N) y
|
||||
} in
|
||||
eqy "y" nFly (
|
||||
eqy "s" nKiss (
|
||||
eqy "z" nKiss (
|
||||
nReg))) fly g ;
|
||||
|
||||
mkN2 = \n,p -> n ** {lock_N2 = <> ; s2 = p} ;
|
||||
funNonhuman = \s -> mkN2 (nNonhuman s) "of" ;
|
||||
funHuman = \s -> mkN2 (nHuman s) "of" ;
|
||||
|
||||
pnReg n = nameReg n human ** {lock_PN = <>} ;
|
||||
|
||||
cnNonhuman = \s -> UseN (nGen s nonhuman) ;
|
||||
cnHuman = \s -> UseN (nGen s human) ;
|
||||
npReg = \s -> UsePN (pnReg s) ;
|
||||
|
||||
mkN2CN = \n,p -> n ** {lock_N2 = <> ; s2 = p} ;
|
||||
funOfCN = \n -> mkN2CN n "of" ;
|
||||
|
||||
addGenN : (Str -> CommonNoun) -> Str -> Gender -> N = \f ->
|
||||
\s,g -> f s ** {g = g ; lock_N = <>} ;
|
||||
|
||||
mkA a = regAdjective a ** {lock_A = <>} ;
|
||||
mkA2 = \s,p -> regAdjective s ** {s2 = p} ** {lock_A2 = <>} ;
|
||||
mkADeg a b c = adjDegrIrreg a b c ** {lock_ADeg = <>} ;
|
||||
aReg a = adjDegrReg a ** {lock_ADeg = <>} ;
|
||||
aFat = \fat -> let {fatt = fat + Predef.dp 1 fat} in
|
||||
mkADeg fat (fatt + "er") (fatt + "est") ;
|
||||
aRidiculous a = adjDegrLong a ** {lock_ADeg = <>} ;
|
||||
apReg = \s -> UseA (mkA s) ;
|
||||
|
||||
aGen : Str -> ADeg = \s -> case last s of {
|
||||
"y" => mkADeg s (init s + "ier") (init s + "iest") ;
|
||||
"e" => mkADeg s (s + "r") (s + "st") ;
|
||||
_ => aReg s
|
||||
} ;
|
||||
|
||||
mkAdv a = ss a ** {lock_Adv = <>} ;
|
||||
mkAdvPre a = ss a ** {lock_Adv = <>} ;
|
||||
mkPP x y = prepPhrase x y ** {lock_Adv = <>} ;
|
||||
mkAdA a = ss a ** {lock_AdA = <>} ;
|
||||
mkAdC a = ss a ** {lock_AdC = <>} ;
|
||||
|
||||
mkV = \go,goes,went,gone -> verbNoPart (mkVerbP3 go goes went gone) **
|
||||
{lock_V = <>} ;
|
||||
vReg = \walk -> mkV walk (walk + "s") (walk + "ed") (walk + "ed") ;
|
||||
vKiss = \kiss -> mkV kiss (kiss + "es") (kiss + "ed") (kiss + "ed") ;
|
||||
vFly = \cry -> let {cr = Predef.tk 1 cry} in
|
||||
mkV cry (cr + "ies") (cr + "ied") (cr + "ied") ;
|
||||
vGo = vKiss ;
|
||||
|
||||
vGen = \fly -> let {
|
||||
fl = Predef.tk 1 fly ;
|
||||
y = Predef.dp 1 fly ;
|
||||
eqy = ifTok (Str -> V) y
|
||||
} in
|
||||
eqy "y" vFly (
|
||||
eqy "s" vKiss (
|
||||
eqy "z" vKiss (
|
||||
vReg))) fly ;
|
||||
|
||||
vPart = \go, goes, went, gone, up ->
|
||||
verbPart (mkVerbP3 go goes went gone) up ** {lock_V = <>} ;
|
||||
vPartReg = \get, up ->
|
||||
verbPart (vGen get) up ** {lock_V = <>} ;
|
||||
|
||||
mkV2 = \v,p -> v ** {lock_V2 = <> ; s3 = p} ;
|
||||
tvPartReg = \get, along, to -> mkV2 (vPartReg get along) to ;
|
||||
|
||||
vHave = verbP3Have ** {s1 = [] ; lock_V = <>} ;
|
||||
|
||||
tvGen = \s,p -> mkV2 (vGen s) p ;
|
||||
tvDir = \v -> mkV2 v [] ;
|
||||
tvGenDir = \s -> tvDir (vGen s) ;
|
||||
|
||||
mkV3 x y z = mkDitransVerb x y z ** {lock_V3 = <>} ;
|
||||
v3Dir x y = mkV3 x [] y ;
|
||||
v3DirDir x = v3Dir x [] ;
|
||||
|
||||
-- these are used in the generated lexicon
|
||||
noun : Str -> N = nNonhuman ;
|
||||
|
||||
verb2 : Str -> Str -> V2 = \v -> mkV2 (vGen v) ;
|
||||
verb3 : Str -> Str -> Str -> V3 = \v -> mkV3 (vGen v) ;
|
||||
|
||||
} ;
|
||||
429
lib/resource-0.9/english/ParadigmsEng.gf
Normal file
429
lib/resource-0.9/english/ParadigmsEng.gf
Normal file
@@ -0,0 +1,429 @@
|
||||
--# -path=.:../abstract:../../prelude
|
||||
|
||||
--1 English Lexical Paradigms
|
||||
--
|
||||
-- Aarne Ranta 2003
|
||||
--
|
||||
-- This is an API to the user of the resource grammar
|
||||
-- for adding lexical items. It gives functions for forming
|
||||
-- expressions of open categories: nouns, adjectives, verbs.
|
||||
--
|
||||
-- Closed categories (determiners, pronouns, conjunctions) are
|
||||
-- accessed through the resource syntax API, $Structural.gf$.
|
||||
--
|
||||
-- The main difference with $MorphoEng.gf$ is that the types
|
||||
-- referred to are compiled resource grammar types. We have moreover
|
||||
-- had the design principle of always having existing forms, rather
|
||||
-- than stems, as string arguments of the paradigms.
|
||||
--
|
||||
-- The structure of functions for each word class $C$ is the following:
|
||||
-- first we give a handful of patterns that aim to cover all
|
||||
-- regular cases. Then we give a worst-case function $mkC$, which serves as an
|
||||
-- escape to construct the most irregular words of type $C$.
|
||||
-- However, this function should only seldom be needed: we have a
|
||||
-- separate module $IrregularEng$, which covers all irregularly inflected
|
||||
-- words.
|
||||
--
|
||||
-- The following modules are presupposed:
|
||||
|
||||
resource ParadigmsEng = open (Predef=Predef), Prelude, SyntaxEng,
|
||||
CategoriesEng, RulesEng in {
|
||||
--2 Parameters
|
||||
--
|
||||
-- To abstract over gender names, we define the following identifiers.
|
||||
|
||||
oper
|
||||
Gender : Type ;
|
||||
|
||||
human : Gender ;
|
||||
nonhuman : Gender ;
|
||||
masculine : Gender ;
|
||||
feminite : Gender ;
|
||||
|
||||
-- To abstract over number names, we define the following.
|
||||
|
||||
Number : Type ;
|
||||
|
||||
singular : Number ;
|
||||
plural : Number ;
|
||||
|
||||
-- To abstract over case names, we define the following.
|
||||
|
||||
Case : Type ;
|
||||
|
||||
nominative : Case ;
|
||||
genitive : Case ;
|
||||
|
||||
-- Prepositions are used in many-argument functions for rection.
|
||||
|
||||
Preposition : Type ;
|
||||
|
||||
|
||||
--2 Nouns
|
||||
|
||||
-- Worst case: give all four forms and the semantic gender.
|
||||
|
||||
mkN : (man,men,man's,men's : Str) -> N ;
|
||||
|
||||
-- The regular function captures the variants for nouns ending with
|
||||
-- "s","sh","x","z" or "y": "kiss - kisses", "flash - flashes";
|
||||
-- "fly - flies" (but "toy - toys"),
|
||||
|
||||
regN : Str -> N ;
|
||||
|
||||
-- In practice the worst case is just: give singular and plural nominative.
|
||||
|
||||
mk2N : (man,men : Str) -> N ;
|
||||
|
||||
-- All nouns created by the previous functions are marked as
|
||||
-- $nonhuman$. If you want a $human$ noun, wrap it with the following
|
||||
-- function:
|
||||
|
||||
genderN : Gender -> N -> N ;
|
||||
|
||||
--3 Compound nouns
|
||||
--
|
||||
-- All the functions above work quite as well to form compound nouns,
|
||||
-- such as "baby boom".
|
||||
|
||||
|
||||
--3 Relational nouns
|
||||
--
|
||||
-- Relational nouns ("daughter of x") need a preposition.
|
||||
|
||||
mkN2 : N -> Preposition -> N2 ;
|
||||
|
||||
-- The most common preposition is "of", and the following is a
|
||||
-- shortcut for regular, $nonhuman$ relational nouns with "of".
|
||||
|
||||
regN2 : Str -> N2 ;
|
||||
|
||||
-- Use the function $mkPreposition$ or see the section on prepositions below to
|
||||
-- form other prepositions.
|
||||
--
|
||||
-- Three-place relational nouns ("the connection from x to y") need two prepositions.
|
||||
|
||||
mkN3 : N -> Preposition -> Preposition -> N3 ;
|
||||
|
||||
|
||||
--3 Relational common noun phrases
|
||||
--
|
||||
-- In some cases, you may want to make a complex $CN$ into a
|
||||
-- relational noun (e.g. "the old town hall of").
|
||||
|
||||
cnN2 : CN -> Preposition -> N2 ;
|
||||
cnN3 : CN -> Preposition -> Preposition -> N3 ;
|
||||
|
||||
--
|
||||
--3 Proper names and noun phrases
|
||||
--
|
||||
-- Proper names, with a regular genitive, are formed as follows
|
||||
|
||||
regPN : Str -> Gender -> PN ; -- John, John's
|
||||
|
||||
-- Sometimes you can reuse a common noun as a proper name, e.g. "Bank".
|
||||
|
||||
nounPN : N -> PN ;
|
||||
|
||||
-- To form a noun phrase that can also be plural and have an irregular
|
||||
-- genitive, you can use the worst-case function.
|
||||
|
||||
mkNP : Str -> Str -> Number -> Gender -> NP ;
|
||||
|
||||
--2 Adjectives
|
||||
|
||||
-- Non-comparison one-place adjectives need two forms: one for
|
||||
-- the adjectival and one for the adverbial form ("free - freely")
|
||||
|
||||
mkA : (free,freely : Str) -> A ;
|
||||
|
||||
-- For regular adjectives, the adverbial form is derived. This holds
|
||||
-- even for cases with the variation "happy - happily".
|
||||
|
||||
regA : Str -> A ;
|
||||
|
||||
--3 Two-place adjectives
|
||||
--
|
||||
-- Two-place adjectives need a preposition for their second argument.
|
||||
|
||||
mkA2 : A -> Preposition -> A2 ;
|
||||
|
||||
-- Comparison adjectives may two more forms.
|
||||
|
||||
mkADeg : (good,better,best,well : Str) -> ADeg ;
|
||||
|
||||
-- The regular pattern recognizes two common variations:
|
||||
-- "-e" ("rude" - "ruder" - "rudest") and
|
||||
-- "-y" ("happy - happier - happiest - happily")
|
||||
|
||||
regADeg : Str -> ADeg ; -- long, longer, longest
|
||||
|
||||
-- However, the duplication of the final consonant is nor predicted,
|
||||
-- but a separate pattern is used:
|
||||
|
||||
duplADeg : Str -> ADeg ; -- fat, fatter, fattest
|
||||
|
||||
-- If comparison is formed by "more, "most", as in general for
|
||||
-- long adjective, the following pattern is used:
|
||||
|
||||
compoundADeg : A -> ADeg ; -- -/more/most ridiculous
|
||||
|
||||
-- From a given $ADeg$, it is possible to get back to $A$.
|
||||
|
||||
adegA : ADeg -> A ;
|
||||
|
||||
|
||||
--2 Adverbs
|
||||
|
||||
-- Adverbs are not inflected. Most lexical ones have position
|
||||
-- after the verb. Some can be preverbal (e.g. "always").
|
||||
|
||||
mkAdv : Str -> Adv ;
|
||||
mkAdV : Str -> AdV ;
|
||||
|
||||
-- Adverbs modifying adjectives and sentences can also be formed.
|
||||
|
||||
mkAdA : Str -> AdA ;
|
||||
|
||||
--2 Prepositions
|
||||
--
|
||||
-- A preposition as used for rection in the lexicon, as well as to
|
||||
-- build $PP$s in the resource API, just requires a string.
|
||||
|
||||
mkPreposition : Str -> Preposition ;
|
||||
mkPrep : Str -> Prep ;
|
||||
|
||||
-- (These two functions are synonyms.)
|
||||
|
||||
--2 Verbs
|
||||
--
|
||||
-- Except for "be", the worst case needs five forms: the infinitive and
|
||||
-- the third person singular present, the past indicative, and the
|
||||
-- past and present participles.
|
||||
|
||||
mkV : (go, goes, went, gone, going : Str) -> V ;
|
||||
|
||||
-- The regular verb function recognizes the special cases where the last
|
||||
-- character is "y" ("cry - cries" but "buy - buys") or "s", "sh", "x", "z"
|
||||
-- ("fix - fixes", etc).
|
||||
|
||||
regV : Str -> V ;
|
||||
|
||||
-- The following variant duplicates the last letter in the forms like
|
||||
-- "rip - ripped - ripping".
|
||||
|
||||
regDuplV : Str -> V ;
|
||||
|
||||
-- There is an extensive list of irregular verbs in the module $IrregularEng$.
|
||||
-- In practice, it is enough to give three forms,
|
||||
-- e.g. "drink - drank - drunk", with a variant indicating consonant
|
||||
-- duplication in the present participle.
|
||||
|
||||
irregV : (drink, drank, drunk : Str) -> V ;
|
||||
irregDuplV : (get, got, gotten : Str) -> V ;
|
||||
|
||||
|
||||
--3 Verbs with a particle.
|
||||
--
|
||||
-- The particle, such as in "switch on", is given as a string.
|
||||
|
||||
partV : V -> Str -> V ;
|
||||
|
||||
--3 Two-place verbs
|
||||
--
|
||||
-- Two-place verbs need a preposition, except the special case with direct object.
|
||||
-- (transitive verbs). Notice that a particle comes from the $V$.
|
||||
|
||||
mkV2 : V -> Preposition -> V2 ;
|
||||
|
||||
dirV2 : V -> V2 ;
|
||||
|
||||
--3 Three-place verbs
|
||||
--
|
||||
-- Three-place (ditransitive) verbs need two prepositions, of which
|
||||
-- the first one or both can be absent.
|
||||
|
||||
mkV3 : V -> Str -> Str -> V3 ; -- speak, with, about
|
||||
dirV3 : V -> Str -> V3 ; -- give,_,to
|
||||
dirdirV3 : V -> V3 ; -- give,_,_
|
||||
|
||||
--3 Other complement patterns
|
||||
--
|
||||
-- Verbs and adjectives can take complements such as sentences,
|
||||
-- questions, verb phrases, and adjectives.
|
||||
|
||||
mkV0 : V -> V0 ;
|
||||
mkVS : V -> VS ;
|
||||
mkV2S : V -> Str -> V2S ;
|
||||
mkVV : V -> VV ;
|
||||
mkV2V : V -> Str -> Str -> V2V ;
|
||||
mkVA : V -> VA ;
|
||||
mkV2A : V -> Str -> V2A ;
|
||||
mkVQ : V -> VQ ;
|
||||
mkV2Q : V -> Str -> V2Q ;
|
||||
|
||||
mkAS : A -> AS ;
|
||||
mkA2S : A -> Str -> A2S ;
|
||||
mkAV : A -> AV ;
|
||||
mkA2V : A -> Str -> A2V ;
|
||||
|
||||
|
||||
--2 Definitions of paradigms
|
||||
--
|
||||
-- The definitions should not bother the user of the API. So they are
|
||||
-- hidden from the document.
|
||||
--.
|
||||
|
||||
Gender = SyntaxEng.Gender ;
|
||||
Number = SyntaxEng.Number ;
|
||||
Case = SyntaxEng.Case ;
|
||||
human = Masc ;
|
||||
nonhuman = Neutr ;
|
||||
masculine = Masc ;
|
||||
feminine = Fem ;
|
||||
singular = Sg ;
|
||||
plural = Pl ;
|
||||
nominative = Nom ;
|
||||
genitive = Gen ;
|
||||
|
||||
Preposition = Str ;
|
||||
|
||||
regN = \ray ->
|
||||
let
|
||||
ra = Predef.tk 1 ray ;
|
||||
y = Predef.dp 1 ray ;
|
||||
r = Predef.tk 2 ray ;
|
||||
ay = Predef.dp 2 ray ;
|
||||
rays =
|
||||
case y of {
|
||||
"y" => y2ie ray "s" ;
|
||||
"s" => ray + "es" ;
|
||||
"z" => ray + "es" ;
|
||||
"x" => ray + "es" ;
|
||||
_ => case ay of {
|
||||
"sh" => ray + "es" ;
|
||||
"ch" => ray + "es" ;
|
||||
_ => ray + "s"
|
||||
}
|
||||
}
|
||||
in
|
||||
mk2N ray rays ;
|
||||
|
||||
mk2N = \man,men ->
|
||||
let mens = case last men of {
|
||||
"s" => men + "'" ;
|
||||
_ => men + "'s"
|
||||
}
|
||||
in
|
||||
mkN man men (man + "'s") mens ;
|
||||
|
||||
mkN = \man,men,man's,men's ->
|
||||
mkNoun man men man's men's ** {g = Neutr ; lock_N = <>} ;
|
||||
|
||||
genderN g man = {s = man.s ; g = g ; lock_N = <>} ;
|
||||
|
||||
mkN2 = \n,p -> UseN n ** {lock_N2 = <> ; s2 = p} ;
|
||||
regN2 n = mkN2 (regN n) (mkPreposition "of") ;
|
||||
mkN3 = \n,p,q -> UseN n ** {lock_N3 = <> ; s2 = p ; s3 = q} ;
|
||||
cnN2 = \n,p -> n ** {lock_N2 = <> ; s2 = p} ;
|
||||
cnN3 = \n,p,q -> n ** {lock_N3 = <> ; s2 = p ; s3 = q} ;
|
||||
|
||||
regPN n g = nameReg n g ** {lock_PN = <>} ;
|
||||
nounPN n = {s = n.s ! singular ; g = n.g ; lock_PN = <>} ;
|
||||
mkNP x y n g = {s = table {GenP => x ; _ => y} ; a = toAgr n P3 g ;
|
||||
lock_NP = <>} ;
|
||||
|
||||
mkA a b = mkAdjective a b ** {lock_A = <>} ;
|
||||
regA a = regAdjective a ** {lock_A = <>} ;
|
||||
|
||||
mkA2 a p = a ** {s2 = p ; lock_A2 = <>} ;
|
||||
|
||||
mkADeg a b c d = mkAdjDegrWorst a b c c d d ** {lock_ADeg = <>} ;
|
||||
|
||||
regADeg happy =
|
||||
let
|
||||
happ = init happy ;
|
||||
y = last happy ;
|
||||
happie = case y of {
|
||||
"y" => happ + "ie" ;
|
||||
"e" => happy ;
|
||||
_ => happy + "e"
|
||||
} ;
|
||||
happily = case y of {
|
||||
"y" => happ + "ily" ;
|
||||
_ => happy + "ly"
|
||||
} ;
|
||||
in mkADeg happy happily (happie + "r") (happie + "st") ;
|
||||
|
||||
duplADeg fat = mkADeg fat
|
||||
(fat + "ly") (fat + last fat + "er") (fat + last fat + "est") ;
|
||||
compoundADeg a = let ad = (a.s ! AAdj) in
|
||||
mkADeg ad (a.s ! AAdv) ("more" ++ ad) ("most" ++ ad) ;
|
||||
adegA a = {s = a.s ! Pos ; lock_A = <>} ;
|
||||
|
||||
mkAdv x = ss x ** {lock_Adv = <>} ;
|
||||
mkAdV x = ss x ** {lock_AdV = <>} ;
|
||||
mkAdA x = ss x ** {lock_AdA = <>} ;
|
||||
|
||||
mkPreposition p = p ;
|
||||
mkPrep p = ss p ** {lock_Prep = <>} ;
|
||||
|
||||
mkV a b c d e = mkVerbP3worst a b c d e ** {s1 = [] ; lock_V = <>} ;
|
||||
|
||||
regV cry =
|
||||
let
|
||||
cr = init cry ;
|
||||
y = last cry ;
|
||||
cries = (regN cry).s ! Pl ! Nom ; -- !
|
||||
crie = init cries ;
|
||||
cried = case last crie of {
|
||||
"e" => crie + "d" ;
|
||||
_ => crie + "ed"
|
||||
} ;
|
||||
crying = case y of {
|
||||
"e" => case last cr of {
|
||||
"e" => cry + "ing" ;
|
||||
_ => cr + "ing"
|
||||
} ;
|
||||
_ => cry + "ing"
|
||||
}
|
||||
in mkV cry cries cried cried crying ;
|
||||
|
||||
regDuplV fit =
|
||||
let fitt = fit + last fit in
|
||||
mkV fit (fit + "s") (fitt + "ed") (fitt + "ed") (fitt + "ing") ;
|
||||
|
||||
irregV x y z = let reg = (regV x).s in
|
||||
mkV x (reg ! Indic Sg) y z (reg ! PresPart) ** {s1 = [] ; lock_V = <>} ;
|
||||
|
||||
irregDuplV fit y z =
|
||||
let
|
||||
fitting = (regDuplV fit).s ! PresPart
|
||||
in
|
||||
mkV fit (fit + "s") y z fitting ;
|
||||
|
||||
partV v p = {s = v.s ; s1 = p ; lock_V = <>} ;
|
||||
|
||||
mkV2 v p = v ** {s = v.s ; s1 = v.s1 ; s3 = p ; lock_V2 = <>} ;
|
||||
dirV2 v = mkV2 v [] ;
|
||||
|
||||
mkV3 v p q = v ** {s = v.s ; s1 = v.s1 ; s3 = p ; s4 = q ; lock_V3 = <>} ;
|
||||
dirV3 v p = mkV3 v [] p ;
|
||||
dirdirV3 v = dirV3 v [] ;
|
||||
|
||||
mkV0 v = v ** {lock_V0 = <>} ;
|
||||
mkVS v = v ** {lock_VS = <>} ;
|
||||
mkV2S v p = mkV2 v p ** {lock_V2S = <>} ;
|
||||
mkVV v = verb2aux v ** {isAux = False ; lock_VV = <>} ;
|
||||
mkV2V v p t = mkV2 v p ** {s4 = t ; lock_V2V = <>} ;
|
||||
mkVA v = v ** {lock_VA = <>} ;
|
||||
mkV2A v p = mkV2 v p ** {lock_V2A = <>} ;
|
||||
mkVQ v = v ** {lock_VQ = <>} ;
|
||||
mkV2Q v p = mkV2 v p ** {lock_V2Q = <>} ;
|
||||
|
||||
mkAS v = v ** {lock_AS = <>} ;
|
||||
mkA2S v p = mkA2 v p ** {lock_A2S = <>} ;
|
||||
mkAV v = v ** {lock_AV = <>} ;
|
||||
mkA2V v p = mkA2 v p ** {lock_A2V = <>} ;
|
||||
|
||||
} ;
|
||||
67
lib/resource-0.9/english/PredicEng.gf
Normal file
67
lib/resource-0.9/english/PredicEng.gf
Normal file
@@ -0,0 +1,67 @@
|
||||
--# -path=.:../abstract:../../prelude
|
||||
--# -opt
|
||||
|
||||
concrete PredicEng of Predic = CategoriesEng **
|
||||
open Prelude, SyntaxEng, DeptypEng in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
|
||||
lincat
|
||||
VType, CType = SS ;
|
||||
Verb = {s : VForm => Str ; isAux : Bool ; s1 : Particle ; c : VComp} ;
|
||||
Compl = {s1, s2 : Agr => Str} ;
|
||||
|
||||
lin
|
||||
CtN, CtV, CtS, CtQ, CtA = ss [] ;
|
||||
Vt, VtN = \x -> x ;
|
||||
Vt_ = ss [] ;
|
||||
|
||||
Compl_ = {s1, s2 = \\_ => []} ;
|
||||
ComplN np = {s1 = \\_ => np.s ! AccP ; s2 = \\_ => []} ;
|
||||
ComplA ap = {s1 = ap.s ; s2 = \\_ => []} ;
|
||||
ComplQ q = {s1 = \\_ => q.s ! DirQ ; s2 = \\_ => []} ;
|
||||
ComplS s = {s1 = \\_ => "that" ++ s.s ; s2 = \\_ => []} ;
|
||||
|
||||
ComplAdd c np co = {s1 = \\_ => c.s ++ np.s ! AccP ; s2 = co.s1} ;
|
||||
|
||||
|
||||
SPredVerb vt np verb compl =
|
||||
predVerbClause np verb
|
||||
(\\a => vt.s ++
|
||||
cprep1 verb.c (compl.s1 ! a) ++
|
||||
cprep2 verb.c (compl.s2 ! a)
|
||||
) ;
|
||||
QPredVerb vt np verb compl =
|
||||
intVerbClause np verb
|
||||
(\\a => vt.s ++
|
||||
cprep1 verb.c (compl.s1 ! a) ++
|
||||
cprep2 verb.c (compl.s2 ! a)
|
||||
) ;
|
||||
|
||||
RPredVerb vt np verb compl =
|
||||
relVerbClause np verb
|
||||
(\\a => vt.s ++
|
||||
cprep1 verb.c (compl.s1 ! a) ++
|
||||
cprep2 verb.c (compl.s2 ! a)
|
||||
) ;
|
||||
|
||||
IPredVerb vt verb compl =
|
||||
predVerbI verb
|
||||
(\\a => vt.s ++
|
||||
cprep1 verb.c (compl.s1 ! a) ++
|
||||
cprep2 verb.c (compl.s2 ! a)
|
||||
) ;
|
||||
|
||||
VeV1 v = v ** {isAux = False ; c = CVt_} ;
|
||||
VeV2 v = v ** {isAux = False ; c = CVt (CCtN CP_)} ; ---- other preps
|
||||
|
||||
{-
|
||||
Walk = {s = "walks" ; c = VC_} ;
|
||||
Love = {s = "loves" ; c = VC1 C_} ;
|
||||
Know = {s = "knows" ; c = VC_} ;
|
||||
Give = {s = "gives" ; c = VC2 C_ C_to} ;
|
||||
Tell = {s = "tells" ; c = VC_} ;
|
||||
Ask = {s = "asks" ; c = VC_} ;
|
||||
-}
|
||||
|
||||
}
|
||||
4
lib/resource-0.9/english/ResourceEng.gf
Normal file
4
lib/resource-0.9/english/ResourceEng.gf
Normal file
@@ -0,0 +1,4 @@
|
||||
--# -path=.:../abstract:../../prelude
|
||||
|
||||
concrete ResourceEng of Resource = RulesEng, ClauseEng, StructuralEng ** {} ;
|
||||
---- concrete ResourceEng of Resource = RulesEng, VerbphraseEng ** {} ;
|
||||
207
lib/resource-0.9/english/RulesEng.gf
Normal file
207
lib/resource-0.9/english/RulesEng.gf
Normal file
@@ -0,0 +1,207 @@
|
||||
--# -path=.:../abstract:../../prelude
|
||||
|
||||
--1 The Top-Level English Resource Grammar: Combination Rules
|
||||
--
|
||||
-- Aarne Ranta 2002 -- 2003
|
||||
--
|
||||
-- This is the English concrete syntax of the multilingual resource
|
||||
-- grammar. Most of the work is done in the file $syntax.Eng.gf$.
|
||||
-- However, for the purpose of documentation, we make here explicit the
|
||||
-- linearization types of each category, so that their structures and
|
||||
-- dependencies can be seen.
|
||||
-- Another substantial part are the linearization rules of some
|
||||
-- structural words.
|
||||
--
|
||||
-- The users of the resource grammar should not look at this file for the
|
||||
-- linearization rules, which are in fact hidden in the document version.
|
||||
-- They should use $resource.Abs.gf$ to access the syntactic rules.
|
||||
-- This file can be consulted in those, hopefully rare, occasions in which
|
||||
-- one has to know how the syntactic categories are
|
||||
-- implemented. The parameter types are defined in $TypesEng.gf$.
|
||||
|
||||
concrete RulesEng of Rules = CategoriesEng ** open Prelude, SyntaxEng in {
|
||||
|
||||
flags
|
||||
optimize=all_subs ;
|
||||
|
||||
lin
|
||||
UseN = noun2CommNounPhrase ;
|
||||
UsePN = nameNounPhrase ;
|
||||
|
||||
IndefOneNP = indefNounPhrase singular ;
|
||||
IndefNumNP = indefNounPhraseNum plural ;
|
||||
DefOneNP = defNounPhrase singular ;
|
||||
DefNumNP = defNounPhraseNum plural ;
|
||||
|
||||
DetNP = detNounPhrase ;
|
||||
NDetNP = numDetNounPhrase ;
|
||||
NDetNum = justNumDetNounPhrase ;
|
||||
MassNP = detNounPhrase (mkDeterminer Sg []) ;
|
||||
|
||||
AppN2 = appFunComm ;
|
||||
AppN3 = appFun2 ;
|
||||
UseN2 = funAsCommNounPhrase ;
|
||||
|
||||
ModAP = modCommNounPhrase ;
|
||||
CNthatS = nounThatSentence ;
|
||||
|
||||
ModGenOne = npGenDet singular noNum ;
|
||||
ModGenNum = npGenDet plural ;
|
||||
|
||||
UseInt i = {s = table {Nom => i.s ; Gen => i.s ++ "s"} ; n = Pl} ; ---
|
||||
NoNum = noNum ;
|
||||
|
||||
UseA = adj2adjPhrase ;
|
||||
ComplA2 = complAdj ;
|
||||
|
||||
ComplAV v x = complVerbAdj v x ;
|
||||
ComplObjA2V v x y = complVerbAdj2 True v x y ;
|
||||
|
||||
PositADeg = positAdjPhrase ;
|
||||
ComparADeg = comparAdjPhrase ;
|
||||
SuperlADeg = superlAdjPhrase ;
|
||||
|
||||
-- verbs and verb prases
|
||||
|
||||
PredAS = predAdjSent ;
|
||||
PredV0 rain = predVerbClause (pronNounPhrase pronIt) rain (complVerb rain) ;
|
||||
|
||||
-- Partial saturation.
|
||||
|
||||
UseV2 = transAsVerb ;
|
||||
|
||||
ComplA2S = predAdjSent2 ;
|
||||
|
||||
AdjPart = adjPastPart ;
|
||||
|
||||
UseV2V x = verb2aux x ** {isAux = False} ;
|
||||
UseV2S x = x ;
|
||||
UseV2Q x = x ;
|
||||
UseA2S x = x ;
|
||||
UseA2V x = x ;
|
||||
|
||||
UseCl tp cl = {s = tp.s ++ cl.s ! Dir ! tp.b ! VFinite tp.t tp.a} ;
|
||||
UseQCl tp cl = {s = \\q => tp.s ++ cl.s ! tp.b ! VFinite tp.t tp.a ! q} ;
|
||||
UseRCl tp cl = {s = \\a => tp.s ++ cl.s ! <tp.b, VFinite tp.t tp.a, a>} ;
|
||||
UseVCl p a cl = {
|
||||
s = \\v,ag => p.s ++ a.s ++ cl.s ! p.p ! a.a ! v ! ag ;
|
||||
s1 = cl.s1 ! p.p
|
||||
} ;
|
||||
|
||||
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} ;
|
||||
|
||||
TPresent = {s = [] ; t = Present} ;
|
||||
TPast = {s = [] ; t = Past} ;
|
||||
TFuture = {s = [] ; t = Future} ;
|
||||
TConditional = {s = [] ; t = Conditional} ;
|
||||
|
||||
ASimul = {s = [] ; a = Simul} ;
|
||||
AAnter = {s = [] ; a = Anter} ;
|
||||
|
||||
PPos = {s = [] ; p = True} ;
|
||||
PNeg = {s = [] ; p = False} ;
|
||||
|
||||
-- Adverbs.
|
||||
|
||||
AdjAdv a = ss (a.s ! AAdv) ;
|
||||
AdvPP p = p ;
|
||||
PrepNP p = prepPhrase p.s ; ---
|
||||
AdvCN = advCommNounPhrase ;
|
||||
AdvAP = advAdjPhrase ;
|
||||
AdvAdv = cc2 ;
|
||||
AdvNP pn pp = {s = \\c => pn.s ! c ++ pp.s ; a = pn.a} ;
|
||||
|
||||
--3 Sentences and relative clauses
|
||||
--
|
||||
|
||||
SlashV2 = slashTransVerbCl ;
|
||||
SlashVV2 = slashVerbVerb ;
|
||||
SlashAdv cl p = slashAdverb cl p.s ;
|
||||
|
||||
IdRP = identRelPron ;
|
||||
FunRP = funRelPron ;
|
||||
RelSlash = relSlash ;
|
||||
ModRS = modRelClause ;
|
||||
RelCl = relSuch ;
|
||||
|
||||
|
||||
--!
|
||||
--3 Questions and imperatives
|
||||
--
|
||||
|
||||
IDetCN d n = nounPhraseInt (detNounPhrase d n) ;
|
||||
FunIP = funIntPron ;
|
||||
|
||||
QuestCl = questClause ;
|
||||
IntSlash = intSlash ;
|
||||
QuestAdv = questAdverbial ;
|
||||
|
||||
PosImpVP = imperVerbPhrase True ;
|
||||
NegImpVP = imperVerbPhrase False ;
|
||||
|
||||
IndicPhrase = indicUtt ;
|
||||
QuestPhrase = interrogUtt ;
|
||||
ImperOne = imperUtterance singular ;
|
||||
ImperMany = imperUtterance plural ;
|
||||
|
||||
AdvCl = advClause ;
|
||||
AdvVPI = advVerbPhrase ;
|
||||
|
||||
AdCPhr = advSentence ;
|
||||
AdvPhr = advSentence ;
|
||||
|
||||
|
||||
--!
|
||||
--3 Coordination
|
||||
--
|
||||
|
||||
TwoS = twoSentence ;
|
||||
ConsS = consSentence ;
|
||||
ConjS = conjunctSentence ;
|
||||
ConjDS = conjunctDistrSentence ;
|
||||
|
||||
TwoAP = twoAdjPhrase ;
|
||||
ConsAP = consAdjPhrase ;
|
||||
ConjAP = conjunctAdjPhrase ;
|
||||
ConjDAP = conjunctDistrAdjPhrase ;
|
||||
|
||||
TwoNP = twoNounPhrase ;
|
||||
ConsNP = consNounPhrase ;
|
||||
ConjNP = conjunctNounPhrase ;
|
||||
ConjDNP = conjunctDistrNounPhrase ;
|
||||
|
||||
TwoAdv = twoSentence ;
|
||||
ConsAdv = consSentence ;
|
||||
ConjAdv = conjunctSentence ;
|
||||
ConjDAdv = conjunctDistrSentence ;
|
||||
|
||||
SubjS = subjunctSentence ;
|
||||
SubjImper = subjunctImperative ;
|
||||
SubjQS = subjunctQuestion ;
|
||||
AdvSubj if A = ss (if.s ++ A.s) ;
|
||||
|
||||
PhrNP = useNounPhrase ;
|
||||
PhrOneCN = useCommonNounPhrase singular ;
|
||||
PhrManyCN = useCommonNounPhrase plural ;
|
||||
PhrIP ip = ip ;
|
||||
PhrIAdv ia = ia ;
|
||||
PhrVPI = verbUtterance ;
|
||||
|
||||
OnePhr p = p ;
|
||||
ConsPhr = cc2 ;
|
||||
|
||||
-----------------------
|
||||
-- special constructions
|
||||
|
||||
OneNP = nameNounPhrase (nameReg "one" human) ;
|
||||
|
||||
ExistCN A = predBeGroup
|
||||
(nameNounPhrase (nameReg "there" Neutr))
|
||||
(complNounPhrase (indefNounPhrase singular A)) ;
|
||||
ExistNumCN nu A =
|
||||
predBeGroup
|
||||
(nameNounPhrasePl (nameReg "there" Neutr))
|
||||
(complNounPhrase (indefNounPhraseNum plural nu A)) ;
|
||||
|
||||
} ;
|
||||
8
lib/resource-0.9/english/SimpleEng.gf
Normal file
8
lib/resource-0.9/english/SimpleEng.gf
Normal file
@@ -0,0 +1,8 @@
|
||||
--# -path=.:../abstract:../../prelude
|
||||
|
||||
concrete SimpleEng of Simple = CategoriesEng ** SimpleI with
|
||||
(Categories = CategoriesEng),
|
||||
(Rules = RulesEng),
|
||||
(Structural = StructuralEng),
|
||||
(Verbphrase = VerbphraseEng)
|
||||
;
|
||||
21
lib/resource-0.9/english/SimpleLangEng.gf
Normal file
21
lib/resource-0.9/english/SimpleLangEng.gf
Normal file
@@ -0,0 +1,21 @@
|
||||
--# -path=.:../abstract:../../prelude
|
||||
|
||||
concrete SimpleLangEng of SimpleLang =
|
||||
SimpleEng,
|
||||
StructuralEng,
|
||||
BasicEng,
|
||||
TimeEng,
|
||||
CountryEng
|
||||
|
||||
** open Prelude, ParadigmsEng in {
|
||||
|
||||
lin
|
||||
AdvDate d = prefixSS "on" d ;
|
||||
AdvTime t = prefixSS "at" t ;
|
||||
NWeekday w = w ;
|
||||
PNWeekday w = nounPN w ;
|
||||
|
||||
PNCountry x = x ;
|
||||
ANationality x = x ;
|
||||
NLanguage x = x ;
|
||||
}
|
||||
101
lib/resource-0.9/english/StructuralEng.gf
Normal file
101
lib/resource-0.9/english/StructuralEng.gf
Normal file
@@ -0,0 +1,101 @@
|
||||
--# -path=.:../abstract:../../prelude
|
||||
|
||||
--1 The Top-Level English Resource Grammar: Structural Words
|
||||
--
|
||||
-- Aarne Ranta 2002 -- 2003
|
||||
--
|
||||
concrete StructuralEng of Structural =
|
||||
CategoriesEng, NumeralsEng ** open Prelude, SyntaxEng in {
|
||||
|
||||
flags optimize=all ;
|
||||
|
||||
lin
|
||||
UseNumeral i = {
|
||||
s = table {Nom => i.s ! NCard ; Gen => i.s ! NCard ++ "'s"} ; n = i.n} ; ---
|
||||
|
||||
|
||||
above_Prep = ss "above" ;
|
||||
after_Prep = ss "after" ;
|
||||
all8mass_Det = mkDeterminer Sg "all" ; --- all the missing
|
||||
all_NDet = mkDeterminerNum "all" ;
|
||||
almost_Adv = ss "almost" ;
|
||||
although_Subj = ss "although" ;
|
||||
and_Conj = ss "and" ** {n = Pl} ;
|
||||
because_Subj = ss "because" ;
|
||||
before_Prep = ss "before" ;
|
||||
behind_Prep = ss "behind" ;
|
||||
between_Prep = ss "between" ;
|
||||
both_AndConjD = sd2 "both" "and" ** {n = Pl} ;
|
||||
by8agent_Prep = ss "by" ;
|
||||
by8means_Prep = ss "by" ;
|
||||
can8know_VV = vvCan ;
|
||||
can_VV = vvCan ;
|
||||
during_Prep = ss "during" ;
|
||||
either8or_ConjD = sd2 "either" "or" ** {n = Sg} ;
|
||||
everybody_NP = nameNounPhrase (nameReg "everybody" human) ;
|
||||
every_Det = everyDet ;
|
||||
everything_NP = nameNounPhrase (nameReg "everything" Neutr) ;
|
||||
everywhere_Adv = ss "everywhere" ;
|
||||
from_Prep = ss "from" ;
|
||||
he_NP = pronNounPhrase pronHe ;
|
||||
how_IAdv = ss "how" ;
|
||||
how8many_IDet = mkDeterminer Pl ["how many"] ;
|
||||
if_Subj = ss "if" ;
|
||||
in8front_Prep = ss ["in front of"] ;
|
||||
i_NP = pronNounPhrase pronI ;
|
||||
in_Prep = ss "in" ;
|
||||
it_NP = pronNounPhrase pronIt ;
|
||||
many_Det = mkDeterminer Pl "many" ;
|
||||
most_Det = mkDeterminer Sg "most" ;
|
||||
most8many_Det = mostDet ;
|
||||
much_Det = mkDeterminer Sg ["a lot of"] ; ---
|
||||
must_VV = vvMust ;
|
||||
|
||||
no_Phr = ss "No." ;
|
||||
on_Prep = ss "on" ;
|
||||
or_Conj = ss "or" ** {n = Sg} ;
|
||||
otherwise_Adv = ss "otherwise" ;
|
||||
part_Prep = ss "of" ;
|
||||
possess_Prep = ss "of" ;
|
||||
quite_Adv = ss "quite" ;
|
||||
she_NP = pronNounPhrase pronShe ;
|
||||
so_Adv = ss "so" ;
|
||||
somebody_NP = nameNounPhrase (nameReg "somebody" human) ;
|
||||
some_Det = mkDeterminer Sg "some" ;
|
||||
some_NDet = mkDeterminerNum "some" ;
|
||||
something_NP = nameNounPhrase (nameReg "something" Neutr) ;
|
||||
somewhere_Adv = ss "somewhere" ;
|
||||
that_Det = mkDeterminer Sg "that" ;
|
||||
that_NP = nameNounPhrase (nameReg "that" Neutr) ;
|
||||
therefore_Adv = ss "therefore" ;
|
||||
these_NDet = mkDeterminerNum "these" ;
|
||||
they8fem_NP = pronNounPhrase pronThey ;
|
||||
they_NP = pronNounPhrase pronThey ;
|
||||
this_Det = mkDeterminer Sg "this" ;
|
||||
this_NP = nameNounPhrase (nameReg "this" Neutr) ;
|
||||
those_NDet = mkDeterminerNum "those" ;
|
||||
thou_NP = pronNounPhrase pronYouSg ;
|
||||
through_Prep = ss "through" ;
|
||||
too_Adv = ss "too" ;
|
||||
to_Prep = ss "to" ;
|
||||
under_Prep = ss "under" ;
|
||||
very_Adv = ss "very" ;
|
||||
want_VV = verb2aux (verbNoPart (regVerbP3 "want")) ** {isAux = False} ;
|
||||
we_NP = pronNounPhrase pronWe ;
|
||||
what8many_IP = intPronWhat plural ;
|
||||
what8one_IP = intPronWhat singular ;
|
||||
when_IAdv = ss "when" ;
|
||||
when_Subj = ss "when" ;
|
||||
where_IAdv = ss "where" ;
|
||||
which8many_IDet = mkDeterminer Pl ["which"] ;
|
||||
which8one_IDet = mkDeterminer Sg ["which"] ;
|
||||
who8many_IP = intPronWho plural ;
|
||||
who8one_IP = intPronWho singular ;
|
||||
why_IAdv = ss "why" ;
|
||||
without_Prep = ss "without" ;
|
||||
with_Prep = ss "with" ;
|
||||
ye_NP = pronNounPhrase pronYouPl ;
|
||||
you_NP = pronNounPhrase pronYouSg ;
|
||||
yes_Phr = ss "Yes." ;
|
||||
|
||||
}
|
||||
247
lib/resource-0.9/english/SwadeshLexEng.gf
Normal file
247
lib/resource-0.9/english/SwadeshLexEng.gf
Normal file
@@ -0,0 +1,247 @@
|
||||
--# -path=.:../abstract:../../prelude
|
||||
|
||||
concrete SwadeshLexEng of SwadeshLex = CategoriesEng
|
||||
** open ResourceEng, SyntaxEng, ParadigmsEng, VerbsEng,
|
||||
BasicEng, Prelude in {
|
||||
|
||||
lin
|
||||
|
||||
-- Pronouns
|
||||
|
||||
i_NP = i_NP ;
|
||||
thou_NP = thou_NP ;
|
||||
he_NP = he_NP ;
|
||||
we_NP = we_NP ;
|
||||
you_NP = you_NP ;
|
||||
they_NP = they_NP ;
|
||||
who8many_IP = who8many_IP ;
|
||||
who8one_IP = who8one_IP ;
|
||||
what8many_IP = what8many_IP ;
|
||||
what8one_IP = what8one_IP ;
|
||||
|
||||
-- Determiners
|
||||
|
||||
this_Det = this_Det ;
|
||||
that_Det = that_Det ;
|
||||
all_NDet = all_NDet ;
|
||||
many_Det = many_Det ;
|
||||
some_Det = some_Det ;
|
||||
few_Det = mkDeterminer Pl "few" ;
|
||||
other_Det = mkDeterminer Pl "other" ;
|
||||
|
||||
|
||||
-- Adverbs
|
||||
|
||||
here_Adv = here_Adv;
|
||||
there_Adv = there_Adv;
|
||||
where_IAdv = where_IAdv;
|
||||
when_IAdv = when_IAdv;
|
||||
how_IAdv = how_IAdv;
|
||||
|
||||
-- not : Adv ; -- ?
|
||||
|
||||
-- Conjunctions
|
||||
|
||||
and_Conj = and_Conj ;
|
||||
|
||||
-- Prepositions
|
||||
|
||||
at_Prep = ss "at" ;
|
||||
in_Prep = ss "in" ;
|
||||
with_Prep = ss "with" ;
|
||||
|
||||
-- Numerals
|
||||
|
||||
one_Num = UseNumeral (num (pot2as3 (pot1as2 (pot0as1 pot01)))) ;
|
||||
two_Num = UseNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n2))))) ;
|
||||
three_Num = UseNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n3))))) ;
|
||||
four_Num = UseNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n4))))) ;
|
||||
five_Num = UseNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n5))))) ;
|
||||
|
||||
-- Adjectives
|
||||
|
||||
bad_ADeg = bad_ADeg ;
|
||||
big_ADeg = big_ADeg ;
|
||||
black_ADeg = black_ADeg ;
|
||||
cold_ADeg = cold_ADeg ;
|
||||
correct_ADeg = compoundADeg (regA "correct") ;
|
||||
dirty_ADeg = dirty_ADeg ;
|
||||
dry_ADeg = regADeg "dry" ;
|
||||
dull_ADeg = regADeg "dull" ;
|
||||
far_ADeg = mkADeg "far" (variants { "further"; "farther" })
|
||||
(variants { "furthest"; "farthest" }) "far" ;
|
||||
full_ADeg = regADeg "full" ;
|
||||
good_ADeg = good_ADeg ;
|
||||
green_ADeg = green_ADeg ;
|
||||
heavy_ADeg = regADeg "heavy" ;
|
||||
long_ADeg = long_ADeg ;
|
||||
narrow_ADeg = narrow_ADeg ;
|
||||
near_ADeg = regADeg "near" ;
|
||||
new_ADeg = new_ADeg ;
|
||||
old_ADeg = old_ADeg ;
|
||||
red_ADeg = red_ADeg ;
|
||||
rotten_ADeg = compoundADeg (regA "rotten") ;
|
||||
round_ADeg = regADeg "round" ;
|
||||
sharp_ADeg = regADeg "sharp" ;
|
||||
short_ADeg = short_ADeg ;
|
||||
small_ADeg = small_ADeg ;
|
||||
smooth_ADeg = regADeg "smooth" ;
|
||||
straight_ADeg = regADeg "straight" ;
|
||||
thick_ADeg = thick_ADeg ;
|
||||
thin_ADeg = thin_ADeg ;
|
||||
warm_ADeg = warm_ADeg ;
|
||||
wet_ADeg = duplADeg "wet" ;
|
||||
white_ADeg = white_ADeg ;
|
||||
wide_ADeg = regADeg "wide" ;
|
||||
yellow_ADeg = yellow_ADeg ;
|
||||
|
||||
left_A = regA "left" ;
|
||||
right_A = regA "right" ;
|
||||
|
||||
-- Nouns
|
||||
|
||||
animal_N = regN "animal" ;
|
||||
ashes_N = regN "ash" ; -- FIXME: plural only?
|
||||
back_N = regN "back" ;
|
||||
bark_N = regN "bark" ;
|
||||
belly_N = regN "belly" ;
|
||||
bird_N = bird_N;
|
||||
blood_N = regN "blood" ;
|
||||
bone_N = regN "bone" ;
|
||||
breast_N = regN "breast" ;
|
||||
child_N = child_N ;
|
||||
cloud_N = regN "cloud" ;
|
||||
day_N = regN "day" ;
|
||||
dog_N = dog_N ;
|
||||
dust_N = regN "dust" ;
|
||||
ear_N = regN "ear" ;
|
||||
earth_N = regN "earth" ;
|
||||
egg_N = regN "egg" ;
|
||||
eye_N = regN "eye" ;
|
||||
fat_N = regN "fat" ;
|
||||
father_N = UseN2 father_N2 ;
|
||||
feather_N = regN "feather" ;
|
||||
fingernail_N = regN "fingernail" ;
|
||||
fire_N = regN "fire" ;
|
||||
fish_N = fish_N ;
|
||||
flower_N = regN "flower" ;
|
||||
fog_N = regN "fog" ;
|
||||
foot_N = mk2N "foot" "feet" ;
|
||||
forest_N = regN "forest" ;
|
||||
fruit_N = fruit_N ;
|
||||
grass_N = regN "grass" ;
|
||||
guts_N = regN "gut" ; -- FIXME: no singular
|
||||
hair_N = regN "hair" ;
|
||||
hand_N = regN "hand" ;
|
||||
head_N = regN "head" ;
|
||||
heart_N = regN "heart" ;
|
||||
horn_N = regN "horn" ;
|
||||
husband_N = genderN masculine (regN "husband") ;
|
||||
ice_N = regN "ice" ;
|
||||
knee_N = regN "knee" ;
|
||||
lake_N = lake_N ;
|
||||
leaf_N = mk2N "leaf" "leaves" ;
|
||||
leg_N = regN "leg" ;
|
||||
liver_N = regN "liver" ;
|
||||
louse_N = mk2N "louse" "lice" ;
|
||||
man_N = man_N ;
|
||||
meat_N = meat_N ;
|
||||
moon_N = moon_N ;
|
||||
mother_N = UseN2 mother_N2 ;
|
||||
mountain_N = mountain_N ;
|
||||
mouth_N = regN "mouth" ;
|
||||
name_N = regN "name" ;
|
||||
neck_N = regN "neck" ;
|
||||
night_N = regN "night" ;
|
||||
nose_N = regN "nose" ;
|
||||
person_N = genderN human (regN "person") ;
|
||||
rain_N = regN "rain" ;
|
||||
river_N = river_N ;
|
||||
road_N = regN "road" ;
|
||||
root_N = regN "root" ;
|
||||
rope_N = regN "rope" ;
|
||||
salt_N = regN "salt" ;
|
||||
sand_N = regN "sand" ;
|
||||
sea_N = sea_N ;
|
||||
seed_N = regN "seed" ;
|
||||
skin_N = regN "skin" ;
|
||||
sky_N = regN "sky" ;
|
||||
smoke_N = regN "smoke" ;
|
||||
snake_N = snake_N ;
|
||||
snow_N = regN "snow" ;
|
||||
star_N = star_N ;
|
||||
stick_N = regN "stick" ;
|
||||
stone_N = stone_N ;
|
||||
sun_N = sun_N ;
|
||||
tail_N = regN "tail" ;
|
||||
tongue_N = regN "tongue" ;
|
||||
tooth_N = mk2N "tooth" "teeth" ;
|
||||
tree_N = tree_N ;
|
||||
water_N = water_N ;
|
||||
wife_N = genderN feminine (mk2N "wife" "wives") ;
|
||||
wind_N = regN "wind" ;
|
||||
wing_N = regN "wing" ;
|
||||
woman_N = woman_N ;
|
||||
worm_N = regN "worm" ;
|
||||
year_N = regN "year" ;
|
||||
|
||||
-- Verbs
|
||||
|
||||
bite_V = bite_V ;
|
||||
blow_V = blow_V ;
|
||||
breathe_V = regV "breathe" ;
|
||||
burn_V = burn_V ;
|
||||
come_V = come_V ;
|
||||
count_V = regV "count" ;
|
||||
cut_V = cut_V ;
|
||||
die_V = die_V ;
|
||||
dig_V = dig_V ;
|
||||
drink_V = drink_V ;
|
||||
eat_V = eat_V ;
|
||||
fall_V = fall_V ;
|
||||
fear_V = regV "fear" ;
|
||||
fight_V = fight_V ;
|
||||
float_V = regV "float" ;
|
||||
flow_V = regV "flow" ;
|
||||
fly_V = fly_V ;
|
||||
freeze_V = freeze_V ;
|
||||
give_V = give_V ;
|
||||
hear_V = hear_V ;
|
||||
hit_V = hit_V ;
|
||||
hold_V = hold_V ;
|
||||
hunt_V = regV "hunt" ;
|
||||
kill_V = regV "kill" ;
|
||||
know_V = know_V ;
|
||||
laugh_V = regV "laugh" ;
|
||||
lie_V = lie_V ;
|
||||
live_V = live_V ;
|
||||
play_V = UseV2 play_V2 ;
|
||||
pull_V = regV "pull" ;
|
||||
push_V = regV "push" ;
|
||||
rub_V = regDuplV "rub" ;
|
||||
say_V = say_V ;
|
||||
scratch_V = regV "scratch" ;
|
||||
see_V = see_V ;
|
||||
sew_V = sew_V ;
|
||||
sing_V = sing_V ;
|
||||
sit_V = sit_V ;
|
||||
sleep_V = sleep_V ;
|
||||
smell_V = regV "smell" ;
|
||||
spit_V = spit_V ;
|
||||
split_V = split_V ;
|
||||
squeeze_V = regV "squeeze" ;
|
||||
stab_V = regDuplV "stab" ;
|
||||
stand_V = stand_V ;
|
||||
suck_V = regV "suck" ;
|
||||
swell_V = swell_V ;
|
||||
swim_V = swim_V ;
|
||||
think_V = think_V ;
|
||||
throw_V = throw_V ;
|
||||
tie_V = regV "tie" ;
|
||||
turn_V = regV "turn" ;
|
||||
vomit_V = regV "vomit" ;
|
||||
walk_V = walk_V ;
|
||||
wash_V = regV "wash" ;
|
||||
wipe_V = regV "wipe" ;
|
||||
|
||||
}
|
||||
1522
lib/resource-0.9/english/SyntaxEng.gf
Normal file
1522
lib/resource-0.9/english/SyntaxEng.gf
Normal file
File diff suppressed because it is too large
Load Diff
31
lib/resource-0.9/english/TimeEng.gf
Normal file
31
lib/resource-0.9/english/TimeEng.gf
Normal file
@@ -0,0 +1,31 @@
|
||||
concrete TimeEng of Time = NumeralsEng **
|
||||
open Prelude, CategoriesEng, ParadigmsEng, MorphoEng in {
|
||||
|
||||
lincat
|
||||
Date = SS ;
|
||||
Weekday = N ;
|
||||
Hour = SS ;
|
||||
Minute = SS ;
|
||||
Time = SS ;
|
||||
|
||||
lin
|
||||
DayDate day = ss (day.s ! singular ! nominative) ;
|
||||
DayTimeDate day time = ss (day.s ! singular ! nominative ++ "at" ++ time.s) ;
|
||||
|
||||
FormalTime = infixSS ["hundred and"] ;
|
||||
PastTime h m = ss (m.s ++ "past" ++ h.s) ;
|
||||
ToTime h m = ss (m.s ++ "to" ++ h.s) ;
|
||||
ExactTime h = ss (h.s ++ "sharp") ;
|
||||
|
||||
NumHour n = {s = n.s ! NCard} ;
|
||||
NumMinute n = {s = n.s ! NCard} ;
|
||||
|
||||
monday = regN "Monday" ;
|
||||
tuesday = regN "Tuesday" ;
|
||||
wednesday = regN "Wednesday" ;
|
||||
thursday = regN "Thursday" ;
|
||||
friday = regN "Friday" ;
|
||||
saturday = regN "Saturday" ;
|
||||
sunday = regN "Sunday" ;
|
||||
|
||||
} ;
|
||||
112
lib/resource-0.9/english/TypesEng.gf
Normal file
112
lib/resource-0.9/english/TypesEng.gf
Normal file
@@ -0,0 +1,112 @@
|
||||
--1 English Word Classes and Morphological Parameters
|
||||
--
|
||||
-- This is a resource module for English morphology, defining the
|
||||
-- morphological parameters and word classes of English. It is aimed
|
||||
-- to be complete w.r.t. the description of word forms.
|
||||
-- However, it only includes those parameters that are needed for
|
||||
-- analysing individual words: such parameters are defined in syntax modules.
|
||||
--
|
||||
-- We use the language-independent prelude.
|
||||
|
||||
resource TypesEng = open Prelude in {
|
||||
|
||||
--
|
||||
--2 Enumerated parameter types
|
||||
--
|
||||
-- These types are the ones found in school grammars.
|
||||
-- Their parameter values are atomic.
|
||||
|
||||
param
|
||||
Number = Sg | Pl ;
|
||||
Gender = Neutr | Masc | Fem ;
|
||||
Case = Nom | Gen ;
|
||||
Person = P1 | P2 | P3 ;
|
||||
Degree = Pos | Comp | Sup ;
|
||||
|
||||
-- For data abstraction, we define
|
||||
|
||||
oper
|
||||
singular = Sg ;
|
||||
plural = Pl ;
|
||||
|
||||
--2 Word classes and hierarchical parameter types
|
||||
--
|
||||
-- Real parameter types (i.e. ones on which words and phrases depend)
|
||||
-- are often hierarchical. The alternative would be cross-products of
|
||||
-- simple parameters, but this would usually overgenerate.
|
||||
--
|
||||
|
||||
--3 Common nouns
|
||||
--
|
||||
-- Common nouns are inflected in number and case.
|
||||
|
||||
CommonNoun : Type = {s : Number => Case => Str} ;
|
||||
|
||||
|
||||
--
|
||||
--3 Adjectives
|
||||
--
|
||||
-- The major division is between the comparison degrees, but it
|
||||
-- is also good to leave room for adjectives that cannon be compared.
|
||||
-- It is, however, productive to form an adverbial from any adjective.
|
||||
|
||||
param AForm = AAdj | AAdv ;
|
||||
|
||||
oper
|
||||
Adjective : Type = SS1 AForm ;
|
||||
AdjDegr = {s : Degree => AForm => Str} ;
|
||||
|
||||
--3 Verbs
|
||||
--
|
||||
-- We treat the full conjugation now.
|
||||
-- The present tense is made to depend on person, which correspond to forms
|
||||
-- in the singular; plural forms are uniformly equal to the 2nd person singular.
|
||||
|
||||
param
|
||||
VForm = InfImp | Indic Number | Pastt | PPart | PresPart ;
|
||||
|
||||
-- This is for auxiliary verbs, which have special negated indicative forms.
|
||||
|
||||
AuxVerbForm = AInfImp | AIndic Person Bool | APastt Number Bool | APPart | APresPart ;
|
||||
|
||||
|
||||
oper
|
||||
VerbP3 : Type = {s : VForm => Str} ;
|
||||
|
||||
-- A full verb can moreover have a particle.
|
||||
|
||||
Particle : Type = Str ;
|
||||
Verb = VerbP3 ** {s1 : Particle} ;
|
||||
|
||||
AuxVerb = {s : AuxVerbForm => Str} ;
|
||||
|
||||
--
|
||||
--3 Pronouns
|
||||
--
|
||||
-- For pronouns, we need four case forms: "I" - "me" - "my" - "mine".
|
||||
|
||||
param
|
||||
NPForm = NomP | AccP | GenP | GenSP ;
|
||||
|
||||
oper
|
||||
Pronoun : Type =
|
||||
{s : NPForm => Str ; n : Number ; p : Person ; g : Gender} ;
|
||||
|
||||
-- Coercions between pronoun cases and ordinaty cases.
|
||||
|
||||
toCase : NPForm -> Case = \c -> case c of {GenP => Gen ; _ => Nom} ;
|
||||
toNPForm : Case -> NPForm = \c -> case c of {Gen => GenP ; _ => NomP} ; ---
|
||||
|
||||
--3 Proper names
|
||||
--
|
||||
-- Proper names only need two cases.
|
||||
|
||||
ProperName : Type = {s : Case => Str ; g : Gender} ;
|
||||
|
||||
--3 Relative pronouns
|
||||
--
|
||||
-- Relative pronouns are inflected in gender (human/nonhuman), number, and case.
|
||||
|
||||
RelPron : Type = {s : Gender => Number => NPForm => Str} ;
|
||||
} ;
|
||||
|
||||
63
lib/resource-0.9/english/VerbphraseEng.gf
Normal file
63
lib/resource-0.9/english/VerbphraseEng.gf
Normal file
@@ -0,0 +1,63 @@
|
||||
--# -path=.:../abstract:../../prelude
|
||||
|
||||
--1 The Top-Level English Resource Grammar: Combination Rules
|
||||
--
|
||||
-- Aarne Ranta 2002 -- 2003
|
||||
--
|
||||
-- This is the English concrete syntax of the multilingual resource
|
||||
-- grammar. Most of the work is done in the file $syntax.Eng.gf$.
|
||||
-- However, for the purpose of documentation, we make here explicit the
|
||||
-- linearization types of each category, so that their structures and
|
||||
-- dependencies can be seen.
|
||||
-- Another substantial part are the linearization rules of some
|
||||
-- structural words.
|
||||
--
|
||||
-- The users of the resource grammar should not look at this file for the
|
||||
-- linearization rules, which are in fact hidden in the document version.
|
||||
-- They should use $resource.Abs.gf$ to access the syntactic rules.
|
||||
-- This file can be consulted in those, hopefully rare, occasions in which
|
||||
-- one has to know how the syntactic categories are
|
||||
-- implemented. The parameter types are defined in $TypesEng.gf$.
|
||||
|
||||
concrete VerbphraseEng of Verbphrase = CategoriesEng **
|
||||
open Prelude, SyntaxEng in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
|
||||
lin
|
||||
UseV v = predClauseGroup v (complVerb v) ;
|
||||
UsePassV v = predClauseBeGroup (passVerb v) ;
|
||||
ComplV2 v x = predClauseGroup v (complTransVerb v x) ;
|
||||
ComplReflV2 v = predClauseGroup v (reflTransVerb v) ;
|
||||
ComplV3 v x y = predClauseGroup v (complDitransVerb v x y) ;
|
||||
ComplVS v x = predClauseGroup v (complSentVerb v x) ;
|
||||
ComplVV v x = predClauseGroup (aux2verb v) (complVerbVerb v x) ;
|
||||
ComplVQ v x = predClauseGroup v (complQuestVerb v x) ;
|
||||
ComplVA v x = predClauseGroup v (complAdjVerb v x) ;
|
||||
ComplV2A v x y = predClauseGroup v (complDitransAdjVerb v x y) ;
|
||||
ComplSubjV2V v x y = predClauseGroup v (complDitransVerbVerb False v x y) ;
|
||||
ComplObjV2V v x y = predClauseGroup v (complDitransVerbVerb True v x y) ;
|
||||
ComplV2S v x y = predClauseGroup v (complDitransSentVerb v x y) ;
|
||||
ComplV2Q v x y = predClauseGroup v (complDitransQuestVerb v x y) ;
|
||||
|
||||
PredAP v = predClauseBeGroup v.s ;
|
||||
PredCN v = predClauseBeGroup (complCommNoun v) ;
|
||||
PredNP v = predClauseBeGroup (complNounPhrase v) ;
|
||||
PredAdv v = predClauseBeGroup (complAdverb v) ;
|
||||
|
||||
PredProgVP = progressiveVerbPhrase ;
|
||||
|
||||
-- Use VPs
|
||||
|
||||
PredVP = predVerbGroupClause ;
|
||||
|
||||
RelVP = relVerbPhrase ;
|
||||
IntVP = intVerbPhrase ;
|
||||
|
||||
-- PosVP = predVerbGroup True ;
|
||||
-- NegVP = predVerbGroup False ;
|
||||
UseVP = predVerbGroup ;
|
||||
|
||||
AdvVP = adVerbPhrase ;
|
||||
SubjVP = subjunctVerbPhrase ;
|
||||
}
|
||||
179
lib/resource-0.9/english/VerbsEng.gf
Normal file
179
lib/resource-0.9/english/VerbsEng.gf
Normal file
@@ -0,0 +1,179 @@
|
||||
--# -path=.:../../prelude:../abstract
|
||||
|
||||
concrete VerbsEng of VerbsEngAbs = CategoriesEng ** open ParadigmsEng in {
|
||||
|
||||
lin
|
||||
awake_V = irregV "awake" "awoke" "awoken" ;
|
||||
bear_V = irregV "bear" "bore" "born" ;
|
||||
beat_V = irregV "beat" "beat" "beat" ;
|
||||
become_V = irregV "become" "became" "become" ;
|
||||
begin_V = irregV "begin" "began" "begun" ;
|
||||
bend_V = irregV "bend" "bent" "bent" ;
|
||||
beset_V = irregV "beset" "beset" "beset" ;
|
||||
bet_V = irregDuplV "bet" "bet" "bet" ;
|
||||
bid_V = irregDuplV "bid" (variants {"bid" ; "bade"}) (variants {"bid" ; "bidden"}) ;
|
||||
bind_V = irregV "bind" "bound" "bound" ;
|
||||
bite_V = irregV "bite" "bit" "bitten" ;
|
||||
bleed_V = irregV "bleed" "bled" "bled" ;
|
||||
blow_V = irregV "blow" "blew" "blown" ;
|
||||
break_V = irregV "break" "broke" "broken" ;
|
||||
breed_V = irregV "breed" "bred" "bred" ;
|
||||
bring_V = irregV "bring" "brought" "brought" ;
|
||||
broadcast_V = irregV "broadcast" "broadcast" "broadcast" ;
|
||||
build_V = irregV "build" "built" "built" ;
|
||||
burn_V = irregV "burn" (variants {"burned" ; "burnt"}) (variants {"burned" ; "burnt"}) ;
|
||||
burst_V = irregV "burst" "burst" "burst" ;
|
||||
buy_V = irregV "buy" "bought" "bought" ;
|
||||
cast_V = irregV "cast" "cast" "cast" ;
|
||||
catch_V = irregV "catch" "caught" "caught" ;
|
||||
choose_V = irregV "choose" "chose" "chosen" ;
|
||||
cling_V = irregV "cling" "clung" "clung" ;
|
||||
come_V = irregV "come" "came" "come" ;
|
||||
cost_V = irregV "cost" "cost" "cost" ;
|
||||
creep_V = irregV "creep" "crept" "crept" ;
|
||||
cut_V = irregDuplV "cut" "cut" "cut" ;
|
||||
deal_V = irregV "deal" "dealt" "dealt" ;
|
||||
dig_V = irregDuplV "dig" "dug" "dug" ;
|
||||
dive_V = irregV "dive" (variants {"dived" ; "dove"}) "dived" ;
|
||||
do_V = mkV "do" "does" "did" "done" "doing" ;
|
||||
draw_V = irregV "draw" "drew" "drawn" ;
|
||||
dream_V = irregV "dream" (variants {"dreamed" ; "dreamt"}) (variants {"dreamed" ; "dreamt"}) ;
|
||||
drive_V = irregV "drive" "drove" "driven" ;
|
||||
drink_V = irregV "drink" "drank" "drunk" ;
|
||||
eat_V = irregV "eat" "ate" "eaten" ;
|
||||
fall_V = irregV "fall" "fell" "fallen" ;
|
||||
feed_V = irregV "feed" "fed" "fed" ;
|
||||
feel_V = irregV "feel" "felt" "felt" ;
|
||||
fight_V = irregV "fight" "fought" "fought" ;
|
||||
find_V = irregV "find" "found" "found" ;
|
||||
fit_V = irregDuplV "fit" "fit" "fit" ;
|
||||
flee_V = irregV "flee" "fled" "fled" ;
|
||||
fling_V = irregV "fling" "flung" "flung" ;
|
||||
fly_V = irregV "fly" "flew" "flown" ;
|
||||
forbid_V = irregDuplV "forbid" "forbade" "forbidden" ;
|
||||
forget_V = irregDuplV "forget" "forgot" "forgotten" ;
|
||||
forgive_V = irregV "forgive" "forgave" "forgiven" ;
|
||||
forsake_V = irregV "forsake" "forsook" "forsaken" ;
|
||||
freeze_V = irregV "freeze" "froze" "frozen" ;
|
||||
get_V = irregDuplV "get" "got" "gotten" ;
|
||||
give_V = irregV "give" "gave" "given" ;
|
||||
go_V = irregV "go" "went" "gone" ;
|
||||
grind_V = irregV "grind" "ground" "ground" ;
|
||||
grow_V = irregV "grow" "grew" "grown" ;
|
||||
hang_V = irregV "hang" "hung" "hung" ;
|
||||
have_V = mkV "have" "has" "had" "had" "having" ;
|
||||
hear_V = irregV "hear" "heard" "heard" ;
|
||||
hide_V = irregV "hide" "hid" "hidden" ;
|
||||
hit_V = irregDuplV "hit" "hit" "hit" ;
|
||||
hold_V = irregV "hold" "held" "held" ;
|
||||
hurt_V = irregV "hurt" "hurt" "hurt" ;
|
||||
keep_V = irregV "keep" "kept" "kept" ;
|
||||
kneel_V = irregV "kneel" "knelt" "knelt" ;
|
||||
knit_V = irregDuplV "knit" "knit" "knit" ;
|
||||
know_V = irregV "know" "knew" "know" ;
|
||||
lay_V = irregV "lay" "laid" "laid" ;
|
||||
lead_V = irregV "lead" "led" "led" ;
|
||||
leap_V = irregV "leap" (variants {"leaped" ; "lept"}) (variants {"leaped" ; "lept"}) ;
|
||||
learn_V = irregV "learn" (variants {"learned" ; "learnt"}) (variants {"learned" ; "learnt"}) ;
|
||||
leave_V = irregV "leave" "left" "left" ;
|
||||
lend_V = irregV "lend" "lent" "lent" ;
|
||||
let_V = irregDuplV "let" "let" "let" ;
|
||||
lie_V = irregV "lie" "lay" "lain" ;
|
||||
light_V = irregV "light" (variants {"lighted" ; "lit"}) "lighted" ;
|
||||
lose_V = irregV "lose" "lost" "lost" ;
|
||||
make_V = irregV "make" "made" "made" ;
|
||||
mean_V = irregV "mean" "meant" "meant" ;
|
||||
meet_V = irregV "meet" "met" "met" ;
|
||||
misspell_V = irregV "misspell" (variants {"misspelled" ; "misspelt"}) (variants {"misspelled" ; "misspelt"}) ;
|
||||
mistake_V = irregV "mistake" "mistook" "mistaken" ;
|
||||
mow_V = irregV "mow" "mowed" (variants {"mowed" ; "mown"}) ;
|
||||
overcome_V = irregV "overcome" "overcame" "overcome" ;
|
||||
overdo_V = mkV "overdo" "overdoes" "overdid" "overdone" "overdoing" ;
|
||||
overtake_V = irregV "overtake" "overtook" "overtaken" ;
|
||||
overthrow_V = irregV "overthrow" "overthrew" "overthrown" ;
|
||||
pay_V = irregV "pay" "paid" "paid" ;
|
||||
plead_V = irregV "plead" "pled" "pled" ;
|
||||
prove_V = irregV "prove" "proved" (variants {"proved" ; "proven"}) ;
|
||||
put_V = irregDuplV "put" "put" "put" ;
|
||||
quit_V = irregDuplV "quit" "quit" "quit" ;
|
||||
read_V = irregV "read" "read" "read" ;
|
||||
rid_V = irregDuplV "rid" "rid" "rid" ;
|
||||
ride_V = irregV "ride" "rode" "ridden" ;
|
||||
ring_V = irregV "ring" "rang" "rung" ;
|
||||
rise_V = irregV "rise" "rose" "risen" ;
|
||||
run_V = irregDuplV "run" "ran" "run" ;
|
||||
saw_V = irregV "saw" "sawed" (variants {"sawed" ; "sawn"}) ;
|
||||
say_V = irregV "say" "said" "said" ;
|
||||
see_V = irregV "see" "saw" "seen" ;
|
||||
seek_V = irregV "seek" "sought" "sought" ;
|
||||
sell_V = irregV "sell" "sold" "sold" ;
|
||||
send_V = irregV "send" "sent" "sent" ;
|
||||
set_V = irregDuplV "set" "set" "set" ;
|
||||
sew_V = irregV "sew" "sewed" (variants {"sewed" ; "sewn"}) ;
|
||||
shake_V = irregV "shake" "shook" "shaken" ;
|
||||
shave_V = irregV "shave" "shaved" (variants {"shaved" ; "shaven"}) ;
|
||||
shear_V = irregV "shear" "shore" "shorn" ;
|
||||
shed_V = irregDuplV "shed" "shed" "shed" ;
|
||||
shine_V = irregV "shine" "shone" "shone" ;
|
||||
shoe_V = irregV "shoe" "shoed" (variants {"shoed" ; "shod"}) ;
|
||||
shoot_V = irregV "shoot" "shot" "shot" ;
|
||||
show_V = irregV "show" "showed" (variants {"showed" ; "shown"}) ;
|
||||
shrink_V = irregV "shrink" "shrank" "shrunk" ;
|
||||
shut_V = irregDuplV "shut" "shut" "shut" ;
|
||||
sing_V = irregV "sing" "sang" "sung" ;
|
||||
sink_V = irregV "sink" "sank" "sunk" ;
|
||||
sit_V = irregDuplV "sit" "sat" "sat" ;
|
||||
sleep_V = irregV "sleep" "slept" "slept" ;
|
||||
slay_V = irregV "slay" "slew" "slain" ;
|
||||
slide_V = irregV "slide" "slid" "slid" ;
|
||||
sling_V = irregV "sling" "slung" "slung" ;
|
||||
slit_V = irregDuplV "slit" "slit" "slit" ;
|
||||
smite_V = irregV "smite" "smote" "smitten" ;
|
||||
sow_V = irregV "sow" "sowed" (variants {"sowed" ; "sown"}) ;
|
||||
speak_V = irregV "speak" "spoke" "spoken" ;
|
||||
speed_V = irregV "speed" "sped" "sped" ;
|
||||
spend_V = irregV "spend" "spent" "spent" ;
|
||||
spill_V = irregV "spill" (variants {"spilled" ; "spilt"}) (variants {"spilled" ; "spilt"}) ;
|
||||
spin_V = irregDuplV "spin" "spun" "spun" ;
|
||||
spit_V = irregDuplV "spit" (variants {"spit" ; "spat"}) "spit" ;
|
||||
split_V = irregDuplV "split" "split" "split" ;
|
||||
spread_V = irregV "spread" "spread" "spread" ;
|
||||
spring_V = irregV "spring" (variants {"sprang" ; "sprung"}) "sprung" ;
|
||||
stand_V = irregV "stand" "stood" "stood" ;
|
||||
steal_V = irregV "steal" "stole" "stolen" ;
|
||||
stick_V = irregV "stick" "stuck" "stuck" ;
|
||||
sting_V = irregV "sting" "stung" "stung" ;
|
||||
stink_V = irregV "stink" "stank" "stunk" ;
|
||||
stride_V = irregV "stride" "strod" "stridden" ;
|
||||
strike_V = irregV "strike" "struck" "struck" ;
|
||||
string_V = irregV "string" "strung" "strung" ;
|
||||
strive_V = irregV "strive" "strove" "striven" ;
|
||||
swear_V = irregV "swear" "swore" "sworn" ;
|
||||
sweep_V = irregV "sweep" "swept" "swept" ;
|
||||
swell_V = irregV "swell" "swelled" (variants {"swelled" ; "swollen"}) ;
|
||||
swim_V = irregDuplV "swim" "swam" "swum" ;
|
||||
swing_V = irregV "swing" "swung" "swung" ;
|
||||
take_V = irregV "take" "took" "taken" ;
|
||||
teach_V = irregV "teach" "taught" "taught" ;
|
||||
tear_V = irregV "tear" "tore" "torn" ;
|
||||
tell_V = irregV "tell" "told" "told" ;
|
||||
think_V = irregV "think" "thought" "thought" ;
|
||||
thrive_V = irregV "thrive" (variants {"thrived" ; "throve"}) "thrived" ;
|
||||
throw_V = irregV "throw" "threw" "thrown" ;
|
||||
thrust_V = irregV "thrust" "thrust" "thrust" ;
|
||||
tread_V = irregV "tread" "trod" "trodden" ;
|
||||
understand_V = irregV "understand" "understood" "understood" ;
|
||||
uphold_V = irregV "uphold" "upheld" "upheld" ;
|
||||
upset_V = irregDuplV "upset" "upset" "upset" ;
|
||||
wake_V = irregV "wake" "woke" "woken" ;
|
||||
wear_V = irregV "wear" "wore" "worn" ;
|
||||
weave_V = irregV "weave" (variants {"weaved" ; "wove"}) (variants {"weaved" ; "woven"}) ;
|
||||
wed_V = irregDuplV "wed" "wed" "wed" ;
|
||||
weep_V = irregV "weep" "wept" "wept" ;
|
||||
wind_V = irregV "wind" "wound" "wound" ;
|
||||
win_V = irregDuplV "win" "won" "won" ;
|
||||
withhold_V = irregV "withhold" "withheld" "withheld" ;
|
||||
withstand_V = irregV "withstand" "withstood" "withstood" ;
|
||||
wring_V = irregV "wring" "wrung" "wrung" ;
|
||||
write_V = irregV "write" "wrote" "written" ;
|
||||
}
|
||||
177
lib/resource-0.9/english/VerbsEngAbs.gf
Normal file
177
lib/resource-0.9/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 ;
|
||||
}
|
||||
175
lib/resource-0.9/english/verbs.txt
Normal file
175
lib/resource-0.9/english/verbs.txt
Normal file
@@ -0,0 +1,175 @@
|
||||
-- http://www2.gsu.edu/~wwwesl/egw/verbs.htm
|
||||
awake awoke awoken
|
||||
-- be was, were been
|
||||
bear bore born
|
||||
beat beat beat
|
||||
become became become
|
||||
begin began begun
|
||||
bend bent bent
|
||||
beset beset beset
|
||||
bet bet bet
|
||||
bid bid/bade bid/bidden
|
||||
bind bound bound
|
||||
bite bit bitten
|
||||
bleed bled bled
|
||||
blow blew blown
|
||||
break broke broken
|
||||
breed bred bred
|
||||
bring brought brought
|
||||
broadcast broadcast broadcast
|
||||
build built built
|
||||
burn burned/burnt burned/burnt
|
||||
burst burst burst
|
||||
buy bought bought
|
||||
cast cast cast
|
||||
catch caught caught
|
||||
choose chose chosen
|
||||
cling clung clung
|
||||
come came come
|
||||
cost cost cost
|
||||
creep crept crept
|
||||
cut cut cut
|
||||
deal dealt dealt
|
||||
dig dug dug
|
||||
dive dived/dove dived
|
||||
do did done
|
||||
draw drew drawn
|
||||
dream dreamed/dreamt dreamed/dreamt
|
||||
drive drove driven
|
||||
drink drank drunk
|
||||
eat ate eaten
|
||||
fall fell fallen
|
||||
feed fed fed
|
||||
feel felt felt
|
||||
fight fought fought
|
||||
find found found
|
||||
fit fit fit
|
||||
flee fled fled
|
||||
fling flung flung
|
||||
fly flew flown
|
||||
forbid forbade forbidden
|
||||
forget forgot forgotten
|
||||
-- forego (forgo) forewent foregone
|
||||
forgive forgave forgiven
|
||||
forsake forsook forsaken
|
||||
freeze froze frozen
|
||||
get got gotten
|
||||
give gave given
|
||||
go went gone
|
||||
grind ground ground
|
||||
grow grew grown
|
||||
hang hung hung
|
||||
hear heard heard
|
||||
hide hid hidden
|
||||
hit hit hit
|
||||
hold held held
|
||||
hurt hurt hurt
|
||||
keep kept kept
|
||||
kneel knelt knelt
|
||||
knit knit knit
|
||||
know knew know
|
||||
lay laid laid
|
||||
lead led led
|
||||
leap leaped/lept leaped/lept
|
||||
learn learned/learnt learned/learnt
|
||||
leave left left
|
||||
lend lent lent
|
||||
let let let
|
||||
lie lay lain
|
||||
light lighted/lit lighted
|
||||
lose lost lost
|
||||
make made made
|
||||
mean meant meant
|
||||
meet met met
|
||||
misspell misspelled/misspelt misspelled/misspelt
|
||||
mistake mistook mistaken
|
||||
mow mowed mowed/mown
|
||||
overcome overcame overcome
|
||||
overdo overdid overdone
|
||||
overtake overtook overtaken
|
||||
overthrow overthrew overthrown
|
||||
pay paid paid
|
||||
plead pled pled
|
||||
prove proved proved/proven
|
||||
put put put
|
||||
quit quit quit
|
||||
read read read
|
||||
rid rid rid
|
||||
ride rode ridden
|
||||
ring rang rung
|
||||
rise rose risen
|
||||
run ran run
|
||||
saw sawed sawed/sawn
|
||||
say said said
|
||||
see saw seen
|
||||
seek sought sought
|
||||
sell sold sold
|
||||
send sent sent
|
||||
set set set
|
||||
sew sewed sewed/sewn
|
||||
shake shook shaken
|
||||
shave shaved shaved/shaven
|
||||
shear shore shorn
|
||||
shed shed shed
|
||||
shine shone shone
|
||||
shoe shoed shoed/shod
|
||||
shoot shot shot
|
||||
show showed showed/shown
|
||||
shrink shrank shrunk
|
||||
shut shut shut
|
||||
sing sang sung
|
||||
sink sank sunk
|
||||
sit sat sat
|
||||
sleep slept slept
|
||||
slay slew slain
|
||||
slide slid slid
|
||||
sling slung slung
|
||||
slit slit slit
|
||||
smite smote smitten
|
||||
sow sowed sowed/sown
|
||||
speak spoke spoken
|
||||
speed sped sped
|
||||
spend spent spent
|
||||
spill spilled/spilt spilled/spilt
|
||||
spin spun spun
|
||||
spit spit/spat spit
|
||||
split split split
|
||||
spread spread spread
|
||||
spring sprang/sprung sprung
|
||||
stand stood stood
|
||||
steal stole stolen
|
||||
stick stuck stuck
|
||||
sting stung stung
|
||||
stink stank stunk
|
||||
stride strod stridden
|
||||
strike struck struck
|
||||
string strung strung
|
||||
strive strove striven
|
||||
swear swore sworn
|
||||
sweep swept swept
|
||||
swell swelled swelled/swollen
|
||||
swim swam swum
|
||||
swing swung swung
|
||||
take took taken
|
||||
teach taught taught
|
||||
tear tore torn
|
||||
tell told told
|
||||
think thought thought
|
||||
thrive thrived/throve thrived
|
||||
throw threw thrown
|
||||
thrust thrust thrust
|
||||
tread trod trodden
|
||||
understand understood understood
|
||||
uphold upheld upheld
|
||||
upset upset upset
|
||||
wake woke woken
|
||||
wear wore worn
|
||||
weave weaved/wove weaved/woven
|
||||
wed wed wed
|
||||
weep wept wept
|
||||
wind wound wound
|
||||
win won won
|
||||
withhold withheld withheld
|
||||
withstand withstood withstood
|
||||
wring wrung wrung
|
||||
write wrote written
|
||||
Reference in New Issue
Block a user