diff --git a/resource-1.0/abstract/Lexicon.gf b/resource-1.0/abstract/Lexicon.gf index 837fac26f..3d82e1eec 100644 --- a/resource-1.0/abstract/Lexicon.gf +++ b/resource-1.0/abstract/Lexicon.gf @@ -1,47 +1,47 @@ ---1 A Lexicon Lexicon - --- This files gives a list of words whose purpose is to test the GF --- resource grammar. It covers all lexical categories of [Cat Cat.html]. --- By containing some of the most common words, --- it is aimed to cover, with high probability, all morphological --- patterns in the different languages. - --- Using this lexicon for translation is not recommended. The linearizations --- of the words in different languages are not guaranteed to be translation --- equivalents. - abstract Lexicon = Cat ** { - fun +fun add_V3 : V3 ; airplane_N : N ; already_Adv : Adv ; + animal_N : N ; answer_V2S : V2 ; apartment_N : N ; apple_N : N ; art_N : N ; + ashes_N : N ; ask_V2Q : V2 ; baby_N : N ; + back_N : N ; bad_A : A ; bank_N : N ; + bark_N : N ; beautiful_A : A ; become_VA : VA ; beer_N : N ; beg_V2V : V2 ; + belly_N : N ; big_A : A ; bike_N : N ; bird_N : N ; + bite_V2 : V2 ; black_A : A ; + blood_N : N ; + blow_V : V ; blue_A : A ; boat_N : N ; + bone_N : N ; book_N : N ; boot_N : N ; boss_N : N ; boy_N : N ; bread_N : N ; break_V2 : V2 ; + breast_N : N ; + breathe_V : V ; broad_A : A ; brother_N2 : N2 ; brown_A : A ; + burn_V : V ; butter_N : N ; buy_V2 : V2 ; camera_N : N ; @@ -58,82 +58,147 @@ abstract Lexicon = Cat ** { clean_A : A ; clever_A : A ; close_V2 : V2 ; + cloud_N : N ; coat_N : N ; cold_A : A ; come_V : V ; computer_N : N ; + correct_A : A ; country_N : N ; + count_V2 : V2 ; cousin_N : N ; cow_N : N ; + cut_V2 : V2 ; + day_N : N ; die_V : V ; + dig_V : V ; dirty_A : A ; distance_N3 : N3 ; - do_V2 : V2 ; doctor_N : N ; dog_N : N ; door_N : N ; + do_V2 : V2 ; drink_V2 : V2 ; + drink_V2 : V2 ; + dry_A : A ; + dull_A : A ; + dust_N : N ; + ear_N : N ; + earth_N : N ; easy_A2V : A2 ; eat_V2 : V2 ; - enemy_N : N ; + eat_V2 : V2 ; + egg_N : N ; empty_A : A ; + enemy_N : N ; + eye_N : N ; factory_N : N ; + fall_V : V ; + far_Adv : Adv ; father_N2 : N2 ; + fat_N : N ; fear_VS : VS ; + fear_V2 : V2 ; + feather_N : N ; + fight_V2 : V2 ; find_V2 : V2 ; + fingernail_N : N ; + fire_N : N ; fish_N : N ; + float_V : V ; floor_N : N ; + flower_N : N ; + flow_V : V ; + fly_V : V ; + fog_N : N ; + foot_N : N ; + forest_N : N ; forget_V2 : V2 ; + freeze_V : V ; fridge_N : N ; friend_N : N ; fruit_N : N ; + full_A : A ; + fun fun_AV : A ; garden_N : N ; girl_N : N ; + give_V3 : V3 ; glove_N : N ; gold_N : N ; good_A : A ; go_V : V ; + grass_N : N ; green_A : A ; + guts_N : N ; + hair_N : N ; + hand_N : N ; harbour_N : N ; hate_V2 : V2 ; hat_N : N ; have_V2 : V2 ; + head_N : N ; + heart_N : N ; hear_V2 : V2 ; + hear_V2 : V2 ; + heavy_A : A ; hill_N : N ; + hit_V2 : V2 ; + hold_V2 : V2 ; hope_VS : VS ; + horn_N : N ; horse_N : N ; hot_A : A ; house_N : N ; + hunt_V2 : V2 ; + husband_N : N ; + ice_N : N ; important_A : A ; industry_N : N ; iron_N : N ; jump_V : V ; + kill_V2 : V2 ; king_N : N ; + knee_N : N ; + know_V2 : V2 ; know_V2 : V2 ; lake_N : N ; lamp_N : N ; + laugh_V : V ; + leaf_N : N ; learn_V2 : V2 ; leather_N : N ; leave_V2 : V2 ; + left_Ord : Ord ; + leg_N : N ; + lie_V : V ; like_V2 : V2 ; listen_V2 : V2 ; + liver_N : N ; live_V : V ; long_A : A ; lose_V2 : V2 ; + louse_N : N ; love_N : N ; love_V2 : V2 ; man_N : N ; married_A2 : A2 ; meat_N : N ; + meat_N : N ; milk_N : N ; moon_N : N ; mother_N2 : N2 ; mountain_N : N ; + mouth_N : N ; music_N : N ; + name_N : N ; narrow_A : A ; + near_A : A ; + neck_N : N ; new_A : A ; newspaper_N : N ; + night_N : N ; + nose_N : N ; now_Adv : Adv ; number_N : N ; oil_N : N ; @@ -144,33 +209,52 @@ abstract Lexicon = Cat ** { paris_PN : PN ; peace_N : N ; pen_N : N ; + person_N : N ; planet_N : N ; plastic_N : N ; play_V2 : V2 ; + play_V : V ; policeman_N : N ; priest_N : N ; probable_AS : A ; + pull_V2 : V2 ; + push_V2 : V2 ; put_V2 : V2 ; queen_N : N ; radio_N : N ; + rain_N : N ; rain_V0 : V ; read_V2 : V2 ; red_A : A ; religion_N : N ; restaurant_N : N ; + right_Ord : Ord ; river_N : N ; + road_N : N ; rock_N : N ; roof_N : N ; + root_N : N ; + rope_N : N ; + rotten_A : A ; + round_A : A ; rubber_N : N ; + rub_V2 : V2 ; run_V : V ; + salt_N : N ; + sand_N : N ; say_VS : VS ; school_N : N ; science_N : N ; + scratch_V2 : V2 ; sea_N : N ; + seed_N : N ; seek_V2 : V2 ; see_V2 : V2 ; + see_V2 : V2 ; sell_V3 : V3 ; send_V3 : V3 ; + sew_V : V ; + sharp_A : A ; sheep_N : N ; ship_N : N ; shirt_N : N ; @@ -178,52 +262,87 @@ abstract Lexicon = Cat ** { shop_N : N ; short_A : A ; silver_N : N ; + sing_V : V ; sister_N : N ; + sit_V : V ; + skin_N : N ; + sky_N : N ; sleep_V : V ; small_A : A ; + smell_V : V ; + smoke_N : N ; + smooth_A : A ; snake_N : N ; + snow_N : N ; sock_N : N ; song_N : N ; speak_V2 : V2 ; + spit_V : V ; + split_V2 : V2 ; + squeeze_V2 : V2 ; + stab_V2 : V2 ; + stand_V : V ; star_N : N ; steel_N : N ; + stick_N : N ; stone_N : N ; stop_V : V ; stove_N : N ; + straight_A : A ; student_N : N ; stupid_A : A ; + suck_V2 : V2 ; sun_N : N ; + swell_V : V ; + swim_V : V ; switch8off_V2 : V2 ; switch8on_V2 : V2 ; table_N : N ; + tail_N : N ; talk_V3 : V3 ; teacher_N : N ; teach_V2 : V2 ; television_N : N ; thick_A : A ; thin_A : A ; + think_V : V ; + throw_V2 : V2 ; + tie_V2 : V2 ; + tongue_N : N ; + tooth_N : N ; train_N : N ; travel_V : V ; tree_N : N ; - ---- trousers_N : N ; + turn_V : V ; ugly_A : A ; understand_V2 : V2 ; university_N : N ; village_N : N ; + vomit_V : V ; wait_V2 : V2 ; walk_V : V ; warm_A : A ; war_N : N ; + wash_V2 : V2 ; watch_V2 : V2 ; water_N : N ; + water_N : N ; + wet_A : A ; white_A : A ; + wide_A : A ; + wife_N : N ; + wind_N : N ; window_N : N ; wine_N : N ; + wing_N : N ; win_V2 : V2 ; + wipe_V2 : V2 ; woman_N : N ; wonder_VQ : VQ ; wood_N : N ; + worm_N : N ; write_V2 : V2 ; + year_N : N ; yellow_A : A ; young_A : A ; diff --git a/resource-1.0/abstract/Structural.gf b/resource-1.0/abstract/Structural.gf index 477f969f7..ea3fe0301 100644 --- a/resource-1.0/abstract/Structural.gf +++ b/resource-1.0/abstract/Structural.gf @@ -38,6 +38,7 @@ abstract Structural = Cat ** { everything_NP : NP ; everywhere_Adv : Adv ; first_Ord : Ord ; + few_Det : Det ; from_Prep : Prep ; he_Pron : Pron ; here_Adv : Adv ; diff --git a/resource-1.0/doc/clt2006.html b/resource-1.0/doc/clt2006.html index 4ee440495..b7e180545 100644 --- a/resource-1.0/doc/clt2006.html +++ b/resource-1.0/doc/clt2006.html @@ -7,7 +7,7 @@
@@ -274,9 +274,7 @@ Rosetta Machine Translation (B
-===Languages==== -
+The current GF Resource Project covers ten languages:
@@ -302,9 +300,7 @@ API 1.0 not yet implemented for Danish and Russian-
-===Morphology==== -
+Complete inflection engine
@@ -315,24 +311,20 @@ Complete inflection engine
-High-level access via ParadigmsX; e.g. Swedish:
+Basic lexicon
- mkV : (supa,super,sup,söp,supit,supen : Str) -> V ; --
- regV : (talar : Str) -> V ; - irregV : (dricka, drack, druckit : Str) -> V ; --
IrregX:
-
- draga_V : V =
- mkV (variants { "dra"; "draga"}) (variants { "drar" ; "drager"})
- (variants { "dra" ; "drag" }) "drog" "dragit" "dragen" ;
-
++It is more important to enable lexicon extensions than to +provide a huge lexicon. +
+
@@ -340,7 +332,32 @@ High-level access via ParadigmsX; e.g. Swedish:
-
+Texts:
+sequences of phrases with punctuation
+
+Phrases: +declaratives, questions, imperatives, vocatives +
++Tense, mood, and polarity: +present, past, future, conditional ; similtaneous, anterior ; positive, negative +
++Questions: +yes-no, "wh" ; direct, indirect +
++Clauses: +main, relative, embedded (subject, object, adverbial) +
++Verb phrases: +intransitive, transitive, ditransitive, prepositional +
++Noun phrases: +proper names, pronouns, determiners, possessives, cardinals and ordinals
@@ -378,15 +395,125 @@ Lines of source code (4/3/2006):
-
+
+
-
+ John walks. + + TFullStop : Phr -> Text -> Text + (PhrUtt : PConj -> Utt -> Voc -> Phr + NoPConj + (UttS : S -> Utt + (UseCl : Tense -> Anter -> Pol -> Cl -> S + TPres + ASimul + PPos + (PredVP : NP -> VP -> Cl + (UsePN : PN -> NP + john_PN) + (UseV : V -> VP + walk_V)))) + NoVoc) + TEmpty ++ +
+ +
+
+
+
+Every language implements these regular patterns that take +"dictionary forms" as arguments. +
++ regN : Str -> N + regA : Str -> A + regV : Str -> V ++
+Their usefulness varies. For instance, they +all are quite good in Finnish and English. +In Swedish, less so: +
++ regN "val" ---> val, valen, valar, valarna ++
+Initializing a lexicon with regXs is
+usually a good starting point in grammar development.
+
+ +
+
+In Swedish, giving the gender of N improves a lot
+
+ regGenN "val" neutrum ---> val, valet, val, valen ++ +
+There are also special constructs taking other forms: +
++ mk2N : (nyckel,nycklar : Str) -> N + mk1N : (bilarna : Str) -> N + + irregV : (dricka, drack, druckit : Str) -> V ++ +
+Regular verbs are actually implemented the +Lexin way +
++ regV : (talar : Str) -> N ++ +
+ +
++To cover all situations, worst-case paradigms are given. E.g. Swedish +
++ mkN : (apa,apan,apor,aporna : Str) -> N + mkA : (liten, litet, lilla, sma, mindre, minst, minsta : Str) -> A + mkV : (supa,super,sup,söp,supit,supen : Str) -> V ++ +
+ +
+
+Iregular words in IrregX, e.g. Swedish:
+
+ draga_V : V =
+ mkV (variants { "dra"; "draga"}) (variants { "drar" ; "drager"})
+ (variants { "dra" ; "drag" }) "drog" "dragit" "dragen" ;
+
++Goal: eliminate the user's need of worst-case functions. +
@@ -395,6 +522,20 @@ Lines of source code (4/3/2006):
+Syntactic structures that are not shared by all languages. +
++Not implemented yet. +
++Candidates: +
+Nor post-possessives: bilen min
+Fre question forms: est-ce que tu dors ?
+@@ -402,20 +543,127 @@ Lines of source code (4/3/2006):
+
+It is a good idea to compile the library, so that it can be opened faster +
++ GF/lib/resource-1.0% make + + writes GF/lib/alltenses + GF/lib/present + GF/lib/resource-1.0/langs.gfcm ++
+If you don't intend to change the library, you never need to process the source +files again. Just do some of +
++ gf -nocf langs.gfcm -- all 8 languages + + gf -nocf -path=alltenses:prelude alltenses/LangSwe.gfc -- Swedish only + + gf -nocf -path=alltenses:prelude present/LangSwe.gfc -- Swedish only, present tense only ++ +
+ +
+The default parser does not work! +
++The MCFG parser works in some languages, after waiting appr. 20 seconds +
++ p -mcfg -lang=LangEng -cat=S "I would see her" + + p -mcfg -lang=LangSwe -cat=S "jag skulle se henne" + + p -mcfg -lang=LangNor -cat=S "jeg ville se henne" + ++
+Parsing in present/ versions is quicker.
+
+Multilingual treebank entry = tree + linearizations +
+
+Some examples on treebank generation, assuming langs.gfcm
+
+ gr -cat=S -number=10 -cf | tb -- 10 random S + + gt -cat=Phr -depth=4 | tb -xml | wf ex.xml -- all Phr to depth 4, into file ex.xml ++
+Regression testing +
++ rf ex.xml | tb -c -- read treebank from file and compare to present grammars ++
+Updating a treebank +
++ rf old.xml | tb -trees | tb -xml | wf new.xml -- read old from file, write new to file ++ +
+Brute-force method that helps if real parsing is more expensive. +
++ make treebank -- make treebank with all languages + + gf -treebank langs.xml -- start GF by reading the treebank + + > ut -strings -treebank=LangIta -- show all Ita strings + + > ut -treebank=LangIta -raw "Quello non si romperebbe" -- look up a string + + > i -nocf langs.gfcm -- read grammar to be able to linearize + + > ut -treebank=LangIta "Quello non si romperebbe" | l -multi -- translate to all ++ +
+Use morphological analyser +
++ gf -nocf -retain -path=alltenses:prelude alltenses/LangSwe.gf + > ma "jag kan inte höra vad du säger" ++ +
+Try out a morphology quiz +
++ > mq -cat=V ++ +
+Try out inflection patterns +
++ gf -retain -path=alltenses:prelude alltenses/ParadigmsSwe.gfr + > cc regV "lyser" ++ +
@@ -423,6 +671,16 @@ Lines of source code (4/3/2006):
+We start a demo by +
++ gfeditor langs.gfcm ++ +
+
+