From 328cf308f3e4c85599fbcffbd9cb62bb24fc8804 Mon Sep 17 00:00:00 2001 From: aarne Date: Fri, 11 Mar 2005 14:37:18 +0000 Subject: [PATCH] Norwegian Swadesh (raw); bug fix in TC of variants --- doc/gf-index.html | 8 + examples/stoneage/StoneageNor.gf | 243 ++++++++++++++++++++++++++++ examples/stoneage/StoneageResNor.gf | 15 ++ src/GF/Compile/CheckGrammar.hs | 6 +- 4 files changed, 269 insertions(+), 3 deletions(-) create mode 100644 examples/stoneage/StoneageNor.gf create mode 100644 examples/stoneage/StoneageResNor.gf diff --git a/doc/gf-index.html b/doc/gf-index.html index 65df54867..29c5b8ce0 100644 --- a/doc/gf-index.html +++ b/doc/gf-index.html @@ -18,6 +18,14 @@ November 8, 2004.

News

+March 10, 2005. +Demo film +of a multimodal dialogue system built with embedded GF grammars. + +

+ + November 9, 2004. PhD Thesis by Peter Ljunglöf: diff --git a/examples/stoneage/StoneageNor.gf b/examples/stoneage/StoneageNor.gf new file mode 100644 index 000000000..3fe4d87ea --- /dev/null +++ b/examples/stoneage/StoneageNor.gf @@ -0,0 +1,243 @@ +--# -path=.:../../lib/resource/abstract:../../lib/prelude:../../lib/resource/norwegian:../../lib/resource/scandinavian +concrete StoneageNor of Stoneage + = open SyntaxNor, ResourceNor, ParadigmsNor, VerbsNor, SwadeshLexNor, StoneageResNor in { + +--- rough-translated from Swedish by AR 11/3/2005. To be fixed soon. + +flags + startcat=S; optimize=share; + +lincat + S = Phr ; + NP = NP ; + N = N; + CN = CN ; + +lin + + -- Sentence conjunction + +-- AndS s1 s2 = { s = s1.s ++ and_Conj.s ++ s2.s } ** { lock_Phr = <> } ; + + -- NP conjunction + +-- AndNP n1 n2 = ConjNP and_Conj (TwoNP n1 n2); + + Drink = PresVasV2 drink_V ; + Eat = PresVasV2 eat_V ; + Bite = PresVasV2 bite_V ; + Suck = PresVasV2 suck_V ; + See = PresVasV2 see_V ; + Hear = PresVasV2 hear_V ; + Know = PresVasV2 know_V ; + Think = PresVasV2 think_V ; + Smell s o = PresCl (SPredV2 s (dirV2 kenne_V) (DefOneNP + (AdvCN (UseN (mk2N "lukt" "lukten")) + (PrepNP possess_Prep o)))) ; + Fear = PresVasV2 fear_V ; + Kill = PresVasV2 kill_V ; + Fight s o = PresCl (AdvCl (SPredV s fight_V) (AdvPP (PrepNP with_Prep o))) ; + Hunt = PresVasV2 hunt_V ; + Hit = PresVasV2 hit_V ; + Cut = PresVasV2 cut_V ; + Split = PresVasV2 split_V ; + Stab = PresVasV2 stab_V ; + Scratch = PresVasV2 scratch_V ; + Hold = PresVasV2 hold_V ; + Squeeze = PresVasV2 squeeze_V ; + Rub = PresVasV2 rub_V ; + Wash = PresVasV2 wash_V ; + Wipe = PresVasV2 wipe_V ; + Pull = PresVasV2 pull_V ; + Push = PresVasV2 push_V ; + Throw = PresVasV2 throw_V ; + Tie = PresVasV2 tie_V ; + Count = PresVasV2 count_V ; + + Spit = PresV spit_V ; + Vomit = PresV vomit_V ; + Blow = PresV blow_V ; + Breathe = PresV breathe_V ; + Laugh = PresV laugh_V ; + Sleep = PresV sleep_V ; + Live = PresV live_V ; + Die = PresV die_V ; + Dig = PresV dig_V ; + Swim = PresV swim_V ; + Fly = PresV fly_V ; + Walk = PresV walk_V ; + Come = PresV come_V ; + Lie = PresV lie_V ; + Sit = PresV sit_V ; + Stand = PresV stand_V ; + Turn = PresV turn_V ; + Fall = PresV fall_V ; + Sing = PresV sing_V ; + Sew = PresV sew_V ; + Play = PresV play_V ; + Float = PresV float_V ; + Flow = PresV flow_V ; + Freeze = PresV freeze_V ; + Swell = PresV swell_V ; + Burn = PresV burn_V ; + + Give = PresV3 (dirV3 give_V "til") ; + +-- Say = ; + + The_One = DefOneNP; + The_Many = DefNumNP NoNum ; + A = IndefOneNP ; + This = DetNP this_Det ; + That = DetNP that_Det ; + All = NDetNP all_NDet NoNum ; + Many = DetNP many_Det ; + Some_One = DetNP some_Det ; + Some_Many = NDetNP some_NDet NoNum ; + Few = DetNP few_Det ; + Other = DetNP other_Det ; + + One = IndefNumNP one_Num ; + Two = IndefNumNP two_Num ; + Three = IndefNumNP three_Num ; + Four = IndefNumNP four_Num ; + Five = IndefNumNP five_Num ; + + -- Pronouns + + I = i_NP ; + You_One = thou_NP ; + He = he_NP ; + We = we_NP ; + You_Many = you_NP ; + They = they_NP ; + + -- Nouns + + Woman = UseN woman_N ; + Man = UseN man_N ; + Person = UseN person_N ; + Child = UseN child_N ; + Wife = UseN wife_N ; + Husband = UseN husband_N ; + Mother = UseN mother_N ; + Father = UseN father_N ; + Animal = UseN animal_N ; + Fish = UseN fish_N ; + Bird = UseN bird_N ; + Dog = UseN dog_N ; + Louse = UseN louse_N ; + Snake = UseN snake_N ; + Worm = UseN worm_N ; + Tree = UseN tree_N ; + Forest = UseN forest_N ; + Stick = UseN stick_N ; + Fruit = UseN fruit_N ; + Seed = UseN seed_N ; + Leaf = UseN leaf_N ; + Root = UseN root_N ; + Bark = UseN bark_N ; + Flower = UseN flower_N ; + Grass = UseN grass_N ; + Rope = UseN rope_N ; + Skin = UseN skin_N ; + Meat = UseN meat_N ; + Blood = UseN blood_N ; + Bone = UseN bone_N ; + Fat = UseN fat_N ; + Egg = UseN egg_N ; + Horn = UseN horn_N ; + Tail = UseN tail_N ; + Feather = UseN feather_N ; + Hair = UseN hair_N ; + Head = UseN head_N ; + Ear = UseN ear_N ; + Eye = UseN eye_N ; + Nose = UseN nose_N ; + Mouth = UseN mouth_N ; + Tooth = UseN tooth_N ; + Tongue = UseN tongue_N ; + Fingernail = UseN fingernail_N ; + Foot = UseN foot_N ; + Leg = UseN leg_N ; + Knee = UseN knee_N ; + Hand = UseN hand_N ; + Wing = UseN wing_N ; + Belly = UseN belly_N ; + Guts = UseN guts_N ; + Neck = UseN neck_N ; + Back = UseN back_N ; + Breast = UseN breast_N ; + Heart = UseN heart_N ; + Liver = UseN liver_N ; + Sun = UseN sun_N ; + Moon = UseN moon_N ; + Star = UseN star_N ; + Water = UseN water_N ; + Rain = UseN rain_N ; + River = UseN river_N ; + Lake = UseN lake_N ; + Sea = UseN sea_N ; + Salt = UseN salt_N ; + Stone = UseN stone_N ; + Sand = UseN sand_N ; + Dust = UseN dust_N ; + Earth = UseN earth_N ; + Cloud = UseN cloud_N ; + Fog = UseN fog_N ; + Sky = UseN sky_N ; + Wind = UseN wind_N ; + Snow = UseN snow_N ; + Ice = UseN ice_N ; + Smoke = UseN smoke_N ; + Fire = UseN fire_N ; + Ashes = UseN ashes_N ; + Road = UseN road_N ; + Mountain = UseN mountain_N ; + Night = UseN night_N ; + Day = UseN day_N ; + Year = UseN year_N ; + Name = UseN name_N ; + +-- NameOf = AppN2 name_N2 ; + MotherOf = AppN2 (mkN2 mother_N "til") ; + FatherOf = AppN2 (mkN2 father_N "til") ; + + Big = ModPosA big_ADeg ; + Long = ModPosA long_ADeg ; + Wide = ModPosA wide_ADeg ; + Thick = ModPosA thick_ADeg ; + Heavy = ModPosA heavy_ADeg ; + Small = ModPosA small_ADeg ; + Short = ModPosA short_ADeg ; + Narrow = ModPosA narrow_ADeg ; + Thin = ModPosA thin_ADeg ; + Red = ModPosA red_ADeg ; + Green = ModPosA green_ADeg ; + Yellow = ModPosA yellow_ADeg ; + White = ModPosA white_ADeg ; + Black = ModPosA black_ADeg ; + Warm = ModPosA warm_ADeg ; + Cold = ModPosA cold_ADeg ; + Full = ModPosA full_ADeg ; + New = ModPosA new_ADeg ; + Old = ModPosA old_ADeg ; + Good = ModPosA good_ADeg ; + Bad = ModPosA bad_ADeg ; + Rotten = ModPosA rotten_ADeg ; + Dirty = ModPosA dirty_ADeg ; + Straight = ModPosA straight_ADeg ; + Round = ModPosA round_ADeg ; + Sharp = ModPosA sharp_ADeg ; + Dull = ModPosA dull_ADeg ; + Smooth = ModPosA smooth_ADeg ; + Wet = ModPosA wet_ADeg ; + Dry = ModPosA dry_ADeg ; + Correct = ModPosA correct_ADeg ; + Near = ModPosA near_ADeg ; +-- Far = ModPosA far_ADeg ; + + Right = ModAP (UseA right_A) ; + Left = ModAP (UseA left_A) ; + +} \ No newline at end of file diff --git a/examples/stoneage/StoneageResNor.gf b/examples/stoneage/StoneageResNor.gf new file mode 100644 index 000000000..30cd4e092 --- /dev/null +++ b/examples/stoneage/StoneageResNor.gf @@ -0,0 +1,15 @@ +resource StoneageResNor = open ResourceNor, SyntaxNor, ParadigmsNor in { + +oper + PresV : V -> NP -> Phr = \v,s -> PresCl (SPredV s v) ; + PresV2 : V2 -> NP -> NP -> Phr = \v,s,o -> PresCl (SPredV2 s v o) ; + PresV3 : V3 -> NP -> NP -> NP -> Phr = \v,s,o,r -> PresCl (SPredV3 s v o r) ; + PresVasV2 : V -> NP -> NP -> Phr = \ v -> PresV2 (dirV2 v) ; + + PresCl : Cl -> Phr = + \c -> defaultSentence (UseCl (PosTP TPresent ASimul) c) ** {lock_Phr = <>} ; + + ModPosA : ADeg -> CN -> CN = \a -> ModAP (PositADeg a) ; + ModA : A -> CN -> CN = \a -> ModAP (UseA a) ; + +} \ No newline at end of file diff --git a/src/GF/Compile/CheckGrammar.hs b/src/GF/Compile/CheckGrammar.hs index 38a900981..0831c9834 100644 --- a/src/GF/Compile/CheckGrammar.hs +++ b/src/GF/Compile/CheckGrammar.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/03/08 18:08:58 $ +-- > CVS $Date: 2005/03/11 15:37:20 $ -- > CVS $Author: aarne $ --- > CVS $Revision: 1.21 $ +-- > CVS $Revision: 1.22 $ -- -- AR 4\/12\/1999 -- 1\/4\/2000 -- 8\/9\/2001 -- 15\/5\/2002 -- 27\/11\/2002 -- 18\/6\/2003 -- @@ -447,7 +447,7 @@ inferLType gr trm = case trm of return $ (Table p' t', typeType) FV vs -> do - (ty,_) <- checks $ map infer vs + (_,ty) <- checks $ map infer vs --- checkIfComplexVariantType trm ty check trm ty