From 77270a010a0b453e9a84c3e62db7cfd22e49d55d Mon Sep 17 00:00:00 2001 From: bjorn Date: Thu, 14 Aug 2008 07:58:04 +0000 Subject: [PATCH] Remove the grammars directory. It was full of old grammars that don't compile these days. See the old source distributions if you want them. --- grammars/Makefile | 8 - grammars/TALK/GF_GoDiS/Core/GenResEng.gf | 26 - grammars/TALK/GF_GoDiS/Core/GenResSwe.gf | 26 - .../TALK/GF_GoDiS/Core/Shared/sharedCore.gf | 133 -- .../GF_GoDiS/Core/Shared/sharedCoreEng.gf | 55 - .../GF_GoDiS/Core/Shared/sharedCorePro.gf | 92 -- .../GF_GoDiS/Core/Shared/sharedCoreSwe.gf | 54 - .../TALK/GF_GoDiS/Core/System/systemCore.gf | 158 --- .../GF_GoDiS/Core/System/systemCoreEng.gf | 146 -- .../GF_GoDiS/Core/System/systemCorePro.gf | 128 -- .../GF_GoDiS/Core/System/systemCoreSwe.gf | 141 -- grammars/TALK/GF_GoDiS/Core/User/userCore.gf | 27 - .../TALK/GF_GoDiS/Core/User/userCoreEng.gf | 93 -- .../TALK/GF_GoDiS/Core/User/userCorePro.gf | 22 - .../TALK/GF_GoDiS/Core/User/userCoreSwe.gf | 98 -- .../TALK/GF_GoDiS/Domain/AgendaTalk/DB.gf | 5 - .../TALK/GF_GoDiS/Domain/AgendaTalk/DBEng.gf | 5 - .../TALK/GF_GoDiS/Domain/AgendaTalk/DBPro.gf | 5 - .../TALK/GF_GoDiS/Domain/AgendaTalk/DBSwe.gf | 5 - .../Domain/AgendaTalk/Shared/sharedDomain.gf | 64 - .../AgendaTalk/Shared/sharedDomainEng.gf | 148 -- .../AgendaTalk/Shared/sharedDomainPro.gf | 77 -- .../AgendaTalk/Shared/sharedDomainSwe.gf | 42 - .../Domain/AgendaTalk/System/systemDomain.gf | 53 - .../AgendaTalk/System/systemDomainEng.gf | 74 - .../AgendaTalk/System/systemDomainPro.gf | 65 - .../AgendaTalk/System/systemDomainSwe.gf | 74 - .../Domain/AgendaTalk/User/userDomain.gf | 13 - .../Domain/AgendaTalk/User/userDomainEng.gf | 25 - .../Domain/AgendaTalk/User/userDomainPro.gf | 18 - .../Domain/AgendaTalk/User/userDomainSwe.gf | 24 - grammars/TALK/GF_GoDiS/Domain/DJGoDiS/DB.gf | 6 - .../TALK/GF_GoDiS/Domain/DJGoDiS/DBEng.gf | 7 - .../TALK/GF_GoDiS/Domain/DJGoDiS/DBPro.gf | 6 - .../TALK/GF_GoDiS/Domain/DJGoDiS/DBSwe.gf | 5 - .../Domain/DJGoDiS/Shared/sharedDomain.gf | 105 -- .../Domain/DJGoDiS/Shared/sharedDomainEng.gf | 154 --- .../Domain/DJGoDiS/Shared/sharedDomainPro.gf | 87 -- .../Domain/DJGoDiS/Shared/sharedDomainSwe.gf | 170 --- .../Domain/DJGoDiS/System/systemDomain.gf | 75 - .../Domain/DJGoDiS/System/systemDomainEng.gf | 106 -- .../Domain/DJGoDiS/System/systemDomainPro.gf | 98 -- .../Domain/DJGoDiS/System/systemDomainSwe.gf | 105 -- .../Domain/DJGoDiS/User/userDomain.gf | 19 - .../Domain/DJGoDiS/User/userDomainEng.gf | 29 - .../Domain/DJGoDiS/User/userDomainPro.gf | 15 - .../Domain/DJGoDiS/User/userDomainSwe.gf | 29 - grammars/TALK/GF_GoDiS/Domain/SpecResEng.gf | 27 - grammars/TALK/GF_GoDiS/Domain/SpecResSwe.gf | 27 - grammars/TALK/GF_GoDiS/Domain/deLux/DB.gf | 5 - grammars/TALK/GF_GoDiS/Domain/deLux/DBEng.gf | 5 - grammars/TALK/GF_GoDiS/Domain/deLux/DBPro.gf | 5 - grammars/TALK/GF_GoDiS/Domain/deLux/DBSwe.gf | 5 - .../Domain/deLux/Shared/sharedDomain.gf | 50 - .../Domain/deLux/Shared/sharedDomainEng.gf | 46 - .../Domain/deLux/Shared/sharedDomainPro.gf | 43 - .../Domain/deLux/Shared/sharedDomainSwe.gf | 48 - .../Domain/deLux/Shared/sharedSpecific.gf | 58 - .../Domain/deLux/System/systemDomain.gf | 34 - .../Domain/deLux/System/systemDomainEng.gf | 32 - .../Domain/deLux/System/systemDomainPro.gf | 28 - .../Domain/deLux/System/systemDomainSwe.gf | 28 - .../GF_GoDiS/Domain/deLux/User/userDomain.gf | 13 - .../Domain/deLux/User/userDomainEng.gf | 12 - .../Domain/deLux/User/userDomainPro.gf | 14 - .../Domain/deLux/User/userDomainSwe.gf | 11 - .../GF_GoDiS/Resource/Events_Locations/DB.gf | 37 - .../Resource/Events_Locations/DBPro.gf | 17 - .../Resource/Events_Locations/DBSwe.gf | 29 - grammars/TALK/GF_GoDiS/Resource/Home/Lamps.gf | 14 - .../TALK/GF_GoDiS/Resource/Home/LampsEng.gf | 12 - .../TALK/GF_GoDiS/Resource/Home/LampsPro.gf | 11 - .../TALK/GF_GoDiS/Resource/Home/LampsSwe.gf | 11 - grammars/TALK/GF_GoDiS/Resource/Home/Rooms.gf | 15 - .../TALK/GF_GoDiS/Resource/Home/RoomsEng.gf | 12 - .../TALK/GF_GoDiS/Resource/Home/RoomsPro.gf | 11 - .../TALK/GF_GoDiS/Resource/Home/RoomsSwe.gf | 12 - .../Resource/Media/English/EnglishAlbums.gf | 23 - .../Media/English/EnglishAlbumsEng.gf | 21 - .../Media/English/EnglishAlbumsPro.gf | 21 - .../Resource/Media/English/EnglishArtists.gf | 62 - .../Media/English/EnglishArtistsEng.gf | 56 - .../Media/English/EnglishArtistsPro.gf | 57 - .../Media/English/EnglishRadioStations.gf | 11 - .../Media/English/EnglishRadioStationsEng.gf | 8 - .../Media/English/EnglishRadioStationsPro.gf | 8 - .../Resource/Media/English/EnglishSongs.gf | 57 - .../Resource/Media/English/EnglishSongsEng.gf | 56 - .../Resource/Media/English/EnglishSongsPro.gf | 56 - .../Resource/Media/Swedish/SwedishAlbums.gf | 11 - .../Media/Swedish/SwedishAlbumsPro.gf | 10 - .../Media/Swedish/SwedishAlbumsSwe.gf | 10 - .../Resource/Media/Swedish/SwedishArtists.gf | 58 - .../Media/Swedish/SwedishArtistsPro.gf | 56 - .../Media/Swedish/SwedishArtistsSwe.gf | 55 - .../Media/Swedish/SwedishRadioStations.gf | 12 - .../Media/Swedish/SwedishRadioStationsPro.gf | 10 - .../Media/Swedish/SwedishRadioStationsSwe.gf | 10 - .../Resource/Media/Swedish/SwedishSongs.gf | 58 - .../Resource/Media/Swedish/SwedishSongsPro.gf | 56 - .../Resource/Media/Swedish/SwedishSongsSwe.gf | 56 - .../GF_GoDiS/Resource/Media/TVStations.gf | 3 - .../GF_GoDiS/Resource/Media/TVStationsSwe.gf | 3 - .../TALK/GF_GoDiS/Resource/Numbers/numbers.gf | 19 - .../GF_GoDiS/Resource/Numbers/numbersEng.gf | 18 - .../GF_GoDiS/Resource/Numbers/numbersPro.gf | 18 - .../GF_GoDiS/Resource/Numbers/numbersSwe.gf | 20 - .../GF_GoDiS/Resource/Numbers/orderNum.gf | 19 - .../GF_GoDiS/Resource/Numbers/orderNumEng.gf | 18 - .../GF_GoDiS/Resource/Numbers/orderNumPro.gf | 18 - .../GF_GoDiS/Resource/Numbers/orderNumSwe.gf | 20 - .../TALK/GF_GoDiS/Resource/Time/ResEng.gf | 12 - .../TALK/GF_GoDiS/Resource/Time/ResProlog.gf | 24 - .../GF_GoDiS/Resource/Time/ResourceSwe.gf | 10 - grammars/TALK/GF_GoDiS/Resource/Time/Time.gf | 103 -- .../TALK/GF_GoDiS/Resource/Time/TimeEng.gf | 122 -- .../TALK/GF_GoDiS/Resource/Time/TimeProlog.gf | 105 -- .../TALK/GF_GoDiS/Resource/Time/TimeSwe.gf | 163 --- .../TALK/GF_GoDiS/Resource/Time/Weekday.gf | 22 - .../TALK/GF_GoDiS/Resource/Time/WeekdayEng.gf | 15 - .../GF_GoDiS/Resource/Time/WeekdayProlog.gf | 19 - .../TALK/GF_GoDiS/Resource/Time/WeekdaySwe.gf | 16 - grammars/TALK/README | 18 - grammars/aggregation/Abstract.gf | 57 - grammars/aggregation/Aggregation.gf | 5 - grammars/aggregation/English.gf | 18 - grammars/aggregation/transfer.gf | 75 - grammars/basic/Basic.gf | 15 - grammars/basic/English.gf | 27 - grammars/basic/README | 10 - grammars/basic/tut1.Abs.gf | 12 - grammars/basic/tut1.Deu.gf | 32 - grammars/basic/tut1.Eng.gf | 26 - grammars/basic/tut1.Fin.gf | 26 - grammars/basic/tut1.Fra.gf | 26 - grammars/basic/tut1.Ita.gf | 26 - grammars/basic/tut1.Sve.gf | 32 - grammars/bringert/ListTest.gf | 8 - grammars/bringert/ListTestEng.gf | 12 - grammars/database/Database.gf | 33 - grammars/database/DatabaseEng.gf | 3 - grammars/database/DatabaseFre.gf | 3 - grammars/database/DatabaseI.gf | 43 - grammars/database/DatabaseSwe.gf | 3 - grammars/database/README | 18 - grammars/database/Restaurant.gf | 16 - grammars/database/RestaurantEng.gf | 31 - grammars/database/RestaurantFre.gf | 33 - grammars/database/RestaurantSwe.gf | 33 - grammars/dep/App.gf | 18 - grammars/dep/AppEng.gf | 21 - grammars/dep/Dep.gf | 42 - grammars/dep/DepEng.gf | 54 - grammars/dep/ResDep.gf | 17 - grammars/health/ExtraEng.gf | 65 - grammars/health/ExtraFre.gf | 59 - grammars/health/ExtraIta.gf | 34 - grammars/health/ExtraRus.gf | 36 - grammars/health/ExtraSwe.gf | 73 - grammars/health/Health.gf | 101 -- grammars/health/HealthEng.gf | 125 -- grammars/health/HealthFre.gf | 132 -- grammars/health/HealthResourceIta.gf | 65 - grammars/health/HealthRus.gf | 111 -- grammars/health/HealthSwe.gf | 129 -- grammars/health/healthCorpus.txt | 47 - grammars/ljung/fin_dep_types/Findep.gf | 53 - grammars/ljung/fin_dep_types/FindepAbs.gf | 57 - grammars/ljung/thesis/CopyMorphism.gf | 22 - grammars/ljung/thesis/CopyMorphismAbs.gf | 15 - grammars/ljung/thesis/Erasing.gf | 26 - grammars/ljung/thesis/ErasingAbs.gf | 21 - grammars/ljung/thesis/FragmentAbstract.gf | 19 - grammars/ljung/thesis/FragmentNumber.gf | 29 - grammars/ljung/thesis/FragmentResource.gf | 10 - grammars/ljung/thesis/FragmentSimple.gf | 18 - grammars/ljung/thesis/FragmentSwedish.gf | 27 - grammars/ljung/timeflies/TimeFlies.gf | 24 - grammars/ljung/timeflies/TimeFliesAbs.gf | 27 - grammars/ljung/timeflies/TimeFliesCnc.gf | 2 - grammars/ljung/variants/TestVars.gf | 14 - grammars/ljung/variants/TestVarsA.gf | 11 - grammars/ljung/variants/TestVarsR.gf | 27 - grammars/logic/Arithm.gf | 66 - grammars/logic/ArithmEng.gf | 42 - grammars/logic/ArithmFre.gf | 37 - grammars/logic/Logic.gf | 97 -- grammars/logic/LogicEng.gf | 60 - grammars/logic/LogicFre.gf | 84 -- grammars/logic/LogicResEng.gf | 27 - grammars/logic/ResFre.gf | 78 -- grammars/mkDistr.sh | 66 - grammars/mkLib.sh | 4 - grammars/multiple/City.gf | 7 - grammars/multiple/CityEng.gf | 5 - grammars/multiple/Math.gf | 7 - grammars/multiple/MathEng.gf | 5 - grammars/multiple/System.gf | 4 - grammars/multiple/SystemCity.gf | 4 - grammars/multiple/SystemCityEng.gf | 6 - grammars/multiple/SystemEng.gf | 3 - grammars/multiple/SystemMath.gf | 4 - grammars/multiple/SystemMathEng.gf | 6 - grammars/multiple/Top.gf | 7 - grammars/multiple/TopCity.gf | 1 - grammars/multiple/TopCityEng.gf | 3 - grammars/multiple/TopEng.gf | 6 - grammars/multiple/TopMath.gf | 1 - grammars/multiple/TopMathEng.gf | 3 - grammars/multiple/User.gf | 7 - grammars/multiple/UserCity.gf | 5 - grammars/multiple/UserCityEng.gf | 6 - grammars/multiple/UserEng.gf | 5 - grammars/multiple/UserMath.gf | 5 - grammars/multiple/UserMathEng.gf | 6 - grammars/multiple/UserUnionCity.gf | 1 - grammars/multiple/map.txt | 32 - grammars/numerals/Decimal.gf | 41 - grammars/numerals/English.gf | 39 - grammars/numerals/Nat.gf | 55 - grammars/numerals/Nat.hs | 46 - grammars/numerals/Num2Bin.gf | 45 - grammars/numerals/NumSwedish.gf | 44 - grammars/numerals/Numerals.gf | 34 - grammars/numerals/ResDecimal.gf | 7 - grammars/numerals/ResNumSwedish.gf | 23 - grammars/numerals/Symb.gf | 12 - grammars/numerals/Trans.gf | 3 - grammars/numerals/old/af_tunni.gf | 50 - grammars/numerals/old/albanian.gf | 45 - grammars/numerals/old/amharic.gf | 81 -- grammars/numerals/old/basque.gf | 59 - grammars/numerals/old/bearlake_slave.gf | 44 - grammars/numerals/old/biblical_hebrew.gf | 88 -- grammars/numerals/old/bulgarian.gf | 51 - grammars/numerals/old/catalan.gf | 56 - grammars/numerals/old/classical_arabic.gf | 96 -- grammars/numerals/old/classical_greek.gf | 197 --- grammars/numerals/old/croatian.gf | 69 - grammars/numerals/old/czech.gf | 58 - grammars/numerals/old/dagur.gf | 59 - grammars/numerals/old/demo.gfs | 49 - grammars/numerals/old/fulfulde.gf | 50 - grammars/numerals/old/geez.gf | 121 -- grammars/numerals/old/guahibo.gf | 45 - grammars/numerals/old/guarani.gf | 48 - grammars/numerals/old/hindi.gf | 99 -- grammars/numerals/old/hungarian.gf | 61 - grammars/numerals/old/icelandic.gf | 51 - grammars/numerals/old/irish.gf | 79 -- grammars/numerals/old/italian.gf | 45 - grammars/numerals/old/japanese.gf | 59 - grammars/numerals/old/kabardian.gf | 79 -- grammars/numerals/old/kambera.gf | 47 - grammars/numerals/old/kawaiisu.gf | 41 - grammars/numerals/old/khmer.gf | 50 - grammars/numerals/old/khowar.gf | 57 - grammars/numerals/old/kolyma_yukaghir.gf | 45 - grammars/numerals/old/korean.gf | 109 -- grammars/numerals/old/kulung.gf | 55 - grammars/numerals/old/kwami.gf | 48 - grammars/numerals/old/kwaza.gf | 37 - grammars/numerals/old/lamani.gf | 95 -- grammars/numerals/old/latvian.gf | 49 - grammars/numerals/old/lithuanian.gf | 56 - grammars/numerals/old/lotuxo.gf | 61 - grammars/numerals/old/maale.gf | 55 - grammars/numerals/old/maltese.gf | 59 - grammars/numerals/old/mapuche.gf | 43 - grammars/numerals/old/maybrat.gf | 71 - grammars/numerals/old/miya.gf | 53 - grammars/numerals/old/mkAll.gfs | 51 - grammars/numerals/old/modern_greek.gf | 69 - grammars/numerals/old/mongolian.gf | 59 - grammars/numerals/old/nenets.gf | 67 - grammars/numerals/old/numerals.Abs.gf | 32 - grammars/numerals/old/numerals.Ara.gf | 88 -- grammars/numerals/old/numerals.Chi.gf | 110 -- grammars/numerals/old/numerals.ChiU.gf | 110 -- grammars/numerals/old/numerals.Dan.gf | 44 - grammars/numerals/old/numerals.Dec.gf | 43 - grammars/numerals/old/numerals.Deu.gf | 47 - grammars/numerals/old/numerals.Eng.gf | 39 - grammars/numerals/old/numerals.Fra.gf | 60 - grammars/numerals/old/numerals.Gre.gf | 92 -- grammars/numerals/old/numerals.Heb.gf | 88 -- grammars/numerals/old/numerals.Ita.gf | 45 - grammars/numerals/old/numerals.Mag.gf | 61 - grammars/numerals/old/numerals.Malay.gf | 71 - grammars/numerals/old/numerals.Ned.gf | 48 - grammars/numerals/old/numerals.NorB.gf | 45 - grammars/numerals/old/numerals.Pol.gf | 94 -- grammars/numerals/old/numerals.Rus.gf | 111 -- grammars/numerals/old/numerals.RusU.gf | 111 -- grammars/numerals/old/numerals.Slo.gf | 60 - grammars/numerals/old/numerals.Spa.gf | 61 - grammars/numerals/old/numerals.Suo.gf | 60 - grammars/numerals/old/numerals.Swe.gf | 44 - grammars/numerals/old/numerals.Tam.gf | 60 - grammars/numerals/old/old_church_slavonic.gf | 58 - grammars/numerals/old/pashto.gf | 88 -- grammars/numerals/old/polish.gf | 94 -- grammars/numerals/old/portuguese.gf | 58 - grammars/numerals/old/quechua.gf | 50 - grammars/numerals/old/romanian.gf | 61 - grammars/numerals/old/sango.gf | 63 - grammars/numerals/old/sanskrit.gf | 197 --- grammars/numerals/old/slovak.gf | 60 - grammars/numerals/old/sorani.gf | 90 -- grammars/numerals/old/spanish.gf | 61 - grammars/numerals/old/stieng.gf | 54 - grammars/numerals/old/swahili.gf | 54 - grammars/numerals/old/swiss_french.gf | 72 - grammars/numerals/old/tamil.gf | 166 --- grammars/numerals/old/tibetan.gf | 65 - grammars/numerals/old/totonac.gf | 108 -- grammars/numerals/old/transNum.gfs | 81 -- grammars/numerals/old/tukang_besi.gf | 41 - grammars/numerals/old/turkish.gf | 56 - grammars/numerals/old/welsh.gf | 71 - grammars/numerals/old/yasin_burushaski.gf | 62 - grammars/prelude/Coordination.gf | 105 -- grammars/prelude/HTML.gf | 8 - grammars/prelude/Latex.gf | 12 - grammars/prelude/Precedence.gf | 117 -- grammars/prelude/Predef.gf | 27 - grammars/prelude/PredefAbs.gf | 4 - grammars/prelude/Prelude.gf | 100 -- grammars/prelude/README | 20 - grammars/resource/abstract/Database.gf | 36 - grammars/resource/abstract/PredefAbs.gf | 4 - grammars/resource/abstract/ResAbs.gf | 275 ---- grammars/resource/abstract/Restaurant.gf | 15 - grammars/resource/abstract/TestAbs.gf | 18 - grammars/resource/english/DatabaseEng.gf | 51 - grammars/resource/english/DatabaseEngRes.gf | 11 - grammars/resource/english/English.gf | 3 - grammars/resource/english/Morpho.gf | 167 --- grammars/resource/english/Paradigms.gf | 243 ---- grammars/resource/english/Predication.gf | 83 -- grammars/resource/english/ResEng.gf | 223 --- grammars/resource/english/RestaurantEng.gf | 27 - grammars/resource/english/Syntax.gf | 924 ------------- grammars/resource/english/TestEng.gf | 46 - grammars/resource/english/Types.gf | 101 -- grammars/resource/finnish/Finnish.gf | 3 - grammars/resource/finnish/MorphoFin.gf | 688 --------- grammars/resource/finnish/ParadigmsFin.gf | 260 ---- grammars/resource/finnish/ResFin.gf | 222 --- grammars/resource/finnish/SyntaxFin.gf | 1028 -------------- grammars/resource/finnish/TestFin.gf | 54 - grammars/resource/finnish/TypesFin.gf | 126 -- grammars/resource/french/MorphoFra.gf | 1231 ----------------- grammars/resource/french/ResFra.gf | 3 - grammars/resource/french/SyntaxFra.gf | 295 ---- grammars/resource/french/TestFra.gf | 34 - grammars/resource/french/TypesFra.gf | 160 --- grammars/resource/german/DatabaseDeu.gf | 54 - grammars/resource/german/DatabaseRes.gf | 11 - grammars/resource/german/Deutsch.gf | 1 - grammars/resource/german/Logical.gf | 26 - grammars/resource/german/Morpho.gf | 398 ------ grammars/resource/german/Paradigms.gf | 310 ----- grammars/resource/german/Predication.gf | 96 -- grammars/resource/german/ResDeu.gf | 223 --- grammars/resource/german/RestaurantDeu.gf | 26 - grammars/resource/german/Syntax.gf | 969 ------------- grammars/resource/german/TestDeu.gf | 49 - grammars/resource/german/Types.gf | 98 -- grammars/resource/italian/MorphoIta.gf | 291 ---- grammars/resource/italian/ResIta.gf | 3 - grammars/resource/italian/SyntaxIta.gf | 286 ---- grammars/resource/italian/TestIta.gf | 35 - grammars/resource/italian/TypesIta.gf | 131 -- grammars/resource/nabstract/Combinations.gf | 333 ----- grammars/resource/nabstract/PredefAbs.gf | 4 - grammars/resource/nabstract/ResAbs.gf | 275 ---- grammars/resource/nabstract/Structural.gf | 90 -- grammars/resource/nabstract/TestResource.gf | 18 - grammars/resource/nabstract/additions.txt | 123 -- grammars/resource/nenglish/CombinationsEng.gf | 197 --- grammars/resource/nenglish/MorphoEng.gf | 202 --- grammars/resource/nenglish/ParadigmsEng.gf | 242 ---- grammars/resource/nenglish/Predication.gf | 83 -- grammars/resource/nenglish/ResEng.gf | 3 - grammars/resource/nenglish/StructuralEng.gf | 103 -- grammars/resource/nenglish/SyntaxEng.gf | 1012 -------------- grammars/resource/nenglish/TestResourceEng.gf | 51 - grammars/resource/nenglish/TypesEng.gf | 104 -- grammars/resource/romance/ResRomance.gf | 203 --- grammars/resource/romance/SyntaxRomance.gf | 871 ------------ grammars/resource/romance/TypesRomance.gf | 175 --- grammars/resource/russian/DatabaseRus.gf | 61 - grammars/resource/russian/Morpho.gf | 1027 -------------- grammars/resource/russian/Paradigms.gf | 362 ----- grammars/resource/russian/Predication.gf | 35 - grammars/resource/russian/ResRus.gf | 241 ---- grammars/resource/russian/RestaurantRus.gf | 30 - grammars/resource/russian/Russian.gf | 3 - grammars/resource/russian/Syntax.gf | 898 ------------ grammars/resource/russian/TestRus.gf | 48 - grammars/resource/russian/Types.gf | 288 ---- grammars/resource/swedish/CombinationsSwe.gf | 210 --- grammars/resource/swedish/MorphoSwe.gf | 1162 ---------------- grammars/resource/swedish/ParadigmsSwe.gf | 286 ---- grammars/resource/swedish/ResSwe.gf | 221 --- grammars/resource/swedish/StructuralSwe.gf | 115 -- grammars/resource/swedish/Swedish.gf | 4 - grammars/resource/swedish/SyntaxSwe.gf | 1138 --------------- grammars/resource/swedish/TestResourceSwe.gf | 46 - grammars/resource/swedish/TestSwe.gf | 47 - grammars/resource/swedish/TypesSwe.gf | 155 --- grammars/testConversions/MicroAbs.gf | 10 - grammars/testConversions/MicroCnc.gf | 14 - grammars/testConversions/SimpleAbs.gf | 27 - grammars/testConversions/SimpleEng.gf | 34 - grammars/testConversions/SimpleEngRes.gf | 8 - grammars/testConversions/SimpleSwe.gf | 63 - grammars/testConversions/SimpleSweRes.gf | 28 - grammars/testConversions/TestVars.gf | 43 - grammars/testConversions/TestVarsA.gf | 24 - grammars/testConversions/TestVarsR.gf | 28 - grammars/testConversions/TimeFlies.gf | 24 - grammars/testConversions/TimeFliesAbs.gf | 27 - grammars/testConversions/TimeFliesCnc.gf | 2 - grammars/timetable/Timetable.gf | 31 - grammars/timetable/TimetableEng.gf | 23 - grammars/timetable/TimetableHTML.gf | 24 - grammars/timetable/TimetableLatex.gf | 28 - grammars/timetable/click.gf | 36 - grammars/tst.sh | 19 - grammars/video/Channel/channel.Eng.gf | 27 - grammars/video/Channel/channel.Prolog.gf | 20 - grammars/video/Channel/channel.gf | 23 - grammars/video/Channel/channelProlog.gf | 22 - grammars/video/Channel/channelRes.Abs.gf | 29 - grammars/video/Channel/channelRes.Prolog.gf | 27 - grammars/video/Channel/channelResSwe.gf | 26 - grammars/video/Channel/channelSwe.gf | 20 - grammars/video/Channel/date.Swe.gf | 56 - grammars/video/README | 53 - grammars/video/Shared/general.Prolog.gf | 50 - grammars/video/Shared/general.gf | 51 - grammars/video/Shared/generalProlog.gf | 43 - grammars/video/Shared/generalSwe.gf | 43 - grammars/video/Shared/prologResource.gf | 19 - grammars/video/Shared/specific.gf | 29 - grammars/video/Shared/specificProlog.gf | 22 - grammars/video/Shared/specificSwe.gf | 20 - grammars/video/System/genSystem.gf | 37 - grammars/video/System/genSystemProlog.gf | 32 - grammars/video/System/genSystemSwe.gf | 32 - grammars/video/System/general.Prolog.gf | 32 - grammars/video/System/re2specific.Swe.gf | 60 - grammars/video/System/specSystem.gf | 59 - grammars/video/System/specSystemProlog.gf | 45 - grammars/video/System/specSystemSwe.gf | 49 - grammars/video/System/specific.Prolog.gf | 46 - grammars/video/Time/time.Catalan.gf | 135 -- grammars/video/Time/time.Eng.gf | 130 -- grammars/video/Time/time.Prolog.gf | 110 -- grammars/video/Time/time.Symb.gf | 127 -- grammars/video/Time/time.gf | 106 -- grammars/video/Time/timeProlog.gf | 103 -- grammars/video/Time/timeResSwe.gf | 7 - grammars/video/Time/timeSwe.gf | 149 -- grammars/video/User/genUser.gf | 7 - grammars/video/User/genUserProlog.gf | 8 - grammars/video/User/genUserSwe.gf | 8 - grammars/video/User/general.Prolog.gf | 6 - grammars/video/User/specUser.gf | 36 - grammars/video/User/specUserProlog.gf | 68 - grammars/video/User/specUserSwe.gf | 37 - grammars/video/User/specific.Prolog.gf | 68 - grammars/video/Weekday/weekday.Eng.gf | 12 - grammars/video/Weekday/weekday.Prolog.gf | 13 - grammars/video/Weekday/weekday.gf | 15 - grammars/video/Weekday/weekdayProlog.gf | 14 - grammars/video/Weekday/weekdaySwe.gf | 12 - grammars/video/all.gf | 13 - grammars/video/allProlog.gf | 5 - grammars/video/allSwe.gf | 9 - grammars/video/icm100ResSwe.gf | 30 - grammars/video/systemSwe.gf | 4 - 484 files changed, 37662 deletions(-) delete mode 100644 grammars/Makefile delete mode 100644 grammars/TALK/GF_GoDiS/Core/GenResEng.gf delete mode 100644 grammars/TALK/GF_GoDiS/Core/GenResSwe.gf delete mode 100644 grammars/TALK/GF_GoDiS/Core/Shared/sharedCore.gf delete mode 100644 grammars/TALK/GF_GoDiS/Core/Shared/sharedCoreEng.gf delete mode 100644 grammars/TALK/GF_GoDiS/Core/Shared/sharedCorePro.gf delete mode 100644 grammars/TALK/GF_GoDiS/Core/Shared/sharedCoreSwe.gf delete mode 100644 grammars/TALK/GF_GoDiS/Core/System/systemCore.gf delete mode 100644 grammars/TALK/GF_GoDiS/Core/System/systemCoreEng.gf delete mode 100644 grammars/TALK/GF_GoDiS/Core/System/systemCorePro.gf delete mode 100644 grammars/TALK/GF_GoDiS/Core/System/systemCoreSwe.gf delete mode 100644 grammars/TALK/GF_GoDiS/Core/User/userCore.gf delete mode 100644 grammars/TALK/GF_GoDiS/Core/User/userCoreEng.gf delete mode 100644 grammars/TALK/GF_GoDiS/Core/User/userCorePro.gf delete mode 100644 grammars/TALK/GF_GoDiS/Core/User/userCoreSwe.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/AgendaTalk/DB.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/AgendaTalk/DBEng.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/AgendaTalk/DBPro.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/AgendaTalk/DBSwe.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/AgendaTalk/Shared/sharedDomain.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/AgendaTalk/Shared/sharedDomainEng.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/AgendaTalk/Shared/sharedDomainPro.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/AgendaTalk/Shared/sharedDomainSwe.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/AgendaTalk/System/systemDomain.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/AgendaTalk/System/systemDomainEng.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/AgendaTalk/System/systemDomainPro.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/AgendaTalk/System/systemDomainSwe.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/AgendaTalk/User/userDomain.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/AgendaTalk/User/userDomainEng.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/AgendaTalk/User/userDomainPro.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/AgendaTalk/User/userDomainSwe.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/DJGoDiS/DB.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/DJGoDiS/DBEng.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/DJGoDiS/DBPro.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/DJGoDiS/DBSwe.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/DJGoDiS/Shared/sharedDomain.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/DJGoDiS/Shared/sharedDomainEng.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/DJGoDiS/Shared/sharedDomainPro.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/DJGoDiS/Shared/sharedDomainSwe.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/DJGoDiS/System/systemDomain.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/DJGoDiS/System/systemDomainEng.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/DJGoDiS/System/systemDomainPro.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/DJGoDiS/System/systemDomainSwe.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/DJGoDiS/User/userDomain.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/DJGoDiS/User/userDomainEng.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/DJGoDiS/User/userDomainPro.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/DJGoDiS/User/userDomainSwe.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/SpecResEng.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/SpecResSwe.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/deLux/DB.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/deLux/DBEng.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/deLux/DBPro.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/deLux/DBSwe.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/deLux/Shared/sharedDomain.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/deLux/Shared/sharedDomainEng.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/deLux/Shared/sharedDomainPro.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/deLux/Shared/sharedDomainSwe.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/deLux/Shared/sharedSpecific.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/deLux/System/systemDomain.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/deLux/System/systemDomainEng.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/deLux/System/systemDomainPro.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/deLux/System/systemDomainSwe.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/deLux/User/userDomain.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/deLux/User/userDomainEng.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/deLux/User/userDomainPro.gf delete mode 100644 grammars/TALK/GF_GoDiS/Domain/deLux/User/userDomainSwe.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Events_Locations/DB.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Events_Locations/DBPro.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Events_Locations/DBSwe.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Home/Lamps.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Home/LampsEng.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Home/LampsPro.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Home/LampsSwe.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Home/Rooms.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Home/RoomsEng.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Home/RoomsPro.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Home/RoomsSwe.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishAlbums.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishAlbumsEng.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishAlbumsPro.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishArtists.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishArtistsEng.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishArtistsPro.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishRadioStations.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishRadioStationsEng.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishRadioStationsPro.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishSongs.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishSongsEng.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishSongsPro.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishAlbums.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishAlbumsPro.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishAlbumsSwe.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishArtists.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishArtistsPro.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishArtistsSwe.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishRadioStations.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishRadioStationsPro.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishRadioStationsSwe.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishSongs.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishSongsPro.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishSongsSwe.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Media/TVStations.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Media/TVStationsSwe.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Numbers/numbers.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Numbers/numbersEng.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Numbers/numbersPro.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Numbers/numbersSwe.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Numbers/orderNum.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Numbers/orderNumEng.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Numbers/orderNumPro.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Numbers/orderNumSwe.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Time/ResEng.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Time/ResProlog.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Time/ResourceSwe.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Time/Time.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Time/TimeEng.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Time/TimeProlog.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Time/TimeSwe.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Time/Weekday.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Time/WeekdayEng.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Time/WeekdayProlog.gf delete mode 100644 grammars/TALK/GF_GoDiS/Resource/Time/WeekdaySwe.gf delete mode 100644 grammars/TALK/README delete mode 100644 grammars/aggregation/Abstract.gf delete mode 100644 grammars/aggregation/Aggregation.gf delete mode 100644 grammars/aggregation/English.gf delete mode 100644 grammars/aggregation/transfer.gf delete mode 100644 grammars/basic/Basic.gf delete mode 100644 grammars/basic/English.gf delete mode 100644 grammars/basic/README delete mode 100644 grammars/basic/tut1.Abs.gf delete mode 100644 grammars/basic/tut1.Deu.gf delete mode 100644 grammars/basic/tut1.Eng.gf delete mode 100644 grammars/basic/tut1.Fin.gf delete mode 100644 grammars/basic/tut1.Fra.gf delete mode 100644 grammars/basic/tut1.Ita.gf delete mode 100644 grammars/basic/tut1.Sve.gf delete mode 100644 grammars/bringert/ListTest.gf delete mode 100644 grammars/bringert/ListTestEng.gf delete mode 100644 grammars/database/Database.gf delete mode 100644 grammars/database/DatabaseEng.gf delete mode 100644 grammars/database/DatabaseFre.gf delete mode 100644 grammars/database/DatabaseI.gf delete mode 100644 grammars/database/DatabaseSwe.gf delete mode 100644 grammars/database/README delete mode 100644 grammars/database/Restaurant.gf delete mode 100644 grammars/database/RestaurantEng.gf delete mode 100644 grammars/database/RestaurantFre.gf delete mode 100644 grammars/database/RestaurantSwe.gf delete mode 100644 grammars/dep/App.gf delete mode 100644 grammars/dep/AppEng.gf delete mode 100644 grammars/dep/Dep.gf delete mode 100644 grammars/dep/DepEng.gf delete mode 100644 grammars/dep/ResDep.gf delete mode 100644 grammars/health/ExtraEng.gf delete mode 100644 grammars/health/ExtraFre.gf delete mode 100644 grammars/health/ExtraIta.gf delete mode 100644 grammars/health/ExtraRus.gf delete mode 100644 grammars/health/ExtraSwe.gf delete mode 100644 grammars/health/Health.gf delete mode 100644 grammars/health/HealthEng.gf delete mode 100644 grammars/health/HealthFre.gf delete mode 100644 grammars/health/HealthResourceIta.gf delete mode 100644 grammars/health/HealthRus.gf delete mode 100644 grammars/health/HealthSwe.gf delete mode 100644 grammars/health/healthCorpus.txt delete mode 100644 grammars/ljung/fin_dep_types/Findep.gf delete mode 100644 grammars/ljung/fin_dep_types/FindepAbs.gf delete mode 100644 grammars/ljung/thesis/CopyMorphism.gf delete mode 100644 grammars/ljung/thesis/CopyMorphismAbs.gf delete mode 100644 grammars/ljung/thesis/Erasing.gf delete mode 100644 grammars/ljung/thesis/ErasingAbs.gf delete mode 100644 grammars/ljung/thesis/FragmentAbstract.gf delete mode 100644 grammars/ljung/thesis/FragmentNumber.gf delete mode 100644 grammars/ljung/thesis/FragmentResource.gf delete mode 100644 grammars/ljung/thesis/FragmentSimple.gf delete mode 100644 grammars/ljung/thesis/FragmentSwedish.gf delete mode 100644 grammars/ljung/timeflies/TimeFlies.gf delete mode 100644 grammars/ljung/timeflies/TimeFliesAbs.gf delete mode 100644 grammars/ljung/timeflies/TimeFliesCnc.gf delete mode 100644 grammars/ljung/variants/TestVars.gf delete mode 100644 grammars/ljung/variants/TestVarsA.gf delete mode 100644 grammars/ljung/variants/TestVarsR.gf delete mode 100644 grammars/logic/Arithm.gf delete mode 100644 grammars/logic/ArithmEng.gf delete mode 100644 grammars/logic/ArithmFre.gf delete mode 100644 grammars/logic/Logic.gf delete mode 100644 grammars/logic/LogicEng.gf delete mode 100644 grammars/logic/LogicFre.gf delete mode 100644 grammars/logic/LogicResEng.gf delete mode 100644 grammars/logic/ResFre.gf delete mode 100644 grammars/mkDistr.sh delete mode 100644 grammars/mkLib.sh delete mode 100644 grammars/multiple/City.gf delete mode 100644 grammars/multiple/CityEng.gf delete mode 100644 grammars/multiple/Math.gf delete mode 100644 grammars/multiple/MathEng.gf delete mode 100644 grammars/multiple/System.gf delete mode 100644 grammars/multiple/SystemCity.gf delete mode 100644 grammars/multiple/SystemCityEng.gf delete mode 100644 grammars/multiple/SystemEng.gf delete mode 100644 grammars/multiple/SystemMath.gf delete mode 100644 grammars/multiple/SystemMathEng.gf delete mode 100644 grammars/multiple/Top.gf delete mode 100644 grammars/multiple/TopCity.gf delete mode 100644 grammars/multiple/TopCityEng.gf delete mode 100644 grammars/multiple/TopEng.gf delete mode 100644 grammars/multiple/TopMath.gf delete mode 100644 grammars/multiple/TopMathEng.gf delete mode 100644 grammars/multiple/User.gf delete mode 100644 grammars/multiple/UserCity.gf delete mode 100644 grammars/multiple/UserCityEng.gf delete mode 100644 grammars/multiple/UserEng.gf delete mode 100644 grammars/multiple/UserMath.gf delete mode 100644 grammars/multiple/UserMathEng.gf delete mode 100644 grammars/multiple/UserUnionCity.gf delete mode 100644 grammars/multiple/map.txt delete mode 100644 grammars/numerals/Decimal.gf delete mode 100644 grammars/numerals/English.gf delete mode 100644 grammars/numerals/Nat.gf delete mode 100644 grammars/numerals/Nat.hs delete mode 100644 grammars/numerals/Num2Bin.gf delete mode 100644 grammars/numerals/NumSwedish.gf delete mode 100644 grammars/numerals/Numerals.gf delete mode 100644 grammars/numerals/ResDecimal.gf delete mode 100644 grammars/numerals/ResNumSwedish.gf delete mode 100644 grammars/numerals/Symb.gf delete mode 100644 grammars/numerals/Trans.gf delete mode 100644 grammars/numerals/old/af_tunni.gf delete mode 100644 grammars/numerals/old/albanian.gf delete mode 100644 grammars/numerals/old/amharic.gf delete mode 100644 grammars/numerals/old/basque.gf delete mode 100644 grammars/numerals/old/bearlake_slave.gf delete mode 100644 grammars/numerals/old/biblical_hebrew.gf delete mode 100644 grammars/numerals/old/bulgarian.gf delete mode 100644 grammars/numerals/old/catalan.gf delete mode 100644 grammars/numerals/old/classical_arabic.gf delete mode 100644 grammars/numerals/old/classical_greek.gf delete mode 100644 grammars/numerals/old/croatian.gf delete mode 100644 grammars/numerals/old/czech.gf delete mode 100644 grammars/numerals/old/dagur.gf delete mode 100644 grammars/numerals/old/demo.gfs delete mode 100644 grammars/numerals/old/fulfulde.gf delete mode 100644 grammars/numerals/old/geez.gf delete mode 100644 grammars/numerals/old/guahibo.gf delete mode 100644 grammars/numerals/old/guarani.gf delete mode 100644 grammars/numerals/old/hindi.gf delete mode 100644 grammars/numerals/old/hungarian.gf delete mode 100644 grammars/numerals/old/icelandic.gf delete mode 100644 grammars/numerals/old/irish.gf delete mode 100644 grammars/numerals/old/italian.gf delete mode 100644 grammars/numerals/old/japanese.gf delete mode 100644 grammars/numerals/old/kabardian.gf delete mode 100644 grammars/numerals/old/kambera.gf delete mode 100644 grammars/numerals/old/kawaiisu.gf delete mode 100644 grammars/numerals/old/khmer.gf delete mode 100644 grammars/numerals/old/khowar.gf delete mode 100644 grammars/numerals/old/kolyma_yukaghir.gf delete mode 100644 grammars/numerals/old/korean.gf delete mode 100644 grammars/numerals/old/kulung.gf delete mode 100644 grammars/numerals/old/kwami.gf delete mode 100644 grammars/numerals/old/kwaza.gf delete mode 100644 grammars/numerals/old/lamani.gf delete mode 100644 grammars/numerals/old/latvian.gf delete mode 100644 grammars/numerals/old/lithuanian.gf delete mode 100644 grammars/numerals/old/lotuxo.gf delete mode 100644 grammars/numerals/old/maale.gf delete mode 100644 grammars/numerals/old/maltese.gf delete mode 100644 grammars/numerals/old/mapuche.gf delete mode 100644 grammars/numerals/old/maybrat.gf delete mode 100644 grammars/numerals/old/miya.gf delete mode 100644 grammars/numerals/old/mkAll.gfs delete mode 100644 grammars/numerals/old/modern_greek.gf delete mode 100644 grammars/numerals/old/mongolian.gf delete mode 100644 grammars/numerals/old/nenets.gf delete mode 100644 grammars/numerals/old/numerals.Abs.gf delete mode 100644 grammars/numerals/old/numerals.Ara.gf delete mode 100644 grammars/numerals/old/numerals.Chi.gf delete mode 100644 grammars/numerals/old/numerals.ChiU.gf delete mode 100644 grammars/numerals/old/numerals.Dan.gf delete mode 100644 grammars/numerals/old/numerals.Dec.gf delete mode 100644 grammars/numerals/old/numerals.Deu.gf delete mode 100644 grammars/numerals/old/numerals.Eng.gf delete mode 100644 grammars/numerals/old/numerals.Fra.gf delete mode 100644 grammars/numerals/old/numerals.Gre.gf delete mode 100644 grammars/numerals/old/numerals.Heb.gf delete mode 100644 grammars/numerals/old/numerals.Ita.gf delete mode 100644 grammars/numerals/old/numerals.Mag.gf delete mode 100644 grammars/numerals/old/numerals.Malay.gf delete mode 100644 grammars/numerals/old/numerals.Ned.gf delete mode 100644 grammars/numerals/old/numerals.NorB.gf delete mode 100644 grammars/numerals/old/numerals.Pol.gf delete mode 100644 grammars/numerals/old/numerals.Rus.gf delete mode 100644 grammars/numerals/old/numerals.RusU.gf delete mode 100644 grammars/numerals/old/numerals.Slo.gf delete mode 100644 grammars/numerals/old/numerals.Spa.gf delete mode 100644 grammars/numerals/old/numerals.Suo.gf delete mode 100644 grammars/numerals/old/numerals.Swe.gf delete mode 100644 grammars/numerals/old/numerals.Tam.gf delete mode 100644 grammars/numerals/old/old_church_slavonic.gf delete mode 100644 grammars/numerals/old/pashto.gf delete mode 100644 grammars/numerals/old/polish.gf delete mode 100644 grammars/numerals/old/portuguese.gf delete mode 100644 grammars/numerals/old/quechua.gf delete mode 100644 grammars/numerals/old/romanian.gf delete mode 100644 grammars/numerals/old/sango.gf delete mode 100644 grammars/numerals/old/sanskrit.gf delete mode 100644 grammars/numerals/old/slovak.gf delete mode 100644 grammars/numerals/old/sorani.gf delete mode 100644 grammars/numerals/old/spanish.gf delete mode 100644 grammars/numerals/old/stieng.gf delete mode 100644 grammars/numerals/old/swahili.gf delete mode 100644 grammars/numerals/old/swiss_french.gf delete mode 100644 grammars/numerals/old/tamil.gf delete mode 100644 grammars/numerals/old/tibetan.gf delete mode 100644 grammars/numerals/old/totonac.gf delete mode 100644 grammars/numerals/old/transNum.gfs delete mode 100644 grammars/numerals/old/tukang_besi.gf delete mode 100644 grammars/numerals/old/turkish.gf delete mode 100644 grammars/numerals/old/welsh.gf delete mode 100644 grammars/numerals/old/yasin_burushaski.gf delete mode 100644 grammars/prelude/Coordination.gf delete mode 100644 grammars/prelude/HTML.gf delete mode 100644 grammars/prelude/Latex.gf delete mode 100644 grammars/prelude/Precedence.gf delete mode 100644 grammars/prelude/Predef.gf delete mode 100644 grammars/prelude/PredefAbs.gf delete mode 100644 grammars/prelude/Prelude.gf delete mode 100644 grammars/prelude/README delete mode 100644 grammars/resource/abstract/Database.gf delete mode 100644 grammars/resource/abstract/PredefAbs.gf delete mode 100644 grammars/resource/abstract/ResAbs.gf delete mode 100644 grammars/resource/abstract/Restaurant.gf delete mode 100644 grammars/resource/abstract/TestAbs.gf delete mode 100644 grammars/resource/english/DatabaseEng.gf delete mode 100644 grammars/resource/english/DatabaseEngRes.gf delete mode 100644 grammars/resource/english/English.gf delete mode 100644 grammars/resource/english/Morpho.gf delete mode 100644 grammars/resource/english/Paradigms.gf delete mode 100644 grammars/resource/english/Predication.gf delete mode 100644 grammars/resource/english/ResEng.gf delete mode 100644 grammars/resource/english/RestaurantEng.gf delete mode 100644 grammars/resource/english/Syntax.gf delete mode 100644 grammars/resource/english/TestEng.gf delete mode 100644 grammars/resource/english/Types.gf delete mode 100644 grammars/resource/finnish/Finnish.gf delete mode 100644 grammars/resource/finnish/MorphoFin.gf delete mode 100644 grammars/resource/finnish/ParadigmsFin.gf delete mode 100644 grammars/resource/finnish/ResFin.gf delete mode 100644 grammars/resource/finnish/SyntaxFin.gf delete mode 100644 grammars/resource/finnish/TestFin.gf delete mode 100644 grammars/resource/finnish/TypesFin.gf delete mode 100644 grammars/resource/french/MorphoFra.gf delete mode 100644 grammars/resource/french/ResFra.gf delete mode 100644 grammars/resource/french/SyntaxFra.gf delete mode 100644 grammars/resource/french/TestFra.gf delete mode 100644 grammars/resource/french/TypesFra.gf delete mode 100644 grammars/resource/german/DatabaseDeu.gf delete mode 100644 grammars/resource/german/DatabaseRes.gf delete mode 100644 grammars/resource/german/Deutsch.gf delete mode 100644 grammars/resource/german/Logical.gf delete mode 100644 grammars/resource/german/Morpho.gf delete mode 100644 grammars/resource/german/Paradigms.gf delete mode 100644 grammars/resource/german/Predication.gf delete mode 100644 grammars/resource/german/ResDeu.gf delete mode 100644 grammars/resource/german/RestaurantDeu.gf delete mode 100644 grammars/resource/german/Syntax.gf delete mode 100644 grammars/resource/german/TestDeu.gf delete mode 100644 grammars/resource/german/Types.gf delete mode 100644 grammars/resource/italian/MorphoIta.gf delete mode 100644 grammars/resource/italian/ResIta.gf delete mode 100644 grammars/resource/italian/SyntaxIta.gf delete mode 100644 grammars/resource/italian/TestIta.gf delete mode 100644 grammars/resource/italian/TypesIta.gf delete mode 100644 grammars/resource/nabstract/Combinations.gf delete mode 100644 grammars/resource/nabstract/PredefAbs.gf delete mode 100644 grammars/resource/nabstract/ResAbs.gf delete mode 100644 grammars/resource/nabstract/Structural.gf delete mode 100644 grammars/resource/nabstract/TestResource.gf delete mode 100644 grammars/resource/nabstract/additions.txt delete mode 100644 grammars/resource/nenglish/CombinationsEng.gf delete mode 100644 grammars/resource/nenglish/MorphoEng.gf delete mode 100644 grammars/resource/nenglish/ParadigmsEng.gf delete mode 100644 grammars/resource/nenglish/Predication.gf delete mode 100644 grammars/resource/nenglish/ResEng.gf delete mode 100644 grammars/resource/nenglish/StructuralEng.gf delete mode 100644 grammars/resource/nenglish/SyntaxEng.gf delete mode 100644 grammars/resource/nenglish/TestResourceEng.gf delete mode 100644 grammars/resource/nenglish/TypesEng.gf delete mode 100644 grammars/resource/romance/ResRomance.gf delete mode 100644 grammars/resource/romance/SyntaxRomance.gf delete mode 100644 grammars/resource/romance/TypesRomance.gf delete mode 100644 grammars/resource/russian/DatabaseRus.gf delete mode 100644 grammars/resource/russian/Morpho.gf delete mode 100644 grammars/resource/russian/Paradigms.gf delete mode 100644 grammars/resource/russian/Predication.gf delete mode 100644 grammars/resource/russian/ResRus.gf delete mode 100644 grammars/resource/russian/RestaurantRus.gf delete mode 100644 grammars/resource/russian/Russian.gf delete mode 100644 grammars/resource/russian/Syntax.gf delete mode 100644 grammars/resource/russian/TestRus.gf delete mode 100644 grammars/resource/russian/Types.gf delete mode 100644 grammars/resource/swedish/CombinationsSwe.gf delete mode 100644 grammars/resource/swedish/MorphoSwe.gf delete mode 100644 grammars/resource/swedish/ParadigmsSwe.gf delete mode 100644 grammars/resource/swedish/ResSwe.gf delete mode 100644 grammars/resource/swedish/StructuralSwe.gf delete mode 100644 grammars/resource/swedish/Swedish.gf delete mode 100644 grammars/resource/swedish/SyntaxSwe.gf delete mode 100644 grammars/resource/swedish/TestResourceSwe.gf delete mode 100644 grammars/resource/swedish/TestSwe.gf delete mode 100644 grammars/resource/swedish/TypesSwe.gf delete mode 100644 grammars/testConversions/MicroAbs.gf delete mode 100644 grammars/testConversions/MicroCnc.gf delete mode 100644 grammars/testConversions/SimpleAbs.gf delete mode 100644 grammars/testConversions/SimpleEng.gf delete mode 100644 grammars/testConversions/SimpleEngRes.gf delete mode 100644 grammars/testConversions/SimpleSwe.gf delete mode 100644 grammars/testConversions/SimpleSweRes.gf delete mode 100644 grammars/testConversions/TestVars.gf delete mode 100644 grammars/testConversions/TestVarsA.gf delete mode 100644 grammars/testConversions/TestVarsR.gf delete mode 100644 grammars/testConversions/TimeFlies.gf delete mode 100644 grammars/testConversions/TimeFliesAbs.gf delete mode 100644 grammars/testConversions/TimeFliesCnc.gf delete mode 100644 grammars/timetable/Timetable.gf delete mode 100644 grammars/timetable/TimetableEng.gf delete mode 100644 grammars/timetable/TimetableHTML.gf delete mode 100644 grammars/timetable/TimetableLatex.gf delete mode 100644 grammars/timetable/click.gf delete mode 100644 grammars/tst.sh delete mode 100644 grammars/video/Channel/channel.Eng.gf delete mode 100644 grammars/video/Channel/channel.Prolog.gf delete mode 100644 grammars/video/Channel/channel.gf delete mode 100644 grammars/video/Channel/channelProlog.gf delete mode 100644 grammars/video/Channel/channelRes.Abs.gf delete mode 100644 grammars/video/Channel/channelRes.Prolog.gf delete mode 100644 grammars/video/Channel/channelResSwe.gf delete mode 100644 grammars/video/Channel/channelSwe.gf delete mode 100644 grammars/video/Channel/date.Swe.gf delete mode 100644 grammars/video/README delete mode 100644 grammars/video/Shared/general.Prolog.gf delete mode 100644 grammars/video/Shared/general.gf delete mode 100644 grammars/video/Shared/generalProlog.gf delete mode 100644 grammars/video/Shared/generalSwe.gf delete mode 100644 grammars/video/Shared/prologResource.gf delete mode 100644 grammars/video/Shared/specific.gf delete mode 100644 grammars/video/Shared/specificProlog.gf delete mode 100644 grammars/video/Shared/specificSwe.gf delete mode 100644 grammars/video/System/genSystem.gf delete mode 100644 grammars/video/System/genSystemProlog.gf delete mode 100644 grammars/video/System/genSystemSwe.gf delete mode 100644 grammars/video/System/general.Prolog.gf delete mode 100644 grammars/video/System/re2specific.Swe.gf delete mode 100644 grammars/video/System/specSystem.gf delete mode 100644 grammars/video/System/specSystemProlog.gf delete mode 100644 grammars/video/System/specSystemSwe.gf delete mode 100644 grammars/video/System/specific.Prolog.gf delete mode 100644 grammars/video/Time/time.Catalan.gf delete mode 100644 grammars/video/Time/time.Eng.gf delete mode 100644 grammars/video/Time/time.Prolog.gf delete mode 100644 grammars/video/Time/time.Symb.gf delete mode 100644 grammars/video/Time/time.gf delete mode 100644 grammars/video/Time/timeProlog.gf delete mode 100644 grammars/video/Time/timeResSwe.gf delete mode 100644 grammars/video/Time/timeSwe.gf delete mode 100644 grammars/video/User/genUser.gf delete mode 100644 grammars/video/User/genUserProlog.gf delete mode 100644 grammars/video/User/genUserSwe.gf delete mode 100644 grammars/video/User/general.Prolog.gf delete mode 100644 grammars/video/User/specUser.gf delete mode 100644 grammars/video/User/specUserProlog.gf delete mode 100644 grammars/video/User/specUserSwe.gf delete mode 100644 grammars/video/User/specific.Prolog.gf delete mode 100644 grammars/video/Weekday/weekday.Eng.gf delete mode 100644 grammars/video/Weekday/weekday.Prolog.gf delete mode 100644 grammars/video/Weekday/weekday.gf delete mode 100644 grammars/video/Weekday/weekdayProlog.gf delete mode 100644 grammars/video/Weekday/weekdaySwe.gf delete mode 100644 grammars/video/all.gf delete mode 100644 grammars/video/allProlog.gf delete mode 100644 grammars/video/allSwe.gf delete mode 100644 grammars/video/icm100ResSwe.gf delete mode 100644 grammars/video/systemSwe.gf diff --git a/grammars/Makefile b/grammars/Makefile deleted file mode 100644 index 3cb03e42a..000000000 --- a/grammars/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -distr: - sh mkDistr.sh - -test: - sh tst.sh - -lib: - sh mkLib.sh diff --git a/grammars/TALK/GF_GoDiS/Core/GenResEng.gf b/grammars/TALK/GF_GoDiS/Core/GenResEng.gf deleted file mode 100644 index 3dfc330a6..000000000 --- a/grammars/TALK/GF_GoDiS/Core/GenResEng.gf +++ /dev/null @@ -1,26 +0,0 @@ --- A file with PreReq and PostReq etc... - -resource GenResEng = { - -param Form = Ques | Req | ReqNeg ; - - -oper choosePre : Form => Str - = table { - Ques => ["can i"]; - Req => variants{ ["i want to"] ; ["i would like to"] }; - ReqNeg => variants{ ["i do not want to"] ; ["i would not like to"] } - - }; - - -oper choosePost : Form => Str - = table { - Ques => ""; - Req => "please"; - ReqNeg => "please" - }; - -} - - diff --git a/grammars/TALK/GF_GoDiS/Core/GenResSwe.gf b/grammars/TALK/GF_GoDiS/Core/GenResSwe.gf deleted file mode 100644 index 515cbc8df..000000000 --- a/grammars/TALK/GF_GoDiS/Core/GenResSwe.gf +++ /dev/null @@ -1,26 +0,0 @@ --- A file with PreReq and PostReq etc... - -resource GenResSwe = { - -param Form = Ques | Req | ReqNeg; - - -oper choosePre : Form => Str - = table { - Ques => ["kan jag"]; - Req => variants{ ["jag vill"] ; ["jag skulle vilja"] }; - ReqNeg => variants{ ["jag vill inte"] ; ["jag skulle inte vilja"] } - - }; - - -oper choosePost : Form => Str - = table { - Ques => ""; - Req => "tack"; - ReqNeg => "tack" - }; - -} - - diff --git a/grammars/TALK/GF_GoDiS/Core/Shared/sharedCore.gf b/grammars/TALK/GF_GoDiS/Core/Shared/sharedCore.gf deleted file mode 100644 index 59c6e4de5..000000000 --- a/grammars/TALK/GF_GoDiS/Core/Shared/sharedCore.gf +++ /dev/null @@ -1,133 +0,0 @@ --- general grammar ---# -path=.:../ - -abstract sharedCore = { - -cat - - -- Nuance needs a S category, easiest fix. - S; - - -- Simple Dialogue Moves - DMove; - - - --- Basic forms - - Action Task; - SingleAction; - Proposition Task; - - Task; - - --- Dialogue moves (DMove) are: ask, answer, greet, quit, request, confirm, report - - --- Greet - -- Simple greet move... - Greet ; - --- Quit --- Simple quit move... - Quit; - --- Answer --- Answers are moves that answer questions, posed or not. - Answer Task; - NegAnswer Task; - --- Ask --- Ask moves are those moves that ask for plans. --- "vad vill du göra?" "vad kan jag göra" "hjälp"(?) --- Hur är det med ja/nej frågor? - Ask Task; - SingleAsk; - - --- Request --- Requests are those moves that have no arguments and --- generate no specific informationfilled answers. - Request; - - --- ICM - - ICM; - Per_ICM; - Per_ICM_Followed; - Acc_ICM; - Acc_ICM_Followed; - - - -fun - - makeS : DMove -> S; - --- Greet - makeGreetMove : Greet -> DMove; - --- Quit - makeQuitMove : Quit -> DMove; - --- Answer - makeAnswer : (t : Task) -> Proposition t -> Answer t; - makeAnswerMove : (t : Task) -> Answer t -> DMove; - - - makeNegAnswer : (t : Task) -> Proposition t -> NegAnswer t; - makeNegAnswerMove : (t : Task) -> NegAnswer t -> DMove; - --- Ask - singleAsk : (t : Task) -> Ask t -> SingleAsk; - makeYesNoAsk : (t : Task) -> Action t -> SingleAsk; - makeAsk : SingleAsk -> DMove; - - --- Request - makeRequest : SingleAction -> Request; - makeRequestMove : Request -> DMove; - makeNegRequestMove : Request -> DMove; - - --- ICM - - makeICMPer : Per_ICM -> ICM; - makeICMAcc : Acc_ICM -> ICM; - - - - makeICMMove : ICM -> DMove; - - --- LEXICON - - shortAnswer : Task; - - top_command : SingleAction; - - help_command : SingleAction; - - yes : Answer shortAnswer; - no : Answer shortAnswer; - - greet_command : Greet; - bye_command : Quit; - - - -- ICMs - per_pos : Per_ICM_Followed; - per_neg : Per_ICM; - per_int : Per_ICM; - - acc_pos : Acc_ICM; - acc_neg_alone : Acc_ICM; - acc_neg : Acc_ICM_Followed; - --acc_int : Acc_ICM; - -} - - - diff --git a/grammars/TALK/GF_GoDiS/Core/Shared/sharedCoreEng.gf b/grammars/TALK/GF_GoDiS/Core/Shared/sharedCoreEng.gf deleted file mode 100644 index cc7b739ec..000000000 --- a/grammars/TALK/GF_GoDiS/Core/Shared/sharedCoreEng.gf +++ /dev/null @@ -1,55 +0,0 @@ -concrete sharedCoreEng of sharedCore = open GenResEng in { - ---flags lexer=codelit ; unlexer=codelit ; startcat=DMoveList ; -flags conversion=finite; - - ---# -path=.:../ - -lin - makeS s = {s = s.s}; - - - --- Linearization of Greet, Quit, Answer, Ask and Request are moved to --- System and User respectively because of differing linearizations - - --- ICM - - makeICMPer perI = {s = perI.s}; - - makeICMAcc accI = {s = accI.s}; - - makeICMMove icm = {s = icm.s}; - - - - --- LEXICON - -pattern - - top_command = (variants {["top"] ; ["forget everything"] ; ["start over"]}); - -- end_command = "quit"; - - help_command = variants {"get" ; ""} ++ "help" ; - - yes = variants {"yes" ; "yup" ; "yeppers"}; - no = variants {"no" ; "nope" }; - - greet_command = variants { "hello" ; "hi" ; "yo"}; - bye_command = variants { ["goodbye"] ; "bye" ; "end" }; - --- ICMs --- Moved to User and System respectively because of differing linearisations --- for user and system. - - -} - - - - - - diff --git a/grammars/TALK/GF_GoDiS/Core/Shared/sharedCorePro.gf b/grammars/TALK/GF_GoDiS/Core/Shared/sharedCorePro.gf deleted file mode 100644 index 72295478e..000000000 --- a/grammars/TALK/GF_GoDiS/Core/Shared/sharedCorePro.gf +++ /dev/null @@ -1,92 +0,0 @@ ---# -path=.:../ - -concrete sharedCorePro of sharedCore = { - - -flags lexer=code ; unlexer=concat ; -flags conversion=finite; - -lin - - -- Borde inte request, question, etc.. ligga i en - -- generell resursfil så att man kan komma åt dem. - -- Det är inte speciellt snyggt att skriva ut det - -- ibland här och ibland i den specifika filen.. - -- Det känns som om det borde vara en "resurs"fråga. - - -- Det ÄR en resursgrej... titta i video grammatiken: - -- prologResource.gf och generalProlog.gf - -- som Aarne fixade till från Karins pyssel. - -- Hakparanteserna borde också fixas till på samma sätt... - - makeS s = {s = "[" ++ s.s ++ "]"}; - --- Greet - makeGreetMove gre = {s = gre.s }; - --- Quit - makeQuitMove qui = {s = qui.s }; - --- Answer - makeAnswer _ ans = {s = "answer" ++ "(" ++ ans.s ++ ")"}; - makeNegAnswer _ ans = {s = "answer" ++ "(" ++ "not" ++ "(" ++ ans.s ++ ")" ++ ")"}; - makeAnswerMove _ sha = {s = sha.s }; - makeNegAnswerMove _ sha = {s = sha.s}; - --- Ask - singleAsk _ ask = {s = "X" ++ "^" ++ ask.s ++ "(" ++ "X" ++ ")"}; - makeYesNoAsk _ action = {s = action.s}; - makeAsk ask = {s = "ask" ++ "(" ++ ask.s ++ ")"}; - --- Request - makeRequest req = {s = "request" ++ "(" ++ req.s ++ ")" }; - makeRequestMove reqM = {s = reqM.s}; - makeNegRequestMove reqM = {s = "not" ++ "(" ++ reqM.s ++ ")"}; - - --- ICM - - makeICMPer perI = {s = perI.s}; - - makeICMAcc accI = {s = accI.s}; --- makeICMAccProp accI prop = {s = accI.s ++ ":" ++ prop.s}; - - - makeICMMove icm = {s = "icm" ++ ":" ++ icm.s}; - --- LEXICON - -pattern - top_command = "top"; - -- end_command = "quit"; - - help_command = "help"; - - yes = "yes"; - no = "no"; - - greet_command = "greet"; - bye_command = "quit"; - - -- ICMs - per_pos = ["per * pos"]; - per_neg = ["per * neg"]; - per_int = ["per * int"]; - - - acc_pos = ["acc * pos"]; - acc_neg = ["acc * neg"]; - acc_neg_alone = ["acc * neg"]; - --acc_int = "acc*int"; - - -} - - - - - - - - - diff --git a/grammars/TALK/GF_GoDiS/Core/Shared/sharedCoreSwe.gf b/grammars/TALK/GF_GoDiS/Core/Shared/sharedCoreSwe.gf deleted file mode 100644 index 12dd7abf1..000000000 --- a/grammars/TALK/GF_GoDiS/Core/Shared/sharedCoreSwe.gf +++ /dev/null @@ -1,54 +0,0 @@ -concrete sharedCoreSwe of sharedCore = open GenResSwe in { - ---flags lexer=codelit ; unlexer=codelit ; -flags conversion=finite; - ---# -path=.:../ - -lin - makeS s = {s = s.s}; - --- Linearizations of Greet, Quit, Answer, Ask and Request --- are moved to User and System respectively because of punctuation. - --- ICM - - makeICMPer perI = {s = perI.s}; - - makeICMAcc accI = {s = accI.s}; - - - makeICMMove icm = {s = icm.s}; - - - - --- LEXICON - -pattern - - top_command = (variants {["glömma allt"] ; ["börja om"]}); - -- end_command = "avsluta"; - - help_command = variants {"få" ; "ha"} ++ "hjälp" ; - - yes = variants {"ja" ; "japp" ; "jajamen"}; - no = variants {"nej" ; "nepp" }; - - greet_command = variants { "hej" ; "tjena" ; "hallå"}; - bye_command = variants { ["hejdå"] ; "sluta" ; "avbryt" }; - - --- ICMs --- Linearization of ICMs are moved to User and System --- respectively because of differing linearizations. - - -} - - - - - - - diff --git a/grammars/TALK/GF_GoDiS/Core/System/systemCore.gf b/grammars/TALK/GF_GoDiS/Core/System/systemCore.gf deleted file mode 100644 index e2cc71ab5..000000000 --- a/grammars/TALK/GF_GoDiS/Core/System/systemCore.gf +++ /dev/null @@ -1,158 +0,0 @@ --- general grammar ---# -path=.:../Shared - -abstract systemCore = sharedCore ** { - -cat - - DMoves; - - --- internal forms - - --Proposition; - Other_ICM; - Other_ICM_Followed; - Sem_ICM; - Sem_ICM_Followed; - Und_ICM; - Und_ICM_Followed; - - - --- Confirm --- This is where the system confirms that the action has been taken. - Confirm; - - --- Report --- This is where the system reports on the actions taken --- i.e. "The song Leviathan was added to the playlist" - --- The report consists of a Request. - Report; - Status; - --- Asks specific for the System - SystemAsk; - - --- Issues - - Issue; - PropIssue; - AskIssue; - ListIssue; - IssueList; - ListItem; - - -fun - --- BASICS - - makeSofDMoves : DMoves -> S; - makeDMPair : DMove -> DMove -> DMoves; - makeDMList : DMove -> DMoves -> DMoves; - - --- ICM - - -- Plus en som tar en strang... oj oj for genereringen. --- makeICMPerString : Per_ICM_Followed -> String -> ICM; - makeICMPerString : Per_ICM_Followed -> ICM; - - makeICMSem : Sem_ICM -> ICM; - makeICMSemMoveReq : Sem_ICM_Followed -> Request -> ICM; - makeICMSemMoveAnswer : (t : Task) -> Sem_ICM_Followed -> Answer t -> ICM; - makeICMSemMoveAsk : (t : Task) -> Sem_ICM_Followed -> Ask t -> ICM; - - makeICMUnd : Und_ICM -> ICM; - makeICMUndProp : (t : Task) -> Und_ICM_Followed -> Proposition t -> ICM; - - makeICMOther : Other_ICM -> ICM; - makeICMOtherIssue : Other_ICM_Followed -> ListItem -> ICM; - makeICMOtherReq : (t : Task) -> Other_ICM_Followed -> Action t -> ICM; - - makeICMAccIssue : Acc_ICM_Followed -> Issue -> ICM; - --- !!! Väldigt rekursivt!!!! - - - - --- Confirm - --makeConfirm : SingleAction -> Confirm; - makeConfirmMove : Confirm -> DMove; - - --- Report - - -- Behöver en till kategori, en Status... - -- Hmm... undrar hur jag ska gora det här snyggt. - - - makeReport : SingleAction -> Status -> Report; - makeReportMove : Report -> DMove; - --- Ask - makeSystemAsk : SystemAsk -> DMove; - makeAskSet : IssueList -> SystemAsk; - makeInstantiatedAsk : (t : Task) -> Action t -> SystemAsk; - makeInstantiatedAskSingle : SingleAction -> SystemAsk; - - --- Issues - - makePropIssue : (t : Task) -> Proposition t -> PropIssue; - - makeIssueProp : PropIssue -> Issue; - makeIssueAsk : AskIssue -> Issue; - makeIssueList : ListIssue -> Issue; - - makePropIssue : (t : Task) -> Proposition t -> PropIssue; - makeAskIssue : (t : Task) -> Ask t -> AskIssue; - - --makeListItemProp : PropIssue -> ListItem; - makeListItemAsk : AskIssue -> ListItem; - makeListItemAction : (t : Task) -> Action t -> ListItem; - makeListItemSingleAction : SingleAction -> ListItem; - - makeListIssue : ListItem -> ListItem -> ListIssue; - makeListIssue2 : ListItem -> ListIssue ->ListIssue; - - makeActualListIssue : ListIssue -> IssueList; - --- Lexicon - makeBasicAsk : SystemAsk; - - sem_pos : Sem_ICM; - sem_pos_followed : Sem_ICM_Followed; - sem_neg : Sem_ICM; - --sem_int : Sem_ICM; - - und_pos : Und_ICM; - und_pos_followed : Und_ICM_Followed; - und_neg : Und_ICM; - und_int : Und_ICM_Followed; - - reraise : Other_ICM; - reraise_followed : Other_ICM_Followed; - loadplan : Other_ICM; - accomodate : Other_ICM_Followed; - reaccomodate : Other_ICM_Followed; - - a_String : String; - - status_done : Status; - status_initiated : Status; - status_pending : Status; - status_failed : Status; - -} - - - - - - diff --git a/grammars/TALK/GF_GoDiS/Core/System/systemCoreEng.gf b/grammars/TALK/GF_GoDiS/Core/System/systemCoreEng.gf deleted file mode 100644 index b0cd17c2e..000000000 --- a/grammars/TALK/GF_GoDiS/Core/System/systemCoreEng.gf +++ /dev/null @@ -1,146 +0,0 @@ -concrete systemCoreEng of systemCore = sharedCoreEng ** { - ---flags lexer=text ; unlexer=text ; startcat=DMoveList ; ---# -path=.:../:../Shared -flags conversion=finite; - - -lin - --- Greet - makeGreetMove gre = {s = gre.s ++ "!"}; - --- Quit - makeQuitMove qui = {s = qui.s ++ "!"}; - --- Answer - makeAnswer _ ans = {s = ans.s}; - makeNegAnswer _ ans = {s = "not" ++ ans.s}; - makeAnswerMove _ sha = {s = sha.s ++ "."}; - makeNegAnswerMove _ sha = {s = sha.s ++ "."}; - --- Ask - singleAsk _ ask = {s = ask.s}; - makeYesNoAsk _ action = {s = action.s}; - makeAsk ask = {s = ask.s ++ "."}; - - --- Request - - -- makeRequestMove moved to System and User respectively - -- because of differing linearizations - - makeRequest req = {s = req.s ++ "."}; - makeRequestMove req = {s = req.s }; - makeNegRequestMove req = {s = req.s}; - --- BASICS - - makeSofDMoves dms = {s = dms.s}; - makeDMPair dm1 dm2 = {s = dm1.s ++ dm2.s}; - makeDMList dm dms = {s = dm.s ++ dms.s}; - - --- Confirm - - --makeConfirm req = {s = ["managed to"] ++ req.s ++ "."}; - makeConfirmMove conM = {s = conM.s ++ "."}; - --- Report - makeReport req status = {s = status.s ++ req.s ++ "." }; - makeReportMove repM = {s = repM.s}; - - --- ICM - - -- makeICMPerString perI string = {s = perI.s ++ string.s ++ "."}; - makeICMPerString perI = {s = perI.s}; - - makeICMSem semI = {s = semI.s}; - makeICMSemMoveReq semI req = {s = semI.s ++ req.s ++ "."}; - makeICMSemMoveAnswer _ semI ans = {s = semI.s ++ ans.s ++ "."}; - makeICMSemMoveAsk _ semI ask = {s = semI.s ++ ask.s ++ "."}; - - - makeICMUnd undI = {s = undI.s}; - makeICMUndProp _ undI prop = {s = prop.s ++ undI.s }; - - makeICMAccIssue accI issue = {s = accI.s ++ [", i cannot answer questions about"] ++ issue.s ++ "."}; - - makeICMOther otherI = {s = otherI.s }; - makeICMOtherIssue otherI issue = {s = otherI.s ++ issue.s ++ "."}; - makeICMOtherReq _ other req = {s = other.s ++ req.s ++ "."}; - - --- Ask - - makeSystemAsk sysA = {s = sysA.s ++ "?"}; - makeAskSet set = {s = ["do you want to"] ++ set.s}; - makeInstantiatedAsk _ insA = {s = ["do you want to"] ++ insA.s }; - makeInstantiatedAskSingle insA = {s = ["do you want to"] ++ insA.s}; - --- Isues - - makePropIssue _ prop = {s = prop.s}; - - makeIssueProp pi = {s = pi.s}; - makeIssueAsk ai = {s = ai.s}; - makeIssueList li = {s = li.s}; - - --makePropIssue _ prop = {s = prop.s}; - makeAskIssue _ ask = {s = ask.s}; - - -- makeListItemProp propI = {s = propI.s}; - makeListItemAsk askI = {s = "ask" ++ "about" ++ askI.s}; - makeListItemAction _ action = {s = action.s}; - makeListItemSingleAction action = {s = action.s}; - - makeListIssue prop1 prop2 = {s = prop1.s ++ "or" ++ prop2.s}; - makeListIssue2 prop list = {s = prop.s ++ "," ++ list.s}; - - makeActualListIssue list = {s = list.s}; - - -pattern - - makeBasicAsk = ["what can i do for you"]; - - sem_pos = "okay"; - sem_pos_followed = [""]; - sem_neg = ["i am sorry i do not understand ."]; - -- sem_int = ["what do you mean with"]; - - und_pos = ["okay ."]; - und_pos_followed = ["."]; - und_neg = ["i do not understand what you mean ."]; - und_int = [", is this correct ?"]; -- följer yttrandet!!! - - per_pos = ["i thought you said"]; -- följs av en sträng - - reraise = ["so ,"]; - reraise_followed = ["so ,"]; - loadplan = ["lets see ."]; - accomodate = ["i assume you mean"]; - reaccomodate = ["returning to "]; - - - -- ICMs - -- Moved from General because of differing linearisations user and system. - - per_neg = variants {["pardon i did not hear what you said ."] ; ["pardon ?"]; ["sorry ?"]}; - per_int = variants { ["pardon ?"] ; ["what did you say ?"] }; - - acc_pos = "okay"; - acc_neg = "sorry"; - acc_neg_alone = "sorry"; - - - status_done = ["managed to"]; - status_initiated = ["started to"]; - status_pending = ["waiting to"]; - status_failed = ["failed to"]; - - -} - - diff --git a/grammars/TALK/GF_GoDiS/Core/System/systemCorePro.gf b/grammars/TALK/GF_GoDiS/Core/System/systemCorePro.gf deleted file mode 100644 index 6b037b967..000000000 --- a/grammars/TALK/GF_GoDiS/Core/System/systemCorePro.gf +++ /dev/null @@ -1,128 +0,0 @@ - - -concrete systemCorePro of systemCore = sharedCorePro ** { - - -flags lexer=codelit ; unlexer=concat ; -flags conversion=finite; - - -lincat - - --- Confirm --- This is where the system confirms that the action has been taken. - Confirm = {s : Str}; - - --- Report --- This is where the system reports on the actions taken --- i.e. "The song Leviathan was added to the playlist" - --- The report consists of a Request. - Report = {s : Str}; - -lin - --- BASICS - - makeSofDMoves dms = {s = "[" ++ dms.s ++ "]"}; - makeDMPair dm1 dm2 = {s = dm1.s ++ "," ++ dm2.s}; - makeDMList dm dms = {s = dm.s ++ "," ++ dms.s}; - - - --- Confirm - --makeConfirm req = { s = "confirm" ++ "(" ++ req.s ++ ")"}; - makeConfirmMove conM = {s = "confirm" ++ "(" ++ conM.s ++ ")"}; - - --- Report - makeReport req status = { s = "report" ++ "(" ++ req.s ++ "," ++ status.s ++ ")"}; - makeReportMove repM = {s = repM.s}; - --- Ask - - makeSystemAsk sysA = {s = "ask" ++ "(" ++ sysA.s ++ ")"}; - makeAskSet set = {s = set.s}; - makeInstantiatedAsk _ insA = {s = "action" ++ "(" ++ insA.s ++ ")"}; - makeInstantiatedAskSingle insA = {s = "action" ++ "(" ++ insA.s ++ ")"}; - - --- ICM - -- Plus en som tar en strang... oj oj for genereringen. - -- makeICMPerString perI string = {s = perI.s ++ string.s}; - makeICMPerString perI = {s = perI.s }; - - makeICMSem semI = {s = semI.s}; - makeICMSemMoveReq semI req = {s = semI.s ++ ":" ++ req.s}; - makeICMSemMoveAnswer _ semI ans = {s = semI.s ++ ":" ++ ans.s}; - makeICMSemMoveAsk _ semI ask = {s = semI.s ++ ":" ++ ask.s}; - - makeICMUnd undI = {s = undI.s}; - makeICMUndProp _ undI prop = {s = undI.s ++ ":" ++ "usr" ++ "*" ++ prop.s}; - - - makeICMOther otherI = {s = otherI.s}; - makeICMOtherIssue otherI issue = {s = otherI.s ++ ":" ++ issue.s}; - makeICMOtherReq _ other req = {s = other.s ++ ":" ++ req.s}; - - makeICMAccIssue otherI issue = {s = otherI.s ++ ":" ++ issue.s}; - --- !!! Väldigt rekursivt!!!! - --- Isues - - makePropIssue _ prop = {s = prop.s}; - - makeIssueProp pi = {s = pi.s}; - makeIssueAsk ai = {s = ai.s}; - makeIssueList li = {s = li.s}; - - makePropIssue _ prop = {s = prop.s}; - makeAskIssue _ ask = {s = "X" ++ "^" ++ ask.s ++ "(" ++ "X" ++ ")"}; - - --makeListItemProp propI = {s = propI.s}; - makeListItemAsk askI = {s = "issue" ++ "(" ++ askI.s ++ ")"}; - makeListItemAction _ action = {s = variants {("action" ++ "(" ++ action.s ++ ")") ; - action.s }}; - makeListItemSingleAction action = {s = variants { ("action" ++ "(" ++ action.s ++ ")") ; - action.s }}; - - makeListIssue prop1 prop2 = {s = prop1.s ++ "," ++ prop2.s}; - makeListIssue2 prop list = {s = prop.s ++ "," ++ list.s}; - - makeActualListIssue list = {s = "set" ++ "(" ++ "[" ++ list.s ++ "]" ++ ")"}; - - -pattern - --- LEXICON - - makeBasicAsk = ["x ^ action ( x )"]; -- OBS OBS!!! - - sem_pos = ["sem * pos"]; - sem_pos_followed = ["sem * pos"]; - sem_neg = ["sem * neg"]; - --sem_int = ["sem * int"]; - - und_pos = ["und * pos"]; - und_pos_followed = ["und * pos"]; - und_neg = ["und * neg"]; - und_int = ["und * int"]; - - reraise = "reraise"; - reraise_followed = "reraise"; - loadplan = "loadplan"; - accomodate = "accomodate"; - reaccomodate = "reaccomodate"; - - status_done = "done"; - status_initiated = "initiated"; - status_pending = "pending"; - status_failed = "failed"; - - - -} - diff --git a/grammars/TALK/GF_GoDiS/Core/System/systemCoreSwe.gf b/grammars/TALK/GF_GoDiS/Core/System/systemCoreSwe.gf deleted file mode 100644 index 67e60a59b..000000000 --- a/grammars/TALK/GF_GoDiS/Core/System/systemCoreSwe.gf +++ /dev/null @@ -1,141 +0,0 @@ -concrete systemCoreSwe of systemCore = sharedCoreSwe ** { - ---flags lexer=codelit ; unlexer=codelit ; startcat=DMoveList ; ---# -path=.:../:../Shared -flags conversion=finite; - -lin - --- Greet - makeGreetMove gre = {s = gre.s ++ "!"}; - --- Quit - makeQuitMove qui = {s = qui.s ++ "!"}; - --- Answer - makeAnswer _ ans = {s = ans.s}; - makeNegAnswer _ ans = {s = "inte" ++ ans.s}; - makeAnswerMove _ sha = {s = sha.s ++ "."}; - makeNegAnswerMove _ sha = {s = sha.s ++ "."}; - --- Ask - singleAsk _ ask = {s = ask.s}; - makeYesNoAsk _ action = {s = action.s}; - makeAsk ask = {s = ask.s ++ "."}; - - --- Request - - -- makeRequestMove moved to System and User respectively - -- because of differing linearizations - - makeRequest req = {s = req.s ++ "."}; - - makeRequestMove req = {s = req.s }; - makeNegRequestMove req = {s = req.s}; - - - --- BASICS - - makeSofDMoves dms = {s = dms.s}; - makeDMPair dm1 dm2 = {s = dm1.s ++ dm2.s}; - makeDMList dm dms = {s = dm.s ++ dms.s}; - - --- Confirm - - --makeConfirm req = {s = ["lyckades med att"] ++ req.s ++ "."}; - makeConfirmMove conM = {s = conM.s}; - --- Report - makeReport req status= {s = status.s ++ req.s ++ "."}; - makeReportMove repM = {s = repM.s}; - - --- ICM - - --makeICMPerString perI string = {s = perI.s ++ string.s ++ "."}; - makeICMPerString perI = {s = perI.s}; - - makeICMSem semI = {s = semI.s}; - makeICMSemMoveReq semI req = {s = semI.s ++ req.s ++ "."}; - makeICMSemMoveAnswer _ semI ans = {s = semI.s ++ "med" ++ ans.s ++ "."}; - makeICMSemMoveAsk _ semI ask = {s = semI.s ++ ask.s ++ "."}; - - - makeICMUnd undI = {s = undI.s}; - makeICMUndProp _ undI prop = {s = prop.s ++ "," ++ undI.s}; - - makeICMAccIssue accI issue = {s = accI.s ++ issue.s}; - - makeICMOther otherI = {s = otherI.s ++ "."}; - makeICMOtherIssue otherI issue = {s = otherI.s ++ issue.s ++ "."}; - --- Ask - - makeSystemAsk sysA = {s = sysA.s ++ "?"}; - makeAskSet set = {s = ["vill du"] ++ set.s}; - makeInstantiatedAsk _ insA = {s = ["vill du"] ++ insA.s}; - makeInstantiatedAskSingle insA = {s = ["vill du"] ++ insA.s}; - --- Isues - - makePropIssue _ prop = {s = prop.s}; - - makeIssueProp pi = {s = pi.s}; - makeIssueAsk ai = {s = ai.s}; - makeIssueList li = {s = li.s}; - - --makePropIssue prop = {s = prop.s}; - makeAskIssue _ ask = {s = ask.s}; - - -- makeListItemProp propI = {s = propI.s}; - makeListItemAsk askI = {s = "fråga" ++ "om" ++ askI.s}; - makeListItemAction _ action = {s = action.s}; - makeListItemSingleAction action = {s = action.s}; - - makeListIssue prop1 prop2 = {s = prop1.s ++ "eller" ++ prop2.s}; - - - -pattern - - makeBasicAsk = ["vad kan jag göra för dig"]; - - sem_pos = "okej"; - sem_neg = ["förlåt jag förstår inte vad du menar."]; - -- sem_int = ["vad menar du med"]; - - und_pos = "okej."; - und_neg = ["jag förstår inte vad du menar."]; - und_int = ["är det korrekt?"]; -- följer yttrandet!!! - - per_pos = ["jag tyckte du sa"]; -- följs av en sträng - - reraise = ["så ,"]; - reraise_followed = ["så ,"]; - loadplan = ["låt oss se ."]; - accomodate = ["jag antar att du menar"]; - reaccomodate = ["gå tillbaks till"]; - - - -- ICMs - -- Moved from General because of differing linearisations user and system. - - per_neg = variants {"ursäkta"; "förlåt" ; ["ursäkta jag hörde inte vad du sa"]}; - per_int = variants { "ursäkta" ; ["vad sa du"] }; - - acc_pos = "okej"; - acc_neg = ["ledsen jag kan inte svara på frågor om"]; - acc_neg_alone = "ledsen"; - - status_done = ["lyckades med att"]; - status_initiated = ["började med att"]; - status_pending = ["avvaktar med att"]; - status_failed = ["misslyckades med att"]; - - -} - - diff --git a/grammars/TALK/GF_GoDiS/Core/User/userCore.gf b/grammars/TALK/GF_GoDiS/Core/User/userCore.gf deleted file mode 100644 index 1864c7967..000000000 --- a/grammars/TALK/GF_GoDiS/Core/User/userCore.gf +++ /dev/null @@ -1,27 +0,0 @@ --- general grammar - -abstract userCore = sharedCore ** { - -cat - -- A Dialogue Move that consists of a Request and arguments. - CompoundedRequest; - CompoundedAsk; - AnswerList Task; - - -fun - - makeAnswerListS : (t : Task) -> AnswerList t -> DMove; - - makeCompoundedRequest : CompoundedRequest -> DMove; - makeNegCompoundedRequest : CompoundedRequest -> DMove; - makeCompoundedAsk : CompoundedAsk -> DMove; - - - requestCompounded : (t : Task) -> Action t -> Answer t -> CompoundedRequest ; - requestCompoundedMulti : (t : Task) -> Action t -> AnswerList t -> CompoundedRequest; - - makeAskMove : (t : Task) -> Ask t -> Answer t -> CompoundedAsk; - - -} diff --git a/grammars/TALK/GF_GoDiS/Core/User/userCoreEng.gf b/grammars/TALK/GF_GoDiS/Core/User/userCoreEng.gf deleted file mode 100644 index 8f02dde07..000000000 --- a/grammars/TALK/GF_GoDiS/Core/User/userCoreEng.gf +++ /dev/null @@ -1,93 +0,0 @@ -concrete userCoreEng of userCore = sharedCoreEng ** open GenResEng in { - -flags conversion=finite; - - -lin - --- Greet - makeGreetMove gre = {s = gre.s}; - --- Quit - makeQuitMove qui = {s = qui.s}; - --- Answer - makeAnswer _ ans = {s = ans.s}; - makeNegAnswer _ ans = {s = "not" ++ ans.s}; - makeAnswerMove _ sha = {s = sha.s}; - makeNegAnswerMove _ sha = {s = sha.s}; - --- Ask - singleAsk _ ask = {s = ask.s}; - makeYesNoAsk _ action = {s = action.s}; - makeAsk ask = {s = ask.s}; - - - - --- Requests - - - makeAnswerListS _ alist = {s = alist.s}; - requestCompounded _ req obj = {s = req.s ++ obj.s}; - requestCompoundedMulti _ req obj = {s = req.s ++ obj.s }; - - makeRequest req = {s = req.s}; - - makeCompoundedRequest crq = {s = variants { - ( (choosePre ! Req) ++ crq.s ++ (choosePost ! Req) ); - ( (choosePre ! Req) ++ crq.s ); - ( crq.s ++ (choosePost ! Req) ); - ( crq.s ) - } - }; - - makeNegCompoundedRequest crq = {s = variants { - ( (choosePre ! ReqNeg) ++ crq.s ++ (choosePost ! Req) ); - ( (choosePre ! ReqNeg) ++ crq.s ); - ( "not" ++ crq.s ++ (choosePost ! Req) ); - ( "not" ++ crq.s ) - } - }; - - - makeRequestMove req = {s = variants { - ( req.s ); - ( (choosePre ! Req) ++ req.s ++ (choosePost ! Req) ); - ( (choosePre ! Req) ++ req.s ); - ( req.s ++ (choosePost ! Req) ) - - } - }; - - makeNegRequestMove req = {s = variants { - ( "not" ++ req.s ); - ( (choosePre ! ReqNeg) ++ req.s ++ (choosePost ! Req) ); - ( (choosePre ! ReqNeg) ++ req.s ); - ( "not" ++ req.s ++ (choosePost ! Req) ) - - } - }; - - - --- Asks - makeCompoundedAsk ask = {s = ask.s}; - - makeAskMove _ ques answer = {s = ques.s ++ answer.s}; - -pattern - -- ICMs - -- Moved from General because of differing linearisations for user and system. - - per_neg = variants {"what" ; "pardon"; ["pardon i did not hear what you said"]}; - per_int = variants { "pardon" ; ["what did you say"] }; - - acc_pos = variants { "okay" ; "ok" ; "sure" ; "yup" ; "right" }; - acc_neg = ["i do not know"]; - acc_neg_alone = ["i do not know"]; - - -} - - diff --git a/grammars/TALK/GF_GoDiS/Core/User/userCorePro.gf b/grammars/TALK/GF_GoDiS/Core/User/userCorePro.gf deleted file mode 100644 index 0c28fe9d7..000000000 --- a/grammars/TALK/GF_GoDiS/Core/User/userCorePro.gf +++ /dev/null @@ -1,22 +0,0 @@ -concrete userCorePro of userCore = sharedCorePro ** { - -flags lexer=code ; unlexer=concat ; -flags conversion=finite; - - -lin - makeAnswerListS _ alist = {s = alist.s}; - - makeCompoundedRequest crq = {s = crq.s}; - makeNegCompoundedRequest crq = { s = "~" ++ crq.s}; - makeCompoundedAsk ask = {s = ask.s}; - - - requestCompounded _ req obj = {s = "request(" ++ req.s ++ ")," ++ obj.s }; - requestCompoundedMulti _ req obj = {s = "request(" ++ req.s ++ ")," ++ obj.s }; - - makeAskMove _ ques answer = {s = "ask" ++ "(" ++ "X" ++ "^" ++ ques.s ++ - "(" ++ "X" ++ ")" ++ ")," ++ answer.s}; - -} - diff --git a/grammars/TALK/GF_GoDiS/Core/User/userCoreSwe.gf b/grammars/TALK/GF_GoDiS/Core/User/userCoreSwe.gf deleted file mode 100644 index a90dbed0f..000000000 --- a/grammars/TALK/GF_GoDiS/Core/User/userCoreSwe.gf +++ /dev/null @@ -1,98 +0,0 @@ -concrete userCoreSwe of userCore = sharedCoreSwe ** open GenResSwe in { - -flags conversion=finite; - - -lin - --- Greet - makeGreetMove gre = {s = gre.s}; - --- Quit - makeQuitMove qui = {s = qui.s}; - --- Answer - makeAnswer _ ans = {s = ans.s}; - makeNegAnswer _ ans = {s = "inte" ++ ans.s}; - makeAnswerMove _ sha = {s = sha.s}; - makeNegAnswerMove _ sha = {s = sha.s}; - --- Ask - singleAsk _ ask = {s = ask.s}; - makeYesNoAsk _ action = {s = action.s}; - makeAsk ask = {s = ask.s }; - - --- Request - - -- makeRequestMove moved to System and User respectively - -- because of differing linearizations - - makeRequest req = {s = req.s}; - - - --- Requests - - - makeAnswerListS _ alist = {s = alist.s}; - requestCompounded _ req obj = {s = req.s ++ obj.s}; - requestCompoundedMulti _ req obj = {s = req.s ++ obj.s }; - - - makeRequestMove req = {s = variants { - ( req.s ); - ( (choosePre ! Req) ++ req.s ++ (choosePost ! Req) ); - ( (choosePre ! Req) ++ req.s ); - ( req.s ++ (choosePost ! Req) ) - - } - }; - - makeNegCompoundedRequest crq = {s = variants { - ( (choosePre ! ReqNeg) ++ crq.s ++ (choosePost ! Req) ); - ( (choosePre ! ReqNeg) ++ crq.s ); - ( "inte" ++ crq.s ++ (choosePost ! Req) ); - ( "inte" ++ crq.s ) - } - }; - - - - makeCompoundedRequest crq = {s = variants { - ( (choosePre ! Req) ++ crq.s ++ (choosePost ! Req) ); - ( (choosePre ! Req) ++ crq.s ); - ( crq.s ++ (choosePost ! Req) ); - ( crq.s ) - } - }; - - makeNegRequestMove req = {s = variants { - ( "inte" ++ req.s ); - ( (choosePre ! ReqNeg) ++ req.s ++ (choosePost ! Req) ); - ( (choosePre ! ReqNeg) ++ req.s ); - ( "inte" ++ req.s ++ (choosePost ! Req) ) - - } - }; - - --- Asks - makeCompoundedAsk ask = {s = ask.s}; - - makeAskMove _ ques answer = {s = ques.s ++ answer.s}; - -pattern - -- ICMs - -- Moved from General because of differing linearisations for user and system. - - per_neg = variants {"va" ; "ursäkta"; "förlåt" ; ["ursäkta jag hörde inte vad du sa"]}; - per_int = variants { "ursäkta" ; ["vad sa du"] }; - - acc_pos = variants { "okej" ; "ok" ; "visst" ; "japp" ; "jaha" }; - acc_neg = ["vet inte"]; - - -} - - diff --git a/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/DB.gf b/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/DB.gf deleted file mode 100644 index e642d671d..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/DB.gf +++ /dev/null @@ -1,5 +0,0 @@ ---# -path=.:../../Resource/Media:../../Resource/Time: - -abstract DB = TVStations, Time, Weekday ** { - -} diff --git a/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/DBEng.gf b/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/DBEng.gf deleted file mode 100644 index 27053c2eb..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/DBEng.gf +++ /dev/null @@ -1,5 +0,0 @@ ---# -path=.:../../Resource/Media:../../Resource/Time: - -concrete DBEng of DB = TVStationsEng, TimeEng, WeekdayEng ** { - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/DBPro.gf b/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/DBPro.gf deleted file mode 100644 index f7b96247f..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/DBPro.gf +++ /dev/null @@ -1,5 +0,0 @@ ---# -path=.:../../Resource/Media:../../Resource/Time: - -concrete DBPro of DB = TVStationsPro, TimeProlog, WeekdayProlog ** { - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/DBSwe.gf b/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/DBSwe.gf deleted file mode 100644 index ab7e984d2..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/DBSwe.gf +++ /dev/null @@ -1,5 +0,0 @@ ---# -path=.:../../Resource/Media:../../Resource/Time: - -concrete DBSwe of DB = TVStationsSwe, TimeSwe, WeekdaySwe ** { - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/Shared/sharedDomain.gf b/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/Shared/sharedDomain.gf deleted file mode 100644 index db2f40c51..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/Shared/sharedDomain.gf +++ /dev/null @@ -1,64 +0,0 @@ ---# -path=.:../:../../../Resource/Time:../Shared:../../../Core:../../../Core/Shared: - -abstract sharedDomain = sharedCore, DB, Time, Weekday ** { - -fun - --- ANSWERS - - --makeAddLocAnswer : Location -> Proposition addTask; - --makeRemLocAnswer : Location -> Proposition removeTask; - - makeAddEventAnswer : Event -> Proposition addTask; - makeRemEventAnswer : Event -> Proposition removeTask; - makeCheckupAnswer : Event -> Proposition checkupTask; - makeCheckTimeAnswer : Event -> Proposition checkTimeTask; - makeAddInfoAnswer : Event -> Proposition addInfoTask; - - makeAddEventTimeAnswer : Time -> Proposition addTask; - makeRemEventTimeAnswer : Time -> Proposition removeTask; - makeCheckupTimeAnswer : Time -> Proposition checkupTask; - makeCheckTimeTimeAnswer : Time -> Proposition checkTimeTask; - makeAddInfoTimeAnswer : Time -> Proposition addInfoTask; - - makeAddEventDayAnswer : Weekday -> Proposition addTask; - makeRemEventDayAnswer : Weekday -> Proposition removeTask; - makeCheckupDayAnswer : Weekday -> Proposition checkupTask; - makeCheckTimeDayAnswer : Weekday -> Proposition checkTimeTask; - makeAddInfoDayAnswer : Weekday -> Proposition addInfoTask; - - makeCheckAnswer : Location -> Proposition checkupTask; - makeAddInfoLocAnswer : Location -> Proposition addInfoTask; - makeCheckTimeLocAnswer : Location -> Proposition checkTimeTask; - - - --- LEXICON - - addTask : Task; - removeTask : Task; - changeTask : Task; - addInfoTask : Task; - checkupTask : Task; -- "har jag" - checkTimeTask : Task; - - addEntry : Action addTask; -- "lägga till", "anteckna", "göra en anteckning", "boka", "boka in" - removeEntry : Action removeTask; -- "ta bort", "radera", "ta bort en anteckning", "ta bort anteckningen" - changeEntry : Action changeTask; -- "ändra anteckningen" - "request(change_info)" - augmentEntry : Action addInfoTask; -- "lägga till mer information" - "request(more_info) - checkupEntry : Action checkTimeTask; - - checkup : Ask checkupTask; -- "vad har jag" - -} - - - - - - - - - - - diff --git a/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/Shared/sharedDomainEng.gf b/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/Shared/sharedDomainEng.gf deleted file mode 100644 index f4952f1d5..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/Shared/sharedDomainEng.gf +++ /dev/null @@ -1,148 +0,0 @@ ---# -path=.:../:../Artist:../Numbers - - -concrete sharedDomainEng of sharedDomain = sharedCoreEng, numbersEng, orderNumEng, englishDBEng ** - open SpecResEng in { - - - - - -lin - -- ANSWERS - answerSongPlay song = {s = variants { - ( song.s ); - ( (itemForm ! Song) ++ song.s ) - } - }; - answerSongAdd song = {s = variants { - ( song.s ); - ( (itemForm ! Song) ++ song.s ) - } - }; - answerSongRemove song = {s = variants { - ( song.s ); - ( (itemForm ! Song) ++ song.s ) - } - }; - questionSong song = {s = variants { - ( song.s ); - ( (itemForm ! Song) ++ song.s ) - } - }; - - - - answerArtistPlay artist = {s = variants { - ( artist.s ); - ( (itemForm ! Artist) ++ artist.s ) - } - }; - answerArtistAdd artist = {s = variants { - ( artist.s ); - ( (itemForm ! Artist) ++ artist.s ) - } - }; - answerArtistRemove artist = {s = variants { - ( artist.s ); - ( (itemForm ! Artist) ++ artist.s ) - } - }; - questionArtist artist = { s = variants { - ( artist.s ); - ( (itemForm ! Artist) ++ artist.s ) - } - }; - - - - answerStationPlay station = {s = variants { - ( station.s); - ( ["the station"] ++ station.s) - } - }; - answerStationAdd station = {s = variants { - ( station.s); - ( ["the station"] ++ station.s) - } - }; - answerStationRemove station = {s = variants { - ( station.s); - ( ["the station"] ++ station.s) - } - }; - - - - -- LIST RELATED ANSWERS - - -- nummer fem - -- fem - answerNumberInListPlay numb = {s = variants { - ( (listForm ! Numeric) ++ numb.s ); - ( numb.s ) - } - }; - - answerNumberInListRemove numb = {s = variants { - ( (listForm ! Numeric) ++ numb.s ); - ( numb.s ) - } - }; - - - -- den femte låten - -- den femte - answerOrderInListPlay ordNum = - {s = variants { - ("the" ++ ordNum.s ++ (itemForm ! Post)); - ("the" ++ ordNum.s) - } - }; - answerOrderInListRemove ordNum = - {s = variants { - ("the" ++ ordNum.s ++ (itemForm ! Post)); - ("the" ++ ordNum.s) - } - }; - - --- LEXICON - -pattern - - play_spec = (variants {["play"] ; ["listen to"] ; "hear"}); - play_spec_alone = variants {["play a specific"] ; ["play a specific song"] ; ["listen to a specific song"] ; ["hear a specific song"]}; - play = (variants {["start from the beginning"] ; ["play"] ; ["start"]}); - stop = (variants {["stop"]}); - pause = ["pause"]; - resume = (variants {["resume"] ; ["resume playing"]}); - - next = "next"; - previous = "previous"; - - raise_volume = ["raise the volume"] ; - lower_volume = ["lower the volume"]; - - shift = "shift" ++ variants{ ["the balance"] ; ""}; - right = variants{"" ; ["to the"]} ++ "right"; - left = variants{"" ; ["to the"]} ++ "left"; - center = variants{"" ; ["to the"]} ++ "middle"; - - show_list = ["show the list"]; - - add = ["add"]; - remove = ["remove"]; - - handle_list = ["manage the playlist"]; - handle_player = ["talk to the player"]; - handle_stations = ["choose a station"]; -} - - - - - - - - diff --git a/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/Shared/sharedDomainPro.gf b/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/Shared/sharedDomainPro.gf deleted file mode 100644 index b6c74a297..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/Shared/sharedDomainPro.gf +++ /dev/null @@ -1,77 +0,0 @@ --- SWEDISH VERSION, UNCOMMENT AS NEEDED ---# -path=.:../:../DBase/Swedish:../DBase:../Shared:../System:../Numbers -concrete sharedDomainPro of sharedDomain = sharedCorePro, numbersEng, orderNumEng, swedishDBPro ** { - --- ENGLISH VERSION, UNCOMMENT AS NEEDED --- --# -path=.:../:../DBase/English:../DBase:../Shared:../System:../Numbers - - --- concrete sharedDomainPro of sharedDomain = sharedCorePro, numbersEng, orderNumEng, englishDBPro ** { - -flags lexer=code ; unlexer=code ; - -lin - --- ANSWERS - - answerSongPlay song = { s = "item" ++ "(" ++ song.s ++ ")"}; - answerSongAdd song = { s = "item" ++ "(" ++ song.s ++ ")"}; - answerSongRemove song = { s = "item" ++ "(" ++ song.s ++ ")"}; - questionSong song = { s = "item" ++ "(" ++ song.s ++ ")"}; - - - answerArtistPlay artist = { s = "group" ++ "(" ++ artist.s ++ ")"}; - answerArtistAdd artist = { s = "group" ++ "(" ++ artist.s ++ ")"}; - answerArtistRemove artist = { s = "group" ++ "(" ++ artist.s ++ ")"}; - questionArtist artist = {s = "group" ++ "(" ++ artist.s ++ ")"}; - - - answerStationPlay station = { s = "station" ++ "(" ++ station.s ++ ")"}; - answerStationAdd station = { s = "station" ++ "(" ++ station.s ++ ")"}; - answerStationRemove station = { s = "station" ++ "(" ++ station.s ++ ")"}; - - - answerNumberInListPlay numb = {s = "index" ++ "(" ++ "[" ++ numb.s ++ "]" ++ ")"}; - answerNumberInListRemove numb = {s = "index" ++ "(" ++ "[" ++ numb.s ++ "]" ++ ")"}; - - answerOrderInListPlay ordNum = {s = "index" ++ "(" ++ "[" ++ ordNum.s ++ "]" ++ ")"}; - answerOrderInListRemove ordNum = {s = "index" ++ "(" ++ "[" ++ ordNum.s ++ "]" ++ ")"}; - - - --- LEXICON -pattern - - play_spec = "start_specific"; - play_spec_alone = "start_specific"; - play = "start"; - stop = "stop"; - pause = "pause"; - resume = "resume"; - - next = "next"; - previous = "previous"; - - raise_volume = "vol_up" ; - lower_volume = "vol_down" ; - - shift = "set_balance"; - right = "1.0"; - left = "-1.0"; - center = "0.0"; - - show_list = "show_list"; - - add = "playlist_add"; - remove = "playlist_del"; - - handle_list = "handle_playlist"; - handle_player = "handle_player"; - handle_stations = "handle_stations"; - - askArtist = "songs_by_artist"; - askSong = "artists_song"; - - askCurrent = "current_song"; - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/Shared/sharedDomainSwe.gf b/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/Shared/sharedDomainSwe.gf deleted file mode 100644 index 5c37672d7..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/Shared/sharedDomainSwe.gf +++ /dev/null @@ -1,42 +0,0 @@ ---# -path=.:../:../../../Resource/Time:../Shared:../../../Core:../../../Core/Shared: - -concrete sharedDomainSwe of sharedDomain = sharedCoreSwe, DBSwe, TimeSwe, WeekdaySwe ** open SpecResSwe in{ - -lin - -- ANSWERS - - - makeAddEventAnswer event = {s = event.s}; - makeRemEventAnswer event = {s = event.s}; - makeCheckupAnswer event = {s = "om" ++ event.s}; - makeCheckTimeAnswer event = {s = event.s}; - makeAddInfoAnswer event = {s = "om" ++ event.s}; - - makeAddEventTimeAnswer time = {s = time.s}; - makeRemEventTimeAnswer time = {s = time.s}; - makeCheckupTimeAnswer time = {s = time.s}; - makeCheckTimeTimeAnswer time = {s = time.s}; - makeAddInfoTimeAnswer time = {s = time.s}; - - makeAddEventDayAnswer weekday = {s = "på" ++ weekday.s}; - makeRemEventDayAnswer weekday = {s = "på" ++ weekday.s}; - makeCheckupDayAnswer weekday = {s = "på" ++ weekday.s}; - makeCheckTimeDayAnswer weekday = {s = "på" ++ weekday.s}; - makeAddInfoDayAnswer weekday = {s = "på" ++ weekday.s}; - - makeCheckAnswer location = {s = location.s}; - makeAddInfoLocAnswer location = {s = "om" ++ location.s}; - makeCheckTimeLocAnswer location = {s = location.s}; - --- LEXICON - -pattern - addEntry = varaints {["lägga till"] ; ["anteckna"] ; ["göra en anteckning om"]}; - removeEntry = variants{ ["ta bort"] ; ["radera en anteckning"]}; - changeEntry = ["ändra en anteckning om"]; - augmentEntry = ["lägga till mer information"]; - checkupEntry = ["kolla tiden för"]; - - checkup = ["vad har jag uppskrivet"]; - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/System/systemDomain.gf b/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/System/systemDomain.gf deleted file mode 100644 index 1148b2811..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/System/systemDomain.gf +++ /dev/null @@ -1,53 +0,0 @@ --- SWEDISH VERSION, UNCOMMENT AS NEEDED ---# -path=.:../:../DBase/Swedish:../DBase:../Shared:../System:../Numbers - --- ENGLISH VERSION, UNCOMMENT AS NEEDED --- --# -path=.:../:../DBase/English:../DBase:../Shared:../System:../Numbers - -abstract systemDomain = sharedDomain, systemCore ** { - - -cat - - Proposition; - - -fun - --- PROPOSITIONS. --- - - songProp : Song -> Proposition; - itemProp : Song -> Proposition; - currentSongProp : Song -> Proposition; - - whatToPlayPropNum : Number -> Proposition; - whatToPlayPropOrd : Number -> Proposition; - - itemRemPropNum : Number -> Proposition; - itemRemPropOrd : Number -> Proposition; - - groupToAddProp : Artist -> Proposition; - artistProp : Artist -> Proposition; - groupProp : Artist -> Proposition; - songArtistProp : Artist -> Proposition; - - albumProp : Album -> Proposition; - - artistsSongProp : Artist -> Proposition; - artistsAlbumProp : Artist -> Proposition; - - albumArtistProp : Album -> Proposition; - - songsArtistProp : Song -> Proposition; - - stationProp : Station -> Proposition; - -} - - - - - - - diff --git a/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/System/systemDomainEng.gf b/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/System/systemDomainEng.gf deleted file mode 100644 index 6aa8b72d2..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/System/systemDomainEng.gf +++ /dev/null @@ -1,74 +0,0 @@ ---# -path=.:../:../DBase/English:../DBase:../Shared:../System:../Numbers - - -concrete systemDomainEng of systemDomain = sharedDomainEng, systemCoreEng ** { - - -lin - --- PROPOSITIONS - - songProp song = { s = song.s }; - itemProp song = { s = song.s }; - currentSongProp song = { s = song.s }; - - whatToPlayPropNum number = { s = number.s }; - whatToPlayPropOrd order = { s = order.s }; - - itemRemPropNum number = { s = number.s }; - itemRemPropOrd order = { s = order.s }; - - groupToAddProp artist = { s = artist.s }; - artistProp artist = { s = artist.s}; - groupProp artist = { s = artist.s }; - songArtistProp artist = { s = artist.s }; - - albumProp album = { s = album.s }; - - artistsSongProp artist = { s = artist.s }; - artistsAlbumProp artist = { s = artist.s }; - - albumArtistProp album = { s = album.s }; - - songsArtistProp song = { s = song.s }; - - stationProp station = { s = station.s }; - --- sort_restr( song(X) ):- sem_sort(X,item). --- sort_restr( item(X) ):- sem_sort(X,item). --- sort_restr( current_song(X) ):- sem_sort(X,song). --- sort_restr( what_to_play(X) ):- sem_sort(X,index). --- sort_restr( itemRem(X) ):- sem_sort(X,index). --- sort_restr( itemRem(X) ):- sem_sort(X,index). --- sort_restr( groupToAdd(X) ):- group( X ). --- sort_restr( artist(X) ):- group( X ). --- sort_restr( group(X) ):- group( X ). --- sort_restr( song_artist(X) ):- group( X ). --- sort_restr( album(X) ):- album( X ). --- sort_restr( artists_song(X) ):- group_atom( X ). --- sort_restr( artists_album(X) ):- group_atom( X ). --- sort_restr( albums_by_artist(X) ):- album_atom( X ). --- sort_restr( songs_by_artist(X) ):- song_atom( X ). --- sort_restr( station(X) ):- radio_station( X ). --- sort_restr( year(X) ):- sem_sort( X, year ). --- sort_restr( path(X) ):- atomic( X ).%,format("hallå: ~w\n",[X]). --- %sort_restr( X^path(X) ):- atomic( X ),format("hallå: ~w\n",[X]). --- sort_restr( not path(X) ):- format("hallå: ~w\n",[X]), atomic( X ). --- sort_restr( fail(Path^path(Path),no_matches) ). - - -pattern - - --- Because of differing linearisations in User and System usage these functions are not linearized in Shared. - - askArtist = "songs" ; - - - askSong = "artist" ; - askCurrent = ["the current song"]; - - -} - - diff --git a/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/System/systemDomainPro.gf b/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/System/systemDomainPro.gf deleted file mode 100644 index ce83f67f1..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/System/systemDomainPro.gf +++ /dev/null @@ -1,65 +0,0 @@ --- SWEDISH VERSION, UNCOMMENT AS NEEDED ---# -path=.:../:../DBase/Swedish:../DBase:../Shared:../System:../Numbers - --- ENGLISH VERSION, UNCOMMENT AS NEEDED --- --# -path=.:../:../DBase/English:../DBase:../Shared:../System:../Numbers - - -concrete systemDomainPro of systemDomain = sharedDomainPro, systemCorePro ** { - - -lin --- PROPOSITIONS - - -- Ok hur ska jag göra med propositions tro? Och vad menar David med song_to_add(Song). - -- Hur blir de till? Skulle man kunna göra som nedan? - - songProp song = { s = "song" ++ "(" ++ song.s ++ ")" }; - itemProp song = { s = "item" ++ "(" ++ song.s ++ ")" }; - currentSongProp song = { s = "current_song" ++ "(" ++ song.s ++ ")" }; - - whatToPlayPropNum number = { s = "what_to_play" ++ "(" ++ number.s ++ ")" }; - whatToPlayPropOrd order = { s = "what_to_play" ++ "(" ++ order.s ++ ")" }; - - itemRemPropNum number = { s = "itemRem" ++ "(" ++ number.s ++ ")" }; - itemRemPropOrd order = { s = "itemRem" ++ "(" ++ order.s ++ ")" }; - - groupToAddProp artist = { s = "groupToAdd" ++ "(" ++ artist.s ++ ")" }; - artistProp artist = { s = "artist" ++ "(" ++ artist.s ++ ")"}; - groupProp artist = { s = "group" ++ "(" ++ artist.s ++ ")" }; - songArtistProp artist = { s = "song_artist" ++ "(" ++ artist.s ++ ")" }; - - albumProp album = { s = "album" ++ "(" ++ album.s ++ ")" }; - - artistsSongProp artist = { s = "artist_song" ++ "(" ++ artist.s ++ ")" }; - artistsAlbumProp artist = { s = "artists_album" ++ "(" ++ artist.s ++ ")" }; - - albumArtistProp album = { s = "albums_by_artist" ++ "(" ++ album.s ++ ")" }; - - songsArtistProp song = { s = "songs_by_artist" ++ "(" ++ song.s ++ ")" }; - - stationProp station = { s = "station" ++ "(" ++ station.s ++ ")" }; - --- sort_restr( song(X) ):- sem_sort(X,item). --- sort_restr( item(X) ):- sem_sort(X,item). --- sort_restr( current_song(X) ):- sem_sort(X,song). --- sort_restr( what_to_play(X) ):- sem_sort(X,index). --- sort_restr( itemRem(X) ):- sem_sort(X,index). --- sort_restr( itemRem(X) ):- sem_sort(X,index). --- sort_restr( groupToAdd(X) ):- group( X ). --- sort_restr( artist(X) ):- group( X ). --- sort_restr( group(X) ):- group( X ). --- sort_restr( song_artist(X) ):- group( X ). --- sort_restr( album(X) ):- album( X ). --- sort_restr( artists_song(X) ):- group_atom( X ). --- sort_restr( artists_album(X) ):- group_atom( X ). --- sort_restr( albums_by_artist(X) ):- album_atom( X ). --- sort_restr( songs_by_artist(X) ):- song_atom( X ). --- sort_restr( station(X) ):- radio_station( X ). --- sort_restr( year(X) ):- sem_sort( X, year ). --- sort_restr( path(X) ):- atomic( X ).%,format("hallå: ~w\n",[X]). --- %sort_restr( X^path(X) ):- atomic( X ),format("hallå: ~w\n",[X]). --- sort_restr( not path(X) ):- format("hallå: ~w\n",[X]), atomic( X ). --- sort_restr( fail(Path^path(Path),no_matches) ). - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/System/systemDomainSwe.gf b/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/System/systemDomainSwe.gf deleted file mode 100644 index d26b0b1ee..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/System/systemDomainSwe.gf +++ /dev/null @@ -1,74 +0,0 @@ ---# -path=.:../:../DBase/Swedish:../DBase:../Shared:../System:../Numbers - - -concrete systemDomainSwe of systemDomain = sharedDomainSwe, systemCoreSwe ** { - - -lin - --- PROPOSITIONS - - songProp song = { s = song.s }; - itemProp song = { s = song.s }; - currentSongProp song = { s = song.s }; - - whatToPlayPropNum number = { s = number.s }; - whatToPlayPropOrd order = { s = order.s }; - - itemRemPropNum number = { s = number.s }; - itemRemPropOrd order = { s = order.s }; - - groupToAddProp artist = { s = artist.s }; - artistProp artist = { s = artist.s}; - groupProp artist = { s = artist.s }; - songArtistProp artist = { s = artist.s }; - - albumProp album = { s = album.s }; - - artistsSongProp artist = { s = artist.s }; - artistsAlbumProp artist = { s = artist.s }; - - albumArtistProp album = { s = album.s }; - - songsArtistProp song = { s = song.s }; - - stationProp station = { s = station.s }; - --- sort_restr( song(X) ):- sem_sort(X,item). --- sort_restr( item(X) ):- sem_sort(X,item). --- sort_restr( current_song(X) ):- sem_sort(X,song). --- sort_restr( what_to_play(X) ):- sem_sort(X,index). --- sort_restr( itemRem(X) ):- sem_sort(X,index). --- sort_restr( itemRem(X) ):- sem_sort(X,index). --- sort_restr( groupToAdd(X) ):- group( X ). --- sort_restr( artist(X) ):- group( X ). --- sort_restr( group(X) ):- group( X ). --- sort_restr( song_artist(X) ):- group( X ). --- sort_restr( album(X) ):- album( X ). --- sort_restr( artists_song(X) ):- group_atom( X ). --- sort_restr( artists_album(X) ):- group_atom( X ). --- sort_restr( albums_by_artist(X) ):- album_atom( X ). --- sort_restr( songs_by_artist(X) ):- song_atom( X ). --- sort_restr( station(X) ):- radio_station( X ). --- sort_restr( year(X) ):- sem_sort( X, year ). --- sort_restr( path(X) ):- atomic( X ).%,format("hallå: ~w\n",[X]). --- %sort_restr( X^path(X) ):- atomic( X ),format("hallå: ~w\n",[X]). --- sort_restr( not path(X) ):- format("hallå: ~w\n",[X]), atomic( X ). --- sort_restr( fail(Path^path(Path),no_matches) ). - - -pattern - - --- Because of differing linearisations in User and System usage these functions are not linearized in Shared. - - askArtist = "låtar" ; - - - askSong = "artister" ; - askCurrent = ["låten som spelas nu"]; - - -} - - diff --git a/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/User/userDomain.gf b/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/User/userDomain.gf deleted file mode 100644 index 8cadb9084..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/User/userDomain.gf +++ /dev/null @@ -1,13 +0,0 @@ ---# -path=.:../:../../../Resource/Time:../../../Resource/Media:../Shared:../../../Core:../../../Core/Shared:../../../Core/User - -abstract userDomain = userCore, sharedDomain ** { - - -fun - -- CompoundedAnswers - - answerEventLocAdd : Event -> Location -> AnswerList addTask; - answerEventLocRem : Event -> Location -> AnswerList removeTask; - - answerEventLocTimeDay : Event -> Location -> Time -> Weekday -> AnswerList removeTask; -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/User/userDomainEng.gf b/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/User/userDomainEng.gf deleted file mode 100644 index d38968a9b..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/User/userDomainEng.gf +++ /dev/null @@ -1,25 +0,0 @@ ---# -path=.:../:../DBase/English:../DBase:../Numbers:../Shared - -concrete userDomainEng of userDomain = userCoreEng, sharedDomainEng ** { - -lin - - -- CompoundedAnswers - answerSongArtistPlay song artist = {s = variants {(song.s ++ "with" ++ artist.s) - ; (artist.s ++ "with" ++ song.s)} }; - - answerSongArtistAdd song artist = {s = variants {(song.s ++ "with" ++ artist.s) - ; (artist.s ++ "with" ++ song.s)} }; - - -pattern - askArtist = variants { ["what do i have"] ; ["what songs do i have"] ; ["do i have anything"]} - ++ variants {"with" ; "by"}; - - - askSong = ["who"] ++ variants {"made"; "wrote"}; - - askCurrent = ["what"] ++ variants {["song is this"] ; ["is this called"]}; - - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/User/userDomainPro.gf b/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/User/userDomainPro.gf deleted file mode 100644 index b6e5bff2b..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/User/userDomainPro.gf +++ /dev/null @@ -1,18 +0,0 @@ --- SWEDISH VERSION, UNCOMMENT AS NEEDED ---# -path=.:../:../DBase/Swedish:../DBase:../Numbers:../Shared - --- ENGLISH VERSION, UNCOMMENT AS NEEDED --- --# -path=.:../:../DBase/English/:../DBase/:../Numbers:../Shared - - -concrete userDomainPro of userDomain = userCorePro, sharedDomainPro ** { - -lin - answerSongArtistPlay song artist = { s = "answer(item(" ++ song.s ++ ")," ++ - "answer(group(" ++ artist.s ++ ")"}; - answerSongArtistAdd song artist = { s = "answer(item(" ++ song.s ++ ")," ++ - "answer(group(" ++ artist.s ++ ")"}; - - - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/User/userDomainSwe.gf b/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/User/userDomainSwe.gf deleted file mode 100644 index c22bb5dd5..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/AgendaTalk/User/userDomainSwe.gf +++ /dev/null @@ -1,24 +0,0 @@ ---# -path=.:../:../../:../../../Resource/Time:../../../Resource/Media/:../Shared:../../../Core:../../../Core/Shared:../../../Core/User - -concrete userDomainSwe of userDomain = userCoreSwe, sharedDomainSwe ** { - -lin - - -- CompoundedAnswers - answerEventLocAdd event loc = {s = event.s ++ loc.s }; - - answerEventLocRem event loc = {s = event.s ++ loc.s }; - - answerEventLocTimeDay event loc time day = {s = variants { - (event.s ++ loc.s ++ time.s ++ "på" ++ day.s); - (event.s ++ loc.s ++ "på" ++ day.s ++ time.s); - } - }; - --- (event.s ++ "på" ++ day.s ++ time.s); --- (loc.s ++ time.s ++ "på" ++ day.s); - - - - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/DB.gf b/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/DB.gf deleted file mode 100644 index 9b0b17c33..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/DB.gf +++ /dev/null @@ -1,6 +0,0 @@ ---# -path=.:../../Resource/Media/English:../../Resource/Media/Swedish:../../../Resource/Numbers/ - -abstract DB = SwedishAlbums, SwedishArtists, SwedishRadioStations, SwedishSongs, numbers, orderNum ** { ---abstract DB = EnglishAlbums, EnglishArtists, EnglishRadioStations, EnglishSongs, numbers, orderNum ** { - -} diff --git a/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/DBEng.gf b/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/DBEng.gf deleted file mode 100644 index 67428921c..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/DBEng.gf +++ /dev/null @@ -1,7 +0,0 @@ ---# -path=.:../../Resource/Media/English:../../Resource/Media/Swedish:../../Resource/Numbers/ - -concrete DBEng of DB = EnglishAlbumsEng, EnglishArtistsEng, ---EnglishSongsEng, -EnglishRadioStationsEng, SwedishSongsSwe, numbersEng, orderNumEng ** { - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/DBPro.gf b/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/DBPro.gf deleted file mode 100644 index 555b66cfa..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/DBPro.gf +++ /dev/null @@ -1,6 +0,0 @@ ---# -path=.:../../Resource/Media/English:../../Resource/Media/Swedish - ---concrete DBPro of DB = EnglishAlbumsPro, EnglishSongsPro, EnglishArtistsPro, EnglishRadioStationsPro, numbersPro, orderNumPro ** { -concrete DBPro of DB = SwedishAlbumsPro, SwedishSongsPro, SwedishArtistsPro, SwedishRadioStationsPro, numbersPro, orderNumPro ** { - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/DBSwe.gf b/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/DBSwe.gf deleted file mode 100644 index c3f9bec42..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/DBSwe.gf +++ /dev/null @@ -1,5 +0,0 @@ ---# -path=.:../../Resource/Media/English:../../Resource/Media/Swedish:../../Resource/Numbers/ - -concrete DBSwe of DB = SwedishAlbumsSwe, SwedishArtistsSwe, SwedishSongsSwe, SwedishRadioStationsSwe, numbersSwe, orderNumSwe ** { - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/Shared/sharedDomain.gf b/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/Shared/sharedDomain.gf deleted file mode 100644 index bbf81bcc7..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/Shared/sharedDomain.gf +++ /dev/null @@ -1,105 +0,0 @@ --- SWEDISH version, uncomment as needed. --- --# -path=.:../:../../:../Shared/:../../../Resource/Media/:../../../Resource/Media/Swedish/:../../../Resource/Numbers/:../../../Core:../../../Core/Shared/ --- abstract sharedDomain = sharedCore, numbers, orderNum, swedishDB ** { - - --- ENGLISH version, uncomment as needed. ---# -path=.:../:../../:../Shared/:../../../Resource/Media/:../../../Resource/Media/English/:../../../Resource/Numbers/:../../../Core:../../../Core/Shared/ - -abstract sharedDomain = sharedCore, DB ** { - -fun - --- ANSWERS - - -- Request Answers - - answerSongPlay : Song -> Proposition playTask; - answerSongAdd : Song -> Proposition addTask; - answerSongRemove : Song -> Proposition removeTask; - - answerArtistPlay : Artist -> Proposition playTask; - answerArtistAdd : Artist -> Proposition addTask; - answerArtistRemove : Artist -> Proposition removeTask; - - answerStationPlay : Station -> Proposition playTask; - answerStationAdd : Station -> Proposition addTask; - answerStationRemove : Station -> Proposition removeTask; - - answerNumberInListPlay : Number -> Proposition playTask; - answerNumberInListRemove: Number -> Proposition removeTask; - - answerOrderInListPlay : OrderNumber -> Proposition playTask; - answerOrderInListRemove : OrderNumber -> Proposition removeTask; - - - - - -- Ask Answers - questionSong : Song -> Proposition songQuestion; - questionArtist : Artist -> Proposition artistQuestion; - --- LEXICON - - playTask : Task; - addTask : Task; - removeTask : Task; - speakerTask : Task; - - artistQuestion : Task; - songQuestion : Task; - - - play_spec : Action playTask; - - play_spec_alone : SingleAction; - play : SingleAction; - stop : SingleAction; - pause : SingleAction; - resume : SingleAction; - - next : OrderNumber; - previous : OrderNumber; - - raise_volume : SingleAction; - lower_volume : SingleAction; - - fastforward : SingleAction; - rewind : SingleAction; - - shift : Action speakerTask; - right : Proposition speakerTask; - left : Proposition speakerTask; - center : Proposition speakerTask; - - show_list : SingleAction; - - add : Action addTask; - add_alone : SingleAction; - remove : Action removeTask; - remove_alone : SingleAction; - - remove_all : SingleAction; - - - handle_list : SingleAction; - handle_player : SingleAction; - handle_stations : SingleAction; - - askArtist : Ask artistQuestion; - askSong : Ask songQuestion; - - askCurrent : SingleAsk; - -} - - - - - - - - - - - diff --git a/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/Shared/sharedDomainEng.gf b/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/Shared/sharedDomainEng.gf deleted file mode 100644 index 52994585d..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/Shared/sharedDomainEng.gf +++ /dev/null @@ -1,154 +0,0 @@ ---# -path=.:../:../../:../Shared/:../../../Resource/Media/:../../../Resource/Media/English/:../../../Resource/Numbers/:../../../Core:../../../Core/Shared/ - -concrete sharedDomainEng of sharedDomain = sharedCoreEng, DBEng ** - open SpecResEng in { - -flags conversion=finite; - - - -lin - -- ANSWERS - answerSongPlay song = {s = variants { - ( song.s ); - ( (itemForm ! Song) ++ song.s ) - } - }; - answerSongAdd song = {s = variants { - ( song.s ); - ( (itemForm ! Song) ++ song.s ) - } - }; - answerSongRemove song = {s = variants { - ( song.s ); - ( (itemForm ! Song) ++ song.s ) - } - }; - questionSong song = {s = variants { - ( song.s ); - ( (itemForm ! Song) ++ song.s ) - } - }; - - - - answerArtistPlay artist = {s = variants { - ( artist.s ); - ( (itemForm ! Artist) ++ artist.s ) - } - }; - answerArtistAdd artist = {s = variants { - ( artist.s ); - ( (itemForm ! Artist) ++ artist.s ) - } - }; - answerArtistRemove artist = {s = variants { - ( artist.s ); - ( (itemForm ! Artist) ++ artist.s ) - } - }; - questionArtist artist = { s = variants { - ( artist.s ); - ( (itemForm ! Artist) ++ artist.s ) - } - }; - - - - answerStationPlay station = {s = variants { - ( station.s); - ( ["the station"] ++ station.s) - } - }; - answerStationAdd station = {s = variants { - ( station.s); - ( ["the station"] ++ station.s) - } - }; - answerStationRemove station = {s = variants { - ( station.s); - ( ["the station"] ++ station.s) - } - }; - - - - -- LIST RELATED ANSWERS - - -- nummer fem - -- fem - answerNumberInListPlay numb = {s = variants { - ( (listForm ! Numeric) ++ numb.s ); - ( numb.s ) - } - }; - - answerNumberInListRemove numb = {s = variants { - ( (listForm ! Numeric) ++ numb.s ); - ( numb.s ) - } - }; - - - -- den femte låten - -- den femte - answerOrderInListPlay ordNum = - {s = variants { - ("the" ++ ordNum.s ++ (itemForm ! Post)); - ("the" ++ ordNum.s) - } - }; - answerOrderInListRemove ordNum = - {s = variants { - ("the" ++ ordNum.s ++ (itemForm ! Post)); - ("the" ++ ordNum.s) - } - }; - - --- LEXICON - -pattern - - play_spec = (variants {["play"] ; ["listen to"] ; "hear"}); - play_spec_alone = variants {["play a specific song"] ; ["play a specific"] ; ["listen to a specific song"] ; ["hear a specific song"]}; - play = (variants {["start from the beginning"] ; ["play"] ; ["start"]}); - stop = (variants {["stop"]}); - pause = ["pause"]; - resume = (variants {["resume"] ; ["resume playing"]}); - - next = "next"; - previous = "previous"; - - raise_volume = ["raise the volume"] ; - lower_volume = ["lower the volume"]; - - fastforward = ["fast forward"]; - rewind = "rewind"; - - shift = "shift" ++ variants{ ["the balance"] ; ""}; - right = variants{"" ; ["to the"]} ++ "right"; - left = variants{"" ; ["to the"]} ++ "left"; - center = variants{"" ; ["to the"]} ++ "middle"; - - show_list = ["show the list"]; - - add = ["add"]; - add_alone = variants {["add a specific song"] ; ["add this"] ; ["add this one"]}; - remove = ["remove"]; - remove_alone = variants {["remove"] ; ["renmove this"] ; ["remove this one"]}; - - remove_all = ["clear the playlist"]; - - handle_list = ["manage the playlist"]; - handle_player = ["talk to the player"]; - handle_stations = ["choose a station"]; -} - - - - - - - - diff --git a/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/Shared/sharedDomainPro.gf b/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/Shared/sharedDomainPro.gf deleted file mode 100644 index 8c3917a37..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/Shared/sharedDomainPro.gf +++ /dev/null @@ -1,87 +0,0 @@ --- SWEDISH VERSION, UNCOMMENT AS NEEDED --- --# -path=.:../:../../:../Shared/:../../../Resource/Media/:../../../Resource/Media/Swedish/:../../../Resource/Numbers/:../../../Core:../../../Core/Shared/ ---concrete sharedDomainPro of sharedDomain = sharedCorePro, numbersEng, orderNumEng, swedishDBPro ** { - - --- ENGLISH VERSION, UNCOMMENT AS NEEDED ---# -path=.:../:../../:../Shared/:../../../Resource/Media/:../../../Resource/Media/English/:../../../Resource/Numbers/:../../../Core:../../../Core/Shared/ - -concrete sharedDomainPro of sharedDomain = sharedCorePro, DBPro ** { - -flags lexer=code ; unlexer=code ; -flags conversion=finite; - -lin - --- ANSWERS - - answerSongPlay song = { s = "item" ++ "(" ++ song.s ++ ")"}; - answerSongAdd song = { s = "item" ++ "(" ++ song.s ++ ")"}; - answerSongRemove song = { s = "item" ++ "(" ++ song.s ++ ")"}; - questionSong song = { s = "item" ++ "(" ++ song.s ++ ")"}; - - - answerArtistPlay artist = { s = "group" ++ "(" ++ artist.s ++ ")"}; - answerArtistAdd artist = { s = "groupToAdd" ++ "(" ++ artist.s ++ ")"}; - answerArtistRemove artist = { s = "group" ++ "(" ++ artist.s ++ ")"}; - questionArtist artist = {s = "group" ++ "(" ++ artist.s ++ ")"}; - - - answerStationPlay station = { s = "station" ++ "(" ++ station.s ++ ")"}; - answerStationAdd station = { s = "station" ++ "(" ++ station.s ++ ")"}; - answerStationRemove station = { s = "station" ++ "(" ++ station.s ++ ")"}; - - - answerNumberInListPlay numb = {s = "index" ++ "(" ++ "[" ++ numb.s ++ "]" ++ ")"}; - answerNumberInListRemove numb = {s = "itemRem" ++ "(" ++ "[" ++ numb.s ++ "]" ++ ")"}; - - answerOrderInListPlay ordNum = {s = "index" ++ "(" ++ "[" ++ ordNum.s ++ "]" ++ ")"}; - answerOrderInListRemove ordNum = {s = "itemRem" ++ "(" ++ "[" ++ ordNum.s ++ "]" ++ ")"}; - - - --- LEXICON -pattern - - play_spec = "start_specific"; - play_spec_alone = "start_specific"; - play = "start"; - stop = "stop"; - pause = "pause"; - resume = "resume"; - - next = "next"; - previous = "previous"; - - raise_volume = "vol_up" ; - lower_volume = "vol_down" ; - - - fastforward = "fast_forward"; - rewind = "rewind"; - - - shift = "set_balance"; - right = "1.0"; - left = "-1.0"; - center = "0.0"; - - show_list = "show_list"; - - add = "playlist_add"; - add_alone = "playlist_add"; - remove = "playlist_del"; - remove_alone = "playlist_del"; - - remove_all = "playlist_clear"; - - handle_list = "handle_playlist"; - handle_player = "handle_player"; - handle_stations = "handle_stations"; - - askArtist = "songs_by_artist"; - askSong = "artists_song"; - - askCurrent = "current_song"; - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/Shared/sharedDomainSwe.gf b/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/Shared/sharedDomainSwe.gf deleted file mode 100644 index 13f04ec3f..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/Shared/sharedDomainSwe.gf +++ /dev/null @@ -1,170 +0,0 @@ ---# -path=.:../:../../:../Shared/:../../../Resource/Media/:../../../Resource/Media/Swedish/:../../../Resource/Numbers/:../../../Core:../../../Core/Shared/ - -concrete sharedDomainSwe of sharedDomain = sharedCoreSwe, DBSwe ** open SpecResSwe in{ - - -flags conversion=finite; - - -lin - -- ANSWERS - answerSongPlay song = {s = variants { - ( song.s ); - ( (itemForm ! Song) ++ song.s ) - } - }; - answerSongAdd song = {s = variants { - ( song.s ); - ( (itemForm ! Song) ++ song.s ) - } - }; - answerSongRemove song = {s = variants { - ( song.s ); - ( (itemForm ! Song) ++ song.s ) - } - }; - questionSong song = {s = variants { - ( song.s ); - ( (itemForm ! Song) ++ song.s ) - } - }; - - - - answerArtistPlay artist = {s = variants { - ( artist.s ); - ( (itemForm ! Artist) ++ artist.s ) - } - }; - answerArtistAdd artist = {s = variants { - ( artist.s ); - ( (itemForm ! Artist) ++ artist.s ) - } - }; - answerArtistRemove artist = {s = variants { - ( artist.s ); - ( (itemForm ! Artist) ++ artist.s ) - } - }; - questionArtist artist = { s = variants { - ( artist.s ); - ( (itemForm ! Artist) ++ artist.s ) - } - }; - - - - answerStationPlay station = {s = variants { - ( station.s); - ( "stationen" ++ station.s) - } - }; - answerStationAdd station = {s = variants { - ( station.s); - ( "stationen" ++ station.s) - } - }; - answerStationRemove station = {s = variants { - ( station.s); - ( "stationen" ++ station.s) - } - }; - - - - -- LIST RELATED ANSWERS - - -- nummer fem - -- fem - answerNumberInListPlay numb = {s = variants { - ( (listForm ! Numeric) ++ numb.s ); - ( numb.s ) - } - }; - - answerNumberInListRemove numb = {s = variants { - ( (listForm ! Numeric) ++ numb.s ); - ( numb.s ) - } - }; - - - -- den femte låten - -- den femte - answerOrderInListPlay ordNum = - {s = variants { - ("den" ++ ordNum.s ++ (itemForm ! Post)); - ("den" ++ ordNum.s) - } - }; - answerOrderInListRemove ordNum = - {s = variants { - ("den" ++ ordNum.s ++ (itemForm ! Post)); - ("den" ++ ordNum.s) - } - }; - - --- LEXICON - -pattern - - play_spec = (variants {["spela"] ; ["starta"] ; ["höra"] ; ["lyssna på"]}); - play_spec_alone = variants {["spela"] ; ["spela den här"] ; ["spela den"] ; ["spela en speciell"] ; ["spela en speciell låt"]}; - play = (variants {["spela från början"] ; ["spela"] ; ["starta"]}); - stop = (variants {["stoppa"] ; ["avbryta"]}); - pause = (variants {["pausa"] }); - resume = (variants {["återuppta spelningen"] ; ["starta igen"]}); - - next = "nästa"; - previous = "föregående"; - - raise_volume = "höja" ++ variants { ("volymen") ; ("ljudet")}; - lower_volume = "sänka" ++ variants { ("volymen") ; ("ljudet")}; - - - fastforward = ["spola framåt"]; - rewind = ["spola bakåt"]; - - - shift = variants{ ["ändra balansen"] ; "skifta"}; - right = variants{"" ; "till"} ++ "höger"; - left = variants{"" ; "till"} ++ "vänster"; - center = variants{"" ; "till"} ++ "mitten"; - - show_list = ["visa listan"]; - - add = ["lägga till"]; - add_alone = variants {["lägga till"]; ["lägg till den här"] ; ["lägg till den"]}; - remove = ["ta bort"]; - remove_alone = variants { ["ta bort"] ; ["ta bort den"] ; ["ta bort den här"] }; - - remove_all = variants {["rensa listan"] ; ["ta bort allt"]}; - - handle_list = ["ändra i spellistan"]; - handle_player = ["prata med spelaren"]; - handle_stations = ["välja en radiostation"]; - - - - -- FLYTTAT TILL userSpecificSwe.gf och systemSpecificSwe.gf pga - -- olika linearisering for system och användare. - - --askArtist = variants { "låtar" ; - -- variants { variants {"vad" ; ["vilka låtar"]} ++ ["har jag"] ; - -- ["har jag någonting"]} ++ variants {"med" ; "av"}}; - - - --askSong = variants { "artister" ; (["vem har"] ++ variants {"skrivit"; "gjort"})}; - - --askCurrent = ["vad heter"] ++ variants {["den här"] ; ["låten som spelas nu"]}; - -} - - - - - - - - diff --git a/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/System/systemDomain.gf b/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/System/systemDomain.gf deleted file mode 100644 index a323bbd25..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/System/systemDomain.gf +++ /dev/null @@ -1,75 +0,0 @@ ---# -path=.:../:../../:../Shared/:../../../Resource/Media/:../../../Resource/Media/Swedish/:../../../Resorce/Media/English:../../../Resource/Numbers/:../../../Core:../../../Core/Shared/:../../../Core/System - -abstract systemDomain = sharedDomain, systemCore ** { - - -fun - --- PROPOSITIONS. - - songProp : Song -> Proposition; - itemProp : Song -> Proposition; - currentSongProp : Song -> Proposition; - - whatToPlayPropNum : Number -> Proposition; - whatToPlayPropOrd : Number -> Proposition; - - itemRemPropNum : Number -> Proposition; - itemRemPropOrd : Number -> Proposition; - - groupToAddProp : Artist -> Proposition; - artistProp : Artist -> Proposition; - groupProp : Artist -> Proposition; - songArtistProp : Artist -> Proposition; - - albumProp : Album -> Proposition; - - artistsSongProp : Artist -> Proposition; - artistsAlbumProp : Artist -> Proposition; - - albumArtistProp : Album -> Proposition; - songsArtistProp : Song -> Proposition; - stationProp : Station -> Proposition; - - actionProp : (t: Task) -> Action (t) -> Proposition; - - - --- Asks - whatSongQuestion : SingleAsk; -- "what song do you mean?" - whatArtistQuestion : SingleAsk; -- "what artist do you mean?" - whatIndexQuestion : SingleAsk; -- "what index do you mean?" - whatToRemoveQuestion : SingleAsk; - whatStationQuestion : SingleAsk; -- "what station do you want?" - whatAlbumQuestion : SingleAsk; -- "what album do you mean?" - whatToPlayQuestion : SingleAsk; -- "which song in the playlist do you want to lay?" - whatToRemove : SingleAsk; -- "What number do you want to remove?" - - --- Confirms - - addedToPlaylist : Confirm; -- "The playlist is increased" - removedFromPLaylist : Confirm; -- "The playlist is reduced" - clearedPlaylist : Confirm; -- "The playlist is cleared" - turnedUpVolume : Confirm; -- "Turning up the volume" - loweredVolume : Confirm; -- "Lowering the volume" - startingThePlayer : Confirm; -- "Starting the music" - stoppingThePlayer : Confirm; -- "Stopping the music" - pausingThePlayer : Confirm; -- "Pausing the music" - resumingThePlayer : Confirm; -- "Resuming the music" - shuffleTheList : Confirm; -- "The list has been shuffled" - ffing : Confirm; - rewinding : Confirm; - handlingstations : Confirm; - handlingplayer : Confirm; - handlingplaylist : Confirm; - showedList : Confirm; - -} - - - - - - - diff --git a/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/System/systemDomainEng.gf b/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/System/systemDomainEng.gf deleted file mode 100644 index 54947de7e..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/System/systemDomainEng.gf +++ /dev/null @@ -1,106 +0,0 @@ ---# -path=.:../:../../:../Shared/:../../../Resource/Media/:../../../Resource/Media/English/:../../../Resorce/Media/Swedish:../../../Resource/Numbers/:../../../Core:../../../Core/Shared/:../../../Core/System - -concrete systemDomainEng of systemDomain = sharedDomainEng, systemCoreEng ** { - - -flags conversion=finite; - - -lin - --- PROPOSITIONS - - songProp song = { s = song.s }; - itemProp song = { s = song.s }; - currentSongProp song = { s = song.s }; - - whatToPlayPropNum number = { s = number.s }; - whatToPlayPropOrd order = { s = order.s }; - - itemRemPropNum number = { s = number.s }; - itemRemPropOrd order = { s = order.s }; - - groupToAddProp artist = { s = artist.s }; - artistProp artist = { s = artist.s}; - groupProp artist = { s = artist.s }; - songArtistProp artist = { s = artist.s }; - - albumProp album = { s = album.s }; - - artistsSongProp artist = { s = artist.s }; - artistsAlbumProp artist = { s = artist.s }; - - albumArtistProp album = { s = album.s }; - - songsArtistProp song = { s = song.s }; - - stationProp station = { s = station.s }; - - actionProp _ action = {s = action.s }; - --- sort_restr( song(X) ):- sem_sort(X,item). --- sort_restr( item(X) ):- sem_sort(X,item). --- sort_restr( current_song(X) ):- sem_sort(X,song). --- sort_restr( what_to_play(X) ):- sem_sort(X,index). --- sort_restr( itemRem(X) ):- sem_sort(X,index). --- sort_restr( itemRem(X) ):- sem_sort(X,index). --- sort_restr( groupToAdd(X) ):- group( X ). --- sort_restr( artist(X) ):- group( X ). --- sort_restr( group(X) ):- group( X ). --- sort_restr( song_artist(X) ):- group( X ). --- sort_restr( album(X) ):- album( X ). --- sort_restr( artists_song(X) ):- group_atom( X ). --- sort_restr( artists_album(X) ):- group_atom( X ). --- sort_restr( albums_by_artist(X) ):- album_atom( X ). --- sort_restr( songs_by_artist(X) ):- song_atom( X ). --- sort_restr( station(X) ):- radio_station( X ). --- sort_restr( year(X) ):- sem_sort( X, year ). --- sort_restr( path(X) ):- atomic( X ).%,format("hallå: ~w\n",[X]). --- %sort_restr( X^path(X) ):- atomic( X ),format("hallå: ~w\n",[X]). --- sort_restr( not path(X) ):- format("hallå: ~w\n",[X]), atomic( X ). --- sort_restr( fail(Path^path(Path),no_matches) ). - - -pattern - - --- Because of differing linearisations in User and System usage these functions are not linearized in Shared. - - askArtist = "song" ; - askSong = "artist" ; - askCurrent = ["the current song"]; - - --- Asks - whatSongQuestion = ["what song do you mean"]; - whatArtistQuestion = ["what artist do you mean"]; - whatIndexQuestion = ["what index number do you want to play"]; - whatToRemoveQuestion = ["what song do you want to remove from the playlist"]; - whatStationQuestion = ["what radio station do you want to listen to"]; - whatAlbumQuestion = ["what album do you mean"]; - whatToPlayQuestion = ["what song in the playlist do you want to play"]; - whatToRemove = ["what song in the playlist do you want to remove"]; - - --- Confirms - - addedToPlaylist = ["the playlist is increased"]; - removedFromPLaylist = ["the playlist is reduced"]; - clearedPlaylist = ["the playlist is cleared"]; - turnedUpVolume = ["turning up the volume"]; - loweredVolume = ["lowering the volume"]; - startingThePlayer = ["starting the music"]; - stoppingThePlayer = ["the player is stopped"]; - pausingThePlayer = ["pausing the player"]; - resumingThePlayer = ["resuming the music"]; - shuffleTheList = ["the playlist has been shuffled"]; - ffing = ["performing fast forward"]; - rewinding = ["rewinding"]; - handlingstations = ["done with choosing a station"]; - handlingplayer = ["your wish is my command"]; - handlingplaylist = ["done fiddling with the playlist"]; - showedList = ["finished showing the list"]; - -} - - diff --git a/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/System/systemDomainPro.gf b/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/System/systemDomainPro.gf deleted file mode 100644 index 932cc4f15..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/System/systemDomainPro.gf +++ /dev/null @@ -1,98 +0,0 @@ --- --# -path=.:../:../../:../Shared/:../../../Resource/Media/:../../../Resource/Media/Swedish/:../../../Resource/Numbers/:../../../Core:../../../Core/Shared/:../../../Core/System ---# -path=.:../:../../:../Shared/:../../../Resource/Media/:../../../Resource/Media/English/:../../../Resorce/Media/Swedish:../../../Resource/Numbers/:../../../Core:../../../Core/Shared/:../../../Core/System - - - -concrete systemDomainPro of systemDomain = sharedDomainPro, systemCorePro ** { - -flags conversion=finite; - - -lin --- PROPOSITIONS - - songProp song = { s = "song" ++ "(" ++ song.s ++ ")" }; - itemProp song = { s = "item" ++ "(" ++ song.s ++ ")" }; - currentSongProp song = { s = "current_song" ++ "(" ++ song.s ++ ")" }; - - whatToPlayPropNum number = { s = "what_to_play" ++ "(" ++ number.s ++ ")" }; - whatToPlayPropOrd order = { s = "what_to_play" ++ "(" ++ order.s ++ ")" }; - - itemRemPropNum number = { s = "itemRem" ++ "(" ++ number.s ++ ")" }; - itemRemPropOrd order = { s = "itemRem" ++ "(" ++ order.s ++ ")" }; - - groupToAddProp artist = { s = "groupToAdd" ++ "(" ++ artist.s ++ ")" }; - artistProp artist = { s = "artist" ++ "(" ++ artist.s ++ ")"}; - groupProp artist = { s = "group" ++ "(" ++ artist.s ++ ")" }; - songArtistProp artist = { s = "song_artist" ++ "(" ++ artist.s ++ ")" }; - - albumProp album = { s = "album" ++ "(" ++ album.s ++ ")" }; - - artistsSongProp artist = { s = "artist_song" ++ "(" ++ artist.s ++ ")" }; - artistsAlbumProp artist = { s = "artists_album" ++ "(" ++ artist.s ++ ")" }; - - albumArtistProp album = { s = "albums_by_artist" ++ "(" ++ album.s ++ ")" }; - - songsArtistProp song = { s = "songs_by_artist" ++ "(" ++ song.s ++ ")" }; - - stationProp station = { s = "station" ++ "(" ++ station.s ++ ")" }; - - actionProp _ action = {s = "action" ++ "(" ++ action.s ++ ")"}; - --- sort_restr( song(X) ):- sem_sort(X,item). --- sort_restr( item(X) ):- sem_sort(X,item). --- sort_restr( current_song(X) ):- sem_sort(X,song). --- sort_restr( what_to_play(X) ):- sem_sort(X,index). --- sort_restr( itemRem(X) ):- sem_sort(X,index). --- sort_restr( itemRem(X) ):- sem_sort(X,index). --- sort_restr( groupToAdd(X) ):- group( X ). --- sort_restr( artist(X) ):- group( X ). --- sort_restr( group(X) ):- group( X ). --- sort_restr( song_artist(X) ):- group( X ). --- sort_restr( album(X) ):- album( X ). --- sort_restr( artists_song(X) ):- group_atom( X ). --- sort_restr( artists_album(X) ):- group_atom( X ). --- sort_restr( albums_by_artist(X) ):- album_atom( X ). --- sort_restr( songs_by_artist(X) ):- song_atom( X ). --- sort_restr( station(X) ):- radio_station( X ). --- sort_restr( year(X) ):- sem_sort( X, year ). --- sort_restr( path(X) ):- atomic( X ).%,format("hallå: ~w\n",[X]). --- %sort_restr( X^path(X) ):- atomic( X ),format("hallå: ~w\n",[X]). --- sort_restr( not path(X) ):- format("hallå: ~w\n",[X]), atomic( X ). --- sort_restr( fail(Path^path(Path),no_matches) ). - -pattern --- Asks - whatSongQuestion = ["x ^ item ( x )"]; - whatArtistQuestion = ["x ^ group ( x )"]; - whatIndexQuestion = ["x ^ index ( x )"]; - whatToRemoveQuestion = ["x ^ song_to_remove ( x )"]; - whatStationQuestion = ["x ^ station ( x )"]; - whatAlbumQuestion = ["x ^ album ( x )"]; - whatToPlayQuestion = ["x ^ what_to_play ( x )"]; - whatToRemove = ["x ^ itemRem ( x )"]; - - - - --- Confirms - - addedToPlaylist = "playlist_add"; -- "The playlist is increased" - removedFromPLaylist = "playlist_del"; -- "The playlist is reduced" - clearedPlaylist = "playlist_clear"; -- "The playlist is cleared" - turnedUpVolume = "vol_up"; -- "Turning up the volume" - loweredVolume = "vol_down"; -- "Lowering the volume" - startingThePlayer = variants {"start" ; "start_specific"}; - stoppingThePlayer = "stop"; -- "Stopping the music" - pausingThePlayer = "pause"; -- "Pausing the music" - resumingThePlayer = "resume"; -- "Resuming the music" - shuffleTheList = "shuffle"; -- "The list has been shuffled" - ffing = "fast_fowrward"; - rewinding = "rewind"; - handlingstations = "handle_stations"; - handlingplayer = "handle_player"; - handlingplaylist = "handle_playlist"; - showedList = "show_list"; - - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/System/systemDomainSwe.gf b/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/System/systemDomainSwe.gf deleted file mode 100644 index bee23a751..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/System/systemDomainSwe.gf +++ /dev/null @@ -1,105 +0,0 @@ ---# -path=.:../:../../:../Shared/:../../../Resource/Media/:../../../Resource/Media/Swedish/:../../../Resorce/Media/English:../../../Resource/Numbers/:../../../Core:../../../Core/Shared/:../../../Core/System - -concrete systemDomainSwe of systemDomain = sharedDomainSwe, systemCoreSwe ** { - -flags conversion=finite; - - -lin - --- PROPOSITIONS - - songProp song = { s = song.s }; - itemProp song = { s = song.s }; - currentSongProp song = { s = song.s }; - - whatToPlayPropNum number = { s = number.s }; - whatToPlayPropOrd order = { s = order.s }; - - itemRemPropNum number = { s = number.s }; - itemRemPropOrd order = { s = order.s }; - - groupToAddProp artist = { s = artist.s }; - artistProp artist = { s = artist.s}; - groupProp artist = { s = artist.s }; - songArtistProp artist = { s = artist.s }; - - albumProp album = { s = album.s }; - - artistsSongProp artist = { s = artist.s }; - artistsAlbumProp artist = { s = artist.s }; - - albumArtistProp album = { s = album.s }; - - songsArtistProp song = { s = song.s }; - - stationProp station = { s = station.s }; - --- sort_restr( song(X) ):- sem_sort(X,item). --- sort_restr( item(X) ):- sem_sort(X,item). --- sort_restr( current_song(X) ):- sem_sort(X,song). --- sort_restr( what_to_play(X) ):- sem_sort(X,index). --- sort_restr( itemRem(X) ):- sem_sort(X,index). --- sort_restr( itemRem(X) ):- sem_sort(X,index). --- sort_restr( groupToAdd(X) ):- group( X ). --- sort_restr( artist(X) ):- group( X ). --- sort_restr( group(X) ):- group( X ). --- sort_restr( song_artist(X) ):- group( X ). --- sort_restr( album(X) ):- album( X ). --- sort_restr( artists_song(X) ):- group_atom( X ). --- sort_restr( artists_album(X) ):- group_atom( X ). --- sort_restr( albums_by_artist(X) ):- album_atom( X ). --- sort_restr( songs_by_artist(X) ):- song_atom( X ). --- sort_restr( station(X) ):- radio_station( X ). --- sort_restr( year(X) ):- sem_sort( X, year ). --- sort_restr( path(X) ):- atomic( X ).%,format("hallå: ~w\n",[X]). --- %sort_restr( X^path(X) ):- atomic( X ),format("hallå: ~w\n",[X]). --- sort_restr( not path(X) ):- format("hallå: ~w\n",[X]), atomic( X ). --- sort_restr( fail(Path^path(Path),no_matches) ). - - -pattern - - --- Because of differing linearisations in User and System usage these functions are not linearized in Shared. - - askArtist = "låtar" ; - - - askSong = "artister" ; - askCurrent = ["låten som spelas nu"]; - - --- Asks - whatSongQuestion = ["vilken sång menar du"]; - whatArtistQuestion = ["vilken artist menar du"]; - whatIndexQuestion = ["vilket index nummer vill du spela"]; - whatToRemoveQuestion = ["vilken sång vill du ta bort från spellistan"]; - whatStationQuestion = ["vilken radiostation vill du lyssna på"]; - whatAlbumQuestion = ["vilket album menar du"]; - whatToPlayQuestion = ["vad i spellistan vill du spela"]; - whatToRemove = ["vad i spellistan vill du ta bort"]; - - - --- Confirms - - addedToPlaylist = ["spellistan är utökad"]; - removedFromPLaylist = ["spellistan är reducerad"]; - clearedPlaylist = ["spellistan är rensad"]; - turnedUpVolume = ["höjer volymen"]; - loweredVolume = ["sänker volymen"]; - startingThePlayer = ["startar uppspelningen"]; - stoppingThePlayer = ["spelaren är stoppad"]; - pausingThePlayer = ["pausar uppspelningen"]; - resumingThePlayer = ["återupptar uppspelningen"]; - shuffleTheList = ["spellistan har blandats"]; - ffing = ["spolar frammåt"]; - rewinding = ["spolar bakåt"]; - handlingstations = ["klar med att välja radiostation"]; - handlingplayer = ["jag fixar"]; - handlingplaylist = ["klar med spellistan"]; - showedList = ["spellistan är visad"]; -} - - diff --git a/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/User/userDomain.gf b/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/User/userDomain.gf deleted file mode 100644 index 40d355a18..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/User/userDomain.gf +++ /dev/null @@ -1,19 +0,0 @@ --- SWEDISH VERSION, UNCOMMENT WHEN NEEDED -----# -path=.:../:../../:../Shared/:../../../Resource/Media/:../../../Resource/Media/Swedish/:../../../Resource/Numbers/:../../../Core:../../../Core/Shared/:../../../Core/User - - --- ENGLISH VERSION, UNCOMMENT WHEN NEEDED ---# -path=.:../:../../:../Shared/:../../../Resource/Media/:../../../Resource/Media/English/:../../../Resorce/Media/Swedish:../../../Resource/Numbers/:../../../Core:../../../Core/Shared/:../../../Core/User - - -abstract userDomain = userCore, sharedDomain ** { - - -fun - -- CompoundedAnswers - - answerSongArtistPlay : Song -> Artist -> AnswerList playTask; - answerSongArtistAdd : Song -> Artist -> AnswerList addTask; - - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/User/userDomainEng.gf b/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/User/userDomainEng.gf deleted file mode 100644 index d3732c3a0..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/User/userDomainEng.gf +++ /dev/null @@ -1,29 +0,0 @@ - ---# -path=.:../:../../:../Shared/:../../../Resource/Media/:../../../Resource/Media/Swedish/:../../../Resource/Media/English:../../../Resource/Numbers/:../../../Core:../../../Core/Shared/:../../../Core/User - -concrete userDomainEng of userDomain = userCoreEng, sharedDomainEng ** { - -flags conversion=finite; - - -lin - - -- CompoundedAnswers - answerSongArtistPlay song artist = {s = variants {(song.s ++ "with" ++ artist.s) - ; (artist.s ++ "with" ++ song.s)} }; - - answerSongArtistAdd song artist = {s = variants {(song.s ++ "with" ++ artist.s) - ; (artist.s ++ "with" ++ song.s)} }; - - -pattern - askArtist = variants { ["what do i have"] ; ["what songs do i have"] ; ["do i have anything"]} - ++ variants {"with" ; "by"}; - - - askSong = ["who"] ++ variants {"made"; "wrote"}; - - askCurrent = ["what"] ++ variants {["song is this"] ; ["is this called"]}; - - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/User/userDomainPro.gf b/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/User/userDomainPro.gf deleted file mode 100644 index 237c86ba6..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/User/userDomainPro.gf +++ /dev/null @@ -1,15 +0,0 @@ ---# -path=.:../:../../:../Shared/:../../../Resource/Media/:../../../Resource/Media/English/:../../../Resource/Media/Swedish:../../../Resorce/Media/Swedish:../../../Resource/Numbers/:../../../Core:../../../Core/Shared/:../../../Core/User - - - -concrete userDomainPro of userDomain = userCorePro, sharedDomainPro ** { - -flags conversion=finite; - - -lin - answerSongArtistPlay song artist = { s = ["answer ( item ("] ++ song.s ++ [" ) ) ,"] ++ - ["answer ( group ("] ++ artist.s ++ [") )"]}; - answerSongArtistAdd song artist = { s = ["answer ( item ("] ++ song.s ++ [" ) ) ,"] ++ - ["answer ( group ("] ++ artist.s ++ [") )"]}; -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/User/userDomainSwe.gf b/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/User/userDomainSwe.gf deleted file mode 100644 index 1530d1dad..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/DJGoDiS/User/userDomainSwe.gf +++ /dev/null @@ -1,29 +0,0 @@ ---# -path=.:../:../../:../Shared/:../../../Resource/Media/:../../../Resource/Media/Swedish/:../../../Resorce/Media/English:../../../Resource/Numbers/:../../../Core:../../../Core/Shared/:../../../Core/User - - -concrete userDomainSwe of userDomain = userCoreSwe, sharedDomainSwe ** { - -flags conversion=finite; - - -lin - - -- CompoundedAnswers - answerSongArtistPlay song artist = {s = variants {(song.s ++ "med" ++ artist.s) - ; (artist.s ++ "med" ++ song.s)} }; - - answerSongArtistAdd song artist = {s = variants {(song.s ++ "med" ++ artist.s) - ; (artist.s ++ "med" ++ song.s)} }; - - -pattern - askArtist = variants { ["vad har jag"] ; ["vilka låtar har jag"] ; ["har jag någonting"]} - ++ variants {"med" ; "av"}; - - - askSong = ["vem har"] ++ variants {"skrivit"; "gjort"}; - - askCurrent = ["vad heter"] ++ variants {["den här"] ; ["låten som spelas nu"]}; - - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Domain/SpecResEng.gf b/grammars/TALK/GF_GoDiS/Domain/SpecResEng.gf deleted file mode 100644 index f08ce3e9e..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/SpecResEng.gf +++ /dev/null @@ -1,27 +0,0 @@ --- A file with Pointers... --- With pointers I mean the phrases that point out a specific semantics of a segment. --- Example "I want to listen to the artist Sting" where "the artist" makes clear --- that "Sting" is an artist and not a song for instance. - -resource SpecResEng = { - -param ListInfo = Numeric | Ordered ; -param ItemChoice = Artist | Song | Post; - -oper listForm : ListInfo => Str - = table { - Numeric => ["number"]; - Ordered => ["the"] - - }; - - -oper itemForm : ItemChoice => Str - = table { - Artist => ["the artist"]; - Song => ["the song"]; - Post => "" - }; - -} - diff --git a/grammars/TALK/GF_GoDiS/Domain/SpecResSwe.gf b/grammars/TALK/GF_GoDiS/Domain/SpecResSwe.gf deleted file mode 100644 index 8ff0c8807..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/SpecResSwe.gf +++ /dev/null @@ -1,27 +0,0 @@ --- A file with Pointers... --- With pointers I mean the phrases that point out a specific semantics of a segment. --- Example "I want to listen to the artist Sting" where "the artist" makes clear --- that "Sting" is an artist and not a song for instance. - -resource SpecResSwe = { - -param ListInfo = Numeric | Ordered ; -param ItemChoice = Artist | Song | Post; - -oper listForm : ListInfo => Str - = table { - Numeric => ["nummer"]; - Ordered => ["den"] - - }; - - -oper itemForm : ItemChoice => Str - = table { - Artist => "artisten"; - Song => "låten"; - Post => "" - }; - -} - diff --git a/grammars/TALK/GF_GoDiS/Domain/deLux/DB.gf b/grammars/TALK/GF_GoDiS/Domain/deLux/DB.gf deleted file mode 100644 index 16c1b9b1d..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/deLux/DB.gf +++ /dev/null @@ -1,5 +0,0 @@ ---# -path=.:../../Resource/Home - -abstract DB = Lamps, Rooms ** { - -} diff --git a/grammars/TALK/GF_GoDiS/Domain/deLux/DBEng.gf b/grammars/TALK/GF_GoDiS/Domain/deLux/DBEng.gf deleted file mode 100644 index 5508418be..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/deLux/DBEng.gf +++ /dev/null @@ -1,5 +0,0 @@ ---# -path=.:../../Resource/Home - -concrete DBEng of DB= LampsEng, RoomsEng ** { - -} diff --git a/grammars/TALK/GF_GoDiS/Domain/deLux/DBPro.gf b/grammars/TALK/GF_GoDiS/Domain/deLux/DBPro.gf deleted file mode 100644 index 531aef80f..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/deLux/DBPro.gf +++ /dev/null @@ -1,5 +0,0 @@ ---# -path=.:../../Resource/Home - -concrete DBPro of DB= LampsPro, RoomsPro ** { - -} diff --git a/grammars/TALK/GF_GoDiS/Domain/deLux/DBSwe.gf b/grammars/TALK/GF_GoDiS/Domain/deLux/DBSwe.gf deleted file mode 100644 index 7a74399d8..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/deLux/DBSwe.gf +++ /dev/null @@ -1,5 +0,0 @@ ---# -path=.:../../Resource/Home - -concrete DBSwe of DB= LampsSwe, RoomsSwe ** { - -} diff --git a/grammars/TALK/GF_GoDiS/Domain/deLux/Shared/sharedDomain.gf b/grammars/TALK/GF_GoDiS/Domain/deLux/Shared/sharedDomain.gf deleted file mode 100644 index 9606ca232..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/deLux/Shared/sharedDomain.gf +++ /dev/null @@ -1,50 +0,0 @@ ---# -path=.:../:../../:../Shared/:../../../Resource/Home/:../../../Core:../../../Core/Shared/:../../../Core/System - -abstract sharedDomain = sharedCore, DB ** { - -fun - --- ANSWERS - - answerLampOn : Lamp -> Proposition onTask; - answerLampOff : Lamp -> Proposition offTask; - - answerLocation : Room -> Proposition locateTask; - - -- Ask Answers - questionWhichLamp : Lamp -> Proposition lampQuestion; - questionLocation : Room -> Proposition locQuestion; - --- LEXICON - - onTask : Task; - offTask : Task; - locateTask : Task; - lampQuestion : Task; - locQuestion : Task; - - turnOn : Action onTask; - turnOff : Action offTask; - - turnOnThis : SingleAction; - turnOffThis : SingleAction; - - dimmerUp : SingleAction; - dimmerDown : SingleAction; - - --askLamp : Ask lampQuestion; - --askLocation : Ask locQuestion; - - askStatusLamp : SingleAsk; -} - - - - - - - - - - - diff --git a/grammars/TALK/GF_GoDiS/Domain/deLux/Shared/sharedDomainEng.gf b/grammars/TALK/GF_GoDiS/Domain/deLux/Shared/sharedDomainEng.gf deleted file mode 100644 index 1a0ff32c7..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/deLux/Shared/sharedDomainEng.gf +++ /dev/null @@ -1,46 +0,0 @@ ---# -path=.:../:../../:../Shared/:../../../Resource/Home/:../../../Core:../../../Core/Shared/:../../../Core/System - - -concrete sharedDomainEng of sharedDomain = sharedCoreEng, DBEng ** - open SpecResEng in { - - - - - -lin - -- ANSWERS - - answerLampOn lamp = {s = lamp.s}; - answerLampOff lamp = {s = lamp.s}; - answerLocation loc = {s = loc.s}; - - questionWhichLamp lamp = {s = lamp.s}; - questionLocation loc = {s = loc.s}; - --- LEXICON - -pattern - - turnOn = ["turn on"]; - turnOff = ["turn off"]; - - turnOnThis = ["turn on"]; - turnOffThis = ["turn off"]; - - dimmerUp = ["dim up"]; - dimmerDown = ["dim down"]; - - --askLamp = ["do i have a"]; - --askLocation = ["is there a"]; - - askStatusLamp = ["what lights are on"]; -} - - - - - - - - diff --git a/grammars/TALK/GF_GoDiS/Domain/deLux/Shared/sharedDomainPro.gf b/grammars/TALK/GF_GoDiS/Domain/deLux/Shared/sharedDomainPro.gf deleted file mode 100644 index e08589b55..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/deLux/Shared/sharedDomainPro.gf +++ /dev/null @@ -1,43 +0,0 @@ ---# -path=.:../:../../:../Shared/:../../../Resource/Home/:../../../Core:../../../Core/Shared/:../../../Core/System - - - -concrete sharedDomainPro of sharedDomain = sharedCorePro, DBPro ** { - - - - - -lin - -- ANSWERS - - answerLampOn lamp = {s = lamp.s}; - answerLampOff lamp = {s = lamp.s}; - answerLocation loc = {s = loc.s}; - - questionWhichLamp lamp = {s = lamp.s}; - questionLocation loc = {s = loc.s}; - - --- LEXICON - -pattern - - turnOn = "turnOn"; - turnOff = "turnOff"; - - turnOnThis = "turnOn_closest"; - turnOffThis = "turnOff_closest"; - - dimmerUp = "dimmer_up"; - dimmerDown = "dimmer_down"; - - --askLamp = "lamps"; - --askLocation = "locations"; - - askStatusLamp = "status"; - -} - - - diff --git a/grammars/TALK/GF_GoDiS/Domain/deLux/Shared/sharedDomainSwe.gf b/grammars/TALK/GF_GoDiS/Domain/deLux/Shared/sharedDomainSwe.gf deleted file mode 100644 index 9c31959fa..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/deLux/Shared/sharedDomainSwe.gf +++ /dev/null @@ -1,48 +0,0 @@ ---# -path=.:../:../../:../Shared/:../../../Resource/Home/:../../../Core:../../../Core/Shared/:../../../Core/System - - - -concrete sharedDomainSwe of sharedDomain = sharedCoreSwe, DBSwe ** { - - - - - -lin - -- ANSWERS - - answerLampOn lamp = {s = lamp.s}; - answerLampOff lamp = {s = lamp.s}; - answerLocation loc = {s = loc.s}; - - questionWhichLamp lamp = {s = lamp.s}; - questionLocation loc = {s = loc.s}; - - --- LEXICON - -pattern - - turnOn = "tända"; - turnOff = "släcka"; - - turnOnThis = "tända"; - turnOffThis = "släcka"; - - dimmerUp = ["dimma upp"]; - dimmerDown = ["dimma ner"]; - - --askLamp = ["har jag en"]; - --askLocation = ["finns det ett"]; - - askStatusLamp = ["vilka lampor är tända"]; - -} - - - - - - - - diff --git a/grammars/TALK/GF_GoDiS/Domain/deLux/Shared/sharedSpecific.gf b/grammars/TALK/GF_GoDiS/Domain/deLux/Shared/sharedSpecific.gf deleted file mode 100644 index 73e3d7f47..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/deLux/Shared/sharedSpecific.gf +++ /dev/null @@ -1,58 +0,0 @@ ---# -path=.:../:../../:../Shared/:../../../Resource/Home/:../../../Core:../../../Core/Shared/:../../../Core/System - -abstract sharedDomain = sharedCore, DB ** { - -fun - --- ANSWERS - - - -- Ett alternativ är att gära en Task för varje action som - -- finns i domänen. Alltså En erase Task, en play Task och en add Task - -- på det sattet kan man gora funktioner som tar "nummer fem" och gör en - -- "Object play" och en "Object erase" men inte en "Object add". - - -- Request Answers - - answerLampOn : Lamp -> Object onTask; - answerLampOff : Lamp -> Object offTask; - - answerLocation : Location -> Object locateTask; - - -- Ask Answers - questionWhichLamp : Lamp -> Object lampQuestion; - questionLocation : Location -> Object locQuestion; - --- LEXICON - - onTask : Task; - offTask : Task; - locateTask : Task; - lampQuestion : Task; - locQuestion : Task; - - turnOn : Action onTask; - turnOff : Action offTask; - - turnOnThis : SingleAction; - turnOffThis : SingleAction; - - dimmerUp : SingleAction; - dimmerDown : SingleAction; - - --askLamp : Ask lampQuestion; - --askLocation : Ask locQuestion; - - askStatusLamp : SingleAsk; -} - - - - - - - - - - - diff --git a/grammars/TALK/GF_GoDiS/Domain/deLux/System/systemDomain.gf b/grammars/TALK/GF_GoDiS/Domain/deLux/System/systemDomain.gf deleted file mode 100644 index 9e3e09d83..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/deLux/System/systemDomain.gf +++ /dev/null @@ -1,34 +0,0 @@ ---# -path=.:../:../../:../Shared/:../../../Resource/Home/:../../../Core:../../../Core/Shared/:../../../Core/System - -abstract systemDomain = sharedDomain, systemCore ** { - - -fun - --- PROPOSITIONS. --- - - - lampProp : Lamp -> Proposition onTask; - locProp : Room -> Proposition onTask; - - whatToTurnOffProp : Lamp -> Proposition offTask; - whatToTurnOnProp : Lamp -> Proposition onTask; - --- Asks - whatLampQuestion : SingleAsk; -- "what song do you mean?" - whatLocQuestion : SingleAsk; -- "what artist do you mean?" - --- Confirms - - turnedOnLamp : Confirm; - turnedOffLamp : Confirm; - -} - - - - - - - diff --git a/grammars/TALK/GF_GoDiS/Domain/deLux/System/systemDomainEng.gf b/grammars/TALK/GF_GoDiS/Domain/deLux/System/systemDomainEng.gf deleted file mode 100644 index 98ede07e6..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/deLux/System/systemDomainEng.gf +++ /dev/null @@ -1,32 +0,0 @@ ---# -path=.:../:../../:../Shared/:../../../Resource/Home/:../../../Core:../../../Core/Shared/:../../../Core/System - ---# -path=.:../:../DBase/:../Shared - - -concrete systemDomainEng of systemDomain = sharedDomainEng, systemCoreEng ** { - - -lin - --- PROPOSITIONS - - lampProp lamp = { s = lamp.s }; - locProp loc = { s = loc.s }; - - whatToTurnOffProp lamp = { s = lamp.s }; - whatToTurnOnProp lamp = { s = lamp.s }; - -pattern - --- Asks - - whatLampQuestion = ["what lamp do you mean"]; - whatLocQuestion = ["what room do you mean"]; - --- Confirms - - turnedOnLamp = ["the light is on"]; - turnedOffLamp = ["the light is turned off"]; -} - - diff --git a/grammars/TALK/GF_GoDiS/Domain/deLux/System/systemDomainPro.gf b/grammars/TALK/GF_GoDiS/Domain/deLux/System/systemDomainPro.gf deleted file mode 100644 index 213dce355..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/deLux/System/systemDomainPro.gf +++ /dev/null @@ -1,28 +0,0 @@ ---# -path=.:../:../../:../Shared/:../../../Resource/Home/:../../../Core:../../../Core/Shared/:../../../Core/System - -concrete systemDomainPro of systemDomain = sharedDomainPro, systemCorePro ** { - -lin - --- PROPOSITIONS - - lampProp lamp = { s = lamp.s }; - locProp loc = { s = loc.s }; - - whatToTurnOffProp lamp = { s = lamp.s }; - whatToTurnOnProp lamp = { s = lamp.s }; - -pattern - --- Asks - - whatLampQuestion = ["X^lamp(X)"]; - whatLocQuestion = ["X^loc(X)"]; - --- Confirms - - turnedOnLamp = ["turnOn"]; - turnedOffLamp = ["turnOff"]; - - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Domain/deLux/System/systemDomainSwe.gf b/grammars/TALK/GF_GoDiS/Domain/deLux/System/systemDomainSwe.gf deleted file mode 100644 index d4924aacf..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/deLux/System/systemDomainSwe.gf +++ /dev/null @@ -1,28 +0,0 @@ ---# -path=.:../:../../:../Shared/:../../../Resource/Home/:../../../Core:../../../Core/Shared/:../../../Core/System - -concrete systemDomainSwe of systemDomain = sharedDomainSwe, systemCoreSwe ** { - -lin - --- PROPOSITIONS - - lampProp lamp = { s = lamp.s }; - locProp loc = { s = loc.s }; - - whatToTurnOffProp lamp = { s = lamp.s }; - whatToTurnOnProp lamp = { s = lamp.s }; - -pattern - --- Asks - - whatLampQuestion = ["vilken lampa menar du"]; - whatLocQuestion = ["vilket rum menar du"]; - --- Confirms - - turnedOnLamp = ["lampan är tänd"]; - turnedOffLamp = ["lampan är släckt"]; -} - - diff --git a/grammars/TALK/GF_GoDiS/Domain/deLux/User/userDomain.gf b/grammars/TALK/GF_GoDiS/Domain/deLux/User/userDomain.gf deleted file mode 100644 index 642d253b8..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/deLux/User/userDomain.gf +++ /dev/null @@ -1,13 +0,0 @@ ---# -path=.:../:../../:../Shared/:../../../Resource/Home/:../../../Core:../../../Core/Shared/:../../../Core/User - -abstract userDomain = userCore, sharedDomain ** { - - -fun - -- CompoundedAnswers - - answerLampLocTurnOn : Lamp -> Room -> AnswerList onTask; - answerLampLocTurnOff : Lamp -> Room -> AnswerList offTask; - - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Domain/deLux/User/userDomainEng.gf b/grammars/TALK/GF_GoDiS/Domain/deLux/User/userDomainEng.gf deleted file mode 100644 index 7eabf6a03..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/deLux/User/userDomainEng.gf +++ /dev/null @@ -1,12 +0,0 @@ ---# -path=.:../:../../:../Shared/:../../../Resource/Home/:../../../Core:../../../Core/Shared/:../../../Core/User - -concrete userDomainEng of userDomain = userCoreEng, sharedDomainEng ** { - -lin - - -- CompoundedAnswers - -- CompoundedAnswers - answerLampLocTurnOn lamp loc = {s = lamp.s ++ "in" ++ loc.s}; - - answerLampLocTurnOff lamp loc = {s = lamp.s ++ "in" ++ loc.s}; -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Domain/deLux/User/userDomainPro.gf b/grammars/TALK/GF_GoDiS/Domain/deLux/User/userDomainPro.gf deleted file mode 100644 index a8dffd1f7..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/deLux/User/userDomainPro.gf +++ /dev/null @@ -1,14 +0,0 @@ ---# -path=.:../:../../:../Shared/:../../../Resource/Home/:../../../Core:../../../Core/Shared/:../../../Core/User - -concrete userDomainPro of userDomain = userCorePro, sharedDomainPro ** { - -lin - - -- CompoundedAnswers - answerLampLocTurnOn lamp loc = {s = "answer(lamp(" ++ lamp.s ++ ")," ++ - "answer(loc(" ++ loc.s ++ ")"}; - - answerLampLocTurnOff lamp loc = {s = "answer(lamp(" ++ lamp.s ++ ")," ++ - "answer(loc(" ++ loc.s ++ ")"}; - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Domain/deLux/User/userDomainSwe.gf b/grammars/TALK/GF_GoDiS/Domain/deLux/User/userDomainSwe.gf deleted file mode 100644 index 0df4d8618..000000000 --- a/grammars/TALK/GF_GoDiS/Domain/deLux/User/userDomainSwe.gf +++ /dev/null @@ -1,11 +0,0 @@ ---# -path=.:../:../../:../Shared/:../../../Resource/Home/:../../../Core:../../../Core/Shared/:../../../Core/User - -concrete userDomainSwe of userDomain = userCoreSwe, sharedDomainSwe ** { - -lin - - -- CompoundedAnswers - answerLampLocTurnOn lamp loc = {s = lamp.s ++ "i" ++ loc.s}; - - answerLampLocTurnOff lamp loc = {s = lamp.s ++ "i" ++ loc.s}; -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Resource/Events_Locations/DB.gf b/grammars/TALK/GF_GoDiS/Resource/Events_Locations/DB.gf deleted file mode 100644 index dbe5d2df2..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Events_Locations/DB.gf +++ /dev/null @@ -1,37 +0,0 @@ -abstract DB = { - -cat - Event; - Location; - -fun - - -- anEvent : Event; - meeting : Event; - presentation : Event; - date : Event; - lecture : Event; - -{- - appointment : Event; - class : Event; - converence : Event; - hairdresser : Event; - dentist : Event; - party : Event; - deadline : Event; --} - - -- aLocation : Location; - plaza : Location; - station : Location; - university : Location; -{- - fair : Location; - ritz : Location; - cafe : Location; --} - - - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Resource/Events_Locations/DBPro.gf b/grammars/TALK/GF_GoDiS/Resource/Events_Locations/DBPro.gf deleted file mode 100644 index 7c345f456..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Events_Locations/DBPro.gf +++ /dev/null @@ -1,17 +0,0 @@ -concrete DBPro of DB = { - -pattern - - -- anEvent = "EVENT"; - meeting = "meeting"; - presentation = "presentation"; - date = "appointment"; - lecture = "lecture"; - - - -- aLocation = "LOCATION"; - plaza = "plaza"; - station = "station"; - university = "university"; - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Resource/Events_Locations/DBSwe.gf b/grammars/TALK/GF_GoDiS/Resource/Events_Locations/DBSwe.gf deleted file mode 100644 index e664600e6..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Events_Locations/DBSwe.gf +++ /dev/null @@ -1,29 +0,0 @@ -concrete DBSwe of DB = { - -pattern - - - -- anEvent = "EVENT"; - meeting = ["ett möte"]; - presentation = ["en presentation"]; - date = ["en träff"]; - lecture = ["en lektion"]; - - -- aLocation = "LOCATION"; - plaza = ["på plaza"]; - station = ["på stationen"]; - university = ["på universitetet"]; -} - - - - - - - - - - - - - diff --git a/grammars/TALK/GF_GoDiS/Resource/Home/Lamps.gf b/grammars/TALK/GF_GoDiS/Resource/Home/Lamps.gf deleted file mode 100644 index f95761464..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Home/Lamps.gf +++ /dev/null @@ -1,14 +0,0 @@ -abstract Lamps = { - -cat Lamp; - -fun - ---aLamp : Lamp; -ceilinglamp : Lamp; -tablelamp : Lamp; -desklamp : Lamp; -floorlamp : Lamp; - - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Resource/Home/LampsEng.gf b/grammars/TALK/GF_GoDiS/Resource/Home/LampsEng.gf deleted file mode 100644 index 23a2dfddb..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Home/LampsEng.gf +++ /dev/null @@ -1,12 +0,0 @@ -concrete LampsEng of Lamps = { - -pattern - ---aLamp = "LIGHT"; -ceilinglamp = ["the ceiling light"]; -tablelamp = ["the table light"]; -desklamp = ["the desk light"]; -floorlamp = ["the floor light"]; - - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Resource/Home/LampsPro.gf b/grammars/TALK/GF_GoDiS/Resource/Home/LampsPro.gf deleted file mode 100644 index 2f96418e8..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Home/LampsPro.gf +++ /dev/null @@ -1,11 +0,0 @@ -concrete LampsPro of Lamps = { - -pattern - ---aLamp = "LIGHT"; -ceilinglamp = "[ceilinglamp]"; -tablelamp = "[tablelamp]"; -desklamp = "[desklamp]"; -floorlamp = "[floorlamp]"; - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Resource/Home/LampsSwe.gf b/grammars/TALK/GF_GoDiS/Resource/Home/LampsSwe.gf deleted file mode 100644 index 5040e946e..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Home/LampsSwe.gf +++ /dev/null @@ -1,11 +0,0 @@ -concrete LampsSwe of Lamps = { - -pattern - ---aLamp = "LAMPA"; -ceilinglamp = variants{"taklampan" ; ["en taklampa"]}; -tablelamp = variants{ "bordslampan" ; ["en bordslampa"]}; -desklamp = variants{ "skrivbordslampan" ; ["en skrivbordslampa"]}; -floorlamp = variants{ "golvlampan" ; ["en golvlampa"]}; - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Resource/Home/Rooms.gf b/grammars/TALK/GF_GoDiS/Resource/Home/Rooms.gf deleted file mode 100644 index c26325d57..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Home/Rooms.gf +++ /dev/null @@ -1,15 +0,0 @@ -abstract Rooms = { - -cat Room; - -fun - ---aRoom : Room; -kitchen : Room; -bedroom : Room; -hall : Room; -livingroom : Room; - - - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Resource/Home/RoomsEng.gf b/grammars/TALK/GF_GoDiS/Resource/Home/RoomsEng.gf deleted file mode 100644 index 2ce6c4c3f..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Home/RoomsEng.gf +++ /dev/null @@ -1,12 +0,0 @@ -concrete RoomsEng of Rooms = { - -pattern - ---aRoom = "ROOM"; -kitchen = ["the kitchen"]; -bedroom = ["the bedroom"]; -hall = ["the hall"]; -livingroom = ["the living room"]; - - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Resource/Home/RoomsPro.gf b/grammars/TALK/GF_GoDiS/Resource/Home/RoomsPro.gf deleted file mode 100644 index 2db67c0fb..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Home/RoomsPro.gf +++ /dev/null @@ -1,11 +0,0 @@ -concrete RoomsPro of Rooms = { - -pattern - ---aLocation = "ROOM"; -kitchen = "[kitchen]"; -bedroom = "[bedroom]"; -hall = "[hall]"; -livingroom = "[livingroom]"; - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Resource/Home/RoomsSwe.gf b/grammars/TALK/GF_GoDiS/Resource/Home/RoomsSwe.gf deleted file mode 100644 index 122ba0a9b..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Home/RoomsSwe.gf +++ /dev/null @@ -1,12 +0,0 @@ -concrete RoomsSwe of Rooms = { - -pattern - ---aRoom = "RUM"; -kitchen = "köket"; -bedroom = "sovrumet"; -hall = "hallen"; -livingroom = "vardagsrumet"; - - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishAlbums.gf b/grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishAlbums.gf deleted file mode 100644 index f7787a75b..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishAlbums.gf +++ /dev/null @@ -1,23 +0,0 @@ -abstract EnglishAlbums = { - -cat Album; - -fun - -london_calling_album : Album; -singles_album : Album; -wish_album : Album; -in_the_city_album : Album; -the_sidewinder_album : Album; -the_immaculate_collection_album : Album; -lets_get_it_on_album : Album; -mezzanine_album : Album; -protection_album : Album; -heads_high_album : Album; -every_good_boy_deserves_fudge_album : Album; -please_album : Album; -doolittle_album : Album; -music_for_the_jilted_generation_album : Album; -swedish_classics : Album; - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishAlbumsEng.gf b/grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishAlbumsEng.gf deleted file mode 100644 index 8dad6c93d..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishAlbumsEng.gf +++ /dev/null @@ -1,21 +0,0 @@ -concrete EnglishAlbumsEng of EnglishAlbums = { - -pattern - -london_calling_album = ["london calling"]; -singles_album = ["singles"]; -wish_album = ["wish"]; -in_the_city_album = ["in the city"]; -the_sidewinder_album = ["the sidewinder"]; -the_immaculate_collection_album = ["the immaculate collection"]; -lets_get_it_on_album = ["lets get it on"]; -mezzanine_album = ["mezzanine"]; -protection_album = ["protection"]; -heads_high_album = ["heads high"]; -every_good_boy_deserves_fudge_album = ["every good boy deserves fudge"]; -please_album = ["please"]; -doolittle_album = ["doolittle"]; -music_for_the_jilted_generation_album = ["music for the jilted generation"]; -swedish_classics = ["swedish classics"]; - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishAlbumsPro.gf b/grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishAlbumsPro.gf deleted file mode 100644 index c943fda29..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishAlbumsPro.gf +++ /dev/null @@ -1,21 +0,0 @@ -concrete EnglishAlbumsPro of EnglishAlbums = { - -pattern - -london_calling_album = "[london,calling]"; -singles_album = "[singles]"; -wish_album = "[wish]"; -in_the_city_album = "[in,the,city]"; -the_sidewinder_album = "[the,sidewinder]"; -the_immaculate_collection_album = "[the,immaculate,collection]"; -lets_get_it_on_album = "[lets,get,it,on]"; -mezzanine_album = "[mezzanine]"; -protection_album = "[protection]"; -heads_high_album = "[heads,high]"; -every_good_boy_deserves_fudge_album = "[every,good,boy,deserves,fudge]"; -please_album = "[please]"; -doolittle_album = "[doolittle]"; -music_for_the_jilted_generation_album = "[music,for,the,jilted,generation]"; -swedish_classics = "[svenska,klassiker]"; - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishArtists.gf b/grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishArtists.gf deleted file mode 100644 index 7e426cfde..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishArtists.gf +++ /dev/null @@ -1,62 +0,0 @@ -abstract EnglishArtists = { - -cat - -Artist; - -fun --- ENGELSKA - --- ARTIST -beborn_beton : Artist; -clash : Artist; -covenant : Artist; -cure : Artist; -enigma : Artist; -garbage : Artist; -jam : Artist; -kate_bush : Artist; -lee_morgan : Artist; -madonna : Artist; -marvin_gaye : Artist; -massive_attack : Artist; -michael_jackson : Artist; -morlocks : Artist; -morrisey : Artist; -mr_vegas : Artist; -mudhoney : Artist; -nitzer_ebb : Artist; -pain : Artist; -pet_shop_boys : Artist; -pixies : Artist; -prodigy : Artist; -project_pitchfork : Artist; -vnv_nation : Artist; -britney_spears : Artist; -usher : Artist; -fifty_cent : Artist; -green_day : Artist; -billy_idol : Artist; -elvis_presley : Artist; -shania_twain : Artist; -trace_adkins : Artist; -the_chemical_brothers : Artist; -eminem : Artist; -ozzy_osbourne : Artist; -norah_jones : Artist; -jessica_simpson : Artist; -guns_and_roses : Artist; -europe : Artist; -led_zeppelin : Artist; -the_cardigans : Artist; -ace_of_base : Artist; -atomic_swing : Artist; -jessica_simpson : Artist; -creeps : Artist; -eagle_eye_cherry : Artist; -stephen_simmonds : Artist; -the_ark : Artist; -trance_dance : Artist; -vacuum : Artist; - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishArtistsEng.gf b/grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishArtistsEng.gf deleted file mode 100644 index 0cd300099..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishArtistsEng.gf +++ /dev/null @@ -1,56 +0,0 @@ -concrete EnglishArtistsEng of EnglishArtists = { - -pattern - -beborn_beton = ["beborn beton"]; -clash = "clash"; -covenant = "covenant"; -cure = "cure"; -enigma = "enigma"; -garbage = "garbage"; -jam = "jam"; -kate_bush = ["kate bush"]; -lee_morgan = ["lee morgan"]; -madonna = "madonna"; -marvin_gaye = ["mavin gaye"]; -massive_attack = ["massive attack"]; -michael_jackson = ["michael jackson"]; -morlocks = "morlocks"; -morrisey = "morrisey"; -mr_vegas = ["mister vegas"]; -mudhoney = "mudhoney"; -nitzer_ebb = ["nitzer ebb"]; -pain = "pain"; -pet_shop_boys = ["pet shop boys"]; -pixies = "pixies"; -prodigy = "prodigy"; -project_pitchfork = ["project pitchfork"]; -vnv_nation = ["vnv nation"]; -britney_spears = ["britney spears"]; -usher = "usher"; -fifty_cent = ["fifty cent"]; -green_day = ["green day"]; -billy_idol = ["billy idol"]; -elvis_presley = ["elvis presley"]; -shania_twain = ["shania twain"]; -trace_adkins = ["trace adkins"]; -the_chemical_brothers = ["the chemical brothers"]; -eminem = "eminem"; -ozzy_osbourne = ["ozzy osbourne"]; -norah_jones = ["norah jones"]; -jessica_simpson = ["jessica simpson"]; -guns_and_roses = ["guns and roses"]; -europe = "europe"; -led_zeppelin = ["led zeppelin"]; -the_cardigans = ["the cardigans"]; -ace_of_base = ["ace of base"]; -atomic_swing = ["atomic swing"]; -jessica_simpson = ["jessica simpson"]; -creeps = "creeps"; -eagle_eye_cherry = ["eagle eye cherry"]; -stephen_simmonds = ["stephen simmonds"]; -the_ark = ["the ark"]; -trance_dance = ["trance dance"]; -vacuum = "vacuum"; - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishArtistsPro.gf b/grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishArtistsPro.gf deleted file mode 100644 index c33cc90db..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishArtistsPro.gf +++ /dev/null @@ -1,57 +0,0 @@ -concrete EnglishArtistsPro of EnglishArtists = { - -pattern - -beborn_beton = "[beborn,beton]"; -clash = "[clash]"; -covenant = "[covenant]"; -cure = "[cure]"; -enigma = "[enigma]"; -garbage = "[garbage]"; -jam = "[jam]"; -kate_bush = "[kate,bush]"; -lee_morgan = "[lee,morgan]"; -madonna = "[madonna]"; -marvin_gaye = "[mavin,gaye]"; -massive_attack = "[massive,attack]"; -michael_jackson = "[michael,jackson]"; -morlocks = "[morlocks]"; -morrisey = "[morrisey]"; -mr_vegas = "[mister,vegas]"; -mudhoney = "[mudhoney]"; -nitzer_ebb = "[nitzer,ebb]"; -pain = "[pain]"; -pet_shop_boys = "[pet,shop,boys]"; -pixies = "[pixies]"; -prodigy = "[prodigy]"; -project_pitchfork = "[project,pitchfork]"; -vnv_nation = "[vnv,nation]"; -britney_spears = "[britney,spears]"; -usher = "[usher]"; -fifty_cent = "[fifty,cent]"; -green_day = "[green,day]"; -billy_idol = "[billy,idol]"; -elvis_presley = "[elvis,presley]"; -shania_twain = "[shania,twain]"; -trace_adkins = "[trace,adkins]"; -the_chemical_brothers = "[the,chemical,brothers]"; -eminem = "[eminem]"; -ozzy_osbourne = "[ozzy,osbourne]"; -norah_jones = "[norah,jones]"; -jessica_simpson = "[jessica,simpson]"; -guns_and_roses = "[guns,and,roses]"; -europe = "[europe]"; -led_zeppelin = "[led,zeppelin]"; -the_cardigans = "[the,cardigans]"; -ace_of_base = "[ace,of,base]"; -atomic_swing = "[atomic,swing]"; -jessica_simpson = "[jessica,simpson]"; -creeps = "[creeps]"; -eagle_eye_cherry = "[eagle,eye,cherry]"; -stephen_simmonds = "[stephen,simmonds]"; -the_ark = "[the,ark]"; -trance_dance = "[trance,dance]"; -vacuum = "[vacuum]"; - - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishRadioStations.gf b/grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishRadioStations.gf deleted file mode 100644 index bd9796f0c..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishRadioStations.gf +++ /dev/null @@ -1,11 +0,0 @@ -abstract EnglishRadioStations = { - -cat Station; - -fun - -digital_gunfire : Station; -rant_radio : Station; - - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishRadioStationsEng.gf b/grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishRadioStationsEng.gf deleted file mode 100644 index 98cc9cf91..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishRadioStationsEng.gf +++ /dev/null @@ -1,8 +0,0 @@ -concrete EnglishRadioStationsEng of EnglishRadioStations = { - -pattern - -digital_gunfire = ["digital gunfire"]; -rant_radio = ["rant radio"]; - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishRadioStationsPro.gf b/grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishRadioStationsPro.gf deleted file mode 100644 index a791d1f56..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishRadioStationsPro.gf +++ /dev/null @@ -1,8 +0,0 @@ -concrete EnglishRadioStationsPro of EnglishRadioStations = { - -pattern - -digital_gunfire = "[digital,gunfire]"; -rant_radio = "[rant,radio]"; - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishSongs.gf b/grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishSongs.gf deleted file mode 100644 index f52f9b058..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishSongs.gf +++ /dev/null @@ -1,57 +0,0 @@ -abstract EnglishSongs = { -cat Song; - -fun - -another_world : Song; -deeper_than_the_usual_feeling : Song; -london_calling : Song; -should_i_stay_or_should_i_go : Song; -dead_stars : Song; -like_tears_in_rain : Song; -figurehead : Song; -leviathan : Song; -stalker : Song; -friday_im_in_love : Song; -sadness : Song; -i_think_im_paranoid : Song; -in_the_city : Song; -time_for_truth : Song; -the_man_with_the_child_in_his_eyes : Song; -totem_pole : Song; -lucky_star : Song; -material_girl : Song; -if_i_should_die_tonight : Song; -angel : Song; -teardrop : Song; -sly : Song; -sex_by_force : Song; -ars_magica : Song; -razors_through_flesh : Song; -heads_high : Song; -latest_news : Song; -good_enough : Song; -thorn : Song; -let_beauty_loose : Song; -eleanor_rigby : Song; -west_end_girls : Song; -suburbia : Song; -debaser : Song; -poison : Song; -existence : Song; -darkangel : Song; -rubicon : Song; -all_that_she_wants : Song; -the_final_countdown : Song; -stone_me_into_the_groove : Song; -oh_i_like_it : Song; -save_tonight : Song; -tears_never_dry : Song; -it_takes_a_fool_to_remain_sain : Song; -youre_gonna_get_it : Song; -i_breathe : Song; -legion : Song; -standing : Song; -like_a_prayer : Song; - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishSongsEng.gf b/grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishSongsEng.gf deleted file mode 100644 index e089044fb..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishSongsEng.gf +++ /dev/null @@ -1,56 +0,0 @@ -concrete EnglishSongsEng of EnglishSongs = { - -pattern - -another_world = ["another world"]; -deeper_than_the_usual_feeling = ["deeper then the usual feeling"]; -london_calling = ["london calling"]; -should_i_stay_or_should_i_go = ["should i stay or should i go"]; -dead_stars = ["dead stars"]; -like_tears_in_rain = ["like tears in rain"]; -figurehead = ["figurehead"]; -leviathan = ["leviathan"]; -stalker = ["stalker"]; -friday_im_in_love = ["friday im in love"]; -sadness = ["sadness"]; -i_think_im_paranoid = ["i think im paranoid"]; -in_the_city = ["in the city"]; -time_for_truth = ["time for truth"]; -the_man_with_the_child_in_his_eyes = ["the man with the child in his eyes"]; -totem_pole = ["totem pole"]; -lucky_star = ["lucky star"]; -material_girl = ["material girl"]; -if_i_should_die_tonight = ["if i should die tonight"]; -angel = ["angel"]; -teardrop = ["teardrop"]; -sly = ["sly"]; -sex_by_force = ["sex by force"]; -ars_magica = ["ars magica"]; -razors_through_flesh = ["razors through flesh"]; -heads_high = ["heads high"]; -latest_news = ["latest news"]; -good_enough = ["good enough"]; -thorn = ["thorn"]; -let_beauty_loose = ["let beauty loose"]; -eleanor_rigby = ["eleanor rigby"]; -west_end_girls = ["west end girls"]; -suburbia = ["suburbia"]; -debaser = ["debaser"]; -poison = ["poison"]; -existence = ["existance"]; -darkangel = ["darkangel"]; -rubicon = ["rubicon"]; -all_that_she_wants = ["all that she wants"]; -the_final_countdown = ["the final countown"]; -stone_me_into_the_groove = ["stone me into the groove"]; -oh_i_like_it = ["oh i like it"]; -save_tonight = ["save tonight"]; -tears_never_dry = ["tears never dry"]; -it_takes_a_fool_to_remain_sain = ["it takes s fool to remain sain"]; -youre_gonna_get_it = ["youre gonna get it"]; -i_breathe = ["i breathe"]; -legion = ["legion"]; -standing = ["standing"]; -like_a_prayer = ["like a prayer"]; - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishSongsPro.gf b/grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishSongsPro.gf deleted file mode 100644 index 0d8f68ad4..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Media/English/EnglishSongsPro.gf +++ /dev/null @@ -1,56 +0,0 @@ -concrete EnglishSongsPro of EnglishSongs = { - -pattern - -another_world = "[another,world]"; -deeper_than_the_usual_feeling = "[deeper,then,the,usual,feeling]"; -london_calling = "[london,calling]"; -should_i_stay_or_should_i_go = "[should,i,stay,or,should,i,go]"; -dead_stars = "[dead,stars]"; -like_tears_in_rain = "[like,tears,in,rain]"; -figurehead = "[figurehead]"; -leviathan = "[leviathan]"; -stalker = "[stalker]"; -friday_im_in_love = "[friday,im,in,love]"; -sadness = "[sadness]"; -i_think_im_paranoid = "[i,think,im,paranoid]"; -in_the_city = "[in,the,city]"; -time_for_truth = "[time,for,truth]"; -the_man_with_the_child_in_his_eyes = "[the,man,with,the,child,in,his,eyes]"; -totem_pole = "[totem,pole]"; -lucky_star = "[lucky,star]"; -material_girl = "[material,girl]"; -if_i_should_die_tonight = "[if,i,should,die,tonight]"; -angel = "[angel]"; -teardrop = "[teardrop]"; -sly = "[sly]"; -sex_by_force = "[sex,by,force]"; -ars_magica = "[ars,magica]"; -razors_through_flesh = "[razors,through,flesh]"; -heads_high = "[heads,high]"; -latest_news = "[latest,news]"; -good_enough = "[good,enough]"; -thorn = "[thorn]"; -let_beauty_loose = "[let,beauty,loose]"; -eleanor_rigby = "[eleanor,rigby]"; -west_end_girls = "[west,end,girls]"; -suburbia = "[suburbia]"; -debaser = "[debaser]"; -poison = "[poison]"; -existence = "[existance]"; -darkangel = "[darkangel]"; -rubicon = "[rubicon]"; -all_that_she_wants = "[all,that,she,wants]"; -the_final_countdown = "[the,final,countown]"; -stone_me_into_the_groove = "[stone,me,into,trh,groove]"; -oh_i_like_it = "[oh,i,like,it]"; -save_tonight = "[save,tonight]"; -tears_never_dry = "[tears,never,dry]"; -it_takes_a_fool_to_remain_sain = "[it,takes,s,fool,to,remain,sain]"; -youre_gonna_get_it = "[youre,gonna,get,it]"; -i_breathe = "[i,breathe]"; -legion = "[legion]"; -standing = "[standing]"; -like_a_prayer = "[like,a,prayer]"; - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishAlbums.gf b/grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishAlbums.gf deleted file mode 100644 index c143f7ada..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishAlbums.gf +++ /dev/null @@ -1,11 +0,0 @@ -abstract SwedishAlbums = { - -cat Album; - -fun - -peps_one : Album; -peps_two : Album; -swedish_classics : Album; - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishAlbumsPro.gf b/grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishAlbumsPro.gf deleted file mode 100644 index daf16e291..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishAlbumsPro.gf +++ /dev/null @@ -1,10 +0,0 @@ -concrete SwedishAlbumsPro of SwedishAlbums = { - -pattern - -peps_one = "[peps,bitar,ett]"; -peps_two = "[peps,bitar,två]"; -swedish_classics = "[svenska,klassiker]"; - - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishAlbumsSwe.gf b/grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishAlbumsSwe.gf deleted file mode 100644 index a97a1f640..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishAlbumsSwe.gf +++ /dev/null @@ -1,10 +0,0 @@ -concrete SwedishAlbumsSwe of SwedishAlbums = { - -pattern - -swedish_classics = ["svenska klassiker"]; -peps_one = ["peps bitar ett"]; -peps_two = ["peps bitar två"]; - - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishArtists.gf b/grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishArtists.gf deleted file mode 100644 index dee879752..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishArtists.gf +++ /dev/null @@ -1,58 +0,0 @@ -abstract SwedishArtists = { - -cat Artist; - -fun - -abba : Artist; -adolphson_och_falk : Artist; -anne_lie_ryde : Artist; -bo_kaspers_orkester : Artist; -christer_sandelin : Artist; -dan_hylander_och_rmb : Artist; -di_leva : Artist; -dilba : Artist; -docent_dod : Artist; -dr_alban : Artist; -ebba_gron : Artist; -eldkvarn : Artist; -eric_gadd : Artist; -eva_dahlgren : Artist; -freda : Artist; -gyllende_tider : Artist; -imperiet : Artist; -irma : Artist; -jakob_hellman : Artist; -jumper : Artist; -kent : Artist; -lars_winnerback : Artist; -lisa_ekdahl : Artist; -lisa_nilsson : Artist; -lolita_pop : Artist; -lustans_lakejer : Artist; -marie_fredriksson : Artist; -mauro_scocco : Artist; -mikael_rickfors : Artist; -mikael_wiehe : Artist; -monica_tornell : Artist; -nordman : Artist; -norum_och_nilsson : Artist; -orup : Artist; -patrik_isaksson : Artist; -peter_lemarc : Artist; -petter : Artist; -peps_persson : Artist; -ratata : Artist; -robyn : Artist; -roger_pontare : Artist; -roxette : Artist; -staffan_hellstrand : Artist; -stakka_bo : Artist; -stefan_andersson : Artist; -stina_nordenstam : Artist; -tomas_ledin : Artist; -ulf_lundell : Artist; -uno_svenningsson : Artist; -viba_femba : Artist; - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishArtistsPro.gf b/grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishArtistsPro.gf deleted file mode 100644 index 1613a279b..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishArtistsPro.gf +++ /dev/null @@ -1,56 +0,0 @@ -concrete SwedishArtistsPro of SwedishArtists = { - -pattern - -abba = "[abba]"; -adolphson_och_falk = "[adolphson,och,falk]"; -anne_lie_ryde = "[anne-lie,ryde]"; -bo_kaspers_orkester = "[bo,kaspers,orkester]"; -christer_sandelin = "[christer,sandelin]"; -dan_hylander_och_rmb = "[dan,hylander,och,rmb]"; -di_leva = "[di,leva]"; -dilba = "[dilba]"; -docent_dod = "[docent,dod]"; -dr_alban = "[dr,alban]"; -ebba_gron = "[ebba,gron]"; -eldkvarn = "[eldkvarn]"; -eric_gadd = "[eric,gadd]"; -eva_dahlgren = "[eva,dahlgren]"; -freda = "[freda]"; -gyllende_tider = "[gyllende,tider]"; -imperiet = "[imperiet]"; -irma = "[irma]"; -jakob_hellman = "[jakob,hellman]"; -jumper = "[jumper]"; -kent = "[kent]"; -lars_winnerback = "[lars,winnerback]"; -lisa_ekdahl = "[lisa,ekdahl]"; -lisa_nilsson = "[lisa,nilsson]"; -lolita_pop = "[lolita,pop]"; -lustans_lakejer = "[lustans,lakejer]"; -marie_fredriksson = "[marie,fredriksson]"; -mauro_scocco = "[mauro,scocco]"; -mikael_rickfors = "[mikael,rickfors]"; -mikael_wiehe = "[mikael,wiehe]"; -monica_tornell = "[monica,tornell]"; -nordman = "[nordman]"; -norum_och_nilsson = "[norum,och,nilsson]"; -orup = "[orup]"; -patrik_isaksson = "[patrik,isaksson]"; -peter_lemarc = "[peter,lemarc]"; -petter = "[petter]"; -peps_persson = "[peps,persson]"; -ratata = "[ratata]"; -robyn = "[robyn]"; -roger_pontare = "[roger,pontare]"; -roxette = "[roxette]"; -staffan_hellstrand = "[staffan,hellstrand]"; -stakka_bo = "[stakka_bo]"; -stefan_andersson = "[stefan,andersson]"; -stina_nordenstam = "[stina,nordenstam]"; -tomas_ledin = "[tomas,ledin]"; -ulf_lundell = "[ulf,lundell]"; -uno_svenningsson = "[uno,svenningsson]"; -viba_femba = "[viba,femba]"; - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishArtistsSwe.gf b/grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishArtistsSwe.gf deleted file mode 100644 index 93afba8b8..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishArtistsSwe.gf +++ /dev/null @@ -1,55 +0,0 @@ -concrete SwedishArtistsSwe of SwedishArtists = { - -pattern - -abba = ["abba"]; -adolphson_och_falk = ["adolphson och falk"]; -anne_lie_ryde = ["anne-lie rydé"]; -bo_kaspers_orkester = ["bo kaspers orkester"]; -christer_sandelin = ["christer sandelin"]; -dan_hylander_och_rmb = ["dan hylander och rmb"]; -di_leva = ["di leva"]; -dilba = ["dilba"]; -docent_dod = ["docent död"]; -dr_alban = ["dr alban"]; -ebba_gron = ["ebba grön"]; -eldkvarn = ["eldkvarn"]; -eric_gadd = ["eric gadd"]; -eva_dahlgren = ["eva dahlgren"]; -freda = ["freda"]; -gyllende_tider = ["gyllene tider"]; -imperiet = ["imperiet"]; -irma = ["irma"]; -jakob_hellman = ["jakob hellman"]; -jumper = ["jumper"]; -kent = ["kent"]; -lars_winnerback = ["lars winnerbäck"]; -lisa_ekdahl = ["lisa ekdahl"]; -lisa_nilsson = ["lisa nilsson"]; -lolita_pop = ["lolita pop"]; -lustans_lakejer = ["lustans lakejer"]; -marie_fredriksson = ["marie fredriksson"]; -mauro_scocco = ["mauro scocco"]; -mikael_rickfors = ["mikael rickfors"]; -mikael_wiehe = ["mikael wiehe"]; -monica_tornell = ["monica törnell"]; -nordman = ["nordman"]; -norum_och_nilsson = ["norum och nilsson"]; -orup = ["orup"]; -patrik_isaksson = ["patrik isaksson"]; -peter_lemarc = ["peter lemarc"]; -petter = ["petter"]; -peps_persson = ["peps persson"]; -ratata = ["ratata"]; -robyn = ["robyn"]; -roger_pontare = ["roger pontare"]; -roxette = ["roxette"]; -staffan_hellstrand = ["staffan hellstrand"]; -stakka_bo = ["stakka_bo"]; -stefan_andersson = ["stefan andersson"]; -stina_nordenstam = ["stina nordenstam"]; -tomas_ledin = ["tomas ledin"]; -ulf_lundell = ["ulf lundell"]; -uno_svenningsson = ["uno svenningsson"]; -viba_femba = ["viba femba"]; -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishRadioStations.gf b/grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishRadioStations.gf deleted file mode 100644 index eebd36b71..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishRadioStations.gf +++ /dev/null @@ -1,12 +0,0 @@ -abstract SwedishRadioStations = { - -cat Station; - -fun - -lugna_favoriter : Station; -sveriges_radio : Station; -mix_megapol : Station; -stockholm : Station; - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishRadioStationsPro.gf b/grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishRadioStationsPro.gf deleted file mode 100644 index 8784d9ebf..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishRadioStationsPro.gf +++ /dev/null @@ -1,10 +0,0 @@ -concrete SwedishRadioStationsPro of SwedishRadioStations = { - -pattern - -lugna_favoriter = "[lugna,favoriter]"; -sveriges_radio = "[sveriges,radio]"; -mix_megapol = "[mix,megapol]"; -stockholm = "[stockholm,närradio]"; - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishRadioStationsSwe.gf b/grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishRadioStationsSwe.gf deleted file mode 100644 index 652675a43..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishRadioStationsSwe.gf +++ /dev/null @@ -1,10 +0,0 @@ -concrete SwedishRadioStationsSwe of SwedishRadioStations = { - -pattern - -lugna_favoriter = ["lugna favoriter"]; -sveriges_radio = ["sveriges radio"]; -mix_megapol = ["mix megapol"]; -stockholm = ["stockholm närradio"]; - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishSongs.gf b/grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishSongs.gf deleted file mode 100644 index 914292257..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishSongs.gf +++ /dev/null @@ -1,58 +0,0 @@ -abstract SwedishSongs = { - -cat Song; - -fun - -blinkar_bla : Song; -segla_pa_ett_moln : Song; -undantag : Song; -det_hon_vill_ha : Song; -skuggor_i_skymningen : Song; -vem_ska_jag_tro_pa : Song; -solglasogon : Song; -atta_hundra_grader : Song; -karlekens_tunga : Song; -angeln_i_rummet : Song; -vem_tander_stjarnorna : Song; -vindarna : Song; -flickorna_pa_tv_tva : Song; -du_ska_va_president : Song; -precis_som_du : Song; -vara_vanner : Song; -om_du_var_har : Song; -kom_ihag_mig : Song; -vem_vet : Song; -himlen_runt_hornet : Song; -diamanter : Song; -efter_stormen : Song; -det_finns : Song; -sarah : Song; -vingar : Song; -flickan_och_krakan : Song; -vintersaga : Song; -allt_som_jag_kanner : Song; -jag_blir_hellre_jagad_av_vargar : Song; -du_far_gora_som_du_vill : Song; -hall_om_mig : Song; -sag_som_det_ar : Song; -vinden_har_vant : Song; -jackie : Song; -lilla_fagel_bla : Song; -sommaren_ar_kort : Song; -en_del_av_mitt_hjarta : Song; -oppna_landskap : Song; -under_ytan : Song; -teknikens_under : Song; -tva_av_oss : Song; -vandraren : Song; -under_norrskenet : Song; -vill_ha_mer : Song; -flykting : Song; -sanningens_krigare : Song; -i_vargens_spar : Song; -nu_tandas_tusen_julejus : Song; -alla_alskar_dig : Song; -hon_far : Song; - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishSongsPro.gf b/grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishSongsPro.gf deleted file mode 100644 index c8f50c37f..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishSongsPro.gf +++ /dev/null @@ -1,56 +0,0 @@ -concrete SwedishSongsPro of SwedishSongs = { - -pattern - -blinkar_bla = "[blinkar,blå]"; -segla_pa_ett_moln = "[segla,på,ett,moln]"; -undantag = "[undantag]"; -det_hon_vill_ha = "[det,hon,vill,ha]"; -skuggor_i_skymningen = "[skuggor,i,skymningen]"; -vem_ska_jag_tro_pa = "[vem,ska,jag,tro,på]"; -solglasogon = "[solglasögon]"; -atta_hundra_grader = "[åtta,hundra,grader]"; -karlekens_tunga = "[kärlekens,tunga]"; -angeln_i_rummet = "[ängeln,i,rummet]"; -vem_tander_stjarnorna = "[vem,tänder,stjärnorna]"; -vindarna = "[vindarna]"; -flickorna_pa_tv_tva = "[flickorna,på,tv,två]"; -du_ska_va_president = "[du,ska,va,president]"; -precis_som_du = "[precis,som,du]"; -vara_vanner = "[vara,vänner]"; -om_du_var_har = "[om,du,var,här]"; -kom_ihag_mig = "[kom,ihåg,mig]"; -vem_vet = "[vem,vet]"; -himlen_runt_hornet = "[himlen,runt,hörnet]"; -diamanter = "[diamanter]"; -efter_stormen = "[efter,stormen]"; -det_finns = "[det,finns]"; -sarah = "[sarah]"; -vingar = "[vingar]"; -flickan_och_krakan = "[flickan,och,kråkan]"; -vintersaga = "[vintersaga]"; -allt_som_jag_kanner = "[allt,som,jag,känner]"; -jag_blir_hellre_jagad_av_vargar = "[jag,blir,hellre,jagad,av,vargar]"; -du_far_gora_som_du_vill = "[du,får,göra,som,du,vill]"; -hall_om_mig = "[håll,om,mig]"; -sag_som_det_ar = "[säg,som,det,är]"; -vinden_har_vant = "[vinden,har,vänt]"; -jackie = "[jackie]"; -lilla_fagel_bla = "[lilla,fågel,blå]"; -sommaren_ar_kort = "[sommaren,är,kort]"; -en_del_av_mitt_hjarta = "[en,del,av,mitt,hjärta]"; -oppna_landskap = "[öppna,landskap]"; -under_ytan = "[under,ytan]"; -teknikens_under = "[teknikens,under]"; -tva_av_oss = "[två,av,oss]"; -vandraren = "[vandraren]"; -under_norrskenet = "[under,norrskenet]"; -vill_ha_mer = "[vill,ha,mer]"; -flykting = "[flykting]"; -sanningens_krigare = "[sanningens,krigare]"; -i_vargens_spar = "[i,vargens,spår]"; -nu_tandas_tusen_julejus = "[nu,tändas,tusen,julejus]"; -alla_alskar_dig = "[alla,älskar,dig]"; -hon_far = "[hon,får]"; - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishSongsSwe.gf b/grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishSongsSwe.gf deleted file mode 100644 index 9834440e1..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Media/Swedish/SwedishSongsSwe.gf +++ /dev/null @@ -1,56 +0,0 @@ -concrete SwedishSongsSwe of SwedishSongs = { - -pattern - -blinkar_bla = ["blinkar blå"]; -segla_pa_ett_moln = ["segla på ett moln"]; -undantag = ["undantag"]; -det_hon_vill_ha = ["det hon vill ha"]; -skuggor_i_skymningen = ["skuggor i skymningen"]; -vem_ska_jag_tro_pa = ["vem ska jag tro på"]; -solglasogon = ["solglasögon"]; -atta_hundra_grader = ["åtta hundra grader"]; -karlekens_tunga = ["kärlekens tunga"]; -angeln_i_rummet = ["ängeln i rummet"]; -vem_tander_stjarnorna = ["vem tänder stjärnorna"]; -vindarna = ["vindarna"]; -flickorna_pa_tv_tva = ["flickorna på tv två"]; -du_ska_va_president = ["du ska va president"]; -precis_som_du = ["precis som du"]; -vara_vanner = ["vara vänner"]; -om_du_var_har = ["om du var här"]; -kom_ihag_mig = ["kom ihåg mig"]; -vem_vet = ["vem vet"]; -himlen_runt_hornet = ["himlen runt hörnet"]; -diamanter = ["diamanter"]; -efter_stormen = ["efter stormen"]; -det_finns = ["det finns"]; -sarah = ["sarah"]; -vingar = ["vingar"]; -flickan_och_krakan = ["flickan och kråkan"]; -vintersaga = ["vintersaga"]; -allt_som_jag_kanner = ["allt som jag känner"]; -jag_blir_hellre_jagad_av_vargar = ["jag blir hellre jagad av vargar"]; -du_far_gora_som_du_vill = ["du får göra som du vill"]; -hall_om_mig = ["håll om mig"]; -sag_som_det_ar = ["säg som det är"]; -vinden_har_vant = ["vinden har vänt"]; -jackie = ["jackie"]; -lilla_fagel_bla = ["lilla fågel blå"]; -sommaren_ar_kort = ["sommaren är kort"]; -en_del_av_mitt_hjarta = ["en del av mitt hjärta"]; -oppna_landskap = ["öppna landskap"]; -under_ytan = ["under ytan"]; -teknikens_under = ["teknikens under"]; -tva_av_oss = ["två av oss"]; -vandraren = ["vandraren"]; -under_norrskenet = ["under norrskenet"]; -vill_ha_mer = ["vill ha mer"]; -flykting = ["flykting"]; -sanningens_krigare = ["sanningens krigare"]; -i_vargens_spar = ["i vargens spår"]; -nu_tandas_tusen_julejus = ["nu tändas tusen julejus"]; -alla_alskar_dig = ["alla älskar dig"]; -hon_far = ["hon får"]; - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Resource/Media/TVStations.gf b/grammars/TALK/GF_GoDiS/Resource/Media/TVStations.gf deleted file mode 100644 index 64a7421bf..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Media/TVStations.gf +++ /dev/null @@ -1,3 +0,0 @@ -abstract TVStations = { - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Resource/Media/TVStationsSwe.gf b/grammars/TALK/GF_GoDiS/Resource/Media/TVStationsSwe.gf deleted file mode 100644 index 086e16556..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Media/TVStationsSwe.gf +++ /dev/null @@ -1,3 +0,0 @@ -concrete TVStationsSwe of TVStations = { - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Resource/Numbers/numbers.gf b/grammars/TALK/GF_GoDiS/Resource/Numbers/numbers.gf deleted file mode 100644 index 782dc01e7..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Numbers/numbers.gf +++ /dev/null @@ -1,19 +0,0 @@ -abstract numbers = { - -cat -Number; - -fun -one : Number; -two : Number; -three : Number; -four : Number; -five : Number; -six : Number; -seven : Number; -eight : Number; -nine : Number; -ten : Number; - ---aNumber : Number; -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Resource/Numbers/numbersEng.gf b/grammars/TALK/GF_GoDiS/Resource/Numbers/numbersEng.gf deleted file mode 100644 index 140619152..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Numbers/numbersEng.gf +++ /dev/null @@ -1,18 +0,0 @@ -concrete numbersEng of numbers = { - -lincat -Number = {s : Str}; - -pattern -one = "one"; -two = "two"; -three = "three"; -four = "four"; -five = "five"; -six = "six"; -seven = "seven"; -eight = "eight"; -nine = "nine"; -ten = "ten"; - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Resource/Numbers/numbersPro.gf b/grammars/TALK/GF_GoDiS/Resource/Numbers/numbersPro.gf deleted file mode 100644 index 0fe311b57..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Numbers/numbersPro.gf +++ /dev/null @@ -1,18 +0,0 @@ -concrete numbersPro of numbers = { - -lincat -Number = {s : Str}; - -pattern -one = "1"; -two = "2"; -three = "3"; -four = "4"; -five = "5"; -six = "6"; -seven = "7"; -eight = "8"; -nine = "9"; -ten = "10"; - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Resource/Numbers/numbersSwe.gf b/grammars/TALK/GF_GoDiS/Resource/Numbers/numbersSwe.gf deleted file mode 100644 index 562dbfec0..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Numbers/numbersSwe.gf +++ /dev/null @@ -1,20 +0,0 @@ -concrete numbersSwe of numbers = { - -lincat -Number = {s : Str}; - -pattern -one = "ett"; -two = "två"; -three = "tre"; -four = "fyra"; -five = "fem"; -six = "sex"; -seven = "sju"; -eight = "åtta"; -nine = "nio"; -ten = "tio"; - ---aNumber = "NUMMER"; - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Resource/Numbers/orderNum.gf b/grammars/TALK/GF_GoDiS/Resource/Numbers/orderNum.gf deleted file mode 100644 index 820caf06a..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Numbers/orderNum.gf +++ /dev/null @@ -1,19 +0,0 @@ -abstract orderNum = { - -cat -OrderNumber; - -fun -first : OrderNumber; -second : OrderNumber; -third : OrderNumber; -fourth : OrderNumber; -fifth : OrderNumber; -sixth : OrderNumber; -seventh : OrderNumber; -eighth : OrderNumber; -ninth : OrderNumber; -tenth : OrderNumber; - ---anOrder : OrderNumber; -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Resource/Numbers/orderNumEng.gf b/grammars/TALK/GF_GoDiS/Resource/Numbers/orderNumEng.gf deleted file mode 100644 index 44dcbb547..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Numbers/orderNumEng.gf +++ /dev/null @@ -1,18 +0,0 @@ -concrete orderNumEng of orderNum = { - -lincat -OrderNumber = {s : Str}; - -pattern -first = "first" ; -second = "second" ; -third = "third" ; -fourth = "fourth" ; -fifth = "fifth" ; -sixth = "sixth" ; -seventh = "seventh" ; -eighth = "eight" ; -ninth = "ninth" ; -tenth = "tenth" ; - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Resource/Numbers/orderNumPro.gf b/grammars/TALK/GF_GoDiS/Resource/Numbers/orderNumPro.gf deleted file mode 100644 index 0f984f662..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Numbers/orderNumPro.gf +++ /dev/null @@ -1,18 +0,0 @@ -concrete orderNumPro of orderNum = { - -lincat -OrderNumber = {s : Str}; - -pattern -first = "1" ; -second = "2" ; -third = "3" ; -fourth = "4" ; -fifth = "5" ; -sixth = "6" ; -seventh = "7" ; -eighth = "8" ; -ninth = "9" ; -tenth = "10" ; - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Resource/Numbers/orderNumSwe.gf b/grammars/TALK/GF_GoDiS/Resource/Numbers/orderNumSwe.gf deleted file mode 100644 index fa722e508..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Numbers/orderNumSwe.gf +++ /dev/null @@ -1,20 +0,0 @@ -concrete orderNumSwe of orderNum = { - -lincat -OrderNumber = {s : Str}; - -pattern -first = "första" ; -second = "andra" ; -third = "tredje" ; -fourth = "fjärde" ; -fifth = "femte" ; -sixth = "sjätte" ; -seventh = "sjunde" ; -eighth = "åttonde" ; -ninth = "nionde" ; -tenth = "tionde" ; - ---anOrder = "ORDERNUMBER"; - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Resource/Time/ResEng.gf b/grammars/TALK/GF_GoDiS/Resource/Time/ResEng.gf deleted file mode 100644 index 5a6cc4b9c..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Time/ResEng.gf +++ /dev/null @@ -1,12 +0,0 @@ -resource ResEng = { - -param RefHour = ThisFormal | ThisLex | NextLex ; -oper refs : Str -> Str -> Str -> RefHour => Str = - \x,y,z -> table {ThisFormal => x ; ThisLex => y ; NextLex => z } ; -param MinMin = Form | Past | To ; -oper mins : Str -> Str -> Str -> MinMin => Str = \x,y,z -> table {Form => x ; Past => y ; To => z } ; ---oper mins : Str -> Str -> Str -> MinMin => Str = \x,y,z -> table {Form => x ; Past => y ; To => z } ; --- jag vill ha en variantsexpanderare, tänk tänk ---oper mins : Str -> Str -> Str -> MinMin => Str = \x,y,z -> table {Form => (variants{x}) ; Past => (variants{y}) ; To => (variants{z}) } ; --- Time expressions -} diff --git a/grammars/TALK/GF_GoDiS/Resource/Time/ResProlog.gf b/grammars/TALK/GF_GoDiS/Resource/Time/ResProlog.gf deleted file mode 100644 index e12b3a17c..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Time/ResProlog.gf +++ /dev/null @@ -1,24 +0,0 @@ -resource ResProlog = { -oper ---with single quotes ---app2 : Str -> Str -> Str -> Str = \pred -> \argH -> \argM -> pred ++ "(" ++ "'" ++ argH ++ ":" ++ argM ++ "'" ++ ")" ; ---without single quotes ---app2 : Str -> Str -> Str -> Str = \pred -> \argH -> \argM -> pred ++ "(" ++ argH ++ ":" ++ argM ++ ")" ; - -app3 : Str -> Str -> Str = \argH -> \argM -> argH ++ ":" ++ argM ; - -oper -app : Str -> Str -> Str = - \pred -> \arg -> - pred ++ "(" ++ arg ++ ")" ; - -appHakeOne : Str -> Str = - \arg -> - "["++ arg ++ "]" ; - -appCurlyOne : Str -> Str = - \arg -> - "{"++ arg ++"}" ; - -} - diff --git a/grammars/TALK/GF_GoDiS/Resource/Time/ResourceSwe.gf b/grammars/TALK/GF_GoDiS/Resource/Time/ResourceSwe.gf deleted file mode 100644 index e889ae5c6..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Time/ResourceSwe.gf +++ /dev/null @@ -1,10 +0,0 @@ -resource ResourceSwe = { - -param RefHour = ThisFormal | ThisLex | NextLex ; -oper refs : Str -> Str -> Str -> RefHour => Str = \x,y,z -> table {ThisFormal => x ; ThisLex => y ; NextLex => z } ; - - -param MinMin = Form | Past | To ; -oper mins : Str -> Str -> Str -> MinMin => Str = \u,x,y -> table {Form => u ; Past => x ; To => y } ; -} - diff --git a/grammars/TALK/GF_GoDiS/Resource/Time/Time.gf b/grammars/TALK/GF_GoDiS/Resource/Time/Time.gf deleted file mode 100644 index fc608d683..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Time/Time.gf +++ /dev/null @@ -1,103 +0,0 @@ -abstract Time = { -cat - --- Times -Time ; -Hour ; -Minute ; - -fun --- Time -hour0 : Hour ; -hour1 : Hour ; -hour2 : Hour ; -hour3 : Hour ; -hour4 : Hour ; -hour5 : Hour ; -hour6 : Hour ; -hour7 : Hour ; -hour8 : Hour ; -hour9 : Hour ; -hour10 : Hour ; -hour11 : Hour ; -hour12 : Hour ; -hour13 : Hour ; -hour14 : Hour ; -hour15 : Hour ; -hour16 : Hour ; -hour17 : Hour ; -hour18 : Hour ; -hour19 : Hour ; -hour20 : Hour ; -hour21 : Hour ; -hour22 : Hour ; -hour23 : Hour ; - --- Minutes -minute0 : Minute ; -minute1 : Minute ; -minute2 : Minute ; -minute3 : Minute ; -minute4 : Minute ; -minute5 : Minute ; -minute6 : Minute ; -minute7 : Minute ; -minute8 : Minute ; -minute9 : Minute ; -minute10 : Minute ; -minute11 : Minute ; -minute12 : Minute ; -minute13 : Minute ; -minute14 : Minute ; -minute15 : Minute ; -minute16 : Minute ; -minute17 : Minute ; -minute18 : Minute ; -minute19 : Minute ; -minute20 : Minute ; -minute21 : Minute ; -minute22 : Minute ; -minute23 : Minute ; -minute24 : Minute ; -minute25 : Minute ; -minute26 : Minute ; -minute27 : Minute ; -minute28 : Minute ; -minute29 : Minute ; -minute30 : Minute ; -minute31 : Minute ; -minute32 : Minute ; -minute33 : Minute ; -minute34 : Minute ; -minute35 : Minute ; -minute36 : Minute ; -minute37 : Minute ; -minute38 : Minute ; -minute39 : Minute ; -minute40 : Minute ; -minute41 : Minute ; -minute42 : Minute ; -minute43 : Minute ; -minute44 : Minute ; -minute45 : Minute ; -minute46 : Minute ; -minute47 : Minute ; -minute48 : Minute ; -minute49 : Minute ; -minute50 : Minute ; -minute51 : Minute ; -minute52 : Minute ; -minute53 : Minute ; -minute54 : Minute ; -minute55 : Minute ; -minute56 : Minute ; -minute57 : Minute ; -minute58 : Minute ; -minute59 : Minute ; - --- Time expressions ---timeFormal : Hour -> Minute -> Time ; ---timeInformal : Hour -> Minute -> Time ; -time : Hour -> Minute -> Time ; - -} diff --git a/grammars/TALK/GF_GoDiS/Resource/Time/TimeEng.gf b/grammars/TALK/GF_GoDiS/Resource/Time/TimeEng.gf deleted file mode 100644 index ef7088887..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Time/TimeEng.gf +++ /dev/null @@ -1,122 +0,0 @@ --- Time grammar English - -concrete TimeEng of Time = open ResEng in { - -lin -hour0 = {s = refs ["null null"] (variants {["midnight"];["twelve"]}) "one"} ; -hour1 = {s = refs "one" (variants {["one"];["one a.m"]}) "two"} ; -hour2 = {s = refs "two" (variants {["two"];["two a.m"]}) "three"} ; -hour3 = {s = refs "three" (variants {["three"];["three a.m"]}) "four"} ; -hour4 = {s = refs "four" (variants {["four"];["four a.m"]}) "five"} ; -hour5 = {s = refs "five" (variants {["five"];["five a.m"]}) "six"} ; -hour6 = {s = refs "six" (variants {["six"];["six a.m"]}) "seven"} ; -hour7 = {s = refs "seven" (variants {["seven"];["seven a.m"]}) "eight"} ; -hour8 = {s = refs "eight" (variants {["eight"];["eight a.m"]}) "nine"} ; -hour9 = {s = refs "nine" (variants {["nine"];["nine a.m"]}) "ten"} ; -hour10 = {s = refs "ten" (variants {["ten"];["ten a.m"]}) "eleven"} ; -hour11 = {s = refs "eleven" (variants {["eleven"];["eleven a.m"]}) "twelve"} ; -hour12 = {s = refs "twelve" (variants {["twelve"];["twelve a.m"]}) "one" } ; -hour13 = {s = refs "thirten" (variants {["one"];["one p.m"]}) "two" }; -hour14 = {s = refs "fourteen" (variants {["two"];["two p.m"]}) "three" } ; -hour15 = {s = refs "fifteen" (variants {["three"];["three p.m"]}) "four" } ; -hour16 = {s = refs "sixteen" (variants {["four"];["four p.m"]}) "five" } ; -hour17 = {s = refs "seventeen" (variants {["five"];["five p.m"]}) "six" } ; -hour18 = {s = refs "eighteen" (variants {["six"];["six p.m"]}) "seven" } ; -hour19 = {s = refs "nineteen" (variants {["seven"];["seven p.m"]}) "eight" } ; -hour20 = {s = refs "twenty" (variants {["eight"];["eight p.m"]}) "nine" } ; -hour21 = {s = refs ["twenty one"] (variants {["nine"];["nine p.m"]}) "eight" } ; -hour22 = {s = refs ["twenty two"] (variants {["ten"];["ten p.m"]}) "eleven" } ; -hour23 = {s = refs ["twenty three"] (variants {["eleven"]}) (variants {["midnight"];["twelve"]})} ; - - -lin - -minute0 = {s = mins (variants {["o'clock"];["sharp"];["hundred hours"]}) (variants{[""]}) (variants{})}; -minute1 = {s = mins ["oh one"] (variants{["one minute past"];["one past"]}) (variants{})}; -minute2 = {s = mins ["oh two"] (variants{["two minutes past"];["two past"]}) (variants{})}; -minute3 = {s = mins ["oh three"] (variants{["three minutes past"];["three past"]}) (variants{})}; -minute4 = {s = mins ["oh four"] (variants{["four minutes past"];["four past"]}) (variants{})}; -minute5 = {s = mins ["oh five"] (variants{["five minutes past"];["five past"]}) (variants{})}; -minute6 = {s = mins ["oh six"] (variants{["six minutes past"];["six past"]}) (variants{})}; -minute7 = {s = mins ["oh seven"] (variants{["seven minutes past"];["seven past"]}) (variants{})}; -minute8 = {s = mins ["oh eight"] (variants{["eight minutes past"];["eight past"]}) (variants{})}; -minute9 = {s = mins ["oh nine"] (variants{["nine minutes past"];["nine past"]}) (variants{})}; - -minute10 = {s = mins ["ten"] (variants{["ten minutes past"];["ten past"]}) (variants{})}; -minute11 = {s = mins ["eleven"] (variants{["eleven minutes past"];["eleven past"]}) (variants{})}; -minute12 = {s = mins ["twelve"] (variants{["twelve minutes past"];["twelve past"]}) (variants{})}; -minute13 = {s = mins ["thirteen"] (variants{["thirteen minutes past"];["thirteen past"]}) (variants{})}; -minute14 = {s = mins ["fourteen"] (variants{["fourteen minutes past"];["fourteen past"]}) (variants{})}; -minute15 = {s = mins ["fifteen"] (variants{["fifteen minutes past"];["fifteen past"];["quarter past"];["a quarter past"]}) (variants{})}; -minute16 = {s = mins ["sixteen"] (variants{["sixteen minutes past"];["sixteen past"]}) (variants{})}; -minute17 = {s = mins ["seventeen"] (variants{["seventeen minutes past"];["seventeen past"]}) (variants{})}; -minute18 = {s = mins ["eightteen"] (variants{["eighteen minutes past"];["eighteen past"]}) (variants{})}; -minute19 = {s = mins ["nineteen"] (variants{["nineteen minutes past"];["nineteen past"]}) (variants{})}; - -minute20 = {s = mins ["twenty"] (variants{["twenty minutes past"];["twenty past"]}) (variants{})}; -minute21 = {s = mins ["twenty one"] (variants{["twenty one minutes past"];["twenty one past"]}) (variants{})}; -minute22 = {s = mins ["twenty two"] (variants{["twenty two minutes past"];["twenty two past"]}) (variants{})}; -minute23 = {s = mins ["twenty three"] (variants{["twenty three minutes past"];["twenty three past"]}) (variants{})}; -minute24 = {s = mins ["twenty four"] (variants{["twenty four minutes past"];["twenty four past"]}) (variants{})}; -minute25 = {s = mins ["twenty five"] (variants{["twenty five minutes past"];["twenty two five past"]}) (variants{})}; -minute26 = {s = mins ["twenty six"] (variants{["twenty six minutes past"];["twenty six past"]}) (variants{})}; -minute27 = {s = mins ["twenty seven"] (variants{["twenty seven minutes past"];["twenty seven past"]}) (variants{})}; -minute28 = {s = mins ["twenty eight"] (variants{["twenty eight minutes past"];["twenty eight past"]}) (variants{})}; -minute29 = {s = mins ["twenty nine"] (variants{["twenty nine minutes past"];["twenty nine past"]}) (variants{})}; - -minute30 = {s = mins ["thirty"] (variants{["thirty minutes past"];["thirty past"];["half past"]}) (variants{})}; - -minute31 = {s = mins ["thirty one"] (variants{["one minute past half past????"]}) (variants{["twenty nine minutes to"];["twenty nine to"]})}; -minute32 = {s = mins ["thirty two"] (variants{}) (variants{["twenty eight minutes to"];["twenty eight to"]})}; -minute33 = {s = mins ["thirty three"] (variants{}) (variants{["twenty seven minutes to"];["twenty seven to"]})}; -minute34 = {s = mins ["thirty four"] (variants{}) (variants{["twenty six minutes to"];["twenty six to"]})}; -minute35 = {s = mins ["thirty five"] (variants{}) (variants{["twenty five minutes to"];["twenty five to"]})}; -minute36 = {s = mins ["thirty six"] (variants{}) (variants{["twenty four minutes to"];["twenty four to"]})}; -minute37 = {s = mins ["thirty seven"] (variants{}) (variants{["twenty three minutes to"];["twenty three to"]})}; -minute38 = {s = mins ["thirty eight"] (variants{}) (variants{["twenty two minutes to"];["twenty two to"]})}; -minute39 = {s = mins ["thirty nine"] (variants{}) (variants{["twenty one minutes to"];["twenty one to"]})}; -minute40 = {s = mins ["fourty"] (variants{}) (variants{["twenty minutes to"];["twenty to"]})}; - -minute41 = {s = mins ["fourty one"] (variants{}) (variants{["nineteen minutes to"];["nineteen to"]})}; -minute42 = {s = mins ["fourty two"] (variants{}) (variants{["eightteen minutes to"];["eightteen to"]})}; -minute43 = {s = mins ["fourty three"] (variants{}) (variants{["seventeen minutes to"];["seventeen to"]})}; -minute44 = {s = mins ["fourty four"] (variants{}) (variants{["sixteen minutes to"];["sixteen to"]})}; -minute45 = {s = mins ["fourty five"] (variants{["three quarters past???"]}) (variants{["fifteen minutes to"];["fifteen to"]})}; -minute46 = {s = mins ["fourty six"] (variants{}) (variants{["fourteen minutes to"];["fourteen to"]})}; -minute47 = {s = mins ["fourty seven"] (variants{}) (variants{["thirteen minutes to"];["thirteen to"]})}; -minute48 = {s = mins ["fourty eight"] (variants{}) (variants{["twelve minutes to"];["twelve to"]})}; -minute49 = {s = mins ["fourty nine"] (variants{}) (variants{["eleven minutes to"];["eleven to"]})}; -minute50 = {s = mins ["fifty"] (variants{}) (variants{["ten minutes to"];["ten to"]})}; - -minute51 = {s = mins ["fifty one"] (variants{}) (variants{["nine minutes to"];["nine to"]})}; -minute52 = {s = mins ["fifty two"] (variants{}) (variants{["eight minutes to"];["eight to"]})}; -minute53 = {s = mins ["fifty three"] (variants{}) (variants{["seven minutes to"];["seven to"]})}; -minute54 = {s = mins ["fifty four"] (variants{}) (variants{["six minutes to"];["six to"]})}; -minute55 = {s = mins ["fifty five"] (variants{}) (variants{["five minutes to"];["five to"]})}; -minute56 = {s = mins ["fifty six"] (variants{}) (variants{["four minutes to"];["four to"]})}; -minute57 = {s = mins ["fifty seven"] (variants{}) (variants{["three minutes to"];["three to"]})}; -minute58 = {s = mins ["fifty eight"] (variants{}) (variants{["two minutes to"];["two to"]})}; -minute59 = {s = mins ["fifty nine"] (variants{}) (variants{["one minute to"];["one to"]})}; - - - -lincat Hour = {s : RefHour => Str} ; -lincat Minute = {s : MinMin => Str} ; - - -lin - ---timeFormal h m = {s = h.s ! ThisFormal ++ m.s ! Form} ; ---timeInformal h m = {s = variants { - --m.s ! Past ++ h.s ! ThisLex ; - --m.s ! To ++ h.s ! NextLex - --} - --}; - -time h m = {s = variants { - h.s ! ThisFormal ++ m.s ! Form ; - m.s ! Past ++ h.s ! ThisLex ; - m.s ! To ++ h.s ! NextLex - } - }; -} diff --git a/grammars/TALK/GF_GoDiS/Resource/Time/TimeProlog.gf b/grammars/TALK/GF_GoDiS/Resource/Time/TimeProlog.gf deleted file mode 100644 index d706af0e9..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Time/TimeProlog.gf +++ /dev/null @@ -1,105 +0,0 @@ ---File name TimeProlog --- Time grammar Prolog output notation ---# -path=.:../Time -concrete TimeProlog of Time = open ResProlog in { - -flags lexer=codelit ; unlexer=codelit ; startcat=Time ; ---flags lexer=code ; unlexer=code ; startcat=Time ; - -pattern - -hour0 = "00" ; -hour1 = "01" ; -hour2 = "02" ; -hour3 = "03" ; -hour4 = "04" ; -hour5 = "05" ; -hour6 = "06" ; -hour7 = "07" ; -hour8 = "08" ; -hour9 = "09" ; -hour10 = "10" ; -hour11 = "11" ; -hour12 = "12" ; -hour13 = "13" ; -hour14 = "14" ; -hour15 = "15" ; -hour16 = "16" ; -hour17 = "17" ; -hour18 = "18" ; -hour19 = "19" ; -hour20 = "20" ; -hour21 = "21" ; -hour22 = "22" ; -hour23 = "23" ; - ---Minutes -minute0 = "00" ; -minute1 = "01" ; -minute2 = "02" ; -minute3 = "03" ; -minute4 = "04" ; -minute5 = "05" ; -minute6 = "06" ; -minute7 = "07" ; -minute8 = "08" ; -minute9 = "09" ; -minute10 = "10" ; -minute11 = "11" ; -minute12 = "12" ; -minute13 = "13" ; -minute14 = "14" ; -minute15 = "15" ; -minute16 = "16" ; -minute17 = "17" ; -minute18 = "18" ; -minute19 = "19" ; -minute20 = "20" ; -minute21 = "21" ; -minute22 = "22" ; -minute23 = "23" ; -minute24 = "24" ; -minute25 = "25" ; -minute26 = "26" ; -minute27 = "27" ; -minute28 = "28" ; -minute29 = "29" ; -minute30 = "30" ; - -minute31 = "31" ; -minute32 = "32" ; -minute33 = "33" ; -minute34 = "34" ; -minute35 = "35" ; -minute36 = "36" ; -minute37 = "37" ; -minute38 = "38" ; -minute39 = "39" ; -minute40 = "40" ; -minute41 = "41" ; -minute42 = "42" ; -minute43 = "43" ; -minute44 = "44" ; -minute45 = "45" ; -minute46 = "46" ; -minute47 = "47" ; -minute48 = "48" ; -minute49 = "49" ; -minute50 = "50" ; -minute51 = "51" ; -minute52 = "52" ; -minute53 = "53" ; -minute54 = "54" ; -minute55 = "55" ; -minute56 = "56" ; -minute57 = "57" ; -minute58 = "58" ; -minute59 = "59" ; - - -lin ---timeFormal h m = {s = app2 "time" h.s m.s } ; ---timeInformal h m = {s = app2 "time" h.s m.s } ; ---time h m = {s = app2 "time" h.s m.s } ; -time h m = {s = app3 h.s m.s } ; -} diff --git a/grammars/TALK/GF_GoDiS/Resource/Time/TimeSwe.gf b/grammars/TALK/GF_GoDiS/Resource/Time/TimeSwe.gf deleted file mode 100644 index f7a145454..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Time/TimeSwe.gf +++ /dev/null @@ -1,163 +0,0 @@ --- File name TimeSwe - ---# -path=.:..:../Time:../Weekday -concrete TimeSwe of Time = open ResourceSwe in { - ---Hours -lin - ---hour0 = {s = refs (variants{["noll noll"];["noll"]}) "tolv" "ett"} ; -hour0 = {s = refs (variants{["noll noll"];["noll"]})(variants{}) (variants{})} ; -hour1 = {s = refs ["noll ett"] "ett" "två"} ; -hour2 = {s = refs ["noll två"] "två" "tre"} ; -hour3 = {s = refs ["noll tre"] "tre" "fyra"} ; -hour4 = {s = refs ["noll fyra"] "fyra" "fem"} ; -hour5 = {s = refs ["noll fem"] "fem" "sex"} ; -hour6 = {s = refs ["noll sex"] "sex" "sju"} ; -hour7 = {s = refs ["noll sju"] "sju" "åtta"} ; -hour8 = {s = refs ["noll åtta"] "åtta" "nio"} ; -hour9 = {s = refs ["noll nio"] "nio" "tio"} ; -hour10 = {s = refs "tio" "tio" "elva"} ; -hour11 = {s = refs "elva""elva" "tolv"} ; -hour12 = {s = refs "tolv" "tolv" "ett" } ; - -hour13 = {s = refs "tretton" "ett" "två" }; -hour14 = {s = refs "fjorton" "två" "tre" }; -hour15 = {s = refs "femton" "tre" "fyra" }; -hour16 = {s = refs "sexton" "fyra" "fem" }; -hour17 = {s = refs "sjutton" "fem" "sex" }; -hour18 = {s = refs "arton" "sex" "sju" }; -hour19 = {s = refs "nitton" "sju" "åtta" } ; -hour20 = {s = refs "tjugo" "åtta" "nio" } ; -hour21 = {s = refs (variants{["tju ett"];["tjugo ett"]}) "nio" "tio" } ; -hour22 = {s = refs (variants{["tju två"];["tjugo två"]}) "tio" "elva" } ; -hour23 = {s = refs (variants{["tju tre"];["tjugo tre"]}) "elva" "tolv" }; - ---Minutes ---0-9 ---minute0 = {s = mins (variants{["noll noll"]}) (variants{}) (variants{}) (variants{[""]})} ; -minute0 = {s = mins ["noll noll"] (variants{[""]}) (variants{})} ; -minute1 = {s = mins ["noll ett"] (variants {["ett över"] ; ["en minut över"]}) (variants{}) } ; -minute2 = {s = mins ["noll två"] (variants {["två över"] ; ["två minuter över"]}) (variants{})} ; -minute3 = {s = mins ["noll tre"] (variants { ["tre över"] ; ["tre minuter över"]}) (variants{})} ; -minute4 = {s = mins ["noll fyra"] (variants { ["fyra över"] ; ["fyra minuter över"]}) (variants{})} ; -minute5 = {s = mins ["noll fem"] (variants { ["fem över"] ; ["fem minuter över"]}) (variants{})} ; -minute6 = {s = mins ["noll sex"] (variants { ["sex över"] ; ["sex minuter över"]}) (variants{})} ; -minute7 = {s = mins ["noll sju"] (variants { ["sju över"] ; ["sju minuter över"]}) (variants{})} ; -minute8 = {s = mins ["noll åtta"] (variants { ["åtta över"] ; ["åtta minuter över"]}) (variants{})} ; -minute9 = {s = mins ["noll nio"] (variants { ["nio över"] ; ["nio minuter över"]}) (variants{})} ; - ---10-19 -minute10 = {s = mins ["tio"] (variants { ["tio över"] ; ["tio minuter över"]}) (variants{})} ; -minute11 = {s = mins ["elva"] (variants { ["elva över"] ; ["elva minuter över"]}) (variants{})} ; -minute12 = {s = mins ["tolv"] (variants { ["tolv över"] ; ["tolv minuter över"]}) (variants{})} ; -minute13 = {s = mins ["tretton"] (variants { ["tretton över"] ; ["tretton minuter över"]}) (variants{})} ; -minute14 = {s = mins ["fjorton"] (variants { ["fjorton över"] ; ["fjorton minuter över"]}) (variants{})} ; -minute15 = {s = mins ["femton"] (variants { ["femton över"] ; ["femton minuter över"] ; ["kvart över"]}) (variants{})} ; -minute16 = {s = mins ["sexton"] (variants { ["sexton över"] ; ["sexton minuter över"]}) (variants{})} ; -minute17 = {s = mins ["sjutton"] (variants { ["sjutton över"] ; ["sjutton minuter över"]}) (variants{})} ; -minute18 = {s = mins ["arton"] (variants { ["arton över"] ; ["arton minuter över"]}) (variants{})} ; -minute19 = {s = mins ["nitton"] (variants { ["nitton över"] ; ["nitton minuter över"]}) (variants{})} ; - ---20-29 -minute20 = {s = mins ["tjugo"] (variants { ["tjugo över"] ; ["tjugo minuter över"]}) (variants {})} ; -minute21 = {s = mins (variants{["tju ett"];["tjugo ett"]}) (variants {["tju en över"];["tjugo en över"];["tju ett över"];["tjugo ett över"];["tju en minuter över"];["tjugo en minuter över"]}) (variants {}) } ; -minute22 = {s = mins (variants{["tju två"];["tjugo två"]}) (variants {["tju två över"];["tjugo två över"];["tju två minuter över"];["tjugo två minuter över"]}) (variants {}) } ; -minute23 = {s = mins (variants{["tju tre"];["tjugo tre"]}) (variants {["tju tre över"];["tjugo tre över"];["tju tre minuter över"];["tjugo tre minuter över"];}) (variants {}) } ; ---minute23 = {s = mins ["tjugo tre"] (variants { ["tjugo tre över"] ; ["tjugo tre minuter över"]}) (variants {}) } ; -minute24 = {s = mins (variants{["tju fyra"];["tjugo fyra"]}) (variants {["tju fyra över"];["tjugo fyra över"];["tju fyra minuter över"];["tjugo fyra minuter över"];}) (variants {["sex minuter i halv"];["sex i halv"]}) } ; ---minute24 = {s = mins ["tjugo fyra"] (variants { ["tjugo fyra över"];["tjugo fyra minuter över"]}) (variants {["sex minuter i halv"];["sex i halv"]})} ; -minute25 = {s = mins (variants{["tju fem"];["tjugo fem"]}) (variants {["tju fem över"];["tjugo fem över"];["tju fem minuter över"];["tjugo fem minuter över"];}) (variants {["fem minuter i halv"];["fem i halv"]}) } ; ---minute25 = {s = mins ["tjugo fem"] (variants { ["tjugo fem över"] ; ["tjugo fem minuter över"]}) (variants {["fem minuter i halv"];["fem i halv"]}) } ; -minute26 = {s = mins (variants{["tju sex"];["tjugo sex"]}) (variants {["tju sex över"];["tjugo sex över"];["tju sex minuter över"];["tjugo sex minuter över"];}) (variants {["fyra minuter i halv"];["fyra i halv"]}) } ; ---minute26 = {s = mins ["tjugo sex"] (variants { ["tjugo sex över"] ; ["tjugo sex minuter över"]}) (variants {["fyra minuter i halv"];["fyra i halv"]}) } ; -minute27 = {s = mins (variants{["tju sju"];["tjugo sju"]}) (variants {["tju sju över"];["tjugo sju över"];["tju sju minuter över"];["tjugo sju minuter över"];}) (variants {["tre minuter i halv"];["tre i halv"]}) } ; ---minute27 = {s = mins ["tjugo sju"] (variants { ["tjugo sju över"] ; ["tjugo sju minuter över"]}) (variants {["tre minuter i halv"];["tre i halv"]}) } ; -minute28 = {s = mins (variants{["tju åtta"];["tjugo åtta"]}) (variants {["tju åtta över"];["tjugo åtta över"];["tju åtta minuter över"];["tjugo åtta minuter över"];}) (variants {["två minuter i halv"];["två i halv"]}) } ; ---minute28 = {s = mins ["tjugo åtta"] (variants { ["tjugo åtta över"] ; ["tjugo åtta minuter över"]}) (variants {["två minuter i halv"];["två i halv"]}) } ; -minute29 = {s = mins (variants{["tju nio"];["tjugo nio"]}) (variants {["tju nio över"];["tjugo nio över"];["tju nio minuter över"];["tjugo nio minuter över"];}) (variants {["en minuter i halv"];["en i halv"]}) } ; ---minute29 = {s = mins ["tjugo nio"] (variants { ["tjugo nio över"] ; ["tjugo nio minuter över"]}) (variants {["en minut i halv"];["en i halv"]}) } ; - ---30-39 -minute30 = {s = mins ["trettio"] (variants { ["trettio minuter över"]}) ["halv"] } ; -minute31 = {s = mins ["trettio ett"] (variants { ["trettio en över"] ; ["trettio ett över"] ; ["trettio en minuter över"]}) (variants {["tjugo nio minuter i"];["tjugo nio i"];["en minut över halv"];["en över halv"]}) } ; -minute32 = {s = mins ["trettio två"] (variants { ["trettio två över"] ; ["trettio två minuter över"]}) (variants {["tjugo åtta minuter i"];["tjugo åtta i"];["två minuter över halv"];["två över halv"]}) } ; -minute33 = {s = mins ["trettio tre"] (variants { ["trettio tre över"] ; ["trettio tre minuter över"]}) (variants {["tjugo sju minuter i"];["tjugo sju i"];["tre minuter över halv"];["tre över halv"]}) } ; -minute34 = {s = mins ["trettio fyra"] (variants { ["trettio fyra över"] ; ["trettio fyra minuter över"]}) (variants {["tjugo sex minuter i"];["tjugo sex i"];["fyra minuter över halv"];["fyra över halv"]}) } ; -minute35 = {s = mins ["trettio fem"] (variants { ["trettio fem över"] ; ["trettio fem minuter över"]}) (variants {["tjugo fem minuter i"];["tjugo fem i"];["fem minuter över halv"]; ["fem över halv"]}) } ; -minute36 = {s = mins ["trettio sex"] (variants { ["trettio sex över"] ; ["trettio sex minuter över"]}) (variants {["tjugo fyra minuter i"];["tjugo fyra i"];["sex minuter över halv"];["sex över halv"]}) } ; -minute37 = {s = mins ["trettio sju"] (variants { ["trettio sju över"] ; ["trettio sju minuter över"]}) (variants {["tjugo tre minuter i"];["tjugo tre i"];["sju minuter över halv"];["sju över halv"]}) } ; -minute38 = {s = mins ["trettio åtta"] (variants { ["trettio åtta över"] ; ["trettio åtta minuter över"]}) (variants {["tjugo två minuter i"];["tjugo två i"]}) } ; -minute39 = {s = mins ["trettio nio"] (variants { ["trettio nio över"] ; ["trettio nio minuter över"]}) (variants {["tjugo en minuter i"];["tjugo en i"];["tjugo ett i"]}) } ; - ---40-49 -minute40 = {s = mins ["fyrtio"] (variants {}) (variants {["tjugo minuter i"];["tjugo i"]}) } ; -minute41 = {s = mins ["fyrtio ett"] (variants {}) (variants {["nitton minuter i"];["nitton i"]}) } ; -minute42 = {s = mins ["fyrtio två"] (variants {}) (variants {["arton minuter i"];["arton i"]}) } ; -minute43 = {s = mins ["fyrtio tre"] (variants {}) (variants {["sjutton minuter i"];["sjutton i"]}) } ; -minute44 = {s = mins ["fyrtio fyra"] (variants {}) (variants {["sexton minuter i"];["sexton i"]}) } ; -minute45 = {s = mins (variants {["fyrtio fem"];["tre kvart"]}) (variants {}) (variants {["femton minuter i"];["femton i"];["kvart i"]}) } ; -minute46 = {s = mins ["fyrtio sex"] (variants {}) (variants {["fjorton minuter i"];["fjorton i"]}) } ; -minute47 = {s = mins ["fyrtio sju"] (variants {}) (variants {["tretton minuter i"];["tretton i"]}) } ; -minute48 = {s = mins ["fyrtio åtta"] (variants {}) (variants {["tolv minuter i"];["tolv i"]}) } ; -minute49 = {s = mins ["fyrtio nio"] (variants {}) (variants {["elva minuter i"];["elva i"]}) } ; - ---50-59 -minute50 = {s = mins ["femtio"] (variants {}) (variants {["tio minuter i"];["tio i"]}) } ; -minute51 = {s = mins ["femtio ett"] (variants {}) (variants {["nio minuter i"];["nio i"]}) } ; -minute52 = {s = mins ["femtio två"] (variants {}) (variants {["åtta minuter i"];["åtta i"]}) } ; -minute53 = {s = mins ["femtio tre"] (variants {}) (variants {["sju minuter i"];["sju i"]}) } ; -minute54 = {s = mins ["femtio fyra"] (variants {}) (variants {["sex minuter i"];["sex i"]}) } ; -minute55 = {s = mins ["femtio fem"] (variants {}) (variants {["fem minuter i"];["fem i"]}) } ; -minute56 = {s = mins ["femtio sex"] (variants {}) (variants {["fyra minuter i"];["fyra i"]}) } ; -minute57 = {s = mins ["femtio sju"] (variants {}) (variants {["tre minuter i"];["tre i"]}) } ; -minute58 = {s = mins ["femtio åtta"] (variants {}) (variants {["två minuter i"];["två i"]}) } ; -minute59 = {s = mins ["femtio nio"] (variants {}) (variants {["en minut i"];["en i"];["ett i"]}) } ; - -lincat Hour = {s : RefHour => Str} ; - -lincat Minute = {s : MinMin => Str} ; - --- Time expressions -lin ---timeDotty h m = {s = h.s ! ThisLex ++ m.s ! Dot }; ---timeInformal h m = {s = variants { - --m.s ! Past ++ h.s ! ThisLex ; - --m.s ! To ++ h.s ! NextLex - --} - --}; ---timeFormal h m = {s = h.s ! ThisFormal ++ m.s ! Form} ; - ---klockan arton och tjugo ---arton och tjugo ---arton och ---sex och - -time h m = {s = - variants { - h.s ! ThisFormal ++ m.s ! Form ; - h.s ! ThisFormal ++ "och" ++ m.s ! Form ; - m.s ! Past ++ h.s ! ThisLex ; - m.s ! To ++ h.s ! NextLex; - "klockan" ++ h.s ! ThisFormal ++ m.s ! Form ; - --"klockan" ++ h.s ! ThisFormal ++ "och" ++ m.s ! Form ; - "klockan" ++ m.s ! Past ++ h.s ! ThisLex ; - "klockan" ++ m.s ! To ++ h.s ! NextLex - } - }; - -} - - - - - - - - - - - - - - diff --git a/grammars/TALK/GF_GoDiS/Resource/Time/Weekday.gf b/grammars/TALK/GF_GoDiS/Resource/Time/Weekday.gf deleted file mode 100644 index 6ae308273..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Time/Weekday.gf +++ /dev/null @@ -1,22 +0,0 @@ ----File name Weekday.gf - -abstract Weekday = { - -cat -Weekday ; -Day ; - -fun -monday : Weekday ; -tuesday : Weekday ; -wednesday : Weekday ; -thursday : Weekday ; -friday : Weekday ; -saturday : Weekday ; -sunday : Weekday ; - -fun -today : Day ; -tomorrow : Day; - -} diff --git a/grammars/TALK/GF_GoDiS/Resource/Time/WeekdayEng.gf b/grammars/TALK/GF_GoDiS/Resource/Time/WeekdayEng.gf deleted file mode 100644 index dc2f795e6..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Time/WeekdayEng.gf +++ /dev/null @@ -1,15 +0,0 @@ -concrete WeekdayEng of Weekday = { - -pattern -today = "today" ; -monday = "monday" ; -tuesday = "tuesday" ; -wednesday = "wednesday" ; -thursday = "thursday" ; -friday = "friday" ; -saturday = "saturday" ; -sunday = "sunday" ; -today = "today" ; -tomorrow = "tomorrow" ; - -} \ No newline at end of file diff --git a/grammars/TALK/GF_GoDiS/Resource/Time/WeekdayProlog.gf b/grammars/TALK/GF_GoDiS/Resource/Time/WeekdayProlog.gf deleted file mode 100644 index 523d0f310..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Time/WeekdayProlog.gf +++ /dev/null @@ -1,19 +0,0 @@ ---# -path=.:../Time - ----File name weekday.Swe.gf - -concrete WeekdayProlog of Weekday = { - -pattern - -monday = "monday" ; -tuesday = "tuesday" ; -wednesday = "wednesday" ; -thursday = "thursday" ; -friday = "friday" ; -saturday = "saturday" ; -sunday = "sunday" ; - -today = "today" ; -tomorrow = "tomorrow"; -} diff --git a/grammars/TALK/GF_GoDiS/Resource/Time/WeekdaySwe.gf b/grammars/TALK/GF_GoDiS/Resource/Time/WeekdaySwe.gf deleted file mode 100644 index 7422d032c..000000000 --- a/grammars/TALK/GF_GoDiS/Resource/Time/WeekdaySwe.gf +++ /dev/null @@ -1,16 +0,0 @@ -concrete WeekdaySwe of Weekday = { - -pattern - -monday = "måndag" ; -tuesday = "tisdag" ; -wednesday = "onsdag" ; -thursday = "torsdag" ; -friday = "fredag" ; -saturday = "lördag" ; -sunday = "söndag" ; - -today = "idag" ; -tomorrow = "imorgon" ; - -} diff --git a/grammars/TALK/README b/grammars/TALK/README deleted file mode 100644 index 468c7a6d2..000000000 --- a/grammars/TALK/README +++ /dev/null @@ -1,18 +0,0 @@ -Grammars from the European TALK Project. - -Under construction, mostly work by Ann-Charlotte Forslund. - -To test: - - cd GF_GoDiS/Domain/DJGoDiS/User/ - - gf userDomainPro.gf userDomainSwe.gf userDomainEng.gf - - - > gr | l -multi -all - - > p "lower the volume" - - > gt -depth=5 | pt -transform=solve | l -lang=userDomainSwe - -(README by Aarne Ranta 27/6/2005) diff --git a/grammars/aggregation/Abstract.gf b/grammars/aggregation/Abstract.gf deleted file mode 100644 index 719bfe150..000000000 --- a/grammars/aggregation/Abstract.gf +++ /dev/null @@ -1,57 +0,0 @@ --- testing transfer: aggregation by def definitions. AR 12/4/2003 -- 9/10 - --- p "Mary runs or John runs and John walks" | l -transfer=Aggregation --- Mary runs or John runs and walks --- Mary or John runs and John walks - --- The two results are due to ambiguity in parsing. Thus it is not spurious! - -abstract Abstract = { - -cat - S ; NP ; VP ; Conj ; - -fun - Pred : NP -> VP -> S ; - ConjS : Conj -> S -> S -> S ; - ConjVP : Conj -> VP -> VP -> VP ; - ConjNP : Conj -> NP -> NP -> NP ; - - John, Mary, Bill : NP ; - Walk, Run, Swim : VP ; - And, Or : Conj ; - -fun aggreg : S -> S ; -def - aggreg (ConjS c (Pred Q F) B) = aggrAux c Q F B ; - aggreg (ConjS c A B) = ConjS c (aggreg A) (aggreg B) ; - aggreg A = A ; - --- this auxiliary makes pattern matching on NP to test equality - -fun aggrAux : Conj -> NP -> VP -> S -> S ; -def - -- aggregate verbs with shared subject - aggrAux c John F (Pred John G) = Pred John (ConjVP c F G) ; - aggrAux c Mary F (Pred Mary G) = Pred Mary (ConjVP c F G) ; - aggrAux c Bill F (Pred Bill G) = Pred Bill (ConjVP c F G) ; - - -- aggregate subjects with shared verbs - aggrAux c Q Run (Pred R Run) = Pred (ConjNP c Q R) Run ; - aggrAux c Q Walk (Pred R Walk) = Pred (ConjNP c Q R) Walk ; - aggrAux c Q Swim (Pred R Swim) = Pred (ConjNP c Q R) Swim ; - - -- this case takes care of munching - aggrAux c Q F (ConjS e A B) = aggrAux c Q F (aggreg (ConjS e A B)) ; - - aggrAux c Q F B = ConjS c (Pred Q F) (aggreg B) ; - --- unfortunately we cannot test string equality for Name : String -> NP ; --- It would also be tedious to test the equality of complex --- NPs and VPs, but not impossible. - --- have to add these, otherwise constants are not constructor patterns! - -data NP = John | Mary | Bill ; -data VP = Run | Walk | Swim ; -} diff --git a/grammars/aggregation/Aggregation.gf b/grammars/aggregation/Aggregation.gf deleted file mode 100644 index 116629422..000000000 --- a/grammars/aggregation/Aggregation.gf +++ /dev/null @@ -1,5 +0,0 @@ -transfer Aggregation : Abstract -> Abstract = { - - transfer S : S -> S = aggreg ; - -} diff --git a/grammars/aggregation/English.gf b/grammars/aggregation/English.gf deleted file mode 100644 index 21da16b23..000000000 --- a/grammars/aggregation/English.gf +++ /dev/null @@ -1,18 +0,0 @@ -concrete English of Abstract = { - -pattern - Pred np vp = np ++ vp ; - ConjS c A B = A ++ c ++ B ; - ConjVP c A B = A ++ c ++ B ; - ConjNP c A B = A ++ c ++ B ; - - John = "John" ; - Mary = "Mary" ; - Bill = "Bill" ; - Walk = "walks" ; - Run = "runs" ; - Swim = "swims" ; - - And = "and" ; - Or = "or" ; -} diff --git a/grammars/aggregation/transfer.gf b/grammars/aggregation/transfer.gf deleted file mode 100644 index 0f4e12097..000000000 --- a/grammars/aggregation/transfer.gf +++ /dev/null @@ -1,75 +0,0 @@ --- testing transfer: aggregation by def definitions. AR 12/4/2003 - --- p "Mary runs or John runs and John walks" | wt -c aggreg | l --- Mary runs or John runs and walks --- Mary or John runs and John walks --- The two results are due to ambiguity in parsing. Thus it is not spurious! - -flags transfer=aggreg ; - -cat - S ; NP ; VP ; Conj ; - -fun - Pred : NP -> VP -> S ; - ConjS : Conj -> S -> S -> S ; - ConjVP : Conj -> VP -> VP -> VP ; - ConjNP : Conj -> NP -> NP -> NP ; - - John, Mary, Bill : NP ; - Walk, Run, Swim : VP ; - And, Or : Conj ; - -pattern - Pred np vp = np ++ vp ; - ConjS c A B = A ++ c ++ B ; - ConjVP c A B = A ++ c ++ B ; - ConjNP c A B = A ++ c ++ B ; - - John = "John" ; - Mary = "Mary" ; - Bill = "Bill" ; - Walk = "walks" ; - Run = "runs" ; - Swim = "swims" ; - - - And = "and" ; - Or = "or" ; - --- aggregation transformation - -fun aggreg : S -> S ; -def - aggreg (ConjS c (Pred Q F) B) = aggrAux c Q F B ; - aggreg (ConjS c A B) = ConjS c (aggreg A) (aggreg B) ; - aggreg A = A ; - --- this auxiliary makes pattern matching on NP to test equality - -fun aggrAux : Conj -> NP -> VP -> S -> S ; -def - -- aggregate verbs with shared subject - aggrAux c John F (Pred John G) = Pred John (ConjVP c F G) ; - aggrAux c Mary F (Pred Mary G) = Pred Mary (ConjVP c F G) ; - aggrAux c Bill F (Pred Bill G) = Pred Bill (ConjVP c F G) ; - - -- aggregate subjects with shared verbs - aggrAux c Q Run (Pred R Run) = Pred (ConjNP c Q R) Run ; - aggrAux c Q Walk (Pred R Walk) = Pred (ConjNP c Q R) Walk ; - aggrAux c Q Swim (Pred R Swim) = Pred (ConjNP c Q R) Swim ; - - -- this case takes care of munching - aggrAux c Q F (ConjS e A B) = aggrAux c Q F (aggreg (ConjS e A B)) ; - - aggrAux c Q F B = ConjS c (Pred Q F) (aggreg B) ; - --- unfortunately we cannot test string equality for Name : String -> NP ; --- It would also be tedious to test the equality of complex --- NPs and VPs, but not impossible. - --- have to add these, otherwise constants are not constructor patterns! - -data NP = John | Mary | Bill ; -data VP = Run | Walk | Swim ; - diff --git a/grammars/basic/Basic.gf b/grammars/basic/Basic.gf deleted file mode 100644 index 034d9ba29..000000000 --- a/grammars/basic/Basic.gf +++ /dev/null @@ -1,15 +0,0 @@ -abstract Basic = { - -cat -S ; NP ; A1 ; CN ; - -fun -PredA1 : NP -> A1 -> S ; -CondS : S -> S -> S ; -DisjA1 : A1 -> A1 -> A1 ; -Every : CN -> NP ; -ModA1 : CN -> A1 -> CN ; -Number : CN ; -Even : A1 ; Odd : A1 ; Prime : A1 ; -Zero : NP ; -} diff --git a/grammars/basic/English.gf b/grammars/basic/English.gf deleted file mode 100644 index 7747d1abd..000000000 --- a/grammars/basic/English.gf +++ /dev/null @@ -1,27 +0,0 @@ -concrete English of Basic = { - -lincat -S = {s : Str} ; NP = {s : Str} ; A1 = {s : Str} ; CN = {s : Str} ; - -lin PredA1 Q F = - {s = Q.s ++ "is" ++ F.s} ; -lin CondS A B = - {s = "if" ++ A.s ++ "then" ++ B.s} ; -lin DisjA1 F G = - {s = F.s ++ "or" ++ G.s} ; -lin Every A = - {s = "every" ++ A.s} ; -lin ModA1 A F = - {s = F.s ++ A.s} ; -lin Number = - {s = "number"} ; -lin Even = - {s = "even"} ; -lin Odd = - {s = "odd"} ; -lin Prime = - {s = "prime"} ; -lin Zero = - {s = "zero"} ; - -} diff --git a/grammars/basic/README b/grammars/basic/README deleted file mode 100644 index f4e31e22d..000000000 --- a/grammars/basic/README +++ /dev/null @@ -1,10 +0,0 @@ -The naming of the grammars tut1.*.gf comes from their use in the -first GF tutorial in 1998. They still make a good starting -point to try out translating and editing. Their code is mostly -automatic translation from old-GF source. - -The grammars Basic.gf and English.gf follow the module syntax -of GF 2. The other grammars can also be used in GF 2, which -creates a module structure when compiling them. - -(AR 1998-2004) diff --git a/grammars/basic/tut1.Abs.gf b/grammars/basic/tut1.Abs.gf deleted file mode 100644 index 195ca3b87..000000000 --- a/grammars/basic/tut1.Abs.gf +++ /dev/null @@ -1,12 +0,0 @@ -cat -S ; NP ; A1 ; CN ; - -fun -PredA1 : NP -> A1 -> S ; -CondS : S -> S -> S ; -DisjA1 : A1 -> A1 -> A1 ; -Every : CN -> NP ; -ModA1 : CN -> A1 -> CN ; -Number : CN ; -Even : A1 ; Odd : A1 ; Prime : A1 ; -Zero : NP ; diff --git a/grammars/basic/tut1.Deu.gf b/grammars/basic/tut1.Deu.gf deleted file mode 100644 index f060cfb37..000000000 --- a/grammars/basic/tut1.Deu.gf +++ /dev/null @@ -1,32 +0,0 @@ -include tut1.Abs.gf ; - -param Ord = dir | indir | sub ; -lincat S = {s : Ord => Str} ; -lincat NP = {s : Str} ; -lincat A1 = {s : Str} ; -lincat CN = {s : Str} ; -lin PredA1 Q F = {s = table { - {dir} => Q.s ++ "ist" ++ F.s ; - {indir} => "ist" ++ Q.s ++ F.s ; - {sub} => Q.s ++ F.s ++ "ist"}} ; -lin CondS A B = {s = table { - {dir} => "wenn" ++ (A.s ! sub) ++ "dann" ++ B.s ! indir ; - {indir} => (B.s ! indir) ++ "wenn" ++ A.s ! sub ; - {sub} => (B.s ! sub) ++ "wenn" ++ A.s ! sub}} ; -lin DisjA1 F G = - {s = F.s ++ "oder" ++ G.s} ; -lin Every A = - {s = "jede" ++ A.s} ; -lin ModA1 A F = - {s = F.s ++ A.s} ; -lin Number = - {s = "Zahl"} ; -lin Even = - {s = "gerade"} ; -lin Odd = - {s = "ungerade"} ; -lin Prime = - {s = "unteilbar"} ; -lin Zero = - {s = "Null"} ; - diff --git a/grammars/basic/tut1.Eng.gf b/grammars/basic/tut1.Eng.gf deleted file mode 100644 index f9481a8e0..000000000 --- a/grammars/basic/tut1.Eng.gf +++ /dev/null @@ -1,26 +0,0 @@ -include tut1.Abs.gf ; - -lincat -S = {s : Str} ; NP = {s : Str} ; A1 = {s : Str} ; CN = {s : Str} ; - -lin PredA1 Q F = - {s = Q.s ++ "is" ++ F.s} ; -lin CondS A B = - {s = "if" ++ A.s ++ "then" ++ B.s} ; -lin DisjA1 F G = - {s = F.s ++ "or" ++ G.s} ; -lin Every A = - {s = "every" ++ A.s} ; -lin ModA1 A F = - {s = F.s ++ A.s} ; -lin Number = - {s = "number"} ; -lin Even = - {s = "even"} ; -lin Odd = - {s = "odd"} ; -lin Prime = - {s = "prime"} ; -lin Zero = - {s = "zero"} ; - diff --git a/grammars/basic/tut1.Fin.gf b/grammars/basic/tut1.Fin.gf deleted file mode 100644 index 1aa20ea3b..000000000 --- a/grammars/basic/tut1.Fin.gf +++ /dev/null @@ -1,26 +0,0 @@ -include tut1.Abs.gf ; - -lincat S = {s : Str} ; -lincat NP = {s : Str} ; -lincat A1 = {s : Str} ; -lincat CN = {s : Str} ; -lin PredA1 Q F = - {s = Q.s ++ "on" ++ F.s} ; -lin CondS A B = - {s = "jos" ++ A.s ++ "niin" ++ B.s} ; -lin DisjA1 F G = - {s = F.s ++ "tai" ++ G.s} ; -lin Every A = - {s = A.s ++ "kuin" ++ A.s} ; -lin ModA1 A F = - {s = F.s ++ A.s} ; -lin Number = - {s = "luku"} ; -lin Even = - {s = "parillinen"} ; -lin Odd = - {s = "pariton"} ; -lin Prime = - {s = "jaoton"} ; -lin Zero = - {s = "nolla"} ; diff --git a/grammars/basic/tut1.Fra.gf b/grammars/basic/tut1.Fra.gf deleted file mode 100644 index 04bd309c6..000000000 --- a/grammars/basic/tut1.Fra.gf +++ /dev/null @@ -1,26 +0,0 @@ -include tut1.Abs.gf ; - -lincat S = {s : Str} ; -lincat NP = {s : Str} ; -lincat A1 = {s : Str} ; -lincat CN = {s : Str} ; -lin PredA1 Q F = - {s = Q.s ++ "est" ++ F.s} ; -lin CondS A B = - {s = "si" ++ A.s ++ "alors" ++ B.s} ; -lin DisjA1 F G = - {s = F.s ++ "ou" ++ G.s} ; -lin Every A = - {s = "tout" ++ A.s} ; -lin ModA1 A F = - {s = A.s ++ F.s} ; -lin Number = - {s = "nombre"} ; -lin Even = - {s = "pair"} ; -lin Odd = - {s = "impair"} ; -lin Prime = - {s = "premier"} ; -lin Zero = - {s = "zéro"} ; diff --git a/grammars/basic/tut1.Ita.gf b/grammars/basic/tut1.Ita.gf deleted file mode 100644 index 85542d5fa..000000000 --- a/grammars/basic/tut1.Ita.gf +++ /dev/null @@ -1,26 +0,0 @@ -include tut1.Abs.gf ; - -lincat S = {s : Str} ; -lincat NP = {s : Str} ; -lincat A1 = {s : Str} ; -lincat CN = {s : Str} ; -lin PredA1 Q F = - {s = Q.s ++ "è" ++ F.s} ; -lin CondS A B = - {s = "se" ++ A.s ++ "allora" ++ B.s} ; -lin DisjA1 F G = - {s = F.s ++ "o" ++ G.s} ; -lin Every A = - {s = "ogni" ++ A.s} ; -lin ModA1 A F = - {s = A.s ++ F.s} ; -lin Number = - {s = "numero"} ; -lin Even = - {s = "pari"} ; -lin Odd = - {s = "dispari"} ; -lin Prime = - {s = "primo"} ; -lin Zero = - {s = "zero"} ; diff --git a/grammars/basic/tut1.Sve.gf b/grammars/basic/tut1.Sve.gf deleted file mode 100644 index 1bf610ecc..000000000 --- a/grammars/basic/tut1.Sve.gf +++ /dev/null @@ -1,32 +0,0 @@ -include tut1.Abs.gf ; - -param Ord = dir | indir | sub ; -lincat S = {s : Ord => Str} ; -lincat NP = {s : Str} ; -lincat A1 = {s : Str} ; -lincat CN = {s : Str} ; -lin PredA1 Q F = {s = table { - dir => Q.s ++ "är" ++ F.s ; - indir => "är" ++ Q.s ++ F.s ; - sub => Q.s ++ "är" ++ F.s}} ; -lin CondS A B = {s = table { - dir => "om" ++ A.s ! sub ++ "så" ++ B.s ! indir ; - indir => B.s ! indir ++ "om" ++ A.s ! sub ; - sub => B.s ! sub ++ "om" ++ A.s ! sub}} ; -lin DisjA1 F G = - {s = F.s ++ "eller" ++ G.s} ; -lin Every A = - {s = "varje" ++ A.s} ; -lin ModA1 A F = - {s = F.s ++ A.s} ; -lin Number = - {s = "tal"} ; -lin Even = - {s = "jämnt"} ; -lin Odd = - {s = "udda"} ; -lin Prime = - {s = "primt"} ; -lin Zero = - {s = "noll"} ; - diff --git a/grammars/bringert/ListTest.gf b/grammars/bringert/ListTest.gf deleted file mode 100644 index 7f280b524..000000000 --- a/grammars/bringert/ListTest.gf +++ /dev/null @@ -1,8 +0,0 @@ -abstract ListTest = { - -cat A; [A]; B; [B]{1}; - -fun apa : A; -fun bepa : B; - -} \ No newline at end of file diff --git a/grammars/bringert/ListTestEng.gf b/grammars/bringert/ListTestEng.gf deleted file mode 100644 index 05ae4ce25..000000000 --- a/grammars/bringert/ListTestEng.gf +++ /dev/null @@ -1,12 +0,0 @@ -concrete ListTestEng of ListTest = { - -lin BaseA = { s = "" } ; -lin ConsA a as = { s = a.s ++ "" ++ as.s } ; - -lin BaseB b = { s = b.s } ; -lin ConsB b bs = { s = b.s ++ "," ++ bs.s } ; - -lin apa = { s = "apa" } ; -lin bepa = { s = "bepa" } ; - -} \ No newline at end of file diff --git a/grammars/database/Database.gf b/grammars/database/Database.gf deleted file mode 100644 index eb0c08d9f..000000000 --- a/grammars/database/Database.gf +++ /dev/null @@ -1,33 +0,0 @@ -abstract Database = { - -flags startcat=Query ; - -cat - Query ; - Category ; Subject ; Value ; Property ; Relation ; Comparison ; Name ; - Feature ; - -fun - WhichAre : Category -> Property -> Query ; - IsThere : Category -> Query ; - AreThere : Category -> Query ; - IsIt : Subject -> Property -> Query ; - WhatIs : Value -> Query ; - - MoreThan : Comparison -> Subject -> Property ; - TheMost : Comparison -> Category -> Value ; - Relatively : Comparison -> Category -> Property ; - - RelatedTo : Relation -> Subject -> Property ; - - Individual : Name -> Subject ; - AllN : Category -> Subject ; - Any : Category -> Subject ; - MostN : Category -> Subject ; - EveryN : Category -> Subject ; - - FeatureOf : Feature -> Subject -> Subject ; - ValueOf : Feature -> Name -> Value ; - - WithProperty : Category -> Property -> Category ; -} ; diff --git a/grammars/database/DatabaseEng.gf b/grammars/database/DatabaseEng.gf deleted file mode 100644 index 20cf408eb..000000000 --- a/grammars/database/DatabaseEng.gf +++ /dev/null @@ -1,3 +0,0 @@ ---# -path=.:../newresource/abstract:../newresource/english:../prelude - -concrete DatabaseEng of Database = DatabaseI with (Resource=ResourceEng) ; diff --git a/grammars/database/DatabaseFre.gf b/grammars/database/DatabaseFre.gf deleted file mode 100644 index 1fdf4a802..000000000 --- a/grammars/database/DatabaseFre.gf +++ /dev/null @@ -1,3 +0,0 @@ ---# -path=.:../newresource/abstract:../newresource/french:../prelude:../newresource/romance - -concrete DatabaseFre of Database = DatabaseI with (Resource=ResourceFre) ; diff --git a/grammars/database/DatabaseI.gf b/grammars/database/DatabaseI.gf deleted file mode 100644 index 4040de0c1..000000000 --- a/grammars/database/DatabaseI.gf +++ /dev/null @@ -1,43 +0,0 @@ ---# -path=.:../newresource/abstract:../prelude - -incomplete concrete DatabaseI of Database = open Prelude, Resource in { - -flags lexer=text ; unlexer=text ; startcat=Query ; - -lincat - Query = Phr ; - Subject = NP ; - Category = CN ; - Property = AP ; - Comparison = AdjDeg ; - Relation = Adj2 ; - Feature = Fun ; - Value = NP ; - Name = PN ; - -lin - WhichAre A B = QuestPhrase (IntVP (NounIPMany A) (PosVG (PredAP B))) ; - IsThere A = QuestPhrase (IsThereNP (IndefOneNP A)) ; - AreThere A = QuestPhrase (IsThereNP (IndefNumNP NoNum A)) ; - WhatIs val = QuestPhrase (IntVP WhatOne (PosVG (PredNP val))) ; - IsIt Q A = QuestPhrase (QuestVP Q (PosVG (PredAP A))) ; - - MoreThan = ComparAdjP ; - TheMost = SuperlNP ; - Relatively C _ = PositAdjP C ; - - RelatedTo = ComplAdj ; - - FeatureOf f x = DefOneNP (AppFun f x) ; - ValueOf f x = DefOneNP (AppFun f (UsePN x)) ; - - WithProperty A B = ModAdj B A ; - - Individual = UsePN ; - - AllN = DetNP (AllNumDet NoNum) ; - MostN = DetNP MostsDet ; - EveryN = DetNP EveryDet ; - Any = DetNP (AnyNumDet NoNum) ; - -} ; diff --git a/grammars/database/DatabaseSwe.gf b/grammars/database/DatabaseSwe.gf deleted file mode 100644 index 618b9022b..000000000 --- a/grammars/database/DatabaseSwe.gf +++ /dev/null @@ -1,3 +0,0 @@ ---# -path=.:../newresource/abstract:../newresource/swedish:../prelude - -concrete DatabaseSwe of Database = DatabaseI with (Resource=ResourceSwe) ; diff --git a/grammars/database/README b/grammars/database/README deleted file mode 100644 index 1c289731e..000000000 --- a/grammars/database/README +++ /dev/null @@ -1,18 +0,0 @@ -Project starting to redo the old-gf database query grammars, this time -using resource grammars. - -The base grammars DatabaseX are built as instantiations of the -parametrized module DatabaseI. They are therefore easy to add -for any language supporting the resource interface Resource, -following the model of DatabaseEng and DatabaseSwe. - -The restaurant vocabulary is so far only available for -English and Swedish. The rest should be easy to modify from -corresponging grammars in the GF 1 grammar package. This time, -however, only the ParadigmsX modules should be used to define the -lexical entries. - -Copyright (c) 2004 Aarne Ranta -under GNU General Public License (GPL). - -Document last updated August 3, 2004. diff --git a/grammars/database/Restaurant.gf b/grammars/database/Restaurant.gf deleted file mode 100644 index 16ebcf53b..000000000 --- a/grammars/database/Restaurant.gf +++ /dev/null @@ -1,16 +0,0 @@ -abstract Restaurant = Database ** { - -fun - Restaurant, Bar : Category ; - French, Italian, Indian, Japanese : Property ; - address, phone, priceLevel : Feature ; - Cheap, Expensive : Comparison ; - - WhoRecommend : Name -> Query ; - WhoHellRecommend : Name -> Query ; - --- examples of restaurant names - LucasCarton : Name ; - LaCoupole : Name ; - BurgerKing : Name ; -} ; diff --git a/grammars/database/RestaurantEng.gf b/grammars/database/RestaurantEng.gf deleted file mode 100644 index af19b0aee..000000000 --- a/grammars/database/RestaurantEng.gf +++ /dev/null @@ -1,31 +0,0 @@ ---# -path=.:../resource/abstract:../resource/english:../newresource/abstract:../newresource/english:../prelude ---- path names: resource in release, newresource in cvs - -concrete RestaurantEng of Restaurant = - DatabaseEng ** open Prelude, ParadigmsEng in { - -lin - Restaurant = cnNonhuman "restaurant" ; - Bar = cnNonhuman "bar" ; - French = apReg "French" ; - Italian = apReg "Italian" ; - Indian = apReg "Indian" ; - Japanese = apReg "Japanese" ; - - address = funNonhuman "address" ; - phone = funNonhuman ["number"] ; --- phone - priceLevel = funNonhuman ["level"] ; --- price - - Cheap = aReg "cheap" ; - Expensive = aRidiculous "expensive" ; - - WhoRecommend rest = - ss (["who recommended"] ++ rest.s ! nominative) ** {lock_Phr = <>} ; - WhoHellRecommend rest = - ss (["who the hell recommended"] ++ rest.s ! nominative) ** {lock_Phr = <>} ; - - LucasCarton = pnReg ["Lucas Carton"] ; - LaCoupole = pnReg ["La Coupole"] ; - BurgerKing = pnReg ["Burger King"] ; - -} diff --git a/grammars/database/RestaurantFre.gf b/grammars/database/RestaurantFre.gf deleted file mode 100644 index 0400bde29..000000000 --- a/grammars/database/RestaurantFre.gf +++ /dev/null @@ -1,33 +0,0 @@ ---# -path=.:../newresource/abstract:../newresource/french:../newresource/romance:../prelude ---- path names: resource in release, newresource in cvs - -concrete RestaurantFre of Restaurant = - DatabaseFre ** open Prelude, ResourceFre, ParadigmsFre in { - -lin - Restaurant = UseN (nReg "restaurant" masculine) ; - Bar = UseN (nReg "bar" masculine) ; - French = AdjP1 (adj1Anglais "français" postpos) ; - Italian = AdjP1 (adj1Italien "italien" postpos) ; - Indian = AdjP1 (adj1Italien "indien" postpos) ; - Japanese = AdjP1 (adj1Anglais "japonais" postpos) ; - - address = funDe (nReg "adresse" feminine) ; - phone = funCNCase (AdvCN (UseN (nReg "numéro" masculine)) - (PrepNP PossessPrep (MassNP (UseN (nReg "téléphone" masculine))))) genitive ; - priceLevel = funCNCase (AdvCN (UseN (nEau "niveau" masculine)) - (PrepNP PossessPrep (MassNP (UseN (nCas "prix" masculine))))) genitive ; - - Cheap = aReg "cher" postpos ; ---- - Expensive = aReg ["pas cher"] postpos ; ---- - - WhoRecommend rest = - ss2 ["qui a recommandé"] rest.s ** {lock_Phr = <>} ; - WhoHellRecommend rest = - ss2 ["qui enfer a recommandé"] rest.s ** {lock_Phr = <>} ; - - LucasCarton = mkPN ["Lucas Carton"] masculine ; - LaCoupole = mkPN ["La Coupole"] feminine ; - BurgerKing =mkPN ["Burger King"] masculine ; - -} diff --git a/grammars/database/RestaurantSwe.gf b/grammars/database/RestaurantSwe.gf deleted file mode 100644 index 81e023cf5..000000000 --- a/grammars/database/RestaurantSwe.gf +++ /dev/null @@ -1,33 +0,0 @@ ---# -path=.:../newresource/abstract:../newresource/swedish:../resource/abstract:../resource/swedish:../prelude ---- path names: resource in release, newresource in cvs - -concrete RestaurantSwe of Restaurant = - DatabaseSwe ** open Prelude, ResourceSwe, ParadigmsSwe in { - -lin - Restaurant = UseN (nRisk "restaurang") ; - Bar = UseN (nRisk "bar") ; - French = AdjP1 (adjReg "fransk") ; - Italian = AdjP1 (adjReg "italiensk") ; - Indian = AdjP1 (adjReg "indisk") ; - Japanese = AdjP1 (adjReg "japansk") ; - - address = funAv (nRisk "adress") ; - phone = - funTill (mkN "telefonnummer" "telefonnumret" "telefonnummer" - "telefonnumren" neutrum nonmasculine) ; - priceLevel = funPaa (nRisk "prisnivå") ; - - Cheap = aReg "billig" ; - Expensive = aReg "dyr" ; - - WhoRecommend rest = - ss2 ["vem rekommenderade"] (rest.s ! nominative) ** {lock_Phr = <>} ; - WhoHellRecommend rest = - ss2 ["vem fan rekommenderade"] (rest.s ! nominative) ** {lock_Phr = <>} ; - - LucasCarton = pnReg ["Lucas-Carton"] neutrum nonmasculine ; --- - - LaCoupole = pnReg ["La-Coupole"] neutrum nonmasculine ; - BurgerKing = pnS (variants {["Burger King"] ; "BK"}) neutrum nonmasculine ; - -} diff --git a/grammars/dep/App.gf b/grammars/dep/App.gf deleted file mode 100644 index 769cab02e..000000000 --- a/grammars/dep/App.gf +++ /dev/null @@ -1,18 +0,0 @@ -abstract App = { - cat - S ; Q ; - NP ; QP ; - V ; V2 ; - - fun - SPredV : NP -> V -> S ; - SPredV2 : NP -> V -> NP -> S ; - QPredV : QP -> V -> Q ; - QPredV2 : QP -> V -> NP -> Q ; - - aJohn : NP ; - aWho : QP ; - - aWalk : V ; - aLove : V2 ; -} diff --git a/grammars/dep/AppEng.gf b/grammars/dep/AppEng.gf deleted file mode 100644 index 360e22eda..000000000 --- a/grammars/dep/AppEng.gf +++ /dev/null @@ -1,21 +0,0 @@ -concrete AppEng of App = open DepEng in { - lincat - S = SG ; - Q = SG ; - NP = NG ; - QP = NG ; - V = VG ; - V2 = VG ; - - lin - SPredV np v = MkSG NtS Vt1 np v CG1 ; - SPredV2 np v y = MkSG NtS Vt2 np v (CG2 y) ; - QPredV np v = MkSG NtQ Vt1 np v CG1 ; - QPredV2 np v y = MkSG NtQ Vt2 np v (CG2 y) ; - - aJohn = John ; - aWho = Who ; - - aWalk = Walk ; - aLove = Love ; -} diff --git a/grammars/dep/Dep.gf b/grammars/dep/Dep.gf deleted file mode 100644 index 76753547a..000000000 --- a/grammars/dep/Dep.gf +++ /dev/null @@ -1,42 +0,0 @@ -abstract Dep = { - cat - NType ; - VType ; - CType ; - SG NType ; - NG NType ; - VG VType ; - CG VType ; - - Slash ; - - fun - NtS, NtQ : NType ; - CtN, CtV, CtS, CtQ, CtA : CType ; - Vt, VtN : CType -> VType ; - Vt_ : VType ; - - MkSG : (n : NType) -> (v : VType) -> NG n -> VG v -> CG v -> SG n ; - - CG_ : CG Vt_ ; - CGN : NG NtS -> CG (Vt CtN) ; - CGS : SG NtS -> CG (Vt CtS) ; - CGQ : SG NtQ -> CG (Vt CtQ) ; - - CGN_ : (c : CType) -> NG NtS -> CG (Vt c) -> CG (VtN c) ; - - MkSlash3 : NG NtS -> VG (VtN CtN) -> CG (Vt CtN) -> Slash ; - MkSlash2 : (c : CType) -> NG NtS -> VG (VtN c) -> CG (Vt c) -> Slash ; - MkSlash1 : NG NtS -> VG (Vt CtN) -> Slash ; - SlashQ : NG NtQ -> Slash -> SG NtQ ; - - John : NG NtS ; - Who : NG NtQ ; - - Walk : VG Vt_ ; - Love : VG (Vt CtN) ; - Know : VG (Vt CtS) ; - Give : VG (VtN CtN) ; - Tell : VG (VtN CtS) ; - Ask : VG (VtN CtQ) ; -} diff --git a/grammars/dep/DepEng.gf b/grammars/dep/DepEng.gf deleted file mode 100644 index c77d58a5c..000000000 --- a/grammars/dep/DepEng.gf +++ /dev/null @@ -1,54 +0,0 @@ --- to test: --- p -cat=SG -tr "who walks" | pt -transform=typecheck -tr | l - -concrete DepEng of Dep = open ResDep in { - lincat - NType, VType, CType = {s : Str} ; - SG = {s : Str} ; - NG = {s : Str} ; - VG = {s : Str ; c : VComp} ; - CG = {s1,s2 : Str} ; - Slash = {s,s2 : Str} ; - - lin - NtS, NtQ = {s = []} ; - CtN, CtV, CtS, CtQ, CtA = {s = []} ; - Vt, VtN = \x -> x ; - Vt_ = {s = []} ; - - MkSG n v ng vg cg = { - s = n.s ++ v.s ++ ng.s ++ vg.s ++ - case1 vg.c ++ cg.s1 ++ case2 vg.c ++ cg.s2 - } ; - - CG_ = {s1,s2 = []} ; - CGN, CGQ = \ng -> {s1 = ng.s ; s2 = []} ; - CGS sg = {s1 = "that" ++ sg.s ; s2 = []} ; - CGN_ c np co = {s1 = c.s ++ np.s ; s2 = co.s1} ; - - MkSlash3 np v co = { - s = np.s ++ v.s ++ case1 v.c ++ co.s1 ; - s2 = case2 v.c - } ; - MkSlash2 c np v co = { - s = c.s ++ np.s ++ v.s ++ case2 v.c ++ co.s2 ; - s2 = case1 v.c - } ; - MkSlash1 np v = { - s = np.s ++ v.s ; - s2 = case1 v.c - } ; - - SlashQ qp sl = {s = sl.s2 ++ qp.s ++ sl.s} ; - - John = {s = "John"} ; - Who = {s = "who"} ; - - 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_} ; - -} diff --git a/grammars/dep/ResDep.gf b/grammars/dep/ResDep.gf deleted file mode 100644 index 2c94cbbf3..000000000 --- a/grammars/dep/ResDep.gf +++ /dev/null @@ -1,17 +0,0 @@ -resource ResDep = { - param - Case = C_ | C_to ; - VComp = VC_ | VC1 Case | VC2 Case Case ; - - oper - case1, case2 : VComp -> Str ; - case1 c = case c of { - VC1 C_to => "to" ; - VC2 C_to _ => "to" ; - _ => [] - } ; - case2 c = case c of { - VC2 _ C_to => "to" ; - _ => [] - } ; -} diff --git a/grammars/health/ExtraEng.gf b/grammars/health/ExtraEng.gf deleted file mode 100644 index 302609705..000000000 --- a/grammars/health/ExtraEng.gf +++ /dev/null @@ -1,65 +0,0 @@ --- use this path to read the grammar from the same directory ---# -path=.:../../lib/resource-0.6/abstract:../../lib/prelude:../../lib/resource-0.6/english - ---1 Functions that are not in the API, but common in Russian --- --- Aarne Ranta, Janna Khegai 2003 - -resource ExtraEng = open PredicationEng, ResourceEng, Prelude, SyntaxEng in { - -oper - BodyCNCategory : Type = - { s : Bool => Number => Case => Str ; painInType : Bool} ; - - mkPain: BodyCNCategory -> CN = \body -> - cnNoHum({ s = \\_,_ => body.s ! body.painInType ! Sg ! Nom })** {lock_CN = <>} ; - - mkBody: BodyCNCategory -> CN = \body -> - cnNoHum({ s = \\n,_ => body.s ! True ! n ! Nom })** {lock_CN = <>} ; - - injuredBody: TV -> NP -> BodyCNCategory -> S = - \haveInjured, patient, head -> - predV2 haveInjured patient (hisHead patient (mkBody head) **{lock_NP = <>}) ; - - nullDet : Det = mkDeterminer Sg [] ** {lock_Det = <>}; - - hisHead: NP -> CN -> NP =\patient, head -> - { s =\\c => patient.s ! GenP ++ head.s ! patient.n ! Nom ; - n = patient.n ; p = P3 ; lock_NP = <>} ; - - tvHave: TV = mkTransVerbDir verbP3Have ** {lock_TV = <>}; - - - painInPatientsBody: CN -> NP -> BodyCNCategory -> S = - \pain, patient, head -> case head.painInType of { - False => predV2 tvHave patient (DetNP (aDet** {lock_Det = <>}) ( mkPain head)); - True => predV2 tvHave patient (DetNP nullDet - ( - cnNoHum(appFunComm (pain ** {s2 = "in"}) - (hisHead patient (mkBody head)))** {lock_CN = <>} - ) - ) - } ; - - painInPatientsBodyMode: CN -> NP -> BodyCNCategory -> AP -> S = - \pain, patient, head, degree -> case head.painInType of { - False => predV2 tvHave patient (DetNP (aDet** {lock_Det = <>}) - ( - modCommNounPhrase degree (mkPain head) ** {lock_CN = <>} - )); - True => predV2 tvHave patient (DetNP nullDet - ( - modCommNounPhrase degree - ( - cnNoHum - ( - appFunComm (pain ** {s2 = "in"}) - (hisHead patient (mkBody head)) - ) - ) ** {lock_CN = <>} - )) - } ; - -}; - - diff --git a/grammars/health/ExtraFre.gf b/grammars/health/ExtraFre.gf deleted file mode 100644 index 88e5794f6..000000000 --- a/grammars/health/ExtraFre.gf +++ /dev/null @@ -1,59 +0,0 @@ --- use this path to read the grammar from the same directory ---# -path=.:../../lib/resource-0.6/abstract:../../lib/prelude:../../lib/resource-0.6/french:../../lib/resource-0.6/romance - ---1 Functions that are not in the API, but common in French --- --- Aarne Ranta, Janna Khegai 2003 - -resource ExtraFre = open PredicationFre, ResourceFre, Prelude, SyntaxFre, MorphoFre, ParadigmsFre in { - -oper - NPMedicine: Type = NP ** {des : Bool}; - - avoirBesoin1: CN -> VP = \doctor -> - PosVG ( PredTV (tvDir vAvoir) (DetNP nullDet ( - AppFun (funDe (nReg "besoin" Masc) ) - (IndefOneNP doctor) - ) - ) - ) ; - - avoirBesoin: NPMedicine -> VP = \medicine -> - if_then_else VP medicine.des - - (PosVG ( PredTV (tvDir vAvoir) (DetNP nullDet ( - AppFun (funPrep (nReg "besoin" Masc) "") - medicine - ) - ) - )) - - (PosVG ( PredTV (tvDir vAvoir) (DetNP nullDet ( - AppFun (funDe (nReg "besoin" Masc)) - medicine - ) - ) - )) ; - - injuredBody: (Gender => Number => Str) -> NP -> CN -> S = - \injured, patient, head -> - PredVP patient - {s = \\g,v => pronRefl patient.n patient.p ++ - verbEtre.s ! v ++ - injured ! g ! patient.n ++ - (DefOneNP head).s ! case2pform Acc; - lock_VP = <> - } ; - - - delDet : Det = mkDeterminer Sg (artDef Masc Sg genitive) - (artDef Fem Sg genitive) ** {lock_Det = <>} ; - desDet : Det = mkDeterminer1 Pl "des" ** {lock_Det = <>} ; - - nullDet : Det = mkDeterminer1 Sg "" ** {lock_Det =<>} ; - ---- tvAvoir = mkTransVerbDir (verbPres (conj3savoir ""))** {lock_TV = <> }; - -}; - - diff --git a/grammars/health/ExtraIta.gf b/grammars/health/ExtraIta.gf deleted file mode 100644 index 541c772dc..000000000 --- a/grammars/health/ExtraIta.gf +++ /dev/null @@ -1,34 +0,0 @@ --- use this path to read the grammar from the same directory ---# -path=.:../../lib/resource-0.6/abstract:../../lib/prelude:../../lib/resource-0.6/italian:../../lib/resource-0.6/romance - ---1 Functions that are not in the API, but common in Italian --- --- Aarne Ranta, Janna Khegai 2003 - -resource ExtraIta = open PredicationIta, Prelude, SyntaxIta, MorphoIta, ResourceIta in { - -oper - - averBisogno : CN -> VP = \cn -> - PosVG (PredTV (mkTransVerbPrep (verbPres avere) "bisogno"** {lock_TV = <>}) (IndefOneNP cn)) ; - --- the following are too low-level and should be provided by the resources - - injuredBody: AP -> NP -> CN -> S = \injured, patient, head -> - (PredVP patient - {s = \\g,v => pronRefl patient.n patient.p ++ - verbEssere.s ! v ++ - injured.s ! (AF g patient.n) ++ - (DefOneNP head).s ! case2pform accusative ; - lock_VP = <> - } ) ** {lock_S = <> }; - - partitNP : CN -> NP = \cn -> - let {np = DefOneNP cn} in {s = \\_ => np.s ! Aton genitive} ** np ; - - datAdv : NP -> AdV = \np -> - {s = np.s ! Aton dative; lock_AdV = <> } ; - -}; - - diff --git a/grammars/health/ExtraRus.gf b/grammars/health/ExtraRus.gf deleted file mode 100644 index 0db3c7616..000000000 --- a/grammars/health/ExtraRus.gf +++ /dev/null @@ -1,36 +0,0 @@ --- use this path to read the grammar from the same directory ---# -path=.:../../lib/resource-0.6/abstract:../../lib/prelude:../../lib/resource-0.6/russian - ---1 Functions that are not in the API, but common in Russian --- --- Aarne Ranta, Janna Khegai 2003 -resource ExtraRus = open PredicationRus, ResourceRus, ParadigmsRus, SyntaxRus in { - -flags coding=utf8 ; - -oper - predNeedShortAdjective: Bool -> NP -> NP -> S = \b, Jag, Dig -> { s = - let { - mne = Jag.s ! (mkPronForm Dat No NonPoss) ; - nuzhen = need.s ! AF Nom Inanimate (gNum (pgen2gen Dig.g) Dig.n) ; - doctor = Dig.s ! (mkPronForm Nom No NonPoss) ; - ne = negation b - } in - mne ++ ne ++ nuzhen ++ doctor ; - lock_S = <> - } ; - - U_predTransVerb : Bool -> TV -> NP -> NP -> S = - \b,Ser,Jag,Dig -> { s = - let { - menya = Jag.s ! (mkPronForm Gen Yes NonPoss) ; - bolit = Ser.s ! VFin (gNum (pgen2gen Dig.g) Dig.n) Dig.p ; - golova = Dig.s ! (mkPronForm Nom No NonPoss) ; - ne = negation b - } in - "у" ++ menya ++ ne ++ bolit ++ golova ; - lock_S = <> - } ; - - tvHave : TV = mkDirectVerb (extVerb have active present) ** { lock_TV = <>}; -}; diff --git a/grammars/health/ExtraSwe.gf b/grammars/health/ExtraSwe.gf deleted file mode 100644 index 91a3ca2ed..000000000 --- a/grammars/health/ExtraSwe.gf +++ /dev/null @@ -1,73 +0,0 @@ --- use this path to read the grammar from the same directory ---# -path=.:../../lib/resource-0.6/abstract:../../lib/prelude:../../lib/resource-0.6/swedish - ---1 Functions that are not in the API, but common in Swedish --- --- Aarne Ranta, Janna Khegai 2003 - -resource ExtraSwe = open PredicationSwe, ResourceSwe, Prelude, SyntaxSwe in { - -oper - patientNPCategory : Type = {s : NPForm => Str ; - g : Gender ; n : Number; p : Person }** {lock_NP : {}} ; - - mkPronPatient : ProPN -> patientNPCategory = \jag -> - {s = jag.s ; g = jag.h1 ; n = jag.h2 ; p = jag.h3; - lock_NP = <> - } ; - - nullDet : Det = { s = table {_ => table {_ => ""}} ; - n = Sg ; b = IndefP; lock_Det =<> } ; - - injuredBody: patientNPCategory -> CN -> S = - \Jag, head -> - let { - jag = Jag.s ! PNom ; - harSkadat = ["har skadat"] ; - mig = case Jag.p of - { - P1 => case Jag.n of - { Sg => "mig" ; - Pl => "oss" - } ; - P2 => case Jag.n of - { Sg => "dig" ; - Pl => "er" - } ; - P3 => "sig" - } ; - iBenet = "i" ++ (defNounPhrase Jag.n head).s ! PNom - } in - {s = table { - _ => jag ++ harSkadat ++ mig++ iBenet - }; - lock_S = <> - - } ; - - sFeber : Str -> Subst = \feb -> - {s = table { - SF Sg Indef Nom => feb + "er" ; - SF Sg Indef Gen => feb + "ers" ; - SF Sg Def Nom => feb + "ern" ; - SF Sg Def Gen => feb + "erns" ; - SF Pl Indef Nom => feb + "rar" ; - SF Pl Indef Gen => feb + "rars" ; - SF Pl Def Nom => feb + "rar" ; - SF Pl Def Gen => feb + "rars" - } ; - h1 = Utr - } ; - - verbTa = {s = table {VPres Infinit _ => "ta" ; VPres Indicat _ => "tar" ; VPres Imperat _ => "ta"}; s1 =""} ; - verbHa = {s = table {VPres Infinit _ => "ha" ; VPres Indicat _ => "har" ; VPres Imperat _ => "ha"}; s1 =""} ; - verbBehova = {s = table {VPres Infinit _ => "behöva" ; VPres Indicat _ => "behöver" ; VPres Imperat _ => - "behöv"}; s1 =""} ; - --- almost from Predication: --- predV2: TV -> patientNPCategory -> NP -> S = \F, x, y -> --- predVerbPhrase x ((predVerbGroup True) (complTransVerb F y)) ** { lock_S = <>} ; - -}; - - diff --git a/grammars/health/Health.gf b/grammars/health/Health.gf deleted file mode 100644 index 0ed0d941f..000000000 --- a/grammars/health/Health.gf +++ /dev/null @@ -1,101 +0,0 @@ -abstract Health = { - -cat - Specialization ; Patient ; BodyPart ; Symptom ; SymptomDegree ; Illness ; - Prop ; Condition ; Medicine ; - -fun - And : Prop -> Prop -> Prop ; - PainIn : Patient -> BodyPart -> Prop ; - Injured : Patient -> BodyPart -> Prop ; - Broken : Patient -> BodyPart -> Prop ; --- HaveIllness : Patient -> Illness -> Prop ; - HaveAsthma : Patient -> Prop ; - HaveHeartburn : Patient -> Prop ; - HaveInfluenza : Patient -> Prop ; - HaveRheumatism : Patient -> Prop ; - HaveCystitis : Patient -> Prop ; - HaveAsthma : Patient -> Prop ; - HaveArthritis : Patient -> Prop ; - HaveDiabetes : Patient -> Prop ; - HaveTonsillitis : Patient -> Prop ; - HaveConstipation : Patient -> Prop ; - HaveMalaria : Patient -> Prop ; - HaveDiarrhea : Patient -> Prop ; - HaveSkinAllergy : Patient -> Prop ; - NeedDoctor : Patient -> Specialization -> Prop ; - NeedMedicine : Patient -> Medicine -> Prop ; - TakeMedicine : Patient -> Medicine -> Prop ; - - CatchCold : Condition ; - Pregnant : Condition ; - BeInCondition : Patient -> Condition -> Prop ; - Complain : Patient -> Symptom -> Prop ; - - ShePatient : Patient ; - HePatient : Patient ; - WePatient : Patient ; - TheyPatient : Patient ; - IPatientHe : Patient ; - IPatientShe : Patient ; - --- Influenza : Illness ; --- Malaria : Illness ; --- Diarrhea : Illness ; --- SkinAllergy : Illness ; --- Heartburn : Illness ; --- Rheumatism : Illness ; --- Cystitis : Illness ; --- Asthma : Illness ; --- Arthritis : Illness ; --- Diabetes : Illness ; --- Tonsillitis : Illness ; --- Constipation : Illness ; - - Dentist : Specialization ; - Gynecologist : Specialization ; - Urologist: Specialization ; - Pediatrician : Specialization ; - Physician :Specialization ; - Dermatologist :Specialization ; - Cardiologist : Specialization ; - Neuropathologist : Specialization ; - Ophthalmologist : Specialization ; - Surgeon : Specialization ; - - SleepingPeels : Medicine ; - Sedative : Medicine ; - Vitamins : Medicine ; - EyeDrops : Medicine ; - Antibiotics : Medicine ; - Viagra : Medicine ; - Laxative : Medicine ; - Insulin : Medicine ; - Antidepressant : Medicine ; - PainKiller : Medicine ; - - Head : BodyPart ; - Leg : BodyPart ; - Stomac : BodyPart ; - Throat : BodyPart ; - Ear : BodyPart ; - Chest : BodyPart ; - Foot : BodyPart ; - Arm : BodyPart ; - Back : BodyPart ; - Shoulder : BodyPart ; --- Tooth : BodyPart ; --- Knee : BodyPart ; - - - Fever : Symptom ; --- Sickness: Symptom ; --- PainInMod : Patient -> BodyPart -> SymptomDegree -> Prop ; --- SymptomMod : SymptomDegree -> Symptom -> Symtom; --- High : SymptomDegree ; --- Low : SymptomDegree ; --- Terrible : SymptomDegree ; --- BloodPressure : Symptom ; - - -} ; diff --git a/grammars/health/HealthEng.gf b/grammars/health/HealthEng.gf deleted file mode 100644 index 73341879e..000000000 --- a/grammars/health/HealthEng.gf +++ /dev/null @@ -1,125 +0,0 @@ --- use this path to read the grammar from the same directory ---# -path=.:../../lib/resource-0.6/abstract:../prelude:../../lib/resource-0.6/english -concrete HealthEng of Health = open PredicationEng, -StructuralEng, ---ResourceEng, -ResourceExtEng, Prelude, Predef, SyntaxEng, ExtraEng, ParadigmsEng in { - -flags - startcat=Phr ; lexer=text ; parser=chart ; unlexer=text ; - -lincat - Patient = NP ; - -- CN is not enough, because of the different form of the "head" body part - -- expression in "I have a headache" and "I have injured my head": - BodyPart = BodyCNCategory ; - Symptom = NP ; - SymptomDegree = AP ; - Prop = S ; - Illness = CN ; - Condition = VP ; - Specialization = CN ; - Medicine = NP ; - -lin - ShePatient = SheNP ; - TheyPatient = TheyNP ; - IPatientHe = INP ; - IPatientShe = INP ; - HePatient = HeNP ; - WePatient = WeNP ; - - And x y = ConjS AndConj (TwoS x y) ; - --- Influenza = cnNonhuman "influenza" ; --- Malaria = cnNonhuman "malaria" ; --- Diarrhea = cnNonhuman "diarrhea" ; --- SkinAllergy = AppFun (mkFun (nNonhuman "skin") []) (MassNP (cnNonhuman "allergy")) ; --- Heartburn = cnNonhuman "heartburn" ; --- Rheumatism = cnNonhuman "rheumatism" ; --- Cystitis = cnNonhuman "cystitis" ; --- Asthma = cnNonhuman "asthma" ; --- Arthritis = cnNonhuman "arthritis" ; --- Diabetes = cnNonhuman "diabetes" ; --- Tonsillitis = cnNonhuman "tonsillitis" ; --- Constipation = cnNonhuman "constipation" ; - - Dentist = cnHuman "dentist" ; - Gynecologist = cnHuman "gynecologist" ; - Urologist = cnHuman "urologist" ; - Pediatrician = cnHuman "pediatrician" ; - Physician = cnHuman "physician" ; - Dermatologist = cnHuman "dermatologist" ; - Cardiologist = cnHuman "cardiologist" ; - Neuropathologist = cnHuman "neuropathologist" ; - Ophthalmologist = cnHuman "ophthalmologist" ; - Surgeon = cnHuman "surgeon" ; - - SleepingPeels = IndefManyNP (ModAdj (apReg "sleeping") (cnNonhuman "peel")); - Vitamins = IndefManyNP (cnNonhuman "vitamin") ; - EyeDrops = IndefManyNP (cnNonhuman "eye-drop") ; - Antibiotics = IndefManyNP (cnNonhuman "antibiotic") ; - Sedative = IndefOneNP (cnNonhuman "sedative") ; - Viagra = MassNP (cnNonhuman "viagra") ; - Laxative = IndefOneNP (cnNonhuman "laxative") ; - Insulin = MassNP (cnNonhuman "insulin"); - Antidepressant = IndefOneNP (cnNonhuman "antidepressant") ; - PainKiller = IndefOneNP (cnNonhuman "painkiller") ; - - Leg = { s = \\_,n,_ => case n of {Sg =>"leg" ; Pl=> "legs" }; - painInType = True } ; - Head = { s = table{ True => table {Sg => table {_ => "head" }; - Pl => table {_ => "heads" }}; - False => table { _ => table {_=> "headache"}}} ; - painInType = False } ; - Stomac = { s = table{ True => table {Sg => table {_ => "stomach" }; - Pl => table {_ => "stomachs" }}; - False => table { _ => table {_=> "stomach-ache"}}} ; - painInType = False } ; --- Tooth = { s = table{ True => table {Sg => table {_ => "tooth" }; --- Pl => table {_ => "teeth" }}; --- False => table { _ => table {_=> "toothache"}}} ; --- painInType = False } ; - Throat = { s = table{ True => table {Sg => table {_ => "throat" }; - Pl => table {_ => "throats" }}; - False => table { _ => table {_=> ["sore throat"]}}} ; - painInType = False } ; - Ear = { s = \\_,n,_ => case n of {Sg =>"ear" ; Pl=> "ears" }; painInType = True } ; - Chest = { s = \\_,n,_ => case n of {Sg =>"chest" ; Pl=> "chests" }; painInType = True } ; - Foot = { s = \\_,n,_ => case n of {Sg =>"foot" ; Pl=> "feet" }; painInType = True } ; - Arm = { s = \\_,n,_ => case n of {Sg =>"arm" ; Pl=> "arms" }; painInType = True } ; - Back = { s = \\_,n,_ => case n of {Sg =>"back" ; Pl=> "backs" }; painInType = True } ; - Shoulder = { s = \\_,n,_ => case n of {Sg =>"shoulder" ; Pl=> "shoulders" }; painInType = True } ; --- Knee = { s = \\_,n,_ => case n of {Sg =>"knee" ; Pl=> "knees" }; painInType = True } ; - - BeInCondition = PredVP ; - Pregnant = PosVG ( PredAP( AdjP1 (regAdjective ["pregnant"] ** {lock_Adj1 = <>}))) ; - CatchCold = PosVG (PredTV (tvHave** {lock_TV = <>}) (DetNP (aDet** {lock_Det = <>}) (cnNoHum (nounReg "cold")** {lock_CN = <>}))); - - Fever = DetNP (aDet** {lock_Det = <>}) (cnNoHum (nounReg "fever")** {lock_CN = <>}) ; - --- HaveIllness patient illness = predV2 tvHave patient (DetNP (nullDet** {lock_Det = <>}) illness) ; - HaveAsthma patient = predV2 tvHave patient (DetNP (nullDet** {lock_Det = <>}) (cnNonhuman "asthma")) ; - Complain = predV2 tvHave ; - - NeedDoctor patient doctor = predV2 (mkTransVerbDir (regVerbP3 "need")**{lock_TV = <>}) - patient (DetNP (aDet ** {lock_Det = <>}) doctor); - NeedMedicine = predV2 (mkTransVerbDir (regVerbP3 "need")**{lock_TV = <>}) ; - TakeMedicine = predV2 (mkTransVerbDir (regVerbP3 "take")**{lock_TV = <>}) ; - - Injured = injuredBody (mkTransVerb verbP3Have "injured"**{lock_TV = <>}) ; - Broken = injuredBody (mkTransVerb verbP3Have "broken"**{lock_TV = <>}) ; - - PainIn = painInPatientsBody (cnNoHum (nounReg "pain")**{lock_CN = <>}) ; - --- PainInMod = painInPatientsBodyMode (cnNoHum (nounReg "pain")**{lock_CN = <>}); --- SymptomMod degree symptom = DetNP (aDet** {lock_Det = <>}) --- (ModAdj degree (symptom ** {lock_CN = <>})) ; --- High = AdjP1 ((regAdjective "high") ** {lock_Adj1 = <>}); --- Low = AdjP1 ((regAdjective "low") ** {lock_Adj1 = <>}); --- Terrible = AdjP1 ((regAdjective "terrible")** {lock_Adj1 = <>}); -}; - - - - diff --git a/grammars/health/HealthFre.gf b/grammars/health/HealthFre.gf deleted file mode 100644 index cb83a973b..000000000 --- a/grammars/health/HealthFre.gf +++ /dev/null @@ -1,132 +0,0 @@ --- UTF-8 version currently differs from non-UTF-8 !!! - --- use this path to read the grammar from the same directory ---# -path=.:../../lib/resource-0.6/abstract:../../lib/prelude:../../lib/resource-0.6/french:../../lib/resource-0.6/romance - -concrete HealthFre of Health = open PredicationFre, ParadigmsFre, ResourceFre, Prelude, SyntaxFre, MorphoFre, ExtraFre, ParadigmsFre, ResourceExtFre in { - --- 1. still using "à" instead of "aux" in PainIn operations --- because of the UTF-8 problem with non-utf-8 resource grammars! - -flags - startcat=Phr ; lexer=text ; parser=chart ; unlexer=text ; - -lincat - Patient = NP ; - BodyPart = CN ; - Symptom = NP ; - SymptomDegree = AP ; - Prop = S ; - Illness = NP ; - Condition = VP ; - Specialization = CN ; - Medicine = NPMedicine ; - -lin - And x y = ConjS AndConj (TwoS x y) ; - - ShePatient = SheNP ; - TheyPatient = TheyNP ; - IPatientHe = INP ; - IPatientShe = INP ; - HePatient = HeNP ; - WePatient = WeNP ; - - HaveIllness = predV2 (tvDir vAvoir) ; - Complain = predV2 (tvDir vAvoir) ; - - BeInCondition = PredVP ; - CatchCold = PosVG (PredTV (tvDir vAvoir) (IndefOneNP (mkCNomReg "rhume" Masc ** {lock_CN = <> }))); - Pregnant = PosVG (PredAP (mkAdjective (adjJeune "enceinte") adjPost** {lock_AP = <> })) ; - - Influenza = DefOneNP (mkCN (nReg "grippe" Fem)); - Malaria = DefOneNP (mkCN (nReg "malaria" Fem)); - Diarrhea = IndefOneNP (mkCN (nReg "diarrhée" Fem)) ; - Constipation = IndefOneNP (mkCN (nReg "constipation" Fem)); - Rheumatism = DetNP desDet (mkCN (nReg "rhumatisme" Masc)) ; - Arthritis = DetNP delDet (mkCN (nReg "arthrite" Fem)) ; - SkinAllergy =IndefOneNP ( ModAdj - (AdjP1 (adj1Reg "épidermique" postpos)) - (mkCN (nReg "allergie" Fem)) - ); - Heartburn = DetNP desDet (AppFun (funCase (nReg "brûlure" Fem) Gen) - (DetNP nullDet (mkCN (nReg "estomac" Masc)))) ; - Tonsillitis = IndefOneNP (mkCN (nReg "angine" Fem)) ; - Asthma = DetNP delDet (mkCN (nReg "asthme" Masc)) ; - Cystitis =IndefOneNP ( mkCN (nReg "cystite" Fem)) ; - Diabetes = DefOneNP (mkCN (nReg "diabète" Masc)) ; - - Dentist = mkCN (nReg "dentiste" Masc) ; - Gynecologist = mkCN (nReg "gynécologue" Masc) ; - Urologist = mkCN (nReg "urologue" Masc) ; - Pediatrician = mkCN (nReg "pédiatre" Masc) ; - Physician = mkCN (nReg "thérapeute" Masc) ; - Dermatologist = mkCN (nReg "dermatologue" Masc) ; - Cardiologist = mkCN (nReg "cardiologue" Masc) ; - Neuropathologist = mkCN (nReg "neurologue" Masc) ; - Ophthalmologist = mkCN (nReg "ophthalmologue" Masc) ; - Surgeon = mkCN (nReg "chirurgien" Masc ) ; - - SleepingPeels = DetNP desDet (mkCN (nReg "somnifêre" Masc ))**{des = True}; - Vitamins = DetNP desDet (mkCN (nReg "vitamine" Fem))**{des = True} ; - EyeDrops = DetNP desDet (AppFun (funPrep (nReg "goutte" Fem) "pour") - (DefManyNP (mkCN (mkN "oeil" "yeux" Masc))))**{des = True} ; - Antibiotics = DetNP desDet (mkCN (nReg "antibiotique" Masc))**{des = True} ; - Insulin = DetNP delDet (mkCN (nReg "insuline" Fem))**{des = True}; - - Viagra = DetNP nullDet (mkCN(nReg "viagra" Fem))**{des = False} ; - Laxative = IndefOneNP (mkCN (nReg "laxatif" Masc)) **{des = False}; - Sedative = IndefOneNP (mkCN (nReg "sédatif" Masc)) **{des = False}; - Antidepressant = IndefOneNP (mkCN (nReg "antidépressif" Masc)) **{des = False}; - PainKiller = IndefOneNP (mkCN (nReg "calmant" Masc)) **{des = False}; - - NeedDoctor patient doctor = PredVP patient (avoirBesoin1 doctor ** {lock_VP = <> }) ; - NeedMedicine patient medicine = PredVP patient (avoirBesoin medicine ** {lock_VP = <> }) ; - TakeMedicine = predV2 (mkTransVerbDir (verbPres (conj3prendre "prendre")) ** {lock_TV = <> } ) ; - - Fever = DetNP delDet (mkCN (nReg "fièvre" Fem)) ; - - PainIn patient head = predV2 (tvDir vAvoir) patient - (DetNP nullDet - ( - AppFun - ((mkCN (nReg "mal" Masc))** complementCas Dat ** {lock_Fun = <> }) - (defNounPhrase patient.n head ** {lock_NP = <>}) - ) - ) ; - - Injured = injuredBody (adjReg "blessé") ; - Broken = injuredBody (adjReg "cassé") ; - - - Head = mkCNomReg "tête" Fem ** {lock_CN = <> }; - Leg = mkCNomReg "jambe" Fem ** {lock_CN = <> }; - Stomac = mkCNomReg "estomac" Masc ** {lock_CN = <> }; - Throat = mkCNomReg "gorge" Fem ** {lock_CN = <> }; - Ear = mkCNomReg "oreille" Fem ** {lock_CN = <> }; - Chest = mkCNomReg "poitrine" Fem ** {lock_CN = <> }; - Foot = mkCNomReg "pied" Masc ** {lock_CN = <> }; - Arm = mkCNomReg "bras" Masc ** {lock_CN = <> }; - Back = mkCNomReg "dos" Masc ** {lock_CN = <> }; - Shoulder = mkCNomReg "epaule" Fem ** {lock_CN = <> }; --- Tooth = mkCNomReg "dents" Masc ** {lock_CN = <> }; --- Knee = mkCNomReg "genou" Masc ** {lock_CN = <> }; - - - --- High = AdjP1 (mkAdjReg "élevé" adjPost ** {lock_Adj1 = <> }) ; --- Terrible = AdjP1 ((mkAdjective (mkAdj "terrible" "terrible" "terrible" "terrible") adjPre ** {lock_Adj1 = <> })** {lock_AP = <> }); --- FeverMod degree = DetNP (delDet ** {lock_Det = <> }) (ModAdj degree (mkCNomReg "fièvre" Fem** {lock_CN = <> })) ; --- PainInMod patient head degree = predV2 (tvDir vAvoir) patient --- (DetNP (nullDet ** {lock_Det = <> }) --- ( ModAdj degree --- ( --- AppFun ((mkCNomReg "mal" Masc ** {lock_CN = <> })** complementCas Dat** {lock_Fun = <> }) --- (defNounPhrase patient.n head ** {lock_NP = <> }) --- ) --- ) --- ) ; - - -}; - diff --git a/grammars/health/HealthResourceIta.gf b/grammars/health/HealthResourceIta.gf deleted file mode 100644 index fd750659f..000000000 --- a/grammars/health/HealthResourceIta.gf +++ /dev/null @@ -1,65 +0,0 @@ --- use this path to read the grammar from the same directory ---# -path=.:../../lib/resource-0.6/abstract:../../lib/prelude:../../lib/resource-0.6/italian:../../lib/resource-0.6/romance - -concrete HealthIta of Health = open ResourceIta, Prelude, SyntaxIta, ExtraIta, MorphoIta, ParadigmsIta, ResourceExtIta, PredicationIta in { - -flags - startcat=Phr ; lexer=text ; parser=chart ; unlexer=text ; -lincat - Patient = NP ; - BodyPart = CN ; - Symptom = NP ; - SymptomDegree = AP ; - Prop = S ; - Illness = CN ; - Condition = VP ; - Specialization = CN ; - Medicine = CN ; - -lin - ShePatient = SheNP ; - TheyPatient = TheyNP ; - IPatientHe = INP ; - - Influenza = mkCN (nRana "influenza") ; - Malaria = mkCN (nRana "malaria") ; - HaveIllness patient illness = predV2 (tvDir vAvere) patient (DefOneNP -illness) ; - - BeInCondition = PredVP ; - CatchCold = PosTV (tvDir vAvere) (IndefOneNP (mkCN (nSale "raffreddore" masculine))) ; - Pregnant = PosA (apSolo "gravido" postpos) ; - Complain = predV2 (tvDir vAvere) ; - - PainIn pat loc = - PredVP pat (AdvVP (PosV (averCosa "male")) (datAdv (DefOneNP loc))) ; - - Fever = partitNP (mkCN (nSale "febbre" feminine)) ; - Head = mkCN (nRana "testa") ; - Leg = mkCN (nRana "gamba") ; - - Dentist = mkCN (mkN "dentista" "dentisti" masculine) ; - PainKiller = mkCN (nSale "calmante" masculine) ; - NeedDoctor pat doc = PredVP pat (averBisogno doc) ; - NeedMedicine pat med = PredVP pat (averBisogno med) ; - TakeMedicine pat med = predV2 (tvDir (vCorrere "prendere" "")) pat (IndefOneNP med) ; - - Injured = injuredBody (apSolo "ferito" prepos) ; - Broken = injuredBody (apSolo "rotto" prepos) ; - - And = conjS ; - --- FeverMod deg = partitNP (ModAdj deg (mkCN (nSale "febbre" feminine))); --- High = apSolo "alto" postpos ; --- Terrible = apTale "terribile" postpos ; --- PainInMod pat loc deg = --- PredVP pat --- (AdvVP (PosTV (tvDir vAvere) --- (IndefOneNP (ModAdj deg (mkCN (nSale "dolore" masculine))))) --- (datAdv (DefOneNP loc))) ; - - -}; - - - diff --git a/grammars/health/HealthRus.gf b/grammars/health/HealthRus.gf deleted file mode 100644 index 1fae90cb0..000000000 --- a/grammars/health/HealthRus.gf +++ /dev/null @@ -1,111 +0,0 @@ --- use this path to read the grammar from the same directory ---# -path=.:../../lib/resource-0.6/abstract:../../lib/prelude:../../lib/resource-0.6/russian - -concrete HealthRus of Health = open PredicationRus, ResourceRus, SyntaxRus, ExtraRus, ResourceExtRus, ParadigmsRus in { - -flags - coding=utf8 ; - startcat=Phr ; lexer=text ; parser=chart ; unlexer=text ; - -lincat - Patient = NP ; - BodyPart = CN ; - Symptom = NP ; - SymptomDegree = AP ; - Prop = S ; - Illness = CN ; - Condition = VP ; - Specialization = NP ; - Medicine = NP ; -lin - And x y = ConjS AndConj (TwoS x y) ; - - ShePatient = SheNP ; - TheyPatient = TheyNP ; - IPatientHe = { s = INP.s ; g = PGen Masc; anim = INP.anim ; - n = INP.n ; nComp = INP.nComp ; p = INP.p ; pron = INP.pron; lock_NP = <>} ; - IPatientShe = { s = INP.s ; g = PGen Fem; anim = INP.anim ; - n = INP.n ; nComp = INP.nComp ; p = INP.p ; pron = INP.pron; lock_NP = <>} ; - HePatient = HeNP ; - WePatient = WeNP ; - - --- Influenza = UseN ( gripp**{lock_N = <>}) ; --- Malaria = UseN ( malaria**{lock_N = <>}) ; --- Diarrhea = UseN ( ponos **{lock_N = <>}); --- SkinAllergy = ModAdj (AdjP1(adj1Staruyj "кожн")) (UseN ( allergiya **{lock_N = <>})); --- Heartburn = UseN ( izzhoga **{lock_N = <>}); --- Rheumatism = UseN ( revmatizm **{lock_N = <>}); --- Cystitis = UseN ( tsistit **{lock_N = <>}); --- Asthma = UseN ( astma **{lock_N = <>}); --- Arthritis = UseN ( artrit **{lock_N = <>}); --- Diabetes = UseN ( diabet **{lock_N = <>}); --- Tonsillitis = UseN ( angina **{lock_N = <>}); --- Constipation = UseN ( zapor **{lock_N = <>}); - - Dentist = IndefOneNP ( UseN ( stomatolog**{lock_N = <>})) ; - Gynecologist = IndefOneNP (UseN ( ginekolog**{lock_N = <>})) ; - Urologist = IndefOneNP (UseN ( urolog**{lock_N = <>})) ; - Pediatrician = IndefOneNP (UseN ( pediatr**{lock_N = <>})) ; - Physician = IndefOneNP (UseN ( terapevt**{lock_N = <>})) ; - Dermatologist = IndefOneNP (UseN ( dermatolog**{lock_N = <>})) ; - Cardiologist = IndefOneNP (UseN ( kardiolog**{lock_N = <>})) ; - Neuropathologist = IndefOneNP (UseN ( nevropatolog**{lock_N = <>})) ; - Ophthalmologist = IndefOneNP (UseN ( okulist**{lock_N = <>})) ; - Surgeon = IndefOneNP (UseN ( khirurg**{lock_N = <>})) ; - - SleepingPeels = IndefOneNP (UseN ( snotvornoe**{lock_N = <>})); - Sedative = IndefOneNP (UseN ( uspokoitelnoe**{lock_N = <>})); - Vitamins = IndefManyNP (UseN ( vitamin**{lock_N = <>})); - EyeDrops = IndefManyNP (ModAdj (AdjP1 (glaznoj**{lock_Adj1 = <>})) (UseN ( kaplya**{lock_N = <>}))); - Antibiotics = IndefManyNP (UseN ( antibiotik**{lock_N = <>})); - Viagra = IndefOneNP (UseN ( viagra**{lock_N = <>})); - Laxative = IndefOneNP (UseN ( slabitelnoe**{lock_N = <>})); - Insulin = MassNP (UseN (insulin**{lock_N = <>})); - Antidepressant = IndefOneNP (UseN ( antidepressant**{lock_N = <>})); - PainKiller = IndefOneNP (UseN ( obezbolivauchee**{lock_N = <>})); - - Fever = mkNounPhrase singular (UseN ( temperatura**{lock_N = <>}))** {lock_NP = <>}; - BeInCondition = PredVP ; - CatchCold = PosVG (PredAP (AdjP1 (prostuzhen ** {lock_Adj1 = <>}))) ; - Pregnant = PosVG (PredAP (AdjP1 (beremenen ** {lock_Adj1 = <>}))) ; - - TakeMedicine = predV2 (mkDirectVerb - (extVerb verbPrinimat active present)**{lock_TV = <>}) ; - Injured patient painkiller = predV2 (mkDirectVerb - (extVerb verbPoranit active past)**{lock_TV = <>}) patient (mkNounPhrase patient.n painkiller ** {lock_NP = <>}) ; - Broken patient painkiller = predV2 (mkDirectVerb - (extVerb verbSlomat active past)**{lock_TV = <>}) patient (mkNounPhrase patient.n painkiller ** {lock_NP = <>}) ; - --- HaveIllness patient symptom = U_predTransVerb true tvHave --- patient (mkNounPhrase singular symptom ** {lock_NP = <>}) ; - Complain = U_predTransVerb true tvHave ; - - NeedDoctor = predNeedShortAdjective true ; - NeedMedicine = predNeedShortAdjective true ; - - PainIn patient head = U_predTransVerb true (mkDirectVerb - (extVerb verbBolet_2 active present ) ** {lock_TV =<>}) patient (mkNounPhrase patient.n head ** {lock_NP =<>}) ; - - Head = UseN ( golova**{lock_N = <>}); - Leg = UseN ( noga**{lock_N = <>}); - Stomac = UseN ( zhivot**{lock_N = <>}); - Throat = UseN ( gorlo**{lock_N = <>}); - Ear = UseN ( ukho**{lock_N = <>}); - Chest = UseN ( grud**{lock_N = <>}); - Foot = UseN ( stopa**{lock_N = <>}); - Arm = UseN ( ruka**{lock_N = <>}); - Back = UseN ( spina**{lock_N = <>}); - Shoulder = UseN ( plecho**{lock_N = <>}); --- Knee = UseN ( koleno**{lock_N = <>}); - --- High = AdjP1 (extAdjective vusokij ** {lock_Adj1 = <>}); --- Terrible = AdjP1 (extAdjective uzhasnuj ** {lock_Adj1 = <>}); --- FeverMod degree = mkNounPhrase singular --- (ModAdj degree (UseN ( temperatura**{lock_N = <>}))) ** {lock_NP = <>}; --- PainInMod patient head degree = U_predTransVerb true (mkDirectVerb --- (extVerb have Act Present) ** {lock_TV =<>}) patient --- (mkNounPhrase singular (ModAdj degree ---(AppFun (mkFun bol "в" Prepos ** {lock_Fun = <>}) --- (mkNounPhrase patient.n head** {lock_NP = <>}))) ** {lock_NP =<>}); -}; diff --git a/grammars/health/HealthSwe.gf b/grammars/health/HealthSwe.gf deleted file mode 100644 index 0c3a369ef..000000000 --- a/grammars/health/HealthSwe.gf +++ /dev/null @@ -1,129 +0,0 @@ --- The UTF8 version currently differs from the non-UTF8 !!! - --- The difference with the UTF8 version is that --- operations "verbVara" (vbVara see ExtraSweU.gf) --- and "predAP" (predAP, see ExtraSweU.gf) need to be replaced --- using the UTF8 encoding (because of the UTF8 problem --- with UTF8 resource grammars) - --- use this path to read the grammar from the same directory - ---# -path=.:../../lib/resource-0.6/abstract:../../lib/prelude:../../lib/resource-0.6/swedish -concrete HealthSwe of Health = open PredicationSwe, ResourceSwe, Prelude, SyntaxSwe, ExtraSwe, ParadigmsSwe, ResourceExtSwe in { - -flags - startcat=Phr ; lexer=text ; parser=chart ; unlexer=text ; - -lincat - Patient = patientNPCategory ; - BodyPart = CN ; - Symptom = NP ; - SymptomDegree = AP ; - Prop = S ; - Illness = CN ; - Condition = VP ; - Specialization = CN ; - Medicine = NP ; - -lin - And x y = ConjS AndConj (TwoS x y) ; - - ShePatient = mkPronPatient hon_35 ; - TheyPatient = mkPronPatient de_38 ; - IPatientHe = mkPronPatient jag_32 ; - IPatientShe = mkPronPatient jag_32 ; - HePatient = mkPronPatient han_34 ; - WePatient = mkPronPatient vi_36 ; - - Influenza = UseN (nApa "influens") ; - Malaria = UseN (nApa "malari"); - Diarrhea = UseN (nApa "diarré"); - SkinAllergy = UseN (nApa "hudallergi"); - Heartburn = UseN (nApa "halsbränna"); - Rheumatism = UseN (nBil "reumatism"); - Cystitis = UseN (nRisk "urinvägsinfektion"); - Asthma = UseN (nApa "astma"); - Arthritis = UseN (nApa "artrit"); - Diabetes = UseN (nBil "diabetes"); - Tonsillitis = UseN (nBil "halsfluss"); - Constipation = UseN (nBil "förstoppning"); - - Dentist = UseN (nKikare "tandläkare") ; - Gynecologist = UseN (nRisk "gynekolog"); - Urologist= UseN (nRisk "urolog"); - Pediatrician = UseN (nKikare "barnläkare"); - Physician = UseN (nKikare "läkare"); - Dermatologist = UseN (nKikare "hudläkare"); - Cardiologist = UseN (nRisk "kardiolog"); - Neuropathologist = UseN (nRisk "neurolog"); - Ophthalmologist = UseN (nKikare "ögönläkare"); - Surgeon = UseN (nRisk "kirurg"); - - SleepingPeels = IndefManyNP (UseN (nRisk "sömntablett")) ; - Sedative = IndefOneNP (UseN (nPapper "lugnande")) ; - Vitamins = IndefManyNP (UseN (nPapper "vitaminpiller")) ; - EyeDrops = IndefManyNP (UseN (nPojke "ögondroppe")) ; - Antibiotics = IndefManyNP (UseN (nPapper "antibiotika")) ; - Viagra = MassNP (UseN (nBil "viagra")) ; - Laxative = IndefOneNP (UseN (nPapper "laxer")) ; - Insulin = MassNP (UseN (nRep "insulin")) ; - Antidepressant = IndefOneNP ( ModAdj (AdjP1 (adjReg "antidepressiv")) (UseN (nRep "läkemedel"))) ; - PainKiller = IndefOneNP (UseN (nBil "smärtstillande")) ; - - CatchCold = PosVG ( PredAP( AdjP1 (extAdjective (aGrund("förkyl")) ** {lock_Adj1 = <>}) )); - Pregnant = PosVG ( PredAP( AdjP1 (extAdjective (aGrund("gravi") )** {lock_Adj1 = <>}) )); - - BeInCondition = PredVP ; - HaveIllness patient illness = predV2 (mkDirectVerb verbHa** {lock_TV =<>}) patient - (DetNP (nullDet ** {lock_Det = <>}) illness) ; - - NeedMedicine = predV2 (mkDirectVerb verbBehova** {lock_TV =<>}) ; - TakeMedicine = predV2 (mkDirectVerb verbTa** {lock_TV =<>}) ; - - NeedDoctor patient illness = predV2 (mkDirectVerb verbBehova** {lock_TV =<>}) patient - (DetNP (enDet ** {lock_Det = <>}) illness) ; - Fever = DetNP (nullDet ** {lock_Det = <>}) (UseN (nRisk "feber")) ; - - Complain = predV2 (mkDirectVerb verbHa ** {lock_TV =<>}) ; - Broken patient head = predV2 (mkTransVerb verbHa "brutit" ** {lock_TV =<>} ) patient - (defNounPhrase patient.n head ** {lock_NP =<>}) ; - - PainIn patient head = predV2 (mkDirectVerb verbHa** {lock_TV =<>}) patient - ( - DetNP (nullDet ** {lock_Det = <>}) - ( AppFun - ((mkFun (nBil "ont") "i") ** {lock_Fun = <>}) - ((defNounPhrase patient.n head)** {lock_NP = <>}) - ) - ) ; - - Head = UseN (nRep "huvud") ; - Leg = UseN (nRep "ben") ; - Stomac = UseN (nPojke "mage") ; - Throat = UseN (nBil "hals") ; - Ear = UseN (mkN "öra" "örat" "öron" "öronen" neutrum nonmasculine) ; - Chest = UseN (nRep "bröst") ; - Foot = UseN (mkN "fot" "foten" "fötter" "fötterna" utrum nonmasculine) ; - Arm = UseN (mkN "hand" "handen" "händer" "händerna" utrum nonmasculine) ; - Back = UseN (nBil "rygg") ; - Shoulder = UseN (nNyckel "axel") ; - --- High = AdjP1 (adjReg "hög") ; --- Terrible = AdjP1 (adjReg "hemsk") ; --- FeverMod degree = DetNP (nullDet ** {lock_Det = <>}) (ModAdj degree (UseN (nKikare "feb") ) ; --- PainInMod patient head degree = predV2 (mkDirectVerb verbHa** {lock_TV =<>}) patient --- ( --- DetNP (nullDet ** {lock_Det = <>}) --- ( modCommNounPhrase degree --- ( AppFun --- ((mkFun (extCommNoun nonmasculine (sBil "ont")) "i") ** {lock_Fun = <>}) --- ((defNounPhrase patient.n head)** {lock_NP = <>}) --- ) ** {lock_CN = <>} --- ) --- ) ; - - Injured = injuredBody ; - -}; - - diff --git a/grammars/health/healthCorpus.txt b/grammars/health/healthCorpus.txt deleted file mode 100644 index e5119e18a..000000000 --- a/grammars/health/healthCorpus.txt +++ /dev/null @@ -1,47 +0,0 @@ -and pain in injured broken have take catch cold pregnant - -influenza malaria diarrhea skin allergy heartburn -rheumatism cystitis asthma arthritis diabetes tonsillitis constipation - - dentist gynecologist Urologist - Pediatrician - Physician - Dermatologist - Cardiologist - Neuropathologist - Ophthalmologist - Surgeon - - Sleeping Peels - Sedative - Vitamins - Eye Drops - Antibiotics - Viagra - Laxative - Insulin - Antidepressant - PainKiller - - Head headache - Leg - Stomach stomach-ache - Throat sore - Ear - Chest - Foot - Arm - Back - Shoulder --- Tooth --- Knee - - --- Fever --- Sickness --- High --- Low --- Terrible --- Blood Pressure - - diff --git a/grammars/ljung/fin_dep_types/Findep.gf b/grammars/ljung/fin_dep_types/Findep.gf deleted file mode 100644 index 3fb3d6385..000000000 --- a/grammars/ljung/fin_dep_types/Findep.gf +++ /dev/null @@ -1,53 +0,0 @@ - -concrete Findep of FindepAbs = { - -flags conversion = finite; - -lin - -Sg = {s = "SINGULAR"}; --- Pl = {s = "PLURAL"}; - -s n g b x y = {s = x.s ++ y.s}; -np n g b x y = {s = x.s ++ y.s}; -vpt n g b x y = {s = x.s ++ y.s}; -vpi x = {s = x.s}; - -npBest n g x = {s = x.s}; -npPl g b x = {s = x.s}; - -en = {s = "en"}; -ett = {s = "ett"}; -den = {s = "den"}; -det = {s = "det"}; - -ingen = {s = "ingen"}; -inget = {s = "inget"}; -inga g = {s = "inga"}; - -alla g = {s = "alla"}; -de g = {s = "de"}; - -katt = {s = "katt"}; -katter = {s = "katter"}; -katten = {s = "katten"}; -katterna = {s = "katterna"}; - -hund = {s = "hund"}; -hundar = {s = "hundar"}; -hunden = {s = "hunden"}; -hundarna = {s = "hundarna"}; - -barn n = {s = "barn"}; -barnet = {s = "barnet"}; -barnen = {s = "barnen"}; - -djur n = {s = "djur"}; -djuret = {s = "djuret"}; -djuren = {s = "djuren"}; - -jagar = {s = "jagar"}; -sover = {s = "sover"}; - -} - diff --git a/grammars/ljung/fin_dep_types/FindepAbs.gf b/grammars/ljung/fin_dep_types/FindepAbs.gf deleted file mode 100644 index a1931ade8..000000000 --- a/grammars/ljung/fin_dep_types/FindepAbs.gf +++ /dev/null @@ -1,57 +0,0 @@ - -abstract FindepAbs = { - -cat -Num; Gen; Def; -S; V; VP; -D Num Gen Def; N Num Gen Def; NP Num Gen Def; - -fun - -Sg, Pl : Num; -Best, OBest : Def; -Utr, Neu : Gen; - -s : (n:Num) -> (g:Gen) -> (b:Def) -> NP n g b -> VP -> S; -np : (n:Num) -> (g:Gen) -> (b:Def) -> D n g b -> N n g b -> NP n g b; -vpt : (n:Num) -> (g:Gen) -> (b:Def) -> V -> NP n g b -> VP; -vpi : V -> VP; - -npBest : (n:Num) -> (g:Gen) -> N n g Best -> NP n g Best; -npPl : (g:Gen) -> (b:Def) -> N Pl g b -> NP Pl g b; - -en : D Sg Utr OBest; -ett : D Sg Neu OBest; -den : D Sg Utr Best; -det : D Sg Neu Best; - -ingen : D Sg Utr OBest; -inget : D Sg Neu OBest; -inga : (g:Gen) -> D Pl g OBest; - -alla : (g:Gen) -> D Pl g OBest; -de : (g:Gen) -> D Pl g Best; - -katt : N Sg Utr OBest; -katten : N Sg Utr Best; -katter : N Pl Utr OBest; -katterna : N Pl Utr Best; - -hund : N Sg Utr OBest; -hunden : N Sg Utr Best; -hundar : N Pl Utr OBest; -hundarna : N Pl Utr Best; - -barn : (n:Num) -> N n Neu OBest; -barnet : N Sg Neu Best; -barnen : N Pl Neu Best; - -djur : (n:Num) -> N n Neu OBest; -djuret : N Sg Neu Best; -djuren : N Pl Neu Best; - -jagar : V; -sover : V; - -} - diff --git a/grammars/ljung/thesis/CopyMorphism.gf b/grammars/ljung/thesis/CopyMorphism.gf deleted file mode 100644 index 71faf1d99..000000000 --- a/grammars/ljung/thesis/CopyMorphism.gf +++ /dev/null @@ -1,22 +0,0 @@ - --- the example 4.1 from Ljunglöf (2004, page 82) - -concrete CopyMorphism of CopyMorphismAbs = { - -lincat -S = { s : Str }; -A = { s1 : Str; s2 : Str }; - -lin - -f x = { s = x.s1 ++ x.s2 }; - -g x y = { s1 = x.s1 ++ y.s1; - s2 = x.s2 ++ y.s2 }; - -ac = { s1 = "a"; s2 = "c" }; - -bd = { s1 = "b"; s2 = "d" }; - - -} diff --git a/grammars/ljung/thesis/CopyMorphismAbs.gf b/grammars/ljung/thesis/CopyMorphismAbs.gf deleted file mode 100644 index 02929f699..000000000 --- a/grammars/ljung/thesis/CopyMorphismAbs.gf +++ /dev/null @@ -1,15 +0,0 @@ - --- the example 4.1 from Ljunglöf (2004, page 82) - -abstract CopyMorphismAbs = { - -cat S; A; - -fun - -f : A -> S; -g : A -> A -> A; -ac : A; -bd : A; - -} diff --git a/grammars/ljung/thesis/Erasing.gf b/grammars/ljung/thesis/Erasing.gf deleted file mode 100644 index 8b393eec8..000000000 --- a/grammars/ljung/thesis/Erasing.gf +++ /dev/null @@ -1,26 +0,0 @@ - --- the example 4.1 from Ljunglöf (2004, page 82) - -concrete Erasing of ErasingAbs = { - -lincat -S = { s : Str }; -A = { s1 : Str; s2 : Str }; -B = { s : Str }; -C = { s : Str }; - -lin - -f x = { s = x.s1 }; - -g x y z = { s1 = x.s2 ++ y.s; - s2 = x.s1 ++ z.s }; - -a = { s1 = "a1"; s2 = "a2" }; - -b = { s = "b" }; - -c = { s = "c" }; - - -} diff --git a/grammars/ljung/thesis/ErasingAbs.gf b/grammars/ljung/thesis/ErasingAbs.gf deleted file mode 100644 index 7b42b8863..000000000 --- a/grammars/ljung/thesis/ErasingAbs.gf +++ /dev/null @@ -1,21 +0,0 @@ - --- the example 4.1 from Ljunglöf (2004, page 82) - -abstract ErasingAbs = { - -cat S; A; B; C; - -fun - -f : A -> S; - -g : A -> B -> C -> A; - -a : A; - -b : B; - -c : C; - - -} diff --git a/grammars/ljung/thesis/FragmentAbstract.gf b/grammars/ljung/thesis/FragmentAbstract.gf deleted file mode 100644 index 43653a933..000000000 --- a/grammars/ljung/thesis/FragmentAbstract.gf +++ /dev/null @@ -1,19 +0,0 @@ - -abstract FragmentAbstract = { - -flags startcat=NP; - -cat S; NP; VP; D; N; V; - -fun - -s_p : NP -> VP -> S; -np_d : D -> N -> NP; -np_p : N -> NP; -vp_t : V -> NP -> VP; -d_a, d_m : D; -n_c, n_f : N; -v_e, v_h : V; - -} - diff --git a/grammars/ljung/thesis/FragmentNumber.gf b/grammars/ljung/thesis/FragmentNumber.gf deleted file mode 100644 index dafe9a2b7..000000000 --- a/grammars/ljung/thesis/FragmentNumber.gf +++ /dev/null @@ -1,29 +0,0 @@ - -concrete FragmentNumber of FragmentAbstract = open FragmentResource in { - -flags startcat= S; - -lincat - -N = { s : Num => Str }; -V = { s : Num => Str }; -VP = { s : Num => Str }; - -D = { s : Str; n : Num }; -NP = { s : Str; n : Num }; - -lin - -s_p x y = { s = x.s ++ y.s!x.n }; -np_d x y = { s = x.s ++ y.s!x.n; n = x.n }; -np_p x = { s = x.s!Pl; n = Pl }; -vp_t x y = { s = table { z => x.s!z ++ y.s } }; -d_a = { s = "a"; n = Sg }; -d_m = { s = "many"; n = Pl }; -n_c = { s = table { Sg => "lion"; Pl => "lions" } }; -n_f = { s = table { _ => "fish" } }; -v_e = { s = table { Sg => "eats" ; Pl => "eat" } }; -v_h = { s = table { Sg => "hunts" ; Pl => "hunt" } }; - -} - diff --git a/grammars/ljung/thesis/FragmentResource.gf b/grammars/ljung/thesis/FragmentResource.gf deleted file mode 100644 index 154b50a52..000000000 --- a/grammars/ljung/thesis/FragmentResource.gf +++ /dev/null @@ -1,10 +0,0 @@ - -resource FragmentResource = { - -param - -Num = Sg | Pl; -Gen = Neu | Utr; -Order = Dir | Indir | Sub | Top; - -} diff --git a/grammars/ljung/thesis/FragmentSimple.gf b/grammars/ljung/thesis/FragmentSimple.gf deleted file mode 100644 index 7de175ffe..000000000 --- a/grammars/ljung/thesis/FragmentSimple.gf +++ /dev/null @@ -1,18 +0,0 @@ - -concrete FragmentSimple of FragmentAbstract = { - -lin - -s_p x y = { s = x.s ++ y.s }; -np_d x y = { s = x.s ++ y.s }; -np_p x = { s = x.s }; -vp_t x y = { s = x.s ++ y.s }; -d_a = { s = "a" }; -d_m = { s = "many" }; -n_c = { s = variants { "lion" ; "lions" } }; -n_f = { s = "fish" }; -v_e = { s = variants { "eats" ; "eat" } }; -v_h = { s = variants { "hunts" ; "hunt" } }; - -} - diff --git a/grammars/ljung/thesis/FragmentSwedish.gf b/grammars/ljung/thesis/FragmentSwedish.gf deleted file mode 100644 index 587be7136..000000000 --- a/grammars/ljung/thesis/FragmentSwedish.gf +++ /dev/null @@ -1,27 +0,0 @@ - -concrete FragmentSwedish of FragmentAbstract = open FragmentResource in { - -lincat - -S = { s : Order => Str }; -VP = { s1 : Str; s2 : Str }; -N = { s : Num => Str; g : Gen }; -D = { s : Gen => Str; n : Num }; - -lin - -s_p x y = { s = table { Indir => y.s1 ++ x.s ++ y.s2; - Top => y.s2 ++ y.s1 ++ x.s; - _ => x.s ++ y.s1 ++ y.s2 } }; -np_d x y = { s = x.s!y.g ++ y.s!x.n }; -np_p x = { s = x.s!Pl }; -vp_t x y = { s1 = x.s; s2 = y.s }; -d_a = { s = table { Utr => "en"; Neu => "ett" }; n = Sg }; -d_m = { s = table { _ => "maanga" }; n = Pl }; -n_c = { s = table { _ => "lejon" }; g = Neu }; -n_f = { s = table { Sg => "fisk"; Pl => "fiskar" }; g = Utr }; -v_e = { s = "aeter" }; -v_h = { s = "jagar" }; - -} - diff --git a/grammars/ljung/timeflies/TimeFlies.gf b/grammars/ljung/timeflies/TimeFlies.gf deleted file mode 100644 index f46592b55..000000000 --- a/grammars/ljung/timeflies/TimeFlies.gf +++ /dev/null @@ -1,24 +0,0 @@ - -concrete TimeFlies of TimeFliesAbs = { - -lin -s1 x y = {s = x.s ++ y.s}; -vp1 x = {s = x.s}; -vp2 x y = {s = x.s ++ y.s}; -vp3 x y = {s = x.s ++ y.s}; -np1 x = {s = x.s}; -np2 x y = {s = x.s ++ y.s}; -np3 x y = {s = x.s ++ y.s}; -pp1 x y = {s = x.s ++ y.s}; - -flyV = {s = "flies"}; -timeV = {s = "time"}; -likeV = {s = "like"}; -flyN = {s = "flies"}; -timeN = {s = "time"}; -arrowN = {s = "arrow"}; -anD = {s = "an"}; -timeD = {s = "time"}; -likeP = {s = "like"}; - -} diff --git a/grammars/ljung/timeflies/TimeFliesAbs.gf b/grammars/ljung/timeflies/TimeFliesAbs.gf deleted file mode 100644 index fe52f82b6..000000000 --- a/grammars/ljung/timeflies/TimeFliesAbs.gf +++ /dev/null @@ -1,27 +0,0 @@ - -abstract TimeFliesAbs = { - -cat -S; VP; NP; PP; V; N; D; P; - -fun -s1 : NP -> VP -> S; -vp1 : V -> VP; -vp2 : V -> NP -> VP; -vp3 : VP -> PP -> VP; -np1 : N -> NP; -np2 : D -> N -> NP; -np3 : NP -> PP -> NP; -pp1 : P -> NP -> PP; - -flyV : V; -timeV : V; -likeV : V; -flyN : N; -timeN : N; -arrowN : N; -anD : D; -timeD : D; -likeP : P; -} - diff --git a/grammars/ljung/timeflies/TimeFliesCnc.gf b/grammars/ljung/timeflies/TimeFliesCnc.gf deleted file mode 100644 index 5952dda49..000000000 --- a/grammars/ljung/timeflies/TimeFliesCnc.gf +++ /dev/null @@ -1,2 +0,0 @@ - -resource diff --git a/grammars/ljung/variants/TestVars.gf b/grammars/ljung/variants/TestVars.gf deleted file mode 100644 index ce0073f8f..000000000 --- a/grammars/ljung/variants/TestVars.gf +++ /dev/null @@ -1,14 +0,0 @@ - -concrete TestVars of TestVarsA = open TestVarsR in { - -lincat S = {s1:Str; s2:AB => Str}; - -lin - -f x = { s1 = []; - s2 = table{ y => variants{ x.s2 ! A; x.s1 ++ x.s2 ! y } } }; - -a = { s1 = "a" ++ variants{ "b"; "c" }; - s2 = table{ A => variants{ "A"; "Q" }; B => "B" } }; - -} diff --git a/grammars/ljung/variants/TestVarsA.gf b/grammars/ljung/variants/TestVarsA.gf deleted file mode 100644 index a52804425..000000000 --- a/grammars/ljung/variants/TestVarsA.gf +++ /dev/null @@ -1,11 +0,0 @@ - -abstract TestVarsA = { - -cat S; - -fun -f : S -> S; -a : S; - -} - diff --git a/grammars/ljung/variants/TestVarsR.gf b/grammars/ljung/variants/TestVarsR.gf deleted file mode 100644 index c0c02926c..000000000 --- a/grammars/ljung/variants/TestVarsR.gf +++ /dev/null @@ -1,27 +0,0 @@ - -resource TestVarsR = { - -param AB = A | B; -param XYZ = X AB | Y | Z AB; - -} - - - - - - - - - - - - - - - - - - - - diff --git a/grammars/logic/Arithm.gf b/grammars/logic/Arithm.gf deleted file mode 100644 index 2a91c5ed0..000000000 --- a/grammars/logic/Arithm.gf +++ /dev/null @@ -1,66 +0,0 @@ -abstract Arithm = Logic ** { - --- arithmetic -fun - Nat, Real : Dom ; -data - zero : Elem Nat ; - succ : Elem Nat -> Elem Nat ; -fun - trunc : Elem Real -> Elem Nat ; - - EqNat : (m,n : Elem Nat) -> Prop ; - LtNat : (m,n : Elem Nat) -> Prop ; - Div : (m,n : Elem Nat) -> Prop ; - Even : Elem Nat -> Prop ; - Odd : Elem Nat -> Prop ; - Prime : Elem Nat -> Prop ; - - one : Elem Nat ; - two : Elem Nat ; - sum : (m,n : Elem Nat) -> Elem Nat ; - prod : (m,n : Elem Nat) -> Elem Nat ; -data - evax1 : Proof (Even zero) ; - evax2 : (n : Elem Nat) -> Proof (Even n) -> Proof (Odd (succ n)) ; - evax3 : (n : Elem Nat) -> Proof (Odd n) -> Proof (Even (succ n)) ; - eqax1 : Proof (EqNat zero zero) ; - eqax2 : (m,n : Elem Nat) -> Proof (EqNat m n) -> Proof (EqNat (succ m) (succ n)) ; -fun - IndNat : (C : Elem Nat -> Prop) -> - Proof (C zero) -> - ((x : Elem Nat) -> Proof (C x) -> Proof (C (succ x))) -> - Proof (Univ Nat C) ; - -def - one = succ zero ; - two = succ one ; - sum m (succ n) = succ (sum m n) ; - sum m zero = m ; - prod m (succ n) = sum (prod m n) m ; - prod m zero = zero ; - LtNat m n = Exist Nat (\x -> EqNat n (sum m (succ x))) ; - Div m n = Exist Nat (\x -> EqNat m (prod x n)) ; - Prime n = Conj - (LtNat one n) - (Univ Nat (\x -> Impl (Conj (LtNat one x) (Div n x)) (EqNat x n))) ; - - Abs = Abs ; - -fun ex1 : Text ; -def ex1 = - ThmWithProof - (Univ Nat (\x -> Disj (Even x) (Odd x))) - (IndNat - (\x -> Disj (Even x) (Odd x)) - (DisjIl (Even zero) (Odd zero) evax1) - (\x -> \h -> DisjE (Even x) (Odd x) (Disj (Even (succ x)) (Odd (succ x))) - (Hypo (Disj (Even x) (Odd x)) h) - (\a -> DisjIr (Even (succ x)) (Odd (succ x)) - (evax2 x (Hypo (Even x) a))) - (\b -> DisjIl (Even (succ x)) (Odd (succ x)) - (evax3 x (Hypo (Odd x) b)) - ) - ) - ) ; -} ; diff --git a/grammars/logic/ArithmEng.gf b/grammars/logic/ArithmEng.gf deleted file mode 100644 index e09f14396..000000000 --- a/grammars/logic/ArithmEng.gf +++ /dev/null @@ -1,42 +0,0 @@ ---# -path=.:../prelude - -concrete ArithmEng of Arithm = LogicEng ** open LogicResEng in { - -lin - Nat = {s = nomReg "number"} ; - zero = ss "zero" ; - succ = fun1 "successor" ; - - EqNat = adj2 ["equal to"] ; - LtNat = adj2 ["smaller than"] ; - Div = adj2 ["divisible by"] ; - Even = adj1 "even" ; - Odd = adj1 "odd" ; - Prime = adj1 "prime" ; - - one = ss "one" ; - two = ss "two" ; - sum = fun2 "sum" ; - prod = fun2 "product" ; - - evax1 = ss ["by the first axiom of evenness , zero is even"] ; - evax2 n c = {s = - c.s ++ [". By the second axiom of evenness , the successor of"] ++ - n.s ++ ["is odd"]} ; - evax3 n c = {s = - c.s ++ [". By the third axiom of evenness , the successor of"] ++ - n.s ++ ["is even"]} ; - eqax1 = ss ["by the first axiom of equality , zero is equal to zero"] ; - eqax2 m n c = {s = - c.s ++ [". By the second axiom of equality , the successor of"] ++ m.s ++ - ["is equal to the successor of"] ++ n.s} ; - IndNat C d e = {s = - ["we proceed by induction . For the basis ,"] ++ d.s ++ - [". For the induction step, consider a number"] ++ C.$0 ++ - ["and assume"] ++ C.s ++ "(" ++ e.$1 ++ ")" ++ "." ++ e.s ++ - ["Hence, for all numbers"] ++ C.$0 ++ "," ++ C.s} ; - - ex1 = ss ["The first theorem and its proof ."] ; - -} ; - diff --git a/grammars/logic/ArithmFre.gf b/grammars/logic/ArithmFre.gf deleted file mode 100644 index fcc99f4e9..000000000 --- a/grammars/logic/ArithmFre.gf +++ /dev/null @@ -1,37 +0,0 @@ ---# -path=.:../prelude - -concrete ArithmFre of Arithm = LogicFre ** open ResFre in { - -lin Nat = {g = masc ; s = nomReg "nombre"} ; -zero = {g = masc ; s = table {c => (prep ! c) ++ "zéro"}} ; -succ n = - {g = masc ; s = table {c => defin ! sg ! masc ! c ++ "successeur" ++ n.s ! dd}} ; -EqNat k n = mkPropA2 aa k (adjAl "éga") n ; -LtNat k n = mkPropA2 aa k (adjReg "inférieur") n ; -Div k n = mkPropA2 nom k (table {_ => nomReg "divisible"}) n ; --- par ! - -Even n = mkPropA1 n (adjReg "pair") ; -Odd n = mkPropA1 n (adjReg "impair") ; -Prime n = mkPropA1 n (adjEr "premi") ; - -lin one = - {g = masc ; s = table {c => (prep ! c) ++ "un"}} ; -lin two = - {g = masc ; s = table {c => (prep ! c) ++ "deux"}} ; -lin sum m n = {g = fem ; s = table { - c => defin ! sg ! fem ! c ++ "somme" ++ m.s ! dd ++ "et" ++ n.s ! dd}} ; -lin prod m n = {g = masc ; s = table { - c => defin!sg!fem!c ++ "produit" ++ m.s ! dd ++ "et" ++ n.s ! dd}} ; -lin evax1 = - {s = "par"++"le"++"premier"++"axiome"++"de"++"parité,"++"zéro"++"est"++"pair"} ; -lin evax2 n c = - {s = c.s ++ "."++"Par"++"le"++"deuxième"++"axiome"++"de"++"parité,"++"le"++"successeur" ++ (n.s ! dd) ++ "est"++"impair"} ; -lin evax3 n c = - {s = c.s ++ "."++"Par"++"le"++"troisième"++"axiome"++"de"++"parité,"++"le"++"successeur" ++ (n.s ! dd) ++ "est"++"pair"} ; -lin eqax1 = - {s = "par"++"le"++"premier"++"axiome"++"d'égalité,"++"zéro"++"est"++"égal"++"a"++"lui-même"} ; -lin eqax2 m n c = - {s = c.s ++ "."++"Par"++"le"++"deuxième"++"axiome"++"d'égalité,"++"le"++"successeur" ++ (m.s ! dd) ++ "est"++"égal"++"au"++"successeur" ++ n.s ! dd} ; -lin IndNat C d e = - {s = "nous"++"nous"++"servons"++"d'induction."++"Pour"++"la"++"base," ++ d.s ++ "."++"Pour"++"le"++"pas"++"d'induction,"++"considérons"++"un"++"nombre" ++ e.$0 ++ "et"++"supposons" ++ que ++ (C.s ! ind) ++ "(" ++ e.$1 ++ ")" ++ "." ++ e.s ++ "Donc,"++"pour"++"tous"++"les"++"nombres" ++ C.$0 ++ "," ++ C.s ! ind} ; -} diff --git a/grammars/logic/Logic.gf b/grammars/logic/Logic.gf deleted file mode 100644 index dbd0566f2..000000000 --- a/grammars/logic/Logic.gf +++ /dev/null @@ -1,97 +0,0 @@ --- many-sorted predicate calculus --- AR 1999, revised 2001 - -abstract Logic = { - -flags startcat=Prop ; -- this is what you want to parse - -cat - Prop ; -- proposition - Dom ; -- domain of quantification - Elem Dom ; -- individual element of a domain - Proof Prop ; -- proof of a proposition - Text ; -- theorem with proof etc. - -fun - -- texts - Statement : Prop -> Text ; - ThmWithProof : (A : Prop) -> Proof A -> Text ; - ThmWithTrivialProof : (A : Prop) -> Proof A -> Text ; - - -- logically complex propositions - Disj : (A,B : Prop) -> Prop ; - Conj : (A,B : Prop) -> Prop ; - Impl : (A,B : Prop) -> Prop ; - Abs : Prop ; - Neg : Prop -> Prop ; - - Univ : (A : Dom) -> (Elem A -> Prop) -> Prop ; - Exist : (A : Dom) -> (Elem A -> Prop) -> Prop ; - - -- progressive implication à la type theory - ImplP : (A : Prop) -> (Proof A -> Prop) -> Prop ; - - -- inference rules -data - ConjI : (A,B : Prop) -> Proof A -> Proof B -> Proof (Conj A B) ; -fun - ConjEl : (A,B : Prop) -> Proof (Conj A B) -> Proof A ; - ConjEr : (A,B : Prop) -> Proof (Conj A B) -> Proof B ; -data - DisjIl : (A,B : Prop) -> Proof A -> Proof (Disj A B) ; - DisjIr : (A,B : Prop) -> Proof B -> Proof (Disj A B) ; -fun - DisjE : (A,B,C : Prop) -> Proof (Disj A B) -> - (Proof A -> Proof C) -> (Proof B -> Proof C) -> Proof C ; -data - ImplI : (A,B : Prop) -> (Proof A -> Proof B) -> Proof (Impl A B) ; -fun - ImplE : (A,B : Prop) -> Proof (Impl A B) -> Proof A -> Proof B ; -data - NegI : (A : Prop) -> (Proof A -> Proof Abs) -> Proof (Neg A) ; -fun - NegE : (A : Prop) -> Proof (Neg A) -> Proof A -> Proof Abs ; - AbsE : (C : Prop) -> Proof Abs -> Proof C ; -data - UnivI : (A : Dom) -> (B : Elem A -> Prop) -> - ((x : Elem A) -> Proof (B x)) -> Proof (Univ A B) ; -fun - UnivE : (A : Dom) -> (B : Elem A -> Prop) -> - Proof (Univ A B) -> (a : Elem A) -> Proof (B a) ; -data - ExistI : (A : Dom) -> (B : Elem A -> Prop) -> - (a : Elem A) -> Proof (B a) -> Proof (Exist A B) ; -fun - ExistE : (A : Dom) -> (B : Elem A -> Prop) -> (C : Prop) -> - Proof (Exist A B) -> ((x : Elem A) -> Proof (B x) -> Proof C) -> - Proof C ; - - -- use a hypothesis - Hypo : (A : Prop) -> Proof A -> Proof A ; - - -- pronoun - Pron : (A : Dom) -> Elem A -> Elem A ; - -def - -- proof normalization; does not tc 13/9/2005 - - ConjEl _ _ (ConjI _ _ a _) = a ; - ConjEr _ _ (ConjI _ _ _ b) = b ; - DisjE _ _ _ (DisjIl _ _ a) d _ = d a ; - DisjE _ _ _ (DisjIr _ _ b) _ e = e b ; - ImplE _ _ (ImplI _ _ b) a = b a ; - NegE _ (NegI _ b) a = b a ; - UnivE _ _ (UnivI _ _ b) a = b a ; - ExistE A B _ (ExistI A B a b) d = d a b ; - ---- ExistE _ _ _ (ExistI _ _ a b) d = d a b ; ---- does not tc 13/9/2005: {a{-2-}<>a{-0-}} ---- moreover: no problem with ---- ConjEr _ _ (ConjI _ _ a _) = a ; ---- But this changes when A B are used instead of _ _ - - -- Hypo and Pron are identities - Hypo _ a = a ; - Pron _ a = a ; - -} ; diff --git a/grammars/logic/LogicEng.gf b/grammars/logic/LogicEng.gf deleted file mode 100644 index b708068e2..000000000 --- a/grammars/logic/LogicEng.gf +++ /dev/null @@ -1,60 +0,0 @@ -concrete LogicEng of Logic = open LogicResEng, Prelude in { - -flags lexer=vars ; unlexer=text ; - -lincat - Dom = {s : Num => Str} ; - Prop, Elem = {s : Str} ; - -lin -Statement A = {s = A.s ++ "."} ; -ThmWithProof A a = {s = - ["Theorem ."] ++ A.s ++ "." ++ PARA ++ "Proof" ++ "." ++ a.s ++ "."} ; -ThmWithTrivialProof A a = - {s = "Theorem" ++ "." ++ A.s ++ "." ++ PARA ++ "Proof" ++ "." ++ "Trivial" ++ "."} ; -Disj A B = {s = A.s ++ "or" ++ B.s} ; -Conj A B = {s = A.s ++ "and" ++ B.s} ; -Impl A B = {s = "if" ++ A.s ++ "then" ++ B.s} ; -Univ A B = {s = ["for all"] ++ A.s ! pl ++ B.$0 ++ "," ++ B.s} ; -Exist A B = - {s = ["there exists"] ++ indef ++ A.s ! sg ++ B.$0 ++ ["such that"] ++ B.s} ; -Abs = {s = ["we have a contradiction"]} ; -Neg A = {s = ["it is not the case that"] ++ A.s} ; -ImplP A B = {s = "if" ++ A.s ++ "then" ++ B.s} ; -ConjI A B a b = {s = a.s ++ "." ++ b.s ++ [". Hence"] ++ A.s ++ "and" ++ B.s} ; -ConjEl A B c = {s = c.s ++ [". A fortiori ,"] ++ A.s} ; -ConjEr A B c = {s = c.s ++ [". A fortiori ,"] ++ B.s} ; -DisjIl A B a = {s = a.s ++ [". A fortiori ,"] ++ A.s ++ "or" ++ B.s} ; -DisjIr A B b = {s = b.s ++ [". A fortiori ,"] ++ A.s ++ "or" ++ B.s} ; -DisjE A B C c d e = {s = - c.s ++ - [". There are two possibilities . First , assume"] ++ - A.s ++ "(" ++ d.$0 ++ ")" ++ "." ++ d.s ++ - [". Second , assume"] ++ B.s ++ "(" ++ e.$0 ++ ")" ++ "." ++ e.s ++ - [". Thus"] ++ C.s ++ ["in both cases"]} ; -ImplI A B b = {s = - "assume" ++ A.s ++ "(" ++ b.$0 ++ ")" ++ "." ++ - b.s ++ [". Hence , if"] ++ A.s ++ "then" ++ B.s} ; -ImplE A B c a = {s = a.s ++ [". But"] ++ c.s ++ [". Hence"] ++ B.s} ; -NegI A b = {s = - "assume" ++ A.s ++ "(" ++ b.$0 ++ ")" ++ "." ++ b.s ++ - [". Hence, it is not the case that"] ++ A.s} ; -NegE A c a = - {s = a.s ++ [". But"] ++ c.s ++ [". We have a contradiction"]} ; -UnivI A B b = {s = - ["consider an arbitrary"] ++ A.s ! sg ++ b.$0 ++ "." ++ b.s ++ - [". Hence, for all"] ++ A.s ! pl ++ B.$0 ++ "," ++ B.s} ; -UnivE A B c a = - {s = c.s ++ [". Hence"] ++ B.s ++ "for" ++ B.$0 ++ ["set to"] ++ a.s} ; -ExistI A B a b = {s = - b.s ++ [". Hence, there exists"] ++ indef ++ - A.s ! sg ++ B.$0 ++ ["such that"] ++ B.s} ; -ExistE A B C c d = {s = - c.s ++ [". Consider an arbitrary"] ++ d.$0 ++ - ["and assume that"] ++ B.s ++ "(" ++ d.$1 ++ ")" ++ "." ++ d.s ++ - [". Hence"] ++ C.s ++ ["independently of"] ++ d.$0} ; -AbsE C c = {s = c.s ++ [". We may conclude"] ++ C.s} ; -Hypo A a = {s = ["by the hypothesis"] ++ a.s ++ "," ++ A.s} ; -Pron _ _ = {s = "it"} ; - -} ; diff --git a/grammars/logic/LogicFre.gf b/grammars/logic/LogicFre.gf deleted file mode 100644 index 65beb56ae..000000000 --- a/grammars/logic/LogicFre.gf +++ /dev/null @@ -1,84 +0,0 @@ -concrete LogicFre of Logic = open ResFre, Prelude in { - -flags lexer=vars ; unlexer=text ; - -lincat -Text = {s : Str} ; -Dom = {g : Gen ; s : Num => Str} ; -Prop = LinProp ; -Elem = LinElem ; -Proof = {s : Str} ; - -lindef Elem = \e -> {g = masc ; s = table {c => prep ! c ++ e}} ; - -lin -Statement A = - {s = A.s ! ind ++ "."} ; -ThmWithProof A a = - {s = "Théorème"++"." ++ (A.s ! ind) ++ "."++ PARA ++ "Démonstration"++"." ++ a.s ++ "."} ; -ThmWithTrivialProof A a = - {s = "Théorème"++"." ++ (A.s ! ind) ++ "."++ PARA ++ "Démonstration"++"."++"Triviale"++"."} ; -Disj A B = - {s = table {m => (A.s ! m) ++ "ou" ++ B.s ! m}} ; -Conj A B = - {s = table {m => (A.s ! m) ++ "et" ++ B.s ! m}} ; -Impl A B = - {s = table {m => si ++ (A.s ! ind) ++ "alors" ++ B.s ! m}} ; -Univ A B = - {s = table {m => "pour" ++ tout ! A.g ! pl ++ "les" ++ A.s ! pl ++ B.$0 ++ "," ++ B.s ! m}} ; -Exist A B = - {s = table {m => "il"++"existe" ++ indef ! A.g ++ A.s ! sg ++ B.$0 ++ - tel ! A.g ! sg ++ que ++ B.s ! subj}} ; -Abs = - {s = table {{ind} => "nous"++"avons"++"une"++"contradiction" ; {subj} => "nous"++"ayons"++"une"++"contradiction"}} ; -Neg A = - {s = table {m => "il" ++ ne ++ etre ! sg ! m ++ "pas"++"vrai" ++ que ++ A.s ! subj}} ; -ImplP A B = - {s = table {m => si ++ (A.s ! ind) ++ "alors" ++ B.s ! m}} ; -ConjI A B a b = - {s = a.s ++ "." ++ b.s ++ "."++"Donc" ++ (A.s ! ind) ++ "et" ++ B.s ! ind} ; -ConjEl A B c = - {s = c.s ++ "."++"A"++"fortiori," ++ A.s ! ind} ; -ConjEr A B c = - {s = c.s ++ "."++"A"++"fortiori," ++ B.s ! ind} ; -DisjIl A B a = - {s = a.s ++ "."++"A"++"fortiori," ++ (A.s ! ind) ++ "ou" ++ B.s ! ind} ; -DisjIr A B b = - {s = b.s ++ "."++"A"++"fortiori," ++ (A.s ! ind) ++ "ou" ++ B.s ! ind} ; -DisjE A B C c d e = - {s = c.s ++ "."++ - "Nous"++"avons"++"deux"++"possibilités."++ - "Premièrement,"++ "supposons" ++ que ++ A.s ! ind ++ "(" ++ d.$0 ++ ")" ++ - "." ++ d.s ++ "."++ - "Deuxièmement,"++ "supposons" ++ que ++ B.s ! ind ++ "(" ++ e.$0 ++ ")" ++ - "." ++ e.s ++ "."++"Donc" ++ (C.s ! ind) ++ "dans"++"les"++"deux"++"cas"} ; -ImplI A B b = - {s = "supposons" ++ que ++ A.s ! ind ++ "(" ++ b.$0 ++ ")" ++ "." ++ b.s ++ "."++ - "Donc"++"," ++ si ++ A.s ! ind ++ "alors" ++ B.s ! ind} ; -ImplE A B c a = - {s = a.s ++ "."++"Mais" ++ c.s ++ "."++"Donc" ++ B.s ! ind} ; -NegI A b = - {s = "supposons" ++ que ++ A.s ! ind ++ "(" ++ b.$0 ++ ")" ++ "." ++ b.s ++ "." ++ - ["Donc , il n'est pas vrai"] ++ que ++ A.s ! subj} ; -NegE A c a = - {s = a.s ++ "."++"Mais" ++ c.s ++ "." ++ ["Nous avons une contradiction"]} ; -UnivI A B b = - {s = "considérons" ++ indef ! A.g ++ A.s ! sg ++ b.$0 ++ "arbitraire." ++ - b.s ++ "."++"Donc"++","++"pour" ++ tout ! A.g ! pl ++ - "les" ++ A.s ! pl ++ B.$0 ++ "," ++ B.s ! ind} ; -UnivE A B c a = - {s = c.s ++ "."++ - "Donc" ++ B.s ! ind ++ "avec" ++ B.$0 ++ "remplacé" ++ "par" ++ a.s ! nom} ; -ExistI A B a b = - {s = b.s ++ "."++"Donc"++"il"++"existe" ++ indef ! A.g ++ A.s ! sg ++ B.$0 ++ - tel ! A.g ! sg ++ que ++ B.s ! subj} ; -ExistE A B C c d = - {s = c.s ++ "."++"Considérons" ++ indef ! A.g ++ A.s ! sg ++ d.$0 ++ - ["arbitraire , et supposons"] ++ que ++ B.s ! ind ++ "(" ++ d.$1 ++ ")" ++ - "." ++ d.s ++ "."++"Donc" ++ C.s ! ind ++ "indépendamment" ++ "de" ++ d.$0} ; -AbsE C c = - {s = c.s ++ "." ++ "Nous" ++ "concluons" ++ que ++ C.s ! ind} ; -Hypo A a = - {s = "par"++"l'hypothèse" ++ a.s ++ "," ++ A.s ! ind} ; -Pron A _ = {s = pronom ! A.g ; g = A.g} ; -} ; \ No newline at end of file diff --git a/grammars/logic/LogicResEng.gf b/grammars/logic/LogicResEng.gf deleted file mode 100644 index 94866bf05..000000000 --- a/grammars/logic/LogicResEng.gf +++ /dev/null @@ -1,27 +0,0 @@ -resource LogicResEng = { - -param Num = sg | pl ; - -oper - - ss : Str -> {s : Str} = \s -> {s = s} ; - - nomReg : Str -> Num => Str = \s -> table {sg => s ; pl => s + "s"} ; - - indef : Str = pre {"a" ; "an" / strs {"a" ; "e" ; "i" ; "o"}} ; - - LinElem : Type = {s : Str} ; - LinProp : Type = {s : Str} ; - - adj1 : Str -> LinElem -> LinProp = - \adj,x -> ss (x.s ++ "is" ++ adj) ; - adj2 : Str -> LinElem -> LinElem -> LinProp = - \adj,x,y -> ss (x.s ++ "is" ++ adj ++ y.s) ; - - fun1 : Str -> LinElem -> LinElem = - \f,x -> ss ("the" ++ f ++ "of" ++ x.s) ; - fun2 : Str -> LinElem -> LinElem -> LinElem = - \f,x,y -> ss ("the" ++ f ++ "of" ++ x.s ++ "and" ++ y.s) ; - - -} ; diff --git a/grammars/logic/ResFre.gf b/grammars/logic/ResFre.gf deleted file mode 100644 index 7283e9fcd..000000000 --- a/grammars/logic/ResFre.gf +++ /dev/null @@ -1,78 +0,0 @@ -resource ResFre = { -param -Gen = masc | fem ; -Num = sg | pl ; -Mod = ind | subj ; -Cas = nom | aa | dd ; - -oper -nomReg : Str -> Num => Str = \str -> table {{sg} => str ; {pl} => str + "s"} ; -adjReg : Str -> Gen => Num => Str = \str -> - table {{masc} => nomReg str ; {fem} => nomReg (str + "e")} ; -adjEl : Str -> Gen => Num => Str = \str -> - table {{masc} => nomReg str ; {fem} => nomReg (str + "le")} ; -adjAl : Str -> Gen => Num => Str = \str -> - table {{masc} => table {{sg} => str + "l" ; {pl} => str + "ux"} ; - {fem} => nomReg (str + le) } ; -adjEr : Str -> Gen => Num => Str = \str -> - table {{masc} => nomReg (str + "er") ; {fem} => nomReg (str + "ère")} ; - -LinElem = {g : Gen ; s : Cas => Str} ; -LinProp = {s : Mod => Str} ; - -voyelle : Strs = strs {"a" ; "e" ; "i" ; "o" ; "u" ; "y" ; "é"} ; -elision : Str = pre {"e" ; "'" / voyelle} ; -ne : Str = "n" + elision ; -de : Str = "d" + elision ; -le : Str = "l" + elision ; -que : Str = "qu" + elision ; - -si : Str = pre {"si" ; "s'" / strs {"il" ; "ils"}} ; -indef : Gen => Str = table {{masc} => "un" ; _ => "une"} ; -tel : Gen => Num => Str = adjEl "tel" ; -tout : Gen => Num => Str = - table {{masc} => table {{sg} => "tout" ; {pl} => "tous"} ; {fem} => nomReg "toute" } ; -etre : Num => Mod => Str = formVerbe "est" "soit" "sont" "soient" ; - -formVerbe : Str -> Str -> Str -> Str -> Num => Mod => Str = - \sgi -> \sgs -> \pli -> \pls -> - table {{sg} => table {{ind} => sgi ; {subj} => sgs} ; - {pl} => table {{ind} => pli ; {subj} => pls}} ; -prep : Cas => Str = - table {{nom} => [] ; {aa} => "à" ; {dd} => de} ; - -defin : Num => Gen => Cas => Str = - table { - {sg} => table { - {masc} => table { - {dd} => pre {"du" ; "de"++"l'" / voyelle} ; - {aa} => pre {"au" ; "à"++"l'" / voyelle} ; - c => prep ! c ++ le - } ; - {fem} => table { - c => prep ! c ++ pre {"la" ; "l'" / voyelle} - } - } ; - {pl} => table { - _ => table { - {dd} => "des" ; - {aa} => "aux" ; - c => prep ! c ++ "les" - } - } - } ; - -pronom : Gen => Cas => Str = table { - masc => table {nom => "il" ; c => prep ! c ++ "lui"} ; - fem => table {c => prep ! c ++ "elle"} - } ; - -mkPropA1 : LinElem -> (Gen => Num => Str) -> LinProp = \elem -> \adj -> - {s = table {m => elem.s ! nom ++ etre ! sg ! m ++ adj ! elem.g ! sg}} ; - -mkPropA2 : Cas -> LinElem -> (Gen => Num => Str) -> LinElem -> LinProp = - \cas -> \elem -> \adj -> \elem2 -> let - {adjP : Gen => Num => Str = table {g => table {n => adj ! g ! n ++ elem2.s ! cas}}} - in mkPropA1 elem adjP ; - -} diff --git a/grammars/mkDistr.sh b/grammars/mkDistr.sh deleted file mode 100644 index 73a00cc3b..000000000 --- a/grammars/mkDistr.sh +++ /dev/null @@ -1,66 +0,0 @@ -rm -rf grammars -mkdir -pv grammars -mkdir -pv grammars/letter -mkdir -pv grammars/logic -mkdir -pv grammars/basic -mkdir -pv grammars/numerals -mkdir -pv grammars/prelude -mkdir -pv grammars/resource -mkdir -pv grammars/resource/abstract -mkdir -pv grammars/resource/english -mkdir -pv grammars/resource/finnish -mkdir -pv grammars/resource/french -mkdir -pv grammars/resource/german -mkdir -pv grammars/resource/italian -mkdir -pv grammars/resource/romance -mkdir -pv grammars/resource/russian -mkdir -pv grammars/resource/swedish -mkdir -pv grammars/database -mkdir -pv grammars/imperative -mkdir -pv grammars/imperative/compiler - -cp -pv letter/README grammars/letter/ -cp -pv letter/mkLetter.gfs grammars/letter/ -cp -pv letter/*.gf grammars/letter/ - -cp -pv logic/*.gf grammars/logic/ - -cp -pv newnumerals/README grammars/numerals/ -cp -pv newnumerals/*.gf grammars/numerals/ -cp -pv newnumerals/mkNumerals.gfs grammars/numerals/ - -cp -pv basic/README grammars/basic/ -cp -pv basic/*.gf grammars/basic/ - -cp -pv prelude/README grammars/prelude/ -cp -pv prelude/*.gf grammars/prelude/ - -cp -pv newresource/mkTest.gfs grammars/resource/ -cp -pv newresource/mkParadigms.gfs grammars/resource/ -cp -pv newresource/README grammars/resource/ -cp -pv newresource/abstract/*.gf grammars/resource/abstract/ -cp -pv newresource/english/*.gf grammars/resource/english/ -rm -f grammars/resource/english/ResLex* -cp -pv newresource/finnish/*.gf grammars/resource/finnish/ -cp -pv newresource/french/*.gf grammars/resource/french/ -cp -pv newresource/german/*.gf grammars/resource/german/ -cp -pv newresource/italian/*.gf grammars/resource/italian/ -cp -pv newresource/romance/*.gf grammars/resource/romance/ -cp -pv newresource/russian/*.gf grammars/resource/russian/ -cp -pv newresource/swedish/*.gf grammars/resource/swedish/ - -cp -pv database/README grammars/database/ -cp -pv database/*.gf grammars/database/ - -cp -pv imperative/*.gf grammars/imperative/ -cp -pv imperative/compiler/*.hs grammars/imperative/compiler/ -cp -pv imperative/compiler/README grammars/imperative/compiler/ -cp -pv imperative/compiler/FILES grammars/imperative/compiler/ -cp -pv imperative/compiler/gfcc grammars/imperative/compiler/ -cp -pv imperative/compiler/makefile grammars/imperative/compiler/ -cp -pv imperative/compiler/*.c grammars/imperative/compiler/ -cp -pv imperative/compiler/*.gfs grammars/imperative/compiler/ -cp -pv imperative/compiler/runtime.j grammars/imperative/compiler/ - - -tar cvfz gf-grammars-2.1.tgz grammars diff --git a/grammars/mkLib.sh b/grammars/mkLib.sh deleted file mode 100644 index 8de0feeba..000000000 --- a/grammars/mkLib.sh +++ /dev/null @@ -1,4 +0,0 @@ -rm -rf ../lib -source mkDistr.sh -cp -r grammars lib -tar cvfz gf-lib.tgz lib diff --git a/grammars/multiple/City.gf b/grammars/multiple/City.gf deleted file mode 100644 index b8023ac84..000000000 --- a/grammars/multiple/City.gf +++ /dev/null @@ -1,7 +0,0 @@ -abstract City = { - cat - City ; - fun - MkCity : String -> City ; -} ; - diff --git a/grammars/multiple/CityEng.gf b/grammars/multiple/CityEng.gf deleted file mode 100644 index 8c67ab675..000000000 --- a/grammars/multiple/CityEng.gf +++ /dev/null @@ -1,5 +0,0 @@ -concrete CityEng of City = open Prelude in { - lin - MkCity s = s ; -} ; - diff --git a/grammars/multiple/Math.gf b/grammars/multiple/Math.gf deleted file mode 100644 index 6e6a48db6..000000000 --- a/grammars/multiple/Math.gf +++ /dev/null @@ -1,7 +0,0 @@ -abstract Math = { - cat - Number ; - fun - MkNumber : Int -> Number ; -} ; - diff --git a/grammars/multiple/MathEng.gf b/grammars/multiple/MathEng.gf deleted file mode 100644 index 9d9bf3414..000000000 --- a/grammars/multiple/MathEng.gf +++ /dev/null @@ -1,5 +0,0 @@ -concrete MathEng of Math = open Prelude in { - lin - MkNumber i = i ; -} ; - diff --git a/grammars/multiple/System.gf b/grammars/multiple/System.gf deleted file mode 100644 index b3587c106..000000000 --- a/grammars/multiple/System.gf +++ /dev/null @@ -1,4 +0,0 @@ -abstract System = { - cat Reply ; - fun Bye : Reply ; -} diff --git a/grammars/multiple/SystemCity.gf b/grammars/multiple/SystemCity.gf deleted file mode 100644 index 08196f73d..000000000 --- a/grammars/multiple/SystemCity.gf +++ /dev/null @@ -1,4 +0,0 @@ -abstract SystemCity = System, City ** { - fun - RDistance : City -> City -> Int -> Reply ; -} ; \ No newline at end of file diff --git a/grammars/multiple/SystemCityEng.gf b/grammars/multiple/SystemCityEng.gf deleted file mode 100644 index ddf15248a..000000000 --- a/grammars/multiple/SystemCityEng.gf +++ /dev/null @@ -1,6 +0,0 @@ -concrete SystemCityEng of SystemCity = SystemEng, CityEng ** open - Prelude in { - lin - RDistance x y d = - ss (["the distance from"] ++ x.s ++ "to" ++ y.s ++ "is" ++ d.s) ; -} ; diff --git a/grammars/multiple/SystemEng.gf b/grammars/multiple/SystemEng.gf deleted file mode 100644 index 96f6d80c7..000000000 --- a/grammars/multiple/SystemEng.gf +++ /dev/null @@ -1,3 +0,0 @@ -concrete SystemEng of System = open Prelude in { - lin Bye = ss "bye" ; -} diff --git a/grammars/multiple/SystemMath.gf b/grammars/multiple/SystemMath.gf deleted file mode 100644 index 7e2173111..000000000 --- a/grammars/multiple/SystemMath.gf +++ /dev/null @@ -1,4 +0,0 @@ -abstract SystemMath = System, Math ** { - fun - RSum : Number -> Number -> Int -> Reply ; -} ; diff --git a/grammars/multiple/SystemMathEng.gf b/grammars/multiple/SystemMathEng.gf deleted file mode 100644 index 11aca7952..000000000 --- a/grammars/multiple/SystemMathEng.gf +++ /dev/null @@ -1,6 +0,0 @@ -concrete SystemMathEng of SystemMath = SystemEng, MathEng ** open - Prelude in { - lin - RSum x y d = - ss (["the sum of"] ++ x.s ++ "and" ++ y.s ++ "is" ++ d.s) ; -} ; diff --git a/grammars/multiple/Top.gf b/grammars/multiple/Top.gf deleted file mode 100644 index 67170f30a..000000000 --- a/grammars/multiple/Top.gf +++ /dev/null @@ -1,7 +0,0 @@ -abstract Top = User, System ** { - cat - Move ; - fun - MUser : Query -> Move ; - MSystem : Reply -> Move ; -} diff --git a/grammars/multiple/TopCity.gf b/grammars/multiple/TopCity.gf deleted file mode 100644 index 894142b18..000000000 --- a/grammars/multiple/TopCity.gf +++ /dev/null @@ -1 +0,0 @@ -abstract TopCity = Top, UserCity, SystemCity ** {} ; diff --git a/grammars/multiple/TopCityEng.gf b/grammars/multiple/TopCityEng.gf deleted file mode 100644 index ef1f01ade..000000000 --- a/grammars/multiple/TopCityEng.gf +++ /dev/null @@ -1,3 +0,0 @@ ---# -path=.:../prelude - -concrete TopCityEng of TopCity = TopEng, UserCityEng, SystemCityEng ** {} ; diff --git a/grammars/multiple/TopEng.gf b/grammars/multiple/TopEng.gf deleted file mode 100644 index 6265ed2c3..000000000 --- a/grammars/multiple/TopEng.gf +++ /dev/null @@ -1,6 +0,0 @@ - -concrete TopEng of Top = UserEng, SystemEng ** open Prelude in { - lin - MUser q = q ; - MSystem r = r ; -} diff --git a/grammars/multiple/TopMath.gf b/grammars/multiple/TopMath.gf deleted file mode 100644 index 997e7299d..000000000 --- a/grammars/multiple/TopMath.gf +++ /dev/null @@ -1 +0,0 @@ -abstract TopMath = Top, UserMath, SystemMath ** {} ; diff --git a/grammars/multiple/TopMathEng.gf b/grammars/multiple/TopMathEng.gf deleted file mode 100644 index 5f803b33a..000000000 --- a/grammars/multiple/TopMathEng.gf +++ /dev/null @@ -1,3 +0,0 @@ ---# -path=.:../prelude - -concrete TopMathEng of TopMath = TopEng, UserMathEng, SystemMathEng ** {} ; diff --git a/grammars/multiple/User.gf b/grammars/multiple/User.gf deleted file mode 100644 index 6822d2e75..000000000 --- a/grammars/multiple/User.gf +++ /dev/null @@ -1,7 +0,0 @@ -abstract User = { - cat - Query ; - fun - QQuit : Query ; -} ; - diff --git a/grammars/multiple/UserCity.gf b/grammars/multiple/UserCity.gf deleted file mode 100644 index ee650421d..000000000 --- a/grammars/multiple/UserCity.gf +++ /dev/null @@ -1,5 +0,0 @@ -abstract UserCity = User, City ** { - fun - QDistance : City -> City -> Query ; -} ; - diff --git a/grammars/multiple/UserCityEng.gf b/grammars/multiple/UserCityEng.gf deleted file mode 100644 index a30b81510..000000000 --- a/grammars/multiple/UserCityEng.gf +++ /dev/null @@ -1,6 +0,0 @@ -concrete UserCityEng of UserCity = UserEng, CityEng ** open Prelude in - { - lin - QDistance x y = ss (["what is the distance from"] ++ x.s ++ "to" ++ y.s) ; - } - diff --git a/grammars/multiple/UserEng.gf b/grammars/multiple/UserEng.gf deleted file mode 100644 index fcc233ddd..000000000 --- a/grammars/multiple/UserEng.gf +++ /dev/null @@ -1,5 +0,0 @@ -concrete UserEng of User = open Prelude in { - lin - QQuit = ss ["that's enough"] ; -} ; - diff --git a/grammars/multiple/UserMath.gf b/grammars/multiple/UserMath.gf deleted file mode 100644 index 0bb6ebf80..000000000 --- a/grammars/multiple/UserMath.gf +++ /dev/null @@ -1,5 +0,0 @@ -abstract UserMath = User, Math ** { - fun - QSum : Number -> Number -> Query ; -} ; - diff --git a/grammars/multiple/UserMathEng.gf b/grammars/multiple/UserMathEng.gf deleted file mode 100644 index c1a190b47..000000000 --- a/grammars/multiple/UserMathEng.gf +++ /dev/null @@ -1,6 +0,0 @@ -concrete UserMathEng of UserMath = UserEng, MathEng ** open Prelude in - { - lin - QSum x y = ss (["what is the sum of"] ++ x.s ++ "and" ++ y.s) ; - } - diff --git a/grammars/multiple/UserUnionCity.gf b/grammars/multiple/UserUnionCity.gf deleted file mode 100644 index 68115c626..000000000 --- a/grammars/multiple/UserUnionCity.gf +++ /dev/null @@ -1 +0,0 @@ -abstract UserUnionCity = union User, City ; diff --git a/grammars/multiple/map.txt b/grammars/multiple/map.txt deleted file mode 100644 index 1700f967c..000000000 --- a/grammars/multiple/map.txt +++ /dev/null @@ -1,32 +0,0 @@ -Using multiple inheritance in GF. AR 15/9/2004. - -The following diagrams show inheritance between abstract syntaxes in two simple systems. - - TopCity - / | \ - / | \ - SystemCity UserCity Top - / \ / \ - System City User - - - TopMath - / | \ - / | \ - SystemMath UserMath Top - / \ / \ - System Math User - - -Idea of each module: - - User -- User's moves on any domain - System -- System's moves on any domain - Top -- grammar covering both kinds of moves - X = Math, City -- possible domains - UserX -- User's domain specific moves - SystemX -- System's domain specific moves - TopX -- all moves on the domain X - -In parallel to the abstract syntax hierarchies, we have of course -hierarchies of concrete syntaxes for any language; this directory contains Eng. diff --git a/grammars/numerals/Decimal.gf b/grammars/numerals/Decimal.gf deleted file mode 100644 index f72caa92d..000000000 --- a/grammars/numerals/Decimal.gf +++ /dev/null @@ -1,41 +0,0 @@ -concrete Decimal of Numerals = open ResDecimal in { - -flags lexer=chars ; unlexer=concat ; - - -lincat Sub100 = {s : Zeros => Str} ; -lincat Sub1000 = {s : Zeros => Str} ; -lincat Sub1000000 = {s : Zeros => Str} ; - - -lin num n = {s = n.s ! noz} ; -lin n2 = ss "2" ; -lin n3 = ss "3" ; -lin n4 = ss "4" ; -lin n5 = ss "5" ; -lin n6 = ss "6" ; -lin n7 = ss "7" ; -lin n8 = ss "8" ; -lin n9 = ss "9" ; - -lin pot01 = ss "1" ; -lin pot0 d = d ; - -lin pot110 = mkz ("1" ++ "0") ; -lin pot111 = mkz ("1" ++ "1") ; -lin pot1to19 d = mkz ("1" ++ d.s) ; - -lin pot0as1 n = {s = table {noz => n.s ; zz => "0" ++ n.s}} ; - -lin pot1 d = mkz (d.s ++ "0") ; -lin pot1plus d e = mkz (d.s ++ e.s) ; - -lin pot1as2 n = {s = table {noz => n.s ! noz ; zz => "0" ++ n.s ! zz}} ; -lin pot2 d = mkz (d.s ++ "0" ++ "0") ; -lin pot2plus d e = mkz (d.s ++ e.s ! zz) ; - -lin pot2as3 n = {s = table {noz => n.s ! noz ; zz => "0" ++ n.s ! zz}} ; - -lin pot3 n = mkz (n.s ! noz ++ "0" ++ "0" ++ "0") ; -lin pot3plus n m = {s = table {z => n.s ! z ++ m.s ! zz}} ; -} diff --git a/grammars/numerals/English.gf b/grammars/numerals/English.gf deleted file mode 100644 index d4aa3e3de..000000000 --- a/grammars/numerals/English.gf +++ /dev/null @@ -1,39 +0,0 @@ -include numerals.Abs.gf ; - -param DForm = unit | teen | ten ; - -lincat Digit = {s : DForm => Str} ; -lincat Sub10 = {s : DForm => Str} ; - -oper mkNum : Str -> Str -> Str -> Lin Digit = - \two -> \twelve -> \twenty -> - {s = table {unit => two ; teen => twelve ; ten => twenty}} ; -oper regNum : Str -> Lin Digit = - \six -> mkNum six (six + "teen") (six + "ty") ; -oper ss : Str -> {s : Str} = \s -> {s = s} ; - -lin num x = x ; -lin n2 = mkNum "two" "twelve" "twenty" ; -lin n3 = mkNum "three" "thirteen" "thirty" ; -lin n4 = mkNum "four" "fourteen" "forty" ; -lin n5 = mkNum "five" "fifteen" "fifty" ; -lin n6 = regNum "six" ; -lin n7 = regNum "seven" ; -lin n8 = mkNum "eight" "eighteen" "eighty" ; -lin n9 = regNum "nine" ; - -lin pot01 = {s = table {f => "one"}} ; -lin pot0 d = {s = table {f => d.s ! f}} ; -lin pot110 = ss "ten" ; -lin pot111 = ss "eleven" ; -lin pot1to19 d = {s = d.s ! teen} ; -lin pot0as1 n = {s = n.s ! unit} ; -lin pot1 d = {s = d.s ! ten} ; -lin pot1plus d e = {s = d.s ! ten ++ "-" ++ e.s ! unit} ; -lin pot1as2 n = n ; -lin pot2 d = {s = d.s ! unit ++ "hundred"} ; -lin pot2plus d e = {s = d.s ! unit ++ "hundred" ++ "and" ++ e.s} ; -lin pot2as3 n = n ; -lin pot3 n = {s = n.s ++ "thousand"} ; -lin pot3plus n m = {s = n.s ++ "thousand" ++ m.s} ; - diff --git a/grammars/numerals/Nat.gf b/grammars/numerals/Nat.gf deleted file mode 100644 index 742bba27c..000000000 --- a/grammars/numerals/Nat.gf +++ /dev/null @@ -1,55 +0,0 @@ --- Unary and binary natural numbers, and conversions between them. AR 8/10/2003 --- To be used as an example of transfer. - -abstract Nat = Numerals ** { - - cat Nat ; - fun - One : Nat ; -- 1 - Succ : Nat -> Nat ; -- n' - data Nat = One | Succ ; - - cat Bin ; - fun - BOne : Bin ; -- 1 - BX : Bin -> Bin ; -- b 0 - BXPlus : Bin -> Bin ; -- b 1 - data Bin = BOne | BX | BXPlus ; - - fun succ : Bin -> Bin ; - def - succ BOne = BX BOne ; - succ (BX b) = BXPlus b ; - succ (BXPlus BOne) = BX (BX BOne) ; - succ b = succAux b (lastZero b) ; - - fun lastZero : Bin -> Nat ; - def - lastZero (BX _) = One ; - lastZero (BXPlus b) = Succ (lastZero b) ; - - fun succAux : Bin -> Nat -> Bin ; - def - succAux (BXPlus b) One = BX (succ b) ; - succAux (BXPlus b) (Succ n) = BX (succAux b n) ; - succAux b _ = succ b ; - - -- this is the transfer function - fun nat2bin : Nat -> Bin ; - def - nat2bin One = BOne ; - nat2bin (Succ n) = succ (nat2bin n) ; - - -- and the other way round - fun bin2nat : Bin -> Nat ; - def - bin2nat BOne = One ; - bin2nat (BX b) = double (bin2nat b) ; - bin2nat (BXPlus b) = Succ (double (bin2nat b)) ; - - fun double : Nat -> Nat ; - def - double One = Succ One ; - double (Succ n) = Succ (Succ (double n)) ; - -} diff --git a/grammars/numerals/Nat.hs b/grammars/numerals/Nat.hs deleted file mode 100644 index 73bc406ba..000000000 --- a/grammars/numerals/Nat.hs +++ /dev/null @@ -1,46 +0,0 @@ -module Nat where - --- testing transfer from unary to binary, for Nat.gf. AR 8/10/2003 - -data Nat = One | Succ Nat deriving Show - -data Bin = BOne | BX Bin | BXPlus Bin deriving Show - -succBin:: Bin -> Bin -succBin BOne = BX BOne -succBin (BX b) = BXPlus b -succBin (BXPlus BOne) = BX (BX BOne) -succBin b = succAux b (lastZero b) - -lastZero :: Bin -> Nat -lastZero (BX _) = One -lastZero (BXPlus b) = Succ (lastZero b) - -succAux :: Bin -> Nat -> Bin -succAux (BXPlus b) One = BX (succBin b) -succAux (BXPlus b) (Succ n) = BX (succAux b n) -succAux b _ = succBin b - -int2bin :: Int -> Bin -int2bin 1 = BOne -int2bin n = succBin (int2bin (n-1)) - -bin2nat :: Bin -> Nat -bin2nat BOne = One -bin2nat (BX b) = double (bin2nat b) -bin2nat (BXPlus b) = Succ (double (bin2nat b)) - -double :: Nat -> Nat -double One = Succ One -double (Succ n) = Succ (Succ (double n)) - - --- to test - -prBin :: Bin -> String -prBin BOne = "1" -prBin (BX b) = prBin b ++ "0" -prBin (BXPlus b) = prBin b ++ "1" - -test = map (prBin . int2bin) [1..16] -test2 = map (bin2nat . int2bin) [1..16] diff --git a/grammars/numerals/Num2Bin.gf b/grammars/numerals/Num2Bin.gf deleted file mode 100644 index b620acf92..000000000 --- a/grammars/numerals/Num2Bin.gf +++ /dev/null @@ -1,45 +0,0 @@ -transfer Num2Bin : Numerals -> Nat = { - transfer Numeral = num2bin ; - - fun num2bin : Numeral -> Bin ; - def num2bin n = num2nat (nat2bin n) ; - - fun - num2nat : Numeral -> Nat ; - sub1000000_2nat : Sub1000000 -> Nat ; - sub1000_2nat : Sub1000 -> Nat ; - sub100_2nat : Sub100 -> Nat ; - sub10_2nat : Sub10 -> Nat ; - digit2nat : Digit -> Nat ; - - def - num2nat (num n) = sub1000000_2nat n ; - --- - sub1000000_2nat (pot2as3 n) = sub1000_2nat n ; - --- - sub1000_2nat (pot1as2 n) = sub100_2nat n ; - --- - sub100_2nat (pot0as1 n) = sub10_2nat n ; - sub100_2nat (pot1 d) = tenTimes (digit2nat d) ; - --- - sub10_2nat (pot0 d) = digit2nat d ; - - digit2nat n2 = Succ One ; - digit2nat n3 = Succ (digit2nat n2) ; - digit2nat n4 = Succ (digit2nat n3) ; - digit2nat n5 = Succ (digit2nat n4) ; - digit2nat n6 = Succ (digit2nat n5) ; - digit2nat n7 = Succ (digit2nat n6) ; - digit2nat n8 = Succ (digit2nat n7) ; - digit2nat n9 = Succ (digit2nat n8) ; - - fun - tenTimes : Nat -> Nat ; - tenPlus, ninePlus : Nat -> Nat ; - def - tenTimes One = ninePlus One ; -- the price to pay for starting from One - tenTimes (Succ n) = tenPlus (tenTimes n) ; - - tenPlus n = Succ (ninePlus n) ; - ninePlus n = Succ (double (double (double One))) ; -} diff --git a/grammars/numerals/NumSwedish.gf b/grammars/numerals/NumSwedish.gf deleted file mode 100644 index c216ff596..000000000 --- a/grammars/numerals/NumSwedish.gf +++ /dev/null @@ -1,44 +0,0 @@ ---# -path=.:../prelude - -concrete NumSwedish of Numerals = open ResNumSwedish, Prelude in { - - flags startcat = Numeral ; lexer=unglue ; unlexer=glue ; - - lincat Digit = { - s : DForm => Str - } ; - lincat Sub10 = { - s : DForm => Str - } ; - lin n2 = mkTal "två" "tolv" "tjugo" ; - lin n3 = mkTal "tre" "tretton" "trettio" ; - lin n4 = mkTal "fyra" "fjorton" "fyrtio" ; - lin n5 = regTal "fem" ; - lin n6 = regTal "sex" ; - lin n7 = mkTal "sju" "sjutton" "sjuttio" ; - lin n8 = mkTal "åtta" "arton" "åttio" ; - lin n9 = mkTal "nio" "nitton" "nittio" ; - lin num = \x -> x ; - lin pot0 = \d -> { - s = table { - f => d.s ! f - } - } ; - lin pot01 = { - s = table { - f => "ett" - } - } ; - lin pot0as1 = \n -> ss (n.s ! ental); - lin pot1 = \ d -> ss (d.s ! tiotal); - lin pot110 = ss "tio" ; - lin pot111 = ss "elva" ; - lin pot1as2 = \ n -> n ; - lin pot1plus = \ d -> \ e -> ss (glueOpt (d.s ! tiotal) (e.s ! ental)) ; - lin pot1to19 = \ d -> ss (d.s ! ton); - lin pot2 = \ d -> ss (glueOpt (d.s ! ental) "hundra") ; - lin pot2as3 = \ n -> n ; - lin pot2plus = \ d -> \ e -> ss (glueOpt (glueOpt (d.s ! ental) "hundra") e.s); - lin pot3 = \ n -> ss (glueOpt n.s "tusen"); - lin pot3plus = \ n -> \ m -> ss (noglueOpt (glueOpt n.s "tusen") m.s); - } diff --git a/grammars/numerals/Numerals.gf b/grammars/numerals/Numerals.gf deleted file mode 100644 index b725070dc..000000000 --- a/grammars/numerals/Numerals.gf +++ /dev/null @@ -1,34 +0,0 @@ --- numerals from 1 to 999999 in decimal notation - -abstract Numerals = { - -flags startcat=Numeral ; - -cat - Numeral ; -- 0.. - Digit ; -- 2..9 - Sub10 ; -- 1..9 - Sub100 ; -- 1..99 - Sub1000 ; -- 1..999 - Sub1000000 ; -- 1..999999 - -fun - num : Sub1000000 -> Numeral ; - - n2, n3, n4, n5, n6, n7, n8, n9 : Digit ; - - pot01 : Sub10 ; -- 1 - pot0 : Digit -> Sub10 ; -- d * 1 - pot110 : Sub100 ; -- 10 - pot111 : Sub100 ; -- 11 - pot1to19 : Digit -> Sub100 ; -- 10 + d - pot0as1 : Sub10 -> Sub100 ; -- coercion of 1..9 - pot1 : Digit -> Sub100 ; -- d * 10 - pot1plus : Digit -> Sub10 -> Sub100 ; -- d * 10 + n - pot1as2 : Sub100 -> Sub1000 ; -- coercion of 1..99 - pot2 : Sub10 -> Sub1000 ; -- m * 100 - pot2plus : Sub10 -> Sub100 -> Sub1000 ; -- m * 100 + n - pot2as3 : Sub1000 -> Sub1000000 ; -- coercion of 1..999 - pot3 : Sub1000 -> Sub1000000 ; -- m * 1000 - pot3plus : Sub1000 -> Sub1000 -> Sub1000000 ; -- m * 1000 + n -} diff --git a/grammars/numerals/ResDecimal.gf b/grammars/numerals/ResDecimal.gf deleted file mode 100644 index 4b04cb921..000000000 --- a/grammars/numerals/ResDecimal.gf +++ /dev/null @@ -1,7 +0,0 @@ -resource ResDecimal = { - -param Zeros = noz | zz ; - -oper ss : Str -> {s : Str} = \s -> {s = s} ; -oper mkz : Str -> {s : Zeros => Str} = \s -> {s = table {_ => s}} ; -} diff --git a/grammars/numerals/ResNumSwedish.gf b/grammars/numerals/ResNumSwedish.gf deleted file mode 100644 index 2f4c80c9a..000000000 --- a/grammars/numerals/ResNumSwedish.gf +++ /dev/null @@ -1,23 +0,0 @@ -resource ResNumSwedish = { - param DForm = ental | ton | tiotal ; - oper mkTal : Str -> Str -> Str -> { - s : DForm => Str - } - = \ två -> \ tolv -> \ tjugo -> { - s = table { - ental => två ; - ton => tolv ; - tiotal => tjugo - } - } ; - oper regTal : Str -> { - s : DForm => Str - } - = \ fem -> mkTal fem (fem + "ton")(fem + "tio"); - oper ss : Str -> { - s : Str - } - = \ s -> { - s = s - } ; - } diff --git a/grammars/numerals/Symb.gf b/grammars/numerals/Symb.gf deleted file mode 100644 index 0648b778f..000000000 --- a/grammars/numerals/Symb.gf +++ /dev/null @@ -1,12 +0,0 @@ -concrete Symb of Nat = open Prelude in { - lincat Nat, Bin = SS ; - - lin - One = ss "1" ; - Succ = postfixSS "'" ; - - BOne = ss "1" ; - BX = postfixSS "0" ; - BXPlus = postfixSS "1" ; -} - diff --git a/grammars/numerals/Trans.gf b/grammars/numerals/Trans.gf deleted file mode 100644 index 4d46bc7f1..000000000 --- a/grammars/numerals/Trans.gf +++ /dev/null @@ -1,3 +0,0 @@ -transfer Trans : Nat -> Nat = { - transfer Nat = nat2bin ; -} diff --git a/grammars/numerals/old/af_tunni.gf b/grammars/numerals/old/af_tunni.gf deleted file mode 100644 index 600397690..000000000 --- a/grammars/numerals/old/af_tunni.gf +++ /dev/null @@ -1,50 +0,0 @@ -include numerals.Abs.gf ; - -param Size = sg | pl ; -param DForm = unit | ten ; - -oper LinDigit = {s : DForm => Str ; size : Size } ; -oper Form = {s : Str ; size : Size } ; - -lincat Numeral = {s : Str} ; -lincat Digit = LinDigit ; -lincat Sub10 = LinDigit ; -lincat Sub100 = Form ; -lincat Sub1000 = Form ; -lincat Sub1000000 = {s : Str} ; -lin num x0 = - {s = x0.s} ; -- TODO: Encoding - -oper mkNum : Str -> Str -> LinDigit = \mbili -> \lama -> - {s = table {unit => mbili ; ten => lama }; size = pl }; - --- lin n1 = mkNum "ków" ; -lin n2 = mkNum "lámma" "labaatón"; -lin n3 = mkNum "síddi?" "soddón" ; -lin n4 = mkNum "áfar" "afartón"; -lin n5 = mkNum "s^án" "kontón"; -lin n6 = mkNum "lí?" "lihdón"; -lin n7 = mkNum "toddóbo" "toddobátan"; -lin n8 = mkNum "siyéed" "siyyeétan" ; -lin n9 = mkNum "sagáal" "sagaás^an"; - -oper ss : Str -> Form = \s1 -> {s = s1 ; size = pl} ; - -lin pot01 = - {s = table {f => "ków" }; size = sg }; -lin pot0 d = d ; -lin pot110 = ss "tómon" ; -lin pot111 = ss ("tómon" ++ "i" ++ "ków") ; -lin pot1to19 d = ss ("tómon" ++ "i" ++ (d.s ! unit)) ; -lin pot0as1 n = {s = n.s ! unit ; size = n.size } ; -lin pot1 d = ss (d.s ! ten) ; -lin pot1plus d e = ss (d.s ! ten ++ "i" ++ e.s ! unit) ; -lin pot1as2 n = n ; -lin pot2 d = ss (selsg d.size (d.s ! unit) ++ "boqól" ); -lin pot2plus d e = ss ((selsg d.size (d.s ! unit)) ++ "boqól" ++ e.s) ; -lin pot2as3 n = {s = n.s } ; -lin pot3 n = {s = (selsg n.size n.s) ++ "kún"} ; -lin pot3plus n m = {s = (selsg n.size n.s) ++ "kún" ++ m.s} ; - -oper selsg : Size -> Str -> Str = \sz -> \attr -> - table {pl => attr ; sg => [] } ! sz ; diff --git a/grammars/numerals/old/albanian.gf b/grammars/numerals/old/albanian.gf deleted file mode 100644 index dfe0e9f82..000000000 --- a/grammars/numerals/old/albanian.gf +++ /dev/null @@ -1,45 +0,0 @@ -include numerals.Abs.gf ; - -oper bind : Str -> Str -> Str = \a -> \b -> a ++ b ; - -param DForm = unit | teen | ten ; - -oper LinDigit = {s : DForm => Str }; -oper LinSub100 = {s : Str } ; - -lincat Digit = LinDigit ; -lincat Sub10 = LinDigit ; -lincat Sub100 = LinSub100 ; -lincat Sub1000 = LinSub100 ; - -oper mkNum : Str -> LinDigit = \tri -> - { s = table {unit => tri ; teen => tri + "mbë" + "dhjetë" ; ten => tri + "dhjetë" }}; - -lin num x = {s = x.s } ; - -lin n2 = {s = table {unit => "dy" ; teen => "dy" + "mbë" + "dhjetë" ; ten => "njëzet" }}; -lin n3 = mkNum "tre" ; -lin n4 = {s = table {unit => "katër" ; teen => "katër" + "mbë" + "dhjetë" ; ten => "dyzet" } }; -lin n5 = mkNum "pesë" ; -lin n6 = mkNum "gjashtë"; -lin n7 = mkNum "shtatë"; -lin n8 = mkNum "tetë"; -lin n9 = mkNum "nëntë"; - -oper mkR : Str -> LinSub100 = \n -> {s = n } ; - -lin pot01 = { s = table {_ => "një" }}; -lin pot0 d = d ; -lin pot110 = mkR "dhjetë" ; -lin pot111 = mkR ("një" + "mbë" + "dhjetë") ; -lin pot1to19 d = mkR (d.s ! teen) ; -lin pot0as1 n = mkR (n.s ! unit) ; -lin pot1 d = mkR (d.s ! ten) ; -lin pot1plus d e = mkR ((d.s ! ten) ++ "e" ++ (e.s ! unit)) ; -lin pot1as2 n = n ; -lin pot2 d = mkR (bind (d.s ! unit) "qind") ; -lin pot2plus d e = mkR ((bind (d.s ! unit) "qind") ++ "e" ++ e.s) ; -lin pot2as3 n = {s = n.s }; -lin pot3 n = {s = n.s ++ "mijë" } ; -lin pot3plus n m = {s = n.s ++ "mijë" ++ m.s} ; - diff --git a/grammars/numerals/old/amharic.gf b/grammars/numerals/old/amharic.gf deleted file mode 100644 index b02a00456..000000000 --- a/grammars/numerals/old/amharic.gf +++ /dev/null @@ -1,81 +0,0 @@ -include numerals.Abs.gf ; - --- 14, 15 have variants in pronounciation {asraratt, asrammIst} - --- No long consonants marked in the indigen. script --- s is set intersection s --- h is set union h --- H is three-fork h --- x is hook-looking h --- L is sin-looking s --- X is h looking like k with a roof --- ) is chair-vowel i.e historically glottal stop --- ( is round-shape vowel sign i.e historically 3ayn --- Z is zh --- $ is sh --- N is n~ --- I is i" (6th row) --- A is a" (1st row) --- Capitalis for ejectives KPTCS - - -param DForm = unit | ten ; -param Size = sg | pl | tenplus ; -param S100 = indep | tenpart | tenelfu | sihpart ; - -oper LinDigit = {s : DForm => Str ; size : Size} ; -oper LinSub100 = {s : S100 => Str ; size : Size} ; - -lincat Numeral = {s : Str} ; -lincat Digit = LinDigit ; -lincat Sub10 = LinDigit ; -lincat Sub100 = LinSub100 ; -lincat Sub1000 = {s : Str ; s2 : Str ; size : Size } ; -lincat Sub1000000 = {s : Str} ; - -oper mkNum : Str -> Str -> LinDigit = \hulatt -> \haya -> - {s = table {unit => hulatt ; ten => haya} ; size = pl} ; - -lin num x0 = - {s = "/E" ++ x0.s ++ "E/"} ; -lin n2 = mkNum "hulAt" (variants {"haya" ; "Haya" ; "xaya" ; "kaya" }) ; -lin n3 = mkNum "Lost" "LAlasa" ; -lin n4 = mkNum "arat" "arba" ; -lin n5 = mkNum "amIst" (variants { "amsa" ; "xamsa" }) ; -lin n6 = mkNum "sIdIst" (variants { "sIdsa" ; "sIlsa" }) ; -lin n7 = mkNum "sAbat" "sAba" ; -lin n8 = mkNum "sImInt" "sAmanya" ; -lin n9 = mkNum "zATAN" "zATAna" ; - -oper ss1 : Str -> Str -> Str -> LinSub100 = \assir -> \ten -> \unitpart -> - {s = table {indep => assir ; tenpart => ten ; tenelfu => [] ; sihpart => unitpart} ; size = tenplus } ; - -oper ss : Str -> Str -> Str -> LinSub100 = \assir -> \ten -> \unitpart -> - {s = table {indep => assir ; tenpart => ten ; tenelfu => ten ; sihpart => unitpart} ; size = tenplus } ; - -lin pot01 = - {s = table {unit => "and" ; ten => "asra" }; size = sg}; -lin pot0 d = d ; -lin pot110 = ss1 "asIr" "and" [] ; -lin pot111 = ss1 (variants {"asrand" ; "asra" ++ "and" }) "and" Sih ; -lin pot1to19 d = ss1 ("asra" ++ d.s ! unit) "and" (mkSih d.size (d.s ! unit)) ; -lin pot0as1 n = {s = table {indep => n.s ! unit ; sihpart => mkSih n.size (n.s ! unit) ; _ => [] } ; size = n.size} ; -lin pot1 d = ss (d.s ! ten) (d.s ! unit) [] ; -lin pot1plus d e = ss ((d.s ! ten) ++ (e.s ! unit)) - (d.s ! unit) - (mkSih e.size (e.s ! unit)); - -lin pot1as2 n = {s = n.s ! indep ; s2 = n.s ! tenelfu ++ "Ilef" ++ n.s ! sihpart ; size = n.size} ; - -lin pot2 d = {s = (sel d.size [] (d.s ! unit)) ++ "mAto" ; - s2 = sel d.size "asIr" (d.s ! ten) ; size = tenplus} ; -lin pot2plus d e = {s = (sel d.size [] (d.s ! unit)) ++ "mAto" ++ e.s ! indep ; s2 = d.s ! ten ++ e.s ! tenpart ++ "Ilef" ++ e.s ! sihpart ; size = tenplus} ; -lin pot2as3 n = {s = n.s} ; -lin pot3 n = {s = table {pl => n.s ++ Sih ; sg => Sih ; tenplus => n.s2 } ! n.size} ; -lin pot3plus n m = {s = table {pl => n.s ++ Sih ; sg => Sih ; tenplus => n.s2 } ! n.size ++ m.s} ; - -oper Sih : Str = variants {"$ih" ; "$i"} ; - -oper mkSih : Size -> Str -> Str = \sz -> \attr -> (sel sz [] attr) ++ Sih ; - -oper sel : Size -> Str -> Str -> Str = \sz -> \a -> \b -> table {sg => a ; _ => b} ! sz ; \ No newline at end of file diff --git a/grammars/numerals/old/basque.gf b/grammars/numerals/old/basque.gf deleted file mode 100644 index ba77d9219..000000000 --- a/grammars/numerals/old/basque.gf +++ /dev/null @@ -1,59 +0,0 @@ -include numerals.Abs.gf ; - -oper LinDigit = {s : DForm => Str ; even20 : Even20 ; size : Size} ; - -oper mk20Ten : Str -> Str -> Str -> Str -> LinDigit = - \tri -> \t -> \fiche -> \h -> - { s = table {unit => tri ; teen => t ; twenty => fiche ; hund => h + "ehun"} ; even20 = ten ; size = pl} ; - -oper mkEven20 : Str -> Str -> Str -> Str -> LinDigit = - \se -> \t -> \trifichid -> \h -> - { s = table {unit => se ; teen => t ; twenty => trifichid ; hund => h + "ehun"} ; even20 = even ; size = pl} ; - -param Even20 = ten | even ; -param DForm = unit | teen | twenty | hund ; -param Size = sg | pl ; - -lincat Numeral = {s : Str} ; -lincat Digit = LinDigit ; -lincat Sub10 = LinDigit ; -lincat Sub100 = {s : Str ; size : Size} ; -lincat Sub1000 = {s : Str ; size : Size } ; -lincat Sub1000000 = {s : Str} ; -lin num x0 = - {s = x0.s} ; -lin n2 = mkEven20 "bi" "hamabi" "hogei" "berr" ; -lin n3 = mk20Ten "hiru" (variants {"hamahiru" ; "hamahirur"}) "hogei" "hirur"; -lin n4 = mkEven20 "lau" (variants {"hamalau" ; "hamalaur"}) "berrogei" "laur"; -lin n5 = mk20Ten "bost" (variants {"hamabost" ; "hamabortz"}) "berrogei" "bost"; -lin n6 = mkEven20 "sei" "hamasei" "hirurogei" "seir" ; -lin n7 = mk20Ten "zazpi" "hamazazpi" "hirurogei" "zazpi" ; -lin n8 = mkEven20 "zortzi" "hemezortzi" "laurogei" "zortzi" ; -lin n9 = mk20Ten "bederatzi" "hemeretzi" "laurogei" "bederatzi" ; - -lin pot01 = - {s = table {unit => "bat" ; hund => "ehun" ; _ => "dummy"} ; even20 = ten ; size = sg}; -lin pot0 d = {s = d.s ; even20 = d.even20 ; size = d.size} ; -lin pot110 = {s = "hamar" ; size = pl} ; -lin pot111 = {s = variants {"hamaika" ; "hameka"} ; size = pl} ; -lin pot1to19 d = {s = d.s ! teen ; size = pl} ; -lin pot0as1 n = {s = n.s ! unit ; size = n.size} ; -lin pot1 d = - {s = table {even => d.s ! twenty ; - ten => d.s ! twenty ++ "tahamar"} ! d.even20 ; -- glue - size = pl} ; -lin pot1plus d e = - {s = table {even => d.s ! twenty ++ "ta" ++ e.s ! unit; - ten => d.s ! twenty ++ "ta" ++ e.s ! teen} ! (d.even20) ; - size = pl} ; - -lin pot1as2 n = n ; -lin pot2 d = {s = d.s ! hund ; size = pl} ; -lin pot2plus d e = - {s = variants {d.s ! hund ++ e.s ; d.s ! hund ++ "ta" ++ e.s} ; size = pl} ; -lin pot2as3 n = - {s = n.s } ; -lin pot3 n = - {s = table {sg => [] ; pl => n.s } ! n.size ++ "mila"} ; -lin pot3plus n m = - {s = table {sg => [] ; pl => n.s } ! n.size ++ "mila" ++ "ta" ++ m.s } ; diff --git a/grammars/numerals/old/bearlake_slave.gf b/grammars/numerals/old/bearlake_slave.gf deleted file mode 100644 index 32329bcf8..000000000 --- a/grammars/numerals/old/bearlake_slave.gf +++ /dev/null @@ -1,44 +0,0 @@ -include numerals.Abs.gf ; - -param DForm = unit | hundred ; - -oper LinDigit = {s : Str } ; - -lincat Digit = LinDigit ; -lincat Sub10 = LinDigit ; -lincat Sub100 = {s : Str } ; -lincat Sub1000 = {s : Str } ; - -oper mkNum : Str -> LinDigit = \two -> - {s = two } ; - --- TODO: Transl. - -lin num x = x ; --- lin n1 mkNum "l-ée" ; -lin n2 = mkNum "nákee" ; -lin n3 = mkNum "tai" ; -lin n4 = mkNum "di,i," ; -lin n5 = mkNum "so,lái" ; -lin n6 = mkNum "?ehts'é,tai" ; -lin n7 = mkNum "l-á,hdi,i," ; -lin n8 = mkNum "?ehts'é,di,i," ; -lin n9 = mkNum "l-óto," ; - -oper o : Str = "?ó," ; - -lin pot01 = {s = "l-ée" } ; -lin pot0 d = d ; -lin pot110 = {s = variants {"honéno," ; "hóno" }} ; -lin pot111 = {s = variants {"honéno," ; "hóno" } ++ o ++ "l-ée" } ; -lin pot1to19 d = {s = (variants {"honéno," ; "hóno" }) ++ o ++ d.s } ; -lin pot0as1 n = n ; -lin pot1 d = {s = d.s ++ (variants {"honéno," ; "óno,"})} ; -lin pot1plus d e = {s = d.s ++ (variants {"honéno," ; "óno,"}) ++ o ++ e.s } ; -lin pot1as2 n = n ; -lin pot2 d = {s = d.s ++ "lak'o, óno,"} ; -lin pot2plus d e = {s = d.s ++ "lak'o, óno," ++ e.s} ; -lin pot2as3 n = n ; -lin pot3 n = {s = n.s ++ "lamíl"} ; -lin pot3plus n m = {s = n.s ++ "lamíl" ++ m.s } ; - diff --git a/grammars/numerals/old/biblical_hebrew.gf b/grammars/numerals/old/biblical_hebrew.gf deleted file mode 100644 index d95ebfcc6..000000000 --- a/grammars/numerals/old/biblical_hebrew.gf +++ /dev/null @@ -1,88 +0,0 @@ -include numerals.Abs.gf ; - -param DForm = unit Place | cons | ten | hund ; -param Size = small | large | dual ; -param Place = attr | indep ; -lincat Numeral = {s : Str} ; -lincat Digit = {s : DForm => Str ; size : Size} ; -lincat Sub10 = {s : DForm => Str ; size : Size} ; -lincat Sub100 = {s : Place => Str ; size : Size} ; -lincat Sub1000 = {s : Place => Str ; size : Size} ; -lincat Sub1000000 = {s : Str} ; -lin num x0 = - {s = "/+" ++ x0.s ++ "+/"} ; -- the Hebrew environment - -lin n2 = - {s = table {(unit attr) => [] ; - (unit indep) => "snyM" ; - cons => "sny" ; - ten => "osryM" ; - hund => "matyM"} ; size = dual} ; -lin n3 = - {s = table {(unit _) => "slsh" ; - cons => "slst" ; - ten => "slsyM" ; - hund => "sls" ++ "mawt"} ; size = small} ; -lin n4 = - {s = table {(unit _) => "arboh" ; - cons => "arbot" ; - ten => "arboyM" ; - hund => "arbo" ++ "mawt"} ; size = small} ; -lin n5 = - {s = table {(unit _) => "Hmsh" ; - cons => "Hmst" ; - ten => "HmsyM" ; - hund => "Hms" ++ "mawt"} ; size = small} ; -lin n6 = - {s = table {(unit _) => "ssh" ; - cons => "sst" ; - ten => "ssyM" ; - hund => "ss" ++ "mawt"} ; size = small} ; -lin n7 = - {s = table {(unit _) => "sboh" ; - cons => "sbot" ; - ten => "sboyM" ; - hund => "sbo" ++ "mawt"} ; size = small} ; -lin n8 = - {s = table {(unit _) => "smnh" ; - cons => "smnt" ; - ten => "smnyM" ; - hund => "smnh" ++ "mawt"} ; size = small} ; -lin n9 = - {s = table {(unit _) => "tsoh" ; - cons => "tsot" ; - ten => "tsoyM" ; - hund => "tso" ++ "mawt"} ; size = small} ; - -lin pot01 = - {s = table {hund => "mah"; (unit attr) => [] ; f => "aHd"} ; size = large} ; -lin pot0 d = - {s = d.s ; size = d.size} ; -lin pot110 = - {s = table {_ => "osr"} ; size = small} ; -lin pot111 = - {s = table {_ => variants {"aHd" ++ "osr" ; "osty" ++ "osr"} } ; size = large} ; -lin pot1to19 d = - {s = table {_ => d.s ! unit indep ++ "osr"} ; size = large} ; -lin pot0as1 n = - {s = table {p => n.s ! unit p} ; size = n.size} ; -lin pot1 d = - {s = table {_ => d.s ! ten} ; size = large} ; -lin pot1plus d e = - {s = table {_ => d.s ! ten ++ "w" ++ e.s ! unit indep} ; size = large} ; -lin pot1as2 n = - {s = n.s ; size = n.size} ; -lin pot2 d = - {s = table {_ => d.s ! hund} ; size = large} ; -lin pot2plus d e = - {s = table {_ => d.s ! hund ++ "w" ++ e.s ! indep} ; size = large} ; -lin pot2as3 n = - {s = n.s ! indep} ; -lin pot3 n = - {s = n.s ! attr ++ Alf ! n.size} ; -lin pot3plus n m = - {s = n.s ! attr ++ Alf ! n.size ++ "w" ++ m.s ! indep} ; - -oper Alf : Size => Str = - table {{small} => "alpyM" ; {dual} => "alpyM" ; _ => "alP"} ; - diff --git a/grammars/numerals/old/bulgarian.gf b/grammars/numerals/old/bulgarian.gf deleted file mode 100644 index fd330152f..000000000 --- a/grammars/numerals/old/bulgarian.gf +++ /dev/null @@ -1,51 +0,0 @@ --- ä is ya --- q is [ch] --- w for [sh] --- j for i kratkoe i.e i with a thing - -include numerals.Abs.gf ; - -param Size = sg | below10 | tenover ; -param DForm = unit | teen | ten | hundred ; - -oper LinDigit = {s : DForm => Str ; size : Size } ; - -lincat Digit = LinDigit ; -lincat Sub10 = LinDigit ; -lincat Sub100 = {s : Str ; size : Size } ; -lincat Sub1000 = {s : Str ; size : Size } ; - -oper mkNum : Str -> Str -> Str -> LinDigit = \tri -> \trijset -> \trista -> - { s = table {unit => tri ; teen => variants {tri + "nadeset" ; tri + "najset" }; ten => trijset ; hund => trista} ; size = below10}; - -lin num x = {s = "/_" ++ x.s ++ "_/"} ; -- the (Russian) Cyrillic ad-hoc translation - -lin n2 = {s = table {unit => "dve" ; teen => variants {"dvanadeset" ; "dvanajset"}; ten => "dvajset" ; hund => "dvesta" } ; size = below10 } ; -lin n3 = mkNum "tri" (variants {"trijset"; "trideset"}) "trista" ; -lin n4 = mkNum "qetiri" (variants {"qetiriset" ; "qetirijset" ; "qetirideset"}) "qetiristotin" ; -lin n5 = mkNum "pet" "petdeset" "petstotin" ; -lin n6 = mkNum "west" (variants {"westdeset" ; "wejset"}) "weststotin" ; -lin n7 = mkNum "sedem" "sedemdeset" "sedemstotin" ; -lin n8 = mkNum "osem" "osemdeset" "osemstotin" ; -lin n9 = mkNum "devet" "devetdeset" "devetstotin" ; - -lin pot01 = { s = table {unit => "edno" ; hundred => "sot" ; _ => "dummy" } ; size = sg }; -lin pot0 d = d ; -lin pot110 = {s = "deset" ; size = below10}; -lin pot111 = {s = variants {"edinadeset" ; "edinajset" }; size = tenover}; -lin pot1to19 d = {s = d.s ! teen ; size = tenover}; -lin pot0as1 n = {s = n.s ! unit ; size = n.size } ; -lin pot1 d = {s = d.s ! ten ; size = tenover} ; -lin pot1plus d e = {s = d.s ! ten ++ "i" ++ e.s ! unit ; size = tenover} ; -lin pot1as2 n = n ; -lin pot2 d = {s = d.s ! hundred ; size = tenover} ; -lin pot2plus d e = { s = d.s ! hundred ++ maybei e.size ++ e.s ; size = tenover } ; -lin pot2as3 n = {s = n.s }; -lin pot3 n = {s = mkThou n.size n.s} ; -lin pot3plus n m = {s = mkThou n.size n.s ++ m.s} ; - -oper mkThou : Size -> Str -> Str = \sz -> \attr -> - table {sg => "xiläda" ; _ => attr ++ "xilädi" } ! sz ; - -oper maybei : Size -> Str = \sz -> table {tenover => [] ; _ => "i"} ! sz ; - diff --git a/grammars/numerals/old/catalan.gf b/grammars/numerals/old/catalan.gf deleted file mode 100644 index b1396c6b3..000000000 --- a/grammars/numerals/old/catalan.gf +++ /dev/null @@ -1,56 +0,0 @@ -include numerals.Abs.gf ; - -oper bind : Str -> Str -> Str = \s1 -> \s2 -> s1 ++ s2 ; - -param DForm = unit | teen | ten | hundred | vint ; -param Size = sg | two | pl ; - -lincat Numeral = {s : Str} ; -lincat Digit = {s : DForm => Str ; size : Size } ; -lincat Sub10 = {s : DForm => Str ; size : Size } ; -lincat Sub100 = {s : Str ; size : Size} ; -lincat Sub1000 = {s : Str ; size : Size} ; -lincat Sub1000000 = {s : Str} ; - -oper mkNum : Str -> Str -> Str -> Lin Digit = - \dois -> \doze -> \vinte -> - {s = table {unit => dois ; teen => doze ; ten => vinte ; hundred => dois + "-" + "cents" ; vint => "vint-i-" + dois } ; size = pl} ; - -lin num x0 = - {s = x0.s} ; - -lin n2 = {s = table {unit => "dos" ; teen => "dotze" ; ten => "vint" ; hundred => "dos-cents" ; vint => "vint-i-" + "dos" } ; size = two } ; -lin n3 = mkNum "tres" "tretze" "trenta" ; -lin n4 = mkNum "quatre" "catorze" "quaranta" ; -lin n5 = mkNum "cinc" "quinze" "cinqanta" ; -lin n6 = mkNum "sis" "setze" "seixanta" ; -lin n7 = mkNum "set" "disset" "setanta" ; -lin n8 = mkNum "vuit" "divuit" "vuitanta" ; -lin n9 = mkNum "nou" "dinou" "noranta" ; - -lin pot01 = {s = table {unit => "u" ; hundred => "cent" ; vint => "vint-i-" + "u" ; _ => "dummy"} ; size = sg} ; -lin pot0 d = d ; -lin pot110 = - {s = "deu" ; size = pl} ; -lin pot111 = - {s = "onze" ; size = pl} ; -lin pot1to19 d = - {s = d.s ! teen ; size = pl} ; -lin pot0as1 n = - {s = n.s ! unit ; size = n.size } ; -lin pot1 d = - {s = d.s ! ten ; size = pl} ; -lin pot1plus d e = - {s = table {two => e.s ! vint ; _ => bind (bind (d.s ! ten) "-") (e.s ! unit) } ! d.size ; size = pl} ; -lin pot1as2 n = n ; -lin pot2 d = - {s = d.s ! hundred ; size = pl} ; -lin pot2plus d e = - {s = d.s ! hundred ++ e.s ; size = pl} ; -lin pot2as3 n = - {s = n.s } ; -lin pot3 n = - {s = table {sg => "mil" ; _ => n.s ++ "mil"} ! n.size} ; -lin pot3plus n m = - {s = table {sg => "mil" ; _ => n.s ++ "mil"} ! n.size ++ m.s } ; - diff --git a/grammars/numerals/old/classical_arabic.gf b/grammars/numerals/old/classical_arabic.gf deleted file mode 100644 index 767be53d6..000000000 --- a/grammars/numerals/old/classical_arabic.gf +++ /dev/null @@ -1,96 +0,0 @@ -include numerals.Abs.gf ; - --- There is uncertainty as to wthere forms like 102 000 should be --- hundred and thousand or hundred and two thousands or --- as implemented hundred and two thousand - -param DForm = unit Place | teen | ten | hund ; -param Size = sg | pl | dual | eleventonineteen ; -param Place = attr | indep ; -lincat Numeral = {s : Str} ; -lincat Digit = {s : DForm => Str ; size : Size} ; -lincat Sub10 = {s : DForm => Str ; size : Size} ; -lincat Sub100 = {s : Place => Str ; size : Size} ; -lincat Sub1000 = {s : Place => Str ; size : Size} ; -lincat Sub1000000 = {s : Str} ; -lin num x0 = - {s = "/6" ++ x0.s ++ "6/"} ; -- the Arabic0x0600 environment - -lin n2 = - {s = table {(unit attr) => [] ; - (unit indep) => "avnan" ; - teen => "avna" ; - ten => "ocrwn" ; - hund => "maOtan"} ; size = dual} ; -lin n3 = - {s = table {(unit _) => "vlavA" ; - teen => "vlavA" ; - ten => "vlavwn" ; - hund => variants {"vlav" ++ "maOA" ; "vlavmaOA"}} ; - size = pl} ; -lin n4 = - {s = table {(unit _) => "urboA" ; - teen => "urboA" ; - ten => "urbown" ; - hund => variants {"urbo" ++ "maOA" ; "urbomaOA"}} ; - size = pl} ; -lin n5 = - {s = table {(unit _) => "CmsA" ; - teen => "CmsA" ; - ten => "Cmswn" ; - hund => variants {"Cms" ++ "maOA" ; "CmsmaOA"}} ; size = pl} ; -lin n6 = - {s = table {(unit _) => "stA" ; - teen => "stA" ; - ten => "stwn" ; - hund => variants {"st" ++ "maOA" ; "stmaOA"}} ; size = pl} ; -lin n7 = - {s = table {(unit _) => "sboA" ; - teen => "sboA" ; - ten => "sbown" ; - hund => variants {"sbo" ++ "maOA" ; "sbomaOA"}} ; size = pl} ; -lin n8 = - {s = table {(unit _) => "vmanyA" ; - teen => "vmanyA" ; - ten => "vmanwn" ; - hund => variants {"vman" ++ "maOA" ; "vmanmaOA"}} ; - size = pl} ; -lin n9 = - {s = table {(unit _) => "tsoA" ; - teen => "tsoA" ; - ten => "tsown" ; - hund => variants {"tso" ++ "maOA" ; "tsomaOA"}} ; - size = pl} ; - -lin pot01 = - {s = table {hund => (variants {"maOA" ; "m0A"} ) ; (unit attr) => [] ; f => "waHd"} ; size = sg} ; -lin pot0 d = - {s = d.s ; size = d.size} ; -lin pot110 = - {s = table {_ => "ocrA"} ; size = pl} ; -lin pot111 = - {s = table {_ => "aHd" ++ "ocr"} ; size = eleventonineteen} ; -lin pot1to19 d = - {s = table {_ => d.s ! teen ++ "ocr"} ; size = eleventonineteen} ; -lin pot0as1 n = - {s = table {p => n.s ! unit p} ; size = n.size} ; -lin pot1 d = - {s = table {_ => d.s ! ten} ; size = eleventonineteen} ; -lin pot1plus d e = - {s = table {_ => e.s ! unit indep ++ "w" ++ d.s ! ten} ; size = e.size} ; -lin pot1as2 n = - {s = n.s ; size = n.size} ; -lin pot2 d = - {s = table {_ => d.s ! hund} ; size = pl} ; -lin pot2plus d e = - {s = table {_ => d.s ! hund ++ "w" ++ e.s ! indep} ; size = e.size} ; -lin pot2as3 n = - {s = n.s ! indep} ; -lin pot3 n = - {s = n.s ! attr ++ Alf ! n.size} ; -lin pot3plus n m = - {s = n.s ! attr ++ Alf ! n.size ++ "w" ++ m.s ! indep} ; - -oper Alf : Size => Str = - table {{pl} => "Ulaf" ; {dual} => "alfan" ; {eleventonineteen} => "alfa" ; sg => "alf"} ; - diff --git a/grammars/numerals/old/classical_greek.gf b/grammars/numerals/old/classical_greek.gf deleted file mode 100644 index 44ce57fe7..000000000 --- a/grammars/numerals/old/classical_greek.gf +++ /dev/null @@ -1,197 +0,0 @@ -include numerals.Abs.gf ; --- Classical Greek (of Athens) --- Aarne's transliteration --- There are attested variant forms. kai:s between the elements in bigger -> --- smaller order is also possible but not common. - -param DForm = unit | tkismyr | teen | ten | hund | kisxil | kismyr | - tenkismyr | tenkis ; -param InterData = indep Order | xiliad | myriad Order ; -param Tenpart = kis1 | tkis1 ; -param Size = sg | pl | tenoverpl ; -param Order = des | asc; -lincat Numeral = {s : Str} ; - -oper LinDigit = {s : DForm => Str} ; -oper LinSub1000 = {s : InterData => Str ; size : Size} ; - -lincat Digit = LinDigit ; -lincat Sub10 = {s : DForm => Str ; - size : Size} ; -lincat Sub100 = {s : InterData => Str ; - s1 : Tenpart => Str ; - s2 : Str ; - size : Size} ; -lincat Sub1000 = LinSub1000 ; -lincat Sub1000000 = {s : Str} ; -lin num x0 = - {s = "//" ++ x0.s ++ "//"} ; -- Greek environment - -oper mkNum : Str -> Str -> Str -> Str -> Str -> Str -> Str -> LinDigit = - \dyo -> \dis -> \dwdekakis -> \dwdeka -> \eikosi -> \diakosioi -> - \eikosakis -> - {s = table {unit => dyo ; - tkismyr => dwdekakis + "m'yrioi" ; - teen => dwdeka ; - ten => eikosi ; - hund => diakosioi ; - kisxil => dis + "c'ilioi" ; - kismyr => dis + "m'yrioi" ; - tenkis => eikosakis ; - tenkismyr => eikosakis + "m'yrioi"} }; - -lin n2 = mkNum - "d'yo" - "dis" - "dwdekakis" - "d'wdeka" - "e)'ikosi" - "diak'osioi" - "e)ikos'akis" ; - -lin n3 = mkNum - "tre~ij" - "tris" - "treiskaidekakis" - (variants {"tre~ij" ++ "ka`i" ++ "d'eka" ; "treiska'ideka"} ) - "tri'akonta" - "triak'osioi" - "triakont'akis" ; - -lin n4 = mkNum - "t'ettarej" - "tetrakis" - "tettareskaidekakis" - (variants {"t'ettarej" ++ "ka`i" ++ "d'eka" ; "tettareska'ideka"}) - "tettar'akonta" - "tetrak'osioi" - "tettarakont'akis" ; - -lin n5 = mkNum - "p'ente" - "pentakis" - "pentekaidekakis" - "penteka'ideka" - "pent'hkonta" - "pentak'osioi" - "penthkont'akis" ; - -lin n6 = mkNum - "('ex" - "(exakis" - "(ekkaidekakis" - "(ekka'ideka" - "(ex'hkonta" - "(exak'osioi" - "(exhkont'akis" ; - -lin n7 = mkNum - "(ept'a" - "(eptakis" - "(eptakaidekakis" - "(eptaka'ideka" - "(ebdom'hkonta" - "(eptak'osioi" - "(ebdomhkont'akis" ; - -lin n8 = mkNum - ")okt'w" - ")oktakis" - ")oktwkaidekakis" - ")oktwka'ideka" - ")ogdo'hkonta" - ")oktak'osioi" - ")ogdohkont'akis" ; - -lin n9 = mkNum - ")enn'ea" - ")enakis" - ")enneakaidekakis" - ")enneaka'ideka" - ")enen'hkonta" - ")enak'osioi" - ")enenhkont'akis" ; - -lin pot01 = - {s = table {hund => "(ekat'on" ; - kisxil => "c'ilioi" ; - kismyr => "('apax" + "m'yrioi" ; - _ => "e('ij" } ; - size = sg} ; -lin pot0 d = - {s = d.s ; size = pl} ; -lin pot110 = - {s = table {xiliad => "dummy" ; - (myriad _) => "m'yrioi" ; - (indep _) => "d'eka" }; - s1 = table {kis1 => "('apax" + "m'yrioi" ; tkis1 => "(endek'akis" + "m'yrioi"} ; - s2 = [] ; - size = tenoverpl} ; -lin pot111 = - {s = table {xiliad => "dummy" ; - (myriad des) => "m'yrioi" ++ "c'ilioi" ; - (myriad asc) => "c'ilioi" ++ "ka`i" ++ "m'yrioi" ; - (indep _) => "('endeka" } ; - s1 = table {kis1 => "('apax" + "m'yrioi" ; tkis1 => "(endek'akis" + "m'yrioi"} ; - s2 = "c'ilioi" ; - size = tenoverpl} ; -lin pot1to19 d = - {s = table {xiliad => "dummy" ; - (myriad des) => "m'yrioi" ++ d.s ! kisxil ; - (myriad asc) => d.s ! kisxil ++ "ka`i" ++ "m'yrioi" ; - (indep _) => d.s ! teen } ; - s1 = table {kis1 => "('apax" + "m'yrioi" ; tkis1 => "(endek'akis" + "m'yrioi" } ; - s2 = d.s ! kisxil ; - size = tenoverpl} ; -lin pot0as1 n = - {s = table {xiliad => n.s ! kisxil ; - (indep _) => n.s ! unit ; - (myriad _) => "dummy" } ; - s1 = table {_ => []} ; - s2 = n.s ! kisxil ; - size = n.size} ; -lin pot1 d = - {s = table {xiliad => "dummy" ; - (myriad _) => d.s ! kismyr ; - (indep _) => d.s ! ten} ; - s1 = table {kis1 => d.s ! kismyr ; tkis1 => d.s ! tkismyr } ; - s2 = []; - size = tenoverpl} ; -lin pot1plus d e = - {s = table {xiliad => "dummy" ; - (myriad des) => d.s ! kismyr ++ e.s ! kisxil ; - (myriad asc) => e.s ! kisxil ++ "ka`i" ++ d.s ! kismyr ; - (indep des) => d.s ! ten ++ e.s ! unit ; - (indep asc) => e.s ! unit ++ "ka`i" ++ d.s ! ten } ; - s1 = table {kis1 => d.s ! kismyr ; tkis1 => d.s ! tkismyr } ; - s2 = e.s ! kisxil ; - size = tenoverpl} ; -lin pot1as2 n = - {s = n.s ; size = n.size} ; -lin pot2 d = - {s = table {(indep _) => d.s ! hund ; - (myriad _) => d.s ! tenkismyr; - xiliad => "dummy"} ; - size = tenoverpl} ; -lin pot2plus d e = - {s = table {(myriad _) => table {sg => e.s1 ! tkis1 ; - pl => d.s ! tenkis ++ e.s1 ! kis1 ; - tenoverpl => "dummy" } ! d.size ++ e.s2 ; - (indep des) => d.s ! hund ++ e.s ! indep des ; - (indep asc) => (e.s ! indep asc) ++ "ka`i" ++ d.s ! hund ; - xiliad => "dummy" } ; - size = tenoverpl} ; - -lin pot2as3 n = - {s = variants { n.s ! indep des ; n.s ! indep asc}} ; -lin pot3 n = - {s = variants {(Myr n des) ! n.size ; (Myr n asc) ! n.size} } ; -lin pot3plus n m = - {s = variants {(Myr n des) ! n.size ++ m.s ! indep des; - m.s ! indep asc ++ "ka`i" ++ (Myr n asc) ! n.size }} ; - -oper Myr : LinSub1000 -> Order -> Size => Str = \n -> \order -> - table {sg => "c'ilioi" ; - pl => n.s ! xiliad ; - tenoverpl => n.s ! myriad order} ; - diff --git a/grammars/numerals/old/croatian.gf b/grammars/numerals/old/croatian.gf deleted file mode 100644 index 501c81dcc..000000000 --- a/grammars/numerals/old/croatian.gf +++ /dev/null @@ -1,69 +0,0 @@ -include numerals.Abs.gf ; - -param DForm = unit | teen | ten | hund ; - --- [c^], [s^], [c'] - - -param ThForm = onlyone | lastone | twoorthreeorfour | fiveup ; - -oper LinDigit = {s : DForm => Str; o : ThForm ; t : ThForm } ; -lincat Digit = LinDigit ; -lincat Sub10 = {s : DForm => Str; o : ThForm ; t : ThForm } ; -lincat Sub100 = {s : Str; t : ThForm } ; -lincat Sub1000 = {s : Str; t : ThForm } ; - -oper mkNum : Str -> Str -> Str -> Str -> ThForm -> LinDigit = - \dwa -> \dwanascie -> \dwadziescia -> \dwiescie -> \thform -> - { s = table {unit => dwa ; teen => dwanascie ; ten => dwadziescia ; hund => -dwiescie }; - o = thform ; t = thform - }; - -oper mkRegNum : Str -> LinDigit = - \sedam -> - { s = table { unit => sedam ; teen => sedam + "naest" ; - ten => sedam + "deset" ; hund => sedam ++ "stotina" - }; - o = fiveup ; t = fiveup - }; - -oper mkTh : Str -> ThForm => Str = \attr -> - table { onlyone => variants {"hiljada" ; "tisuc'a"} ; lastone => attr ++ "hiljada" ; - twoorthreeorfour => attr ++ "hiljade" ; fiveup => attr ++ "hiljada" - }; - -oper ss : Str -> ThForm -> {s : Str ; t : ThForm} = \str -> \th -> {s = str; t = th} ; - -lin num x = {s = "/L" ++ x.s ++ "L/"} ; -- Latin A Supplement environment - -lin n2 = mkNum "dva" "dvanaest" "dvadeset" (variants { "dve" ++ "stotine" ; "dvesta" } ) twoorthreeorfour ; -lin n3 = mkNum "tri" "trinaest" "trideset" (variants { "tri" ++ "stotine" ; "trista" } ) twoorthreeorfour ; -lin n4 = mkNum "c^etiri" "c^etrnaest" "c^etrdeset" ("c^etiri" ++ "stotine") twoorthreeorfour ; -lin n5 = mkNum "pet" "petnaest" "pedeset" ("pet" ++ "stotina") fiveup ; -lin n6 = mkNum "s^est" "s^esnaest" "s^ezdeset" ("s^est" ++ "stotina") fiveup ; -lin n7 = mkRegNum "sedam" ; -lin n8 = mkRegNum "osam" ; -lin n9 = mkNum "devet" "devetnaest" "devedeset" ("devet" ++ "stotina") fiveup; - -lin pot01 = { s = table {hund => variants {"sto" ; "stotina" }; f => "jedan" }; - o = onlyone ; t = lastone - }; -lin pot0 d = {s = table {f => d.s ! f} ; o = d.o ; t = d.t} ; -lin pot110 = ss "deset" fiveup ; -lin pot111 = ss "jedanaest" fiveup ; -lin pot1to19 d = {s = d.s ! teen ; t = fiveup} ; -lin pot0as1 n = {s = n.s ! unit ; t = n.o} ; -lin pot1 d = {s = d.s ! ten ; t = fiveup} ; -lin pot1plus d e = {s = d.s ! ten ++ "i" ++ e.s ! unit; t = e.t} ; -lin pot1as2 n = n ; -lin pot2 d = {s = d.s ! hund ; t = fiveup} ; -lin pot2plus d e = { s = d.s ! hund ++ e.s ; - t = table { onlyone => lastone ; f => f } ! e.t - } ; - -lin pot2as3 n = n ; -lin pot3 n = {s = (mkTh n.s) ! n.t} ; -lin pot3plus n m = {s = (mkTh n.s) ! n.t ++ m.s} ; - - diff --git a/grammars/numerals/old/czech.gf b/grammars/numerals/old/czech.gf deleted file mode 100644 index 880bd25d5..000000000 --- a/grammars/numerals/old/czech.gf +++ /dev/null @@ -1,58 +0,0 @@ -include numerals.Abs.gf ; - -oper bind : Str -> Str -> Str = \s1 -> \s2 -> s1 ++ s2 ; - --- [c^], [s^], [r^], [e^] - -param Size = sg | twothreefour | fiveup ; -param DForm = unit | teen | ten | hundred ; - -lincat Digit = {s : DForm => Str ; size : Size} ; -lincat Sub10 = {s : DForm => Str ; size : Size} ; -lincat Sub100 = {s : Str; size : Size } ; -lincat Sub1000 = {s : Str; size : Size } ; - -oper mkNum : Str -> Str -> Str -> Str -> Size -> Lin Digit = - \dva -> \dvanast -> \dvadsat -> \dveste -> \sz -> - { s = table {unit => dva ; teen => dvanast + "náct" ; ten => dvadsat ; hundred => dveste } ; size = sz }; - -oper mk2Num : Str -> Str -> Str -> Str -> Lin Digit = \unit -> \teenbase -> \tenbase -> \hundred -> - mkNum unit teenbase (tenbase + "cet") hundred twothreefour ; - -oper mk5Num : Str -> Str -> Str -> Lin Digit = \unit -> \teenbase -> \tenbase -> - mkNum unit teenbase (tenbase + "desát") (unit ++ "set") fiveup ; - -lin num x = {s = "/L" ++ x.s ++ "L/" } ; -- Latin A supplement encoding - -lin n2 = mk2Num "dva" "dva" "dva" ("dve^" ++ "ste^") ; -lin n3 = mk2Num "tr^i" "tr^i" "tr^i" ("tr^i" ++ "sta") ; -lin n4 = mk2Num "c^tyr^i" "c^tr" "c^tyr^i" ("c^tyr^i" ++ "sta") ; -lin n5 = mk5Num "pe^t" "pat" "pa" ; -lin n6 = mk5Num "s^est" "s^est" "s^e" ; -lin n7 = mk5Num "sedm" "sedm" "sedm"; -lin n8 = mk5Num "osm" "osm" "osm"; -lin n9 = mk5Num "deve^t" "devate" "deva" ; - -lin pot01 = {s = table {unit => "jeden" ; hundred => "sto" ; _ => "dummy" } ; - size = sg } ; -lin pot0 d = d ; -lin pot110 = {s = "deset" ; size = fiveup } ; -lin pot111 = {s = "jedenáct" ; size = fiveup }; -lin pot1to19 d = {s = d.s ! teen ; size = fiveup} ; -lin pot0as1 n = {s = n.s ! unit ; size = n.size} ; -lin pot1 d = {s = d.s ! ten ; size = fiveup} ; -lin pot1plus d e = {s = variants { d.s ! ten ++ e.s ! unit ; bind (bind (e.s ! unit) "a") (d.s ! ten)} ; size = tfSize e.size} ; -lin pot1as2 n = n ; -lin pot2 d = {s = d.s ! hundred ; size = fiveup} ; -lin pot2plus d e = {s = d.s ! hundred ++ e.s ; size = tfSize e.size} ; -lin pot2as3 n = {s = n.s } ; -lin pot3 n = {s = (mkTh n.s) ! n.size} ; -lin pot3plus n m = {s = (mkTh n.s) ! n.size ++ m.s} ; - -oper tfSize : Size -> Size = \sz -> - table {sg => fiveup ; other => other} ! sz ; - -oper mkTh : Str -> Size => Str = \attr -> - table {sg => "tisíc" ; - twothreefour => attr ++ "tisíce" ; - fiveup => attr ++ "tisíc" } ; diff --git a/grammars/numerals/old/dagur.gf b/grammars/numerals/old/dagur.gf deleted file mode 100644 index 80cfdf45b..000000000 --- a/grammars/numerals/old/dagur.gf +++ /dev/null @@ -1,59 +0,0 @@ -include numerals.Abs.gf ; - -param DForm = unit | ten ; -param Size = sg | pl | tenplus ; -param S100 = indep | tenpart | tenelfu | sihpart ; - -lincat Numeral = {s : Str} ; -oper LinDigit = {s : DForm => Str ; size : Size} ; -lincat Digit = LinDigit ; -lincat Sub10 = LinDigit ; -oper LinSub100 = {s : S100 => Str ; size : Size} ; -lincat Sub100 = LinSub100 ; -lincat Sub1000 = {s : Str ; s2 : Str ; size : Size } ; -lincat Sub1000000 = {s : Str} ; - -oper mkNum : Str -> Str -> LinDigit = \hulatt -> \haya -> - {s = table {unit => hulatt ; ten => haya} ; size = pl} ; - -lin num x0 = - {s = x0.s } ; -lin n2 = mkNum "hoire" "hori" ; -lin n3 = mkNum "guarebe" "goci" ; -lin n4 = mkNum "durube" "duci" ; -lin n5 = mkNum "taau" "tabi" ; -lin n6 = mkNum "jireuoo" "jari" ; -lin n7 = mkNum "doloo" "dale" ; -lin n8 = mkNum "naime" "nai" ; -lin n9 = mkNum "ise" "ire" ; - -oper ss1 : Str -> Str -> Str -> LinSub100 = \assir -> \ten -> \unitpart -> - {s = table {indep => assir ; tenpart => ten ; tenelfu => [] ; sihpart => unitpart} ; size = tenplus } ; - -oper ss : Str -> Str -> Str -> LinSub100 = \assir -> \ten -> \unitpart -> - {s = table {indep => assir ; tenpart => ten ; tenelfu => ten ; sihpart => unitpart} ; size = tenplus } ; - -lin pot01 = - {s = table {unit => "neke" ; ten => "harebe" }; size = sg}; -lin pot0 d = d ; -lin pot110 = ss1 "harebe" "neke" [] ; -lin pot111 = ss1 ("hareben" ++ "neke") "neke" "miange" ; -lin pot1to19 d = ss1 ("hareben" ++ d.s ! unit) "neke" (mkmiange d.size (d.s ! unit)) ; -lin pot0as1 n = {s = table {indep => n.s ! unit ; sihpart => mkmiange n.size (n.s ! unit) ; _ => [] } ; size = n.size} ; -lin pot1 d = ss (d.s ! ten) (d.s ! unit) [] ; -lin pot1plus d e = ss ((d.s ! ten) ++ (e.s ! unit)) - (d.s ! unit) - (mkmiange e.size (e.s ! unit)); - -lin pot1as2 n = {s = n.s ! indep ; s2 = n.s ! tenelfu ++ "tume" ++ n.s ! sihpart ; size = n.size} ; - -lin pot2 d = {s = (sel d.size [] (d.s ! unit)) ++ "jau" ; - s2 = sel d.size "harebe" (d.s ! ten) ; size = tenplus} ; -lin pot2plus d e = {s = (sel d.size [] (d.s ! unit)) ++ "jau" ++ e.s ! indep ; s2 = d.s ! ten ++ e.s ! tenpart ++ "tume" ++ e.s ! sihpart ; size = tenplus} ; -lin pot2as3 n = {s = n.s} ; -lin pot3 n = {s = table {pl => n.s ++ "miange" ; sg => "miange" ; tenplus => n.s2 } ! n.size} ; -lin pot3plus n m = {s = table {pl => n.s ++ "miange" ; sg => "miange" ; tenplus => n.s2 } ! n.size ++ m.s} ; - -oper mkmiange : Size -> Str -> Str = \sz -> \attr -> (sel sz [] attr) ++ "miange" ; - -oper sel : Size -> Str -> Str -> Str = \sz -> \a -> \b -> table {sg => a ; _ => b} ! sz ; \ No newline at end of file diff --git a/grammars/numerals/old/demo.gfs b/grammars/numerals/old/demo.gfs deleted file mode 100644 index 34e2e657c..000000000 --- a/grammars/numerals/old/demo.gfs +++ /dev/null @@ -1,49 +0,0 @@ -i -old -abs=Nums -cnc=Decimal numerals.Dec.gf -i -old -abs=Nums -cnc=Amharic amharic.gf -i -old -abs=Nums -cnc=Basque basque.gf ---i -old -abs=Nums biblical_hebrew.gf ---i -old -abs=Nums classical_arabic.gf -i -old -abs=Nums -cnc=Greek classical_greek.gf ---i -old -abs=Nums croatian.gf -i -old -abs=Nums -cnc=Geez geez.gf -i -old -abs=Nums -cnc=Hindi hindi.gf -i -old -abs=Nums -cnc=Hungarian hungarian.gf -i -old -abs=Nums -cnc=Icelandic icelandic.gf -i -old -abs=Nums -cnc=Irish irish.gf ---i -old -abs=Nums italian.gf ---i -old -abs=Nums japanese.gf ---i -old -abs=Nums khowar.gf ---i -old -abs=Nums korean.gf ---i -old -abs=Nums kulung.gf ---i -old -abs=Nums modern_greek.gf ---i -old -abs=Nums mongolian.gf -i -old -abs=Nums -cnc=Arabic numerals.Ara.gf -i -old -abs=Nums -cnc=Hebrew numerals.Heb.gf ---i -old -abs=Nums numerals.ChiU.gf ---i -old -abs=Nums numerals.Dan.gf -i -old -abs=Nums -cnc=German numerals.Deu.gf -i -old -abs=Nums -cnc=English numerals.Eng.gf -i -old -abs=Nums -cnc=French numerals.Fra.gf -i -old -abs=Nums -cnc=Malay numerals.Malay.gf -i -old -abs=Nums -cnc=Dutch numerals.Ned.gf ---i -old -abs=Nums numerals.NorB.gf -i -old -abs=Nums -cnc=Russian numerals.Rus.gf -i -old -abs=Nums -cnc=Finnish numerals.Suo.gf -i -old -abs=Nums -cnc=Swedish numerals.Swe.gf ---i -old -abs=Nums numerals.Tam.gf -i -old -abs=Nums -cnc=OldChurchSlavonic old_church_slavonic.gf -i -old -abs=Nums -cnc=Pashto pashto.gf ---i -old -abs=Nums polish.gf ---i -old -abs=Nums portuguese.gf -i -old -abs=Nums -cnc=Quechua quechua.gf ---i -old -abs=Nums romanian.gf -i -old -abs=Nums -cnc=Sanskrit sanskrit.gf ---i -old -abs=Nums slovak.gf ---i -old -abs=Nums sorani.gf ---i -old -abs=Nums spanish.gf ---i -old -abs=Nums swiss_french.gf ---i -old -abs=Nums tamil.gf ---i -old -abs=Nums tibetan.gf ---i -old -abs=Nums totonac.gf -i -old -abs=Nums -cnc=Turkish turkish.gf ---ts -lang -f diff --git a/grammars/numerals/old/fulfulde.gf b/grammars/numerals/old/fulfulde.gf deleted file mode 100644 index 0531d35de..000000000 --- a/grammars/numerals/old/fulfulde.gf +++ /dev/null @@ -1,50 +0,0 @@ -include numerals.Abs.gf ; - -param Size = sg | pl | two; - -oper Form = {s : Str ; size : Size } ; - -lincat Numeral = {s : Str} ; -lincat Digit = Form ; -lincat Sub10 = Form ; -lincat Sub100 = Form ; -lincat Sub1000 = Form ; -lincat Sub1000000 = {s : Str} ; -lin num x0 = - {s = x0.s} ; -- TODO: Encoding - -oper mkNum = ss ; - -oper ss : Str -> Form = \f -> {s = f ; size = pl } ; - --- lin n1 = mkNum "go'o" ; -lin n2 = {s = "d.id.i" ; size = two } ; -lin n3 = mkNum "tati" ; -lin n4 = mkNum "nai" ; -lin n5 = mkNum "jowi" ; -lin n6 = mkNum "jowe:go" ; -lin n7 = mkNum "jowe:d.id.i" ; -lin n8 = mkNum "jowe:tati" ; -lin n9 = mkNum "jowe:nai" ; - -lin pot01 = {s = "go'o" ; size = sg }; -lin pot0 d = d ; -lin pot110 = ss "sappo" ; -lin pot111 = ss ("sappo" ++ "e" ++ "go'o") ; -lin pot1to19 d = ss ("sappo" ++ "e" ++ d.s) ; -lin pot0as1 n = n ; -lin pot1 d = ss (mkten d.size d.s) ; -lin pot1plus d e = ss ((mkten d.size d.s) ++ "e" ++ e.s) ; -lin pot1as2 n = n ; -lin pot2 d = ss (mkhund d.size d.s) ; -lin pot2plus d e = ss ((mkhund d.size d.s) ++ "e" ++ e.s) ; -lin pot2as3 n = n ; -lin pot3 n = ss (mkthou n.size n.s) ; -lin pot3plus n m = ss ((mkthou n.size n.s) ++ m.s) ; - -oper mkten : Size -> Str -> Str = \sz -> \attr -> - table {two => "no:gas" ; _ => "chappand.e" ++ attr } ! sz ; -oper mkhund : Size -> Str -> Str = \sz -> \attr -> - table {sg => "temerre" ; _ => "temed.d.e" ++ attr} ! sz ; -oper mkthou : Size -> Str -> Str = \sz -> \attr -> - table {sg => "ujine:re"; _ => variants {"ujine" ++ attr ; "ujine:je" ++ attr}} ! sz ; diff --git a/grammars/numerals/old/geez.gf b/grammars/numerals/old/geez.gf deleted file mode 100644 index 9178f8760..000000000 --- a/grammars/numerals/old/geez.gf +++ /dev/null @@ -1,121 +0,0 @@ -include numerals.Abs.gf ; - --- No long consonants marked in the indigen. script --- s is set intersection s --- h is set union h --- H is three-fork h --- x is hook-looking h --- L is sin-looking s --- X is h looking like k with a roof --- Z is zh --- $ is sh --- ) is the glottal stop hamza = independent vowel in word --- ( is 3ayn --- Capitalis for ejectives KPTCS --- stress not indicated in indigen. script - -param DForm = unit | ten ; -param Size = sg | less100 | more100 ; -param Ending = zero | nonzero | tenzero; -param S100 = tenp | tenpalf | unitp ; -param S1000 = indep | alf | tenm | tailform ; - -oper LinDigit = {s : DForm => Str ; size : Size} ; - -lincat Numeral = {s : Str} ; -lincat Digit = LinDigit ; -lincat Sub10 = {s : DForm => Str ; size : Size} ; -lincat Sub100 = {s : Str ; s2 : S100 => Str ; unitp_ending : Ending ; size : Size} ; -lincat Sub1000 = {s : S1000 => Str ; ending : Ending ; size : Size } ; -lincat Sub1000000 = {s : Str} ; -lin num x0 = - {s = "/E" ++ x0.s ++ "E/"} ; -- The Ethiopic script environment -lin n2 = mkNum "kïl)etu" "(ï$ra" ; -lin n3 = mkNum "Lälastu" "Lälasa" ; -lin n4 = mkNum ")ärba(tu" ")ärbï(a" ; -lin n5 = mkNum "xämïstu" "xämsa" ; -lin n6 = mkNum "sïdïstu" "sïssa" ; -lin n7 = mkNum (variants { "säb(ätu" ; "säb(atu" }) "säb(a" ; -lin n8 = mkNum (variants { "sämantu" ; "sämanitu" }) "sämanya" ; -lin n9 = mkNum (variants { "tïs(ätu" ; "täs(ätu" ; "täsa(tu" }) (variants {"täs(a" ; "tïs(a"}) ; - -oper mkNum : Str -> Str -> LinDigit = \tva -> \tjugo -> - {s = table {unit => tva ; ten => tjugo} ; size = less100 } ; - -lin pot01 = - {s = table {unit => ")äHädu" ; ten => "(ä$ärtu" } ; size = sg}; -lin pot0 d = d ; -lin pot110 = {s = "(ä$ärtu" ; - s2 = table {tenp => "wä" ++ ")äHädu" ; - tenpalf => ")ïlf" ; - unitp => [] } ; - unitp_ending = zero ; - size = less100} ; -lin pot111 = {s = "(ä$ärtu" ++ "wä" ++ ")äHädu" ; - s2 = table {tenp => "wä" ++ ")äHädu" ; - tenpalf => ")ïlf" ; - unitp => "(ä$ärtu" } ; - unitp_ending = nonzero ; - size = less100} ; -lin pot1to19 d = - {s = "(ä$ärtu" ++ "wä" ++ d.s ! unit ; - s2 = table {tenp => "wä" ++ ")äHädu" ; - tenpalf => ")ïlf" ; - unitp => d.s ! ten } ; - unitp_ending = nonzero ; - size = less100} ; -lin pot0as1 n = - {s = n.s ! unit ; - s2 = table {unitp => n.s ! ten ; _ => [] }; - unitp_ending = nonzero ; - size = n.size} ; -lin pot1 d = - {s = d.s ! ten ; - s2 = table {tenp => "wä" ++ d.s ! unit ; - tenpalf => d.s ! unit ++ ")ïlf" ; - unitp => [] } ; - unitp_ending = tenzero ; - size = less100} ; -lin pot1plus d e = - {s = d.s ! ten ++ "wä" ++ e.s ! unit ; - s2 = table {tenp => "wä" ++ d.s ! unit ; - tenpalf => d.s ! unit ++ ")ïlf" ; - unitp => e.s ! ten } ; - unitp_ending = nonzero ; - size = less100} ; -lin pot1as2 n = - {s = table {indep => n.s ; - tailform => n.s ; - tenm => n.s2 ! unitp ; - alf => n.s2 ! tenpalf ++ n.s2 ! unitp } ; - ending = n.unitp_ending ; - size = n.size} ; -lin pot2 d = - {s = table {indep => table {sg => "mï)t" ; _ => d.s ! unit ++ "mï)t" } ! d.size ; - tenm => "dummy" ; - alf => d.s ! ten ++ ")ïlf" ; - tailform => d.s ! unit ++ "mï)t" } ; - size = more100 ; - ending = zero} ; -lin pot2plus d e = - {s = table {indep => table {sg => "mï)t" ; _ => d.s ! unit ++ "mï)t" } ! d.size ++ e.s ; - tenm => "dummy"; - alf => d.s ! ten ++ e.s2 ! tenp ++ ")ïlf" ++ e.s2 ! unitp ; - tailform => d.s ! unit ++ "mï)t" ++ e.s} ; - size = more100 ; - ending = e.unitp_ending } ; - -lin pot2as3 n = {s = n.s ! indep } ; -lin pot3 n = - {s = table {more100 => mkmit n.ending (n.s ! alf) ; _ => n.s ! tenm ++ "mï)t"} ! n.size} ; -lin pot3plus n m = - {s = table - {more100 => table {more100 => n.s ! alf ; less100 => n.s ! alf ; _ => n.s ! tenm} ! n.size ++ - table {zero => m.s ! indep ; - tenzero => m.s ! indep ; - nonzero => "wä" ++ m.s ! tailform } ! n.ending; - _ => table {more100 => mkmit n.ending (n.s ! alf) ; - less100 => n.s ! alf ++ table {nonzero => "mï)t" ; _ => []} ! n.ending ; - _ => n.s ! tenm ++ "mï)t"} ! n.size ++ m.s ! indep} ! m.size } ; - -oper mkmit : Ending -> Str -> Str = \e -> \s -> table {zero => [] ; _ => s ++"mï)t" } ! e; \ No newline at end of file diff --git a/grammars/numerals/old/guahibo.gf b/grammars/numerals/old/guahibo.gf deleted file mode 100644 index d9cb69ebc..000000000 --- a/grammars/numerals/old/guahibo.gf +++ /dev/null @@ -1,45 +0,0 @@ -include numerals.Abs.gf ; - -oper bind : Str -> Str -> Str = \a -> \b -> a ++ b ; - -param Size = sg | pl ; - -oper All = {s : Str ; size : Size}; - -lincat Digit = All ; -lincat Sub10 = All ; -lincat Sub100 = All ; -lincat Sub1000 = All ; - -oper mkNum : Str -> All = \tri -> - { s = tri ; size = pl}; - -lin num x = {s = x.s } ; - -lin n2 = mkNum "aniha" ; -lin n3 = mkNum "akueya" ; -lin n4 = mkNum "yana" ; -lin n5 = mkNum "kobe" ; -lin n6 = mkNum "ku" ; -lin n7 = mkNum "iwi" ; -lin n8 = mkNum "yu" ; -lin n9 = mkNum "ho" ; - -oper ss : Str -> All = \s1 -> {s = s1 ; size = pl } ; - -lin pot01 = { s = "kae" ; size = sg}; -lin pot0 d = d ; -lin pot110 = ss "xu" ; -lin pot111 = ss ("xu" + "kae") ; -lin pot1to19 d = ss (bind "xu" d.s) ; -lin pot0as1 n = n ; -lin pot1 d = ss (bind d.s "bae" ); -lin pot1plus d e = ss ((bind d.s "bae") ++ e.s ) ; -lin pot1as2 n = n ; -lin pot2 d = ss (bind ((selsg d.s) ! d.size) "sia" ) ; -lin pot2plus d e = ss ((bind ((selsg d.s) ! d.size) "sia") ++ e.s) ; -lin pot2as3 n = {s = n.s }; -lin pot3 n = {s = bind ((selsg n.s) ! n.size) "sunu" } ; -lin pot3plus n m = {s = (bind ((selsg n.s) ! n.size) "sunu") ++ m.s} ; - -oper selsg : Str -> Size => Str = \s -> table {sg => [] ; pl => s } ; \ No newline at end of file diff --git a/grammars/numerals/old/guarani.gf b/grammars/numerals/old/guarani.gf deleted file mode 100644 index 7fbfa5d9b..000000000 --- a/grammars/numerals/old/guarani.gf +++ /dev/null @@ -1,48 +0,0 @@ -include numerals.Abs.gf ; - -oper bind : Str -> Str -> Str = \a -> \b -> a ++ b ; - -param Size = sg | pl ; - -oper All = {s : Str ; s2 : Str ; size : Size}; - -lincat Digit = All ; -lincat Sub10 = All ; -lincat Sub100 = {s : Str ; size : Size} ; -lincat Sub1000 = {s : Str ; size : Size} ; - -oper mkNum : Str -> All = \tri -> - { s = tri ; s2 = "kua" + tri ; size = pl}; - -oper mkNum2 : Str -> Str -> All = \tri -> \teen -> - { s = tri ; s2 = "kua" + teen ; size = pl}; - -lin num x = {s = x.s } ; -- TODO - -lin n2 = mkNum2 "moko~i" "ko~i"; -lin n3 = mkNum2 "mpohapy" "py"; -lin n4 = mkNum2 "irundy" "rundy"; -lin n5 = mkNum "po" ; -lin n6 = mkNum "potei~" ; -lin n7 = mkNum "poko~i" ; -lin n8 = mkNum "poapy" ; -lin n9 = mkNum "porundy" ; - -oper ss : Str -> {s : Str ; size : Size} = \s1 -> {s = s1 ; size = pl } ; - -lin pot01 = { s = "petei~" ; s2 = "dummy" ; size = sg}; -lin pot0 d = d ; -lin pot110 = ss "kua~" ; -lin pot111 = ss ("kua" + "tei~") ; -lin pot1to19 d = ss d.s2 ; -lin pot0as1 n = {s = n.s ; size = n.size} ; -lin pot1 d = ss (bind d.s "kua~" ); -lin pot1plus d e = ss ((bind d.s "kua~") ++ e.s ) ; -lin pot1as2 n = n ; -lin pot2 d = ss (((selsg d.s) ! d.size) ++ "sa~" ) ; -lin pot2plus d e = ss ((((selsg d.s) ! d.size) ++ "sa~") ++ e.s) ; -lin pot2as3 n = {s = n.s }; -lin pot3 n = {s = bind ((selsg n.s) ! n.size) "ma" } ; -lin pot3plus n m = {s = (bind ((selsg n.s) ! n.size) "ma") ++ m.s} ; - -oper selsg : Str -> Size => Str = \s -> table {sg => variants {[]; "petei~"}; pl => s } ; \ No newline at end of file diff --git a/grammars/numerals/old/hindi.gf b/grammars/numerals/old/hindi.gf deleted file mode 100644 index 15a874f89..000000000 --- a/grammars/numerals/old/hindi.gf +++ /dev/null @@ -1,99 +0,0 @@ -include numerals.Abs.gf ; - -param DForm = unit | ten ; -param DSize = sg | r2 | r3 | r4 | r5 | r6 | r7 | r8 | r9 ; -param Size = sing | less100 | more100 ; - -oper LinDigit = {s : DForm => Str ; size : DSize} ; -lincat Digit = LinDigit ; -lincat Sub10 = {s : DForm => Str ; size : DSize} ; -lincat Sub100 = {s : Str ; size : Size} ; -lincat Sub1000 = {s : Str ; s2 : Str ; size : Size } ; - -lin num x0 = - {s = "/&" ++ x0.s ++ "&/"} ; -- the Devana:gari environment - - --- H is for aspiration (h is a sepaarate letter) --- M is anusvara --- ~ is candrabindhu --- c is is Eng. ch in e.g chop --- cH is chH --- _: is length --- T, D, R are the retroflexes - -oper mkNum : Str -> Str -> DSize -> LinDigit = - \do -> \bis -> \sz -> - {s = table {unit => do ; ten => bis } ; - size = sz } ; - --- lin n1 mkNum "ek" "gya:rah" "das" -lin n2 = mkNum "do" "bi:s" r2 ; -lin n3 = mkNum "ti:n" "ti:s" r3 ; -lin n4 = mkNum "ca:r" "ca:li:s" r4 ; -lin n5 = mkNum "pa:~nc" "paca:s" r5 ; -lin n6 = mkNum (variants {"cHah" ; "cHa;" ; "cHai"}) "sa:TH" r6 ; -lin n7 = mkNum "sa:t" "sattar" r7; -lin n8 = mkNum "a:TH" "assi:" r8; -lin n9 = mkNum "nau" (variants {"navve" ; "nabbe" }) r9 ; - -oper mkR : Str -> Str -> Str -> Str -> Str -> Str -> Str -> Str -> Str -> DSize => Str = \a1 -> \a2 -> \a3 -> \a4 -> \a5 -> \a6 -> \a7 -> \a8 -> \a9 -> table { - sg => a1 + "ah" ; - r2 => a2 + "i:s" ; - r3 => a3 + "ti:s" ; - r4 => a4 + "a:li:s" ; - r5 => a5 + "an" ; - r6 => a6 + "saTH" ; - r7 => a7 + "hattar" ; - r8 => a8 + "a:si:" ; - r9 => a9 + "a:nave" -} ; - -oper rows : DSize => DSize => Str = table { - sg => mkR "gya:r" "ikk" "ikat" "ekt" "ikya:v" "ik" "ik" "iky" "iky" ; - r2 => mkR "ba:r" "ba:" "bat" "bay" "ba:v" "ba:" "ba" "bay" "b" ; - r3 => mkR "ter" "te" "taiM" "taiMt" "tirp" "tir" "ti" "tir" "tir" ; - r4 => mkR "caud" "caub" "cauM" "cav" "caup" "cauM" "cau" "caur" "caur" ; - r5 => mkR "paMdr" "pacc" "paiM" "paiMt" "pacp" "paiM" "pac" "pac" "pac" ; - r6 => mkR "sol" "cHabb" "cHat" "cHiy" "cHapp" "cHiya:" "cHi" "cHiy" "cHiy" ; - r7 => mkR (variants { "sattr" ; "satr"}) "satta:v" "saiM" "saiMt" "satta:" "sar" "sat" (variants {"satt" ; "sat" }) "satt" ; - r8 => mkR "aTHa:r" "aTTHa:" "aR" "aRt" "aTTHa:v" "aR" "aTH" (variants { "aTTH" ; "aTH" }) "aTTH" ; - r9 => table {sg => "unni:s" ; r2 => "unati:s" ; r3 => "unata:li:s" ; - r4 => "unaca:s" ; r5 => "unasaTH" ; r6 => "unahattar" ; - r7 => (variants{"unna:si:" ; "unya:si:"}) ; - r8 => "nava:si:" ; r9 => "ninya:nave" } -} ; - -oper ss : Str -> {s : Str} = \s -> {s = s} ; - -lin pot01 = {s = table {unit => "ek" ; _ => "dummy" } ; size = sg} ; -lin pot0 d = d ; -lin pot110 = {s = "das" ; size = less100} ; -lin pot111 = {s = rows ! sg ! sg ; size = less100} ; -lin pot1to19 d = {s = rows ! d.size ! sg ; size = less100} ; -lin pot0as1 n = {s = n.s ! unit ; size = table {sg => sing ; _ => less100} ! n.size } ; - -lin pot1 d = {s = d.s ! ten ; size = less100} ; -lin pot1plus d e = {s = rows ! e.size ! d.size ; size = less100} ; - -lin pot1as2 n = {s = n.s ; s2 = "dummy" ; size = n.size } ; -lin pot2 d = {s = (mksau (d.s ! unit) d.size) ; - s2 = d.s ! unit ++ "la:kH" ; size = more100} ; -lin pot2plus d e = - {s = (mksau (d.s ! unit) d.size) ++ e.s ; - s2 = (d.s ! unit) ++ "la:kH" ++ (mkhazar e.s e.size) ; - size = more100} ; - -lin pot2as3 n = {s = n.s } ; -lin pot3 n = {s = table { sing => ekhazar ; - less100 => n.s ++ "haza:r" ; - more100 => n.s2 } ! n.size} ; -lin pot3plus n m = - {s = table {sing => ekhazar ; - less100 => n.s ++ "haza:r" ; - more100 => n.s2 } ! n.size ++ m.s} ; - - -oper ekhazar : Str = variants {"haza:r" ; "ek" ++ "haza:r"} ; -oper mkhazar : Str -> Size -> Str = \s -> \sz -> table {sing => ekhazar ; _ => s ++ "haza:r"} ! sz ; -oper mksau : Str -> DSize -> Str = \s -> \sz -> table {sg => "sau" ; _ => s ++ "sau"} ! sz ; diff --git a/grammars/numerals/old/hungarian.gf b/grammars/numerals/old/hungarian.gf deleted file mode 100644 index 2489fb6ef..000000000 --- a/grammars/numerals/old/hungarian.gf +++ /dev/null @@ -1,61 +0,0 @@ -include numerals.Abs.gf ; - --- by Patrik Jansson, Chalmers - -param DForm = ental | tiotal ; -param Place = attr | indep ; -lincat Numeral = {s : Str} ; -lincat Digit = {s : (DForm*Place) => Str} ; -lincat Sub10 = {s : (DForm*Place) => Str} ; -lincat Sub100 = {s : Place => Str} ; -lincat Sub1000 = {s : Place => Str} ; -lincat Sub1000000 = {s : Str} ; -lin num x0 = - {s = x0.s} ; -lin n2 = - {s = table { => "kettö" ; - => "húsz" ; - => "két" ; - => "huszon"}} ; -lin n3 = - {s = table { => "három" ; => "harminc"}} ; -lin n4 = - {s = table { => "négy" ; => "negyven"}} ; -lin n5 = - {s = table { => "öt" ; => "ötven"}} ; -lin n6 = - {s = table { => "hat" ; => "hatvan"}} ; -lin n7 = - {s = table { => "hét" ; => "hetven"}} ; -lin n8 = - {s = table { => "nyolc" ; => "nyolcvan"}} ; -lin n9 = - {s = table { => "kilenc" ; => "kilencven"}} ; -lin pot01 = - {s = table { => [] ; => "egy"}} ; -lin pot0 d = - {s = table { => d.s ! }} ; -lin pot110 = - {s = table {p => "tíz"}} ; -lin pot111 = - {s = table {p => "tizen" ++ "egy"}} ; -lin pot1to19 d = - {s = table {p => "tizen" ++ d.s ! }} ; -lin pot0as1 n = - {s = table {p => n.s ! }} ; -lin pot1 d = - {s = table {p => d.s ! }} ; -lin pot1plus d e = - {s = table {p => (d.s ! ) ++ e.s ! }} ; -lin pot1as2 n = - {s = table {p => n.s ! p}} ; -lin pot2 d = - {s = table {p => (d.s ! ) ++ "száz"}} ; -lin pot2plus d e = - {s = table {p => (d.s ! ) ++ "száz" ++ e.s ! indep}} ; -lin pot2as3 n = - {s = n.s ! indep} ; -lin pot3 n = - {s = n.s ! attr ++ "ezer"} ; -lin pot3plus n m = - {s = n.s ! attr ++ "ezer" ++ m.s ! indep} ; diff --git a/grammars/numerals/old/icelandic.gf b/grammars/numerals/old/icelandic.gf deleted file mode 100644 index 1933f7332..000000000 --- a/grammars/numerals/old/icelandic.gf +++ /dev/null @@ -1,51 +0,0 @@ -include numerals.Abs.gf ; - -param DForm = unit | teen | ten | neuter ; -param Gen = com | neut ; -param Size = sg | less10 | pl ; - -oper LinDigit = {s : DForm => Str} ; - -lincat Digit = LinDigit ; -lincat Sub10 = {s : DForm => Str ; size : Size} ; -lincat Sub100 = {s : Gen => Str ; size : Size} ; -lincat Sub1000 = {s : Gen => Str ; size : Size} ; - -oper mkNum : Str -> Str -> Str -> Str -> LinDigit = - \two -> \twelve -> \twenty -> \tvo -> - {s = table {unit => two ; teen => twelve ; ten => twenty ; neuter => tvo}} ; -oper regNum : Str -> LinDigit = - \fimm -> mkNum fimm (fimm + "tán") (fimm + "tíu") fimm; - -oper ss : Str -> {s : Gen => Str ; size : Size} = \s -> {s = table {_ => s } ; size = pl}; - -lin num x = x ; -lin n2 = mkNum "tveir" "tólf" "tuttugu" "tvö" ; -lin n3 = mkNum "Þrír" "Þréttán" "Þrjátíu" "Þrjú" ; -lin n4 = mkNum "fjórir" "fjórtán" "fjörutíu" "fjögur"; -lin n5 = regNum "fimm" ; -lin n6 = regNum "sex" ; -lin n7 = mkNum "sjö" "sautján" "sjötíu" "sjö" ; -lin n8 = mkNum "átta" "átján" "áttíu" "átta" ; -lin n9 = mkNum "níu" "nítján" "níutíu" "níu" ; - -lin pot01 = {s = table {f => "einn"} ; size = sg } ; -lin pot0 d = {s = d.s ; size = less10 } ; -lin pot110 = ss "tíu" ; -lin pot111 = ss "ellefu" ; -lin pot1to19 d = ss (d.s ! teen) ; -lin pot0as1 n = {s = table {com => n.s ! unit ; neut => n.s ! neuter } ; size = n.size } ; -lin pot1 d = {s = table {_ => d.s ! ten } ; size = pl}; -lin pot1plus d e = {s = table {com => d.s ! ten ++ "og" ++ e.s ! unit ; - neut => d.s ! ten ++ "og" ++ e.s ! neuter} ; size = pl} ; -lin pot1as2 n = n ; -lin pot2 d = {s = table {_ => omitsg (d.s ! neuter) d.size ++ "hundrað" } ; size = pl} ; -lin pot2plus d e = {s = table {f => omitsg (d.s ! neuter) d.size ++ "hundrað" ++ (maybeog) e.size ++ e.s ! f} ; size = pl} ; - -lin pot2as3 n = {s = n.s ! com } ; -lin pot3 n = {s = omitsg (n.s ! neut) n.size ++ "Þúsund"} ; -lin pot3plus n m = {s = omitsg (n.s ! neut) n.size ++ "Þúsund" ++ (maybeog m.size) ++ m.s ! com} ; - - -oper maybeog : Size -> Str = \sz -> table {pl => [] ; _ => "og" } ! sz ; -oper omitsg : Str -> Size -> Str = \s -> \sz -> table {sg => [] ; _ => s } ! sz ; \ No newline at end of file diff --git a/grammars/numerals/old/irish.gf b/grammars/numerals/old/irish.gf deleted file mode 100644 index 71e44a783..000000000 --- a/grammars/numerals/old/irish.gf +++ /dev/null @@ -1,79 +0,0 @@ -include numerals.Abs.gf ; - --- Not the archaic base-10 system fiche, triocha, daichead, caoga, seasca, seachtó, ochtó, nócha --- scór can be used in place of fiche but is not implemented (since it's much less preferred) - -oper LinDigit = {s : DForm => Str ; even20 : Even20 ; size : Size} ; -oper mk20Ten : Str -> Str -> Size -> LinDigit = - \tri -> \fiche -> \thesize -> - { s = table {unit => tri ; twenty => fiche ; teen => tri ++ "déag" ; attrib => tri} ; even20 = ten ; size = thesize} ; - -oper mkEven20 : Str -> Str -> Size -> LinDigit = - \se -> \trifichid -> \thesize -> - { s = table {unit => se ; twenty => trifichid ; teen => se ++ "déag" ; attrib => se} ; even20 = even ; size = thesize} ; - -param HForm = attr | indep ; -param Even20 = ten | even ; -param DForm = unit | twenty | teen | attrib ; -param Size = sg | onetosix | seventonine | tenover | eventen ; - -lincat Numeral = {s : Str} ; -lincat Digit = LinDigit ; -lincat Sub10 = LinDigit ; -lincat Sub100 = {s : HForm => Str ; size : Size} ; -lincat Sub1000 = {s : HForm => Str ; size : Size } ; -lincat Sub1000000 = {s : Str} ; -lin num x0 = - {s = x0.s} ; -lin n2 = - {s = table {unit => "dó" ; twenty => "fiche" ; attrib => "dhá" ; teen => "dó" ++ "dhéag" } ; even20 = even ; size = onetosix } ; -lin n3 = mk20Ten "trí" "fiche" onetosix ; -lin n4 = - {s = table {unit => "ceathair" ; twenty => "dhá" ++ "fhichead" ; teen => "dó" ++ "dhéag" ; attrib => "ceithre" } ; even20 = even ; size = onetosix} ; -lin n5 = mk20Ten "cúig" ("dhá" ++ "fhichead") onetosix ; -lin n6 = mkEven20 "sé" ("trí" ++ "fichid") onetosix ; -lin n7 = mk20Ten "seacht" ("trí" ++ "fichid") seventonine ; -lin n8 = mkEven20 "hocht" ("cheithre" ++ "fichid") seventonine ; -lin n9 = mk20Ten "naoi" ("cheithre" ++ "fichid") seventonine ; - -lin pot01 = - {s = table {unit => "haon" ; attrib => [] ; _ => "dummy"} ; even20 = ten ; size = sg}; -lin pot0 d = - {s = d.s ; even20 = d.even20 ; size = d.size} ; -lin pot110 = - {s = table {attr => "deich" ; indep => "a" ++ "deich"} ; size = tenover} ; -lin pot111 = - {s = table {attr => "haon" ++ "déag" ; indep => "a" ++ "haon" ++ "déag"} ; size = tenover} ; -lin pot1to19 d = - {s = table {attr => d.s ! teen ; indep => "a" ++ d.s ! teen } ; size = tenover} ; -lin pot0as1 n = - {s = table {attr => n.s ! attrib ; indep => "a" ++ n.s ! unit} ; size = n.size} ; -lin pot1 d = - {s = table {attr => d.s ! twenty ++ AddDeich ! (d.even20) ; - indep => d.s ! twenty ++ AddADeich ! (d.even20)} ; - size = eventen} ; -lin pot1plus d e = - {s = table {attr => (d.s ! twenty) ++ e.s ! unit ++ - table {ten => "déag" ; _ => []} ! (d.even20) ; - indep => (d.s ! twenty) ++ "a" ++ e.s ! unit ++ - table {ten => "déag" ; _ => []} ! (d.even20)} ; - size = e.size} ; -lin pot1as2 n = - {s = table {attr => n.s ! attr ; indep => n.s ! indep} ; size = n.size} ; -lin pot2 d = - {s = table {_ => d.s ! attrib ++ EclipseLeniteCead ! d.size} ; size = tenover} ; -lin pot2plus d e = - {s = table {_ => d.s ! attrib ++ EclipseLeniteCead ! d.size ++ AddIs ! e.size ++ e.s ! indep} ; size = e.size} ; -lin pot2as3 n = - {s = n.s ! indep} ; -lin pot3 n = - {s = n.s ! attr ++ LeniteMile ! n.size} ; -lin pot3plus n m = - {s = n.s ! attr ++ LeniteMile ! n.size ++ m.s ! indep} ; - -oper AddDeich : Even20 => Str = table {ten => "deich" ; _ => []} ; -oper AddADeich : Even20 => Str = table {ten => "a" ++ "deich" ; _ => []} ; -oper AddIs : Size => Str = table {eventen => "is" ; _ => []} ; -oper EclipseLeniteCead : Size => Str = table {onetosix => "chead" ; seventonine => "gcéad" ; _ => "céad" } ; -oper LeniteMile : Size => Str = table {onetosix => "mhíle" ; _ => "míle" } ; - diff --git a/grammars/numerals/old/italian.gf b/grammars/numerals/old/italian.gf deleted file mode 100644 index 29e15cd7b..000000000 --- a/grammars/numerals/old/italian.gf +++ /dev/null @@ -1,45 +0,0 @@ -include numerals.Abs.gf ; - -param DForm = ental Pred | ton | tiotal ; -param Num = sg | pl ; -param Pred = pred | indip ; - -lincat Digit = {s : DForm => Str} ; -lincat Sub10 = {s : DForm => Str ; n : Num} ; -lincat Sub100 = {s : Str ; n : Num} ; -lincat Sub1000 = {s : Str ; n : Num} ; -lincat Sub1000000 = {s : Str} ; - -oper mkTal : Str -> Str -> Str -> Lin Digit = - \två -> \tolv -> \tjugo -> - {s = table {ental _ => två ; ton => tolv ; tiotal => tjugo}} ; -oper ss : Str -> {s : Str} = \s -> {s = s} ; -oper spl : Str -> {s : Str ; n : Num} = \s -> {s = s ; n = pl} ; -oper mille : Num => Str = table {sg => "mille" ; pl => "mila"} ; - -lin num x = x ; - -lin n2 = mkTal "due" "dodici" "venti" ; -lin n3 = mkTal "tre" "tredici" "trenta" ; -lin n4 = mkTal "quattro" "quattordici" "quaranta" ; -lin n5 = mkTal "cinque" "quindici" "cinquanta" ; -lin n6 = mkTal "sei" "sedici" "sessanta" ; -lin n7 = mkTal "sette" "diciassette" "settanta" ; -lin n8 = mkTal "otto" "diciotto" "ottanta" ; -lin n9 = mkTal "nove" "diciannove" "novanta" ; - -lin pot01 = {s = table {ental pred => [] ; _ => "uno"} ; n = sg} ; -lin pot0 d = {s = table {f => d.s ! f} ; n = pl} ; -lin pot110 = spl "dieci" ; -lin pot111 = spl "undici" ; -lin pot1to19 d = spl (d.s ! ton) ; -lin pot0as1 n = {s = n.s ! ental indip ; n = n.n} ; -lin pot1 d = spl (d.s ! tiotal) ; -lin pot1plus d e = spl (d.s ! tiotal ++ e.s ! ental indip) ; -lin pot1as2 n = {s = n.s ; n = n.n} ; -lin pot2 d = spl (d.s ! ental pred ++ "cento") ; -lin pot2plus d e = spl (d.s ! ental pred ++ "cento" ++ e.s) ; -lin pot2as3 n = {s = n.s ; n = n.n} ; -lin pot3 n = ss (n.s ++ mille ! n.n) ; -lin pot3plus n m = ss (n.s ++ mille ! n.n ++ m.s) ; - diff --git a/grammars/numerals/old/japanese.gf b/grammars/numerals/old/japanese.gf deleted file mode 100644 index 6cd55a576..000000000 --- a/grammars/numerals/old/japanese.gf +++ /dev/null @@ -1,59 +0,0 @@ -include numerals.Abs.gf ; - -param DForm = unit | attr | ten | hundred | thousand ; -param Size = sg | pl | more10 ; -param S100 = tenp | senp ; -param S1000 = indep | man | sen; - --- Standard Romajii --- Everything should be glued - -lincat Numeral = {s : Str} ; -oper LinDigit = {s : DForm => Str ; size : Size } ; -lincat Digit = LinDigit ; -lincat Sub10 = LinDigit ; -lincat Sub100 = {s : Str ; s2 : S100 => Str; size : Size} ; -lincat Sub1000 = {s : S1000 => Str ; size : Size } ; -lincat Sub1000000 = {s : Str} ; -lin num x0 = - {s = "/J" ++ x0.s ++ "J/"} ; - -oper mkNum : Str -> LinDigit = \base -> - {s = table {unit => base ; attr => base ; ten => base + "juu" ; hundred => base + "hyaku" ; thousand => base + "sen" } ; size = pl} ; - -oper mkNum4 : Str -> Str -> Str -> Str -> LinDigit = \ni -> \base -> \nihyaku -> \nisen -> - {s = table {unit => ni ; attr => base ; ten => base + "juu" ; hundred => nihyaku ; thousand => nisen } ; size = pl} ; - -oper mkNum2 : Str -> Str -> LinDigit = \yon -> \base -> - {s = table {unit => yon ; attr => base ; ten => base + "juu" ; hundred => base + "hyaku" ; thousand => base + "sen" } ; size = pl} ; - --- lin n1 = mkNum "ichi" ; -lin n2 = mkNum "ni" ; -lin n3 = mkNum4 "san" "san" "sanbyaku" "sanzen" ; -lin n4 = mkNum2 (variants { "shi" ; "yon" }) "yon" ; -lin n5 = mkNum "go" ; -lin n6 = mkNum4 "roku" "roku" "roppyaku" "rokusen" ; -lin n7 = mkNum2 (variants {"nana" ; "shichi" }) "nana" ; -lin n8 = mkNum4 "hachi" "hachi" "happyaku" "hassen" ; -lin n9 = mkNum2 (variants {"kyuu" ; "ku" }) "kyuu" ; - -lin pot01 = - {s = table {unit => "ichi" ; attr => [] ; ten => "juu" ; hundred => "hyaku" ; thousand => "sen"} ; size = sg }; -lin pot0 d = d ; -lin pot110 = {s = "juu" ; s2 = table {tenp => "ichi" + "man" ; senp => []} ; size = more10} ; -lin pot111 = {s = "juu" + "ichi" ; s2 = table {tenp => "ichi" + "man" ; senp => "sen"} ; size = more10} ; -lin pot1to19 d = {s = "juu" ++ d.s ! unit ; s2 = table {tenp => "ichi" + "man" ; senp => d.s ! thousand} ; size = more10} ; -lin pot0as1 n = {s = n.s ! unit ; s2 = table {tenp => [] ; senp => n.s ! thousand} ; size = n.size} ; -lin pot1 d = {s = d.s ! ten ; s2 = table {tenp => d.s ! unit ++ "man" ; senp => []} ; size = more10} ; -lin pot1plus d e = - {s = d.s ! ten ++ e.s ! unit ; - s2 = table {tenp => d.s ! unit ++ "man" ; senp => e.s ! thousand} ; - size = more10} ; - -lin pot1as2 n = {s = table {indep => n.s ; man => n.s2 ! tenp ++ n.s2 ! senp ; sen => n.s2 ! senp} ; size = n.size} ; -lin pot2 d = {s = table {indep => d.s ! hundred ; man => d.s ! ten ++ "man" ; sen => "dummy"} ; size = more10 }; -lin pot2plus d e = {s = table {indep => d.s ! hundred ++ e.s ; man => d.s ! ten ++ e.s2 ! tenp ++ e.s2 ! senp ; sen => "dummy" } ; size = more10 }; -lin pot2as3 n = {s = n.s ! indep } ; -lin pot3 n = {s = table {more10 => n.s ! man ; _ => n.s ! sen} ! n.size} ; -lin pot3plus n m = {s = table {more10 => n.s ! man ; _ => n.s ! sen} ! n.size ++ m.s ! indep} ; - diff --git a/grammars/numerals/old/kabardian.gf b/grammars/numerals/old/kabardian.gf deleted file mode 100644 index e6716ca93..000000000 --- a/grammars/numerals/old/kabardian.gf +++ /dev/null @@ -1,79 +0,0 @@ --- Kabardian - --- W is superscript w (= IPA labialisation) --- & is schwa upside down e --- s' --- L is lambda --- L is lambda with dash across --- x^ is x with ^ ontop --- G is gamma - -include numerals.Abs.gf ; - -param DForm = unit | unite | unitra | teen | ten | tenra | hund | thou; - -oper LinDigit = {s : DForm => Str }; -oper LinS100 = {s : Str; s2 : Str } ; -lincat Digit = LinDigit ; -lincat Sub10 = LinDigit ; -lincat Sub100 = LinS100 ; -lincat Sub1000 = LinS100 ; - -oper mkNum : Str -> LinDigit = \dwa -> - {s = table {unit => dwa ; unite => dwa + "&" ; unitra => dwa + "&ra" ; - ten => dwa + "&s'" ; tenra => dwa + "&s'ra" ; - teen => "p's''&" + "k'W&" + dwa ; - hund => "s'a" + "&y" + dwa ; - thou => variants {"m&yn"+"&y"+dwa ; dwa+"a"+"s''a"++"m&yn"}}}; - -oper mkNum2 : Str -> LinDigit = \dwa -> - {s = table {unit => dwa ; unite => dwa + "&" ; unitra => dwa + "&ra" ; - ten => dwa + "as'" ; tenra => dwa + "as'ra" ; - teen => "p's''&"+"k'W&"+"t'" ; - hund => "s'a" + "&y" + "t'" ; - thou => variants {"m&yn"+"&y"+"t'" ; dwa+"a"+"s''a"++"m&yn"}}}; - -oper mkNum3 : Str -> LinDigit = \dwa -> - {s = table {unit => dwa ; unite => dwa + "&" ; unitra => dwa + "&ra" ; - ten => dwa + "as'" ; tenra => dwa + "as'ra" ; - teen => "p's''&"+"k'W&"+dwa ; - hund => "s'a" + "&y" + dwa ; - thou => variants {"m&yn"+"&y"+dwa ; dwa+"a"+"s''a"++"m&yn"}}}; - -lin num x = {s = x.s } ; -- TODO ; - -lin n2 = mkNum2 "t'?W" ; -lin n3 = mkNum3 "s'" ; -lin n4 = mkNum "p'L-'" ; -lin n5 = mkNum "tx^W" ; -lin n6 = mkNum "x^"; -lin n7 = mkNum "bL" ; -lin n8 = mkNum "y" ; -lin n9 = mkNum "bGW" ; - -oper bind : Str -> Str -> Str = \s1 -> \s2 -> s1 ++ s2 ; - -lin pot01 = - {s = table {unit => "z" ; unite => "z&" ; unitra => "z&" + "ra" ; - teen => "p's''&"+"k'W&"+"z" ; ten => "dummy" ; tenra => "dummy" ; - hund => "s'a" ; thou => "m&yn"}}; - -oper ss : Str -> LinS100 = \f -> - {s = f ; s2 = variants {("m&yn"+"&y") ++ f ; (bind f "as'a") ++ "m&yn"}}; - -lin pot0 d = d ; -lin pot110 = - {s = "p's''&" ; - s2 = variants {"m&yn"+"&y"+"p's''" ; "p's''"+"a"+"s''a"++"m&yn"}}; -lin pot111 = ss ("p's''&"+"k'W&"+"z") ; -lin pot1to19 d = ss (d.s ! teen) ; -lin pot0as1 n = {s = n.s ! unite ; s2 = n.s ! thou } ; -lin pot1 d = ss (variants {(d.s ! ten) ; (d.s ! unite) ++ "p's''&wa"}) ; - -- extra variant p's''ay = 80 -lin pot1plus d e = ss ((d.s ! tenra) ++ (e.s ! unitra)) ; -lin pot1as2 n = n ; -lin pot2 d = ss (d.s ! hund) ; -lin pot2plus d e = ss ((d.s ! hund) ++ e.s) ; -lin pot2as3 n = {s = n.s } ; -lin pot3 n = {s = n.s2} ; -lin pot3plus n m = {s = n.s2 ++ m.s} ; diff --git a/grammars/numerals/old/kambera.gf b/grammars/numerals/old/kambera.gf deleted file mode 100644 index c42921b19..000000000 --- a/grammars/numerals/old/kambera.gf +++ /dev/null @@ -1,47 +0,0 @@ -include numerals.Abs.gf ; - -param Size = sg | two | pl ; - -oper Form = {s : Str ; size : Size} ; - -lincat Digit = Form ; -lincat Sub10 = Form ; -lincat Sub100 = Form ; -lincat Sub1000 = Form ; - -oper mkNum : Str -> Form = \two -> - {s = two ; size = pl} ; - -lin num x = x ; --- lin n1 mkNum "diha" ; -lin n2 = {s = "dua" ; size = two} ; -lin n3 = mkNum "tailu" ; -lin n4 = mkNum "patu" ; -lin n5 = mkNum "lima" ; -lin n6 = mkNum "nomu" ; -lin n7 = mkNum "pitu" ; -lin n8 = mkNum "walu" ; -lin n9 = mkNum "hiwa" ; - -oper ss : Str -> {s : Str ; size : Size} = \s1 -> {s = s1 ; size = pl} ; - -lin pot01 = {s = "diha" ; size = sg} ; -lin pot0 d = d ; -lin pot110 = ss "hakambulu" ; -lin pot111 = ss ("hakambulu" ++ "hau") ; -lin pot1to19 d = ss ("hakambulu" ++ (if12 d.size d.s)) ; -lin pot0as1 n = n ; -lin pot1 d = ss (d.s ++ "kambulu" ) ; -lin pot1plus d e = ss (d.s ++ "kambulu" ++ (if12 e.size e.s)) ; -lin pot1as2 n = n ; -lin pot2 d = ss (selsg d.size "hangahu" (d.s ++ "ngahu")) ; -lin pot2plus d e = ss (selsg d.size "hangahu" (d.s ++ "ngahu") ++ e.s) ; -lin pot2as3 n = {s = n.s }; -lin pot3 n = {s = (selsg n.size "hariu" (n.s ++ "riu"))} ; -lin pot3plus n m = {s = (selsg n.size "hariu" (n.s ++ "riu")) ++ m.s } ; - -oper if12 : Size -> Str -> Str = \sz -> \a -> - table {sg => "hau" ; two => "dambu" ; _ => a} ! sz ; -oper selsg : Size -> Str -> Str -> Str = \sz -> \a -> \b -> - table {sg => a ; _ => b} ! sz ; - diff --git a/grammars/numerals/old/kawaiisu.gf b/grammars/numerals/old/kawaiisu.gf deleted file mode 100644 index 5e45a4eb6..000000000 --- a/grammars/numerals/old/kawaiisu.gf +++ /dev/null @@ -1,41 +0,0 @@ -include numerals.Abs.gf ; - -oper bind : Str -> Str -> Str = \a -> \b -> a ++ b ; -oper na : {s : Str } = {s = "N/A" } ; - -oper LinDigit = {s : Str ; s2 : Str ; s3 : Str} ; - -lincat Numeral = {s : Str} ; -lincat Digit = LinDigit ; -lincat Sub10 = LinDigit ; -lincat Sub100 = {s : Str } ; -lincat Sub1000 = {s : Str } ; -lincat Sub1000000 = {s : Str} ; -lin num x0 = - {s = x0.s} ; -- TODO - -oper mkNum : Str -> LinDigit = \s1 -> {s = s1 ; s2 = s1 + "yu" ; s3 = s1 + "suu"} ; -oper mkNum2 : Str -> LinDigit = \s1 -> {s = s1 ; s2 = s1 + "yu" ; s3 = s1 + "cuu"} ; -lin n2 = mkNum "waha" ; -lin n3 = mkNum "pehe" ; -lin n4 = mkNum "wacuu" ; -lin n5 = mkNum2 "mani-gi" ; -lin n6 = mkNum2 "navaha" ; -lin n7 = {s = "no?mi-zi" ; s2 = "no?mi-zi" ; s3 = "no?mi-zicuu" }; -lin n8 = {s = "nanawacuu" ; s2 = "nanawacuu"; s3 = "nanawacuucuu" }; -lin n9 = mkNum2 "sukumi-su" ; - -lin pot01 = mkNum "suu" ; -lin pot0 d = d ; -lin pot110 = {s = "mi-mi-suuyu" } ; -lin pot111 = {s = "mi-mi-susuuyu" } ; -lin pot1to19 d = {s = bind "mi-mi-susuu" d.s2 } ; -lin pot0as1 n = {s = n.s } ; -lin pot1 d = {s = bind d.s3 "yu"} ; -lin pot1plus d e = {s = bind d.s3 e.s2 } ; -lin pot1as2 n = n ; -lin pot2 d = na ; -lin pot2plus d e = na ; -lin pot2as3 n = n ; -lin pot3 n = na ; -lin pot3plus n m = na ; diff --git a/grammars/numerals/old/khmer.gf b/grammars/numerals/old/khmer.gf deleted file mode 100644 index 7c4fb1051..000000000 --- a/grammars/numerals/old/khmer.gf +++ /dev/null @@ -1,50 +0,0 @@ -include numerals.Abs.gf ; - -param DForm = unit | ten ; -param Size = sg | pl ; - -oper LinDigit = {s : DForm => Str ; size : Size} ; - -lincat Digit = LinDigit ; -lincat Sub10 = LinDigit ; -lincat Sub100 = {s : Str ; s2 : Str ; size : Size} ; -lincat Sub1000 = {s : Str ; s2 : Str ; size : Size} ; - -oper mkNum : Str -> Str -> LinDigit = \u -> \t -> {s = table {unit => u ; ten => t} ; size = pl} ; - -lin n2 = mkNum "bi:ra" "mbhai" ; -lin n3 = mkNum "pi:" ("sa:ma" ++ "sipa") ; -lin n4 = mkNum "pwna" ("se:" ++ "sipa") ; -lin n5 = mkNum "pra:m." ("ha:" ++ "sipa") ; -lin n6 = mkNum ("pra:m." ++ "mwya") ("huka" ++ "sipa") ; -lin n7 = mkNum ("pra:m." ++ "bi:ra") ("cita" ++ "sipa") ; -lin n8 = mkNum ("pra:m." ++ "pi:") ("pe:ta" ++ "sipa") ; -lin n9 = mkNum ("pra:m." ++ "pwna") ("kau" ++ "sipa") ; - -oper bana : Str = variants {"mwya" ++ "ba:'na" ; "mpa:'na"} ; - -lin num x = {s = "/X" ++ x.s ++ "X/"} ; -- for the diacritics - -lin pot01 = {s = table { _ => "mwya" } ; size = sg } ; -lin pot0 d = d ; -lin pot110 = {s = "t.a'pa" ; s2 = "hmi-na" ; size = pl} ; -lin pot111 = {s = "mwya" ++ "t.an.ta'pa" ; s2 = "hmi-na" ++ bana; size = pl} ; -lin pot1to19 d = {s = (d.s ! unit) ++ "t.an.ta'pa" ; s2 = "hmi-na" ++ (d.s ! unit) ++ "ba:'na" ; size = pl } ; -lin pot0as1 n = {s = n.s ! unit ; s2 = xsg n.size bana (n.s ! unit ++ "ba:'na") ; size = n.size} ; -lin pot1 d = {s = d.s ! ten ; s2 = d.s ! unit ++ "hmi-na" ; size = pl} ; -lin pot1plus d e = {s = d.s ! ten ++ e.s ! unit ; s2 = d.s ! unit ++ "hmi-na" ++ xsg e.size bana (e.s ! unit ++ "ba:'na") ; size = pl} ; -lin pot1as2 n = n ; -lin pot2 d = {s = xsg d.size (variants {"raya" ; "mraya"}) (d.s ! unit ++ "raya") ; - s2 = (d.s ! unit) ++ "se:na" ; - size = pl } ; -lin pot2plus d e = {s = xsg d.size (variants {"raya" ; "mraya"}) (d.s ! unit ++ "raya") ++ e.s ; - s2 = (d.s ! unit) ++ "se:na" ++ e.s2 ; - size = pl} ; -lin pot2as3 n = {s = n.s} ; -lin pot3 n = {s = n.s2 } ; -lin pot3plus n m = {s = n.s2 ++ m.s } ; - -oper xsg : Size -> Str -> Str -> Str = \sz -> \s1 -> \s2 -> table {sg => s1 ; _ => s2} ! sz ; - - - diff --git a/grammars/numerals/old/khowar.gf b/grammars/numerals/old/khowar.gf deleted file mode 100644 index 7bb890a75..000000000 --- a/grammars/numerals/old/khowar.gf +++ /dev/null @@ -1,57 +0,0 @@ -include numerals.Abs.gf ; - --- 2 has a non-general variant "joowáloo" ; - -param DForm = unit | ten S100 | teen ; -param Size = sg | pl | more100; -param Par20 = even | odd ; -param S100 = attr | preceded ; -param S1000 = indep | dep | lakh ; - -oper LinDigit = {s : DForm => Str ; size : Size ; par20 : Par20} ; - -lincat Numeral = {s : Str} ; -lincat Digit = LinDigit ; -lincat Sub10 = LinDigit ; -lincat Sub100 = {s : S100 => Str ; size : Size} ; -lincat Sub1000 = {s : S1000 => Str ; size : Size } ; -lincat Sub1000000 = {s : Str} ; -lin num x0 = - {s = "/L" ++ x0.s ++ "L/"} ; -- Latin A Supplement - -oper mkNum : Str -> Str -> Par20 -> LinDigit = \s -> \tw -> \p20 -> - {s = table {unit => s ; teen => "jo.sh" + "-" + s ; ten _ => tw ++ "bîsher"} ; size = pl ; par20 = p20} ; - --- lin n1 = mkNum variants {"î" ; "îwáloo"} ; -lin n2 = - {s = table {unit => "joo" ; teen => "jo.sh" + "-" + "joo" ; ten attr => "bîsher" ; ten preceded => "î" ++ "bîsher" } ; size = pl ; par20 = even }; -lin n3 = - {s = table {unit => "troi" ; teen => "jo.sh" + "-" + "troi" ; ten attr => "bîsher" ; ten preceded => "î" ++ "bîsher" } ; size = pl ; par20 = odd }; -lin n4 = mkNum "cho.r" "joo" even ; -lin n5 = mkNum "po.nj" "joo" odd ; -lin n6 = mkNum "chöi" "troi" even ; -lin n7 = mkNum "so.t" "troi" odd ; -lin n8 = mkNum "o.sht" "chöi" even ; -lin n9 = mkNum "nyun" "chöi" odd ; - -lin pot01 = - {s = table {unit => "î" ; _ => "dummy" } ; size = sg ; par20 = odd}; -lin pot0 d = d ; -lin pot110 = {s = table {_ => "jo.sh" } ; size = pl} ; -lin pot111 = {s = table {_ => "jo.sh" + "-" + "î" } ; size = pl} ; -lin pot1to19 d = {s = table {_ => d.s ! teen }; size = pl} ; -lin pot0as1 n = {s = table {_ => n.s ! unit } ; size = n.size} ; -lin pot1 d = {s = table {f => table {even => d.s ! ten f ; odd => d.s ! ten f ++ "jo.sh" } ! d.par20 } ; size = pl} ; -lin pot1plus d e = {s = table {f => table {even => d.s ! ten f ++ e.s ! unit ; odd => d.s ! ten f ++ e.s ! teen } ! d.par20 }; size = pl} ; -lin pot1as2 n = {s = table {indep => n.s ! attr ; dep => n.s ! preceded ; lakh => "dummy"} ; size = n.size} ; -lin pot2 d = - {s = table {lakh => table {sg => "lakh" ; _ => d.s ! unit ++ "lakh"} ! d.size ; - _ => table {sg => "sho.r" ; _ => d.s ! unit ++ "sho.r" } ! d.size } ; - size = more100 }; -lin pot2plus d e = - {s = table {lakh => table {sg => "lakh" ; _ => d.s ! unit ++ "lakh"} ! d.size ++ table {sg => [] ; _ => e.s ! preceded } ! e.size ++ "hazâr" ; - _ => table {sg => "sho.r" ; _ => d.s ! unit ++ "sho.r" } ! d.size ++ "oché" ++ e.s ! preceded } ; - size = more100} ; -lin pot2as3 n = {s = table {sg => [] ++ variants {"î" ; "îwáloo"} ; _ => n.s ! indep} ! n.size } ; -lin pot3 n = {s = table {pl => n.s ! indep ++ "hazâr" ; sg => "hazâr" ; more100 => n.s ! lakh} ! n.size} ; -lin pot3plus n m = {s = table {pl => n.s ! indep ++ "hazâr" ; sg => "hazâr" ; more100 => n.s ! lakh} ! n.size ++ m.s ! dep} ; diff --git a/grammars/numerals/old/kolyma_yukaghir.gf b/grammars/numerals/old/kolyma_yukaghir.gf deleted file mode 100644 index b7cade9af..000000000 --- a/grammars/numerals/old/kolyma_yukaghir.gf +++ /dev/null @@ -1,45 +0,0 @@ -include numerals.Abs.gf ; - -oper na = {s = "N/A" }; - -param DForm = u | teen ; - -oper LinDigit = {s : DForm => Str } ; - -lincat Digit = LinDigit ; -lincat Sub10 = LinDigit ; -lincat Sub100 = {s : Str } ; -lincat Sub1000 = {s : Str } ; - -oper bind : Str -> Str -> Str = \a -> \b -> a ++ b ; - -oper mkNum : Str -> LinDigit = \a -> - {s = table {u => a ; teen => "kun'il" ++ a ++ "budie"}} ; -oper mkNum2 : Str -> Str -> LinDigit = \a -> \b -> - {s = table {u => a ; teen => b ++ "budie"}} ; - -lin num x = x ; --- lin n1 mkNum "irkin" ; -lin n2 = mkNum2 "ataqun" ("kun" ++ "ataqun") ; -lin n3 = mkNum2 "ja:n" ("kun'il" ++ "ja:l"); -lin n4 = mkNum "ilekun" ; -lin n5 = mkNum "n'ahanbo:d'e" ; -lin n6 = mkNum "malha:n" ; -lin n7 = mkNum "purki:n" ; -lin n8 = mkNum "malhi:lek" ; -lin n9 = mkNum "kunirkil'd'o:j" ; - -lin pot01 = mkNum2 "irkin" ("kun" ++ "irku"); -lin pot0 d = d ; -lin pot110 = {s = "kun'in"}; -lin pot111 = {s = ("kun" ++ "irkubudie")} ; -lin pot1to19 d = {s = d.s ! teen} ; -lin pot0as1 n = {s = n.s ! u} ; -lin pot1 d = {s = d.s ! u ++ "kun'el"} ; -lin pot1plus d e = {s = d.s ! u ++ "kun'el" ++ e.s ! u}; -lin pot1as2 n = n ; -lin pot2 d = {s = "kun'in" ++ "kun'in" ++ d.s ! u ++ "budie"} ; -lin pot2plus d e = {s = "kun'in" ++ "kun'in" ++ d.s ! u ++ "budie" ++ e.s } ; -lin pot2as3 n = n ; -lin pot3 n = na ; -lin pot3plus n m = na ; diff --git a/grammars/numerals/old/korean.gf b/grammars/numerals/old/korean.gf deleted file mode 100644 index fa804ed58..000000000 --- a/grammars/numerals/old/korean.gf +++ /dev/null @@ -1,109 +0,0 @@ -include numerals.Abs.gf ; - -param DForm = unit | teen | ten | tenq | chi | chiten ; -param Size = sg | twotoeight | nine | exten | more10 ; -param S100 = tenpart | chenpart ; - --- Korean --- Sorry, no hangul transliteration - -lincat Numeral = {s : Str} ; -oper LinDigit = {s : DForm => Str ; size : Size } ; -lincat Digit = LinDigit ; -lincat Sub10 = LinDigit ; -lincat Sub100 = {s : Str ; s2 : S100 => Str; size : Size} ; -lincat Sub1000 = {s : Str ; s2 : Str ; size : Size } ; -lincat Sub1000000 = {s : Str} ; -lin num x0 = - {s = "/L" ++ x0.s ++ "L/" } ; -- just makes colons into length bar ontop of char - -oper mkNumq : Str -> Str -> Str -> Str -> LinDigit = - \twul -> \yelqtwul -> \sumul -> \i -> - {s = table {unit => twul ; teen => yelqtwul ; ten => sumul ; tenq => sumul + "q" ; chi => i ; chiten => i ++ "sip"} ; size = twotoeight} ; - -oper mkNum : Str -> Str -> Str -> Str -> LinDigit = - \twul -> \yelqtwul -> \sumul -> \i -> - {s = table {unit => twul ; teen => yelqtwul ; ten => sumul ; tenq => sumul ; chi => i ; chiten => i ++ "sip"} ; size = twotoeight} ; - -oper mkNum6 : Str -> Str -> Str -> Str -> LinDigit = - \twul -> \yelqtwul -> \sumul -> \i -> - {s = table {unit => twul ; teen => yelqtwul ; ten => sumul ; tenq => sumul + "q" ; chi => i ; chiten => (i + "q") ++ "sip"} ; size = twotoeight} ; - -oper mkNum9 : Str -> Str -> Str -> Str -> LinDigit = - \twul -> \yelqtwul -> \sumul -> \i -> - {s = table {unit => twul ; teen => yelqtwul ; ten => sumul ; tenq => sumul + "q" ; chi => i ; chiten => i ++ "sip"} ; size = nine} ; - --- lin n1 = mkNum variants{"hana" ; "han } ; variants {"yelhana" ; "yelhan" } -lin n2 = mkNumq (variants {"twu:l" ; "twu" }) - (variants {"yelqtwul" ; "yelqtwu" }) - (variants {"sumul" ; "sumu" }) - "i:" ; -lin n3 = mkNum (variants {"se:ys" ; "se:y" ; "se:k" ; "se:" }) - (variants {"yelqseys" ; "yelqsey" ; "yelqsek" ; "yelqse" }) - (variants {"seun" ; "sehun" }) - "sam" ; -lin n4 = mkNum (variants {"ne:ys" ; "ne:y" ; "ne:k" ; "ne:" }) - (variants {"yelneys" ; "yelney" ; "yelnek" ; "yelne" }) - "mahun" "sa:" ; -lin n5 = mkNum "tases" "yelqtases" "swi:n" "o:"; -lin n6 = mkNum6 "yeses" (variants {"yelqyeses" ; "yelyeses"}) "yeyswun" "yuk" ; -lin n7 = mkNum6 "ilkop" (variants {"yelqilkop" ; "yelilkop"}) "ilhun" "chil" ; -lin n8 = mkNum6 "yetel" (variants {"yelqyetel" ; "yelyetel"}) "yetun" "phal" ; -lin n9 = mkNum9 "ahop" "yelahop" "ahun" "kwu" ; - -lin pot01 = - {s = table {unit => variants {"hana" ; "han"} ; - ten => variants {"yel" ; "yelq"} ; - tenq => "dummy" ; - teen => variants {"yelhana" ; "yelhan" } ; - chi => "il" ; chiten => "sip"} ; - size = sg }; -lin pot0 d = d ; -lin pot110 = {s = variants {"yel" ; "yelq"} ; - s2 = table {tenpart => "il" ++ "man" ; - chenpart => [] } ; - size = exten} ; -lin pot111 = {s = variants {"yelhana" ; "yelhan"} ; - s2 = table {tenpart => "il" ++ "man" ; - chenpart => maybeil sg "il" "chen" } ; - size = more10} ; -lin pot1to19 d = {s = d.s ! teen ; - s2 = table {tenpart => "il" ++ "man" ; - chenpart => maybeil d.size (d.s ! chi) "chen" } ; - size = more10} ; -lin pot0as1 n = {s = n.s ! unit ; - s2 = table {tenpart => "man" ; - chenpart => maybeil n.size (n.s ! chi) "chen" } ; - size = n.size} ; -lin pot1 d = {s = d.s ! ten ; - s2 = table {tenpart => d.s ! chi ++ "man" ; - chenpart => [] } ; - size = more10} ; -lin pot1plus d e = - {s = table {twotoeight => d.s ! tenq ; - _ => d.s ! ten } ! e.size ++ e.s ! unit; - s2 = table {tenpart => d.s ! chi ++ "man"; - chenpart => maybeil e.size (e.s ! chi) "chen" } ; - size = more10} ; - -lin pot1as2 n = {s = n.s ; - s2 = table {more10 => n.s2 ! tenpart ; - exten => (variants {"ma:n" ; "il" ++ "man"}) ; - _ => []} ! n.size ++ n.s2 ! chenpart ; - size = n.size} ; -lin pot2 d = - {s = maybeil d.size (d.s ! chi) "payk" ; - s2 = d.s ! chiten ; - size = more10 }; -lin pot2plus d e = - {s = (maybeil d.size (d.s ! chi) "payk") ++ e.s ; - s2 = d.s ! chiten ++ e.s2 ! tenpart ++ e.s2 ! chenpart ; - size = more10 }; -lin pot2as3 n = {s = n.s } ; -lin pot3 n = {s = n.s2 } ; -lin pot3plus n m = {s = n.s2 ++ m.s } ; - -oper maybeil : Size -> Str -> Str -> Str = \sz -> \a -> \chen -> - table {twotoeight => a ++ chen ; sg => variants {chen ; "il" ++ chen } ; _ => a ++ chen} ! sz ; - - diff --git a/grammars/numerals/old/kulung.gf b/grammars/numerals/old/kulung.gf deleted file mode 100644 index f5eda8634..000000000 --- a/grammars/numerals/old/kulung.gf +++ /dev/null @@ -1,55 +0,0 @@ -include numerals.Abs.gf ; - -param DForm = basic | belowtenform | tenindep | ten; -param Size = sg | less100 | more100 ; -param Scale = reg | lakh ; - --- From Krishna Bahadur Rai in Werner Winter: When Numeral Systems are --- Expanded in Jadranka Gvozdanovic' (ed.) Numeral Types and Changes --- Worldwide, 1999 - -lincat Digit = {s : DForm => Str} ; -lincat Sub10 = {s : DForm => Str ; size : Size} ; -lincat Sub100 = {s : Str ; size : Size} ; -lincat Sub1000 = {s : Scale => Str ; size : Size} ; - -oper mkNum : Str -> Str -> Str -> Str -> Lin Digit = - \two -> \two2 -> \twenty -> \twenty2 -> - {s = table {basic => two ; belowtenform => two2 ; tenindep => twenty ; ten => twenty2}} ; - -oper mkRegNum : Str -> Lin Digit = - \su -> - { s = table { basic => su ; belowtenform => su + "kci" ; tenindep => su + "kká" ; ten => su + "k"} }; - -lin num x = x ; --- lin n1 mkNum "i" "ibim" ... ; -lin n2 = mkNum "ni" "nicci" (variants { "nissá" ; "nukká" }) "nuk" ; -lin n3 = mkRegNum "su" ; -lin n4 = mkNum "li" "lici" "likká" "lik" ; -lin n5 = mkNum "ngá" "ngá" "ngakká" "ngak" ; -lin n6 = mkRegNum "tu" ; -lin n7 = mkRegNum "nu" ; -lin n8 = mkRegNum "re" ; -lin n9 = mkNum "vau" "vauci" "vavau" "vavau" ; - -oper ss : Str -> {s : Str ; size : Size} = \s -> {s = s ; size = less100} ; - -lin pot01 = {s = table {f => variants {"i" ; "ibim"}} ; size = sg} ; -lin pot0 d = {s = table {f => d.s ! f} ; size = less100} ; -lin pot110 = ss ( variants { "pau" ; "pauci" }) ; -lin pot111 = ss ("pau" ++ "i") ; -lin pot1to19 d = ss ("pau" ++ d.s ! basic) ; -lin pot0as1 n = {s = variants {n.s ! basic ; n.s ! belowtenform} ; size = n.size} ; -lin pot1 d = {s = d.s ! tenindep ; size = less100} ; -lin pot1plus d e = {s = (d.s ! ten) ++ e.s ! basic ; size = less100} ; -lin pot1as2 n = {s = table {_ => n.s } ; size = n.size} ; -lin pot2 d = {s = table {lakh => omitsg (d.s ! basic) d.size ++ "lankau" ; reg => omitsg (d.s ! basic) d.size ++ "chhum" }; size = more100} ; -lin pot2plus d e = {s = table {lakh => omitsg (d.s ! basic) d.size ++ "lankau" ++ omitsg e.s e.size ++ "habau" ; reg => omitsg (d.s ! basic) d.size ++ "chhum" ++ e.s } ; size = more100} ; - -lin pot2as3 n = {s = n.s ! reg }; -lin pot3 n = {s = mklankau n.size (n.s ! reg) (n.s ! lakh)} ; -lin pot3plus n m = {s = mklankau n.size (n.s ! reg) (n.s ! lakh) ++ m.s ! reg} ; - -oper mklankau : Size -> Str -> Str -> Str = \sz -> \attr -> \lankau -> - table {sg => "habau" ; less100 => attr ++ "habau" ; more100 => lankau} ! sz; -oper omitsg : Str -> Size -> Str = \s -> \sz -> table {sg => [] ; _ => s} ! sz ; \ No newline at end of file diff --git a/grammars/numerals/old/kwami.gf b/grammars/numerals/old/kwami.gf deleted file mode 100644 index cb441f3ee..000000000 --- a/grammars/numerals/old/kwami.gf +++ /dev/null @@ -1,48 +0,0 @@ -include numerals.Abs.gf ; - --- D^ is from implosive d IPA symbol --- N Num - -param Size = sg | two | three | other ; - -oper LinDigit = {s : Str ; size : Size} ; -lincat Digit = LinDigit ; -lincat Sub10 = LinDigit ; -lincat Sub100 = LinDigit ; -lincat Sub1000 = LinDigit ; -lincat Sub1000000 = {s : Str} ; - -oper mkNum : Str -> LinDigit = \kunun -> - {s = kunun ; size = other} ; - -lin num x0 = - {s = "/L" ++ x0.s ++ "L/"} ; -- for D^ - -lin n2 = {s = variants {"póllów" ; "fóllów"} ; size = two }; -lin n3 = {s = "kúnún" ; size = three } ; -lin n4 = mkNum (variants {"pòD^òw" ; "fòD^òw"}) ; -lin n5 = mkNum (variants {"páaD^í" ; "fáaD^í"}) ; -lin n6 = mkNum (variants {"páyíndì" ; "fáyíndì"}) ; -lin n7 = mkNum (variants {"pópíllów" ; "fópíllów"}) ; -lin n8 = mkNum (variants {"pówùrD^ów" ; "fówùrD^ów"}) ; -lin n9 = mkNum "làmbáD^à" ; - -oper thirty : Str = variants {("kúu" ++ "kúnún") ; "tàlàatín"} ; -oper two100 : Str = variants {"dálmágí" ++ "póllów" ; "mèetán"} ; -oper thousand : Str = variants {("dálmágí" ++ "kúmó") ; "dùbúk" ; "dúbúk"} ; - -lin pot01 = - {s = "múndí" ; size = sg}; -lin pot0 d = d ; -lin pot110 = mkNum "kúmó" ; -lin pot111 = mkNum ("kúmó" ++ "kán" ++ "múndí") ; -lin pot1to19 d = mkNum ((variants {"kúmó" ++ "kán" ; "tùrò"}) ++ d.s ) ; -lin pot0as1 n = n ; -lin pot1 d = mkNum (table {three => thirty ; _ => "kúu" ++ d.s} ! d.size) ; -lin pot1plus d e = mkNum ((table {three => thirty ; _ => "kúu" ++ d.s} ! d.size) ++ "kán" ++ e.s) ; -lin pot1as2 n = n ; -lin pot2 d = mkNum (table {sg => (variants {"dálmágí" ; "dálmák"}) ; two => two100 ; _ => "dálmágí" ++ d.s } ! d.size) ; -lin pot2plus d e = mkNum ((table {two => two100 ; sg => (variants {"dálmágí" ; "dálmák"}) ; _ => "dálmágí" ++ d.s } ! d.size) ++ "kán" ++ e.s) ; -lin pot2as3 n = {s = n.s} ; -lin pot3 n = {s = table {sg => thousand ; _ => "dùbúk" ++ n.s} ! n.size } ; -lin pot3plus n m = {s = table {sg => thousand ; _ => "dùbúk" ++ n.s} ! n.size ++ m.s} ; \ No newline at end of file diff --git a/grammars/numerals/old/kwaza.gf b/grammars/numerals/old/kwaza.gf deleted file mode 100644 index e8ed82487..000000000 --- a/grammars/numerals/old/kwaza.gf +++ /dev/null @@ -1,37 +0,0 @@ -include numerals.Abs.gf ; - -lincat Numeral = {s : Str} ; -lincat Digit = {s : Str } ; -lincat Sub10 = {s : Str } ; -lincat Sub100 = {s : Str } ; -lincat Sub1000 = {s : Str } ; -lincat Sub1000000 = {s : Str} ; -lin num x0 = - {s = x0.s} ; -- TODO - -oper na = {s = "N/A" } ; - -lin n2 = {s = "aky'hy~" }; -lin n3 = {s = "e'ma~" }; -lin n4 = {s = "ElE'lE" }; -lin n5 = {s = "bwako'je" }; -lin n6 = na ; -lin n7 = na ; -lin n8 = na ; -lin n9 = na ; - -lin pot01 = - {s = "tei'hy~"}; -lin pot0 d = d ; -lin pot110 = na ; -lin pot111 = na ; -lin pot1to19 d = na ; -lin pot0as1 n = n ; -lin pot1 d = na ; -lin pot1plus d e = na ; -lin pot1as2 n = n ; -lin pot2 d = na ; -lin pot2plus d e = na ; -lin pot2as3 n = n ; -lin pot3 n = na ; -lin pot3plus n m = na ; diff --git a/grammars/numerals/old/lamani.gf b/grammars/numerals/old/lamani.gf deleted file mode 100644 index d295ebaa2..000000000 --- a/grammars/numerals/old/lamani.gf +++ /dev/null @@ -1,95 +0,0 @@ -include numerals.Abs.gf ; - --- the sporadic kam-forms not implemented (general minus formations are hardly possible to implement) - -param DForm = unit | ten | teen | tene | next | inv ; -param Size = sg | two | five | seven | nine | e25 | e75 | e50s | e90s | other ; - -oper LinDigit = {s : DForm => Str ; s2 : Str ; size : Size} ; -oper LinSub100 = {s : Str ; s2 : Str ; s3 : Str ; size : Size} ; - -lincat Digit = LinDigit ; -lincat Sub10 = LinDigit ; -lincat Sub100 = LinSub100 ; -lincat Sub1000 = {s : Str ; s2 : Str } ; - -lin num x0 = - {s = x0.s } ; - -oper mkNum : Str -> Str -> Str -> Str -> Str -> LinDigit = - \do -> \baara -> \bis -> \nxt -> \inverse -> - {s = table {unit => do ; teen => baara ; ten => bis ; tene => bis + "e" ; next => nxt ; inv => inverse} ; - s2 = do ++ "hajaar" ; - size = other } ; - -oper mkNumS : Str -> Str -> Str -> Str -> Str -> Size -> LinDigit = - \do -> \baara -> \bis -> \nxt -> \inverse -> \sz -> - {s = table {unit => do ; teen => baara ; ten => bis ; tene => bis + "e" ; next => nxt ; inv => inverse} ; - s2 = do ++ "hajaar" ; - size = sz } ; - --- lin n1 mkNum "ek" "gyaara" "das" -lin n2 = mkNum "di" "baara" "vis" ("tin" ++ "se") "aaT" ; -lin n3 = mkNumS "tin" "tera" "tis" ("caar"++ "se") "saat" two ; -lin n4 = mkNum "caar" "cawda" "caaLis" ("paanc" ++ "se") "cho" ; -lin n5 = mkNumS "paanc" "pandra" "pacaas" ("cho" ++ "se") "paanc" five; -lin n6 = mkNum "cho" "sola" "saaT" ("saat" ++ "se") "caar" ; -lin n7 = mkNumS "saat" "satara" "sattar" ("aaT" ++ "se") "tin" seven ; -lin n8 = mkNum "aaT" "aTara" "ãysi" ("naw" ++ "se") "di" ; -lin n9 = mkNumS "naw" "wagNis" "nawwad" "hajaar" "ek" nine; - -oper ss : Str -> LinSub100 = \s1 -> {s = s1 ; s2 = s1 ++ "hajaar" ; s3 = s1 ; size = other} ; -oper sssize : Str -> Str -> Size -> LinSub100 = \s1 -> \aux -> \sz -> - {s = s1 ; s2 = s1 ++ "hajaar" ; s3 = aux ; size = sz} ; - -oper spcsize : Size -> Size -> Size = \s1 -> \s2 -> - table {two => table {five => e25 ; _ => other} ; - five => table {_ => e50s} ; - seven => table {five => e75 ; _ => other} ; - nine => table {_ => e90s} ; - _ => table {_ => other}} ! s1 ! s2 ; - -lin pot01 = {s = table {unit => "ek" ; next => "di" ; inv => "naw" ; _ => "dummy" } ; s2 = "hajaar" ; size = sg} ; -lin pot0 d = d ; -lin pot110 = ss "das" ; -lin pot111 = ss "gyaara" ; -lin pot1to19 d = ss (d.s ! teen) ; -lin pot0as1 n = {s = n.s ! unit ; s2 = n.s2 ; s3 = (n.s ! unit) ; size = n.size} ; - -lin pot1 d = sssize (d.s ! ten) [] (table {five => e50s ; _ => other} ! d.size) ; -lin pot1plus d e = sssize (variants {(d.s ! tene) ++ "par" ++ (e.s ! unit) ; (d.s ! ten) ++ "an" ++ (e.s ! unit)}) (table {nine => e.s ! inv ; _ => e.s ! unit} ! d.size) (spcsize d.size e.size) ; - -lin pot1as2 n = {s = n.s ; s2 = n.s2 } ; - -lin pot2 d = {s = selsg d.size "so" ((d.s ! unit) ++ "se") ; - s2 = selsg d.size [] ((d.s ! unit) ++ "laak") } ; - -lin pot2plus d e = - {s = mkso d.size e.size (table {e75 => d.s ! next ; e90s => d.s ! next ; _ => d.s ! unit} ! e.size) - (table {e50s => e.s3 ; e90s => e.s3 ; _ => e.s } ! e.size) ; - s2 = (d.s ! unit) ++ "laak" ++ (selsg e.size "hajaar" (e.s ++ "hajaar")) } ; - -lin pot2as3 n = {s = n.s } ; -lin pot3 n = {s = n.s2 } ; -lin pot3plus n m = {s = n.s2 ++ m.s } ; - -oper selsg : Size -> Str -> Str -> Str = \sz -> \s1 -> \s2 -> table {sg => s1 ; _ => s2} ! sz ; - -oper mkso : Size -> Size -> Str -> Str -> Str = \ds -> \es -> \auxd -> \auxe -> table { - sg => table {e25 => "sawaa" + "se" ; - e50s => "DoD" ++ "se" ++ auxe ; - e75 => "pawNe" ++ auxd ; - e90s => variants { auxd ++ "kam" ++ auxe ; auxe ++ "kam" ++ auxd} ; - _ => "ek" ++ "so" ++ auxe} ; - two => table {e50s => "aDaai" ++ auxe ; - e25 => "sawaa" ++ auxd ++ "se" ; - e75 => "pawNe" ++ auxd ; - e90s => variants { auxd ++ "kam" ++ auxe ; auxe ++ "kam" ++ auxd} ; - _ => "do" ++ "se" ++ auxe} ; - _ => table {e50s => "saaDe" ++ auxd ++ "se" ++ auxe ; - e25 => "sawaa" ++ auxd ++ "se" ; - e75 => "pawNe" ++ auxd ; - e90s => variants { auxd ++ "kam" ++ auxe ; auxe ++ "kam" ++ auxd} ; - _ => auxd ++ "se" ++ auxe} - } ! ds ! es ; - diff --git a/grammars/numerals/old/latvian.gf b/grammars/numerals/old/latvian.gf deleted file mode 100644 index 5cfbba3b7..000000000 --- a/grammars/numerals/old/latvian.gf +++ /dev/null @@ -1,49 +0,0 @@ --- c^ --- s^ --- n, is n with a comma under --- u^ with line over - -include numerals.Abs.gf ; - -param DForm = unit | teen | ten | hundred ; - -oper LinDigit = {s : DForm => Str ; s2 : Str }; -oper LinSub100 = {s : Str ; s2 : Str } ; - -lincat Digit = LinDigit ; -lincat Sub10 = LinDigit ; -lincat Sub100 = LinSub100 ; -lincat Sub1000 = LinSub100 ; - -oper mkNum : Str -> Str -> LinDigit = \tri -> \tribase -> - { s = table {unit => tri ; teen => tribase + "padsmit" ; ten => tribase + "desmit" ; hundred => variants {tribase + "simt" ; tri ++ "simti"} } ; s2 = tribase + "tu^kstos^" }; - -lin num x = {s = "/L" ++ x.s ++ "L/"} ; -- Latin A Supplement diacritics ; - -lin n2 = mkNum "divi" "div" ; -lin n3 = mkNum "tri:s" "tri:s" ; -lin n4 = mkNum "c^etri" "c^etr" ; -lin n5 = mkNum "pieci" "piec" ; -lin n6 = mkNum "ses^i" "ses^" ; -lin n7 = mkNum "septin,i" "septin," ; -lin n8 = mkNum "aston,i" "aston," ; -lin n9 = mkNum "devin,i" "devin," ; - -oper mkR : Str -> LinSub100 = \n -> {s = n ; s2 = n ++ "tu^kstos^" } ; - -lin pot01 = { s = table {hundred => "simts" ; _ => "viens" } ; s2 = "tu^kstotis" ; size = sg }; -lin pot0 d = d ; -lin pot110 = mkR "desmit" ; -lin pot111 = mkR "vienpadsmit" ; -lin pot1to19 d = mkR (d.s ! teen) ; -lin pot0as1 n = {s = n.s ! unit ; s2 = n.s2 } ; -lin pot1 d = mkR (d.s ! ten) ; -lin pot1plus d e = mkR ((d.s ! ten) ++ (e.s ! unit)) ; -lin pot1as2 n = n ; -lin pot2 d = mkR (d.s ! hundred) ; -lin pot2plus d e = mkR ((d.s ! hundred) ++ e.s) ; -lin pot2as3 n = {s = n.s }; -lin pot3 n = {s = n.s2} ; -lin pot3plus n m = {s = n.s2 ++ m.s} ; - - diff --git a/grammars/numerals/old/lithuanian.gf b/grammars/numerals/old/lithuanian.gf deleted file mode 100644 index 703d8ca0d..000000000 --- a/grammars/numerals/old/lithuanian.gf +++ /dev/null @@ -1,56 +0,0 @@ -include numerals.Abs.gf ; - --- y: --- e: --- i~ --- s^ --- m~ --- n~ --- ú: --- u, - -param Size = sg | pl ; -param DForm = unit | teen | ten ; - -oper LinDigit = {s : DForm => Str ; size : Size }; -oper LinSub100 = {s : Str ; size : Size } ; - -lincat Digit = LinDigit ; -lincat Sub10 = LinDigit ; -lincat Sub100 = LinSub100 ; -lincat Sub1000 = LinSub100 ; - -oper mkNum : Str -> Str -> Str -> LinDigit = \tri -> \dvylika -> \tribase -> - { s = table {unit => tri ; teen => dvylika ; ten => tribase + "des^imt" } ; size = pl}; - -lin num x = {s = x.s} ; -- TODO ; - -lin n2 = mkNum "dù" "dvýlika" "dvì" ; -lin n3 = mkNum "try:s" "trýlika" "trìs" ; -lin n4 = mkNum "keturì" "keturiólika" "ke:turias" ; -lin n5 = mkNum "penkì" "penkiólika" "pen~kias" ; -lin n6 = mkNum "s^es^ì" "s^es^iólika" "s^e:s^ias" ; -lin n7 = mkNum "septynì" "septyniólika" "septýnias" ; -lin n8 = mkNum "as^tuonì" "as^tuoniólika" "as^túonias" ; -lin n9 = mkNum "devynì" "devyniólika" "devýnias" ; - -oper mkR : Str -> LinSub100 = \n -> {s = n ; size = pl } ; - -lin pot01 = { s = table {_ => "víenas" } ; size = sg }; -lin pot0 d = d ; -lin pot110 = mkR (variants {"de:s^imt"; "des^imtìs" }); -lin pot111 = mkR "vienúolika" ; -lin pot1to19 d = mkR (d.s ! teen) ; -lin pot0as1 n = mkR (n.s ! unit) ; -lin pot1 d = mkR (d.s ! ten) ; -lin pot1plus d e = mkR ((d.s ! ten) ++ (e.s ! unit)) ; -lin pot1as2 n = n ; -lin pot2 d = mkR (selsg d.size "s^im~tas" ((d.s ! unit) ++ "s^imtai~")) ; -lin pot2plus d e = mkR ((selsg d.size "s^im~tas" ((d.s ! unit) ++ "s^imtai~")) ++ e.s) ; -lin pot2as3 n = {s = n.s }; -lin pot3 n = {s = selsg n.size "tú:kstantis" (n.s ++ "tú:kstanc^iu,") } ; -lin pot3plus n m = {s = (selsg n.size "tú:kstantis" (n.s ++ "tú:kstanc^iu,")) ++ m.s} ; - -oper selsg : Size -> Str -> Str -> Str = \sz -> \s1 -> \s2 -> - table {sg => s1 ; pl => s2} ! sz ; - diff --git a/grammars/numerals/old/lotuxo.gf b/grammars/numerals/old/lotuxo.gf deleted file mode 100644 index 02ddf52ff..000000000 --- a/grammars/numerals/old/lotuxo.gf +++ /dev/null @@ -1,61 +0,0 @@ -include numerals.Abs.gf ; - -param Size = sg | pl ; - -oper Form = {s : Str ; size : Size } ; - -lincat Numeral = {s : Str} ; -lincat Digit = Form ; -lincat Sub10 = Form ; -lincat Sub100 = Form ; -lincat Sub1000 = Form ; -lincat Sub1000000 = {s : Str} ; -lin num x0 = - {s = x0.s} ; -- TODO: Encoding - -oper mkNum : Str -> Form = \mbili -> - {s = mbili; size = pl }; - --- N [ng] --- E epsilon --- I i without dot --- O IPA for o in cod - --- lin n1 = mkNum "âbotye" ; -lin n2 = mkNum "ârrexai" ; -lin n3 = mkNum "xunixoi" ; -lin n4 = mkNum "aNwan" ; -lin n5 = mkNum "miet" ; -lin n6 = mkNum "IllE" ; -lin n7 = mkNum "xattarIk" ; -lin n8 = mkNum "xottoxunik" ; -lin n9 = mkNum "xOttONwan" ; - -oper xo : Str = pre {"xO" ; - "xo" / strs {"m" ; "xu" ; "xo"} ; - "x'" / strs {"â" ; "a"}} ; - -oper ss : Str -> Form = \s1 -> {s = s1 ; size = pl} ; - -lin pot01 = - {s = "âbotye" ; size = sg }; -lin pot0 d = d ; -lin pot110 = ss "'tOmOn" ; -lin pot111 = ss ("'tOmOn" ++ xo ++ "âbotye") ; -lin pot1to19 d = ss ("'tOmOn" ++ xo ++ d.s ) ; -lin pot0as1 n = n ; -lin pot1 d = ss ("atOmwana" ++ d.s ) ; -lin pot1plus d e = ss ("atOmwana" ++ d.s ++ xo ++ e.s ) ; -lin pot1as2 n = n ; -lin pot2 d = ss (mkessixa d.size d.s) ; -lin pot2plus d e = ss ((mkessixa d.size d.s) ++ "ikO" ++ e.s) ; -lin pot2as3 n = {s = n.s } ; -lin pot3 n = {s = mktau n.size n.s } ; -lin pot3plus n m = {s = (mktau n.size n.s) ++ "ikO" ++ m.s} ; - -oper mkessixa : Size -> Str -> Str = \sz -> \attr -> - table {pl => "EssIxa" ++ attr ; - sg => variants {"EssIxa" ++ "âbotye"; "atOmwana" ++ "'tOmOn"}} ! sz ; -oper mktau : Size -> Str -> Str = \sz -> \attr -> - table {pl => "tausand" ++ attr ; - sg => variants {"tausand" ++ "âbotye"; "EssIxa" ++ "'tOmOn"}} ! sz ; diff --git a/grammars/numerals/old/maale.gf b/grammars/numerals/old/maale.gf deleted file mode 100644 index 5b8d309a0..000000000 --- a/grammars/numerals/old/maale.gf +++ /dev/null @@ -1,55 +0,0 @@ -include numerals.Abs.gf ; - -param Size = sg | pl ; -param DForm = unit | ten ; - -oper LinDigit = {s : DForm => Str ; size : Size } ; -oper Form = {s : Str ; size : Size } ; - -lincat Numeral = {s : Str} ; -lincat Digit = LinDigit ; -lincat Sub10 = LinDigit ; -lincat Sub100 = Form ; -lincat Sub1000 = {s : Str} ; -lincat Sub1000000 = {s : Str} ; -lin num x0 = - {s = x0.s} ; -- TODO: Encoding - -oper mkNum : Str -> Str -> LinDigit = \mbili -> \lama -> - {s = table {unit => mbili ; ten => lama + "-támmi" }; size = pl }; - --- b> is b with right bend --- ? without dot --- $ IPA [sh] - --- lin n1 = mkNum "pétte" ; -lin n2 = mkNum "lam?ó" "lamá"; -lin n3 = mkNum "haitsó" "haytsí" ; -lin n4 = mkNum "?oidó" "?oydí"; -lin n5 = mkNum "dóngo" "dóngi"; -lin n6 = mkNum "láhhó" "láhhi"; -lin n7 = mkNum "lánkayi" "lánkayi"; -lin n8 = mkNum "sálli" "sálli" ; -lin n9 = mkNum "tásub>a" "tázub>i"; - -oper ss : Str -> Form = \s1 -> {s = s1 ; size = pl} ; - -lin pot01 = - {s = table {f => "pétte" }; size = sg }; -lin pot0 d = d ; -lin pot110 = ss "táb>b>ó" ; -lin pot111 = ss ("táb>b>ó" ++ "pétte") ; -lin pot1to19 d = ss ("táb>b>ó" ++ (d.s ! unit)) ; -lin pot0as1 n = {s = n.s ! unit ; size = n.size } ; -lin pot1 d = ss (d.s ! ten) ; -lin pot1plus d e = ss (d.s ! ten ++ e.s ! unit) ; -lin pot1as2 n = n ; -lin pot2 d = {s = mkseeta d.size (d.s ! unit) }; -lin pot2plus d e = {s = (mkseeta d.size (d.s ! unit)) ++ e.s} ; -lin pot2as3 n = {s = n.s } ; -lin pot3 n = {s = n.s ++ "$íya"} ; -lin pot3plus n m = {s = n.s ++ "$íya" ++ m.s} ; - -oper mkseeta : Size -> Str -> Str = \sz -> \attr -> - table {pl => attr ++ "s'ééta" ; - sg => "s'ééta" } ! sz ; diff --git a/grammars/numerals/old/maltese.gf b/grammars/numerals/old/maltese.gf deleted file mode 100644 index 153f6a9c9..000000000 --- a/grammars/numerals/old/maltese.gf +++ /dev/null @@ -1,59 +0,0 @@ -include numerals.Abs.gf ; - -param DForm = unit | teen | teenil | ten | hund ; -param Size = sg | pl | dual ; - -oper LinDigit = {s: DForm => Str ; s2 : Str ; size : Size } ; -oper Form = {s : Str ; s2 : Str ; size : Size } ; - -lincat Numeral = {s : Str} ; -lincat Digit = LinDigit ; -lincat Sub10 = LinDigit ; -lincat Sub100 = Form ; -lincat Sub1000 = Form ; -lincat Sub1000000 = {s : Str} ; - -lin num x = x ; -- TODO - -oper mkN : Str -> Str -> Str -> Str -> Str -> LinDigit = \u -> \tn -> \t -> \h -> \e -> - {s = table {unit => u ; teen => tn + "ax" ; teenil => tn + "ax" + "il" ; - ten => t ; hund => h ++ "mija"} ; s2 = e ; size = pl }; - -lin n2 = - {s = table {unit => "tnejn" ; - teen => "tnax" ; teenil => "tnax-il" ; - ten => "gh-oxrin" ; - hund => "mitejn"} ; s2 = "tnejn" ; size = dual} ; -lin n3 = mkN "tlieta" "tlett" "tletin" "tliet" "tlitt"; -lin n4 = mkN "erbgh-a" "erbat" "erbgh-in" "erba'" "erbat"; -lin n5 = mkN "h-amsa" "h-mist" "h-amsin" "h-ames" "h-amest" ; -lin n6 = mkN "sitta" "sitt" "sitt" "sitt" "sitt"; -lin n7 = mkN "sebgh-a" "sbat" "sbebgh-in" "seba'" "sebat" ; -lin n8 = mkN "tmienja" "tmint" "tmenin" "tmien" "tmint" ; -lin n9 = mkN "disgh-a" "dsat" "disgh-in" "disa'" "disat"; - -oper ss : Str -> Form = \s1 -> {s = s1 ; s2 = s1 ; size = pl }; -oper ss2 : Str -> Str -> Form = \a -> \b -> {s = a ; s2 = b ; size = pl }; - -lin pot01 = - {s = table {unit => "wieh-ed" ; teen => "h-dax" ; _ => "mija" } ; - s2 = "wieh-ed" ; - size = sg}; -lin pot0 d = d; -lin pot110 = ss "gh-axra" ; -lin pot111 = ss2 "h-dax" "h-dax-il"; -lin pot1to19 d = ss2 (d.s ! teen) (d.s ! teenil); -lin pot0as1 n = {s = n.s ! unit ; s2 = n.s2 ; size = n.size} ; -lin pot1 d = ss (d.s ! ten) ; -lin pot1plus d e = ss ((e.s ! unit) ++ "u" ++ (d.s ! ten)) ; -lin pot1as2 n = n ; -lin pot2 d = ss (d.s ! hund) ; -lin pot2plus d e = ss2 ((d.s ! hund) ++ "u" ++ e.s) - ((d.s ! hund) ++ "u" ++ e.s2) ; -lin pot2as3 n = {s = n.s } ; -lin pot3 n = { s = (elf n.s2) ! n.size } ; -lin pot3plus n m = { s = (elf n.s2) ! n.size ++ m.s} ; - -oper elf : Str -> Size => Str = \attr -> - table {pl => attr ++ "elef" ; dual => "elfejn" ; sg => "elf"} ; - diff --git a/grammars/numerals/old/mapuche.gf b/grammars/numerals/old/mapuche.gf deleted file mode 100644 index 390f87c73..000000000 --- a/grammars/numerals/old/mapuche.gf +++ /dev/null @@ -1,43 +0,0 @@ -include numerals.Abs.gf ; - -param Size = sg | pl ; - -oper All = {s : Str ; size : Size}; - -lincat Digit = All ; -lincat Sub10 = All ; -lincat Sub100 = All ; -lincat Sub1000 = All ; - -oper mkNum : Str -> All = \tri -> - { s = tri ; size = pl}; - -lin num x = {s = x.s } ; - -lin n2 = mkNum "epu" ; -lin n3 = mkNum "külá" ; -lin n4 = mkNum "meli" ; -lin n5 = mkNum "kechu" ; -lin n6 = mkNum "kayu" ; -lin n7 = mkNum "reqle" ; -lin n8 = mkNum "pura" ; -lin n9 = mkNum "aylla" ; - -oper ss : Str -> All = \s1 -> {s = s1 ; size = pl } ; - -lin pot01 = { s = "kiñe" ; size = sg}; -lin pot0 d = d ; -lin pot110 = ss "mari" ; -lin pot111 = ss ("mari" ++ "kiñe") ; -lin pot1to19 d = ss ("mari" ++ d.s ); -lin pot0as1 n = n ; -lin pot1 d = ss (d.s ++ "mari" ); -lin pot1plus d e = ss (d.s ++ "mari" ++ e.s ) ; -lin pot1as2 n = n ; -lin pot2 d = ss (((selsg d.s) ! d.size) ++ "pataka" ) ; -lin pot2plus d e = ss (((selsg d.s) ! d.size) ++ "pataka" ++ e.s) ; -lin pot2as3 n = {s = n.s }; -lin pot3 n = {s = (selsg n.s) ! n.size ++ "warangka" } ; -lin pot3plus n m = {s = (selsg n.s) ! n.size ++ "warangka" ++ m.s} ; - -oper selsg : Str -> Size => Str = \s -> table {sg => [] ; pl => s } ; \ No newline at end of file diff --git a/grammars/numerals/old/maybrat.gf b/grammars/numerals/old/maybrat.gf deleted file mode 100644 index 604addcdd..000000000 --- a/grammars/numerals/old/maybrat.gf +++ /dev/null @@ -1,71 +0,0 @@ -include numerals.Abs.gf ; - -oper LinDigit = {s : DForm => Str ; even20 : Even20 } ; - -oper mk20Ten : Str -> Str -> Str -> LinDigit = \tri -> \t -> \h -> - { s = table {unit => tri ; unit2 => t ; twenty => "rae" ++ h } ; - even20 = ten}; - -oper mkEven20 : Str -> Str -> Str -> LinDigit = \se -> \t -> \h -> - { s = table {unit => se ; unit2 => t ; twenty => "rae" ++ h } ; - even20 = even}; - -oper na = {s = "N/A"} ; - -param Even20 = ten | even ; -param DForm = unit | unit2 | twenty ; - -lincat Numeral = {s : Str} ; -lincat Digit = LinDigit ; -lincat Sub10 = LinDigit ; -lincat Sub100 = {s : Str } ; -lincat Sub1000 = {s : Str } ; -lincat Sub1000000 = {s : Str} ; -lin num x0 = - {s = x0.s} ; -lin n2 = mkEven20 (variants{"ewok"; "eok"}) - ("krem" ++ "ewok") - ("sait" ++ "yhai") ; -lin n3 = mk20Ten "tuf" - ("krem" ++ "tuf") - ("sait" ++ "yhai") ; -lin n4 = mkEven20 "tiet" - ("krem" ++ "tiet") - ("ewok" ++ "mhai") ; -lin n5 = mk20Ten (variants {"mat" ; "temsau"}) - ("sau" ++ "muf") - ("ewok" ++ "mhai") ; -lin n6 = mkEven20 ("krem" ++ "sau") - ("sau" ++ "krem" ++ "sau") - ("tuf" ++ "mhai") ; -lin n7 = mk20Ten ("krem" ++ "ewok") - ("sau" ++ "krem" ++ "ewok") - ("tuf" ++ "mhai") ; -lin n8 = mkEven20 ("krem" ++ "tuf") - ("sau" ++ "krem" ++ "tuf") - ("tiet" ++ "mhai") ; -lin n9 = mk20Ten ("krem" ++ "tiet") - ("sau" ++ "krem" ++ "tiet") - ("tiet" ++ "mhai") ; - -lin pot01 = - {s = table {unit => "sau" ; unit2 => "krem" ++ "sau" ; twenty => "dummy" } ; - even20 = ten }; -lin pot0 d = d ; -lin pot110 = {s = "statem" } ; -lin pot111 = {s = "oo" ++ "krem" ++ "sau" } ; -lin pot1to19 d = {s = "oo" ++ d.s ! unit2 } ; -lin pot0as1 n = {s = n.s ! unit} ; -lin pot1 d = - {s = table {even => d.s ! twenty ; - ten => (d.s ! twenty) ++ "statem"} ! d.even20} ; -lin pot1plus d e = - {s = table {even => d.s ! twenty ++ e.s ! unit ; - ten => (d.s ! twenty) ++ (e.s ! unit2)} ! d.even20} ; - -lin pot1as2 n = n ; -lin pot2 d = na; -lin pot2plus d e = na; -lin pot2as3 n = n ; -lin pot3 n = na ; -lin pot3plus n m = na ; diff --git a/grammars/numerals/old/miya.gf b/grammars/numerals/old/miya.gf deleted file mode 100644 index ae2ad4a62..000000000 --- a/grammars/numerals/old/miya.gf +++ /dev/null @@ -1,53 +0,0 @@ -include numerals.Abs.gf ; - -param Size = sg | pl ; -param DForm = unit | acc ; - -oper LinDigit = {s : DForm => Str ; size : Size } ; -oper Form = {s : Str ; size : Size } ; - -lincat Numeral = {s : Str} ; -lincat Digit = LinDigit ; -lincat Sub10 = LinDigit ; -lincat Sub100 = Form ; -lincat Sub1000 = Form ; -lincat Sub1000000 = {s : Str} ; -lin num x0 = - {s = x0.s} ; -- TODO: Encoding - -oper mkNum : Str -> Str -> LinDigit = \mbili -> \lama -> - {s = table {unit => mbili ; acc => lama }; size = pl }; - --- lin n1 = mkNum "wút`&" ; -lin n2 = mkNum "ts`&r" "ts'&r"; -lin n3 = mkNum "kìdi" "kídì" ; -lin n4 = mkNum "f`&d>&" "f'&d>&"; -lin n5 = mkNum "vàatl&" "vaatl&"; -lin n6 = mkNum "màaha" "máahà"; -lin n7 = mkNum "màats&r" "máats`&r"; -lin n8 = mkNum "f´&rf´&d>&" "f`&rf´&d>&" ; -lin n9 = mkNum "kùciya" "kúcìya"; - -oper ss : Str -> Form = \s1 -> {s = s1 ; size = pl} ; -oper behan = "bèh&n" ; -oper enaa = "'`&náa" ; - -lin pot01 = - {s = table {unit => "wút`&" ; acc => "wut'&"}; size = sg }; -lin pot0 d = d ; -lin pot110 = ss "d'&rb>itim" ; -lin pot111 = ss (variants {behan ++ "wut'&";"d'&rb>itim" ++ behan ++ "wut'&"}); -lin pot1to19 d = ss (variants {behan ++ (d.s ! acc); "d'&rb>itim" ++ behan ++ d.s ! acc}) ; -lin pot0as1 n = {s = n.s ! unit ; size = n.size } ; -lin pot1 d = ss ("díb>i" ++ d.s ! unit) ; -lin pot1plus d e = ss ("díb>i" ++ d.s ! unit ++ behan ++ e.s ! acc) ; -lin pot1as2 n = n ; -lin pot2 d = ss ("d>àriy" ++ selsg d.size (d.s ! unit)); -lin pot2plus d e = ss ("d>àriy" ++ (selsg d.size (d.s ! unit)) ++ enaa ++ e.s); -lin pot2as3 n = {s = n.s } ; -lin pot3 n = {s = "d'&bu" ++ (selsg n.size n.s)} ; -lin pot3plus n m = {s = "d'&bu" ++ (selsg n.size n.s) ++ enaa ++ m.s} ; - -oper selsg : Size -> Str -> Str = \sz -> \attr -> - table {pl => attr ; sg => variants {[] ; attr} } ! sz ; - diff --git a/grammars/numerals/old/mkAll.gfs b/grammars/numerals/old/mkAll.gfs deleted file mode 100644 index d14a0676c..000000000 --- a/grammars/numerals/old/mkAll.gfs +++ /dev/null @@ -1,51 +0,0 @@ -i -old -abs=Nums -cnc=Decimal numerals.Dec.gf -i -old -abs=Nums -cnc=Amharic amharic.gf -i -old -abs=Nums -cnc=Basque basque.gf ---i -old -abs=Nums biblical_hebrew.gf -i -old -abs=Nums -cnc=ArabicClassical classical_arabic.gf -i -old -abs=Nums -cnc=Greek classical_greek.gf -i -old -abs=Nums -cnc=Croatian croatian.gf -i -old -abs=Nums -cnc=Geez geez.gf -i -old -abs=Nums -cnc=Hindi hindi.gf -i -old -abs=Nums -cnc=Hungarian hungarian.gf -i -old -abs=Nums -cnc=Icelandic icelandic.gf -i -old -abs=Nums -cnc=Irish irish.gf -i -old -abs=Nums -cnc=Italian italian.gf -i -old -abs=Nums -cnc=Japanese japanese.gf -i -old -abs=Nums -cnc=Khowar khowar.gf -i -old -abs=Nums -cnc=Korean korean.gf -i -old -abs=Nums -cnc=Kulung kulung.gf -i -old -abs=Nums -cnc=GreekModern modern_greek.gf -i -old -abs=Nums -cnc=Mongolian mongolian.gf -i -old -abs=Nums -cnc=ArabicModern numerals.Ara.gf -i -old -abs=Nums -cnc=Hebrew numerals.Heb.gf ---i -old -abs=Nums -cnc=Chinese numerals.ChiU.gf -i -old -abs=Nums -cnc=Danish numerals.Dan.gf -i -old -abs=Nums -cnc=German numerals.Deu.gf -i -old -abs=Nums -cnc=English numerals.Eng.gf -i -old -abs=Nums -cnc=French numerals.Fra.gf -i -old -abs=Nums -cnc=Malay numerals.Malay.gf -i -old -abs=Nums -cnc=Dutch numerals.Ned.gf -i -old -abs=Nums -cnc=NorwegianBok numerals.NorB.gf -i -old -abs=Nums -cnc=Russian numerals.Rus.gf -i -old -abs=Nums -cnc=Finnish numerals.Suo.gf -i -old -abs=Nums -cnc=Swedish numerals.Swe.gf -i -old -abs=Nums -cnc=Tampere numerals.Tam.gf -i -old -abs=Nums -cnc=OldChurchSlavonic old_church_slavonic.gf -i -old -abs=Nums -cnc=Pashto pashto.gf -i -old -abs=Nums -cnc=Polish polish.gf -i -old -abs=Nums -cnc=Portuguese portuguese.gf -i -old -abs=Nums -cnc=Quechua quechua.gf -i -old -abs=Nums -cnc=Romanian romanian.gf -i -old -abs=Nums -cnc=Sanskrit sanskrit.gf -i -old -abs=Nums -cnc=Slovak slovak.gf -i -old -abs=Nums -cnc=Sorani sorani.gf -i -old -abs=Nums -cnc=Spanish spanish.gf -i -old -abs=Nums -cnc=FrenchSwiss swiss_french.gf -i -old -abs=Nums -cnc=Tamil tamil.gf -i -old -abs=Nums -cnc=Tibetan tibetan.gf -i -old -abs=Nums -cnc=Totonac totonac.gf -i -old -abs=Nums -cnc=Turkish turkish.gf -s ---ts -lang -f -pm | wf numerals.gfcm diff --git a/grammars/numerals/old/modern_greek.gf b/grammars/numerals/old/modern_greek.gf deleted file mode 100644 index 24ba24603..000000000 --- a/grammars/numerals/old/modern_greek.gf +++ /dev/null @@ -1,69 +0,0 @@ -include numerals.Abs.gf ; - --- Free variation on accents on m'ia and d'yo - -oper vowel : Strs = strs {"e" ; "o" ; "a" ; "'e" ; "'o" ; "'a"} ; - -param DForm = unit | fem | femteen | teen | ten | hundredneut | hundredfem ; -param Use = indep | femattr ; -param Size = sg | pl ; - -lincat Numeral = {s : Str} ; -lincat Digit = {s : DForm => Str } ; -lincat Sub10 = {s : DForm => Str ; size : Size} ; -lincat Sub100 = {s : Use => Str ; size : Size} ; -lincat Sub1000 = {s : Use => Str ; size : Size} ; -lincat Sub1000000 = {s : Str} ; -lin num x0 = - {s = "//" ++ x0.s ++ "//"} ; -- Greek environment - -oper mkNum : Str -> Str -> Str -> Str -> Str -> Str -> Lin Digit = - \dyo -> \dwdeka -> \eikosi -> \diakosi -> \dyofem -> \dwdekafem -> - {s = table {unit => dyo ; teen => dwdeka ; ten => eikosi ; - hundredneut => diakosi + "a" ; hundredfem => diakosi + "ej" ; - fem => dyofem ; femteen => dwdekafem}} ; - -oper mkIndeclNum : Str -> Str -> Str -> Str -> Lin Digit = - \dyo -> \dwdeka -> \eikosi -> \diakosi -> - {s = table {unit => dyo ; teen => dwdeka ; ten => eikosi ; - hundredneut => diakosi + "a" ; hundredfem => diakosi + "ej" ; - fem => dyo ; femteen => dwdeka}} ; - -lin n2 = mkIndeclNum "d'yo" "d'wdeka" "e'ikosi" "diak'osi" ; -lin n3 = mkNum "tr'ia" "dekatr'ia" "tri'anta" "triak'osi" "tre'ij" "dekatre'is" ; -lin n4 = mkNum "t'essera" "dekat'essera" "sar'anta" "tetrak'osi" "t'esserij" "dekat'esserij" ; -lin n5 = mkIndeclNum "p'ente" "dekap'ente" "pen'hnta" "pentak'osi" ; -lin n6 = mkIndeclNum "'exi" (variants { "deka'exi" ; "deka'exi" }) "ex'hnta" "exak'osi" ; -lin n7 = mkIndeclNum (variants {"ept'a" ; "eft'a" }) "dekaeft'a" "ebdom'hnta" "eftak'osi" ; -lin n8 = mkIndeclNum "oct'w" "dekaoct'w" "ogd'onta" "octak'osi" ; -lin n9 = mkIndeclNum (variants {"enn'ea" ; "enn'ia" }) "dekaenn'ea" "enen'hnta" "enniak'osi" ; -lin pot01 = - {s = table {unit => "'ena" ; fem => "m'ia" ; _ => "ekat'o" + pre {[] ; "n" / vowel}} ; size = sg} ; -lin pot0 d = - {s = d.s ; size = pl} ; -lin pot110 = - {s = table {indep => "d'eka" ; femattr => "d'eka"} ; size = pl} ; -lin pot111 = - {s = table {indep => "'enteka" ; femattr => "'enteka" } ; size = pl} ; -lin pot1to19 d = - {s = table {indep => d.s ! teen; femattr => d.s ! femteen } ; size = pl} ; -lin pot0as1 n = - {s = table {indep => n.s ! unit ; femattr => n.s ! fem } ; size = n.size} ; -lin pot1 d = - {s = table {indep => d.s ! ten ; femattr => d.s ! ten } ; size = pl } ; -lin pot1plus d e = - {s = table {indep => d.s ! ten ++ e.s ! unit ; femattr => d.s ! ten ++ e.s ! fem } ; size = pl} ; -lin pot1as2 n = n ; -lin pot2 d = - {s = table {indep => d.s ! hundredneut ; femattr => d.s ! hundredfem} ; size = pl} ; -lin pot2plus d e = - {s = table {indep => d.s ! hundredneut ++ e.s ! indep ; femattr => d.s ! hundredfem ++ e.s ! femattr} ; size = pl} ; -lin pot2as3 n = - {s = n.s ! indep } ; -lin pot3 n = - {s = (Xilias (n.s ! femattr)) ! n.size} ; -lin pot3plus n m = - {s = (Xilias (n.s ! femattr)) ! n.size ++ m.s ! indep} ; - -oper Xilias : Str -> Size => Str = - \s -> table {sg => "c'ilia" ; pl => s ++ "cili'adej" } ; \ No newline at end of file diff --git a/grammars/numerals/old/mongolian.gf b/grammars/numerals/old/mongolian.gf deleted file mode 100644 index 54ff617b2..000000000 --- a/grammars/numerals/old/mongolian.gf +++ /dev/null @@ -1,59 +0,0 @@ -include numerals.Abs.gf ; - -param DForm = unit | ten ; -param Size = sg | pl | tenplus ; -param S100 = indep | tenpart | tenelfu | sihpart ; - -lincat Numeral = {s : Str} ; -oper LinDigit = {s : DForm => Str ; size : Size} ; -lincat Digit = LinDigit ; -lincat Sub10 = LinDigit ; -oper LinSub100 = {s : S100 => Str ; size : Size} ; -lincat Sub100 = LinSub100 ; -lincat Sub1000 = {s : Str ; s2 : Str ; size : Size } ; -lincat Sub1000000 = {s : Str} ; - -oper mkNum : Str -> Str -> LinDigit = \hulatt -> \haya -> - {s = table {unit => hulatt ; ten => haya} ; size = pl} ; - -lin num x0 = - {s = "/L" ++ x0.s ++ "L/"} ; -lin n2 = mkNum "qoyar" "qorin" ; -lin n3 = mkNum "Gurban" "guc^in" ; -lin n4 = mkNum "dörbän" "döc^in" ; -lin n5 = mkNum "tabun" "tabin" ; -lin n6 = mkNum "j^irGu'an" "j^irin" ; -lin n7 = mkNum "dolo'an" "dalan" ; -lin n8 = mkNum "naiman" "nayan" ; -lin n9 = mkNum "yisün" "j^arin" ; - -oper ss1 : Str -> Str -> Str -> LinSub100 = \assir -> \ten -> \unitpart -> - {s = table {indep => assir ; tenpart => ten ; tenelfu => [] ; sihpart => unitpart} ; size = tenplus } ; - -oper ss : Str -> Str -> Str -> LinSub100 = \assir -> \ten -> \unitpart -> - {s = table {indep => assir ; tenpart => ten ; tenelfu => ten ; sihpart => unitpart} ; size = tenplus } ; - -lin pot01 = - {s = table {unit => "nigän" ; ten => "arban" }; size = sg}; -lin pot0 d = d ; -lin pot110 = ss1 "arban" "nigän" [] ; -lin pot111 = ss1 ("arban" ++ "nigän") "nigän" "mingGan" ; -lin pot1to19 d = ss1 ("arban" ++ d.s ! unit) "nigän" (mkmingGan d.size (d.s ! unit)) ; -lin pot0as1 n = {s = table {indep => n.s ! unit ; sihpart => mkmingGan n.size (n.s ! unit) ; _ => [] } ; size = n.size} ; -lin pot1 d = ss (d.s ! ten) (d.s ! unit) [] ; -lin pot1plus d e = ss ((d.s ! ten) ++ (e.s ! unit)) - (d.s ! unit) - (mkmingGan e.size (e.s ! unit)); - -lin pot1as2 n = {s = n.s ! indep ; s2 = n.s ! tenelfu ++ "tümän" ++ n.s ! sihpart ; size = n.size} ; - -lin pot2 d = {s = (sel d.size [] (d.s ! unit)) ++ "j^a'un" ; - s2 = sel d.size "arban" (d.s ! ten) ; size = tenplus} ; -lin pot2plus d e = {s = (sel d.size [] (d.s ! unit)) ++ "j^a'un" ++ e.s ! indep ; s2 = d.s ! ten ++ e.s ! tenpart ++ "tümän" ++ e.s ! sihpart ; size = tenplus} ; -lin pot2as3 n = {s = n.s} ; -lin pot3 n = {s = table {pl => n.s ++ "mingGan" ; sg => "mingGan" ; tenplus => n.s2 } ! n.size} ; -lin pot3plus n m = {s = table {pl => n.s ++ "mingGan" ; sg => "mingGan" ; tenplus => n.s2 } ! n.size ++ m.s} ; - -oper mkmingGan : Size -> Str -> Str = \sz -> \attr -> (sel sz [] attr) ++ "mingGan" ; - -oper sel : Size -> Str -> Str -> Str = \sz -> \a -> \b -> table {sg => a ; _ => b} ! sz ; \ No newline at end of file diff --git a/grammars/numerals/old/nenets.gf b/grammars/numerals/old/nenets.gf deleted file mode 100644 index 6ab6cb44b..000000000 --- a/grammars/numerals/old/nenets.gf +++ /dev/null @@ -1,67 +0,0 @@ -include numerals.Abs.gf ; - --- #n- --- #t- --- #l- --- #s' with , ontop of s --- #N for n with a thing on the right leg i.e IPA [ng] --- #|~ a vertical tilde in thge top right corner - -param DForm = unit | teen ; -param Size = sg | nine | pl ; - -oper LinDigit = {s : DForm => Str ; size : Size } ; -oper LinS100 = {s : Str ; size : Size} ; - -lincat Numeral = {s : Str} ; -lincat Digit = LinDigit ; -lincat Sub10 = LinDigit ; -lincat Sub100 = LinS100 ; -lincat Sub1000 = LinS100 ; -lincat Sub1000000 = {s : Str} ; -lin num x0 = - {s = x0.s } ; -- TODO Encoding - -oper mkNum : Str -> Str -> LinDigit = - \u -> \t -> {s = table {unit => u ; teen => t } ; size = pl} ; - -lin n2 = mkNum (variants {"side"; "sidea"}) "sidejaNan-â|~" ; -lin n3 = mkNum (variants {"n-ahar" ; "nâr"}) "n-aharaNan-â|~" ; -lin n4 = mkNum (variants {"t-êt" ; "t-iet" ; "tiet"}) "t-êtaNan-â|~" ; -lin n5 = mkNum (variants {"saml-aN" ; "sambl-aN" ; "sambel-ank" }) - "saml-an-aNan-â|~"; -lin n6 = mkNum "mat'" "mat-aNan-â|~"; -lin n7 = mkNum (variants {"siu" ; "s'eu"}) "siujaNan-â|~" ; -lin n8 = mkNum "sidend-êt" "sidend-êtaNan-â|~" ; -lin n9 = {s = table {unit => variants {"hâsawaju'" ; "habeiju'"} ; - teen => "hâsawajujaNan-â|~" } ; - size = nine} ; - -oper ss : Str -> LinS100 = \s1 -> {s = s1 ; size = pl} ; - -lin pot01 = - {s = table {unit => variants {"~ob" ; "~opoi" } ; _ => "dummy" }; size = sg}; -lin pot0 d = d ; -lin pot110 = ss (variants {"ju'" ; "lûcaju'" ; "lûsaju'" }) ; -lin pot111 = ss (variants {"~objaNan-â|~"; "~objaNn-â" ; "~objaNa"}) ; -lin pot1to19 d = ss (d.s ! teen) ; -lin pot0as1 n = {s = n.s ! unit ; size = n.size} ; -lin pot1 d = ss (ifnine d.size (d.s ! unit)) ; -lin pot1plus d e = ss ((ifnine d.size (d.s ! unit)) ++ (e.s ! unit)) ; -lin pot1as2 n = n ; -lin pot2 d = ss (mkjur d.size (d.s ! unit)) ; -lin pot2plus d e = ss ((mkjur d.size (d.s ! unit)) ++ e.s) ; -lin pot2as3 n = {s = n.s } ; -lin pot3 n = {s = mkjuonar n.size n.s } ; -lin pot3plus n m = {s = (mkjuonar n.size n.s) ++ m.s } ; - -oper mkjuonar : Size -> Str -> Str = \sz -> \attr -> - table {nine => attr ++ "juonar" ; - sg => variants {"juonar" ; "jônar" ; "ju" ++ "jur"} ; - pl => attr ++ "juonar" } ! sz ; - -oper mkjur : Size -> Str -> Str = \sz -> \attr -> - table {sg => "jur" ; _ => attr ++ "jur" } ! sz ; - -oper ifnine : Size -> Str -> Str = \sz -> \attr -> - table {nine => "hâsawajur" ; _ => attr ++ "ju'" } ! sz ; \ No newline at end of file diff --git a/grammars/numerals/old/numerals.Abs.gf b/grammars/numerals/old/numerals.Abs.gf deleted file mode 100644 index 90aae3cb7..000000000 --- a/grammars/numerals/old/numerals.Abs.gf +++ /dev/null @@ -1,32 +0,0 @@ --- numerals from 1 to 999999 in decimal notation - -flags startcat=Numeral ; - -cat - Numeral ; -- 0.. - Digit ; -- 2..9 - Sub10 ; -- 1..9 - Sub100 ; -- 1..99 - Sub1000 ; -- 1..999 - Sub1000000 ; -- 1..999999 - -fun - num : Sub1000000 -> Numeral ; - - n2, n3, n4, n5, n6, n7, n8, n9 : Digit ; - - pot01 : Sub10 ; -- 1 - pot0 : Digit -> Sub10 ; -- d * 1 - pot110 : Sub100 ; -- 10 - pot111 : Sub100 ; -- 11 - pot1to19 : Digit -> Sub100 ; -- 10 + d - pot0as1 : Sub10 -> Sub100 ; -- coercion of 1..9 - pot1 : Digit -> Sub100 ; -- d * 10 - pot1plus : Digit -> Sub10 -> Sub100 ; -- d * 10 + n - pot1as2 : Sub100 -> Sub1000 ; -- coercion of 1..99 - pot2 : Sub10 -> Sub1000 ; -- m * 100 - pot2plus : Sub10 -> Sub100 -> Sub1000 ; -- m * 100 + n - pot2as3 : Sub1000 -> Sub1000000 ; -- coercion of 1..999 - pot3 : Sub1000 -> Sub1000000 ; -- m * 1000 - pot3plus : Sub1000 -> Sub1000 -> Sub1000000 ; -- m * 1000 + n - diff --git a/grammars/numerals/old/numerals.Ara.gf b/grammars/numerals/old/numerals.Ara.gf deleted file mode 100644 index 5c2433400..000000000 --- a/grammars/numerals/old/numerals.Ara.gf +++ /dev/null @@ -1,88 +0,0 @@ -include numerals.Abs.gf ; - -param DForm = unit Place | teen | ten | hund ; -param Size = small | large | dual ; -param Place = attr | indep ; -lincat Numeral = {s : Str} ; -lincat Digit = {s : DForm => Str ; size : Size} ; -lincat Sub10 = {s : DForm => Str ; size : Size} ; -lincat Sub100 = {s : Place => Str ; size : Size} ; -lincat Sub1000 = {s : Place => Str ; size : Size} ; -lincat Sub1000000 = {s : Str} ; -lin num x0 = - {s = "/-" ++ x0.s ++ "-/"} ; -- the Arabic environment - -lin n2 = - {s = table {(unit attr) => [] ; - (unit indep) => "avnyn" ; - teen => "avnj" ; - ten => "ocryn" ; - hund => "maOtyn"} ; size = dual} ; -lin n3 = - {s = table {(unit _) => "vlavA" ; - teen => "vlavA" ; - ten => "vlavyn" ; - hund => "vlavmaOA"} ; size = small} ; -lin n4 = - {s = table {(unit _) => "urboA" ; - teen => "urboA" ; - ten => "urboyn" ; - hund => "urbomaOA"} ; size = small} ; -lin n5 = - {s = table {(unit _) => "CmsA" ; - teen => "CmsA" ; - ten => "Cmsyn" ; - hund => "CmsmaOA"} ; size = small} ; -lin n6 = - {s = table {(unit _) => "stA" ; - teen => "stA" ; - ten => "styn" ; - hund => "stmaOA"} ; size = small} ; -lin n7 = - {s = table {(unit _) => "sboA" ; - teen => "sboA" ; - ten => "sboyn" ; - hund => "sbomaOA"} ; size = small} ; -lin n8 = - {s = table {(unit _) => "vmanyA" ; - teen => "vmanyA" ; - ten => "vmanyn" ; - hund => "vmanmaOA"} ; size = small} ; -lin n9 = - {s = table {(unit _) => "tsoA" ; - teen => "tsoA" ; - ten => "tsoyn" ; - hund => "tsomaOA"} ; size = small} ; - -lin pot01 = - {s = table {hund => "maOA"; (unit attr) => [] ; f => "waHd"} ; size = large} ; -lin pot0 d = - {s = d.s ; size = d.size} ; -lin pot110 = - {s = table {_ => "ocrA"} ; size = small} ; -lin pot111 = - {s = table {_ => "aHd" ++ "ocr"} ; size = large} ; -lin pot1to19 d = - {s = table {_ => d.s ! teen ++ "ocr"} ; size = large} ; -lin pot0as1 n = - {s = table {p => n.s ! unit p} ; size = n.size} ; -lin pot1 d = - {s = table {_ => d.s ! ten} ; size = large} ; -lin pot1plus d e = - {s = table {_ => e.s ! unit indep ++ "w" ++ d.s ! ten} ; size = large} ; -lin pot1as2 n = - {s = n.s ; size = n.size} ; -lin pot2 d = - {s = table {_ => d.s ! hund} ; size = large} ; -lin pot2plus d e = - {s = table {_ => d.s ! hund ++ "w" ++ e.s ! indep} ; size = large} ; -lin pot2as3 n = - {s = n.s ! indep} ; -lin pot3 n = - {s = n.s ! attr ++ Alf ! n.size} ; -lin pot3plus n m = - {s = n.s ! attr ++ Alf ! n.size ++ "w" ++ m.s ! indep} ; - -oper Alf : Size => Str = - table {{small} => "Ulaf" ; {dual} => "alfyn" ; _ => "alf"} ; - diff --git a/grammars/numerals/old/numerals.Chi.gf b/grammars/numerals/old/numerals.Chi.gf deleted file mode 100644 index f80b1fbb5..000000000 --- a/grammars/numerals/old/numerals.Chi.gf +++ /dev/null @@ -1,110 +0,0 @@ -include numerals.Abs.gf ; - -param Qform = bai | bai0 | shiwan | shiwan0 ; -param Bform = shi | shi0 | wan | wan0 ; -param Zero = zero | nozero ; -oper ling : Zero * Zero => Str = - table {<{zero},z> => "é›¶" ; - => "é›¶" ; - <{nozero},{nozero}> => []} ; -oper Wan : Zero => Str = - table {{zero} => "万" ; - {nozero} => []} ; -lincat Numeral = {s : Str} ; -lincat Digit = {s : Str} ; -lincat Sub10 = {s : Str} ; -lincat Sub100 = {inh : Zero ; s : Bform => Str} ; -lincat Sub1000 = {inh : Zero ; s : Qform => Str} ; -lincat Sub1000000 = {s : Str} ; -lin num x0 = - {s = x0.s} ; -lin n2 = - {s = "è´°"} ; -lin n3 = - {s = "å"} ; -lin n4 = - {s = "肆"} ; -lin n5 = - {s = "ä¼"} ; -lin n6 = - {s = "陆"} ; -lin n7 = - {s = "柒"} ; -lin n8 = - {s = "æŒ"} ; -lin n9 = - {s = "玖"} ; -lin pot01 = - {s = "壹"} ; -lin pot0 d = - {s = d.s} ; -lin pot110 = - {inh = nozero ; - s = table { - {shi} => "壹拾" ; - {shi0} => "壹拾" ; - {wan} => "壹万" ; - {wan0} => "壹万"}} ; -lin pot111 = - {inh = nozero ; - s = table { - {shi} => "拾壹" ; - {shi0} => "壹拾壹" ; - {wan} => "拾壹万" ; - {wan0} => "拾壹万"}} ; -lin pot1to19 d = - {inh = nozero ; - s = table { - {shi} => "壹拾" ++ d.s ; - {shi0} => "壹拾" ; - {wan} => "壹万" ++ d.s ++ "仟" ; - {wan0} => "壹万" ++ d.s ++ "仟"}} ; -lin pot0as1 n = - {inh = zero ; - s = table { - {shi} => n.s ; - {shi0} => n.s ; - {wan} => n.s ++ "仟" ; - {wan0} => n.s ++ "仟"}} ; -lin pot1 d = - {inh = zero ; - s = table { - {shi} => d.s ++ "拾" ; - {shi0} => d.s ++ "拾" ; - {wan0} => d.s ++ "万" ; - {wan} => d.s ++ "万"}} ; -lin pot1plus d e = - {inh = nozero ; - s = table { - {shi} => d.s ++ "拾" ++ e.s ; - {shi0} => d.s ++ "拾" ++ e.s ; - {wan} => d.s ++ "万" ++ e.s ++ "仟" ; - {wan0} => d.s ++ "万" ++ e.s ++ "仟"}} ; -lin pot1as2 n = - {inh = zero ; - s = table { - {bai} => n.s ! shi ; - {bai0} => n.s ! shi ; - {shiwan} => n.s ! wan ; - {shiwan0} => n.s ! wan0}} ; -lin pot2 d = - {inh = zero ; - s = table { - {bai} => d.s ++ "ä½°" ; - {bai0} => d.s ++ "ä½°" ; - {shiwan0} => d.s ++ "拾万" ; - {shiwan} => d.s ++ "拾万"}} ; -lin pot2plus d e = - {inh = nozero ; - s = table { - {bai} => d.s ++ "ä½°" ++ (ling ! ) ++ e.s ! shi0 ; - {bai0} => d.s ++ "ä½°" ++ (ling ! ) ++ e.s ! shi0 ; - {shiwan} => d.s ++ "拾" ++ (Wan ! (e.inh)) ++ e.s ! wan ; - {shiwan0} => d.s ++ "拾" ++ (Wan ! (e.inh)) ++ e.s ! wan0}} ; -lin pot2as3 n = - {s = n.s ! bai} ; -lin pot3 n = - {s = n.s ! shiwan} ; -lin pot3plus n m = - {s = (n.s ! shiwan0) ++ (ling ! ) ++ m.s ! bai0} ; - diff --git a/grammars/numerals/old/numerals.ChiU.gf b/grammars/numerals/old/numerals.ChiU.gf deleted file mode 100644 index f80b1fbb5..000000000 --- a/grammars/numerals/old/numerals.ChiU.gf +++ /dev/null @@ -1,110 +0,0 @@ -include numerals.Abs.gf ; - -param Qform = bai | bai0 | shiwan | shiwan0 ; -param Bform = shi | shi0 | wan | wan0 ; -param Zero = zero | nozero ; -oper ling : Zero * Zero => Str = - table {<{zero},z> => "é›¶" ; - => "é›¶" ; - <{nozero},{nozero}> => []} ; -oper Wan : Zero => Str = - table {{zero} => "万" ; - {nozero} => []} ; -lincat Numeral = {s : Str} ; -lincat Digit = {s : Str} ; -lincat Sub10 = {s : Str} ; -lincat Sub100 = {inh : Zero ; s : Bform => Str} ; -lincat Sub1000 = {inh : Zero ; s : Qform => Str} ; -lincat Sub1000000 = {s : Str} ; -lin num x0 = - {s = x0.s} ; -lin n2 = - {s = "è´°"} ; -lin n3 = - {s = "å"} ; -lin n4 = - {s = "肆"} ; -lin n5 = - {s = "ä¼"} ; -lin n6 = - {s = "陆"} ; -lin n7 = - {s = "柒"} ; -lin n8 = - {s = "æŒ"} ; -lin n9 = - {s = "玖"} ; -lin pot01 = - {s = "壹"} ; -lin pot0 d = - {s = d.s} ; -lin pot110 = - {inh = nozero ; - s = table { - {shi} => "壹拾" ; - {shi0} => "壹拾" ; - {wan} => "壹万" ; - {wan0} => "壹万"}} ; -lin pot111 = - {inh = nozero ; - s = table { - {shi} => "拾壹" ; - {shi0} => "壹拾壹" ; - {wan} => "拾壹万" ; - {wan0} => "拾壹万"}} ; -lin pot1to19 d = - {inh = nozero ; - s = table { - {shi} => "壹拾" ++ d.s ; - {shi0} => "壹拾" ; - {wan} => "壹万" ++ d.s ++ "仟" ; - {wan0} => "壹万" ++ d.s ++ "仟"}} ; -lin pot0as1 n = - {inh = zero ; - s = table { - {shi} => n.s ; - {shi0} => n.s ; - {wan} => n.s ++ "仟" ; - {wan0} => n.s ++ "仟"}} ; -lin pot1 d = - {inh = zero ; - s = table { - {shi} => d.s ++ "拾" ; - {shi0} => d.s ++ "拾" ; - {wan0} => d.s ++ "万" ; - {wan} => d.s ++ "万"}} ; -lin pot1plus d e = - {inh = nozero ; - s = table { - {shi} => d.s ++ "拾" ++ e.s ; - {shi0} => d.s ++ "拾" ++ e.s ; - {wan} => d.s ++ "万" ++ e.s ++ "仟" ; - {wan0} => d.s ++ "万" ++ e.s ++ "仟"}} ; -lin pot1as2 n = - {inh = zero ; - s = table { - {bai} => n.s ! shi ; - {bai0} => n.s ! shi ; - {shiwan} => n.s ! wan ; - {shiwan0} => n.s ! wan0}} ; -lin pot2 d = - {inh = zero ; - s = table { - {bai} => d.s ++ "ä½°" ; - {bai0} => d.s ++ "ä½°" ; - {shiwan0} => d.s ++ "拾万" ; - {shiwan} => d.s ++ "拾万"}} ; -lin pot2plus d e = - {inh = nozero ; - s = table { - {bai} => d.s ++ "ä½°" ++ (ling ! ) ++ e.s ! shi0 ; - {bai0} => d.s ++ "ä½°" ++ (ling ! ) ++ e.s ! shi0 ; - {shiwan} => d.s ++ "拾" ++ (Wan ! (e.inh)) ++ e.s ! wan ; - {shiwan0} => d.s ++ "拾" ++ (Wan ! (e.inh)) ++ e.s ! wan0}} ; -lin pot2as3 n = - {s = n.s ! bai} ; -lin pot3 n = - {s = n.s ! shiwan} ; -lin pot3plus n m = - {s = (n.s ! shiwan0) ++ (ling ! ) ++ m.s ! bai0} ; - diff --git a/grammars/numerals/old/numerals.Dan.gf b/grammars/numerals/old/numerals.Dan.gf deleted file mode 100644 index d1f97525f..000000000 --- a/grammars/numerals/old/numerals.Dan.gf +++ /dev/null @@ -1,44 +0,0 @@ -include numerals.Abs.gf ; - --- AR 12/10/2002 following www.geocities.com/tsca.geo/dansk/dknummer.html - -param DForm = ental | ton | tiotal ; - -lincat Numeral = {s : Str} ; -lincat Digit = {s : DForm => Str} ; -lincat Sub10 = {s : DForm => Str} ; -lincat Sub100 = {s : Str} ; -lincat Sub1000 = {s : Str} ; -lincat Sub1000000 = {s : Str} ; - -oper mkTal : Str -> Str -> Str -> Lin Digit = - \to, tolv, tyve -> - {s = table {ental => to ; ton => tolv ; tiotal => tyve}} ; -oper regTal : Str -> Lin Digit = \fem -> mkTal fem (fem + "ton") (fem + "tio") ; -oper ss : Str -> {s : Str} = \s -> {s = s} ; - -lin num x = x ; - -lin n2 = mkTal "to" "tolv" "tyve" ; -lin n3 = mkTal "tre" "tretten" "tredive" ; -lin n4 = mkTal "fire" "fjorten" "fyrre" ; -lin n5 = mkTal "fem" "femten" "halvtreds" ; -lin n6 = mkTal "seks" "seksten" "tres" ; -lin n7 = mkTal "syv" "sytten" "halvfjerds" ; -lin n8 = mkTal "otte" "atten" "firs" ; -lin n9 = mkTal "ni" "nitten" "halvfems" ; - -lin pot01 = {s = table {f => "en"}} ; --- -lin pot0 d = {s = table {f => d.s ! f}} ; -lin pot110 = ss "ti" ; -lin pot111 = ss "elleve" ; -lin pot1to19 d = ss (d.s ! ton) ; -lin pot0as1 n = ss (n.s ! ental) ; -lin pot1 d = ss (d.s ! tiotal) ; -lin pot1plus d e = ss (e.s ! ental ++ "og" ++ d.s ! tiotal) ; -lin pot1as2 n = n ; -lin pot2 d = ss (d.s ! ental ++ "hundrede") ; -lin pot2plus d e = ss (d.s ! ental ++ "hundrede" ++ "og" ++ e.s) ; -lin pot2as3 n = n ; -lin pot3 n = ss (n.s ++ "tusind") ; -lin pot3plus n m = ss (n.s ++ "tusind" ++ "og" ++ m.s) ; --- diff --git a/grammars/numerals/old/numerals.Dec.gf b/grammars/numerals/old/numerals.Dec.gf deleted file mode 100644 index c27485373..000000000 --- a/grammars/numerals/old/numerals.Dec.gf +++ /dev/null @@ -1,43 +0,0 @@ -include numerals.Abs.gf ; - -flags lexer=chars ; unlexer=concat ; - -param Zeros = noz | zz ; - -lincat Sub100 = {s : Zeros => Str} ; -lincat Sub1000 = {s : Zeros => Str} ; -lincat Sub1000000 = {s : Zeros => Str} ; - -oper ss : Str -> {s : Str} = \s -> {s = s} ; -oper mkz : Str -> {s : Zeros => Str} = \s -> {s = table {_ => s}} ; - -lin num n = {s = n.s ! noz} ; -lin n2 = ss "2" ; -lin n3 = ss "3" ; -lin n4 = ss "4" ; -lin n5 = ss "5" ; -lin n6 = ss "6" ; -lin n7 = ss "7" ; -lin n8 = ss "8" ; -lin n9 = ss "9" ; - -lin pot01 = ss "1" ; -lin pot0 d = d ; - -lin pot110 = mkz ("1" ++ "0") ; -lin pot111 = mkz ("1" ++ "1") ; -lin pot1to19 d = mkz ("1" ++ d.s) ; - -lin pot0as1 n = {s = table {noz => n.s ; zz => "0" ++ n.s}} ; - -lin pot1 d = mkz (d.s ++ "0") ; -lin pot1plus d e = mkz (d.s ++ e.s) ; - -lin pot1as2 n = {s = table {noz => n.s ! noz ; zz => "0" ++ n.s ! zz}} ; -lin pot2 d = mkz (d.s ++ "0" ++ "0") ; -lin pot2plus d e = mkz (d.s ++ e.s ! zz) ; - -lin pot2as3 n = {s = table {noz => n.s ! noz ; zz => "0" ++ n.s ! zz}} ; - -lin pot3 n = mkz (n.s ! noz ++ "0" ++ "0" ++ "0") ; -lin pot3plus n m = {s = table {z => n.s ! z ++ m.s ! zz}} ; diff --git a/grammars/numerals/old/numerals.Deu.gf b/grammars/numerals/old/numerals.Deu.gf deleted file mode 100644 index 3e7b9990c..000000000 --- a/grammars/numerals/old/numerals.Deu.gf +++ /dev/null @@ -1,47 +0,0 @@ -include numerals.Abs.gf ; - -param DForm = unit | teen | ten ; -param Place = indep | prae | attr ; - -lincat Numeral = {s : Str} ; -lincat Digit = {s : DForm => Str} ; -lincat Sub10 = {s : DForm*Place => Str} ; -lincat Sub100 = {s : Place => Str} ; -lincat Sub1000 = {s : Place => Str} ; -lincat Sub1000000 = {s : Str} ; - -oper mkZahl : Str -> Str -> Str -> Lin Digit = - \två -> \tolv -> \tjugo -> - {s = table {unit => två ; teen => tolv ; ten => tjugo}} ; -oper regZahl : Str -> Lin Digit = - \vier -> mkZahl vier (vier + "zehn") (vier + "zig") ; -oper ss : Str -> {s : Str} = \s -> {s = s} ; - -lin num x = x ; - -lin n2 = mkZahl "zwei" "zwölf" "zwanzig" ; -lin n3 = mkZahl "drei" "dreizehn" "dreissig" ; -lin n4 = regZahl "vier" ; -lin n5 = regZahl "fünf" ; -lin n6 = regZahl "sechs" ; -lin n7 = mkZahl "sieben" "siebzehn" "siebzig" ; -lin n8 = regZahl "acht" ; -lin n9 = regZahl "neun" ; - -lin pot01 = {s = table { => "eins" ; => "ein" ; => []}} ; -lin pot0 d = {s = table { => d.s ! f}} ; -lin pot110 = {s = table {p => "zehn"}} ; -lin pot111 = {s = table {p => "elf"}} ; -lin pot1to19 d = {s = table {p => d.s ! teen}} ; -lin pot0as1 n = {s = table {p => n.s ! }} ; -lin pot1 d = {s = table {p => d.s ! ten}} ; -lin pot1plus d e = {s = table {p => e.s ! ++ "und" ++ d.s ! ten}} ; -lin pot1as2 n = {s = table {p => n.s ! p}} ; -lin pot2 d = {s = table {p => d.s ! ++ "hundert"}} ; -lin pot2plus d e = {s = table { - attr => d.s ! ++ "hundert" ++ e.s ! prae ; - _ => d.s ! ++ "hundert" ++ e.s ! indep}} ; -lin pot2as3 n = ss (n.s ! indep) ; -lin pot3 n = ss (n.s ! attr ++ "tausend") ; -lin pot3plus n m = ss (n.s ! attr ++ "tausend" ++ m.s ! prae) ; - diff --git a/grammars/numerals/old/numerals.Eng.gf b/grammars/numerals/old/numerals.Eng.gf deleted file mode 100644 index d4aa3e3de..000000000 --- a/grammars/numerals/old/numerals.Eng.gf +++ /dev/null @@ -1,39 +0,0 @@ -include numerals.Abs.gf ; - -param DForm = unit | teen | ten ; - -lincat Digit = {s : DForm => Str} ; -lincat Sub10 = {s : DForm => Str} ; - -oper mkNum : Str -> Str -> Str -> Lin Digit = - \two -> \twelve -> \twenty -> - {s = table {unit => two ; teen => twelve ; ten => twenty}} ; -oper regNum : Str -> Lin Digit = - \six -> mkNum six (six + "teen") (six + "ty") ; -oper ss : Str -> {s : Str} = \s -> {s = s} ; - -lin num x = x ; -lin n2 = mkNum "two" "twelve" "twenty" ; -lin n3 = mkNum "three" "thirteen" "thirty" ; -lin n4 = mkNum "four" "fourteen" "forty" ; -lin n5 = mkNum "five" "fifteen" "fifty" ; -lin n6 = regNum "six" ; -lin n7 = regNum "seven" ; -lin n8 = mkNum "eight" "eighteen" "eighty" ; -lin n9 = regNum "nine" ; - -lin pot01 = {s = table {f => "one"}} ; -lin pot0 d = {s = table {f => d.s ! f}} ; -lin pot110 = ss "ten" ; -lin pot111 = ss "eleven" ; -lin pot1to19 d = {s = d.s ! teen} ; -lin pot0as1 n = {s = n.s ! unit} ; -lin pot1 d = {s = d.s ! ten} ; -lin pot1plus d e = {s = d.s ! ten ++ "-" ++ e.s ! unit} ; -lin pot1as2 n = n ; -lin pot2 d = {s = d.s ! unit ++ "hundred"} ; -lin pot2plus d e = {s = d.s ! unit ++ "hundred" ++ "and" ++ e.s} ; -lin pot2as3 n = n ; -lin pot3 n = {s = n.s ++ "thousand"} ; -lin pot3plus n m = {s = n.s ++ "thousand" ++ m.s} ; - diff --git a/grammars/numerals/old/numerals.Fra.gf b/grammars/numerals/old/numerals.Fra.gf deleted file mode 100644 index 532a4598d..000000000 --- a/grammars/numerals/old/numerals.Fra.gf +++ /dev/null @@ -1,60 +0,0 @@ -include numerals.Abs.gf ; - -param DForm = unit | teen | jten | ten | tenplus ; -param Nm = sg | pl ; -param Place = indep | attr ; - - -lincat Numeral = {s : Str} ; -lincat Digit = {inh : DForm ; inh1 : Nm ; s : DForm => Str} ; -lincat Sub10 = {inh : Nm ; s : {p1 : DForm ; p2 : Place} => Str} ; -lincat Sub100 = {s : Place => Str} ; -lincat Sub1000 = {s : Place => Str} ; -lincat Sub1000000 = {s : Str} ; - -lin num x0 = - {s = x0.s} ; -lin n2 = - {inh = unit ; inh1 = sg ; s = table {unit => "deux" ; teen => "douze" ; jten => "vingt" ; ten => "vingt" ; tenplus => "vingt"}} ; -lin n3 = - {inh = unit ; inh1 = sg ; s = table {unit => "trois" ; teen => "treize" ; jten => "trente" ; ten => "trente" ; tenplus => "trente"}} ; -lin n4 = - {inh = unit ; inh1 = sg ; s = table {unit => "quatre" ; teen => "quatorze" ; jten => "quarante" ; ten => "quarante" ; tenplus => "quarante"}} ; -lin n5 = - {inh = unit ; inh1 = sg ; s = table {unit => "cinq" ; teen => "quinze" ; jten => "cinquante" ; ten => "cinquante" ; tenplus => "cinquante"}} ; -lin n6 = - {inh = unit ; inh1 = sg ; s = table {unit => "six" ; teen => "seize" ; jten => "soixante" ; ten => "soixante" ; tenplus => "soixante"}} ; -lin n7 = - {inh = teen ; inh1 = sg ; s = table {unit => "sept" ; teen => "dix" ++ "-" ++ "sept" ; jten => "soixante" ++ "-" ++ "dix" ; ten => "soixante" ++ "-" ++ "dix" ; tenplus => "soixante"}} ; -lin n8 = - {inh = unit ; inh1 = pl ; s = table {unit => "huit" ; teen => "dix" ++ "-" ++ "huit" ; jten => "quatre" ++ "-" ++ "vingts" ; ten => "quatre" ++ "-" ++ "vingt" ; tenplus => "quatre" ++ "-" ++ "vingt"}} ; -lin n9 = - {inh = teen ; inh1 = pl ; s = table {unit => "neuf" ; teen => "dix" ++ "-" ++ "neuf" ; jten => "quatre" ++ "-" ++ "vingt" ++ "-" ++ "dix" ; ten => "quatre" ++ "-" ++ "vingt" ++ "-" ++ "dix" ; tenplus => "quatre" ++ "-" ++ "vingt"}} ; -lin pot01 = - {inh = sg ; s = table {{p1 = unit ; p2 = indep} => "un" ; {p1 = unit ; p2 = attr} => [] ; {p1 = teen ; p2 = indep} => "onze" ; {p1 = teen ; p2 = attr} => [] ; {p1 = jten ; p2 = indep} => "dix" ; {p1 = jten ; p2 = attr} => [] ; {p1 = ten ; p2 = indep} => "dix" ; {p1 = ten ; p2 = attr} => [] ; {p1 = tenplus ; p2 = indep} => "dix" ; {p1 = tenplus ; p2 = attr} => []}} ; -lin pot0 d = - {inh = pl ; s = table {{p1 = unit ; p2 = indep} => d.s ! unit ; {p1 = unit ; p2 = attr} => d.s ! unit ; {p1 = teen ; p2 = indep} => d.s ! teen ; {p1 = teen ; p2 = attr} => d.s ! teen ; {p1 = jten ; p2 = indep} => d.s ! jten ; {p1 = jten ; p2 = attr} => d.s ! jten ; {p1 = ten ; p2 = indep} => d.s ! ten ; {p1 = ten ; p2 = attr} => d.s ! ten ; {p1 = tenplus ; p2 = indep} => d.s ! tenplus ; {p1 = tenplus ; p2 = attr} => d.s ! tenplus}} ; -lin pot110 = - {s = table {indep => "dix" ; attr => "dix"}} ; -lin pot111 = - {s = table {indep => "onze" ; attr => "onze"}} ; -lin pot1to19 d = - {s = table {indep => d.s ! teen ; attr => d.s ! teen}} ; -lin pot0as1 n = - {s = table {indep => n.s ! {p1 = unit ; p2 = indep} ; attr => n.s ! {p1 = unit ; p2 = attr}}} ; -lin pot1 d = - {s = table {indep => d.s ! jten ; attr => d.s ! ten}} ; -lin pot1plus d e = - {s = table {indep => (d.s ! tenplus) ++ (table {{p1 = sg ; p2 = sg} => "et" ; {p1 = sg ; p2 = pl} => "-" ; {p1 = pl ; p2 = sg} => "-" ; {p1 = pl ; p2 = pl} => "-"} ! {p1 = d.inh1 ; p2 = e.inh}) ++ e.s ! {p1 = d.inh ; p2 = indep} ; attr => (d.s ! tenplus) ++ (table {{p1 = sg ; p2 = sg} => "et" ; {p1 = sg ; p2 = pl} => "-" ; {p1 = pl ; p2 = sg} => "-" ; {p1 = pl ; p2 = pl} => "-"} ! {p1 = d.inh1 ; p2 = e.inh}) ++ e.s ! {p1 = d.inh ; p2 = indep}}} ; -lin pot1as2 n = - {s = table {indep => n.s ! indep ; attr => n.s ! attr}} ; -lin pot2 d = - {s = table {indep => (d.s ! {p1 = unit ; p2 = attr}) ++ table {sg => "cent" ; pl => "cents"} ! (d.inh) ; attr => (d.s ! {p1 = unit ; p2 = attr}) ++ "cent"}} ; -lin pot2plus d e = - {s = table {indep => (d.s ! {p1 = unit ; p2 = attr}) ++ "cent" ++ e.s ! indep ; attr => (d.s ! {p1 = unit ; p2 = attr}) ++ "cent" ++ e.s ! indep}} ; -lin pot2as3 n = - {s = n.s ! indep} ; -lin pot3 n = - {s = (n.s ! attr) ++ "mille"} ; -lin pot3plus n m = - {s = (n.s ! attr) ++ "mille" ++ m.s ! indep} ; diff --git a/grammars/numerals/old/numerals.Gre.gf b/grammars/numerals/old/numerals.Gre.gf deleted file mode 100644 index b88065bfc..000000000 --- a/grammars/numerals/old/numerals.Gre.gf +++ /dev/null @@ -1,92 +0,0 @@ -include numerals.Abs.gf ; - -param DForm = unit | teen | ten | hund ; -param Place = attr | indep ; -param Size = sg | pl ; -lincat Numeral = {s : Str} ; -lincat Digit = {s : DForm => Str} ; -lincat Sub10 = {s : Place => DForm => Str ; size : Size} ; -lincat Sub100 = {s : Place => Str ; size : Size} ; -lincat Sub1000 = {s : Place => Str ; size : Size} ; -lincat Sub1000000 = {s : Str} ; -lin num x0 = - {s = "//" ++ x0.s ++ "//"} ; -- Greek environment - -lin n2 = - {s = table {{unit} => "d'yo" ; - {teen} => "d'wdeka" ; - {ten} => "e)'ikosi" ; - {hund} => "diak'osioi"}} ; -lin n3 = - {s = table {{unit} => "tre~ij" ; - {teen} => "tre~ij" ++ "ka`i" ++ "d'eka" ; - {ten} => "tri'akonta" ; - {hund} => "triak'osioi"}} ; -lin n4 = - {s = table {{unit} => "t'ettarej" ; - {teen} => "t'ettarej" ++ "ka`i" ++ "d'eka" ; - {ten} => "tettar'akonta" ; - {hund} => "tetrak'osioi"}} ; -lin n5 = - {s = table {{unit} => "p'ente" ; - {teen} => "penteka'ideka" ; - {ten} => "pent'hkonta" ; - {hund} => "pentak'osioi"}} ; -lin n6 = - {s = table {{unit} => "('ex" ; - {teen} => "(ekka'ideka" ; - {ten} => "(ex'hkonta" ; - {hund} => "(exak'osioi"}} ; -lin n7 = - {s = table {{unit} => "(ept'a" ; - {teen} => "(eptaka'ideka" ; - {ten} => "(ebdom'hkonta" ; - {hund} => "(eptak'osioi"}} ; -lin n8 = - {s = table {{unit} => ")okt'w" ; - {teen} => ")oktwka'ideka" ; - {ten} => ")ogdo'hkonta" ; - {hund} => ")oktako'sioi"}} ; -lin n9 = - {s = table {{unit} => ")enn'ea" ; - {teen} => ")enneaka'ideka" ; - {ten} => ")enen'hkonta" ; - {hund} => ")enak'osioi"}} ; - - -lin pot01 = - {s = table {{attr} => table {{hund} => "(ekat'on" ; _ => []} ; - _ => table {{hund} => "(ekat'on" ; f => "e('ij"}} ; size = sg} ; -lin pot0 d = - {s = table {_ => d.s} ; size = pl} ; -lin pot110 = - {s = table {_ => "d'eka"} ; size = pl} ; -lin pot111 = - {s = table {_ => "('endeka"} ; size = pl} ; -lin pot1to19 d = - {s = table {_ => d.s ! teen} ; size = pl} ; -lin pot0as1 n = - {s = table {p => n.s ! p ! unit} ; size = n.size} ; -lin pot1 d = - {s = table {_ => d.s ! ten} ; size = pl} ; -lin pot1plus d e = - {s = table {_ => d.s ! ten ++ e.s ! indep ! unit} ; size = pl} ; -lin pot1as2 n = - {s = n.s ; size = n.size} ; -lin pot2 d = - {s = table {p => d.s ! p ! hund} ; size = pl} ; -lin pot2plus d e = - {s = table {p => d.s ! p ! hund ++ e.s ! indep} ; size = pl} ; -lin pot2as3 n = - {s = n.s ! indep} ; -lin pot3 n = - {s = n.s ! attr ++ "c'ilioi"} ; -lin pot3plus n m = - {s = n.s ! attr ++ "c'ilioi" ++ m.s ! indep} ; - ---- TODO ---- 2000 discilioi-3 ---- 10000 myrioi-3 ---- 20000 dismyrioi-3 - - diff --git a/grammars/numerals/old/numerals.Heb.gf b/grammars/numerals/old/numerals.Heb.gf deleted file mode 100644 index 5f38915dc..000000000 --- a/grammars/numerals/old/numerals.Heb.gf +++ /dev/null @@ -1,88 +0,0 @@ -include numerals.Abs.gf ; - -param DForm = unit Place | cons | ten | hund ; -param Size = small | large | dual ; -param Place = attr | indep ; -lincat Numeral = {s : Str} ; -lincat Digit = {s : DForm => Str ; size : Size} ; -lincat Sub10 = {s : DForm => Str ; size : Size} ; -lincat Sub100 = {s : Place => Str ; size : Size} ; -lincat Sub1000 = {s : Place => Str ; size : Size} ; -lincat Sub1000000 = {s : Str} ; -lin num x0 = - {s = "/+" ++ x0.s ++ "+/"} ; -- the Hebrew environment - -lin n2 = - {s = table {(unit attr) => [] ; - (unit indep) => "snyM" ; - cons => "sny" ; - ten => "osryM" ; - hund => "matyM"} ; size = dual} ; -lin n3 = - {s = table {(unit _) => "slsh" ; - cons => "slst" ; - ten => "slsyM" ; - hund => "sls-mawt"} ; size = small} ; -lin n4 = - {s = table {(unit _) => "arboh" ; - cons => "arbot" ; - ten => "arboyM" ; - hund => "arbo-mawt"} ; size = small} ; -lin n5 = - {s = table {(unit _) => "Hmsh" ; - cons => "Hmst" ; - ten => "HmsyM" ; - hund => "Hms-mawt"} ; size = small} ; -lin n6 = - {s = table {(unit _) => "ssh" ; - cons => "sst" ; - ten => "ssyM" ; - hund => "ss-mawt"} ; size = small} ; -lin n7 = - {s = table {(unit _) => "sboh" ; - cons => "sbot" ; - ten => "sboyM" ; - hund => "sbo-mawt"} ; size = small} ; -lin n8 = - {s = table {(unit _) => "smwnh" ; - cons => "smwnt" ; - ten => "smwnyM" ; - hund => "smwnh-mawt"} ; size = small} ; -lin n9 = - {s = table {(unit _) => "tsoh" ; - cons => "tsot" ; - ten => "tsoyM" ; - hund => "tso-mawt"} ; size = small} ; - -lin pot01 = - {s = table {hund => "mah"; (unit attr) => [] ; f => "aHd"} ; size = large} ; -lin pot0 d = - {s = d.s ; size = d.size} ; -lin pot110 = - {s = table {_ => "osr"} ; size = small} ; -lin pot111 = - {s = table {_ => "aHd" ++ "-" ++ "osr"} ; size = large} ; -lin pot1to19 d = - {s = table {_ => d.s ! unit indep ++ "-" ++ "osr"} ; size = large} ; -lin pot0as1 n = - {s = table {p => n.s ! unit p} ; size = n.size} ; -lin pot1 d = - {s = table {_ => d.s ! ten} ; size = large} ; -lin pot1plus d e = - {s = table {_ => d.s ! ten ++ "w" ++ e.s ! unit indep} ; size = large} ; -lin pot1as2 n = - {s = n.s ; size = n.size} ; -lin pot2 d = - {s = table {_ => d.s ! hund} ; size = large} ; -lin pot2plus d e = - {s = table {_ => d.s ! hund ++ "w" ++ e.s ! indep} ; size = large} ; -lin pot2as3 n = - {s = n.s ! indep} ; -lin pot3 n = - {s = n.s ! attr ++ Alf ! n.size} ; -lin pot3plus n m = - {s = n.s ! attr ++ Alf ! n.size ++ "w" ++ m.s ! indep} ; - -oper Alf : Size => Str = - table {{small} => "alpyM" ; {dual} => "alpyM" ; _ => "alP"} ; - diff --git a/grammars/numerals/old/numerals.Ita.gf b/grammars/numerals/old/numerals.Ita.gf deleted file mode 100644 index 29e15cd7b..000000000 --- a/grammars/numerals/old/numerals.Ita.gf +++ /dev/null @@ -1,45 +0,0 @@ -include numerals.Abs.gf ; - -param DForm = ental Pred | ton | tiotal ; -param Num = sg | pl ; -param Pred = pred | indip ; - -lincat Digit = {s : DForm => Str} ; -lincat Sub10 = {s : DForm => Str ; n : Num} ; -lincat Sub100 = {s : Str ; n : Num} ; -lincat Sub1000 = {s : Str ; n : Num} ; -lincat Sub1000000 = {s : Str} ; - -oper mkTal : Str -> Str -> Str -> Lin Digit = - \två -> \tolv -> \tjugo -> - {s = table {ental _ => två ; ton => tolv ; tiotal => tjugo}} ; -oper ss : Str -> {s : Str} = \s -> {s = s} ; -oper spl : Str -> {s : Str ; n : Num} = \s -> {s = s ; n = pl} ; -oper mille : Num => Str = table {sg => "mille" ; pl => "mila"} ; - -lin num x = x ; - -lin n2 = mkTal "due" "dodici" "venti" ; -lin n3 = mkTal "tre" "tredici" "trenta" ; -lin n4 = mkTal "quattro" "quattordici" "quaranta" ; -lin n5 = mkTal "cinque" "quindici" "cinquanta" ; -lin n6 = mkTal "sei" "sedici" "sessanta" ; -lin n7 = mkTal "sette" "diciassette" "settanta" ; -lin n8 = mkTal "otto" "diciotto" "ottanta" ; -lin n9 = mkTal "nove" "diciannove" "novanta" ; - -lin pot01 = {s = table {ental pred => [] ; _ => "uno"} ; n = sg} ; -lin pot0 d = {s = table {f => d.s ! f} ; n = pl} ; -lin pot110 = spl "dieci" ; -lin pot111 = spl "undici" ; -lin pot1to19 d = spl (d.s ! ton) ; -lin pot0as1 n = {s = n.s ! ental indip ; n = n.n} ; -lin pot1 d = spl (d.s ! tiotal) ; -lin pot1plus d e = spl (d.s ! tiotal ++ e.s ! ental indip) ; -lin pot1as2 n = {s = n.s ; n = n.n} ; -lin pot2 d = spl (d.s ! ental pred ++ "cento") ; -lin pot2plus d e = spl (d.s ! ental pred ++ "cento" ++ e.s) ; -lin pot2as3 n = {s = n.s ; n = n.n} ; -lin pot3 n = ss (n.s ++ mille ! n.n) ; -lin pot3plus n m = ss (n.s ++ mille ! n.n ++ m.s) ; - diff --git a/grammars/numerals/old/numerals.Mag.gf b/grammars/numerals/old/numerals.Mag.gf deleted file mode 100644 index 2489fb6ef..000000000 --- a/grammars/numerals/old/numerals.Mag.gf +++ /dev/null @@ -1,61 +0,0 @@ -include numerals.Abs.gf ; - --- by Patrik Jansson, Chalmers - -param DForm = ental | tiotal ; -param Place = attr | indep ; -lincat Numeral = {s : Str} ; -lincat Digit = {s : (DForm*Place) => Str} ; -lincat Sub10 = {s : (DForm*Place) => Str} ; -lincat Sub100 = {s : Place => Str} ; -lincat Sub1000 = {s : Place => Str} ; -lincat Sub1000000 = {s : Str} ; -lin num x0 = - {s = x0.s} ; -lin n2 = - {s = table { => "kettö" ; - => "húsz" ; - => "két" ; - => "huszon"}} ; -lin n3 = - {s = table { => "három" ; => "harminc"}} ; -lin n4 = - {s = table { => "négy" ; => "negyven"}} ; -lin n5 = - {s = table { => "öt" ; => "ötven"}} ; -lin n6 = - {s = table { => "hat" ; => "hatvan"}} ; -lin n7 = - {s = table { => "hét" ; => "hetven"}} ; -lin n8 = - {s = table { => "nyolc" ; => "nyolcvan"}} ; -lin n9 = - {s = table { => "kilenc" ; => "kilencven"}} ; -lin pot01 = - {s = table { => [] ; => "egy"}} ; -lin pot0 d = - {s = table { => d.s ! }} ; -lin pot110 = - {s = table {p => "tíz"}} ; -lin pot111 = - {s = table {p => "tizen" ++ "egy"}} ; -lin pot1to19 d = - {s = table {p => "tizen" ++ d.s ! }} ; -lin pot0as1 n = - {s = table {p => n.s ! }} ; -lin pot1 d = - {s = table {p => d.s ! }} ; -lin pot1plus d e = - {s = table {p => (d.s ! ) ++ e.s ! }} ; -lin pot1as2 n = - {s = table {p => n.s ! p}} ; -lin pot2 d = - {s = table {p => (d.s ! ) ++ "száz"}} ; -lin pot2plus d e = - {s = table {p => (d.s ! ) ++ "száz" ++ e.s ! indep}} ; -lin pot2as3 n = - {s = n.s ! indep} ; -lin pot3 n = - {s = n.s ! attr ++ "ezer"} ; -lin pot3plus n m = - {s = n.s ! attr ++ "ezer" ++ m.s ! indep} ; diff --git a/grammars/numerals/old/numerals.Malay.gf b/grammars/numerals/old/numerals.Malay.gf deleted file mode 100644 index 1213a96ee..000000000 --- a/grammars/numerals/old/numerals.Malay.gf +++ /dev/null @@ -1,71 +0,0 @@ --- Malay Numerals (Indonesian) --- David Wahlstedt Sep 2002 - -include numerals.Abs.gf ; - -param - Place = attr | indep ; - Nm = sg | pl ; - -oper Num = {inh : Nm ; s : Place => Str} ; - -lincat - Numeral = {s : Str} ; - Digit = {s : Str} ; - Sub10 = Num ; - Sub100 = Num ; - Sub1000 = Num ; - Sub1000000 = {s : Str} ; - -oper - ratus : Nm => Str = -- 100 - table {{sg} => "seratus" ; {pl} => "ratus"} ; - - ribu : Nm => Str = -- 1000 - table {{sg} => "seribu" ; {pl} => "ribu"} ; - - mkTab : Str -> Place => Str = \s -> table { _ => s } ; - - mkNum : Str -> Num = \s -> {inh = pl ; s = mkTab s} ; - - ss : Str -> { s : Str } = \s -> { s = s } ; - -lin - num x0 = x0 ; - - n2 = ss "dua" ; - n3 = ss "tiga" ; - n4 = ss "empat" ; - n5 = ss "lima" ; - n6 = ss "enam" ; - n7 = ss "tujuh" ; - n8 = ss "delapan" ; - n9 = ss "sembilan" ; - - pot01 = {inh = sg ; s = table {{attr} => [] ; {indep} => "satu"}} ; - - pot0 d = mkNum d.s ; - - pot110 = mkNum "sepuluh" ; - - pot111 = mkNum "sebelas" ; - - pot1to19 d = mkNum ( d.s ++ "belas" ) ; - - pot0as1 n = n ; - - pot1 d = mkNum ( d.s ++ "puluh" ) ; - - pot1plus d e = mkNum ( d.s ++ "puluh" ++ e.s ! indep ) ; - - pot1as2 n = n ; - - pot2 d = mkNum ( d.s ! attr ++ ratus ! d.inh ) ; - - pot2plus d e = mkNum ( d.s ! attr ++ ratus ! d.inh ++ e.s ! indep ) ; - - pot2as3 n = ss ( n.s ! indep ) ; - - pot3 n = ss ( n.s ! attr ++ ribu ! n.inh ) ; - - pot3plus n m = ss ( n.s ! attr ++ ribu ! n.inh ++ m.s ! indep ) ; diff --git a/grammars/numerals/old/numerals.Ned.gf b/grammars/numerals/old/numerals.Ned.gf deleted file mode 100644 index 69f101f04..000000000 --- a/grammars/numerals/old/numerals.Ned.gf +++ /dev/null @@ -1,48 +0,0 @@ --- Koen Claessen from Deu, 11/1/2001. - -include numerals.Abs.gf ; - -param DForm = unit | teen | ten ; -param Place = indep | prae | attr ; - -lincat Numeral = {s : Str} ; -lincat Digit = {s : DForm => Str} ; -lincat Sub10 = {s : DForm * Place => Str} ; -lincat Sub100 = {s : Place => Str} ; -lincat Sub1000 = {s : Place => Str} ; -lincat Sub1000000 = {s : Str} ; - -oper mkGetal : Str -> Str -> Str -> Lin Digit = - \två -> \tolv -> \tjugo -> - {s = table {unit => två ; teen => tolv ; ten => tjugo}} ; -oper regGetal : Str -> Lin Digit = - \vier -> mkGetal vier (vier + "tien") (vier + "tig") ; -oper ss : Str -> {s : Str} = \s -> {s = s} ; - -lin num x = x ; - -lin n2 = mkGetal "twee" "twaalf" "twintig" ; -lin n3 = mkGetal "drie" "dertien" "dertig" ; -lin n4 = mkGetal "vier" "veertien" "veertig"; -lin n5 = regGetal "vijf" ; -lin n6 = regGetal "zes" ; -lin n7 = regGetal "zeven" ; -lin n8 = mkGetal "acht" "achttien" "tachtig"; -lin n9 = regGetal "negen" ; - -lin pot01 = {s = table { => "een" ; => "een" ; => []}} ; -lin pot0 d = {s = table { => d.s ! f}} ; -lin pot110 = {s = table {p => "tien"}} ; -lin pot111 = {s = table {p => "elf"}} ; -lin pot1to19 d = {s = table {p => d.s ! teen}} ; -lin pot0as1 n = {s = table {p => n.s ! }} ; -lin pot1 d = {s = table {p => d.s ! ten}} ; -lin pot1plus d e = {s = table {p => e.s ! ++ "en" ++ d.s ! ten}} ; -lin pot1as2 n = {s = table {p => n.s ! p}} ; -lin pot2 d = {s = table {p => d.s ! ++ "honderd"}} ; -lin pot2plus d e = {s = table { - _ => d.s ! ++ "honderd" ++ e.s ! indep}} ; -lin pot2as3 n = ss (n.s ! indep) ; -lin pot3 n = ss (n.s ! attr ++ "duizend") ; -lin pot3plus n m = ss (n.s ! attr ++ "duizend" ++ m.s ! prae) ; - diff --git a/grammars/numerals/old/numerals.NorB.gf b/grammars/numerals/old/numerals.NorB.gf deleted file mode 100644 index be67e94fe..000000000 --- a/grammars/numerals/old/numerals.NorB.gf +++ /dev/null @@ -1,45 +0,0 @@ --- norsk bokmol, by Herman R Jervell herman.jervell@ilf.uio.no, 6/3/2001 - -include numerals.Abs.gf ; - -param DForm = ental | ton | tiotal ; - -lincat Numeral = {s : Str} ; -lincat Digit = {s : DForm => Str} ; -lincat Sub10 = {s : DForm => Str} ; -lincat Sub100 = {s : Str} ; -lincat Sub1000 = {s : Str} ; -lincat Sub1000000 = {s : Str} ; - -oper mkTal : Str -> Str -> Str -> Lin Digit = - \två -> \tolv -> \tjugo -> - {s = table {ental => två ; ton => tolv ; tiotal => tjugo}} ; -oper regTal : Str -> Lin Digit = \fem -> mkTal fem (fem + "ten") (fem + "ti") ; -oper ss : Str -> {s : Str} = \s -> {s = s} ; - -lin num x = x ; - -lin n2 = mkTal "to" "tolv" "tjue" ; -lin n3 = mkTal "tre" "tretten" "tretti" ; -lin n4 = mkTal "fire" "fjorten" "førti" ; -lin n5 = regTal "fem" ; -lin n6 = regTal "seks" ; -lin n7 = mkTal "sju" "sytten" "sytti" ; -lin n8 = mkTal "åtte" "atten" "åtti" ; -lin n9 = mkTal "ni" "nitten" "nitti" ; - -lin pot01 = {s = table {f => "et"}} ; -lin pot0 d = {s = table {f => d.s ! f}} ; -lin pot110 = ss "ti" ; -lin pot111 = ss "elve" ; -lin pot1to19 d = ss (d.s ! ton) ; -lin pot0as1 n = ss (n.s ! ental) ; -lin pot1 d = ss (d.s ! tiotal) ; -lin pot1plus d e = ss (d.s ! tiotal ++ e.s ! ental) ; -lin pot1as2 n = n ; -lin pot2 d = ss (d.s ! ental ++ "hundre") ; -lin pot2plus d e = ss (d.s ! ental ++ "hundre" ++ "og" ++ e.s) ; -lin pot2as3 n = n ; -lin pot3 n = ss (n.s ++ "tusen") ; -lin pot3plus n m = ss (n.s ++ "tusen" ++ "og" ++ m.s) ; - diff --git a/grammars/numerals/old/numerals.Pol.gf b/grammars/numerals/old/numerals.Pol.gf deleted file mode 100644 index 8ecc3839a..000000000 --- a/grammars/numerals/old/numerals.Pol.gf +++ /dev/null @@ -1,94 +0,0 @@ --- numerals in Polish, author Wojciech Mostowski, 20/9/2002 - -include numerals.Abs.gf ; - --- all different for unit digits, teens, tens and hundreds -param DForm = unit | teen | ten | hund ; - --- cases for thousand in Polish --- 1000 - jeden TYSIAC --- 2000 - dwa TYSIACE --- 3000 - trzy TYSIACE --- 4000 - cztery TYSIACE --- 5000 - piec TYSIECY --- 104000 - sto cztery TYSIECE --- 105000 - sto piec TYSIECY --- 24000 - dwadziescia cztery TYSIACE --- 25000 - dwadziescia piec TYSIACY --- BUT e.g. --- 21000 - dwadziescia jeden TYSIECY (not TYSIAC) --- 11000 - jedenascie TYSIECY --- (12..19)000 - TYSIECY - -param ThForm = onlyone | lastone | twoorthreeorfour | fiveup ; - -oper LinDigit = {s : DForm => Str; o : ThForm ; t : ThForm } ; -lincat Digit = LinDigit ; -lincat Sub10 = {s : DForm => Str; o : ThForm ; t : ThForm } ; -lincat Sub100 = {s : Str; t : ThForm } ; -lincat Sub1000 = {s : Str; t : ThForm } ; - -oper mkNum : Str -> Str -> Str -> Str -> ThForm -> LinDigit = - \dwa -> \dwanascie -> \dwadziescia -> \dwiescie -> \thform -> - { s = table {unit => dwa ; teen => dwanascie ; ten => dwadziescia ; hund => -dwiescie }; - o = thform ; t = thform - }; - -oper mkRegNum1 : Str -> LinDigit = - \siedem -> - { s = table { unit => siedem ; teen => siedem + "nascie" ; - ten => siedem + "dziesiat" ; hund => siedem + "set" - }; - o = fiveup ; t = fiveup - }; -oper mkRegNum2 : Str -> LinDigit = - \pie -> - { s = table { unit => pie + "c" ; teen => pie + "tnascie" ; - ten => pie + "cdziesiat" ; hund => pie + "cset" - }; - o = fiveup ; t = fiveup - }; - -oper mkTh : ThForm => Str = - table { onlyone => "tysiac" ; lastone => "tysiecy" ; - twoorthreeorfour => "tysiace" ; fiveup => "tysiecy" - }; - -oper ss : Str -> ThForm -> {s : Str ; t : ThForm} = \str -> \th -> {s = str; t = th} -; - -lin num x = x ; - -lin n2 = mkNum "dwa" "dwanascie" "dwadziescia" "dwiescie" -twoorthreeorfour ; -lin n3 = mkNum "trzy" "trzynascie" "trzydziesci" "trzysta" -twoorthreeorfour ; -lin n4 = mkNum "cztery" "czternascie" "czterdziesci" "czterysta" -twoorthreeorfour ; -lin n5 = mkRegNum2 "pie" ; -lin n6 = mkNum "szesc" "szesnascie" "szescdziesiat" "szescset" fiveup; -lin n7 = mkRegNum1 "siedem" ; -lin n8 = mkRegNum1 "osiem" ; -lin n9 = mkRegNum2 "dziewie" ; - -lin pot01 = { s = table {hund => "sto"; f => "jeden" }; - o = onlyone ; t = lastone - }; -lin pot0 d = {s = table {f => d.s ! f} ; o = d.o ; t = d.t} ; -lin pot110 = ss "dziesiec" fiveup ; -lin pot111 = ss "jedenascie" fiveup ; -lin pot1to19 d = {s = d.s ! teen ; t = fiveup} ; -lin pot0as1 n = {s = n.s ! unit ; t = n.o} ; -lin pot1 d = {s = d.s ! ten ; t = fiveup} ; -lin pot1plus d e = {s = d.s ! ten ++ e.s ! unit; t = e.t} ; -lin pot1as2 n = n ; -lin pot2 d = {s = d.s ! hund ; t = fiveup} ; -lin pot2plus d e = { s = d.s ! hund ++ e.s ; - t = table { onlyone => lastone ; f => f } ! e.t - } ; - -lin pot2as3 n = n ; -lin pot3 n = {s = n.s ++ mkTh ! n.t} ; -lin pot3plus n m = {s = n.s ++ mkTh ! n.t ++ m.s} ; - diff --git a/grammars/numerals/old/numerals.Rus.gf b/grammars/numerals/old/numerals.Rus.gf deleted file mode 100644 index 7e08361fa..000000000 --- a/grammars/numerals/old/numerals.Rus.gf +++ /dev/null @@ -1,111 +0,0 @@ -include numerals.Abs.gf ; - --- Toiska, 13/8/2000, AR with Arto Mustajoki. - -param DForm = unit | teen | ten | hund ; -param Place = attr | indep ; -param Size = nom | sgg | plg ; -param Gen = masc | fem | neut ; -lincat Numeral = {s : Str} ; -lincat Digit = {s : DForm => Gen => Str ; size : Size} ; -lincat Sub10 = {s : Place => DForm => Gen => Str ; size : Size} ; -lincat Sub100 = {s : Place => Gen => Str ; size : Size} ; -lincat Sub1000 = {s : Place => Gen => Str ; size : Size} ; -lincat Sub1000000 = {s : Gen => Str} ; - -oper mille : Size => Str = table { - {nom} => "t1säqa" ; - {sgg} => "t1säqi" ; - _ => "t1säq"} ; - -oper gg : Str -> Gen => Str = \s -> table {_ => s} ; - -lin num x0 = - {s = "/_" ++ x0.s ! masc ++ "_/"} ; -- Russian environment - -lin n2 = - {s = table {{unit} => table {{fem} => "dve" ; _ => "dva"} ; - {teen} => gg "dvenadcat'" ; - {ten} => gg "dvadcat'" ; - {hund} => gg "dvesti"} ; - size = sgg} ; -lin n3 = - {s = table {{unit} => gg "tri" ; - {teen} => gg "trinadcat'" ; - {ten} => gg "tridcat'" ; - {hund} => gg "trista"} ; - size = sgg} ; -lin n4 = - {s = table {{unit} => gg "qet1re" ; - {teen} => gg "qet1rnadcat'" ; - {ten} => gg "sorok" ; - {hund} => gg "qet1resta"} ; - size = sgg} ; -lin n5 = - {s = table {{unit} => gg "pät'" ; - {teen} => gg "pätnadcat'" ; - {ten} => gg "pät'desät" ; - {hund} => gg "pät'sot"} ; - size = plg} ; -lin n6 = - {s = table {{unit} => gg "west'" ; - {teen} => gg "westnadcat'" ; - {ten} => gg "west'desät" ; - {hund} => gg "west'sot"} ; - size = plg} ; -lin n7 = - {s = table {{unit} => gg "sem'" ; - {teen} => gg "semnadcat'" ; - {ten} => gg "sem'desät" ; - {hund} => gg "sem'sot"} ; - size = plg} ; -lin n8 = - {s = table {{unit} => gg "vosem'" ; - {teen} => gg "vosemnadcat'" ; - {ten} => gg "vosem'desät" ; - {hund} => gg "vosem'sot"} ; - size = plg} ; -lin n9 = - {s = table {{unit} => gg "devät'" ; - {teen} => gg "devätnadcat'" ; - {ten} => gg "devänosto" ; - {hund} => gg "devät'sot"} ; - size = plg} ; - - -lin pot01 = - {s = table {{attr} => table {{hund} => gg "sto" ; _ => gg []} ; - _ => table {{hund} => gg "sto" ; - _ => table {{masc} => "odin" ; {fem} => "odna" ; _ => "odno"}}} ; - size = nom} ; -lin pot0 d = - {s = table {_ => d.s} ; size = d.size} ; -lin pot110 = - {s = table {_ => gg "desät'"} ; size = plg} ; -lin pot111 = - {s = table {_ => gg "odinnadcat'"} ; size = plg} ; --- 11 -lin pot1to19 d = - {s = table {_ => d.s ! teen} ; size = plg} ; -lin pot0as1 n = - {s = table {p => n.s ! p ! unit} ; size = n.size} ; -lin pot1 d = - {s = table {_ => d.s ! ten} ; size = plg} ; --- -lin pot1plus d e = - {s = table {_ => - table {g => d.s ! ten ! g ++ e.s ! indep ! unit ! g}} ; size = e.size} ; -lin pot1as2 n = - {s = n.s ; size = n.size} ; -lin pot2 d = - {s = table {p => d.s ! p ! hund} ; size = plg} ; -lin pot2plus d e = - {s = table {p => table {g => d.s ! p ! hund ! g ++ e.s ! indep ! g}} ; size = e.size} ; -lin pot2as3 n = - {s = n.s ! indep} ; -lin pot3 n = - {s = gg (n.s ! attr ! fem ++ mille ! n.size)} ; -lin pot3plus n m = - {s = table {g => n.s ! attr ! fem ++ mille ! n.size ++ m.s ! indep ! g}} ; - ---- TODO ---- raz/odin - diff --git a/grammars/numerals/old/numerals.RusU.gf b/grammars/numerals/old/numerals.RusU.gf deleted file mode 100644 index 7e08361fa..000000000 --- a/grammars/numerals/old/numerals.RusU.gf +++ /dev/null @@ -1,111 +0,0 @@ -include numerals.Abs.gf ; - --- Toiska, 13/8/2000, AR with Arto Mustajoki. - -param DForm = unit | teen | ten | hund ; -param Place = attr | indep ; -param Size = nom | sgg | plg ; -param Gen = masc | fem | neut ; -lincat Numeral = {s : Str} ; -lincat Digit = {s : DForm => Gen => Str ; size : Size} ; -lincat Sub10 = {s : Place => DForm => Gen => Str ; size : Size} ; -lincat Sub100 = {s : Place => Gen => Str ; size : Size} ; -lincat Sub1000 = {s : Place => Gen => Str ; size : Size} ; -lincat Sub1000000 = {s : Gen => Str} ; - -oper mille : Size => Str = table { - {nom} => "t1säqa" ; - {sgg} => "t1säqi" ; - _ => "t1säq"} ; - -oper gg : Str -> Gen => Str = \s -> table {_ => s} ; - -lin num x0 = - {s = "/_" ++ x0.s ! masc ++ "_/"} ; -- Russian environment - -lin n2 = - {s = table {{unit} => table {{fem} => "dve" ; _ => "dva"} ; - {teen} => gg "dvenadcat'" ; - {ten} => gg "dvadcat'" ; - {hund} => gg "dvesti"} ; - size = sgg} ; -lin n3 = - {s = table {{unit} => gg "tri" ; - {teen} => gg "trinadcat'" ; - {ten} => gg "tridcat'" ; - {hund} => gg "trista"} ; - size = sgg} ; -lin n4 = - {s = table {{unit} => gg "qet1re" ; - {teen} => gg "qet1rnadcat'" ; - {ten} => gg "sorok" ; - {hund} => gg "qet1resta"} ; - size = sgg} ; -lin n5 = - {s = table {{unit} => gg "pät'" ; - {teen} => gg "pätnadcat'" ; - {ten} => gg "pät'desät" ; - {hund} => gg "pät'sot"} ; - size = plg} ; -lin n6 = - {s = table {{unit} => gg "west'" ; - {teen} => gg "westnadcat'" ; - {ten} => gg "west'desät" ; - {hund} => gg "west'sot"} ; - size = plg} ; -lin n7 = - {s = table {{unit} => gg "sem'" ; - {teen} => gg "semnadcat'" ; - {ten} => gg "sem'desät" ; - {hund} => gg "sem'sot"} ; - size = plg} ; -lin n8 = - {s = table {{unit} => gg "vosem'" ; - {teen} => gg "vosemnadcat'" ; - {ten} => gg "vosem'desät" ; - {hund} => gg "vosem'sot"} ; - size = plg} ; -lin n9 = - {s = table {{unit} => gg "devät'" ; - {teen} => gg "devätnadcat'" ; - {ten} => gg "devänosto" ; - {hund} => gg "devät'sot"} ; - size = plg} ; - - -lin pot01 = - {s = table {{attr} => table {{hund} => gg "sto" ; _ => gg []} ; - _ => table {{hund} => gg "sto" ; - _ => table {{masc} => "odin" ; {fem} => "odna" ; _ => "odno"}}} ; - size = nom} ; -lin pot0 d = - {s = table {_ => d.s} ; size = d.size} ; -lin pot110 = - {s = table {_ => gg "desät'"} ; size = plg} ; -lin pot111 = - {s = table {_ => gg "odinnadcat'"} ; size = plg} ; --- 11 -lin pot1to19 d = - {s = table {_ => d.s ! teen} ; size = plg} ; -lin pot0as1 n = - {s = table {p => n.s ! p ! unit} ; size = n.size} ; -lin pot1 d = - {s = table {_ => d.s ! ten} ; size = plg} ; --- -lin pot1plus d e = - {s = table {_ => - table {g => d.s ! ten ! g ++ e.s ! indep ! unit ! g}} ; size = e.size} ; -lin pot1as2 n = - {s = n.s ; size = n.size} ; -lin pot2 d = - {s = table {p => d.s ! p ! hund} ; size = plg} ; -lin pot2plus d e = - {s = table {p => table {g => d.s ! p ! hund ! g ++ e.s ! indep ! g}} ; size = e.size} ; -lin pot2as3 n = - {s = n.s ! indep} ; -lin pot3 n = - {s = gg (n.s ! attr ! fem ++ mille ! n.size)} ; -lin pot3plus n m = - {s = table {g => n.s ! attr ! fem ++ mille ! n.size ++ m.s ! indep ! g}} ; - ---- TODO ---- raz/odin - diff --git a/grammars/numerals/old/numerals.Slo.gf b/grammars/numerals/old/numerals.Slo.gf deleted file mode 100644 index 9e781429e..000000000 --- a/grammars/numerals/old/numerals.Slo.gf +++ /dev/null @@ -1,60 +0,0 @@ -include numerals.Abs.gf ; - --- by Karol Ostrovsky, Chalmers --- mechanically translated to new GF notation by AR - -param DForm = unit | teen | ten ; -param Place = indep | prae ; - -lincat Numeral = {s : Str} ; -lincat Digit = {s : {p1 : DForm ; p2 : Place} => Str} ; -lincat Sub10 = {s : {p1 : DForm ; p2 : Place} => Str} ; -lincat Sub100 = {s : Place => Str} ; -lincat Sub1000 = {s : Place => Str} ; -lincat Sub1000000 = {s : Str} ; -lin num x0 = - {s = x0.s} ; -lin n2 = - {s = table {{p1 = unit ; p2 = indep} => "dva" ; {p1 = unit ; p2 = prae} => "dve" ; {p1 = teen ; p2 = indep} => "dvanast" ; {p1 = teen ; p2 = prae} => "dvanast" ; {p1 = ten ; p2 = indep} => "dvadsat" ; {p1 = ten ; p2 = prae} => "dvadsat"}} ; -lin n3 = - {s = table {{p1 = unit ; p2 = indep} => "tri" ; {p1 = unit ; p2 = prae} => "tri" ; {p1 = teen ; p2 = indep} => "trinast" ; {p1 = teen ; p2 = prae} => "trinast" ; {p1 = ten ; p2 = indep} => "tridsat" ; {p1 = ten ; p2 = prae} => "tridsat"}} ; -lin n4 = - {s = table {{p1 = unit ; p2 = indep} => "styri" ; {p1 = unit ; p2 = prae} => "styri" ; {p1 = teen ; p2 = indep} => "strnast" ; {p1 = teen ; p2 = prae} => "strnast" ; {p1 = ten ; p2 = indep} => "styridsat" ; {p1 = ten ; p2 = prae} => "styridsat"}} ; -lin n5 = - {s = table {{p1 = unit ; p2 = indep} => "pat" ; {p1 = unit ; p2 = prae} => "pat" ; {p1 = teen ; p2 = indep} => "patnast" ; {p1 = teen ; p2 = prae} => "patnast" ; {p1 = ten ; p2 = indep} => "patdesiat" ; {p1 = ten ; p2 = prae} => "patdesiat"}} ; -lin n6 = - {s = table {{p1 = unit ; p2 = indep} => "sest" ; {p1 = unit ; p2 = prae} => "sest" ; {p1 = teen ; p2 = indep} => "sestnast" ; {p1 = teen ; p2 = prae} => "sestnast" ; {p1 = ten ; p2 = indep} => "sestdesiat" ; {p1 = ten ; p2 = prae} => "sestdesiat"}} ; -lin n7 = - {s = table {{p1 = unit ; p2 = indep} => "sedem" ; {p1 = unit ; p2 = prae} => "sedem" ; {p1 = teen ; p2 = indep} => "sedemnast" ; {p1 = teen ; p2 = prae} => "sedemnast" ; {p1 = ten ; p2 = indep} => "sedemdesiat" ; {p1 = ten ; p2 = prae} => "sedemdesiat"}} ; -lin n8 = - {s = table {{p1 = unit ; p2 = indep} => "osem" ; {p1 = unit ; p2 = prae} => "osem" ; {p1 = teen ; p2 = indep} => "osemnast" ; {p1 = teen ; p2 = prae} => "osemnast" ; {p1 = ten ; p2 = indep} => "osemdesiat" ; {p1 = ten ; p2 = prae} => "osemdesiat"}} ; -lin n9 = - {s = table {{p1 = unit ; p2 = indep} => "devat" ; {p1 = unit ; p2 = prae} => "devat" ; {p1 = teen ; p2 = indep} => "devatnast" ; {p1 = teen ; p2 = prae} => "devatnast" ; {p1 = ten ; p2 = indep} => "devatdesiat" ; {p1 = ten ; p2 = prae} => "devatdesiat"}} ; -lin pot01 = - {s = table {{p1 = unit ; p2 = indep} => "jedna" ; {p1 = unit ; p2 = prae} => [] ; {p1 = teen ; p2 = indep} => "jedna" ; {p1 = teen ; p2 = prae} => [] ; {p1 = ten ; p2 = indep} => "jedna" ; {p1 = ten ; p2 = prae} => []}} ; -lin pot0 d = - {s = table {{p1 = unit ; p2 = indep} => d.s ! {p1 = unit ; p2 = indep} ; {p1 = unit ; p2 = prae} => d.s ! {p1 = unit ; p2 = prae} ; {p1 = teen ; p2 = indep} => d.s ! {p1 = teen ; p2 = indep} ; {p1 = teen ; p2 = prae} => d.s ! {p1 = teen ; p2 = prae} ; {p1 = ten ; p2 = indep} => d.s ! {p1 = ten ; p2 = indep} ; {p1 = ten ; p2 = prae} => d.s ! {p1 = ten ; p2 = prae}}} ; -lin pot110 = - {s = table {indep => "desat" ; prae => "desat"}} ; -lin pot111 = - {s = table {indep => "jedenast" ; prae => "jedenast"}} ; -lin pot1to19 d = - {s = table {indep => d.s ! {p1 = teen ; p2 = indep} ; prae => d.s ! {p1 = teen ; p2 = prae}}} ; -lin pot0as1 n = - {s = table {indep => n.s ! {p1 = unit ; p2 = indep} ; prae => n.s ! {p1 = unit ; p2 = indep}}} ; -lin pot1 d = - {s = table {indep => d.s ! {p1 = ten ; p2 = indep} ; prae => d.s ! {p1 = ten ; p2 = prae}}} ; -lin pot1plus d e = - {s = table {indep => (d.s ! {p1 = ten ; p2 = indep}) ++ e.s ! {p1 = unit ; p2 = indep} ; prae => (d.s ! {p1 = ten ; p2 = prae}) ++ e.s ! {p1 = unit ; p2 = indep}}} ; -lin pot1as2 n = - {s = table {indep => n.s ! indep ; prae => n.s ! indep}} ; -lin pot2 d = - {s = table {indep => (d.s ! {p1 = unit ; p2 = prae}) ++ "sto" ; prae => (d.s ! {p1 = unit ; p2 = prae}) ++ "sto"}} ; -lin pot2plus d e = - {s = table {indep => (d.s ! {p1 = unit ; p2 = prae}) ++ "sto" ++ e.s ! indep ; prae => (d.s ! {p1 = unit ; p2 = prae}) ++ "sto" ++ e.s ! indep}} ; -lin pot2as3 n = - {s = n.s ! indep} ; -lin pot3 n = - {s = (n.s ! prae) ++ "tisic"} ; -lin pot3plus n m = - {s = (n.s ! prae) ++ "tisic" ++ m.s ! indep} ; diff --git a/grammars/numerals/old/numerals.Spa.gf b/grammars/numerals/old/numerals.Spa.gf deleted file mode 100644 index 30d7e46a4..000000000 --- a/grammars/numerals/old/numerals.Spa.gf +++ /dev/null @@ -1,61 +0,0 @@ -include numerals.Abs.gf ; - --- by Carlos Gonzalia, Chalmers, 1999 --- original source automatically translated to new GF by AR - -param DForm = unit | teen | ten | hundred ; -param Modif = mod | unmod | conj ; - -lincat Numeral = {s : Str} ; -lincat Digit = {inh : Modif ; s : {p1 : DForm ; p2 : Modif} => Str} ; -lincat Sub10 = {s : {p1 : DForm ; p2 : Modif} => Str} ; -lincat Sub100 = {s : Str} ; -lincat Sub1000 = {s : Str} ; -lincat Sub1000000 = {s : Str} ; - -lin num x0 = - {s = x0.s} ; -lin n2 = - {inh = mod ; s = table {{p1 = unit ; p2 = mod} => "dos" ; {p1 = unit ; p2 = unmod} => "dos" ; {p1 = unit ; p2 = conj} => "y" ++ "dos" ; {p1 = teen ; p2 = mod} => "doce" ; {p1 = teen ; p2 = unmod} => "doce" ; {p1 = teen ; p2 = conj} => "doce" ; {p1 = ten ; p2 = mod} => "veinti" ; {p1 = ten ; p2 = unmod} => "veinte" ; {p1 = ten ; p2 = conj} => "veinte" ; {p1 = hundred ; p2 = mod} => "doscientos" ; {p1 = hundred ; p2 = unmod} => "doscientos" ; {p1 = hundred ; p2 = conj} => "doscientos"}} ; -lin n3 = - {inh = conj ; s = table {{p1 = unit ; p2 = mod} => "tres" ; {p1 = unit ; p2 = unmod} => "tres" ; {p1 = unit ; p2 = conj} => "y" ++ "tres" ; {p1 = teen ; p2 = mod} => "trece" ; {p1 = teen ; p2 = unmod} => "trece" ; {p1 = teen ; p2 = conj} => "trece" ; {p1 = ten ; p2 = mod} => "treinta" ; {p1 = ten ; p2 = unmod} => "treinta" ; {p1 = ten ; p2 = conj} => "treinta" ; {p1 = hundred ; p2 = mod} => "trescientos" ; {p1 = hundred ; p2 = unmod} => "trescientos" ; {p1 = hundred ; p2 = conj} => "trescientos"}} ; -lin n4 = - {inh = conj ; s = table {{p1 = unit ; p2 = mod} => "cuatro" ; {p1 = unit ; p2 = unmod} => "cuatro" ; {p1 = unit ; p2 = conj} => "y" ++ "cuatro" ; {p1 = teen ; p2 = mod} => "catorce" ; {p1 = teen ; p2 = unmod} => "catorce" ; {p1 = teen ; p2 = conj} => "catorce" ; {p1 = ten ; p2 = mod} => "cuarenta" ; {p1 = ten ; p2 = unmod} => "cuarenta" ; {p1 = ten ; p2 = conj} => "cuarenta" ; {p1 = hundred ; p2 = mod} => "cuatrocientos" ; {p1 = hundred ; p2 = unmod} => "cuatrocientos" ; {p1 = hundred ; p2 = conj} => "cuatrocientos"}} ; -lin n5 = - {inh = conj ; s = table {{p1 = unit ; p2 = mod} => "cinco" ; {p1 = unit ; p2 = unmod} => "cinco" ; {p1 = unit ; p2 = conj} => "y" ++ "cinco" ; {p1 = teen ; p2 = mod} => "quince" ; {p1 = teen ; p2 = unmod} => "quince" ; {p1 = teen ; p2 = conj} => "quince" ; {p1 = ten ; p2 = mod} => "cincuenta" ; {p1 = ten ; p2 = unmod} => "cincuenta" ; {p1 = ten ; p2 = conj} => "cincuenta" ; {p1 = hundred ; p2 = mod} => "quinientos" ; {p1 = hundred ; p2 = unmod} => "quinientos" ; {p1 = hundred ; p2 = conj} => "quinientos"}} ; -lin n6 = - {inh = conj ; s = table {{p1 = unit ; p2 = mod} => "seis" ; {p1 = unit ; p2 = unmod} => "seis" ; {p1 = unit ; p2 = conj} => "y" ++ "seis" ; {p1 = teen ; p2 = mod} => "dieciseis" ; {p1 = teen ; p2 = unmod} => "dieciseis" ; {p1 = teen ; p2 = conj} => "dieciseis" ; {p1 = ten ; p2 = mod} => "sesenta" ; {p1 = ten ; p2 = unmod} => "sesenta" ; {p1 = ten ; p2 = conj} => "sesenta" ; {p1 = hundred ; p2 = mod} => "seiscientos" ; {p1 = hundred ; p2 = unmod} => "seiscientos" ; {p1 = hundred ; p2 = conj} => "seiscientos"}} ; -lin n7 = - {inh = conj ; s = table {{p1 = unit ; p2 = mod} => "siete" ; {p1 = unit ; p2 = unmod} => "siete" ; {p1 = unit ; p2 = conj} => "y" ++ "siete" ; {p1 = teen ; p2 = mod} => "diecisiete" ; {p1 = teen ; p2 = unmod} => "diecisiete" ; {p1 = teen ; p2 = conj} => "diecisiete" ; {p1 = ten ; p2 = mod} => "setenta" ; {p1 = ten ; p2 = unmod} => "setenta" ; {p1 = ten ; p2 = conj} => "setenta" ; {p1 = hundred ; p2 = mod} => "setecientos" ; {p1 = hundred ; p2 = unmod} => "setecientos" ; {p1 = hundred ; p2 = conj} => "setecientos"}} ; -lin n8 = - {inh = conj ; s = table {{p1 = unit ; p2 = mod} => "ocho" ; {p1 = unit ; p2 = unmod} => "ocho" ; {p1 = unit ; p2 = conj} => "y" ++ "ocho" ; {p1 = teen ; p2 = mod} => "dieciocho" ; {p1 = teen ; p2 = unmod} => "dieciocho" ; {p1 = teen ; p2 = conj} => "dieciocho" ; {p1 = ten ; p2 = mod} => "ochenta" ; {p1 = ten ; p2 = unmod} => "ochenta" ; {p1 = ten ; p2 = conj} => "ochenta" ; {p1 = hundred ; p2 = mod} => "ochocientos" ; {p1 = hundred ; p2 = unmod} => "ochocientos" ; {p1 = hundred ; p2 = conj} => "ochocientos"}} ; -lin n9 = - {inh = conj ; s = table {{p1 = unit ; p2 = mod} => "nueve" ; {p1 = unit ; p2 = unmod} => "nueve" ; {p1 = unit ; p2 = conj} => "y" ++ "nueve" ; {p1 = teen ; p2 = mod} => "diecinueve" ; {p1 = teen ; p2 = unmod} => "diecinueve" ; {p1 = teen ; p2 = conj} => "diecinueve" ; {p1 = ten ; p2 = mod} => "noventa" ; {p1 = ten ; p2 = unmod} => "noventa" ; {p1 = ten ; p2 = conj} => "noventa" ; {p1 = hundred ; p2 = mod} => "novecientos" ; {p1 = hundred ; p2 = unmod} => "novecientos" ; {p1 = hundred ; p2 = conj} => "novecientos"}} ; -lin pot01 = - {s = table {{p1 = unit ; p2 = mod} => "uno" ; {p1 = unit ; p2 = unmod} => "uno" ; {p1 = unit ; p2 = conj} => "y" ++ "uno" ; {p1 = teen ; p2 = mod} => "uno" ; {p1 = teen ; p2 = unmod} => "uno" ; {p1 = teen ; p2 = conj} => "y" ++ "uno" ; {p1 = ten ; p2 = mod} => "uno" ; {p1 = ten ; p2 = unmod} => "uno" ; {p1 = ten ; p2 = conj} => "y" ++ "uno" ; {p1 = hundred ; p2 = mod} => "ciento" ; {p1 = hundred ; p2 = unmod} => "cien" ; {p1 = hundred ; p2 = conj} => "y" ++ "uno"}} ; -lin pot0 d = - {s = table {{p1 = unit ; p2 = mod} => d.s ! {p1 = unit ; p2 = mod} ; {p1 = unit ; p2 = unmod} => d.s ! {p1 = unit ; p2 = unmod} ; {p1 = unit ; p2 = conj} => d.s ! {p1 = unit ; p2 = conj} ; {p1 = teen ; p2 = mod} => d.s ! {p1 = teen ; p2 = mod} ; {p1 = teen ; p2 = unmod} => d.s ! {p1 = teen ; p2 = unmod} ; {p1 = teen ; p2 = conj} => d.s ! {p1 = teen ; p2 = conj} ; {p1 = ten ; p2 = mod} => d.s ! {p1 = ten ; p2 = mod} ; {p1 = ten ; p2 = unmod} => d.s ! {p1 = ten ; p2 = unmod} ; {p1 = ten ; p2 = conj} => d.s ! {p1 = ten ; p2 = conj} ; {p1 = hundred ; p2 = mod} => d.s ! {p1 = hundred ; p2 = mod} ; {p1 = hundred ; p2 = unmod} => d.s ! {p1 = hundred ; p2 = unmod} ; {p1 = hundred ; p2 = conj} => d.s ! {p1 = hundred ; p2 = conj}}} ; -lin pot110 = - {s = "diez"} ; -lin pot111 = - {s = "once"} ; -lin pot1to19 d = - {s = d.s ! {p1 = teen ; p2 = unmod}} ; -lin pot0as1 n = - {s = n.s ! {p1 = unit ; p2 = unmod}} ; -lin pot1 d = - {s = d.s ! {p1 = ten ; p2 = unmod}} ; -lin pot1plus d e = - {s = (d.s ! {p1 = ten ; p2 = mod}) ++ e.s ! {p1 = unit ; p2 = d.inh}} ; -lin pot1as2 n = - {s = n.s} ; -lin pot2 d = - {s = d.s ! {p1 = hundred ; p2 = unmod}} ; -lin pot2plus d e = - {s = (d.s ! {p1 = hundred ; p2 = mod}) ++ e.s} ; -lin pot2as3 n = - {s = n.s} ; -lin pot3 n = - {s = n.s ++ "mil"} ; -lin pot3plus n m = - {s = n.s ++ "mil" ++ m.s} ; diff --git a/grammars/numerals/old/numerals.Suo.gf b/grammars/numerals/old/numerals.Suo.gf deleted file mode 100644 index 6cb789ff2..000000000 --- a/grammars/numerals/old/numerals.Suo.gf +++ /dev/null @@ -1,60 +0,0 @@ -include numerals.Abs.gf ; - -param Place = attr | indep ; -param Nm = sg | pl ; -oper sata : Nm => Str = - table {{sg} => "sata" ; {pl} => "sataa"} ; -oper tuhat : Nm => Str = - table {{sg} => "tuhat" ; {pl} => "tuhatta"} ; -lincat Numeral = {s : Str} ; -lincat Digit = {s : Str} ; -lincat Sub10 = {inh : Nm ; s : Place => Str} ; -lincat Sub100 = {inh : Nm ; s : Place => Str} ; -lincat Sub1000 = {inh : Nm ; s : Place => Str} ; -lincat Sub1000000 = {s : Str} ; -lin num x0 = - {s = x0.s} ; -lin n2 = - {s = "kaksi"} ; -lin n3 = - {s = "kolme"} ; -lin n4 = - {s = "neljä"} ; -lin n5 = - {s = "viisi"} ; -lin n6 = - {s = "kuusi"} ; -lin n7 = - {s = "seitsemän"} ; -lin n8 = - {s = "kahdeksan"} ; -lin n9 = - {s = "yhdeksän"} ; -lin pot01 = - {inh = sg ; s = table {{attr} => [] ; {indep} => "yksi"}} ; -lin pot0 d = - {inh = pl ; s = table {p => d.s}} ; -lin pot110 = - {inh = pl ; s = table {p => "kymmenen"}} ; -lin pot111 = - {inh = pl ; s = table {p => "yksi"++"toista"}} ; -lin pot1to19 d = - {inh = pl ; s = table {p => d.s ++ "toista"}} ; -lin pot0as1 n = - {inh = n.inh ; s = table {p => n.s ! p}} ; -lin pot1 d = - {inh = pl ; s = table {p => d.s ++ "kymmentä"}} ; -lin pot1plus d e = - {inh = pl ; s = table {p => d.s ++ "kymmentä" ++ e.s ! indep}} ; -lin pot1as2 n = - {inh = n.inh ; s = table {p => n.s ! p}} ; -lin pot2 d = - {inh = pl ; s = table {p => (d.s ! attr) ++ sata ! (d.inh)}} ; -lin pot2plus d e = - {inh = pl ; s = table {p => (d.s ! attr) ++ (sata ! (d.inh)) ++ e.s ! indep}} ; -lin pot2as3 n = - {s = n.s ! indep} ; -lin pot3 n = - {s = (n.s ! attr) ++ tuhat ! (n.inh)} ; -lin pot3plus n m = - {s = (n.s ! attr) ++ (tuhat ! (n.inh)) ++ m.s ! indep} ; diff --git a/grammars/numerals/old/numerals.Swe.gf b/grammars/numerals/old/numerals.Swe.gf deleted file mode 100644 index 41de7ab14..000000000 --- a/grammars/numerals/old/numerals.Swe.gf +++ /dev/null @@ -1,44 +0,0 @@ -include numerals.Abs.gf ; - -param DForm = ental | ton | tiotal ; - -lincat - Digit = {s : DForm => Str} ; - Sub10 = {s : DForm => Str} ; - -oper - mkTal : Str -> Str -> Str -> Lin Digit = \två, tolv, tjugo -> - {s = table {ental => två ; ton => tolv ; tiotal => tjugo}} ; - - regTal : Str -> Lin Digit = \fem -> - mkTal fem (fem + "ton") (fem + "tio") ; - - ss : Str -> {s : Str} = \s -> {s = s} ; - -lin - num x = x ; - - n2 = mkTal "två" "tolv" "tjugo" ; - n3 = mkTal "tre" "tretton" "trettio" ; - n4 = mkTal "fyra" "fjorton" "fyrtio" ; - n5 = regTal "fem" ; - n6 = regTal "sex" ; - n7 = mkTal "sju" "sjutton" "sjuttio" ; - n8 = mkTal "åtta" "arton" "åttio" ; - n9 = mkTal "nio" "nitton" "nittio" ; - - pot01 = {s = table {f => "ett"}} ; - pot0 d = {s = table {f => d.s ! f}} ; - pot110 = ss "tio" ; - pot111 = ss "elva" ; - pot1to19 d = ss (d.s ! ton) ; - pot0as1 n = ss (n.s ! ental) ; - pot1 d = ss (d.s ! tiotal) ; - pot1plus d e = ss (d.s ! tiotal ++ e.s ! ental) ; - pot1as2 n = n ; - pot2 d = ss (d.s ! ental ++ "hundra") ; - pot2plus d e = ss (d.s ! ental ++ "hundra" ++ e.s) ; - pot2as3 n = n ; - pot3 n = ss (n.s ++ "tusen") ; - pot3plus n m = ss (n.s ++ "tusen" ++ m.s) ; - diff --git a/grammars/numerals/old/numerals.Tam.gf b/grammars/numerals/old/numerals.Tam.gf deleted file mode 100644 index e9fff3524..000000000 --- a/grammars/numerals/old/numerals.Tam.gf +++ /dev/null @@ -1,60 +0,0 @@ -include numerals.Abs.gf ; - -param Place = attr | indep ; -param Nm = sg | pl ; -oper sata : Nm => Str = - table {{sg} => "sata" ; {pl} => "sataa"} ; -oper tuhat : Nm => Str = - table {{sg} => "tuhat" ; {pl} => "tuhatta"} ; -lincat Numeral = {s : Str} ; -lincat Digit = {s : Place => Str} ; -lincat Sub10 = {inh : Nm ; s : Place => Str} ; -lincat Sub100 = {inh : Nm ; s : Place => Str} ; -lincat Sub1000 = {inh : Nm ; s : Place => Str} ; -lincat Sub1000000 = {s : Str} ; -lin num x0 = - {s = x0.s} ; -lin n2 = - {s = table {p => "kaks"}} ; -lin n3 = - {s = table {{attr} => "kol" ; {indep} => "kolme"}} ; -lin n4 = - {s = table {{attr} => "nel" ; {indep} => "neliä"}} ; -lin n5 = - {s = table {p => "viis"}} ; -lin n6 = - {s = table {p => "kuus"}} ; -lin n7 = - {s = table {{attr} => "seit" ; {indep} => "seittämän"}} ; -lin n8 = - {s = table {p => "kahreksan"}} ; -lin n9 = - {s = table {p => "yhreksän"}} ; -lin pot01 = - {inh = sg ; s = table {{attr} => [] ; {indep} => "yks"}} ; -lin pot0 d = - {inh = pl ; s = table {p => d.s ! indep}} ; -lin pot110 = - {inh = pl ; s = table {p => "kymmenen"}} ; -lin pot111 = - {inh = pl ; s = table {p => "yks"++"toista"}} ; -lin pot1to19 d = - {inh = pl ; s = table {p => (d.s ! indep) ++ "toista"}} ; -lin pot0as1 n = - {inh = n.inh ; s = table {p => n.s ! p}} ; -lin pot1 d = - {inh = pl ; s = table {p => (d.s ! attr) ++ "kytä"}} ; -lin pot1plus d e = - {inh = pl ; s = table {p => (d.s ! attr) ++ "kyt" ++ e.s ! indep}} ; -lin pot1as2 n = - {inh = n.inh ; s = table {p => n.s ! p}} ; -lin pot2 d = - {inh = pl ; s = table {p => (d.s ! attr) ++ sata ! (d.inh)}} ; -lin pot2plus d e = - {inh = pl ; s = table {p => (d.s ! attr) ++ (sata ! (d.inh)) ++ e.s ! indep}} ; -lin pot2as3 n = - {s = n.s ! indep} ; -lin pot3 n = - {s = (n.s ! attr) ++ tuhat ! (n.inh)} ; -lin pot3plus n m = - {s = (n.s ! attr) ++ (tuhat ! (n.inh)) ++ m.s ! indep} ; diff --git a/grammars/numerals/old/old_church_slavonic.gf b/grammars/numerals/old/old_church_slavonic.gf deleted file mode 100644 index ce6a0c032..000000000 --- a/grammars/numerals/old/old_church_slavonic.gf +++ /dev/null @@ -1,58 +0,0 @@ --- je, jo, ja for je, jo, ja etc --- U, I yers --- ä is jat' --- q is [ch] --- y for [bi] --- e~, o~ --- w for [sh] - -include numerals.Abs.gf ; - -param Size = sg | dual | threefour | fiveup ; - -lincat Digit = {s : Str ; s2 : Str ; size : Size } ; -lincat Sub10 = {s : Str ; s2 : Str ; size : Size } ; -lincat Sub100 = {s : Str ; s2 : Str ; size : Size } ; -lincat Sub1000 = {s : Str ; s2 : Str ; size : Size } ; - -oper mkNum : Str -> Size -> {s : Str ; s2 : Str ; size : Size} = - \petI -> \sz -> { s = petI ; s2 = petI ; size = sz}; - -oper mkNum5 : Str -> {s : Str ; s2 : Str ; size : Size} = \s -> mkNum s fiveup ; - -lin num x = {s = "/C" ++ x.s ++ "C/"} ; -- the Old Church Slavonic Cyrillic script ; - -lin n2 = {s = "dUva" ; s2 = [] ; size = dual }; -lin n3 = mkNum (variants {"trije" ; "trIje" }) threefour ; -lin n4 = mkNum "qetyre" threefour ; -lin n5 = mkNum5 "pe~tI" ; -lin n6 = mkNum5 "westI" ; -lin n7 = mkNum5 "sedmI" ; -lin n8 = mkNum5 "osmI" ; -lin n9 = mkNum5 "deve~tI" ; - -lin pot01 = { s = "jedinU" ; s2 = [] ; size = sg }; -lin pot0 d = d ; -lin pot110 = mkNum5 "dese~tI" ; -lin pot111 = mkNum5 ("jedinU" ++ "na" ++ "dese~te") ; -lin pot1to19 d = mkNum5 (d.s ++ "na" ++ "dese~te") ; -lin pot0as1 n = n ; -lin pot1 d = {s = mkTen d.size d.s ; s2 = mkTen d.size d.s ; size = fiveup} ; -lin pot1plus d e = {s = mkTen d.size d.s ++ variants {"i" ; "ti"} ++ e.s ; s2 =mkTen d.size d.s ++ variants {"i" ; "ti"} ++ mkattr e.size e.s ; size = e.size} ; -lin pot1as2 n = n ; -lin pot2 d = {s = mkHund d.size d.s ; s2 = mkHund d.size d.s ; size = fiveup} ; -lin pot2plus d e = { s = mkHund d.size d.s ++ e.s ; s2 = mkHund d.size d.s ++ e.s2 ; size = e.size } ; -lin pot2as3 n = {s = n.s }; -lin pot3 n = {s = n.s2 ++ mkThou n.size} ; -lin pot3plus n m = {s = n.s2 ++ mkThou n.size ++ m.s} ; - -oper mkThou : Size -> Str = \sz -> - table {sg => (variants {"tysjo~wti" ; "tysje~wti"}) ; dual => ("dUvä" ++ "tysjo~wti") ; threefour => "tysjo~wte~" ; fiveup => "tysjo~wtI" } ! sz ; - -oper mkHund : Size -> Str -> Str = \sz -> \s -> - table {sg => "sUto" ; dual => "dUvä" ++ "sUtä" ; threefour => s ++ "sUta" ; fiveup => s ++ "sUtU" } ! sz ; - -oper mkTen : Size -> Str -> Str = \sz -> \s -> - table {sg => "dese~tI" ; dual => s ++ "dese~ti" ; threefour => s ++ "dese~te" ; fiveup => s ++ "dese~tU" } ! sz ; - -oper mkattr : Size -> Str -> Str = \sz -> \s -> table {dual => [] ; _ => s} ! sz; diff --git a/grammars/numerals/old/pashto.gf b/grammars/numerals/old/pashto.gf deleted file mode 100644 index 3904c08b2..000000000 --- a/grammars/numerals/old/pashto.gf +++ /dev/null @@ -1,88 +0,0 @@ -include numerals.Abs.gf ; - -param DForm = unit | ten | teen | spctwo | twenties; -param Size = sg | two | less100 | more100 ; - --- From Herbert Penzl's Pashto book. There's no standard orthography of --- Pashto so minor deviations may occur --- yaw can occur beforer zar and sal but usually doesn't --- [e] is yaw with two vertical under --- [$] is Ha with three dots above --- [X] is Sin with one dot below and one above --- [A] shouldnt have dots --- [p] is be with three dots below like Persian --- [G] is za/ra etc with one dot below and one above --- [a] should not have a hamza --- [P] is a Ha with a hamza above --- [R] is an r with a ring below - -lincat Digit = {s : DForm => Str ; size : Size} ; -lincat Sub10 = {s : DForm => Str ; size : Size} ; -lincat Sub100 = {s : Str ; size : Size} ; -lincat Sub1000 = {s : Str ; s2 : Str ; size : Size } ; - -lin num x0 = - {s = "/A" ++ x0.s ++ "A/"} ; -- the Extented-Arabic environment - -oper mkNum : Str -> Str -> Str -> Lin Digit = - \dwA -> \cl -> \dwwls -> - {s = table {unit => dwA ; ten => cl ; teen => dwwls ; spctwo => dwA ; twenties => dwA + "wict"} ; size = less100 } ; - -oper mkIrrNum : Str -> Str -> Str -> Str -> Str -> Lin Digit = - \dwA -> \cl -> \dwwls -> \dw -> \dr -> - {s = table {unit => dwA ; ten => cl ; teen => dwwls ; spctwo => dw ; twenties -=> dr + "wict"} ; size = less100 } ; - --- lin n1 mkNum "yw" "ls" ... ; -lin n2 = {s = table {unit => "dwA" ; ten => "cl" ; teen => "dwwls" ; - spctwo => "dw" ; twenties => "dwA" + "wict" } ; - size = two }; -lin n3 = mkIrrNum "dry" "derc" "dyarls" "dry" "dr" ; -lin n4 = mkIrrNum "$lwr" "$lweXt" "$wrls" "$lwr" "$ler"; -lin n5 = mkNum "pnPA" "pnPws" (variants { "pnPAls"; "pnPls"}) ; -lin n6 = mkNum "cpG" "cpetA" "spaRls" ; -lin n7 = mkNum "awA" "awya" (variants {"awAls"; "awls"}) ; -lin n8 = mkNum "atA" "atya" (variants {"atAls"; "atls"}) ; -lin n9 = mkNum "nA" "nwy" (variants {"nwls"; "nwns"}) ; - -oper ss : Str -> {s : Str} = \s -> {s = s} ; - -lin pot01 = {s = table {unit => "yw" ; - spctwo => "yw" ; - twenties => "yw" + "wict" ; - _ => "dummy" } ; size = sg} ; -lin pot0 d = {s = table {f => d.s ! f} ; size = less100} ; -lin pot110 = {s = "ls" ; size = less100} ; -lin pot111 = {s = "ywwls" ; size = less100} ; -lin pot1to19 d = {s = d.s ! teen ; size = less100} ; -lin pot0as1 n = {s = n.s ! unit ; size = n.size} ; -lin pot1 d = {s = d.s ! ten ; size = less100} ; -lin pot1plus d e = {s = table {two => e.s ! twenties ; - _ => e.s ! spctwo ++ (d.s ! ten) } ! d.size ; - size = less100} ; -lin pot1as2 n = {s = n.s ; s2 = "dummy" ; size = n.size } ; -lin pot2 d = {s = (mkswA (d.s ! unit)) ! d.size ; s2 = (mklk (d.s ! unit)) ! d.size ; size = more100} ; -lin pot2plus d e = - {s = (mkvarswA (d.s ! unit)) ! d.size ++ "aw" ++ e.s ; - s2 = (mklk (d.s ! unit)) ! d.size ++ e.s ++ (mkzrA ! e.size) ; - size = more100} ; - -lin pot2as3 n = {s = n.s } ; -lin pot3 n = {s = table { sg => "zr" ; - two => n.s ++ "zrA" ; - less100 => n.s ++ "zrA" ; - more100 => n.s2 } ! n.size} ; -lin pot3plus n m = - {s = table { sg => variants {"zr" ; "yw" ++ "zr"} ; - two => n.s ++ "zrA" ; - less100 => n.s ++ "zrA" ; - more100 => n.s2 } ! n.size ++ maybeaw ! m.size ++ m.s} ; - - -oper mklk : Str -> Size => Str = \s -> table {sg => "lk" ; _ => s ++ "lk"} ; -oper maybeaw : Size => Str = table {more100 => [] ; _ => "aw"} ; -oper mkswA : Str -> Size => Str = \s -> table {sg => "sl" ; _ => s ++ "swA"} ; -oper mkvarswA : Str -> Size => Str = - \s -> table {sg => (variants {"sl" ; "yw" ++ "sl"}) ; _ => s ++ "swA"} ; -oper mkzrA : Size => Str = table {sg => "zr" ; _ => "zrA"} ; - diff --git a/grammars/numerals/old/polish.gf b/grammars/numerals/old/polish.gf deleted file mode 100644 index 8ecc3839a..000000000 --- a/grammars/numerals/old/polish.gf +++ /dev/null @@ -1,94 +0,0 @@ --- numerals in Polish, author Wojciech Mostowski, 20/9/2002 - -include numerals.Abs.gf ; - --- all different for unit digits, teens, tens and hundreds -param DForm = unit | teen | ten | hund ; - --- cases for thousand in Polish --- 1000 - jeden TYSIAC --- 2000 - dwa TYSIACE --- 3000 - trzy TYSIACE --- 4000 - cztery TYSIACE --- 5000 - piec TYSIECY --- 104000 - sto cztery TYSIECE --- 105000 - sto piec TYSIECY --- 24000 - dwadziescia cztery TYSIACE --- 25000 - dwadziescia piec TYSIACY --- BUT e.g. --- 21000 - dwadziescia jeden TYSIECY (not TYSIAC) --- 11000 - jedenascie TYSIECY --- (12..19)000 - TYSIECY - -param ThForm = onlyone | lastone | twoorthreeorfour | fiveup ; - -oper LinDigit = {s : DForm => Str; o : ThForm ; t : ThForm } ; -lincat Digit = LinDigit ; -lincat Sub10 = {s : DForm => Str; o : ThForm ; t : ThForm } ; -lincat Sub100 = {s : Str; t : ThForm } ; -lincat Sub1000 = {s : Str; t : ThForm } ; - -oper mkNum : Str -> Str -> Str -> Str -> ThForm -> LinDigit = - \dwa -> \dwanascie -> \dwadziescia -> \dwiescie -> \thform -> - { s = table {unit => dwa ; teen => dwanascie ; ten => dwadziescia ; hund => -dwiescie }; - o = thform ; t = thform - }; - -oper mkRegNum1 : Str -> LinDigit = - \siedem -> - { s = table { unit => siedem ; teen => siedem + "nascie" ; - ten => siedem + "dziesiat" ; hund => siedem + "set" - }; - o = fiveup ; t = fiveup - }; -oper mkRegNum2 : Str -> LinDigit = - \pie -> - { s = table { unit => pie + "c" ; teen => pie + "tnascie" ; - ten => pie + "cdziesiat" ; hund => pie + "cset" - }; - o = fiveup ; t = fiveup - }; - -oper mkTh : ThForm => Str = - table { onlyone => "tysiac" ; lastone => "tysiecy" ; - twoorthreeorfour => "tysiace" ; fiveup => "tysiecy" - }; - -oper ss : Str -> ThForm -> {s : Str ; t : ThForm} = \str -> \th -> {s = str; t = th} -; - -lin num x = x ; - -lin n2 = mkNum "dwa" "dwanascie" "dwadziescia" "dwiescie" -twoorthreeorfour ; -lin n3 = mkNum "trzy" "trzynascie" "trzydziesci" "trzysta" -twoorthreeorfour ; -lin n4 = mkNum "cztery" "czternascie" "czterdziesci" "czterysta" -twoorthreeorfour ; -lin n5 = mkRegNum2 "pie" ; -lin n6 = mkNum "szesc" "szesnascie" "szescdziesiat" "szescset" fiveup; -lin n7 = mkRegNum1 "siedem" ; -lin n8 = mkRegNum1 "osiem" ; -lin n9 = mkRegNum2 "dziewie" ; - -lin pot01 = { s = table {hund => "sto"; f => "jeden" }; - o = onlyone ; t = lastone - }; -lin pot0 d = {s = table {f => d.s ! f} ; o = d.o ; t = d.t} ; -lin pot110 = ss "dziesiec" fiveup ; -lin pot111 = ss "jedenascie" fiveup ; -lin pot1to19 d = {s = d.s ! teen ; t = fiveup} ; -lin pot0as1 n = {s = n.s ! unit ; t = n.o} ; -lin pot1 d = {s = d.s ! ten ; t = fiveup} ; -lin pot1plus d e = {s = d.s ! ten ++ e.s ! unit; t = e.t} ; -lin pot1as2 n = n ; -lin pot2 d = {s = d.s ! hund ; t = fiveup} ; -lin pot2plus d e = { s = d.s ! hund ++ e.s ; - t = table { onlyone => lastone ; f => f } ! e.t - } ; - -lin pot2as3 n = n ; -lin pot3 n = {s = n.s ++ mkTh ! n.t} ; -lin pot3plus n m = {s = n.s ++ mkTh ! n.t ++ m.s} ; - diff --git a/grammars/numerals/old/portuguese.gf b/grammars/numerals/old/portuguese.gf deleted file mode 100644 index bf3fb1b2e..000000000 --- a/grammars/numerals/old/portuguese.gf +++ /dev/null @@ -1,58 +0,0 @@ -include numerals.Abs.gf ; - -param DForm = unit | teen | ten | hundred ; -param Size = sg | less10 | pl ; - -lincat Numeral = {s : Str} ; -lincat Digit = {s : DForm => Str ; size : Size } ; -lincat Sub10 = {s : DForm => Str ; size : Size } ; -lincat Sub100 = {s : Str ; size : Size} ; -lincat Sub1000 = {s : Str ; size : Size} ; -lincat Sub1000000 = {s : Str} ; - -oper mkNum : Str -> Str -> Str -> Str -> Lin Digit = - \dois -> \doze -> \vinte -> \duzentos -> - {s = table {unit => dois ; teen => doze ; ten => vinte ; hundred => duzentos} ; size = less10} ; - - -lin num x0 = - {s = x0.s} ; - -lin n2 = mkNum "dois" "doze" "vinte" "duzentos" ; -lin n3 = mkNum "três" "treze" "trinta" "trezentos" ; -lin n4 = mkNum "cuatro" (variants {"catorze" ; "quatorze"}) "quarenta" "cuatrocentos" ; -lin n5 = mkNum "cinco" "quinze" "cinqüenta" "quinhentos" ; -lin n6 = mkNum "seis" (variants {"dezasseis" ; "dezesseis"}) "sessenta" "seiscentos" ; -lin n7 = mkNum "sete" (variants {"dezassete" ; "dezessete"}) "setenta" "setecentos" ; -lin n8 = mkNum "oito" "dezoito" "oitenta" "oitocentos" ; -lin n9 = mkNum "nove" (variants {"dezanove" ; "dezenove"}) "noventa" "novecentos" ; - -lin pot01 = {s = table {unit => "um" ; hundred => "cem" ; _ => "dummy"} ; size = sg} ; -lin pot0 d = d ; -lin pot110 = - {s = "dez" ; size = pl} ; -lin pot111 = - {s = "onze" ; size = pl} ; -lin pot1to19 d = - {s = d.s ! teen ; size = pl} ; -lin pot0as1 n = - {s = n.s ! unit ; size = n.size } ; -lin pot1 d = - {s = d.s ! ten ; size = pl} ; -lin pot1plus d e = - {s = d.s ! ten ++ "e" ++ e.s ! unit ; size = pl} ; -lin pot1as2 n = - {s = n.s ; size = n.size} ; -lin pot2 d = - {s = d.s ! hundred ; size = pl} ; -lin pot2plus d e = - {s = table {sg => "cento" ; - _ => d.s ! hundred } ! d.size ++ (add e.s) ! e.size ; size = pl} ; -lin pot2as3 n = - {s = n.s} ; -lin pot3 n = - {s = table {sg => "mil" ; _ => n.s ++ "mil"} ! n.size} ; -lin pot3plus n m = - {s = table {sg => "mil" ; _ => n.s ++ "mil"} ! n.size ++ (add m.s) ! m.size } ; - -oper add : Str -> Size => Str = \s -> table {pl => s ; _ => "e" ++ s}; \ No newline at end of file diff --git a/grammars/numerals/old/quechua.gf b/grammars/numerals/old/quechua.gf deleted file mode 100644 index 768a5921a..000000000 --- a/grammars/numerals/old/quechua.gf +++ /dev/null @@ -1,50 +0,0 @@ -include numerals.Abs.gf ; - -param DForm = unit | havingunit ; -param Size = sg | pl ; - --- Quechua har no standard orthography so there are numerous spelling variants --- not considered here. - - -lincat Digit = {s : DForm => Str ; size : Size} ; -lincat Sub10 = {s : DForm => Str ; size : Size} ; -lincat Sub100 = {s : Str ; size : Size} ; -lincat Sub1000 = {s : Str ; size : Size} ; - -oper mkRegNum1 : Str -> Lin Digit = - \juk -> - { s = table { unit => juk ; havingunit => juk + "niyuq" } ; size = pl}; - -oper mkRegNum2 : Str -> Lin Digit = - \kinsa -> - { s = table { unit => kinsa ; havingunit => kinsa + "yuq" } ; size = pl}; - -lin num x = x ; --- lin n1 mkRegNum1 "juk"; -lin n2 = mkRegNum1 "iskay"; -lin n3 = mkRegNum2 "kinsa"; -lin n4 = mkRegNum2 "tawa"; -lin n5 = mkRegNum2 "pishq'a" ; -lin n6 = mkRegNum2 "suqta"; -lin n7 = mkRegNum1 "k'anchis" ; -lin n8 = mkRegNum1 "pusaq" ; -lin n9 = mkRegNum1 "isk'un" ; - -lin pot01 = {s = table { unit => "juk" ; havingunit => "juk" + "niyuq" } ; size = sg} ; -lin pot0 d = d ; -lin pot110 = {s = "chunka" ; size = pl } ; -lin pot111 = {s = "chunka" ++ "jukniyuq" ; size = pl } ; -lin pot1to19 d = {s = "chunka" ++ d.s ! havingunit ; size = pl } ; -lin pot0as1 n = {s = n.s ! unit ; size = n.size} ; -lin pot1 d = {s = d.s ! unit ++ "chunka" ; size = pl} ; -lin pot1plus d e = {s = (d.s ! unit ++ "chunka") ++ e.s ! havingunit ; size = pl } ; -lin pot1as2 n = n ; -lin pot2 d = {s = (drop (d.s ! unit)) ! d.size ++ "pachak" ; size = pl} ; -lin pot2plus d e = {s = (drop (d.s ! unit)) ! d.size ++ "pachak" ++ e.s ; size = pl} ; - -lin pot2as3 n = n ; -lin pot3 n = {s = (drop n.s) ! n.size ++ "warank'a"} ; -lin pot3plus n m = {s = (drop n.s) ! n.size ++ "warank'a" ++ m.s} ; - -oper drop : Str -> Size => Str = \s -> table {sg => [] ; pl => s } ; \ No newline at end of file diff --git a/grammars/numerals/old/romanian.gf b/grammars/numerals/old/romanian.gf deleted file mode 100644 index 5e6937063..000000000 --- a/grammars/numerals/old/romanian.gf +++ /dev/null @@ -1,61 +0,0 @@ -include numerals.Abs.gf ; - --- Note [s,], [a%] for Romanian s, and a with up bow ontop (not â) - -param DForm = unit | teen | ten | attr ; -param MidForm = indep | det ; -param Size = sg | less20 | pl ; - -lincat Digit = {s : DForm => Str ; size : Size} ; -lincat Sub10 = {s : DForm => Str ; size : Size} ; -lincat Sub100 = {s : MidForm => Str ; size : Size} ; -lincat Sub1000 = {s : MidForm => Str ; size : Size} ; - -oper mkNum : Str -> Str -> Str -> Lin Digit = - \two -> \twelve -> \twenty -> mkNumSpc two twelve twenty two ; - -oper mkNumSpc : Str -> Str -> Str -> Str -> Lin Digit = - \two -> \twelve -> \twenty -> \doua -> - {s = table {unit => two ; teen => twelve ; ten => twenty ; attr => doua} ; size = less20} ; - -oper regNum : Str -> Lin Digit = - \trei -> mkNum trei (trei + variants { "sprezece" ; "s,pe" }) (trei + "zeci") ; - -oper ss : Str -> {s : MidForm => Str ; size : Size} = \st -> {s = table {_ => st} ; size = less20} ; - -lin num x = {s = "/L" ++ x.s ++ "L/" }; -- Latin A Supplement chars -lin n2 = mkNumSpc "doi" (variants { "doisprezece" ; "doua%sprezece" }) "doua%zeci" "doua%" ; -lin n3 = regNum "trei" ; -lin n4 = mkNum "patru" (variants{"paisprezece" ; "pais,pe"}) "patruzeci" ; -lin n5 = mkNumSpc "cinci" (variants{"cinsprezece" ; "cins,pe"}) "cinzeci" (variants { "cinci" ; "cin" }); -lin n6 = mkNum "s,ase" (variants{"s,aisprezece" ; "s,aispe"}) "s,aizeci" ; -lin n7 = mkNum "s,apte" (variants{"s,aptesprezece" ; "s,apspe"}) "s,aptezeci" ; -lin n8 = mkNum "opt" (variants{"optsprezece" ; "opspe"}) "optzeci" ; -lin n9 = regNum "noua%" ; - -lin pot01 = {s = table {attr => "o" ; f => "unu"} ; size = sg} ; -lin pot0 d = d ; -lin pot110 = ss "zece" ; -lin pot111 = ss (variants { "unsprezece" ; "uns,pe"}) ; -lin pot1to19 d = {s = table {_ => d.s ! teen } ; size = less20} ; -lin pot0as1 n = {s = table {indep => n.s ! unit ; det => n.s ! attr } ; size = n.size} ; -lin pot1 d = {s = table {_ => d.s ! ten } ; size = pl} ; -lin pot1plus d e = - {s = table {indep => d.s ! ten ++ "s,i" ++ e.s ! unit ; - det => d.s ! ten ++ "s,i" ++ e.s ! attr } ; - size = pl} ; -lin pot1as2 n = n ; -lin pot2 d = {s = table {_ => d.s ! attr ++ (mksute d.size) }; size = pl} ; -lin pot2plus d e = - {s = table {indep => d.s ! attr ++ (mksute d.size) ++ e.s ! indep; - det => d.s ! attr ++ (mksute d.size) ++ e.s ! det }; - size = pl} ; -lin pot2as3 n = {s = n.s ! indep }; -lin pot3 n = {s = (mkmie n.size (n.s ! det) (n.s ! indep))} ; -lin pot3plus n m = {s = (mkmie n.size (n.s ! det) (n.s ! indep)) ++ m.s ! indep} ; - -oper mksute : Size -> Str = \sz -> table {sg => "suta" ; _ => "sute" } ! sz ; -oper mkmie : Size -> Str -> Str -> Str = \sz -> \attr -> \indep -> - table {sg => "o" ++ "mie" ; - less20 => attr ++ "mii" ; - pl => indep ++ "de" ++ "mii"} ! sz ; diff --git a/grammars/numerals/old/sango.gf b/grammars/numerals/old/sango.gf deleted file mode 100644 index f96874ede..000000000 --- a/grammars/numerals/old/sango.gf +++ /dev/null @@ -1,63 +0,0 @@ -include numerals.Abs.gf ; - -param Size = sg | pl | over10; - -oper Form = {s : Str ; size : Size } ; - -lincat Numeral = {s : Str} ; -lincat Digit = Form ; -lincat Sub10 = Form ; -lincat Sub100 = Form ; -lincat Sub1000 = Form ; -lincat Sub1000000 = {s : Str} ; -lin num x0 = - {s = x0.s} ; -- TODO: Encoding - -oper mkNum : Str -> Form = \mbili -> - {s = mbili ; size = pl }; - --- O IPA for o in cod --- Ó - --- lin n1 = mkNum "ÓkO" ; -lin n2 = mkNum "óse" ; -lin n3 = mkNum "otá" ; -lin n4 = mkNum "osió" ; -lin n5 = mkNum "ukú" ; -lin n6 = mkNum "omaná" ; -lin n7 = mkNum "mbásámbárá" ; -lin n8 = mkNum "miombe" ; -lin n9 = mkNum "ngombáyá" ; - -oper nandoni : Str = ("na" ++ variants {"ndó" ++ "ní" ; []}) ; - -oper ss : Str -> Form = \s1 -> {s = s1 ; size = over10} ; - -lin pot01 = {s = "ÓkO" ; size = sg }; -lin pot0 d = d ; -lin pot110 = ss ("bale" ++ "ÓkO"); -lin pot111 = ss ("bale" ++ "ÓkO" ++ nandoni ++ "ÓkO"); -lin pot1to19 d = ss ("bale" ++ "ÓkO" ++ nandoni ++ d.s); -lin pot0as1 n = n ; -lin pot1 d = ss ("bale" ++ d.s ) ; -lin pot1plus d e = ss ("bale" ++ d.s ++ nandoni ++ e.s ) ; -lin pot1as2 n = n ; -lin pot2 d = ss (mkng d.size d.s) ; -lin pot2plus d e = ss ((mkng d.size d.s) ++ nandoni ++ e.s) ; -lin pot2as3 n = {s = n.s } ; -lin pot3 n = {s = mktau n.size n.s } ; -lin pot3plus n m = {s = mktau n.size (n.s ++ nandoni ++ m.s) } ; - -oper mkng : Size -> Str -> Str = \sz -> \attr -> - table {pl => "ngbangbu" ++ attr ; - over10 => "dummy" ; - sg => variants {"ngbangbu" ++ "ÓkO"; "ngbangbu" }} ! sz ; - -oper mktau : Size -> Str -> Str = \sz -> \attr -> - table {pl => "ngbangbu" ++ "bale" ++ attr ; - over10 => "N/A" ; - sg => variants {"ngbangbu" ++ "bale"; "kutu"} ++ attr} ! sz ; - - - - diff --git a/grammars/numerals/old/sanskrit.gf b/grammars/numerals/old/sanskrit.gf deleted file mode 100644 index be092b3ee..000000000 --- a/grammars/numerals/old/sanskrit.gf +++ /dev/null @@ -1,197 +0,0 @@ -include numerals.Abs.gf ; - -param DForm = unit | ten ; -param DSize = sg | r2 | r3 | r4 | r5 | r6 | r7 | r8 | r9 ; -param Size = sing | dual | less10 | more100 | more10 ; - - -oper - vowel : Strs = strs {"a" ; "e" ; "i" ; "u" ; "o"} ; - dental : Strs = strs {"n"; "t"; "d"} ; - labial : Strs = strs {"m"; "p"; "b"} ; - velar : Strs = strs {"G"; "k"; "g"} ; - affricate : Strs = strs {"ñ" ; "c"; "j" } ; - retroflex : Strs = strs {"N" ; "T" ; "D"; "S"} ; - sibilant : Strs = strs {"ç" ; "s"; "h"; "r"} ; -- r also - unvoiced : Strs = strs {"k"; "p"; "c"; "t"} ; - -oper - S : Str = pre {"S" ; "T" / unvoiced ; "D" / vowel } ; - as : Str = pre {"o" ; "as" / unvoiced ; "a;" / sibilant } ; - i : Str = pre {"i" ; "y" / vowel } ; - am : Str = "a" + (pre {"m" ; "n" / dental ; "G" / velar ; "ñ" / affricate ; "N" / retroflex ; "M" / sibilant}) ; - a_ : Str = pre { "a:" ; "a" / vowel } ; -- shortened if a follows (no other vowel occur initally) - r : Str = pre {"r" ; "s" / unvoiced ; "c" / affricate ; ";" / sibilant } ; - t : Str = pre {"t" ; "c" / affricate ; "T" / retroflex } ; - - -LinDigit = {s : DForm => Str ; size : DSize} ; -lincat Digit = LinDigit ; -lincat Sub10 = {s : DForm => Str ; size : DSize} ; -lincat Sub100 = {s : Str ; s2 : Str ; size : Size} ; -lincat Sub1000 = {s : Str ; s2 : Str ; size : Size } ; - -lin num x0 = - {s = "/&" ++ x0.s ++ "&/"} ; -- the Devanagari environment - -oper mkNum : Str -> Str -> DSize -> LinDigit = - \u -> \t -> \sz -> - {s = table {unit => u ; ten => t } ; size = sz } ; - --- lin n1 mkNum "eka" daca ... ; -lin n2 = mkNum "dva" viMcati r2 ; -lin n3 = mkNum ("tr" + i) triMcat r3 ; -lin n4 = mkNum ("catu" + r) catvariMcat r4 ; -lin n5 = mkNum "pañca" pancacat r5 ; -lin n6 = mkNum ("Sa" + S) SaSTi r6 ; -lin n7 = mkNum "sapta" saptati r7 ; -lin n8 = mkNum "aSTa" aciti r8; -lin n9 = mkNum "nava" navati r9 ; - -oper daca : Str = "daça" ; -oper viMcati : Str = "viMçat" + i; -oper triMcat : Str = "triMça" + t; -oper catvariMcat : Str = "catva:riMça" + t ; -oper pancacat : Str = "pañca:ça" + t; -oper SaSTi : Str = "SaST" + i; -oper saptati : Str = "saptat" + i ; -oper aciti : Str = "açi:t" + i ; -oper navati : Str = "navat" + i ; - -oper mkR1 : Str -> Str -> DSize => Str = \a1 -> \a2 -> table { - sg => a1 + daca ; - r2 => a2 + viMcati ; - r3 => a2 + triMcat ; - r4 => a2 + catvariMcat ; - r5 => a2 + pancacat ; - r6 => a2 + SaSTi ; - r7 => a2 + saptati ; - r8 => a2 + aciti ; - r9 => a2 + navati -} ; - -oper mkR : Str -> DSize => Str = \a1 -> table { - sg => a1 + daca ; - r2 => a1 + viMcati ; - r3 => a1 + triMcat ; - r4 => a1 + catvariMcat ; - r5 => a1 + pancacat ; - r6 => a1 + SaSTi ; - r7 => a1 + saptati ; - r8 => a1 + aciti ; - r9 => a1 + navati -} ; - -oper mkR9 : Str -> DSize => Str = \a1 -> table { - sg => variants {a1 + daca ; "u:na:" + viMcati} ; - r2 => variants {a1 + viMcati ; "u:na:" + triMcat } ; - r3 => variants {a1 + triMcat ; "u:na:" + catvariMcat } ; - r4 => variants {a1 + catvariMcat ; "u:na:" + pancacat } ; - r5 => variants {a1 + pancacat ; "u:na:" + SaSTi } ; - r6 => variants {a1 + SaSTi ; "u:na:" + saptati } ; - r7 => variants {a1 + saptati ; "u:na:" + aciti } ; - r8 => variants {a1 + aciti ; "u:na:" + navati } ; - r9 => variants {a1 + navati ; "u:na:" + cata } -} ; - -oper mkR3 : Str -> Str -> DSize => Str = \a1 -> \a2 -> table { - sg => a1 + daca ; - r2 => a1 + viMcati ; - r3 => a1 + triMcat ; - r4 => variants { a2 + catvariMcat ; a1 + catvariMcat } ; - r5 => variants { a2 + pancacat ; a1 + pancacat } ; - r6 => variants { a2 + SaSTi ; a1 + SaSTi } ; - r7 => variants { a2 + saptati ; a1 + saptati } ; - r8 => a2 + aciti ; - r9 => variants { a2 + navati ; a1 + navati } -} ; - -oper mkR6 : Str -> DSize => Str = \a1 -> table { - sg => "SoDaça" ; - r2 => a1 + viMcati ; - r3 => a1 + triMcat ; - r4 => a1 + catvariMcat ; - r5 => a1 + pancacat ; - r6 => a1 + SaSTi ; - r7 => a1 + saptati ; - r8 => a1 + aciti ; - r9 => "SoNNavat" + i -} ; - -oper rows : DSize => DSize => Str = table { - sg => mkR1 ("ek" + a_) eka ; - r2 => mkR3 ("dv" + a_) ("dv" + i) ; - r3 => mkR3 ("tray" + as) ("tr" + i) ; - r4 => mkR ("catu" + r) ; - r5 => mkR "pañca" ; - r6 => mkR6 ("Sa" + S) ; - r7 => mkR "sapta" ; - r8 => mkR3 ("aST" + a_) "aSTa" ; - r9 => mkR9 "nava" -} ; - -oper eka : Str = "eka" ; - -lin pot01 = {s = table {unit => eka ; ten => daca } ; size = sg} ; -lin pot0 d = d ; -lin pot110 = {s = daca ; s2 = variants { ayuta ; mksahasra2 more10 daca }; size = more10} ; -lin pot111 = {s = rows ! sg ! sg ; - s2 = mkayutamore eka sg eka sg ; - size = more10} ; -lin pot1to19 d = - {s = rows ! d.size ! sg ; - s2 = mkayutamore eka sg (d.s ! unit) d.size; - size = more10} ; -lin pot0as1 n = {s = n.s ! unit ; - s2 = mksahasra n.size (n.s ! unit) ; - size = table {sg => sing ; r2 => dual ; _ => less10} ! n.size }; -lin pot1 d = {s = d.s ! ten ; - s2 = variants {mkayuta d.size (d.s ! unit) ; mksahasra2 more10 (d.s ! ten) } ; - size = more10} ; -lin pot1plus d e = {s = rows ! e.size ! d.size ; - s2 = mkayutamore (d.s ! unit) d.size (e.s ! unit) e.size ; - size = more10} ; -lin pot1as2 n = {s = n.s ; s2 = n.s2 ; size = n.size } ; -lin pot2 d = - {s = mkcata d.size (d.s ! unit); - s2 = mklakh d.size (d.s ! unit) ; - size = more100} ; - -lin pot2plus d e = - {s = hundredplusunit (mkcata d.size (d.s ! unit)) e.s ; - s2 = lakhplus (mklakh d.size (d.s ! unit)) e.s2 ; - size = more100} ; - -lin pot2as3 n = {s = n.s } ; -lin pot3 n = - {s = table {more10 => n.s2 ; - _ => mksahasra2 n.size n.s } ! n.size} ; - -lin pot3plus n m = - {s = p3plus (table {more10 => n.s2 ; _ => mksahasra2 n.size n.s } ! n.size) n.size m.s m.size} ; - -oper mksahasra2 : Size -> Str -> Str = \sz -> \s -> table {sing => "sahasr" + am ; dual => "dve" ++ "sahasre" ; _ => s ++ ("sahasra:N" + i)} ! sz ; -oper mksahasra : DSize -> Str -> Str = \sz -> \s -> table {sg => "sahasr" + am ; r2 => "dve" ++ "sahasre" ; _ => s ++ ("sahasra:N" + i)} ! sz ; -oper mkcata : DSize -> Str -> Str = \sz -> \s -> table {sg => cata ; r2 => variants {"dve" ++ "çate" ; "dvi:" + cata }; _ => s ++ ("çata:n" + i)} ! sz ; -oper mklakh : DSize -> Str -> Str = \sz -> \s -> table {sg => "lakS" + am ; r2 => "dve" ++ "lakSe" ; _ => s ++ ("lakSa:N" + i) } ! sz ; -oper mklakh2 : Size -> Str -> Str = \sz -> \s -> table {sing => "lakS" + am ; dual => "dve" ++ "lakSe" ; _ => s ++ ("lakSa:N" + i) } ! sz ; - -oper mkayuta : DSize -> Str -> Str = \sz -> \s -> table {sg => "ayut" + am ; r2 => "dve" ++ "ayute" ; _ => s ++ ("ayuta:n" + i)} ! sz ; - -oper adhikam : Str = "adHik" + am ; -oper ca : Str = "ca" ; -oper ayuta : Str = "ayut" + am ; -oper cata : Str = "çat" + am ; - -oper hundredplusunit : Str -> Str -> Str = \hun -> \unit -> - variants {hun ++ unit ++ "ca" ; unit ++ adhikam ++ hun}; - -oper lakhplus : Str -> Str -> Str = \lakh -> \low -> lakh ++ low ++ ca ; - -oper p3plus : Str -> Size -> Str -> Size -> Str = \b -> \bs -> \s -> \ss -> table {more10 => table {more10 => b ++ ca ++ s ++ ca ; _ => s ++ adhikam ++ b} ! ss; - _ => table {more10 => b ++ s ++ ca ; _ => s ++ b} ! ss } ! bs; - -mkayutamore : Str -> DSize -> Str -> DSize -> Str = \d -> \ds -> \e -> \es -> - variants {(mkayuta ds d) ++ (mksahasra es e) ; - mklakh2 more10 (rows ! es ! ds) } ; - diff --git a/grammars/numerals/old/slovak.gf b/grammars/numerals/old/slovak.gf deleted file mode 100644 index 9e781429e..000000000 --- a/grammars/numerals/old/slovak.gf +++ /dev/null @@ -1,60 +0,0 @@ -include numerals.Abs.gf ; - --- by Karol Ostrovsky, Chalmers --- mechanically translated to new GF notation by AR - -param DForm = unit | teen | ten ; -param Place = indep | prae ; - -lincat Numeral = {s : Str} ; -lincat Digit = {s : {p1 : DForm ; p2 : Place} => Str} ; -lincat Sub10 = {s : {p1 : DForm ; p2 : Place} => Str} ; -lincat Sub100 = {s : Place => Str} ; -lincat Sub1000 = {s : Place => Str} ; -lincat Sub1000000 = {s : Str} ; -lin num x0 = - {s = x0.s} ; -lin n2 = - {s = table {{p1 = unit ; p2 = indep} => "dva" ; {p1 = unit ; p2 = prae} => "dve" ; {p1 = teen ; p2 = indep} => "dvanast" ; {p1 = teen ; p2 = prae} => "dvanast" ; {p1 = ten ; p2 = indep} => "dvadsat" ; {p1 = ten ; p2 = prae} => "dvadsat"}} ; -lin n3 = - {s = table {{p1 = unit ; p2 = indep} => "tri" ; {p1 = unit ; p2 = prae} => "tri" ; {p1 = teen ; p2 = indep} => "trinast" ; {p1 = teen ; p2 = prae} => "trinast" ; {p1 = ten ; p2 = indep} => "tridsat" ; {p1 = ten ; p2 = prae} => "tridsat"}} ; -lin n4 = - {s = table {{p1 = unit ; p2 = indep} => "styri" ; {p1 = unit ; p2 = prae} => "styri" ; {p1 = teen ; p2 = indep} => "strnast" ; {p1 = teen ; p2 = prae} => "strnast" ; {p1 = ten ; p2 = indep} => "styridsat" ; {p1 = ten ; p2 = prae} => "styridsat"}} ; -lin n5 = - {s = table {{p1 = unit ; p2 = indep} => "pat" ; {p1 = unit ; p2 = prae} => "pat" ; {p1 = teen ; p2 = indep} => "patnast" ; {p1 = teen ; p2 = prae} => "patnast" ; {p1 = ten ; p2 = indep} => "patdesiat" ; {p1 = ten ; p2 = prae} => "patdesiat"}} ; -lin n6 = - {s = table {{p1 = unit ; p2 = indep} => "sest" ; {p1 = unit ; p2 = prae} => "sest" ; {p1 = teen ; p2 = indep} => "sestnast" ; {p1 = teen ; p2 = prae} => "sestnast" ; {p1 = ten ; p2 = indep} => "sestdesiat" ; {p1 = ten ; p2 = prae} => "sestdesiat"}} ; -lin n7 = - {s = table {{p1 = unit ; p2 = indep} => "sedem" ; {p1 = unit ; p2 = prae} => "sedem" ; {p1 = teen ; p2 = indep} => "sedemnast" ; {p1 = teen ; p2 = prae} => "sedemnast" ; {p1 = ten ; p2 = indep} => "sedemdesiat" ; {p1 = ten ; p2 = prae} => "sedemdesiat"}} ; -lin n8 = - {s = table {{p1 = unit ; p2 = indep} => "osem" ; {p1 = unit ; p2 = prae} => "osem" ; {p1 = teen ; p2 = indep} => "osemnast" ; {p1 = teen ; p2 = prae} => "osemnast" ; {p1 = ten ; p2 = indep} => "osemdesiat" ; {p1 = ten ; p2 = prae} => "osemdesiat"}} ; -lin n9 = - {s = table {{p1 = unit ; p2 = indep} => "devat" ; {p1 = unit ; p2 = prae} => "devat" ; {p1 = teen ; p2 = indep} => "devatnast" ; {p1 = teen ; p2 = prae} => "devatnast" ; {p1 = ten ; p2 = indep} => "devatdesiat" ; {p1 = ten ; p2 = prae} => "devatdesiat"}} ; -lin pot01 = - {s = table {{p1 = unit ; p2 = indep} => "jedna" ; {p1 = unit ; p2 = prae} => [] ; {p1 = teen ; p2 = indep} => "jedna" ; {p1 = teen ; p2 = prae} => [] ; {p1 = ten ; p2 = indep} => "jedna" ; {p1 = ten ; p2 = prae} => []}} ; -lin pot0 d = - {s = table {{p1 = unit ; p2 = indep} => d.s ! {p1 = unit ; p2 = indep} ; {p1 = unit ; p2 = prae} => d.s ! {p1 = unit ; p2 = prae} ; {p1 = teen ; p2 = indep} => d.s ! {p1 = teen ; p2 = indep} ; {p1 = teen ; p2 = prae} => d.s ! {p1 = teen ; p2 = prae} ; {p1 = ten ; p2 = indep} => d.s ! {p1 = ten ; p2 = indep} ; {p1 = ten ; p2 = prae} => d.s ! {p1 = ten ; p2 = prae}}} ; -lin pot110 = - {s = table {indep => "desat" ; prae => "desat"}} ; -lin pot111 = - {s = table {indep => "jedenast" ; prae => "jedenast"}} ; -lin pot1to19 d = - {s = table {indep => d.s ! {p1 = teen ; p2 = indep} ; prae => d.s ! {p1 = teen ; p2 = prae}}} ; -lin pot0as1 n = - {s = table {indep => n.s ! {p1 = unit ; p2 = indep} ; prae => n.s ! {p1 = unit ; p2 = indep}}} ; -lin pot1 d = - {s = table {indep => d.s ! {p1 = ten ; p2 = indep} ; prae => d.s ! {p1 = ten ; p2 = prae}}} ; -lin pot1plus d e = - {s = table {indep => (d.s ! {p1 = ten ; p2 = indep}) ++ e.s ! {p1 = unit ; p2 = indep} ; prae => (d.s ! {p1 = ten ; p2 = prae}) ++ e.s ! {p1 = unit ; p2 = indep}}} ; -lin pot1as2 n = - {s = table {indep => n.s ! indep ; prae => n.s ! indep}} ; -lin pot2 d = - {s = table {indep => (d.s ! {p1 = unit ; p2 = prae}) ++ "sto" ; prae => (d.s ! {p1 = unit ; p2 = prae}) ++ "sto"}} ; -lin pot2plus d e = - {s = table {indep => (d.s ! {p1 = unit ; p2 = prae}) ++ "sto" ++ e.s ! indep ; prae => (d.s ! {p1 = unit ; p2 = prae}) ++ "sto" ++ e.s ! indep}} ; -lin pot2as3 n = - {s = n.s ! indep} ; -lin pot3 n = - {s = (n.s ! prae) ++ "tisic"} ; -lin pot3plus n m = - {s = (n.s ! prae) ++ "tisic" ++ m.s ! indep} ; diff --git a/grammars/numerals/old/sorani.gf b/grammars/numerals/old/sorani.gf deleted file mode 100644 index 0b62c6039..000000000 --- a/grammars/numerals/old/sorani.gf +++ /dev/null @@ -1,90 +0,0 @@ -include numerals.Abs.gf ; - -param DForm = unit | ten | teen | hund | kilurrest | kilurresthAzar ; -param Size = sg | less500 | fiveup | more500 ; - --- From Manuel de Kurde (dialecte Sorani). --- --- [W] is waw with a horizontal line above --- [E] is a ye with a horizonytal line above --- [A] shouldnt have dots (= ta marbuta; also inside a word) --- [p] is be with three dots below like Persian --- [j] is djim like normal, like arabic (not ye) --- [O] is a waw with a hacek above --- [F] is a fa with three dots above (i.e v) --- [Z] is a zain with three dots above (i.e zh) --- [I] is a ye with a horizontal line above --- [C] is a djim with three dots below like Persian (i.e ch) --- [c] is shin (i.e sh) --- [H] is Arabic Ha (= djim without dots) - --- [P] is a Ha with a hamza above --- [R] is an r with a ring below - -lincat Digit = {s : DForm => Str ; size : Size} ; -lincat Sub10 = {s : DForm => Str ; size : Size} ; -lincat Sub100 = {s : Str ; size : Size} ; -lincat Sub1000 = {s : Str ; s2 : Str ; size : Size} ; - -lin num x0 = - {s = "/A" ++ x0.s ++ "A/"} ; -- the Arabic environment - -oper mkNum : Str -> Str -> Str -> Lin Digit = - \dwA -> \cl -> \dwwls -> - {s = table {unit => dwA ; ten => cl ; teen => dwwls ; hund => dwA + "sAd" ; - kilurrest => "dummy" ; kilurresthAzar => "dummy" } ; size = less500}; - -oper mkNum6 : Str -> Str -> Str -> Str -> Str -> Lin Digit = - \dwA -> \cl -> \dwwls -> \pEn -> \rest -> - {s = table {unit => dwA ; ten => cl ; teen => dwwls ; hund => pEn + "sAd" ; - kilurrest => rest + "sAd" ; kilurresthAzar => rest + "sAd" ++ "hAzar"} ; size = fiveup} ; - --- lin n1 mkNum "yAk" "dA" variants { "yazdA" ; "yanzA"} [] ; -lin n2 = mkNum "dW" "bIst" (variants { "dwwazdA" ; "dwwanzA" }) ; -lin n3 = mkNum "sE" "sI" (variants { "sEzdA" ; "syanzA" }) ; -lin n4 = mkNum "Cwwar" "Pl" "CwwardA" ; -lin n5 = {s = table {unit => "pEnj" ; - ten => "pAnja" ; - teen => (variants { "pazdA" ; "panzA" }) ; - hund => "pEn" + "sAd"; - kilurrest => [] ; - kilurresthAzar => [] } ; - size = fiveup } ; - -lin n6 = mkNum6 "cAc" "cAst" (variants { "cazdA"; "canzA"}) "cAc" [] ; -lin n7 = mkNum6 "HAwt" "HAfta" "HAFdA" "HAw" "dW" ; -lin n8 = mkNum6 "hAct" "hActa" "hAZdA" "hAc" "sE" ; -lin n9 = mkNum6 "nO" "nAwAd" "nOzdA" "nO" "Cwwar" ; - -oper ss : Str -> {s : Str ; size : Size} = \s -> {s = s ; size = less500} ; - -lin pot01 = {s = table {unit => "yAk" ; hund => "sAd" ; _ => "dummy" } ; size = sg } ; -lin pot0 d = {s = table {f => d.s ! f} ; size = d.size} ; -lin pot110 = ss "dA" ; -lin pot111 = ss (variants { "yazdA" ; "yanzA"}); -lin pot1to19 d = {s = d.s ! teen ; size = less500 } ; -lin pot0as1 n = {s = n.s ! unit ; size = n.size} ; -lin pot1 d = {s = d.s ! ten ; size = less500} ; -lin pot1plus d e = {s = (d.s ! ten) ++ "w" ++ (e.s ! unit); size = less500} ; -lin pot1as2 n = {s = n.s ; s2 = "dummy" ; size = n.size } ; -lin pot2 d = {s = d.s ! hund ; s2 = "klWr" ++ d.s ! kilurresthAzar ; size = isover500 d.size} ; -lin pot2plus d e = - {s = d.s ! hund ++ e.s ; - s2 = "klWr" ++ d.s ! kilurrest ++ (mkhAzar e.s "dummy") ! e.size ; - size = isover500 d.size} ; -lin pot2as3 n = {s = n.s} ; -lin pot3 n = {s = (mkhAzar n.s n.s2) ! n.size } ; -lin pot3plus n m = {s =(mkhAzar n.s n.s2) ! n.size ++ m.s} ; - -oper isover500 : Size -> Size = \sz -> - table {fiveup => more500 ; _ => less500} ! sz ; - -oper mkhAzar : Str -> Str -> Size => Str = \attr -> \kilur -> - table {sg => "hAzar" ; - fiveup => attr ++ "hAzar" ; - less500 => attr ++ "hAzar" ; - more500 => kilur} ; - - - - diff --git a/grammars/numerals/old/spanish.gf b/grammars/numerals/old/spanish.gf deleted file mode 100644 index 30d7e46a4..000000000 --- a/grammars/numerals/old/spanish.gf +++ /dev/null @@ -1,61 +0,0 @@ -include numerals.Abs.gf ; - --- by Carlos Gonzalia, Chalmers, 1999 --- original source automatically translated to new GF by AR - -param DForm = unit | teen | ten | hundred ; -param Modif = mod | unmod | conj ; - -lincat Numeral = {s : Str} ; -lincat Digit = {inh : Modif ; s : {p1 : DForm ; p2 : Modif} => Str} ; -lincat Sub10 = {s : {p1 : DForm ; p2 : Modif} => Str} ; -lincat Sub100 = {s : Str} ; -lincat Sub1000 = {s : Str} ; -lincat Sub1000000 = {s : Str} ; - -lin num x0 = - {s = x0.s} ; -lin n2 = - {inh = mod ; s = table {{p1 = unit ; p2 = mod} => "dos" ; {p1 = unit ; p2 = unmod} => "dos" ; {p1 = unit ; p2 = conj} => "y" ++ "dos" ; {p1 = teen ; p2 = mod} => "doce" ; {p1 = teen ; p2 = unmod} => "doce" ; {p1 = teen ; p2 = conj} => "doce" ; {p1 = ten ; p2 = mod} => "veinti" ; {p1 = ten ; p2 = unmod} => "veinte" ; {p1 = ten ; p2 = conj} => "veinte" ; {p1 = hundred ; p2 = mod} => "doscientos" ; {p1 = hundred ; p2 = unmod} => "doscientos" ; {p1 = hundred ; p2 = conj} => "doscientos"}} ; -lin n3 = - {inh = conj ; s = table {{p1 = unit ; p2 = mod} => "tres" ; {p1 = unit ; p2 = unmod} => "tres" ; {p1 = unit ; p2 = conj} => "y" ++ "tres" ; {p1 = teen ; p2 = mod} => "trece" ; {p1 = teen ; p2 = unmod} => "trece" ; {p1 = teen ; p2 = conj} => "trece" ; {p1 = ten ; p2 = mod} => "treinta" ; {p1 = ten ; p2 = unmod} => "treinta" ; {p1 = ten ; p2 = conj} => "treinta" ; {p1 = hundred ; p2 = mod} => "trescientos" ; {p1 = hundred ; p2 = unmod} => "trescientos" ; {p1 = hundred ; p2 = conj} => "trescientos"}} ; -lin n4 = - {inh = conj ; s = table {{p1 = unit ; p2 = mod} => "cuatro" ; {p1 = unit ; p2 = unmod} => "cuatro" ; {p1 = unit ; p2 = conj} => "y" ++ "cuatro" ; {p1 = teen ; p2 = mod} => "catorce" ; {p1 = teen ; p2 = unmod} => "catorce" ; {p1 = teen ; p2 = conj} => "catorce" ; {p1 = ten ; p2 = mod} => "cuarenta" ; {p1 = ten ; p2 = unmod} => "cuarenta" ; {p1 = ten ; p2 = conj} => "cuarenta" ; {p1 = hundred ; p2 = mod} => "cuatrocientos" ; {p1 = hundred ; p2 = unmod} => "cuatrocientos" ; {p1 = hundred ; p2 = conj} => "cuatrocientos"}} ; -lin n5 = - {inh = conj ; s = table {{p1 = unit ; p2 = mod} => "cinco" ; {p1 = unit ; p2 = unmod} => "cinco" ; {p1 = unit ; p2 = conj} => "y" ++ "cinco" ; {p1 = teen ; p2 = mod} => "quince" ; {p1 = teen ; p2 = unmod} => "quince" ; {p1 = teen ; p2 = conj} => "quince" ; {p1 = ten ; p2 = mod} => "cincuenta" ; {p1 = ten ; p2 = unmod} => "cincuenta" ; {p1 = ten ; p2 = conj} => "cincuenta" ; {p1 = hundred ; p2 = mod} => "quinientos" ; {p1 = hundred ; p2 = unmod} => "quinientos" ; {p1 = hundred ; p2 = conj} => "quinientos"}} ; -lin n6 = - {inh = conj ; s = table {{p1 = unit ; p2 = mod} => "seis" ; {p1 = unit ; p2 = unmod} => "seis" ; {p1 = unit ; p2 = conj} => "y" ++ "seis" ; {p1 = teen ; p2 = mod} => "dieciseis" ; {p1 = teen ; p2 = unmod} => "dieciseis" ; {p1 = teen ; p2 = conj} => "dieciseis" ; {p1 = ten ; p2 = mod} => "sesenta" ; {p1 = ten ; p2 = unmod} => "sesenta" ; {p1 = ten ; p2 = conj} => "sesenta" ; {p1 = hundred ; p2 = mod} => "seiscientos" ; {p1 = hundred ; p2 = unmod} => "seiscientos" ; {p1 = hundred ; p2 = conj} => "seiscientos"}} ; -lin n7 = - {inh = conj ; s = table {{p1 = unit ; p2 = mod} => "siete" ; {p1 = unit ; p2 = unmod} => "siete" ; {p1 = unit ; p2 = conj} => "y" ++ "siete" ; {p1 = teen ; p2 = mod} => "diecisiete" ; {p1 = teen ; p2 = unmod} => "diecisiete" ; {p1 = teen ; p2 = conj} => "diecisiete" ; {p1 = ten ; p2 = mod} => "setenta" ; {p1 = ten ; p2 = unmod} => "setenta" ; {p1 = ten ; p2 = conj} => "setenta" ; {p1 = hundred ; p2 = mod} => "setecientos" ; {p1 = hundred ; p2 = unmod} => "setecientos" ; {p1 = hundred ; p2 = conj} => "setecientos"}} ; -lin n8 = - {inh = conj ; s = table {{p1 = unit ; p2 = mod} => "ocho" ; {p1 = unit ; p2 = unmod} => "ocho" ; {p1 = unit ; p2 = conj} => "y" ++ "ocho" ; {p1 = teen ; p2 = mod} => "dieciocho" ; {p1 = teen ; p2 = unmod} => "dieciocho" ; {p1 = teen ; p2 = conj} => "dieciocho" ; {p1 = ten ; p2 = mod} => "ochenta" ; {p1 = ten ; p2 = unmod} => "ochenta" ; {p1 = ten ; p2 = conj} => "ochenta" ; {p1 = hundred ; p2 = mod} => "ochocientos" ; {p1 = hundred ; p2 = unmod} => "ochocientos" ; {p1 = hundred ; p2 = conj} => "ochocientos"}} ; -lin n9 = - {inh = conj ; s = table {{p1 = unit ; p2 = mod} => "nueve" ; {p1 = unit ; p2 = unmod} => "nueve" ; {p1 = unit ; p2 = conj} => "y" ++ "nueve" ; {p1 = teen ; p2 = mod} => "diecinueve" ; {p1 = teen ; p2 = unmod} => "diecinueve" ; {p1 = teen ; p2 = conj} => "diecinueve" ; {p1 = ten ; p2 = mod} => "noventa" ; {p1 = ten ; p2 = unmod} => "noventa" ; {p1 = ten ; p2 = conj} => "noventa" ; {p1 = hundred ; p2 = mod} => "novecientos" ; {p1 = hundred ; p2 = unmod} => "novecientos" ; {p1 = hundred ; p2 = conj} => "novecientos"}} ; -lin pot01 = - {s = table {{p1 = unit ; p2 = mod} => "uno" ; {p1 = unit ; p2 = unmod} => "uno" ; {p1 = unit ; p2 = conj} => "y" ++ "uno" ; {p1 = teen ; p2 = mod} => "uno" ; {p1 = teen ; p2 = unmod} => "uno" ; {p1 = teen ; p2 = conj} => "y" ++ "uno" ; {p1 = ten ; p2 = mod} => "uno" ; {p1 = ten ; p2 = unmod} => "uno" ; {p1 = ten ; p2 = conj} => "y" ++ "uno" ; {p1 = hundred ; p2 = mod} => "ciento" ; {p1 = hundred ; p2 = unmod} => "cien" ; {p1 = hundred ; p2 = conj} => "y" ++ "uno"}} ; -lin pot0 d = - {s = table {{p1 = unit ; p2 = mod} => d.s ! {p1 = unit ; p2 = mod} ; {p1 = unit ; p2 = unmod} => d.s ! {p1 = unit ; p2 = unmod} ; {p1 = unit ; p2 = conj} => d.s ! {p1 = unit ; p2 = conj} ; {p1 = teen ; p2 = mod} => d.s ! {p1 = teen ; p2 = mod} ; {p1 = teen ; p2 = unmod} => d.s ! {p1 = teen ; p2 = unmod} ; {p1 = teen ; p2 = conj} => d.s ! {p1 = teen ; p2 = conj} ; {p1 = ten ; p2 = mod} => d.s ! {p1 = ten ; p2 = mod} ; {p1 = ten ; p2 = unmod} => d.s ! {p1 = ten ; p2 = unmod} ; {p1 = ten ; p2 = conj} => d.s ! {p1 = ten ; p2 = conj} ; {p1 = hundred ; p2 = mod} => d.s ! {p1 = hundred ; p2 = mod} ; {p1 = hundred ; p2 = unmod} => d.s ! {p1 = hundred ; p2 = unmod} ; {p1 = hundred ; p2 = conj} => d.s ! {p1 = hundred ; p2 = conj}}} ; -lin pot110 = - {s = "diez"} ; -lin pot111 = - {s = "once"} ; -lin pot1to19 d = - {s = d.s ! {p1 = teen ; p2 = unmod}} ; -lin pot0as1 n = - {s = n.s ! {p1 = unit ; p2 = unmod}} ; -lin pot1 d = - {s = d.s ! {p1 = ten ; p2 = unmod}} ; -lin pot1plus d e = - {s = (d.s ! {p1 = ten ; p2 = mod}) ++ e.s ! {p1 = unit ; p2 = d.inh}} ; -lin pot1as2 n = - {s = n.s} ; -lin pot2 d = - {s = d.s ! {p1 = hundred ; p2 = unmod}} ; -lin pot2plus d e = - {s = (d.s ! {p1 = hundred ; p2 = mod}) ++ e.s} ; -lin pot2as3 n = - {s = n.s} ; -lin pot3 n = - {s = n.s ++ "mil"} ; -lin pot3plus n m = - {s = n.s ++ "mil" ++ m.s} ; diff --git a/grammars/numerals/old/stieng.gf b/grammars/numerals/old/stieng.gf deleted file mode 100644 index 549e9bd3f..000000000 --- a/grammars/numerals/old/stieng.gf +++ /dev/null @@ -1,54 +0,0 @@ -include numerals.Abs.gf ; - -param Size = sg | belowten | moreten ; - -oper LinDigit = {s : Str ; size : Size} ; - -lincat Digit = LinDigit ; -lincat Sub10 = LinDigit ; -lincat Sub100 = {s : Str ; s2 : Str ; size : Size} ; -lincat Sub1000 = {s : Str ; s2 : Str ; size : Size} ; - -oper mkNum : Str -> LinDigit = \u -> {s = u ; size = belowten} ; - -lin n2 = mkNum "baar" ; -lin n3 = mkNum "pê" ; -lin n4 = mkNum "puôn" ; -lin n5 = mkNum "pram" ; -lin n6 = mkNum "prau" ; -lin n7 = mkNum "poh" ; -lin n8 = mkNum "phaam" ; -lin n9 = mkNum "sên" ; - -oper ban : Str = (variants {"ban" ; "rabu"} ) ; - -lin num x = x ; - -lin pot01 = {s = variants {"muôi" ; "du" ; "di"} ; size = sg } ; -lin pot0 d = d ; -lin pot110 = {s = "jo'mo't" ; s2 = variants {"mu'n" ; "jo'm'ot" ++ "ban"} ; size = moreten} ; -lin pot111 = {s = "jo'mo't" ++ "muôi" ; s2 = variants {"mu'n" ++ ban ; "jo'm'ot" ++ "muôi" ++ ban} ; size = moreten} ; -lin pot1to19 d = {s = "jo'mo't" ++ d.s ; s2 = variants {"mu'n" ++ d.s ++ "ban"; "jo'm'ot" ++ d.s ++ "ban"} ; size = moreten }; -lin pot0as1 n = {s = n.s ; s2 = xsg n.size ban (n.s ++ "ban") ; size = n.size} ; -lin pot1 d = {s = d.s ++ "jo't" ; s2 = variants {d.s ++ "mu'n" ; d.s ++ "jo't" ++ "ban"} ; size = moreten} ; -lin pot1plus d e = {s = d.s ++ "jo't" ++ e.s ; s2 = variants {d.s ++ "mu'n" ; d.s ++ "jo't" } ++ xsg e.size ban (e.s ++ "ban") ; size = moreten} ; -lin pot1as2 n = n ; -lin pot2 d = {s = xsg d.size (variants { "riêng" ; "rhiêng" }) (d.s ++ "riêng") ; - s2 = xsg d.size "seen" (d.s ++ "seen") ; - size = moreten} ; -lin pot2plus d e = {s = xsg d.size (variants { "riêng" ; "rhiêng" }) (d.s ++ "riêng") ++ maybeo e.size ++ e.s ; - s2 = xsg d.size "seen" (d.s ++ "seen") ++ e.s2 ; - size = moreten} ; -lin pot2as3 n = {s = n.s} ; -lin pot3 n = {s = table {sg => (variants {"ban" ; "rabu"}) ; - belowten => n.s ++ "ban" ; - tenover => n.s2} ! n.size } ; -lin pot3plus n m = {s = table {sg => (variants {"ban" ; "rabu"}) ; - belowten => n.s ++ "ban" ; - tenover => n.s2} ! n.size ++ maybeo m.size ++ m.s } ; - -oper maybeo : Size -> Str = \sz -> table {moreten => [] ; _ => "ô"} ! sz; -oper xsg : Size -> Str -> Str -> Str = \sz -> \s1 -> \s2 -> table {sg => s1 ; _ => s2} ! sz ; - - - diff --git a/grammars/numerals/old/swahili.gf b/grammars/numerals/old/swahili.gf deleted file mode 100644 index e3613e986..000000000 --- a/grammars/numerals/old/swahili.gf +++ /dev/null @@ -1,54 +0,0 @@ -include numerals.Abs.gf ; - -param DForm = unit | ten ; -param Size = sg | pl | pl_end | more100; -param S1000 = reg | lakh ; - -lincat Numeral = {s : Str} ; -lincat Digit = {s : DForm => Str ; size : Size } ; -lincat Sub10 = {s : DForm => Str ; size : Size } ; -lincat Sub100 = {s : Str ; size : Size} ; -lincat Sub1000 = {s : S1000 => Str ; size : Size } ; -lincat Sub1000000 = {s : Str} ; -lin num x0 = - {s = x0.s} ; - -oper mkNum : Str -> Str -> Lin Digit = \mbili -> \ishirini -> - {s = table {unit => mbili ; ten => ishirini } ; size = pl_end }; - --- lin n1 = mkNum "moja" ; -lin n2 = mkNum "mbili" "ishirini" ; -lin n3 = mkNum "tatu" "thelathini" ; -lin n4 = mkNum "nne" "arobaini" ; -lin n5 = mkNum "tano" "hamsini" ; -lin n6 = mkNum "sita" "sitini" ; -lin n7 = mkNum "saba" "sabini" ; -lin n8 = mkNum "nane" "themanini" ; -lin n9 = mkNum "tisa" "tisini" ; - -lin pot01 = - {s = table {unit => "moja" ; _ => "dummy" } ; size = sg }; -lin pot0 d = d ; -lin pot110 = {s = "kumi" ; size = pl_end} ; -lin pot111 = {s = "kumi" ++ "na" ++ "moja" ; size = pl} ; -lin pot1to19 d = {s = "kumi" ++ "na" ++ d.s ! unit ; size = pl} ; -lin pot0as1 n = {s = n.s ! unit ; size = n.size} ; -lin pot1 d = {s = d.s ! ten ; size = pl_end} ; -lin pot1plus d e = {s = d.s ! ten ++ "na" ++ e.s ! unit ; size = pl} ; -lin pot1as2 n = {s = table {_ => n.s } ; size = n.size} ; -lin pot2 d = {s = table {reg => mkmia d.size (d.s ! unit) ; lakh => mklakh d.size (d.s ! unit) []} ; size = more100}; -lin pot2plus d e = - {s = table {lakh => mklakh d.size (d.s ! unit) ("elfu" ++ e.s) ; - reg => mkmia d.size (d.s ! unit) ++ maybena e.size ++ e.s } ; - size = more100} ; -lin pot2as3 n = {s = n.s ! reg } ; -lin pot3 n = {s = table {sg => variants {"elfu" ; "elfu" ++ "moja"} ; more100 => n.s ! lakh ; _ => n.s ! reg ++ "elfu"} ! n.size} ; -- invert order in 1 < x < 100 * 1000 if nothing follows the elfu -lin pot3plus n m = {s = table {more100 => n.s ! lakh ; _ => "elfu" ++ n.s ! reg} ! n.size ++ maybena m.size ++ m.s ! reg} ; - -oper lakhi : Str = (variants {"lakh" ; "lakhi" }) ; -oper mia : Str = (variants { "mia" ; "mia" ++ "moja" }) ; -oper maybena : Size -> Str = \sz -> table {sg => "na" ; pl_end => "na" ; _ => []} ! sz ; -oper mklakh : Size -> Str -> Str -> Str = \sz -> \attr -> \elfu -> - table {sg => lakhi ; _ => lakhi ++ attr} ! sz ++ elfu ; -oper mkmia : Size -> Str -> Str = \sz -> \attr -> - table {sg => mia; _ => "mia" ++ attr } ! sz ; diff --git a/grammars/numerals/old/swiss_french.gf b/grammars/numerals/old/swiss_french.gf deleted file mode 100644 index 1966c25c0..000000000 --- a/grammars/numerals/old/swiss_french.gf +++ /dev/null @@ -1,72 +0,0 @@ -include numerals.Abs.gf ; - -param DForm = unit | teen | ten ; -param Nm = sg | pl ; -param Place = indep | attr ; - -lincat Numeral = {s : Str} ; -lincat Digit = {inh : DForm ; inh1 : Nm ; s : DForm => Str} ; -lincat Sub10 = {inh : Nm ; s : {p1 : DForm ; p2 : Place} => Str} ; -lincat Sub100 = {s : Place => Str} ; -lincat Sub1000 = {s : Place => Str} ; -lincat Sub1000000 = {s : Str} ; - -lin num x0 = - {s = x0.s} ; -lin n2 = - {inh = unit ; inh1 = sg ; s = table {unit => "deux" ; teen => "douze" ; ten => "vingt" }} ; -lin n3 = - {inh = unit ; inh1 = sg ; s = table {unit => "trois" ; teen => "treize" ; ten => "trente" }} ; -lin n4 = - {inh = unit ; inh1 = sg ; s = table {unit => "quatre" ; teen => "quatorze" ; ten => "quarante" }} ; -lin n5 = - {inh = unit ; inh1 = sg ; s = table {unit => "cinq" ; teen => "quinze" ; ten => "cinquante" }} ; -lin n6 = - {inh = unit ; inh1 = sg ; s = table {unit => "six" ; teen => "seize" ; ten => "soixante" }} ; -lin n7 = - {inh = unit ; inh1 = sg ; s = table {unit => "sept" ; teen => "dix" ++ "-" ++ "sept" ; ten => "septante" }} ; -lin n8 = - {inh = unit ; inh1 = pl ; s = table {unit => "huit" ; teen => "dix" ++ "-" ++ "huit" ; ten => "huitante" }} ; -lin n9 = - {inh = unit ; inh1 = pl ; s = table {unit => "neuf" ; teen => "dix" ++ "-" ++ "neuf" ; ten => "nonante" }} ; -lin pot01 = - {inh = sg ; - s = table {{p1 = unit ; p2 = indep} => "un" ; - {p1 = unit ; p2 = attr} => [] ; - {p1 = teen ; p2 = indep} => "onze" ; - {p1 = teen ; p2 = attr} => [] ; - {p1 = ten ; p2 = indep} => "dix" ; - {p1 = ten ; p2 = attr} => [] }} ; -lin pot0 d = - {inh = pl ; - s = table {{p1 = unit ; p2 = indep} => d.s ! unit ; - {p1 = unit ; p2 = attr} => d.s ! unit ; - {p1 = teen ; p2 = indep} => d.s ! teen ; - {p1 = teen ; p2 = attr} => d.s ! teen ; - {p1 = ten ; p2 = indep} => d.s ! ten ; - {p1 = ten ; p2 = attr} => d.s ! ten }} ; - -lin pot110 = - {s = table {indep => "dix" ; attr => "dix"}} ; -lin pot111 = - {s = table {indep => "onze" ; attr => "onze"}} ; -lin pot1to19 d = - {s = table {indep => d.s ! teen ; attr => d.s ! teen}} ; -lin pot0as1 n = - {s = table {indep => n.s ! {p1 = unit ; p2 = indep} ; attr => n.s ! {p1 = unit ; p2 = attr}}} ; -lin pot1 d = - {s = table {indep => d.s ! ten ; attr => d.s ! ten}} ; -lin pot1plus d e = - {s = table {indep => (d.s ! ten) ++ (table {{p1 = sg ; p2 = sg} => "et" ; {p1 = sg ; p2 = pl} => "-" ; {p1 = pl ; p2 = sg} => "-" ; {p1 = pl ; p2 = pl} => "-"} ! {p1 = d.inh1 ; p2 = e.inh}) ++ e.s ! {p1 = d.inh ; p2 = indep} ; attr => (d.s ! ten) ++ (table {{p1 = sg ; p2 = sg} => "et" ; {p1 = sg ; p2 = pl} => "-" ; {p1 = pl ; p2 = sg} => "-" ; {p1 = pl ; p2 = pl} => "-"} ! {p1 = d.inh1 ; p2 = e.inh}) ++ e.s ! {p1 = d.inh ; p2 = indep}}} ; -lin pot1as2 n = - {s = table {indep => n.s ! indep ; attr => n.s ! attr}} ; -lin pot2 d = - {s = table {indep => (d.s ! {p1 = unit ; p2 = attr}) ++ table {sg => "cent" ; pl => "cents"} ! (d.inh) ; attr => (d.s ! {p1 = unit ; p2 = attr}) ++ "cent"}} ; -lin pot2plus d e = - {s = table {indep => (d.s ! {p1 = unit ; p2 = attr}) ++ "cent" ++ e.s ! indep ; attr => (d.s ! {p1 = unit ; p2 = attr}) ++ "cent" ++ e.s ! indep}} ; -lin pot2as3 n = - {s = n.s ! indep} ; -lin pot3 n = - {s = (n.s ! attr) ++ "mille"} ; -lin pot3plus n m = - {s = (n.s ! attr) ++ "mille" ++ m.s ! indep} ; diff --git a/grammars/numerals/old/tamil.gf b/grammars/numerals/old/tamil.gf deleted file mode 100644 index 82a1a66c1..000000000 --- a/grammars/numerals/old/tamil.gf +++ /dev/null @@ -1,166 +0,0 @@ --- Tamil --- Ad hoc transcr. --- when there is something bigger maybe a:yiram should be preceded --- by an o:ru - --- c is sh/ch etc --- s is sanskr. s' --- S is sanskr. s. --- G is velar n i.e [ng] --- V regular n in e.g [na:ru] --- n one ring n --- N two ring n --- ñ --- l --- L (like N but without the middle ring) --- M is retroflex l with the char that looks a bit like m (e.g l in Tamil) - - -include numerals.Abs.gf ; - -oper - vowel : Strs = strs {"o" ; "e" ; "a" ; "i" ; "u"} ; - labial : Strs = strs {"m" ; "p"} ; - retroflex : Strs = strs {"N" ; "T"} ; - sandhi_u : Str = pre {"u" ; [] / vowel} ; - sandhi_n : Str = pre {"n" ; "m" / labial} ; - sandhi_spc_n : Str = pre {"n" ; "p" / labial} ; - -- sandhi_N : Str = post {"n" ; "N" / retroflex } ; - -param DForm = unit | attr1 | attr2 | teen ; -param Size = sg | four | five | eight | nine | more100 | less100 ; -param Place = attr | indep ; -param Sub1000Data = attrtwo | indeptwo | preceded | lakhs | lakhs2 ; - -lincat Numeral = {s : Str} ; -lincat Digit = {s : DForm => Str ; size : Size} ; -lincat Sub10 = {s : DForm => Str ; size : Size} ; -lincat Sub100 = {s : Place => Str ; size : Size} ; -lincat Sub1000 = {s : Sub1000Data => Str ; size : Size} ; -lincat Sub1000000 = {s : Str} ; -lin num x0 = - {s = "/T" ++ x0.s ++ "T/"} ; -- the Tamil environment - -lin n2 = - {s = table {teen => "panniraNTu" ; - unit => "iraNT" + sandhi_u ; - attr1 => "iru" ; - attr2 => variants {"iraNT" + sandhi_u ; "i:r"} } ; size = less100} ; -lin n3 = - {s = table {teen => "patin" + "mu:nru" ; - unit => "mu:nr" + sandhi_u ; - attr1 => "mu" + sandhi_spc_n ; - attr2 => "mu:l"} ; size = less100} ; -lin n4 = - {s = table {teen => "pati" + variants { "Va:lu" ; "Va:nku" } ; - unit => variants { "Va:l" + sandhi_u ; "Va:nk" + sandhi_u } ; - attr1 => "Va:r" ; - attr2 => "Va:l"} ; size = four} ; -lin n5 = - {s = table {teen => "patin" + "aindu" ; - unit => "aint" + sandhi_u ; - attr1 => "ai" + sandhi_n ; - attr2 => "aiy"} ; size = five} ; -lin n6 = - {s = table {teen => "patin" + "a:ru" ; - unit => "a:r" + sandhi_u ; - attr1 => "aru" ; - attr2 => "a:r"} ; size = less100} ; -lin n7 = - {s = table {teen => "patin" + "e:Lu" ; - unit => "e:L" + sandhi_u ; - attr1 => "eLu" ; - attr2 => "eL"} ; size = less100} ; -lin n8 = - {s = table {teen => "patin" + "eTTu" ; - unit => "eTT" + sandhi_u ; - attr1 => "eN" ; - attr2 => "eNN"} ; size = eight} ; -lin n9 = - {s = table {teen => "patt" + "o:npatu" ; - unit => "o:npat" + sandhi_u ; - attr1 => "toN" ; - attr2 => "o:npatin"} ; size = nine} ; - -oper fiveh : Str = variants { "ainna:ru" ; "añña:ru"} ; -oper fiveh_sandhi : Str = variants { "ainna:r" + sandhi_u ; "añña:r" + sandhi_u } ; - -lin pot01 = - {s = table {unit => "o:nru"; teen => "patin" + "o:nru" ; attr1 => "o:r" + sandhi_u ; attr2 => []} ; size = sg} ; -lin pot0 d = - {s = d.s ; size = d.size} ; -lin pot110 = - {s = table {_ => "pattu"} ; size = less100} ; -lin pot111 = - {s = table {_ => "patin" + "o:nr" + sandhi_u} ; size = less100} ; -lin pot1to19 d = - {s = table {_ => d.s ! teen} ; size = less100} ; -lin pot0as1 n = - {s = table {attr => n.s ! attr2 ; indep => n.s ! unit} ; size = n.size} ; -lin pot1 d = - {s = table {_ => table {nine => "toNNa:r" + sandhi_u ; _ => d.s ! attr1 ++ "patu"} ! d.size} ; size = less100} ; -lin pot1plus d e = - {s = table {_ => table {nine => ("toNNa:r" + sandhi_u) ++ e.s ! unit; _ => d.s ! attr1 ++ "pat" + sandhi_u } ! d.size ++ e.s ! unit }; size = less100} ; -lin pot1as2 n = - {s = table {indeptwo => n.s ! indep ; attrtwo => n.s ! attr ; preceded => n.s ! indep ; _ => "dummy"}; size = n.size} ; -lin pot2 d = - {s = table {indeptwo => - table {nine => "toLLa:yiram" ; - eight => "eNNa:ru" ; - four => "Va:Va:ru" ; - five => fiveh ; - sg => "Va:ru" ; - _ => d.s ! attr1 ++ "Va:ru"} ! d.size ; - attrtwo => - table {nine => "toLLa:yiratt" + sandhi_u ; - eight => "eNNa:r" + sandhi_u ; - four => "Va:Va:r" + sandhi_u; - five => fiveh_sandhi ; - _ => d.s ! attr1 ++ "Va:r" + sandhi_u} ! d.size ; - preceded => - table {nine => "toLLa:yiram" ; - eight => "eNNa:ru" ; - four => "Va:Va:ru" ; - five => fiveh ; - _ => d.s ! attr1 ++ "Va:ru"} ! d.size ; - lakhs => d.s ! unit ++ "ilaTcam" ; - lakhs2 => d.s ! unit ++ "ilaTcattu" } ; - size = more100} ; -lin pot2plus d e = - {s = table {indeptwo => - table {nine => ("toLLa:yiratt" + sandhi_u) ; - eight => ("eNNa:r" + sandhi_u) ; - four => ("Va:Va:r" + sandhi_u) ; - five => fiveh_sandhi ; - sg => ("Va:r" + sandhi_u) ; - _ => d.s ! attr1 ++ ("Va:r" + sandhi_u) } ! d.size ++ e.s ! indep ; - attrtwo => - table {nine => ("toLLa:yiratt" + sandhi_u) ; - eight => ("eNNa:r" + sandhi_u) ; - four => ("Va:Va:r" + sandhi_u) ; - five => fiveh_sandhi ; - sg => ("Va:r" + sandhi_u) ; - _ => d.s ! attr1 ++ ("Va:r" + sandhi_u) } ! d.size ++ e.s ! indep ; - preceded => - table {nine => ("toLLa:yiratt" + sandhi_u) ; - eight => ("eNNa:r" + sandhi_u) ; - four => ("Va:Va:r" + sandhi_u) ; - five => fiveh_sandhi ; - _ => d.s ! attr1 ++ ("Va:r" + sandhi_u) } ! d.size ++ e.s ! indep ; - lakhs => d.s ! unit ++ ("ilaTcatt" + sandhi_u) ++ - table {sg => "a:yiram" ; _ => e.s ! attr ++ "a:yiram" } ! e.size ; - lakhs2 => d.s ! unit ++ ("ilaTcatt" + sandhi_u) ++ - table {sg => "a:yiratt" + sandhi_u ; _ => e.s ! attr ++ ("a:yiratt" + sandhi_u) } ! e.size} ; size = more100} ; - -lin pot2as3 n = - {s = n.s ! indeptwo} ; -lin pot3 n = - {s = table {sg => "a:yiram" ; - more100 => n.s ! lakhs ; - _ => n.s ! attrtwo ++ "a:yiram" } ! n.size } ; - -lin pot3plus n m = - {s = table {sg => "a:yiratt" + sandhi_u; - more100 => n.s ! lakhs2 ; - _ => n.s ! attrtwo ++ "a:yiratt" + sandhi_u } ! n.size ++ m.s ! preceded} ; - diff --git a/grammars/numerals/old/tibetan.gf b/grammars/numerals/old/tibetan.gf deleted file mode 100644 index b862108fc..000000000 --- a/grammars/numerals/old/tibetan.gf +++ /dev/null @@ -1,65 +0,0 @@ -include numerals.Abs.gf ; - -oper bind : Str -> Str -> Str = \s1 -> \s2 -> s1 ++ s2; - -param DForm = unit | teen | bform | ten | hundred | agg ; - --- Sorry no tibetan script but the adhoc transliteration should be phonematic --- 21 has an extra variant namely nyerchi' - -oper LinDigit = {s : DForm => Str} ; - -lincat Digit = LinDigit ; -lincat Sub10 = LinDigit ; -lincat Sub100 = {s : Str ; s2 : Str} ; -lincat Sub1000 = {s : Str ; s2 : Str} ; - -oper mkNum : Str -> Str -> Str -> Str -> LinDigit = - \u -> \tn -> \b -> \t -> - {s = table {unit => u ; teen => tn ; bform => b + "chu" ; ten => t ; hundred => b + "g~ya" ; agg => "t.'a'" ++ u}} ; - --- lin n1 mkNum "chi'" "chug/chi'" ; -lin n2 = -{s = table {unit => "n~yi:" ; teen => "chug/n~yi:" ; ten => "tsag/" ; - bform => "nyishu" ; hundred => (variants {"nyibg~ya"; "nyi:bg~ya"}) ; - agg => "t.'a'" ++ "n~yi:" } }; -lin n3 = mkNum "sum" "chug/sum" "sum" "sog/" ; -lin n4 = mkNum "z~hyi" "chubz~hyi" (variants {"z~hyib" ; "z~hib"}) "z/hye" ; -lin n5 = mkNum "n~ga" "chö:n~ga" "n~gab" "nga" ; -lin n6 = mkNum "d.u'" "chud.u'" "d.ug/" "re"; -lin n7 = mkNum "d~ün" "chubd~ün" "d~ün" "d/ön"; -lin n8 = mkNum "g~yä'" "chobg~yä'" "g~yä'" "g/ya"; -lin n9 = mkNum "g~u" "chug~u" "g~ub" "g/o"; - -oper dang : Str = "d/ang" ; -oper tampa : Str -> Str = \s -> (variants {s; s ++ "t'ampa"}); - -lin num x = {s = "/X" ++ x.s ++ "X/" }; -- extra diacritics translation - -lin pot01 = - {s = table {hundred => "g~ya" ; agg => (variants {[] ; "t'a'"}) ; _ => "chi'"}} ; -lin pot0 d = d ; -lin pot110 = {s = tampa "chu" ; s2 = variants {"t.'i" ; "t.'it.'a'"}} ; -lin pot111 = - {s = "chug/chi'" ; - s2 = variants {"t.'i" ; "t.'it.'a'"} ++ dang ++ variants {"t~ong'i" ; "t~ongt.'a'"}} ; -lin pot1to19 d = {s = d.s ! teen ; s2 = variants {"t.'i" ; "t.'it.'a'"} ++ mkagg (d.s ! agg) "t~ong"} ; -lin pot0as1 n = {s = n.s ! unit ; s2 = mkagg (n.s ! agg) "t~ong"} ; -lin pot1 d = {s = tampa (d.s ! bform) ; s2 = mkagg (d.s ! agg) "t.'i"} ; -lin pot1plus d e = - {s = variants { d.s ! bform ++ (bind (d.s ! ten) (e.s ! unit)) ; - (bind (d.s ! ten) (e.s ! unit))} ; - s2 = mkagg (d.s ! agg) "t.'i" ++ dang ++ mkagg (e.s ! agg) "t~ong"} ; -lin pot1as2 n = {s = n.s ; s2 = n.s2 } ; -lin pot2 d = {s = d.s ! hundred ; s2 = mkagg (d.s ! agg) "b~um" } ; -lin pot2plus d e = {s = d.s ! hundred ++ dang ++ e.s ; - s2 = mkagg (d.s ! agg) "b~um" ++ dang ++ e.s2} ; -lin pot2as3 n = {s = n.s } ; -lin pot3 n = {s = n.s2 } ; -lin pot3plus n m = {s = n.s2 ++ dang ++ m.s} ; - -oper mkagg : Str -> Str -> Str = \attr -> \s -> bind s attr ; - - - - diff --git a/grammars/numerals/old/totonac.gf b/grammars/numerals/old/totonac.gf deleted file mode 100644 index 1b843b1db..000000000 --- a/grammars/numerals/old/totonac.gf +++ /dev/null @@ -1,108 +0,0 @@ -include numerals.Abs.gf ; - -oper mk20Ten : Str -> Str -> Str -> Size -> LinDigit = - \tri -> \fiche -> \ext -> \sz -> - { s = table {unit => tri ; maaunit => "maa" ++ tri ; twenty => fiche ; extra => ext } ; even20 = ten ; size = sz} ; - -oper mkEven20 : Str -> Str -> Str -> Size -> LinDigit = - \se -> \trifichid -> \ext -> \sz -> - { s = table {unit => se ; maaunit => "maa" ++ se ; twenty => trifichid ; extra => ext } ; even20 = even ; size = sz} ; - -param Even20 = ten | even ; -param DForm = unit | maaunit | extra | twenty ; -param Size = one | two | three | four | five | pl ; - -lincat Numeral = {s : Str} ; -oper LinDigit = {s : DForm => Str ; even20 : Even20 ; size : Size} ; - -lincat Digit = LinDigit ; -lincat Sub10 = LinDigit ; -lincat Sub100 = {s : Str ; tenpsize : Size ; s2 : Str} ; -lincat Sub1000 = {s : Str } ; -lincat Sub1000000 = {s : Str} ; -lin num x0 = - {s = x0.s} ; -lin n2 = mkEven20 "t~u3" "pus^um" [] two; -lin n3 = mk20Ten "itun" ("pus^um" ++ "maa" ++ "kaawi") [] two; -lin n4 = mkEven20 "t~a~at" (variants {"pus^um" ++ "pus^um" ; "tiy~u~u" ++ "pus^um"}) [] three; -lin n5 = mk20Ten (variants {"kitis" ; "kic/is"}) - (variants {("paha" ++ "sye Str = table {sz => "maa" ++ "kaawi" ++ mk5twenty ! sz }; - -oper mk5twenty : Size => Str = table { - one => variants {("maa" ++ "kic/is") ; "kic/is"} ++ "pus^um"; - two => "c^aas^an" ++ "pus^um"; - three => "tuhun" ++ "pus^um"; - four => "c/iyan" ++ "pus^um"; - _ => "nahaac/a" ++ "pus^um" -} ; - -oper mktwenty : Str -> Str -> Str -> Str -> Str -> Size => Str = - \a1 -> \a2 -> \a3 -> \a4 -> \a5 -> table { - one => a1 ++ "pus^um" ; - two => a2 ++ "pus^um" ; - three => a3 ++ "pus^um" ; - four => a4 ++ "pus^um" ; - _ => a5 ++ "pus^um" -} ; - -oper get20 : Str -> Size -> Size -> Str = \df -> \sz1 -> \sz2 -> - table {one => mk5twenty ; - two => mktwenty ("maa" ++ "kaawi") - ("maa" ++ "kaawi" ++ "tun") - ("maa" ++ "kaawi" ++ "t~u3") - ("maa" ++ "kaawi" ++ "itun") - ("maa" ++ "kaawi" ++ "t~a~at") ; - three => addkaawi ; - _ => table {_ => df } } ! sz1 ! sz2 ; - -lin pot01 = - {s = table {unit => "tun" ; maaunit => "tun" ; tfive => "kic/is" ++ "pus^um" } ; even20 = ten ; size = one}; -lin pot0 d = - {s = d.s ; even20 = d.even20 ; size = one} ; -lin pot110 = - {s = "kaawi" ; tenpsize = one ; s2 = "tun"} ; -lin pot111 = - {s = "kaawi" ++ "tun" ; tenpsize = one ; s2 = "tun" } ; -lin pot1to19 d = - {s = "kaawi" ++ d.s ! unit ; tenpsize = one ; s2 = d.s ! unit } ; -lin pot0as1 n = - {s = n.s ! maaunit ; tenpsize = one ; s2 = n.s ! maaunit} ; -lin pot1 d = - {s = d.s ! twenty ; - tenpsize = d.size ; - s2 = [] } ; - -lin pot1plus d e = - {s = table {even => d.s ! twenty ++ d.s ! extra ++ e.s ! maaunit; - ten => d.s ! twenty ++ e.s ! unit} ! (d.even20) ; - tenpsize = d.size ; - s2 = table {even => e.s ! maaunit ; ten => e.s ! unit} ! d.even20} ; - -lin pot1as2 n = {s = n.s} ; - -lin pot2 d = - {s = variants {get20 (d.s ! maaunit ++ "sye Str } ; - -lincat Digit = LinDigit ; -lincat Sub10 = LinDigit ; -lincat Sub100 = LinDigit ; -lincat Sub1000 = LinDigit ; - -oper bind : Str -> Str -> Str = \a -> \b -> a ++ b ; - -oper mkNum : Str -> LinDigit = \a -> {s = table {_ => a}} ; -oper mkNum2 : Str -> Str -> LinDigit = \a -> \b -> {s = table {u => a ; v => b}} ; - -lin num x = x ; --- lin n1 mkNum "sa'asa" ; -lin n2 = mkNum "dua" ; -lin n3 = mkNum "tolu" ; -lin n4 = mkNum2 "gana" "hato"; -lin n5 = mkNum "lima" ; -lin n6 = mkNum2 "no'o" "nomo" ; -lin n7 = mkNum2 "pitu" "hitu" ; -lin n8 = mkNum "alu" ; -lin n9 = mkNum "sia" ; - -lin pot01 = mkNum2 "sa'asa" "sa" ; -lin pot0 d = d ; -lin pot110 = {s = table {_ => "ompulu" }}; -lin pot111 = {s = table {u => "ompulu" ++ "sa'asa" ; v => "ompulu" ++ "sa"}} ; -lin pot1to19 d = {s = table {f => "ompulu" ++ d.s ! f}} ; -lin pot0as1 n = n ; -lin pot1 d = {s = table {_ => bind (d.s ! v) "hulu" }} ; -lin pot1plus d e = {s = table {f => (bind (d.s ! v) "hulu") ++ e.s ! f}} ; -lin pot1as2 n = n ; -lin pot2 d = {s = table {_ => bind (d.s ! v) "hatu" }} ; -lin pot2plus d e = {s = table {f => (bind (d.s ! v) "hatu") ++ e.s ! f}} ; -lin pot2as3 n = {s = n.s ! u}; -lin pot3 n = {s = bind (n.s ! v) "riwu" } ; -lin pot3plus n m = {s = (bind (n.s ! v) "riwu") ++ m.s ! u } ; diff --git a/grammars/numerals/old/turkish.gf b/grammars/numerals/old/turkish.gf deleted file mode 100644 index 49da296d0..000000000 --- a/grammars/numerals/old/turkish.gf +++ /dev/null @@ -1,56 +0,0 @@ -include numerals.Abs.gf ; - -param DForm = unit | ten | teen ; -param Size = sg | pl ; - --- ç is c with a cedille (obviously) --- s, is s with a cedille --- I is i without a dot --- g% is yumus,ak ge (i.e a g with a breve) - --- The hundreds and trheir qualif can be written together e.g ikiyüz --- aswelll as ten + unit e.g yirmibir - -lincat Digit = {s : DForm => Str } ; -lincat Sub10 = {s : DForm => Str ; size : Size} ; -lincat Sub100 = {s : Str ; size : Size } ; -lincat Sub1000 = {s : Str ; size : Size } ; - -oper mkNum : Str -> Str -> Lin Digit = - \iki -> \yirmi -> - {s = table {unit => iki ; teen => (variants {"on" + iki ; "on" ++ iki}) ; ten => yirmi } } ; - -lin num x = {s = "/L" ++ x.s ++ "L/" } ; - --- lin n1 mkNum "bir" "dA" ; -lin n2 = mkNum "iki" "yirmi" ; -lin n3 = mkNum "üç" "otuz" ; -lin n4 = mkNum "dört" "kIrk" ; -lin n5 = mkNum "bes," "elli" ; -lin n6 = mkNum "altI" "altmIs," ; -lin n7 = mkNum "yedi" "yetmis," ; -lin n8 = mkNum "sekiz" "seksen" ; -lin n9 = mkNum "dokuz" "doksan" ; - -oper ss : Str -> {s : Str ; size : Size} = \s -> {s = s ; size = pl} ; - -lin pot01 = {s = table {f => "bir"} ; size = sg} ; -lin pot0 d = {s = table {f => d.s ! f} ; size = pl} ; -lin pot110 = ss "on" ; -lin pot111 = ss (variants { "on" ++ "bir" ; "onbir"}); -lin pot1to19 d = {s = d.s ! teen ; size = pl} ; -lin pot0as1 n = {s = n.s ! unit ; size = n.size} ; -lin pot1 d = {s = d.s ! ten ; size = pl} ; -lin pot1plus d e = {s = d.s ! ten ++ e.s ! unit; size = pl} ; -lin pot1as2 n = n ; -lin pot2 d = {s = table {sg => [] ; _ => d.s ! unit} ! d.size ++ "yüz" ; size = pl} ; -lin pot2plus d e = {s = table {sg => [] ; _ => d.s ! unit} ! d.size ++ "yüz" ++ e.s ; size = pl} ; - -lin pot2as3 n = n ; -lin pot3 n = {s = table {sg => [] ; _ => n.s } ! n.size ++ "bin"} ; -lin pot3plus n m = {s = table {sg => [] ; _ => n.s } ! n.size ++ "bin" ++ m.s} ; - - - - - diff --git a/grammars/numerals/old/welsh.gf b/grammars/numerals/old/welsh.gf deleted file mode 100644 index 54a2ca640..000000000 --- a/grammars/numerals/old/welsh.gf +++ /dev/null @@ -1,71 +0,0 @@ -include numerals.Abs.gf ; - --- The neo-base-10 system dauddeg, trideg, pedwardeg, pumdeg/hanner cant, chwedeg, saithdeg, wythdeg, nawdeg is --- implemented as the second variant as it should be - -oper LinDigit = {s : DForm => Str ; even20 : Even20 ; size : Size} ; -oper LinSub100 = {s : Str ; size : Size} ; - -oper mk20Ten : Str -> Str -> Str -> Str -> Size -> LinDigit = - \tri -> \trideg -> \fiche -> \triarddeg -> \sz -> - { s = table {unit => tri ; twenty => fiche ; teen => triarddeg ; ten => trideg} ; even20 = odd ; size = sz} ; - -oper mkEven20 : Str -> Str -> Str -> Str -> Size -> LinDigit = - \tri -> \trideg -> \fiche -> \triarddeg -> \sz -> - { s = table {unit => tri ; twenty => fiche ; teen => triarddeg ; ten => trideg} ; even20 = even ; size = sz} ; - -param Even20 = odd | even ; -param DForm = unit | ten | twenty | teen ; -param Size = sg | mutation | am | pl | five | overten; - -lincat Numeral = {s : Str} ; -lincat Digit = LinDigit ; -lincat Sub10 = LinDigit ; -lincat Sub100 = LinSub100 ; -lincat Sub1000 = LinSub100 ; -lincat Sub1000000 = {s : Str} ; -lin num x0 = - {s = x0.s} ; -lin n2 = mkEven20 "dau" "dauddeg" "hugain" "deuddeg" mutation ; -lin n3 = mk20Ten "tri" "trideg" "hugain" ("tri" ++ "ar" ++ "deg") am ; -lin n4 = mkEven20 "pedwar" "pedwardeg" "deugain" ("pedwar" ++ "ar" ++ "ddeg") pl ; -lin n5 = mk20Ten ("pum" + p) "pumdeg" "deugain" "pymtheg" five ; -lin n6 = mkEven20 ("chwe" + ch) "chwedeg" "trigain" ("un" ++ "ar" ++ "bymtheg") am ; -lin n7 = mk20Ten "saith" "saithdeg" "trigain" ("dau" ++ "ar" ++ "bymtheg") pl ; -lin n8 = mkEven20 "wyth" "wythdeg" ("pedwar" ++ "ugain") "deunaw" pl ; -lin n9 = mk20Ten "naw" "nawdeg" ("pedwar" ++ "ugain") ("pedwar" ++ "ar" ++ "bymtheg") pl ; -oper AR : Str = pre {"ar" ; "a" / strs {"d"} } ; -oper AG : Str = pre {"a" ; "ag" / strs {"a" ; "u" ; "i" ; "e" ; "o" ; "w"} } ; -- before vowel -oper ng : Str = pre {"g" ; "ng" / strs {"m"} } ; -oper t : Str = pre {[] ; "t" / strs {[]}} ; -oper ch : Str = pre {[] ; "ch" / strs{[]}} ; -oper p : Str = pre {[] ; "p" / strs{[]}} ; - -oper mkR : Str -> LinSub100 = \s1 -> {s = s1 ; size = overten } ; -oper mkR2 : Str -> Size -> LinSub100 = \s1 -> \sz -> {s = s1 ; size = table {mutation => mutation ; am => am ; _ => overten} ! sz } ; - -lin pot01 = - {s = table {unit => "un" ; _ => "dummy"} ; even20 = odd ; size = sg}; -lin pot0 d = d ; -lin pot110 = {s = "de" + ng ; size = pl} ; -lin pot111 = mkR (variants {"un" ++ "ar" ++ "ddeg" ; "undeg" ++ "un"}) ; -lin pot1to19 d = mkR (variants {d.s ! teen ; "undeg" ++ d.s ! unit}) ; -lin pot0as1 n = {s = n.s ! unit ; size = n.size} ; -lin pot1 d = table {mutation => mkR (variants {"ugain" ; "dauddeg" }) ; - five => mkR (variants {"hanner" ++ "cant" ; "deg" ++ "a" + "deugain" ; "pumdeg"}) ; - _ => mkR (variants { table {even => d.s ! twenty ; odd => "deg" ++ AR ++ d.s ! twenty} ! d.even20 ; d.s ! ten}) } ! d.size ; -lin pot1plus d e = mkR2 (variants { table {even => e.s ! unit ++ AR ++ d.s ! twenty ; odd => e.s ! teen ++ AR ++ d.s ! twenty} ! d.even20 ; d.s ! ten}) e.size ; -- hugain -lin pot1as2 n = n ; -lin pot2 d = mkR ((CANT (d.s ! unit)) ! d.size) ; -lin pot2plus d e = mkR2 (((CANT (d.s ! unit)) ! d.size) ++ (maybeAG ! e.size) ++ e.s) e.size; -lin pot2as3 n = - {s = n.s } ; -lin pot3 n = - {s = (MIL n.s) ! n.size } ; -lin pot3plus n m = - {s = (MIL n.s) ! n.size ++ m.s } ; - -oper maybeAG : Size => Str = (table {overten => [] ; _ => AG} ); -oper CANT : Str -> Size => Str = \s1 -> table {sg => "can" + t ; mutation => s1 ++ "gan" + t; am => s1 ++ "chan" + t ; _ => s1 ++ "can" + t} ; -oper MIL : Str -> Size => Str = \s1 -> table {sg => "mil" ; mutation => s1 ++ "fil" ; _ => s1 ++ "mil" } ; - diff --git a/grammars/numerals/old/yasin_burushaski.gf b/grammars/numerals/old/yasin_burushaski.gf deleted file mode 100644 index 53ec8967f..000000000 --- a/grammars/numerals/old/yasin_burushaski.gf +++ /dev/null @@ -1,62 +0,0 @@ -include numerals.Abs.gf ; - -oper LinDigit = {s : DForm => Str ; even20 : Even20 ; size : Size} ; - -oper mk20Ten : Str -> Str -> LinDigit = \tri -> \tw -> - {s = table {unit => tri ; teen => "turma-" + tri ; twenty => tw+"-áltar"} ; - even20 = ten ; size = pl} ; - -oper mkEven20 : Str -> Str -> LinDigit = \tri -> \tw -> - {s = table {unit => tri ; teen => "turma-" + tri ; twenty => tw+"-áltar"} ; - even20 = even ; size = pl} ; - -param Even20 = ten | even ; -param DForm = unit | teen | twenty ; -param Size = sg | pl ; - -lincat Numeral = {s : Str} ; -lincat Digit = LinDigit ; -lincat Sub10 = LinDigit ; -lincat Sub100 = {s : Str ; size : Size} ; -lincat Sub1000 = {s : Str ; size : Size } ; -lincat Sub1000000 = {s : Str} ; -lin num x0 = - {s = x0.s} ; -lin n2 = {s = table {unit => "altó" ; teen => "turma-" + "altó" ; twenty => "áltar" } ; even20 = even ; size = pl} ; -lin n3 = {s = table {unit => "iskí" ; teen => "turma-" + "iskí" ; twenty => "áltar" } ; even20 = ten ; size = pl} ; -lin n4 = mkEven20 "wálte" "altó"; -lin n5 = mk20Ten "cendí" "altó"; -lin n6 = mkEven20 "bis'índe" "iskí" ; -lin n7 = mk20Ten "thalé" "iskí"; -lin n8 = mkEven20 "altámbe" "wálte"; -lin n9 = mk20Ten "hutí" "wálte"; - -lin pot01 = - {s = table {unit => "hek" ; teen => "turma-" + "hék" ; twenty => []} ; even20 = ten ; size = sg}; -lin pot0 d = d ; -lin pot110 = {s = "tórum" ; size = pl} ; -lin pot111 = {s = "turma-" + "hék" ; size = pl} ; -lin pot1to19 d = {s = d.s ! teen ; size = pl} ; -lin pot0as1 n = {s = n.s ! unit ; size = n.size} ; -lin pot1 d = - {s = table {even => d.s ! twenty ; - ten => d.s ! twenty ++ "tórum"} ! d.even20 ; - size = pl} ; -lin pot1plus d e = - {s = table {even => d.s ! twenty ++ e.s ! unit; - ten => d.s ! twenty ++ e.s ! teen} ! (d.even20) ; - size = pl} ; - -lin pot1as2 n = n ; -lin pot2 d = {s = (selsg d.size (d.s ! unit)) ++ "tha" ; size = pl} ; -lin pot2plus d e = - {s = (selsg d.size (d.s ! unit)) ++ "tha" ++ e.s ; size = pl} ; -lin pot2as3 n = - {s = n.s } ; -lin pot3 n = - {s = selsg n.size n.s ++ "hazár"} ; -lin pot3plus n m = - {s = selsg n.size n.s ++ "hazár" ++ m.s } ; - -oper selsg : Size -> Str -> Str = \sz -> \attr -> - table {sg => [] ; _ => attr} ! sz ; \ No newline at end of file diff --git a/grammars/prelude/Coordination.gf b/grammars/prelude/Coordination.gf deleted file mode 100644 index 6ed4af791..000000000 --- a/grammars/prelude/Coordination.gf +++ /dev/null @@ -1,105 +0,0 @@ -resource Coordination = { - -param - ListSize = TwoElem | ManyElem ; - -oper - SS = {s : Str} ; ---- - - ListX = {s1,s2 : Str} ; - - twoStr : (x,y : Str) -> ListX = \x,y -> - {s1 = x ; s2 = y} ; - consStr : Str -> ListX -> Str -> ListX = \comma,xs,x -> - {s1 = xs.s1 ++ comma ++ xs.s2 ; s2 = x } ; - - twoSS : (_,_ : SS) -> ListX = \x,y -> - twoStr x.s y.s ; - consSS : Str -> ListX -> SS -> ListX = \comma,xs,x -> - consStr comma xs x.s ; - - Conjunction : Type = SS ; - ConjunctionDistr : Type = {s1 : Str ; s2 : Str} ; - - conjunctX : Conjunction -> ListX -> Str = \or,xs -> - xs.s1 ++ or.s ++ xs.s2 ; - - conjunctDistrX : ConjunctionDistr -> ListX -> Str = \or,xs -> - or.s1 ++ xs.s1 ++ or.s2 ++ xs.s2 ; - - -- all this lifted to tables - - ListTable : Type -> Type = \P -> {s1,s2 : P => Str} ; - - twoTable : (P : Type) -> (_,_ : {s : P => Str}) -> ListTable P = \_,x,y -> - {s1 = x.s ; s2 = y.s} ; - - consTable : (P : Type) -> Str -> ListTable P -> {s : P => Str} -> ListTable P = - \P,c,xs,x -> - {s1 = table P {o => xs.s1 ! o ++ c ++ xs.s2 ! o} ; s2 = x.s} ; - - conjunctTable : (P : Type) -> Conjunction -> ListTable P -> {s : P => Str} = - \P,or,xs -> - {s = table P {p => xs.s1 ! p ++ or.s ++ xs.s2 ! p}} ; - - conjunctDistrTable : - (P : Type) -> ConjunctionDistr -> ListTable P -> {s : P => Str} = \P,or,xs -> - {s = table P {p => or.s1++ xs.s1 ! p ++ or.s2 ++ xs.s2 ! p}} ; - - -- ... and to two- and three-argument tables: how clumsy! --- - - ListTable2 : Type -> Type -> Type = \P,Q -> - {s1,s2 : P => Q => Str} ; - - twoTable2 : (P,Q : Type) -> (_,_ : {s : P => Q => Str}) -> ListTable2 P Q = - \_,_,x,y -> - {s1 = x.s ; s2 = y.s} ; - - consTable2 : - (P,Q : Type) -> Str -> ListTable2 P Q -> {s : P => Q => Str} -> ListTable2 P Q = - \P,Q,c,xs,x -> - {s1 = table P {p => table Q {q => xs.s1 ! p ! q ++ c ++ xs.s2 ! p! q}} ; - s2 = x.s - } ; - - conjunctTable2 : - (P,Q : Type) -> Conjunction -> ListTable2 P Q -> {s : P => Q => Str} = - \P,Q,or,xs -> - {s = table P {p => table Q {q => xs.s1 ! p ! q ++ or.s ++ xs.s2 ! p ! q}}} ; - - conjunctDistrTable2 : - (P,Q : Type) -> ConjunctionDistr -> ListTable2 P Q -> {s : P => Q => Str} = - \P,Q,or,xs -> - {s = - table P {p => table Q {q => or.s1++ xs.s1 ! p ! q ++ or.s2 ++ xs.s2 ! p ! q}}} ; - - ListTable3 : Type -> Type -> Type -> Type = \P,Q,R -> - {s1,s2 : P => Q => R => Str} ; - - twoTable3 : (P,Q,R : Type) -> (_,_ : {s : P => Q => R => Str}) -> - ListTable3 P Q R = - \_,_,_,x,y -> - {s1 = x.s ; s2 = y.s} ; - - consTable3 : - (P,Q,R : Type) -> Str -> ListTable3 P Q R -> {s : P => Q => R => Str} -> - ListTable3 P Q R = - \P,Q,R,c,xs,x -> - {s1 = \\p,q,r => xs.s1 ! p ! q ! r ++ c ++ xs.s2 ! p ! q ! r ; - s2 = x.s - } ; - - conjunctTable3 : - (P,Q,R : Type) -> Conjunction -> ListTable3 P Q R -> {s : P => Q => R => Str} = - \P,Q,R,or,xs -> - {s = \\p,q,r => xs.s1 ! p ! q ! r ++ or.s ++ xs.s2 ! p ! q ! r} ; - - conjunctDistrTable3 : - (P,Q,R : Type) -> ConjunctionDistr -> ListTable3 P Q R -> - {s : P => Q => R => Str} = - \P,Q,R,or,xs -> - {s = \\p,q,r => or.s1++ xs.s1 ! p ! q ! r ++ or.s2 ++ xs.s2 ! p ! q ! r} ; - - comma = "," ; - -} ; diff --git a/grammars/prelude/HTML.gf b/grammars/prelude/HTML.gf deleted file mode 100644 index b469b582c..000000000 --- a/grammars/prelude/HTML.gf +++ /dev/null @@ -1,8 +0,0 @@ -resource HTML = open Prelude in { - oper - tag : Str -> Str = \t -> "<" + t + ">" ; - endtag : Str -> Str = \t -> tag ("/" + t) ; - intag : Str -> Str -> Str = \t,s -> tag t ++ s ++ endtag t ; - intagAttr : Str -> Str -> Str -> Str = - \t,a,s -> ("<" + t) ++ (a + ">") ++ s ++ endtag t ; -} diff --git a/grammars/prelude/Latex.gf b/grammars/prelude/Latex.gf deleted file mode 100644 index 2fd2f9ec8..000000000 --- a/grammars/prelude/Latex.gf +++ /dev/null @@ -1,12 +0,0 @@ -resource Latex = open Prelude in { - oper - command : Str -> Str = \c -> "\\" + c ; - fun1 : Str -> Str -> Str = \f,x -> "\\" + f + "{" ++ x ++ "}" ; - fun2 : Str -> Str -> Str -> Str = - \f,x,y -> "\\" + f + "{" ++ x ++ "}{" ++ y ++ "}" ; - begin : Str -> Str = \e -> "\\begin{" + e + "}" ; - end : Str -> Str = \e -> "\\end{" + e + "}" ; - inEnv : Str -> Str -> Str = \e,s -> begin e ++ s ++ end e ; -} - - diff --git a/grammars/prelude/Precedence.gf b/grammars/prelude/Precedence.gf deleted file mode 100644 index 1e0b1a77c..000000000 --- a/grammars/prelude/Precedence.gf +++ /dev/null @@ -1,117 +0,0 @@ --- operations for precedence-dependent strings. --- five levels: --- p4 (constants), p3 (applications), p2 (products), p1 (sums), p0 (arrows) - -resource Precedence = open Prelude in { - -param -Prec = p4 | p3 | p2 | p1 | p0 ; - -lintype -PrecTerm = Prec => Str ; - -oper -pss : PrecTerm -> {s : PrecTerm} = \s -> {s = s} ; - - --- change this if you want some other type of parentheses -mkParenth : Str -> Str = \str -> "(" ++ str ++ ")" ; - --- define ordering of precedences -nextPrec : Prec => Prec = - table {p0 => p1 ; p1 => p2 ; p2 => p3 ; _ => p4} ; -prevPrec : Prec => Prec = - table {p4 => p3 ; p3 => p2 ; p2 => p1 ; _ => p0} ; - -mkPrec : Str -> Prec => Prec => Str = \str -> - table { - p4 => table { -- use the term of precedence p4... - _ => str} ; -- ...always without parentheses - p3 => table { -- use the term of precedence p3... - p4 => mkParenth str ; -- ...in parentheses if p4 is required... - _ => str} ; -- ...otherwise without parentheses - p2 => table { - p4 => mkParenth str ; - p3 => mkParenth str ; - _ => str} ; - p1 => table { - p1 => str ; - p0 => str ; - _ => mkParenth str} ; - p0 => table { - p0 => str ; - _ => mkParenth str} - } ; - --- make a string into a constant, of precedence p4 -mkConst : Str -> PrecTerm = - \f -> - mkPrec f ! p4 ; - --- make a string into a 1/2/3 -place prefix operator, of precedence p3 -mkFun1 : Str -> PrecTerm -> PrecTerm = - \f -> \x -> - table {k => mkPrec (f ++ x ! p4) ! p3 ! k} ; -mkFun2 : Str -> PrecTerm -> PrecTerm -> PrecTerm = - \f -> \x -> \y -> - table {k => mkPrec (f ++ x ! p4 ++ y ! p4) ! p3 ! k} ; -mkFun3 : Str -> PrecTerm -> PrecTerm -> PrecTerm -> PrecTerm = - \f -> \x -> \y -> \z -> - table {k => mkPrec (f ++ x ! p4 ++ y ! p4 ++ z ! p4) ! p3 ! k} ; - --- make a string into a non/left/right -associative infix operator, of precedence p -mkInfix : Str -> Prec -> PrecTerm -> PrecTerm -> PrecTerm = - \f -> \p -> \x -> \y -> - table {k => mkPrec (x ! (nextPrec ! p) ++ f ++ y ! (nextPrec ! p)) ! p ! k} ; -mkInfixL : Str -> Prec -> PrecTerm -> PrecTerm -> PrecTerm = - \f -> \p -> \x -> \y -> - table {k => mkPrec (x ! p ++ f ++ y ! (nextPrec ! p)) ! p ! k} ; -mkInfixR : Str -> Prec -> PrecTerm -> PrecTerm -> PrecTerm = - \f -> \p -> \x -> \y -> - table {k => mkPrec (x ! (nextPrec ! p) ++ f ++ y ! p) ! p ! k} ; - ------------------------------------------------------------ - --- alternative: --- precedence as inherent feature - -lintype TermWithPrec = {s : Str ; p : Prec} ; - -oper -mkpPrec : Str -> Prec -> TermWithPrec = - \f -> \p -> - {s = f ; p = p} ; - -usePrec : TermWithPrec -> Prec -> Str = - \x -> \p -> - mkPrec x.s ! x.p ! p ; - --- make a string into a constant, of precedence p4 -mkpConst : Str -> TermWithPrec = - \f -> - mkpPrec f p4 ; - --- make a string into a 1/2/3 -place prefix operator, of precedence p3 -mkpFun1 : Str -> TermWithPrec -> TermWithPrec = - \f -> \x -> - mkpPrec (f ++ usePrec x p4) p3 ; - -mkpFun2 : Str -> TermWithPrec -> TermWithPrec -> TermWithPrec = - \f -> \x -> \y -> - mkpPrec (f ++ usePrec x p4 ++ usePrec y p4) p3 ; - -mkpFun3 : Str -> TermWithPrec -> TermWithPrec -> TermWithPrec -> TermWithPrec = - \f -> \x -> \y -> \z -> - mkpPrec (f ++ usePrec x p4 ++ usePrec y p4 ++ usePrec z p4) p3 ; - --- make a string a into non/left/right -associative infix operator, of precedence p -mkpInfix : Str -> Prec -> TermWithPrec -> TermWithPrec -> TermWithPrec = - \f -> \p -> \x -> \y -> - mkpPrec (usePrec x (nextPrec ! p) ++ f ++ usePrec y (nextPrec ! p)) p ; -mkpInfixL : Str -> Prec -> TermWithPrec -> TermWithPrec -> TermWithPrec = - \f -> \p -> \x -> \y -> - mkpPrec (usePrec x p ++ f ++ usePrec y (nextPrec ! p)) p ; -mkpInfixR : Str -> Prec -> TermWithPrec -> TermWithPrec -> TermWithPrec = - \f -> \p -> \x -> \y -> - mkpPrec (usePrec x (nextPrec ! p) ++ f ++ usePrec y p) p ; -} ; \ No newline at end of file diff --git a/grammars/prelude/Predef.gf b/grammars/prelude/Predef.gf deleted file mode 100644 index 866ce5b6a..000000000 --- a/grammars/prelude/Predef.gf +++ /dev/null @@ -1,27 +0,0 @@ --- predefined functions for concrete syntax, defined in AppPredefined.hs - -resource Predef = { - - -- this type is for internal use only - param PBool = PTrue | PFalse ; - - -- these operations have their proper definitions in AppPredefined.hs - - oper Int : Type = variants {} ; -- the type of integers - oper Ints : Int -> Type = variants {} ; -- the type of integers from 0 to n - - oper length : Tok -> Int = variants {} ; -- length of string - oper drop : Int -> Tok -> Tok = variants {} ; -- drop prefix of length - oper take : Int -> Tok -> Tok = variants {} ; -- take prefix of length - oper tk : Int -> Tok -> Tok = variants {} ; -- drop suffix of length - oper dp : Int -> Tok -> Tok = variants {} ; -- take suffix of length - oper eqInt : Int -> Int -> PBool = variants {} ; -- test if equal integers - oper lessInt: Int -> Int -> PBool = variants {} ; -- test order of integers - oper plus : Int -> Int -> Int = variants {} ; -- add integers - oper eqStr : Tok -> Tok -> PBool = variants {} ; -- test if equal strings - oper occur : Tok -> Tok -> PBool = variants {} ; -- test if occurs as substring - oper show : (P : Type) -> P -> Tok = variants {} ; -- convert param to string - oper read : (P : Type) -> Tok -> P = variants {} ; -- convert string to param - - } ; - diff --git a/grammars/prelude/PredefAbs.gf b/grammars/prelude/PredefAbs.gf deleted file mode 100644 index 2779bcd58..000000000 --- a/grammars/prelude/PredefAbs.gf +++ /dev/null @@ -1,4 +0,0 @@ -abstract PredefAbs = { - cat Int ; String ; -} ; - diff --git a/grammars/prelude/Prelude.gf b/grammars/prelude/Prelude.gf deleted file mode 100644 index c84fa6188..000000000 --- a/grammars/prelude/Prelude.gf +++ /dev/null @@ -1,100 +0,0 @@ --- language-independent prelude facilities - -resource Prelude = open (Predef=Predef) in { - -oper --- to construct records and tables - SS : Type = {s : Str} ; - ss : Str -> SS = \s -> {s = s} ; - ss2 : (_,_ : Str) -> SS = \x,y -> ss (x ++ y) ; - ss3 : (_,_ ,_: Str) -> SS = \x,y,z -> ss (x ++ y ++ z) ; - - cc2 : (_,_ : SS) -> SS = \x,y -> ss (x.s ++ y.s) ; - - SS1 : Type -> Type = \P -> {s : P => Str} ; - ss1 : (A : Type) -> Str -> SS1 A = \A,s -> {s = table {_ => s}} ; - - SP1 : Type -> Type = \P -> {s : Str ; p : P} ; - sp1 : (A : Type) -> Str -> A -> SP1 A = \_,s,a -> {s = s ; p = a} ; - - nonExist : Str = variants {} ; - - optStr : Str -> Str = \s -> variants {s ; []} ; - - constTable : (A,B : Type) -> B -> A => B = \_,_,b -> \\_ => b ; - constStr : (A : Type) -> Str -> A => Str = \A -> constTable A Str ; - - infixSS : Str -> SS -> SS -> SS = \f,x,y -> ss (x.s ++ f ++ y.s) ; - prefixSS : Str -> SS -> SS = \f,x -> ss (f ++ x.s) ; - postfixSS : Str -> SS -> SS = \f,x -> ss (x.s ++ f) ; - embedSS : Str -> Str -> SS -> SS = \f,g,x -> ss (f ++ x.s ++ g) ; - - id : (A : Type) -> A -> A ; - --- discontinuous - SD2 = {s1,s2 : Str} ; - sd2 : (_,_ : Str) -> SD2 = \x,y -> {s1 = x ; s2 = y} ; - --- parentheses - paren : Str -> Str = \s -> "(" ++ s ++ ")" ; - parenss : SS -> SS = \s -> ss (paren s.s) ; - --- free order between two strings - bothWays : Str -> Str -> Str = \x,y -> variants {x ++ y ; y ++ x} ; - --- parametric order between two strings - preOrPost : Bool -> Str -> Str -> Str = \pr,x,y -> - if_then_Str pr (x ++ y) (y ++ x) ; - --- Booleans - - param Bool = True | False ; - -oper - if_then_else : (A : Type) -> Bool -> A -> A -> A = \_,c,d,e -> - case c of { - True => d ; ---- should not need to qualify - False => e - } ; - - andB : (_,_ : Bool) -> Bool = \a,b -> if_then_else Bool a b False ; - orB : (_,_ : Bool) -> Bool = \a,b -> if_then_else Bool a True b ; - notB : Bool -> Bool = \a -> if_then_else Bool a False True ; - - if_then_Str : Bool -> Str -> Str -> Str = if_then_else Str ; - --- zero, one, two, or more (elements in a list etc) - -param - ENumber = E0 | E1 | E2 | Emore ; - -oper - eNext : ENumber -> ENumber = \e -> case e of { - E0 => E1 ; E1 => E2 ; _ => Emore} ; - - -- these were defined in Predef before - isNil : Tok -> Bool = \b -> pbool2bool (Predef.eqStr [] b) ; - - ifTok : (A : Type) -> Tok -> Tok -> A -> A -> A = \A,t,u,a,b -> - case Predef.eqStr t u of {Predef.PTrue => a ; Predef.PFalse => b} ; - - -- so we need an interface - pbool2bool : Predef.PBool -> Bool = \b -> case b of { - Predef.PFalse => False ; Predef.PTrue => True - } ; - - init : Tok -> Tok = Predef.tk 1 ; - last : Tok -> Tok = Predef.dp 1 ; - - --- bind together two tokens in the lexer, either obligatorily or optionally - - oper - glue : Str -> Str -> Str = \x,y -> x ++ BIND ++ y ; - glueOpt : Str -> Str -> Str = \x,y -> variants {glue x y ; x ++ y} ; - noglueOpt : Str -> Str -> Str = \x,y -> variants {x ++ y ; glue x y} ; - --- these should be hidden, and never changed since it's hardcoded in (un)lexers - BIND : Str = "&+" ; - PARA : Str = "&-" ; -} ; diff --git a/grammars/prelude/README b/grammars/prelude/README deleted file mode 100644 index c499de763..000000000 --- a/grammars/prelude/README +++ /dev/null @@ -1,20 +0,0 @@ -Generic (i.e. language-independent) resources. - - Coordination -- building lists; used in resource/*/ - HTML -- printing with HTML formatting - Latex -- printing with Latex formatting - Precedence -- precedence levels and the use of parentheses - Predef -- type signatures of predefined opers - PredefAbs -- type signatures of predefined cats - Prelude -- useful string operations - -Predef and PredefAbs no longer have to be imported explicitly -in GF 2.0. - -Copyright (c) 2004 Aarne Ranta -under GNU General Public License (GPL). - -Document last updated August 3, 2004. - - - diff --git a/grammars/resource/abstract/Database.gf b/grammars/resource/abstract/Database.gf deleted file mode 100644 index d261e3e11..000000000 --- a/grammars/resource/abstract/Database.gf +++ /dev/null @@ -1,36 +0,0 @@ -abstract Database = { - -flags startcat=Query ; - -cat - Query ; Phras ; Statement ; Question ; - Noun ; Subject ; Value ; Property ; Relation ; Comparison ; Name ; - Feature ; - -fun - LongForm : Phras -> Query ; - ShortForm : Phras -> Query ; - - WhichAre : Noun -> Property -> Phras ; - IsThere : Noun -> Phras ; - AreThere : Noun -> Phras ; - IsIt : Subject -> Property -> Phras ; - WhatIs : Value -> Phras ; - - MoreThan : Comparison -> Subject -> Property ; - TheMost : Comparison -> Noun -> Value ; - Relatively : Comparison -> Noun -> Property ; - - RelatedTo : Relation -> Subject -> Property ; - - Individual : Name -> Subject ; - AllN : Noun -> Subject ; - Any : Noun -> Subject ; - MostN : Noun -> Subject ; - EveryN : Noun -> Subject ; - - FeatureOf : Feature -> Subject -> Subject ; - ValueOf : Feature -> Name -> Value ; - - WithProperty : Noun -> Property -> Noun ; -} ; diff --git a/grammars/resource/abstract/PredefAbs.gf b/grammars/resource/abstract/PredefAbs.gf deleted file mode 100644 index ccd214fd4..000000000 --- a/grammars/resource/abstract/PredefAbs.gf +++ /dev/null @@ -1,4 +0,0 @@ -abstract PredefAbs = { - cat String ; Int ; -} ; - diff --git a/grammars/resource/abstract/ResAbs.gf b/grammars/resource/abstract/ResAbs.gf deleted file mode 100644 index 7828e51ac..000000000 --- a/grammars/resource/abstract/ResAbs.gf +++ /dev/null @@ -1,275 +0,0 @@ ---1 Abstract Syntax for Multilingual Resource Grammar --- --- Aarne Ranta 2002 -- 2003 --- --- Although concrete syntax differs a lot between different languages, --- many structures can be found that are common, on a certain level --- of abstraction. What we will present in the following is an abstract --- syntax that has been successfully defined for English, Finnish, French, German, --- Italian, Russian, and Swedish. It has been applied to define language --- fragments on technical or near-to-technical domains: database queries, --- video recorder dialogue systems, software specifications, and a --- health-related phrase book. Each new application helped to identify some --- missing structures in the resource and suggested some additions, but the --- number of them was usually small. --- --- To use the resource in applications, you need the following --- $cat$ and $fun$ rules in $oper$ form, completed by taking the --- $lincat$ and $lin$ judgements of a particular language. This is done --- by using the $reuse$ module with the desired concrete syntax of --- $ResAbs$ as argument. - - ---2 Categories --- --- The categories of this resource grammar are mostly 'standard' categories --- of linguistics. Their is no claim that they correspond to semantic categories --- definable in type theory: to define such correspondences is the business --- of applications grammars. --- --- Categories that may look special are $Adj2$, $Fun$, and $TV$. They are all --- instances of endowing another category with a complement, which can be either --- a direct object (whose case may vary) or a prepositional phrase. This, together --- with the category $Adv$, removes the need of a category of --- 'prepositional phrases', which is too language-dependent to make sense --- on this level of abstraction. --- - -abstract ResAbs = { - ---3 Nouns and noun phrases --- - -cat - N ; -- simple common noun, e.g. "car" - CN ; -- common noun phrase, e.g. "red car", "car that John owns" - NP ; -- noun phrase, e.g. "John", "all cars", "you" - PN ; -- proper name, e.g. "John", "New York" - Det ; -- determiner, e.g. "every", "all" - Fun ; -- function word, e.g. "mother (of)" - Fun2 ; -- two-place function, e.g. "flight (from) (to)" - ---3 Adjectives and adjectival phrases --- - - Adj1 ; -- one-place adjective, e.g. "even" - Adj2 ; -- two-place adjective, e.g. "divisible (by)" - AdjDeg ; -- degree adjective, e.g. "big/bigger/biggest" - AP ; -- adjective phrase, e.g. "divisible by two", "bigger than John" - ---3 Verbs and verb phrases --- - - V ; -- one-place verb, e.g. "walk" - TV ; -- two-place verb, e.g. "love", "wait (for)", "switch on" - V3 ; -- three-place verb, e.g. "give", "prefer (stg) (to stg)" - VS ; -- sentence-compl. verb, e.g. "say", "prove" - VP ; -- verb phrase, e.g. "switch the light on" - ---3 Adverbials --- - - AdV ; -- adverbial e.g. "now", "in the house" - AdA ; -- ad-adjective e.g. "very" - AdS ; -- sentence adverbial e.g. "therefore", "otherwise" - ---3 Sentences and relative clauses --- - - S ; -- sentence, e.g. "John walks" - Slash ; -- sentence without NP, e.g. "John waits for (...)" - RP ; -- relative pronoun, e.g. "which", "the mother of whom" - RC ; -- relative clause, e.g. "who walks", "that I wait for" - ---3 Questions and imperatives --- - - IP ; -- interrogative pronoun, e.g. "who", "whose mother", "which yellow car" - IAdv ; -- interrogative adverb., e.g. "when", "why" - Qu ; -- question, e.g. "who walks" - Imp ; -- imperative, e.g. "walk!" - ---3 Coordination and subordination --- - - Conj ; -- conjunction, e.g. "and" - ConjD ; -- distributed conj. e.g. "both - and" - Subj ; -- subjunction, e.g. "if", "when" - - ListS ; -- list of sentences - ListAP ; -- list of adjectival phrases - ListNP ; -- list of noun phrases - ---3 Complete utterances --- - - Phr ; -- full phrase, e.g. "John walks.","Who walks?", "Wait for me!" - Text ; -- sequence of phrases e.g. "One is odd. Therefore, two is even." - - ---2 Rules --- --- This set of rules is minimal, in the sense of defining the simplest combinations --- of categories and not having redundant rules. --- When the resource grammar is used as a library, it will often be useful to --- access it through an intermediate library that defines more rules as --- 'macros' for combinations of the ones below. - ---3 Nouns and noun phrases --- - -fun - UseN : N -> CN ; -- "car" - ModAdj : AP -> CN -> CN ; -- "red car" - DetNP : Det -> CN -> NP ; -- "every car" - IndefOneNP, IndefManyNP : CN -> NP ; -- "a car", "cars" - DefOneNP, DefManyNP : CN -> NP ; -- "the car", "the cars" - ModGenOne, ModGenMany : NP -> CN -> NP ; -- "John's car", "John's cars" - UsePN : PN -> NP ; -- "John" - UseFun : Fun -> CN ; -- "successor" - AppFun : Fun -> NP -> CN ; -- "successor of zero" - AppFun2 : Fun2 -> NP -> Fun ; -- "flight from Paris" - CNthatS : CN -> S -> CN ; -- "idea that the Earth is flat" - ---3 Adjectives and adjectival phrases --- - - AdjP1 : Adj1 -> AP ; -- "red" - ComplAdj : Adj2 -> NP -> AP ; -- "divisible by two" - PositAdjP : AdjDeg -> AP ; -- "old" - ComparAdjP : AdjDeg -> NP -> AP ; -- "older than John" - SuperlNP : AdjDeg -> CN -> NP ; -- "the oldest man" - ---3 Verbs and verb phrases --- - - PosV, NegV : V -> VP ; -- "walk", "doesn't walk" - PosA, NegA : AP -> VP ; -- "is old", "isn't old" - PosCN, NegCN : CN -> VP ; -- "is a man", "isn't a man" - PosTV, NegTV : TV -> NP -> VP ; -- "sees John", "doesn't see John" - PosPassV, NegPassV : V -> VP ; -- "is seen", "is not seen" - PosNP, NegNP : NP -> VP ; -- "is John", "is not John" - PosVS, NegVS : VS -> S -> VP ; -- "says that I run", "doesn't say..." - PosV3, NegV3 : V3 -> NP -> NP -> VP ; -- "prefers wine to beer" - VTrans : TV -> V ; -- "loves" - ---3 Adverbials --- - - AdvVP : VP -> AdV -> VP ; -- "always walks", "walks in the park" - LocNP : NP -> AdV ; -- "in London" - AdvCN : CN -> AdV -> CN ; -- "house in London", "house today" - - AdvAP : AdA -> AP -> AP ; -- "very good" - - ---3 Sentences and relative clauses --- - - PredVP : NP -> VP -> S ; -- "John walks" - PosSlashTV, NegSlashTV : NP -> TV -> Slash ; -- "John sees", "John doesn's see" - OneVP : VP -> S ; -- "one walks" - - IdRP : RP ; -- "which" - FunRP : Fun -> RP -> RP ; -- "the successor of which" - RelVP : RP -> VP -> RC ; -- "who walks" - RelSlash : RP -> Slash -> RC ; -- "that I wait for"/"for which I wait" - ModRC : CN -> RC -> CN ; -- "man who walks" - RelSuch : S -> RC ; -- "such that it is even" - ---3 Questions and imperatives --- - - WhoOne, WhoMany : IP ; -- "who (is)", "who (are)" - WhatOne, WhatMany : IP ; -- "what (is)", "what (are)" - FunIP : Fun -> IP -> IP ; -- "the mother of whom" - NounIPOne, NounIPMany : CN -> IP ; -- "which car", "which cars" - - QuestVP : NP -> VP -> Qu ; -- "does John walk" - IntVP : IP -> VP -> Qu ; -- "who walks" - IntSlash : IP -> Slash -> Qu ; -- "whom does John see" - QuestAdv : IAdv -> NP -> VP -> Qu ; -- "why do you walk" - - ImperVP : VP -> Imp ; -- "be a man" - - IndicPhrase : S -> Phr ; -- "I walk." - QuestPhrase : Qu -> Phr ; -- "Do I walk?" - ImperOne, ImperMany : Imp -> Phr ; -- "Be a man!", "Be men!" - - AdvS : AdS -> S -> Phr ; -- "Therefore, 2 is prime." - ---3 Coordination --- --- We consider "n"-ary coordination, with "n" > 1. To this end, we have introduced --- a *list category* $ListX$ for each category $X$ whose expressions we want to --- conjoin. Each list category has two constructors, the base case being $TwoX$. - --- We have not defined coordination of all possible categories here, --- since it can be tricky in many languages. For instance, $VP$ coordination --- is linguistically problematic in German because $VP$ is a discontinuous --- category. - - ConjS : Conj -> ListS -> S ; -- "John walks and Mary runs" - ConjAP : Conj -> ListAP -> AP ; -- "even and prime" - ConjNP : Conj -> ListNP -> NP ; -- "John or Mary" - - ConjDS : ConjD -> ListS -> S ; -- "either John walks or Mary runs" - ConjDAP : ConjD -> ListAP -> AP ; -- "both even and prime" - ConjDNP : ConjD -> ListNP -> NP ; -- "either John or Mary" - - TwoS : S -> S -> ListS ; - ConsS : ListS -> S -> ListS ; - - TwoAP : AP -> AP -> ListAP ; - ConsAP : ListAP -> AP -> ListAP ; - - TwoNP : NP -> NP -> ListNP ; - ConsNP : ListNP -> NP -> ListNP ; - ---3 Subordination --- --- Subjunctions are different from conjunctions, but form --- a uniform category among themselves. - - SubjS : Subj -> S -> S -> S ; -- "if 2 is odd, 3 is even" - SubjImper : Subj -> S -> Imp -> Imp ; -- "if it is hot, use a glove!" - SubjQu : Subj -> S -> Qu -> Qu ; -- "if you are new, who are you?" - SubjVP : VP -> Subj -> S -> VP ; -- "(a man who) sings when he runs" - ---2 One-word utterances --- --- These are, more generally, *one-phrase utterances*. The list below --- is very incomplete. - - PhrNP : NP -> Phr ; -- "Some man.", "John." - PhrOneCN, PhrManyCN : CN -> Phr ; -- "A car.", "Cars." - PhrIP : IAdv -> Phr ; -- "Who?" - PhrIAdv : IAdv -> Phr ; -- "Why?" - ---2 Text formation --- --- A text is a sequence of phrases. It is defined like a non-empty list. - - OnePhr : Phr -> Text ; - ConsPhr : Phr -> Text -> Text ; - ---2 Examples of structural words --- --- Here we have some words belonging to closed classes and appearing --- in all languages we have considered. --- Sometimes they are not really meaningful, e.g. $TheyNP$ in French --- should really be replaced by masculine and feminine variants. - - EveryDet, AllDet, WhichDet, MostDet : Det ; -- every, all, which, most - INP, ThouNP, HeNP, SheNP, ItNP : NP ; -- personal pronouns in singular - WeNP, YeNP, TheyNP : NP ; -- personal pronouns in plural - YouNP : NP ; -- the polite you - WhenIAdv,WhereIAdv,WhyIAdv,HowIAdv : IAdv ; -- when, where, why, how - AndConj, OrConj : Conj ; -- and, or - BothAnd, EitherOr, NeitherNor : ConjD ; -- both-and, either-or, neither-nor - IfSubj, WhenSubj : Subj ; -- if, when - PhrYes, PhrNo : Phr ; -- yes, no - VeryAdv, TooAdv : AdA ; -- very, too - OtherwiseAdv, ThereforeAdv : AdS ; -- therefore, otherwise -} ; - diff --git a/grammars/resource/abstract/Restaurant.gf b/grammars/resource/abstract/Restaurant.gf deleted file mode 100644 index 5c4ae4681..000000000 --- a/grammars/resource/abstract/Restaurant.gf +++ /dev/null @@ -1,15 +0,0 @@ -abstract Restaurant = Database ** { - -fun - Restaurant, Bar : Noun ; - French, Italian, Indian, Japanese : Property ; - address, phone, priceLevel : Feature ; - Cheap, Expensive : Comparison ; - - WhoRecommend : Name -> Phras ; - WhoHellRecommend : Name -> Phras ; - - --- examples of restaurant names - LucasCarton : Name ; -} ; diff --git a/grammars/resource/abstract/TestAbs.gf b/grammars/resource/abstract/TestAbs.gf deleted file mode 100644 index 9605fd561..000000000 --- a/grammars/resource/abstract/TestAbs.gf +++ /dev/null @@ -1,18 +0,0 @@ -abstract TestAbs = ResAbs ** { - --- a random sample of lexicon to test resource grammar with - -fun - Big, Small, Old, Young : AdjDeg ; - American, Finnish : Adj1 ; - Married : Adj2 ; - Man, Woman, Car, House, Light : N ; - Walk, Run : V ; - Send, Wait, Love, SwitchOn, SwitchOff : TV ; - Give, Prefer : V3 ; - Say, Prove : VS ; - Mother, Uncle : Fun ; - Connection : Fun2 ; - Well, Always : AdV ; - John, Mary : PN ; -} ; diff --git a/grammars/resource/english/DatabaseEng.gf b/grammars/resource/english/DatabaseEng.gf deleted file mode 100644 index 927434d9a..000000000 --- a/grammars/resource/english/DatabaseEng.gf +++ /dev/null @@ -1,51 +0,0 @@ -concrete DatabaseEng of Database = open Prelude,Syntax,English,Predication,Paradigms,DatabaseEngRes in { - -flags lexer=text ; unlexer=text ; - -lincat - Phras = SS1 Bool ; -- long or short form - Subject = NP ; - Noun = CN ; - Property = AP ; - Comparison = AdjDeg ; - Relation = Adj2 ; - Feature = Fun ; - Value = NP ; - Name = PN ; - -lin - LongForm sent = ss (sent.s ! True ++ "?") ; - ShortForm sent = ss (sent.s ! False ++ "?") ; - - WhichAre A B = mkSent (defaultQuestion (IntVP (NounIPMany A) (PosA B))) - (defaultNounPhrase (IndefManyNP (ModAdj B A))) ; - - IsIt Q A = mkSentSame (defaultQuestion (QuestVP Q (PosA A))) ; - - MoreThan = ComparAdjP ; - TheMost = SuperlNP ; - Relatively C _ = PositAdjP C ; - - RelatedTo = ComplAdj ; - - FeatureOf = appFun1 ; - ValueOf F V = appFun1 F (UsePN V) ; - - WithProperty A B = ModAdj B A ; - - Individual = UsePN ; - - AllN = DetNP AllDet ; - MostN = DetNP MostDet ; - EveryN = DetNP EveryDet ; - --- only these are language-dependent - - Any n = detNounPhrase anyPlDet n ** {lock_NP = <>} ; --- - - IsThere A = mkSentPrel ["is there"] (defaultNounPhrase (IndefOneNP A)) ; - AreThere A = mkSentPrel ["are there"] (defaultNounPhrase (IndefManyNP A)) ; - - WhatIs V = mkSentPrel ["what is"] (defaultNounPhrase V) ; - -} ; diff --git a/grammars/resource/english/DatabaseEngRes.gf b/grammars/resource/english/DatabaseEngRes.gf deleted file mode 100644 index e00501a47..000000000 --- a/grammars/resource/english/DatabaseEngRes.gf +++ /dev/null @@ -1,11 +0,0 @@ -resource DatabaseEngRes = open Prelude in { -oper - mkSent : SS -> SS -> SS1 Bool = \long, short -> - {s = table {b => if_then_else Str b long.s short.s}} ; - - mkSentPrel : Str -> SS -> SS1 Bool = \prel, matter -> - mkSent (ss (prel ++ matter.s)) matter ; - - mkSentSame : SS -> SS1 Bool = \s -> - mkSent s s ; -} ; diff --git a/grammars/resource/english/English.gf b/grammars/resource/english/English.gf deleted file mode 100644 index 6a3d4b9f6..000000000 --- a/grammars/resource/english/English.gf +++ /dev/null @@ -1,3 +0,0 @@ ---# -path=.:../abstract:../../prelude - -resource English = reuse ResEng ; diff --git a/grammars/resource/english/Morpho.gf b/grammars/resource/english/Morpho.gf deleted file mode 100644 index bd6ac1ca1..000000000 --- a/grammars/resource/english/Morpho.gf +++ /dev/null @@ -1,167 +0,0 @@ ---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 Morpho = Types ** open Prelude in { - ---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'") ; - ---3 Proper names --- --- Regular proper names are inflected with "'s" in the genitive. - - nameReg : Str -> ProperName = \john -> - {s = table {Nom => john ; Gen => john + "'s"}} ; - - ---2 Pronouns --- --- Here we define personal and relative pronouns. - - mkPronoun : (_,_,_,_ : Str) -> Number -> Person -> Pronoun = \I,me,my,mine,n,p -> - {s = table {NomP => I ; AccP => me ; GenP => my ; GenSP => mine} ; - n = n ; p = p} ; - - pronI = mkPronoun "I" "me" "my" "mine" Sg P1 ; - pronYouSg = mkPronoun "you" "you" "your" "yours" Sg P2 ; -- verb form still OK - pronHe = mkPronoun "he" "him" "his" "his" Sg P3 ; - pronShe = mkPronoun "she" "her" "her" "hers" Sg P3 ; - pronIt = mkPronoun "it" "it" "its" "it" Sg P3 ; - - pronWe = mkPronoun "we" "us" "our" "ours" Pl P1 ; - pronYouPl = mkPronoun "you" "you" "your" "yours" Pl P2 ; - pronThey = mkPronoun "they" "them" "their" "theirs" Pl P3 ; - --- Relative pronouns in the accusative have the 'no pronoun' variant. --- The simple pronouns do not really depend on number. - - relPron : RelPron = {s = table { - NoHum => \\_ => table { - NomP => variants {"that" ; "which"} ; - AccP => variants {"that" ; "which" ; []} ; - GenP => variants {"whose"} ; - GenSP => variants {"which"} - } ; - Hum => \\_ => 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 --- --- For the comparison of adjectives, three forms are needed in the worst case. - - mkAdjDegr : (_,_,_ : Str) -> AdjDegr = \good,better,best -> - {s = table {Pos => good ; Comp => better ; Sup => best}} ; - - adjDegrReg : Str -> AdjDegr = \long -> - mkAdjDegr long (long + "er") (long + "est") ; - - adjDegrY : Str -> AdjDegr = \lovel -> - mkAdjDegr (lovel + "y") (lovel + "ier") (lovel + "iest") ; - --- Many adjectives are 'inflected' by adding a comparison word. - - adjDegrLong : Str -> AdjDegr = \ridiculous -> - mkAdjDegr ridiculous ("more" ++ ridiculous) ("most" ++ ridiculous) ; - --- simple adjectives are just strings - - simpleAdj : Str -> Adjective = ss ; - ---3 Verbs --- --- Except for "be", the worst case needs four forms. - - mkVerbP3 : (_,_,_,_: Str) -> VerbP3 = \go,goes,went,gone -> - {s = table { - InfImp => go ; - Indic P3 => goes ; - Indic _ => go ; - Past _ => went ; - PPart => gone - } - } ; - - 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") ; - - verbP3Have = mkVerbP3 "have" "has" "had" "had" ; - - verbP3Do = mkVerbP3 "do" "does" "did" "done" ; - - verbBe : VerbP3 = {s = table { - InfImp => "be" ; - Indic P1 => "am" ; - Indic P2 => "are" ; - Indic P3 => "is" ; - Past Sg => "was" ; - Past Pl => "were" ; - PPart => "been" - }} ; - - verbPart : VerbP3 -> Particle -> Verb = \v,p -> - v ** {s1 = p} ; - - verbNoPart : VerbP3 -> Verb = \v -> verbPart v [] ; - --- 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) ; -} ; - diff --git a/grammars/resource/english/Paradigms.gf b/grammars/resource/english/Paradigms.gf deleted file mode 100644 index d13179338..000000000 --- a/grammars/resource/english/Paradigms.gf +++ /dev/null @@ -1,243 +0,0 @@ ---# -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, $resource.Abs.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 as string --- arguments of the paradigms, not stems. --- --- The following modules are presupposed: - -resource Paradigms = open (Predef=Predef), Prelude, Syntax, English in { - ---2 Parameters --- --- To abstract over gender names, we define the following identifiers. - -oper - human : Gender ; - nonhuman : Gender ; - --- To abstract over number names, we define the following. - - singular : Number ; - plural : Number ; - - ---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". - - mkFun : N -> Preposition -> Fun ; - - funHuman : Str -> Fun ; -- the father/mistress/daddy of - funNonhuman : Str -> Fun ; -- the successor/address/copy of - --- Proper names, with their regular genitive. - - pnReg : (John : Str) -> PN ; -- John, John's - --- The most common cases on the top level havee shortcuts. --- The regular "y"/"s" variation is taken into account in $CN$. - - cnNonhuman : Str -> CN ; - cnHuman : Str -> CN ; - npReg : Str -> NP ; - --- In some cases, you may want to make a complex $CN$ into a function. - - mkFunCN : CN -> Preposition -> Fun ; - funOfCN : CN -> Fun ; - ---2 Adjectives - --- Non-comparison one-place adjectives just have one form. - - mkAdj1 : (even : Str) -> Adj1 ; - --- Two-place adjectives need a preposition as second argument. - - mkAdj2 : (divisible, by : Str) -> Adj2 ; - --- Comparison adjectives have three forms. The common irregular --- cases are ones ending with "y" and a consonant that is duplicated. - - mkAdjDeg : (good,better,best : Str) -> AdjDeg ; - - aReg : (long : Str) -> AdjDeg ; -- long, longer, longest - aHappy : (happy : Str) -> AdjDeg ; -- happy, happier, happiest - aFat : (fat : Str) -> AdjDeg ; -- fat, fatter, fattest - aRidiculous : (ridiculous : Str) -> AdjDeg ; -- -/more/most ridiculous - --- On top level, there are adjectival phrases. The most common case is --- just to use a one-place adjective. - - apReg : Str -> AP ; - - ---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$. - - mkTV : V -> Str -> TV ; -- look for, kill - - tvGen : (look, for : Str) -> TV ; -- look for, talk about - tvDir : V -> TV ; -- switch off - tvGenDir : (kill : Str) -> TV ; -- kill - --- Regular two-place verbs with a particle. - - tvPartReg : Str -> Str -> Str -> TV ; -- get, along, with - --- The definitions should not bother the user of the API. So they are --- hidden from the document. ---. - - human = Hum ; - nonhuman = NoHum ; - -- singular defined in types.Eng - -- plural defined in types.Eng - - nominative = 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 Hum ; - nNonhuman = \s -> nGen s NoHum ; - - 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 ; - - mkFun = \n,p -> n ** {lock_Fun = <> ; s2 = p} ; - funNonhuman = \s -> mkFun (nNonhuman s) "of" ; - funHuman = \s -> mkFun (nHuman s) "of" ; - - pnReg n = nameReg n ** {lock_PN = <>} ; - - cnNonhuman = \s -> UseN (nGen s nonhuman) ; - cnHuman = \s -> UseN (nGen s human) ; - npReg = \s -> UsePN (pnReg s) ; - - mkFunCN = \n,p -> n ** {lock_Fun = <> ; s2 = p} ; - funOfCN = \n -> mkFunCN n "of" ; - - addGenN : (Str -> CommonNoun) -> Str -> Gender -> N = \f -> - \s,g -> f s ** {g = g ; lock_N = <>} ; - - mkAdj1 a = simpleAdj a ** {lock_Adj1 = <>} ; - mkAdj2 = \s,p -> simpleAdj s ** {s2 = p} ** {lock_Adj2 = <>} ; - mkAdjDeg a b c = mkAdjDegr a b c ** {lock_AdjDeg = <>} ; - aReg a = adjDegrReg a ** {lock_AdjDeg = <>} ; - aHappy = \happy -> adjDegrY (Predef.tk 1 happy) ** {lock_AdjDeg = <>} ; - aFat = \fat -> let {fatt = fat + Predef.dp 1 fat} in - mkAdjDeg fat (fatt + "er") (fatt + "est") ; - aRidiculous a = adjDegrLong a ** {lock_AdjDeg = <>} ; - apReg = \s -> AdjP1 (mkAdj1 s) ; - - 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 (regVerbP3 get) up ** {lock_V = <>} ; - - mkTV = \v,p -> v ** {lock_TV = <> ; s3 = p} ; - tvPartReg = \get, along, to -> mkTV (vPartReg get along) to ; - - vBe = verbBe ** {s1 = [] ; lock_V = <>} ; - vHave = verbP3Have ** {s1 = [] ; lock_V = <>} ; - - tvGen = \s,p -> mkTV (vGen s) p ; - tvDir = \v -> mkTV v [] ; - tvGenDir = \s -> tvDir (vGen s) ; - -} ; diff --git a/grammars/resource/english/Predication.gf b/grammars/resource/english/Predication.gf deleted file mode 100644 index 4285a8e24..000000000 --- a/grammars/resource/english/Predication.gf +++ /dev/null @@ -1,83 +0,0 @@ - ---1 A Small Predication Library --- --- (c) Aarne Ranta 2003 under Gnu GPL. --- --- This library is built on a language-independent API of --- resource grammars. It has a common part, the type signatures --- (defined here), and language-dependent parts. The user of --- the library should only have to look at the type signatures. - -resource Predication = open English in { - --- We first define a set of predication patterns. - -oper - predV1 : V -> NP -> S ; -- one-place verb: "John walks" - predV2 : TV -> NP -> NP -> S ; -- two-place verb: "John loves Mary" - predVColl : V -> NP -> NP -> S ; -- collective verb: "John and Mary fight" - predA1 : Adj1 -> NP -> S ; -- one-place adjective: "John is old" - predA2 : Adj2 -> NP -> NP -> S ; -- two-place adj: "John is married to Mary" - predAComp : AdjDeg -> NP -> NP -> S ; -- compar adj: "John is older than Mary" - predAColl : Adj1 -> NP -> NP -> S ; -- collective adj: "John and Mary are married" - predN1 : N -> NP -> S ; -- one-place noun: "John is a man" - predN2 : Fun -> NP -> NP -> S ; -- two-place noun: "John is a lover of Mary" - predNColl : N -> NP -> NP -> S ; -- collective noun: "John and Mary are lovers" - --- Individual-valued function applications. - - appFun1 : Fun -> NP -> NP ; -- one-place function: "the successor of x" - appFunColl : Fun -> NP -> NP -> NP ; -- collective function: "the sum of x and y" - --- Families of types, expressed by common nouns depending on arguments. - - appFam1 : Fun -> NP -> CN ; -- one-place family: "divisor of x" - appFamColl : Fun -> NP -> NP -> CN ; -- collective family: "path between x and y" - --- Type constructor, similar to a family except that the argument is a type. - - constrTyp1 : Fun -> CN -> CN ; - --- Logical connectives on two sentences. - - conjS : S -> S -> S ; - disjS : S -> S -> S ; - implS : S -> S -> S ; - --- As an auxiliary, we need two-place conjunction of names ("John and Mary"), --- used in collective predication. - - conjNP : NP -> NP -> NP ; - - ------------------------------ - ----- what follows should be an implementation of the preceding - -oper - predV1 = \F, x -> PredVP x (PosV F) ; - predV2 = \F, x, y -> PredVP x (PosTV F y) ; - predVColl = \F, x, y -> PredVP (conjNP x y) (PosV F) ; - predA1 = \F, x -> PredVP x (PosA (AdjP1 F)) ; - predA2 = \F, x, y -> PredVP x (PosA (ComplAdj F y)) ; - predAComp = \F, x, y -> PredVP x (PosA (ComparAdjP F y)) ; - predAColl = \F, x, y -> PredVP (conjNP x y) (PosA (AdjP1 F)) ; - predN1 = \F, x -> PredVP x (PosCN (UseN F)) ; - predN2 = \F, x, y -> PredVP x (PosCN (AppFun F y)) ; - predNColl = \F, x, y -> PredVP (conjNP x y) (PosCN (UseN F)) ; - - appFun1 = \f, x -> DefOneNP (AppFun f x) ; - appFunColl = \f, x, y -> DefOneNP (AppFun f (conjNP x y)) ; - - appFam1 = \F, x -> AppFun F x ; - appFamColl = \F, x, y -> AppFun F (conjNP x y) ; - - conjS = \A, B -> ConjS AndConj (TwoS A B) ; - disjS = \A, B -> ConjS OrConj (TwoS A B) ; - implS = \A, B -> SubjS IfSubj A B ; - - constrTyp1 = \F, A -> AppFun F (IndefManyNP A) ; - - conjNP = \x, y -> ConjNP AndConj (TwoNP x y) ; - -} ; diff --git a/grammars/resource/english/ResEng.gf b/grammars/resource/english/ResEng.gf deleted file mode 100644 index 6ae9c7fb3..000000000 --- a/grammars/resource/english/ResEng.gf +++ /dev/null @@ -1,223 +0,0 @@ ---# -path=.:../abstract:../../prelude - ---1 The Top-Level English Resource Grammar --- --- 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 ResEng of ResAbs = open Prelude, Syntax in { - -flags - startcat=Phr ; - lexer=text ; - unlexer=text ; - -lincat - N = CommNoun ; - -- = {s : Number => Case => Str} - CN = CommNounPhrase ; - -- = CommNoun ** {g : Gender} - NP = {s : NPForm => Str ; n : Number ; p : Person} ; - PN = {s : Case => Str} ; - Det = {s : Str ; n : Number} ; - Fun = Function ; - -- = CommNounPhrase ** {s2 : Preposition} ; - Fun2 = Function ** {s3 : Preposition} ; - - Adj1 = Adjective ; - -- = {s : Str} - Adj2 = Adjective ** {s2 : Preposition} ; - AdjDeg = {s : Degree => Str} ; - AP = Adjective ** {p : Bool} ; - - V = Verb ; - -- = {s : VForm => Str ; s1 : Particle} - VP = {s : VForm => Str ; s2 : Number => Str ; isAux : Bool} ; - TV = TransVerb ; - -- = Verb ** {s3 : Preposition} ; - V3 = TransVerb ** {s4 : Preposition} ; - VS = Verb ; - - AdV = {s : Str ; p : Bool} ; - - S = {s : Str} ; - Slash = {s : Bool => Str ; s2 : Preposition} ; - RP = {s : Gender => Number => NPForm => Str} ; - RC = {s : Gender => Number => Str} ; - - IP = {s : NPForm => Str ; n : Number} ; - Qu = {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 : Str ; s2 : Str ; p : Bool} ; - ListNP = {s1,s2 : NPForm => Str ; n : Number ; p : Person} ; - ---. - -lin - UseN = noun2CommNounPhrase ; - ModAdj = modCommNounPhrase ; - ModGenOne = npGenDet singular ; - ModGenMany = npGenDet plural ; - UsePN = nameNounPhrase ; - UseFun = funAsCommNounPhrase ; - AppFun = appFunComm ; - AppFun2 = appFun2 ; - AdjP1 = adj2adjPhrase ; - ComplAdj = complAdj ; - PositAdjP = positAdjPhrase ; - ComparAdjP = comparAdjPhrase ; - SuperlNP = superlNounPhrase ; - - DetNP = detNounPhrase ; - IndefOneNP = indefNounPhrase singular ; - IndefManyNP = indefNounPhrase plural ; - DefOneNP = defNounPhrase singular ; - DefManyNP = defNounPhrase plural ; - - CNthatS = nounThatSentence ; - - PredVP = predVerbPhrase ; - PosV = predVerb True ; - NegV = predVerb False ; - PosA = predAdjective True ; - NegA = predAdjective False ; - PosCN = predCommNoun True ; - NegCN = predCommNoun False ; - PosTV = complTransVerb True ; - NegTV = complTransVerb False ; - PosV3 = complDitransVerb True ; - NegV3 = complDitransVerb False ; - PosPassV = passVerb True ; - NegPassV = passVerb False ; - PosNP = predNounPhrase True ; - NegNP = predNounPhrase False ; - PosVS = complSentVerb True ; - NegVS = complSentVerb False ; - VTrans = transAsVerb ; - - AdvVP = adVerbPhrase ; - LocNP = locativeNounPhrase ; - AdvCN = advCommNounPhrase ; - AdvAP = advAdjPhrase ; - - PosSlashTV = slashTransVerb True ; - NegSlashTV = slashTransVerb False ; - OneVP = predVerbPhrase (nameNounPhrase (nameReg "one")) ; - - IdRP = identRelPron ; - FunRP = funRelPron ; - RelVP = relVerbPhrase ; - RelSlash = relSlash ; - ModRC = modRelClause ; - RelSuch = relSuch ; - - WhoOne = intPronWho singular ; - WhoMany = intPronWho plural ; - WhatOne = intPronWhat singular ; - WhatMany = intPronWhat plural ; - FunIP = funIntPron ; - NounIPOne = nounIntPron singular ; - NounIPMany = nounIntPron plural ; - - QuestVP = questVerbPhrase ; - IntVP = intVerbPhrase ; - IntSlash = intSlash ; - QuestAdv = questAdverbial ; - - ImperVP = imperVerbPhrase ; - - IndicPhrase = indicUtt ; - QuestPhrase = interrogUtt ; - ImperOne = imperUtterance singular ; - ImperMany = imperUtterance plural ; - - AdvS = advSentence ; - -lin - TwoS = twoSentence ; - ConsS = consSentence ; - ConjS = conjunctSentence ; - ConjDS = conjunctDistrSentence ; - - TwoAP = twoAdjPhrase ; - ConsAP = consAdjPhrase ; - ConjAP = conjunctAdjPhrase ; - ConjDAP = conjunctDistrAdjPhrase ; - - TwoNP = twoNounPhrase ; - ConsNP = consNounPhrase ; - ConjNP = conjunctNounPhrase ; - ConjDNP = conjunctDistrNounPhrase ; - - SubjS = subjunctSentence ; - SubjImper = subjunctImperative ; - SubjQu = subjunctQuestion ; - SubjVP = subjunctVerbPhrase ; - - PhrNP = useNounPhrase ; - PhrOneCN = useCommonNounPhrase singular ; - PhrManyCN = useCommonNounPhrase plural ; - PhrIP ip = ip ; - PhrIAdv ia = ia ; - - OnePhr p = p ; - ConsPhr = cc2 ; - - INP = pronI ; - ThouNP = pronYouSg ; - HeNP = pronHe ; - SheNP = pronShe ; - ItNP = pronIt ; - WeNP = pronWe ; - YeNP = pronYouPl ; - YouNP = pronYouSg ; - TheyNP = pronThey ; - - EveryDet = everyDet ; - AllDet = allDet ; - WhichDet = whichDet ; - MostDet = mostDet ; - - HowIAdv = ss "how" ; - WhenIAdv = ss "when" ; - WhereIAdv = ss "where" ; - WhyIAdv = ss "why" ; - - AndConj = ss "and" ** {n = Pl} ; - OrConj = ss "or" ** {n = Sg} ; - BothAnd = sd2 "both" "and" ** {n = Pl} ; - EitherOr = sd2 "either" "or" ** {n = Sg} ; - NeitherNor = sd2 "neither" "nor" ** {n = Sg} ; - IfSubj = ss "if" ; - WhenSubj = ss "when" ; - - PhrYes = ss "Yes." ; - PhrNo = ss "No." ; - - VeryAdv = ss "very" ; - TooAdv = ss "too" ; - OtherwiseAdv = ss "otherwise" ; - ThereforeAdv = ss "therefore" ; - -} ; diff --git a/grammars/resource/english/RestaurantEng.gf b/grammars/resource/english/RestaurantEng.gf deleted file mode 100644 index 69905ee32..000000000 --- a/grammars/resource/english/RestaurantEng.gf +++ /dev/null @@ -1,27 +0,0 @@ ---# -path=.:../abstract:../../prelude - -concrete RestaurantEng of Restaurant = - DatabaseEng ** open Prelude,Paradigms,DatabaseEngRes in { - -lin - Restaurant = cnNonhuman "restaurant" ; - Bar = cnNonhuman "bar" ; - French = apReg "French" ; - Italian = apReg "Italian" ; - Indian = apReg "Indian" ; - Japanese = apReg "Japanese" ; - - address = funNonhuman "address" ; - phone = funNonhuman ["number"] ; --- phone - priceLevel = funNonhuman ["level"] ; --- price - - Cheap = aReg "cheap" ; - Expensive = aRidiculous "expensive" ; - - WhoRecommend rest = mkSentSame (ss (["who recommended"] ++ rest.s ! nominative)) ; - WhoHellRecommend rest = - mkSentSame (ss (["who the hell recommended"] ++ rest.s ! nominative)) ; - - LucasCarton = pnReg ["Lucas Carton"] ; - -} ; diff --git a/grammars/resource/english/Syntax.gf b/grammars/resource/english/Syntax.gf deleted file mode 100644 index 07f4c7358..000000000 --- a/grammars/resource/english/Syntax.gf +++ /dev/null @@ -1,924 +0,0 @@ ---1 A Small English Resource Syntax --- --- Aarne Ranta 2002 --- --- This resource grammar contains definitions needed to construct --- indicative, interrogative, and imperative sentences in English. --- --- The following files are presupposed: - -resource Syntax = Morpho ** open Prelude, (CO = Coordination) in { - ---2 Common Nouns --- --- Simple common nouns are defined as the type $CommNoun$ in $morpho.Deu.gf$. - ---3 Common noun phrases - --- To the common nouns of morphology, --- we add natural gender (human/nonhuman) which is needed in syntactic --- combinations (e.g. "man who runs" - "program which runs"). - -oper - CommNoun = CommonNoun ** {g : Gender} ; - - CommNounPhrase = CommNoun ; - - noun2CommNounPhrase : CommNoun -> CommNounPhrase = \man -> - man ; - - cnGen : CommonNoun -> Gender -> CommNoun = \cn,g -> - cn ** {g = g} ; - - cnHum : CommonNoun -> CommNoun = \cn -> - cnGen cn Hum ; - cnNoHum : CommonNoun -> CommNoun = \cn -> - cnGen cn NoHum ; - ---2 Noun phrases --- --- The worst case is pronouns, which have inflection in the possessive forms. --- Proper names are a special case. - - NounPhrase : Type = Pronoun ; - - nameNounPhrase : ProperName -> NounPhrase = \john -> - {s = \\c => john.s ! toCase c ; n = Sg ; p = P3} ; - ---2 Determiners --- --- Determiners are inflected according to the nouns they determine. --- The determiner is not inflected. - Determiner : Type = {s : Str ; n : Number} ; - - detNounPhrase : Determiner -> CommNounPhrase -> NounPhrase = \every, man -> - {s = \\c => every.s ++ man.s ! every.n ! toCase c ; - n = every.n ; - p = P3 - } ; - - mkDeterminer : Number -> Str -> Determiner = \n,det -> - {s = det ; - n = n - } ; - - everyDet = mkDeterminer Sg "every" ; - allDet = mkDeterminer Pl "all" ; - mostDet = mkDeterminer Pl "most" ; - aDet = mkDeterminer Sg artIndef ; - plDet = mkDeterminer Pl [] ; - theSgDet = mkDeterminer Sg "the" ; - thePlDet = mkDeterminer Pl "the" ; - anySgDet = mkDeterminer Sg "any" ; - anyPlDet = mkDeterminer Pl "any" ; - - whichSgDet = mkDeterminer Sg "which" ; - whichPlDet = mkDeterminer Pl "which" ; - - whichDet = whichSgDet ; --- API - - indefNoun : Number -> CommNoun -> Str = \n,man -> - (indefNounPhrase n man).s ! NomP ; - - indefNounPhrase : Number -> CommNounPhrase -> NounPhrase = \n,man -> - {s = \\c => case n of { - Sg => artIndef ++ man.s ! n ! toCase c ; - Pl => man.s ! n ! toCase c - } ; - n = n ; p = P3 - } ; - - defNounPhrase : Number -> CommNounPhrase -> NounPhrase = \n,car -> - {s = \\c => artDef ++ car.s ! n ! toCase c ; n = n ; p = P3} ; - --- Genitives of noun phrases can be used like determiners, to build noun phrases. --- The number argument makes the difference between "my house" - "my houses". --- --- We have the variation "the car of John / the car of John's / John's car" - - npGenDet : Number -> NounPhrase -> CommNounPhrase -> NounPhrase = - \n,john,car -> - {s = \\c => variants { - artDef ++ car.s ! n ! Nom ++ "of" ++ john.s ! GenSP ; - john.s ! GenP ++ car.s ! n ! toCase c - } ; - n = n ; - p = P3 - } ; - --- *Bare plural noun phrases* like "men", "good cars", are built without a --- determiner word. - - plurDet : CommNounPhrase -> NounPhrase = \cn -> - {s = \\c => cn.s ! plural ! toCase c ; - p = P3 ; - n = Pl - } ; - --- Constructions like "the idea that two is even" are formed at the --- first place as common nouns, so that one can also have "a suggestion that...". - - nounThatSentence : CommNounPhrase -> Sentence -> CommNounPhrase = \idea,x -> - {s = \\n,c => idea.s ! n ! c ++ "that" ++ x.s ; - g = idea.g - } ; - - ---2 Adjectives --- --- Adjectival phrases have a parameter $p$ telling if they are prefixed ($True$) or --- postfixed (complex APs). - - AdjPhrase : Type = Adjective ** {p : Bool} ; - - adj2adjPhrase : Adjective -> AdjPhrase = \new -> new ** {p = True} ; - - simpleAdjPhrase : Str -> AdjPhrase = \French -> - adj2adjPhrase (simpleAdj French) ; - - ---3 Comparison adjectives --- --- Each of the comparison forms has a characteristic use: --- --- Positive forms are used alone, as adjectival phrases ("big"). - - positAdjPhrase : AdjDegr -> AdjPhrase = \big -> - adj2adjPhrase (ss (big.s ! Pos)) ; - --- Comparative forms are used with an object of comparison, as --- adjectival phrases ("bigger then you"). - - comparAdjPhrase : AdjDegr -> NounPhrase -> AdjPhrase = \big, you -> - {s = big.s ! Comp ++ "than" ++ you.s ! NomP ; - p = False - } ; - --- Superlative forms are used with a modified noun, picking out the --- maximal representative of a domain ("the biggest house"). - - superlNounPhrase : AdjDegr -> CommNoun -> NounPhrase = \big, house -> - {s = \\c => "the" ++ big.s ! Sup ++ house.s ! Sg ! toCase c ; - n = Sg ; - p = P3 - } ; - - ---3 Two-place adjectives --- --- A two-place adjective is an adjective with a preposition used before --- the complement. - - Preposition = Str ; - - AdjCompl = Adjective ** {s2 : Preposition} ; - - complAdj : AdjCompl -> NounPhrase -> AdjPhrase = \related,john -> - {s = related.s ++ related.s2 ++ john.s ! AccP ; - p = False - } ; - - ---3 Modification of common nouns --- --- The two main functions of adjective are in predication ("John is old") --- and in modification ("an old man"). Predication will be defined --- later, in the chapter on verbs. --- --- Modification must pay attention to pre- and post-noun --- adjectives: "big car"/"car bigger than X" - - modCommNounPhrase : AdjPhrase -> CommNounPhrase -> CommNounPhrase = \big, car -> - {s = \\n => if_then_else (Case => Str) big.p - (\\c => big.s ++ car.s ! n ! c) - (table {Nom => car.s ! n ! Nom ++ big.s ; Gen => variants {}}) ; - g = car.g - } ; - - ---2 Function expressions - --- A function expression is a common noun together with the --- preposition prefixed to its argument ("mother of x"). --- The type is analogous to two-place adjectives and transitive verbs. - - Function = CommNounPhrase ** {s2 : Preposition} ; - --- The application of a function gives, in the first place, a common noun: --- "mother/mothers of John". From this, other rules of the resource grammar --- give noun phrases, such as "the mother of John", "the mothers of John", --- "the mothers of John and Mary", and "the mother of John and Mary" (the --- latter two corresponding to distributive and collective functions, --- respectively). Semantics will eventually tell when each --- of the readings is meaningful. - - appFunComm : Function -> NounPhrase -> CommNounPhrase = \mother,john -> - {s = \\n => table { - Gen => nonExist ; --- ? - _ => mother.s ! n ! Nom ++ mother.s2 ++ john.s ! GenSP - } ; - g = mother.g - } ; - --- It is possible to use a function word as a common noun; the semantics is --- often existential or indexical. - - funAsCommNounPhrase : Function -> CommNounPhrase = - noun2CommNounPhrase ; - --- The following is an aggregate corresponding to the original function application --- producing "John's mother" and "the mother of John". It does not appear in the --- resource grammar API any longer. - - appFun : Bool -> Function -> NounPhrase -> NounPhrase = \coll, mother,john -> - let {n = john.n ; nf = if_then_else Number coll Sg n} in - variants { - defNounPhrase nf (appFunComm mother john) ; - npGenDet nf john mother - } ; - --- The commonest case is functions with the preposition "of". - - funOf : CommNoun -> Function = \mother -> - mother ** {s2 = "of"} ; - - funOfReg : Str -> Gender -> Function = \mother,g -> - funOf (nounReg mother ** {g = g}) ; - --- Two-place functions add one argument place. - - Function2 = Function ** {s3 : Preposition} ; - --- There application starts by filling the first place. - - appFun2 : Function2 -> NounPhrase -> Function = \train, paris -> - {s = \\n,c => train.s ! n ! c ++ train.s2 ++ paris.s ! AccP ; - g = train.g ; - s2 = train.s3 - } ; - - ---2 Verbs --- ---3 Verb phrases --- --- Verb phrases are discontinuous: the two parts of a verb phrase are --- (s) an inflected verb, (s2) infinitive and complement. --- For instance: "doesn't" - "walk" ; "isn't" - "old" ; "is" - "a man" --- There's also a parameter telling if the verb is an auxiliary: --- this is needed in question. - - VerbPhrase = VerbP3 ** {s2 : Number => Str ; isAux : Bool} ; - --- From the inflection table, we selecting the finite form as function --- of person and number: - - indicVerb : VerbP3 -> Person -> Number -> Str = \v,p,n -> case n of { - Sg => v.s ! Indic p ; - Pl => v.s ! Indic P2 - } ; - --- A simple verb can be made into a verb phrase with an empty complement. --- There are two versions, depending on if we want to negate the verb. --- N.B. negation is *not* a function applicable to a verb phrase, since --- double negations with "don't" are not grammatical. - - predVerb : Bool -> Verb -> VerbPhrase = \b,walk -> - if_then_else VerbPhrase b - {s = \\v => walk.s ! v ++ walk.s1 ; - s2 = \\_ => [] ; - isAux = False - } - {s = \\v => contractNot (verbP3Do.s ! v) ; - s2 = \\_ => walk.s ! InfImp ++ walk.s1 ; - isAux = True - } ; - --- Sometimes we want to extract the verb part of a verb phrase. - - verbOfPhrase : VerbPhrase -> VerbP3 = \v -> {s = v.s} ; - --- Verb phrases can also be formed from adjectives ("is old"), --- common nouns ("is a man"), and noun phrases ("ist John"). --- The third rule is overgenerating: "is every man" has to be ruled out --- on semantic grounds. - - predAdjective : Bool -> Adjective -> VerbPhrase = \b,old -> - {s = beOrNotBe b ; - s2 = \\_ => old.s ; - isAux = True - } ; - - predCommNoun : Bool -> CommNoun -> VerbPhrase = \b,man -> - {s = beOrNotBe b ; - s2 = \\n => indefNoun n man ; - isAux = True - } ; - - predNounPhrase : Bool -> NounPhrase -> VerbPhrase = \b,john -> - {s = beOrNotBe b ; - s2 = \\_ => john.s ! NomP ; - isAux = True - } ; - --- We use an auxiliary giving all forms of "be". - - beOrNotBe : Bool -> (VForm => Str) = \b -> - if_then_else (VForm => Str) b - verbBe.s - (table { - InfImp => contractNot "do" ++ "be" ; - Indic P1 => "am" ++ "not" ; - v => contractNot (verbBe.s ! v) - }) ; - ---3 Transitive verbs --- --- Transitive verbs are verbs with a preposition for the complement, --- in analogy with two-place adjectives and functions. --- One might prefer to use the term "2-place verb", since --- "transitive" traditionally means that the inherent preposition is empty. --- Such a verb is one with a *direct object*. - - TransVerb : Type = Verb ** {s3 : Preposition} ; - --- The rule for using transitive verbs is the complementization rule. --- Particles produce free variation: before or after the complement --- ("I switch on the TV" / "I switch the TV on"). - - complTransVerb : Bool -> TransVerb -> NounPhrase -> VerbPhrase = - \b,lookat,john -> - let {lookatjohn = bothWays lookat.s1 (lookat.s3 ++ john.s ! AccP)} in - if_then_else VerbPhrase b - {s = lookat.s ; - s2 = \\_ => lookatjohn ; - isAux = False} - {s = \\v => contractNot (verbP3Do.s ! v) ; - s2 = \\_ => lookat.s ! InfImp ++ lookatjohn ; - isAux = True} ; - - --- Verbs that take direct object and a particle: - mkTransVerbPart : VerbP3 -> Str -> TransVerb = \turn,off -> - {s = turn.s ; s1 = off ; s3 = []} ; - --- Verbs that take prepositional object, no particle: - mkTransVerb : VerbP3 -> Str -> TransVerb = \wait,for -> - {s = wait.s ; s1 = [] ; s3 = for} ; - --- Verbs that take direct object, no particle: - mkTransVerbDir : VerbP3 -> TransVerb = \love -> - mkTransVerbPart love [] ; - --- Transitive verbs with accusative objects can be used passively. --- The function does not check that the verb is transitive. --- Therefore, the function can also be used for "he is swum", etc. --- The syntax is the same as for adjectival predication. - - passVerb : Bool -> Verb -> VerbPhrase = \b,love -> - predAdjective b (adj2adjPhrase (ss (love.s ! PPart))) ; - --- Transitive verbs can be used elliptically as verbs. The semantics --- is left to applications. The definition is trivial, due to record --- subtyping. - - transAsVerb : TransVerb -> Verb = \love -> - love ; - --- *Ditransitive verbs* are verbs with three argument places. --- We treat so far only the rule in which the ditransitive --- verb takes both complements to form a verb phrase. - - DitransVerb = TransVerb ** {s4 : Preposition} ; - - mkDitransVerb : Verb -> Preposition -> Preposition -> DitransVerb = \v,p1,p2 -> - v ** {s3 = p1 ; s4 = p2} ; - - complDitransVerb : - Bool -> DitransVerb -> NounPhrase -> NounPhrase -> VerbPhrase = - \b,give,you,beer -> - let { - youbeer = give.s1 ++ give.s3 ++ you.s ! AccP ++ give.s4 ++ beer.s ! AccP - } in - if_then_else VerbPhrase b - {s = give.s ; - s2 = \\_ => youbeer ; - isAux = False - } - {s = \\v => contractNot (verbP3Do.s ! v) ; - s2 = \\_ => give.s ! InfImp ++ youbeer ; - isAux = True - } ; - - ---2 Adverbials --- --- Adverbials are not inflected (we ignore comparison, and treat --- compared adverbials as separate expressions; this could be done another way). --- We distinguish between post- and pre-verbal adverbs. - - Adverb : Type = SS ** {p : Bool} ; - - advPre : Str -> Adverb = \seldom -> ss seldom ** {p = False} ; - advPost : Str -> Adverb = \well -> ss well ** {p = True} ; - --- N.B. this rule generates the cyclic parsing rule $VP#2 ::= VP#2$ --- and cannot thus be parsed. - - adVerbPhrase : VerbPhrase -> Adverb -> VerbPhrase = \sings, well -> - let {postp = orB well.p sings.isAux} in - { - s = \\v => (if_then_else Str postp [] well.s) ++ sings.s ! v ; - s2 = \\n => sings.s2 ! n ++ (if_then_else Str postp well.s []) ; - isAux = sings.isAux - } ; - - advAdjPhrase : SS -> AdjPhrase -> AdjPhrase = \very, good -> - {s = very.s ++ good.s ; - p = good.p - } ; - --- Adverbials are typically generated by prefixing prepositions. --- The rule for creating locative noun phrases by the preposition "in" --- is a little shaky, since other prepositions may be preferred ("on", "at"). - - prepPhrase : Preposition -> NounPhrase -> Adverb = \on, it -> - advPost (on ++ it.s ! AccP) ; - - locativeNounPhrase : NounPhrase -> Adverb = - prepPhrase "in" ; - --- This is a source of the "mann with a telescope" ambiguity, and may produce --- strange things, like "cars always" (while "cars today" is OK). --- Semantics will have to make finer distinctions among adverbials. --- --- N.B. the genitive case created in this way would not make sense. - - advCommNounPhrase : CommNounPhrase -> Adverb -> CommNounPhrase = \car,today -> - {s = \\n => table { - Nom => car.s ! n ! Nom ++ today.s ; - Gen => nonExist - } ; - g = car.g - } ; - - ---2 Sentences --- --- Sentences are not inflected in this fragment of English without tense. - - Sentence : Type = SS ; - --- This is the traditional $S -> NP VP$ rule. It takes care of --- agreement between subject and verb. Recall that the VP may already --- contain negation. - - predVerbPhrase : NounPhrase -> VerbPhrase -> Sentence = \john,walks -> - ss (john.s ! NomP ++ indicVerb (verbOfPhrase walks) john.p john.n ++ - walks.s2 ! john.n) ; - - --- This is a macro for simultaneous predication and complementization. - - predTransVerb : Bool -> NounPhrase -> TransVerb -> NounPhrase -> Sentence = - \b,you,see,john -> - predVerbPhrase you (complTransVerb b see john) ; - - ---3 Sentence-complement verbs --- --- Sentence-complement verbs take sentences as complements. - - SentenceVerb : Type = Verb ; - --- To generate "says that John walks" / "doesn't say that John walks": - - complSentVerb : Bool -> SentenceVerb -> Sentence -> VerbPhrase = - \b,say,johnruns -> - let {thatjohnruns = optStr "that" ++ johnruns.s} in - if_then_else VerbPhrase b - {s = say.s ; - s2 = \\_ => thatjohnruns ; - isAux = False} - {s = \\v => contractNot (verbP3Do.s ! v) ; - s2 = \\_ => say.s ! InfImp ++ thatjohnruns ; - isAux = True} ; - - ---2 Sentences missing noun phrases --- --- This is one instance of Gazdar's *slash categories*, corresponding to his --- $S/NP$. --- We cannot have - nor would we want to have - a productive slash-category former. --- Perhaps a handful more will be needed. --- --- Notice that the slash category has a similar relation to sentences as --- transitive verbs have to verbs: it's like a *sentence taking a complement*. --- However, we need something more to distinguish its use in direct questions: --- not just "you see" but ("whom") "do you see". --- --- The particle always follows the verb, but the preposition can fly: --- "whom you make it up with" / "with whom you make it up". - - SentenceSlashNounPhrase = {s : Bool => Str ; s2 : Preposition} ; - - slashTransVerb : Bool -> NounPhrase -> TransVerb -> SentenceSlashNounPhrase = - \b,You,lookat -> - let {you = You.s ! NomP ; - looks = indicVerb {s = lookat.s} You.p You.n ; - look = lookat.s ! InfImp ; - do = indicVerb verbP3Do You.p You.n ; - dont = contractNot do ; - up = lookat.s1 - } in - {s = table { - True => if_then_else Str b do dont ++ you ++ look ++ up ; - False => you ++ if_then_else Str b looks (dont ++ look) ++ up - } ; - s2 = lookat.s3 - } ; - - ---2 Relative pronouns and relative clauses --- --- As described in $types.Eng.gf$, relative pronouns are inflected in --- gender (human/nonhuman), number, and case. --- --- We get the simple relative pronoun ("who"/"which"/"whom"/"whose"/"that"/$""$) --- from $morpho.Eng.gf$. - - identRelPron : RelPron = relPron ; - - funRelPron : Function -> RelPron -> RelPron = \mother,which -> - {s = \\g,n,c => "the" ++ mother.s ! n ! Nom ++ - mother.s2 ++ which.s ! g ! n ! GenSP - } ; - --- Relative clauses can be formed from both verb phrases ("who walks") and --- slash expressions ("whom you see", "on which you sit" / "that you sit on"). - - RelClause : Type = {s : Gender => Number => Str} ; - - relVerbPhrase : RelPron -> VerbPhrase -> RelClause = \who,walks -> - {s = \\g, n => who.s ! g ! n ! NomP ++ - indicVerb (verbOfPhrase walks) P3 n ++ walks.s2 ! n - } ; - - relSlash : RelPron -> SentenceSlashNounPhrase -> RelClause = \who,yousee -> - {s = \\g,n => - let {youSee = yousee.s ! False} in - variants { - who.s ! g ! n ! AccP ++ youSee ++ yousee.s2 ; - yousee.s2 ++ who.s ! g ! n ! GenSP ++ youSee - } - } ; - --- A 'degenerate' relative clause is the one often used in mathematics, e.g. --- "number x such that x is even". - - relSuch : Sentence -> RelClause = \A -> - {s = \\_,_ => "such" ++ "that" ++ A.s} ; - --- The main use of relative clauses is to modify common nouns. --- The result is a common noun, out of which noun phrases can be formed --- by determiners. No comma is used before these relative clause. - - modRelClause : CommNounPhrase -> RelClause -> CommNounPhrase = \man,whoruns -> - {s = \\n,c => man.s ! n ! c ++ whoruns.s ! man.g ! n ; - g = man.g - } ; - - ---2 Interrogative pronouns --- --- If relative pronouns are adjective-like, interrogative pronouns are --- noun-phrase-like. - - IntPron : Type = {s : NPForm => Str ; n : Number} ; - --- In analogy with relative pronouns, we have a rule for applying a function --- to a relative pronoun to create a new one. - - funIntPron : Function -> IntPron -> IntPron = \mother,which -> - {s = \\c => "the" ++ mother.s ! which.n ! Nom ++ mother.s2 ++ which.s ! GenSP ; - n = which.n - } ; - --- There is a variety of simple interrogative pronouns: --- "which house", "who", "what". - - nounIntPron : Number -> CommNounPhrase -> IntPron = \n, car -> - {s = \\c => "which" ++ car.s ! n ! toCase c ; - n = n - } ; - - intPronWho : Number -> IntPron = \num -> { - s = table { - NomP => "who" ; - AccP => variants {"who" ; "whom"} ; - GenP => "whose" ; - GenSP => "whom" - } ; - n = num - } ; - - intPronWhat : Number -> IntPron = \num -> { - s = table { - GenP => "what's" ; - _ => "what" - } ; - n = num - } ; - - ---2 Utterances - --- By utterances we mean whole phrases, such as --- 'can be used as moves in a language game': indicatives, questions, imperative, --- and one-word utterances. The rules are far from complete. --- --- N.B. we have not included rules for texts, which we find we cannot say much --- about on this level. In semantically rich GF grammars, texts, dialogues, etc, --- will of course play an important role as categories not reducible to utterances. --- An example is proof texts, whose semantics show a dependence between premises --- and conclusions. Another example is intersentential anaphora. - - Utterance = SS ; - - indicUtt : Sentence -> Utterance = \x -> ss (x.s ++ ".") ; - interrogUtt : Question -> Utterance = \x -> ss (x.s ! DirQ ++ "?") ; - - ---2 Questions --- --- Questions are either direct ("are you happy") or indirect --- ("if/whether you are happy"). - -param - QuestForm = DirQ | IndirQ ; - -oper - Question = SS1 QuestForm ; - ---3 Yes-no questions --- --- Yes-no questions are used both independently --- ("does John walk" / "if John walks") --- and after interrogative adverbials --- ("why does John walk" / "why John walks"). --- --- It is economical to handle with all these cases by the one --- rule, $questVerbPhrase'$. The word ("ob" / "whether") never appears --- if there is an adverbial. - - questVerbPhrase : NounPhrase -> VerbPhrase -> Question = - questVerbPhrase' False ; - - questVerbPhrase' : Bool -> NounPhrase -> VerbPhrase -> Question = - \adv,john,walk -> - {s = table { - DirQ => if_then_else Str walk.isAux - (indicVerb (verbOfPhrase walk) john.p john.n ++ - john.s ! NomP ++ walk.s2 ! john.n) - (indicVerb verbP3Do john.p john.n ++ - john.s ! NomP ++ walk.s ! InfImp ++ walk.s2 ! john.n) ; - IndirQ => if_then_else Str adv [] (variants {"if" ; "whether"}) ++ - (predVerbPhrase john walk).s - } - } ; - - - ---3 Wh-questions --- --- Wh-questions are of two kinds: ones that are like $NP - VP$ sentences, --- others that are line $S/NP - NP$ sentences. - - intVerbPhrase : IntPron -> VerbPhrase -> Question = \who,walk -> - {s = \\_ => who.s ! NomP ++ indicVerb (verbOfPhrase walk) P3 who.n ++ - walk.s2 ! who.n - } ; - - intSlash : IntPron -> SentenceSlashNounPhrase -> Question = \who,yousee -> - {s = \\q => - let {youSee = case q of { - DirQ => yousee.s ! True ; - IndirQ => yousee.s ! False - } - } in - variants { - who.s ! AccP ++ youSee ++ yousee.s2 ; - yousee.s2 ++ who.s ! GenSP ++ youSee - } - } ; - ---3 Interrogative adverbials --- --- These adverbials will be defined in the lexicon: they include --- "when", "where", "how", "why", etc, which are all invariant one-word --- expressions. In addition, they can be formed by adding prepositions --- to interrogative pronouns, in the same way as adverbials are formed --- from noun phrases. - - IntAdverb = SS ; - - prepIntAdverb : Preposition -> IntPron -> IntAdverb = \at, whom -> - ss (at ++ whom.s ! AccP) ; - --- A question adverbial can be applied to anything, and whether this makes --- sense is a semantic question. - - questAdverbial : IntAdverb -> NounPhrase -> VerbPhrase -> Question = - \why, you, walk -> - {s = \\q => why.s ++ (questVerbPhrase' True you walk).s ! q} ; - - ---2 Imperatives --- --- We only consider second-person imperatives. - - Imperative = SS1 Number ; - - imperVerbPhrase : VerbPhrase -> Imperative = \walk -> - {s = \\n => walk.s ! InfImp ++ walk.s2 ! n} ; - - imperUtterance : Number -> Imperative -> Utterance = \n,I -> - ss (I.s ! n ++ "!") ; - ---2 Sentence adverbials --- --- This class covers adverbials such as "otherwise", "therefore", which are prefixed --- to a sentence to form a phrase. - - advSentence : SS -> Sentence -> Utterance = \hence,itiseven -> - ss (hence.s ++ itiseven.s ++ ".") ; - - ---2 Coordination --- --- Coordination is to some extent orthogonal to the rest of syntax, and --- has been treated in a generic way in the module $CO$ in the file --- $coordination.gf$. The overall structure is independent of category, --- but there can be differences in parameter dependencies. --- ---3 Conjunctions --- --- Coordinated phrases are built by using conjunctions, which are either --- simple ("and", "or") or distributed ("both - and", "either - or"). --- --- The conjunction has an inherent number, which is used when conjoining --- noun phrases: "John and Mary are..." vs. "John or Mary is..."; in the --- case of "or", the result is however plural if any of the disjuncts is. - - Conjunction = CO.Conjunction ** {n : Number} ; - ConjunctionDistr = CO.ConjunctionDistr ** {n : Number} ; - ---3 Coordinating sentences --- --- We need a category of lists of sentences. It is a discontinuous --- category, the parts corresponding to 'init' and 'last' segments --- (rather than 'head' and 'tail', because we have to keep track of the slot between --- the last two elements of the list). A list has at least two elements. - - ListSentence : Type = SD2 ; - - twoSentence : (_,_ : Sentence) -> ListSentence = CO.twoSS ; - - consSentence : ListSentence -> Sentence -> ListSentence = - CO.consSS CO.comma ; - --- To coordinate a list of sentences by a simple conjunction, we place --- it between the last two elements; commas are put in the other slots, --- e.g. "du rauchst, er trinkt und ich esse". - - conjunctSentence : Conjunction -> ListSentence -> Sentence = \c,xs -> - ss (CO.conjunctX c xs) ; - --- To coordinate a list of sentences by a distributed conjunction, we place --- the first part (e.g. "either") in front of the first element, the second --- part ("or") between the last two elements, and commas in the other slots. --- For sentences this is really not used. - - conjunctDistrSentence : ConjunctionDistr -> ListSentence -> Sentence = - \c,xs -> - ss (CO.conjunctDistrX c xs) ; - ---3 Coordinating adjective phrases --- --- The structure is the same as for sentences. The result is a prefix adjective --- if and only if all elements are prefix. - - ListAdjPhrase : Type = SD2 ** {p : Bool} ; - - twoAdjPhrase : (_,_ : AdjPhrase) -> ListAdjPhrase = \x,y -> - CO.twoStr x.s y.s ** {p = andB x.p y.p} ; - - consAdjPhrase : ListAdjPhrase -> AdjPhrase -> ListAdjPhrase = \xs,x -> - CO.consStr CO.comma xs x.s ** {p = andB xs.p x.p} ; - - conjunctAdjPhrase : Conjunction -> ListAdjPhrase -> AdjPhrase = \c,xs -> - ss (CO.conjunctX c xs) ** {p = xs.p} ; - - conjunctDistrAdjPhrase : ConjunctionDistr -> ListAdjPhrase -> AdjPhrase = - \c,xs -> - ss (CO.conjunctDistrX c xs) ** {p = xs.p} ; - - ---3 Coordinating noun phrases --- --- The structure is the same as for sentences. The result is either always plural --- or plural if any of the components is, depending on the conjunction. - - ListNounPhrase : Type = {s1,s2 : NPForm => Str ; n : Number ; p : Person} ; - - twoNounPhrase : (_,_ : NounPhrase) -> ListNounPhrase = \x,y -> - CO.twoTable NPForm x y ** {n = conjNumber x.n y.n ; p = conjPerson x.p y.p} ; - - consNounPhrase : ListNounPhrase -> NounPhrase -> ListNounPhrase = \xs,x -> - CO.consTable NPForm CO.comma xs x ** - {n = conjNumber xs.n x.n ; p = conjPerson xs.p x.p} ; - - conjunctNounPhrase : Conjunction -> ListNounPhrase -> NounPhrase = \c,xs -> - CO.conjunctTable NPForm c xs ** {n = conjNumber c.n xs.n ; p = xs.p} ; - - conjunctDistrNounPhrase : ConjunctionDistr -> ListNounPhrase -> NounPhrase = - \c,xs -> - CO.conjunctDistrTable NPForm c xs ** {n = conjNumber c.n xs.n ; p = xs.p} ; - --- We have to define a calculus of numbers of persons. For numbers, --- it is like the conjunction with $Pl$ corresponding to $False$. - - conjNumber : Number -> Number -> Number = \m,n -> case of { - => Sg ; - _ => Pl - } ; - --- For persons, we let the latter argument win ("either you or I am absent" --- but "either I or you are absent"). This is not quite clear. - - conjPerson : Person -> Person -> Person = \_,p -> - p ; - - - ---2 Subjunction --- --- Subjunctions ("when", "if", etc) --- are a different way to combine sentences than conjunctions. --- The main clause can be a sentences, an imperatives, or a question, --- but the subjoined clause must be a sentence. --- --- There are uniformly two variant word orders, e.g. --- "if you smoke I get angry" --- and "I get angry if you smoke". - - Subjunction = SS ; - - subjunctSentence : Subjunction -> Sentence -> Sentence -> Sentence = - \if, A, B -> - ss (subjunctVariants if A.s B.s) ; - - subjunctImperative : Subjunction -> Sentence -> Imperative -> Imperative = - \if, A, B -> - {s = \\n => subjunctVariants if A.s (B.s ! n)} ; - - subjunctQuestion : Subjunction -> Sentence -> Question -> Question = - \if, A, B -> - {s = \\q => subjunctVariants if A.s (B.s ! q)} ; - - subjunctVariants : Subjunction -> Str -> Str -> Str = \if,A,B -> - variants {if.s ++ A ++ "," ++ B ; B ++ "," ++ if.s ++ A} ; - - subjunctVerbPhrase : VerbPhrase -> Subjunction -> Sentence -> VerbPhrase = - \V, if, A -> - adVerbPhrase V (advPost (if.s ++ A.s)) ; - ---2 One-word utterances --- --- An utterance can consist of one phrase of almost any category, --- the limiting case being one-word utterances. These --- utterances are often (but not always) in what can be called the --- default form of a category, e.g. the nominative. --- This list is far from exhaustive. - - useNounPhrase : NounPhrase -> Utterance = \john -> - postfixSS "." (defaultNounPhrase john) ; - - useCommonNounPhrase : Number -> CommNounPhrase -> Utterance = \n,car -> - useNounPhrase (indefNounPhrase n car) ; - - useRegularName : SS -> NounPhrase = \john -> - nameNounPhrase (nameReg john.s) ; - --- Here are some default forms. - - defaultNounPhrase : NounPhrase -> SS = \john -> - ss (john.s ! NomP) ; - - defaultQuestion : Question -> SS = \whoareyou -> - ss (whoareyou.s ! DirQ) ; - - defaultSentence : Sentence -> Utterance = \x -> - x ; - -} ; diff --git a/grammars/resource/english/TestEng.gf b/grammars/resource/english/TestEng.gf deleted file mode 100644 index 5515cc9de..000000000 --- a/grammars/resource/english/TestEng.gf +++ /dev/null @@ -1,46 +0,0 @@ --- use this path to read the grammar from the same directory ---# -path=.:../abstract:../../prelude - -concrete TestEng of TestAbs = ResEng ** open Syntax in { - -flags startcat=Phr ; lexer=text ; parser=chart ; unlexer=text ; - --- a random sample from the lexicon - -lin - Big = mkAdjDegr "big" "bigger" "biggest"; - Small = adjDegrReg "small" ; - Old = adjDegrReg "old" ; - Young = adjDegrReg "young" ; - American = simpleAdj "American" ; - Finnish = simpleAdj "Finnish" ; - Married = simpleAdj "married" ** {s2 = "to"} ; - Man = cnHum (mkNoun "man" "men" "man's" "men's") ; - Woman = cnHum (mkNoun "woman" "women" "woman's" "women's") ; - Car = cnNoHum (nounReg "car") ; - House = cnNoHum (nounReg "house") ; - Light = cnNoHum (nounReg "light") ; - Walk = verbNoPart (regVerbP3 "walk") ; - Run = verbNoPart (mkVerb "run" "ran" "run") ; - Say = verbNoPart (mkVerb "say" "said" "said") ; - Prove = verbNoPart (regVerbP3 "prove") ; - Send = mkTransVerbDir (verbNoPart (mkVerb "send" "sent" "sent")) ; - Love = mkTransVerbDir (verbNoPart (verbP3e "love")) ; - Wait = mkTransVerb (verbNoPart (regVerbP3 "wait")) "for" ; - Give = mkDitransVerb (verbNoPart (mkVerb "give" "gave" "given")) [] [] ; - Prefer = mkDitransVerb - (verbNoPart (mkVerb "prefer" "preferred" "preferred")) [] "to" ; - Mother = funOfReg "mother" Hum ; - Uncle = funOfReg "uncle" Hum ; - Connection = cnNoHum (nounReg "connection") ** {s2 = "from" ; s3 = "to"} ; - - Always = advPre "always" ; - Well = advPost "well" ; - - SwitchOn = mkTransVerbPart (verbP3s "switch") "on" ; - SwitchOff = mkTransVerbPart (verbP3s "switch") "off" ; - - John = nameReg "John" ; - Mary = nameReg "Mary" ; - -} ; diff --git a/grammars/resource/english/Types.gf b/grammars/resource/english/Types.gf deleted file mode 100644 index ad96db43b..000000000 --- a/grammars/resource/english/Types.gf +++ /dev/null @@ -1,101 +0,0 @@ ---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 Types = 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 = NoHum | Hum ; - 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. --- Such adjectives are simply strings. - - Adjective : Type = SS ; - AdjDegr = SS1 Degree ; - ---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 Person | Past Number | PPart ; - -oper - VerbP3 : Type = SS1 VForm ; - --- A full verb can moreover have a particle. - - Particle : Type = Str ; - Verb = VerbP3 ** {s1 : Particle} ; - --- ---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} ; - --- 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 = SS1 Case ; - ---3 Relative pronouns --- --- Relative pronouns are inflected in gender (human/nonhuman), number, and case. - - RelPron : Type = {s : Gender => Number => NPForm => Str} ; -} ; - diff --git a/grammars/resource/finnish/Finnish.gf b/grammars/resource/finnish/Finnish.gf deleted file mode 100644 index b756afe96..000000000 --- a/grammars/resource/finnish/Finnish.gf +++ /dev/null @@ -1,3 +0,0 @@ ---# -path=.:../abstract:../../prelude - -resource Finnish = reuse ResFin ; diff --git a/grammars/resource/finnish/MorphoFin.gf b/grammars/resource/finnish/MorphoFin.gf deleted file mode 100644 index 5d0ebc1ee..000000000 --- a/grammars/resource/finnish/MorphoFin.gf +++ /dev/null @@ -1,688 +0,0 @@ ---1 A Simple Finnish 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 $TypesFin.gf$. - -resource MorphoFin = TypesFin ** open (Predef = Predef), Prelude in { - ---2 Nouns --- - -oper - --- worst-case macro - - mkSubst : Str -> (_,_,_,_,_,_,_,_,_,_ : Str) -> CommonNoun = - \a,vesi,vede,vete,vetta,veteen,vetii,vesii,vesien,vesia,vesiin -> - {s = table { - NCase Sg Nom => vesi ; - NCase Sg Gen => vede + "n" ; - NCase Sg Part => vetta ; - NCase Sg Transl => vede + "ksi" ; - NCase Sg Ess => vete + ("n" + a) ; - NCase Sg Iness => vede + ("ss" + a) ; - NCase Sg Elat => vede + ("st" + a) ; - NCase Sg Illat => veteen ; - NCase Sg Adess => vede + ("ll" + a) ; - NCase Sg Ablat => vede + ("lt" + a) ; - NCase Sg Allat => vede + "lle" ; - - NCase Pl Nom => vede + "t" ; - NCase Pl Gen => vesien ; - NCase Pl Part => vesia ; - NCase Pl Transl => vesii + "ksi" ; - NCase Pl Ess => vetii + ("n" + a) ; - NCase Pl Iness => vesii + ("ss" + a) ; - NCase Pl Elat => vesii + ("st" + a) ; - NCase Pl Illat => vesiin ; - NCase Pl Adess => vesii + ("ll" + a) ; - NCase Pl Ablat => vesii + ("lt" + a) ; - NCase Pl Allat => vesii + "lle" ; - - NPossNom => vete ; - NPossGenPl => Predef.tk 1 vesien ; - NPossTransl Sg => vede + "kse" ; - NPossTransl Pl => vesii + "kse" ; - NPossIllat Sg => Predef.tk 1 veteen ; - NPossIllat Pl => Predef.tk 1 vesiin - } - } ; - --- A user-friendly variant takes existing forms and infers the vowel harmony. - - mkNoun : (_,_,_,_,_,_,_,_,_,_ : Str) -> CommonNoun = - \talo,talon,talona,taloa,taloon,taloina,taloissa,talojen,taloja,taloihin -> - mkSubst (ifTok Str (Predef.dp 1 talona) "a" "a" "ä") - talo (Predef.tk 1 talon) (Predef.tk 2 talona) taloa taloon - (Predef.tk 2 taloina) (Predef.tk 3 taloissa) talojen taloja taloihin ; - --- Here some useful special cases; more will be given in $paradigms.Fin.gf$. --- --- Nouns with partitive "a"/"ä" ; --- to account for grade and vowel alternation, three forms are usually enough --- Examples: "talo", "kukko", "huippu", "koira", "kukka", "syylä",... - - sKukko : (_,_,_ : Str) -> CommonNoun = \kukko,kukon,kukkoja -> - let { - o = Predef.dp 1 kukko ; - a = Predef.dp 1 kukkoja ; - kukkoj = Predef.tk 1 kukkoja ; - i = Predef.dp 1 kukkoj ; - ifi = ifTok Str i "i" ; - kukkoi = ifi kukkoj (Predef.tk 1 kukkoj) ; - e = Predef.dp 1 kukkoi ; - kukoi = Predef.tk 2 kukon + Predef.dp 1 kukkoi - } - in - mkSubst a - kukko - (Predef.tk 1 kukon) - kukko - (kukko + a) - (kukko + o + "n") - (kukkoi + ifi "" "i") - (kukoi + ifi "" "i") - (ifTok Str e "e" (Predef.tk 1 kukkoi + "ien") (kukkoi + ifi "en" "jen")) - kukkoja - (kukkoi + ifi "in" "ihin") ; - --- The special case with no alternations: the vowel harmony is inferred from the --- last letter - which must be one of "o", "u", "ö", "y". - - sTalo : Str -> CommonNoun = \talo -> - let {a = getHarmony (Predef.dp 1 talo)} in - sKukko talo (talo + "n") (talo + ("j" + a)) ; - --- Loan words ending in consonants are actually similar to words like --- "malli"/"mallin"/"malleja", with the exception that the "i" is not attached --- to the singular nominative. - - sLinux : Str -> CommonNoun = \linuxia -> - let { - linux = Predef.tk 2 linuxia ; - a = getHarmony (Predef.dp 1 linuxia) ; - linuxi = linux + "i" - } in - mkSubst a - linux - linuxi - linuxi - (linuxi + a) - (linuxi + "in") - (linux + "ei") - (linux + "ei") - (linux + "ien") - (linux + "eja") - (linux + "eihin") ; - --- Nouns of at least 3 syllables ending with "a" or "ä", like "peruna", "rytinä". - - sPeruna : Str -> CommonNoun = \peruna -> - let { - a = Predef.dp 1 peruna ; - perun = Predef.tk 1 peruna ; - perunoi = perun + (ifTok Str a "a" "o" "ö" + "i") - } - in - mkSubst a - peruna - peruna - peruna - (peruna + a) - (peruna + a + "n") - perunoi - perunoi - (perunoi + "den") - (perunoi + ("t" + a)) - (perunoi + "hin") ; - --- Surpraisingly, making the test for the partitive, this not only covers --- "rae", "perhe", "savuke", but also "rengas", "lyhyt" (except $Sg Illat$), etc. - - sRae : (_,_ : Str) -> CommonNoun = \rae,rakeena -> - let { - a = Predef.dp 1 rakeena ; - rakee = Predef.tk 2 rakeena ; - rakei = Predef.tk 1 rakee + "i" ; - raet = rae + (ifTok Str (Predef.dp 1 rae) "e" "t" []) - } - in - mkSubst a - rae - rakee - rakee - (raet + ("t" + a)) - (rakee + "seen") - rakei - rakei - (rakei + "den") - (rakei + ("t" + a)) - (rakei + "siin") ; - - sSusi : (_,_,_ : Str) -> CommonNoun = \susi,suden,sutena -> - let { - a = Predef.dp 1 sutena ; - sude = Predef.tk 1 suden ; - sute = Predef.tk 2 sutena - } - in - mkSubst a - susi - sude - sute - (Predef.tk 1 sute + ("t" + a)) - (sute + "en") - susi - susi - (susi + "en") - (susi + a) - (susi + "in") ; - - sPuu : Str -> CommonNoun = \puu -> - let { - u = Predef.dp 1 puu ; - a = getHarmony u ; - pu = Predef.tk 1 puu ; - pui = pu + "i" - } - in - mkSubst a - puu - puu - puu - (puu + ("t" + a)) - (puu + ("h" + u + "n")) - pui - pui - (pui + "den") - (pui + ("t" + a)) - (pui + "hin") ; - - sSuo : Str -> CommonNoun = \suo -> - let { - o = Predef.dp 1 suo ; - a = getHarmony o ; - soi = Predef.tk 2 suo + (o + "i") - } - in - mkSubst a - suo - suo - suo - (suo + ("t" + a)) - (suo + ("h" + o + "n")) - soi - soi - (soi + "den") - (soi + ("t" + a)) - (soi + "hin") ; - --- Here in fact it is handy to use the partitive form as the only stem. - - sNainen : Str -> CommonNoun = \naista -> - let { - nainen = Predef.tk 3 naista + "nen" ; - nais = Predef.tk 2 naista ; - naise = nais + "e" ; - naisi = nais + "i" ; - a = Predef.dp 1 naista - } - in - mkSubst a - nainen - naise - naise - (nais + ("t" + a)) - (nais + "een") - naisi - naisi - (nais + "ten") - (nais + ("i" + a)) - (nais + "iin") ; - --- The following covers: "tilaus", "kaulin", "paimen", "laidun", "sammal", --- "kyynel" (excep $Sg Iness$ for the last two?). - - sTilaus : (_,_ : Str) -> CommonNoun = \tilaus, tilauksena -> - let { - tilauks = Predef.tk 3 tilauksena ; - tilaukse = tilauks + "e" ; - tilauksi = tilauks + "i" ; - a = Predef.dp 1 tilauksena - } - in - mkSubst a - tilaus - tilaukse - tilaukse - (tilaus + ("t" + a)) - (tilauks + "een") - tilauksi - tilauksi - (tilaus + "ten") - (tilauks + ("i" + a)) - (tilauks + "iin") ; - --- Some words have the three grades ("rakkaus","rakkauden","rakkautena"), which --- are however derivable from the stem. - - sRakkaus : Str -> CommonNoun = \rakkaus -> - let { - rakkau = Predef.tk 1 rakkaus ; - rakkaut = rakkau + "t" ; - rakkaute = rakkau + "te" ; - rakkaude = rakkau + "de" ; - rakkauksi = rakkau + "ksi" ; - u = Predef.dp 1 rakkau ; - a = ifTok Str u "u" "a" "ä" - } - in - mkSubst a - rakkaus - rakkaude - rakkaute - (rakkaut + ("t" + a)) - (rakkaut + "een") - rakkauksi - rakkauksi - (rakkauksi + "en") - (rakkauksi + a) - (rakkauksi + "in") ; - --- The following covers nouns like "nauris" and adjectives like "kallis", "tyyris". - - sNauris : (_ : Str) -> CommonNoun = \naurista -> - let { - a = Predef.dp 1 naurista ; - nauris = Predef.tk 2 naurista ; - nauri = Predef.tk 3 naurista ; - naurii = nauri + "i" - } - in - mkSubst a - nauris - naurii - naurii - (nauris + ("t" + a)) - (naurii + "seen") - naurii - naurii - (naurii + "den") - (naurii + ("t" + a)) - (naurii + "siin") ; - --- The following two are used for adjective comparison. - - sSuurempi : Str -> CommonNoun = \suurempaa -> - let { - a = Predef.dp 1 suurempaa ; - suure = Predef.tk 4 suurempaa ; - suurempi = suure + "mpi" ; - suurempa = suure + ("mp" + a) ; - suuremm = suure + "mm" - } - in - mkSubst a - suurempi - (suuremm + a) - suurempa - (suurempa + a) - (suurempa + (a + "n")) - suurempi - (suuremm + "i") - (suurempi + "en") - (suurempi + a) - (suurempi + "in") ; - - sSuurin : Str -> CommonNoun = \suurinta -> - let { - a = Predef.dp 1 suurinta ; - suuri = Predef.tk 3 suurinta ; - suurin = suuri + "n" ; - suurimma = suuri + ("mm" + a) ; - suurimpa = suuri + ("mp" + a) ; - suurimpi = suuri + "mpi" ; - suurimmi = suuri + "mmi" - } - in - mkSubst a - suurin - suurimma - suurimpa - (suurin + ("t" + a)) - (suurimpa + (a + "n")) - suurimpi - suurimmi - (suurimpi + "en") - (suurimpi + a) - (suurimpi + "in") ; - --- This auxiliary resolves vowel harmony from a given letter. - -getHarmony : Str -> Str = \u -> - ifTok Str u "a" "a" ( - ifTok Str u "o" "a" ( - ifTok Str u "u" "a" "ä")) ; - - --- We could use an extension of the following for grade alternation, but we don't; --- in general, *whether there is* grade alternation must be given in the lexicon --- anyway (cf. "auto" - "auton", not "audon"). - - weakGrade : Str -> Str = \kukko -> - let { - ku = Predef.tk 3 kukko ; - kk = Predef.tk 1 (Predef.dp 3 kukko) ; - o = Predef.dp 1 kukko ; - ifkk = ifTok Str kk ; - k = - ifkk "kk" "k" ( - ifkk "pp" "p" ( - ifkk "tt" "t" ( - ifkk "nt" "nn" ( - ifkk "mp" "mm" ( - ifkk "rt" "rr" ( - ifkk "lt" "ll" ( - kk))))))) - } - in ku + k + o ; - - ---3 Proper names --- --- Proper names are similar to common nouns in the singular. - - mkProperName : CommonNoun -> ProperName = \jussi -> - {s = \\c => jussi.s ! NCase Sg c} ; - ---2 Pronouns --- --- Here we define personal and relative pronouns. - - mkPronoun : (_,_,_,_,_ : Str) -> Number -> Person -> Pronoun = - \mina, minun, minua, minuna, minuun, n, p -> - let { - minu = Predef.tk 2 minuna ; - a = Predef.dp 1 minuna - } in - {s = table { - PCase Nom => mina ; - PCase Gen => minun ; - PCase Part => minua ; - PCase Transl => minu + "ksi" ; - PCase Ess => minuna ; - PCase Iness => minu + ("ss" + a) ; - PCase Elat => minu + ("st" + a) ; - PCase Illat => minuun ; - PCase Adess => minu + ("ll" + a) ; - PCase Ablat => minu + ("lt" + a) ; - PCase Allat => minu + "lle" ; - PAcc => Predef.tk 1 minun + "t" - } ; - n = n ; p = p} ; - - pronMina = mkPronoun "minä" "minun" "minua" "minuna" "minuun" Sg P1 ; - pronSina = mkPronoun "sinä" "sinun" "sinua" "sinuna" "sinuun" Sg P2 ; - pronHan = mkPronoun "hän" "hänen" "häntä" "hänenä" "häneen" Sg P3 ; - pronMe = mkPronoun "me" "meidän" "meitä" "meinä" "meihin" Pl P1 ; - pronTe = mkPronoun "te" "teidän" "teitä" "teinä" "teihin" Pl P2 ; - pronHe = mkPronoun "he" "heidän" "heitä" "heinä" "heihin" Pl P3 ; - pronNe = mkPronoun "ne" "niiden" "niitä" "niinä" "niihin" Pl P3 ; - --- The non-human pronoun "se" ('it') is even more irregular, --- Its accusative cases do not --- have a special form with "t", but have the normal genitive/nominative variation. --- We use the type $ProperName$ for "se", because of the accusative but also --- because the person and number are as for proper names. - - pronSe : ProperName = { - s = table { - Nom => "se" ; - Gen => "sen" ; - Part => "sitä" ; - Transl => "siksi" ; - Ess => "sinä" ; - Iness => "siinä" ; - Elat => "siitä" ; - Illat => "siihen" ; - Adess => "sillä" ; - Ablat => "siltä" ; - Allat => "sille" - } ; - } ; - --- The possessive suffixes will be needed in syntax. It will show up --- as a separate word ("auto &+ ni"), which needs unlexing. Unlexing also --- has to fix the vowel harmony in cases like "äiti &+ nsä". - - suff : Str -> Str = \ni -> BIND ++ ni ; - - possSuffix : Number => Person => Str = \\n,p => - suff (case of { - => "ni" ; - => "si" ; - => "nsa" ; - => "mme" ; - => "nne" ; - => "nsa" - } ) ; - --- The relative pronoun, "joka", is inflected in case and number, --- like common nouns, but it does not take possessive suffixes. --- The inflextion shows a surprising similarity with "suo". - - relPron : RelPron = - let {jo = sSuo "jo"} in {s = - table { - Sg => table { - Nom => "joka" ; - Gen => "jonka" ; - c => jo.s ! NCase Sg c - } ; - Pl => table { - Nom => "jotka" ; - c => "j" + (jo.s ! NCase Pl c) - } - } - } ; - - mikaInt : Number => Case => Str = - let { - mi = sSuo "mi" - } in - table { - Sg => table { - Nom => "mikä" ; - Gen => "minkä" ; - c => mi.s ! NCase Sg c - } ; - Pl => table { - Nom => "mitkä" ; - Gen => "mittenkä" ; - c => mi.s ! NCase Sg c - } - } ; - - kukaInt : Number => Case => Str = - let { - ku = sRae "kuka" "kenenä" ; - ket = sRae "kuka" "keinä"} in - table { - Sg => table { - Nom => "kuka" ; - Part => "ketä" ; - Illat => "keneen" ; - c => ku.s ! NCase Sg c - } ; - Pl => table { - Nom => "ketkä" ; - Illat => "keihin" ; - c => ket.s ! NCase Pl c - } - } ; - -caseTable : Number -> CommonNoun -> Case => Str = \n,cn -> - \\c => cn.s ! NCase n c ; - - ---2 Adjectives --- --- For the comparison of adjectives, three noun declensions --- are needed in the worst case. - - mkAdjDegr : (_,_,_ : CommonNoun) -> AdjDegr = \hyva,parempi,paras -> - {s = table { - Pos => hyva.s ; - Comp => parempi.s ; - Sup => paras.s - } - } ; - --- However, it is usually enough to give the positive declension and --- the characteristic forms of comparative and superlative. - - regAdjDegr : CommonNoun -> Str -> Str -> AdjDegr = \kiva, kivempaa, kivinta -> - mkAdjDegr kiva (sSuurempi kivempaa) (sSuurin kivinta) ; - - ---3 Verbs --- - - mkVerb : (_,_,_,_,_,_ : Str) -> Verb = - \tulla,tulen,tulee,tulevat,tulkaa,tullaan -> - let { - tule = Predef.tk 1 tulen ; - a = Predef.dp 1 tulkaa - } in - {s = table { - Inf => tulla ; - Ind Sg P1 => tulen ; - Ind Sg P2 => tule + "t" ; - Ind Sg P3 => tulee ; - Ind Pl P1 => tule + "mme" ; - Ind Pl P2 => tule + "tte" ; - Ind Pl P3 => tulevat ; - Imper Sg => tule ; - Imper Pl => tulkaa ; - ImpNegPl => Predef.tk 2 tulkaa + (ifTok Str a "a" "o" "ö") ; - Pass True => tullaan ; - Pass False => Predef.tk 2 tullaan - } - } ; - --- For "sanoa", "valua", "kysyä". - - vSanoa : Str -> Verb = \sanoa -> - let { - a = Predef.dp 1 sanoa ; - sano = Predef.tk 1 sanoa ; - o = Predef.dp 1 sano - } in - mkVerb - sanoa - (sano + "n") - (sano + o) - (sano + (("v" + a) + "t")) - (sano + (("k" + a) + a)) - (sano + ((("t" + a) + a) + "n")) ; - --- For "ottaa", "käyttää", "löytää", "huoltaa", "hiihtää", "siirtää". - - vOttaa : (_,_ : Str) -> Verb = \ottaa,otan -> - let { - a = Predef.dp 1 ottaa ; - ota = Predef.tk 1 otan ; - otta = Predef.tk 1 ottaa ; - ote = Predef.tk 1 ota + "e" - } in - mkVerb - ottaa - (ota + "n") - ottaa - (otta + (("v" + a) + "t")) - (otta + (("k" + a) + a)) - (ote + ((("t" + a) + a) + "n")) ; - --- For "poistaa", "ryystää". - - vPoistaa : Str -> Verb = \poistaa -> - vOttaa poistaa (Predef.tk 1 poistaa + "n") ; - --- For "juosta", "piestä", "nousta", "rangaista", "kävellä", "surra", "panna". - - vJuosta : (_,_ : Str) -> Verb = \juosta,juoksen -> - let { - a = Predef.dp 1 juosta ; - juokse = Predef.tk 1 juoksen ; - juos = Predef.tk 2 juosta - } in - mkVerb - juosta - juoksen - (juokse + "e") - (juokse + (("v" + a) + "t")) - (juos + (("k" + a) + a)) - (juosta + (a + "n")) ; - --- For "juoda", "syödä". - - vJuoda : Str -> Verb = \juoda -> - let { - a = Predef.dp 1 juoda ; - juo = Predef.tk 2 juoda - } in - mkVerb - juoda - (juo + "n") - juo - (juo + (("v" + a) + "t")) - (juo + (("k" + a) + a)) - (juoda + (a + "n")) ; - - - verbOlla : Verb = mkVerb "olla" "olen" "on" "ovat" "olkaa" "ollaan" ; - --- The negating operator "ei" is actually a verb, which has present --- active indicative and imperative forms, but no infinitive. - - verbEi : Verb = - let {ei = mkVerb nonExist "en" "ei" "eivät" "älkää" "ei"} in - {s = table { - Ind Pl P3 => "eivät" ; - v => ei.s ! v - } - } ; - - ---2 Some structural words - - kuinConj = "kuin" ; - - conjEtta = "että" ; - advSiten = "siten" ; - - mikakukaInt : Gender => Number => Case => Str = - table { - NonHuman => mikaInt ; - Human => kukaInt - } ; - - kaikkiPron : Case => Str = - let {kaiket = caseTable Pl (sKukko "kaikki" "kaiken" "kaikkia")} in - table { - Nom => "kaikki" ; - c => kaiket ! c - } ; - - stopPunct = "." ; - commaPunct = "," ; - questPunct = "?" ; - exclPunct = "!" ; - - koPart = suff "ko" ; - -} ; diff --git a/grammars/resource/finnish/ParadigmsFin.gf b/grammars/resource/finnish/ParadigmsFin.gf deleted file mode 100644 index a970c4d85..000000000 --- a/grammars/resource/finnish/ParadigmsFin.gf +++ /dev/null @@ -1,260 +0,0 @@ ---1 Finnish 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, $resource.Abs.gf$. --- --- The main difference with $morpho.Fin.gf$ is that the types --- referred to are compiled resource grammar types. We have moreover --- had the design principle of always having existing forms as string --- arguments of the paradigms, not stems. --- --- This is the path to read the grammar from the same directory. ---# -path=.:../abstract:../../prelude --- --- The following modules are presupposed: - -resource ParadigmsFin = open (Predef=Predef), Prelude, SyntaxFin, Finnish in { - ---2 Parameters --- --- To abstract over gender, number, and (some) case names, --- we define the following identifiers. - -oper - human : Gender ; - nonhuman : Gender ; - - -- singular : Number ; - -- singular : Number ; - - nominative : Case ; - genitive : Case ; - partitive : Case ; - inessive : Case ; - elative : Case ; - illative : Case ; - adessive : Case ; - ablative : Case ; - allative : Case ; - ---2 Nouns - --- Worst case: give ten forms and the semantic gender. --- In practice just a couple of forms are needed, to define the different --- stems, vowel alternation, and vowel harmony. - -oper - mkN : (talo,talon,talona,taloa,taloon,taloina,taloissa,talojen,taloja,taloihin - : Str) -> Gender -> N ; - --- Nouns with partitive "a"/"ä" are a large group. --- To determine for grade and vowel alternation, three forms are usually needed: --- singular nominative and genitive, and plural partitive. --- Examples: "talo", "kukko", "huippu", "koira", "kukka", "syylä", "särki"... - - nKukko : (kukko,kukon,kukkoja : Str) -> Gender -> N ; - --- A special case are nouns with no alternations: --- the vowel harmony is inferred from the last letter, --- which must be one of "o", "u", "ö", "y". - - nTalo : (talo : Str) -> Gender -> N ; - --- Foreign words ending in consonants are actually similar to words like --- "malli"/"mallin"/"malleja", with the exception that the "i" is not attached --- to the singular nominative. Examples: "linux", "savett", "screen". --- The singular partitive form is used to get the vowel harmony. (N.B. more than --- 1-syllabic words ending in "n" would have variant plural genitive and --- partitive forms, like "sultanien"/"sultaneiden", which are not covered.) - - nLinux : (linuxia : Str) -> Gender -> N ; - --- Nouns of at least 3 syllables ending with "a" or "ä", like "peruna", "tavara", --- "rytinä". - - nPeruna : (peruna : Str) -> Gender -> N ; - --- The following paradigm covers both nouns ending in an aspirated "e", such as --- "rae", "perhe", "savuke", and also many ones ending in a consonant --- ("rengas", "kätkyt"). The singular nominative and essive are given. - - nRae : (rae, rakeena : Str) -> Gender -> N ; - --- The following covers nouns with partitive "ta"/"tä", such as --- "susi", "vesi", "pieni". To get all stems and the vowel harmony, it takes --- the singular nominative, genitive, and essive. - - nSusi : (susi,suden,sutta : Str) -> Gender -> N ; - --- Nouns ending with a long vowel, such as "puu", "pää", "pii", "leikkuu", --- are inflected according to the following. - - nPuu : (puu : Str) -> Gender -> N ; - --- One-syllable diphthong nouns, such as "suo", "tie", "työ", are inflected by --- the following. - - nSuo : (suo : Str) -> Gender -> N ; - --- Many adjectives but also nouns have the nominative ending "nen" which in other --- cases becomes "s": "nainen", "ihminen", "keltainen". --- To capture the vowel harmony, we use the partitive form as the argument. - - nNainen : (naista : Str) -> Gender -> N ; - --- The following covers some nouns ending with a consonant, e.g. --- "tilaus", "kaulin", "paimen", "laidun". - - nTilaus : (tilaus,tilauksena : Str) -> Gender -> N ; - --- The following covers nouns like "nauris" and adjectives like "kallis", "tyyris". --- The partitive form is taken to get the vowel harmony. - - nNauris : (naurista : Str) -> Gender -> N ; - --- Separately-written compound nouns, like "sambal oelek", "Urho Kekkonen", --- have only their last part inflected. - - nComp : Str -> N -> N ; - --- Nouns used as functions need a case, of which by far the commonest is --- the genitive. - - mkFun : N -> Case -> Fun ; - fGen : N -> Fun ; - --- Proper names can be formed by using declensions for nouns. - - mkPN : N -> PN ; - - ---2 Adjectives - --- Non-comparison one-place adjectives are just like nouns. - - mkAdj1 : N -> Adj1 ; - --- Two-place adjectives need a case for the second argument. - - mkAdj2 : N -> Case -> Adj2 ; - --- Comparison adjectives have three forms. The comparative and the superlative --- are always inflected in the same way, so the nominative of them is actually --- enough (except for the superlative "paras" of "hyvä"). - - mkAdjDeg : (kiva : N) -> (kivempaa,kivinta : Str) -> AdjDeg ; - - ---2 Verbs --- --- The fragment only has present tense so far, but in all persons. --- The worst case needs five forms, as shown in the following. - - mkV : (tulla,tulen,tulee,tulevat,tulkaa,tullaan : Str) -> V ; - --- A simple special case is the one with just one stem and no grade alternation. --- It covers e.g. "sanoa", "valua", "kysyä". - - vValua : (valua : Str) -> V ; - --- With two forms, the following function covers a variety of verbs, such as --- "ottaa", "käyttää", "löytää", "huoltaa", "hiihtää", "siirtää". - - vKattaa : (kattaa, katan : Str) -> V ; - --- When grade alternation is not present, just a one-form special case is needed --- ("poistaa", "ryystää"). - - vOstaa : (ostaa : Str) -> V ; - --- The following covers --- "juosta", "piestä", "nousta", "rangaista", "kävellä", "surra", "panna". - - vNousta : (nousta, nousen : Str) -> V ; - --- This is for one-syllable diphthong verbs like "juoda", "syödä". - - vTuoda : (tuoda : Str) -> V ; - --- The verbs "be" and the negative auxiliary are special. - - vOlla : V ; - vEi : V ; - --- Two-place verbs need a case, and can have a pre- or postposition. --- At least one of the latter is empty, $[]$. - - mkTV : V -> Case -> (prep,postp : Str) -> TV ; - --- If both are empty, the following special function can be used. - - tvCase : V -> Case -> TV ; - --- Verbs with a direct (accusative) object --- are special, since their complement case is finally decided in syntax. - - tvDir : V -> TV ; - --- The definitions should not bother the user of the API. So they are --- hidden from the document. ---. - -- singular defined in types.Fin - -- plural defined in types.Fin - - human = Human ; - nonhuman = NonHuman ; - - nominative = Nom ; - genitive = Gen ; - partitive = Part ; - inessive = Iness ; - elative = Elat ; - illative = Illat ; - adessive = Adess ; - ablative = Ablat ; - allative = Allat ; - - mkN = \a,b,c,d,e,f,g,h,i,j,k -> - mkNoun a b c d e f g h i j ** {g = k ; lock_N = <>} ; - - nKukko = \a,b,c,g -> sKukko a b c ** {g = g ; lock_N = <>} ; - nTalo = \a,g -> sTalo a ** {g = g ; lock_N = <>} ; - nLinux = \a,g -> sLinux a ** {g = g ; lock_N = <>} ; - nPeruna = \a,g -> sPeruna a ** {g = g ; lock_N = <>} ; - nRae = \a,b,g -> sRae a b ** {g = g ; lock_N = <>} ; - nSusi = \a,b,c,g -> sSusi a b c ** {g = g ; lock_N = <>} ; - nPuu = \a,g -> sPuu a ** {g = g ; lock_N = <>} ; - nSuo = \a,g -> sSuo a ** {g = g ; lock_N = <>} ; - nNainen = \a,g -> sNainen a ** {g = g ; lock_N = <>} ; - nTilaus = \a,b,g -> sTilaus a b ** {g = g ; lock_N = <>} ; - nNauris = \a,g -> sNauris a ** {g = g ; lock_N = <>} ; - - - nComp = \s,n -> {s = \\c => s ++ n.s ! c ; g = n.g ; lock_N = <>} ; - mkFun = \n,c -> n2n n ** {c = NPCase c ; lock_Fun = <>} ; - fGen = \n -> mkFun n genitive ; - mkPN n = mkProperName n ** {lock_PN = <>} ; - - mkAdj1 = \x -> {s = x.s ; lock_Adj1 = <>} ; - mkAdj2 = \x,c -> mkAdj1 x ** {c = NPCase c ; lock_Adj2 = <>} ; - mkAdjDeg x y z = regAdjDegr x y z ** {lock_AdjDeg = <>} ; - - mkV a b c d e f = mkVerb a b c d e f ** {lock_V = <>} ; - vValua v = vSanoa v ** {lock_V = <>} ; - vKattaa v u = vOttaa v u ** {lock_V = <>} ; - vOstaa v = vPoistaa v ** {lock_V = <>} ; - vNousta v u = vJuosta v u ** {lock_V = <>} ; - vTuoda v = vJuoda v ** {lock_V = <>} ; - vOlla = verbOlla ** {lock_V = <>} ; - vEi = verbEi ** {lock_V = <>} ; - - mkTV = \v,c,p,o -> v ** {s3 = p ; s4 = o ; c = c ; lock_TV = <>} ; - tvCase = \v,c -> mkTV v c [] [] ; - tvDir v = mkTransVerbDir v ** {lock_TV = <>} ; -} ; diff --git a/grammars/resource/finnish/ResFin.gf b/grammars/resource/finnish/ResFin.gf deleted file mode 100644 index d29eb7195..000000000 --- a/grammars/resource/finnish/ResFin.gf +++ /dev/null @@ -1,222 +0,0 @@ ---1 The Top-Level Finnish Resource Grammar --- --- Aarne Ranta 2002 -- 2003 --- --- This is the Finnish concrete syntax of the multilingual resource --- grammar. Most of the work is done in the file $syntax.Fin.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 $TypesFin.gf$. - -concrete ResFin of ResAbs = open Prelude, SyntaxFin in { - -flags - startcat=Phr ; - lexer=unglue ; - unlexer=glue ; - -lincat - N = CommNoun ; - -- = {s : NForm => Str ; g : Gender} - CN = CommNounPhrase ; - NP = {s : NPForm => Str ; n : Number ; p : NPPerson} ; - PN = {s : Case => Str} ; - Det = {s : Gender => Case => Str ; n : Number} ; - Fun = Function ; - -- = CommNounPhrase ** {c : NPForm} ; - Fun2 = Function ** {c2 : NPForm} ; - - Adj1 = Adjective ; - -- = CommonNoun - Adj2 = Adjective ** {c : NPForm} ; - AdjDeg = {s : Degree => NForm => Str} ; - AP = {s : AdjPos => Number => Case => Str} ; - - V = Verb ; - -- = {s : VForm => Str} - VP = Verb ** {s2 : VForm => Str ; c : ComplCase} ; - TV = TransVerb ; - -- = Verb ** {s3, s4 : Str ; c : ComplCase} ; - V3 = TransVerb ** {s5, s6 : Str ; c2 : ComplCase} ; - VS = Verb ; - - AdV = {s : Str} ; - - S = Sentence ; - -- = {s : Str} ; - Slash = Sentence ** {s2 : Str ; c : Case} ; - - RP = {s : Number => Case => Str} ; - RC = {s : Number => Str} ; - - IP = {s : NPForm => Str ; n : Number} ; - Qu = {s : Str} ; - Imp = {s : Number => Str} ; - Phr = {s : Str} ; - - Conj = {s : Str ; n : Number} ; - ConjD = {s1 : Str ; s2 : Str ; n : Number} ; - - ListS = {s1 : Str ; s2 : Str} ; - ListAP = {s1,s2 : AdjPos => Number => Case => Str} ; - ListNP = {s1,s2 : NPForm => Str ; n : Number ; p : NPPerson} ; - ---. - -lin - UseN = noun2CommNounPhrase ; - ModAdj = modCommNounPhrase ; - ModGenOne = npGenDet singular ; - ModGenMany = npGenDet plural ; - UsePN = nameNounPhrase ; - UseFun = funAsCommNounPhrase ; - AppFun = appFunComm ; - AppFun2 = appFun2 ; - AdjP1 = adj2adjPhrase ; - ComplAdj = complAdj ; - PositAdjP = positAdjPhrase ; - ComparAdjP = comparAdjPhrase ; - SuperlNP = superlNounPhrase ; - - DetNP = detNounPhrase ; - IndefOneNP = indefNounPhrase singular ; - IndefManyNP = indefNounPhrase plural ; - DefOneNP = defNounPhrase singular ; - DefManyNP = defNounPhrase plural ; - - CNthatS = nounThatSentence ; - - PredVP = predVerbPhrase ; - PosV = predVerb True ; - NegV = predVerb False ; - PosA = predAdjective True ; - NegA = predAdjective False ; - PosCN = predCommNoun True ; - NegCN = predCommNoun False ; - PosTV = complTransVerb True ; - NegTV = complTransVerb False ; - PosV3 = complDitransVerb True ; - NegV3 = complDitransVerb False ; - PosPassV = passVerb True ; - NegPassV = passVerb False ; - PosNP = predNounPhrase True ; - NegNP = predNounPhrase False ; - PosVS = complSentVerb True ; - NegVS = complSentVerb False ; - VTrans = transAsVerb ; - - AdvVP = adVerbPhrase ; - LocNP = locativeNounPhrase ; - AdvCN = advCommNounPhrase ; - AdvAP = advAdjPhrase ; - - PosSlashTV = slashTransVerb True ; - NegSlashTV = slashTransVerb False ; - OneVP = passPredVerbPhrase ; - - IdRP = identRelPron ; - FunRP = funRelPron ; - RelVP = relVerbPhrase ; - RelSlash = relSlash ; - ModRC = modRelClause ; - RelSuch = relSuch ; - - WhoOne = intPronWho singular ; - WhoMany = intPronWho plural ; - WhatOne = intPronWhat singular ; - WhatMany = intPronWhat plural ; - FunIP = funIntPron ; - NounIPOne = nounIntPron singular ; - NounIPMany = nounIntPron plural ; - - QuestVP = questVerbPhrase ; - IntVP = intVerbPhrase ; - IntSlash = intSlash ; - QuestAdv = questAdverbial ; - - ImperVP = imperVerbPhrase ; - - IndicPhrase = indicUtt ; - QuestPhrase = interrogUtt ; - ImperOne = imperUtterance singular ; - ImperMany = imperUtterance plural ; - - AdvS = advSentence ; - -lin - TwoS = twoSentence ; - ConsS = consSentence ; - ConjS = conjunctSentence ; - ConjDS = conjunctDistrSentence ; - - TwoAP = twoAdjPhrase ; - ConsAP = consAdjPhrase ; - ConjAP = conjunctAdjPhrase ; - ConjDAP = conjunctDistrAdjPhrase ; - - TwoNP = twoNounPhrase ; - ConsNP = consNounPhrase ; - ConjNP = conjunctNounPhrase ; - ConjDNP = conjunctDistrNounPhrase ; - - SubjS = subjunctSentence ; - SubjImper = subjunctImperative ; - SubjQu = subjunctQuestion ; - SubjVP = subjunctVerbPhrase ; - - PhrNP = useNounPhrase ; - PhrOneCN = useCommonNounPhrase singular ; - PhrManyCN = useCommonNounPhrase plural ; - PhrIP ip = ip ; - PhrIAdv ia = ia ; - - OnePhr p = p ; - ConsPhr = cc2 ; - -lin - INP = pronNounPhrase pronMina ; - ThouNP = pronNounPhrase pronSina ; - HeNP = pronNounPhrase pronHan ; - SheNP = pronNounPhrase pronHan ; - ItNP = nameNounPhrase pronSe ; - WeNP = pronNounPhrase pronMe ; - YeNP = pronNounPhrase pronTe ; - YouNP = pronNounPhrase pronTe ; - TheyNP = pronNounPhrase pronHe ; --- ne - - EveryDet = jokainenDet ; - AllDet = kaikkiDet ; - WhichDet = mikaDet ; - MostDet = useimmatDet ; - - HowIAdv = ss "kuinka" ; - WhenIAdv = ss "koska" ; - WhereIAdv = ss "missä" ; - WhyIAdv = ss "miksi" ; - - AndConj = ss "ja" ** {n = Pl} ; - OrConj = ss "tai" ** {n = Sg} ; - BothAnd = sd2 "sekä" "että" ** {n = Pl} ; - EitherOr = sd2 "joko" "tai" ** {n = Sg} ; - NeitherNor = sd2 "ei" "eikä" ** {n = Sg} ; - IfSubj = ss "jos" ; - WhenSubj = ss "kun" ; - - PhrYes = ss ("Kyllä" ++ stopPunct) ; - PhrNo = ss ("Ei" ++ stopPunct) ; - - VeryAdv = ss "hyvin" ; - TooAdv = ss "liian" ; - OtherwiseAdv = ss "muuten" ; - ThereforeAdv = ss "siksi" ; - -} ; diff --git a/grammars/resource/finnish/SyntaxFin.gf b/grammars/resource/finnish/SyntaxFin.gf deleted file mode 100644 index 1f7af543b..000000000 --- a/grammars/resource/finnish/SyntaxFin.gf +++ /dev/null @@ -1,1028 +0,0 @@ ---1 A Small Finnish Resource Syntax --- --- Aarne Ranta 2003 --- --- This resource grammar contains definitions needed to construct --- indicative, interrogative, and imperative sentences in Finnish. --- --- The following files are presupposed: - -resource SyntaxFin = MorphoFin ** open Prelude, (CO = Coordination) in { - ---2 Common Nouns --- --- Simple common nouns are defined as the type $CommNoun$ in $MorphoFin$. - ---3 Common noun phrases - --- In Finnish, common noun phrases behave like simple common nouns, except that --- we need a kind of a *gender* parameter telling if the noun is human or not. --- This parameter regulates determiners such as "joku"/"jokin" ('some') and --- "kuka"/"mikä" ('which'). --- --- A subtle reason forces us to distinguish the parameters of common noun phrases --- from those of morphological common nouns: the parameter value $NPossNom$ is --- syntactically applicable to each of $Sg Nom$, $Pl Nom$, $Sg Gen$. In morphology, --- these forms are always the same ("autoni"), but with complex common nouns, we --- have three different forms: "iso autoni", "isot autoni", "ison autoni". - -oper - CommNoun = {s : NForm => Str ; g : Gender} ; - - CommNounPhrase = {s : Bool => Number => Case => Str ; g : Gender} ; - - noun2CommNounPhrase : CommNoun -> CommNounPhrase = \man -> - useCN man ** {g = man.g} ; - - n2n = noun2CommNounPhrase ; - - useCN : CommonNoun -> {s : Bool => Number => Case => Str} = \auto -> - {s = table { - True => \\n,c => case of { - <_, Nom> => auto.s ! NPossNom ; - => auto.s ! NPossNom ; - => auto.s ! NPossGenPl ; - <_,Transl> => auto.s ! NPossTransl n ; - <_,Illat> => auto.s ! NPossIllat n ; - _ => auto.s ! NCase n c - } ; - False => \\n,c => auto.s ! NCase n c - } - } ; - - cnNoHum : CommonNoun -> CommNoun = \cn -> cn ** {g = NonHuman} ; - cnHum : CommonNoun -> CommNoun = \cn -> cn ** {g = Human} ; - ---2 Noun phrases --- --- Two forms of *virtual accusative* are needed for nouns in singular, --- the nominative and the genitive one ("ostan talon"/"osta talo"). --- For nouns in plural, only a nominative accusative exist. Pronouns --- have a uniform, special accusative form ("minut", etc). - -param - NPForm = NPCase Case | NPAccNom | NPAccGen ; - --- The *person* of a noun phrase is also special, to steer the use of --- possessive suffixes. It expresses a distinction between pronominal and --- non-pronominal noun phrases. The pronominal ones impose possessive suffixes --- in genitival constructions ("minun taloni", "hänen talonsa"), the non-pronominal --- ones don't ("Jussin talo"). As for verbal agreement, non-pronominal noun --- phrases are third-person. - - NPPerson = NP3 | NPP Person ; - -oper - np2Person : NPPerson -> Person = \n -> case n of { - NP3 => P3 ; - NPP p => p - } ; - -oper - npForm2Case : Number -> NPForm -> Case = \n,f -> case f of { - NPCase c => c ; - NPAccNom => Nom ; - NPAccGen => case n of { - Sg => Gen ; - Pl => Nom - } - } ; - - npForm2PForm : NPForm -> PForm = \f -> case f of { - NPCase c => PCase c ; - _ => PAcc - } ; - - NounPhrase : Type = {s : NPForm => Str ; n : Number ; p : NPPerson} ; - - nameNounPhrase : ProperName -> NounPhrase = \jussi -> - {s = \\f => jussi.s ! npForm2Case Sg f ; n = Sg ; p = NP3} ; - - singularNounPhrase : CommNounPhrase -> NounPhrase = \cn -> - {s = \\f => cn.s ! False ! Sg ! (npForm2Case Sg f) ; n = Sg ; p = NP3} ; - - pluralNounPhrase : CommNounPhrase -> NounPhrase = \cn -> - {s = \\f => cn.s ! False ! Pl ! (npForm2Case Pl f) ; n = Pl ; p = NP3} ; - - pronNounPhrase : Pronoun -> NounPhrase = \pron -> - {s = \\f => pron.s ! npForm2PForm f ; n = pron.n ; p = NPP pron.p} ; - --- *Partitive noun phrases* use the partitive instead of the nominative --- and accusative forms. - - npForm2CasePart : NPForm -> Case = \f -> case f of { - NPCase Nom => Part ; - NPCase c => c ; - _ => Part - } ; - - partNounPhrase : Number -> CommNounPhrase -> NounPhrase = \n, cn -> - {s = \\f => cn.s ! False ! n ! (npForm2CasePart f) ; n = n ; p = NP3} ; - - - ---2 Determiners --- --- Most determiners are inflected like nouns. They have an inherent number --- that is given to the noun that is being determined. - - Determiner : Type = {s : Gender => Case => Str ; n : Number} ; - - detNounPhrase : Determiner -> CommNounPhrase -> NounPhrase = \joku, mies -> - {s = \\f => let {c = npForm2Case joku.n f} in - joku.s ! mies.g ! c ++ mies.s ! False ! joku.n ! c ; - n = joku.n ; - p = NP3 - } ; - - mkDeterminerGen : Number -> (_,_ : Case => Str) -> Determiner = \n,mika,kuka -> - {s = table { - NonHuman => mika ; - Human => kuka - } ; - n = n - } ; - - mkDeterminer : Number -> (Case => Str) -> Determiner = \n,kaikki -> - mkDeterminerGen n kaikki kaikki ; - - jokainenDet = mkDeterminer Sg (caseTable Sg (sNainen "jokaista")) ; - kaikkiDet = mkDeterminer Pl kaikkiPron ; - useimmatDet = mkDeterminer Pl (caseTable Pl (sSuurin "useinta")) ; - mikaDet = mkDeterminerGen Sg (mikaInt ! Sg) (kukaInt ! Sg) ; - mitkaDet = mkDeterminerGen Pl (mikaInt ! Pl) (kukaInt ! Pl) ; - - indefNounPhrase : Number -> CommNounPhrase -> NounPhrase = \n,mies -> - case n of { - Sg => singularNounPhrase mies ; - Pl => partNounPhrase plural mies - } ; - - defNounPhrase : Number -> CommNounPhrase -> NounPhrase = \n,mies -> - case n of { - Sg => singularNounPhrase mies ; - Pl => pluralNounPhrase mies - } ; - - --- Genitives of noun phrases can be used like determiners, to build noun phrases. --- The number argument makes the difference between "Jussin talo" - "Jussin talot". --- The NP person of the 'owner' decides if there is a possessive suffix. - - npGenDet : Number -> NounPhrase -> CommNounPhrase -> NounPhrase = \n,jussi,talo -> - {s = \\c => jussi.s ! NPCase Gen ++ - ifPossSuffix talo jussi.p jussi.n (npForm2Case n c) ; - n = n ; - p = NP3 - } ; - - ifPossSuffix : CommNounPhrase -> NPPerson -> Number -> Case -> Str = - \talo,np,n,c -> case np of { - NP3 => talo.s ! False ! n ! c ; - NPP p => talo.s ! True ! n ! c ++ possSuffix ! n ! p - } ; - --- *Bare plural noun phrases*, like "koivut" in "koivut ovat valkoisia", --- are similar to definite plurals. - - plurDet : CommNounPhrase -> NounPhrase = pluralNounPhrase ; - --- Constructions like "huomio että kaksi on parillinen" are formed at the --- first place as common nouns, so that one can also have --- "kaikki ehdotukset että...". - - nounThatSentence : CommNounPhrase -> Sentence -> CommNounPhrase = \idea,x -> - {s = \\p,n,c => idea.s ! p ! n ! c ++ "että" ++ x.s ; - g = idea.g - } ; - ---2 Adjectives --- --- Adjectival phrases are used either as attributes or in predicative position. --- In the attributive position, all cases occur; in the predicative position, only --- the nominative, partitive, translative, and essive - but we ignore this --- restriction for simplicity. The important thing with the parameter is to --- regulate the word order of complex adjectival phrases: cf. predicative --- "(kuusi on) jaollinen kolmella" vs. attributive "kolmella jaollinen (luku)". --- In comparatives, the whole construction is affected: "suurempi kuin kolme" --- vs. "kolmea suurempi". (Actually, in the predicative position, the two --- are in free variation, the distinguished one being the normal choice: --- "kuusi on kolmella jaollinen" is possible, but not quite neutral.) - -param - AdjPos = APred | AAttr ; - -oper - AdjPhrase : Type = {s : AdjPos => Number => Case => Str} ; - - adj2adjPhrase : Adjective -> AdjPhrase = \uusi -> - {s = \\_,n,c => uusi.s ! NCase n c} ; - - ---3 Comparison adjectives --- --- Each of the comparison forms has a characteristic use: --- --- Positive forms are used alone, as adjectival phrases ("iso"). - - positAdjPhrase : AdjDegr -> AdjPhrase = \iso -> - adj2adjPhrase {s = iso.s ! Pos} ; - --- Comparative forms are used with an object of comparison, as --- adjectival phrases ("isompi kuin te"/"teitä isompi"). - - comparAdjPhrase : AdjDegr -> NounPhrase -> AdjPhrase = \iso, te -> - {s = let {teitaisompi : Number => Case => Str = - \\n,c => te.s ! NPCase Part ++ iso.s ! Comp ! NCase n c} in - table { - APred => variants { - \\n,c => iso.s ! Comp ! NCase n c ++ kuinConj ++ te.s ! NPCase Nom ; - teitaisompi - } ; - AAttr => teitaisompi - } - } ; - --- Superlative forms are used with a modified noun, picking out the --- maximal representative of a domain ("isoin talo"). - - superlNounPhrase : AdjDegr -> CommNounPhrase -> NounPhrase = \iso,talo -> - {s = \\np => let {c = npForm2Case Sg np} in - iso.s ! Sup ! NCase Sg c ++ talo.s ! False ! Sg ! c ; - n = Sg ; - p = NP3 - } ; - ---3 Two-place adjectives --- --- A two-place adjective is an adjective with a case used after (or before) --- the complement. The case can be the genitival accusative, which is different --- in the singular and the plural ("rajan ylittävä"/"rajat ylittävä"). --- The order of the adjective and its argument depends on the case: the local --- cases favour Adj + Noun in the predicative position ("hyvä painissa", --- "tyytyväinen vaalitulokseen", "jaollinen kolmella"), which is not a possible --- order for the accusative case. - - AdjCompl = Adjective ** {c : NPForm} ; - - complAdj : AdjCompl -> NounPhrase -> AdjPhrase = \hyva,paini -> - let { - hyvat : Number => Case => Str = \\n,c => hyva.s ! NCase n c ; - painissa : Str = paini.s ! hyva.c - } - in - {s = table { - AAttr => \\n,c => painissa ++ hyvat ! n ! c ; - APred => \\n,c => if_then_else Str - (isLocalNPForm hyva.c) - (variants { - hyvat ! n ! c ++ painissa ; - painissa ++ hyvat ! n ! c - } - ) - (painissa ++ hyvat ! n ! c) - } - } ; - - isLocalNPForm : NPForm -> Bool = \c -> case c of { - NPCase Iness => True ; - NPCase Elat => True ; - NPCase Illat => True ; - NPCase Adess => True ; - NPCase Ablat => True ; - NPCase Allat => True ; - _ => False - } ; - - ---3 Modification of common nouns --- --- The two main functions of adjective are in predication ("Jussi on iso") --- and in modification ("iso mies"). Predication will be defined --- later, in the chapter on verbs. --- --- Modification uses the attributive form of an adjectival phrase. --- The adjective always comes before the noun. The possessive suffix is --- given to the noun. - - modCommNounPhrase : AdjPhrase -> CommNounPhrase -> CommNounPhrase = \iso,mies -> - {s = \\p,n,c => iso.s ! AAttr ! n ! c ++ mies.s ! p ! n ! c ; - g = mies.g - } ; - ---2 Function expressions - --- A function expression is a common noun together with the --- case taken by its argument ("x'n vaimo"). --- The type is analogous to two-place adjectives and transitive verbs; --- but here the genitive is by far the commonest case. The possessive suffix --- is then needed with pronominal arguments. - - Function = CommNounPhrase ** {c : NPForm} ; - --- The application of a function gives, in the first place, a common noun: --- "Jussi vaimo/vaimot". From this, other rules of the resource grammar --- give noun phrases, such as "Jussi vaimo", "Jussin vaimot", --- "Jussin ja Marin äidit", and "Jussin ja Marin äiti" (the --- latter two corresponding to distributive and collective functions, --- respectively). Semantics will eventually tell when each --- of the readings is meaningful. - - appFunComm : Function -> NounPhrase -> CommNounPhrase = \vaimo, jussi -> - {s = \\p,n,c => case vaimo.c of { - NPCase Gen => jussi.s ! NPCase Gen ++ - ifPossSuffix vaimo jussi.p jussi.n c ; - h => vaimo.s ! False ! n ! c ++ jussi.s ! h - } ; - g = vaimo.g - } ; - --- Notice the switched word order in other cases than the genitive, e.g. --- "veli Jussille". --- --- It is possible to use a function word as a common noun; the semantics is --- often existential or indexical. - - funAsCommNounPhrase : Function -> CommNounPhrase = \x -> x ; - --- The following is an aggregate corresponding to function application --- producing "John's mother" and "the mother of John". It does not appear in the --- resource grammar API as a primitive. - - appFun : Bool -> Function -> NounPhrase -> NounPhrase = \coll, vaimo,jussi -> - let {n = jussi.n ; nf = if_then_else Number coll Sg n} in - npGenDet nf jussi vaimo ; - --- The commonest case is functions with the genitive case. - - funGen : CommNounPhrase -> Function = \vaimo -> - vaimo ** {c = NPCase Gen} ; - --- Two-place functions add one argument place. - - Function2 = Function ** {c2 : NPForm} ; - --- There application starts by filling the first place. - - appFun2 : Function2 -> NounPhrase -> Function = \juna, turku -> - {s = \\p,n,c => juna.s ! False ! n ! c ++ turku.s ! juna.c ; - g = juna.g ; - c = juna.c2 - } ; - - ---2 Verbs --- ---3 Verb phrases --- --- Verb phrases are discontinuous: the two parts of a verb phrase are --- (s) an inflected verb, (s2) a complement. --- For instance: "on" - "kaunis" ; "ei" - "ole kaunis" ; "sisältää" - "rikkiä". --- Moreover, a subject case is needed, because of passive and 'have' verb --- phrases ("minä uin" ; "minut valitaan" ; "minua odotetaan" ; "minulla on jano"). - - VerbPhrase = Verb ** {s2 : VForm => Str ; c : ComplCase} ; - --- The normal subject case is the nominative. - - nomVerbPhrase : (Verb ** {s2 : VForm => Str}) -> VerbPhrase = \v -> - v ** {c = CCase Nom} ; - --- From the inflection table, we select the finite form as function --- of person and number: - - indicVerb : Verb -> Person -> Number -> Str = \v,p,n -> - v.s ! Ind n p ; - --- A simple verb can be made into a verb phrase with an empty complement, e.g. --- "ui" - []. --- There are two versions, depending on if we want to negate the verb. --- In the negated form, the negative verb "ei" becomes the verb, and the --- complement is a special infinite form of the verb (usually similar to the --- 2nd person singular imperative): "ei" - "ui". --- --- N.B. negation is *not* a function applicable to a verb phrase, since --- double negations with "ei" are not grammatical. - - predVerb : Bool -> Verb -> VerbPhrase = \b,walk -> - let { - noCompl : {s2 : VForm => Str} = {s2 = \\_ => []} ; - infCompl : {s2 : VForm => Str} = {s2 = table { - Imper Pl => walk.s ! ImpNegPl ; - _ => walk.s ! vFormNeg - } - } - } - in - if_then_else VerbPhrase b - (nomVerbPhrase (walk ** noCompl)) - (nomVerbPhrase (verbEi ** infCompl)) ; - --- (N.B. local definitions workaround for poor type inference in GF 1.2). - --- Sometimes we want to extract the verb part of a verb phrase. Not strictly --- necessary since this is a consequence of record subtyping. - - verbOfPhrase : VerbPhrase -> Verb = \v -> {s = v.s} ; - --- Verb phrases can also be formed from adjectives ("on vanha"), --- common nouns ("on mies"), and noun phrases ("on Jussi"). --- The third rule is overgenerating: "on jokainen mies" has to be ruled out --- on semantic grounds. --- --- For adjectives and common nouns, notice the case difference in the complement --- depending on number: "on kaunis" - "ovat kauniita". We ignore the forms --- "on kaunista", used with mass terms, and "ovat kauniit", used in --- constructions of the "plurale tantum" kind. The adjective rule can be defined --- in terms of the common noun rule. - - predAdjective : Bool -> AdjPhrase -> VerbPhrase = \b,iso -> - let {isot : CommNounPhrase = {s = \\_ => iso.s ! APred ; g = NonHuman}} - in predCommNoun b isot ; - - predCommNoun : Bool -> CommNounPhrase -> VerbPhrase = \b,mies -> - let { - miehia : VForm => Str = \\v => case vform2number v of { - Sg => mies.s ! False ! Sg ! Nom ; - Pl => mies.s ! False ! Pl ! Part - } ; - olemiehia : VForm => Str = - \\v => verbOlla.s ! vFormNeg ++ miehia ! v - } - in if_then_else VerbPhrase b - (nomVerbPhrase (verbOlla ** {s2 = miehia})) - (nomVerbPhrase (verbEi ** {s2 = olemiehia})) ; - - predNounPhrase : Bool -> NounPhrase -> VerbPhrase = \b,jussi -> - let {jussia : Bool => Number => Case => Str = \\_,_,_ => jussi.s ! NPCase Nom} - in predCommNoun b {s = jussia ; g = Human} ; --- gender does not matter - - ---3 Transitive verbs --- --- Transitive verbs are verbs with a case and, possibly, a preposition --- or a postposition for the complement, --- in analogy with two-place adjectives and functions. --- One might prefer to use the term "2-place verb", since --- "transitive" traditionally means that the inherent preposition is empty. --- Such a verb is one with a *direct object*. - -param - ComplCase = CCase Case | CAcc ; - -oper - TransVerb : Type = Verb ** {s3, s4 : Str ; c : ComplCase} ; - --- The rule for using transitive verbs is the complementization rule. --- --- N.B. One or both of the pre- and postposition are empty. - - complTransVerb : Bool -> TransVerb -> NounPhrase -> VerbPhrase = \b,ostaa,talo -> - let { - ostan = predVerb b ostaa ; - talon : VForm => Str = \\v => - ostaa.s3 ++ talo.s ! complementCase b ostaa.c v ++ ostaa.s4 - } - in nomVerbPhrase { - s = ostan.s ; - s2 = \\v => ostan.s2 ! v ++ talon ! v - } ; - --- N.B. If the case is accusative, it becomes partitive in negated verb phrases. --- The choice between the nominative and genitive accusatives depends on the verb --- form. - - complementCase : Bool -> ComplCase -> VForm -> NPForm = \b,c,v -> case c of { - CCase k => NPCase k ; - CAcc => case b of { - True => case v of { - Inf => NPAccNom ; - Ind _ _ => NPAccGen ; - Imper _ => NPAccNom ; - ImpNegPl => NPCase Part ; - Pass True => NPAccNom ; - Pass False => NPCase Part - } ; - _ => NPCase Part - } - } ; - --- Verbs that take their object with a case other than the accusative, --- without pre- or postposition: - - mkTransVerbCase : Verb -> Case -> TransVerb = \nauraa,c -> - nauraa ** {s3 = [] ; s4 = [] ; c = CCase c} ; - --- Verbs that take direct object with the accusative: - - mkTransVerbDir : Verb -> TransVerb = \ostaa -> - ostaa ** {s3 = [] ; s4 = [] ; c = CAcc} ; - --- Most two-place verbs can be used passively; the object case need not be --- the accusative, and it becomes the subject case in the passive sentence. - - passTransVerb : Bool -> TransVerb -> VerbPhrase = \b,tavata -> - {s = \\_ => if_then_else Str b (tavata.s ! Pass b) "ei" ; - s2 = \\_ => if_then_else Str b [] (tavata.s ! Pass b) ; - c = tavata.c - } ; - --- The API function does not demand that the verb is two-place. --- Therefore, we can only give it the accusative case, as default. - - passVerb : Bool -> Verb -> VerbPhrase = \b,uida -> - passTransVerb b (mkTransVerbDir uida) ; - --- Transitive verbs can be used elliptically as verbs. The semantics --- is left to applications. The definition is trivial, due to record --- subtyping. - - transAsVerb : TransVerb -> Verb = \juoda -> - juoda ; - --- The 'real' Finnish passive is unpersonal, equivalent to the --- "man" construction in German. It is formed by inflecting the --- bare verb phrase in passive, and putting the complement before --- the verb ("auttaa minua" - "minua autetaan"). - - passPredVerbPhrase : VerbPhrase -> Sentence = \auttaaminua -> - let {p = Pass True} in - {s = auttaaminua.s2 ! p ++ auttaaminua.s ! p} ; - --- *Ditransitive verbs* are verbs with three argument places. --- We treat so far only the rule in which the ditransitive --- verb takes both complements to form a verb phrase. - - DitransVerb = TransVerb ** {s5, s6 : Str ; c2 : ComplCase} ; - - complDitransVerb : - Bool -> DitransVerb -> NounPhrase -> NounPhrase -> VerbPhrase = - \b,ostaa,talo,me -> - let { - ostan = predVerb b ostaa ; - talon : VForm => Str = \\v => - ostaa.s3 ++ talo.s ! complementCase b ostaa.c v ++ ostaa.s4 ; - meille : VForm => Str = \\v => - ostaa.s5 ++ me.s ! complementCase b ostaa.c2 v ++ ostaa.s6 - } - in nomVerbPhrase { - s = ostan.s ; - s2 = \\v => ostan.s2 ! v ++ talon ! v ++ meille ! v - } ; - - ---2 Adverbials --- --- Adverbials are not inflected (we ignore comparison, and treat --- compared adverbials as separate expressions; this could be done another way). - - Adverb : Type = SS ; - --- This rule adds the adverbial as a prefix or a suffix to the complement, --- in free variation. - - adVerbPhrase : VerbPhrase -> Adverb -> VerbPhrase = \laulaa, hyvin -> - {s = laulaa.s ; - s2 = \\v => bothWays (laulaa.s2 ! v) hyvin.s ; - c = laulaa.c - } ; - - advAdjPhrase : Adverb -> AdjPhrase -> AdjPhrase = \liian, iso -> - {s = \\p,n,c => liian.s ++ iso.s ! p ! n ! c - } ; - --- Adverbials are typically generated by case, prepositions, or postpositions. --- The rule for creating locative noun phrases by the inessive case --- is a shaky, since the adessive is often required. - - prepPhrase : Str -> Case -> NounPhrase -> Adverb = \ennen,c,talvi -> - ss (ennen ++ talvi.s ! NPCase c) ; - - postpPhrase : Str -> Case -> NounPhrase -> Adverb = \aikana,c,talvi -> - ss (talvi.s ! NPCase c ++ aikana) ; - - caseAdv : Case -> NounPhrase -> Adverb = prepPhrase [] ; - - locativeNounPhrase : NounPhrase -> Adverb = \np -> --- caseAdv Iness ; - ss (np.s ! NPCase Iness) ; - --- This is a source of the "mann with a telescope" ambiguity, and may produce --- strange things, like "autot aina" (while "autot tänään" is OK). --- Semantics will have to make finer distinctions among adverbials. - - advCommNounPhrase : CommNounPhrase -> Adverb -> CommNounPhrase = \auto,nyt -> - {s = \\b,n,c => auto.s ! b ! n ! c ++ nyt.s ; - g = auto.g - } ; - ---2 Sentences --- --- Sentences are not inflected in this fragment of Finnish without tense. - - Sentence : Type = SS ; - --- This is the traditional $S -> NP VP$ rule. It takes care of --- agreement between subject and verb. Recall that the VP may already --- contain negation. - - predVerbPhrase : NounPhrase -> VerbPhrase -> Sentence = \jussi,uida -> - let { - p = np2Person jussi.p ; - c = complementCase True uida.c Inf --- True,Inf don't matter here - } - in - ss (jussi.s ! c ++ uida.s ! Ind jussi.n p ++ uida.s2 ! Ind jussi.n p) ; - --- This is a macro for simultaneous predication and complementization. - - predTransVerb : Bool -> NounPhrase -> TransVerb -> NounPhrase -> Sentence = - \b,you,see,john -> - predVerbPhrase you (complTransVerb b see john) ; - ---3 Sentence-complement verbs --- --- Sentence-complement verbs take sentences as complements. - - SentenceVerb : Type = Verb ; - --- To generate "sanoo että Jussi ui" / "ei sano että Jussi ui" - - complSentVerb : Bool -> SentenceVerb -> Sentence -> VerbPhrase = - \b,sanoa,jussiui -> - let { - sanon = predVerb b sanoa - } - in nomVerbPhrase { - s = sanon.s ; - s2 = \\v => sanon.s2 ! v ++ conjEtta ++ jussiui.s - } ; - - ---2 Sentences missing noun phrases --- --- This is one instance of Gazdar's *slash categories*, corresponding to his --- $S/NP$. --- We cannot have - nor would we want to have - a productive slash-category former. --- Perhaps a handful more will be needed. --- --- Notice that the slash category has a similar relation to sentences as --- transitive verbs have to verbs: it's like a *sentence taking a complement*. --- --- Interestingly, the distinction between prepositions and postpositions --- neutralizes: even prepositions are attached after relative and interrogative --- pronouns: "jota ennen" cf. "ennen talvea". Otherwise, the category and --- the rules are very similar to transitive verbs. Notice that the case gets --- fixed by the Boolean parameter and the subject. - - SentenceSlashNounPhrase = Sentence ** {s2 : Str ; c : Case} ; - - slashTransVerb : Bool -> NounPhrase -> TransVerb -> SentenceSlashNounPhrase = - \b,jussi,ostaa -> - predVerbPhrase jussi (predVerb b ostaa) ** { - s2 = ostaa.s3 ++ ostaa.s4 ; - c = npForm2Case jussi.n - (complementCase b ostaa.c (Ind jussi.n (np2Person jussi.p))) - } ; - ---2 Relative pronouns and relative clauses --- --- As described in $types.Fin.gf$, relative pronouns are inflected like --- common nouns, in number and case. --- --- We get the simple relative pronoun "joka" from $morpho.Fin.gf$. - - identRelPron : RelPron = relPron ; - - funRelPron : Function -> RelPron -> RelPron = \vaimo, joka -> - {s = \\n,c => joka.s ! n ! npForm2Case n vaimo.c ++ vaimo.s ! False ! n ! c} ; - --- Relative clauses can be formed from both verb phrases ("joka ui") and --- slash expressions ("jonka sinä näet", "jonka kautta sinä käyt"). - - RelClause : Type = {s : Number => Str} ; - - relVerbPhrase : RelPron -> VerbPhrase -> RelClause = \joka,ui -> - {s = \\n => joka.s ! n ! npForm2Case n (complementCase True ui.c Inf) ++ - ui.s ! Ind n P3 ++ ui.s2 ! Ind n P3} ; - - relSlash : RelPron -> SentenceSlashNounPhrase -> RelClause = \joka,saat -> - {s = \\n => joka.s ! n ! saat.c ++ saat.s2 ++ saat.s} ; - --- A 'degenerate' relative clause is the one often used in mathematics, e.g. --- "luku x siten että x on parillinen". - - relSuch : Sentence -> RelClause = \A -> - {s = \\_ => advSiten ++ conjEtta ++ A.s} ; - --- N.B. the construction "sellainen että" is not possible with the present --- typing of the relative clause, since it should also be inflected in --- case. Ordinary relative clauses have a fixed case. --- --- The main use of relative clauses is to modify common nouns. --- The result is a common noun, out of which noun phrases can be formed --- by determiners. We use no comma before these relative clauses, even though --- conservative standard Finnish does. - - modRelClause : CommNounPhrase -> RelClause -> CommNounPhrase = \mies,jokaui -> - {s = \\b,n,c => mies.s ! b ! n ! c ++ jokaui.s ! n ; - g = mies.g - } ; - --- N.B: the possessive suffix, if attached here, comes to wrong place! Solution: --- make $CommNounPhrase$ discontinuos. - - ---2 Interrogative pronouns --- --- If relative pronouns are like common nouns (and adjectives), --- interrogative pronouns are like noun phrases, having a fixed number. --- They also need to handle an NP-like accusative case. But person is --- not needed, since it is uniformly $NP3$. - - IntPron : Type = {s : NPForm => Str ; n : Number} ; - --- In analogy with relative pronouns, we have a rule for applying a function --- to a relative pronoun to create a new one. - - funIntPron : Function -> IntPron -> IntPron = \vaimo,kuka -> - {s = \\c => kuka.s ! vaimo.c ++ - vaimo.s ! False ! kuka.n ! npForm2Case kuka.n c ; - n = kuka.n - } ; - --- There is a variety of simple interrogative pronouns: --- "mikä talo" / "kuka mies", "kuka", "mikä". The construction with a noun --- is the reason why nouns in Finnish need a gender. - - nounIntPron : Number -> CommNounPhrase -> IntPron = \n, talo -> - {s = \\c => let {nc = npForm2Case n c} in - mikakukaInt ! talo.g ! n ! nc ++ talo.s ! False ! n ! nc ; - n = n - } ; - - intPronWho : Number -> IntPron = \num -> { - s = \\c => mikakukaInt ! Human ! num ! (npForm2Case num c) ; - n = num - } ; - - intPronWhat : Number -> IntPron = \num -> { - s = \\c => mikakukaInt ! NonHuman ! num ! (npForm2Case num c) ; - n = num - } ; - - ---2 Utterances - --- By utterances we mean complete phrases, such as --- 'can be used as moves in a language game': indicatives, questions, imperative, --- and one-word utterances. The rules are far from complete. --- --- N.B. we have not included rules for texts, which we find we cannot say much --- about on this level. In semantically rich GF grammars, texts, dialogues, etc, --- will of course play an important role as categories not reducible to utterances. --- An example is proof texts, whose semantics show a dependence between premises --- and conclusions. Another example is intersentential anaphora. - - Utterance = SS ; - - indicUtt : Sentence -> Utterance = \x -> ss (x.s ++ stopPunct) ; - interrogUtt : Question -> Utterance = \x -> ss (x.s ++ questPunct) ; - - ---2 Questions --- --- Questions are either direct or indirect, but the forms in Finnish are --- always identical. So we don't need a $QuestForm$ parameter as in other languages. - -oper - Question = SS ; - ---3 Yes-no questions --- --- Yes-no questions are formed by inversed predication, with the clitic "ko" / "kö" --- particle attached to the verb part of the verb phrase. - - questVerbPhrase : NounPhrase -> VerbPhrase -> Question = \jussi,ui -> - let {np = Ind jussi.n (np2Person jussi.p)} in - ss (ui.s ! np ++ koPart ++ jussi.s ! complementCase True ui.c Inf ++ ui.s2 ! np); - - ---3 Wh-questions --- --- Wh-questions are of two kinds: ones that are like $NP - VP$ sentences --- ("kuka ui?") others that are line $S/NP - NP$ sentences ("kenet sinä tapaat?"). - - intVerbPhrase : IntPron -> VerbPhrase -> Question = \kuka,ui -> - predVerbPhrase (kuka ** {p = NP3}) ui ; - - intSlash : IntPron -> SentenceSlashNounPhrase -> Question = \kuka,tapaat -> - ss (kuka.s ! NPCase tapaat.c ++ tapaat.s2 ++ tapaat.s) ; - - ---3 Interrogative adverbials --- --- These adverbials will be defined in the lexicon: they include --- "koska", "missä", "kuinka", "miksi", etc, which are all invariant one-word --- expressions. In addition, they can be formed by adding cases and postpositions --- to interrogative pronouns, in the same way as adverbials are formed --- from noun phrases; notice that even prepositions are used as postpositions --- when attached to interrogative pronouns. - - IntAdverb = SS ; - - prepIntAdverb : Str -> Case -> IntPron -> IntAdverb = \ennen,c,kuka -> - ss (kuka.s ! NPCase c ++ ennen) ; - --- A question adverbial can be applied to anything, and whether this makes --- sense is a semantic question. The syntax is very simple: just prefix the --- adverbial to the predication. - - questAdverbial : IntAdverb -> NounPhrase -> VerbPhrase -> Question = - \miksi, jussi, ui -> - cc2 miksi (predVerbPhrase jussi ui) ; - ---2 Imperatives --- --- We only consider second-person imperatives. - - Imperative = SS1 Number ; - - imperVerbPhrase : VerbPhrase -> Imperative = \ui -> - {s = \\n => ui.s ! Imper n ++ ui.s2 ! Imper n} ; - - imperUtterance : Number -> Imperative -> Utterance = \n,I -> - ss (I.s ! n ++ exclPunct) ; - ---2 Sentence adverbials --- --- This class covers adverbials such as "muuten", "siksi", which are prefixed --- to a sentence to form a phrase. - - advSentence : Adverb -> Sentence -> Utterance = \siksi,sataa -> - ss (siksi.s ++ sataa.s ++ ".") ; - - ---2 Coordination --- --- Coordination is to some extent orthogonal to the rest of syntax, and --- has been treated in a generic way in the module $CO$ in the file --- $coordination.gf$. The overall structure is independent of category, --- but there can be differences in parameter dependencies. --- ---3 Conjunctions --- --- Coordinated phrases are built by using conjunctions, which are either --- simple ("ja", "tai") or distributed ("sekä - että", "joko - tai"). --- --- The conjunction has an inherent number, which is used when conjoining --- noun phrases: "Jussi ja Mari ovat..." vs. "Jussi tai Mari on..."; in the --- case of "tai", the result is however plural if any of the disjuncts is. - - Conjunction = CO.Conjunction ** {n : Number} ; - ConjunctionDistr = CO.ConjunctionDistr ** {n : Number} ; - ---3 Coordinating sentences --- --- We need a category of lists of sentences. It is a discontinuous --- category, the parts corresponding to 'init' and 'last' segments --- (rather than 'head' and 'tail', because we have to keep track of the slot between --- the last two elements of the list). A list has at least two elements. - - ListSentence : Type = SD2 ; - - twoSentence : (_,_ : Sentence) -> ListSentence = CO.twoSS ; - - consSentence : ListSentence -> Sentence -> ListSentence = - CO.consSS CO.comma ; - --- To coordinate a list of sentences by a simple conjunction, we place --- it between the last two elements; commas are put in the other slots, --- e.g. "du rauchst, er trinkt und ich esse". - - conjunctSentence : Conjunction -> ListSentence -> Sentence = \c,xs -> - ss (CO.conjunctX c xs) ; - --- To coordinate a list of sentences by a distributed conjunction, we place --- the first part (e.g. "either") in front of the first element, the second --- part ("or") between the last two elements, and commas in the other slots. --- For sentences this is really not used. - - conjunctDistrSentence : ConjunctionDistr -> ListSentence -> Sentence = - \c,xs -> - ss (CO.conjunctDistrX c xs) ; - - ---3 Coordinating adjective phrases --- --- The structure is the same as for sentences. Parameters are passed to components. - - ListAdjPhrase : Type = - {s1,s2 : AdjPos => Number => Case => Str} ; - - twoAdjPhrase : (_,_ : AdjPhrase) -> ListAdjPhrase = \x,y -> - CO.twoTable3 AdjPos Number Case x y ; - - consAdjPhrase : ListAdjPhrase -> AdjPhrase -> ListAdjPhrase = \xs,x -> - CO.consTable3 AdjPos Number Case CO.comma xs x ; - - conjunctAdjPhrase : Conjunction -> ListAdjPhrase -> AdjPhrase = \c,xs -> - CO.conjunctTable3 AdjPos Number Case c xs ; - - conjunctDistrAdjPhrase : ConjunctionDistr -> ListAdjPhrase -> AdjPhrase = \c,xs -> - CO.conjunctDistrTable3 AdjPos Number Case c xs ; - - ---3 Coordinating noun phrases --- --- The structure is the same as for sentences. The result is either always plural --- or plural if any of the components is, depending on the conjunction. - - ListNounPhrase : Type = {s1,s2 : NPForm => Str ; n : Number ; p : NPPerson} ; - - twoNounPhrase : (_,_ : NounPhrase) -> ListNounPhrase = \x,y -> - CO.twoTable NPForm x y ** {n = conjNumber x.n y.n ; p = conjPerson x.p y.p} ; - - consNounPhrase : ListNounPhrase -> NounPhrase -> ListNounPhrase = \xs,x -> - CO.consTable NPForm CO.comma xs x ** - {n = conjNumber xs.n x.n ; p = conjPerson xs.p x.p} ; - - conjunctNounPhrase : Conjunction -> ListNounPhrase -> NounPhrase = \c,xs -> - CO.conjunctTable NPForm c xs ** {n = conjNumber c.n xs.n ; p = xs.p} ; - - conjunctDistrNounPhrase : ConjunctionDistr -> ListNounPhrase -> NounPhrase = - \c,xs -> - CO.conjunctDistrTable NPForm c xs ** {n = conjNumber c.n xs.n ; p = xs.p} ; - --- We have to define a calculus of numbers of persons. For numbers, --- it is like the conjunction with $Pl$ corresponding to $False$. - - conjNumber : Number -> Number -> Number = \m,n -> case of { - => Sg ; - _ => Pl - } ; - --- For persons, we let the latter argument win ("either you or I am absent" --- but "either I or you are absent"). This is not quite clear. - - conjPerson : NPPerson -> NPPerson -> NPPerson = \_,p -> - p ; - - - ---2 Subjunction --- --- Subjunctions ("kun", "jos", etc) --- are a different way to combine sentences than conjunctions. --- The main clause can be a sentences, an imperatives, or a question, --- but the subjoined clause must be a sentence. --- --- There are uniformly two variant word orders, e.g. --- "jos poltat minä suutun" --- and "minä suutun jos poltat". - - Subjunction = SS ; - - subjunctSentence : Subjunction -> Sentence -> Sentence -> Sentence = - \if, A, B -> - ss (subjunctVariants if A.s B.s) ; - - subjunctImperative : Subjunction -> Sentence -> Imperative -> Imperative = - \if, A, B -> - {s = \\n => subjunctVariants if A.s (B.s ! n)} ; - - subjunctQuestion : Subjunction -> Sentence -> Question -> Question = - \if, A, B -> - {s = subjunctVariants if A.s B.s} ; - - subjunctVariants : Subjunction -> Str -> Str -> Str = \if,A,B -> - variants {if.s ++ A ++ commaPunct ++ B ; B ++ commaPunct ++ if.s ++ A} ; - - subjunctVerbPhrase : VerbPhrase -> Subjunction -> Sentence -> VerbPhrase = - \V, if, A -> - adVerbPhrase V (ss (if.s ++ A.s)) ; - ---2 One-word utterances --- --- An utterance can consist of one phrase of almost any category, --- the limiting case being one-word utterances. These --- utterances are often (but not always) in what can be called the --- default form of a category, e.g. the nominative. --- This list is far from exhaustive. - - useNounPhrase : NounPhrase -> Utterance = \john -> - postfixSS stopPunct (defaultNounPhrase john) ; - - useCommonNounPhrase : Number -> CommNounPhrase -> Utterance = \n,car -> - useNounPhrase (indefNounPhrase n car) ; - --- Here are some default forms. - - defaultNounPhrase : NounPhrase -> SS = \john -> - ss (john.s ! NPCase Nom) ; - - defaultQuestion : Question -> SS = \whoareyou -> - whoareyou ; - - defaultSentence : Sentence -> Utterance = \x -> - x ; -} ; diff --git a/grammars/resource/finnish/TestFin.gf b/grammars/resource/finnish/TestFin.gf deleted file mode 100644 index 5de29ffa8..000000000 --- a/grammars/resource/finnish/TestFin.gf +++ /dev/null @@ -1,54 +0,0 @@ --- use this path to read the grammar from the same directory ---# -path=.:../abstract:../../prelude - -concrete TestFin of TestAbs = ResFin ** open Prelude, SyntaxFin in { - -flags startcat=Phr ; lexer=unglue ; unlexer=glue ; - --- a random sample from the lexicon - -lin - Big = regAdjDegr (sTalo "iso") "isompaa" "isointa" ; - Small = regAdjDegr (sSusi "pieni" "pienen" "pienenä") "pienempää" "pienintä" ; - Old = regAdjDegr (sKukko "vanha" "vanhan" "vanhoja") "vanhempaa" "vanhinta" ; - Young = regAdjDegr (sSusi "nuori" "nuoren" "nuorena") "nuorempaa" "nuorinta" ; - American = sNainen "amerikkalaista" ; - Finnish = sNainen "suomalaista" ; - - Married = sKukko "vihitty" "vihityn" "vihittyjä" ** {c = NPCase Illat} ; - --- naimisissa ! - - Man = cnHum (mkNoun "mies" "miehen" "miehenä" "miestä" "mieheen" "miehinä" - "miehissä" "miesten" "miehiä" "miehiin") ; - Woman = cnHum (sNainen "naista") ; - Car = cnNoHum (sTalo "auto") ; - House = cnNoHum (sTalo "talo") ; - Light = cnNoHum (sTalo "valo") ; - - Walk = vJuosta "kävellä" "kävelen" ; - Run = vJuosta "juosta" "juoksen" ; - Say = vSanoa "sanoa" ; - Prove = vPoistaa "todistaa" ; - Send = mkTransVerbDir (vOttaa "lähettää" "lähetän") ; - Love = mkTransVerbCase (vPoistaa "rakastaa") Part ; - Wait = mkTransVerbCase (vOttaa "odottaa" "odotan") Part ; - Give = mkTransVerbDir (vOttaa "antaa" "annan") ** - {s5 = [] ; s6 = [] ; c2 = CCase Allat} ; - Prefer = mkTransVerbDir (vOttaa "asettaa" "asetan") ** - {s5 = [] ; s6 = "edelle" ; c2 = CCase Gen} ; --- pitää paremp(a/i)na - - Mother = funGen (n2n (cnHum (sKukko "äiti" "äidin" "äitejä"))) ; - Uncle = funGen (n2n (cnHum (sKukko "setä" "sedän" "setiä"))) ; --- eno! - Connection = n2n (cnNoHum (sRakkaus "yhteys")) ** - {c = NPCase Elat ; c2 = NPCase Illat} ; --- Tampereelle ! - - Always = ss "aina" ; - Well = ss "hyvin" ; - - SwitchOn = mkTransVerbDir (vOttaa "sytyttää" "sytytän") ; - SwitchOff = mkTransVerbDir (vOttaa "sammuttaa" "sammutan") ; - - John = mkProperName (sKukko "Jussi" "Jussin" "Jusseja") ; - Mary = mkProperName (sKukko "Mari" "Marin" "Mareja") ; - -} ; diff --git a/grammars/resource/finnish/TypesFin.gf b/grammars/resource/finnish/TypesFin.gf deleted file mode 100644 index 86d0645fb..000000000 --- a/grammars/resource/finnish/TypesFin.gf +++ /dev/null @@ -1,126 +0,0 @@ ---1 Finnish Word Classes and Morphological Parameters --- --- This is a resource module for Finnish morphology, defining the --- morphological parameters and word classes of Finnish. 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 TypesFin = open Prelude in { - --- ---2 Enumerated parameter types --- --- These types are the ones found in school grammars. --- Their parameter values are atomic. We omit three of the cases, not --- occurring in the resource syntax. The accusative cases are only --- defined in syntax; in morphology, there is a special accusative for --- pronouns. - -param - Number = Sg | Pl ; - Case = Nom | Gen | Part | Transl | Ess - | Iness | Elat | Illat | Adess | Ablat | Allat ; - Person = P1 | P2 | P3 ; - Degree = Pos | Comp | Sup ; - Gender = NonHuman | Human ; - --- 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 noun case. In noun case, we include --- forms used in connection with possessive suffixes. - -param - NForm = NCase Number Case - | NPossNom | NPossGenPl | NPossTransl Number | NPossIllat Number ; - -oper - CommonNoun : Type = {s : NForm => Str} ; - - useNForm : NForm -> (Number => Case => Str) -> Str = \nf,f -> case nf of { - NCase n c => f ! n ! c ; - NPossNom => f ! Sg ! Nom ; ---- "iso autoni"; also "isot autoni" etc - NPossGenPl => f ! Pl ! Gen ; - NPossTransl n => f ! n ! Transl ; - NPossIllat n => f ! n ! Illat - } ; - - --- ---3 Adjectives --- --- The major division is between the comparison degrees, but it --- is also good to leave room for adjectives that cannon be compared. --- Such adjectives are like common nouns. - - Adjective : Type = CommonNoun ; - AdjDegr : Type = {s : Degree => NForm => Str} ; - ---3 Verbs --- --- We limit the grammar so far to verbs in the infinitive, second-person --- imperative, and present tense indicative active and passive. --- A special form is needed for --- the negated plural imperative. - -param - VForm = - Inf - | Ind Number Person - | Imper Number - | ImpNegPl - | Pass Bool - ; - -oper - Verb : Type = SS1 VForm ; - - vFormNeg = Imper Sg ; - - vform2number : VForm -> Number = \v -> case v of { - Ind n _ => n ; - Imper n => n ; - ImpNegPl => Pl ; - _ => Sg --- - } ; - --- ---3 Pronouns --- --- For pronouns, we need the noun case forms, plus an accusative. - -param - PForm = PCase Case | PAcc ; - -oper - Pronoun : Type = {s : PForm => Str ; n : Number ; p : Person} ; - ---3 Proper names --- --- Proper names only need case forms. - - ProperName : Type = SS1 Case ; - - ---3 Relative pronouns --- --- Relative pronouns are inflected like nouns, except for possessive suffixes. - - RelPron : Type = {s : Number => Case => Str} ; - -} ; diff --git a/grammars/resource/french/MorphoFra.gf b/grammars/resource/french/MorphoFra.gf deleted file mode 100644 index 4b3c8ff2b..000000000 --- a/grammars/resource/french/MorphoFra.gf +++ /dev/null @@ -1,1231 +0,0 @@ ---# -path=.:../romance:../../prelude - ---1 A Simple French Resource Morphology --- --- Aarne Ranta 2002--2003 --- --- This resource morphology contains definitions needed in the resource --- syntax. It moreover contains the most usual inflectional patterns. --- The patterns for verbs contain the complete "Bescherelle" conjugation --- tables. --- --- We use the parameter types and word classes defined in $types.Fra.gf$. - -resource MorphoFra = open (Predef=Predef), Prelude, TypesFra in { - - ---3 Front vowels --- --- In verb conjugation, we will need the concept of frontal vowel. - -oper - voyelleFront : Strs = strs {"e" ; "i" ; "y" ; "é" ; "è"} ; - preVoyelleFront : (_,_ : Str) -> Str = \t,u -> pre {t ; u / voyelleFront} ; - - ---2 Nouns --- --- The following macro is useful for creating the forms of number-dependent --- tables, such as common nouns. - - numForms : Str -> Str -> Number => Str = \bon,bons -> - table {Sg => bon ; Pl => bons} ; - --- For example, the regular noun forms are defined as follows: - - nomReg : Str -> Number => Str = \bu -> numForms bu (bu + "s") ; - --- Common nouns are inflected in number and have an inherent gender. - - mkCNom : (Number => Str) -> Gender -> CNom = \mecmecs,gen -> - {s = mecmecs ; g = gen} ; - - mkCNomIrreg : Str -> Str -> Gender -> CNom = \mec,mecs -> - mkCNom (numForms mec mecs) ; - - mkCNomReg : Str -> Gender -> CNom = \mec -> - mkCNom (nomReg mec) ; - - mkCNomNiveau : Str -> Gender -> CNom = \niveau -> - mkCNomIrreg niveau (niveau + "x") ; - - mkCNomCheval : Str -> Gender -> CNom = \cheval -> - let {cheva = Predef.tk 1 cheval} in - mkCNomIrreg cheval (cheva + "ux") ; - - mkCNomInvar : Str -> Gender -> CNom = \cas -> - mkCNomIrreg cas cas ; - - - --- The definite article has quite some variation: three parameters and --- elision. This is the simples definition we have been able to find. - - artDef : Gender -> Number -> Case -> Str = \g,n,c -> artDefTable ! g ! n ! c ; - - artDefTable : Gender => Number => Case => Str = \\g,n,c => case of { - => elisLe ; - => pre {"du" ; ["de l'"] / voyelle} ; - => pre {"au" ; ["à l'"] / voyelle} ; - => elisLe ; - => prepCase c ++ elisLa ; - <_, Pl, Gen> => "des" ; - <_, Pl, Dat> => "aux" ; - <_, Pl, _ > => "les" - } ; - - ---2 Adjectives --- --- Adjectives are conveniently seen as gender-dependent nouns. --- Here are some patterns. First one that describes the worst case. - - mkAdj : (_,_,_ : Str) -> Adj = \vieux,vieuxs,vieille -> - {s = table { - Masc => numForms vieux vieuxs ; - Fem => nomReg vieille - } - } ; - --- Then the regular and invariant patterns. - - adjReg : Str -> Gender => Number => Str = \bu -> table { - Masc => nomReg bu ; - Fem => nomReg (bu + "e") - } ; - - adjInvar : Str -> Gender => Number => Str = \bien -> - \\_,_ => bien ; - --- Adjectives themselves are records. Here the most common cases: - - adjGrand : Str -> Adj = \grand -> - {s = adjReg grand} ; - - adjHeureux : Str -> Adj = \heureux -> - let {heureu = Predef.tk 1 heureux} in - mkAdj heureux heureu (heureu+"se") ; - - adjJeune : Str -> Adj = \jeune -> - mkAdj jeune (jeune+"s") jeune ; - - adjIndien : Str -> Adj = \indien -> - mkAdj indien (indien+"s") (indien+"ne") ; - - adjFrancais : Str -> Adj = \francais -> - mkAdj francais francais (francais+"e") ; - - adjCher : Str -> Adj = \cher -> - let {ch = Predef.tk 2 cher} in - mkAdj cher (cher + "s") (ch + "ère") ; - - - ---2 Personal pronouns --- --- All the eight personal pronouns can be built by the following macro. --- The use of "en" as atonic genitive is debatable. - - mkPronoun : (_,_,_,_,_,_,_ : Str) -> - PronGen -> Number -> Person -> ClitType -> Pronoun = - \il,le,lui,Lui,son,sa,ses,g,n,p,c -> - {s = table { - Ton x => prepCase x ++ Lui ; - Aton Nom => il ; - Aton Acc => le ; - Aton Gen => "en" ; --- hmm - Aton Dat => lui ; - Poss Sg Masc => son ; - Poss Sg Fem => sa ; - Poss Pl _ => ses - } ; - g = g ; - n = n ; - p = p ; - c = c - } ; - - elisPoss : Str -> Str = \s -> - pre {s + "a" ; s + "on" / voyelle} ; - - pronJe = mkPronoun - (elision "j") - (elision "m") - (elision "m") - "moi" - "mon" (elisPoss "m") "mes" - PNoGen -- gender cannot be known from pronoun alone - Sg - P1 - Clit1 ; - - pronTu = mkPronoun - "tu" - (elision "t") - (elision "t") - "toi" - "ton" (elisPoss "t") "tes" - PNoGen - Sg - P2 - Clit1 ; - - pronIl = mkPronoun - "il" - (elision "l") - "lui" - "lui" - "son" (elisPoss "s") "ses" - (PGen Masc) - Sg - P3 - Clit2 ; - - pronElle = mkPronoun - "elle" - elisLa - "lui" - "elle" - "son" (elisPoss "s") "ses" - (PGen Fem) - Sg - P3 - Clit2 ; - - pronNous = mkPronoun - "nous" - "nous" - "nous" - "nous" - "notre" "notre" "nos" - PNoGen - Pl - P1 - Clit3 ; - - pronVous = mkPronoun - "vous" - "vous" - "vous" - "vous" - "votre" "votre" "vos" - PNoGen - Pl --- depends! - P2 - Clit3 ; - - pronIls = mkPronoun - "ils" - "les" - "leur" - "eux" - "leur" "leur" "leurs" - (PGen Masc) - Pl - P3 - Clit1 ; - - pronElles = mkPronoun - "elles" - "les" - "leur" - "elles" - "leur" "leur" "leurs" - (PGen Fem) - Pl - P3 - Clit1 ; - ---2 Reflexive pronouns --- --- It is simply a function depending on number and person. - - pronRefl : Number -> Person -> Str = \n,p -> case of { - => elision "m" ; - => elision "t" ; - <_, P3> => elision "s" ; - => "nous" ; - => "vous" - } ; - - - --- The composable pronoun "lequel" is inflected by varying the definite --- article and the determiner "quel" in the expected way. - - lequelPron : Gender -> Number -> Case -> Str = \g,n,c -> - artDef g n c + quelPron g n ; - - ---2 Determiners --- --- Determiners, traditionally called indefinite pronouns, are inflected --- in gender and number. It is usually enough to give the two singular --- forms to form the plurals. - - pronForms : Str -> Str -> Gender -> Number -> Str = \tel,telle,g,n -> case g of { - Masc => nomReg tel ! n ; - Fem => nomReg telle ! n - } ; - - quelPron : Gender -> Number -> Str = pronForms "quel" "quelle" ; - - telPron : Gender -> Number -> Str = pronForms "tel" "telle" ; - - toutPron : Gender -> Number -> Str = \g,n -> case g of { - Masc => numForms "tout" "tous" ! n ; - Fem => nomReg "toutee" ! n - } ; - --- The following macro generates the phrases "est-ce que", "est-ce qu'", --- and "est-ce qui" (the last one used e.g. in "qu'est-ce qui"). - - estCeQue : Case -> Str = \c -> - "est-ce" ++ case c of { - Nom => "qui" ; - Acc => elisQue ; - _ => nonExist --- dont? - } ; - - ---2 Verbs --- ---3 The present tense --- --- We first define some macros for the special case of present tense. --- --- The verb "être" is often used in syntax. - - verbEtre = verbPres (conjÊtre "être") ; - --- We very often form the verb stem by dropping out the infinitive ending. - - troncVerb : Tok -> Tok = Predef.tk 2 ; - - - ---3 Affixes --- --- It is convenient to have sets of affixes as data objects. - - Affixe : Type = Person => Str ; - - lesAffixes : (_,_,_ : Str) -> Affixe = \x,y,z -> table { - P1 => x ; - P2 => y ; - P3 => z - } ; - --- Much of variation can be described in terms of affix sets: - - affixSgE : Affixe = lesAffixes "e" "es" "e" ; - - affixSgS : Affixe = lesAffixes "s" "s" "t" ; - - affixSgSsansT : Affixe = lesAffixes "s" "s" [] ; - - affixSgX : Affixe = lesAffixes "x" "x" "t" ; - - affixPlOns : Affixe = lesAffixes "ons" "ez" "ent" ; - - affixSgAi : Affixe = lesAffixes "ai" "as" "a" ; - - affixSgAis : Affixe = \\p => "ai" + affixSgS ! p ; - - affixPlIons : Affixe = table { - P3 => "aient" ; - p => "i" + affixPlOns ! p - } ; - --- Often affix sets come in pairs, for the singular and the plural. - - affixImparf : Number => Affixe = table { - Sg => affixSgAis ; - Pl => affixPlIons - } ; - - affixFutur : Number => Affixe = table { - Sg => affixSgAi ; - Pl => table { - P3 => "ont" ; - p => affixPlOns ! p - } - } ; - - affixSPres : Number => Affixe = table { - Sg => affixSgE ; - Pl => table { - P3 => "ent" ; - p => affixPlIons ! p - } - } ; - - affixPlMes : (_,_ : Str) -> Affixe = - \è, â -> lesAffixes (â + "mes") (â + "tes") (è + "rent") ; - - affixPasseAi : Number => Affixe = table { - Sg => affixSgAi ; - Pl => affixPlMes "è" "â" - } ; - - affixPasseS : (i,î : Str) -> Number => Affixe = \i,î -> table { - Sg => table {p => i + affixSgS ! p} ; - Pl => affixPlMes i î - } ; - - affixSImparfSse : (i,î : Str) -> Number => Affixe = \i,î -> table { - Sg => table { - P3 => î + "t" ; - p => i + "ss" + affixSgE ! p - } ; - Pl => table {p => i + "ss" + affixSPres ! Pl ! p} - } ; - - AffixPasse : Type = {ps : Number => Affixe ; si : Number => Affixe} ; - - affixPasse : (_,_ : Str) -> AffixPasse = \i, î -> - {ps = affixPasseS i î ; si = affixSImparfSse i î} ; - - affixPasseA : AffixPasse = {ps = affixPasseAi ; si = affixSImparfSse "a" "â"} ; - - affixPasseI : AffixPasse = affixPasse "i" "î" ; - - affixPasseU : AffixPasse = affixPasse "u" "û" ; - - affixPasseNonExist : AffixPasse = - let {aff : Number => Affixe = - table {_ => lesAffixes nonExist nonExist nonExist}} in - {ps = aff ; si = aff} ; - - affixImper : NumPersI => Str = table { - SgP2 => "e" ; - PlP1 => "ons" ; - PlP2 => "ez" - } ; - - formesPresAi : (v,all : Str) -> Number => Affixe = \v,all -> table { - Sg => \\p => v + affixSgAi ! p ; - Pl => table { - P3 => v + "ont" ; - p => all + affixPlOns ! p - } - } ; - ---3 Macros for the complete conjugation type --- --- The type $VForm$ has 55 forms, as defined in $types.Fra.gf$. --- The worst-case macro takes 11 stems and two affix sets. --- (We will actually never need all of these at the same time.) - - Verbe : Type = VForm => Str ; - - verbAffixes : - (a,b,c,d,e,f,g,h,i,j,k : Str) -> Affixe -> AffixPasse -> Verbe = - \tien, ten, tienn, t, tiendr, soi, soy, soie, tenu, tenus, tenir -> - \affpres, affpasse -> - table { - Inf => tenir ; - Indic Pres Sg p => tien + affpres ! p ; - Indic Pres Pl P3 => tienn + affixPlOns ! P3 ; - Indic Pres Pl p => ten + affixPlOns ! p ; - Indic Imparf n p => ten + affixImparf ! n ! p ; - Indic Passe n p => t + affpasse.ps ! n ! p ; - Indic Futur n p => tiendr + affixFutur ! n ! p ; - Cond n p => tiendr + affixImparf ! n ! p ; - Subjo SPres Sg p => soi + affixSPres ! Sg ! p ; - Subjo SPres Pl P3 => soi + "ent" ; - Subjo SPres Pl p => soy + affixSPres ! Pl ! p ; - Subjo SImparf n p => t + affpasse.si ! n ! p ; - Imper SgP2 => soie ; - Imper p => soy + affixImper ! p ; - Part PPres => ten + "ant" ; - Part (PPasse Masc Sg) => tenu ; - Part (PPasse Fem Sg) => tenu + "e" ; - Part (PPasse Masc Pl) => tenus ; - Part (PPasse Fem Pl) => tenu + "es" - } ; - --- Almost always seven stems are more than enough. - - verbHabituel : - (a,b,c,d,e,f,g : Str) -> Affixe -> AffixPasse -> Verbe = - \tien, ten, tienn, t, tiendr, tenu, tenir -> - \affpres, affpasse -> - verbAffixes tien ten tienn t tiendr tienn ten - (tien + affpres ! P1) tenu (tenu+"s") tenir affpres affpasse ; - ---3 The first conjugation --- --- There is quite some phonologically explained variation in the first conjugation. --- The worst case has three different stems. - - auxConj1 : Str -> Str -> Str -> Verbe = \jet, jett, jeter -> - verbHabituel jett jet jett jet jeter (jet+"é") (jet+"er") affixSgE affixPasseA ; - - conj1aimer : Str -> Verbe = \aimer -> - let {aim = troncVerb aimer} in - auxConj1 aim aim aimer ; - - conj1céder : Str -> Verbe = \céder -> - let { - ced = troncVerb céder ; - d = Predef.dp 1 ced ; - c = Predef.tk 2 ced ; - cèd = c + "è" + "d" ; - céd = c + "é" + "d" - } - in auxConj1 céd cèd céder ; - - conj1jeter : Str -> Verbe = \jeter -> - let { - jet = troncVerb jeter ; - jett = jet + Predef.dp 1 jet - } - in auxConj1 jet jett (jett + "er") ; - - conj1placer : Str -> Verbe = \placer -> - let { - pla = Predef.tk 3 placer ; - plac = preVoyelleFront (pla+"ç") (pla+"c") - } in - auxConj1 plac plac placer ; - - conj1manger : Str -> Verbe = \manger -> - let { - mang = Predef.tk 2 manger ; - mange = preVoyelleFront (mang+"e") mang - } in - auxConj1 mange mange manger ; - - conj1assiéger : Str -> Verbe = \assiéger -> - let {assi = Predef.tk 4 assiéger} in - auxConj1 (preVoyelleFront (assi+"ége") (assi+"ég")) (assi+"èg") assiéger ; - - conj1payer : Str -> Verbe = \payer -> - let {pa = Predef.tk 3 payer} in - auxConj1 (pa + "y") (pa + "i") (pa + "ier") ; - - conj1envoyer : Str -> Verbe = \envoyer -> - let {renv = Predef.tk 4 envoyer} in - auxConj1 (renv + "oy") (renv + "oi") (renv + "err") ; - - ---3 The second conjugation --- --- There are just two different cases. - - conj2finir : Str -> Verbe = \finir -> - let { - fin = troncVerb finir ; - fini = fin + "i" ; - finiss = fin + "iss" - } in - verbHabituel fini finiss finiss fin finir fini finir affixSgS affixPasseI ; - - conj2haïr : Str -> Verbe = \haïr -> - let {ha = troncVerb haïr ; - hai = ha + "i" ; - haï = ha + "ï" ; - haiss = ha + "ïss" - } in - verbHabituel hai haiss haiss ha haïr haï haïr affixSgS (affixPasse "ï" "ï") ; - - ---3 The third conjugation --- --- This group is very heterogeneous. Most verbs have "re" in the infinitive, --- but the first example does not! - - conj3tenir : Str -> Verbe = \tenir -> - let {t = Predef.tk 4 tenir} in - verbHabituel - (t+"ien") (t+"en") (t+"ienn") t (t+"iendr") (t+"enu") tenir - affixSgS (affixPasse "in" "în") ; - --- Many verbs have "is" in the past participle. But there is so much variation --- that the worst-case macro needs seven forms. - - auxConj3is : (_,_,_,_,_,_,_ : Str) -> Verbe = - \quier, quér, quièr, qu, querr, quis, quiss -> - verbAffixes - quier quér quièr qu querr quièr quér - (quier + "s") quis quiss (quér + "ir") affixSgS affixPasseI ; - - auxConj3ir : (_,_,_ : Str) -> Verbe = \sen, sent, i -> - auxConj3is sen sent sent sent (sent+"ir") (sent+i) (sent+i+"s") ; - - conj3quérir : Str -> Verbe = \quérir -> - let {qu = Predef.tk 4 quérir} in - auxConj3is (qu+"ier") (qu+"ér") (qu+"ièr") qu (qu+"err") (qu+"is") (qu+"is") ; - - conj3sentir : Str -> Verbe = \sentir -> - let { - sent = troncVerb sentir ; - sen = Predef.tk 1 sent - } in - auxConj3ir sen sent "i" ; - - conj3vêtir : Str -> Verbe = \vêtir -> - let { - s = Predef.tk 5 vêtir ; - vet = auxConj3ir "vêt" "vêt" "u" - } in - table { - Indic Pres Sg P3 => s + "vêt" ; - p => s + vet ! p - }; - - auxConj3vrir : (_,_,_ : Str) -> Verbe = \ouvr, i, ouvert -> - verbAffixes - ouvr ouvr ouvr ouvr (ouvr + i + "r") ouvr ouvr - (ouvr + "e") ouvert (ouvert + "s") (ouvr + "ir") affixSgE affixPasseI ; - - conj3couvrir : Str -> Verbe = \couvrir -> - let {couv = Predef.tk 3 couvrir} in - auxConj3vrir (couv+"r") "i" (couv+"ert") ; - - conj3cueillir : Str -> Verbe = \cueillir -> - let {cueill = troncVerb cueillir} in - auxConj3vrir cueill "e" (cueill + "i") ; - - conj3assaillir : Str -> Verbe = \assaillir -> - let {assaill = troncVerb assaillir} in - auxConj3vrir assaill "i" (assaill + "i") ; - --- The verb "faillir" has lots of alternatives forms. - - conj3faillir : Str -> Verbe = \faillir -> - let { - fa = Predef.tk 5 faillir ; - faudr = fa + "udr" ; - tfa = conj3assaillir faillir - } in - table { - Indic Pres Sg p => fa + "u" + affixSgX ! p ; - Subjo SPres n p => fa + variants {"illiss" ; "ill"} + affixSPres ! n ! p ; - - Indic Futur n p => variants {tfa ! Indic Futur n p ; faudr + affixFutur ! n ! p} ; - Cond n p => variants {tfa ! Cond n p ; faudr + affixImparf ! n ! p} ; - - Imper _ => nonExist ; - p => tfa ! p - }; - - conj3bouillir : Str -> Verbe = \bouillir -> - let { - bou = Predef.tk 5 bouillir ; - tbou = conj3assaillir bouillir - } in - table { - Indic Pres Sg p => bou + affixSgS ! p ; - Imper SgP2 => bou + "s" ; - p => tbou ! p - }; - --- Notice that here we don't need another conjugation, as Bescherelle does. - - conj3dormir : Str -> Verbe = conj3sentir ; - --- The verbs "mourir" and "courir" have much in common, except the first two --- persons in the present indicative singular, and the past participles. - - auxConj3ourir : (_,_,_ : Str) -> Verbe = \meur, mour, mort -> - verbAffixes - meur mour meur mour (mour + "r") meur mour - (meur + "s") mort (mort + "s") (mour + "ir") affixSgS affixPasseU ; - - conj3courir : Str -> Verbe = \courir -> - let {cour = troncVerb courir} in - auxConj3ourir cour cour (cour + "u") ; - - conj3mourir : Str -> Verbe = \mourir -> - let {m = Predef.tk 5 mourir} in - auxConj3ourir (m + "eur") (m + "our") (m + "ort") ; - --- A little auxiliary to cover "fuir" and "ouïr". --- *N.B.* some alternative forms for "ouïr" are still missing. - - auxConj3ui : AffixPasse -> (_,_,_ : Str) -> Verbe = \affpasse, o, ou, ouï -> - let {oi : Str = o + "i" ; oy : Str = o + "y" ; ouïr : Str = ouï + "r"} in - verbHabituel oi oy oi ou ouïr ouï ouïr affixSgS affpasse ; - - conj3fuir : Str -> Verbe = \fuir -> - let {fu = troncVerb fuir} in - auxConj3ui affixPasseI fu fu (fu + "i") ; - - conj3ouïr : Str -> Verbe = \ouir -> - let {o = Predef.tk 3 ouir} in - auxConj3ui (affixPasse "ï" "ï") o (o + "u") (o + "uï") ; - --- The verb "gésir" lacks many forms. - - conj3gésir : Str -> Verbe = \gésir -> - let {g = Predef.tk 4 gésir} in - table { - Inf => g + "ésir" ; - Indic Pres Sg p => g + lesAffixes "is" "is" "ît" ! p ; - Indic Pres Pl p => g + "is" + affixPlOns ! p ; - Indic Imparf n p => g + "is" + affixImparf ! n ! p ; - Part PPres => g + "isant" ; - _ => nonExist - } ; - --- Here is an auxiliary for a large, and heterogeneous, group of verbs whose --- infinitive ends in "oir". It has two special cases, depending on the ending --- of the first two persions in the present indicative singular. - - auxConj3oir : Affixe -> AffixPasse -> (_,_,_,_,_,_,_,_ : Str) -> Verbe = - \affpres, affpasse -> - \peu, pouv, peuv, p, pourr, veuill, voul, v -> - let {pu : Str = p + "u"} in - verbAffixes - peu pouv peuv p pourr veuill voul (peu+affpres!P1) pu (pu+"s") (v+"oir") - affpres affpasse ; - - auxConj3usX : (_,_,_,_,_,_,_,_ : Str) -> Verbe = - auxConj3oir affixSgX affixPasseU ; - auxConj3usS : (_,_,_,_,_,_,_,_ : Str) -> Verbe = - auxConj3oir affixSgS affixPasseU ; - - conj3cevoir : Str -> Verbe = \cevoir -> - let {re = Predef.tk 6 cevoir} in - auxConj3usS (re+"çoi") (re+"cev") (re+"çoiv") (re+"ç") - (re+"cevr") (re+"çoiv") (re+"cev") (re+"cev") ; - - conj3voir : Str -> Verbe = \voir -> - let { - v = Predef.tk 3 voir ; - voi = v + "oi" - } in - auxConj3oir - affixSgS affixPasseI voi (v + "oy") voi v (v + "err") voi (v + "oy") v ; - - conj3pourvoir : Str -> Verbe = \pourvoir -> - let { - pourv = Predef.tk 3 pourvoir ; - pourvoi = pourv + "oi" ; - pourvoy = pourv + "oy" - } in - auxConj3usS pourvoi pourvoy pourvoi pourv pourvoir pourvoi pourvoy pourv ; - - conj3savoir : Str -> Verbe = \savoir -> - let { - s = Predef.tk 5 savoir ; - tsavoir = auxConj3usS "ai" "av" "av" "" "aur" "ach" "ach" "av" - } in - table { - Imper p => s + "ach" + affixImper ! p ; - Part PPres => s + "achant" ; - p => s + tsavoir ! p - } ; - - conj3devoir : Str -> Verbe = \devoir -> - let { - s = Predef.tk 6 devoir ; - tdevoir = auxConj3usS "doi" "dev" "doiv" "d" "devr" "doiv" "dev" "dev" - } in - table { - Part (PPasse Masc Sg) => s + "dû" ; - p => s + tdevoir ! p - } ; - - conj3pouvoir : Str -> Verbe = \pouvoir -> - let { - p = Predef.tk 6 pouvoir ; - tpouvoir = auxConj3usX "eu" "ouv" "euv" "" "ourr" "uiss" "uiss" "ouv" - } in - table { - Indic Pres Sg P1 => p + variants {"eux" ; "uis"} ; - t => p + tpouvoir ! t - } ; - - conj3mouvoir : Str -> Verbe = \mouvoir -> - let { - s = Predef.tk 7 mouvoir ; - mu = adjReg "mû" ; - tmouvoir = auxConj3usS "meu" "mouv" "meuv" "m" "mouvr" "meuv" "mouv" "mouv" - } in - table { - Part (PPasse g n) => s + mu ! g ! n ; - p => s + tmouvoir ! p - } ; - - auxConj3seul3sg : (_,_,_,_,_ : Str) -> Verbe = - \faut, fall, pl, faudr, faill -> table { - Inf => fall + "oir" ; - Indic Pres Sg P3 => faut ; - Indic Imparf Sg P3 => fall + "ait" ; - Indic Passe Sg P3 => pl + "ut" ; - Indic Futur Sg P3 => faudr + "a" ; - Cond Sg P3 => faudr + "ait" ; - Subjo SPres Sg P3 => faill + "e" ; - Subjo SImparf Sg P3 => pl + "ût" ; - Part PPres => fall + "ant" ; - Part (PPasse g n) => adjReg (pl + "u") ! g ! n ; - _ => nonExist - } ; - - conj3pleuvoir : Str -> Verbe = \pleuvoir -> - let { - pleuv = Predef.tk 3 pleuvoir ; - pl = Predef.tk 3 pleuv - } in - auxConj3seul3sg (pl + "eut") pleuv pl (pleuv + "r") pleuv ; - - conj3falloir : Str -> Verbe = \falloir -> - let { - fa = Predef.tk 5 falloir ; - fau = fa + "u" ; - fall = Predef.tk 3 falloir - } in - auxConj3seul3sg (fau + "t") fall fall (fau + "dr") (fa + "ill") ; - - conj3valoir : Str -> Verbe = \valoir -> - let { - va = Predef.tk 4 valoir ; - val = va + "l" - } in - auxConj3usX (va + "u") val val val (va + "udr") (va + "ill") val val ; - - conj3vouloir : Str -> Verbe = \vouloir -> - let { - v = Predef.tk 6 vouloir ; - vo = v + "o" ; - voul = vo + "ul" ; - veul = v + "eul" - } in - auxConj3usX (v + "eu") voul veul voul (vo + "udr") (v + "euill") voul voul ; - --- The following two are both "asseoir" in the Bescherelle, which however --- points out that the latter conjugation has an infinitive form without "e" --- since the orthographic rectifications of 1990. - - conj3asseoir : Str -> Verbe = \asseoir -> - let { - ass = Predef.tk 4 asseoir ; - tasseoir = auxConj3is "ied" "ey" "ey" "" "iér" "is" "is" - } in - table { - Inf => ass + "eoir" ; - Indic Pres Sg P3 => ass + "ied" ; - t => ass + tasseoir ! t - } ; - - conj3assoir : Str -> Verbe = \assoir -> - let { - ass = Predef.tk 3 assoir ; - tassoir = auxConj3is "oi" "oy" "oi" "" "oir" "is" "is" - } in - table { - Inf => ass + variants {"oir" ; "eoir"} ; - t => ass + tassoir ! t - } ; - - conj3seoir : Str -> Verbe = \seoir -> - let { - s = Predef.tk 4 seoir ; - tseoir = conj3asseoir seoir - } in - table { - Indic Pres Pl P3 => s + "iéent" ; - Indic _ _ P1 => nonExist ; - Indic _ _ P2 => nonExist ; - Indic Passe _ _ => nonExist ; - Cond _ P1 => nonExist ; - Cond _ P2 => nonExist ; - Subjo SPres Sg P3 => s + "iée" ; - Subjo SPres Pl P3 => s + "iéent" ; - Subjo _ _ _ => nonExist ; - Imper _ => nonExist ; - Part PPres => s + "éant" ; - t => tseoir ! t - } ; - --- Here we don't need a new conjugation. - - conj3messeoir : Str -> Verbe = \messeoir -> - let {tmesseoir = conj3seoir messeoir} in - table { - Part (PPasse _ _) => nonExist ; - p => tmesseoir ! p - } ; - - conj3surseoir : Str -> Verbe = \surseoir -> - let { - surs = Predef.tk 4 surseoir ; - tsurseoir = auxConj3is "oi" "oy" "oi" "" "eoir" "is" "is" - } in - table { - Inf => surseoir ; - t => surs + tsurseoir ! t - } ; - --- Here we interpolate and include the imperfect and subjunctive forms, --- which Bescherelle leaves out. - - conj3choir : Str -> Verbe = \choir -> - let { - ch = Predef.tk 3 choir ; - tchoir = auxConj3usS "oi" "oy" "oi" "" (variants {"oir" ; "err"}) "oi" "oy" "" - } in - \\p => ch + tchoir ! p ; - - conj3échoir : Str -> Verbe = \échoir -> - let {techoir = conj3choir échoir} in - table { - Indic _ _ P1 => nonExist ; - Indic _ _ P2 => nonExist ; - Indic Pres Pl P3 => Predef.tk 3 échoir + variants {"oient" ; "éent"} ; - Subjo _ _ P1 => nonExist ; - Subjo _ _ P2 => nonExist ; - Cond _ P1 => nonExist ; - Cond _ P2 => nonExist ; - Imper _ => nonExist ; - Part PPres => Predef.tk 3 échoir + "éant" ; - t => techoir ! t - } ; - --- Verbs with the infinitive ending "re" are a major group within the third --- conjugation. The worst-case macro takes 2 sets of affixes and 7 stems. - - auxConj3re : Affixe -> AffixPasse -> (_,_,_,_,_,_,_ : Str) -> Verbe = - \affpr, affp -> \prend, pren, prenn, pr, prendr, pris, priss -> - verbAffixes prend pren prenn pr prendr prenn pren - (prend + affpr ! P1) pris priss (prendr + "e") affpr affp ; - - auxConj3tre : (_,_ : Str) -> Verbe = \bat, batt -> - auxConj3re affixSgSsansT affixPasseI - bat batt batt batt (batt + "r") (batt + "u") (batt + "us") ; - - conj3rendre : Str -> Verbe = \rendre -> - let {rend = troncVerb rendre} in - auxConj3tre rend rend ; - - conj3battre : Str -> Verbe = \battre -> - let {bat = Predef.tk 3 battre} in - auxConj3tre bat (bat + "t") ; - - conj3prendre : Str -> Verbe = \prendre -> - let {pr = Predef.tk 5 prendre} in - auxConj3re - affixSgSsansT affixPasseI (pr + "end") (pr + "en") - (pr + "enn") pr (pr + "endr") (pr + "is") (pr + "is") ; - - conj3mettre : Str -> Verbe = \mettre -> - let {m = Predef.tk 5 mettre ; met = m + "et"} in - auxConj3re - affixSgSsansT affixPasseI met (met + "t") - (met + "t") m (met + "tr") (m + "is") (m + "is") ; - - conj3peindre : Str -> Verbe = \peindre -> - let {pe = Predef.tk 5 peindre ; peign = pe + "ign"} in - auxConj3re - affixSgS affixPasseI - (pe + "in") peign peign peign (pe + "indr") (pe + "int") (pe + "ints") ; - --- We don't need a separate conjugation for "joindre" and "craindre". - - conj3joindre = conj3peindre ; - - conj3craindre = conj3peindre ; - - conj3vaincre : Str -> Verbe = \vaincre -> - let { - vainc = troncVerb vaincre ; - vainqu = Predef.tk 1 vainc + "qu" - } in - auxConj3re - affixSgSsansT affixPasseI - vainc vainqu vainqu vainqu (vainc + "r") (vainc + "u") (vainc + "us") ; - - conj3traire : Str -> Verbe = \traire -> - let { - tra = Predef.tk 3 traire ; - trai = tra + "i" ; - tray = tra + "y" - } in - auxConj3re - affixSgS affixPasseNonExist - trai tray trai [] (trai + "r") (trai + "t") (trai + "ts") ; - --- The verb "faire" has a great many irregularities. Following Bescherelle, --- we have left out the plural 2nd person variant "faisez", which is a --- 'grossier barbarisme'. - - conj3faire : Str -> Verbe = \faire -> - let { - fai = troncVerb faire ; - fais = fai + "s" ; - f = Predef.tk 2 fai ; - tfaire = auxConj3re - affixSgS affixPasseI - fai fais (f + "ass") f (f + "er") (fai + "t") (fai + "ts") - } in - table { - Inf => faire ; - Indic Pres Pl P2 => fai + "tes" ; - Indic Pres Pl P3 => f + "ont" ; - Subjo SPres Pl p => f + "ass" + affixSPres ! Pl ! p ; - Imper PlP2 => fai + "tes" ; - t => tfaire ! t - } ; - - auxConj3oire : (_,_,_,_ : Str) -> Verbe = \boi, buv, boiv, b -> - auxConj3re - affixSgS affixPasseU boi buv boiv b (boi + "r") (b + "u") (b + "us") ; - - auxConj3ît : Verbe -> Str -> Verbe = \conj,plaît -> - table { - Indic Pres Sg P3 => plaît ; - t => conj ! t - } ; - - conj3plaire : Str -> Verbe = \plaire -> - let { - pl = Predef.tk 4 plaire ; - tplaire = auxConj3oire (pl + "ai") (pl + "ais") (pl + "ais") pl - } in - auxConj3ît tplaire (pl + "aît") ; - - conj3connaître : Str -> Verbe = \connaître -> - let { - conn = Predef.tk 5 connaître ; - connaiss = conn + "aiss" ; - tconnaitre = - auxConj3re - affixSgS affixPasseU (conn + "ai") connaiss connaiss - conn (conn + "aîtr") (conn + "u") (conn + "us") - } in - auxConj3ît tconnaitre (conn + "aît") ; - - conj3naître : Str -> Verbe = \naître -> - let { - n = Predef.tk 5 naître ; - tnaitre = auxConj3re - affixSgS affixPasseI - (n + "ai") (n + "aiss") (n + "aiss") (n + "aqu") - (n + "aîtr") (n + "é") (n + "és") - } in - auxConj3ît tnaitre (n + "aît") ; - --- The conjugation of "paître" is defective in a curious way, especially --- if compared with "repaître". According to Bescherelle, the invariable --- past participle is only used as a term of "fauconnerie" (one would expect it --- to be defective rather than invariable). - - conj3paître : Str -> Verbe = \paître -> - let {tpaitre = conj3connaître paître} in - table { - Indic Passe _ _ => nonExist ; - Subjo SImparf _ _ => nonExist ; - Part (PPasse _ _) => Predef.tk 5 paître + "u" ; - p => tpaitre ! p - } ; - - conj3repaître = conj3connaître ; - - conj3croître : Str -> Verbe = \croître -> - let {cr = Predef.tk 5 croître} in - auxConj3re - affixSgS (affixPasse "û" "û") (cr + "oî") (cr + "oiss") - (cr + "oiss") cr (cr + "oîtr") (cr + "û") (cr + "ûs") ; - - conj3croire : Str -> Verbe = \croire -> - let {cr = Predef.tk 4 croire} in - auxConj3oire (cr + "oi") (cr + "oy") (cr + "oi") cr ; - - conj3boire : Str -> Verbe = \boire -> - let {b = Predef.tk 4 boire} in - auxConj3oire (b + "oi") (b + "uv") (b + "oiv") b ; - --- The verb "clore" shows a systematic absence of past forms, --- including the imperfect indicative. What is more capricious, is the absence --- of the plural first and second persons in the present indicative and --- the imperative. - - conj3clore : Str -> Verbe = \clore -> - let { - clo = troncVerb clore ; - clos = clo + "s" ; - tclore = auxConj3re - affixSgS affixPasseNonExist clo clos clos - nonExist (clo + "r") clos clos - } in - table { - Indic Pres Sg P3 => Predef.tk 1 clo + "ôt" ; - Indic Pres Pl P1 => nonExist ; - Indic Pres Pl P2 => nonExist ; - Indic Imparf _ _ => nonExist ; - Imper PlP1 => nonExist ; - Imper PlP2 => nonExist ; - t => tclore ! t - } ; - - conj3conclure : Str -> Verbe = \conclure -> - let { - conclu = troncVerb conclure ; - concl = Predef.tk 1 conclu - } in - auxConj3re - affixSgS affixPasseU - conclu conclu conclu concl (conclu + "r") conclu (conclu + "s") ; - - conj3absoudre : Str -> Verbe = \absoudre -> - let { - abso = Predef.tk 4 absoudre ; - tabsoudre = conj3résoudre absoudre - } in - table { - Indic Passe _ _ => nonExist ; - Subjo SImparf _ _ => nonExist ; - Part (PPasse Masc _) => abso + "us" ; - Part (PPasse Fem n) => nomReg (abso + "ute") ! n ; - p => tabsoudre ! p - } ; - - conj3résoudre : Str -> Verbe = \résoudre -> - let {reso = Predef.tk 4 résoudre} in - auxConj3re - affixSgS affixPasseU (reso + "u") (reso + "lv") (reso + "lv") - (reso + "l") (reso + "udr") (reso + "lu") (reso + "lus") ; - - conj3coudre : Str -> Verbe = \coudre -> - let { - cou = Predef.tk 3 coudre ; - cous = cou + "s" - } in - auxConj3re - affixSgSsansT affixPasseI - (cou +"d") cous cous cous (cou + "dr") (cous + "u") (cous + "us") ; - - conj3moudre : Str -> Verbe = \moudre -> - let { - mou = Predef.tk 3 moudre ; - moul = mou + "l" - } in - auxConj3re - affixSgSsansT affixPasseU - (mou + "d") moul moul moul (mou + "dr") (moul + "u") (moul + "us") ; - - conj3suivre : Str -> Verbe = \suivre -> - let { - suiv = troncVerb suivre ; - sui = Predef.tk 1 suiv ; - suivi = suiv + "i" - } in - auxConj3re - affixSgS affixPasseI sui suiv suiv suiv (suiv + "r") suivi (suivi+"s") ; - - conj3vivre : Str -> Verbe = \vivre -> - let { - viv = troncVerb vivre ; - vi = Predef.tk 1 viv ; - véc = Predef.tk 1 vi + "éc" - } in - auxConj3re - affixSgS affixPasseU vi viv viv véc (viv + "r") (véc + "u") (véc + "us") ; - - conj3lire : Str -> Verbe = \lire -> - let { - li = troncVerb lire ; - lis = li + "s" ; - l = Predef.tk 1 li - } in - auxConj3re affixSgS affixPasseU li lis lis l (li + "r") (l + "u") (l + "us") ; - - conj3dire : Str -> Verbe = \dire -> - let { - di = troncVerb dire ; - dis = di + "s" ; - dit = di + "t" ; - d = Predef.tk 1 di ; - tdire = auxConj3re - affixSgS affixPasseI di dis dis d (di + "r") dit (dit+"s") - } in - table { - Indic Pres Pl P2 => di + "tes" ; - Imper PlP2 => di + "tes" ; - t => tdire ! t - } ; - - conj3rire : Str -> Verbe = \rire -> - let { - ri = troncVerb rire ; - r = Predef.tk 1 ri - } in - auxConj3re affixSgS affixPasseI ri ri ri r (ri + "r") ri (ri+"s") ; - - auxConj3scrire : (_,_,_,_: Str) -> Verbe = \ecri, ecriv, ecrivi, ecrit -> - auxConj3re - affixSgS affixPasseI ecri ecriv ecriv ecrivi (ecri + "r") ecrit (ecrit+"s") ; - - conj3écrire : Str -> Verbe = \écrire -> - let {écri = troncVerb écrire} in - auxConj3scrire écri (écri + "v") (écri + "v") (écri + "t") ; - - conj3confire : Str -> Verbe = \confire -> - let {confi = troncVerb confire} in - auxConj3scrire confi (confi + "s") (Predef.tk 1 confi) (confi + "t") ; - - conj3cuire : Str -> Verbe = \cuire -> - let {cui = troncVerb cuire} in - auxConj3scrire cui (cui + "s") (cui + "s") (cui + "t") ; - - ---3 Very irregular verbs --- --- Here we cannot do even with the 'worst case macro'. - - conj3aller : Str -> Verbe = \aller -> - let { - s = Predef.tk 5 aller ; - pres = formesPresAi "v" "all" ; - taller = verbHabituel - "all" "all" "aill" "all" "ir" "allé" "aller" - affixSgS affixPasseA - } in - table { - Indic Pres Sg P1 => s + "vais" ; - Indic Pres n p => s + pres ! n ! p ; - Indic Imparf n p => s + "all" + affixImparf ! n ! p ; - Imper SgP2 => s + "va" ; - t => s + taller ! t - } ; - - conjÊtre : Str -> Verbe = \etre -> - let { - s = Predef.tk 4 etre ; - sg = lesAffixes "suis" "es" "est" ; - pl = lesAffixes "sommes" "êtes" "sont" ; - tetre = verbHabituel - "soi" "soy" "soi" "f" "ser" "été" "être" affixSgS affixPasseU - } in - table { - Indic Pres Sg p => s + sg ! p ; - Indic Pres Pl p => s + pl ! p ; - Indic Imparf n p => s + "ét" + affixImparf ! n ! p ; - Subjo SPres Sg p => s + "soi" + affixSgS ! p ; - Subjo SPres Pl P3 => s + "soient" ; - Subjo SPres Pl p => s + "soy" + affixPlOns ! p ; - Part PPres => s + "étant" ; - t => s + tetre ! t - } ; - - conjAvoir : Str -> Verbe = \avoir -> - let { - s = Predef.tk 5 avoir ; - pres = formesPresAi [] "av" ; - tavoir = verbHabituel - "ai" "ay" "ai" "e" "aur" "eu" "avoir" affixSgS affixPasseU - } in - table { - Indic Pres n p => s + pres ! n ! p ; - Indic Imparf n p => s + "av" + affixImparf ! n ! p ; - Subjo SPres Sg P3 => s + "ait" ; - Subjo SPres Pl P3 => s + "aient" ; - Subjo SPres Pl p => s + "ay" + affixPlOns ! p ; - Imper SgP2 => s + "aie" ; - t => s + tavoir ! t - } ; - -} diff --git a/grammars/resource/french/ResFra.gf b/grammars/resource/french/ResFra.gf deleted file mode 100644 index a80729c66..000000000 --- a/grammars/resource/french/ResFra.gf +++ /dev/null @@ -1,3 +0,0 @@ ---# -path=.:../romance:../abstract:../../prelude - -concrete ResFra of ResAbs = ResRomance with (SyntaxRomance=SyntaxFra) ; diff --git a/grammars/resource/french/SyntaxFra.gf b/grammars/resource/french/SyntaxFra.gf deleted file mode 100644 index 925d48b20..000000000 --- a/grammars/resource/french/SyntaxFra.gf +++ /dev/null @@ -1,295 +0,0 @@ ---# -path=.:../romance:../../prelude - -instance SyntaxFra of SyntaxRomance = TypesFra ** open Prelude, (CO=Coordination), MorphoFra in { - -oper - nameNounPhrase = \jean -> - normalNounPhrase - (\\c => prepCase c ++ jean.s) - jean.g - Sg ; - - chaqueDet = mkDeterminer1 Sg "chaque" ; - tousDet = mkDeterminer Pl ["tous les"] ["toutes les"] ; - plupartDet = mkDeterminer1 Pl ["la plupart des"] ; - unDet = mkDeterminer Sg "un" "une" ; - plDet = mkDeterminer1 Pl "des" ; --- - - quelDet = mkDeterminer Sg "quel" "quelle" ; - quelsDet = mkDeterminer Pl "quels" "quelles" ; - - npGenPoss = \n,ton,mec -> - \\c => prepCase c ++ ton.s ! Poss n mec.g ++ mec.s ! n ; - - mkAdjReg : Str -> Bool -> Adjective = \adj,p -> - mkAdjective (adjGrand adj) p ; - - comparConj = elisQue ; - - mkAdjDegrReg : Str -> Bool -> AdjDegr = \adj,p -> - mkAdjDegrLong (adjGrand adj) p ; - --- The commonest case for functions is common noun + "de". - - funDe : CommNounPhrase -> Function = \mere -> - mere ** complementCas genitive ; - --- Chains of "dont" - "dont" do not arise. - - funRelPron : Function -> RelPron -> RelPron = \mere,lequel -> - {s = table { - RComplex g n c => variants { - case mere.c of { --- - Gen => lequel.s ! RSimple Gen ++ - artDef mere.g n c ++ mere.s ! n ; - _ => nonExist} ; - artDef mere.g n c ++ mere.s ! n ++ - mere.s2 ++ lequel.s ! RComplex g n mere.c - } ; - _ => nonExist - } ; - g = RG mere.g - } ; - - --- Verbs - - negVerb = \va -> elisNe ++ va ++ "pas" ; - - copula = \b -> (etreNetre b).s ; - - isTransVerbClit = \v -> case v.c of { - Acc => True ; - _ => False --- hmmm - } ; - --- The "ne - pas" negation. - - posNeg = \b,v,c -> - if_then_else Str b - (v ++ c) - (elisNe ++ v ++ "pas" ++ c) ; --- exception: infinitive! - --- Exampe: 'to be or not to be'. - - etreNetre : Bool -> VerbPres = \b -> - {s = \\w => posNeg b (verbEtre.s ! w) []} ; ---- v reveals a BUG in refresh - - locativeNounPhrase = \jean -> - {s = "dans" ++ jean.s ! Ton Acc} ; - - embedConj = elisQue ; - --- Relative pronouns - - identRelPron = { - s = table { - RSimple c => relPronForms ! c ; - RComplex g n c => composRelPron g n c - } ; - g = RNoGen - } ; - - suchPron = telPron ; - - composRelPron = lequelPron ; - - allRelForms = \lequel,g,n,c -> - variants { - lequel.s ! RSimple c ; - lequel.s ! RComplex g n c - } ; - --- Interrogative pronouns - - nounIntPron = \n, mec -> - {s = \\c => prepCase c ++ quelPron mec.g n ++ mec.s ! n ; - g = mec.g ; - n = n - } ; - - intPronWho = \num -> { - s = \\c => prepCase c ++ "qui" ; - g = Masc ; --- can we decide this? - n = num - } ; - - intPronWhat = \num -> { - s = table { - Gen => ["de quoi"] ; - Acc => ["à quoi"] ; - c => elisQue - } ; - g = Masc ; --- can we decide this? - n = num - } ; - --- Questions - - questVerbPhrase = \jean,dort -> - {s = table { - DirQ => optStr (estCeQue Acc) ++ (predVerbPhrase jean dort).s ! Ind ; - IndirQ => elisSi ++ (predVerbPhrase jean dort).s ! Ind - } - } ; - - intVerbPhrase = \qui, dort -> - {s = table { - DirQ => qui.s ! Nom ++ optStr (estCeQue Nom) ++ - dort.s ! qui.g ! VFin Ind qui.n P3 ; - IndirQ => "ce" ++ qui.s ! Nom ++ dort.s ! qui.g ! VFin Ind qui.n P3 - } - } ; - - intSlash = \Qui, Tuvois -> - let {qui = Tuvois.s2 ++ Qui.s ! Tuvois.c ; tuvois = Tuvois.s ! Ind} in - {s = table { - DirQ => qui ++ optStr (estCeQue Acc) ++ tuvois ; - IndirQ => ifCe Tuvois.c ++ qui ++ tuvois - } - } ; - --- An auxiliary to distinguish between --- "je ne sais pas" ("ce qui dort" / "ce que tu veux" / "à qui tu penses"). - - ifCe : Case -> Str = \c -> case c of { - Nom => "ce" ; - Acc => "ce" ; - _ => [] - } ; - - questAdverbial = \quand, jean, dort -> - let {jeandort = (predVerbPhrase jean dort).s ! Ind} in - {s = table { - DirQ => quand.s ++ optStr (estCeQue Acc) ++ jeandort ; - IndirQ => quand.s ++ jeandort - } - } ; - ------ moved from Morpho - ---2 Articles --- --- A macro for defining gender-dependent tables will be useful. --- Its first application is in the indefinite article. --- --- Notice that the plural genitive is special: "de femmes". - - genForms : Str -> Str -> Gender => Str = \bon,bonne -> - table {Masc => bon ; Fem => bonne} ; - - artIndef = \g,n,c -> case of { - => prepCase c ++ genForms "un" "une" ! g ; - => elisDe ; - _ => prepCase c ++ "des" - } ; - - artDef = \g,n,c -> artDefTable ! g ! n ! c ; - - pronJe = mkPronoun - (elision "j") - (elision "m") - (elision "m") - "moi" - "mon" (elisPoss "m") "mes" - PNoGen -- gender cannot be known from pronoun alone - Sg - P1 - Clit1 ; - - pronTu = mkPronoun - "tu" - (elision "t") - (elision "t") - "toi" - "ton" (elisPoss "t") "tes" - PNoGen - Sg - P2 - Clit1 ; - - pronIl = mkPronoun - "il" - (elision "l") - "lui" - "lui" - "son" (elisPoss "s") "ses" - (PGen Masc) - Sg - P3 - Clit2 ; - - pronElle = mkPronoun - "elle" - elisLa - "lui" - "elle" - "son" (elisPoss "s") "ses" - (PGen Fem) - Sg - P3 - Clit2 ; - - pronNous = mkPronoun - "nous" - "nous" - "nous" - "nous" - "notre" "notre" "nos" - PNoGen - Pl - P1 - Clit3 ; - - pronVous = mkPronoun - "vous" - "vous" - "vous" - "vous" - "votre" "votre" "vos" - PNoGen - Pl --- depends! - P2 - Clit3 ; - - pronIls = mkPronoun - "ils" - "les" - "leur" - "eux" - "leur" "leur" "leurs" - (PGen Masc) - Pl - P3 - Clit1 ; - - pronElles = mkPronoun - "elles" - "les" - "leur" - "elles" - "leur" "leur" "leurs" - (PGen Fem) - Pl - P3 - Clit1 ; - --- moved from ResFra - - commentAdv = ss "comment" ; - quandAdv = ss "quand" ; - ouAdv = ss "où" ; - pourquoiAdv = ss "pourquoi" ; - - etConj = ss "et" ** {n = Pl} ; - ouConj = ss "ou" ** {n = Sg} ; - etetConj = sd2 "et" "et" ** {n = Pl} ; - ououConj = sd2 "ou" "ou" ** {n = Sg} ; - niniConj = sd2 "ni" "ni" ** {n = Sg} ; --- requires ne ! - siSubj = ss elisSi ; - quandSubj = ss "quand" ; - - ouiPhr = ss ["Oui ."] ; - nonPhr = ss ["Non ."] ; --- and also Si! - -} diff --git a/grammars/resource/french/TestFra.gf b/grammars/resource/french/TestFra.gf deleted file mode 100644 index 7193a6d5c..000000000 --- a/grammars/resource/french/TestFra.gf +++ /dev/null @@ -1,34 +0,0 @@ ---# -path=.:../romance:../abstract:../../prelude - -concrete TestFra of TestAbs = ResFra ** open Prelude, TypesFra, MorphoFra, SyntaxFra in { - -flags startcat=Phr ; lexer=text ; parser=chart ; unlexer=text ; - -lin - Big = mkAdjDegrReg "grand" adjPre ; - Small = mkAdjDegrReg "petit" adjPre ; - Old = mkAdjDegrLong (mkAdj "vieux" "vieux" "vieille") adjPre ; - Young = mkAdjDegrLong (adjJeune "jeune") adjPre ; - Man = mkCNomReg "homme" Masc ; - Woman = mkCNomReg "femme" Fem ; - Car = mkCNomReg "voiture" Fem ; - Light = mkCNomReg "lumière" Fem ; - House = mkCNomReg "maison" Fem ; - Walk = verbPres (conj1aimer "marcher") ; - Run = verbPres (conj3courir "courir") ; - Send = mkTransVerbDir (verbPres (conj1envoyer "envoyer")) ; - Love = mkTransVerbDir (verbPres (conj1aimer "aimer")) ; - Wait = mkTransVerbDir (verbPres (conj3rendre "attendre")) ; - Say = verbSent (verbPres (conj3dire "dire")) Ind Ind ; - Prove = verbSent (verbPres (conj1aimer "démontrer")) Ind Ind ; - SwitchOn = mkTransVerbDir (verbPres (conj1aimer "allumer")) ; - SwitchOff = mkTransVerbDir (verbPres (conj3peindre "éteindre")) ; - Mother = funDe (mkCNomReg "mère" Fem) ; - Uncle = funDe (mkCNomReg "oncle" Masc) ; - - Well = ss "bien" ; - Always = ss "toujours" ; - - John = mkProperName "Jean" Masc ; - Mary = mkProperName "Marie" Fem ; -} diff --git a/grammars/resource/french/TypesFra.gf b/grammars/resource/french/TypesFra.gf deleted file mode 100644 index 71c12a437..000000000 --- a/grammars/resource/french/TypesFra.gf +++ /dev/null @@ -1,160 +0,0 @@ ---1 French Word Classes and Morphological Parameters --- --- This is a resource module for Italian morphology, defining the --- morphological parameters and word classes of Italian. --- The morphology is so far only --- complete w.r.t. the syntax part of the resource grammar. --- It does not include those parameters that are not needed for --- analysing individual words: such parameters are defined in syntax modules. - -instance TypesFra of TypesRomance = { - --- Now we can give values to the abstract types. - -param - Case = Nom | Acc | Gen | Dat ; -- corresp. to prepositions de and à - - NPForm = Ton Case | Aton Case | Poss Number Gender ; - -oper - CaseA = Case ; - NPFormA = NPForm ; - - nominative = Nom ; - accusative = Acc ; - genitive = Gen ; - dative = Dat ; - - stressed = Ton ; - unstressed = Aton ; - -------------------------- move this somewhere else! ---2 Some phonology --- ---3 Elision --- --- The phonological rule of *elision* can be defined as follows in GF. --- There is one thing that is not treated properly: the "h aspiré", --- which is not separated orthographically from the "h muet". --- Our definition works correctly only for the "h muet". - -oper - voyelle : Strs = strs { - "a" ; "â" ; "à" ; "e" ; "ê" ; "é" ; "è" ; - "h" ; - "i" ; "î" ; "o" ; "ô" ; "u" ; "û" ; "y" - } ; - - elision : Str -> Str = \d -> d + pre {"e" ; "'" / voyelle} ; - --- The following morphemes are the most common uses of elision. - - elisDe = elision "d" ; - elisLa = pre {"la" ; "l'" / voyelle} ; - elisLe = elision "l" ; - elisNe = elision "n" ; - elisQue = elision "qu" ; - --- The subjunction "si" has a special kind of elision. The rule is --- only approximatively correct, for "si" is not really elided before --- the string "il" in general, but before the pronouns "il" and "ils". - - elisSi = pre {"si" ; "s'" / strs {"il"}} ; - - ---2 Prepositions --- --- The type $Cas$ in $types.Fra.gf$ has the dative and genitive --- cases, which are relevant for pronouns and the definite article, --- but which are otherwise expressed by prepositions. - - prepCase = \c -> case c of { - Nom => [] ; - Acc => [] ; - Gen => elisDe ; - Dat => "à" - } ; - ---2 Relative pronouns --- --- The simple (atonic) relative pronoun shows genuine variation in all of the --- cases. - - relPronForms = table { - Nom => "qui" ; Gen => "dont" ; Dat => ["à qui"] ; Acc => elisQue - } ; - --- Usually the comparison forms are built by prefixing the word --- "plus". The definite article needed in the superlative is provided in --- $syntax.Fra.gf$. - - adjCompLong : Adj -> AdjComp = \cher -> - mkAdjComp - cher.s - (\\g,n => "plus" ++ cher.s ! g ! n) ; - --- Comparative adjectives are only sometimes formed morphologically --- (actually: by different morphemes). - - mkAdjComp : (_,_ : Gender => Number => Str) -> AdjComp = - \bon, meilleur -> - {s = table {Pos => bon ; _ => meilleur}} ; - ------------------------------- - --- Their inflection tables has tonic and atonic forms, as well as --- the possessive forms, which are inflected like determiners. --- --- Example: "lui, de lui, à lui" - "il,le,lui" - "son,sa,ses". - --- --- Examples of each: "Jean" ; "je"/"te" ; "il"/"elle"/"ils"/"elles" ; "nous"/"vous". - --- The following coercions are useful: - -oper - pform2case = \p -> case p of { - Ton x => x ; - Aton x => x ; - Poss _ _ => Gen - } ; - - case2pform = \c -> case c of { - Nom => Aton Nom ; - Acc => Aton Acc ; - _ => Ton c - } ; - --- Relative pronouns: the case-dependent parameter type. - - param RelForm = RSimple Case | RComplex Gender Number Case ; - - oper RelFormA = RelForm ; - --- Verbs: conversion from full verbs to present-tense verbs. - - verbPres = \aller -> {s = table { - VInfin => aller ! Inf ; - VFin Ind n p => aller ! Indic Pres n p ; - VFin Sub n p => aller ! Subjo SPres n p ; - VImper np => aller ! Imper np - }} ; - --- The full conjunction is a table on $VForm$: - -param - Temps = Pres | Imparf | Passe | Futur ; - TSubj = SPres | SImparf ; - TPart = PPres | PPasse Gender Number ; - VForm = Inf - | Indic Temps Number Person - | Cond Number Person - | Subjo TSubj Number Person - | Imper NumPersI - | Part TPart ; - --- This is the full verb type. - -oper - Verbum : Type = VForm => Str ; -} diff --git a/grammars/resource/german/DatabaseDeu.gf b/grammars/resource/german/DatabaseDeu.gf deleted file mode 100644 index b5f41969d..000000000 --- a/grammars/resource/german/DatabaseDeu.gf +++ /dev/null @@ -1,54 +0,0 @@ ---# -path=.:../abstract:../../prelude - -concrete DatabaseDeu of Database = - open Prelude,Syntax,Deutsch,Predication,Paradigms,DatabaseRes in { - -flags lexer=text ; unlexer=text ; - -lincat - Phras = SS1 Bool ; -- long or short form - Subject = NP ; - Noun = CN ; - Property = AP ; - Comparison = AdjDeg ; - Relation = Adj2 ; - Feature = Fun ; - Value = NP ; - Name = PN ; - -lin - LongForm sent = ss (sent.s ! True ++ "?") ; - ShortForm sent = ss (sent.s ! False ++ "?") ; - - WhichAre A B = mkSent (defaultQuestion (IntVP (NounIPMany A) (PosA B))) - (defaultNounPhrase (IndefManyNP (ModAdj B A))) ; - - IsIt Q A = mkSentSame (defaultQuestion (QuestVP Q (PosA A))) ; - - MoreThan = ComparAdjP ; - TheMost = SuperlNP ; - Relatively C _ = PositAdjP C ; - - RelatedTo = ComplAdj ; - - FeatureOf = appFun1 ; - ValueOf F V = appFun1 F (UsePN V) ; - - WithProperty A B = ModAdj B A ; - - Individual n = nameNounPhrase n ** {lock_NP = <>} ; - - AllN = DetNP AllDet ; - MostN = DetNP MostDet ; - EveryN = DetNP EveryDet ; - --- only these are language-dependent - - Any n = detNounPhrase einDet n ** {lock_NP = <>} ; - - IsThere A = mkSentPrel ["gibt es"] (defaultNounPhrase (IndefOneNP A)) ; - AreThere A = mkSentPrel ["gibt es"] (defaultNounPhrase (IndefManyNP A)) ; - - WhatIs V = mkSentPrel ["was ist"] (defaultNounPhrase V) ; - -} ; diff --git a/grammars/resource/german/DatabaseRes.gf b/grammars/resource/german/DatabaseRes.gf deleted file mode 100644 index 57bac16ac..000000000 --- a/grammars/resource/german/DatabaseRes.gf +++ /dev/null @@ -1,11 +0,0 @@ -resource DatabaseRes = open Prelude in { -oper - mkSent : SS -> SS -> SS1 Bool = \long, short -> - {s = table {b => if_then_else Str b long.s short.s}} ; - - mkSentPrel : Str -> SS -> SS1 Bool = \prel, matter -> - mkSent (ss (prel ++ matter.s)) matter ; - - mkSentSame : SS -> SS1 Bool = \s -> - mkSent s s ; -} ; diff --git a/grammars/resource/german/Deutsch.gf b/grammars/resource/german/Deutsch.gf deleted file mode 100644 index 4a91ad219..000000000 --- a/grammars/resource/german/Deutsch.gf +++ /dev/null @@ -1 +0,0 @@ -resource Deutsch = reuse ResDeu ; diff --git a/grammars/resource/german/Logical.gf b/grammars/resource/german/Logical.gf deleted file mode 100644 index b6d3b524b..000000000 --- a/grammars/resource/german/Logical.gf +++ /dev/null @@ -1,26 +0,0 @@ ---# -path=.:../abstract:../../prelude - --- Slightly ad hoc and formal negation and connectives. - -resource Logical = Predication ** open Deutsch, Paradigms in { - - oper - negS : S -> S ; -- es ist nicht der Fall, dass S - univS : CN -> S -> S ; -- für alle CNs gilt es, dass S - existS : CN -> S -> S ; -- es gibt ein CN derart, dass S - existManyS : CN -> S -> S ; -- es gibt CNs derart, dass S ---. - - negS = \A -> - PredVP ItNP (NegNP (DefOneNP (CNthatS (UseN (nRaum "Fall" "Fälle")) A))) ; - univS = \A,B -> - PredVP ItNP - (AdvVP (PosVS (mkV "gelten" "gilt" "gelte" "gegolten" ** {lock_VS = <>}) B) - (mkPP accusative "für" (DetNP AllDet A))) ; - existS = \A,B -> - PredVP ItNP (PosTV (tvDir (mkV "geben" "gibt" "gib" "gegeben")) - (IndefOneNP (ModRC A (RelSuch B)))) ; - existManyS = \A,B -> - PredVP ItNP (PosTV (tvDir (mkV "geben" "gibt" "gib" "gegeben")) - (IndefManyNP (ModRC A (RelSuch B)))) ; -} ; diff --git a/grammars/resource/german/Morpho.gf b/grammars/resource/german/Morpho.gf deleted file mode 100644 index f62c2fcf5..000000000 --- a/grammars/resource/german/Morpho.gf +++ /dev/null @@ -1,398 +0,0 @@ ---1 A Simple German 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.Deu.gf$. - -resource Morpho = Types ** open (Predef=Predef), Prelude in { - ---2 Nouns --- --- For conciseness and abstraction, we define a method for --- generating a case-dependent table from a list of four forms. - -oper - caselist : (_,_,_,_ : Str) -> Case => Str = \n,a,d,g -> table { - Nom => n ; Acc => a ; Dat => d ; Gen => g} ; - --- The *worst-case macro* for common nouns needs six forms: all plural forms --- are always the same except for the dative. - - mkNoun : (_,_,_,_,_,_ : Str) -> Gender -> CommNoun = - \mann, mannen, manne, mannes, männer, männern, g -> {s = table { - Sg => caselist mann mannen manne mannes ; - Pl => caselist männer männer männern männer - } ; g = g} ; - --- But we never need all the six forms at the same time. Often --- we need just two, three, or four forms. - - mkNoun4 : (_,_,_,_ : Str) -> Gender -> CommNoun = \kuh,kuhes,kühe,kühen -> - mkNoun kuh kuh kuh kuhes kühe kühen ; - - mkNoun3 : (_,_,_ : Str) -> Gender -> CommNoun = \kuh,kühe,kühen -> - mkNoun kuh kuh kuh kuh kühe kühen ; - - mkNoun2n : (_,_ : Str) -> Gender -> CommNoun = \zahl, zahlen -> - mkNoun3 zahl zahlen zahlen ; - - mkNoun2es : (_,_ : Str) -> Gender -> CommNoun = \wort, wörter -> - mkNoun wort wort wort (wort + "es") wörter (wörter + "n") ; - - mkNoun2s : (_,_ : Str) -> Gender -> CommNoun = \vater, väter -> - mkNoun vater vater vater (vater + "s") väter (väter + "n") ; - - mkNoun2ses : (_,_ : Str) -> Gender -> CommNoun = \wort,wörter -> - mkNoun wort wort wort (wort + variants {"es" ; "s"}) wörter (wörter + "n") ; - --- Here are the school grammar declensions with their commonest variations. --- Unfortunately we cannot define *Umlaut* in GF, but have to give two forms. --- --- First declension, with plural "en"/"n", including weak masculins: - - declN1 : Str -> CommNoun = \zahl -> - mkNoun2n zahl (zahl + "en") Fem ; - - declN1e : Str -> CommNoun = \stufe -> - mkNoun2n stufe (stufe + "n") Fem ; - - declN1M : Str -> CommNoun = \junge -> let {jungen = junge + "n"} in - mkNoun junge jungen jungen jungen jungen jungen Masc ; - - declN1eM : Str -> CommNoun = \soldat -> let {soldaten = soldat + "en"} in - mkNoun soldat soldaten soldaten soldaten soldaten soldaten Masc ; - --- Second declension, with plural "e": - - declN2 : Str -> CommNoun = \punkt -> - mkNoun2es punkt (punkt+"e") Masc ; - - declN2i : Str -> CommNoun = \onkel -> - mkNoun2s onkel onkel Masc ; - - declN2u : (_,_ : Str) -> CommNoun = \raum,räume -> - mkNoun2es raum räume Masc ; - - declN2uF : (_,_ : Str) -> CommNoun = \kuh,kühe -> - mkNoun3 kuh kühe (kühe + "n") Fem ; - --- Third declension, with plural "er": - - declN3 : Str -> CommNoun = \punkt -> - mkNoun2es punkt (punkt+"er") Neut ; - - declN3u : (_,_ : Str) -> CommNoun = \buch,bücher -> - mkNoun2ses buch bücher Neut ; - - declN3uS : (_,_ : Str) -> CommNoun = \haus,häuser -> - mkNoun2es haus häuser Neut ; - --- Plural with "s": - - declNs : Str -> CommNoun = \restaurant -> - mkNoun3 restaurant (restaurant+"s") (restaurant+"s") Neut ; - - ---2 Pronouns --- --- Here we define personal and relative pronouns. --- All personal pronouns, except "ihr", conform to the simple --- pattern $mkPronPers$. - - ProPN = {s : NPForm => Str ; n : Number ; p : Person} ; - - mkPronPers : (_,_,_,_,_ : Str) -> Number -> Person -> ProPN = - \ich,mich,mir,meines,mein,n,p -> { - s = table { - NPCase c => caselist ich mich mir meines ! c ; - NPPoss gn c => mein + pronEnding ! gn ! c - } ; - n = n ; - p = p - } ; - - pronEnding : GenNum => Case => Str = table { - GSg Masc => caselist "" "en" "em" "es" ; - GSg Fem => caselist "e" "e" "er" "er" ; - GSg Neut => caselist "" "" "em" "es" ; - GPl => caselist "e" "e" "en" "er" - } ; - - pronIch = mkPronPers "ich" "mich" "mir" "meines" "mein" Sg P1 ; - pronDu = mkPronPers "du" "dich" "dir" "deines" "dein" Sg P2 ; - pronEr = mkPronPers "er" "ihn" "ihm" "seines" "sein" Sg P3 ; - pronSie = mkPronPers "sie" "sie" "ihr" "ihres" "ihr" Sg P3 ; - pronEs = mkPronPers "es" "es" "ihm" "seines" "sein" Sg P3 ; - pronWir = mkPronPers "wir" "uns" "uns" "unser" "unser" Pl P1 ; - - pronSiePl = mkPronPers "sie" "sie" "ihnen" "ihrer" "ihr" Pl P3 ; - pronSSie = mkPronPers "Sie" "Sie" "Ihnen" "Ihrer" "Ihr" Pl P3 ; --- - --- We still have wrong agreement with the complement of the polite "Sie": --- it is in plural, like the verb, although it should be in singular. - --- The peculiarity with "ihr" is the presence of "e" in forms without an ending. - - pronIhr = - {s = table { - NPPoss (GSg Masc) Nom => "euer" ; - NPPoss (GSg Neut) Nom => "euer" ; - NPPoss (GSg Neut) Acc => "euer" ; - pf => (mkPronPers "ihr" "euch" "euch" "euer" "eur" Pl P2).s ! pf - } ; - n = Pl ; - p = P2 - } ; - --- Relative pronouns are like the definite article, except in the genitive and --- the plural dative. The function $artDef$ will be defined right below. - - RelPron : Type = {s : GenNum => Case => Str} ; - - relPron : RelPron = {s = \\gn,c => - case of { - => "deren" ; - => "dessen" ; - => "denen" ; - => "deren" ; - _ => artDef ! gn ! c - } - } ; - - ---2 Articles --- --- Here are all forms the indefinite and definite article. --- The indefinite article is like a large class of pronouns. --- The definite article is more peculiar; we don't try to --- subsume it to any general rule. - - artIndef : Gender => Case => Str = \\g,c => "ein" + pronEnding ! GSg g ! c ; - - artDef : GenNum => Case => Str = table { - GSg Masc => caselist "der" "den" "dem" "des" ; - GSg Fem => caselist "die" "die" "der" "der" ; - GSg Neut => caselist "das" "das" "dem" "des" ; - GPl => caselist "die" "die" "den" "der" - } ; - - ---2 Adjectives --- --- As explained in $types.Deu.gf$, it --- would be superfluous to use the cross product of gender and number, --- since there is no gender distinction in the plural. But it is handy to have --- a function that constructs gender-number complexes. - - gNumber : Gender -> Number -> GenNum = \g,n -> - case n of { - Sg => GSg g ; - Pl => GPl - } ; - --- It's also handy to have a function that finds out the number from such a complex. - - numGenNum : GenNum -> Number = \gn -> - case gn of { - GSg _ => Sg ; - GPl => Pl - } ; - --- This function costructs parameters in the complex type of adjective forms. - - aMod : Adjf -> Gender -> Number -> Case -> AForm = \a,g,n,c -> - AMod a (gNumber g n) c ; - --- The worst-case macro for adjectives (positive degree) only needs --- two forms. - - mkAdjective : (_,_ : Str) -> Adjective = \böse,bös -> {s = table { - APred => böse ; - AMod Strong (GSg Masc) c => - caselist (bös+"er") (bös+"en") (bös+"em") (bös+"es") ! c ; - AMod Strong (GSg Fem) c => - caselist (bös+"e") (bös+"e") (bös+"er") (bös+"er") ! c ; - AMod Strong (GSg Neut) c => - caselist (bös+"es") (bös+"es") (bös+"em") (bös+"es") ! c ; - AMod Strong GPl c => - caselist (bös+"e") (bös+"e") (bös+"en") (bös+"er") ! c ; - AMod Weak (GSg g) c => case of { - <_,Nom> => bös+"e" ; - => bös+"en" ; - <_,Acc> => bös+"e" ; - _ => bös+"en" } ; - AMod Weak GPl c => bös+"en" - }} ; - --- Here are some classes of adjectives: - - adjReg : Str -> Adjective = \gut -> mkAdjective gut gut ; - adjE : Str -> Adjective = \bös -> mkAdjective (bös+"e") bös ; - adjEr : Str -> Adjective = \teu -> mkAdjective (teu+"er") (teu+"r") ; - adjInvar : Str -> Adjective = \prima -> {s = table {_ => prima}} ; - --- The first three classes can be recognized from the end of the word, depending --- on if it is "e", "er", or something else. - - adjGen : Str -> Adjective = \gut -> let { - er = Predef.dp 2 gut ; - teu = Predef.tk 2 gut ; - e = Predef.dp 1 gut ; - bös = Predef.tk 1 gut - } in - ifTok Adjective er "er" (adjEr teu) ( - ifTok Adjective e "e" (adjE bös) ( - (adjReg gut))) ; - - --- The comparison of adjectives needs three adjectives in the worst case. - - mkAdjComp : (_,_,_ : Adjective) -> AdjComp = \gut,besser,best -> - {s = table {Pos => gut.s ; Comp => besser.s ; Sup => best.s}} ; - --- It can be done by just three strings, if each of the comparison --- forms taken separately is a regular adjective. - - adjCompReg3 : (_,_,_ : Str) -> AdjComp = \gut,besser,best -> - mkAdjComp (adjReg gut) (adjReg besser) (adjReg best) ; - --- If also the comparison forms are regular, one string is enough. - - adjCompReg : Str -> AdjComp = \billig -> - adjCompReg3 billig (billig+"er") (billig+"st") ; - - ---2 Verbs --- --- We limit ourselves to verbs in present tense infinitive, indicative, --- and imperative, and past participle. Other forms will be introduced later. --- --- The worst-case macro needs three forms: the infinitive, the third person --- singular indicative, and the second person singular imperative. --- We take care of the special cases "ten", "sen", "ln", "rn". --- --- A famous law about Germanic languages says that plural first and third person --- are similar. - - mkVerbum : (_,_,_,_ : Str) -> Verbum = \geben, gib, gb, gegeben -> - let { - en = Predef.dp 2 geben ; - geb = ifTok Tok (Predef.tk 1 en) "e" (Predef.tk 2 geben)(Predef.tk 1 geben) ; - gebt = ifTok Tok (Predef.dp 1 geb) "t" (geb + "et") (geb + "t") ; - gibst = ifTok Tok (Predef.dp 1 gib) "s" (gib + "t") (gib + "st") ; - gegebener = (adjReg gegeben).s - } in table { - VInf => geben ; - VInd Sg P1 => geb + "e" ; - VInd Sg P2 => gibst ; - VInd Sg P3 => gib + "t" ; - VInd Pl P2 => gebt ; - VInd Pl _ => geben ; -- the famous law - VImp Sg => gb ; - VImp Pl => gebt ; - VPart a => gegebener ! a - } ; - --- Regular verbs: - - regVerb : Str -> Verbum = \legen -> - let {lege = ifTok Tok (Predef.dp 3 legen) "ten" (Predef.tk 1 legen) ( - ifTok Tok (Predef.dp 2 legen) "en" (Predef.tk 2 legen) ( - Predef.tk 1 legen))} in - mkVerbum legen lege lege ("ge" + (lege + "t")) ; - --- Verbs ending with "t"; now recognized in $mkVerbum$. - - verbWarten : Str -> Verbum = regVerb ; - --- Verbs with Umlaut in the second and third person singular and imperative: - - verbSehen : Str -> Str -> Str -> Verbum = \sehen, sieht, gesehen -> - let {sieh = Predef.tk 1 sieht} in mkVerbum sehen sieh sieh gesehen ; - --- Verbs with Umlaut in the second and third person singular but not imperative: - - verbLaufen : Str -> Str -> Str -> Verbum = \laufen, läuft, gelaufen -> - let {läuf = Predef.tk 1 läuft ; laufe = Predef.tk 1 laufen} - in mkVerbum laufen läuf laufe gelaufen ; - --- The verb "be": - - verbumSein : Verbum = let { - gewesen = (adjReg "gewesen").s - } in - table { - VInf => "sein" ; - VInd Sg P1 => "bin" ; - VInd Sg P2 => "bist" ; - VInd Sg P3 => "ist" ; - VInd Pl P2 => "seid" ; - VInd Pl _ => "sind" ; - VImp Sg => "sei" ; - VImp Pl => "seiet" ; - VPart a => gewesen ! a - } ; - --- The verb "have": - - verbumHaben : Verbum = let { - haben = (regVerb "haben") - } in - table { - VInd Sg P2 => "hast" ; - VInd Sg P3 => "hat" ; - v => haben ! v - } ; - --- The verb "become", used as the passive auxiliary: - - verbumWerden : Verbum = let { - werden = regVerb "werden" ; - geworden = (adjReg "geworden").s - } in - table { - VInd Sg P2 => "wirst" ; - VInd Sg P3 => "wird" ; - VPart a => geworden ! a ; - v => werden ! v - } ; - --- A *full verb* ($Verb$) consists of the inflection forms ($Verbum$) and --- a *particle* (e.g. "aus-sehen"). Simple verbs are the ones that have no --- such particle. - - mkVerb : Verbum -> Particle -> Verb = \v,p -> {s = v ; s2 = p} ; - - mkVerbSimple : Verbum -> Verb = \v -> mkVerb v [] ; - - verbSein = mkVerbSimple verbumSein ; - verbHaben = mkVerbSimple verbumHaben ; - verbWerden = mkVerbSimple verbumWerden ; - -{- - -- tests for optimizer - verbumSein2 : Verbum = - table { - VInf => "sein" ; - VInd Sg P1 => "bin" ; - VInd Sg P2 => "bist" ; - VInd Sg P3 => "ist" ; - VInd Pl P2 => "seid" ; - VInd Pl _ => "sind" ; - VImp Sg => "sei" ; - VImp Pl => "seiet" ; - VPart a => (adjReg "gewesen").s ! a - } ; - - verbumHaben2 : Verbum = - table { - VInd Sg P2 => "hast" ; - VInd Sg P3 => "hat" ; - v => regVerb "haben" ! v - } ; --} - -} ; diff --git a/grammars/resource/german/Paradigms.gf b/grammars/resource/german/Paradigms.gf deleted file mode 100644 index 1bfeb3fe6..000000000 --- a/grammars/resource/german/Paradigms.gf +++ /dev/null @@ -1,310 +0,0 @@ ---# -path=.:../abstract:../../prelude - ---1 German 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, $resource.Abs.gf$. --- --- The main difference with $morpho.Deu.gf$ is that the types --- referred to are compiled resource grammar types. We have moreover --- had the design principle of always having existing forms as string --- arguments of the paradigms, not stems. --- --- The following modules are presupposed: - -resource Paradigms = open (Predef=Predef), Prelude, (Morpho=Morpho), Syntax, Deutsch in { - - ---2 Parameters --- --- To abstract over gender names, we define the following identifiers. - -oper - masculine : Gender ; - feminine : Gender ; - neuter : Gender ; - --- To abstract over case names, we define the following. - - nominative : Case ; - accusative : Case ; - dative : Case ; - genitive : Case ; - --- To abstract over number names, we define the following. - - singular : Number ; - plural : Number ; - - ---2 Nouns - --- Worst case: give all four singular forms, two plural forms (others + dative), --- and the gender. - - mkN : (_,_,_,_,_,_ : Str) -> Gender -> N ; - -- mann, mann, manne, mannes, männer, männern - --- Often it is enough with singular and plural nominatives, and singular --- genitive. The plural dative --- is computed by the heuristic that it is the same as the nominative this --- ends with "n" or "s", otherwise "n" is added. - - nGen : Str -> Str -> Str -> Gender -> N ; -- punkt,punktes,punkt - --- Here are some common patterns. Singular nominative or two nominatives are needed. --- Two forms are needed in case of Umlaut, which would be complicated to define. --- For the same reason, we have separate patterns for multisyllable stems. --- --- The weak masculine pattern $nSoldat$ avoids duplicating the final "e". - - nRaum : (_,_ : Str) -> N ; -- Raum, (Raumes,) Räume (masc) - nTisch : Str -> N ; -- Tisch, (Tisches, Tische) (masc) - nVater : (_,_ : Str) -> N ; -- Vater, (Vaters,) Väter (masc) - nFehler : Str -> N ; -- Fehler, (fehlers, Fehler) (masc) - nSoldat : Str -> N ; -- Soldat (, Soldaten) ; Kunde (, Kunden) (masc) - --- Neuter patterns. - - nBuch : (_,_ : Str) -> N ; -- Buch, (Buches, Bücher) (neut) - nMesser : Str -> N ; -- Messer, (Messers, Messer) (neut) - nAuto : Str -> N ; -- Auto, (Autos, Autos) (neut) - --- Feminine patterns. Duplicated "e" is avoided in $nFrau$. - - nHand : (_,_ : Str) -> N ; -- Hand, Hände; Mutter, Mütter (fem) - nFrau : Str -> N ; -- Frau (, Frauen) ; Wiese (, Wiesen) (fem) - - --- Nouns used as functions need a preposition. The most common is "von". - - mkFun : N -> Preposition -> Case -> Fun ; - funVon : N -> Fun ; - --- Proper names, with their possibly --- irregular genitive. The regular genitive is "s", omitted after "s". - - mkPN : (karolus, karoli : Str) -> PN ; -- karolus, karoli - pnReg : (Johann : Str) -> PN ; -- Johann, Johanns ; Johannes, Johannes - --- On the top level, it is maybe $CN$ that is used rather than $N$, and --- $NP$ rather than $PN$. - - mkCN : N -> CN ; - mkNP : (karolus,karoli : Str) -> NP ; - - npReg : Str -> NP ; -- Johann, Johanns - --- In some cases, you may want to make a complex $CN$ into a function. - - mkFunCN : CN -> Preposition -> Case -> Fun ; - funVonCN : CN -> Fun ; - - ---2 Adjectives - --- Non-comparison one-place adjectives need two forms in the worst case: --- the one in predication and the one before the ending "e". - - mkAdj1 : (teuer,teur : Str) -> Adj1 ; - --- Invariable adjective are a special case. - - adjInvar : Str -> Adj1 ; -- prima - --- The following heuristic recognizes the the end of the word, and builds --- the second form depending on if it is "e", "er", or something else. --- N.B. a contraction is made with "er", which works for "teuer" but not --- for "bitter". - - adjGen : Str -> Adj1 ; -- gut; teuer; böse - --- Two-place adjectives need a preposition and a case as extra arguments. - - mkAdj2 : Adj1 -> Str -> Case -> Adj2 ; -- teilbar, durch, acc - --- Comparison adjectives may need three adjective, corresponding to the --- three comparison forms. - - mkAdjDeg : (gut,besser,best : Adj1) -> AdjDeg ; - --- In many cases, each of these adjectives is itself regular. Then we only --- need three strings. Notice that contraction with "er" is not performed --- ("bessere", not "bessre"). - - aDeg3 : (gut,besser,best : Str) -> AdjDeg ; - --- In the completely regular case, the comparison forms are constructed by --- the endings "er" and "st". - - aReg : Str -> AdjDeg ; -- billig, billiger, billigst - --- The past participle of a verb can be used as an adjective. - - aPastPart : V -> Adj1 ; -- gefangen - --- On top level, there are adjectival phrases. The most common case is --- just to use a one-place adjective. The variation in $adjGen$ is taken --- into account. - - apReg : Str -> AP ; - - ---2 Verbs --- --- The fragment only has present tense so far, but in all persons. --- It also has the infinitive and the past participles. --- The worst case macro needs four forms: : the infinitive and --- the third person singular (where Umlaut may occur), the singular imperative, --- and the past participle. --- --- The function recognizes if the stem ends with "s" or "t" and performs the --- appropriate contractions. - - mkV : (_,_,_,_ : Str) -> V ; -- geben, gibt, gib, gegeben - --- Regular verbs are those where no Umlaut occurs. - - vReg : Str -> V ; -- kommen - --- The verbs 'be' and 'have' are special. - - vSein : V ; - vHaben : V ; - --- Verbs with a detachable particle, with regular ones as a special case. - - vPart : (_,_,_,_,_ : Str) -> V ; -- sehen, sieht, sieh, gesehen, aus - vPartReg : (_,_ : Str) -> V ; -- bringen, um - --- Two-place verbs, and the special case with direct object. Notice that --- a particle can be included in a $V$. - - mkTV : V -> Str -> Case -> TV ; -- hören, zu, dative - - tvReg : Str -> Str -> Case -> TV ; -- hören, zu, dative - tvDir : V -> TV ; -- umbringen - tvDirReg : Str -> TV ; -- lieben - --- Three-place verbs require two prepositions and cases. - - mkV3 : V -> Str -> Case -> Str -> Case -> V3 ; -- geben,[],dative,[],accusative - - ---2 Adverbials --- --- Adverbials for modifying verbs, adjectives, and sentences can be formed --- from strings. - - mkAdV : Str -> AdV ; - mkAdA : Str -> AdA ; - mkAdS : Str -> AdS ; - --- Prepositional phrases are another productive form of adverbials. - - mkPP : Case -> Str -> NP -> AdV ; - --- The definitions should not bother the user of the API. So they are --- hidden from the document. ---. - - - masculine = Masc ; - feminine = Fem ; - neuter = Neut ; - nominative = Nom ; - accusative = Acc ; - dative = Dat ; - genitive = Gen ; - -- singular defined in Types - -- plural defined in Types - - mkN a b c d e f g = mkNoun a b c d e f g ** {lock_N = <>} ; - - nGen = \punkt, punktes, punkte, g -> let { - e = Predef.dp 1 punkte ; - eqy = ifTok N e ; - noN = mkNoun4 punkt punktes punkte punkte g ** {lock_N = <>} - } in - eqy "n" noN ( - eqy "s" noN ( - mkNoun4 punkt punktes punkte (punkte+"n") g ** {lock_N = <>})) ; - - nRaum = \raum, räume -> nGen raum (raum + "es") räume masculine ; - nTisch = \tisch -> - mkNoun4 tisch (tisch + "es") (tisch + "e") (tisch +"en") masculine ** - {lock_N = <>}; - nVater = \vater, väter -> nGen vater (vater + "s") väter masculine ; - nFehler = \fehler -> nVater fehler fehler ; - - nSoldat = \soldat -> let { - e = Predef.dp 1 soldat ; - soldaten = ifTok Tok e "e" (soldat + "n") (soldat + "en") - } in - mkN soldat soldaten soldaten soldaten soldaten soldaten masculine ; - - nBuch = \buch, bücher -> nGen buch (buch + "es") bücher neuter ; - nMesser = \messer -> nGen messer (messer + "s") messer neuter ; - nAuto = \auto -> let {autos = auto + "s"} in - mkNoun4 auto autos autos autos neuter ** {lock_N = <>} ; - - nHand = \hand, hände -> nGen hand hand hände feminine ; - - nFrau = \frau -> let { - e = Predef.dp 1 frau ; - frauen = ifTok Tok e "e" (frau + "n") (frau + "en") - } in - mkN frau frau frau frau frauen frauen feminine ; - - mkFun n = mkFunCN (UseN n) ; - funVon n = funVonCN (UseN n) ; - - mkPN = \karolus, karoli -> - {s = table {Gen => karoli ; _ => karolus} ; lock_PN = <>} ; - pnReg = \horst -> - mkPN horst (ifTok Tok (Predef.dp 1 horst) "s" horst (horst + "s")) ; - - mkCN = UseN ; - mkNP = \x,y -> UsePN (mkPN x y) ; - npReg = \s -> UsePN (pnReg s) ; - - mkFunCN n p c = mkFunC n p c ** {lock_Fun = <>} ; - funVonCN n = funVonC n ** {lock_Fun = <>} ; - - mkAdj1 x y = mkAdjective x y ** {lock_Adj1 = <>} ; - adjInvar a = Morpho.adjInvar a ** {lock_Adj1 = <>} ; - adjGen a = Morpho.adjGen a ** {lock_Adj1 = <>} ; - mkAdj2 = \a,p,c -> a ** {s2 = p ; c = c ; lock_Adj2 = <>} ; - - mkAdjDeg a b c = mkAdjComp a b c ** {lock_AdjDeg = <>} ; - aDeg3 a b c = adjCompReg3 a b c ** {lock_AdjDeg = <>} ; - aReg a = adjCompReg a ** {lock_AdjDeg = <>} ; - aPastPart = \v -> {s = table AForm {a => v.s ! VPart a} ; lock_Adj1 = <>} ; - apReg = \s -> AdjP1 (adjGen s) ; - - mkV = \sehen, sieht, sieh, gesehen -> - mkVerbSimple (mkVerbum sehen (Predef.tk 1 sieht) sieh gesehen) ** {lock_V = <>} ; - vReg = \s -> mkVerbSimple (regVerb s) ** {lock_V = <>} ; - vSein = verbSein ** {lock_V = <>} ; - vHaben = verbHaben ** {lock_V = <>} ; - vPart = \sehen, sieht, sieh, gesehen, aus -> - mkVerb (mkVerbum sehen sieht sieh gesehen) aus ** {lock_V = <>} ; - vPartReg = \sehen, aus -> mkVerb (regVerb sehen) aus ** {lock_V = <>} ; - - mkTV v p c = mkTransVerb v p c ** {lock_TV = <>} ; - tvReg = \hören, zu, dat -> mkTV (vReg hören) zu dat ; - tvDir = \v -> mkTV v [] accusative ; - tvDirReg = \v -> tvReg v [] accusative ; - mkV3 v s c t d = mkDitransVerb v s c t d ** {lock_V3 = <>} ; - - mkAdV a = ss a ** {lock_AdV = <>} ; - mkPP x y z = prepPhrase x y z ** {lock_AdV = <>}; - mkAdA a = ss a ** {lock_AdA = <>} ; - mkAdS a = ss a ** {lock_AdS = <>} ; -} ; diff --git a/grammars/resource/german/Predication.gf b/grammars/resource/german/Predication.gf deleted file mode 100644 index 37572b4c1..000000000 --- a/grammars/resource/german/Predication.gf +++ /dev/null @@ -1,96 +0,0 @@ ---# -path=.:../abstract:../../prelude - ---1 A Small Predication Library --- --- (c) Aarne Ranta 2003 under Gnu GPL. --- --- This library is built on a language-independent API of --- resource grammars. It has a common part, the type signatures --- (defined here), and language-dependent parts. The user of --- the library should only have to look at the type signatures. - -resource Predication = open Deutsch in { - --- We first define a set of predication patterns. - -oper - predV1 : V -> NP -> S ; -- one-place verb: "John walks" - predV2 : TV -> NP -> NP -> S ; -- two-place verb: "John loves Mary" - predV3 : TV -> NP -> NP -> NP -> S ; -- three-place verb: "John gives Mary beer" - predVColl : V -> NP -> NP -> S ; -- collective verb: "John and Mary fight" - predA1 : Adj1 -> NP -> S ; -- one-place adjective: "John is old" - predA2 : Adj2 -> NP -> NP -> S ; -- two-place adj: "John is married to Mary" - predAComp : AdjDeg -> NP -> NP -> S ; -- compar adj: "John is older than Mary" - predAColl : Adj1 -> NP -> NP -> S ; -- collect adj: "John and Mary are married" - predN1 : N -> NP -> S ; -- one-place noun: "John is a man" - predN2 : Fun -> NP -> NP -> S ; -- two-place noun: "John is a lover of Mary" - predNColl : N -> NP -> NP -> S ; -- collect noun: "John and Mary are lovers" - --- Individual-valued function applications. - - appFun1 : Fun -> NP -> NP ; -- one-place function: "the successor of x" - appFun2 : Fun2 -> NP -> NP -> NP ; -- two-place function: "the line from x to y" - appFunColl : Fun -> NP -> NP -> NP ; -- collective function: "the sum of x and y" - --- Families of types, expressed by common nouns depending on arguments. - - appFam1 : Fun -> NP -> CN ; -- one-place family: "divisor of x" - appFam2 : Fun2 -> NP -> NP -> CN ; -- two-place family: "line from x to y" - appFamColl : Fun -> NP -> NP -> CN ; -- collective family: "path between x and y" - --- Type constructor, similar to a family except that the argument is a type. - - constrTyp1 : Fun -> CN -> CN ; - --- Logical connectives on two sentences. - - conjS : S -> S -> S ; -- A and B - disjS : S -> S -> S ; -- A or B - implS : S -> S -> S ; -- if A, B - --- A variant of implication. - - ifThenS : S -> S -> S ; -- if A, then B - --- As an auxiliary, we need two-place conjunction of names ("John and Mary"), --- used in collective predication. - - conjNP : NP -> NP -> NP ; - - ------------------------------ - ----- what follows should be an implementation of the preceding - -oper - predV1 = \F, x -> PredVP x (PosV F) ; - predV2 = \F, x, y -> PredVP x (PosTV F y) ; - predVColl = \F, x, y -> PredVP (conjNP x y) (PosV F) ; - predA1 = \F, x -> PredVP x (PosA (AdjP1 F)) ; - predA2 = \F, x, y -> PredVP x (PosA (ComplAdj F y)) ; - predAComp = \F, x, y -> PredVP x (PosA (ComparAdjP F y)) ; - predAColl = \F, x, y -> PredVP (conjNP x y) (PosA (AdjP1 F)) ; - predN1 = \F, x -> PredVP x (PosCN (UseN F)) ; - predN2 = \F, x, y -> PredVP x (PosCN (AppFun F y)) ; - predNColl = \F, x, y -> PredVP (conjNP x y) (PosCN (UseN F)) ; - - appFun1 = \f, x -> DefOneNP (AppFun f x) ; - appFun2 = \f, x, y -> DefOneNP (AppFun (AppFun2 f x) y) ; - appFunColl = \f, x, y -> DefOneNP (AppFun f (conjNP x y)) ; - - appFam1 = \F, x -> AppFun F x ; - appFam2 = \F, x, y -> AppFun (AppFun2 F x) y ; - appFamColl = \F, x, y -> AppFun F (conjNP x y) ; - - conjS = \A, B -> ConjS AndConj (TwoS A B) ; - disjS = \A, B -> ConjS OrConj (TwoS A B) ; - implS = \A, B -> SubjS IfSubj A B ; - - ifThenS = \A,B -> - SubjS IfSubj A {s = \\o => "then" ++ B.s ! o ; lock_S = <>} ; --- not in Res - - constrTyp1 = \F, A -> AppFun F (IndefManyNP A) ; - - conjNP = \x, y -> ConjNP AndConj (TwoNP x y) ; - -} ; diff --git a/grammars/resource/german/ResDeu.gf b/grammars/resource/german/ResDeu.gf deleted file mode 100644 index 8a602e305..000000000 --- a/grammars/resource/german/ResDeu.gf +++ /dev/null @@ -1,223 +0,0 @@ ---1 The Top-Level German Resource Grammar --- --- Aarne Ranta 2002 -- 2003 --- --- This is the German concrete syntax of the multilingual resource --- grammar. Most of the work is done in the file $syntax.Deu.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 $Types.gf$. - -concrete ResDeu of ResAbs = open Prelude, Syntax in { - -flags - startcat=Phr ; - parser=chart ; - -lincat - CN = CommNounPhrase ; - -- = {s : Adjf => Number => Case => Str ; g : Gender} ; - N = CommNoun ; - -- = {s : Number => Case => Str ; g : Gender} ; - NP = NounPhrase ; - -- = {s : NPForm => Str ; n : Number ; p : Person ; pro : Bool} ; - PN = ProperName ; - -- = {s : Case => Str} ; - Det = {s : Gender => Case => Str ; n : Number ; a : Adjf} ; - Fun = Function ; - -- = CommNounPhrase ** {s2 : Preposition ; c : Case} ; - Fun2 = Function ** {s3 : Preposition ; c2 : Case} ; - - Adj1 = Adjective ; - -- = {s : AForm => Str} ; - Adj2 = Adjective ** {s2 : Preposition ; c : Case} ; - AdjDeg = {s : Degree => AForm => Str} ; - AP = Adjective ** {p : Bool} ; - - V = Verb ; - -- = {s : VForm => Str ; s2 : Particle} ; - VP = Verb ** {s3 : Number => Str ; s4 : Str} ; - TV = TransVerb ; - -- = Verb ** {s3 : Preposition ; c : Case} ; - V3 = TransVerb ** {s4 : Preposition ; c2 : Case} ; - VS = Verb ; - AdV = {s : Str} ; - - S = Sentence ; - -- = {s : Order => Str} ; - Slash = Sentence ** {s2 : Preposition ; c : Case} ; - - RP = {s : GenNum => Case => Str} ; - RC = {s : GenNum => Str} ; - - IP = ProperName ** {n : Number} ; - Qu = {s : QuestForm => Str} ; - Imp = {s : Number => Str} ; - Phr = {s : Str} ; - Text = {s : Str} ; - - Conj = {s : Str ; n : Number} ; - ConjD = {s1,s2 : Str ; n : Number} ; - - ListS = {s1,s2 : Order => Str} ; - ListAP = {s1,s2 : AForm => Str ; p : Bool} ; - ListNP = {s1,s2 : NPForm => Str ; n : Number ; p : Person ; pro : Bool} ; - ---. - -lin - UseN = noun2CommNounPhrase ; - ModAdj = modCommNounPhrase ; - ModGenOne = npGenDet singular ; - ModGenMany = npGenDet plural ; - UsePN = nameNounPhrase ; - UseFun = funAsCommNounPhrase ; - AppFun = appFunComm ; - AppFun2 = appFun2 ; - AdjP1 = adj2adjPhrase ; - ComplAdj = complAdj ; - PositAdjP = positAdjPhrase ; - ComparAdjP = comparAdjPhrase ; - SuperlNP = superlNounPhrase ; - - DetNP = detNounPhrase ; - IndefOneNP = indefNounPhrase singular ; - IndefManyNP = indefNounPhrase plural ; - DefOneNP = defNounPhrase singular ; - DefManyNP = defNounPhrase plural ; - - CNthatS = nounThatSentence ; - - PredVP = predVerbPhrase ; - PosV = predVerb True ; - NegV = predVerb False ; - PosA = predAdjective True ; - NegA = predAdjective False ; - PosCN = predCommNoun True ; - NegCN = predCommNoun False ; - PosTV = complTransVerb True ; - NegTV = complTransVerb False ; - PosPassV = passVerb True ; - NegPassV = passVerb False ; - PosNP = predNounPhrase True ; - NegNP = predNounPhrase False ; - PosVS = complSentVerb True ; - NegVS = complSentVerb False ; - PosV3 = complDitransVerb True ; - NegV3 = complDitransVerb False ; - VTrans = transAsVerb ; - - AdvVP = adVerbPhrase ; - LocNP = locativeNounPhrase ; - AdvCN = advCommNounPhrase ; - AdvAP = advAdjPhrase ; - - PosSlashTV = slashTransVerb True ; - NegSlashTV = slashTransVerb False ; - OneVP = predVerbPhrase (nameNounPhrase {s = \\_ => "man"}) ; - - IdRP = identRelPron ; - FunRP = funRelPron ; - RelVP = relVerbPhrase ; - RelSlash = relSlash ; - ModRC = modRelClause ; - RelSuch = relSuch ; - - WhoOne = intPronWho singular ; - WhoMany = intPronWho plural ; - WhatOne = intPronWhat singular ; - WhatMany = intPronWhat plural ; - FunIP = funIntPron ; - NounIPOne = nounIntPron singular ; - NounIPMany = nounIntPron plural ; - - QuestVP = questVerbPhrase ; - IntVP = intVerbPhrase ; - IntSlash = intSlash ; - QuestAdv = questAdverbial ; - - ImperVP = imperVerbPhrase ; - - IndicPhrase = indicUtt ; - QuestPhrase = interrogUtt ; - ImperOne = imperUtterance singular ; - ImperMany = imperUtterance plural ; - - AdvS = advSentence ; - -lin - TwoS = twoSentence ; - ConsS = consSentence ; - ConjS = conjunctSentence ; - ConjDS = conjunctDistrSentence ; - - TwoAP = twoAdjPhrase ; - ConsAP = consAdjPhrase ; - ConjAP = conjunctAdjPhrase ; - ConjDAP = conjunctDistrAdjPhrase ; - - TwoNP = twoNounPhrase ; - ConsNP = consNounPhrase ; - ConjNP = conjunctNounPhrase ; - ConjDNP = conjunctDistrNounPhrase ; - - SubjS = subjunctSentence ; - SubjImper = subjunctImperative ; - SubjQu = subjunctQuestion ; - SubjVP = subjunctVerbPhrase ; - - PhrNP = useNounPhrase ; - PhrOneCN = useCommonNounPhrase singular ; - PhrManyCN = useCommonNounPhrase plural ; - PhrIP ip = ip ; - PhrIAdv ia = ia ; - - OnePhr p = p ; - ConsPhr = cc2 ; - - INP = pronNounPhrase pronIch ; - ThouNP = pronNounPhrase pronDu ; - HeNP = pronNounPhrase pronEr ; - SheNP = pronNounPhrase pronSie ; - ItNP = pronNounPhrase pronEs ; - WeNP = pronNounPhrase pronWir ; - YeNP = pronNounPhrase pronIhr ; - TheyNP = pronNounPhrase pronSiePl ; - - YouNP = pronNounPhrase pronSSie ; - - EveryDet = jederDet ; - AllDet = alleDet ; - WhichDet = welcherDet ; - MostDet = meistDet ; - - HowIAdv = ss "wie" ; - WhenIAdv = ss "wann" ; - WhereIAdv = ss "war" ; - WhyIAdv = ss "warum" ; - - AndConj = ss "und" ** {n = Pl} ; - OrConj = ss "oder" ** {n = Sg} ; - BothAnd = sd2 "sowohl" ["als auch"] ** {n = Pl} ; - EitherOr = sd2 "entweder" "oder" ** {n = Sg} ; - NeitherNor = sd2 "weder" "noch" ** {n = Sg} ; - IfSubj = ss "wenn" ; - WhenSubj = ss "wenn" ; - - PhrYes = ss ["Ja ."] ; - PhrNo = ss ["Nein ."] ; - - VeryAdv = ss "sehr" ; - TooAdv = ss "zu" ; - OtherwiseAdv = ss "sonst" ; - ThereforeAdv = ss "deshalb" ; -} ; diff --git a/grammars/resource/german/RestaurantDeu.gf b/grammars/resource/german/RestaurantDeu.gf deleted file mode 100644 index 8517533b1..000000000 --- a/grammars/resource/german/RestaurantDeu.gf +++ /dev/null @@ -1,26 +0,0 @@ ---# -path=.:../abstract:../../prelude - -concrete RestaurantDeu of Restaurant = - DatabaseDeu ** open Prelude,Paradigms,Deutsch,DatabaseRes in { - -lin - Restaurant = UseN (nAuto "Restaurant") ; - Bar = UseN (nAuto "Bar") ; --- ?? - French = apReg "Französisch" ; - Italian = apReg "Italienisch" ; - Indian = apReg "Indisch" ; - Japanese = apReg "Japanisch" ; - - address = funVon (nFrau "Adresse") ; - phone = funVon (nFrau "Rufnummer") ; --- - priceLevel = funVon (nFrau "Preisstufe") ; - - Cheap = aReg "billig" ; - Expensive = aDeg3 "teuer" "teurer" "teurest" ; - - WhoRecommend rest = mkSentSame (ss2 ["wer empfiehlt"] (rest.s ! accusative)) ; - WhoHellRecommend rest = - mkSentSame (ss2 ["wer zum Teufel empfiehlt"] (rest.s ! accusative)) ; - - LucasCarton = mkPN ["Lucas Carton"] ["Lucas Cartons"] ; -} ; diff --git a/grammars/resource/german/Syntax.gf b/grammars/resource/german/Syntax.gf deleted file mode 100644 index afaf1ad86..000000000 --- a/grammars/resource/german/Syntax.gf +++ /dev/null @@ -1,969 +0,0 @@ ---1 A Small German Resource Syntax --- --- Aarne Ranta 2002 --- --- This resource grammar contains definitions needed to construct --- indicative, interrogative, and imperative sentences in German. --- --- The following modules are presupposed: - -resource Syntax = Morpho ** open Prelude, (CO = Coordination) in { - ---2 Common Nouns --- --- Simple common nouns are defined as the type $CommNoun$ in $morpho.Deu.gf$. - ---3 Common noun phrases - --- The need for this more complex type comes from the variation in the way in --- which a modifying adjective is inflected after different determiners. --- We use the $Adjf$ parameter for this ($Strong$/$Weak$). - -oper - - CommNounPhrase : Type = {s : Adjf => Number => Case => Str ; g : Gender} ; - - noun2CommNounPhrase : CommNoun -> CommNounPhrase = \haus -> - {s = \\_ => haus.s ; g = haus.g} ; - - n2n = noun2CommNounPhrase ; - - ---2 Noun phrases --- --- The worst case is pronouns, which have inflection in the possessive --- forms. Other noun phrases express all possessive forms with the genitive case. --- The parameter $pro$ tells if the $NP$ is a pronoun, which is needed in e.g. --- genitive constructions. - - NounPhrase : Type = { - s : NPForm => Str ; - n : Number ; - p : Person ; - pro : Bool - } ; - - pronNounPhrase : ProPN -> NounPhrase = \ich -> - ich ** {pro = True} ; - - caseNP : NPForm -> Case = \np -> case np of { - NPCase c => c ; - NPPoss _ _ => Gen - } ; - - normalNounPhrase : (Case => Str) -> Number -> NounPhrase = \cs,n -> - {s = \\c => cs ! caseNP c ; - n = n ; - p = P3 ; -- third person - pro = False -- not a pronoun - } ; - --- Proper names are a simple kind of noun phrases. They can usually --- be constructed from strings in a regular way. - - ProperName : Type = {s : Case => Str} ; - - nameNounPhrase : ProperName -> NounPhrase = \john -> - {s = \\np => john.s ! caseNP np ; n = Sg ; p = P3 ; pro = False} ; - - mkProperName : Str -> ProperName = \horst -> - {s = table {Gen => horst + "s" ; _ => horst}} ; - ---2 Mass nouns --- --- Mass nouns are morphologically similar to nouns, but they have one special --- rule of noun phrase formation, using the bare singular (in German). --- Example: "Bier ist gut". --- They can also be coerced to common nouns: "ein Mexikanisches Bier". - - MassNounPhrase : Type = CommNounPhrase ; - - massNounPhrase : MassNounPhrase -> NounPhrase = \bier -> { - s = \\c => let {nc = caseNP c} in - bier.s ! adjfCas Strong nc ! Sg ! nc ; - p = P3 ; - n = Sg ; - pro = False - } ; - - massCommNoun : MassNounPhrase -> CommNounPhrase = \x -> x ; - - ---2 Determiners --- --- Determiners are inflected according to the nouns they determine. --- The determiner determines the number and adjectival form from the determiner. - - Determiner : Type = {s : Gender => Case => Str ; n : Number ; a : Adjf} ; - - detNounPhrase : Determiner -> CommNounPhrase -> NounPhrase = \ein, mann -> { - s = \\c => let {nc = caseNP c} in - ein.s ! mann.g ! nc ++ mann.s ! adjfCas ein.a nc ! ein.n ! nc ; - p = P3 ; - n = ein.n ; - pro = False - } ; - - --- The adjectival form after a determiner depends both on the inferent form --- and on the case ("ein alter Mann" but "einem alten Mann"). - - adjfCas : Adjf -> Case -> Adjf = \a,c -> case of { - => Strong ; - => Strong ; - _ => Weak - } ; - --- The following macros are sufficient to define most determiners, --- as shown by the examples that follow. - - DetSg = Gender => Case => Str ; - DetPl = Case => Str ; - - mkDeterminerSg : DetSg -> Adjf -> Determiner = \ein, a -> - {s = ein ; n = Sg ; a = a} ; - - mkDeterminerPl : DetPl -> Adjf -> Determiner = \alle, a -> - {s = \\_ => alle ; n = Pl ; a = a} ; - - detLikeAdj : Str -> Determiner = \jed -> mkDeterminerSg - (\\g,c => (adjReg jed).s ! AMod Strong (GSg g) c) Weak ; - - jederDet = detLikeAdj "jed" ; - alleDet = mkDeterminerPl (caselist "alle" "alle" "allen" "aller") Weak ; - einDet = mkDeterminerSg artIndef Strong ; - derDet = mkDeterminerSg (table {g => artDef ! GSg g}) Weak ; - dieDet = mkDeterminerPl (artDef ! GPl) Weak ; - - meistDet = mkDeterminerPl (table {c => artDef ! GPl ! c ++ "meisten"}) Weak ; - welcherDet = detLikeAdj "welch" ; - welcheDet = mkDeterminerPl (caselist "welche" "welche" "welchen" "welcher") Weak ; - --- Choose "welcher"/"welche" - - welchDet : Number -> Determiner = \n -> - case n of {Sg => welcherDet ; Pl => welcheDet} ; - --- Genitives of noun phrases can be used like determiners, to build noun phrases. --- The number argument makes the difference between "mein Haus" - "meine Häuser". --- --- If the 'owner' is a pronoun, only one form is available "mein Haus". --- In other cases, two variants are available: "Johanns Haus" / "das Haus Johanns". - - npGenDet : Number -> NounPhrase -> CommNounPhrase -> NounPhrase = \n,haus,Wein -> - let { - hauses : Case => Str = \\c => haus.s ! NPPoss (gNumber Wein.g n) c ; - wein : NPForm => Str = \\c => Wein.s ! Strong ! n ! caseNP c ; - derwein : NPForm => Str = (defNounPhrase n Wein).s - } - in - {s = \\c => variants { - hauses ! caseNP c ++ wein ! c ; - if_then_else Str haus.pro - nonExist - (derwein ! c ++ hauses ! Nom) -- the case does not matter - } ; - p = P3 ; - n = n ; - pro = False - } ; - --- *Bare plural noun phrases* like "Männer", "gute Häuser", are built without a --- determiner word. - - plurDet : CommNounPhrase -> NounPhrase = \cn -> - normalNounPhrase (cn.s ! Strong ! Pl) Pl ; - --- Macros for indef/def Sg/Pl noun phrases are needed in many places even --- if they might not be constituents. - - indefNounPhrase : Number -> CommNounPhrase -> NounPhrase = \n,haus -> case n of { - Sg => detNounPhrase einDet haus ; - Pl => plurDet haus - } ; - - defNounPhrase : Number -> CommNounPhrase -> NounPhrase = \n,haus -> case n of { - Sg => detNounPhrase derDet haus ; - Pl => detNounPhrase dieDet haus - } ; - - indefNoun : Number -> CommNounPhrase -> Str = \n, mann -> case n of { - Sg => (detNounPhrase einDet mann).s ! NPCase Nom ; - Pl => (plurDet mann).s ! NPCase Nom - } ; - --- Constructions like "die Idee, dass zwei gerade ist" are formed at the --- first place as common nouns, so that one can also have "ein Vorschlag, dass...". - - nounThatSentence : CommNounPhrase -> Sentence -> CommNounPhrase = \idee,x -> - {s = \\a,n,c => idee.s ! a! n ! c ++ [", dass"] ++ x.s ! Sub ; - g = idee.g - } ; - ---2 Adjectives --- --- Adjectival phrases have a parameter $p$ telling if postposition is --- allowed (complex APs). - - AdjPhrase : Type = Adjective ** {p : Bool} ; - - adj2adjPhrase : Adjective -> AdjPhrase = \ny -> ny ** {p = False} ; - ---3 Comparison adjectives --- --- The type is defined in $types.Deu.gf$. - - AdjDegr : Type = AdjComp ; - --- Each of the comparison forms has a characteristic use: --- --- Positive forms are used alone, as adjectival phrases ("jung"). - - positAdjPhrase : AdjDegr -> AdjPhrase = \jung -> - {s = jung.s ! Pos ; p = False} ; - --- Comparative forms are used with an object of comparison, as --- adjectival phrases ("besser als Rolf"). - - comparAdjPhrase : AdjDegr -> NounPhrase -> AdjPhrase = \besser,rolf -> - {s = \\a => besser.s ! Comp ! a ++ "als" ++ rolf.s ! NPCase Nom ; - p = True - } ; - --- Superlative forms are used with a common noun, picking out the --- maximal representative of a domain ("der Jüngste Mann"). - - superlNounPhrase : AdjDegr -> CommNounPhrase -> NounPhrase = \best,mann -> - let {gen = mann.g} in - {s = \\c => let {nc = caseNP c} in - artDef ! gNumber gen Sg ! nc ++ - best.s ! Sup ! aMod Weak gen Sg nc ++ - mann.s ! Weak ! Sg ! nc ; - p = P3 ; - n = Sg ; - pro = False - } ; - ---3 Two-place adjectives --- --- A two-place adjective is an adjective with a preposition used before --- the complement, and the complement case. - - AdjCompl = Adjective ** {s2 : Preposition ; c : Case} ; - - complAdj : AdjCompl -> NounPhrase -> AdjPhrase = \verwandt,dich -> - {s = \\a => - bothWays (verwandt.s ! a) (verwandt.s2 ++ dich.s ! NPCase verwandt.c) ; - p = True - } ; - ---3 Modification of common nouns --- --- The two main functions of adjective are in predication ("Johann ist jung") --- and in modification ("ein junger Mann"). Predication will be defined --- later, in the chapter on verbs. --- --- Modification must pay attention to pre- and post-noun --- adjectives: "gutes Haus"; "besseres als X haus" / "haus besseres als X" - - modCommNounPhrase : AdjPhrase -> CommNounPhrase -> CommNounPhrase = \gut,haus -> - {s = \\a,n,c => let { - gutes = gut.s ! aMod a haus.g n c ; - Haus = haus.s ! a ! n ! c - } in - if_then_else Str gut.p (bothWays gutes Haus) (gutes ++ Haus) ; - g = haus.g} ; - ---2 Function expressions - --- A function expression is a common noun together with the --- preposition prefixed to its argument ("Mutter von x"). --- The type is analogous to two-place adjectives and transitive verbs. - - Function = CommNounPhrase ** {s2 : Preposition ; c : Case} ; - --- The application of a function gives, in the first place, a common noun: --- "Mutter/Mütter von Johann". From this, other rules of the resource grammar --- give noun phrases, such as "die Mutter von Johann", "die Mütter von Johann", --- "die Mütter von Johann und Maria", and "die Mutter von Johann und Maria" (the --- latter two corresponding to distributive and collective functions, --- respectively). Semantics will eventually tell when each --- of the readings is meaningful. - - appFunComm : Function -> NounPhrase -> CommNounPhrase = \mutter,uwe -> - {s = \\a,n,c => mutter.s ! a ! n ! c ++ mutter.s2 ++ uwe.s ! NPCase mutter.c ; - g = mutter.g - } ; - --- It is possible to use a function word as a common noun; the semantics is --- often existential or indexical. - - funAsCommNounPhrase : Function -> CommNounPhrase = \x -> x ; - --- The following is an aggregate corresponding to the original function application --- producing "Johanns Mutter" and "die Mutter von Johann". It does not appear in the --- resource grammar API any longer. - - appFun : Bool -> Function -> NounPhrase -> NounPhrase = \coll, mutter, uwe -> - let {n = uwe.n ; g = mutter.g ; nf = if_then_else Number coll Sg n} in - variants { - defNounPhrase nf (appFunComm mutter uwe) ; - npGenDet nf uwe mutter - } ; - --- The commonest cases are functions with "von" and functions with Genitive. - - mkFunC : CommNounPhrase -> Preposition -> Case -> Function = \f,p,c -> - f ** {s2 = p ; c = c} ; - - funVonC : CommNounPhrase -> Function = \wert -> - mkFunC wert "von" Dat ; - - funGenC : CommNounPhrase -> Function = \wert -> - mkFunC wert [] Gen ; - --- Two-place functions add one argument place. - - Function2 = Function ** {s3 : Preposition ; c2 : Case} ; - --- There application starts by filling the first place. - - appFun2 : Function2 -> NounPhrase -> Function = \flug, paris -> - {s = \\a,n,c => flug.s ! a ! n ! c ++ flug.s2 ++ paris.s ! NPCase flug.c ; - g = flug.g ; - s2 = flug.s3 ; - c = flug.c2 - } ; - - ---2 Verbs --- ---3 Verb phrases --- --- Verb phrases are discontinuous: the parts of a verb phrase are --- (s) an inflected verb, (s2) particle, --- (s3) negation and complement, and (s4) sentential adverbial. --- This discontinuity is needed in sentence formation --- to account for word order variations. - - VerbPhrase = Verb ** {s3 : Number => Str ; s4 : Str} ; - --- A simple verb can be made into a verb phrase with an empty complement. --- There are two versions, depending on if we want to negate the verb. --- N.B. negation is *not* a function applicable to a verb phrase, since --- double negations with "nicht" are not grammatical. - - predVerb : Bool -> Verb -> VerbPhrase = \b,aussehen -> - aussehen ** { - s3 = \\_ => negation b ; - s4 = [] - } ; - - negation : Bool -> Str = \b -> if_then_else Str b [] "nicht" ; - --- Sometimes we want to extract the verb part of a verb phrase. - - verbOfPhrase : VerbPhrase -> Verb = \v -> {s = v.s ; s2 = v.s2} ; - --- Verb phrases can also be formed from adjectives ("ist gut"), --- common nouns ("ist ein Mann"), and noun phrases ("ist der jüngste Mann"). --- The third rule is overgenerating: "ist jeder Mann" has to be ruled out --- on semantic grounds. - - predAdjective : Bool -> Adjective -> VerbPhrase = \b,gut -> - verbSein ** { - s3 = \\_ => negation b ++ gut.s ! APred ; - s4 = [] - } ; - - predCommNoun : Bool -> CommNounPhrase -> VerbPhrase = \b,man -> - verbSein ** { - s3 = \\n => negation b ++ indefNoun n man ; - s4 = [] - } ; - - predNounPhrase : Bool -> NounPhrase -> VerbPhrase = \b,dermann -> - verbSein ** { - s3 = \\n => negation b ++ dermann.s ! NPCase Nom ; - s4 = [] - } ; - ---3 Transitive verbs --- --- Transitive verbs are verbs with a preposition for the complement, --- in analogy with two-place adjectives and functions. --- One might prefer to use the term "2-place verb", since --- "transitive" traditionally means that the inherent preposition is empty. --- Such a verb is one with a *direct object* - which may still be accusative, --- dative, or genitive. - - TransVerb = Verb ** {s3 : Preposition ; c : Case} ; - - mkTransVerb : Verb -> Preposition -> Case -> TransVerb = - \v,p,c -> v ** {s3 = p ; c = c} ; - --- The rule for using transitive verbs is the complementization rule: - - complTransVerb : Bool -> TransVerb -> NounPhrase -> VerbPhrase = - \b,warten,dich -> - let { - aufdich = warten.s3 ++ dich.s ! NPCase warten.c ; - nicht = negation b - } in - {s = warten.s ; - s2 = warten.s2 ; - s3 = \\_ => bothWays aufdich nicht ; - s4 = [] - } ; - --- Transitive verbs with accusative objects can be used passively. --- The function does not check that the verb is transitive. --- Therefore, the function can also be used for "es wird gelaufen", etc. - - passVerb : Bool -> Verb -> VerbPhrase = \b,lieben -> - {s = verbumWerden ; - s2 = [] ; - s3 = \\_ => negation b ++ lieben.s ! VPart APred ; - s4 = [] - } ; - --- Transitive verb can be used elliptically as a verb. The semantics --- is left to applications. The definition is trivial, due to record --- subtyping. - - transAsVerb : TransVerb -> Verb = \lieben -> - lieben ; - --- *Ditransitive verbs* are verbs with three argument places. --- We treat so far only the rule in which the ditransitive --- verb takes both complements to form a verb phrase. - - DitransVerb = TransVerb ** {s4 : Preposition ; c2 : Case} ; - - mkDitransVerb : - Verb -> Preposition -> Case -> Preposition -> Case -> DitransVerb = - \v,p1,c1,p2,c2 -> v ** {s3 = p1 ; c = c1 ; s4 = p2 ; c2 = c2} ; - - complDitransVerb : - Bool -> DitransVerb -> NounPhrase -> NounPhrase -> VerbPhrase = - \b,geben,dir,bier -> - let { - zudir = geben.s3 ++ dir.s ! NPCase geben.c ; - dasbier = geben.s4 ++ bier.s ! NPCase geben.c2 ; - nicht = negation b - } in - {s = geben.s ; - s2 = geben.s2 ; - s3 = \\_ => variants { - nicht ++ zudir ++ dasbier ; - zudir ++ nicht ++ dasbier ; - zudir ++ dasbier ++ nicht - } ; - s4 = [] - } ; - - ---2 Adverbials --- --- Adverbials are not inflected (we ignore comparison, and treat --- compared adverbials as separate expressions; this could be done another way). - - Adverb : Type = SS ; - - mkAdverb : Str -> Adverb = ss ; - - adVerbPhrase : VerbPhrase -> Adverb -> VerbPhrase = \spielt, gut -> - {s = spielt.s ; - s2 = spielt.s2 ; - s3 = \\n => spielt.s3 ! n ++ gut.s ; - s4 = spielt.s4 - } ; - - advAdjPhrase : Adverb -> AdjPhrase -> AdjPhrase = \sehr, gut -> - {s = \\a => sehr.s ++ gut.s ! a ; - p = gut.p - } ; - --- Adverbials are typically generated by prefixing prepositions. --- The rule for creating locative noun phrases by the preposition "in" --- is a little shaky, since other prepositions may be preferred ("an", "auf"). - - prepPhrase : Case -> Preposition -> NounPhrase -> Adverb = \c,auf,ihm -> - ss (auf ++ ihm.s ! NPCase c) ; - - locativeNounPhrase : NounPhrase -> Adverb = - prepPhrase Dat "in" ; - --- This is a source of the "Mann mit einem Teleskop" ambiguity, and may produce --- strange things, like "Autos immer" (while "Autos heute" is OK). --- Semantics will have to make finer distinctions among adverbials. - - advCommNounPhrase : CommNounPhrase -> Adverb -> CommNounPhrase = \haus,heute -> - {s = \\a, n, c => haus.s ! a ! n ! c ++ heute.s ; - g = haus.g} ; - - - ---2 Sentences --- --- Sentences depend on a *word order parameter* selecting between main clause, --- inverted, and subordinate clause. - - Sentence : Type = SS1 Order ; - --- This is the traditional $S -> NP VP$ rule. It takes care of both --- word order and agreement. - - predVerbPhrase : NounPhrase -> VerbPhrase -> Sentence = - \Ich,LiebeDichNichtAus -> - let { - ich = Ich.s ! NPCase Nom ; - liebe = LiebeDichNichtAus.s ! VInd Ich.n Ich.p ; - aus = LiebeDichNichtAus.s2 ; - dichnichtgut = LiebeDichNichtAus.s3 ! Ich.n ; - wennesregnet = LiebeDichNichtAus.s4 - } in - {s = table { - Main => ich ++ liebe ++ dichnichtgut ++ aus ++ wennesregnet ; - Inv => liebe ++ ich ++ dichnichtgut ++ aus ++ wennesregnet ; - Sub => ich ++ dichnichtgut ++ aus ++ liebe ++ wennesregnet - } - } ; - ---3 Sentence-complement verbs --- --- Sentence-complement verbs take sentences as complements. - - SentenceVerb : Type = Verb ; - - complSentVerb : Bool -> SentenceVerb -> Sentence -> VerbPhrase = \b,sage,duisst -> - sage ** { - s3 = table Number {_ => negation b} ; - s4 = "," ++ "dass" ++ duisst.s ! Sub - } ; - - ---2 Sentences missing noun phrases --- --- This is one instance of Gazdar's *slash categories*, corresponding to his --- $S/NP$. --- We cannot have - nor would we want to have - a productive slash-category former. --- Perhaps a handful more will be needed. --- --- Notice that the slash category has the same relation to sentences as --- transitive verbs have to verbs: it's like a *sentence taking a complement*. - - SentenceSlashNounPhrase : Type = Sentence ** {s2 : Preposition ; c : Case} ; - - slashTransVerb : Bool -> NounPhrase -> TransVerb -> SentenceSlashNounPhrase = - \b, Ich, sehen -> - let { - ich = Ich.s ! NPCase Nom ; - sehe = sehen.s ! VInd Ich.n P3 ; - aus = sehen.s2 ; - nicht = negation b - } in - {s = table { - Main => ich ++ sehe ++ nicht ++ aus ; - Inv => sehe ++ ich ++ nicht ++ aus ; - Sub => ich ++ nicht ++ aus ++ sehe - } ; - s2 = sehen.s3 ; - c = sehen.c - } ; - ---2 Relative pronouns and relative clauses --- --- Relative pronouns are inflected in --- gender, number, and case just like adjectives. - -oper - identRelPron : RelPron = relPron ; - - funRelPron : Function -> RelPron -> RelPron = \wert, der -> - {s = \\gn,c => let {nu = numGenNum gn} in - artDef ! gNumber wert.g nu ! c ++ wert.s ! Weak ! nu ! c ++ - wert.s2 ++ der.s ! gn ! wert.c - } ; - --- Relative clauses can be formed from both verb phrases ("der schläft") and --- slash expressions ("den ich sehe", "auf dem ich sitze"). - - RelClause : Type = {s : GenNum => Str} ; - - relVerbPhrase : RelPron -> VerbPhrase -> RelClause = \der, geht -> - {s = \\gn => (predVerbPhrase (normalNounPhrase (der.s ! gn) (numGenNum gn)) - geht - ).s ! Sub - } ; - - relSlash : RelPron -> SentenceSlashNounPhrase -> RelClause = \den, ichSehe -> - {s = \\gn => ichSehe.s2 ++ den.s ! gn ! ichSehe.c ++ ichSehe.s ! Sub - } ; - --- A 'degenerate' relative clause is the one often used in mathematics, e.g. --- "Zahl x derart, dass x gerade ist". - - relSuch : Sentence -> RelClause = \A -> - {s = \\_ => "derart" ++ "dass" ++ A.s ! Sub} ; - --- The main use of relative clauses is to modify common nouns. --- The result is a common noun, out of which noun phrases can be formed --- by determiners. A comma is used before the relative clause. - - modRelClause : CommNounPhrase -> RelClause -> CommNounPhrase = \mann,dergeht -> - {s = \\a,n,c => mann.s ! a ! n ! c ++ "," ++ dergeht.s ! gNumber mann.g n ; - g = mann.g - } ; - - ---2 Interrogative pronouns --- --- If relative pronouns are adjective-like, interrogative pronouns are --- noun-phrase-like. We use a simplified type, since we don't need the possessive --- forms. - - IntPron : Type = ProperName ** {n : Number} ; - --- In analogy with relative pronouns, we have a rule for applying a function --- to a relative pronoun to create a new one. - - funIntPron : Function -> IntPron -> IntPron = \wert, wer -> - let {n = wer.n} in - {s = \\c => - artDef ! gNumber wert.g n ! c ++ wert.s ! Weak ! n ! c ++ - wert.s2 ++ wer.s ! wert.c ; - n = n - } ; - --- There is a variety of simple interrogative pronouns: --- "welches Haus", "wer", "was". - - nounIntPron : Number -> CommNounPhrase -> IntPron = \n,cn -> - let {np = detNounPhrase (welchDet n) cn} in - {s = \\c => np.s ! NPCase c ; - n = np.n} ; - - intPronWho : Number -> IntPron = \num -> { - s = caselist "wer" "wen" "wem" "weren" ; - n = num - } ; - - intPronWhat : Number -> IntPron = \num -> { - s = caselist "was" "was" nonExist nonExist ; --- - n = num - } ; - - - ---2 Utterances - --- By utterances we mean whole phrases, such as --- 'can be used as moves in a language game': indicatives, questions, imperative, --- and one-word utterances. The rules are far from complete. --- --- N.B. we have not included rules for texts, which we find we cannot say much --- about on this level. In semantically rich GF grammars, texts, dialogues, etc, --- will of course play an important role as categories not reducible to utterances. --- An example is proof texts, whose semantics show a dependence between premises --- and conclusions. Another example is intersentential anaphora. - - Utterance = SS ; - - indicUtt : Sentence -> Utterance = \x -> ss (x.s ! Main ++ ".") ; - interrogUtt : Question -> Utterance = \x -> ss (x.s ! DirQ ++ "?") ; - - ---2 Questions --- --- Questions are either direct ("bist du müde") or indirect --- ("ob du müde bist"). - -param - QuestForm = DirQ | IndirQ ; - -oper - Question = SS1 QuestForm ; - ---3 Yes-no questions --- --- Yes-no questions are used both independently ("bist du müde") --- and after interrogative adverbials ("warum bist du müde"). --- It is economical to handle with these two cases by the one --- rule, $questVerbPhrase'$. The only difference is if "ob" appears --- in the indirect form. - - questVerbPhrase : NounPhrase -> VerbPhrase -> Question = - questVerbPhrase' False ; - - questVerbPhrase' : Bool -> NounPhrase -> VerbPhrase -> Question = - \adv, du,gehst -> - let {dugehst = (predVerbPhrase du gehst).s} in - {s = table { - DirQ => dugehst ! Inv ; - IndirQ => (if_then_else Str adv [] "ob") ++ dugehst ! Sub - } - } ; - - ---3 Wh-questions --- --- Wh-questions are of two kinds: ones that are like $NP - VP$ sentences, --- others that are line $S/NP - NP$ sentences. - - intVerbPhrase : IntPron -> VerbPhrase -> Question = \Wer,geht -> - let {wer : NounPhrase = normalNounPhrase Wer.s Wer.n ; - wergeht : Sentence = predVerbPhrase wer geht - } in - {s = table { - DirQ => wergeht.s ! Main ; - IndirQ => wergeht.s ! Sub - } - } ; - - intSlash : IntPron -> SentenceSlashNounPhrase -> Question = \wer, ichSehe -> - let {zuwen = ichSehe.s2 ++ wer.s ! ichSehe.c} in - {s = table { - DirQ => zuwen ++ ichSehe.s ! Inv ; - IndirQ => zuwen ++ ichSehe.s ! Sub - } - } ; - - ---3 Interrogative adverbials --- --- These adverbials will be defined in the lexicon: they include --- "wann", "war", "wie", "warum", etc, which are all invariant one-word --- expressions. In addition, they can be formed by adding prepositions --- to interrogative pronouns, in the same way as adverbials are formed --- from noun phrases. - - IntAdverb = SS ; - - prepIntAdverb : Case -> Preposition -> IntPron -> IntAdverb =\ c,auf,wem -> - ss (auf ++ wem.s ! c) ; - --- A question adverbial can be applied to anything, and whether this makes --- sense is a semantic question. - - questAdverbial : IntAdverb -> NounPhrase -> VerbPhrase -> Question = - \wie, du, tust -> - {s = \\q => wie.s ++ (questVerbPhrase du tust).s ! q} ; - - ---2 Imperatives --- --- We only consider second-person imperatives. No polite "Sie" form so far. - - Imperative = SS1 Number ; - - imperVerbPhrase : VerbPhrase -> Imperative = \komm -> - {s = \\n => komm.s ! VImp n ++ komm.s3 ! n ++ komm.s2 ++ komm.s4} ; - - imperUtterance : Number -> Imperative -> Utterance = \n,I -> - ss (I.s ! n ++ "!") ; - ---2 Sentence adverbials --- --- This class covers adverbials such as "sonst", "deshalb", which are prefixed --- to a sentence to form a phrase; the sentence gets inverted word order. - - advSentence : Adverb -> Sentence -> Utterance = \sonst,ist1gerade -> - ss (sonst.s ++ ist1gerade.s ! Inv ++ ".") ; - ---2 Coordination --- --- Coordination is to some extent orthogonal to the rest of syntax, and --- has been treated in a generic way in the module $CO$ in the file --- $coordination.gf$. The overall structure is independent of category, --- but there can be differences in parameter dependencies. --- ---3 Conjunctions --- --- Coordinated phrases are built by using conjunctions, which are either --- simple ("und", "oder") or distributed ("sowohl - als auch", "entweder - oder"). --- --- The conjunction has an inherent number, which is used when conjoining --- noun phrases: "John und Mary sind..." vs. "John oder Mary ist..."; in the --- case of "oder", the result is however plural if any of the disjuncts is. - - Conjunction = CO.Conjunction ** {n : Number} ; - ConjunctionDistr = CO.ConjunctionDistr ** {n : Number} ; - - ---3 Coordinating sentences --- --- We need a category of lists of sentences. It is a discontinuous --- category, the parts corresponding to 'init' and 'last' segments --- (rather than 'head' and 'tail', because we have to keep track of the slot between --- the last two elements of the list). A list has at least two elements. - - ListSentence : Type = {s1,s2 : Order => Str} ; - - twoSentence : (_,_ : Sentence) -> ListSentence = - CO.twoTable Order ; - - consSentence : ListSentence -> Sentence -> ListSentence = - CO.consTable Order CO.comma ; - --- To coordinate a list of sentences by a simple conjunction, we place --- it between the last two elements; commas are put in the other slots, --- e.g. "du rauchst, er trinkt und ich esse". - - conjunctSentence : Conjunction -> ListSentence -> Sentence = - CO.conjunctTable Order ; - --- To coordinate a list of sentences by a distributed conjunction, we place --- the first part (e.g. "entweder") in front of the first element, the second --- part ("oder") between the last two elements, and commas in the other slots. --- For sentences this is really not used. - - conjunctDistrSentence : ConjunctionDistr -> ListSentence -> Sentence = - CO.conjunctDistrTable Order ; - ---3 Coordinating adjective phrases --- --- The structure is the same as for sentences. The result is a prefix adjective --- if and only if all elements are prefix. - - ListAdjPhrase : Type = - {s1,s2 : AForm => Str ; p : Bool} ; - - twoAdjPhrase : (_,_ : AdjPhrase) -> ListAdjPhrase = \x,y -> - CO.twoTable AForm x y ** {p = andB x.p y.p} ; - consAdjPhrase : ListAdjPhrase -> AdjPhrase -> ListAdjPhrase = \xs,x -> - CO.consTable AForm CO.comma xs x ** {p = andB xs.p x.p} ; - - conjunctAdjPhrase : Conjunction -> ListAdjPhrase -> AdjPhrase = \c,xs -> - CO.conjunctTable AForm c xs ** {p = xs.p} ; - - conjunctDistrAdjPhrase : ConjunctionDistr -> ListAdjPhrase -> AdjPhrase = \c,xs -> - CO.conjunctDistrTable AForm c xs ** {p = xs.p} ; - - - ---3 Coordinating noun phrases --- --- The structure is the same as for sentences. The result is either always plural --- or plural if any of the components is, depending on the conjunction. --- The result is a pronoun if all components are. - - ListNounPhrase : Type = - {s1,s2 : NPForm => Str ; n : Number ; p : Person ; pro : Bool} ; - - twoNounPhrase : (_,_ : NounPhrase) -> ListNounPhrase = \x,y -> - CO.twoTable NPForm x y ** - {n = conjNumber x.n y.n ; p = conjPerson x.p y.p ; pro = andB x.pro y.pro} ; - - consNounPhrase : ListNounPhrase -> NounPhrase -> ListNounPhrase = \xs,x -> - CO.consTable NPForm CO.comma xs x ** - {n = conjNumber xs.n x.n ; p = conjPerson xs.p x.p ; pro = andB xs.pro x.pro} ; - - conjunctNounPhrase : Conjunction -> ListNounPhrase -> NounPhrase = \c,xs -> - CO.conjunctTable NPForm c xs ** - {n = conjNumber c.n xs.n ; p = xs.p ; pro = xs.pro} ; - - conjunctDistrNounPhrase : ConjunctionDistr -> ListNounPhrase -> NounPhrase = - \c,xs -> - CO.conjunctDistrTable NPForm c xs ** - {n = conjNumber c.n xs.n ; p = xs.p ; pro = xs.pro} ; - --- We have to define a calculus of numbers of persons. For numbers, --- it is like the conjunction with $Pl$ corresponding to $False$. - - conjNumber : Number -> Number -> Number = \m,n -> case of { - => Sg ; - _ => Pl - } ; - --- For persons, we go in the descending order: --- "ich und dich sind stark", "er oder du bist stark". --- This is not always quite clear. - - conjPerson : Person -> Person -> Person = \p,q -> case of { - => P3 ; - => P1 ; - <_,P1> => P1 ; - _ => P2 - } ; - - ---2 Subjunction --- --- Subjunctions ("wenn", "falls", etc) --- are a different way to combine sentences than conjunctions. --- The main clause can be a sentences, an imperatives, or a question, --- but the subjoined clause must be a sentence. - - Subjunction = SS ; - - subjunctSentence : Subjunction -> Sentence -> Sentence -> Sentence = \if, A, B -> - let {As = A.s ! Sub} in - {s = table { - Main => variants {if.s ++ As ++ "," ++ B.s ! Inv ; - B.s ! Main ++ "," ++ if.s ++ As} ; - o => B.s ! o ++ "," ++ if.s ++ As - } - } ; - - subjunctImperative : Subjunction -> Sentence -> Imperative -> Imperative = - \if, A, B -> - {s = \\n => subjunctVariants if A (B.s ! n)} ; - - subjunctQuestion : Subjunction -> Sentence -> Question -> Question = \if, A, B -> - {s = \\q => subjunctVariants if A (B.s ! q)} ; - --- There are uniformly two variant word orders, e.g. --- "wenn du rauchst, werde ish böse" --- and "ich werde böse, wenn du rauchst". - - subjunctVariants : Subjunction -> Sentence -> Str -> Str = \if,A,B -> - let {As = A.s ! Sub} in - variants {if.s ++ As ++ "," ++ B ; B ++ "," ++ if.s ++ As} ; - --- Subjunctions can be used for building adverbials, which can modify verb phrases --- ("ich lache wenn ich gehe und singe wenn ich laufe"). , noun phrases, etc. --- For reasons of word order, we treat this separately from other adverbials, --- but this could be remedied by an extra parameter in adverbials. - - subjunctVerbPhrase : VerbPhrase -> Subjunction -> Sentence -> VerbPhrase = - \ruft,wenn,ergeht -> - {s = ruft.s ; - s2 = ruft.s2 ; - s3 = ruft.s3 ; - s4 = ruft.s4 ++ "," ++ wenn.s ++ ergeht.s ! Sub - } ; - ---2 One-word utterances --- --- An utterance can consist of one phrase of almost any category, --- the limiting case being one-word utterances. These --- utterances are often (but not always) in what can be called the --- default form of a category, e.g. the nominative. --- This list is far from exhaustive. - - useNounPhrase : NounPhrase -> Utterance = \john -> - postfixSS "." (defaultNounPhrase john) ; - useCommonNounPhrase : Number -> CommNounPhrase -> Utterance = \n,car -> - useNounPhrase (indefNounPhrase n car) ; - --- Here are some default forms. - - defaultNounPhrase : NounPhrase -> SS = \john -> - ss (john.s ! NPCase Nom) ; - - defaultQuestion : Question -> SS = \whoareyou -> - ss (whoareyou.s ! DirQ) ; - - defaultSentence : Sentence -> Utterance = \x -> ss (x.s ! Main) ; - ---3 Puzzle --- --- Adding some lexicon, we can generate the sentence --- --- "der grösste alte Mann ist nicht ein Auto auf die Mutter von dem Männer warten" --- --- which looks completely ungrammatical! What you should do to decipher it is --- put parentheses around "auf die Mutter von dem". - -} ; diff --git a/grammars/resource/german/TestDeu.gf b/grammars/resource/german/TestDeu.gf deleted file mode 100644 index 9201f9c15..000000000 --- a/grammars/resource/german/TestDeu.gf +++ /dev/null @@ -1,49 +0,0 @@ --- use this path to read the grammar from the same directory ---# -path=.:../abstract:../../prelude - -concrete TestDeu of TestAbs = ResDeu ** open Syntax in { - -flags startcat=Phr ; lexer=text ; parser=chart ; unlexer=text ; - --- a random sample from the lexicon - -lin - Big = adjCompReg3 "gross" "grösser" "grösst"; - Small = adjCompReg "klein" ; - Old = adjCompReg3 "alt" "älter" "ältest"; - Young = adjCompReg3 "jung" "jünger" "jüngst"; - American = adjReg "Amerikanisch" ; - Finnish = adjReg "Finnisch" ; - Married = adjReg "verheiratet" ** {s2 = "mit" ; c = Dat} ; - Man = declN2u "Mann" "Männer" ; - Woman = declN1 "Frau" ; - Car = declNs "Auto" ; - House = declN3uS "Haus" "Häuser" ; - Light = declN3 "Licht" ; - Walk = mkVerbSimple (verbLaufen "gehen" "geht" "gegangen") ; - Run = mkVerbSimple (verbLaufen "laufen" "läuft" "gelaufen") ; - Say = mkVerbSimple (regVerb "sagen") ; - Prove = mkVerbSimple (regVerb "beweisen") ; - Send = mkTransVerb (mkVerbSimple (verbLaufen "senden" "sendet" "gesandt")) [] Acc; - Love = mkTransVerb (mkVerbSimple (regVerb "lieben")) [] Acc ; - Wait = mkTransVerb (mkVerbSimple (verbWarten "warten")) "auf" Acc ; - Give = mkDitransVerb - (mkVerbSimple (verbLaufen "geben" "gibt" "gegeben")) [] Dat [] Acc ; - Prefer = mkDitransVerb - (mkVerb (verbLaufen "ziehen" "zieht" "gezogen") "vor") [] Acc "vor" Dat ; - Mother = mkFunC (n2n (declN2uF "Mutter" "Mütter")) "von" Dat ; - Uncle = mkFunC (n2n (declN2i "Onkel")) "von" Dat ; - Connection = mkFunC (n2n (declN1 "Verbindung")) "von" Dat ** - {s3 = "nach" ; c2 = Dat} ; - - Always = mkAdverb "immer" ; - Well = mkAdverb "gut" ; - - SwitchOn = mkTransVerb (mkVerb (verbWarten "schalten") "auf") [] Acc ; - SwitchOff = mkTransVerb (mkVerb (verbWarten "schalten") "aus") [] Acc ; - - John = mkProperName "Johann" ; - Mary = mkProperName "Maria" ; - -} ; - diff --git a/grammars/resource/german/Types.gf b/grammars/resource/german/Types.gf deleted file mode 100644 index d597223cd..000000000 --- a/grammars/resource/german/Types.gf +++ /dev/null @@ -1,98 +0,0 @@ ---1 German Word Classes and Morphological Parameters --- --- This is a resource module for German morphology, defining the --- morphological parameters and word classes of German. It is so far only --- complete w.r.t. the syntax part of the resource grammar. --- It does not include those parameters that are not needed for --- analysing individual words: such parameters are defined in syntax modules. --- - -resource Types = 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 = Masc | Fem | Neut ; - Person = P1 | P2 | P3 ; - Case = Nom | Acc | Dat | Gen ; - Adjf = Strong | Weak ; -- the main division in adjective declension - Order = Main | Inv | Sub ; -- word order: direct, indirect, subordinate - --- For abstraction and API compatibility, we define two synonyms: - -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 mostly hierarchical. The alternative is cross-products of --- simple parameters, but this cannot be always used since it overgenerates. --- - ---3 Common nouns --- --- Common nouns are inflected in number and case and they have an inherent gender. - - CommNoun : Type = {s : Number => Case => Str ; g : Gender} ; - ---3 Pronouns --- --- Pronouns are an example - the worst-case one of noun phrases, --- which are properly defined in $syntax.Deu.gf$. --- Their inflection tables has, in addition to the normal genitive, --- the possessive forms, which are inflected like determiners. - -param - NPForm = NPCase Case | NPPoss GenNum Case ; - ---3 Adjectives --- --- Adjectives are a very complex class, and the full table has as many as --- 99 different forms. The major division is between the comparison degrees. --- There is no gender distinction in the plural, --- and the predicative forms ("X ist Adj") are not inflected. - -param - GenNum = GSg Gender | GPl ; - AForm = APred | AMod Adjf GenNum Case ; - -oper - Adjective : Type = {s : AForm => Str} ; - AdjComp : Type = {s : Degree => AForm => Str} ; - --- Comparison of adjectives: - -param Degree = Pos | Comp | Sup ; - ---3 Verbs --- --- We have a reduced conjugation with only the present tense infinitive, --- indicative, and imperative forms, and past participles. - -param VForm = VInf | VInd Number Person | VImp Number | VPart AForm ; - -oper Verbum : Type = VForm => Str ; - --- On the general level, we have to account for composite verbs as well, --- such as "aus" + "sehen" etc. - - Particle = Str ; - - Verb = {s : Verbum ; s2 : Particle} ; - - ---2 Prepositions --- --- We define prepositions simply as strings. Thus we do not capture the --- contractions "vom", "ins", etc. To define them in GF grammar we would need --- to introduce a parameter system, which we postpone. - - Preposition = Str ; - -} ; diff --git a/grammars/resource/italian/MorphoIta.gf b/grammars/resource/italian/MorphoIta.gf deleted file mode 100644 index c499f83df..000000000 --- a/grammars/resource/italian/MorphoIta.gf +++ /dev/null @@ -1,291 +0,0 @@ ---# -path=.:../romance:../../prelude - ---1 A Simple Italian Resource Morphology --- --- Aarne Ranta 2002--2003 --- --- This resource morphology contains definitions needed in the resource --- syntax. It moreover contains the most usual inflectional patterns. --- The patterns for verbs contain the complete "Bescherelle" conjugation --- tables. --- --- We use the parameter types and word classes defined in $TypesIta.gf$. - -resource MorphoIta = open (Predef=Predef), Prelude, TypesIta in { - ---2 Some phonology --- ---3 Elision --- --- The phonological rule of *elision* can be defined as follows in GF. --- In Italian it includes both vowels and the *impure 's'*. - -oper - vocale : Strs = strs { - "a" ; "e" ; "h" ; "i" ; "o" ; "u" - } ; - - sImpuro : Strs = strs { - "z" ; "sb" ; "sc" ; "sd" ; "sf" ; "sm" ; "sp" ; "sq" ; "sr" ; "st" ; "sv" - } ; - - elision : (_,_,_ : Str) -> Str = \il, l', lo -> - pre {il ; l' / vocale ; lo / sImpuro} ; - - ---2 Nouns --- --- The following macro is useful for creating the forms of number-dependent --- tables, such as common nouns. - - numForms : (_,_ : Str) -> Number => Str = \vino, vini -> - table {Sg => vino ; Pl => vini} ; - --- For example: - - nomVino : Str -> Number => Str = \vino -> let {vin = Predef.tk 1 vino} in - numForms vino (vin + "i") ; - - nomRana : Str -> Number => Str = \rana -> let {ran = Predef.tk 1 rana} in - numForms rana (ran + "e") ; - - nomSale : Str -> Number => Str = \sale -> let {sal = Predef.tk 1 sale} in - numForms sale (sal + "i") ; - - nomTram : Str -> Number => Str = \tram -> - numForms tram tram ; - --- Common nouns are inflected in number and have an inherent gender. - - mkCNom : (Number => Str) -> Gender -> CNom = \mecmecs,gen -> - {s = mecmecs ; g = gen} ; - - mkCNomIrreg : Str -> Str -> Gender -> CNom = \mec,mecs -> - mkCNom (numForms mec mecs) ; - - - ---2 Adjectives --- --- Adjectives are conveniently seen as gender-dependent nouns. --- Here are some patterns. First one that describes the worst case. - - mkAdj : (_,_,_,_ : Str) -> Adj = \solo,sola,soli,sole -> - {s = table { - Masc => numForms solo soli ; - Fem => numForms sola sole - } - } ; - --- Then the regular and invariant patterns. - - adjSolo : Str -> Adj = \solo -> let {sol = Predef.tk 1 solo} in - mkAdj solo (sol + "a") (sol + "i") (sol + "e") ; - - adjTale : Str -> Adj = \tale -> let {tali = Predef.tk 1 tale + "i"} in - mkAdj tale tale tali tali ; - - adjBlu : Str -> Adj = \blu -> - mkAdj blu blu blu blu ; - --- Adjectives themselves are records. Here the most common cases: - - ---2 Personal pronouns --- --- All the eight personal pronouns can be built by the following macro. --- The use of "ne" as atonic genitive is debatable. --- We follow the rule that the atonic nominative is empty. - - mkPronoun : (_,_,_,_,_,_,_,_ : Str) -> - PronGen -> Number -> Person -> ClitType -> Pronoun = - \il,le,lui,Lui,son,sa,ses,see,g,n,p,c -> - {s = table { - Ton Nom => il ; - Ton x => prepCase x ++ Lui ; - Aton Nom => [] ; - Aton Acc => le ; - Aton (CPrep P_di) => "ne" ; --- hmm - Aton (CPrep P_a) => lui ; - Aton (CPrep q) => strPrep q ++ Lui ; ---- GF bug with c or p! - Poss Sg Masc => son ; - Poss Sg Fem => sa ; - Poss Pl Masc => ses ; - Poss Pl Fem => see - } ; - g = g ; - n = n ; - p = p ; - c = c - } ; - - ---2 Reflexive pronouns --- --- It is simply a function depending on number and person. - - pronRefl : Number -> Person -> Str = \n,p -> case of { - => "mi" ; - => "ti" ; - <_, P3> => "si" ; - => "ci" ; - => "vi" - } ; - - ---2 Determiners --- --- Determiners, traditionally called indefinite pronouns, are inflected --- in gender and number, like adjectives. - - pronForms : Adj -> Gender -> Number -> Str = \tale,g,n -> tale.s ! g ! n ; - - qualPron : Gender -> Number -> Str = pronForms (adjTale "quale") ; - - talPron : Gender -> Number -> Str = pronForms (adjTale "tale") ; - - tuttoPron : Gender -> Number -> Str = pronForms (adjSolo "tutto") ; - ---2 Articles --- --- The definite article has quite some variation: three parameters and --- elision. This is the simples definition we have been able to find. - - artDefTable : Gender => Number => Case => Str = \\g,n,c => case of { - <_, _, CPrep P_di> => prepArt g n "de" ; - <_, _, CPrep P_da> => prepArt g n "da" ; - <_, _, CPrep P_a> => prepArt g n "a" ; - <_, _, CPrep P_in> => prepArt g n "ne" ; - <_, _, CPrep P_su> => prepArt g n "su" ; - <_, _, CPrep P_con> => prepArt g n "co" ; - => elision "il" "l'" "lo" ; - => elision "il" "l'" "lo" ; - - => elision "la" "l'" "la" ; - => elision "i" "gli" "gli" ; - => "le" - } ; - --- This auxiliary expresses the uniform rule. - - prepArt : Gender -> Number -> Tok -> Tok = \g,n,de -> case of { - => elision (de + "l") (de + "ll'") (de + "llo") ; - => elision (de + "i") (de + "gli") (de + "gli") ; - => elision (de + "lla") (de + "ll'") (de + "lla") ; - => de + "lle" - } ; - ---2 Verbs --- ---3 The present tense --- --- We first define some macros for the special case of present tense. --- --- The verb "essere" is often used in syntax. - - verbEssere = verbPres essere ; - --- We very often form the verb stem by dropping out the infinitive ending. - - troncVerb : Tok -> Tok = Predef.tk 3 ; - - -oper mkVerbPres : (_,_,_,_,_,_,_,_ : Str) -> VerbPres = - \veng, viene, ven, venite, vengono, venga, vieni, venire -> - let {vien = Predef.tk 1 vieni} in - {s = table { - VFin Ind Sg P1 => veng + "o" ; - VFin Ind Sg P2 => vien + "i" ; - VFin Ind Sg P3 => viene ; - VFin Ind Pl P1 => ven + "iamo" ; - VFin Ind Pl P2 => venite ; - VFin Ind Pl P3 => vengono ; - VFin Con Sg _ => venga ; - VFin Con Pl P1 => ven + "iamo" ; - VFin Con Pl P2 => ven + "iate" ; - VFin Con Pl P3 => venga + "no" ; - VImper SgP2 => vieni ; - VImper PlP1 => ven + "iamo" ; - VImper PlP2 => venite ; - VInfin => venire - } - } ; - --- The four main conjugations. - - verbAmare : Str -> VerbPres = \amare -> - let {am = troncVerb amare ; ama = am + "a"} in - mkVerbPres - am ama am (ama + "te") (ama + "no") - (am+"i") ama amare ; - - verbDormire : Str -> VerbPres = \dormire -> - let {dorm = troncVerb dormire} in - mkVerbPres - dorm (dorm + "e") dorm (dorm + "ite") (dorm + "ino") (dorm+"a") - (dorm + "i") dormire ; - - verbFinire : Str -> VerbPres = \finire -> - let {fin = troncVerb finire ; fini = fin + "i" ; finisc = fini + "sc"} in - mkVerbPres - finisc (finisc + "e") fin (fini + "te") (finisc + "ono") - (finisc + "a") (finisc + "i") finire ; - - verbCorrere : Str -> VerbPres = \correre -> - let {corr = troncVerb correre ; corre = corr + "e"} in - mkVerbPres corr corre corr (corre + "te") (corr + "ono") (corr+"a") (corr+"i") - correre ; - --- Some irregular verbs. - - verbPresSpegnere : VerbPres = - mkVerbPres "speng" "spegne" "spegn" "spegnete" "spengono" - "spenga" "spegni" "spegnere" ; - - verbPresDire : VerbPres = - mkVerbPres "dic" "dice" "dic" "dite" "dicono" - "dica" "di" "dire" ; - - -essere = {s = table { - Inf => "essere" ; - Indi Pres Sg P1 => "sono" ; - Indi Pres Sg P2 => "sei" ; - Indi Pres Sg P3 => "è" ; - Indi Pres Pl P1 => "siamo" ; - Indi Pres Pl P2 => "siete" ; - Indi Pres Pl P3 => "sono" ; - Cong Pres Sg P1 => "sia" ; - Cong Pres Sg P2 => "sia" ; - Cong Pres Sg P3 => "sia" ; - Cong Pres Pl P1 => "siamo" ; - Cong Pres Pl P2 => "siate" ; - Cong Pres Pl P3 => "siano" ; - Imper SgP2 => "sii" ; - Imper PlP1 => "siamo" ; - Imper PlP2 => "siate" ; - _ => "essere" --- we just don't care - }} ; - - - avere = {s = table { - Inf => "avere" ; - Indi Pres Sg P1 => "ho" ; - Indi Pres Sg P2 => "hai" ; - Indi Pres Sg P3 => "ha" ; - Indi Pres Pl P1 => "abbiamo" ; - Indi Pres Pl P2 => "avete" ; - Indi Pres Pl P3 => "hanno" ; - Cong Pres Sg P1 => "abbia" ; - Cong Pres Sg P2 => "abbia" ; - Cong Pres Sg P3 => "abbia" ; - Cong Pres Pl P1 => "abbiamo" ; - Cong Pres Pl P2 => "abbiate" ; - Cong Pres Pl P3 => "abbiano" ; - Imper SgP2 => "abbi" ; - Imper PlP1 => "abbiamo" ; - Imper PlP2 => "abbiate" ; - _ => "avere" --- we just don't care - }} ; - -} diff --git a/grammars/resource/italian/ResIta.gf b/grammars/resource/italian/ResIta.gf deleted file mode 100644 index de1995fa1..000000000 --- a/grammars/resource/italian/ResIta.gf +++ /dev/null @@ -1,3 +0,0 @@ ---# -path=.:../romance:../abstract:../../prelude - -concrete ResIta of ResAbs = ResRomance with (SyntaxRomance=SyntaxIta) ; diff --git a/grammars/resource/italian/SyntaxIta.gf b/grammars/resource/italian/SyntaxIta.gf deleted file mode 100644 index c8fc00bed..000000000 --- a/grammars/resource/italian/SyntaxIta.gf +++ /dev/null @@ -1,286 +0,0 @@ ---# -path=.:../../prelude - -instance SyntaxIta of SyntaxRomance = - TypesIta ** open Prelude, (CO=Coordination), MorphoIta in { -oper - nameNounPhrase = \jean -> - normalNounPhrase - (\\c => prepCase c ++ jean.s) - jean.g - Sg ; - - chaqueDet = mkDeterminer1 Sg "ogni" ; - tousDet = mkDeterminer Pl ["tutti i"] ["tutte le"] ; --- gli - plupartDet = mkDeterminer1 Pl ["la maggior parte di"] ; --- dei, degli, delle - unDet = mkDeterminer Sg artUno artUna ; - plDet = mkDeterminer1 Pl [] ; --- dei, degli, delle - - quelDet = mkDeterminer1 Sg "quale" ; - - npGenPoss = \n,ton,mec -> - \\c => artDef mec.g n c ++ ton.s ! Poss n mec.g ++ mec.s ! n ; --- mia madre - - mkAdjSolo : Str -> Bool -> Adjective = \adj,p -> - mkAdjective (adjSolo adj) p ; - - mkAdjTale : Str -> Bool -> Adjective = \adj,p -> - mkAdjective (adjTale adj) p ; - - mkAdjDegrSolo : Str -> Bool -> AdjDegr = \adj,p -> - mkAdjDegrLong (adjSolo adj) p ; - - mkAdjDegrTale : Str -> Bool -> AdjDegr = \adj,p -> - mkAdjDegrLong (adjTale adj) p ; - - comparConj = variants {"di" ; "che"} ; - --- The commonest case for functions is common noun + "di". - - funDi : CommNounPhrase -> Function = \mere -> - mere ** complementCas genitive ; - --- Chains of "cui" - "cui" do not arise. - - funRelPron = \mere,lequel -> - {s = table { - RComplex g n c => variants { - case mere.c of { - CPrep P_di => artDef mere.g n c ++ - lequel.s ! RSimple dative ++ mere.s ! n ; - _ => nonExist} ; - artDef mere.g n c ++ mere.s ! n ++ - mere.s2 ++ lequel.s ! RComplex g n mere.c - } ; - _ => nonExist - } ; - g = RG mere.g - } ; - --- Verbs - - negVerb = \va -> "non" ++ va ; - - copula = \b -> \\v => (if_then_else Str b [] "non") ++ verbEssere.s ! v ; - - isTransVerbClit = \v -> case v.c of { - Acc => True ; - _ => False --- hmmm - } ; - --- The negation of a verb. - - posNeg = \b,v,c -> - if_then_else Str b - (v ++ c) - ("non" ++ v ++ c) ; - - locativeNounPhrase = \jean -> - {s = "in" ++ jean.s ! Ton Acc} ; ---- - - embedConj = "che" ; - --- Relative pronouns - - identRelPron = { - s = table { - RSimple c => relPronForms ! c ; - RComplex g n c => composRelPron g n c - } ; - g = RNoGen - } ; - - suchPron = talPron ; - - composRelPron = ilqualPron ; - - allRelForms = \lequel,g,n,c -> - variants { - lequel.s ! RSimple c ; - lequel.s ! RComplex g n c - } ; - --- Interrogative pronouns - - nounIntPron = \n, mec -> - {s = \\c => prepCase c ++ qualPron mec.g n ++ mec.s ! n ; - g = mec.g ; - n = n - } ; - - intPronWho = \num -> { - s = \\c => prepCase c ++ "chi" ; - g = Masc ; --- can we decide this? - n = num - } ; - - intPronWhat = \num -> { - s = table { - c => prepCase c ++ "che" ++ optStr "cosa" - } ; - g = Masc ; --- can we decide this? - n = num - } ; - --- Questions - - questVerbPhrase = \jean,dort -> - {s = table { - DirQ => (predVerbPhrase jean dort).s ! Ind ; - IndirQ => "se" ++ (predVerbPhrase jean dort).s ! Ind - } - } ; - - intVerbPhrase = \qui, dort -> - {s = table { - DirQ => qui.s ! Nom ++ - dort.s ! qui.g ! VFin Ind qui.n P3 ; - IndirQ => qui.s ! Nom ++ dort.s ! qui.g ! VFin Ind qui.n P3 - } - } ; - - intSlash = \Qui, Tuvois -> - let {qui = Tuvois.s2 ++ Qui.s ! Tuvois.c ; tuvois = Tuvois.s ! Ind} in - {s = table { - DirQ => qui ++ tuvois ; - IndirQ => ifCe Tuvois.c ++ qui ++ tuvois - } - } ; - --- An auxiliary to distinguish between --- "je ne sais pas" ("ce qui dort" / "ce que tu veux" / "à qui tu penses"). - - ifCe : Case -> Str = \c -> case c of { --- - Nom => "ciò" ; - Acc => "ciò" ; - _ => [] - } ; - - questAdverbial = \quand, jean, dort -> - let {jeandort = (predVerbPhrase jean dort).s ! Ind} in - {s = table { - DirQ => quand.s ++ jeandort ; --- inversion? - IndirQ => quand.s ++ jeandort - } - } ; - ----- moved from MorphoIta - --- A macro for defining gender-dependent tables will be useful. --- Its first application is in the indefinite article. - - genForms = \matto, matta -> - table {Masc => matto ; Fem => matta} ; - - artUno : Str = elision "un" "un" "uno" ; - artUna : Str = elision "una" "un'" "una" ; - - artIndef = \g,n,c -> case n of { - Sg => prepCase c ++ genForms artUno artUna ! g ; - _ => prepCase c ++ [] - } ; - - artDef = \g,n,c -> artDefTable ! g ! n ! c ; - --- The composable pronoun "il quale" is inflected by varying the definite --- article and the determiner "quale" in the expected way. - - ilqualPron : Gender -> Number -> Case -> Str = \g,n,c -> - artDef g n c ++ qualPron g n ; - - pronJe = mkPronoun - "io" - "mi" - "mi" - "me" - "mio" "mia" "miei" "mie" - PNoGen -- gender cannot be known from pronoun alone - Sg - P1 - Clit1 ; - - pronTu = mkPronoun - "tu" - "ti" - "ti" - "te" - "tuo" "tua" "tuoi" "tue" - PNoGen - Sg - P2 - Clit1 ; - - pronIl = mkPronoun - "lui" - "lo" - "gli" - "lui" - "suo" "sua" "suoi" "sue" - (PGen Masc) - Sg - P3 - Clit2 ; - - pronElle = mkPronoun - "lei" - "la" - "le" - "lei" - "suo" "sua" "suoi" "sue" - (PGen Fem) - Sg - P3 - Clit2 ; - - pronNous = mkPronoun - "noi" - "ci" - "ci" - "noi" - "nostro" "nostra" "nostri" "nostre" - PNoGen - Pl - P1 - Clit3 ; - - pronVous = mkPronoun - "voi" - "vi" - "vi" - "voi" - "vostro" "vostra" "vostri" "vostre" - PNoGen - Pl --- depends! - P2 - Clit3 ; - - pronIls = mkPronoun - "loro" - "loro" - "li" --- le ! - "loro" - "loro" "loro" "loro" "loro" - PNoGen - Pl - P3 - Clit1 ; - --- moved from ResIta - - commentAdv = ss "comme" ; - quandAdv = ss "quando" ; - ouAdv = ss "o" ; - pourquoiAdv = ss "perché" ; - - etConj = ss "e" ** {n = Pl} ; - ouConj = ss "o" ** {n = Sg} ; - etetConj = sd2 "e" "e" ** {n = Pl} ; - ououConj = sd2 "o" "o" ** {n = Sg} ; - niniConj = sd2 "né" "né" ** {n = Sg} ; --- requires ne ! - siSubj = ss "se" ; - quandSubj = ss "quando" ; - - ouiPhr = ss ["Sì ."] ; - nonPhr = ss ["No ."] ; - -} - diff --git a/grammars/resource/italian/TestIta.gf b/grammars/resource/italian/TestIta.gf deleted file mode 100644 index 01d31d70d..000000000 --- a/grammars/resource/italian/TestIta.gf +++ /dev/null @@ -1,35 +0,0 @@ ---# -path=.:../romance:../abstract:../../prelude - -concrete TestIta of TestAbs = - ResIta ** open Prelude, TypesIta, MorphoIta, SyntaxIta in { - -flags startcat=Phr ; lexer=text ; parser=chart ; unlexer=text ; - -lin - Big = mkAdjDegrTale "grande" adjPre ; - Small = mkAdjDegrSolo "piccolo" adjPre ; - Old = mkAdjDegrLong (mkAdj "vecchio" "vecchia" "vecchi" "vecchie") adjPre ; - Young = mkAdjDegrTale "giovane" adjPre ; - Man = mkCNom (numForms "uomo" "uomini") Masc ; - Woman = mkCNom (nomRana "donna") Fem ; - Car = mkCNom (nomRana "macchina") Fem ; - Light = mkCNom (nomSale "luce") Fem ; - House = mkCNom (nomRana "casa") Fem ; - Walk = verbAmare "camminare" ; - Run = verbCorrere "correre"; - Send = mkTransVerbDir (verbAmare "mandare") ; - Love = mkTransVerbDir (verbAmare "amare") ; - Wait = mkTransVerbDir (verbAmare "aspettare") ; - Say = verbSent verbPresDire Ind Ind ; - Prove = verbSent (verbAmare "dimostrare") Ind Ind ; - SwitchOn = mkTransVerbDir (verbAmare "allumare") ; - SwitchOff = mkTransVerbDir verbPresSpegnere ; - Mother = funDi (mkCNom (nomSale "madre") Fem) ; - Uncle = funDi (mkCNom (nomVino "zio") Masc) ; - - Well = ss "bene" ; - Always = ss "sempre" ; - - John = mkProperName "Giovanni" Masc ; - Mary = mkProperName "Maria" Fem ; -} diff --git a/grammars/resource/italian/TypesIta.gf b/grammars/resource/italian/TypesIta.gf deleted file mode 100644 index 15cab0bea..000000000 --- a/grammars/resource/italian/TypesIta.gf +++ /dev/null @@ -1,131 +0,0 @@ ---1 Italian Word Classes and Morphological Parameters --- --- This is a resource module for Italian morphology, defining the --- morphological parameters and word classes of Italian. --- The morphology is so far only --- complete w.r.t. the syntax part of the resource grammar. --- It does not include those parameters that are not needed for --- analysing individual words: such parameters are defined in syntax modules. - -instance TypesIta of TypesRomance = { - --- First we give values to the abstract types. - -param - Case = Nom | Acc | CPrep Prep ; - - Prep = P_di | P_a | P_da | P_in | P_su | P_con ; - - NPForm = Ton Case | Aton Case | Poss Number Gender ; - ---2 Prepositions --- --- The type $Case$ in $types.Ita.gf$ has the dative and genitive --- cases, which are relevant for pronouns and the definite article, --- but which are otherwise expressed by prepositions. - -oper - prepCase = \c -> case c of { - Nom => [] ; - Acc => [] ; - CPrep p => strPrep p - } ; - - strPrep : Prep -> Str = \p -> case p of { - P_di => "di" ; - P_a => "a" ; - P_da => "da" ; - P_in => "in" ; - P_su => "su" ; - P_con => "con" - } ; - -oper - CaseA = Case ; - NPFormA = NPForm ; - - nominative = Nom ; - accusative = Acc ; - genitive = CPrep P_di ; - dative = CPrep P_a ; - - stressed = Ton ; - unstressed = Aton ; - -oper - pform2case = \p -> case p of { - Ton x => x ; - Aton x => x ; - Poss _ _ => genitive - } ; - - case2pform = \c -> case c of { - Nom => Aton Nom ; - Acc => Aton Acc ; - _ => Ton c - } ; - --- Comparative adjectives are only sometimes formed morphologically --- (actually: by different morphemes). - - mkAdjComp : (_,_ : Gender => Number => Str) -> AdjComp = - \buono, migliore -> - {s = table {Pos => buono ; _ => migliore}} ; - --- Usually the comparison forms are built by prefixing the word --- "più". The definite article needed in the superlative is provided in --- $syntax.Ita.gf$. - - adjCompLong : Adj -> AdjComp = \caro -> - mkAdjComp - caro.s - (\\g,n => "più" ++ caro.s ! g ! n) ; - - --- Relative pronouns: the case-dependent parameter type. - - param RelForm = RSimple Case | RComplex Gender Number Case ; - - oper RelFormA = RelForm ; - ---2 Relative pronouns --- --- The simple (atonic) relative pronoun shows genuine variation in all of the --- cases. - - relPronForms = table { - Nom => "che" ; - Acc => "che" ; - CPrep P_a => "cui" ; --- variant a cui - CPrep p => strPrep p ++ "cui" - } ; - --- Verbs: conversion from full verbs to present-tense verbs. - - verbPres = \amare -> {s = table { - VInfin => amare.s ! Inf ; - VFin Ind n p => amare.s ! Indi Pres n p ; - VFin Con n p => amare.s ! Cong Pres n p ; - VImper np => amare.s ! Imper np - }} ; - --- The full conjunction is a table on $VForm$: - -param - Tempo = Pres | Imperf ; - TempoP = PresP | PassP ; - VForm = - Inf - | Indi Tempo Number Person - | Pass Number Person - | Fut Number Person - | Cong Tempo Number Person - | Cond Number Person - | Imper NumPersI - | Ger - | Part TempoP Gender Number ; - --- This is the full verb type. - -oper Verbum = {s : VForm => Str} ; -} diff --git a/grammars/resource/nabstract/Combinations.gf b/grammars/resource/nabstract/Combinations.gf deleted file mode 100644 index 98c555c8e..000000000 --- a/grammars/resource/nabstract/Combinations.gf +++ /dev/null @@ -1,333 +0,0 @@ ---1 Abstract Syntax for Multilingual Resource Grammar --- --- Aarne Ranta 2002 -- 2003 --- --- Although concrete syntax differs a lot between different languages, --- many structures can be treated as common, on the level --- of abstraction that GF provides. --- What we will present in the following is a linguistically oriented abstract --- syntax that has been successfully defined for the following languages: --- ---* $Eng$lish ---* $Fin$nish ---* $Fre$nch ---* $Ger$man ---* $Ita$lian ---* $Rus$sian ---* $Swe$dish --- --- The three-letter prefixes are used in file names all over the resource --- grammar library; we refer to them commonly as $X$ below. ---! --- The grammar has been applied to define language --- fragments on technical or near-to-technical domains: database queries, --- video recorder dialogue systems, software specifications, and a --- health-related phrase book. Each new application helped to identify some --- missing structures in the resource and suggested some additions, but the --- number of them was usually small. --- --- To use the resource in applications, you need the following --- $cat$ and $fun$ rules in $oper$ form, completed by taking the --- $lincat$ and $lin$ judgements of a particular language. This is done --- by using, instead of this module, the $reuse$ module which has the name --- $ResourceX$ - -abstract Combinations = PredefAbs ** { ---! ---2 Categories --- --- The categories of this resource grammar are mostly 'standard' categories --- of linguistics. Their is no claim that they correspond to semantic categories --- definable in type theory: to define such correspondences is the business --- of applications grammars. In general, the correspondence between linguistic --- and semantic categories is many-to-many. --- --- Categories that may look special are $Adj2$, $Fun$, and $TV$. They are all --- instances of endowing another category with a complement, which can be either --- a direct object (whose case may vary) or a prepositional phrase. Prepositional --- phrases that are not complements belong to the category --- $AdV$ of adverbials. --- --- In each group below, some categories are *lexical* in the sense of only --- containing atomic elements. These elements are not necessarily expressed by --- one word in all languages; the essential thing is that they have no --- constituents. Thus they have no productions in this part of the --- resource grammar. The $ParadigmsX$ grammars provide ways of defining --- lexical elements. --- --- Lexical categories are listed before other categories --- in each group and divided by an empty line. - ---! ---3 Nouns and noun phrases --- - -cat - N ; -- simple common noun, e.g. "car" - PN ; -- proper name, e.g. "John", "New York" - Fun ; -- function word, e.g. "mother (of)" - Fun2 ; -- two-place function, e.g. "flight (from) (to)" - - CN ; -- common noun phrase, e.g. "red car", "car that John owns" - NP ; -- noun phrase, e.g. "John", "all cars", "you" - Det ; -- determiner, e.g. "every", "all" - Num ; -- numeral, e.g. "three", "879" - ---! ---3 Adjectives and adjectival phrases --- - - Adj1 ; -- one-place adjective, e.g. "even" - Adj2 ; -- two-place adjective, e.g. "divisible (by)" - AdjDeg ; -- degree adjective, e.g. "big/bigger/biggest" - - AP ; -- adjective phrase, e.g. "divisible by two", "bigger than John" - --- The difference between $Adj1$ and $AdjDeg$ is that the former has no --- comparison forms. - ---! ---3 Verbs and verb phrases --- - - V ; -- one-place verb, e.g. "walk" - TV ; -- two-place verb, e.g. "love", "wait (for)", "switch on" - V3 ; -- three-place verb, e.g. "give", "prefer (stg) (to stg)" - VS ; -- sentence-compl. verb, e.g. "say", "prove" - VV ; -- verb-compl. verb, e.g. "can", "want" - - VG ; -- verbal group, e.g. "switch the light on" - VP ; -- verb phrase, e.g. "switch the light on", "don't run" - ---! ---3 Adverbials --- --- This group has no lexical categories. - - AdV ; -- adverbial e.g. "now", "in the house" - AdA ; -- ad-adjective e.g. "very" - AdS ; -- sentence adverbial e.g. "therefore", "otherwise" - Prep ; -- pre/postposition, case e.g. "after", Adessive - ---! ---3 Sentences and relative clauses --- --- This group has no lexical categories. - - S ; -- sentence, e.g. "John walks" - Slash ; -- sentence without NP, e.g. "John waits for (...)" - RP ; -- relative pronoun, e.g. "which", "the mother of whom" - RC ; -- relative clause, e.g. "who walks", "that I wait for" - ---! ---3 Questions and imperatives --- --- This group has no lexical categories. - - IP ; -- interrogative pronoun, e.g. "who", "whose mother", "which yellow car" - IAdv ; -- interrogative adverb., e.g. "when", "why" - Qu ; -- question, e.g. "who walks" - Imp ; -- imperative, e.g. "walk!" - ---! ---3 Coordination and subordination --- - - Conj ; -- conjunction, e.g. "and" - ConjD ; -- distributed conj. e.g. "both - and" - Subj ; -- subjunction, e.g. "if", "when" - - ListS ; -- list of sentences - ListAP ; -- list of adjectival phrases - ListNP ; -- list of noun phrases - ---! ---3 Complete utterances --- --- This group has no lexical categories. - - Phr ; -- full phrase, e.g. "John walks.","Who walks?", "Wait for me!" - Text ; -- sequence of phrases e.g. "One is odd. Therefore, two is even." - ---! ---2 Rules --- --- This set of rules is minimal, in the sense of defining the simplest combinations --- of categories and not having redundant rules. --- When the resource grammar is used as a library, it will often be useful to --- access it through an intermediate library that defines more rules as --- 'macros' for combinations of the ones below. - ---! ---3 Nouns and noun phrases --- - -fun - UseN : N -> CN ; -- "car" - UsePN : PN -> NP ; -- "John" - UseFun : Fun -> CN ; -- "successor" - UseInt : Int -> Num ; -- "32" --- assumes i > 1 - - ModAdj : AP -> CN -> CN ; -- "red car" - DetNP : Det -> CN -> NP ; -- "every car" - MassNP : CN -> NP ; -- "wine" - IndefOneNP : CN -> NP ; -- "a car", "cars" - IndefManyNP : Num -> CN -> NP ; -- "houses", "86 houses" - DefOneNP : CN -> NP ; -- "the car" - DefManyNP : Num -> CN -> NP ; -- "the cars", "the 86 cars" - ModGenOne : NP -> CN -> NP ; -- "John's car" - ModGenMany : Num -> NP -> CN -> NP ; -- "John's cars", "John's 86 cars" - AppFun : Fun -> NP -> CN ; -- "successor of zero" - AppFun2 : Fun2 -> NP -> Fun ; -- "flight from Paris" - CNthatS : CN -> S -> CN ; -- "idea that the Earth is flat" - NoNum : Num ; -- no numeral modifier - ---! ---3 Adjectives and adjectival phrases --- - - AdjP1 : Adj1 -> AP ; -- "red" - PositAdjP : AdjDeg -> AP ; -- "old" - - ComplAdj : Adj2 -> NP -> AP ; -- "divisible by two" - ComparAdjP : AdjDeg -> NP -> AP ; -- "older than John" - SuperlNP : AdjDeg -> CN -> NP ; -- "the oldest man" - ---! ---3 Verbs and verb phrases --- --- The principal way of forming sentences ($S$) is by combining a noun phrase --- with a verb phrase (the $PredVP$ rule below). In addition to this, verb --- phrases have uses in relative clauses and questions. Verb phrases already --- have (or have not) a negation, but they are formed from verbal groups --- ($VG$), which have both positive and negative forms. - - PredV : V -> VG ; -- "walk", "doesn't walk" - PredPassV : V -> VG ; -- "is seen", "is not seen" - PredTV : TV -> NP -> VG ; -- "sees John", "doesn't see John" - PredVS : VS -> S -> VG ; -- "says that I run", "doesn't say..." - PredVV : VV -> VG -> VG ; -- "can run", "can't run", "tries to run" - PredV3 : V3 -> NP -> NP -> VG ; -- "prefers wine to beer" - - PredNP : NP -> VG ; -- "is John", "is not John" - PredAdV : AdV -> VG ; -- "is everywhere", "is not in France" - PredAP : AP -> VG ; -- "is old", "isn't old" - PredCN : CN -> VG ; -- "is a man", "isn't a man" - VTrans : TV -> V ; -- "loves" - - PosVG,NegVG : VG -> VP ; -- - ---! ---3 Adverbials --- --- Here is how complex adverbials can be formed and used. - - AdjAdv : AP -> AdV ; -- "freely", "more consciously than you" - PrepNP : Prep -> NP -> AdV ; -- "in London", "after the war" - - AdvVP : VP -> AdV -> VP ; -- "always walks", "walks in the park" - AdvCN : CN -> AdV -> CN ; -- "house in London", "house today" - AdvAP : AdA -> AP -> AP ; -- "very good" - ---! ---3 Sentences and relative clauses --- - - PredVP : NP -> VP -> S ; -- "John walks" - PosSlashTV, NegSlashTV : NP -> TV -> Slash ; -- "John sees", "John doesn's see" - OneVP : VP -> S ; -- "one walks" - ThereIsCN : CN -> S ; -- "there is a bar" - ThereAreCN : Num -> CN -> S ; -- "there are 86 bars" - - IdRP : RP ; -- "which" - FunRP : Fun -> RP -> RP ; -- "the successor of which" - RelVP : RP -> VP -> RC ; -- "who walks", "who doesn't walk" - RelSlash : RP -> Slash -> RC ; -- "that I wait for"/"for which I wait" - ModRC : CN -> RC -> CN ; -- "man who walks" - RelSuch : S -> RC ; -- "such that it is even" - ---! ---3 Questions and imperatives --- - - WhoOne, WhoMany : IP ; -- "who (is)", "who (are)" - WhatOne, WhatMany : IP ; -- "what (is)", "what (are)" - FunIP : Fun -> IP -> IP ; -- "the mother of whom" - NounIPOne, NounIPMany : CN -> IP ; -- "which car", "which cars" - - QuestVP : NP -> VP -> Qu; -- "does John walk"; "doesn't John walk" - IntVP : IP -> VP -> Qu ; -- "who walks" - IntSlash : IP -> Slash -> Qu ; -- "whom does John see" - QuestAdv : IAdv -> NP -> VP -> Qu ; -- "why do you walk" - IsThereCN : CN -> Qu ; -- "is there a bar" - AreThereCN : Num -> CN -> Qu ; -- "are there (86) bars" - - ImperVP : VP -> Imp ; -- "be a man" - - IndicPhrase : S -> Phr ; -- "I walk." - QuestPhrase : Qu -> Phr ; -- "Do I walk?" - ImperOne, ImperMany : Imp -> Phr ; -- "Be a man!", "Be men!" - - AdvS : AdS -> S -> Phr ; -- "Therefore, 2 is prime." - ---! ---3 Coordination --- --- We consider "n"-ary coordination, with "n" > 1. To this end, we have introduced --- a *list category* $ListX$ for each category $X$ whose expressions we want to --- conjoin. Each list category has two constructors, the base case being $TwoX$. - --- We have not defined coordination of all possible categories here, --- since it can be tricky in many languages. For instance, $VP$ coordination --- is linguistically problematic in German because $VP$ is a discontinuous --- category. - - ConjS : Conj -> ListS -> S ; -- "John walks and Mary runs" - ConjAP : Conj -> ListAP -> AP ; -- "even and prime" - ConjNP : Conj -> ListNP -> NP ; -- "John or Mary" - - ConjDS : ConjD -> ListS -> S ; -- "either John walks or Mary runs" - ConjDAP : ConjD -> ListAP -> AP ; -- "both even and prime" - ConjDNP : ConjD -> ListNP -> NP ; -- "either John or Mary" - - TwoS : S -> S -> ListS ; - ConsS : ListS -> S -> ListS ; - - TwoAP : AP -> AP -> ListAP ; - ConsAP : ListAP -> AP -> ListAP ; - - TwoNP : NP -> NP -> ListNP ; - ConsNP : ListNP -> NP -> ListNP ; - ---! ---3 Subordination --- --- Subjunctions are different from conjunctions, but form --- a uniform category among themselves. - - SubjS : Subj -> S -> S -> S ; -- "if 2 is odd, 3 is even" - SubjImper : Subj -> S -> Imp -> Imp ; -- "if it is hot, use a glove!" - SubjQu : Subj -> S -> Qu -> Qu ; -- "if you are new, who are you?" - SubjVP : VP -> Subj -> S -> VP ; -- "(a man who) sings when he runs" - ---! ---2 One-word utterances --- --- These are, more generally, *one-phrase utterances*. The list below --- is very incomplete. - - PhrNP : NP -> Phr ; -- "Some man.", "John." - PhrOneCN, PhrManyCN : CN -> Phr ; -- "A car.", "Cars." - PhrIP : IAdv -> Phr ; -- "Who?" - PhrIAdv : IAdv -> Phr ; -- "Why?" - ---! ---2 Text formation --- --- A text is a sequence of phrases. It is defined like a non-empty list. - - OnePhr : Phr -> Text ; - ConsPhr : Phr -> Text -> Text ; - -} ; - diff --git a/grammars/resource/nabstract/PredefAbs.gf b/grammars/resource/nabstract/PredefAbs.gf deleted file mode 100644 index ccd214fd4..000000000 --- a/grammars/resource/nabstract/PredefAbs.gf +++ /dev/null @@ -1,4 +0,0 @@ -abstract PredefAbs = { - cat String ; Int ; -} ; - diff --git a/grammars/resource/nabstract/ResAbs.gf b/grammars/resource/nabstract/ResAbs.gf deleted file mode 100644 index 7828e51ac..000000000 --- a/grammars/resource/nabstract/ResAbs.gf +++ /dev/null @@ -1,275 +0,0 @@ ---1 Abstract Syntax for Multilingual Resource Grammar --- --- Aarne Ranta 2002 -- 2003 --- --- Although concrete syntax differs a lot between different languages, --- many structures can be found that are common, on a certain level --- of abstraction. What we will present in the following is an abstract --- syntax that has been successfully defined for English, Finnish, French, German, --- Italian, Russian, and Swedish. It has been applied to define language --- fragments on technical or near-to-technical domains: database queries, --- video recorder dialogue systems, software specifications, and a --- health-related phrase book. Each new application helped to identify some --- missing structures in the resource and suggested some additions, but the --- number of them was usually small. --- --- To use the resource in applications, you need the following --- $cat$ and $fun$ rules in $oper$ form, completed by taking the --- $lincat$ and $lin$ judgements of a particular language. This is done --- by using the $reuse$ module with the desired concrete syntax of --- $ResAbs$ as argument. - - ---2 Categories --- --- The categories of this resource grammar are mostly 'standard' categories --- of linguistics. Their is no claim that they correspond to semantic categories --- definable in type theory: to define such correspondences is the business --- of applications grammars. --- --- Categories that may look special are $Adj2$, $Fun$, and $TV$. They are all --- instances of endowing another category with a complement, which can be either --- a direct object (whose case may vary) or a prepositional phrase. This, together --- with the category $Adv$, removes the need of a category of --- 'prepositional phrases', which is too language-dependent to make sense --- on this level of abstraction. --- - -abstract ResAbs = { - ---3 Nouns and noun phrases --- - -cat - N ; -- simple common noun, e.g. "car" - CN ; -- common noun phrase, e.g. "red car", "car that John owns" - NP ; -- noun phrase, e.g. "John", "all cars", "you" - PN ; -- proper name, e.g. "John", "New York" - Det ; -- determiner, e.g. "every", "all" - Fun ; -- function word, e.g. "mother (of)" - Fun2 ; -- two-place function, e.g. "flight (from) (to)" - ---3 Adjectives and adjectival phrases --- - - Adj1 ; -- one-place adjective, e.g. "even" - Adj2 ; -- two-place adjective, e.g. "divisible (by)" - AdjDeg ; -- degree adjective, e.g. "big/bigger/biggest" - AP ; -- adjective phrase, e.g. "divisible by two", "bigger than John" - ---3 Verbs and verb phrases --- - - V ; -- one-place verb, e.g. "walk" - TV ; -- two-place verb, e.g. "love", "wait (for)", "switch on" - V3 ; -- three-place verb, e.g. "give", "prefer (stg) (to stg)" - VS ; -- sentence-compl. verb, e.g. "say", "prove" - VP ; -- verb phrase, e.g. "switch the light on" - ---3 Adverbials --- - - AdV ; -- adverbial e.g. "now", "in the house" - AdA ; -- ad-adjective e.g. "very" - AdS ; -- sentence adverbial e.g. "therefore", "otherwise" - ---3 Sentences and relative clauses --- - - S ; -- sentence, e.g. "John walks" - Slash ; -- sentence without NP, e.g. "John waits for (...)" - RP ; -- relative pronoun, e.g. "which", "the mother of whom" - RC ; -- relative clause, e.g. "who walks", "that I wait for" - ---3 Questions and imperatives --- - - IP ; -- interrogative pronoun, e.g. "who", "whose mother", "which yellow car" - IAdv ; -- interrogative adverb., e.g. "when", "why" - Qu ; -- question, e.g. "who walks" - Imp ; -- imperative, e.g. "walk!" - ---3 Coordination and subordination --- - - Conj ; -- conjunction, e.g. "and" - ConjD ; -- distributed conj. e.g. "both - and" - Subj ; -- subjunction, e.g. "if", "when" - - ListS ; -- list of sentences - ListAP ; -- list of adjectival phrases - ListNP ; -- list of noun phrases - ---3 Complete utterances --- - - Phr ; -- full phrase, e.g. "John walks.","Who walks?", "Wait for me!" - Text ; -- sequence of phrases e.g. "One is odd. Therefore, two is even." - - ---2 Rules --- --- This set of rules is minimal, in the sense of defining the simplest combinations --- of categories and not having redundant rules. --- When the resource grammar is used as a library, it will often be useful to --- access it through an intermediate library that defines more rules as --- 'macros' for combinations of the ones below. - ---3 Nouns and noun phrases --- - -fun - UseN : N -> CN ; -- "car" - ModAdj : AP -> CN -> CN ; -- "red car" - DetNP : Det -> CN -> NP ; -- "every car" - IndefOneNP, IndefManyNP : CN -> NP ; -- "a car", "cars" - DefOneNP, DefManyNP : CN -> NP ; -- "the car", "the cars" - ModGenOne, ModGenMany : NP -> CN -> NP ; -- "John's car", "John's cars" - UsePN : PN -> NP ; -- "John" - UseFun : Fun -> CN ; -- "successor" - AppFun : Fun -> NP -> CN ; -- "successor of zero" - AppFun2 : Fun2 -> NP -> Fun ; -- "flight from Paris" - CNthatS : CN -> S -> CN ; -- "idea that the Earth is flat" - ---3 Adjectives and adjectival phrases --- - - AdjP1 : Adj1 -> AP ; -- "red" - ComplAdj : Adj2 -> NP -> AP ; -- "divisible by two" - PositAdjP : AdjDeg -> AP ; -- "old" - ComparAdjP : AdjDeg -> NP -> AP ; -- "older than John" - SuperlNP : AdjDeg -> CN -> NP ; -- "the oldest man" - ---3 Verbs and verb phrases --- - - PosV, NegV : V -> VP ; -- "walk", "doesn't walk" - PosA, NegA : AP -> VP ; -- "is old", "isn't old" - PosCN, NegCN : CN -> VP ; -- "is a man", "isn't a man" - PosTV, NegTV : TV -> NP -> VP ; -- "sees John", "doesn't see John" - PosPassV, NegPassV : V -> VP ; -- "is seen", "is not seen" - PosNP, NegNP : NP -> VP ; -- "is John", "is not John" - PosVS, NegVS : VS -> S -> VP ; -- "says that I run", "doesn't say..." - PosV3, NegV3 : V3 -> NP -> NP -> VP ; -- "prefers wine to beer" - VTrans : TV -> V ; -- "loves" - ---3 Adverbials --- - - AdvVP : VP -> AdV -> VP ; -- "always walks", "walks in the park" - LocNP : NP -> AdV ; -- "in London" - AdvCN : CN -> AdV -> CN ; -- "house in London", "house today" - - AdvAP : AdA -> AP -> AP ; -- "very good" - - ---3 Sentences and relative clauses --- - - PredVP : NP -> VP -> S ; -- "John walks" - PosSlashTV, NegSlashTV : NP -> TV -> Slash ; -- "John sees", "John doesn's see" - OneVP : VP -> S ; -- "one walks" - - IdRP : RP ; -- "which" - FunRP : Fun -> RP -> RP ; -- "the successor of which" - RelVP : RP -> VP -> RC ; -- "who walks" - RelSlash : RP -> Slash -> RC ; -- "that I wait for"/"for which I wait" - ModRC : CN -> RC -> CN ; -- "man who walks" - RelSuch : S -> RC ; -- "such that it is even" - ---3 Questions and imperatives --- - - WhoOne, WhoMany : IP ; -- "who (is)", "who (are)" - WhatOne, WhatMany : IP ; -- "what (is)", "what (are)" - FunIP : Fun -> IP -> IP ; -- "the mother of whom" - NounIPOne, NounIPMany : CN -> IP ; -- "which car", "which cars" - - QuestVP : NP -> VP -> Qu ; -- "does John walk" - IntVP : IP -> VP -> Qu ; -- "who walks" - IntSlash : IP -> Slash -> Qu ; -- "whom does John see" - QuestAdv : IAdv -> NP -> VP -> Qu ; -- "why do you walk" - - ImperVP : VP -> Imp ; -- "be a man" - - IndicPhrase : S -> Phr ; -- "I walk." - QuestPhrase : Qu -> Phr ; -- "Do I walk?" - ImperOne, ImperMany : Imp -> Phr ; -- "Be a man!", "Be men!" - - AdvS : AdS -> S -> Phr ; -- "Therefore, 2 is prime." - ---3 Coordination --- --- We consider "n"-ary coordination, with "n" > 1. To this end, we have introduced --- a *list category* $ListX$ for each category $X$ whose expressions we want to --- conjoin. Each list category has two constructors, the base case being $TwoX$. - --- We have not defined coordination of all possible categories here, --- since it can be tricky in many languages. For instance, $VP$ coordination --- is linguistically problematic in German because $VP$ is a discontinuous --- category. - - ConjS : Conj -> ListS -> S ; -- "John walks and Mary runs" - ConjAP : Conj -> ListAP -> AP ; -- "even and prime" - ConjNP : Conj -> ListNP -> NP ; -- "John or Mary" - - ConjDS : ConjD -> ListS -> S ; -- "either John walks or Mary runs" - ConjDAP : ConjD -> ListAP -> AP ; -- "both even and prime" - ConjDNP : ConjD -> ListNP -> NP ; -- "either John or Mary" - - TwoS : S -> S -> ListS ; - ConsS : ListS -> S -> ListS ; - - TwoAP : AP -> AP -> ListAP ; - ConsAP : ListAP -> AP -> ListAP ; - - TwoNP : NP -> NP -> ListNP ; - ConsNP : ListNP -> NP -> ListNP ; - ---3 Subordination --- --- Subjunctions are different from conjunctions, but form --- a uniform category among themselves. - - SubjS : Subj -> S -> S -> S ; -- "if 2 is odd, 3 is even" - SubjImper : Subj -> S -> Imp -> Imp ; -- "if it is hot, use a glove!" - SubjQu : Subj -> S -> Qu -> Qu ; -- "if you are new, who are you?" - SubjVP : VP -> Subj -> S -> VP ; -- "(a man who) sings when he runs" - ---2 One-word utterances --- --- These are, more generally, *one-phrase utterances*. The list below --- is very incomplete. - - PhrNP : NP -> Phr ; -- "Some man.", "John." - PhrOneCN, PhrManyCN : CN -> Phr ; -- "A car.", "Cars." - PhrIP : IAdv -> Phr ; -- "Who?" - PhrIAdv : IAdv -> Phr ; -- "Why?" - ---2 Text formation --- --- A text is a sequence of phrases. It is defined like a non-empty list. - - OnePhr : Phr -> Text ; - ConsPhr : Phr -> Text -> Text ; - ---2 Examples of structural words --- --- Here we have some words belonging to closed classes and appearing --- in all languages we have considered. --- Sometimes they are not really meaningful, e.g. $TheyNP$ in French --- should really be replaced by masculine and feminine variants. - - EveryDet, AllDet, WhichDet, MostDet : Det ; -- every, all, which, most - INP, ThouNP, HeNP, SheNP, ItNP : NP ; -- personal pronouns in singular - WeNP, YeNP, TheyNP : NP ; -- personal pronouns in plural - YouNP : NP ; -- the polite you - WhenIAdv,WhereIAdv,WhyIAdv,HowIAdv : IAdv ; -- when, where, why, how - AndConj, OrConj : Conj ; -- and, or - BothAnd, EitherOr, NeitherNor : ConjD ; -- both-and, either-or, neither-nor - IfSubj, WhenSubj : Subj ; -- if, when - PhrYes, PhrNo : Phr ; -- yes, no - VeryAdv, TooAdv : AdA ; -- very, too - OtherwiseAdv, ThereforeAdv : AdS ; -- therefore, otherwise -} ; - diff --git a/grammars/resource/nabstract/Structural.gf b/grammars/resource/nabstract/Structural.gf deleted file mode 100644 index e651afb5e..000000000 --- a/grammars/resource/nabstract/Structural.gf +++ /dev/null @@ -1,90 +0,0 @@ ---1 GF Resource Grammar API for Structural Words --- --- AR 21/11/2003 --- --- Here we have some words belonging to closed classes and appearing --- in all languages we have considered. --- Sometimes they are not really meaningful, e.g. $TheyNP$ in French --- should really be replaced by masculine and feminine variants. - -abstract Structural = Combinations ** { - -fun - ---! ---2 Determiners and noun phrases --- --- Many plural determiners can take a numeral modifier. So can the plural --- pronouns "we" and "you". - - EveryDet, WhichDet, AllDet, -- every, sg which, sg all - SomeDet, AnyDet, NoDet, -- sg some, any, no - MostDet, MostsDet, ManyDet, MuchDet : Det ; -- sg most, pl most, many, much - ThisDet, ThatDet : Det ; -- this, that - - AllsDet, WhichsDet, -- pl all, which (86) - SomesDet, AnysDet, NosDet, -- pl some, any, no - TheseDet, ThoseDet : Num -> Det ; -- these, those (86) - - ThisNP, ThatNP : NP ; -- this, that - TheseNP, ThoseNP : Num -> NP ; -- these, those (86) - INP, ThouNP, HeNP, SheNP, ItNP : NP ; -- personal pronouns in singular - WeNP, YeNP : Num -> NP ; -- these pronouns can take numeral - TheyNP : NP ; YouNP : NP ; -- they, the polite you - - EverybodyNP, SomebodyNP, NobodyNP, -- everybody, somebody, nobody - EverythingNP, SomethingNP, NothingNP : NP ; -- everything, something, nothing - ---! ---2 Auxiliary verbs --- --- Depending on language, all, some, or none of there verbs belong to --- a separate class of *auxiliary* verbs. The list is incomplete. - - CanVV, CanKnowVV, MustVV : VV ; -- can (pouvoir/savoir), must - WantVV : VV ; -- want (to do) - ---! ---2 Adverbials --- - - WhenIAdv,WhereIAdv,WhyIAdv,HowIAdv : IAdv ; -- when, where, why, how - EverywhereNP, SomewhereNP,NowhereNP : AdV ; -- everywhere, somewhere, nowhere - VeryAdv, TooAdv : AdA ; -- very, too - AlmostAdv, QuiteAdv : AdA ; -- almost, quite - OtherwiseAdv, ThereforeAdv : AdS ; -- therefore, otherwise - ---! ---2 Conjunctions and subjunctions --- - - AndConj, OrConj : Conj ; -- and, or - BothAnd, EitherOr, NeitherNor : ConjD ; -- both-and, either-or, neither-nor - IfSubj, WhenSubj, AlthoughSubj : Subj ; -- if, when, although - ---! ---2 Prepositions --- --- We have carefully chosen a set of semantic relations expressible --- by prepositions in some languages, by cases or postpositions in --- others. Complement uses of prepositions are not included, and --- should be treated by the use of many-place verbs, adjectives, and --- functions. - - InPrep, OnPrep, ToPrep, FromPrep, -- spatial relations - ThroughPrep, AbovePrep, UnderPrep, - InFrontPrep, BehindPrep, BetweenPrep : Prep ; - BeforePrep, DuringPrep, AfterPrep : Prep ; -- temporal relations - WithPrep, WithoutPrep, ByMeansPrep : Prep ; -- some other relations - PartPrep : Prep ; -- partitive "of" ("bottle of wine") - AgentPrep : Prep ; -- agent "by" in passive constructions - - ---! ---2 Affirmation and negation --- --- The negative-positive (French "si", German "doch") is missing. - - PhrYes, PhrNo : Phr ; -- yes, no - -} diff --git a/grammars/resource/nabstract/TestResource.gf b/grammars/resource/nabstract/TestResource.gf deleted file mode 100644 index adafdcfbc..000000000 --- a/grammars/resource/nabstract/TestResource.gf +++ /dev/null @@ -1,18 +0,0 @@ -abstract TestResource = Structural ** { - --- a random sample of lexicon to test resource grammar with - -fun - Big, Happy, Small, Old, Young : AdjDeg ; - American, Finnish : Adj1 ; - Married : Adj2 ; - Man, Woman, Car, House, Light, Bar, Bottle, Wine : N ; - Walk, Run : V ; - Send, Wait, Love, Drink, SwitchOn, SwitchOff : TV ; - Give, Prefer : V3 ; - Say, Prove : VS ; - Mother, Uncle : Fun ; - Connection : Fun2 ; - Well, Always : AdV ; - John, Mary : PN ; -} ; diff --git a/grammars/resource/nabstract/additions.txt b/grammars/resource/nabstract/additions.txt deleted file mode 100644 index 6d0f7fb8b..000000000 --- a/grammars/resource/nabstract/additions.txt +++ /dev/null @@ -1,123 +0,0 @@ --- added 19/11/2003 -- 21/11 - --- Combinations.gf -cat - Prep ; -- pre/postposition and/or case e.g. - Num ; -- numeral, e.g. "three", "879" - VV ; -- verb-compl. verb, e.g. "can", "want" - VG ; -- verbal group - -fun - ThereIsCN : CN -> S ; -- "there is a bar", "there are bars" - ThereAreCN : Num -> CN -> S ; -- "there are 86 bars" - PrepNP : Prep -> NP -> AdV ; -- "in London", "after the war" (replace LocNP) - MassNP : CN -> NP ; -- "wine" - PredAdV : AdV -> VP ; -- "is everywhere", "is not in France" - AdjAdv : AP -> AdV ; -- "freely", "more consciously than you" - IsThereCN,AreThereCN : CN -> Qu ; -- "is there a bar", "are there bars" - PosVG,NegVG : VG -> VP ; -- - - - -- merged PosX and NegX to PredX, for the following - PredV : V -> VG ; -- "walk", "doesn't walk" - PredPassV : V -> VG ; -- "is seen", "is not seen" - PredTV : TV -> NP -> VG ; -- "sees John", "doesn't see John" - PredVS : VS -> S -> VG ; -- "says that I run", "doesn't say..." - PredVV : VV -> VG -> VG ; -- "can run", "can't run", "tries to run" - PredV3 : V3 -> NP -> NP -> VG ; -- "prefers wine to beer" - - PredNP : NP -> VG ; -- "is John", "is not John" - PredAdV : AdV -> VG ; -- "is everywhere", "is not in France" - PredAP : AP -> VG ; -- "is old", "isn't old" - PredCN : CN -> VG ; -- "is a man", "isn't a man" - VTrans : TV -> V ; -- "loves" - - - -- changed type signatures: added Num - IndefManyNP : Num -> CN -> NP ; -- "houses", "86 houses" - DefManyNP : Num -> CN -> NP ; -- "the cars", "the 86 cars" - ModGenMany : Num -> NP -> CN -> NP ; -- "John's cars", "John's 86 cars" - - UseInt : Int -> Num ; -- "32" --- assumes i > 1 - NoNum : Num ; -- no numeral modifier - - IsThereCN, AreThereCN : CN -> Qu ;-- "is there a bar", "are there bars" - --- from Hajo's work - -AdvAP - -AdvS - -AppFun2 - -CNthatS - -ConsPhr - -ItNP - -NegPassV - -NegV3 - -OnePhr - -OneVP - -OtherwiseAdv - -PosPassV - -PosV3 - -SubjVP - -ThereforeAdv - -TooAdv - -VTrans - -VeryAdv - - --- Structural.gf - --- Some of these are just changes to Num -> Det|NP. - AllDet : Det ; -- sg all - AllsDet, WhichsDet, -- pl all, which (86) - SomesDet, AnysDet, NosDet, -- pl some, any, no - TheseDet, ThoseDet : Num -> Det ; -- these, those (86) - ThisNP, TheseNP : NP ; -- this, that - TheseNP, ThoseNP : Num -> NP ; -- these, those (86) - INP, ThouNP, HeNP, SheNP, ItNP : NP ; -- personal pronouns in singular - WeNP, YeNP : Num -> NP ; -- these pronouns can take numeral - - EverybodyNP, SomebodyNP, NobodyNP, -- everybody, somebody, nobody - EverythingNP, SomethingNP, NothingNP : NP ; -- everything, something, nothing - EverywhereNP, SomewhereNP, NowhereNP : Adv ;-- everywhere, somewhere, nowhere - AlthoughSubj : Subj ; -- although - AlmostAdv, QuiteAdv : AdA ; -- almost, quite - InPrep, OnPrep, ToPrep, FromPrep, -- spatial relations - ThroughPrep, AbovePrep, UnderPrep, - InFrontPrep, BehindPrep, BetweenPrep : Prep ; - BeforePrep, DuringPrep, AfterPrep : Prep ; -- temporal relations - WithPrep, WithoutPrep, ByMeansPrep : Prep ; -- some other relations - PartPrep : Prep ; -- partitive "of" ("bottle of wine") - AgentPrep : Prep ; -- agent "by" in passive constructions - - - -American - -Connection - -Finnish - -Give - -Married - -Prefer - diff --git a/grammars/resource/nenglish/CombinationsEng.gf b/grammars/resource/nenglish/CombinationsEng.gf deleted file mode 100644 index 14ab90fb3..000000000 --- a/grammars/resource/nenglish/CombinationsEng.gf +++ /dev/null @@ -1,197 +0,0 @@ ---# -path=.:../nabstract:../../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 CombinationsEng of Combinations = open Prelude, SyntaxEng in { - -flags - startcat=Phr ; - lexer=text ; - unlexer=text ; - -lincat - N = CommNoun ; - -- = {s : Number => Case => Str} - CN = CommNounPhrase ; - -- = CommNoun ** {g : Gender} - NP = {s : NPForm => Str ; n : Number ; p : Person} ; - PN = {s : Case => Str} ; - Det = {s : Str ; n : Number} ; - Fun = Function ; - -- = CommNounPhrase ** {s2 : Preposition} ; - Fun2 = Function ** {s3 : Preposition} ; - Num = {s : Case => Str} ; - - Adj1 = Adjective ; - -- = {s : AForm => Str} - Adj2 = Adjective ** {s2 : Preposition} ; - AdjDeg = {s : Degree => AForm => Str} ; - AP = Adjective ** {p : Bool} ; - - V = Verb ; - -- = {s : VForm => Str ; s1 : Particle} - VG = {s : Bool => VForm => Str ; s2 : Bool => Number => Str ; - isAuxT, isAuxF : Bool} ; - VP = {s : VForm => Str ; s2 : Number => Str ; isAux : Bool} ; - TV = TransVerb ; - -- = Verb ** {s3 : Preposition} ; - V3 = TransVerb ** {s4 : Preposition} ; - VS = Verb ; - VV = Verb ** {isAux : Bool} ; - - AdV = {s : Str ; p : Bool} ; - - S = {s : Str} ; - Slash = {s : Bool => Str ; s2 : Preposition} ; - RP = {s : Gender => Number => NPForm => Str} ; - RC = {s : Gender => Number => Str} ; - - IP = {s : NPForm => Str ; n : Number} ; - Qu = {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 : AForm => Str ; p : Bool} ; - ListNP = {s1,s2 : NPForm => Str ; n : Number ; p : Person} ; - ---. - -lin - UseN = noun2CommNounPhrase ; - ModAdj = modCommNounPhrase ; - ModGenOne = npGenDet singular noNum ; - ModGenMany = npGenDet plural ; - UsePN = nameNounPhrase ; - UseFun = funAsCommNounPhrase ; - AppFun = appFunComm ; - AppFun2 = appFun2 ; - AdjP1 = adj2adjPhrase ; - ComplAdj = complAdj ; - PositAdjP = positAdjPhrase ; - ComparAdjP = comparAdjPhrase ; - SuperlNP = superlNounPhrase ; - - DetNP = detNounPhrase ; - IndefOneNP = indefNounPhrase singular ; - IndefManyNP = indefNounPhraseNum plural ; - DefOneNP = defNounPhrase singular ; - DefManyNP = defNounPhraseNum plural ; - MassNP = detNounPhrase (mkDeterminer Sg []) ; - - CNthatS = nounThatSentence ; - UseInt i = {s = table {Nom => i.s ; Gen => i.s ++ "'s"}} ; --- - NoNum = noNum ; - - PredVP = predVerbPhrase ; - PosVG = predVerbGroup True ; - NegVG = predVerbGroup False ; - - PredV = predVerb ; - PredAP = predAdjective ; - PredCN = predCommNoun ; - PredTV = complTransVerb ; - PredV3 = complDitransVerb ; - PredPassV = passVerb ; - PredNP = predNounPhrase ; - PredAdV = predAdverb ; - PredVS = complSentVerb ; - PredVV = complVerbVerb ; - VTrans = transAsVerb ; - - AdjAdv a = advPost (a.s ! AAdv) ; - PrepNP p = prepPhrase p.s ; --- - AdvVP = adVerbPhrase ; - AdvCN = advCommNounPhrase ; - AdvAP = advAdjPhrase ; - - PosSlashTV = slashTransVerb True ; - NegSlashTV = slashTransVerb False ; - OneVP = predVerbPhrase (nameNounPhrase (nameReg "one")) ; - ThereIsCN A = prefixSS ["there is"] --- - (defaultNounPhrase (indefNounPhrase singular A)) ; - ThereAreCN n A = prefixSS ["there are"] - (defaultNounPhrase (indefNounPhraseNum plural n A)) ; - - IdRP = identRelPron ; - FunRP = funRelPron ; - RelVP = relVerbPhrase ; - RelSlash = relSlash ; - ModRC = modRelClause ; - RelSuch = relSuch ; - - WhoOne = intPronWho singular ; - WhoMany = intPronWho plural ; - WhatOne = intPronWhat singular ; - WhatMany = intPronWhat plural ; - FunIP = funIntPron ; - NounIPOne = nounIntPron singular ; - NounIPMany = nounIntPron plural ; - - QuestVP = questVerbPhrase ; - IntVP = intVerbPhrase ; - IntSlash = intSlash ; - QuestAdv = questAdverbial ; - IsThereCN = isThere singular noNum ; - AreThereCN = isThere plural ; - - ImperVP = imperVerbPhrase ; - - IndicPhrase = indicUtt ; - QuestPhrase = interrogUtt ; - ImperOne = imperUtterance singular ; - ImperMany = imperUtterance plural ; - - AdvS = advSentence ; - - TwoS = twoSentence ; - ConsS = consSentence ; - ConjS = conjunctSentence ; - ConjDS = conjunctDistrSentence ; - - TwoAP = twoAdjPhrase ; - ConsAP = consAdjPhrase ; - ConjAP = conjunctAdjPhrase ; - ConjDAP = conjunctDistrAdjPhrase ; - - TwoNP = twoNounPhrase ; - ConsNP = consNounPhrase ; - ConjNP = conjunctNounPhrase ; - ConjDNP = conjunctDistrNounPhrase ; - - SubjS = subjunctSentence ; - SubjImper = subjunctImperative ; - SubjQu = subjunctQuestion ; - SubjVP = subjunctVerbPhrase ; - - PhrNP = useNounPhrase ; - PhrOneCN = useCommonNounPhrase singular ; - PhrManyCN = useCommonNounPhrase plural ; - PhrIP ip = ip ; - PhrIAdv ia = ia ; - - OnePhr p = p ; - ConsPhr = cc2 ; - -} ; diff --git a/grammars/resource/nenglish/MorphoEng.gf b/grammars/resource/nenglish/MorphoEng.gf deleted file mode 100644 index 54dbdeb2a..000000000 --- a/grammars/resource/nenglish/MorphoEng.gf +++ /dev/null @@ -1,202 +0,0 @@ ---# -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 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'") ; - ---3 Proper names --- --- Regular proper names are inflected with "'s" in the genitive. - - nameReg : Str -> ProperName = \john -> - {s = table {Nom => john ; Gen => john + "'s"}} ; - - ---2 Pronouns --- --- Here we define personal and relative pronouns. - - mkPronoun : (_,_,_,_ : Str) -> Number -> Person -> Pronoun = \I,me,my,mine,n,p -> - {s = table {NomP => I ; AccP => me ; GenP => my ; GenSP => mine} ; - n = n ; p = p} ; - - pronI = mkPronoun "I" "me" "my" "mine" Sg P1 ; - pronYouSg = mkPronoun "you" "you" "your" "yours" Sg P2 ; -- verb form still OK - pronHe = mkPronoun "he" "him" "his" "his" Sg P3 ; - pronShe = mkPronoun "she" "her" "her" "hers" Sg P3 ; - pronIt = mkPronoun "it" "it" "its" "it" Sg P3 ; - - pronWe = mkPronoun "we" "us" "our" "ours" Pl P1 ; - pronYouPl = mkPronoun "you" "you" "your" "yours" Pl P2 ; - pronThey = mkPronoun "they" "them" "their" "theirs" Pl P3 ; - --- Relative pronouns in the accusative have the 'no pronoun' variant. --- The simple pronouns do not really depend on number. - - relPron : RelPron = {s = table { - NoHum => \\_ => table { - NomP => variants {"that" ; "which"} ; - AccP => variants {"that" ; "which" ; []} ; - GenP => variants {"whose"} ; - GenSP => variants {"which"} - } ; - Hum => \\_ => 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. - - mkVerbP3 : (_,_,_,_: Str) -> VerbP3 = \go,goes,went,gone -> - {s = table { - InfImp => go ; - Indic P3 => goes ; - Indic _ => go ; - Past _ => went ; - PPart => gone - } - } ; - - 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") ; - - verbP3Have = mkVerbP3 "have" "has" "had" "had" ; - - verbP3Do = mkVerbP3 "do" "does" "did" "done" ; - - verbBe : VerbP3 = {s = table { - InfImp => "be" ; - Indic P1 => "am" ; - Indic P2 => "are" ; - Indic P3 => "is" ; - Past Sg => "was" ; - Past Pl => "were" ; - PPart => "been" - }} ; - - verbPart : VerbP3 -> Particle -> Verb = \v,p -> - v ** {s1 = p} ; - - verbNoPart : VerbP3 -> Verb = \v -> verbPart v [] ; - --- 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) ; -} ; - diff --git a/grammars/resource/nenglish/ParadigmsEng.gf b/grammars/resource/nenglish/ParadigmsEng.gf deleted file mode 100644 index 967c7ec56..000000000 --- a/grammars/resource/nenglish/ParadigmsEng.gf +++ /dev/null @@ -1,242 +0,0 @@ ---# -path=.:../nabstract:../../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, $resource.Abs.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 as string --- arguments of the paradigms, not stems. --- --- The following modules are presupposed: - -resource ParadigmsEng = open (Predef=Predef), Prelude, SyntaxEng, ResEng in { - ---2 Parameters --- --- To abstract over gender names, we define the following identifiers. - -oper - human : Gender ; - nonhuman : Gender ; - --- To abstract over number names, we define the following. - - singular : Number ; - plural : Number ; - - ---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". - - mkFun : N -> Preposition -> Fun ; - - funHuman : Str -> Fun ; -- the father/mistress/daddy of - funNonhuman : Str -> Fun ; -- the successor/address/copy of - --- Proper names, with their regular genitive. - - pnReg : (John : Str) -> PN ; -- John, John's - --- The most common cases on the top level havee shortcuts. --- The regular "y"/"s" variation is taken into account in $CN$. - - cnNonhuman : Str -> CN ; - cnHuman : Str -> CN ; - npReg : Str -> NP ; - --- In some cases, you may want to make a complex $CN$ into a function. - - mkFunCN : CN -> Preposition -> Fun ; - funOfCN : CN -> Fun ; - ---2 Adjectives - --- Non-comparison one-place adjectives just have one form. - - mkAdj1 : (even : Str) -> Adj1 ; - --- Two-place adjectives need a preposition as second argument. - - mkAdj2 : (divisible, by : Str) -> Adj2 ; - --- 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$. - - mkAdjDeg : (good,better,best : Str) -> AdjDeg ; - - aReg : (long : Str) -> AdjDeg ; -- long, longer, longest - aFat : (fat : Str) -> AdjDeg ; -- fat, fatter, fattest - aRidiculous : (ridiculous : Str) -> AdjDeg ; -- -/more/most ridiculous - --- On top level, there are adjectival phrases. The most common case is --- just to use a one-place adjective. - - apReg : Str -> AP ; - - ---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$. - - mkTV : V -> Str -> TV ; -- look for, kill - - tvGen : (look, for : Str) -> TV ; -- look for, talk about - tvDir : V -> TV ; -- switch off - tvGenDir : (kill : Str) -> TV ; -- kill - --- Regular two-place verbs with a particle. - - tvPartReg : Str -> Str -> Str -> TV ; -- get, along, with - --- The definitions should not bother the user of the API. So they are --- hidden from the document. ---. - - human = Hum ; - nonhuman = NoHum ; - -- singular defined in types.Eng - -- plural defined in types.Eng - - nominative = 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 Hum ; - nNonhuman = \s -> nGen s NoHum ; - - 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 ; - - mkFun = \n,p -> n ** {lock_Fun = <> ; s2 = p} ; - funNonhuman = \s -> mkFun (nNonhuman s) "of" ; - funHuman = \s -> mkFun (nHuman s) "of" ; - - pnReg n = nameReg n ** {lock_PN = <>} ; - - cnNonhuman = \s -> UseN (nGen s nonhuman) ; - cnHuman = \s -> UseN (nGen s human) ; - npReg = \s -> UsePN (pnReg s) ; - - mkFunCN = \n,p -> n ** {lock_Fun = <> ; s2 = p} ; - funOfCN = \n -> mkFunCN n "of" ; - - addGenN : (Str -> CommonNoun) -> Str -> Gender -> N = \f -> - \s,g -> f s ** {g = g ; lock_N = <>} ; - - mkAdj1 a = regAdjective a ** {lock_Adj1 = <>} ; - mkAdj2 = \s,p -> regAdjective s ** {s2 = p} ** {lock_Adj2 = <>} ; - mkAdjDeg a b c = adjDegrIrreg a b c ** {lock_AdjDeg = <>} ; - aReg a = adjDegrReg a ** {lock_AdjDeg = <>} ; - aFat = \fat -> let {fatt = fat + Predef.dp 1 fat} in - mkAdjDeg fat (fatt + "er") (fatt + "est") ; - aRidiculous a = adjDegrLong a ** {lock_AdjDeg = <>} ; - apReg = \s -> AdjP1 (mkAdj1 s) ; - - 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 (regVerbP3 get) up ** {lock_V = <>} ; - - mkTV = \v,p -> v ** {lock_TV = <> ; s3 = p} ; - tvPartReg = \get, along, to -> mkTV (vPartReg get along) to ; - - vBe = verbBe ** {s1 = [] ; lock_V = <>} ; - vHave = verbP3Have ** {s1 = [] ; lock_V = <>} ; - - tvGen = \s,p -> mkTV (vGen s) p ; - tvDir = \v -> mkTV v [] ; - tvGenDir = \s -> tvDir (vGen s) ; - -} ; diff --git a/grammars/resource/nenglish/Predication.gf b/grammars/resource/nenglish/Predication.gf deleted file mode 100644 index 4285a8e24..000000000 --- a/grammars/resource/nenglish/Predication.gf +++ /dev/null @@ -1,83 +0,0 @@ - ---1 A Small Predication Library --- --- (c) Aarne Ranta 2003 under Gnu GPL. --- --- This library is built on a language-independent API of --- resource grammars. It has a common part, the type signatures --- (defined here), and language-dependent parts. The user of --- the library should only have to look at the type signatures. - -resource Predication = open English in { - --- We first define a set of predication patterns. - -oper - predV1 : V -> NP -> S ; -- one-place verb: "John walks" - predV2 : TV -> NP -> NP -> S ; -- two-place verb: "John loves Mary" - predVColl : V -> NP -> NP -> S ; -- collective verb: "John and Mary fight" - predA1 : Adj1 -> NP -> S ; -- one-place adjective: "John is old" - predA2 : Adj2 -> NP -> NP -> S ; -- two-place adj: "John is married to Mary" - predAComp : AdjDeg -> NP -> NP -> S ; -- compar adj: "John is older than Mary" - predAColl : Adj1 -> NP -> NP -> S ; -- collective adj: "John and Mary are married" - predN1 : N -> NP -> S ; -- one-place noun: "John is a man" - predN2 : Fun -> NP -> NP -> S ; -- two-place noun: "John is a lover of Mary" - predNColl : N -> NP -> NP -> S ; -- collective noun: "John and Mary are lovers" - --- Individual-valued function applications. - - appFun1 : Fun -> NP -> NP ; -- one-place function: "the successor of x" - appFunColl : Fun -> NP -> NP -> NP ; -- collective function: "the sum of x and y" - --- Families of types, expressed by common nouns depending on arguments. - - appFam1 : Fun -> NP -> CN ; -- one-place family: "divisor of x" - appFamColl : Fun -> NP -> NP -> CN ; -- collective family: "path between x and y" - --- Type constructor, similar to a family except that the argument is a type. - - constrTyp1 : Fun -> CN -> CN ; - --- Logical connectives on two sentences. - - conjS : S -> S -> S ; - disjS : S -> S -> S ; - implS : S -> S -> S ; - --- As an auxiliary, we need two-place conjunction of names ("John and Mary"), --- used in collective predication. - - conjNP : NP -> NP -> NP ; - - ------------------------------ - ----- what follows should be an implementation of the preceding - -oper - predV1 = \F, x -> PredVP x (PosV F) ; - predV2 = \F, x, y -> PredVP x (PosTV F y) ; - predVColl = \F, x, y -> PredVP (conjNP x y) (PosV F) ; - predA1 = \F, x -> PredVP x (PosA (AdjP1 F)) ; - predA2 = \F, x, y -> PredVP x (PosA (ComplAdj F y)) ; - predAComp = \F, x, y -> PredVP x (PosA (ComparAdjP F y)) ; - predAColl = \F, x, y -> PredVP (conjNP x y) (PosA (AdjP1 F)) ; - predN1 = \F, x -> PredVP x (PosCN (UseN F)) ; - predN2 = \F, x, y -> PredVP x (PosCN (AppFun F y)) ; - predNColl = \F, x, y -> PredVP (conjNP x y) (PosCN (UseN F)) ; - - appFun1 = \f, x -> DefOneNP (AppFun f x) ; - appFunColl = \f, x, y -> DefOneNP (AppFun f (conjNP x y)) ; - - appFam1 = \F, x -> AppFun F x ; - appFamColl = \F, x, y -> AppFun F (conjNP x y) ; - - conjS = \A, B -> ConjS AndConj (TwoS A B) ; - disjS = \A, B -> ConjS OrConj (TwoS A B) ; - implS = \A, B -> SubjS IfSubj A B ; - - constrTyp1 = \F, A -> AppFun F (IndefManyNP A) ; - - conjNP = \x, y -> ConjNP AndConj (TwoNP x y) ; - -} ; diff --git a/grammars/resource/nenglish/ResEng.gf b/grammars/resource/nenglish/ResEng.gf deleted file mode 100644 index 05a559e88..000000000 --- a/grammars/resource/nenglish/ResEng.gf +++ /dev/null @@ -1,3 +0,0 @@ ---# -path=.:../nabstract:../../prelude - -resource ResEng = reuse StructuralEng ; diff --git a/grammars/resource/nenglish/StructuralEng.gf b/grammars/resource/nenglish/StructuralEng.gf deleted file mode 100644 index d3e214069..000000000 --- a/grammars/resource/nenglish/StructuralEng.gf +++ /dev/null @@ -1,103 +0,0 @@ ---# -path=.:../nabstract:../../prelude - ---1 The Top-Level English Resource Grammar: Structural Words --- --- Aarne Ranta 2002 -- 2003 --- -concrete StructuralEng of Structural = - CombinationsEng ** open Prelude, SyntaxEng in { - lin - INP = pronI ; - ThouNP = pronYouSg ; - HeNP = pronHe ; - SheNP = pronShe ; - ItNP = pronIt ; - WeNP = pronWithNum pronWe ; - YeNP = pronWithNum pronYouPl ; - YouNP = pronYouSg ; - TheyNP = pronThey ; - - EveryDet = everyDet ; - AllDet = mkDeterminer Sg "all" ; --- all the missing - AllsDet = mkDeterminerNum Pl "all" ; - WhichDet = whichDet ; - WhichsDet = mkDeterminerNum Pl "which" ; - MostsDet = mostDet ; - MostDet = mkDeterminer Sg "most" ; - SomeDet = mkDeterminer Sg "some" ; - SomesDet = mkDeterminerNum Pl "some" ; - AnyDet = mkDeterminer Sg "any" ; - AnysDet = mkDeterminerNum Pl "any" ; - NoDet = mkDeterminer Sg "no" ; - NosDet = mkDeterminerNum Pl "no" ; - ManyDet = mkDeterminer Sg "many" ; - MuchDet = mkDeterminer Sg ["a lot of"] ; --- - ThisDet = mkDeterminer Sg "this" ; - TheseDet = mkDeterminerNum Pl "these" ; - ThatDet = mkDeterminer Sg "that" ; - ThoseDet = mkDeterminerNum Pl "those" ; - - ThisNP = nameNounPhrase (nameReg "this") ; - ThatNP = nameNounPhrase (nameReg "that") ; - TheseNP n = nameNounPhrase {s = \\c => "these" ++ n.s ! c} ; - ThoseNP n = nameNounPhrase {s = \\c => "those" ++ n.s ! c} ; - - EverybodyNP = nameNounPhrase (nameReg "everybody") ; - SomebodyNP = nameNounPhrase (nameReg "somebody") ; - NobodyNP = nameNounPhrase (nameReg "nobody") ; - EverythingNP = nameNounPhrase (nameReg "everything") ; - SomethingNP = nameNounPhrase (nameReg "something") ; - NothingNP = nameNounPhrase (nameReg "nothing") ; - - CanVV = vvCan ; - CanKnowVV = vvCan ; - MustVV = vvMust ; - WantVV = verbNoPart (regVerbP3 "want") ** {isAux = False} ; - - HowIAdv = ss "how" ; - WhenIAdv = ss "when" ; - WhereIAdv = ss "where" ; - WhyIAdv = ss "why" ; - EverywhereNP = advPost "everywhere" ; - SomewhereNP = advPost "somewhere" ; - NowhereNP = advPost "nowhere" ; - - AndConj = ss "and" ** {n = Pl} ; - OrConj = ss "or" ** {n = Sg} ; - BothAnd = sd2 "both" "and" ** {n = Pl} ; - EitherOr = sd2 "either" "or" ** {n = Sg} ; - NeitherNor = sd2 "neither" "nor" ** {n = Sg} ; - IfSubj = ss "if" ; - WhenSubj = ss "when" ; - AlthoughSubj = ss "although" ; - - PhrYes = ss "Yes." ; - PhrNo = ss "No." ; - - VeryAdv = ss "very" ; - TooAdv = ss "too" ; - AlmostAdv = ss "almost" ; - QuiteAdv = ss "quite" ; - OtherwiseAdv = ss "otherwise" ; - ThereforeAdv = ss "therefore" ; - - InPrep = ss "in" ; - OnPrep = ss "on" ; - ToPrep = ss "to" ; - ThroughPrep = ss "through" ; - AbovePrep = ss "above" ; - UnderPrep = ss "under" ; - InFrontPrep = ss ["in front of"] ; - BehindPrep = ss "behind" ; - BetweenPrep = ss "between" ; - FromPrep = ss "from" ; - BeforePrep = ss "before" ; - DuringPrep = ss "during" ; - AfterPrep = ss "after" ; - WithPrep = ss "with" ; - WithoutPrep = ss "without" ; - ByMeansPrep = ss "by" ; - PartPrep = ss "of" ; - AgentPrep = ss "by" ; - -} diff --git a/grammars/resource/nenglish/SyntaxEng.gf b/grammars/resource/nenglish/SyntaxEng.gf deleted file mode 100644 index 23e443b14..000000000 --- a/grammars/resource/nenglish/SyntaxEng.gf +++ /dev/null @@ -1,1012 +0,0 @@ ---# -path=.:../../prelude - ---1 A Small English Resource Syntax --- --- Aarne Ranta 2002 --- --- This resource grammar contains definitions needed to construct --- indicative, interrogative, and imperative sentences in English. --- --- The following files are presupposed: - -resource SyntaxEng = MorphoEng ** open Prelude, (CO = Coordination) in { - ---2 Common Nouns --- --- Simple common nouns are defined as the type $CommNoun$ in $morpho.Deu.gf$. - ---3 Common noun phrases - --- To the common nouns of morphology, --- we add natural gender (human/nonhuman) which is needed in syntactic --- combinations (e.g. "man who runs" - "program which runs"). - -oper - CommNoun = CommonNoun ** {g : Gender} ; - - CommNounPhrase = CommNoun ; - - noun2CommNounPhrase : CommNoun -> CommNounPhrase = \man -> - man ; - - cnGen : CommonNoun -> Gender -> CommNoun = \cn,g -> - cn ** {g = g} ; - - cnHum : CommonNoun -> CommNoun = \cn -> - cnGen cn Hum ; - cnNoHum : CommonNoun -> CommNoun = \cn -> - cnGen cn NoHum ; - ---2 Noun phrases --- --- The worst case is pronouns, which have inflection in the possessive forms. --- Proper names are a special case. - - NounPhrase : Type = Pronoun ; - - nameNounPhrase : ProperName -> NounPhrase = \john -> - {s = \\c => john.s ! toCase c ; n = Sg ; p = P3} ; - --- The following construction has to be refined for genitive forms: --- "we two", "us two" are OK, but "our two" is not. - - Numeral : Type = {s : Case => Str} ; - - pronWithNum : Pronoun -> Numeral -> Pronoun = \we,two -> - {s = \\c => we.s ! c ++ two.s ! toCase c ; n = we.n ; p = we.p} ; - - noNum : Numeral = {s = \\_ => []} ; - ---2 Determiners --- --- Determiners are inflected according to the nouns they determine. --- The determiner is not inflected. - - Determiner : Type = {s : Str ; n : Number} ; - - detNounPhrase : Determiner -> CommNounPhrase -> NounPhrase = \every, man -> - {s = \\c => every.s ++ man.s ! every.n ! toCase c ; - n = every.n ; - p = P3 - } ; - - mkDeterminer : Number -> Str -> Determiner = \n,the -> - mkDeterminerNum n the noNum ; - - mkDeterminerNum : Number -> Str -> Numeral -> Determiner = \n,det,two -> - {s = det ++ two.s ! Nom ; - n = n - } ; - - everyDet = mkDeterminer Sg "every" ; - allDet = mkDeterminerNum Pl "all" ; - mostDet = mkDeterminer Pl "most" ; - aDet = mkDeterminer Sg artIndef ; - plDet = mkDeterminerNum Pl [] ; - theSgDet = mkDeterminer Sg "the" ; - thePlDet = mkDeterminerNum Pl "the" ; - anySgDet = mkDeterminer Sg "any" ; - anyPlDet = mkDeterminerNum Pl "any" ; - - whichSgDet = mkDeterminer Sg "which" ; - whichPlDet = mkDeterminerNum Pl "which" ; - - whichDet = whichSgDet ; --- API - - indefNoun : Number -> CommNoun -> Str = \n,man -> - (indefNounPhrase n man).s ! NomP ; - - indefNounPhrase : Number -> CommNounPhrase -> NounPhrase = \n -> - indefNounPhraseNum n noNum ; - - indefNounPhraseNum : Number -> Numeral ->CommNounPhrase -> NounPhrase = - \n,two,man -> - {s = \\c => case n of { - Sg => artIndef ++ two.s ! Nom ++ man.s ! n ! toCase c ; - Pl => two.s ! Nom ++ man.s ! n ! toCase c - } ; - n = n ; p = P3 - } ; - - defNounPhrase : Number -> CommNounPhrase -> NounPhrase = \n -> - defNounPhraseNum n noNum ; - defNounPhraseNum : Number -> Numeral -> CommNounPhrase -> NounPhrase = - \n,two,car -> - {s = \\c => artDef ++ two.s ! Nom ++ car.s ! n ! toCase c ; - n = n ; - p = P3 - } ; - --- Genitives of noun phrases can be used like determiners, to build noun phrases. --- The number argument makes the difference between "my house" - "my houses". --- --- We have the variation "the car of John / the car of John's / John's car" - - npGenDet : Number -> Numeral -> NounPhrase -> CommNounPhrase -> NounPhrase = - \n,two,john,car -> - {s = \\c => variants { - artDef ++ two.s ! Nom ++ car.s ! n ! Nom ++ "of" ++ john.s ! GenSP ; - john.s ! GenP ++ two.s ! Nom ++ car.s ! n ! toCase c - } ; - n = n ; - p = P3 - } ; - --- *Bare plural noun phrases* like "men", "good cars", are built without a --- determiner word. - - plurDet : CommNounPhrase -> NounPhrase = \cn -> - {s = \\c => cn.s ! plural ! toCase c ; - p = P3 ; - n = Pl - } ; - --- Constructions like "the idea that two is even" are formed at the --- first place as common nouns, so that one can also have "a suggestion that...". - - nounThatSentence : CommNounPhrase -> Sentence -> CommNounPhrase = \idea,x -> - {s = \\n,c => idea.s ! n ! c ++ "that" ++ x.s ; - g = idea.g - } ; - - ---2 Adjectives --- --- Adjectival phrases have a parameter $p$ telling if they are prefixed ($True$) or --- postfixed (complex APs). - - AdjPhrase : Type = Adjective ** {p : Bool} ; - - adj2adjPhrase : Adjective -> AdjPhrase = \new -> new ** {p = True} ; - - simpleAdjPhrase : Str -> AdjPhrase = \French -> - adj2adjPhrase (regAdjective French) ; - - ---3 Comparison adjectives --- --- Each of the comparison forms has a characteristic use: --- --- Positive forms are used alone, as adjectival phrases ("big"). - - positAdjPhrase : AdjDegr -> AdjPhrase = \big -> - adj2adjPhrase {s = big.s ! Pos} ; - --- Comparative forms are used with an object of comparison, as --- adjectival phrases ("bigger then you"). - - comparAdjPhrase : AdjDegr -> NounPhrase -> AdjPhrase = \big, you -> - {s = \\a => big.s ! Comp ! a ++ "than" ++ you.s ! NomP ; - p = False - } ; - --- Superlative forms are used with a modified noun, picking out the --- maximal representative of a domain ("the biggest house"). - - superlNounPhrase : AdjDegr -> CommNoun -> NounPhrase = \big, house -> - {s = \\c => "the" ++ big.s ! Sup ! AAdj ++ house.s ! Sg ! toCase c ; - n = Sg ; - p = P3 - } ; - - ---3 Two-place adjectives --- --- A two-place adjective is an adjective with a preposition used before --- the complement. - - Preposition = Str ; - - AdjCompl = Adjective ** {s2 : Preposition} ; - - complAdj : AdjCompl -> NounPhrase -> AdjPhrase = \related,john -> - {s = \\a => related.s ! a ++ related.s2 ++ john.s ! AccP ; - p = False - } ; - - ---3 Modification of common nouns --- --- The two main functions of adjective are in predication ("John is old") --- and in modification ("an old man"). Predication will be defined --- later, in the chapter on verbs. --- --- Modification must pay attention to pre- and post-noun --- adjectives: "big car"/"car bigger than X" - - modCommNounPhrase : AdjPhrase -> CommNounPhrase -> CommNounPhrase = \big, car -> - {s = \\n => if_then_else (Case => Str) big.p - (\\c => big.s ! AAdj ++ car.s ! n ! c) - (table {Nom => car.s ! n ! Nom ++ big.s ! AAdj ; Gen => variants {}}) ; - g = car.g - } ; - - ---2 Function expressions - --- A function expression is a common noun together with the --- preposition prefixed to its argument ("mother of x"). --- The type is analogous to two-place adjectives and transitive verbs. - - Function = CommNounPhrase ** {s2 : Preposition} ; - --- The application of a function gives, in the first place, a common noun: --- "mother/mothers of John". From this, other rules of the resource grammar --- give noun phrases, such as "the mother of John", "the mothers of John", --- "the mothers of John and Mary", and "the mother of John and Mary" (the --- latter two corresponding to distributive and collective functions, --- respectively). Semantics will eventually tell when each --- of the readings is meaningful. - - appFunComm : Function -> NounPhrase -> CommNounPhrase = \mother,john -> - {s = \\n => table { - Gen => nonExist ; --- ? - _ => mother.s ! n ! Nom ++ mother.s2 ++ john.s ! GenSP - } ; - g = mother.g - } ; - --- It is possible to use a function word as a common noun; the semantics is --- often existential or indexical. - - funAsCommNounPhrase : Function -> CommNounPhrase = - noun2CommNounPhrase ; - --- The following is an aggregate corresponding to the original function application --- producing "John's mother" and "the mother of John". It does not appear in the --- resource grammar API any longer. - - appFun : Bool -> Function -> NounPhrase -> NounPhrase = \coll, mother,john -> - let {n = john.n ; nf = if_then_else Number coll Sg n} in - variants { - defNounPhrase nf (appFunComm mother john) ; - npGenDet nf noNum john mother - } ; - --- The commonest case is functions with the preposition "of". - - funOf : CommNoun -> Function = \mother -> - mother ** {s2 = "of"} ; - - funOfReg : Str -> Gender -> Function = \mother,g -> - funOf (nounReg mother ** {g = g}) ; - --- Two-place functions add one argument place. - - Function2 = Function ** {s3 : Preposition} ; - --- There application starts by filling the first place. - - appFun2 : Function2 -> NounPhrase -> Function = \train, paris -> - {s = \\n,c => train.s ! n ! c ++ train.s2 ++ paris.s ! AccP ; - g = train.g ; - s2 = train.s3 - } ; - - ---2 Verbs --- ---3 Verb phrases --- --- Verb phrases are discontinuous: the two parts of a verb phrase are --- (s) an inflected verb, (s2) infinitive and complement. --- For instance: "doesn't" - "walk" ; "isn't" - "old" ; "is" - "a man" --- There's also a parameter telling if the verb is an auxiliary: --- this is needed in question. - - VerbGroup = { - s : Bool => VForm => Str ; - s2 : Bool => Number => Str ; - isAuxT : Bool ; - isAuxF : Bool - } ; - - VerbPhrase = VerbP3 ** {s2 : Number => Str ; isAux : Bool} ; - - predVerbGroup : Bool -> VerbGroup -> VerbPhrase = \b,vg -> { - s = vg.s ! b ; - s2 = vg.s2 ! b ; - isAux = if_then_else Bool b vg.isAuxT vg.isAuxF - } ; - --- From the inflection table, we selecting the finite form as function --- of person and number: - - indicVerb : VerbP3 -> Person -> Number -> Str = \v,p,n -> case n of { - Sg => v.s ! Indic p ; - Pl => v.s ! Indic P2 - } ; - --- A simple verb can be made into a verb phrase with an empty complement. --- There are two versions, depending on if we want to negate the verb. --- N.B. negation is *not* a function applicable to a verb phrase, since --- double negations with "don't" are not grammatical. - - predVerb : Verb -> VerbGroup = \walk -> - {s = \\b,v => if_then_Str b - (walk.s ! v ++ walk.s1) - (contractNot (verbP3Do.s ! v)) ; - s2 = \\b,_ => if_then_Str b - [] - (walk.s ! InfImp ++ walk.s1) ; - isAuxT = False ; - isAuxF = True - } ; - --- Sometimes we want to extract the verb part of a verb phrase. - - verbOfPhrase : VerbPhrase -> VerbP3 = \v -> {s = v.s} ; - --- Verb phrases can also be formed from adjectives ("is old"), --- common nouns ("is a man"), and noun phrases ("ist John"). --- The third rule is overgenerating: "is every man" has to be ruled out --- on semantic grounds. - - predAdjective : Adjective -> VerbGroup = \old -> - {s = beOrNotBe ; - s2 = \\_,_ => old.s ! AAdj ; - isAuxT, isAuxF = True - } ; - - predCommNoun : CommNoun -> VerbGroup = \man -> - {s = beOrNotBe ; - s2 = \\_,n => indefNoun n man ; - isAuxT, isAuxF = True - } ; - - predNounPhrase : NounPhrase -> VerbGroup = \john -> - {s = beOrNotBe ; - s2 = \\_,_ => john.s ! NomP ; - isAuxT, isAuxF = True - } ; - - predAdverb : Adverb -> VerbGroup = \elsewhere -> - {s = beOrNotBe ; - s2 = \\_,_ => elsewhere.s ; - isAuxT, isAuxF = True - } ; - --- We use an auxiliary giving all forms of "be". - - beOrNotBe : Bool => VForm => Str = \\b => - if_then_else (VForm => Str) b - verbBe.s - (table { - InfImp => contractNot "do" ++ "be" ; - Indic P1 => "am" ++ "not" ; - v => contractNot (verbBe.s ! v) - }) ; - ---3 Transitive verbs --- --- Transitive verbs are verbs with a preposition for the complement, --- in analogy with two-place adjectives and functions. --- One might prefer to use the term "2-place verb", since --- "transitive" traditionally means that the inherent preposition is empty. --- Such a verb is one with a *direct object*. - - TransVerb : Type = Verb ** {s3 : Preposition} ; - --- The rule for using transitive verbs is the complementization rule. --- Particles produce free variation: before or after the complement --- ("I switch on the TV" / "I switch the TV on"). - - complTransVerb : TransVerb -> NounPhrase -> VerbGroup = \lookat,john -> - let lookatjohn = bothWays lookat.s1 (lookat.s3 ++ john.s ! AccP) - in {s = \\b,v => if_then_Str b (lookat.s ! v) (contractNot (verbP3Do.s ! v)) ; - s2 = \\b,_ => if_then_Str b lookatjohn (lookat.s ! InfImp ++ lookatjohn) ; - isAuxT = False ; - isAuxF = True - } ; - - --- Verbs that take direct object and a particle: - mkTransVerbPart : VerbP3 -> Str -> TransVerb = \turn,off -> - {s = turn.s ; s1 = off ; s3 = []} ; - --- Verbs that take prepositional object, no particle: - mkTransVerb : VerbP3 -> Str -> TransVerb = \wait,for -> - {s = wait.s ; s1 = [] ; s3 = for} ; - --- Verbs that take direct object, no particle: - mkTransVerbDir : VerbP3 -> TransVerb = \love -> - mkTransVerbPart love [] ; - --- Transitive verbs with accusative objects can be used passively. --- The function does not check that the verb is transitive. --- Therefore, the function can also be used for "he is swum", etc. --- The syntax is the same as for adjectival predication. - - passVerb : Verb -> VerbGroup = \love -> - predAdjective (adj2adjPhrase (regAdjective (love.s ! PPart))) ; - --- Transitive verbs can be used elliptically as verbs. The semantics --- is left to applications. The definition is trivial, due to record --- subtyping. - - transAsVerb : TransVerb -> Verb = \love -> - love ; - --- *Ditransitive verbs* are verbs with three argument places. --- We treat so far only the rule in which the ditransitive --- verb takes both complements to form a verb phrase. - - DitransVerb = TransVerb ** {s4 : Preposition} ; - - mkDitransVerb : Verb -> Preposition -> Preposition -> DitransVerb = \v,p1,p2 -> - v ** {s3 = p1 ; s4 = p2} ; - - complDitransVerb : DitransVerb -> NounPhrase -> NounPhrase -> VerbGroup = - \give,you,beer -> - let - youbeer = give.s1 ++ give.s3 ++ you.s ! AccP ++ give.s4 ++ beer.s ! AccP - in - {s = \\b,v => if_then_Str b (give.s ! v) (contractNot (verbP3Do.s ! v)) ; - s2 = \\b,_ => if_then_Str b youbeer (give.s ! InfImp ++ youbeer) ; - isAuxT = False ; - isAuxF = True - } ; - - ---2 Adverbials --- --- Adverbials are not inflected (we ignore comparison, and treat --- compared adverbials as separate expressions; this could be done another way). --- We distinguish between post- and pre-verbal adverbs. - - Adverb : Type = SS ** {p : Bool} ; - - advPre : Str -> Adverb = \seldom -> ss seldom ** {p = False} ; - advPost : Str -> Adverb = \well -> ss well ** {p = True} ; - --- N.B. this rule generates the cyclic parsing rule $VP#2 ::= VP#2$ --- and cannot thus be parsed. - - adVerbPhrase : VerbPhrase -> Adverb -> VerbPhrase = \sings, well -> - let {postp = orB well.p sings.isAux} in - { - s = \\v => (if_then_else Str postp [] well.s) ++ sings.s ! v ; - s2 = \\n => sings.s2 ! n ++ (if_then_else Str postp well.s []) ; - isAux = sings.isAux - } ; - - advAdjPhrase : SS -> AdjPhrase -> AdjPhrase = \very, good -> - {s = \\a => very.s ++ good.s ! a ; - p = good.p - } ; - --- Adverbials are typically generated by prefixing prepositions. --- The rule for creating locative noun phrases by the preposition "in" --- is a little shaky, since other prepositions may be preferred ("on", "at"). - - prepPhrase : Preposition -> NounPhrase -> Adverb = \on, it -> - advPost (on ++ it.s ! AccP) ; - - locativeNounPhrase : NounPhrase -> Adverb = - prepPhrase "in" ; - --- This is a source of the "mann with a telescope" ambiguity, and may produce --- strange things, like "cars always" (while "cars today" is OK). --- Semantics will have to make finer distinctions among adverbials. --- --- N.B. the genitive case created in this way would not make sense. - - advCommNounPhrase : CommNounPhrase -> Adverb -> CommNounPhrase = \car,today -> - {s = \\n => table { - Nom => car.s ! n ! Nom ++ today.s ; - Gen => nonExist - } ; - g = car.g - } ; - - ---2 Sentences --- --- Sentences are not inflected in this fragment of English without tense. - - Sentence : Type = SS ; - --- This is the traditional $S -> NP VP$ rule. It takes care of --- agreement between subject and verb. Recall that the VP may already --- contain negation. - - predVerbPhrase : NounPhrase -> VerbPhrase -> Sentence = \john,walks -> - ss (john.s ! NomP ++ indicVerb (verbOfPhrase walks) john.p john.n ++ - walks.s2 ! john.n) ; - - - ---3 Sentence-complement verbs --- --- Sentence-complement verbs take sentences as complements. - - SentenceVerb : Type = Verb ; - --- To generate "says that John walks" / "doesn't say that John walks": - - complSentVerb : SentenceVerb -> Sentence -> VerbGroup = \say,johnruns -> - let {thatjohnruns = optStr "that" ++ johnruns.s} in - {s = \\b,v => if_then_Str b (say.s ! v) (contractNot (verbP3Do.s ! v)) ; - s2 = \\b,_ => if_then_Str b thatjohnruns (say.s ! InfImp ++ thatjohnruns) ; - isAuxT = False ; - isAuxF = True - } ; - ---3 Verb-complement verbs --- --- Sentence-complement verbs take verb phrases as complements. --- They can be auxiliaries ("can", "must") or ordinary verbs --- ("try"); this distinction cannot be done in the multilingual --- API and leads to some anomalies in English, such as the necessity --- to create the infinitive form "to be able to" for "can" so that --- the construction can be iterated, and the corresponding complication --- in the parameter structure. - - VerbVerb : Type = Verb ** {isAux : Bool} ; - --- To generate "can walk"/"can't walk"; "tries to walk"/"does not try to walk": --- The contraction of "not" is not provided, since it would require changing --- the verb parameter type. - - complVerbVerb : VerbVerb -> VerbGroup -> VerbGroup = \try,run -> - let - taux = try.isAux ; - to = if_then_Str taux [] "to" ; - dont = table VForm {v => if_then_Str taux - (try.s ! v ++ "not") -- can not - (contractNot (verbP3Do.s ! v)) -- doesn't ... - } ; - trnot = if_then_Str taux - [] -- - (try.s ! InfImp ++ try.s1) ; -- ... try - in - {s = \\b,v => if_then_Str b - (try.s ! v ++ try.s1 ++ to ++ run.s ! True ! InfImp) - (dont ! v) ; - s2 = \\b,v => if_then_Str b - (run.s2 ! True ! v) - (trnot ++ run.s ! True ! InfImp ++ run.s2 ! True ! v) ; - isAuxT = taux ; - isAuxF = True - } ; - --- The three most important example auxiliaries. - - mkVerbAux : (_,_,_,_: Str) -> VerbVerb = \beable, can, could, beenable -> - {s = table { - InfImp => beable ; - Indic _ => can ; - Past _ => could ; - PPart => beenable - } ; - s1 = [] ; - isAux = True - } ; - - vvCan : VerbVerb = mkVerbAux ["be able to"] "can" "could" ["been able to"] ; - vvMust : VerbVerb = mkVerbAux ["have to"] "must" ["had to"] ["had to"] ; - ---2 Sentences missing noun phrases --- --- This is one instance of Gazdar's *slash categories*, corresponding to his --- $S/NP$. --- We cannot have - nor would we want to have - a productive slash-category former. --- Perhaps a handful more will be needed. --- --- Notice that the slash category has a similar relation to sentences as --- transitive verbs have to verbs: it's like a *sentence taking a complement*. --- However, we need something more to distinguish its use in direct questions: --- not just "you see" but ("whom") "do you see". --- --- The particle always follows the verb, but the preposition can fly: --- "whom you make it up with" / "with whom you make it up". - - SentenceSlashNounPhrase = {s : Bool => Str ; s2 : Preposition} ; - - slashTransVerb : Bool -> NounPhrase -> TransVerb -> SentenceSlashNounPhrase = - \b,You,lookat -> - let {you = You.s ! NomP ; - looks = indicVerb {s = lookat.s} You.p You.n ; - look = lookat.s ! InfImp ; - do = indicVerb verbP3Do You.p You.n ; - dont = contractNot do ; - up = lookat.s1 - } in - {s = table { - True => if_then_else Str b do dont ++ you ++ look ++ up ; - False => you ++ if_then_else Str b looks (dont ++ look) ++ up - } ; - s2 = lookat.s3 - } ; - - ---2 Relative pronouns and relative clauses --- --- As described in $types.Eng.gf$, relative pronouns are inflected in --- gender (human/nonhuman), number, and case. --- --- We get the simple relative pronoun ("who"/"which"/"whom"/"whose"/"that"/$""$) --- from $morpho.Eng.gf$. - - identRelPron : RelPron = relPron ; - - funRelPron : Function -> RelPron -> RelPron = \mother,which -> - {s = \\g,n,c => "the" ++ mother.s ! n ! Nom ++ - mother.s2 ++ which.s ! g ! n ! GenSP - } ; - --- Relative clauses can be formed from both verb phrases ("who walks") and --- slash expressions ("whom you see", "on which you sit" / "that you sit on"). - - RelClause : Type = {s : Gender => Number => Str} ; - - relVerbPhrase : RelPron -> VerbPhrase -> RelClause = \who,walks -> - {s = \\g, n => who.s ! g ! n ! NomP ++ - indicVerb (verbOfPhrase walks) P3 n ++ walks.s2 ! n - } ; - - relSlash : RelPron -> SentenceSlashNounPhrase -> RelClause = \who,yousee -> - {s = \\g,n => - let {youSee = yousee.s ! False} in - variants { - who.s ! g ! n ! AccP ++ youSee ++ yousee.s2 ; - yousee.s2 ++ who.s ! g ! n ! GenSP ++ youSee - } - } ; - --- A 'degenerate' relative clause is the one often used in mathematics, e.g. --- "number x such that x is even". - - relSuch : Sentence -> RelClause = \A -> - {s = \\_,_ => "such" ++ "that" ++ A.s} ; - --- The main use of relative clauses is to modify common nouns. --- The result is a common noun, out of which noun phrases can be formed --- by determiners. No comma is used before these relative clause. - - modRelClause : CommNounPhrase -> RelClause -> CommNounPhrase = \man,whoruns -> - {s = \\n,c => man.s ! n ! c ++ whoruns.s ! man.g ! n ; - g = man.g - } ; - - ---2 Interrogative pronouns --- --- If relative pronouns are adjective-like, interrogative pronouns are --- noun-phrase-like. - - IntPron : Type = {s : NPForm => Str ; n : Number} ; - --- In analogy with relative pronouns, we have a rule for applying a function --- to a relative pronoun to create a new one. - - funIntPron : Function -> IntPron -> IntPron = \mother,which -> - {s = \\c => "the" ++ mother.s ! which.n ! Nom ++ mother.s2 ++ which.s ! GenSP ; - n = which.n - } ; - --- There is a variety of simple interrogative pronouns: --- "which house", "who", "what". - - nounIntPron : Number -> CommNounPhrase -> IntPron = \n, car -> - {s = \\c => "which" ++ car.s ! n ! toCase c ; - n = n - } ; - - intPronWho : Number -> IntPron = \num -> { - s = table { - NomP => "who" ; - AccP => variants {"who" ; "whom"} ; - GenP => "whose" ; - GenSP => "whom" - } ; - n = num - } ; - - intPronWhat : Number -> IntPron = \num -> { - s = table { - GenP => "what's" ; - _ => "what" - } ; - n = num - } ; - - ---2 Utterances - --- By utterances we mean whole phrases, such as --- 'can be used as moves in a language game': indicatives, questions, imperative, --- and one-word utterances. The rules are far from complete. --- --- N.B. we have not included rules for texts, which we find we cannot say much --- about on this level. In semantically rich GF grammars, texts, dialogues, etc, --- will of course play an important role as categories not reducible to utterances. --- An example is proof texts, whose semantics show a dependence between premises --- and conclusions. Another example is intersentential anaphora. - - Utterance = SS ; - - indicUtt : Sentence -> Utterance = \x -> ss (x.s ++ ".") ; - interrogUtt : Question -> Utterance = \x -> ss (x.s ! DirQ ++ "?") ; - - ---2 Questions --- --- Questions are either direct ("are you happy") or indirect --- ("if/whether you are happy"). - -param - QuestForm = DirQ | IndirQ ; - -oper - Question = SS1 QuestForm ; - ---3 Yes-no questions --- --- Yes-no questions are used both independently --- ("does John walk" / "if John walks") --- and after interrogative adverbials --- ("why does John walk" / "why John walks"). --- --- It is economical to handle with all these cases by the one --- rule, $questVerbPhrase'$. The word ("ob" / "whether") never appears --- if there is an adverbial. - - questVerbPhrase : NounPhrase -> VerbPhrase -> Question = - questVerbPhrase' False ; - - questVerbPhrase' : Bool -> NounPhrase -> VerbPhrase -> Question = - \adv,john,walk -> - {s = table { - DirQ => if_then_else Str walk.isAux - (indicVerb (verbOfPhrase walk) john.p john.n ++ - john.s ! NomP ++ walk.s2 ! john.n) - (indicVerb verbP3Do john.p john.n ++ - john.s ! NomP ++ walk.s ! InfImp ++ walk.s2 ! john.n) ; - IndirQ => if_then_else Str adv [] (variants {"if" ; "whether"}) ++ - (predVerbPhrase john walk).s - } - } ; - - isThere : Number -> Numeral -> CommNounPhrase -> Question = \n,num,bar -> - questVerbPhrase - (case n of { - Sg => nameNounPhrase (nameReg "there") ; - Pl => {s = \\_ => "there" ; n = Pl ; p = P3} - }) - (predVerbGroup True (predNounPhrase (indefNounPhraseNum n num bar))) ; - - ---3 Wh-questions --- --- Wh-questions are of two kinds: ones that are like $NP - VP$ sentences, --- others that are line $S/NP - NP$ sentences. - - intVerbPhrase : IntPron -> VerbPhrase -> Question = \who,walk -> - {s = \\_ => who.s ! NomP ++ indicVerb (verbOfPhrase walk) P3 who.n ++ - walk.s2 ! who.n - } ; - - intSlash : IntPron -> SentenceSlashNounPhrase -> Question = \who,yousee -> - {s = \\q => - let {youSee = case q of { - DirQ => yousee.s ! True ; - IndirQ => yousee.s ! False - } - } in - variants { - who.s ! AccP ++ youSee ++ yousee.s2 ; - yousee.s2 ++ who.s ! GenSP ++ youSee - } - } ; - ---3 Interrogative adverbials --- --- These adverbials will be defined in the lexicon: they include --- "when", "where", "how", "why", etc, which are all invariant one-word --- expressions. In addition, they can be formed by adding prepositions --- to interrogative pronouns, in the same way as adverbials are formed --- from noun phrases. - - IntAdverb = SS ; - - prepIntAdverb : Preposition -> IntPron -> IntAdverb = \at, whom -> - ss (at ++ whom.s ! AccP) ; - --- A question adverbial can be applied to anything, and whether this makes --- sense is a semantic question. - - questAdverbial : IntAdverb -> NounPhrase -> VerbPhrase -> Question = - \why, you, walk -> - {s = \\q => why.s ++ (questVerbPhrase' True you walk).s ! q} ; - - ---2 Imperatives --- --- We only consider second-person imperatives. - - Imperative = SS1 Number ; - - imperVerbPhrase : VerbPhrase -> Imperative = \walk -> - {s = \\n => walk.s ! InfImp ++ walk.s2 ! n} ; - - imperUtterance : Number -> Imperative -> Utterance = \n,I -> - ss (I.s ! n ++ "!") ; - ---2 Sentence adverbials --- --- This class covers adverbials such as "otherwise", "therefore", which are prefixed --- to a sentence to form a phrase. - - advSentence : SS -> Sentence -> Utterance = \hence,itiseven -> - ss (hence.s ++ itiseven.s ++ ".") ; - - ---2 Coordination --- --- Coordination is to some extent orthogonal to the rest of syntax, and --- has been treated in a generic way in the module $CO$ in the file --- $coordination.gf$. The overall structure is independent of category, --- but there can be differences in parameter dependencies. --- ---3 Conjunctions --- --- Coordinated phrases are built by using conjunctions, which are either --- simple ("and", "or") or distributed ("both - and", "either - or"). --- --- The conjunction has an inherent number, which is used when conjoining --- noun phrases: "John and Mary are..." vs. "John or Mary is..."; in the --- case of "or", the result is however plural if any of the disjuncts is. - - Conjunction = CO.Conjunction ** {n : Number} ; - ConjunctionDistr = CO.ConjunctionDistr ** {n : Number} ; - ---3 Coordinating sentences --- --- We need a category of lists of sentences. It is a discontinuous --- category, the parts corresponding to 'init' and 'last' segments --- (rather than 'head' and 'tail', because we have to keep track of the slot between --- the last two elements of the list). A list has at least two elements. - - ListSentence : Type = SD2 ; - - twoSentence : (_,_ : Sentence) -> ListSentence = CO.twoSS ; - - consSentence : ListSentence -> Sentence -> ListSentence = - CO.consSS CO.comma ; - --- To coordinate a list of sentences by a simple conjunction, we place --- it between the last two elements; commas are put in the other slots, --- e.g. "du rauchst, er trinkt und ich esse". - - conjunctSentence : Conjunction -> ListSentence -> Sentence = \c,xs -> - ss (CO.conjunctX c xs) ; - --- To coordinate a list of sentences by a distributed conjunction, we place --- the first part (e.g. "either") in front of the first element, the second --- part ("or") between the last two elements, and commas in the other slots. --- For sentences this is really not used. - - conjunctDistrSentence : ConjunctionDistr -> ListSentence -> Sentence = - \c,xs -> - ss (CO.conjunctDistrX c xs) ; - ---3 Coordinating adjective phrases --- --- The structure is the same as for sentences. The result is a prefix adjective --- if and only if all elements are prefix. - - ListAdjPhrase : Type = {s1,s2 : AForm => Str ; p : Bool} ; - - twoAdjPhrase : (_,_ : AdjPhrase) -> ListAdjPhrase = \x,y -> - CO.twoTable AForm x y ** {p = andB x.p y.p} ; - - consAdjPhrase : ListAdjPhrase -> AdjPhrase -> ListAdjPhrase = \xs,x -> - CO.consTable AForm CO.comma xs x ** {p = andB xs.p x.p} ; - - conjunctAdjPhrase : Conjunction -> ListAdjPhrase -> AdjPhrase = \c,xs -> - CO.conjunctTable AForm c xs ** {p = xs.p} ; - - conjunctDistrAdjPhrase : ConjunctionDistr -> ListAdjPhrase -> AdjPhrase = - \c,xs -> - CO.conjunctDistrTable AForm c xs ** {p = xs.p} ; - - ---3 Coordinating noun phrases --- --- The structure is the same as for sentences. The result is either always plural --- or plural if any of the components is, depending on the conjunction. - - ListNounPhrase : Type = {s1,s2 : NPForm => Str ; n : Number ; p : Person} ; - - twoNounPhrase : (_,_ : NounPhrase) -> ListNounPhrase = \x,y -> - CO.twoTable NPForm x y ** {n = conjNumber x.n y.n ; p = conjPerson x.p y.p} ; - - consNounPhrase : ListNounPhrase -> NounPhrase -> ListNounPhrase = \xs,x -> - CO.consTable NPForm CO.comma xs x ** - {n = conjNumber xs.n x.n ; p = conjPerson xs.p x.p} ; - - conjunctNounPhrase : Conjunction -> ListNounPhrase -> NounPhrase = \c,xs -> - CO.conjunctTable NPForm c xs ** {n = conjNumber c.n xs.n ; p = xs.p} ; - - conjunctDistrNounPhrase : ConjunctionDistr -> ListNounPhrase -> NounPhrase = - \c,xs -> - CO.conjunctDistrTable NPForm c xs ** {n = conjNumber c.n xs.n ; p = xs.p} ; - --- We have to define a calculus of numbers of persons. For numbers, --- it is like the conjunction with $Pl$ corresponding to $False$. - - conjNumber : Number -> Number -> Number = \m,n -> case of { - => Sg ; - _ => Pl - } ; - --- For persons, we let the latter argument win ("either you or I am absent" --- but "either I or you are absent"). This is not quite clear. - - conjPerson : Person -> Person -> Person = \_,p -> - p ; - - - ---2 Subjunction --- --- Subjunctions ("when", "if", etc) --- are a different way to combine sentences than conjunctions. --- The main clause can be a sentences, an imperatives, or a question, --- but the subjoined clause must be a sentence. --- --- There are uniformly two variant word orders, e.g. --- "if you smoke I get angry" --- and "I get angry if you smoke". - - Subjunction = SS ; - - subjunctSentence : Subjunction -> Sentence -> Sentence -> Sentence = - \if, A, B -> - ss (subjunctVariants if A.s B.s) ; - - subjunctImperative : Subjunction -> Sentence -> Imperative -> Imperative = - \if, A, B -> - {s = \\n => subjunctVariants if A.s (B.s ! n)} ; - - subjunctQuestion : Subjunction -> Sentence -> Question -> Question = - \if, A, B -> - {s = \\q => subjunctVariants if A.s (B.s ! q)} ; - - subjunctVariants : Subjunction -> Str -> Str -> Str = \if,A,B -> - variants {if.s ++ A ++ "," ++ B ; B ++ "," ++ if.s ++ A} ; - - subjunctVerbPhrase : VerbPhrase -> Subjunction -> Sentence -> VerbPhrase = - \V, if, A -> - adVerbPhrase V (advPost (if.s ++ A.s)) ; - ---2 One-word utterances --- --- An utterance can consist of one phrase of almost any category, --- the limiting case being one-word utterances. These --- utterances are often (but not always) in what can be called the --- default form of a category, e.g. the nominative. --- This list is far from exhaustive. - - useNounPhrase : NounPhrase -> Utterance = \john -> - postfixSS "." (defaultNounPhrase john) ; - - useCommonNounPhrase : Number -> CommNounPhrase -> Utterance = \n,car -> - useNounPhrase (indefNounPhrase n car) ; - - useRegularName : SS -> NounPhrase = \john -> - nameNounPhrase (nameReg john.s) ; - --- Here are some default forms. - - defaultNounPhrase : NounPhrase -> SS = \john -> - ss (john.s ! NomP) ; - - defaultQuestion : Question -> SS = \whoareyou -> - ss (whoareyou.s ! DirQ) ; - - defaultSentence : Sentence -> Utterance = \x -> - x ; - -} ; diff --git a/grammars/resource/nenglish/TestResourceEng.gf b/grammars/resource/nenglish/TestResourceEng.gf deleted file mode 100644 index eaad5f941..000000000 --- a/grammars/resource/nenglish/TestResourceEng.gf +++ /dev/null @@ -1,51 +0,0 @@ --- use this path to read the grammar from the same directory ---# -path=.:../nabstract:../../prelude - -concrete TestResourceEng of TestResource = StructuralEng ** open SyntaxEng in { - -flags startcat=Phr ; lexer=literals ; parser=chart ; unlexer=text ; - --- a random sample from the lexicon - -lin - Big = adjDegrIrreg "big" "bigger" "biggest"; - Happy = adjDegrReg "happy" ; - Small = adjDegrReg "small" ; - Old = adjDegrReg "old" ; - Young = adjDegrReg "young" ; - American = regAdjective "American" ; - Finnish = regAdjective "Finnish" ; - Married = regAdjective "married" ** {s2 = "to"} ; - Man = cnHum (mkNoun "man" "men" "man's" "men's") ; - Woman = cnHum (mkNoun "woman" "women" "woman's" "women's") ; - Car = cnNoHum (nounReg "car") ; - House = cnNoHum (nounReg "house") ; - Light = cnNoHum (nounReg "light") ; - Bar = cnNoHum (nounReg "bar") ; - Bottle = cnNoHum (nounReg "bottle") ; - Wine = cnNoHum (nounReg "wine") ; - Walk = verbNoPart (regVerbP3 "walk") ; - Run = verbNoPart (mkVerb "run" "ran" "run") ; - Say = verbNoPart (mkVerb "say" "said" "said") ; - Prove = verbNoPart (regVerbP3 "prove") ; - Send = mkTransVerbDir (verbNoPart (mkVerb "send" "sent" "sent")) ; - Love = mkTransVerbDir (verbNoPart (verbP3e "love")) ; - Wait = mkTransVerb (verbNoPart (regVerbP3 "wait")) "for" ; - Drink = mkTransVerbDir (verbNoPart (mkVerb "drink" "drank" "drunk")) ; - Give = mkDitransVerb (verbNoPart (mkVerb "give" "gave" "given")) [] [] ; - Prefer = mkDitransVerb - (verbNoPart (mkVerb "prefer" "preferred" "preferred")) [] "to" ; - Mother = funOfReg "mother" Hum ; - Uncle = funOfReg "uncle" Hum ; - Connection = cnNoHum (nounReg "connection") ** {s2 = "from" ; s3 = "to"} ; - - Always = advPre "always" ; - Well = advPost "well" ; - - SwitchOn = mkTransVerbPart (verbP3s "switch") "on" ; - SwitchOff = mkTransVerbPart (verbP3s "switch") "off" ; - - John = nameReg "John" ; - Mary = nameReg "Mary" ; - -} ; diff --git a/grammars/resource/nenglish/TypesEng.gf b/grammars/resource/nenglish/TypesEng.gf deleted file mode 100644 index 61682c14f..000000000 --- a/grammars/resource/nenglish/TypesEng.gf +++ /dev/null @@ -1,104 +0,0 @@ ---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 = NoHum | Hum ; - 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 Person | Past Number | PPart ; - -oper - VerbP3 : Type = SS1 VForm ; - --- A full verb can moreover have a particle. - - Particle : Type = Str ; - Verb = VerbP3 ** {s1 : Particle} ; - --- ---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} ; - --- 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 = SS1 Case ; - ---3 Relative pronouns --- --- Relative pronouns are inflected in gender (human/nonhuman), number, and case. - - RelPron : Type = {s : Gender => Number => NPForm => Str} ; -} ; - diff --git a/grammars/resource/romance/ResRomance.gf b/grammars/resource/romance/ResRomance.gf deleted file mode 100644 index 067048d11..000000000 --- a/grammars/resource/romance/ResRomance.gf +++ /dev/null @@ -1,203 +0,0 @@ ---# -path=.:../abstract:../../prelude - ---1 The Top-Level French Resource Grammar --- --- Aarne Ranta 2002 -- 2003 --- --- This is the French concrete syntax of the multilingual resource --- grammar. Most of the work is done in the file --- $syntax.Romance.gf$, some in $syntax.Fra.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. Most parameter types are defined in $types.Romance.gf$, some in --- $types.Fra.gf$. - -incomplete concrete ResRomance of ResAbs = open Prelude, SyntaxRomance in { - -flags - startcat=Phr ; - parser=chart ; - -lincat - N = CommNoun ; - -- = {s : Number => Str ; g : Gender} ; - CN = CommNoun ; - NP = {s : NPFormA => Str ; g : PronGen ; - n : Number ; p : Person ; c : ClitType} ; - PN = {s : Str ; g : Gender} ; - Det = {s : Gender => Str ; n : Number} ; - Adj1 = Adjective ; - -- = {s : Gender => Number => Str ; p : Bool} ; - Adj2 = Adjective ** {s2 : Preposition ; c : CaseA} ; - AdjDeg = {s : Degree => Gender => Number => Str ; p : Bool} ; - AP = Adjective ; - Fun = CommNoun ** {s2 : Preposition ; c : CaseA} ; - - V = Verb ; - -- = {s : VF => Str} ; - VP = {s : Gender => VF => Str} ; - TV = Verb ** {s2 : Preposition ; c : CaseA} ; - VS = Verb ** {mp,mn : Mode} ; - AdV = {s : Str} ; - - S = Sentence ; - -- = {s : Mode => Str} ; - Slash = Sentence ** {s2 : Preposition ; c : CaseA} ; - - RP = {s : RelForm => Str ; g : RelGen} ; - RC = {s : Mode => Gender => Number => Str} ; - - IP = {s : CaseA => Str ; g : Gender ; n : Number} ; - Qu = {s : QuestForm => Str} ; - Imp = {s : Gender => Number => Str} ; - Phr = {s : Str} ; - - Conj = {s : Str ; n : Number} ; - ConjD = {s1,s2 : Str ; n : Number} ; - - ListS = {s1,s2 : Mode => Str} ; - ListAP = {s1,s2 : Gender => Number => Str ; p : Bool} ; - ListNP = {s1,s2 : CaseA => Str ; g : PronGen ; n : Number ; p : Person} ; - ---. - -lin - UseN = noun2CommNounPhrase ; - ModAdj = modCommNounPhrase ; - ModGenOne = npGenDet singular ; - ModGenMany = npGenDet plural ; - UsePN = nameNounPhrase ; - UseFun = funAsCommNounPhrase ; -- [SyntaxFra.noun2CommNounPhrase] - AppFun = appFunComm ; - AdjP1 = adj2adjPhrase ; - ComplAdj = complAdj ; - PositAdjP = positAdjPhrase ; - ComparAdjP = comparAdjPhrase ; - SuperlNP = superlNounPhrase ; - - DetNP = detNounPhrase ; - IndefOneNP = indefNounPhrase singular ; - IndefManyNP = indefNounPhrase plural ; - DefOneNP = defNounPhrase singular ; - DefManyNP = defNounPhrase plural ; - - PredVP = predVerbPhrase ; - PosV = predVerb True ; - NegV = predVerb False ; - PosA = predAdjective True ; - NegA = predAdjective False ; - PosCN = predCommNoun True ; - NegCN = predCommNoun False ; - PosTV = complTransVerb True ; - NegTV = complTransVerb False ; - PosNP = predNounPhrase True ; - NegNP = predNounPhrase False ; - PosVS = complSentVerb True ; - NegVS = complSentVerb False ; - - - AdvVP = adVerbPhrase ; - LocNP = locativeNounPhrase ; - AdvCN = advCommNounPhrase ; - - PosSlashTV = slashTransVerb True ; - NegSlashTV = slashTransVerb False ; - - IdRP = identRelPron ; - FunRP = funRelPron ; - RelVP = relVerbPhrase ; - RelSlash = relSlash ; - ModRC = modRelClause ; - RelSuch = relSuch ; - - WhoOne = intPronWho singular ; - WhoMany = intPronWho plural ; - WhatOne = intPronWhat singular ; - WhatMany = intPronWhat plural ; - FunIP = funIntPron ; - NounIPOne = nounIntPron singular ; - NounIPMany = nounIntPron plural ; - - QuestVP = questVerbPhrase ; - IntVP = intVerbPhrase ; - IntSlash = intSlash ; - QuestAdv = questAdverbial ; - - ImperVP = imperVerbPhrase ; - - IndicPhrase = indicUtt ; - QuestPhrase = interrogUtt ; - ImperOne = imperUtterance singular ; - ImperMany = imperUtterance plural ; - -lin - TwoS = twoSentence ; - ConsS = consSentence ; - ConjS = conjunctSentence ; - ConjDS = conjunctDistrSentence ; -- [Coordination.conjunctDistrTable] - - TwoAP = twoAdjPhrase ; - ConsAP = consAdjPhrase ; - ConjAP = conjunctAdjPhrase ; - ConjDAP = conjunctDistrAdjPhrase ; - - TwoNP = twoNounPhrase ; - ConsNP = consNounPhrase ; - ConjNP = conjunctNounPhrase ; - ConjDNP = conjunctDistrNounPhrase ; - - SubjS = subjunctSentence ; -- stack - SubjImper = subjunctImperative ; - SubjQu = subjunctQuestion ; - - PhrNP = useNounPhrase ; - PhrOneCN = useCommonNounPhrase singular ; - PhrManyCN = useCommonNounPhrase plural ; - PhrIP ip = ip ; - PhrIAdv ia = ia ; - - INP = pronNounPhrase pronJe ; - ThouNP = pronNounPhrase pronTu ; - HeNP = pronNounPhrase pronIl ; - SheNP = pronNounPhrase pronElle ; - WeNP = pronNounPhrase pronNous ; - YeNP = pronNounPhrase pronVous ; - YouNP = pronNounPhrase pronVous ; - TheyNP = pronNounPhrase pronIls ; - --- Here is a point where the API is really inadequate for French, --- which distinguishes between masculine and feminine "they". --- The following solution is not attractive. - ---- TheyNP = pronNounPhrase (variants {pronIls ; pronElles}) ; - - EveryDet = chaqueDet ; - AllDet = tousDet ; - WhichDet = quelDet ; - MostDet = plupartDet ; - - HowIAdv = commentAdv ; - WhenIAdv = quandAdv ; - WhereIAdv = ouAdv ; - WhyIAdv = pourquoiAdv ; - - AndConj = etConj ; - OrConj = ouConj ; - BothAnd = etetConj ; - EitherOr = ououConj ; - NeitherNor = niniConj ; --- requires ne ! - IfSubj = siSubj ; - WhenSubj = quandSubj ; - - PhrYes = ouiPhr ; - PhrNo = nonPhr ; --- and also Si! -} diff --git a/grammars/resource/romance/SyntaxRomance.gf b/grammars/resource/romance/SyntaxRomance.gf deleted file mode 100644 index 74af5a867..000000000 --- a/grammars/resource/romance/SyntaxRomance.gf +++ /dev/null @@ -1,871 +0,0 @@ ---1 A Small Romance Resource Syntax --- --- Aarne Ranta 2002 --- --- This resource grammar contains definitions needed to construct --- indicative, interrogative, and imperative sentences in Romance languages. --- We try to share as much as possible. Even if the definitions of certain --- operations are different in $syntax.Fra.gf$ and $syntax.Ita.gf$, we can --- often give their type signatures in this file. --- --- The following files are presupposed: - -interface SyntaxRomance = TypesRomance ** open Prelude, (CO=Coordination) in { - ---2 Common Nouns --- --- Common nouns are defined as number-dependent strings with a gender. --- Complex common noun ($CommNounPhrase$) have the same type as simple ones. --- (The distinction is made just because of uniformity with other languages.) - -oper - CommNoun : Type = {s : Number => Str ; g : Gender} ; - CommNounPhrase = CommNoun ; - noun2CommNounPhrase : CommNounPhrase -> CommNoun = \x -> x ; - - commonNounComp : CommNoun -> Str -> CommNoun = \numero, detelephone -> - {s = \\n => numero.s ! n ++ detelephone ; - g = numero.g - } ; - - ---2 Noun phrase --- --- The worst case is pronouns, which have inflection in the possessive --- forms. Other noun phrases express all possessive forms with the genitive case. --- Proper names are the simples example. - - ProperName : Type = {s : Str ; g : Gender} ; - - NounPhrase : Type = Pronoun ; -- the worst case - - nameNounPhrase : ProperName -> NounPhrase ; - - mkProperName : Str -> Gender -> ProperName = \jean,m -> - {s = jean ; g = m} ; - - mkNameNounPhrase : Str -> Gender -> NounPhrase = \jean,m -> - nameNounPhrase (mkProperName jean m) ; - - normalNounPhrase : (CaseA => Str) -> Gender -> Number -> NounPhrase = \cs,g,n -> - {s = \\p => cs ! (pform2case p) ; - g = PGen g ; - n = n ; - p = P3 ; -- third person - c = Clit0 -- not clitic - } ; - - pronNounPhrase : Pronoun -> NounPhrase = \pro -> pro ; - - ---2 Determiners --- --- Determiners are inflected according to the gender of the nouns they determine. --- The determiner determines the number of the argument noun. - - Determiner : Type = {s : Gender => Str ; n : Number} ; - - detNounPhrase : Determiner -> CommNoun -> NounPhrase = \tout, homme -> - normalNounPhrase - (\\c => prepCase c ++ tout.s ! homme.g ++ homme.s ! tout.n) - homme.g - tout.n ; - --- The following macros are sufficient to define most determiners, --- as shown by the examples that follow. - - mkDeterminer : Number -> Str -> Str -> Determiner = \n,tous,toutes -> - {s = genForms tous toutes ; n = n} ; - - mkDeterminer1 : Number -> Str -> Determiner = \n,chaque -> - mkDeterminer n chaque chaque ; - - --- Indefinite and definite noun phrases are treated separately, --- which strictly speaking is not necessary in Romance languages, since --- articles could be treated as determiners. - - indefNounPhrase : Number -> CommNounPhrase -> NounPhrase = \n,mec -> - normalNounPhrase - (\\c => artIndef mec.g n c ++ mec.s ! n) - mec.g - n ; - - defNounPhrase : Number -> CommNounPhrase -> NounPhrase = \n,mec -> - normalNounPhrase - (\\c => artDef mec.g n c ++ mec.s ! n) - mec.g - n ; - --- We often need indefinite noun phrases synacategorematically. - - indefNoun : Number -> CommNounPhrase -> Str = \n,mec -> - (indefNounPhrase n mec).s ! case2pform nominative ; - --- Genitives of noun phrases can be used like determiners, to build noun phrases. --- The number argument makes the difference between "ma maison" - "mes maisons". --- The clitic type of the NP decides between "ma maison" and "la maison de Jean". - - npGenDet : Number -> NounPhrase -> CommNounPhrase -> NounPhrase = \n,jeanne,mec -> - let {str : CaseA => Str = case jeanne.c of { - Clit0 => npGenDe n jeanne mec ; - _ => npGenPoss n jeanne mec - } - } in - normalNounPhrase str mec.g n ; - --- These auxiliary rules define the genitive with "de" and with the possessive. --- Here there is a difference between French and Italian: Italian has a definite --- article before possessives (with certain exceptions). - - npGenDe : Number -> NounPhrase -> CommNounPhrase -> CaseA => Str = - \n,jeanne,mec -> - \\c => artDef mec.g n c ++ mec.s ! n ++ jeanne.s ! case2pform genitive ; - - npGenPoss : Number -> NounPhrase -> CommNounPhrase -> CaseA => Str ; - ---2 Adjectives --- --- Adjectives have a parameter $p$ telling if postposition is --- allowed (complex APs). There is no real need in Romance languages to distinguish --- between simple adjectives and adjectival phrases. - - Adjective : Type = Adj ** {p : Bool} ; - - adjPre = True ; adjPost = False ; - - AdjPhrase : Type = Adjective ; - - adj2adjPhrase : Adjective -> AdjPhrase = \x -> x ; - - mkAdjective : Adj -> Bool -> Adjective = \adj,p -> adj ** {p = p} ; - - ---3 Comparison adjectives --- --- The type is defined in $types.Romance.gf$. Syntax adds to lexicon the position --- information. - - AdjDegr = AdjComp ** {p : Bool} ; - - mkAdjDegr : AdjComp -> Bool -> AdjDegr = \adj,p -> - adj ** {p = p} ; - - mkAdjDegrLong : Adj -> Bool -> AdjDegr = \adj,p -> - adjCompLong adj ** {p = p} ; - - --- Each of the comparison forms has a characteristic use: --- --- Positive forms are used alone, as adjectival phrases ("bon"). - - positAdjPhrase : AdjDegr -> AdjPhrase = \bon -> - {s = bon.s ! Pos ; - p = bon.p - } ; - --- Comparative forms are used with an object of comparison, as --- adjectival phrases ("meilleur que toi"). The comparing conjunction --- is of course language-dependent; Italian moreover has the free --- variants "che" and "di". - - comparAdjPhrase : AdjDegr -> NounPhrase -> AdjPhrase = \bon, toi -> - {s = \\g,n => bon.s ! Comp ! g ! n ++ comparConj ++ - toi.s ! stressed accusative ; - p = False - } ; - - comparConj : Str ; - --- Superlative forms are used with a common noun, picking out the --- maximal representative of a domain --- ("le meilleur mec", "le mec le plus intelligent"). - - superlNounPhrase : AdjDegr -> CommNoun -> NounPhrase = \bon, mec -> - normalNounPhrase - (\\c => artDef mec.g Sg c ++ if_then_else Str bon.p - (bon.s ! Sup ! mec.g ! Sg ++ mec.s ! Sg) - (mec.s ! Sg ++ artDef mec.g Sg nominative ++ bon.s ! Sup ! mec.g ! Sg) - ) - mec.g - Sg ; - - ---3 Prepositions and complements --- --- Most prepositions are just strings. But "à" and "de" are treated as cases in --- French. In Italian, there are more prepositions treated in this way: --- "a", "di", "da", "in", "su", "con". --- An invariant is that, if the preposition is not empty ($[]$), then the case --- is $Acc$. - - Preposition = Str ; - - Complement = {s2 : Preposition ; c : CaseA} ; - - complement : Str -> Complement = \par -> - {s2 = par ; c = nominative} ; - - complementDir : Complement = complement [] ; - - complementCas : CaseA -> Complement = \c -> - {s2 = [] ; c = c} ; - - ---3 Two-place adjectives --- --- A two-place adjective is an adjective with a preposition used before --- the complement, and the complement case. - - AdjCompl = AdjPhrase ** Complement ; - - mkAdjCompl : Adj -> Bool -> Complement -> AdjCompl = \adj,p,c -> - mkAdjective adj p ** c ; - - complAdj : AdjCompl -> NounPhrase -> AdjPhrase = \relie,jean -> - {s = \\g,n => relie.s ! g ! n ++ relie.s2 ++ jean.s ! case2pform relie.c ; - p = False - } ; - - ---3 Modification of common nouns --- --- The two main functions of adjective are in predication ("Jean est jeune") --- and in modification ("un jeune homme"). Predication will be defined --- later, in the chapter on verbs. --- --- Modification must pay attention to pre- and post-noun --- adjectives: "jeune homme"; "homme intelligent". - - modCommNounPhrase : AdjPhrase -> CommNounPhrase -> CommNounPhrase = \bon,mec -> - {s = \\n => if_then_else Str bon.p - (bon.s ! mec.g ! n ++ mec.s ! n) - (mec.s ! n ++ bon.s ! mec.g ! n) ; - g = mec.g - } ; - ---2 Function expressions - --- A function expression is a common noun together with the --- preposition prefixed to its argument ("mère de x"). --- The type is analogous to two-place adjectives and transitive verbs. - - Function : Type = CommNounPhrase ** Complement ; - --- The application of a function gives, in the first place, a common noun: --- "mor/mödrar till Johan". From this, other rules of the resource grammar --- give noun phrases, such as "la mère de Jean", "les mères de Jean", --- "les mères de Jean et de Marie", and "la mère de Jean et de Marie" (the --- latter two corresponding to distributive and collective functions, --- respectively). Semantics will eventually tell when each --- of the readings is meaningful. - - appFunComm : Function -> NounPhrase -> CommNounPhrase = \mere,jean -> - noun2CommNounPhrase - {s = \\n => mere.s ! n ++ mere.s2 ++ jean.s ! case2pform mere.c ; - g = mere.g - } ; - --- It is possible to use a function word as a common noun; the semantics is --- often existential or indexical. - - funAsCommNounPhrase : Function -> CommNounPhrase = - noun2CommNounPhrase ; - --- The following is an aggregate corresponding to the original function application --- producing "ma mère" and "la mère de Jean". It does not appear in the --- resource grammar API any longer. - - appFun : Bool -> Function -> NounPhrase -> NounPhrase = \coll, mere, jean -> - let {n = jean.n ; g = mere.g ; nf = if_then_else Number coll Sg n} in - variants { - defNounPhrase nf (appFunComm mere jean) ; - npGenDet nf jean mere - } ; - - ---2 Verbs --- ---3 Verb phrases --- --- Unlike many other languages, verb phrases in Romance languages --- are not discontinuous. --- We use clitic parameters instead. --- --- (It is not quite sure, though, whether this --- will suffice in French for examples like "je n'*y* vais pas": one may want to --- add "y" to "ne vais pas" instead of "ne - pas" to "y vais".) --- --- So far we restrict the syntax to present-tense verbs, even though --- morphology has complete conjugations. - - VerbPhrase = {s : Gender => VF => Str} ; - - Verb = VerbPres ; - --- Predication is language-dependent in the negative case. - - predVerb : Bool -> VerbPres -> VerbPhrase = \b,aller -> - if_then_else VerbPhrase b - {s = \\_ => aller.s} - {s = \\_,v => negVerb (aller.s ! v)} ; - - negVerb : Str -> Str ; - --- Verb phrases can also be formed from adjectives ("est bon"), --- common nouns ("est un homme"), and noun phrases ("est Jean"). --- We need a copula, which is of course language-dependent. - - copula : Bool -> VF => Str ; - --- The third rule is overgenerating: "est chaque homme" has to be ruled out --- on semantic grounds. - - predAdjective : Bool -> AdjPhrase -> VerbPhrase = \b,bon -> - {s = \\g,v => copula b ! v ++ bon.s ! g ! nombreVerb v} ; - - predCommNoun : Bool -> CommNounPhrase -> VerbPhrase = \b,homme -> - {s = \\g,v => copula b ! v ++ indefNoun (nombreVerb v) homme} ; - - predNounPhrase : Bool -> NounPhrase -> VerbPhrase = \b,jean -> - {s = \\g,v => copula b ! v ++ jean.s ! stressed nominative} ; - - --- complement a verb with noun phrase and optional preposition - - TransVerb : Type = VerbPres ** Complement ; - - verbOfTransVerb : TransVerb -> VerbPres = \v -> {s = v.s} ; - complementOfTransVerb : TransVerb -> Complement = \v -> {s2 = v.s2 ; c = v.c} ; - - isNounPhraseClit : NounPhrase -> Bool = \n -> case n.c of { - Clit0 => False ; - _ => True - } ; - --- This function is language-dependent, because it uses the language-dependent --- type of case. - - isTransVerbClit : TransVerb -> Bool ; - - ---3 Transitive verbs --- --- Transitive verbs are verbs with a preposition for the complement, --- in analogy with two-place adjectives and functions. --- One might prefer to use the term "2-place verb", since --- "transitive" traditionally means that the inherent preposition is empty. --- Such a verb is one with a *direct object* - which may still be accusative, --- dative, or genitive. --- --- In complementation, we do need some dispatching of clitic types: --- "aime Jean" ; "n'aime pas Jean" ; "l'aime" ; "ne l'aime pas". --- More will be needed when we add ditransitive verbs. - - complTransVerb : Bool -> TransVerb -> NounPhrase -> VerbPhrase = \b,aime,jean -> - {s = \\g,w => ---- BUG: v gives stack overflow - let {Jean = jean.s ! (case2pform aime.c) ; Aime = aime.s ! w} in - if_then_else Str (andB (isNounPhraseClit jean) (isTransVerbClit aime)) - (posNeg b (Jean ++ Aime) []) - (posNeg b Aime Jean) - } ; - - mkTransVerb : Verb -> Preposition -> CaseA -> TransVerb = \v,p,c -> - v ** {s2 = p ; c = c} ; - - mkTransVerbPrep : Verb -> Preposition -> TransVerb = \passer,par -> - mkTransVerb passer par accusative ; - - mkTransVerbCas : Verb -> CaseA -> TransVerb = \penser,a -> - mkTransVerb penser [] a ; - - mkTransVerbDir : Verb -> TransVerb = \aimer -> - mkTransVerbCas aimer accusative ; - --- The following macro builds the "ne - pas" or "non" negation. The second --- string argument is used for the complement of a verb phrase. In Italian, --- one string argument would actually be enough. - - posNeg : Bool -> (verb, compl : Str) -> Str ; - - ---2 Adverbials --- --- Adverbials are not inflected (we ignore comparison, and treat --- compared adverbials as separate expressions; this could be done another way). --- --- (We should also take into account clitic ones, like "y", --- as well as the position: "est toujours heureux" / "est heureux à Paris".) - - Adverb : Type = SS ; - - adVerbPhrase : VerbPhrase -> Adverb -> VerbPhrase = \chante, bien -> - {s = \\g,v => chante.s ! g ! v ++ bien.s} ; - --- Adverbials are typically generated by prefixing prepositions. --- The rule for creating locative noun phrases by the preposition "dans" --- in French and "in" in Italian. This is of course shaky, since other --- prepositions may be preferred ("en", "à" ; "a", "su"). - - locativeNounPhrase : NounPhrase -> Adverb ; - --- This is a source of the "homme avec un téléscope" ambiguity, and may produce --- strange things, like "les voitures toujours". --- Semantics will have to make finer distinctions among adverbials. --- French moreover says "les voitures d'hier" rather than "les voitures hier". - - advCommNounPhrase : CommNounPhrase -> Adverb -> CommNounPhrase = \mec,aparis -> - {s = \\n => mec.s ! n ++ aparis.s ; - g = mec.g - } ; - ---2 Sentences --- --- Sentences depend on a *mode parameter* selecting between --- indicative and subjunctive forms. - - Sentence : Type = SS1 Mode ; - --- This is the traditional $S -> NP VP$ rule. It takes care of both --- mode and agreement. - - predVerbPhrase : NounPhrase -> VerbPhrase -> Sentence = \jean,dort -> - {s = \\m => jean.s ! unstressed nominative ++ - dort.s ! pgen2gen jean.g ! VFin m jean.n jean.p - } ; - - ---3 Sentence-complement verbs --- --- Sentence-complement verbs take sentences as complements. --- The mode of the complement depends on the verb, and can be different --- for positive and negative uses of the verb --- ("je crois qu'elle vient" -"je ne crois pas qu'elle vienne"), - - SentenceVerb : Type = VerbPres ** {mp, mn : Mode} ; - - complSentVerb : Bool -> SentenceVerb -> Sentence -> VerbPhrase = - \b,croire,jeanboit -> - let {m = if_then_else Mode b croire.mp croire.mn} in - {s = \\_,w => posNeg b (croire.s ! w) (embedConj ++ jeanboit.s ! m)} ; ----w - - verbSent : Verb -> Mode -> Mode -> SentenceVerb = \v,mp,mn -> - v ** {mp = mp ; mn = mn} ; - --- The embedding conjunction is language dependent. - - embedConj : Str ; - - ---2 Sentences missing noun phrases --- --- This is one instance of Gazdar's *slash categories*, corresponding to his --- $S/NP$. --- We cannot have - nor would we want to have - a productive slash-category former. --- Perhaps a handful more will be needed. --- --- Notice that the slash category has the same relation to sentences as --- transitive verbs have to verbs: it's like a *sentence taking a complement*. - - SentenceSlashNounPhrase = Sentence ** Complement ; - - slashTransVerb : Bool -> NounPhrase -> TransVerb -> SentenceSlashNounPhrase = - \b,jean,aimer -> - predVerbPhrase jean (predVerb b (verbOfTransVerb aimer)) ** - complementOfTransVerb aimer ; - - ---2 Relative pronouns and relative clauses --- --- Relative pronouns are inflected in --- gender, number, and case. They can also have an inherent case, --- but this case if 'variable' in the sense that it --- is sometimes just mediated from the correlate --- ("homme qui est bon"), sometimes inherent to the --- pronominal phrase itself ("homme dont la mère est bonne"). - -oper - - RelPron : Type = {s : RelFormA => Str ; g : RelGen} ; - RelClause : Type = {s : Mode => Gender => Number => Str} ; - - mkGenRel : RelGen -> Gender -> Gender = \rg,g -> case rg of { - RG gen => gen ; - _ => g - } ; - --- Simple relative pronouns ("qui", "dont", "par laquelle") --- have no inherent gender. - - identRelPron : RelPron ; - - composRelPron : Gender -> Number -> CaseA -> Str ; - --- Complex relative pronouns ("dont la mère") do have an inherent gender. - - funRelPron : Function -> RelPron -> RelPron ; - --- There are often variants, i.e. short and long forms --- ("que" - "lequel", "dont" -"duquel"), etc. - - allRelForms : RelPron -> Gender -> Number -> CaseA -> Str ; - --- Relative clauses can be formed from both verb phrases ("qui dort") and --- slash expressions ("que je vois", "dont je parle"). - - relVerbPhrase : RelPron -> VerbPhrase -> RelClause = \qui,dort -> - {s = \\m,g,n => allRelForms qui g n nominative ++ dort.s ! g ! VFin m n P3 - } ; - - relSlash : RelPron -> SentenceSlashNounPhrase -> RelClause = \dont,jeparle -> - {s = \\m,g,n => jeparle.s2 ++ allRelForms dont g n jeparle.c ++ jeparle.s ! m - } ; - --- A 'degenerate' relative clause is the one often used in mathematics, e.g. --- "nombre x tel que x soit pair". - - relSuch : Sentence -> RelClause = \A -> - {s = \\m,g,n => suchPron g n ++ embedConj ++ A.s ! m - } ; - - suchPron : Gender -> Number -> Str ; - --- The main use of relative clauses is to modify common nouns. --- The result is a common noun, out of which noun phrases can be formed --- by determiners. A comma is used before the relative clause. --- --- N.B. subjunctive relative clauses --- ("je cherche un mec qui sache chanter") must have another structure --- (unless common noun phrases are given a mode parameter...). - - modRelClause : CommNounPhrase -> RelClause -> CommNounPhrase = \mec,quidort -> - {s = \\n => mec.s ! n ++ quidort.s ! Ind ! mec.g ! n ; - g = mec.g - } ; - ---2 Interrogative pronouns --- --- If relative pronouns are adjective-like, interrogative pronouns are --- noun-phrase-like. We use a simplified type, since we don't need the possessive --- forms. --- --- N.B. "est-ce que", etc, will be added below --- when pronouns are used in direct questions. - - IntPron : Type = {s : CaseA => Str ; g : Gender ; n : Number} ; - --- In analogy with relative pronouns, we have a rule for applying a function --- to a relative pronoun to create a new one. - - funIntPron : Function -> IntPron -> IntPron = \mere,qui -> - {s = \\c => - artDef mere.g qui.n c ++ mere.s ! qui.n ++ mere.s2 ++ qui.s ! mere.c ; - g = mere.g ; - n = qui.n - } ; - --- There is a variety of simple interrogative pronouns: --- "quelle maison", "qui", "quoi". Their definitions are language-dependent. - - nounIntPron : Number -> CommNounPhrase -> IntPron ; - intPronWho : Number -> IntPron ; - intPronWhat : Number -> IntPron ; - ---2 Utterances - --- By utterances we mean whole phrases, such as --- 'can be used as moves in a language game': indicatives, questions, imperative, --- and one-word utterances. The rules are far from complete. --- --- N.B. we have not included rules for texts, which we find we cannot say much --- about on this level. In semantically rich GF grammars, texts, dialogues, etc, --- will of course play an important role as categories not reducible to utterances. --- An example is proof texts, whose semantics show a dependence between premises --- and conclusions. Another example is intersentential anaphora. - - Utterance = SS ; - - indicUtt : Sentence -> Utterance = \x -> ss (x.s ! Ind ++ ".") ; - interrogUtt : Question -> Utterance = \x -> ss (x.s ! DirQ ++ "?") ; - ---2 Questions --- --- Questions are either direct ("qui a pris la voiture") or indirect --- ("ce qui a pris la voiture"). - -param - QuestForm = DirQ | IndirQ ; - -oper - Question = SS1 QuestForm ; - - ---3 Yes-no questions --- --- Yes-no questions are used both independently ("Tu es fatigué?") --- and after interrogative adverbials ("Pourquoi tu es fatigué?"). --- It is economical to handle with these two cases by the one --- rule, $questVerbPhrase'$. The only difference is if "si" appears --- in the indirect form. --- --- N.B. the inversion variant ("Es-tu fatigué?") is missing, mainly because our --- verb morphology does not support the intervening "t" ("Marche-t-il?"). --- The leading "est-ce que" is recognized as a variant, and requires --- direct word order. - - questVerbPhrase : NounPhrase -> VerbPhrase -> Question ; - ---3 Wh-questions --- --- Wh-questions are of two kinds: ones that are like $NP - VP$ sentences, --- others that are line $S/NP - NP$ sentences. --- --- N.B. inversion variants and "est-ce que" are treated as above. - - intVerbPhrase : IntPron -> VerbPhrase -> Question ; - - intSlash : IntPron -> SentenceSlashNounPhrase -> Question ; - - ---3 Interrogative adverbials --- --- These adverbials will be defined in the lexicon: they include --- "quand", "où", "comment", "pourquoi", etc, which are all invariant one-word --- expressions. In addition, they can be formed by adding prepositions --- to interrogative pronouns, in the same way as adverbials are formed --- from noun phrases. --- --- N.B. inversion variants and "est-ce que" are treated as above. - - IntAdverb = SS ; - - questAdverbial : IntAdverb -> NounPhrase -> VerbPhrase -> Question ; - - ---2 Imperatives --- --- We only consider second-person imperatives. --- --- N.B. following the API, we don't distinguish between --- singular and plural "vous", nor between masculine and feminine. --- when forming utterances. --- --- TODO: clitics, Italian negated imperative. - - Imperative = {s : Gender => Number => Str} ; - - imperVerbPhrase : VerbPhrase -> Imperative = \dormir -> - {s = \\g,n => dormir.s ! g ! vImper n P2 - } ; - - imperUtterance : Number -> Imperative -> Utterance = \n,I -> - ss (I.s ! Masc ! n ++ "!") ; - - - ---2 Coordination --- --- Coordination is to some extent orthogonal to the rest of syntax, and --- has been treated in a generic way in the module $CO$ in the file --- $coordination.gf$. The overall structure is independent of category, --- but there can be differences in parameter dependencies. --- ---3 Conjunctions --- --- Coordinated phrases are built by using conjunctions, which are either --- simple ("et", "ou") or distributed ("et - et", "pu - ou"). - - Conjunction = CO.Conjunction ** {n : Number} ; - ConjunctionDistr = CO.ConjunctionDistr ** {n : Number} ; - ---3 Coordinating sentences --- --- We need a category of lists of sentences. It is a discontinuous --- category, the parts corresponding to 'init' and 'last' segments --- (rather than 'head' and 'tail', because we have to keep track of the slot between --- the last two elements of the list). A list has at least two elements. --- --- N.B. we don't have repetion of "que" in subordinate coordinated sentences. - - ListSentence : Type = {s1,s2 : Mode => Str} ; - - twoSentence : (_,_ : Sentence) -> ListSentence = - CO.twoTable Mode ; - - consSentence : ListSentence -> Sentence -> ListSentence = - CO.consTable Mode CO.comma ; - --- To coordinate a list of sentences by a simple conjunction, we place --- it between the last two elements; commas are put in the other slots, --- e.g. "Pierre fume, Jean boit et les autres regardsnt". - - conjunctSentence : Conjunction -> ListSentence -> Sentence = - CO.conjunctTable Mode ; - --- To coordinate a list of sentences by a distributed conjunction, we place --- the first part in front of the first element, the second --- part between the last two elements, and commas in the other slots. --- For sentences this is really not used. - - conjunctDistrSentence : ConjunctionDistr -> ListSentence -> Sentence = - CO.conjunctDistrTable Mode ; - ---3 Coordinating adjective phrases --- --- The structure is the same as for sentences. The result is a prefix adjective --- if and only if all elements are prefix. - - ListAdjPhrase : Type = - {s1,s2 : Gender => Number => Str ; p : Bool} ; - - twoAdjPhrase : (_,_ : AdjPhrase) -> ListAdjPhrase = \x,y -> - CO.twoTable2 Gender Number x y ** {p = andB x.p y.p} ; - - consAdjPhrase : ListAdjPhrase -> AdjPhrase -> ListAdjPhrase = \xs,x -> - CO.consTable2 Gender Number CO.comma xs x ** {p = andB xs.p x.p} ; - - conjunctAdjPhrase : Conjunction -> ListAdjPhrase -> AdjPhrase = \c,xs -> - CO.conjunctTable2 Gender Number c xs ** {p = xs.p} ; - - conjunctDistrAdjPhrase : ConjunctionDistr -> ListAdjPhrase -> AdjPhrase = \c,xs -> - CO.conjunctDistrTable2 Gender Number c xs ** {p = xs.p} ; - - ---3 Coordinating noun phrases --- --- The structure is the same as for sentences. The result is either always plural --- or plural if any of the components is, depending on the conjunction. --- The gender is masculine if any of the components is. A coordinated noun phrase --- cannot be clitic. - - ListNounPhrase : Type = - {s1,s2 : CaseA => Str ; g : PronGen ; n : Number ; p : Person} ; - - twoNounPhrase : (_,_ : NounPhrase) -> ListNounPhrase = \x,y -> - {s1 = \\c => x.s ! stressed c ; s2 = \\c => y.s ! stressed c} ** - {n = conjNumber x.n y.n ; g = conjGender x.g y.g ; p = conjPers x.p y.p} ; - - consNounPhrase : ListNounPhrase -> NounPhrase -> ListNounPhrase = \xs,x -> - {s1 = \\c => xs.s1 ! c ++ CO.comma ++ xs.s2 ! c ; - s2 = \\c => x.s ! stressed c} ** - {n = conjNumber xs.n x.n ; g = conjGender xs.g x.g ; p =conjPers xs.p x.p} ; - - conjunctNounPhrase : Conjunction -> ListNounPhrase -> NounPhrase = \co,xs -> - {s = \\c => xs.s1 ! pform2case c ++ co.s ++ xs.s2 ! pform2case c} ** - {n = conjNumber co.n xs.n ; g = xs.g ; p = xs.p ; c = Clit0 } ; - - conjunctDistrNounPhrase : ConjunctionDistr -> ListNounPhrase -> NounPhrase = - \co,xs -> - {s = \\c => co.s1++ xs.s1 ! pform2case c ++ co.s2 ++ xs.s2 ! pform2case c} ** - {n = conjNumber co.n xs.n ; g = xs.g ; p = xs.p ; c = Clit0} ; - --- We have to define a calculus of numbers of genders. For numbers, --- it is like the conjunction with $Pl$ corresponding to $False$. For genders, --- $Masc$ corresponds to $False$. - - conjNumber : Number -> Number -> Number = \m,n -> case of { - => Sg ; - _ => Pl - } ; - - conjGen : Gender -> Gender -> Gender = \m,n -> case of { - => Fem ; - _ => Masc - } ; - - conjGender : PronGen -> PronGen -> PronGen = \m,n -> case of { - => PGen Fem ; - _ => PNoGen - } ; - --- For persons, we go in the descending order: --- "moi et toi sommes forts", "lui ou toi es fort". --- This is not always quite clear. - - conjPers : Person -> Person -> Person = \p,q -> case of { - => P3 ; - => P1 ; - <_,P1> => P1 ; - _ => P2 - } ; - - - ---2 Subjunction --- --- Subjunctions ("si", "quand", etc) --- are a different way to combine sentences than conjunctions. --- The main clause can be a sentences, an imperatives, or a question, --- but the subjoined clause must be a sentence. - - Subjunction = SS ; - - subjunctSentence : Subjunction -> Sentence -> Sentence -> Sentence = \si,A,B -> - {s = \\m => subjunctVariants si A (B.s ! m) - } ; - - subjunctImperative : Subjunction -> Sentence -> Imperative -> Imperative = - \si,A,B -> - {s = \\g,n => subjunctVariants si A (B.s ! g ! n) - } ; - - subjunctQuestion : Subjunction -> Sentence -> Question -> Question = \si,A,B -> - {s = \\q => subjunctVariants si A (B.s ! q) - } ; - --- There are uniformly two variant word orders, e.g. --- "si tu fume je m'en vais" --- and "je m'en vais si tu fume". - - subjunctVariants : Subjunction -> Sentence -> Str -> Str = \si,A,B -> - let {As = A.s ! Ind} in - variants { - si.s ++ As ++ B ; - B ++ si.s ++ As - } ; - ---2 One-word utterances --- --- An utterance can consist of one phrase of almost any category, --- the limiting case being one-word utterances. These --- utterances are often (but not always) in what can be called the --- default form of a category, e.g. the nominative. --- This list is far from exhaustive. - - useNounPhrase : NounPhrase -> Utterance = \jean -> - postfixSS "." (defaultNounPhrase jean) ; - useCommonNounPhrase : Number -> CommNounPhrase -> Utterance = \n,mec -> - useNounPhrase (indefNounPhrase n mec) ; - - --- one-form variants - - defaultNounPhrase : NounPhrase -> SS = \jean -> - ss (jean.s ! stressed nominative) ; - - defaultQuestion : Question -> SS = \quiesttu -> - ss (quiesttu.s ! DirQ) ; - - defaultSentence : Sentence -> SS = \x -> ss (x.s ! Ind) ; - ------ moved from Types - - artDef : Gender -> Number -> CaseA -> Str ; - artIndef : Gender -> Number -> CaseA -> Str ; - genForms : Str -> Str -> Gender => Str ; - ------ moved from Res - - pronJe, pronTu, pronIl, pronElle, pronNous, pronVous, pronIls, pronElles : - Pronoun ; - chaqueDet, tousDet, quelDet, plupartDet : Determiner ; - - commentAdv, quandAdv, ouAdv, pourquoiAdv : Adverb ; - - etConj, ouConj : Conjunction ; - etetConj, ououConj : ConjunctionDistr ; - siSubj, quandSubj : Subjunction ; - - ouiPhr, noPhr : Utterance ; - -} diff --git a/grammars/resource/romance/TypesRomance.gf b/grammars/resource/romance/TypesRomance.gf deleted file mode 100644 index e15f453f6..000000000 --- a/grammars/resource/romance/TypesRomance.gf +++ /dev/null @@ -1,175 +0,0 @@ ---1 Romance Word Classes and Morphological Parameters --- --- This is a resource module for French and Italian morphology, defining the --- morphological parameters and parts of speech of Romance languages. --- It is used as the major part of language-specific type systems, --- defined in $types.Fra.gf$ and $types.Ita.gf$. The guiding principle has been --- to share as much as possible, which has two advantages: it saves work in --- encoding, and it shows how the languages are related. - -interface TypesRomance = { - ---2 Enumerated parameter types for morphology --- --- These types are the ones found in school grammars. --- Their parameter values are atomic. - -param - Number = Sg | Pl ; - Gender = Masc | Fem ; - Person = P1 | P2 | P3 ; - Mode = Ind | Con ; - Degree = Pos | Comp | Sup ; - --- The case must be made an abstract type, since it varies from language to --- language. The same concerns those parameter types that depend on case. --- Certain cases can however be defined. - -param - RelGen = RNoGen | RG Gender ; - -oper - CaseA : PType ; - NPFormA : PType ; - - nominative : CaseA ; - accusative : CaseA ; - genitive : CaseA ; - dative : CaseA ; - - stressed : CaseA -> NPFormA ; - unstressed : CaseA -> NPFormA ; - - RelFormA : PType ; - --- The genitive and dative cases are expressed by prepositions, except for --- clitic pronouns. The accusative case only makes a difference for pronouns. - --- Personal pronouns are the following type: - -oper - Pronoun : Type = { - s : NPFormA => Str ; - g : PronGen ; - n : Number ; - p : Person ; - c : ClitType - } ; - --- The following coercions are useful: - -oper - pform2case : NPFormA -> CaseA ; - case2pform : CaseA -> NPFormA ; - - prepCase : CaseA -> Str ; - - - adjCompLong : Adj -> AdjComp ; - - relPronForms : CaseA => Str ; - --- For abstraction and API compatibility, we define two synonyms: - -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 mostly hierarchical. The alternative is cross-products of --- simple parameters, but this cannot be always used since it overgenerates. --- - ---3 Common nouns --- --- Common nouns are inflected in number, and they have an inherent gender. - - CNom : Type = {s : Number => Str ; g : Gender} ; - ---3 Pronouns --- --- Pronouns are an example - the worst-case one of noun phrases, --- which are defined in $syntax.Ita.gf$. --- Their inflection tables has tonic and atonic forms, as well as --- the possessive forms, which are inflected like determiners. --- --- Example: "lui, de lui, à lui" - "il,le,lui" - "son,sa,ses". - --- Tonic forms are divided into four classes of clitic type. --- The first value is used for never-clitic noun phrases. --- This classification is incomplete, since we do not (yet) treat --- ditransitive verbs. --- --- Examples of each: "Giovanni" ; "io" ; "lui" ; "noi". - - param ClitType = Clit0 | Clit1 | Clit2 | Clit3 ; - --- Gender is not morphologically determined for first and second person pronouns. - - PronGen = PGen Gender | PNoGen ; - --- The following coercion is useful: - -oper - pgen2gen : PronGen -> Gender = \p -> case p of { - PGen g => g ; - PNoGen => variants {Masc ; Fem} --- the best we can do for je, tu, nous, vous - } ; - ---3 Adjectives --- --- Adjectives are inflected in gender and number. --- Comparative adjectives are moreover inflected in degree --- (which in French and Italian is usually syntactic, though). - - Adj : Type = {s : Gender => Number => Str} ; - AdjComp : Type = {s : Degree => Gender => Number => Str} ; - - ---3 Verbs --- --- In the current syntax, we use --- a reduced conjugation with only the present tense infinitive, --- indicative, subjunctive, and imperative forms. --- But our morphology has full Bescherelle conjunctions: --- so we use a coercion between full and reduced verbs. --- The full conjugations and the coercions are defined separately for French --- and Italian, since they are not identical. The differences are mostly due --- to Bescherelle structuring the forms in different groups; the --- gerund and the present participles show real differences. - -param - VF = - VFin Mode Number Person - | VImper NumPersI - | VInfin - ; - - NumPersI = SgP2 | PlP1 | PlP2 ; - --- It is sometimes useful to derive the number of a verb form. - -oper - nombreVerb : VF -> Number = \v -> case v of { - VFin _ n _ => n ; - _ => singular --- - } ; - --- The imperative forms depend on number and person. - - vImper : Number -> Person -> VF = \n,p -> case of { - => VImper SgP2 ; - => VImper PlP1 ; - => VImper PlP2 ; - _ => VInfin - } ; - - Verbum : Type ; - - VerbPres : Type = {s : VF => Str} ; - - verbPres : Verbum -> VerbPres ; -} diff --git a/grammars/resource/russian/DatabaseRus.gf b/grammars/resource/russian/DatabaseRus.gf deleted file mode 100644 index 289e002a1..000000000 --- a/grammars/resource/russian/DatabaseRus.gf +++ /dev/null @@ -1,61 +0,0 @@ -concrete DatabaseRus of Database = open Prelude,Syntax,English,Predication,Paradigms in { - -flags lexer=text ; unlexer=text ; coding=utf8 ; - -lincat - Phras = SS1 Bool ; -- long or short form - Subject = NP ; - Noun = CN ; - Property = AP ; - Comparison = AdjDeg ; - Relation = Adj2 ; - Feature = Fun ; - Value = NP ; - Name = ProperName ; - -lin - LongForm sent = ss (sent.s ! True ++ "?") ; - ShortForm sent = ss (sent.s ! False ++ "?") ; - -oper - mkSent : SS -> SS -> SS1 Bool = \long, short -> - {s = table {b => if_then_else Str b long.s short.s}} ; - - mkSentPrel : Str -> SS -> SS1 Bool = \prel, matter -> - mkSent (ss (prel ++ matter.s)) matter ; - - mkSentSame : SS -> SS1 Bool = \s -> - mkSent s s ; - -lin - WhichAre A B = mkSent (defaultQuestion (IntVP (NounIPMany A) (PosA B))) - (defaultNounPhrase (IndefManyNP (ModAdj B A))) ; - - IsIt Q A = mkSentSame (defaultQuestion (QuestVP Q (PosA A))) ; - - MoreThan = ComparAdjP ; - TheMost = SuperlNP ; - Relatively C _ = PositAdjP C ; - - RelatedTo = ComplAdj ; - - FeatureOf = appFun1 ; - ValueOf F V = appFun1 F (UsePN V) ; - - WithProperty A B = ModAdj B A ; - - Individual = UsePN ; - - AllN = DetNP AllDet ; - MostN = DetNP MostDet ; - EveryN = DetNP EveryDet ; - --- only these are language-dependent - - Any = detNounPhrase anyPlDet ; --- in the sense "some", not "all" - - IsThere A = mkSentPrel ["еÑть ли"] (defaultNounPhrase (IndefOneNP A)) ; - AreThere A = mkSentPrel ["еÑть ли"] (defaultNounPhrase (IndefManyNP A)) ; - - WhatIs V = mkSentPrel ["какой"] (defaultNounPhrase V) ; -}; diff --git a/grammars/resource/russian/Morpho.gf b/grammars/resource/russian/Morpho.gf deleted file mode 100644 index 9e48e86e6..000000000 --- a/grammars/resource/russian/Morpho.gf +++ /dev/null @@ -1,1027 +0,0 @@ ---1 A Simple Russian Resource Morphology --- --- Aarne Ranta, Janna Khegai 2003 --- --- This resource morphology contains definitions of the lexical entries --- needed in the resource syntax. --- It moreover contains copies of the most usual inflectional patterns. --- --- We use the parameter types and word classes defined for morphology. --- --- Note: mkPassive operation is at the moment incorrect. Low-level ending-analysis --- is needed to fix the operation. - -resource Morpho = Types ** open (Predef=Predef), Prelude in { -flags coding=utf8 ; - ---2 Personal (together with possesive) pronouns. -oper pronYa: Pronoun = - { s = table { - PF Nom _ NonPoss => "Ñ" ; - PF Gen _ NonPoss => "менÑ" ; - PF Dat _ NonPoss => "мне" ; - PF Acc _ NonPoss => "менÑ" ; - PF Inst _ NonPoss => "мной" ; - PF Prepos _ NonPoss => "мне" ; - PF Nom _ (Poss (ASg Masc)) => "мой" ; - PF Gen _ (Poss (ASg Masc)) => "моего" ; - PF Dat _ (Poss (ASg Masc)) => "моему" ; - PF Acc _ (Poss (ASg Masc)) => "моего" ; - PF Inst _ (Poss (ASg Masc)) => "моим" ; - PF Prepos _ (Poss (ASg Masc)) => "моём" ; - PF Nom _ (Poss (ASg Fem)) => "моÑ" ; - PF Gen _ (Poss (ASg Fem)) => "моей" ; - PF Dat _ (Poss (ASg Fem)) => "моей" ; - PF Acc _ (Poss (ASg Fem)) => "мою" ; - PF Inst _ (Poss (ASg Fem)) => "моею" ; - PF Prepos _ (Poss (ASg Fem)) => "моей" ; - PF Nom _ (Poss (ASg Neut)) => "моё" ; - PF Gen _ (Poss (ASg Neut)) => "моего" ; - PF Dat _ (Poss (ASg Neut)) => "моему" ; - PF Acc _ (Poss (ASg Neut)) => "моё" ; - PF Inst _ (Poss (ASg Neut)) => "моим" ; - PF Prepos _ (Poss (ASg Neut)) => "моём" ; - PF Nom _ (Poss APl) => "мои" ; - PF Gen _ (Poss APl)=> "моих" ; - PF Dat _ (Poss APl) => "моим" ; - PF Acc _ (Poss APl) => "моих" ; - PF Inst _ (Poss APl) => "моими" ; - PF Prepos _ (Poss APl) => "моих" - } ; - g = PNoGen ; - n = Sg ; - p = P1 ; - pron = True - } ; - -oper pronTu: Pronoun = - { s = table { - PF Nom _ NonPoss => "ты" ; - PF Gen _ NonPoss => "тебÑ" ; - PF Dat _ NonPoss => "тебе" ; - PF Acc _ NonPoss => "тебÑ" ; - PF Inst _ NonPoss => "тобой" ; - PF Prepos _ NonPoss => ["о тебе"] ; - PF Nom _ (Poss (ASg Masc)) => "твой" ; - PF Gen _ (Poss (ASg Masc)) => "твоего" ; - PF Dat _ (Poss (ASg Masc)) => "твоему" ; - PF Acc _ (Poss (ASg Masc)) => "твоего" ; - PF Inst _ (Poss (ASg Masc)) => "твоим" ; - PF Prepos _ (Poss (ASg Masc)) => "твоём" ; - PF Nom _ (Poss (ASg Fem)) => "твоÑ" ; - PF Gen _ (Poss (ASg Fem)) => "твоей" ; - PF Dat _ (Poss (ASg Fem)) => "твоей" ; - PF Acc _ (Poss (ASg Fem)) => "твою" ; - PF Inst _ (Poss (ASg Fem)) => "твоею" ; - PF Prepos _ (Poss (ASg Fem)) => "твоей" ; - PF Nom _ (Poss (ASg Neut)) => "твоё" ; - PF Gen _ (Poss (ASg Neut)) => "твоего" ; - PF Dat _ (Poss (ASg Neut)) => "твоему" ; - PF Acc _ (Poss (ASg Neut)) => "твоё" ; - PF Inst _ (Poss (ASg Neut)) => "твоим" ; - PF Prepos _ (Poss (ASg Neut)) => "твоём" ; - PF Nom _ (Poss APl) => "твои" ; - PF Gen _ (Poss APl)=> "твоих" ; - PF Dat _ (Poss APl) => "твоим" ; - PF Acc _ (Poss APl) => "твоих" ; - PF Inst _ (Poss APl) => "твоими" ; - PF Prepos _ (Poss APl) => "твоих" - } ; - g = PNoGen ; - n = Sg ; - p = P2 ; - pron = True - } ; - -oper pronOn: Pronoun = - { s = table { - PF Nom _ NonPoss => "он" ; - PF Gen No NonPoss => "его" ; - PF Gen Yes NonPoss => "него" ; - PF Dat No NonPoss => "ему" ; - PF Dat Yes NonPoss => "нему" ; - PF Acc No NonPoss => "его" ; - PF Acc Yes NonPoss => "него" ; - PF Inst No NonPoss => "им" ; - PF Inst Yes NonPoss => "ним" ; - PF Prepos _ NonPoss => ["о нем"] ; - PF _ _ (Poss _) => "его" - } ; - g = PGen Masc ; - n = Sg ; - p = P3 ; - pron = True - } ; - -oper pronOna: Pronoun = - { s = table { - PF Nom _ NonPoss => "она" ; - PF Gen No NonPoss => "её" ; - PF Gen Yes NonPoss => "неё" ; - PF Dat No NonPoss => "ей" ; - PF Dat Yes NonPoss => "ней" ; - PF Acc No NonPoss => "её" ; - PF Acc Yes NonPoss => "неё" ; - PF Inst No NonPoss => "ей" ; - PF Inst Yes NonPoss => "ней" ; - PF Prepos _ NonPoss => ["о ней"] ; - PF _ _ (Poss _ ) => "её" - - } ; - g = PGen Fem ; - n = Sg ; - p = P3 ; - pron = True - } ; - -oper pronMu: Pronoun = - { s = table { - PF Nom _ NonPoss => "мы" ; - PF Gen _ NonPoss => "наÑ" ; - PF Dat _ NonPoss => "нам" ; - PF Acc _ NonPoss => "наÑ" ; - PF Inst _ NonPoss => "нами" ; - PF Prepos _ NonPoss => ["о наÑ"] ; - PF Nom _ ((Poss (ASg Masc))) => "наш" ; - PF Gen _ (Poss (ASg Masc)) => "нашего" ; - PF Dat _ ((Poss (ASg Masc))) => "нашему" ; - PF Acc _ ((Poss (ASg Masc))) => "нашего" ; - PF Inst _ (Poss (ASg Masc)) => "нашим" ; - PF Prepos _ (Poss (ASg Masc)) => "нашем" ; - PF Nom _ (Poss (ASg Fem)) => "наша" ; - PF Gen _ (Poss (ASg Fem)) => "нашей" ; - PF Dat _ (Poss (ASg Fem)) => "нашей" ; - PF Acc _ (Poss (ASg Fem)) => "нашу" ; - PF Inst _ (Poss (ASg Fem)) => "нашею" ; - PF Prepos _ (Poss (ASg Fem)) => "нашей" ; - PF Nom _ (Poss (ASg Neut)) => "наше" ; - PF Gen _ (Poss (ASg Neut)) => "нашего" ; - PF Dat _ (Poss (ASg Neut)) => "нашему" ; - PF Acc _ (Poss (ASg Neut)) => "наше" ; - PF Inst _ (Poss (ASg Neut)) => "нашим" ; - PF Prepos _ (Poss (ASg Neut)) => "нашем" ; - PF Nom _ (Poss APl) => "наши" ; - PF Gen _ (Poss APl)=> "наших" ; - PF Dat _ (Poss APl) => "нашим" ; - PF Acc _ (Poss APl) => "наших" ; - PF Inst _ (Poss APl) => "нашими" ; - PF Prepos _ (Poss APl) => "наших" - }; - g = PNoGen ; - n = Pl ; - p = P1 ; - pron = True - } ; - -oper pronVu: Pronoun = - { s = table { - PF Nom _ NonPoss => "вы" ; - PF Gen _ NonPoss => "ваÑ" ; - PF Dat _ NonPoss => "вам" ; - PF Acc _ NonPoss => "ваÑ" ; - PF Inst _ NonPoss => "вами" ; - PF Prepos _ NonPoss => "ваÑ" ; - PF Nom _ (Poss (ASg Masc)) => "ваш" ; - PF Gen _ (Poss (ASg Masc)) => "вашего" ; - PF Dat _ (Poss (ASg Masc)) => "вашему" ; - PF Acc _ (Poss (ASg Masc)) => "вашего" ; - PF Inst _ (Poss (ASg Masc)) => "вашим" ; - PF Prepos _ (Poss (ASg Masc)) => "вашем" ; - PF Nom _ (Poss (ASg Fem)) => "ваша" ; - PF Gen _ (Poss (ASg Fem)) => "вашей" ; - PF Dat _ (Poss (ASg Fem)) => "вашей" ; - PF Acc _ (Poss (ASg Fem)) => "вашу" ; - PF Inst _ (Poss (ASg Fem)) => "вашею" ; - PF Prepos _ (Poss (ASg Fem)) => "вашей" ; - PF Nom _ (Poss (ASg Neut)) => "ваше" ; - PF Gen _ (Poss (ASg Neut)) => "вашего" ; - PF Dat _ (Poss (ASg Neut)) => "вашему" ; - PF Acc _ (Poss (ASg Neut)) => "ваше" ; - PF Inst _ (Poss (ASg Neut)) => "вашим" ; - PF Prepos _ (Poss (ASg Neut)) => "вашем" ; - PF Nom _ (Poss APl) => "ваши" ; - PF Gen _ (Poss APl)=> "ваших" ; - PF Dat _ (Poss APl) => "вашим" ; - PF Acc _ (Poss APl) => "ваших" ; - PF Inst _ (Poss APl) => "вашими" ; - PF Prepos _ (Poss APl) => "ваших" - }; - g = PNoGen ; - n = Pl ; - p = P2 ; - pron = True - } ; - -oper pronOni: Pronoun = - { s = table { - PF Nom _ NonPoss => "они" ; - PF Gen No NonPoss => "их" ; - PF Gen Yes NonPoss => "них" ; - PF Dat No NonPoss => "им" ; - PF Dat Yes NonPoss => "ним" ; - PF Acc No NonPoss => "их" ; - PF Acc Yes NonPoss => "них" ; - PF Inst No NonPoss => "ими" ; - PF Inst Yes NonPoss => "ними" ; - PF Prepos _ NonPoss => ["о них"] ; - PF _ _ (Poss _) => "их" - } ; - g = PNoGen ; - n = Pl ; - p = P3 ; - pron = True - } ; - ---2 Nouns - --- Help type SubstFormDecl is introduced to reduce repetition in --- the declination definitions. It allows us to define a declination type, --- namely, the String component "s" of the CommNoun type --- without any reference to the Gender parameter "g". - -oper SubstFormDecl = SS1 SubstForm ; - -oper muzhchina : CommNoun = (aEndAnimateDecl "мужчин") ** { g = Masc ; anim = Animate } ; -oper zhenchina : CommNoun = (aEndAnimateDecl "женщин") ** { g = Fem ; anim = Animate } ; -oper mama : CommNoun = (aEndAnimateDecl "мам")**{ g = Fem ; anim = Animate } ; -oper cena : CommNoun = (aEndAnimateDecl "цен") ** { g = Fem ; anim = Inanimate } ; - -oper aEndAnimateDecl: Str -> SubstFormDecl = \muzhchin -> -{s = table { - SF Sg Nom => muzhchin+"а" ; - SF Sg Gen => muzhchin+"Ñ‹" ; - SF Sg Dat => muzhchin+"е" ; - SF Sg Acc => muzhchin+"у" ; - SF Sg Inst => muzhchin+"ой" ; - SF Sg Prepos => muzhchin +"е" ; - SF Pl Nom => muzhchin +"Ñ‹" ; - SF Pl Gen => muzhchin ; - SF Pl Dat => muzhchin+"ам" ; - SF Pl Acc => muzhchin ; - SF Pl Inst => muzhchin+"ами" ; - SF Pl Prepos => muzhchin+"ах" } - } ; - -oper stomatolog : CommNoun = nullEndAnimateDecl "Ñтоматолог" ; -oper nullEndAnimateDecl: Str -> CommNoun = \stomatolog -> - {s = table - { SF Sg Nom => stomatolog ; - SF Sg Gen => stomatolog+"а" ; - SF Sg Dat => stomatolog+"у" ; - SF Sg Acc => stomatolog +"а" ; - SF Sg Inst => stomatolog+"ом" ; - SF Sg Prepos => stomatolog+"е" ; - SF Pl Nom => stomatolog+"и" ; - SF Pl Gen => stomatolog+"ов" ; - SF Pl Dat => stomatolog+"ам" ; - SF Pl Acc => stomatolog+"ов" ; - SF Pl Inst => stomatolog+"ами" ; - SF Pl Prepos => stomatolog+"ах" } ; - g = Masc ; anim = Animate - } ; - -oper gripp : CommNoun = nullEndInAnimateDecl1 "грипп" ; -oper bar : CommNoun = nullEndInAnimateDecl1 "бар" ; -oper telefon: CommNoun = nullEndInAnimateDecl1 "телефон" ; -oper restoran : CommNoun = nullEndInAnimateDecl1 "реÑторан" ; - --- Note: Plural form of the "грипп" (influenza) is a bit doubious --- However, according to http://starling.rinet.ru/morph.htm it exists. --- so we also keep it. -oper nullEndInAnimateDecl1: Str -> CommNoun = \gripp -> - {s = table - { SF Sg Nom => gripp ; - SF Sg Gen => gripp+"а" ; - SF Sg Dat => gripp+"у" ; - SF Sg Acc => gripp ; - SF Sg Inst => gripp+"ом" ; - SF Sg Prepos => gripp+"е" ; - SF Pl Nom => gripp+"Ñ‹" ; - SF Pl Gen => gripp+"ов" ; - SF Pl Dat => gripp+"ам" ; - SF Pl Acc => gripp +"Ñ‹"; - SF Pl Inst => gripp+"ами" ; - SF Pl Prepos => gripp+"ах" - } ; - g = Masc ; anim = Inanimate - - } ; - -oper adres: CommNoun = nullEndInAnimateDecl2 "адреÑ" ; -oper dom : CommNoun = nullEndInAnimateDecl2 "дом" ; -oper svet : CommNoun = nullEndInAnimateDecl2 "Ñвет" ; -oper nullEndInAnimateDecl2: Str -> CommNoun = \gripp -> - {s = table - { SF Sg Nom => gripp ; - SF Sg Gen => gripp+"а" ; - SF Sg Dat => gripp+"у" ; - SF Sg Acc => gripp ; - SF Sg Inst => gripp+"ом" ; - SF Sg Prepos => gripp+"е" ; - SF Pl Nom => gripp+"а" ; - SF Pl Gen => gripp+"ов" ; - SF Pl Dat => gripp+"ам" ; - SF Pl Acc => gripp +"а"; - SF Pl Inst => gripp+"ами" ; - SF Pl Prepos => gripp+"ах" - } ; - g = Masc ; anim = Inanimate - } ; - -oper obezbolivauchee : CommNoun = eeEndInAnimateDecl "обезболивающ" ; -oper eeEndInAnimateDecl: Str -> CommNoun = \obezbolivauch -> - { s = table - { SF Sg Nom => obezbolivauch +"ее"; - SF Sg Gen => obezbolivauch+"его" ; - SF Sg Dat => obezbolivauch+"ему" ; - SF Sg Acc => obezbolivauch +"ее"; - SF Sg Inst => obezbolivauch+"им" ; - SF Sg Prepos => obezbolivauch+"ем" ; - SF Pl Nom => obezbolivauch+"ие" ; - SF Pl Gen => obezbolivauch+"их" ; - SF Pl Dat => obezbolivauch+"им" ; - SF Pl Acc => obezbolivauch+"ие" ; - SF Pl Inst => obezbolivauch+"ими" ; - SF Pl Prepos => obezbolivauch+"их" - } ; - g = Neut ; anim = Inanimate - } ; - -oper proizvedenie : CommNoun = eEndInAnimateDecl "произведени" ; -oper eEndInAnimateDecl: Str -> CommNoun = \proizvedeni -> - { s = table - { SF Sg Nom => proizvedeni +"е"; - SF Sg Gen => proizvedeni+"Ñ" ; - SF Sg Dat => proizvedeni+"ÑŽ" ; - SF Sg Acc => proizvedeni +"е"; - SF Sg Inst => proizvedeni+"ем" ; - SF Sg Prepos => proizvedeni+"и" ; - SF Pl Nom => proizvedeni+"Ñ" ; - SF Pl Gen => proizvedeni+"й" ; - SF Pl Dat => proizvedeni+"Ñм" ; - SF Pl Acc => proizvedeni+"Ñ" ; - SF Pl Inst => proizvedeni+"Ñми" ; - SF Pl Prepos => proizvedeni+"ÑÑ…" - } ; - g = Neut ; anim = Inanimate - } ; -oper chislo : CommNoun = oEndInAnimateDecl "чиÑл" ; -oper oEndInAnimateDecl: Str -> CommNoun = \chisl -> - let { chis = Predef.tk 1 chisl ; ending = Predef.dp 3 chisl } in - oEndInAnimateDecl3 chisl (chis+"e"+ending) ; -oper oEndInAnimateDecl3: Str -> Str -> CommNoun = \chisl, chisel -> - { s = table - { SF Sg Nom => chisl +"о"; - SF Sg Gen => chisl+"а" ; - SF Sg Dat => chisl+"у" ; - SF Sg Acc => chisl +"о"; - SF Sg Inst => chisl+"ом" ; - SF Sg Prepos => chisl+"е" ; - SF Pl Nom => chisl+"а" ; - SF Pl Gen => chisel; - SF Pl Dat => chisl+"ам" ; - SF Pl Acc => chisl+"а" ; - SF Pl Inst => chisl+"ами" ; - SF Pl Prepos => chisl+"ах" - } ; - g = Neut ; anim = Inanimate - } ; - -oper malaria : CommNoun = i_yaEndDecl "малÑри" ; -oper i_yaEndDecl: Str -> CommNoun = \malar -> - { s = table - { SF Sg Nom => malar+"Ñ" ; - SF Sg Gen => malar+"и" ; - SF Sg Dat => malar+"и" ; - SF Sg Acc => malar+"ÑŽ" ; - SF Sg Inst => malar+"ей" ; - SF Sg Prepos => malar+"и" ; - SF Pl Nom => malar+"и" ; - SF Pl Gen => malar+"й" ; - SF Pl Dat => malar+"Ñм" ; - SF Pl Acc => malar+"и" ; - SF Pl Inst => malar+"Ñми" ; - SF Pl Prepos => malar+"ÑÑ…" - } ; - g = Fem ; anim = Inanimate - } ; - -oper bol : CommNoun = softSignEndDeclFem "бол" ; -oper nol : CommNoun = softSignEndDeclMasc "нол" ; -oper uroven : CommNoun = EN_softSignEndDeclMasc "уровен" ; -oper softSignEndDeclFem: Str -> CommNoun = \bol -> - {s = table - { SF Sg Nom => bol+"ÑŒ" ; - SF Sg Gen => bol+"и" ; - SF Sg Dat => bol+"и" ; - SF Sg Acc => bol+"ÑŒ" ; - - SF Sg Inst => bol+"ью" ; - SF Sg Prepos => bol+"и" ; - SF Pl Nom => bol+"и" ; - SF Pl Gen => bol+"ей" ; - SF Pl Dat => bol+"Ñм" ; - SF Pl Acc => bol+"и" ; - SF Pl Inst => bol+"Ñми" ; - SF Pl Prepos => bol+"ÑÑ…" - } ; - g = Fem ; anim = Inanimate - } ; -oper softSignEndDeclMasc: Str -> CommNoun = \nol -> - {s = table - { SF Sg Nom => nol+"ÑŒ" ; - SF Sg Gen => nol+"Ñ" ; - SF Sg Dat => nol+"ÑŽ" ; - SF Sg Acc => nol+"ÑŒ" ; - SF Sg Inst => nol+"ем" ; - SF Sg Prepos => nol+"е" ; - SF Pl Nom => nol+"и" ; - SF Pl Gen => nol+"ей" ; - SF Pl Dat => nol+"Ñм" ; - SF Pl Acc => nol+"и" ; - SF Pl Inst => nol+"Ñми" ; - SF Pl Prepos => nol+"ÑÑ…" - } ; - g = Masc ; anim = Inanimate - } ; - -oper EN_softSignEndDeclMasc: Str -> CommNoun = \rem -> - {s = table - { SF Sg Nom => rem+"ень" ; - SF Sg Gen => rem+"нÑ" ; - SF Sg Dat => rem+"ню" ; - SF Sg Acc => rem+"ень" ; - SF Sg Inst => rem+"нем" ; - SF Sg Prepos => rem+"не" ; - SF Pl Nom => rem+"ни" ; - SF Pl Gen => rem+"ней" ; - SF Pl Dat => rem+"нÑм" ; - SF Pl Acc => rem+"ни" ; - SF Pl Inst => rem+"нÑми" ; - SF Pl Prepos => rem+"нÑÑ…" - } ; - g = Masc ; anim = Inanimate - } ; - -oper noga : CommNoun = aEndG_K_KH_Decl "ног" ; -oper dvojka : CommNoun = aEndG_K_KH_Decl "двойк" ; -oper aEndG_K_KH_Decl: Str -> CommNoun = \nog -> -{ s = table { - SF Sg Nom => nog+"а" ; - SF Sg Gen => nog+"и" ; - SF Sg Dat => nog+"е" ; - SF Sg Acc => nog+"у" ; - SF Sg Inst => nog+"ой" ; - SF Sg Prepos => nog+"е" ; - SF Pl Nom => nog+"и" ; - SF Pl Gen => nog ; - SF Pl Dat => nog+"ам" ; - SF Pl Acc => nog+ "и" ; - SF Pl Inst => nog+"ами" ; - SF Pl Prepos => nog+"ах" - } ; - g = Fem ; anim = Inanimate -} ; - -oper golova : CommNoun = aEndInanimateDecl "голов" ; -oper mashina : CommNoun = aEndInanimateDecl "машин" ; -oper temperatura : CommNoun = aEndInanimateDecl "температур" ; -oper edinica : CommNoun = ej_aEndInanimateDecl "единиц" ; - -oper aEndInanimateDecl: Str -> CommNoun = \golov -> - { s = table - { SF Sg Nom => golov+"а" ; - SF Sg Gen => golov+"Ñ‹" ; - SF Sg Dat => golov+"е" ; - SF Sg Acc => golov+"у" ; - SF Sg Inst => golov+"ой" ; - SF Sg Prepos => golov+"е" ; - SF Pl Nom => golov+"Ñ‹" ; - SF Pl Gen => golov ; - SF Pl Dat => golov+"ам" ; - SF Pl Acc => golov+ "Ñ‹" ; - SF Pl Inst => golov+"ами" ; - SF Pl Prepos => golov+"ах" - } ; - g = Fem ; anim = Inanimate - } ; -oper ej_aEndInanimateDecl: Str -> CommNoun = \ediniz -> - { s = table - { SF Sg Nom => ediniz+"а" ; - SF Sg Gen => ediniz+"Ñ‹" ; - SF Sg Dat => ediniz+"е" ; - SF Sg Acc => ediniz+"у" ; - SF Sg Inst => ediniz+"ей" ; - SF Sg Prepos => ediniz+"е" ; - SF Pl Nom => ediniz+"Ñ‹" ; - SF Pl Gen => ediniz ; - SF Pl Dat => ediniz+"ам" ; - SF Pl Acc => ediniz+ "Ñ‹" ; - SF Pl Inst => ediniz+"ами" ; - SF Pl Prepos => ediniz+"ах" - } ; - g = Fem ; anim = Inanimate - } ; - - -oper dyadya : CommNoun = (yaEndAnimateDecl "дÑд") ** {g = Masc; anim = Animate} ; -oper yaEndAnimateDecl: Str -> SubstFormDecl = \nyan -> -{s = table { - SF Sg Nom => nyan + "Ñ" ; - SF Sg Gen => nyan + "и" ; - SF Sg Dat => nyan + "е" ; - SF Sg Acc => nyan + "ÑŽ" ; - SF Sg Inst => nyan + "ей" ; - SF Sg Prepos => nyan + "е" ; - SF Pl Nom => nyan + "и" ; - SF Pl Gen => nyan + "ей" ; - SF Pl Inst => nyan + "Ñми" ; - SF Pl Prepos => nyan + "ÑÑ…" ; - SF Pl Dat => nyan + "Ñм" ; - SF Pl Acc => nyan + "ей" - } - } ; - -oper oEnd_Decl: Str -> CommNoun = \bolshinstv -> -{ s = table { - SF Sg Nom => bolshinstv+"о" ; - SF Sg Gen => bolshinstv+"а" ; - SF Sg Dat => bolshinstv+"у" ; - SF Sg Acc => bolshinstv+"о" ; - SF Sg Inst => bolshinstv+"ом" ; - SF Sg Prepos => bolshinstv+"е" ; - SF Pl Nom => bolshinstv+"а" ; - SF Pl Gen => bolshinstv ; - SF Pl Dat => bolshinstv+"ам" ; - SF Pl Acc => bolshinstv+ "а" ; - SF Pl Inst => bolshinstv+"ами" ; - SF Pl Prepos => bolshinstv+"ах" - } ; - g = Neut ; anim = Inanimate -} ; - -oper oEnd_SgDecl: Str -> CommNoun = \bolshinstv -> -{ s = table { - SF _ Nom => bolshinstv+"о" ; - SF _ Gen => bolshinstv+"а" ; - SF _ Dat => bolshinstv+"у" ; - SF _ Acc => bolshinstv+"о" ; - SF _ Inst => bolshinstv+"ом" ; - SF _ Prepos => bolshinstv+"е" - } ; - g = Neut ; anim = Inanimate -} ; - --- Note: Now we consider only the plural form of the pronoun "вÑе" (all) --- treated as an adjective (see AllDetPl definition). --- The meaning "entire" is not considered, which allows us to form --- the pronoun-adjective from the substantive form below: - -oper eEnd_Decl: Str -> CommNoun = \vs -> -{ s = table { - SF Sg Nom => vs+"е" ; - SF Sg Gen => vs+"ех" ; - SF Sg Dat => vs+"ем" ; - SF Sg Acc => vs+"ех" ; - SF Sg Inst => vs+"еми" ; - SF Sg Prepos => vs+"ех" ; - SF Pl Nom => vs+"е" ; - SF Pl Gen => vs +"ех"; - SF Pl Dat => vs+"ем" ; - SF Pl Acc => vs+ "ех" ; - SF Pl Inst => vs+"еми" ; - SF Pl Prepos => vs+"ех" - } ; - g = Neut ; anim = Inanimate -} ; - ---2 Adjectives - --- Type Adjective only has positive degree while AdjDegr type --- includes also comparative and superlative forms. --- The later entries can be converted into the former using --- "extAdjective" operation defined in the syntax module --- and vice verca using "mkAdjDeg" operation. - -oper - kazhdujDet: Adjective = uy_j_EndDecl "кажд" ; - samuj: Adjective = uy_j_EndDecl "Ñам" ; - lubojDet: Adjective = uy_oj_EndDecl "люб" ; - kotorujDet: Adjective = uy_j_EndDecl "котор"; - takoj: Adjective = i_oj_EndDecl "так" []; - kakojNibudDet: Adjective = i_oj_EndDecl "как" "-нибудь"; - kakojDet: Adjective = i_oj_EndDecl "как" []; - bolshinstvoDet: Adjective = extAdjFromSubst (oEnd_SgDecl "большинÑтв"); - vseDetPl: Adjective = extAdjFromSubst (eEnd_Decl "вÑ") ; - extAdjFromSubst: CommNoun -> Adjective = \ vse -> - {s = \\af => vse.s ! SF (numAF af) (caseAF af) } ; - - -oper mkAdjDeg: Adjective -> Str -> AdjDegr = \adj, s -> - { s = table - { - Pos => adj.s ; - Comp => \\af => s ; - Super => \\af => samuj.s !af ++ adj.s ! af - } - }; -oper uzhasnuj: AdjDegr = mkAdjDeg (uy_j_EndDecl "ужаÑн") "ужаÑнее"; -oper deshevuj: AdjDegr = mkAdjDeg (uy_j_EndDecl "дешев") "дешевле"; -oper staruj: AdjDegr = mkAdjDeg (uy_j_EndDecl "Ñтар") "Ñтарше"; -oper uy_j_EndDecl : Str -> Adjective = \s ->{s = table { - AF Nom _ (ASg Masc) => s+"ый"; - AF Nom _ (ASg Fem) => s+"аÑ"; - AF Nom _ (ASg Neut) => s+"ое"; - AF Nom _ APl => s+"ые"; - AF Acc Inanimate (ASg Masc) => s+"ый"; - AF Acc Animate (ASg Masc) => s+"ого"; - AF Acc _ (ASg Fem) => s+"ую"; - AF Acc _ (ASg Neut) => s+"ое"; - AF Acc Inanimate APl => s+"ые"; - AF Acc Animate APl => s+"ых"; - AF Gen _ (ASg Masc) => s+"ого"; - AF Gen _ (ASg Fem) => s+"ой"; - AF Gen _ (ASg Neut) => s+"ого"; - AF Gen _ APl => s+"ых"; - AF Inst _ (ASg Masc) => s+"ым"; - AF Inst _ (ASg Fem) => s+"ой"; - AF Inst _ (ASg Neut) => s+"ым"; - AF Inst _ APl => s+"ыми"; - AF Dat _ (ASg Masc) => s+"ому"; - AF Dat _ (ASg Fem) => s+"ой"; - AF Dat _ (ASg Neut) => s+"ому"; - AF Dat _ APl => s+"ым"; - AF Prepos _ (ASg Masc) => s+"ом"; - AF Prepos _ (ASg Fem) => s+"ой"; - AF Prepos _ (ASg Neut) => s+"ом"; - AF Prepos _ APl => s+"ых" - } - } ; -oper indijskij: Adjective = ij_EndK_G_KH_Decl "индийÑк" ; -oper francuzskij: Adjective = ij_EndK_G_KH_Decl "французÑк" ; -oper russkij: Adjective = ij_EndK_G_KH_Decl "руÑÑк" ; -oper italyanskij: Adjective = ij_EndK_G_KH_Decl "итальÑнÑк" ; -oper yaponskij: Adjective = ij_EndK_G_KH_Decl "ÑпонÑк" ; -oper malenkij: AdjDegr = mkAdjDeg (ij_EndK_G_KH_Decl "маленьк") "меньше" ; -oper vusokij: AdjDegr = mkAdjDeg (ij_EndK_G_KH_Decl "выÑок") "выше"; -oper ij_EndK_G_KH_Decl : Str -> Adjective = \s ->{s = table { - AF Nom _ (ASg Masc) => s+"ий"; - AF Nom _ (ASg Fem) => s+"аÑ"; - AF Nom _ (ASg Neut) => s+"ое"; - AF Nom _ APl => s+"ие"; - AF Acc Animate (ASg Masc) => s+"ого"; - AF Acc Inanimate (ASg Masc) => s+"ий"; - AF Acc _ (ASg Fem) => s+"ую"; - AF Acc _ (ASg Neut) => s+"ое"; - AF Acc Animate APl => s+"их"; - AF Acc Inanimate APl => s+"ие"; - AF Gen _ (ASg Masc) => s+"ого"; - AF Gen _ (ASg Fem) => s+"ой"; - AF Gen _ (ASg Neut) => s+"ого"; - AF Gen _ APl => s+"их"; - AF Inst _ (ASg Masc) => s+"им"; - AF Inst _ (ASg Fem) => s+"ой"; - AF Inst _ (ASg Neut) => s+"им"; - AF Inst _ APl => s+"ими"; - AF Dat _ (ASg Masc) => s+"ому"; - AF Dat _ (ASg Fem) => s+"ой"; - AF Dat _ (ASg Neut) => s+"ому"; - AF Dat _ APl => s+"им"; - AF Prepos _ (ASg Masc) => s+"ом"; - AF Prepos _ (ASg Fem) => s+"ой"; - AF Prepos _ (ASg Neut) => s+"ом"; - AF Prepos _ APl => s+"их" - } - } ; - -oper bolshoj: AdjDegr = mkAdjDeg (i_oj_EndDecl "больш" []) "больше"; -oper dorogoj: AdjDegr = mkAdjDeg (i_oj_EndDecl "дорог" []) "дороже"; -oper i_oj_EndDecl : Str -> Str -> Adjective = \s, chastica ->{s = table { - AF Nom _ (ASg Masc) => s+"ой" + chastica ; - AF Nom _ (ASg Fem) => s+"аÑ"+ chastica ; - AF Nom _ (ASg Neut) => s+"ое"+ chastica ; - AF Nom _ APl => s+"ие"+ chastica ; - AF Acc Animate (ASg Masc) => s+"ого"+ chastica ; - AF Acc Inanimate (ASg Masc) => s+"ое"+ chastica ; - AF Acc _ (ASg Fem) => s+"ую"+ chastica ; - AF Acc _ (ASg Neut) => s+"ое"+ chastica ; - AF Acc Animate APl => s+"их"+ chastica ; - AF Acc Inanimate APl => s+"ие"+ chastica ; - AF Gen _ (ASg Masc) => s+"ого"+ chastica ; - AF Gen _ (ASg Fem) => s+"ой"+ chastica ; - AF Gen _ (ASg Neut) => s+"ого"+ chastica ; - AF Gen _ APl => s+"их"+ chastica ; - AF Inst _ (ASg Masc) => s+"им"+ chastica ; - AF Inst _ (ASg Fem) => s+"ой"+ chastica ; - AF Inst _ (ASg Neut) => s+"им"+ chastica ; - AF Inst _ APl => s+"ими"+ chastica ; - AF Dat _ (ASg Masc) => s+"ому"+ chastica ; - AF Dat _ (ASg Fem) => s+"ой"+ chastica ; - AF Dat _ (ASg Neut) => s+"ому"+ chastica ; - AF Dat _ APl => s+"им"+ chastica ; - AF Prepos _ (ASg Masc) => s+"ом"+ chastica ; - AF Prepos _ (ASg Fem) => s+"ой"+ chastica ; - AF Prepos _ (ASg Neut) => s+"ом"+ chastica ; - AF Prepos _ APl => s+"их" + chastica - } - } ; -oper molodoj: AdjDegr = mkAdjDeg (uy_oj_EndDecl "молод") "моложе"; -oper uy_oj_EndDecl : Str -> Adjective = \s ->{s = table { - AF Nom _ (ASg Masc) => s+"ой"; - AF Nom _ (ASg Fem) => s+"аÑ"; - AF Nom _ (ASg Neut) => s+"ое"; - AF Nom _ APl => s+"ые"; - AF Acc Animate (ASg Masc) => s+"ого"; - AF Acc Inanimate (ASg Masc) => s+"ой"; - AF Acc _ (ASg Fem) => s+"ую"; - AF Acc _ (ASg Neut) => s+"ое"; - AF Acc Animate APl => s+"ых"; - AF Acc Inanimate APl => s+"ые"; - AF Gen _ (ASg Masc) => s+"ого"; - AF Gen _ (ASg Fem) => s+"ой"; - AF Gen _ (ASg Neut) => s+"ого"; - AF Gen _ APl => s+"ых"; - AF Inst _ (ASg Masc) => s+"ым"; - AF Inst _ (ASg Fem) => s+"ой"; - AF Inst _ (ASg Neut) => s+"ым"; - AF Inst _ APl => s+"ыми"; - AF Dat _ (ASg Masc) => s+"ому"; - AF Dat _ (ASg Fem) => s+"ой"; - AF Dat _ (ASg Neut) => s+"ому"; - AF Dat _ APl => s+"ым"; - AF Prepos _ (ASg Masc) => s+"ом"; - AF Prepos _ (ASg Fem) => s+"ой"; - AF Prepos _ (ASg Neut) => s+"ом"; - AF Prepos _ APl => s+"ых" - } - } ; -oper prostuzhen: Adjective = shortDecl1 "проÑтужен" ; -oper beremenen: Adjective = shortDecl "беремен" ; -oper need: Adjective = shortDecl "нуж" ; -oper shortDecl1 : Str -> Adjective = \s ->{s = table { - AF _ _ (ASg Masc) => s; - AF _ _ (ASg Fem) => s+"а"; - AF _ _ (ASg Neut) => s+"о"; - AF _ _ APl => s+"Ñ‹" - } - } ; -oper shortDecl : Str -> Adjective = \s ->{s = table { - AF _ _ (ASg Masc) => s +"ен"; - AF _ _ (ASg Fem) => s+"на"; - AF _ _ (ASg Neut) => s+"но"; - AF _ _ APl => s+"ны" - } } ; - --- 2 Adverbs - -oper vsegda: Adverb = { s = "вÑегда" } ; -oper chorosho: Adverb = { s = "хорошо" } ; - --- 2 Verbs - --- Dummy verbum "have" that corresponds to the phrases like --- "I have a headache" in English. The corresponding sentence --- in Russian doesn't contain a verb: - -oper have: Verbum = {s=\\ vf => "-" ; asp = Imperfective} ; - --- There are two common conjugations --- (according to the number and the person of the subject) --- patterns in the present tense in the indicative mood. - -param Conjugation = First | Second ; - ---3 First conjugation (in Present) verbs : - -oper verbGulyat : Verbum = verbDecl Imperfective First "гулÑ" "ÑŽ" "гулÑл" "гулÑй" "гулÑть"; -oper verbVkluchat : Verbum = verbDecl Imperfective First "включа" "ÑŽ" "включал" "включай" "включать"; -oper verbVukluchat : Verbum = verbDecl Imperfective First "выключа" "ÑŽ" "выключал" "выключай" "выключать"; -oper verbZhdat : Verbum = verbDecl Imperfective First "жд" "у" "ждал" "жди" "ждать" ; -oper verbBegat : Verbum = verbDecl Imperfective First "бега" "ÑŽ" "бегал" "бегай" "бегать"; -oper verbPrinimat : Verbum = verbDecl Imperfective First "принима" "ÑŽ" "принимал" "принимай" "принимать"; -oper verbDokazuvat : Verbum = verbDecl Imperfective First "доказыва" "ÑŽ" "доказывал" "доказывай" "доказывать"; -oper verbOtpravlyat : Verbum = verbDecl Imperfective First "отправлÑ" "ÑŽ" "отправлÑл" "отправлÑй" "отправлÑть"; -oper verbSlomat : Verbum = verbDecl Perfective First "Ñлома" "ÑŽ" "Ñломал" "Ñломай" "Ñломать"; -oper verbByut : Verbum = verbDecl Perfective First "буд" "у" "был" "будь" "быть"; - ---3 Second conjugation (in Present) verbs : - -oper verbLubit : Verbum = verbDecl Imperfective Second "люб" "лю" "любил" "люби" "любить"; -oper verbGovorit : Verbum = verbDecl Imperfective Second "говор" "ÑŽ" "говорил" "говори" "говорить"; - oper verbBolet_2 : Verbum = verbDecl Imperfective Second "бол" "ÑŽ" "болел" "боли" "болеть"; -oper verbPoranit : Verbum = verbDecl Perfective Second "поран" "ÑŽ" "поранил" "порань" "поранить"; - --- To reduces the redundancies in the definitions --- we introduce some intermediate types, --- so that the full type can be described as a combination --- of the intermediate types. For example "AspectVoice" --- is a type for defining a pattern for a particular --- aspect and voice. - -oper AspectVoice: Type = { s : VerbConj => Str ; asp: Aspect } ; - --- "PresentVerb" takes care of the present tense conjugation. - -param PresentVF = PRF Number Person ; -oper PresentVerb : Type = PresentVF => Str ; - -oper presentConj2: Str -> Str -> PresentVerb = \del, sgP1End -> - table { - PRF Sg P1 => del+ sgP1End ; - PRF Sg P2 => del+ "ишь" ; - PRF Sg P3 => del+ "ит" ; - PRF Pl P1 => del+ "им" ; - PRF Pl P2 => del+ "ите'" ; - PRF Pl P3 => del+ "ÑÑ‚" - }; -oper presentConj1: Str -> Str -> PresentVerb = \del, sgP1End -> - table { - PRF Sg P1 => del+ sgP1End ; - PRF Sg P2 => del+ "ешь" ; - PRF Sg P3 => del+ "ет" ; - PRF Pl P1 => del+ "ем" ; - PRF Pl P2 => del+ "ете'" ; - PRF Pl P3 => del+ sgP1End + "Ñ‚" - }; - --- "PastVerb" takes care of the past tense conjugation. - -param PastVF = PSF GenNum ; -oper PastVerb : Type = PastVF => Str ; -oper pastConj: Str -> PastVerb = \del -> - table { - PSF (ASg Masc) => del ; - PSF (ASg Fem) => del +"а" ; - PSF (ASg Neut) => del+"о" ; - PSF APl => del+ "и" - }; - --- "verbDecl" sorts out verbs according to the aspect and voice parameters. --- It produces the full conjugation table for a verb entry - -oper verbDecl: Aspect -> Conjugation -> Str -> Str -> Str -> Str ->Str -> Verbum = - \a, c, del, sgP1End, sgMascPast, imperSgP2, inf -> case a of -{ Perfective => case c of { - First => mkVerb (perfectiveActivePattern inf imperSgP2 (presentConj1 del sgP1End) (pastConj sgMascPast)) (pastConj sgMascPast); - Second => mkVerb (perfectiveActivePattern inf imperSgP2 (presentConj2 del sgP1End) (pastConj sgMascPast)) (pastConj sgMascPast) -} ; - Imperfective => case c of { - First => mkVerb (imperfectiveActivePattern inf imperSgP2 (presentConj1 del sgP1End) (pastConj sgMascPast)) (pastConj sgMascPast); - Second => mkVerb (imperfectiveActivePattern inf imperSgP2 (presentConj2 del sgP1End) (pastConj sgMascPast)) (pastConj sgMascPast) - } -}; - --- "mkVerb" produce the passive forms from --- the active forms using the "mkPassive" method. --- Passive is expressed in Russian by so called reflexive verbs, --- which are formed from the active form by suffixation. - - oper mkVerb : AspectVoice -> PastVerb -> Verbum = \av1, pv -> - { s = table { - VFORM Act vf => av1.s !vf; - VFORM Pass vf => (mkPassive av1 pv ).s ! vf - } ; - asp = av1.asp -}; - - vowels : Strs = strs { - "а" ; "е" ; "Ñ‘" ; "и" ; "о" ; "у" ; - "Ñ‹" ; "Ñ" ; "ÑŽ" ; "Ñ" - } ; - -oper mkPassive: AspectVoice -> PastVerb -> AspectVoice = \av, pv -> - { s = table { - VINF => av.s ! VINF + "ÑÑ"; - VIMP Sg P1 => av.s ! (VIMP Sg P1) +"ÑÑŒ" ; - VIMP Pl P1 => av.s ! (VIMP Pl P1) +"ÑÑ"; - VIMP Sg P2 => av.s ! (VIMP Sg P2 ) +"ÑÑŒ"; - VIMP Pl P2 => av.s! (VIMP Pl P2) +"ÑÑŒ"; - VIMP Sg P3 => av.s ! (VIMP Sg P3) +"ÑÑ"; - VIMP Pl P3 => av.s ! (VIMP Pl P3) +"ÑÑ"; - VSUB (ASg Masc) => pv ! (PSF (ASg Masc)) + "ÑÑ"+[" бы"]; - VSUB (ASg Fem) => pv ! (PSF (ASg Fem)) + "ÑÑŒ"+[" бы"]; - VSUB (ASg Neut) => pv ! (PSF (ASg Neut)) + "ÑÑŒ"+[" бы"]; - VSUB APl => pv ! (PSF APl) + "ÑÑŒ"+[" бы"] ; - VIND (VPresent Sg P1) => - -- case av.asp of { Imperfective => - av.s ! (VIND (VPresent Sg P1)) + "ÑÑŒ" ; - -- Perfective = > nonExist - -- } ; - VIND (VPresent Sg P2) => av.s ! (VIND (VPresent Sg P2))+ "ÑÑ" ; - VIND (VPresent Sg P3) => av.s ! (VIND (VPresent Sg P3))+ "ÑÑ" ; - VIND (VPresent Pl P1) => av.s !( VIND (VPresent Pl P1)) + "ÑÑ" ; - VIND (VPresent Pl P2) => av.s !( VIND (VPresent Pl P2)) + "ÑÑŒ'" ; - VIND (VPresent Pl P3) => av.s !( VIND (VPresent Pl P3)) + "ÑÑ" ; - VIND (VFuture Sg P1) => av.s ! (VIND (VFuture Sg P1)) + "ÑÑŒ"; - VIND (VFuture Sg P2) => av.s! (VIND (VFuture Sg P2) )+ "ÑÑ"; - VIND (VFuture Sg P3) => av.s! (VIND (VFuture Sg P3)) + "ÑÑ"; - VIND (VFuture Pl P1) => av.s! (VIND (VFuture Pl P1) )+ "ÑÑ"; - VIND (VFuture Pl P2) => av.s! (VIND (VFuture Pl P2) )+ "ÑÑŒ"; - VIND (VFuture Pl P3) => av.s! (VIND (VFuture Pl P3)) + "ÑÑ"; - VIND (VPast (ASg Masc)) => av.s ! (VIND (VPast (ASg Masc) )) + "ÑÑ"; - VIND (VPast (ASg Fem)) => av.s ! (VIND (VPast (ASg Fem) )) + "ÑÑŒ"; - VIND (VPast (ASg Neut)) => av.s ! (VIND (VPast (ASg Neut)) ) + "ÑÑŒ"; - VIND (VPast APl) => av.s ! (VIND (VPast APl)) + "ÑÑŒ" - } ; - asp = av.asp -}; - --- Generation the imperfective active pattern given --- a number of basic conjugation forms. - -oper - imperfectiveActivePattern : Str -> Str -> PresentVerb -> PastVerb -> AspectVoice = - \inf, imper, presentFuture, past -> { s= table { - VINF => inf ; - VIMP Sg P1 => ["давайте "]+ inf ; - VIMP Pl P1 => ["давайте "] + inf ; - VIMP Sg P2 => imper ; - VIMP Pl P2 => imper+"те" ; - VIMP Sg P3 => ["пуÑкай "] + presentFuture ! (PRF Sg P3) ; - VIMP Pl P3 => ["пуÑкай "] + presentFuture ! (PRF Pl P3) ; - VSUB (ASg Masc) => past ! (PSF (ASg Masc)) +[" бы"]; - VSUB (ASg Fem) => past ! (PSF (ASg Fem)) +[" бы"]; - - VSUB (ASg Neut) => past ! (PSF (ASg Neut) )+[" бы"]; - VSUB APl => past ! (PSF APl) +[" бы"]; - VIND (VPresent Sg P1) => presentFuture ! ( PRF Sg P1); - VIND (VPresent Sg P2) => presentFuture! (PRF Sg P2) ; - VIND (VPresent Sg P3) => presentFuture ! (PRF Sg P3) ; - VIND (VPresent Pl P1) => presentFuture ! (PRF Pl P1); - VIND (VPresent Pl P2) => presentFuture ! (PRF Pl P2); - VIND (VPresent Pl P3) => presentFuture ! (PRF Pl P3); - VIND (VFuture Sg P1) => ["буду "] + presentFuture ! (PRF Sg P1) ; - VIND (VFuture Sg P2) => ["будешь"] + presentFuture ! (PRF Sg P2) ; - VIND (VFuture Sg P3) => ["будет "] + presentFuture ! (PRF Sg P3) ; - VIND (VFuture Pl P1) => ["будем "] + presentFuture ! (PRF Pl P1) ; - VIND (VFuture Pl P2) => ["будете "] + presentFuture ! (PRF Pl P2) ; - VIND (VFuture Pl P3) => ["будут "] + presentFuture ! (PRF Pl P3) ; - - VIND (VPast (ASg Masc)) => past ! (PSF (ASg Masc)) ; - VIND (VPast (ASg Fem)) => past ! (PSF (ASg Fem) ) ; - VIND (VPast (ASg Neut) ) => past ! (PSF (ASg Neut)) ; - VIND (VPast APl) => past ! (PSF APl) - } ; - asp = Imperfective -} ; - - oper perfectiveActivePattern: Str -> Str -> PresentVerb -> PastVerb -> AspectVoice = - \inf, imper, presentFuture, past -> { s= table { - VINF => inf ; - VIMP Sg P1 => ["давайте "]+ presentFuture ! (PRF Sg P1); - VIMP Pl P1 => ["давайте "] + presentFuture ! (PRF Pl P1); - VIMP Sg P2 => imper ; - VIMP Pl P2 => imper+"те" ; - VIMP Sg P3 => ["пуÑкай "] + presentFuture ! (PRF Sg P3) ; - VIMP Pl P3 => ["пуÑкай "] + presentFuture ! (PRF Pl P3) ; - VSUB (ASg Masc) => past ! (PSF (ASg Masc)) +[" бы"]; - VSUB (ASg Fem) => past ! (PSF (ASg Fem)) +[" бы"]; - - VSUB (ASg Neut) => past ! (PSF (ASg Neut) )+[" бы"]; - VSUB APl => past ! (PSF APl) +[" бы"]; - VIND (VPresent Sg P1) => [] ; - VIND (VPresent Sg P2) => [] ; - VIND (VPresent Sg P3) => [] ; - VIND (VPresent Pl P1) => nonExist ; - VIND (VPresent Pl P2) => nonExist ; - VIND (VPresent Pl P3) => [] ; - VIND (VFuture Sg P1) => presentFuture ! (PRF Sg P1) ; - VIND (VFuture Sg P2) => presentFuture ! (PRF Sg P2) ; - VIND (VFuture Sg P3) => presentFuture ! (PRF Sg P3) ; - VIND (VFuture Pl P1) => presentFuture ! (PRF Pl P1) ; - VIND (VFuture Pl P2) => presentFuture ! (PRF Pl P2) ; - VIND (VFuture Pl P3) => presentFuture ! (PRF Pl P3) ; - VIND (VPast (ASg Masc)) => past ! (PSF (ASg Masc)) ; - VIND (VPast (ASg Fem)) => past ! (PSF (ASg Fem) ) ; - VIND (VPast (ASg Neut) ) => past ! (PSF (ASg Neut)) ; - VIND (VPast APl) => past ! (PSF APl) - } ; - asp = Perfective -} ; - ---2 Proper names are a simple kind of noun phrases. - - ProperName : Type = {s : Case => Str ; g : Gender ; anim : Animacy} ; - - mkProperNameMasc : Str -> Animacy -> ProperName = \ivan, anim -> - { s = table { Nom => ivan ; - Gen => ivan + "а"; - Dat => ivan + "у"; - Acc => case anim of - { Animate => ivan + "а"; - Inanimate => ivan - }; - Inst => ivan + "ом"; - Prepos => ivan + "е" } ; - g = Masc; anim = anim }; - - mkProperNameFem : Str -> Animacy -> ProperName = \masha, anim -> - { s = table { Nom => masha + "а"; - Gen => masha + "и"; - Dat => masha + "е"; - Acc => masha + "у"; - Inst => masha + "ей"; - Prepos => masha + "е" } ; - g = Fem ; anim = anim }; - }; - diff --git a/grammars/resource/russian/Paradigms.gf b/grammars/resource/russian/Paradigms.gf deleted file mode 100644 index d574e4793..000000000 --- a/grammars/resource/russian/Paradigms.gf +++ /dev/null @@ -1,362 +0,0 @@ ---# -path=.:../abstract:../../prelude - ---1 Russian Lexical Paradigms --- --- Aarne Ranta, Janna Khegai 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, $resource.Abs.gf$. --- --- --- The following files are presupposed: - -resource Paradigms = open (Predef=Predef), Prelude, Syntax, Russian in { - -flags coding=utf8 ; - ---2 Parameters --- --- To abstract over gender names, we define the following identifiers. - -oper - masculine : Gender ; - feminine : Gender ; - neuter : Gender ; - --- To abstract over case names, we define the following. - - nominative : Case ; - genitive : Case ; - dative : Case ; - accusative : Case ; - instructive : Case ; - prepositional : Case ; - --- In some (written in English) textbooks accusative case --- is put on the second place. However, we follow the case order --- standard for Russian textbooks. - --- To abstract over number names, we define the following. - - singular : Number ; - plural : Number ; - ---2 Nouns - --- Best case: indeclinabe nouns: "кофе", "пальто", "ВУЗ". - - mkIndeclinableNoun: Str -> Gender -> Animacy -> N ; - --- Worst case - give six singular forms: --- Nominative, Genetive, Dative, Accusative, Instructive and Prepositional; --- corresponding six plural forms and the gender. --- May be the number of forms needed can be reduced, --- but this requires a separate investigation. --- Animacy parameter (determining whether the Accusative form is equal --- to the Nominative or the Genetive one) is actually of no help, --- since there are a lot of exceptions and the gain is just one form less. - - mkN : (_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> Gender -> Animacy -> N ; - - -- мужчина, мужчины, мужчине, мужчину, мужчиной, мужчине - -- мужчины, мужчин, мужчинам, мужчин, мужчинами, мужчинах - - --- Here are some common patterns. The list is far from complete. - --- Feminine patterns. - - nMashina : Str -> N ; -- feminine, inanimate, ending with "-а", Inst -"машин-ой" - nEdinica : Str -> N ; -- feminine, inanimate, ending with "-а", Inst -"единиц-ей" - nZhenchina : Str -> N ; -- feminine, animate, ending with "-a" - nNoga : Str -> N ; -- feminine, inanimate, ending with "г_к_Ñ…-a" - nMalyariya : Str -> N ; -- feminine, inanimate, ending with "-иÑ" - nTetya : Str -> N ; -- feminine, animate, ending with "-Ñ" - nBol : Str -> N ; -- feminine, inanimate, ending with "-ÑŒ"(soft sign) - --- Neuter patterns. - - nObezbolivauchee : Str -> N ; -- neutral, inanimate, ending with "-ee" - nProizvedenie : Str -> N ; -- neutral, inanimate, ending with "-e" - nChislo : Str -> N ; -- neutral, inanimate, ending with "-o" - --- Masculine patterns. - - nStomatolog : Str -> N ; -- masculine, animate, ending with consonant - - -- the next two differ only in - -- plural nominative (= accusative) form(s) : - nAdres : Str -> N ; -- адреÑ-а - nTelefon : Str -> N ; -- телефон-Ñ‹ - -- masculine, inanimate, ending with consonant - - nNol : Str -> N ; -- masculine, inanimate, ending with "-ÑŒ" (soft sign) - nUroven : Str -> N ; -- masculine, inanimate, ending with "-ень" - --- Nouns used as functions need a preposition. The most common is with Genitive. - - mkFun : N -> Preposition -> Case -> Fun ; - funGen : N -> Fun ; - --- Proper names. - - mkPN : Str -> Gender -> Animacy -> PN ; -- "Иван", "Маша" - --- On the top level, it is maybe $CN$ that is used rather than $N$, and --- $NP$ rather than $PN$. - - mkCN : N -> CN ; - mkNP : Str -> Gender -> Animacy -> NP ; - - ---2 Adjectives - --- Non-comparison (only positive degree) one-place adjectives need 28 (4 by 7) --- forms in the worst case: - - --- Masculine | Feminine | Neutral | Plural --- Nominative --- Genitive --- Dative --- Accusative Inanimate --- Accusative Animate --- Instructive --- Prepositional - - --- Notice that 4 short forms, which exist for some adjectives are not included --- in the current description, otherwise there would be 32 forms for --- positive degree. - --- mkAdj1 : ( : Str) -> Adj1 ; - --- Invariable adjective is a special case. - - adjInvar : Str -> Adj1 ; -- khaki, mini, hindi, netto - --- Some regular patterns depending on the ending. - - adj1Staruyj : Str -> Adj1 ; -- ending with "-ый" - adj1Malenkij : Str -> Adj1 ; -- endign with "-ий" - adj1Molodoj : Str -> Adj1 ; -- ending with "-ой", - -- plural - молод-ые" - adj1Kakoj_Nibud : Str -> Str -> Adj1 ; -- ending with "-ой", - -- plural - "как-ие" - --- Two-place adjectives need a preposition and a case as extra arguments. - - mkAdj2 : Adj1 -> Str -> Case -> Adj2 ; -- "делим на" - --- Comparison adjectives need a positive adjective --- (28 forms without short forms). --- Taking only one comparative form (non-syntaxic) and --- only one superlative form (syntaxic) we can produce the --- comparison adjective with only one extra argument - --- non-syntaxic comparative form. --- Syntaxic forms are based on the positive forms. - - - mkAdjDeg : Adj1 -> Str -> AdjDeg ; - --- On top level, there are adjectival phrases. The most common case is --- just to use a one-place adjective. - - ap : Adj1 -> IsPostfixAdj -> AP ; - - ---2 Verbs --- --- In our lexicon description ("Verbum") there are 62 forms: --- 2 (Voice) by { 1 (infinitive) + [2(number) by 3 (person)](imperative) + --- [ [2(Number) by 3(Person)](present) + [2(Number) by 3(Person)](future) + --- 4(GenNum)(past) ](indicative)+ 4 (GenNum) (subjunctive) } --- Participles (Present and Past) and Gerund forms are not included, --- since they fuction more like Adjectives and Adverbs correspondingly --- rather than verbs. Aspect regarded as an inherent parameter of a verb. --- Notice, that some forms are never used for some verbs. Actually, --- the majority of verbs do not have many of the forms. - --- The worst case need 6 forms of the present tense in indicative mood --- ("Ñ Ð±ÐµÐ³Ñƒ", "ты бежишь", "он бежит", "мы бежим", "вы бежите", "они бегут"), --- a past form (singular, masculine: "Ñ Ð±ÐµÐ¶Ð°Ð»"), an imperative form --- (singular, second person: "беги"), an infinitive ("бежать"). --- Inherent aspect should also be specified. - - mkVerbum : Aspect -> (_,_,_,_,_,_,_,_,_ : Str) -> Verbum ; - --- Common conjugation patterns are two conjugations: --- first - verbs ending with "-ать/-Ñть" and second - "-ить/-еть". --- Instead of 6 present forms of the worst case, we only need --- a present stem and one ending (singular, first person): --- "Ñ Ð»ÑŽÐ±-лю", "Ñ Ð¶Ð´-у", etc. To determine where the border --- between stem and ending lies it is sufficient to compare --- first person from with second person form: --- "Ñ Ð»ÑŽÐ±-лю", "ты люб-ишь". Stems shoud be the same. --- So the definition for verb "любить" looks like: --- mkRegVerb Imperfective Second "люб" "лю" "любил" "люби" "любить"; - - mkRegVerb :Aspect -> Conjugation -> (_,_,_,_,_ : Str) -> Verbum ; - --- For writing an application grammar one usualy doesn't need --- the whole inflection table, since each verb is used in --- a particular context that determines some of the parameters --- (Tense and Voice while Aspect is fixed from the beginning) for certain usage. --- The "V" type, that have these parameters fixed. --- We can extract the "V" from the lexicon. - - mkV: Verbum -> Voice -> Tense -> V ; - mkPresentV: Verbum -> Voice -> V ; - - --- Two-place verbs, and the special case with direct object. Notice that --- a particle can be included in a $V$. - - mkTV : V -> Str -> Case -> TV ; -- "войти в дом"; "в", accusative - tvDir : V -> TV ; -- "видеть", "любить" - --- The definitions should not bother the user of the API. So they are --- hidden from the document. ---. - - - masculine = Masc ; - feminine = Fem ; - neuter = Neut ; - nominative = Nom ; - accusative = Acc ; - dative = Dat ; - genitive = Gen ; - instructive = Inst ; - prepositional = Prepos ; - singular = Sg ; - plural = Pl ; - --- Noun definitions - - mkIndeclinableNoun = \s,g, anim -> - { - s = table { SF _ _ => s } ; - g = g ; - anim = anim - } ; - - - mkN = \nomSg, genSg, datSg, accSg, instSg, preposSg, - nomPl, genPl, datPl, accPl, instPl, preposPl, g, anim -> - { - s = table { - SF Sg Nom => nomSg ; - SF Sg Gen => genSg ; - SF Sg Dat => datSg ; - SF Sg Acc => accSg ; - SF Sg Inst => instSg ; - SF Sg Prepos => preposSg ; - SF Pl Nom => nomPl ; - SF Pl Gen => genPl ; - SF Pl Dat => datPl ; - SF Pl Acc => accPl ; - SF Pl Inst => instPl ; - SF Pl Prepos => preposPl - } ; - g = g ; - anim = anim - } ; - - nMashina = \s -> aEndInanimateDecl s; - nEdinica = \s -> ej_aEndInanimateDecl s; - nZhenchina = \s -> (aEndAnimateDecl s) ** { g = Fem } ; - nNoga = \s -> aEndG_K_KH_Decl s ; - nMalyariya = \s -> i_yaEndDecl s ; - nTetya = \s -> (yaEndAnimateDecl s) ** {g = Fem} ; - nBol = \s -> softSignEndDeclFem s ; - --- Neuter patterns. - - nObezbolivauchee = \s -> eeEndInAnimateDecl s ; - nProizvedenie = \s -> eEndInAnimateDecl s ; - nChislo = \s -> oEndInAnimateDecl s ; - - --- Masculine patterns. - - nStomatolog = \s -> nullEndAnimateDecl s ; - - nAdres = \s -> nullEndInAnimateDecl2 s ; - nTelefon = \s -> nullEndInAnimateDecl1 s ; - - nNol = \s -> softSignEndDeclMasc s ; - nUroven = \s -> EN_softSignEndDeclMasc s ; - --- mkFun defined in syntax.RusU --- funGen defined in syntax.RusU - - mkPN = \ivan, g, anim -> - case g of { - Masc => mkProperNameMasc ivan anim ; - _ => mkProperNameFem ivan anim - } ; - mkCN = UseN ; - mkNP = \x,y,z -> UsePN (mkPN x y z) ; - --- Adjective definitions - - adjInvar = \s -> { s = \\af => s }; - - adj1Staruyj = uy_j_EndDecl ; - adj1Malenkij = ij_EndK_G_KH_Decl ; - adj1Molodoj = uy_oj_EndDecl ; - adj1Kakoj_Nibud = i_oj_EndDecl ; - - mkAdj2 = \a,p,c -> a ** {s2 = p ; c = c} ; - - -- mkAdjDeg defined in morpho.RusU - - ap = \a,p -> a ** { p = p } ; - --- Verb definitions - - mkVerbum = \asp, sgP1, sgP2, sgP3, plP1, plP2, plP3, - sgMascPast, imperSgP2, inf -> case asp of { - Perfective => - mkVerb (perfectiveActivePattern inf imperSgP2 - (presentConj sgP1 sgP2 sgP3 plP1 plP2 plP3) (pastConj sgMascPast)) - (pastConj sgMascPast); - Imperfective => - mkVerb (imperfectiveActivePattern inf imperSgP2 - (presentConj sgP1 sgP2 sgP3 plP1 plP2 plP3) (pastConj sgMascPast)) - (pastConj sgMascPast) - }; - - oper presentConj: (_,_,_,_,_,_: Str) -> PresentVerb = - \sgP1, sgP2, sgP3, plP1, plP2, plP3 -> - table { - PRF Sg P1 => sgP1 ; - PRF Sg P2 => sgP2 ; - PRF Sg P3 => sgP3 ; - PRF Pl P1 => plP1 ; - PRF Pl P2 => plP2 ; - PRF Pl P3 => plP3 - }; - - - mkRegVerb = verbDecl ; -- defined in morpho.RusU.gf - - mkV = extVerb ; -- defined in types.RusU.gf - - mkPresentV = \aller, vox -> - { s = table { - VFin gn p => aller.s ! VFORM vox (VIND (VPresent (numGNum gn) p)) ; - VImper n p => aller.s ! VFORM vox (VIMP n p) ; - VInf => aller.s ! VFORM vox VINF ; - VSubj gn => aller.s ! VFORM vox (VSUB gn) - }; t = Present ; a = aller.asp ; v = vox } ; - - mkTV = mkTransVerb ; -- defined in syntax.RusU.gf - tvDir = mkDirectVerb; -- defined in syntax.RusU.gf - -} ; diff --git a/grammars/resource/russian/Predication.gf b/grammars/resource/russian/Predication.gf deleted file mode 100644 index 1fab240c4..000000000 --- a/grammars/resource/russian/Predication.gf +++ /dev/null @@ -1,35 +0,0 @@ --- predication library, built on resource grammar. AR 2002--2003 - --- Users of the library should *not* look into this file, but only into --- $predication.Types.gf$. - -resource Predication = open Russian in { - - -oper - predV1 = \F, x -> PredVP x (PosV F) ; - predV2 = \F, x, y -> PredVP x (PosTV F y) ; - predVColl = \F, x, y -> PredVP (conjNP x y) (PosV F) ; - predA1 = \F, x -> PredVP x (PosA F) ; - predA2 = \F, x, y -> PredVP x (PosA (ComplAdj F y)) ; - predAComp = \F, x, y -> PredVP x (PosA (ComparAdjP F y)) ; - predAColl = \F, x, y -> PredVP (conjNP x y) (PosA F) ; - predN1 = \F, x -> PredVP x (PosCN (UseN F)) ; - predN2 = \F, x, y -> PredVP x (PosCN (AppFun F y)) ; - predNColl = \F, x, y -> PredVP (conjNP x y) (PosCN (UseN F)) ; - - appFun1 = \f, x -> DefOneNP (AppFun f x) ; - appFunColl = \f, x, y -> DefOneNP (AppFun f (conjNP x y)) ; - - appFam1 = \F, x -> AppFun F x ; - appFamColl = \F, x, y -> AppFun F (conjNP x y) ; - - conjS = \A, B -> ConjS AndConj (TwoS A B) ; - disjS = \A, B -> ConjS OrConj (TwoS A B) ; - implS = \A, B -> SubjS IfSubj A B ; - - constrTyp1 = \F, A -> AppFun F (IndefManyNP A) ; - - conjNP = \x, y -> ConjNP AndConj (TwoNP x y) ; - -}; diff --git a/grammars/resource/russian/ResRus.gf b/grammars/resource/russian/ResRus.gf deleted file mode 100644 index cc998c4aa..000000000 --- a/grammars/resource/russian/ResRus.gf +++ /dev/null @@ -1,241 +0,0 @@ ---# -path=.:../abstract:../../prelude - ---1 The Top-Level Russian Resource Grammar --- --- Janna Khegai 2003 --- on the basis of code for other languages by Aarne Ranta --- --- This is the Russian concrete syntax of the multilingual resource --- grammar. Most of the work is done in the file $syntax.RusU.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 is 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 $types.RusU.gf$. - -concrete ResRus of ResAbs = open Prelude, Syntax in { -flags - coding=utf8 ; - startcat=Phr ; - lexer=text ; - unlexer=text ; - -lincat - - N = CommNoun ; - -- = {s : SubstForm => Str ; g : Gender ; anim : Animacy } ; - CN = CommNounPhrase ; - -- = {s : Number => Case => Str; g : Gender; anim : Animacy} ; - NP = NounPhrase ; - -- = { s : PronForm => Str ; n : Number ; p : Person ; - -- g: Gender ; anim : Animacy ; pron: Bool} ; - PN = ProperName ; - -- = {s : Case => Str ; g : Gender ; anim : Animacy} ; - Adj1 = Adjective ; - -- = {s : AdjForm => Str} ; - Det = Determiner ; - -- = Adjective ** { n: Number; c : Case } ; - Adj2 = AdjCompl ; - -- = Adjective ** Complement ; - AdjDeg = AdjDegr ; - -- = {s : Degree => AdjForm => Str} ; - AP = AdjPhrase ; - -- = Adjective ** {p : IsPostfixAdj} ; - Fun = Function ; - -- = CommNounPhrase ** Complement ; - Fun2 = Function ** {s3 : Preposition; c2: Case} ; - - V = Verb ; - -- = {s : VF => Str ; t: Tense ; a : Aspect ; v: Voice} ; - VP = VerbPhrase ; - -- = Verb ** {s2 : Str ; s3 : Gender => Number => Str ; - -- negBefore: Bool} ; - TV = TransVerb ; - -- = Verb ** {s2 : Preposition ; c: Case } ; - V3 = TransVerb ** {s4 : Preposition; c2: Case} ; - VS = SentenceVerb ; - -- = Verb ; - AdV = Adverb ; - -- = {s : Str} ; - - S = Sentence ; - -- = {s : Str} ; - Slash = SentenceSlashNounPhrase ; - -- = Sentence ** Complement ; - - RP = RelPron ; - -- = {s : GenNum => Case => Animacy => Str} ; - RC = RelClause ; - -- = RelPron ; - - IP = IntPron ; - -- = NounPhrase ; - Qu = Question ; - -- = {s : QuestForm => Str} ; - Imp = Imperative ; - -- = { s: Gender => Number => Str } ; - Phr = Utterance ; - -- = {s : Str} ; - Text = {s : Str} ; - - Conj = Conjunction ; - -- = {s : Str ; n : Number} ; - ConjD = ConjunctionDistr ; - -- = {s1,s2 : Str ; n : Number} ; - - ListS = ListSentence ; - -- = {s1,s2 : Mode => Str} ; - ListAP = ListAdjPhrase ; - -- = {s1,s2 : AdjForm => Str ; p : Bool} ; - ListNP = ListNounPhrase ; - -- = { s1,s2 : PronForm => Str ; g: Gender ; anim : Animacy ; - -- n : Number ; p : Person ; pron : Bool } ; - ---. -lin - UsePN = nameNounPhrase ; - ComplAdj = complAdj ; - PredVP = predVerbPhrase ; - PosTV = complTransVerb True ; - NegTV = complTransVerb False ; - AdjP1 = adj2adjPhrase ; - ModAdj = modCommNounPhrase ; - PosA = predAdjective True ; - NegA = predAdjective False ; - - UseN = noun2CommNounPhrase ; - ModGenOne = npGenDet Sg ; - ModGenMany = npGenDet Pl ; - UseFun = funAsCommNounPhrase ; - AppFun = appFunComm ; - PositAdjP = positAdjPhrase ; - ComparAdjP = comparAdjPhrase ; - SuperlNP = superlNounPhrase ; - - DetNP = detNounPhrase ; - IndefOneNP = indefNounPhrase Sg ; - IndefManyNP = indefNounPhrase Pl ; - DefOneNP = defNounPhrase Sg ; - DefManyNP = defNounPhrase Pl ; - - PosV = predVerb True ; - NegV = predVerb False ; - PosCN = predCommNoun True ; - NegCN = predCommNoun False ; - PosNP = predNounPhrase True ; - NegNP = predNounPhrase False ; - PosVS = complSentVerb True ; - NegVS = complSentVerb False ; - - AdvVP = adVerbPhrase ; - LocNP = locativeNounPhrase ; - AdvCN = advCommNounPhrase ; --- AdvAP = advAdjPhrase ; - - PosSlashTV = slashTransVerb True ; - NegSlashTV = slashTransVerb False ; - - IdRP = identRelPron ; - FunRP = funRelPron ; - RelVP = relVerbPhrase ; - RelSlash = relSlash ; - ModRC = modRelClause ; - RelSuch = relSuch ; - - WhoOne = intPronKto Sg ; - WhoMany = intPronKto Pl ; - WhatOne = intPronChto Sg ; - WhatMany = intPronChto Pl ; - FunIP = funIntPron ; - NounIPOne = nounIntPron Sg ; - NounIPMany = nounIntPron Pl ; - - QuestVP = questVerbPhrase ; - IntVP = intVerbPhrase ; - IntSlash = intSlash ; - QuestAdv = questAdverbial ; - - ImperVP = imperVerbPhrase ; - - IndicPhrase = indicUtt ; - QuestPhrase = interrogUtt ; - ImperOne = imperUtterance Masc Sg ; - ImperMany = imperUtterance Masc Pl ; - --AdvS = advSentence ; - - TwoS = twoSentence ; - ConsS = consSentence ; - ConjS = conjunctSentence ; - ConjDS = conjunctDistrSentence ; - - TwoAP = twoAdjPhrase ; - ConsAP = consAdjPhrase ; - ConjAP = conjunctAdjPhrase ; - ConjDAP = conjunctDistrAdjPhrase ; - - TwoNP = twoNounPhrase ; - ConsNP = consNounPhrase ; - ConjNP = conjunctNounPhrase ; - ConjDNP = conjunctDistrNounPhrase ; - - SubjS = subjunctSentence ; - SubjImper = subjunctImperative ; - SubjQu = subjunctQuestion ; - - PhrNP = useNounPhrase ; - PhrOneCN = useCommonNounPhrase Sg ; - PhrManyCN = useCommonNounPhrase Pl ; - PhrIP ip = postfixSS "?" ip ; - PhrIAdv ia = postfixSS "?" ia ; - OnePhr p = p ; - ConsPhr = cc2 ; - - - INP = pron2NounPhrase pronYa Animate; - ThouNP = pron2NounPhrase pronTu Animate; - HeNP = pron2NounPhrase pronOn Animate; - SheNP = pron2NounPhrase pronOna Animate; - WeNP = pron2NounPhrase pronMu Animate; - YeNP = pron2NounPhrase pronVu Animate; - YouNP = pron2NounPhrase pronVu Animate; - TheyNP = pron2NounPhrase pronOni Animate; - - EveryDet = kazhdujDet ** {n = Sg ; c= Nom} ; - AllDet = vseDetPl ** {n = Pl; c= Nom} ; - WhichDet = kotorujDet ** {n = Sg; c= Nom} ; -- a singular version only - MostDet = bolshinstvoDet ** {n = Pl; c= Gen} ; - - HowIAdv = ss "как" ; - WhenIAdv = ss "когда" ; - WhereIAdv = ss "где" ; - WhyIAdv = ss "почему" ; - - AndConj = ss "и" ** {n = Pl} ; - OrConj = ss "или" ** {n = Sg} ; - BothAnd = sd2 "как" [", так"] ** {n = Pl} ; - EitherOr = sd2 "либо" [", либо"] ** {n = Sg} ; - --- In case of "neither.. no" expression double negation is not --- only possible, but also required in Russian. --- There is no means of control for this however in the resource grammar. - - NeitherNor = sd2 "ни" [", ни"] ** {n = Sg} ; - - IfSubj = ss "еÑли" ; - WhenSubj = ss "когда" ; - - PhrYes = ss ["да ."] ; - PhrNo = ss ["нет ."] ; - - VeryAdv = ss "очень" ; - TooAdv = ss "Ñлишком" ; - OtherwiseAdv = ss "иначе" ; - ThereforeAdv = ss "Ñледовательно" ; -} ; diff --git a/grammars/resource/russian/RestaurantRus.gf b/grammars/resource/russian/RestaurantRus.gf deleted file mode 100644 index fa07e4afd..000000000 --- a/grammars/resource/russian/RestaurantRus.gf +++ /dev/null @@ -1,30 +0,0 @@ ---# -path=.:../abstract:../../prelude - -concrete RestaurantRus of Restaurant = - DatabaseRus ** open Prelude,Paradigms in { -flags coding=utf8 ; -lin - Restaurant = n2n restoran; - Bar = n2n bar ; - French = AdjP1 francuzskij ; - Italian = AdjP1 italyanskij ; - Indian = AdjP1 indijskij ; - Japanese = AdjP1 yaponskij ; - - address = funGen adres ; - phone = funGen telefon ; - priceLevel = funGen (commNounPhrase2CommNoun(appFunComm urovenFun cenu)) ; - - Cheap = deshevuj; - Expensive = dorogoj ; - - WhoRecommend rest = mkSentSame (ss2 ["кто порекомендовал"] (rest.s ! Acc)) ; - WhoHellRecommend rest = - mkSentSame (ss2 ["кто, черт возьми, порекомендовал"] (rest.s ! Acc)) ; - - LucasCarton = mkProperNameMasc ["Ð›ÑƒÐºÐ°Ñ ÐšÐ°Ñ€Ñ‚ÑƒÐ½"] Inanimate; - -oper - urovenFun : Function = funGen uroven ; - cenu : NounPhrase = mkNounPhrase Pl (n2n cena) ; -}; diff --git a/grammars/resource/russian/Russian.gf b/grammars/resource/russian/Russian.gf deleted file mode 100644 index 52265b556..000000000 --- a/grammars/resource/russian/Russian.gf +++ /dev/null @@ -1,3 +0,0 @@ ---# -path=.:../abstract:../../prelude - -resource Russian = reuse ResRus ; diff --git a/grammars/resource/russian/Syntax.gf b/grammars/resource/russian/Syntax.gf deleted file mode 100644 index 11b325bfc..000000000 --- a/grammars/resource/russian/Syntax.gf +++ /dev/null @@ -1,898 +0,0 @@ ---1 A Small Russian Resource Syntax --- --- Aarne Ranta, Janna Khegai 2003 --- --- This resource grammar contains definitions needed to construct --- indicative, interrogative, and imperative sentences in Russian. --- --- The following files are presupposed: -resource Syntax = Morpho ** open Prelude, (CO = Coordination) in { -flags coding=utf8 ; - ---2 Common Nouns --- --- ---3 Common noun phrases --- --- Complex common nouns ($Comm'NounPhrase$) have in principle --- the same parameters as simple ones. - -oper - CommNounPhrase: Type = {s : Number => Case => Str; g : Gender; anim : Animacy} ; - - noun2CommNounPhrase : CommNoun -> CommNounPhrase = \sb -> - {s = \\n,c => sb.s ! SF n c ; - g = sb.g ; - anim = sb.anim - } ; - - commNounPhrase2CommNoun : CommNounPhrase -> CommNoun = \sb -> - {s = \\sf => sb.s ! (numSF sf) ! (caseSF sf) ; - g = sb.g ; - anim = sb.anim - } ; - - n2n = noun2CommNounPhrase; - n2n2 = commNounPhrase2CommNoun ; - ---2 Noun Phrases --- - -oper - - NounPhrase : Type = { s : PronForm => Str ; n : Number ; - p : Person ; g: Gender ; anim : Animacy ; pron: Bool} ; - - -- A function specific for Russian for setting the gender for - -- personal pronouns in first and second person, singular : - setNPGender : Gender -> NounPhrase -> NounPhrase = \gen, pronI -> - { s = pronI.s ; g = gen ; anim = pronI.anim ; - n = pronI.n ; nComp = pronI.nComp ; p = pronI.p ; pron = pronI.pron } ; - - - mkNounPhrase : Number -> CommNounPhrase -> NounPhrase = \n,chelovek -> - {s = \\cas => chelovek.s ! n ! (extCase cas) ; - n = n ; g = chelovek.g ; p = P3 ; pron =False ; - anim = chelovek.anim - } ; - pron2NounPhrase : Pronoun -> Animacy -> NounPhrase = \ona, anim -> - {s = ona.s ; n = ona.n ; g = pgen2gen ona.g ; - pron = ona.pron; p = ona.p ; anim = anim } ; - - nameNounPhrase : ProperName -> NounPhrase = - \masha -> {s = \\c => masha.s ! (extCase c) ; - p = P3; g = masha.g ; anim = masha.anim ; - n = Sg; nComp = Sg; pron = False} ; - - ---2 Determiners --- --- Determiners (only determinative pronouns in Russian) are inflected --- according to the gender of nouns they determine. --- The determined noun has the case parameter specific for the determiner: - - Determiner : Type = Adjective ** { n: Number; c : Case } ; - - anyPlDet = kakojNibudDet ** {n = Pl; c= Nom} ; - - detNounPhrase : Determiner -> CommNounPhrase -> NounPhrase = \kazhduj, okhotnik -> - {s = \\c => case kazhduj.c of { - Nom => - kazhduj.s ! AF (extCase c) okhotnik.anim (gNum okhotnik.g kazhduj.n) ++ - okhotnik.s ! kazhduj.n ! (extCase c) ; - _ => - kazhduj.s ! AF (extCase c) okhotnik.anim (gNum okhotnik.g kazhduj.n) ++ - okhotnik.s ! kazhduj.n ! kazhduj.c }; - n = kazhduj.n ; - p = P3 ; - pron = False; - g = okhotnik.g ; - anim = okhotnik.anim - } ; - - indefNounPhrase : Number -> CommNounPhrase -> NounPhrase = \n,mashina -> - {s = \\c => mashina.s ! n ! (extCase c) ; - n = n ; p = P3 ; g = mashina.g ; anim = mashina.anim ; - pron = False - } ; - - defNounPhrase : Number -> CommNounPhrase -> NounPhrase = \n,mashina -> - { s = \\c => mashina.s ! n ! (extCase c) ; - n = n ; p = P3 ; g = mashina.g ;anim = mashina.anim ; pron = False } ; - --- Genitives of noun phrases can be used like determiners, --- to build noun phrases. --- The number argument makes the difference between "мой дом" - "мои дома". --- --- The variation like in "the car of John / John's car" in English is --- not equally natural for proper names and pronouns and the rest of nouns. --- Compare "дверца машины" and "машины дверца", while --- "Ванина мама" and "мама Вани" or "Ð¼Ð¾Ñ Ð¼Ð°Ð¼Ð°" and "мама моÑ". --- Here we have to make a choice of a universal form, which will be --- "Ð¼Ð¾Ñ Ð¼Ð°Ð¼Ð°" - "Вани мама" - "машины дверца", which sounds --- the best for pronouns, a little worse for proper names and --- the worst for the rest of nouns. The reason is the fact that --- possession/genetive is more a human category and pronouns are --- used very often, so we try to suit this case in the first place. - - npGenDet : Number -> NounPhrase -> CommNounPhrase -> NounPhrase = - \n,masha,mashina -> - {s = \\c => case masha.pron of - { True => masha.s ! (mkPronForm Nom No (Poss (gNum mashina.g n))) ++ - mashina.s ! n ! (extCase c) ; - False => masha.s ! (mkPronForm Gen No (Poss (gNum mashina.g n))) ++ - mashina.s ! n ! (extCase c) - } ; - n = n ; p = P3 ; g = mashina.g ; anim = mashina.anim ; pron = False - } ; - ---2 Adjectives ---3 Simple adjectives --- --- A special type of adjectives just having positive forms --- (for semantic reasons) is useful, e.g. "руÑÑкий". - -oper - - extAdjective : AdjDegr -> Adjective = \adj -> - { s = \\af => adj.s ! Pos ! af } ; - - -- Coercions between the compound gen-num type and gender and number: - - gNum : Gender -> Number -> GenNum = \g,n -> - case n of {Sg => case g of - { Fem => ASg Fem ; - Masc => ASg Masc ; - Neut => ASg Neut - -- _ => variants {ASg Masc ; ASg Fem} - } ; Pl => APl} ; - - - ---3 Adjective phrases --- --- An adjective phrase may contain a complement, e.g. "моложе Риты". --- Then it is used as postfix in modification, e.g. "человек, моложе Риты". - - IsPostfixAdj = Bool ; - - AdjPhrase : Type = Adjective ** {p : IsPostfixAdj} ; - --- Simple adjectives are not postfix: - - adj2adjPhrase : Adjective -> AdjPhrase = \novuj -> novuj ** {p = False} ; - ---3 Comparison adjectives --- --- Each of the comparison forms has a characteristic use: --- --- Positive forms are used alone, as adjectival phrases ("большой"). - - positAdjPhrase : AdjDegr -> AdjPhrase = \bolshoj -> - adj2adjPhrase (extAdjective bolshoj) ; - --- Comparative forms are used with an object of comparison, as --- adjectival phrases ("больше тебÑ"). - - comparAdjPhrase : AdjDegr -> NounPhrase -> AdjPhrase = \bolshoj, tu -> - {s = \\af => bolshoj.s ! Comp ! af ++ tu.s ! (mkPronForm Gen Yes NonPoss) ; - p = True - } ; - --- Superlative forms are used with a modified noun, picking out the --- maximal representative of a domain ("Ñамый большой дом"). - - superlNounPhrase : AdjDegr -> CommNounPhrase -> NounPhrase = \bolshoj, dom -> - {s = \\pf => bolshoj.s ! Super ! AF (extCase pf) dom.anim (gNum dom.g Sg) ++ - dom.s ! Sg ! (extCase pf) ; - n = Sg ; - p = P3 ; - pron = False; - anim = dom.anim ; - g = dom.g - } ; - - ---3 Two-place adjectives --- --- A two-place adjective is an adjective with a preposition used before --- the complement. (Rem. $Complement = {s2 : Preposition ; c : Case} $). - - - AdjCompl = Adjective ** Complement ; - - complAdj : AdjCompl -> NounPhrase -> AdjPhrase = \vlublen,tu -> - {s = \\af => vlublen.s ! af ++ vlublen.s2 ++ - tu.s ! (mkPronForm vlublen.c No NonPoss) ; - p = True - } ; - ---3 Complements --- - - Complement = {s2 : Preposition ; c : Case} ; - - complement : Str -> Complement = \cherez -> - {s2 = cherez ; c = Nom} ; - - complementDir : Complement = complement [] ; - - complementCas : Case -> Complement = \c -> - {s2 = [] ; c = c} ; - ---2 Individual-valued functions - --- An individual-valued function is a common noun together with the --- preposition prefixed to its argument ("ключ от дома"). --- The situation is analogous to two-place adjectives and transitive verbs. --- --- We allow the genitive construction to be used as a variant of --- all function applications. It would definitely be too restrictive only --- to allow it when the required case is genitive. We don't know if there --- are counterexamples to the liberal choice we've made. - - Function = CommNounPhrase ** Complement ; - - --- The application of a function gives, in the first place, a common noun: --- "ключ от дома". From this, other rules of the resource grammar --- give noun phrases, such as "ключи от дома", "ключи от дома --- и от машины", and "ключ от дома и машины" (the --- latter two corresponding to distributive and collective functions, --- respectively). Semantics will eventually tell when each --- of the readings is meaningful. - - appFunComm : Function -> NounPhrase -> CommNounPhrase = \mama,ivan -> - {s = \\n, cas => - mama.s ! n ! cas ++ mama.s2 ++ - ivan.s ! (mkPronForm mama.c No (Poss (gNum mama.g n))); - g = mama.g ; - anim = mama.anim - } ; - --- It is possible to use a function word as a common noun; the semantics is --- often existential or indexical. - - funAsCommNounPhrase : Function -> CommNounPhrase = \x -> x ; - - mkFun : CommNoun -> Preposition -> Case -> Function = \f,p,c -> - (n2n f) ** {s2 = p ; c = c} ; - --- The following is an aggregate corresponding to the original function application --- producing "детÑтво Ивана" and "Иваново детÑтво". It does not appear in the --- resource abstract syntax any longer. --- Both versions return "детÑво Ивана" although "Иваново детÑтво" --- must also be included --- Such possesive form is only possible with proper names in Russian : - - appFun : Bool -> Function -> NounPhrase -> NounPhrase = \coll,detstvo, ivan -> - let {n = ivan.n ; nf = if_then_else Number coll Sg n} in - variants { - defNounPhrase nf (appFunComm detstvo ivan) ; -- detstvoIvana - npGenDet nf ivan detstvo - } ; - - --- The commonest cases are functions with Genitive. - - funGen : CommNoun -> Function = \urovenCen -> - mkFun urovenCen [] Gen ; - ---3 Modification of common nouns --- --- The two main functions of adjective are in predication ("Иван - молод") --- and in modification ("молодой человек"). Predication will be defined --- later, in the chapter on verbs. - - modCommNounPhrase : AdjPhrase -> CommNounPhrase -> CommNounPhrase = - \khoroshij,novayaMashina -> - {s = \\n, c => - khoroshij.s ! AF c novayaMashina.anim (gNum novayaMashina.g n) ++ - novayaMashina.s ! n ! c ; - g = novayaMashina.g ; - anim = novayaMashina.anim - } ; - ---2 Verbs - ---3 Transitive verbs --- --- Transitive verbs are verbs with a preposition for the complement, --- in analogy with two-place adjectives and functions. --- One might prefer to use the term "2-place verb", since --- "transitive" traditionally means that the inherent preposition is empty --- and the case is accusative. --- Such a verb is one with a *direct object*. --- Note: Direct verb phrases where the Genitive case is also possible --- ("купить хлеба", "не читать газет") are overlooked in mkDirectVerb --- and can be expressed via more a general rule mkTransVerb. - - TransVerb : Type = Verb ** {s2 : Preposition ; c: Case } ; - - complementOfTransVerb : TransVerb -> Complement = \v -> {s2 = v.s2 ; c = v.c} ; - verbOfTransVerb : TransVerb -> Verb = \v -> - {s = v.s; t = v.t; a = v.a ; w = v.w } ; - - mkTransVerb : Verb -> Preposition -> Case -> TransVerb = \v,p,cas -> - v ** {s2 = p ; c = cas } ; - - mkDirectVerb : Verb -> TransVerb = \v -> - mkTransVerb v nullPrep Acc; - - nullPrep : Preposition = [] ; - --- The rule for using transitive verbs is the complementization rule: - - complTransVerb : Bool -> TransVerb -> NounPhrase -> VerbPhrase = \b,se,tu -> - {s = se.s ; a = se.a ; t = se.t ; w = se.w ; s2 = negation b ; - s3 = \\_,_ => se.s2 ++ tu.s ! (mkPronForm se.c No NonPoss) ; - negBefore = True } ; - ---3 Verb phrases --- --- Verb phrases are discontinuous: the parts of a verb phrase are --- (s) an inflected verb, (s2) verb adverbials (such as negation), and --- (s3) complement. This discontinuity is needed in sentence formation --- to account for word order variations. - - VerbPhrase : Type = Verb ** {s2 : Str ; s3 : Gender => Number => Str ; - negBefore: Bool} ; - --- A simple verb can be made into a verb phrase with an empty complement. --- There are two versions, depending on if we want to negate the verb. - - predVerb : Bool -> Verb -> VerbPhrase = \b,vidit -> - vidit ** { - s2 = negation b ; - s3 = \\_,_ => [] ; - negBefore = True - } ; - - negation : Bool -> Str = \b -> if_then_else Str b [] "не" ; - --- Sometimes we want to extract the verb part of a verb phrase. - - verbOfPhrase : VerbPhrase -> Verb = \v -> - {s = v.s; t = v.t ; a = v.a ; w =v.w} ; - - --- Verb phrases can also be formed from adjectives ("- молод"), --- common nouns ("- человек"), and noun phrases ("- Ñамый молодой"). --- The third rule is overgenerating: "- каждый человек" has to be ruled out --- on semantic grounds. --- Note: in some case we can even omit a dash "-" : --- "Я думаю, что Ñто Ñ…Ð¾Ñ€Ð¾ÑˆÐ°Ñ Ð¼Ð°ÑˆÐ¸Ð½Ð°". - - predAdjective : Bool -> Adjective -> VerbPhrase = \b,zloj -> - { s= \\_ => "-" ; - t = Present ; - a = Imperfective ; - w = Act ; - s2 = negation b ; - s3 = \\g,n => case n of { - Sg => zloj.s ! AF Nom Animate (ASg g) ; - Pl => zloj.s ! AF Nom Animate APl - } ; - negBefore = False - } ; - - predCommNoun : Bool -> CommNounPhrase -> VerbPhrase = \b,chelovek -> - { s= \\_ => "-" ; - t = Present ; - a = Imperfective ; - w = Act ; - s2 = negation b ; - s3 = \\_,n => (indefNounPhrase n chelovek ).s ! (mkPronForm Nom No NonPoss) ; - negBefore = False - } ; - - predNounPhrase : Bool -> NounPhrase -> VerbPhrase = \b,masha -> - { s= \\_ => "-" ; - t = Present ; - a = Imperfective ; - w = Act ; - s2 = negation b ; - s3 = \\_,_ => masha.s ! (mkPronForm Nom No NonPoss) ; - negBefore = False - } ; - - -- A function specific for Russian : - predNeedShortAdjective: Bool -> NounPhrase -> CommNounPhrase -> Sentence = - \ b, Jag, Dig -> { s = - let { - mne = Jag.s ! (mkPronForm Dat No NonPoss) ; - nuzhen = need.s ! AF Nom Inanimate (gNum Dig.g Sg) ; - doctor = Dig.s ! Sg ! Nom ; - ne = negation b - } in - mne ++ ne ++ nuzhen ++ doctor - } ; - ---2 Adverbials --- - adVerbPhrase : VerbPhrase -> Adverb -> VerbPhrase = \poet, khorosho -> - {s = \\vf => khorosho.s ++ poet.s ! vf ; s2 = poet.s2; s3 = poet.s3; - a = poet.a; w = poet.w; t = poet.t ; negBefore = poet.negBefore } ; - --- Adverbials are typically generated by prefixing prepositions. --- The rule for creating locative noun phrases by the preposition "в" --- is a little shaky: "в РоÑÑии" but "на оÑтрове". - - locativeNounPhrase : NounPhrase -> Adverb = \ivan -> - {s = "в" ++ ivan.s ! (mkPronForm Prepos Yes NonPoss) } ; - --- This is a source of the "man with a telescope" ambiguity, and may produce --- strange things, like "машины вÑегда". --- Semantics will have to make finer distinctions among adverbials. - - advCommNounPhrase : CommNounPhrase -> Adverb -> CommNounPhrase = \chelovek,uTelevizora -> - {s = \\n,c => chelovek.s ! n ! c ++ uTelevizora.s ; - g = chelovek.g ; - anim = chelovek.anim - } ; - - ---2 Sentences --- --- We do not introduce the word order parameter for sentences in Russian --- although there exist several word orders, but they are too specific --- to capture on the level we work here. - -oper - Sentence : Type = { s : Str } ; - --- This is the traditional $S -> NP VP$ rule. - - predVerbPhrase : NounPhrase -> VerbPhrase -> Sentence = - \Ya, tebyaNeVizhu -> { s = - let - { ya = Ya.s ! (mkPronForm Nom No NonPoss); - ne = tebyaNeVizhu.s2; - vizhu = tebyaNeVizhu.s ! VFin (gNum Ya.g Ya.n) Ya.p; - tebya = tebyaNeVizhu.s3 ! Ya.g ! Ya.n - } - in - if_then_else Str tebyaNeVizhu.negBefore - (ya ++ ne ++ vizhu ++ tebya) - (ya ++ vizhu ++ ne ++ tebya) - - } ; - - -- A function specific for Russian: - U_predTransVerb : Bool -> TransVerb -> NounPhrase -> NounPhrase -> Sentence = - \b,Ser,Jag,Dig -> { s = - let { - menya = Jag.s ! (mkPronForm Gen Yes NonPoss) ; - bolit = Ser.s ! VFin (gNum Dig.g Dig.n) Dig.p ; - golova = Dig.s ! (mkPronForm Nom No NonPoss) ; - ne = negation b - } in - "у" ++ menya ++ ne ++ bolit ++ golova - } ; - - --- This is a macro for simultaneous predication and complementation. - - predTransVerb : Bool -> TransVerb -> NounPhrase -> NounPhrase -> Sentence = - \b,vizhu,ya,tu -> predVerbPhrase ya (complTransVerb b vizhu tu) ; - ---3 Sentence-complement verbs --- --- Sentence-complement verbs take sentences as complements. - - SentenceVerb : Type = Verb ; - --- To generate "Ñказал, что Иван гулÑет" / "не Ñказал, что Иван гулÑет": - - complSentVerb : Bool -> SentenceVerb -> Sentence -> VerbPhrase = - \b,vidit,tuUlubaeshsya -> - {s = vidit.s ; s2 = negation b ; s3 = \\_,_ => [", что"] ++ - tuUlubaeshsya.s ; - t = vidit.t ; w = vidit.w ; a = vidit.a ; negBefore = True } ; - - ---2 Sentences missing noun phrases --- --- This is one instance of Gazdar's *slash categories*, corresponding to his --- $S/NP$. --- We cannot have - nor would we want to have - a productive slash-category former. --- Perhaps a handful more will be needed. --- --- Notice that the slash category has the same relation to sentences as --- transitive verbs have to verbs: it's like a *sentence taking a complement*. - - SentenceSlashNounPhrase = Sentence ** Complement ; - - slashTransVerb : Bool -> NounPhrase -> TransVerb -> SentenceSlashNounPhrase = - \b,ivan,lubit -> - predVerbPhrase ivan (predVerb b (verbOfTransVerb lubit)) ** - complementOfTransVerb lubit ; - - ---2 Coordination --- --- Coordination is to some extent orthogonal to the rest of syntax, and --- has been treated in a generic way in the module $CO$ in the file --- $coordination.gf$. The overall structure is independent of category, --- but there can be differences in parameter dependencies. --- ---3 Conjunctions --- --- Coordinated phrases are built by using conjunctions, which are either --- simple ("и", "или") or distributed ("как - так", "либо - либо"). --- --- The conjunction has an inherent number, which is used when conjoining --- noun phrases: "Иван и Маша поют" vs. "Иван или Маша поет"; in the --- case of "или", the result is however plural if any of the disjuncts is. - - Conjunction = CO.Conjunction ** {n : Number} ; - ConjunctionDistr = CO.ConjunctionDistr ** {n : Number} ; - ---2 Relative pronouns and relative clauses --- - -oper - identRelPron : RelPron = { s = \\gn, c, anim => - kotorujDet.s ! (AF c anim gn )} ; - - funRelPron : Function -> RelPron -> RelPron = \mama, kotoruj -> - {s = \\gn,c, anim => let {nu = numGNum gn} in - mama.s ! nu ! c ++ - mama.s2 ++ kotoruj.s ! gn ! mama.c ! anim - } ; - --- Relative clauses can be formed from both verb phrases ("видит Машу") and --- slash expressions ("Ñ Ð²Ð¸Ð¶Ñƒ"). - - RelClause : Type = RelPron ; - - relVerbPhrase : RelPron -> VerbPhrase -> RelClause = \kotoruj, gulyaet -> - { s = \\gn, c, anim => let { nu = numGNum gn } in - kotoruj.s ! gn ! c ! anim ++ gulyaet.s2 ++ gulyaet.s ! VFin gn P3 ++ - gulyaet.s3 ! genGNum gn ! nu - } ; - - relSlash : RelPron -> SentenceSlashNounPhrase -> RelClause = - \kotoruj, yaVizhu -> - {s = \\gn, _ , anim => yaVizhu.s2 ++ kotoruj.s ! gn ! yaVizhu.c ! anim - ++ yaVizhu.s - } ; - --- A 'degenerate' relative clause is the one often used in mathematics, e.g. --- "чиÑло x, такое что x - четное". - - relSuch : Sentence -> RelClause = \A -> - {s = \\gn,c, anim => takoj.s ! AF c anim gn ++ "что" ++ A.s } ; - --- The main use of relative clauses is to modify common nouns. --- The result is a common noun, out of which noun phrases can be formed --- by determiners. A comma is used before the relative clause. - - modRelClause : CommNounPhrase -> RelClause -> CommNounPhrase = - \chelovek,kotorujSmeetsya -> - { s = \\n,c => chelovek.s ! n ! c ++ "," ++ - kotorujSmeetsya.s ! gNum chelovek.g n ! Nom ! chelovek.anim; - g = chelovek.g ; - anim = chelovek.anim - } ; - - ---2 Interrogative pronouns --- --- If relative pronouns are adjective-like, interrogative pronouns are --- noun-phrase-like. Actually we can use the very same type! - - IntPron : Type = NounPhrase ; - --- In analogy with relative pronouns, we have a rule for applying a function --- to a relative pronoun to create a new one. We can reuse the rule applying --- functions to noun phrases! - - funIntPron : Function -> IntPron -> IntPron = - appFun False ; - --- There is a variety of simple interrogative pronouns: --- "ÐºÐ°ÐºÐ°Ñ Ð¼Ð°ÑˆÐ¸Ð½Ð°", "кто", "что". - - nounIntPron : Number -> CommNounPhrase -> IntPron = \n, x -> - detNounPhrase (kakojDet ** {n = n; c= Nom}) x ; - - intPronKto : Number -> IntPron = \num -> - { s = table { - PF Nom _ _ => "кто" ; - PF Gen _ _ => "кого" ; - PF Dat _ _ => "кому" ; - PF Acc _ _ => "кого" ; - PF Inst _ _ => "кем" ; - PF Prepos _ _ => ["о ком"] - } ; - g = Masc ; - anim = Animate ; - n = num ; - p = P3 ; - pron = False - } ; - - - - intPronChto : Number -> IntPron = \num -> - { s = table { - PF Nom _ _ => "что" ; - PF Gen _ _ => "чего" ; - PF Dat _ _ => "чему" ; - PF Acc _ _ => "что" ; - PF Inst _ _ => "чем" ; - PF Prepos _ _=> ["о чем"] - } ; - g = Neut ; - anim = Inanimate ; - n = num ; - p = P3 ; - pron = False - } ; - - ---2 Utterances - --- By utterances we mean whole phrases, such as --- 'can be used as moves in a language game': indicatives, questions, imperative, --- and one-word utterances. The rules are far from complete. --- --- N.B. we have not included rules for texts, which we find we cannot say much --- about on this level. In semantically rich GF grammars, texts, dialogues, etc, --- will of course play an important role as categories not reducible to utterances. --- An example is proof texts, whose semantics show a dependence between premises --- and conclusions. Another example is intersentential anaphora. - - Utterance = SS ; - - indicUtt : Sentence -> Utterance = \x -> postfixSS "." (defaultSentence x) ; - interrogUtt : Question -> Utterance = \x -> postfixSS "?" (defaultQuestion x) ; - ---2 Questions --- --- Questions are either direct ("Ты ÑчаÑтлив?") --- or indirect ("Потом он ÑпроÑил ÑчаÑтлив ли ты"). - -param - QuestForm = DirQ | IndirQ ; - -oper - Question = SS1 QuestForm ; - ---3 Yes-no questions --- --- Yes-no questions are used both independently ("Ты взÑл мÑч?") --- and after interrogative adverbials ("Почему ты взÑл мÑч?"). - --- Note: The particle "ли" can also be used in direct questions: --- Видел ли ты что-нибудь подобное? --- but we are not considering this case. - - questVerbPhrase : NounPhrase -> VerbPhrase -> Question = - \tu,spish -> - let { vu = tu.s ! (mkPronForm Nom No NonPoss); - spish = spish.s ! VFin (gNum tu.g tu.n) tu.p - ++ spish.s2 ++ spish.s3 ! tu.g ! tu.n } in - { s = table { - DirQ => vu ++ spish ; - IndirQ => spish ++ "ли" ++ vu - } - } ; - ---3 Wh-questions --- --- Wh-questions are of two kinds: ones that are like $NP - VP$ sentences, --- others that are like $S/NP - NP$ sentences. - - intVerbPhrase : IntPron -> VerbPhrase -> Question = \kto,spit -> - {s = table { _ => (predVerbPhrase kto spit).s } - } ; - - intSlash : IntPron -> SentenceSlashNounPhrase -> Question = \Kto, yaGovoru -> - let { kom = Kto.s ! (mkPronForm yaGovoru.c No NonPoss) ; o = yaGovoru.s2 } in - {s = table { _ => o ++ kom ++ yaGovoru.s } - } ; - ---3 Interrogative adverbials --- --- These adverbials will be defined in the lexicon: they include --- "когда", "где", "как", "почему", etc, which are all invariant one-word --- expressions. In addition, they can be formed by adding prepositions --- to interrogative pronouns, in the same way as adverbials are formed --- from noun phrases. N.B. we rely on record subtyping when ignoring the --- position component. - - IntAdverb = SS ; - --- A question adverbial can be applied to anything, and whether this makes --- sense is a semantic question. - - questAdverbial : IntAdverb -> NounPhrase -> VerbPhrase -> Question = - \kak, tu, pozhivaesh -> - {s = \\q => kak.s ++ tu.s ! (mkPronForm Nom No NonPoss) ++ - pozhivaesh.s2 ++ pozhivaesh.s ! VFin (gNum tu.g tu.n) tu.p ++ - pozhivaesh.s3 ! tu.g ! tu.n } ; - ---2 Imperatives --- --- We only consider second-person imperatives. - - Imperative: Type = { s: Gender => Number => Str } ; - - imperVerbPhrase : VerbPhrase -> Imperative = \budGotov -> - {s = \\g, n => budGotov.s ! VImper n P2 ++ budGotov.s2 ++ budGotov.s3 ! g ! n} ; - - imperUtterance : Gender -> Number -> Imperative -> Utterance = \g,n,I -> - ss (I.s ! g ! n ++ "!") ; - ---3 Coordinating sentences --- --- We need a category of lists of sentences. It is a discontinuous --- category, the parts corresponding to 'init' and 'last' segments --- (rather than 'head' and 'tail', because we have to keep track of the slot between --- the last two elements of the list). A list has at least two elements. - - ListSentence : Type = SD2 ; - - twoSentence : (_,_ : Sentence) -> ListSentence = CO.twoSS ; - - consSentence : ListSentence -> Sentence -> ListSentence = - CO.consSS CO.comma ; - --- To coordinate a list of sentences by a simple conjunction, we place --- it between the last two elements; commas are put in the other slots, --- e.g. "ты куришь, вы пьете и Ñ ÐµÐ¼". - - conjunctSentence : Conjunction -> ListSentence -> Sentence = \c,xs -> - ss (CO.conjunctX c xs) ; - --- To coordinate a list of sentences by a distributed conjunction, we place --- the first part (e.g. "как") in front of the first element, the second --- part ("так и") between the last two elements, and commas in the other slots. --- For sentences this is really not used. - - conjunctDistrSentence : ConjunctionDistr -> ListSentence -> Sentence = - \c,xs -> - ss (CO.conjunctDistrX c xs) ; - ---3 Coordinating adjective phrases --- --- The structure is the same as for sentences. The result is a prefix adjective --- if and only if all elements are prefix. - - ListAdjPhrase : Type = - {s1,s2 : AdjForm => Str ; p : Bool} ; - - twoAdjPhrase : (_,_ : AdjPhrase) -> ListAdjPhrase = \x,y -> - CO.twoTable AdjForm x y ** {p = andB x.p y.p} ; - - consAdjPhrase : ListAdjPhrase -> AdjPhrase -> ListAdjPhrase = \xs,x -> - CO.consTable AdjForm CO.comma xs x ** {p = andB xs.p x.p} ; - - conjunctAdjPhrase : Conjunction -> ListAdjPhrase -> AdjPhrase = \c,xs -> - CO.conjunctTable AdjForm c xs ** {p = xs.p} ; - - conjunctDistrAdjPhrase : ConjunctionDistr -> ListAdjPhrase -> AdjPhrase = \c,xs -> - CO.conjunctDistrTable AdjForm c xs ** {p = xs.p} ; - - ---3 Coordinating noun phrases --- --- The structure is the same as for sentences. The result is either always plural --- or plural if any of the components is, depending on the conjunction. - - ListNounPhrase : Type = { s1,s2 : PronForm => Str ; g: Gender ; - anim : Animacy ; n : Number ; p : Person ; pron : Bool } ; - - twoNounPhrase : (_,_ : NounPhrase) -> ListNounPhrase = \x,y -> - CO.twoTable PronForm x y ** {n = conjNumber x.n y.n ; - g = conjGender x.g y.g ; p = conjPerson x.p y.p ; - pron = conjPron x.pron y.pron ; anim = conjAnim x.anim y.anim } ; - - consNounPhrase : ListNounPhrase -> NounPhrase -> ListNounPhrase = \xs,x -> - CO.consTable PronForm CO.comma xs x ** - {n = conjNumber xs.n x.n ; g = conjGender x.g xs.g ; - anim = conjAnim x.anim xs.anim ; - p = conjPerson xs.p x.p; pron = conjPron xs.pron x.pron} ; - - conjunctNounPhrase : Conjunction -> ListNounPhrase -> NounPhrase = \c,xs -> - CO.conjunctTable PronForm c xs ** {n = conjNumber c.n xs.n ; - anim = xs.anim ; - p = xs.p; g = xs.g ; pron = xs.pron} ; - - conjunctDistrNounPhrase : ConjunctionDistr -> ListNounPhrase -> NounPhrase = - \c,xs -> - CO.conjunctDistrTable PronForm c xs ** {n = conjNumber c.n xs.n ; - p = xs.p ; pron = xs.pron ; anim = xs.anim ; - g = xs.g } ; - --- We have to define a calculus of numbers of persons. For numbers, --- it is like the conjunction with $Pl$ corresponding to $False$. - - conjNumber : Number -> Number -> Number = \m,n -> case of { - => Sg ; - _ => Pl - } ; - --- For persons, we let the latter argument win ("либо ты, либо Ñ Ð¿Ð¾Ð¹Ð´Ñƒ" --- but "либо Ñ, либо ты пойдешь"). This is not quite clear. - - conjPerson : Person -> Person -> Person = \_,p -> - p ; - --- For pron, we let the latter argument win - "Маша или Ð¼Ð¾Ñ Ð¼Ð°Ð¼Ð°" (Nominative case) --- but - "моей или Машина мама" (Genetive case) both corresponds to --- "Masha's or my mother"), which is actually not exactly correct, since --- different cases should be used - "Машина или Ð¼Ð¾Ñ Ð¼Ð°Ð¼Ð°". - - conjPron : Bool -> Bool -> Bool = \_,p -> - p ; - --- For gender in a similar manner as for person: --- Needed for adjective predicates like: --- "Маша или ÐžÐ»Ñ - краÑиваÑ", "Ðнтон или Олег - краÑивый", --- "Маша или Олег - краÑивый". --- The later is not totally correct, but there is no correct way to say that. - - conjGender : Gender -> Gender -> Gender = \_,m -> m ; - - conjAnim : Animacy -> Animacy -> Animacy = \_,m -> m ; - ---2 Subjunction --- --- Subjunctions ("когда", "еÑли", etc) --- are a different way to combine sentences than conjunctions. --- The main clause can be a sentence, an imperative, or a question, --- but the subjoined clause must be a sentence. --- --- There are uniformly two variant word orders, e.g. --- "еÑли ты закуришь, Ñ Ñ€Ð°ÑÑержуÑÑŒ" --- and "Ñ Ñ€Ð°ÑÑержуÑÑŒ, еÑли ты закуришь". - - Subjunction = SS ; - - subjunctSentence : Subjunction -> Sentence -> Sentence -> Sentence = - \if, A, B -> - ss (subjunctVariants if A.s B.s) ; - - subjunctImperative : Subjunction -> Sentence -> Imperative -> Imperative = - \if, A, B -> - {s = \\g,n => subjunctVariants if A.s (B.s ! g ! n)} ; - - subjunctQuestion : Subjunction -> Sentence -> Question -> Question = - \if, A, B -> - {s = \\q => subjunctVariants if A.s (B.s ! q)} ; - - subjunctVariants : Subjunction -> Str -> Str -> Str = \if,A,B -> - variants {if.s ++ A ++ "," ++ B ; B ++ "," ++ if.s ++ A} ; - ---2 One-word utterances --- --- An utterance can consist of one phrase of almost any category, --- the limiting case being one-word utterances. These --- utterances are often (but not always) in what can be called the --- default form of a category, e.g. the nominative. --- This list is far from exhaustive. - - useNounPhrase : NounPhrase -> Utterance = \masha -> - postfixSS "." (defaultNounPhrase masha) ; - - useCommonNounPhrase : Number -> CommNounPhrase -> Utterance = \n,mashina -> - useNounPhrase (indefNounPhrase n mashina) ; - - useRegularName : Gender -> SS -> NounPhrase = \g, masha -> - nameNounPhrase (case g of { Masc => mkProperNameMasc masha.s Animate; - _ => mkProperNameFem masha.s Animate }) ; - --- Here are some default forms. - - defaultNounPhrase : NounPhrase -> SS = \masha -> - ss (masha.s ! PF Nom No NonPoss) ; - - defaultQuestion : Question -> SS = \ktoTu -> - ss (ktoTu.s ! DirQ) ; - - defaultSentence : Sentence -> Utterance = \x -> - x ; -}; diff --git a/grammars/resource/russian/TestRus.gf b/grammars/resource/russian/TestRus.gf deleted file mode 100644 index 4a160afbe..000000000 --- a/grammars/resource/russian/TestRus.gf +++ /dev/null @@ -1,48 +0,0 @@ --- use this path to read the grammar from the same directory ---# -path=.:../abstract:../../prelude - -concrete TestRus of TestAbs = ResRus ** open Syntax in { - -flags - coding=utf8 ; - startcat=Phr ; lexer=text ; parser=chart ; unlexer=text ; - --- a random sample from the lexicon - -lin - Big = bolshoj ; - Small = malenkij ; - Old = staruj ; - Young = molodoj ; - - --Connection = cnNoHum (nounReg "connection") ** {s2 = "from" ; s3 = "to"} ; Fun2 - -- American = adj1Malenkij "американÑк" ; - -- Finnish = adj1Malenkij "финÑк" ; - -- Married = adjInvar "замужем" ** {s2 = "за"; c = instructive} ; - --Give = mkDitransVerb (verbNoPart (mkVerb "give" "gave" "given")) [] [] ; V3 - --Prefer = mkDitransVerb (mkVerb "prefer" "preferred" "preferred")) [] "to" ; V3 - - Man = muzhchina ; - Woman = zhenchina ; - Car = mashina ; - House = dom ; - Light = svet ; - Walk = extVerb verbGulyat Act Present ; - Run = extVerb verbBegat Act Present ; - Love = mkDirectVerb (extVerb verbLubit Act Present ) ; - Send = mkDirectVerb (extVerb verbOtpravlyat Act Present ) ; - Wait = mkDirectVerb (extVerb verbZhdat Act Present ); - Say = extVerb verbGovorit Act Present ; --- works in present tense... - Prove = extVerb verbDokazuvat Act Present ; - SwitchOn = mkDirectVerb (extVerb verbVkluchat Act Present ) ; - SwitchOff = mkDirectVerb (extVerb verbVukluchat Act Present ) ; - - Mother = funGen mama ; - Uncle = funGen dyadya ; - - Always = vsegda ; - Well = chorosho ; - - John = mkProperNameMasc "Иван" Animate ; - Mary = mkProperNameFem "Маш" Animate ; -}; diff --git a/grammars/resource/russian/Types.gf b/grammars/resource/russian/Types.gf deleted file mode 100644 index b9da5f4e3..000000000 --- a/grammars/resource/russian/Types.gf +++ /dev/null @@ -1,288 +0,0 @@ ---1 Russian Word Classes and Morphological Parameters --- --- Aarne Ranta, Janna Khegai 2003 --- --- This is a resource module for Russian morphology, defining the --- morphological parameters and word classes of Russian. It is aimed --- to be complete w.r.t. the description of word forms. --- However, it does not include those parameters that are not needed for --- analysing individual words: such parameters are defined in syntax modules. --- - -resource Types = open Prelude in { - -flags coding=utf8 ; - ---2 Enumerated parameter types --- --- These types are the ones found in school grammars. --- Their parameter values are atomic. - -param - Gender = Masc | Fem | Neut ; - Number = Sg | Pl ; - Case = Nom | Gen | Dat | Acc | Inst | Prepos ; - Voice = Act | Pass ; - Aspect = Imperfective | Perfective ; - Tense = Present | Past ; - Degree = Pos | Comp | Super ; - Person = P1 | P2 | P3 ; - AfterPrep = Yes | No ; - Possessive = NonPoss | Poss GenNum ; - Animacy = Animate | Inanimate ; - --- A number of Russian nouns have common gender. They can --- denote both males and females: "умница" (a clever person), "инженер" (an engineer). --- We overlook this phenomenon for now. - --- The AfterPrep parameter is introduced in order to describe --- the variations of the third person personal pronoun forms --- depending on whether they come after a preposition or not. - --- The Possessive parameter is introduced in order to describe --- the possessives of personal pronouns, which are used in the --- Genetive constructions like "мама моÑ" (my mother) instead of --- "мама менÑ" (the mother of mine). - ---2 Word classes and hierarchical parameter types --- --- Real parameter types (i.e. ones on which words and phrases depend) --- are mostly hierarchical. The alternative would be cross-products of --- simple parameters, but this would usually overgenerate. - --- However, we use the cross-products in complex cases --- (for example, aspect and tense parameter in the verb description) --- where the relationship between the parameters are non-trivial --- even though we aware that some combinations do not exist --- (for example, present perfective does not exist, but removing --- this combination would lead to having different descriptions --- for perfective and imperfective verbs, which we do not want for the --- sake of uniformity). - ---3 Nouns --- --- Common nouns decline according to number and case. --- For the sake of shorter description these parameters are --- combined in the type SubstForm. - - -param SubstForm = SF Number Case ; - --- Substantives moreover have an inherent gender. - -oper - CommNoun : Type = {s : SubstForm => Str ; g : Gender ; anim : Animacy } ; - numSF: SubstForm -> Number = \sf -> case sf of - { - SF Sg _ => Sg ; - _ => Pl - } ; - - caseSF: SubstForm -> Case = \sf -> case sf of - { - SF _ Nom => Nom ; - SF _ Gen => Gen ; - SF _ Dat => Dat ; - SF _ Inst => Inst ; - SF _ Acc => Acc ; - SF _ Prepos => Prepos - } ; - --- ---3 Pronouns --- - -oper - Pronoun : Type = { s : PronForm => Str ; n : Number ; - p : Person ; g: PronGen ; pron: Bool} ; - -param PronForm = PF Case AfterPrep Possessive; - --- Gender is not morphologically determined for first --- and second person pronouns. - - PronGen = PGen Gender | PNoGen ; - --- The following coercion is useful: - -oper - pgen2gen : PronGen -> Gender = \p -> case p of { - PGen g => g ; - PNoGen => variants {Masc ; Fem} --- the best we can do for ya, tu - } ; - -oper - extCase: PronForm -> Case = \pf -> case pf of - { PF Nom _ _ => Nom ; - PF Gen _ _ => Gen ; - PF Dat _ _ => Dat ; - PF Inst _ _ => Inst ; - PF Acc _ _ => Acc ; - PF Prepos _ _ => Prepos - } ; - - mkPronForm: Case -> AfterPrep -> Possessive -> PronForm = - \c,n,p -> PF c n p ; - ---3 Adjectives --- --- Adjectives is a very complex class. --- The major division is between the comparison degrees. - -param - AdjForm = AF Case Animacy GenNum ; - --- Declination forms depend on Case, Animacy , Gender: --- "большие дома" - "больших домов" (big houses - big houses'), --- Animacy plays role only in the Accusative case: --- "Ñ Ð»ÑŽÐ±Ð»ÑŽ большие дома"-"Ñ Ð»ÑŽÐ±Ð»ÑŽ больших мужчин" --- (I love big houses - I love big men); --- and on Number: "большой дом" - "большие дома" --- (a big house - big houses). --- The plural never makes a gender distinction. - - GenNum = ASg Gender | APl ; - -oper numGNum : GenNum -> Number = \gn -> - case gn of { APl => Pl ; _ => Sg } ; - -oper genGNum : GenNum -> Gender = \gn -> - case gn of { ASg Fem => Fem; _ => Masc } ; - -oper numAF: AdjForm -> Number = \af -> - case af of { AF _ _ gn => (numGNum gn) } ; - -oper caseAF: AdjForm -> Case = \af -> - case af of { AF c _ _ => c } ; - --- The Degree parameter should also be more complex, since most Russian --- adjectives have two comparative forms: --- attributive (syntactic (compound), declinable) - --- "более выÑокий" (corresponds to "more high") --- and predicative (indeclinable)- "выше" (higher) and more than one --- superlative forms: "Ñамый выÑокий" (corresponds to "the most high") - --- "наивыÑший" (the highest). - --- Even one more parameter independent of the degree can be added, --- since Russian adjectives in the positive degree also have two forms: --- long (attributive and predicative) - "выÑокий" (high) and short (predicative) - "выÑок" --- although this parameter will not be exactly orthogonal to the --- degree parameter. --- Short form has no case declension, so in principle --- it can be considered as an additional case. - --- Note: although the predicative usage of the long --- form is perfectly grammatical, it can have a slightly different meaning --- compared to the short form. --- For example: "он - больной" (long, predicative) vs. --- "он - болен" (short, predicative). - -oper - AdjDegr : Type = {s : Degree => AdjForm => Str} ; - --- Adjective type includes both non-degree adjective classes: --- possesive ("мамин"[mother's], "лиÑий" [fox'es]) --- and relative ("руÑÑкий" [Russian]) adjectives. - - Adjective : Type = {s : AdjForm => Str} ; - - ---3 Verbs - --- Mood is the main verb classification parameter. --- The verb mood can be infinitive, subjunctive, imperative, and indicative. - --- Note: subjunctive mood is analytical, i.e. formed from the past form of the --- indicative mood plus the particle "бы". That is why they have the same GenNum --- parameter. We choose to keep the "redundant" form in order to indicate --- the presence of the subjunctive mood in Russian verbs. - --- Aspect and Voice parameters are present in every mood, so Voice is put --- before the mood parameter in verb form description the hierachy. --- Moreover Aspect is regarded as an inherent parameter of a verb entry. --- The primary reason for that is that one imperfective form can have several --- perfective forms: "ломать" - "Ñ-ломать" - "по-ломать" (to break). --- Besides, the perfective form could be formed from imperfective --- by prefixation, but also by taking a completely different stem: --- "говорить"-"Ñказать" (to say). In the later case it is even natural to --- regard them as different verb entries. --- Another reason is that looking at the Aspect as an inherent verb parameter --- seem to be customary in other similar projects: --- http://starling.rinet.ru/morph.htm - --- Note: Of course, the whole inflection table has many redundancies --- in a sense that many verbs do not have all grammatically possible --- forms. For example, passive does not exist for the verb --- "любить" (to love), but exists for the verb "ломать" (to break). - --- Depending on the tense verbs conjugate according to combinations --- of gender, person and number of the verb objects. --- Participles (Present and Past) and Gerund forms are not included in the --- current description. This is the verb type used in the lexicon: - -oper Verbum : Type = { s: VerbForm => Str ; asp : Aspect }; - -param - - VerbForm = VFORM Voice VerbConj ; - VerbConj = VIND VTense | VIMP Number Person | VINF | VSUB GenNum ; - VTense = VPresent Number Person | VPast GenNum | VFuture Number Person ; - --- For writing an application grammar one usually doesn't need --- the whole inflection table, since each verb is used in --- a particular context that determines some of the parameters --- (Tense and Voice while Aspect is fixed from the beginning) for certain usage. --- So we define the "Verb" type, that have these parameters fixed. --- The conjugation parameters left (Gender, Number, Person) --- are combined in the "VF" type: - -param VF = - VFin GenNum Person | VImper Number Person | VInf | VSubj GenNum; - -oper - Verb : Type = {s : VF => Str ; t: Tense ; a : Aspect ; w: Voice} ; - - extVerb : Verbum -> Voice -> Tense -> Verb = \aller, vox, t -> - { s = table { - VFin gn p => case t of { - Present => aller.s ! VFORM vox (VIND (VPresent (numGNum gn) p)) ; - Past => aller.s ! VFORM vox (VIND (VPast gn)) - } ; - VImper n p => aller.s ! VFORM vox (VIMP n p) ; - VInf => aller.s ! VFORM vox VINF ; - VSubj gn => aller.s ! VFORM vox (VSUB gn) - }; t = t ; a = aller.asp ; w = vox } ; - - ---3 Other open classes --- --- Proper names and adverbs are the remaining open classes. - -oper - PNm : Type = {s : Case => Str ; g : Gender} ; - --- Adverbials are not inflected (we ignore comparison, and treat --- compared adverbials as separate expressions; this could be done another way). - - Adverb : Type = SS ; - - ---3 Closed classes --- --- The rest of the Russian word classes are closed, i.e. not extensible by new --- lexical entries. Thus we don't have to know how to build them, but only --- how to use them, i.e. which parameters they have. --- - ---3 Relative pronouns --- --- Relative pronouns are inflected in --- gender, number, and case just like adjectives. - - RelPron : Type = {s : GenNum => Case => Animacy => Str} ; - - ---3 Prepositions are just strings. - - Preposition = Str ; -}; diff --git a/grammars/resource/swedish/CombinationsSwe.gf b/grammars/resource/swedish/CombinationsSwe.gf deleted file mode 100644 index 4f8d57de3..000000000 --- a/grammars/resource/swedish/CombinationsSwe.gf +++ /dev/null @@ -1,210 +0,0 @@ ---# -path=.:../nabstract:../../prelude - ---1 The Top-Level Swedish Resource Grammar: Combination Rules --- --- Aarne Ranta 2002 -- 2003 --- --- This is the Swedish concrete syntax of the multilingual resource --- grammar. Most of the work is done in the file $SyntaxSwe.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 $TypesSwe.gf$. - -concrete CombinationsSwe of Combinations = open Prelude, SyntaxSwe in { - -flags - startcat=Phr ; - lexer=text ; - unlexer=text ; - -lincat - CN = {s : Number => SpeciesP => Case => Str ; g : Gender ; x : Sex ; - p : IsComplexCN} ; - N = CommNoun ; - -- = {s : Number => Species => Case => Str ; g : Gender ; x : Sex} ; - NP = NounPhrase ; - -- = {s : NPForm => Str ; g : Gender ; n : Number} ; - PN = {s : Case => Str ; g : Gender ; x : Sex} ; - Det = {s : Gender => Sex => Str ; n : Number ; b : SpeciesP} ; - Fun = Function ; - -- = CommNoun ** {s2 : Preposition} ; - Fun2 = Function ** {s3 : Preposition} ; - Num = {s : Case => Str} ; - Prep = {s : Str} ; - - Adj1 = Adjective ; - -- = {s : AdjFormPos => Case => Str} ; - Adj2 = Adjective ** {s2 : Preposition} ; - AdjDeg = {s : AdjForm => Str} ; - AP = Adjective ** {p : IsPostfixAdj} ; - - V = Verb ; - -- = {s : VForm => Str} ; - VG = Verb ** {s2 : Bool => Str ; s3 : Gender => Number => Str} ; - VP = Verb ** {s2 : Str ; s3 : Gender => Number => Str} ; - TV = TransVerb ; - -- = Verb ** {s2 : Preposition} ; - V3 = TransVerb ** {s3 : Preposition} ; - VS = Verb ; - VV = Verb ** {isAux : Bool} ; - - AdV = {s : Str ; isPost : Bool} ; - - S = Sentence ; - -- = {s : Order => Str} ; - Slash = Sentence ** {s2 : Preposition} ; - RP = {s : RelCase => GenNum => Str ; g : RelGender} ; - RC = {s : GenNum => Str} ; - IP = NounPhrase ; - Qu = {s : QuestForm => Str} ; - Imp = {s : Number => Str} ; - - Phr = {s : Str} ; - - Conj = {s : Str ; n : Number} ; - ConjD = {s1 : Str ; s2 : Str ; n : Number} ; - - ListS = {s1,s2 : Order => Str} ; - ListAP = {s1,s2 : AdjFormPos => Case => Str ; p : Bool} ; - ListNP = {s1,s2 : NPForm => Str ; g : Gender ; n : Number} ; - ---. - -lin - UseN = noun2CommNounPhrase ; - ModAdj = modCommNounPhrase ; - ModGenOne = npGenDet singular noNum ; - ModGenMany = npGenDet plural ; - UsePN = nameNounPhrase ; - UseFun = funAsCommNounPhrase ; - AppFun = appFunComm ; - AppFun2 = appFun2 ; - AdjP1 = adj2adjPhrase ; - ComplAdj = complAdj ; - PositAdjP = positAdjPhrase ; - ComparAdjP = comparAdjPhrase ; - SuperlNP = superlNounPhrase ; - - DetNP = detNounPhrase ; - IndefOneNP = indefNounPhrase singular ; - IndefManyNP = indefNounPhraseNum plural ; - DefOneNP = defNounPhrase singular ; - DefManyNP = defNounPhraseNum plural ; - MassNP = detNounPhrase (mkDeterminerSg (detSgInvar []) IndefP) ; - UseInt i = {s = table {Nom => i.s ; Gen => i.s ++ "s"}} ; --- - NoNum = noNum ; - - CNthatS = nounThatSentence ; - - PredVP = predVerbPhrase ; - PosVG = predVerbGroup True ; - NegVG = predVerbGroup False ; - - PredV = predVerb ; - PredAP = predAdjective ; - PredCN = predCommNoun ; - PredTV = complTransVerb ; - PredV3 = complDitransVerb ; - PredPassV = passVerb ; - PredNP = predNounPhrase ; - PredAdV = predAdverb ; - PredVS = complSentVerb ; - PredVV = complVerbVerb ; - VTrans = transAsVerb ; - - AdjAdv a = advPost (a.s ! adverbForm ! Nom) ; - PrepNP p = prepPhrase p.s ; --- - AdvVP = adVerbPhrase ; - AdvCN = advCommNounPhrase ; - AdvAP = advAdjPhrase ; - - ThereIsCN A = predVerbPhrase npDet - (predVerbGroup True - (complTransVerb (mkDirectVerb verbFinnas) - (indefNounPhrase singular A))) ; - ThereAreCN n A = predVerbPhrase npDet - (predVerbGroup True - (complTransVerb (mkDirectVerb verbFinnas) - (indefNounPhraseNum plural n A))) ; - - PosSlashTV = slashTransVerb True ; - NegSlashTV = slashTransVerb False ; - OneVP = predVerbPhrase npMan ; - - IdRP = identRelPron ; - FunRP = funRelPron ; - RelVP = relVerbPhrase ; - RelSlash = relSlash ; - ModRC = modRelClause ; - RelSuch = relSuch ; - - WhoOne = intPronWho singular ; - WhoMany = intPronWho plural ; - WhatOne = intPronWhat singular ; - WhatMany = intPronWhat plural ; - FunIP = funIntPron ; - NounIPOne = nounIntPron singular ; - NounIPMany = nounIntPron plural ; - - QuestVP = questVerbPhrase ; - IntVP = intVerbPhrase ; - IntSlash = intSlash ; - QuestAdv = questAdverbial ; - IsThereCN A = questVerbPhrase npDet - (predVerbGroup True - (complTransVerb (mkDirectVerb verbFinnas) - (indefNounPhrase singular A))) ; - AreThereCN n A = questVerbPhrase npDet - (predVerbGroup True - (complTransVerb (mkDirectVerb verbFinnas) - (indefNounPhraseNum plural n A))) ; - - - ImperVP = imperVerbPhrase ; - - IndicPhrase = indicUtt ; - QuestPhrase = interrogUtt ; - ImperOne = imperUtterance singular ; - ImperMany = imperUtterance plural ; - - AdvS = advSentence ; - - TwoS = twoSentence ; - ConsS = consSentence ; - ConjS = conjunctSentence ; - ConjDS = conjunctDistrSentence ; - - TwoAP = twoAdjPhrase ; - ConsAP = consAdjPhrase ; - ConjAP = conjunctAdjPhrase ; - ConjDAP = conjunctDistrAdjPhrase ; - - TwoNP = twoNounPhrase ; - ConsNP = consNounPhrase ; - ConjNP = conjunctNounPhrase ; - ConjDNP = conjunctDistrNounPhrase ; - - SubjS = subjunctSentence ; - SubjImper = subjunctImperative ; - SubjQu = subjunctQuestion ; - SubjVP = subjunctVerbPhrase ; - - PhrNP = useNounPhrase ; - PhrOneCN = useCommonNounPhrase singular ; - PhrManyCN = useCommonNounPhrase plural ; - PhrIP ip = ip ; - PhrIAdv ia = ia ; - - OnePhr p = p ; - ConsPhr = cc2 ; - -} ; diff --git a/grammars/resource/swedish/MorphoSwe.gf b/grammars/resource/swedish/MorphoSwe.gf deleted file mode 100644 index b742fe455..000000000 --- a/grammars/resource/swedish/MorphoSwe.gf +++ /dev/null @@ -1,1162 +0,0 @@ ---1 A Simple Swedish Resource Morphology --- --- Aarne Ranta 2002 --- --- This resource morphology contains definitions needed in the resource --- syntax. It moreover contains copies of the most usual inflectional patterns --- as defined in functional morphology (in the Haskell file $RulesSw.hs$). --- --- We use the parameter types and word classes defined for morphology. - -resource MorphoSwe = TypesSwe ** open Prelude in { - --- The indefinite and definite article -oper - artIndef = table {Utr => "en" ; Neutr => "ett"} ; - - artDef : Bool => GenNum => Str = table { - True => table { - ASg Utr => "den" ; - ASg Neutr => "det" ; -- det gamla huset - APl => variants {"de" ; "dom"} - } ; - False => table {_ => []} -- huset - } ; - --- A simplified verb category: present tense only. -oper - verbVara = extVerb Act vara_1200 ; - verbHava = extVerb Act hava_1198 ; - verbFinnas = mkVerb "finnas" "finns" "finns" ; - --- A simplified conjugation takes three forms in the worst case. - - mkVerb : (supa,super,sup : Str) -> Verb = \supa,super,sup -> - {s = table { - VPres Infinit Act => supa ; - VPres Infinit Pass => supa + "s" ; - VPres Indicat Act => super ; - VPres Indicat Pass => sup + "s" ; - VPres Imperat Act => sup ; - VPres Imparat Pass => sup + "s" - } - } ; - --- Prepositions are just strings. - Preposition = Str ; - --- Relative pronouns have a special case system. $RPrep$ is the form used --- after a preposition (e.g. "det hus i vilket jag bor"). -param - RelCase = RNom | RAcc | RGen | RPrep ; - -oper - relPronForms : RelCase => GenNum => Str = table { - RNom => \\_ => "som" ; - RAcc => \\_ => variants {"som" ; []} ; - RGen => \\_ => "vars" ; - RPrep => pronVilken - } ; - - pronVilken = table { - ASg Utr => "vilken" ; - ASg Neutr => "vilket" ; - APl => "vilka" - } ; - - pronSådan = table { - ASg Utr => "sådan" ; - ASg Neutr => "sådant" ; - APl => "sådana" - } ; - --- What follows are machine-generated inflection paradigms from functional --- morphology. Hence they are low-level paradigms, without any --- abstractions or generalizations: the Haskell code is better in these respects. --- --- The variable names are selected in such a way that the paradigms can be read --- as inflection tables of certain words. - -oper sApa : Str -> Subst = \ap -> - {s = table { - SF Sg Indef Nom => ap + "a" ; - SF Sg Indef Gen => ap + "as" ; - SF Sg Def Nom => ap + "an" ; - SF Sg Def Gen => ap + "ans" ; - SF Pl Indef Nom => ap + "or" ; - SF Pl Indef Gen => ap + "ors" ; - SF Pl Def Nom => ap + "orna" ; - SF Pl Def Gen => ap + "ornas" - } ; - h1 = Utr - } ; - -oper sBil : Str -> Subst = \bil -> - {s = table { - SF Sg Indef Nom => bil ; - SF Sg Indef Gen => bil + "s" ; - SF Sg Def Nom => bil + "en" ; - SF Sg Def Gen => bil + "ens" ; - SF Pl Indef Nom => bil + "ar" ; - SF Pl Indef Gen => bil + "ars" ; - SF Pl Def Nom => bil + "arna" ; - SF Pl Def Gen => bil + "arnas" - } ; - h1 = Utr - } ; - -oper sPojke : Str -> Subst = \pojk -> - {s = table { - SF Sg Indef Nom => pojk + "e" ; - SF Sg Indef Gen => pojk + "es" ; - SF Sg Def Nom => pojk + "en" ; - SF Sg Def Gen => pojk + "ens" ; - SF Pl Indef Nom => pojk + "ar" ; - SF Pl Indef Gen => pojk + "ars" ; - SF Pl Def Nom => pojk + "arna" ; - SF Pl Def Gen => pojk + "arnas" - } ; - h1 = Utr - } ; - -oper sNyckel : Str -> Subst = \nyck -> - {s = table { - SF Sg Indef Nom => nyck + "el" ; - SF Sg Indef Gen => nyck + "els" ; - SF Sg Def Nom => nyck + "eln" ; - SF Sg Def Gen => nyck + "elns" ; - SF Pl Indef Nom => nyck + "lar" ; - SF Pl Indef Gen => nyck + "lars" ; - SF Pl Def Nom => nyck + "larna" ; - SF Pl Def Gen => nyck + "larnas" - } ; - h1 = Utr - } ; - -oper sKam : Str -> Subst = \kam -> - {s = table { - SF Sg Indef Nom => kam ; - SF Sg Indef Gen => kam + "s" ; - SF Sg Def Nom => kam + "men" ; - SF Sg Def Gen => kam + "mens" ; - SF Pl Indef Nom => kam + "mar" ; - SF Pl Indef Gen => kam + "mars" ; - SF Pl Def Nom => kam + "marna" ; - SF Pl Def Gen => kam + "marnas" - } ; - h1 = Utr - } ; - -oper sSak : Str -> Subst = \sak -> - {s = table { - SF Sg Indef Nom => sak ; - SF Sg Indef Gen => sak + "s" ; - SF Sg Def Nom => sak + "en" ; - SF Sg Def Gen => sak + "ens" ; - SF Pl Indef Nom => sak + "er" ; - SF Pl Indef Gen => sak + "ers" ; - SF Pl Def Nom => sak + "erna" ; - SF Pl Def Gen => sak + "ernas" - } ; - h1 = Utr - } ; - -oper sVarelse : Str -> Subst = \varelse -> - {s = table { - SF Sg Indef Nom => varelse ; - SF Sg Indef Gen => varelse + "s" ; - SF Sg Def Nom => varelse + "n" ; - SF Sg Def Gen => varelse + "ns" ; - SF Pl Indef Nom => varelse + "r" ; - SF Pl Indef Gen => varelse + "rs" ; - SF Pl Def Nom => varelse + "rna" ; - SF Pl Def Gen => varelse + "rnas" - } ; - h1 = Utr - } ; - -oper sNivå : Str -> Subst = \nivå -> - {s = table { - SF Sg Indef Nom => nivå ; - SF Sg Indef Gen => nivå + "s" ; - SF Sg Def Nom => nivå + "n" ; - SF Sg Def Gen => nivå + "ns" ; - SF Pl Indef Nom => nivå + "er" ; - SF Pl Indef Gen => nivå + "ers" ; - SF Pl Def Nom => nivå + "erna" ; - SF Pl Def Gen => nivå + "ernas" - } ; - h1 = Utr - } ; - -oper sParti : Str -> Subst = \parti -> - {s = table { - SF Sg Indef Nom => parti ; - SF Sg Indef Gen => parti + "s" ; - SF Sg Def Nom => parti + "et" ; - SF Sg Def Gen => parti + "ets" ; - SF Pl Indef Nom => parti + "er" ; - SF Pl Indef Gen => parti + "ers" ; - SF Pl Def Nom => parti + "erna" ; - SF Pl Def Gen => parti + "ernas" - } ; - h1 = Neutr - } ; - -oper sMuseum : Str -> Subst = \muse -> - {s = table { - SF Sg Indef Nom => muse + "um" ; - SF Sg Indef Gen => muse + "ums" ; - SF Sg Def Nom => muse + "et" ; - SF Sg Def Gen => muse + "ets" ; - SF Pl Indef Nom => muse + "er" ; - SF Pl Indef Gen => muse + "ers" ; - SF Pl Def Nom => muse + "erna" ; - SF Pl Def Gen => muse + "ernas" - } ; - h1 = Neutr - } ; - -oper sRike : Str -> Subst = \rike -> - {s = table { - SF Sg Indef Nom => rike ; - SF Sg Indef Gen => rike + "s" ; - SF Sg Def Nom => rike + "t" ; - SF Sg Def Gen => rike + "ts" ; - SF Pl Indef Nom => rike + "n" ; - SF Pl Indef Gen => rike + "ns" ; - SF Pl Def Nom => rike + "na" ; - SF Pl Def Gen => rike + "nas" - } ; - h1 = Neutr - } ; - -oper sLik : Str -> Subst = \lik -> - {s = table { - SF Sg Indef Nom => lik ; - SF Sg Indef Gen => lik + "s" ; - SF Sg Def Nom => lik + "et" ; - SF Sg Def Gen => lik + "ets" ; - SF Pl Indef Nom => lik ; - SF Pl Indef Gen => lik + "s" ; - SF Pl Def Nom => lik + "en" ; - SF Pl Def Gen => lik + "ens" - } ; - h1 = Neutr - } ; - -oper sRum : Str -> Subst = \rum -> - {s = table { - SF Sg Indef Nom => rum ; - SF Sg Indef Gen => rum + "s" ; - SF Sg Def Nom => rum + "met" ; - SF Sg Def Gen => rum + "mets" ; - SF Pl Indef Nom => rum ; - SF Pl Indef Gen => rum + "s" ; - SF Pl Def Nom => rum + "men" ; - SF Pl Def Gen => rum + "mens" - } ; - h1 = Neutr - } ; - -oper sHus : Str -> Subst = \hus -> - {s = table { - SF Sg Indef Nom => hus ; - SF Sg Indef Gen => hus ; - SF Sg Def Nom => hus + "et" ; - SF Sg Def Gen => hus + "ets" ; - SF Pl Indef Nom => hus ; - SF Pl Indef Gen => hus ; - SF Pl Def Nom => hus + "en" ; - SF Pl Def Gen => hus + "ens" - } ; - h1 = Neutr - } ; - -oper sPapper : Str -> Subst = \papp -> - {s = table { - SF Sg Indef Nom => papp + "er" ; - SF Sg Indef Gen => papp + "ers" ; - SF Sg Def Nom => papp + "ret" ; - SF Sg Def Gen => papp + "rets" ; - SF Pl Indef Nom => papp + "er" ; - SF Pl Indef Gen => papp + "ers" ; - SF Pl Def Nom => papp + "ren" ; - SF Pl Def Gen => papp + "rens" - } ; - h1 = Neutr - } ; - -oper sNummer : Str -> Subst = \num -> - {s = table { - SF Sg Indef Nom => num + "mer" ; - SF Sg Indef Gen => num + "mers" ; - SF Sg Def Nom => num + "ret" ; - SF Sg Def Gen => num + "rets" ; - SF Pl Indef Nom => num + "mer" ; - SF Pl Indef Gen => num + "mers" ; - SF Pl Def Nom => num + "ren" ; - SF Pl Def Gen => num + "rens" - } ; - h1 = Neutr - } ; - -oper sKikare : Str -> Subst = \kikar -> - {s = table { - SF Sg Indef Nom => kikar + "e" ; - SF Sg Indef Gen => kikar + "es" ; - SF Sg Def Nom => kikar + "en" ; - SF Sg Def Gen => kikar + "ens" ; - SF Pl Indef Nom => kikar + "e" ; - SF Pl Indef Gen => kikar + "es" ; - SF Pl Def Nom => kikar + "na" ; - SF Pl Def Gen => kikar + "nas" - } ; - h1 = Utr - } ; - -oper sProgram : Str -> Subst = \program -> - {s = table { - SF Sg Indef Nom => program ; - SF Sg Indef Gen => program + "s" ; - SF Sg Def Nom => program + "met" ; - SF Sg Def Gen => program + "mets" ; - SF Pl Indef Nom => program ; - SF Pl Indef Gen => program + "s" ; - SF Pl Def Nom => program + "men" ; - SF Pl Def Gen => program + "mens" - } ; - h1 = Neutr - } ; - -oper aFin : Str -> Adj = \fin -> - {s = table { - AF (Posit (Strong (ASg Utr))) Nom => fin ; - AF (Posit (Strong (ASg Utr))) Gen => fin + "s" ; - AF (Posit (Strong (ASg Neutr))) Nom => fin + "t" ; - AF (Posit (Strong (ASg Neutr))) Gen => fin + "ts" ; - AF (Posit (Strong APl)) Nom => fin + "a" ; - AF (Posit (Strong APl)) Gen => fin + "as" ; - AF (Posit (Weak (AxSg NoMasc))) Nom => fin + "a" ; - AF (Posit (Weak (AxSg NoMasc))) Gen => fin + "as" ; - AF (Posit (Weak (AxSg Masc))) Nom => fin + "e" ; - AF (Posit (Weak (AxSg Masc))) Gen => fin + "es" ; - AF (Posit (Weak AxPl)) Nom => fin + "a" ; - AF (Posit (Weak AxPl)) Gen => fin + "as" ; - AF Compar Nom => fin + "are" ; - AF Compar Gen => fin + "ares" ; - AF (Super SupStrong) Nom => fin + "ast" ; - AF (Super SupStrong) Gen => fin + "asts" ; - AF (Super SupWeak) Nom => fin + "aste" ; - AF (Super SupWeak) Gen => fin + "astes" - } - } ; - -oper aFager : Str -> Adj = \fag -> - {s = table { - AF (Posit (Strong (ASg Utr))) Nom => fag + "er" ; - AF (Posit (Strong (ASg Utr))) Gen => fag + "ers" ; - AF (Posit (Strong (ASg Neutr))) Nom => fag + "ert" ; - AF (Posit (Strong (ASg Neutr))) Gen => fag + "erts" ; - AF (Posit (Strong APl)) Nom => fag + "era" ; - AF (Posit (Strong APl)) Gen => fag + "eras" ; - AF (Posit (Weak (AxSg NoMasc))) Nom => fag + "era" ; - AF (Posit (Weak (AxSg NoMasc))) Gen => fag + "eras" ; - AF (Posit (Weak (AxSg Masc))) Nom => fag + "ere" ; - AF (Posit (Weak (AxSg Masc))) Gen => fag + "eres" ; - AF (Posit (Weak AxPl)) Nom => fag + "era" ; - AF (Posit (Weak AxPl)) Gen => fag + "eras" ; - AF Compar Nom => fag + "erare" ; - AF Compar Gen => fag + "erares" ; - AF (Super SupStrong) Nom => fag + "erast" ; - AF (Super SupStrong) Gen => fag + "erasts" ; - AF (Super SupWeak) Nom => fag + "eraste" ; - AF (Super SupWeak) Gen => fag + "erastes" - } - } ; - -oper aGrund : Str -> Adj = \grun -> - {s = table { - AF (Posit (Strong (ASg Utr))) Nom => grun + "d" ; - AF (Posit (Strong (ASg Utr))) Gen => grun + "ds" ; - AF (Posit (Strong (ASg Neutr))) Nom => grun + "t" ; - AF (Posit (Strong (ASg Neutr))) Gen => grun + "ts" ; - AF (Posit (Strong APl)) Nom => grun + "da" ; - AF (Posit (Strong APl)) Gen => grun + "das" ; - AF (Posit (Weak (AxSg NoMasc))) Nom => grun + "da" ; - AF (Posit (Weak (AxSg NoMasc))) Gen => grun + "das" ; - AF (Posit (Weak (AxSg Masc))) Nom => grun + "de" ; - AF (Posit (Weak (AxSg Masc))) Gen => grun + "des" ; - AF (Posit (Weak AxPl)) Nom => grun + "da" ; - AF (Posit (Weak AxPl)) Gen => grun + "das" ; - AF Compar Nom => grun + "dare" ; - AF Compar Gen => grun + "dares" ; - AF (Super SupStrong) Nom => grun + "dast" ; - AF (Super SupStrong) Gen => grun + "dasts" ; - AF (Super SupWeak) Nom => grun + "daste" ; - AF (Super SupWeak) Gen => grun + "dastes" - } - } ; - -oper aVid : Str -> Adj = \vi -> - {s = table { - AF (Posit (Strong (ASg Utr))) Nom => vi + "d" ; - AF (Posit (Strong (ASg Utr))) Gen => vi + "ds" ; - AF (Posit (Strong (ASg Neutr))) Nom => vi + "tt" ; - AF (Posit (Strong (ASg Neutr))) Gen => vi + "tts" ; - AF (Posit (Strong APl)) Nom => vi + "da" ; - AF (Posit (Strong APl)) Gen => vi + "das" ; - AF (Posit (Weak (AxSg NoMasc))) Nom => vi + "da" ; - AF (Posit (Weak (AxSg NoMasc))) Gen => vi + "das" ; - AF (Posit (Weak (AxSg Masc))) Nom => vi + "de" ; - AF (Posit (Weak (AxSg Masc))) Gen => vi + "des" ; - AF (Posit (Weak AxPl)) Nom => vi + "da" ; - AF (Posit (Weak AxPl)) Gen => vi + "das" ; - AF Compar Nom => vi + "dare" ; - AF Compar Gen => vi + "dares" ; - AF (Super SupStrong) Nom => vi + "dast" ; - AF (Super SupStrong) Gen => vi + "dasts" ; - AF (Super SupWeak) Nom => vi + "daste" ; - AF (Super SupWeak) Gen => vi + "dastes" - } - } ; - -oper aVaken : Str -> Adj = \vak -> - {s = table { - AF (Posit (Strong (ASg Utr))) Nom => vak + "en" ; - AF (Posit (Strong (ASg Utr))) Gen => vak + "ens" ; - AF (Posit (Strong (ASg Neutr))) Nom => vak + "et" ; - AF (Posit (Strong (ASg Neutr))) Gen => vak + "ets" ; - AF (Posit (Strong APl)) Nom => vak + "na" ; - AF (Posit (Strong APl)) Gen => vak + "nas" ; - AF (Posit (Weak (AxSg NoMasc))) Nom => vak + "na" ; - AF (Posit (Weak (AxSg NoMasc))) Gen => vak + "nas" ; - AF (Posit (Weak (AxSg Masc))) Nom => vak + "ne" ; - AF (Posit (Weak (AxSg Masc))) Gen => vak + "nes" ; - AF (Posit (Weak AxPl)) Nom => vak + "na" ; - AF (Posit (Weak AxPl)) Gen => vak + "nas" ; - AF Compar Nom => vak + "nare" ; - AF Compar Gen => vak + "nares" ; - AF (Super SupStrong) Nom => vak + "nast" ; - AF (Super SupStrong) Gen => vak + "nasts" ; - AF (Super SupWeak) Nom => vak + "naste" ; - AF (Super SupWeak) Gen => vak + "nastes" - } - } ; - -oper aKorkad : Str -> Adj = \korka -> - {s = table { - AF (Posit (Strong (ASg Utr))) Nom => korka + "d" ; - AF (Posit (Strong (ASg Utr))) Gen => korka + "ds" ; - AF (Posit (Strong (ASg Neutr))) Nom => korka + "t" ; - AF (Posit (Strong (ASg Neutr))) Gen => korka + "ts" ; - AF (Posit (Strong APl)) Nom => korka + "de" ; - AF (Posit (Strong APl)) Gen => korka + "des" ; - AF (Posit (Weak (AxSg NoMasc))) Nom => korka + "de" ; - AF (Posit (Weak (AxSg NoMasc))) Gen => korka + "des" ; - AF (Posit (Weak (AxSg Masc))) Nom => korka + "de" ; - AF (Posit (Weak (AxSg Masc))) Gen => korka + "des" ; - AF (Posit (Weak AxPl)) Nom => korka + "de" ; - AF (Posit (Weak AxPl)) Gen => korka + "des" ; - AF Compar Nom => variants {} ; - AF Compar Gen => variants {} ; - AF (Super SupStrong) Nom => variants {} ; - AF (Super SupStrong) Gen => variants {} ; - AF (Super SupWeak) Nom => variants {} ; - AF (Super SupWeak) Gen => variants {} - } - } ; - -oper aAbstrakt : Str -> Adj = \abstrakt -> - {s = table { - AF (Posit (Strong (ASg Utr))) Nom => abstrakt ; - AF (Posit (Strong (ASg Utr))) Gen => abstrakt + "s" ; - AF (Posit (Strong (ASg Neutr))) Nom => abstrakt ; - AF (Posit (Strong (ASg Neutr))) Gen => abstrakt + "s" ; - AF (Posit (Strong APl)) Nom => abstrakt + "a" ; - AF (Posit (Strong APl)) Gen => abstrakt + "as" ; - AF (Posit (Weak (AxSg NoMasc))) Nom => abstrakt + "a" ; - AF (Posit (Weak (AxSg NoMasc))) Gen => abstrakt + "as" ; - AF (Posit (Weak (AxSg Masc))) Nom => abstrakt + "e" ; - AF (Posit (Weak (AxSg Masc))) Gen => abstrakt + "es" ; - AF (Posit (Weak AxPl)) Nom => abstrakt + "a" ; - AF (Posit (Weak AxPl)) Gen => abstrakt + "as" ; - AF Compar Nom => abstrakt + "are" ; - AF Compar Gen => abstrakt + "ares" ; - AF (Super SupStrong) Nom => abstrakt + "ast" ; - AF (Super SupStrong) Gen => abstrakt + "asts" ; - AF (Super SupWeak) Nom => abstrakt + "aste" ; - AF (Super SupWeak) Gen => abstrakt + "astes" - } - } ; - -oper vTala : Str -> Verbum = \tal -> - {s = table { - VF (Pres Ind Act) => tal + "ar" ; - VF (Pres Ind Pass) => tal + "as" ; - VF (Pres Cnj Act) => tal + "e" ; - VF (Pres Cnj Pass) => tal + "es" ; - VF (Pret Ind Act) => tal + "ade" ; - VF (Pret Ind Pass) => tal + "ades" ; - VF (Pret Cnj Act) => tal + "ade" ; - VF (Pret Cnj Pass) => tal + "ades" ; - VF Imper => tal + "a" ; - VI (Inf Act) => tal + "a" ; - VI (Inf Pass) => tal + "as" ; - VI (Supin Act) => tal + "at" ; - VI (Supin Pass) => tal + "ats" ; - VI (PtPres Nom) => tal + "ande" ; - VI (PtPres Gen) => tal + "andes" ; - VI (PtPret (Strong (ASg Utr)) Nom) => tal + "ad" ; - VI (PtPret (Strong (ASg Utr)) Gen) => tal + "ads" ; - VI (PtPret (Strong (ASg Neutr)) Nom) => tal + "at" ; - VI (PtPret (Strong (ASg Neutr)) Gen) => tal + "ats" ; - VI (PtPret (Strong APl) Nom) => tal + "ade" ; - VI (PtPret (Strong APl) Gen) => tal + "ades" ; - VI (PtPret (Weak (AxSg NoMasc)) Nom) => tal + "ade" ; - VI (PtPret (Weak (AxSg NoMasc)) Gen) => tal + "ades" ; - VI (PtPret (Weak (AxSg Masc)) Nom) => tal + "ade" ; - VI (PtPret (Weak (AxSg Masc)) Gen) => tal + "ades" ; - VI (PtPret (Weak AxPl) Nom) => tal + "ade" ; - VI (PtPret (Weak AxPl) Gen) => tal + "ades" - } - } ; - -oper vLeka : Str -> Verbum = \lek -> - {s = table { - VF (Pres Ind Act) => lek + "er" ; - VF (Pres Ind Pass) => variants {lek + "s" ; lek + "es"} ; - VF (Pres Cnj Act) => lek + "e" ; - VF (Pres Cnj Pass) => lek + "es" ; - VF (Pret Ind Act) => lek + "te" ; - VF (Pret Ind Pass) => lek + "tes" ; - VF (Pret Cnj Act) => lek + "te" ; - VF (Pret Cnj Pass) => lek + "tes" ; - VF Imper => lek ; - VI (Inf Act) => lek + "a" ; - VI (Inf Pass) => lek + "as" ; - VI (Supin Act) => lek + "t" ; - VI (Supin Pass) => lek + "ts" ; - VI (PtPres Nom) => lek + "ande" ; - VI (PtPres Gen) => lek + "andes" ; - VI (PtPret (Strong (ASg Utr)) Nom) => lek + "t" ; - VI (PtPret (Strong (ASg Utr)) Gen) => lek + "ts" ; - VI (PtPret (Strong (ASg Neutr)) Nom) => lek + "t" ; - VI (PtPret (Strong (ASg Neutr)) Gen) => lek + "ts" ; - VI (PtPret (Strong APl) Nom) => lek + "ta" ; - VI (PtPret (Strong APl) Gen) => lek + "tas" ; - VI (PtPret (Weak (AxSg NoMasc)) Nom) => lek + "ta" ; - VI (PtPret (Weak (AxSg NoMasc)) Gen) => lek + "tas" ; - VI (PtPret (Weak (AxSg Masc)) Nom) => lek + "te" ; - VI (PtPret (Weak (AxSg Masc)) Gen) => lek + "tes" ; - VI (PtPret (Weak AxPl) Nom) => lek + "ta" ; - VI (PtPret (Weak AxPl) Gen) => lek + "tas" - } - } ; - -oper vTyda : Str -> Verbum = \ty -> - {s = table { - VF (Pres Ind Act) => ty + "der" ; - VF (Pres Ind Pass) => variants {ty + "ds" ; ty + "des"} ; - VF (Pres Cnj Act) => ty + "de" ; - VF (Pres Cnj Pass) => ty + "des" ; - VF (Pret Ind Act) => ty + "dde" ; - VF (Pret Ind Pass) => ty + "ddes" ; - VF (Pret Cnj Act) => ty + "dde" ; - VF (Pret Cnj Pass) => ty + "ddes" ; - VF Imper => ty + "d" ; - VI (Inf Act) => ty + "da" ; - VI (Inf Pass) => ty + "das" ; - VI (Supin Act) => ty + "tt" ; - VI (Supin Pass) => ty + "tts" ; - VI (PtPres Nom) => ty + "dande" ; - VI (PtPres Gen) => ty + "dandes" ; - VI (PtPret (Strong (ASg Utr)) Nom) => ty + "dd" ; - VI (PtPret (Strong (ASg Utr)) Gen) => ty + "dds" ; - VI (PtPret (Strong (ASg Neutr)) Nom) => ty + "tt" ; - VI (PtPret (Strong (ASg Neutr)) Gen) => ty + "tts" ; - VI (PtPret (Strong APl) Nom) => ty + "dda" ; - VI (PtPret (Strong APl) Gen) => ty + "ddas" ; - VI (PtPret (Weak (AxSg NoMasc)) Nom) => ty + "dda" ; - VI (PtPret (Weak (AxSg NoMasc)) Gen) => ty + "ddas" ; - VI (PtPret (Weak (AxSg Masc)) Nom) => ty + "dde" ; - VI (PtPret (Weak (AxSg Masc)) Gen) => ty + "ddes" ; - VI (PtPret (Weak AxPl) Nom) => ty + "dda" ; - VI (PtPret (Weak AxPl) Gen) => ty + "ddas" - } - } ; - -oper vVända : Str -> Verbum = \vän -> - {s = table { - VF (Pres Ind Act) => vän + "der" ; - VF (Pres Ind Pass) => variants {vän + "ds" ; vän + "des"} ; - VF (Pres Cnj Act) => vän + "de" ; - VF (Pres Cnj Pass) => vän + "des" ; - VF (Pret Ind Act) => vän + "de" ; - VF (Pret Ind Pass) => vän + "des" ; - VF (Pret Cnj Act) => vän + "de" ; - VF (Pret Cnj Pass) => vän + "des" ; - VF Imper => vän + "d" ; - VI (Inf Act) => vän + "da" ; - VI (Inf Pass) => vän + "das" ; - VI (Supin Act) => vän + "t" ; - VI (Supin Pass) => vän + "ts" ; - VI (PtPres Nom) => vän + "dande" ; - VI (PtPres Gen) => vän + "dandes" ; - VI (PtPret (Strong (ASg Utr)) Nom) => vän + "d" ; - VI (PtPret (Strong (ASg Utr)) Gen) => vän + "ds" ; - VI (PtPret (Strong (ASg Neutr)) Nom) => vän + "t" ; - VI (PtPret (Strong (ASg Neutr)) Gen) => vän + "ts" ; - VI (PtPret (Strong APl) Nom) => vän + "da" ; - VI (PtPret (Strong APl) Gen) => vän + "das" ; - VI (PtPret (Weak (AxSg NoMasc)) Nom) => vän + "da" ; - VI (PtPret (Weak (AxSg NoMasc)) Gen) => vän + "das" ; - VI (PtPret (Weak (AxSg Masc)) Nom) => vän + "de" ; - VI (PtPret (Weak (AxSg Masc)) Gen) => vän + "des" ; - VI (PtPret (Weak AxPl) Nom) => vän + "da" ; - VI (PtPret (Weak AxPl) Gen) => vän + "das" - } - } ; - -oper vByta : Str -> Verbum = \by -> - {s = table { - VF (Pres Ind Act) => by + "ter" ; - VF (Pres Ind Pass) => variants {by + "ts" ; by + "tes"} ; - VF (Pres Cnj Act) => by + "te" ; - VF (Pres Cnj Pass) => by + "tes" ; - VF (Pret Ind Act) => by + "tte" ; - VF (Pret Ind Pass) => by + "ttes" ; - VF (Pret Cnj Act) => by + "tte" ; - VF (Pret Cnj Pass) => by + "ttes" ; - VF Imper => by + "t" ; - VI (Inf Act) => by + "ta" ; - VI (Inf Pass) => by + "tas" ; - VI (Supin Act) => by + "tt" ; - VI (Supin Pass) => by + "tts" ; - VI (PtPres Nom) => by + "tande" ; - VI (PtPres Gen) => by + "tandes" ; - VI (PtPret (Strong (ASg Utr)) Nom) => by + "tt" ; - VI (PtPret (Strong (ASg Utr)) Gen) => by + "tts" ; - VI (PtPret (Strong (ASg Neutr)) Nom) => by + "tt" ; - VI (PtPret (Strong (ASg Neutr)) Gen) => by + "tts" ; - VI (PtPret (Strong APl) Nom) => by + "tta" ; - VI (PtPret (Strong APl) Gen) => by + "ttas" ; - VI (PtPret (Weak (AxSg NoMasc)) Nom) => by + "tta" ; - VI (PtPret (Weak (AxSg NoMasc)) Gen) => by + "ttas" ; - VI (PtPret (Weak (AxSg Masc)) Nom) => by + "tte" ; - VI (PtPret (Weak (AxSg Masc)) Gen) => by + "ttes" ; - VI (PtPret (Weak AxPl) Nom) => by + "tta" ; - VI (PtPret (Weak AxPl) Gen) => by + "ttas" - } - } ; - -oper vGömma : Str -> Verbum = \göm -> - {s = table { - VF (Pres Ind Act) => göm + "mer" ; - VF (Pres Ind Pass) => variants {göm + "s" ; göm + "mes"} ; - VF (Pres Cnj Act) => göm + "me" ; - VF (Pres Cnj Pass) => göm + "mes" ; - VF (Pret Ind Act) => göm + "de" ; - VF (Pret Ind Pass) => göm + "des" ; - VF (Pret Cnj Act) => göm + "de" ; - VF (Pret Cnj Pass) => göm + "des" ; - VF Imper => göm ; - VI (Inf Act) => göm + "ma" ; - VI (Inf Pass) => göm + "mas" ; - VI (Supin Act) => göm + "t" ; - VI (Supin Pass) => göm + "ts" ; - VI (PtPres Nom) => göm + "mande" ; - VI (PtPres Gen) => göm + "mandes" ; - VI (PtPret (Strong (ASg Utr)) Nom) => göm + "d" ; - VI (PtPret (Strong (ASg Utr)) Gen) => göm + "ds" ; - VI (PtPret (Strong (ASg Neutr)) Nom) => göm + "t" ; - VI (PtPret (Strong (ASg Neutr)) Gen) => göm + "ts" ; - VI (PtPret (Strong APl) Nom) => göm + "da" ; - VI (PtPret (Strong APl) Gen) => göm + "das" ; - VI (PtPret (Weak (AxSg NoMasc)) Nom) => göm + "da" ; - VI (PtPret (Weak (AxSg NoMasc)) Gen) => göm + "das" ; - VI (PtPret (Weak (AxSg Masc)) Nom) => göm + "de" ; - VI (PtPret (Weak (AxSg Masc)) Gen) => göm + "des" ; - VI (PtPret (Weak AxPl) Nom) => göm + "da" ; - VI (PtPret (Weak AxPl) Gen) => göm + "das" - } - } ; - -oper vHyra : Str -> Verbum = \hyr -> - {s = table { - VF (Pres Ind Act) => hyr ; - VF (Pres Ind Pass) => variants {hyr + "s" ; hyr + "es"} ; - VF (Pres Cnj Act) => hyr + "e" ; - VF (Pres Cnj Pass) => hyr + "es" ; - VF (Pret Ind Act) => hyr + "de" ; - VF (Pret Ind Pass) => hyr + "des" ; - VF (Pret Cnj Act) => hyr + "de" ; - VF (Pret Cnj Pass) => hyr + "des" ; - VF Imper => hyr ; - VI (Inf Act) => hyr + "a" ; - VI (Inf Pass) => hyr + "as" ; - VI (Supin Act) => hyr + "t" ; - VI (Supin Pass) => hyr + "ts" ; - VI (PtPres Nom) => hyr + "ande" ; - VI (PtPres Gen) => hyr + "andes" ; - VI (PtPret (Strong (ASg Utr)) Nom) => hyr + "d" ; - VI (PtPret (Strong (ASg Utr)) Gen) => hyr + "ds" ; - VI (PtPret (Strong (ASg Neutr)) Nom) => hyr + "t" ; - VI (PtPret (Strong (ASg Neutr)) Gen) => hyr + "ts" ; - VI (PtPret (Strong APl) Nom) => hyr + "da" ; - VI (PtPret (Strong APl) Gen) => hyr + "das" ; - VI (PtPret (Weak (AxSg NoMasc)) Nom) => hyr + "da" ; - VI (PtPret (Weak (AxSg NoMasc)) Gen) => hyr + "das" ; - VI (PtPret (Weak (AxSg Masc)) Nom) => hyr + "de" ; - VI (PtPret (Weak (AxSg Masc)) Gen) => hyr + "des" ; - VI (PtPret (Weak AxPl) Nom) => hyr + "da" ; - VI (PtPret (Weak AxPl) Gen) => hyr + "das" - } - } ; - -oper vTåla : Str -> Verbum = \tål -> - {s = table { - VF (Pres Ind Act) => tål ; - VF (Pres Ind Pass) => variants {tål + "s" ; tål + "es"} ; - VF (Pres Cnj Act) => tål + "e" ; - VF (Pres Cnj Pass) => tål + "es" ; - VF (Pret Ind Act) => tål + "de" ; - VF (Pret Ind Pass) => tål + "des" ; - VF (Pret Cnj Act) => tål + "de" ; - VF (Pret Cnj Pass) => tål + "des" ; - VF Imper => tål ; - VI (Inf Act) => tål + "a" ; - VI (Inf Pass) => tål + "as" ; - VI (Supin Act) => tål + "t" ; - VI (Supin Pass) => tål + "ts" ; - VI (PtPres Nom) => tål + "ande" ; - VI (PtPres Gen) => tål + "andes" ; - VI (PtPret (Strong (ASg Utr)) Nom) => tål + "d" ; - VI (PtPret (Strong (ASg Utr)) Gen) => tål + "ds" ; - VI (PtPret (Strong (ASg Neutr)) Nom) => tål + "t" ; - VI (PtPret (Strong (ASg Neutr)) Gen) => tål + "ts" ; - VI (PtPret (Strong APl) Nom) => tål + "da" ; - VI (PtPret (Strong APl) Gen) => tål + "das" ; - VI (PtPret (Weak (AxSg NoMasc)) Nom) => tål + "da" ; - VI (PtPret (Weak (AxSg NoMasc)) Gen) => tål + "das" ; - VI (PtPret (Weak (AxSg Masc)) Nom) => tål + "de" ; - VI (PtPret (Weak (AxSg Masc)) Gen) => tål + "des" ; - VI (PtPret (Weak AxPl) Nom) => tål + "da" ; - VI (PtPret (Weak AxPl) Gen) => tål + "das" - } - } ; - -oper vFinna : (_,_,_ : Str) -> Verbum = \finn, fann, funn -> - {s = table { - VF (Pres Ind Act) => finn + "er" ; - VF (Pres Ind Pass) => variants {finn + "s" ; finn + "es"} ; - VF (Pres Cnj Act) => finn + "e" ; - VF (Pres Cnj Pass) => finn + "es" ; - VF (Pret Ind Act) => fann ; - VF (Pret Ind Pass) => fann + "s" ; - VF (Pret Cnj Act) => funn + "e" ; - VF (Pret Cnj Pass) => funn + "es" ; - VF Imper => finn ; - VI (Inf Act) => finn + "a" ; - VI (Inf Pass) => finn + "as" ; - VI (Supin Act) => funn + "it" ; - VI (Supin Pass) => funn + "its" ; - VI (PtPres Nom) => finn + "ande" ; - VI (PtPres Gen) => finn + "andes" ; - VI (PtPret (Strong (ASg Utr)) Nom) => funn + "en" ; - VI (PtPret (Strong (ASg Utr)) Gen) => funn + "ens" ; - VI (PtPret (Strong (ASg Neutr)) Nom) => funn + "et" ; - VI (PtPret (Strong (ASg Neutr)) Gen) => funn + "ets" ; - VI (PtPret (Strong APl) Nom) => funn + "a" ; - VI (PtPret (Strong APl) Gen) => funn + "as" ; - VI (PtPret (Weak (AxSg NoMasc)) Nom) => funn + "a" ; - VI (PtPret (Weak (AxSg NoMasc)) Gen) => funn + "as" ; - VI (PtPret (Weak (AxSg Masc)) Nom) => funn + "e" ; - VI (PtPret (Weak (AxSg Masc)) Gen) => funn + "es" ; - VI (PtPret (Weak AxPl) Nom) => funn + "a" ; - VI (PtPret (Weak AxPl) Gen) => funn + "as" - } - } ; - --- machine-generated exceptional inflection tables from rules.Swe.gf - -oper mor_1 : Subst = - {s = table { - SF Sg Indef Nom => variants {"mor" ; "moder"} ; - SF Sg Indef Gen => variants {"mors" ; "moders"} ; - SF Sg Def Nom => "modern" ; - SF Sg Def Gen => "moderns" ; - SF Pl Indef Nom => "mödrar" ; - SF Pl Indef Gen => "mödrars" ; - SF Pl Def Nom => "mödrarna" ; - SF Pl Def Gen => "mödrarnas" - } ; - h1 = Utr - } ; - -oper farbror_8 : Subst = - {s = table { - SF Sg Indef Nom => variants {"farbror" ; "farbroder"} ; - SF Sg Indef Gen => variants {"farbrors" ; "farbroders"} ; - SF Sg Def Nom => "farbrodern" ; - SF Sg Def Gen => "farbroderns" ; - SF Pl Indef Nom => "farbröder" ; - SF Pl Indef Gen => "farbröders" ; - SF Pl Def Nom => "farbröderna" ; - SF Pl Def Gen => "farbrödernas" - } ; - h1 = Utr - } ; - -oper gammal_16 : Adj = - {s = table { - AF (Posit (Strong (ASg Utr))) Nom => "gammal" ; - AF (Posit (Strong (ASg Utr))) Gen => "gammals" ; - AF (Posit (Strong (ASg Neutr))) Nom => "gammalt" ; - AF (Posit (Strong (ASg Neutr))) Gen => "gammalts" ; - AF (Posit (Strong APl)) Nom => "gamla" ; - AF (Posit (Strong APl)) Gen => "gamlas" ; - AF (Posit (Weak (AxSg NoMasc))) Nom => "gamla" ; - AF (Posit (Weak (AxSg NoMasc))) Gen => "gamlas" ; - AF (Posit (Weak (AxSg Masc))) Nom => "gamle" ; - AF (Posit (Weak (AxSg Masc))) Gen => "gamles" ; - AF (Posit (Weak AxPl)) Nom => "gamla" ; - AF (Posit (Weak AxPl)) Gen => "gamlas" ; - AF Compar Nom => "äldre" ; - AF Compar Gen => "äldres" ; - AF (Super SupStrong) Nom => "äldst" ; - AF (Super SupStrong) Gen => "äldsts" ; - AF (Super SupWeak) Nom => "äldsta" ; - AF (Super SupWeak) Gen => "äldstas" - } - } ; - - -oper stor_25 : Adj = - {s = table { - AF (Posit (Strong (ASg Utr))) Nom => "stor" ; - AF (Posit (Strong (ASg Utr))) Gen => "stors" ; - AF (Posit (Strong (ASg Neutr))) Nom => "stort" ; - AF (Posit (Strong (ASg Neutr))) Gen => "storts" ; - AF (Posit (Strong APl)) Nom => "stora" ; - AF (Posit (Strong APl)) Gen => "storas" ; - AF (Posit (Weak (AxSg NoMasc))) Nom => "stora" ; - AF (Posit (Weak (AxSg NoMasc))) Gen => "storas" ; - AF (Posit (Weak (AxSg Masc))) Nom => "store" ; - AF (Posit (Weak (AxSg Masc))) Gen => "stores" ; - AF (Posit (Weak AxPl)) Nom => "stora" ; - AF (Posit (Weak AxPl)) Gen => "storas" ; - AF Compar Nom => "större" ; - AF Compar Gen => "störres" ; - AF (Super SupStrong) Nom => "störst" ; - AF (Super SupStrong) Gen => "störsts" ; - AF (Super SupWeak) Nom => "största" ; - AF (Super SupWeak) Gen => "störstas" - } - } ; - -oper ung_29 : Adj = - {s = table { - AF (Posit (Strong (ASg Utr))) Nom => "ung" ; - AF (Posit (Strong (ASg Utr))) Gen => "ungs" ; - AF (Posit (Strong (ASg Neutr))) Nom => "ungt" ; - AF (Posit (Strong (ASg Neutr))) Gen => "ungts" ; - AF (Posit (Strong APl)) Nom => "unga" ; - AF (Posit (Strong APl)) Gen => "ungas" ; - AF (Posit (Weak (AxSg NoMasc))) Nom => "unga" ; - AF (Posit (Weak (AxSg NoMasc))) Gen => "ungas" ; - AF (Posit (Weak (AxSg Masc))) Nom => "unge" ; - AF (Posit (Weak (AxSg Masc))) Gen => "unges" ; - AF (Posit (Weak AxPl)) Nom => "unga" ; - AF (Posit (Weak AxPl)) Gen => "ungas" ; - AF Compar Nom => "yngre" ; - AF Compar Gen => "yngres" ; - AF (Super SupStrong) Nom => "yngst" ; - AF (Super SupStrong) Gen => "yngsts" ; - AF (Super SupWeak) Nom => "yngsta" ; - AF (Super SupWeak) Gen => "yngstas" - } - } ; - - -oper jag_32 : ProPN = - {s = table { - PNom => "jag" ; - PAcc => "mig" ; - PGen (ASg Utr) => "min" ; - PGen (ASg Neutr) => "mitt" ; - PGen APl => "mina" - } ; - h1 = Utr ; - h2 = Sg ; - h3 = P1 - } ; - -oper du_33 : ProPN = - {s = table { - PNom => "du" ; - PAcc => "dig" ; - PGen (ASg Utr) => "din" ; - PGen (ASg Neutr) => "ditt" ; - PGen APl => "dina" - } ; - h1 = Utr ; - h2 = Sg ; - h3 = P2 - } ; - -oper han_34 : ProPN = - {s = table { - PNom => "han" ; - PAcc => "honom" ; - PGen (ASg Utr) => "hans" ; - PGen (ASg Neutr) => "hans" ; - PGen APl => "hans" - } ; - h1 = Utr ; - h2 = Sg ; - h3 = P3 - } ; - -oper hon_35 : ProPN = - {s = table { - PNom => "hon" ; - PAcc => "henne" ; - PGen (ASg Utr) => "hennes" ; - PGen (ASg Neutr) => "hennes" ; - PGen APl => "hennes" - } ; - h1 = Utr ; - h2 = Sg ; - h3 = P3 - } ; - -oper vi_36 : ProPN = - {s = table { - PNom => "vi" ; - PAcc => "oss" ; - PGen (ASg Utr) => "vår" ; - PGen (ASg Neutr) => "vårt" ; - PGen APl => "våra" - } ; - h1 = Utr ; - h2 = Pl ; - h3 = P1 - } ; - -oper ni_37 : ProPN = - {s = table { - PNom => "ni" ; - PAcc => "er" ; - PGen (ASg Utr) => "er" ; - PGen (ASg Neutr) => "ert" ; - PGen APl => "era" - } ; - h1 = Utr ; - h2 = Pl ; - h3 = P2 - } ; - -oper de_38 : ProPN = - {s = table { - PNom => "de" ; - PAcc => "dem" ; - PGen (ASg Utr) => "deras" ; - PGen (ASg Neutr) => "deras" ; - PGen APl => "deras" - } ; - h1 = Utr ; - h2 = Pl ; - h3 = P3 - } ; - -oper den_39 : ProPN = - {s = table { - PNom => "den" ; - PAcc => "den" ; - PGen (ASg Utr) => "dess" ; - PGen (ASg Neutr) => "dess" ; - PGen APl => "dess" - } ; - h1 = Utr ; - h2 = Sg ; - h3 = P3 - } ; - -oper det_40 : ProPN = - {s = table { - PNom => "det" ; - PAcc => "det" ; - PGen (ASg Utr) => "dess" ; - PGen (ASg Neutr) => "dess" ; - PGen APl => "dess" - } ; - h1 = Neutr ; - h2 = Sg ; - h3 = P3 - } ; - -oper man_1144 : Subst = - {s = table { - SF Sg Indef Nom => "man" ; - SF Sg Indef Gen => "mans" ; - SF Sg Def Nom => "mannen" ; - SF Sg Def Gen => "mannens" ; - SF Pl Indef Nom => "män" ; - SF Pl Indef Gen => "mäns" ; - SF Pl Def Nom => "männen" ; - SF Pl Def Gen => "männens" - } ; - h1 = Utr - } ; - -oper liten_1146 : Adj = - {s = table { - AF (Posit (Strong (ASg Utr))) Nom => "liten" ; - AF (Posit (Strong (ASg Utr))) Gen => "litens" ; - AF (Posit (Strong (ASg Neutr))) Nom => "litet" ; - AF (Posit (Strong (ASg Neutr))) Gen => "litets" ; - AF (Posit (Strong APl)) Nom => "små" ; - AF (Posit (Strong APl)) Gen => "smås" ; - AF (Posit (Weak (AxSg NoMasc))) Nom => "lilla" ; - AF (Posit (Weak (AxSg NoMasc))) Gen => "lillas" ; - AF (Posit (Weak (AxSg Masc))) Nom => "lille" ; - AF (Posit (Weak (AxSg Masc))) Gen => "lilles" ; - AF (Posit (Weak AxPl)) Nom => "små" ; - AF (Posit (Weak AxPl)) Gen => "smås" ; - AF Compar Nom => "mindre" ; - AF Compar Gen => "mindres" ; - AF (Super SupStrong) Nom => "minst" ; - AF (Super SupStrong) Gen => "minsts" ; - AF (Super SupWeak) Nom => "minsta" ; - AF (Super SupWeak) Gen => "minstas" - } - } ; - -oper giva_1147 : Verbum = - {s = table { - VF (Pres Ind Act) => variants {"giver" ; "ger"} ; - VF (Pres Ind Pass) => variants {"gives" ; "givs" ; "ges"} ; - VF (Pres Conj Act) => "give" ; - VF (Pres Conj Pass) => "gives" ; - VF (Pret Ind Act) => "gav" ; - VF (Pret Ind Pass) => "gavs" ; - VF (Pret Conj Act) => "give" ; - VF (Pret Conj Pass) => "gives" ; - VF Imper => variants {"giv" ; "ge"} ; - VI (Inf Act) => variants {"giva" ; "ge"} ; - VI (Inf Pass) => variants {"givas" ; "ges"} ; - VI (Supin Act) => "givit" ; - VI (Supin Pass) => "givits" ; - VI (PtPres Nom) => "givande" ; - VI (PtPres Gen) => "givandes" ; - VI (PtPret (Strong (ASg Utr)) Nom) => "given" ; - VI (PtPret (Strong (ASg Utr)) Gen) => "givens" ; - VI (PtPret (Strong (ASg Neutr)) Nom) => "givet" ; - VI (PtPret (Strong (ASg Neutr)) Gen) => "givets" ; - VI (PtPret (Strong APl) Nom) => "givna" ; - VI (PtPret (Strong APl) Gen) => "givnas" ; - VI (PtPret (Weak (AxSg NoMasc)) Nom) => "givna" ; - VI (PtPret (Weak (AxSg NoMasc)) Gen) => "givnas" ; - VI (PtPret (Weak (AxSg Masc)) Nom) => "givne" ; - VI (PtPret (Weak (AxSg Masc)) Gen) => "givnes" ; - VI (PtPret (Weak AxPl) Nom) => "givna" ; - VI (PtPret (Weak AxPl) Gen) => "givnas" - } - } ; - -oper gå_1174 : Verbum = - {s = table { - VF (Pres Ind Act) => "går" ; - VF (Pres Ind Pass) => "gås" ; - VF (Pres Cnj Act) => "gå" ; - VF (Pres Cnj Pass) => "gås" ; - VF (Pret Ind Act) => "gick" ; - VF (Pret Ind Pass) => "gicks" ; - VF (Pret Cnj Act) => "ginge" ; - VF (Pret Cnj Pass) => "ginges" ; - VF Imper => "gå" ; - VI (Inf Act) => "gå" ; - VI (Inf Pass) => "gås" ; - VI (Supin Act) => "gått" ; - VI (Supin Pass) => "gåtts" ; - VI (PtPres Nom) => "gående" ; - VI (PtPres Gen) => "gåendes" ; - VI (PtPret (Strong (ASg Utr)) Nom) => "gången" ; - VI (PtPret (Strong (ASg Utr)) Gen) => "gångens" ; - VI (PtPret (Strong (ASg Neutr)) Nom) => "gånget" ; - VI (PtPret (Strong (ASg Neutr)) Gen) => "gångets" ; - VI (PtPret (Strong APl) Nom) => "gångna" ; - VI (PtPret (Strong APl) Gen) => "gångnas" ; - VI (PtPret (Weak (AxSg NoMasc)) Nom) => "gångna" ; - VI (PtPret (Weak (AxSg NoMasc)) Gen) => "gångnas" ; - VI (PtPret (Weak (AxSg Masc)) Nom) => "gångne" ; - VI (PtPret (Weak (AxSg Masc)) Gen) => "gångnes" ; - VI (PtPret (Weak AxPl) Nom) => "gångna" ; - VI (PtPret (Weak AxPl) Gen) => "gångnas" - } - } ; -oper hava_1198 : Verbum = - {s = table { - VF (Pres Ind Act) => variants {"haver" ; "har"} ; - VF (Pres Ind Pass) => variants {"havs" ; "has"} ; - VF (Pres Conj Act) => "have" ; - VF (Pres Conj Pass) => "haves" ; - VF (Pret Ind Act) => "hade" ; - VF (Pret Ind Pass) => "hades" ; - VF (Pret Conj Act) => "hade" ; - VF (Pret Conj Pass) => "hades" ; - VF Imper => variants {"hav" ; "ha"} ; - VI (Inf Act) => variants {"hava" ; "ha"} ; - VI (Inf Pass) => variants {"havas" ; "has"} ; - VI (Supin Act) => "haft" ; - VI (Supin Pass) => "hafts" ; - VI (PtPres Nom) => "havande" ; - VI (PtPres Gen) => "havandes" ; - VI (PtPret (Strong (ASg Utr)) Nom) => variants {} ; - VI (PtPret (Strong (ASg Utr)) Gen) => variants {} ; - VI (PtPret (Strong (ASg Neutr)) Nom) => variants {} ; - VI (PtPret (Strong (ASg Neutr)) Gen) => variants {} ; - VI (PtPret (Strong APl) Nom) => variants {} ; - VI (PtPret (Strong APl) Gen) => variants {} ; - VI (PtPret (Weak (AxSg NoMasc)) Nom) => variants {} ; - VI (PtPret (Weak (AxSg NoMasc)) Gen) => variants {} ; - VI (PtPret (Weak (AxSg Masc)) Nom) => variants {} ; - VI (PtPret (Weak (AxSg Masc)) Gen) => variants {} ; - VI (PtPret (Weak AxPl) Nom) => variants {} ; - VI (PtPret (Weak AxPl) Gen) => variants {} - } - } ; - -oper vara_1200 : Verbum = - {s = table { - VF (Pres Ind Act) => "är" ; - VF (Pres Ind Pass) => variants {} ; - VF (Pres Conj Act) => "vare" ; - VF (Pres Conj Pass) => variants {} ; - VF (Pret Ind Act) => "var" ; - VF (Pret Ind Pass) => variants {} ; - VF (Pret Conj Act) => "vore" ; - VF (Pret Conj Pass) => variants {} ; - VF Imper => "var" ; - VI (Inf Act) => "vara" ; - VI (Inf Pass) => variants {} ; - VI (Supin Act) => "varit" ; - VI (Supin Pass) => variants {} ; - VI (PtPres Nom) => "varande" ; - VI (PtPres Gen) => "varandes" ; - VI (PtPret (Strong (ASg Utr)) Nom) => variants {} ; - VI (PtPret (Strong (ASg Utr)) Gen) => variants {} ; - VI (PtPret (Strong (ASg Neutr)) Nom) => variants {} ; - VI (PtPret (Strong (ASg Neutr)) Gen) => variants {} ; - VI (PtPret (Strong APl) Nom) => variants {} ; - VI (PtPret (Strong APl) Gen) => variants {} ; - VI (PtPret (Weak (AxSg NoMasc)) Nom) => variants {} ; - VI (PtPret (Weak (AxSg NoMasc)) Gen) => variants {} ; - VI (PtPret (Weak (AxSg Masc)) Nom) => variants {} ; - VI (PtPret (Weak (AxSg Masc)) Gen) => variants {} ; - VI (PtPret (Weak AxPl) Nom) => variants {} ; - VI (PtPret (Weak AxPl) Gen) => variants {} - } - } ; -} diff --git a/grammars/resource/swedish/ParadigmsSwe.gf b/grammars/resource/swedish/ParadigmsSwe.gf deleted file mode 100644 index db14351d2..000000000 --- a/grammars/resource/swedish/ParadigmsSwe.gf +++ /dev/null @@ -1,286 +0,0 @@ ---# -path=.:../abstract:../../prelude - ---1 Swedish 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, $resource.Abs.gf$. --- --- The main difference with $morpho.Swe.gf$ is that the types --- referred to are compiled resource grammar types. We have moreover --- had the design principle of always having existing forms as string --- arguments of the paradigms, not stems. --- --- The following modules are presupposed: - -resource ParadigmsSwe = open (Predef=Predef), Prelude, TypesSwe, SyntaxSwe, Swedish in { - ---2 Parameters --- --- To abstract over gender names, we define the following identifiers. - -oper - utrum : Gender ; - neutrum : Gender ; - - masculine : Sex ; - nonmasculine : Sex ; - --- To abstract over case names, we define the following. - - nominative : Case ; - genitive : Case ; - --- To abstract over number names, we define the following. - - singular : Number ; - plural : Number ; - - ---2 Nouns - --- Worst case: give all nominative forms and the gender. --- The genitive is formed automatically, even when the nominative --- ends with an "s". - - mkN : (_,_,_,_ : Str) -> Gender -> Sex -> N ; - -- man, mannen, män, männen - --- Here are some common patterns, corresponding to school-gramamr declensions. --- Except $nPojke$, $nKarl$, and $nMurare$, --- they are defined to be $nonmasculine$, which means that they don't create --- the definite adjective form with "e" but with "a". - - nApa : Str -> N ; -- apa (apan, apor, aporna) ; utrum - nBil : Str -> N ; -- bil (bilen, bilar, bilarna) ; utrum - nKarl : Str -> N ; -- karl (karlen, karlar, karlarna) ; utrum ; masculine - nPojke : Str -> N ; -- pojke (pojken, pojkar, pojkarna) ; utrum ; masculine - nNyckel : Str -> N ; -- nyckel (nyckeln, nycklar, nycklarna) ; utrum - nRisk : Str -> N ; -- risk (risken, risker, riskerna) ; utrum - nDike : Str -> N ; -- dike (diket, diken, dikena) ; neutrum - nRep : Str -> N ; -- rep (repet, rep, repen) ; neutrum - nPapper : Str -> N ; -- papper (pappret, papper, pappren) ; neutrum - nMurare : Str -> N ; -- murare (muraren, murare, murarna) ; utrum ; masculine - nKikare : Str -> N ; -- kikare (kikaren, kikare, kikarna) ; utrum - --- Nouns used as functions need a preposition. The most common ones are "av", --- "på", and "till". - - mkFun : N -> Preposition -> Fun ; - funAv : N -> Fun ; - funPå : N -> Fun ; - funTill : N -> Fun ; - --- Proper names, with their possibly --- irregular genitive. The regular genitive is "s", omitted after "s". - - mkPN : (_,_ : Str) -> Gender -> Sex -> PN ; -- Karolus, Karoli - pnReg : Str -> Gender -> Sex -> PN ; -- Johan,Johans ; Johannes, Johannes - --- On the top level, it is maybe $CN$ that is used rather than $N$, and --- $NP$ rather than $PN$. - - mkCN : N -> CN ; - mkNP : (Karolus, Karoli : Str) -> Gender -> NP ; - - npReg : Str -> Gender -> NP ; -- Johann, Johanns - - ---2 Adjectives - --- Non-comparison one-place adjectives need four forms in the worst case: --- strong singular, weak singular, plural. - - mkAdj1 : (_,_,_,_ : Str) -> Adj1 ; -- liten, litet, lilla, små - --- Special cases needing one form each are: regular adjectives, --- adjectives with unstressed "e" in the last syllable, those --- ending with "n" as a further special case, and invariable --- adjectives. - - adjReg : Str -> Adj1 ; -- billig (billigt, billiga, billiga) - adjNykter : Str -> Adj1 ; -- nykter (nyktert, nyktra, nyktra) - adjGalen : Str -> Adj1 ; -- galen (galet, galna, galna) - adjInvar : Str -> Adj1 ; -- bra - --- Two-place adjectives need a preposition and a case as extra arguments. - - mkAdj2 : Adj1 -> Str -> Adj2 ; -- delbar, med - mkAdj2Reg : Str -> Str -> Adj2 ; -- - --- Comparison adjectives may need the three four forms for the positive case, plus --- three more forms for the comparison cases. - - mkAdjDeg : (liten, litet, lilla, sma, mindre, minst, minsta : Str) -> AdjDeg ; - --- Some comparison adjectives are completely regular. - - aReg : Str -> AdjDeg ; - --- On top level, there are adjectival phrases. The most common case is --- just to use a one-place adjective. The variation in $adjGen$ is taken --- into account. - - apReg : Str -> AP ; - ---2 Verbs --- --- The fragment only has present tense so far. --- The worst case needs three forms: the infinitive, the indicative, and the --- imperative. - - mkV : (_,_,_ : Str) -> V ; -- vara, är, var; trivas, trivs, trivs - --- The main conjugations need one string each. - - vKoka : Str -> V ; -- tala (talar, tala) - vSteka : Str -> V ; -- leka (leker, lek) - vBo : Str -> V ; -- bo (bor, bo) - - vAndas : Str -> V ; -- andas [all forms the same: also "slåss"] - vTrivas : Str -> V ; -- trivas (trivs, trivs) - --- The verbs 'be' and 'have' are special. - - vVara : V ; - vHa : V ; - --- Two-place verbs, and the special case with direct object. - - mkTV : V -> Preposition -> TV ; -- tycka, om - tvDir : V -> TV ; -- gilla - --- The definitions should not bother the user of the API. So they are --- hidden from the document. ---. - - utrum = Utr ; - neutrum = Neutr ; - masculine = Masc ; - nonmasculine = NoMasc ; - nominative = Nom ; - genitive = Gen ; - -- singular defined in Types - -- plural defined in Types - - mkN = \apa, apan, apor, aporna, g, x -> let - {nom = table { - SF Sg Indef _ => apa ; - SF Sg Def _ => apan ; - SF Pl Indef _ => apor ; - SF Pl Def _ => aporna - } - } in - {s = \\n,d,c => mkCase c (nom ! SF n d Nom) ; - g = g ; x = x ; lock_N = <> - } ; - - -- auxiliaries - mkGenit : Tok -> Tok = \s -> ifTok Tok (Predef.dp 1 s) "s" s (s + "s") ; - mkCase : Case -> Tok -> Tok = \c,t -> case c of { - Nom => t ; - Gen => mkGenit t - } ; - - nApa = \apa -> - let {apor = Predef.tk 1 apa + "or"} in - mkN apa (apa + "n") apor (apor + "na") utrum nonmasculine ; - - nBil = \bil -> - mkN bil (bil + "en") (bil + "ar") (bil + "arna") utrum nonmasculine ; - nKarl = \bil -> - mkN bil (bil + "en") (bil + "ar") (bil + "arna") utrum masculine ; - nPojke = \pojke -> - let {bil = Predef.tk 1 pojke} in - mkN pojke (bil + "en") (bil + "ar") (bil + "arna") utrum masculine ; - nNyckel = \cykel -> - let {cykl = Predef.tk 2 cykel + Predef.dp 1 cykel} in - mkN cykel (cykel + "n") (cykl + "ar") (cykl + "arna") utrum nonmasculine ; - nRisk = \bil -> - mkN bil (bil + "en") (bil + "er") (bil + "erna") utrum nonmasculine ; - nDike = \dike -> - mkN dike (dike + "t") (dike + "n") (dike + "na") neutrum nonmasculine ; - nRep = \rep -> - mkN rep (rep + "et") rep (rep + "en") neutrum nonmasculine ; - nPapper = \cykel -> - let {cykl = Predef.tk 2 cykel + Predef.dp 1 cykel} in - mkN cykel (cykl + "et") cykel (cykl + "en") neutrum nonmasculine ; - nMurare = \murare -> - let {murar = Predef.tk 1 murare} in - mkN murare (murar + "en") murare (murar + "na") utrum masculine ; - nKikare = \murare -> - let {murar = Predef.tk 1 murare} in - mkN murare (murar + "en") murare (murar + "na") utrum nonmasculine ; - - - mkFun x y = SyntaxSwe.mkFun x y ** {lock_Fun = <>} ; - funAv = \f -> mkFun f "av" ; - funPå = \f -> mkFun f "på" ; - funTill = \f -> mkFun f "till" ; - - mkPN = \karolus, karoli, g, x -> - {s = table {Gen => karoli ; _ => karolus} ; g = g ; x = x ; lock_PN = <>} ; - pnReg = \horst -> - mkPN horst (ifTok Tok (Predef.dp 1 horst) "s" horst (horst + "s")) ; - - mkCN = UseN ; - mkNP = \a,b,g -> UsePN (mkPN a b g nonmasculine) ; -- gender irrelevant in NP - npReg = \s,g -> UsePN (pnReg s g nonmasculine) ; - - mkAdj1 = \liten, litet, lilla, små -> - {s = table { - Strong (ASg Utr) => \\c => mkCase c liten ; - Strong (ASg Neutr) => \\c => mkCase c litet ; - Strong APl => \\c => mkCase c små ; - Weak (AxSg Masc) => \\c => mkCase c (Predef.tk 1 lilla + "e") ; - Weak _ => \\c => mkCase c lilla - } ; - lock_Adj1 = <> - } ; - - adjReg = \billig -> mkAdj1 billig (billig + "t") (billig + "a") (billig + "a") ; - adjNykter = \nykter -> - let {nyktr = Predef.tk 2 nykter + Predef.dp 1 nykter} in - mkAdj1 nykter (nykter + "t") (nyktr + "a") (nyktr + "a") ; - adjGalen = \galen -> - let {gal = Predef.tk 2 galen} in - mkAdj1 galen (gal + "et") (gal + "na") (gal + "na") ; - adjInvar = \bra -> {s = \\_,_ => bra ; lock_Adj1 = <>} ; - - mkAdj2 = \a,p -> a ** {s2 = p ; lock_Adj2 = <>} ; - mkAdj2Reg = \a -> mkAdj2 (adjReg a) ; - - mkAdjDeg = \liten, litet, lilla, sma, mindre, minst, minsta -> - let {lit = (mkAdj1 liten litet lilla sma).s} in - {s = table { - AF (Posit f) c => lit ! f ! c ; - AF Compar c => mkCase c mindre ; - AF (Super SupStrong) c => mkCase c minst ; - AF (Super SupWeak) c => mkCase c minsta --- masculine! - } ; - lock_AdjDeg = <> - } ; - - aReg = \fin -> mkAdjDeg fin - (fin + "t") (fin + "a") (fin + "a") (fin + "are") (fin + "ast") (fin + "aste") ; - - apReg = \s -> AdjP1 (adjReg s) ; - - mkV x y z = mkVerb x y z ** {lock_V = <>} ; - vKoka = \tala -> mkV tala (tala+"r") tala ; - vSteka = \leka -> let {lek = Predef.tk 1 leka} in mkV leka (lek + "er") lek ; - vBo = \bo -> mkV bo (bo+"r") bo ; - vAndas = \andas -> mkV andas andas andas ; - vTrivas = \trivas -> - let {trivs = Predef.tk 1 trivas + "s"} in mkV trivas trivs trivs ; - vVara = verbVara ** {lock_V = <>} ; - vHa = verbHava ** {lock_V = <>} ; - mkTV x y = mkTransVerb x y ** {lock_TV = <>} ; - tvDir = \v -> mkTV v [] ; - -} ; diff --git a/grammars/resource/swedish/ResSwe.gf b/grammars/resource/swedish/ResSwe.gf deleted file mode 100644 index 4767db0f6..000000000 --- a/grammars/resource/swedish/ResSwe.gf +++ /dev/null @@ -1,221 +0,0 @@ ---1 The Top-Level Swedish Resource Grammar --- --- Aarne Ranta 2002 -- 2003 --- --- This is the Swedish concrete syntax of the multilingual resource --- grammar. Most of the work is done in the file $syntax.Swe.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 $ResAbs.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 $TypesSwe.gf$. - -concrete ResSwe of ResAbs = open Prelude, SyntaxSwe in { - -flags - startcat=Phr ; - parser=chart ; - -lincat - CN = {s : Number => SpeciesP => Case => Str ; g : Gender ; x : Sex ; - p : IsComplexCN} ; - N = CommNoun ; - -- = {s : Number => Species => Case => Str ; g : Gender ; x : Sex} ; - NP = NounPhrase ; - -- = {s : NPForm => Str ; g : Gender ; n : Number} ; - PN = {s : Case => Str ; g : Gender ; x : Sex} ; - Det = {s : Gender => Sex => Str ; n : Number ; b : SpeciesP} ; - Fun = Function ; - -- = CommNoun ** {s2 : Preposition} ; - Fun2 = Function ** {s3 : Preposition} ; - - Adj1 = Adjective ; - -- = {s : AdjFormPos => Case => Str} ; - Adj2 = Adjective ** {s2 : Preposition} ; - AdjDeg = {s : AdjForm => Str} ; - AP = Adjective ** {p : IsPostfixAdj} ; - - V = Verb ; - -- = {s : VForm => Str} ; - VP = Verb ** {s2 : Str ; s3 : Gender => Number => Str} ; - TV = TransVerb ; - -- = Verb ** {s2 : Preposition} ; - V3 = TransVerb ** {s3 : Preposition} ; - VS = Verb ; - - AdV = {s : Str ; isPost : Bool} ; - - S = Sentence ; - -- = {s : Order => Str} ; - Slash = Sentence ** {s2 : Preposition} ; - RP = {s : RelCase => GenNum => Str ; g : RelGender} ; - RC = {s : GenNum => Str} ; - IP = NounPhrase ; - Qu = {s : QuestForm => Str} ; - Imp = {s : Number => Str} ; - - Phr = {s : Str} ; - - Conj = {s : Str ; n : Number} ; - ConjD = {s1 : Str ; s2 : Str ; n : Number} ; - - ListS = {s1,s2 : Order => Str} ; - ListAP = {s1,s2 : AdjFormPos => Case => Str ; p : Bool} ; - ListNP = {s1,s2 : NPForm => Str ; g : Gender ; n : Number} ; - ---. - -lin - UseN = noun2CommNounPhrase ; - ModAdj = modCommNounPhrase ; - ModGenOne = npGenDet singular ; - ModGenMany = npGenDet plural ; - UsePN = nameNounPhrase ; - UseFun = funAsCommNounPhrase ; - AppFun = appFunComm ; - AppFun2 = appFun2 ; - AdjP1 = adj2adjPhrase ; - ComplAdj = complAdj ; - PositAdjP = positAdjPhrase ; - ComparAdjP = comparAdjPhrase ; - SuperlNP = superlNounPhrase ; - - DetNP = detNounPhrase ; - IndefOneNP = indefNounPhrase singular ; - IndefManyNP = indefNounPhrase plural ; - DefOneNP = defNounPhrase singular ; - DefManyNP = defNounPhrase plural ; - - CNthatS = nounThatSentence ; - - PredVP = predVerbPhrase ; - PosV = predVerb True ; - NegV = predVerb False ; - PosA = predAdjective True ; - NegA = predAdjective False ; - PosCN = predCommNoun True ; - NegCN = predCommNoun False ; - PosTV = complTransVerb True ; - NegTV = complTransVerb False ; - PosV3 = complDitransVerb True ; - NegV3 = complDitransVerb False ; - PosNP = predNounPhrase True ; - NegNP = predNounPhrase False ; - PosPassV = passVerb True ; - NegPassV = passVerb False ; - PosVS = complSentVerb True ; - NegVS = complSentVerb False ; - VTrans = transAsVerb ; - - AdvVP = adVerbPhrase ; - LocNP = locativeNounPhrase ; - AdvCN = advCommNounPhrase ; - AdvAP = advAdjPhrase ; - - PosSlashTV = slashTransVerb True ; - NegSlashTV = slashTransVerb False ; - OneVP = predVerbPhrase (nameNounPhrase (mkProperName "man" Utr Masc)) ; - - IdRP = identRelPron ; - FunRP = funRelPron ; - RelVP = relVerbPhrase ; - RelSlash = relSlash ; - ModRC = modRelClause ; - RelSuch = relSuch ; - - WhoOne = intPronWho singular ; - WhoMany = intPronWho plural ; - WhatOne = intPronWhat singular ; - WhatMany = intPronWhat plural ; - FunIP = funIntPron ; - NounIPOne = nounIntPron singular ; - NounIPMany = nounIntPron plural ; - - QuestVP = questVerbPhrase ; - IntVP = intVerbPhrase ; - IntSlash = intSlash ; - QuestAdv = questAdverbial ; - - ImperVP = imperVerbPhrase ; - - IndicPhrase = indicUtt ; - QuestPhrase = interrogUtt ; - ImperOne = imperUtterance singular ; - ImperMany = imperUtterance plural ; - - AdvS = advSentence ; - -lin - TwoS = twoSentence ; - ConsS = consSentence ; - ConjS = conjunctSentence ; - ConjDS = conjunctDistrSentence ; - - TwoAP = twoAdjPhrase ; - ConsAP = consAdjPhrase ; - ConjAP = conjunctAdjPhrase ; - ConjDAP = conjunctDistrAdjPhrase ; - - TwoNP = twoNounPhrase ; - ConsNP = consNounPhrase ; - ConjNP = conjunctNounPhrase ; - ConjDNP = conjunctDistrNounPhrase ; - - SubjS = subjunctSentence ; - SubjImper = subjunctImperative ; - SubjQu = subjunctQuestion ; - SubjVP = subjunctVerbPhrase ; - - PhrNP = useNounPhrase ; - PhrOneCN = useCommonNounPhrase singular ; - PhrManyCN = useCommonNounPhrase plural ; - PhrIP ip = ip ; - PhrIAdv ia = ia ; - - OnePhr p = p ; - ConsPhr = cc2 ; - - INP = pronNounPhrase jag_32 ; - ThouNP = pronNounPhrase du_33 ; - HeNP = pronNounPhrase han_34 ; - SheNP = pronNounPhrase hon_35 ; - ItNP = pronNounPhrase det_40 ; ---- - WeNP = pronNounPhrase vi_36 ; - YeNP = pronNounPhrase ni_37 ; - TheyNP = pronNounPhrase de_38 ; - - YouNP = let {ni = pronNounPhrase ni_37 } in {s = ni.s ; g = ni.g ; n = Sg} ; - - EveryDet = varjeDet ; - AllDet = allaDet ; - WhichDet = vilkenDet ; - MostDet = flestaDet ; - - HowIAdv = ss "hur" ; - WhenIAdv = ss "när" ; - WhereIAdv = ss "var" ; - WhyIAdv = ss "varför" ; - - AndConj = ss "och" ** {n = Pl} ; - OrConj = ss "eller" ** {n = Sg} ; - BothAnd = sd2 "både" "och" ** {n = Pl} ; - EitherOr = sd2 "antingen" "eller" ** {n = Sg} ; - NeitherNor = sd2 "varken" "eller" ** {n = Sg} ; - IfSubj = ss "om" ; - WhenSubj = ss "när" ; - - PhrYes = ss ["Ja ."] ; - PhrNo = ss ["Nej ."] ; - - VeryAdv = ss "mycket" ; - TooAdv = ss "för" ; - OtherwiseAdv = ss "annars" ; - ThereforeAdv = ss "därför" ; -} ; diff --git a/grammars/resource/swedish/StructuralSwe.gf b/grammars/resource/swedish/StructuralSwe.gf deleted file mode 100644 index d19c7bd77..000000000 --- a/grammars/resource/swedish/StructuralSwe.gf +++ /dev/null @@ -1,115 +0,0 @@ ---# -path=.:../nabstract:../../prelude - ---1 The Top-Level English Resource Grammar: Structural Words --- --- Aarne Ranta 2002 -- 2003 --- -concrete StructuralSwe of Structural = - CombinationsSwe ** open Prelude, SyntaxSwe in { - lin - - INP = pronNounPhrase jag_32 ; - ThouNP = pronNounPhrase du_33 ; - HeNP = pronNounPhrase han_34 ; - SheNP = pronNounPhrase hon_35 ; - ItNP = pronNounPhrase det_40 ; ---- - WeNP n = pronNounPhrase (pronWithNum vi_36 n) ; - YeNP n = pronNounPhrase (pronWithNum ni_37 n) ; - TheyNP = pronNounPhrase de_38 ; - - YouNP = let {ni = pronNounPhrase ni_37 } in {s = ni.s ; g = ni.g ; n = Sg} ; - - EveryDet = varjeDet ; - AllsDet = mkDeterminerPlNum "alla" IndefP ; - WhichDet = vilkenDet ; - MostDet = flestaDet ; - - HowIAdv = ss "hur" ; - WhenIAdv = ss "när" ; - WhereIAdv = ss "var" ; - WhyIAdv = ss "varför" ; - - AndConj = ss "och" ** {n = Pl} ; - OrConj = ss "eller" ** {n = Sg} ; - BothAnd = sd2 "både" "och" ** {n = Pl} ; - EitherOr = sd2 "antingen" "eller" ** {n = Sg} ; - NeitherNor = sd2 "varken" "eller" ** {n = Sg} ; - IfSubj = ss "om" ; - WhenSubj = ss "när" ; - - PhrYes = ss ["Ja ."] ; - PhrNo = ss ["Nej ."] ; - - VeryAdv = ss "mycket" ; - TooAdv = ss "för" ; - OtherwiseAdv = ss "annars" ; - ThereforeAdv = ss "därför" ; - -{- - EveryDet = everyDet ; - AllDet = mkDeterminer Sg "all" ; --- all the missing - AllsDet = mkDeterminerNum Pl "all" ; - WhichDet = whichDet ; - WhichsDet = mkDeterminerNum Pl "which" ; - MostsDet = mostDet ; - MostDet = mkDeterminer Sg "most" ; - SomeDet = mkDeterminer Sg "some" ; - SomesDet = mkDeterminerNum Pl "some" ; - AnyDet = mkDeterminer Sg "any" ; - AnysDet = mkDeterminerNum Pl "any" ; - NoDet = mkDeterminer Sg "no" ; - NosDet = mkDeterminerNum Pl "no" ; - ManyDet = mkDeterminer Sg "many" ; - MuchDet = mkDeterminer Sg ["a lot of"] ; --- - ThisDet = mkDeterminer Sg "this" ; - TheseDet = mkDeterminerNum Pl "these" ; - ThatDet = mkDeterminer Sg "that" ; - ThoseDet = mkDeterminerNum Pl "those" ; - - ThisNP = nameNounPhrase (nameReg "this") ; - ThatNP = nameNounPhrase (nameReg "that") ; - TheseNP n = nameNounPhrase {s = \\c => "these" ++ n.s ! c} ; - ThoseNP n = nameNounPhrase {s = \\c => "those" ++ n.s ! c} ; --} - - EverybodyNP = nameNounPhrase (mkProperName "alleman" Utr Masc) ; - SomebodyNP = nameNounPhrase (mkProperName "någon" Utr Masc) ; - NobodyNP = nameNounPhrase (mkProperName "ingen" Utr Masc) ; - EverythingNP = nameNounPhrase (mkProperName "allting" Neutr NoMasc) ; - SomethingNP = nameNounPhrase (mkProperName "någonting" Neutr NoMasc) ; - NothingNP = nameNounPhrase (mkProperName "ingenting" Neutr NoMasc) ; - - CanVV = mkVerb "kunna" "kan" "kunn" ** {isAux = True} ; --- - CanKnowVV = mkVerb "kunna" "kan" "kunn" ** {isAux = True} ; --- - MustVV = mkVerb "få" "måste" "få" ** {isAux = True} ; --- - WantVV = mkVerb "vilja" "vill" "vilj" ** {isAux = True} ; --- - - EverywhereNP = advPost "varstans" ; - SomewhereNP = advPost "någonstans" ; - NowhereNP = advPost "ingenstans" ; - - AlthoughSubj = ss "fast" ; - - AlmostAdv = ss "nästan" ; - QuiteAdv = ss "ganska" ; - - InPrep = ss "i" ; - OnPrep = ss "på" ; - ToPrep = ss "till" ; - ThroughPrep = ss "genom" ; - AbovePrep = ss "ovanför" ; - UnderPrep = ss "under" ; - InFrontPrep = ss "framför" ; - BehindPrep = ss "bakom" ; - BetweenPrep = ss "mellan" ; - FromPrep = ss "från" ; - BeforePrep = ss "före" ; - DuringPrep = ss "under" ; - AfterPrep = ss "efter" ; - WithPrep = ss "med" ; - WithoutPrep = ss "utan" ; - ByMeansPrep = ss "med" ; - PartPrep = ss "av" ; - AgentPrep = ss "av" ; - -} diff --git a/grammars/resource/swedish/Swedish.gf b/grammars/resource/swedish/Swedish.gf deleted file mode 100644 index 64a6223a5..000000000 --- a/grammars/resource/swedish/Swedish.gf +++ /dev/null @@ -1,4 +0,0 @@ --- use this path to read the grammar from the same directory ---# -path=.:../abstract:../../prelude - -resource Swedish = reuse ResSwe ; diff --git a/grammars/resource/swedish/SyntaxSwe.gf b/grammars/resource/swedish/SyntaxSwe.gf deleted file mode 100644 index a8b0c20dc..000000000 --- a/grammars/resource/swedish/SyntaxSwe.gf +++ /dev/null @@ -1,1138 +0,0 @@ ---1 A Small Swedish Resource Syntax --- --- Aarne Ranta 2002 --- --- This resource grammar contains definitions needed to construct --- indicative, interrogative, and imperative sentences in Swedish. --- --- The following modules are presupposed: - -resource SyntaxSwe = MorphoSwe ** open Prelude, (CO = Coordination) in { - ---2 Common Nouns --- ---3 Simple common nouns - -oper - CommNoun : Type = {s : Number => Species => Case => Str ; g : Gender ; x : Sex} ; - --- When common nouns are extracted from lexicon, the composite noun form is ignored. --- But we have to indicate a sex. - extCommNoun : Sex -> Subst -> CommNoun = \x,sb -> - {s = \\n,b,c => sb.s ! SF n b c ; - g = sb.h1 ; - x = x} ; - --- These constants are used for data abstraction over the parameter type $Num$. - singular = Sg ; - plural = Pl ; - ---3 Common noun phrases - --- The need for this more complex type comes from the variation in the way in --- which a modifying adjective is inflected after different determiners: --- "(en) ful orm" / "(den) fula ormen" / "(min) fula orm". -param - SpeciesP = IndefP | DefP Species ; - --- We also have to be able to decide if a $CommNounPhrase$ is complex --- (to form the definite form: "bilen" / "den stora bilen"). - -oper - IsComplexCN : Type = Bool ; - --- Coercions between simple $Species$ and $SpeciesP$: - unSpeciesP : SpeciesP -> Species = \b -> - case b of {IndefP => Indef ; DefP p => p} ; -- bil/bil/bilen - unSpeciesAdjP : SpeciesP -> Species = \b -> - case b of {IndefP => Indef ; DefP _ => Def} ; -- gammal/gamla/gamla - --- Here's the type itself. - CommNounPhrase : Type = - {s : Number => SpeciesP => Case => Str ; - g : Gender ; x : Sex ; p : IsComplexCN} ; - --- To use a $CommNoun$ as $CommNounPhrase$. - noun2CommNounPhrase : CommNoun -> CommNounPhrase = \hus -> - {s = \\n,b,c => hus.s ! n ! unSpeciesP b ! c ; - g = hus.g ; x = hus.x ; p = False} ; - - n2n = noun2CommNounPhrase ; - - ---2 Noun Phrases --- --- The worst case for noun phrases is pronouns, which have inflection --- in (what is syntactically) their genitive. Most noun phrases can --- ignore this variation. - -oper - npCase : NPForm -> Case = \c -> case c of {PGen _ => Gen ; _ => Nom} ; - mkNPForm : Case -> NPForm = \c -> case c of {Gen => PGen APl ; _ => PNom} ; - - NounPhrase : Type = {s : NPForm => Str ; g : Gender ; n : Number} ; - --- Proper names are a simple kind of noun phrases. However, we want to --- anticipate the rule that proper names can be modified by --- adjectives, even though noun phrases in general cannot - hence the sex. - - ProperName : Type = {s : Case => Str ; g : Gender ; x : Sex} ; - - mkProperName : Str -> Gender -> Sex -> ProperName = \john,g,x -> - {s = table {Nom => john ; Gen => john + "s"} ; g = g ; x = x} ; - - nameNounPhrase : ProperName -> NounPhrase = - \john -> {s = table {c => john.s ! npCase c} ; g = john.g ; n = Sg} ; - - pronNounPhrase : ProPN -> NounPhrase = \jag -> - {s = jag.s ; g = jag.h1 ; n = jag.h2} ; - --- The following construction has to be refined for genitive forms: --- "vi tre", "oss tre" are OK, but "vår tres" is not. - - Numeral : Type = {s : Case => Str} ; - - pronWithNum : ProPN -> Numeral -> ProPN = \we,two -> - {s = \\c => we.s ! c ++ two.s ! npCase c ; - h1 = we.h1 ; - h2 = we.h2 ; - h3 = we.h3 - } ; - - noNum : Numeral = {s = \\_ => []} ; - --- Formal subjects - - npMan = nameNounPhrase (mkProperName "man" Utr Masc) ; - npDet = nameNounPhrase (mkProperName "det" Neutr NoMasc) ; - ---2 Determiners --- --- Determiners are inflected according to noun in gender and sex. --- The number and species of the noun are determined by the determiner. - - Determiner : Type = {s : Gender => Sex => Str ; n : Number ; b : SpeciesP} ; - --- This is the rule for building noun phrases. - - detNounPhrase : Determiner -> CommNounPhrase -> NounPhrase = \en, man -> - {s = table {c => en.s ! man.g ! man.x ++ man.s ! en.n ! en.b ! npCase c} ; - g = man.g ; n = en.n} ; - --- The following macros are sufficient to define most determiners. --- All $SpeciesP$ values come into question: --- "en god vän" - "min gode vän" - "den gode vännen". - - DetSg : Type = Gender => Sex => Str ; - DetPl : Type = Str ; - - mkDeterminerSg : DetSg -> SpeciesP -> Determiner = \en, b -> - {s = en ; n = Sg ; b = b} ; - - mkDeterminerPl : DetPl -> SpeciesP -> Determiner = \alla,b -> - mkDeterminerPlNum alla b noNum ; - - mkDeterminerPlNum : DetPl -> SpeciesP -> Numeral -> Determiner = \alla,b,n -> - {s = \\_,_ => alla ++ n.s ! Nom ; - n = Pl ; - b = b - } ; - - detSgInvar : Str -> DetSg = \varje -> table {_ => table {_ => varje}} ; - --- A large class of determiners can be built from a gender-dependent table. - - mkDeterminerSgGender : (Gender => Str) -> SpeciesP -> Determiner = \en -> - mkDeterminerSg (table {g => table {_ => en ! g}}) ; - --- Here are some examples. We are in fact doing some ad hoc morphology here, --- instead of importing the lexicon. - - varjeDet = mkDeterminerSg (detSgInvar "varje") IndefP ; - allaDet = mkDeterminerPl "alla" IndefP ; - enDet = mkDeterminerSgGender artIndef IndefP ; - - flestaDet = mkDeterminerPl ["de flesta"] IndefP ; - vilkenDet = mkDeterminerSgGender - (table {Utr => "vilken" ; Neutr => "vilket"}) IndefP ; - vilkaDet = mkDeterminerPl "vilka" IndefP ; - - vilkDet : Number -> Determiner = \n -> case n of { - Sg => vilkenDet ; - Pl => vilkaDet - } ; - - någDet : Number -> Determiner = \n -> case n of { - Sg => mkDeterminerSgGender - (table {Utr => "någon" ; Neutr => "något"}) IndefP ; - Pl => mkDeterminerPl "några" IndefP - } ; - - --- Genitives of noun phrases can be used like determiners, to build noun phrases. --- The number argument makes the difference between "min bil" - "mina bilar". - - npGenDet : Number -> Numeral -> NounPhrase -> CommNounPhrase -> NounPhrase = - \n,tre,huset,vin -> { - s = \\c => case n of { - Sg => huset.s ! PGen (ASg vin.g) ++ - vin.s ! Sg ! DefP Indef ! npCase c ; - Pl => huset.s ! PGen APl ++ tre.s ! Nom ++ - vin.s ! Pl ! DefP Indef ! npCase c - } ; - g = vin.g ; - n = n - } ; - --- *Bare plural noun phrases* like "män", "goda vänner", are built without a --- determiner word. But a $Numeral$ may occur. - - plurDet : CommNounPhrase -> NounPhrase = plurDetNum noNum ; - - plurDetNum : Numeral -> CommNounPhrase -> NounPhrase = \num,cn -> - {s = \\c => num.s ! Nom ++ cn.s ! Pl ! IndefP ! npCase c ; - g = cn.g ; - n = Pl - } ; - --- Definite phrases in Swedish are special, since determiner may be absent --- depending on if the noun is complex: "bilen" - "den nya bilen". - - denDet : CommNounPhrase -> NounPhrase = \cn -> - detNounPhrase - (mkDeterminerSgGender (table {g => artDef ! cn.p ! ASg g}) (DefP Def)) cn ; - deDet : Numeral -> CommNounPhrase -> NounPhrase = \n,cn -> - detNounPhrase (mkDeterminerPlNum (artDef ! cn.p ! APl) (DefP Def) n) cn ; - --- It is useful to have macros for indefinite and definite, singular and plural --- noun-phrase-like syncategorematic expressions. - - indefNounPhrase : Number -> CommNounPhrase -> NounPhrase = \n -> - indefNounPhraseNum n noNum ; - - indefNounPhraseNum : Number -> Numeral -> CommNounPhrase -> NounPhrase = - \n,num,hus -> - case n of { - Sg => detNounPhrase enDet hus ; - Pl => plurDetNum num hus - } ; - - defNounPhrase : Number -> CommNounPhrase -> NounPhrase = \n -> - defNounPhraseNum n noNum ; - - defNounPhraseNum : Number -> Numeral -> CommNounPhrase -> NounPhrase = - \n,num,hus -> case n of { - Sg => denDet hus ; - Pl => deDet num hus - } ; - - indefNoun : Number -> CommNounPhrase -> Str = \n,man -> case n of { - Sg => artIndef ! man.g ++ man.s ! Sg ! IndefP ! Nom ; - Pl => man.s ! Pl ! IndefP ! Nom - } ; - --- Constructions like "tanken att två är jämnt" are formed at the --- first place as common nouns, so that one can also have "ett förslag att...". - - nounThatSentence : CommNounPhrase -> Sentence -> CommNounPhrase = \tanke,x -> - {s = \\n,d,c => tanke.s ! n ! d ! c ++ "att" ++ x.s ! Sub ; - g = tanke.g ; - x = tanke.x ; - p = tanke.p - } ; - - ---2 Adjectives ---3 Simple adjectives --- --- A special type of adjectives just having positive forms (for semantic reasons) --- is useful, e.g. "finsk", "trekantig". - - Adjective : Type = {s : AdjFormPos => Case => Str} ; - - extAdjective : Adj -> Adjective = \adj -> - {s = table {f => table {c => adj.s ! AF (Posit f) c}}} ; - --- Coercions between the compound gen-num type and gender and number: - - gNum : Gender -> Number -> GenNum = \g,n -> - case n of {Sg => ASg g ; Pl => APl} ; - - genGN : GenNum -> Gender = \gn -> - case gn of {ASg g => g ; _ => Utr} ; - numGN : GenNum -> Number = \gn -> - case gn of {ASg _ => Sg ; APl => Pl} ; - ---3 Adjective phrases --- --- An adjective phrase may contain a complement, e.g. "yngre än Rolf". --- Then it is used as postfix in modification, e.g. "en man yngre än Rolf". - - IsPostfixAdj = Bool ; - - AdjPhrase : Type = Adjective ** {p : IsPostfixAdj} ; - --- Simple adjectives are not postfix: - - adj2adjPhrase : Adjective -> AdjPhrase = \ny -> ny ** {p = False} ; - ---3 Comparison adjectives - --- We take comparison adjectives directly from --- the lexicon, which has full adjectives: - - AdjDegr = Adj ; - --- Each of the comparison forms has a characteristic use: --- --- Positive forms are used alone, as adjectival phrases ("ung"). - - positAdjPhrase : AdjDegr -> AdjPhrase = \ung -> - {s = table {a => \\c => ung.s ! AF (Posit a) c} ; - p = False - } ; - --- Comparative forms are used with an object of comparison, as --- adjectival phrases ("yngre än Rolf"). - - comparAdjPhrase : AdjDegr -> NounPhrase -> AdjPhrase = \yngre,rolf -> - {s = \\_, c => yngre.s ! AF Compar Nom ++ "än" ++ rolf.s ! mkNPForm c ; - p = True - } ; - --- Superlative forms are used with a modified noun, picking out the --- maximal representative of a domain ("den yngste mannen"). - - superlNounPhrase : AdjDegr -> CommNounPhrase -> NounPhrase = \yngst,man -> - {s = \\c => let {gn = gNum man.g Sg} in - artDef ! True ! gn ++ - yngst.s ! AF (Super SupWeak) Nom ++ - man.s ! Sg ! DefP Def ! npCase c ; - g = man.g ; - n = Sg - } ; - --- Moreover, superlatives can be used alone as adjectival phrases --- ("yngst", "den yngste" - in free variation). --- N.B. the former is only permitted in predicative position. - - superlAdjPhrase : AdjDegr -> AdjPhrase = \ung -> - {s = \\a,c => variants { - --- artDef ! True ! gn ++ yngst.s ! AF (Super SupWeak) c - ung.s ! AF (Super SupStrong) c - } ; - p = False - } ; - ---3 Two-place adjectives --- --- A two-place adjective is an adjective with a preposition used before --- the complement. (Rem. $Preposition = Str$). - - AdjCompl = Adjective ** {s2 : Preposition} ; - - complAdj : AdjCompl -> NounPhrase -> AdjPhrase = \förtjust,dig -> - {s = \\a,c => förtjust.s ! a ! c ++ förtjust.s2 ++ dig.s ! PAcc ; - p = True - } ; - - ---3 Modification of common nouns --- --- The two main functions of adjective are in predication ("Johan är ung") --- and in modification ("en ung man"). Predication will be defined --- later, in the chapter on verbs. - - modCommNounPhrase : AdjPhrase -> CommNounPhrase -> CommNounPhrase = \God,Nybil -> - {s = \\n, b, c => - let { - god = God.s ! mkAdjForm (unSpeciesAdjP b) n Nybil.g Nybil.x ! Nom ; - nybil = Nybil.s ! n ! b ! c - } in - preOrPost God.p nybil god ; - g = Nybil.g ; - x = Nybil.x ; - p = True} ; - --- A special case is modification of a noun that has not yet been modified. --- But it is simply a special case. - - modCommNoun : Adjective -> CommNoun -> CommNounPhrase = \god,bil -> - modCommNounPhrase (adj2adjPhrase god) (n2n bil) ; - --- We have used a straightforward --- method building adjective forms from simple parameters. - - mkAdjForm : Species -> Number -> Gender -> Sex -> AdjFormPos = \b,n,g,x -> - case of { - => Strong (ASg g) ; - => Strong APl ; - => Weak (AxSg x) ; ---- add masc! - => Weak AxPl - } ; - - ---2 Function expressions - --- A function expression is a common noun together with the --- preposition prefixed to its argument ("mor till x"). --- The type is analogous to two-place adjectives and transitive verbs. - - Function = CommNoun ** {s2 : Preposition} ; - - mkFun : CommNoun -> Preposition -> Function = \f,p -> - f ** {s2 = p} ; - --- The application of a function gives, in the first place, a common noun: --- "mor/mödrar till Johan". From this, other rules of the resource grammar --- give noun phrases, such as "modern till Johan", "mödrarna till Johan", --- "mödrarna till Johan och Maria", and "modern till Johan och Maria" (the --- latter two corresponding to distributive and collective functions, --- respectively). Semantics will eventually tell when each --- of the readings is meaningful. - - appFunComm : Function -> NounPhrase -> CommNounPhrase = \värde,x -> - noun2CommNounPhrase - {s = \\n,b => table { - Gen => nonExist ; - _ => värde.s ! n ! b ! Nom ++ värde.s2 ++ x.s ! PAcc - } ; - g = värde.g ; - x = värde.x - } ; - --- It is possible to use a function word as a common noun; the semantics is --- often existential or indexical. - - funAsCommNounPhrase : Function -> CommNounPhrase = - noun2CommNounPhrase ; - --- The following is an aggregate corresponding to the original function application --- producing "Johans mor" and "modern till Johan". It does not appear in the --- resource grammar API any longer. - - appFun : Bool -> Function -> NounPhrase -> NounPhrase = \coll,värde,x -> - let {n = x.n ; nf = if_then_else Number coll Sg n} in - variants { - defNounPhrase nf (appFunComm värde x) ; - npGenDet nf noNum x (noun2CommNounPhrase värde) - } ; - --- Two-place functions add one argument place. - - Function2 = Function ** {s3 : Preposition} ; - --- There application starts by filling the first place. - - appFun2 : Function2 -> NounPhrase -> Function = \flyg, paris -> - {s = \\n,d,c => flyg.s ! n ! d ! c ++ flyg.s2 ++ paris.s ! PAcc ; - g = flyg.g ; - x = flyg.x ; - s2 = flyg.s3 - } ; - - ---2 Verbs - --- Although the Swedish lexicon has full verb inflection, --- we have limited this first version of the resource syntax to --- verbs in present tense. Their mode can be infinitive, imperative, and indicative. - - ---3 Verb phrases --- --- Verb phrases are discontinuous: the parts of a verb phrase are --- (s) an inflected verb, (s2) verb adverbials (such as negation), and --- (s3) complement. This discontinuity is needed in sentence formation --- to account for word order variations. - - VerbPhrase : Type = Verb ** {s2 : Str ; s3 : Gender => Number => Str} ; - VerbGroup : Type = Verb ** {s2 : Bool => Str ; s3 : Gender => Number => Str} ; - - predVerbGroup : Bool -> VerbGroup -> VerbPhrase = \b,vg -> { - s = vg.s ; - s2 = vg.s2 ! b ; - s3 = vg.s3 - } ; - --- A simple verb can be made into a verb phrase with an empty complement. --- There are two versions, depending on if we want to negate the verb. --- N.B. negation is *not* a function applicable to a verb phrase, since --- double negations with "inte" are not grammatical. - - predVerb : Verb -> VerbGroup = \se -> - se ** { - s2 = negation ; - s3 = \\_,_ => [] - } ; - - negation : Bool => Str = \\b => if_then_Str b [] "inte" ; - --- Verb phrases can also be formed from adjectives ("är snäll"), --- common nouns ("är en man"), and noun phrases ("är den yngste mannen"). --- The third rule is overgenerating: "är varje man" has to be ruled out --- on semantic grounds. - - predAdjective : Adjective -> VerbGroup = \arg -> - verbVara ** { - s2 = negation ; - s3 = \\g,n => arg.s ! mkAdjForm Indef n g NoMasc ! Nom - } ; - - predCommNoun : CommNounPhrase -> VerbGroup = \man -> - verbVara ** { - s2 = negation ; - s3 = \\_,n => indefNoun n man - } ; - - predNounPhrase : NounPhrase -> VerbGroup = \john -> - verbVara ** { - s2 = negation ; - s3 = \\_,_ => john.s ! PNom - } ; - - predAdverb : Adverb -> VerbGroup = \ute -> - verbVara ** { - s2 = negation ; - s3 = \\_,_ => ute.s - } ; - ---3 Transitive verbs --- --- Transitive verbs are verbs with a preposition for the complement, --- in analogy with two-place adjectives and functions. --- One might prefer to use the term "2-place verb", since --- "transitive" traditionally means that the inherent preposition is empty. --- Such a verb is one with a *direct object*. - - TransVerb : Type = Verb ** {s2 : Preposition} ; - - mkTransVerb : Verb -> Preposition -> TransVerb = \v,p -> - v ** {s2 = p} ; - - mkDirectVerb : Verb -> TransVerb = \v -> - mkTransVerb v nullPrep ; - - nullPrep : Preposition = [] ; - - extTransVerb : Verbum -> Preposition -> TransVerb = - \v -> mkTransVerb (extVerb Act v) ; - --- The rule for using transitive verbs is the complementization rule: - - complTransVerb : TransVerb -> NounPhrase -> VerbGroup = \se,dig -> - {s = se.s ; - s2 = negation ; - s3 = \\_,_ => se.s2 ++ dig.s ! PAcc - } ; - --- Transitive verbs with accusative objects can be used passively. --- The function does not check that the verb is transitive. --- Therefore, the function can also be used for "han löps", etc. --- The syntax is the same as for active verbs, with the choice of the --- "s" passive form. - - passVerb : Verb -> VerbGroup = \se -> ---- passive not yet - {s = table {VPres m _ => se.s ! VPres m Pass} ; - s2 = negation ; - s3 = \\_,_ => [] - } ; - --- Transitive verbs can be used elliptically as verbs. The semantics --- is left to applications. The definition is trivial, due to record --- subtyping. - - transAsVerb : TransVerb -> Verb = \love -> - love ; - --- *Ditransitive verbs* are verbs with three argument places. --- We treat so far only the rule in which the ditransitive --- verb takes both complements to form a verb phrase. - - DitransVerb = TransVerb ** {s3 : Preposition} ; - - mkDitransVerb : Verb -> Preposition -> Preposition -> DitransVerb = \v,p1,p2 -> - v ** {s2 = p1 ; s3 = p2} ; - - complDitransVerb : - DitransVerb -> NounPhrase -> NounPhrase -> VerbGroup = \ge,dig,vin -> - {s = ge.s ; - s2 = negation ; - s3 = \\_,_ => ge.s2 ++ dig.s ! PAcc ++ ge.s3 ++ vin.s ! PAcc - } ; - - ---2 Adverbials --- --- Adverbials that modify verb phrases are either post- or pre-verbal. --- As a rule of thumb, simple adverbials ("bra","alltid") are pre-verbal, --- but this is not always the case ("här" is post-verbal). - - Adverb : Type = SS ** {isPost : Bool} ; - - advPre : Str -> Adverb = \alltid -> ss alltid ** {isPost = False} ; - advPost : Str -> Adverb = \bra -> ss bra ** {isPost = True} ; - - adVerbPhrase : VerbPhrase -> Adverb -> VerbPhrase = \spelar, bra -> - let {postp = bra.isPost} in - { - --- this unfortunately generates VP#2 ::= VP#2 - s = spelar.s ; - s2 = (if_then_else Str postp [] bra.s) ++ spelar.s2 ; - s3 = \\g,n => spelar.s3 ! g ! n ++ (if_then_else Str postp bra.s []) - } ; - - advAdjPhrase : SS -> AdjPhrase -> AdjPhrase = \mycket, dyr -> - {s = \\a,c => mycket.s ++ dyr.s ! a ! c ; - p = dyr.p - } ; - --- Adverbials are typically generated by prefixing prepositions. --- The rule for creating locative noun phrases by the preposition "i" --- is a little shaky: "i Sverige" but "på Island". - - prepPhrase : Preposition -> NounPhrase -> Adverb = \i,huset -> - advPost (i ++ huset.s ! PAcc) ; - - locativeNounPhrase : NounPhrase -> Adverb = - prepPhrase "i" ; - --- This is a source of the "mannen med teleskopen" ambiguity, and may produce --- strange things, like "bilar alltid" (while "bilar idag" is OK). --- Semantics will have to make finer distinctions among adverbials. - - advCommNounPhrase : CommNounPhrase -> Adverb -> CommNounPhrase = \bil,idag -> - {s = \\n, b, c => bil.s ! n ! b ! c ++ idag.s ; - g = bil.g ; - x = bil.x ; - p = bil.p} ; - - ---2 Sentences --- --- Sentences depend on a *word order parameter* selecting between main clause, --- inverted, and subordinate clause. - -param - Order = Main | Inv | Sub ; - -oper - Sentence : Type = SS1 Order ; - --- This is the traditional $S -> NP VP$ rule. It takes care of both --- word order and agreement. - - predVerbPhrase : NounPhrase -> VerbPhrase -> Sentence = - \Jag, serdiginte -> - let { - jag = Jag.s ! PNom ; - ser = serdiginte.s ! VPres Indicat Act ; - dig = serdiginte.s3 ! Jag.g ! Jag.n ; - inte = serdiginte.s2 - } in - {s = table { - Main => jag ++ ser ++ inte ++ dig ; - Inv => ser ++ jag ++ inte ++ dig ; - Sub => jag ++ inte ++ ser ++ dig - } - } ; - - ---3 Sentence-complement verbs --- --- Sentence-complement verbs take sentences as complements. - - SentenceVerb : Type = Verb ; - - complSentVerb : SentenceVerb -> Sentence -> VerbGroup = \se,duler -> - {s = se.s ; - s2 = negation ; - s3 = \\_,_ => optStr "att" ++ duler.s ! Main - } ; - ---3 Verb-complement verbs --- --- Sentence-complement verbs take verb phrases as complements. --- They can be auxiliaries ("kan", "måste") or ordinary verbs --- ("försöka"); this distinction cannot be done in the multilingual --- API and leads to some anomalies in Swedish, but less so than in English. - - VerbVerb : Type = Verb ** {isAux : Bool} ; - - complVerbVerb : VerbVerb -> VerbGroup -> VerbGroup = \vilja, simma -> - {s = vilja.s ; - s2 = negation ; - s3 = \\g,n => if_then_Str vilja.isAux [] "att" ++ - simma.s ! VPres Infinit Act ++ simma.s2 ! True ++ simma.s3 ! g ! n - } ; - - ---2 Sentences missing noun phrases --- --- This is one instance of Gazdar's *slash categories*, corresponding to his --- $S/NP$. --- We cannot have - nor would we want to have - a productive slash-category former. --- Perhaps a handful more will be needed. --- --- Notice that the slash category has the same relation to sentences as --- transitive verbs have to verbs: it's like a *sentence taking a complement*. - - SentenceSlashNounPhrase : Type = Sentence ** {s2 : Preposition} ; - - slashTransVerb : Bool -> NounPhrase -> TransVerb -> SentenceSlashNounPhrase = - \b, Jag, se -> - let { - jag = Jag.s ! PNom ; - ser = se.s ! VPres Indicat Act ; - inte = negation ! b - } in - {s = table { - Main => jag ++ ser ++ inte ; - Inv => ser ++ jag ++ inte ; - Sub => jag ++ inte ++ ser - } ; - s2 = se.s2 - } ; - - ---2 Relative pronouns and relative clauses --- --- Relative pronouns can be nominative, accusative, or genitive, and --- they depend on gender and number just like adjectives. --- Moreover they may or may not carry their own genders: for instance, --- "som" just transmits the gender of a noun ("tal som är primt"), whereas --- "vars efterföljare" is $Utrum$ independently of the noun --- ("tal vars efterföljare är prim"). --- This variation is expressed by the $RelGender$ type. - - RelPron : Type = {s : RelCase => GenNum => Str ; g : RelGender} ; - -param - RelGender = RNoGen | RG Gender ; - --- The following functions are selectors for relative-specific parameters. - -oper - -- this will be needed in "tal som är jämnt" / "tal vars efterföljare är jämn" - mkGenderRel : RelGender -> Gender -> Gender = \rg,g -> case rg of { - RG gen => gen ; - _ => g - } ; - - relCase : RelCase -> Case = \c -> case c of { - RGen => Gen ; - _ => Nom - } ; - --- The simplest relative pronoun has no gender of its own. As accusative variant, --- it has the omission of the pronoun ("mannen (som) jag ser"). - - identRelPron : RelPron = - {s = table { - RNom => \\_ => "som" ; - RAcc => \\_ => variants {"som" ; []} ; - RGen => \\_ => "vars" ; - RPrep => pronVilken - } ; - g = RNoGen - } ; - --- Composite relative pronouns have the same variation as function --- applications ("efterföljaren till vilket" - "vars efterföljare"). - - funRelPron : Function -> RelPron -> RelPron = \värde,vilken -> - {s = \\c,gn => - variants { - vilken.s ! RGen ! gn ++ värde.s ! numGN gn ! Indef ! relCase c ; - värde.s ! numGN gn ! Def ! Nom ++ värde.s2 ++ vilken.s ! RPrep ! gn - } ; - g = RG värde.g - } ; - --- Relative clauses can be formed from both verb phrases ("som sover") and --- slash expressions ("som jag ser"). The latter has moreover the variation --- as for the place of the preposition ("som jag talar om" - "om vilken jag talar"). - - RelClause : Type = {s : GenNum => Str} ; - - relVerbPhrase : RelPron -> VerbPhrase -> RelClause = \som,sover -> - {s = \\gn => - som.s ! RNom ! gn ++ sover.s2 ++ sover.s ! VPres Indicat Act ++ - sover.s3 ! mkGenderRel som.g (genGN gn) ! numGN gn - } ; - - relSlash : RelPron -> SentenceSlashNounPhrase -> RelClause = \som,jagTalar -> - {s = \\gn => - let {jagtalar = jagTalar.s ! Sub ; om = jagTalar.s2} in - variants { - som.s ! RAcc ! gn ++ jagtalar ++ om ; - om ++ som.s ! RPrep ! gn ++ jagtalar - } - } ; - --- A 'degenerate' relative clause is the one often used in mathematics, e.g. --- "tal x sådant att x är primt". - - relSuch : Sentence -> RelClause = \A -> - {s = \\g => pronSådan ! g ++ "att" ++ A.s ! Sub} ; - --- The main use of relative clauses is to modify common nouns. --- The result is a common noun, out of which noun phrases can be formed --- by determiners. - - modRelClause : CommNounPhrase -> RelClause -> CommNounPhrase = \man,somsover -> - {s = \\n,b,c => man.s ! n ! b ! c ++ somsover.s ! gNum man.g n ; - g = man.g ; - x = man.x ; - p = False - } ; - --- N.B. we do not get the determinative pronoun --- construction "den man som sover" in this way, but only "mannen som sover". --- Thus we need an extra rule: - - detRelClause : Number -> CommNounPhrase -> RelClause -> NounPhrase = - \n,man,somsover -> - {s = \\c => let {gn = gNum man.g n} in - artDef ! True ! gn ++ - man.s ! n ! DefP Indef ! npCase c ++ somsover.s ! gn ; - g = man.g ; - n = n - } ; - - ---2 Interrogative pronouns --- --- If relative pronouns are adjective-like, interrogative pronouns are --- noun-phrase-like. Actually we can use the very same type! - - IntPron : Type = NounPhrase ; - --- In analogy with relative pronouns, we have a rule for applying a function --- to a relative pronoun to create a new one. We can reuse the rule applying --- functions to noun phrases! - - funIntPron : Function -> IntPron -> IntPron = - appFun False ; - --- There is a variety of simple interrogative pronouns: --- "vilken bil", "vem", "vad". - - nounIntPron : Number -> CommNounPhrase -> IntPron = \n -> - detNounPhrase (vilkDet n) ; - - intPronWho : Number -> IntPron = \num -> { - s = table { - PGen _ => "vems" ; - _ => "vem" - } ; - g = Utr ; - n = num - } ; - - intPronWhat : Number -> IntPron = \num -> { - s = table { - PGen _ => nonExist ; --- - _ => "vad" - } ; - n = num ; - g = Neutr - } ; - ---2 Utterances - --- By utterances we mean whole phrases, such as --- 'can be used as moves in a language game': indicatives, questions, imperative, --- and one-word utterances. The rules are far from complete. --- --- N.B. we have not included rules for texts, which we find we cannot say much --- about on this level. In semantically rich GF grammars, texts, dialogues, etc, --- will of course play an important role as categories not reducible to utterances. --- An example is proof texts, whose semantics show a dependence between premises --- and conclusions. Another example is intersentential anaphora. - - Utterance = SS ; - - indicUtt : Sentence -> Utterance = \x -> postfixSS "." (defaultSentence x) ; - interrogUtt : Question -> Utterance = \x -> postfixSS "?" (defaultQuestion x) ; - - ---2 Questions --- --- Questions are either direct ("vem tog bollen") or indirect --- ("vem som tog bollen"). - -param - QuestForm = DirQ | IndirQ ; - -oper - Question = SS1 QuestForm ; - ---3 Yes-no questions --- --- Yes-no questions are used both independently ("tog du bollen") --- and after interrogative adverbials ("varför tog du bollen"). --- It is economical to handle with these two cases by the one --- rule, $questVerbPhrase'$. The only difference is if "om" appears --- in the indirect form. - - questVerbPhrase : NounPhrase -> VerbPhrase -> Question = - questVerbPhrase' False ; - - questVerbPhrase' : Bool -> NounPhrase -> VerbPhrase -> Question = - \adv,du,sover -> - let {dusover = (predVerbPhrase du sover).s} in - {s = table { - DirQ => dusover ! Inv ; - IndirQ => (if_then_else Str adv [] "om") ++ dusover ! Sub - } - } ; - ---3 Wh-questions --- --- Wh-questions are of two kinds: ones that are like $NP - VP$ sentences, --- others that are line $S/NP - NP$ sentences. - - intVerbPhrase : IntPron -> VerbPhrase -> Question = \vem,sover -> - let {vemsom : NounPhrase = - {s = \\c => vem.s ! c ++ "som" ; g = vem.g ; n = vem.n} - } in - {s = table { - DirQ => (predVerbPhrase vem sover).s ! Main ; - IndirQ => (predVerbPhrase vemsom sover).s ! Sub - } - } ; - - intSlash : IntPron -> SentenceSlashNounPhrase -> Question = \Vem, jagTalar -> - let { - vem = Vem.s ! PAcc ; - jagtalar = jagTalar.s ! Sub ; - talarjag = jagTalar.s ! Inv ; - om = jagTalar.s2 - } in - {s = table { - DirQ => variants { - vem ++ talarjag ++ om ; - om ++ vem ++ talarjag - } ; - IndirQ => variants { - vem ++ jagtalar ++ om ; - om ++ vem ++ jagtalar - } - } - } ; - ---3 Interrogative adverbials --- --- These adverbials will be defined in the lexicon: they include --- "när", "var", "hur", "varför", etc, which are all invariant one-word --- expressions. In addition, they can be formed by adding prepositions --- to interrogative pronouns, in the same way as adverbials are formed --- from noun phrases. N.B. we rely on record subtyping when ignoring the --- position component. - - IntAdverb = SS ; - - prepIntAdverb : Preposition -> IntPron -> IntAdverb = - prepPhrase ; - --- A question adverbial can be applied to anything, and whether this makes --- sense is a semantic question. - - questAdverbial : IntAdverb -> NounPhrase -> VerbPhrase -> Question = - \hur, du, mår -> - {s = \\q => hur.s ++ (questVerbPhrase' True du mår).s ! q} ; - - ---2 Imperatives --- --- We only consider second-person imperatives. - - Imperative = SS1 Number ; - - imperVerbPhrase : VerbPhrase -> Imperative = \titta -> - {s = \\n => titta.s ! VPres Imperat Act ++ titta.s2 ++ titta.s3 ! Utr ! n} ; - - imperUtterance : Number -> Imperative -> Utterance = \n,I -> - ss (I.s ! n ++ "!") ; - ---2 Sentence adverbials --- --- This class covers adverbials such as "annars", "därför", which are prefixed --- to a sentence to form a phrase. - - advSentence : SS -> Sentence -> Utterance = \annars,soverhan -> - ss (annars.s ++ soverhan.s ! Inv ++ ".") ; - - ---2 Coordination --- --- Coordination is to some extent orthogonal to the rest of syntax, and --- has been treated in a generic way in the module $CO$ in the file --- $coordination.gf$. The overall structure is independent of category, --- but there can be differences in parameter dependencies. --- ---3 Conjunctions --- --- Coordinated phrases are built by using conjunctions, which are either --- simple ("och", "eller") or distributed ("både - och", "antingen - eller"). --- --- The conjunction has an inherent number, which is used when conjoining --- noun phrases: "John och Mary är rika" vs. "John eller Mary är rik"; in the --- case of "eller", the result is however plural if any of the disjuncts is. - - Conjunction = CO.Conjunction ** {n : Number} ; - ConjunctionDistr = CO.ConjunctionDistr ** {n : Number} ; - - ---3 Coordinating sentences --- --- We need a category of lists of sentences. It is a discontinuous --- category, the parts corresponding to 'init' and 'last' segments --- (rather than 'head' and 'tail', because we have to keep track of the slot between --- the last two elements of the list). A list has at least two elements. - - ListSentence : Type = {s1,s2 : Order => Str} ; - - twoSentence : (_,_ : Sentence) -> ListSentence = - CO.twoTable Order ; - - consSentence : ListSentence -> Sentence -> ListSentence = - CO.consTable Order CO.comma ; - --- To coordinate a list of sentences by a simple conjunction, we place --- it between the last two elements; commas are put in the other slots, --- e.g. "månen lyser, solen skiner och stjärnorna blinkar". - - conjunctSentence : Conjunction -> ListSentence -> Sentence = - CO.conjunctTable Order ; - - conjunctOrd : Bool -> Conjunction -> CO.ListTable Order -> {s : Order => Str} = - \b,or,xs -> - {s = \\p => xs.s1 ! p ++ or.s ++ xs.s2 ! p} ; - - --- To coordinate a list of sentences by a distributed conjunction, we place --- the first part (e.g. "antingen") in front of the first element, the second --- part ("eller") between the last two elements, and commas in the other slots. --- For sentences this is really not used. - - conjunctDistrSentence : ConjunctionDistr -> ListSentence -> Sentence = - CO.conjunctDistrTable Order ; - ---3 Coordinating adjective phrases --- --- The structure is the same as for sentences. The result is a prefix adjective --- if and only if all elements are prefix. - - ListAdjPhrase : Type = - {s1,s2 : AdjFormPos => Case => Str ; p : Bool} ; - - twoAdjPhrase : (_,_ : AdjPhrase) -> ListAdjPhrase = \x,y -> - CO.twoTable2 AdjFormPos Case x y ** {p = andB x.p y.p} ; - consAdjPhrase : ListAdjPhrase -> AdjPhrase -> ListAdjPhrase = \xs,x -> - CO.consTable2 AdjFormPos Case CO.comma xs x ** {p = andB xs.p x.p} ; - - conjunctAdjPhrase : Conjunction -> ListAdjPhrase -> AdjPhrase = \c,xs -> - CO.conjunctTable2 AdjFormPos Case c xs ** {p = xs.p} ; - - conjunctDistrAdjPhrase : ConjunctionDistr -> ListAdjPhrase -> AdjPhrase = \c,xs -> - CO.conjunctDistrTable2 AdjFormPos Case c xs ** {p = xs.p} ; - - ---3 Coordinating noun phrases --- --- The structure is the same as for sentences. The result is either always plural --- or plural if any of the components is, depending on the conjunction. --- The gender is neuter if any of the components is. - - ListNounPhrase : Type = {s1,s2 : NPForm => Str ; g : Gender ; n : Number} ; - - twoNounPhrase : (_,_ : NounPhrase) -> ListNounPhrase = \x,y -> - CO.twoTable NPForm x y ** {n = conjNumber x.n y.n ; g = conjGender x.g y.g} ; - - consNounPhrase : ListNounPhrase -> NounPhrase -> ListNounPhrase = \xs,x -> - CO.consTable NPForm CO.comma xs x ** - {n = conjNumber xs.n x.n ; g = conjGender xs.g x.g} ; - - conjunctNounPhrase : Conjunction -> ListNounPhrase -> NounPhrase = \c,xs -> - CO.conjunctTable NPForm c xs ** {n = conjNumber c.n xs.n ; g = xs.g} ; - - conjunctDistrNounPhrase : ConjunctionDistr -> ListNounPhrase -> NounPhrase = - \c,xs -> - CO.conjunctDistrTable NPForm c xs ** {n = conjNumber c.n xs.n ; g = xs.g} ; - --- We hve to define a calculus of numbers of genders. For numbers, --- it is like the conjunction with $Pl$ corresponding to $False$. For genders, --- $Neutr$ corresponds to $False$. - - conjNumber : Number -> Number -> Number = \m,n -> case of { - => Sg ; - _ => Pl - } ; - - conjGender : Gender -> Gender -> Gender = \m,n -> case of { - => Utr ; - _ => Neutr - } ; - - ---2 Subjunction --- --- Subjunctions ("om", "när", etc) --- are a different way to combine sentences than conjunctions. --- The main clause can be a sentences, an imperatives, or a question, --- but the subjoined clause must be a sentence. --- --- There are uniformly two variant word orders, e.g. "om du sover kommer björnen" --- and "björnen kommer om du sover". - - Subjunction = SS ; - - subjunctSentence : Subjunction -> Sentence -> Sentence -> Sentence = \if, A, B -> - let {As = A.s ! Sub} in - {s = table { - Main => variants {if.s ++ As ++ "," ++ B.s ! Inv ; - B.s ! Main ++ "," ++ if.s ++ As} ; - o => B.s ! o ++ "," ++ if.s ++ As - } - } ; - - subjunctImperative : Subjunction -> Sentence -> Imperative -> Imperative = - \if, A, B -> - {s = \\n => subjunctVariants if A (B.s ! n)} ; - - subjunctQuestion : Subjunction -> Sentence -> Question -> Question = \if, A, B -> - {s = \\q => subjunctVariants if A (B.s ! q)} ; - - subjunctVariants : Subjunction -> Sentence -> Str -> Str = \if,A,B -> - let {As = A.s ! Sub} in - variants {if.s ++ As ++ "," ++ B ; B ++ "," ++ if.s ++ As} ; - - subjunctVerbPhrase : VerbPhrase -> Subjunction -> Sentence -> VerbPhrase = - \V, if, A -> - adVerbPhrase V (advPost (if.s ++ A.s ! Sub)) ; - ---2 One-word utterances --- --- An utterance can consist of one phrase of almost any category, --- the limiting case being one-word utterances. These --- utterances are often (but not always) in what can be called the --- default form of a category, e.g. the nominative. --- This list is far from exhaustive. - - useNounPhrase : NounPhrase -> Utterance = \john -> - postfixSS "." (defaultNounPhrase john) ; - useCommonNounPhrase : Number -> CommNounPhrase -> Utterance = \n,car -> - useNounPhrase (indefNounPhrase n car) ; - --- Here are some default forms. - - defaultNounPhrase : NounPhrase -> SS = \john -> - ss (john.s ! PNom) ; - - defaultQuestion : Question -> SS = \whoareyou -> - ss (whoareyou.s ! DirQ) ; - - defaultSentence : Sentence -> Utterance = \x -> ss (x.s ! Main) ; -} ; diff --git a/grammars/resource/swedish/TestResourceSwe.gf b/grammars/resource/swedish/TestResourceSwe.gf deleted file mode 100644 index 0c4c2018b..000000000 --- a/grammars/resource/swedish/TestResourceSwe.gf +++ /dev/null @@ -1,46 +0,0 @@ ---# -path=.:../nabstract:../../prelude - -concrete TestResourceSwe of TestResource = StructuralSwe ** open SyntaxSwe in { - -flags startcat=Phr ; lexer=text ; unlexer=text ; - --- a random sample from the lexicon - -lin - Big = stor_25 ; - Small = liten_1146 ; - Old = gammal_16 ; - Young = ung_29 ; - American = extAdjective (aFin "amerikansk") ; - Finnish = extAdjective (aFin "finsk") ; - Married = extAdjective (aAbstrakt "gift") ** {s2 = "med"} ; - Man = extCommNoun Masc man_1144 ; - Woman = extCommNoun NoMasc (sApa "kvinn") ; - Car = extCommNoun NoMasc (sBil "bil") ; - House = extCommNoun NoMasc (sHus "hus") ; - Light = extCommNoun NoMasc (sHus "ljus") ; - Walk = extVerb Act gå_1174 ; - Run = extVerb Act (vFinna "spring" "sprang" "sprung") ; - Love = extTransVerb (vTala "älsk") [] ; - Send = extTransVerb (vTala "skick") [] ; - Wait = extTransVerb (vTala "vänt") "på" ; - Give = extTransVerb (vFinna "giv" "gav" "giv") [] ** {s3 = "till"} ; --- ge - Prefer = extTransVerb (vFinna "föredrag" "föredrog" "föredrag") [] ** - {s3 = "framför"} ; --- föredra - - Say = extVerb Act (vLeka "säg") ; --- works in present tense... - Prove = extVerb Act (vTala "bevis") ; - SwitchOn = extTransVerb (vVända "tän") [] ; - SwitchOff = extTransVerb (vLeka "släck") [] ; - - Mother = mkFun (extCommNoun NoMasc mor_1) "till" ; - Uncle = mkFun (extCommNoun Masc farbror_8) "till" ; - Connection = mkFun (extCommNoun NoMasc (sVarelse "förbindelse")) "från" ** - {s3 = "till"} ; - - Always = advPre "alltid" ; - Well = advPost "bra" ; - - John = mkProperName "Johan" Utr Masc ; - Mary = mkProperName "Maria" Utr NoMasc ; -} ; diff --git a/grammars/resource/swedish/TestSwe.gf b/grammars/resource/swedish/TestSwe.gf deleted file mode 100644 index 05d02c5ee..000000000 --- a/grammars/resource/swedish/TestSwe.gf +++ /dev/null @@ -1,47 +0,0 @@ --- use this path to read the grammar from the same directory ---# -path=.:../abstract:../../prelude - -concrete TestSwe of TestAbs = ResSwe ** open SyntaxSwe in { - -flags startcat=Phr ; lexer=text ; parser=chart ; unlexer=text ; - --- a random sample from the lexicon - -lin - Big = stor_25 ; - Small = liten_1146 ; - Old = gammal_16 ; - Young = ung_29 ; - American = extAdjective (aFin "amerikansk") ; - Finnish = extAdjective (aFin "finsk") ; - Married = extAdjective (aAbstrakt "gift") ** {s2 = "med"} ; - Man = extCommNoun Masc man_1144 ; - Woman = extCommNoun NoMasc (sApa "kvinn") ; - Car = extCommNoun NoMasc (sBil "bil") ; - House = extCommNoun NoMasc (sHus "hus") ; - Light = extCommNoun NoMasc (sHus "ljus") ; - Walk = extVerb Act gå_1174 ; - Run = extVerb Act (vFinna "spring" "sprang" "sprung") ; - Love = extTransVerb (vTala "älsk") [] ; - Send = extTransVerb (vTala "skick") [] ; - Wait = extTransVerb (vTala "vänt") "på" ; - Give = extTransVerb (vFinna "giv" "gav" "giv") [] ** {s3 = "till"} ; --- ge - Prefer = extTransVerb (vFinna "föredrag" "föredrog" "föredrag") [] ** - {s3 = "framför"} ; --- föredra - - Say = extVerb Act (vLeka "säg") ; --- works in present tense... - Prove = extVerb Act (vTala "bevis") ; - SwitchOn = extTransVerb (vVända "tän") [] ; - SwitchOff = extTransVerb (vLeka "släck") [] ; - - Mother = mkFun (extCommNoun NoMasc mor_1) "till" ; - Uncle = mkFun (extCommNoun Masc farbror_8) "till" ; - Connection = mkFun (extCommNoun NoMasc (sVarelse "förbindelse")) "från" ** - {s3 = "till"} ; - - Always = advPre "alltid" ; - Well = advPost "bra" ; - - John = mkProperName "Johan" Utr Masc ; - Mary = mkProperName "Maria" Utr NoMasc ; -} ; diff --git a/grammars/resource/swedish/TypesSwe.gf b/grammars/resource/swedish/TypesSwe.gf deleted file mode 100644 index beead9489..000000000 --- a/grammars/resource/swedish/TypesSwe.gf +++ /dev/null @@ -1,155 +0,0 @@ ---1 Swedish Word Classes and Morphological Parameters --- --- This is a resource module for Swedish morphology, defining the --- morphological parameters and word classes of Swedish. It is aimed --- to be complete w.r.t. the description of word forms. --- However, it does not include those parameters that are not needed for --- analysing individual words: such parameters are defined in syntax modules. --- --- This GF grammar was obtained from the functional morphology file TypesSw.hs --- semi-automatically. The GF inflection engine obtained was obtained automatically. - -resource TypesSwe = open Prelude in { - --- - ---2 Enumerated parameter types --- --- These types are the ones found in school grammars. --- Their parameter values are atomic. - -param - Gender = Utr | Neutr ; - Number = Sg | Pl ; - Species = Indef | Def ; - Case = Nom | Gen ; - Sex = NoMasc | Masc ; - Mode = Ind | Cnj ; - Voice = Act | Pass ; - Degree = Pos | Comp | Sup ; - Person = P1 | P2 | P3 ; - ---2 Word classes and hierarchical parameter types --- --- Real parameter types (i.e. ones on which words and phrases depend) --- are mostly hierarchical. The alternative would be cross-products of --- simple parameters, but this would usually overgenerate. --- - ---3 Substantives --- --- Substantives (= common nouns) have a parameter of type SubstForm. - -param SubstForm = SF Number Species Case ; - --- Substantives moreover have an inherent gender. - -oper Subst : Type = {s : SubstForm => Str ; h1 : Gender} ; - ---3 Adjectives --- --- Adjectives are a very complex class, and the full table has as many as --- 18 different forms. The major division is between the comparison degrees; --- the comparative has only the 2 case forms, whereas the positive has 12 forms. - -param - AdjForm = AF AdjFormGrad Case ; - --- The positive strong forms depend on gender: "en stor bil" - "ett stort hus". --- But the weak forms depend on sex: "den stora bilen" - "den store mannen". --- The plural never makes a gender-sex distinction. - - GenNum = ASg Gender | APl ; - SexNum = AxSg Sex | AxPl ; - - AdjFormPos = Strong GenNum | Weak SexNum ; - AdjFormSup = SupStrong | SupWeak ; - - AdjFormGrad = - Posit AdjFormPos - | Compar - | Super AdjFormSup ; - -oper - Adj : Type = {s : AdjForm => Str} ; - - adverbForm : AdjFormPos = Strong (ASg Neutr) ; - ---3 Verbs --- --- Verbs have 9 finite forms and as many as 18 infinite forms; the large number --- of the latter comes from adjectives. - -oper Verbum : Type = {s : VerbForm => Str} ; - -param - VFin = - Pres Mode Voice - | Pret Mode Voice - | Imper ; --- no passive - - VInf = - Inf Voice - | Supin Voice - | PtPres Case - | PtPret AdjFormPos Case ; - - VerbForm = - VF VFin - | VI VInf ; - --- However, the syntax only needs a simplified verb category, with --- present tense only. Such a verb can be extracted from the full verb, --- and a choice can be made between an active and a passive (deponent) verb. --- Active verbs continue to have passive forms. - -param - VMode = Infinit | Indicat | Imperat ; - VForm = VPres VMode Voice ; - -oper - Verb : Type = SS1 VForm ; - - extVerb : Voice -> Verbum -> Verb = \v,verb -> {s = table { - VPres Infinit v => verb.s ! VI (Inf v) ; - VPres Indicat v => verb.s ! VF (Pres Ind v) ; - VPres Imperat Act => verb.s ! VF Imper ; - VPres Imperat Pass => verb.s ! VF (Pres Ind Pass) --- no passive in Verbum - }} ; - ---3 Other open classes --- --- Proper names, adverbs (Adv having comparison forms and AdvIn not having them), --- and interjections are the remaining open classes. - -oper - PNm : Type = {s : Case => Str ; h1 : Gender} ; - Adv : Type = {s : Degree => Str} ; - AdvInv : Type = {s : Str} ; - Interj : Type = {s : Str} ; - ---3 Closed classes --- --- The rest of the Swedish word classes are closed, i.e. not extensible by new --- lexical entries. Thus we don't have to know how to build them, but only --- how to use them, i.e. which parameters they have. --- --- The most important distinction is between proper-name-like pronouns and --- adjective-like pronouns, which are inflected in completely different parameters. - -param - NPForm = PNom | PAcc | PGen GenNum ; - AdjPronForm = APron GenNum Case ; - AuxVerbForm = AuxInf | AuxPres | AuxPret | AuxSup ; - -oper - ProPN : Type = {s : NPForm => Str ; h1 : Gender ; h2 : Number ; h3 : Person} ; - ProAdj : Type = {s : AdjPronForm => Str} ; - Prep : Type = {s : Str} ; - Conjunct : Type = {s : Str} ; - Subjunct : Type = {s : Str} ; - Art : Type = {s : GenNum => Str} ; - Part : Type = {s : Str} ; - Infin : Type = {s : Str} ; - VAux : Type = {s : AuxVerbForm => Str} ; -} diff --git a/grammars/testConversions/MicroAbs.gf b/grammars/testConversions/MicroAbs.gf deleted file mode 100644 index 64cada72e..000000000 --- a/grammars/testConversions/MicroAbs.gf +++ /dev/null @@ -1,10 +0,0 @@ - -abstract MicroAbs = { - -cat A; - -fun -a, ab : A; -redup : A -> A; - -} diff --git a/grammars/testConversions/MicroCnc.gf b/grammars/testConversions/MicroCnc.gf deleted file mode 100644 index ed4891c7d..000000000 --- a/grammars/testConversions/MicroCnc.gf +++ /dev/null @@ -1,14 +0,0 @@ - -concrete MicroCnc of MicroAbs = { - -lincat -A = {s : Str}; - -lin -a = {s = "a"}; -ab = {s = variants{"c";"b"}}; -redup x = {s = x.s ++ x.s}; - -} - - diff --git a/grammars/testConversions/SimpleAbs.gf b/grammars/testConversions/SimpleAbs.gf deleted file mode 100644 index f22977ca3..000000000 --- a/grammars/testConversions/SimpleAbs.gf +++ /dev/null @@ -1,27 +0,0 @@ - -abstract SimpleAbs = { - -cat -S; VP; NP; V; N; D; P; PP; - -fun --- cyclic : S -> S; -mkS : NP -> VP -> S; -mkVP : V -> NP -> VP; -mkNP1 : D -> N -> NP; -mkNP2 : N -> NP; -mkNP3 : NP -> PP -> NP; -mkPP : NP -> P -> PP; - -robin : NP; -dog : N; -child : N; -love : V; -hate : V; -one : D; -all : D; -inside : P; - -} - - diff --git a/grammars/testConversions/SimpleEng.gf b/grammars/testConversions/SimpleEng.gf deleted file mode 100644 index 07bee5a70..000000000 --- a/grammars/testConversions/SimpleEng.gf +++ /dev/null @@ -1,34 +0,0 @@ - -concrete SimpleEng of SimpleAbs = open SimpleEngRes in { - -lincat -S = {s : Str}; -VP = {s : Num => Str}; -NP = {s : Str ; n : Num}; -V = {s : Num => Str}; -N = {s : Num => Str}; -D = {s : Str ; n : Num}; -P = {s : Str}; -PP = {s : Str}; - -lin -cyclic x = x; -mkS x y = {s = x.s ++ y.s ! x.n}; -mkVP x y = {s = table {n => x.s ! n ++ y.s}}; -mkNP1 x y = {s = x.s ++ y.s ! x.n ; n = x.n}; -mkNP2 x = {s = x.s ! Pl ; n = Pl}; -mkNP3 x y = {s = x.s ++ y.s; n = x.n}; -mkPP x y = {s = y.s ++ x.s}; - -robin = {s = "Robin" ; n = Sg}; -dog = {s = table {Sg => "dog" ; Pl => "dogs"}}; -child = {s = table {Sg => "child" ; Pl => "children"}}; -love = {s = table {Sg => "loves" ; Pl => "love"}}; -hate = {s = table {Sg => "hates" ; Pl => "hate"}}; -one = {s = "one" ; n = Sg}; -all = {s = "all" ; n = Pl}; -inside= {s = "in"}; - -} - - diff --git a/grammars/testConversions/SimpleEngRes.gf b/grammars/testConversions/SimpleEngRes.gf deleted file mode 100644 index 21b7e7c3e..000000000 --- a/grammars/testConversions/SimpleEngRes.gf +++ /dev/null @@ -1,8 +0,0 @@ - -resource SimpleEngRes = { - -param Num = Sg | Pl; - -} - - diff --git a/grammars/testConversions/SimpleSwe.gf b/grammars/testConversions/SimpleSwe.gf deleted file mode 100644 index 273f6c6ba..000000000 --- a/grammars/testConversions/SimpleSwe.gf +++ /dev/null @@ -1,63 +0,0 @@ - -concrete SimpleSwe of SimpleAbs = open SimpleSweRes in { - -lincat -S = {s : Str}; -VP = {s : Str}; -NP = {s : Str}; -V = {s : Str}; -N = {s : Num => Str ; g : Gen}; -D = {s : Gen => Str ; n : Num}; -PP = {s : Str}; -P = {s : Str}; - -lin --- cyclic x = x; -mkS x y = {s = x.s ++ y.s}; -mkVP x y = {s = x.s ++ y.s}; -mkNP1 x y = {s = x.s ! y.g ++ y.s ! x.n}; -mkNP2 x = {s = x.s ! Pl}; -mkNP3 x y = {s = x.s ++ y.s}; -mkPP x y = {s = y.s ++ x.s}; - -robin = {s = "Robin"}; -dog = {s = table {Sg => "hund" ; Pl => "hundar"} ; g = Utr}; -child = {s = table {_ => "barn"} ; g = Neu}; -love = {s = "älskar"}; -hate = {s = variants{"hatar"; "avskyr"}}; -one = {s = variants{table {Utr => "en" ; Neu => "ett"}; - table {Utr => "någon" ; Neu => "något"}} ; n = Sg}; -all = {s = table {_ => "alla"} ; n = Pl}; -inside = {s = variants{"i"; "inuti"}}; - -} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/grammars/testConversions/SimpleSweRes.gf b/grammars/testConversions/SimpleSweRes.gf deleted file mode 100644 index 64f4b2a43..000000000 --- a/grammars/testConversions/SimpleSweRes.gf +++ /dev/null @@ -1,28 +0,0 @@ - -resource SimpleSweRes = { - -param Num = Sg | Pl; -param Gen = Utr | Neu; -param NumGen = NG Num Gen; - -} - - - - - - - - - - - - - - - - - - - - diff --git a/grammars/testConversions/TestVars.gf b/grammars/testConversions/TestVars.gf deleted file mode 100644 index c28810e64..000000000 --- a/grammars/testConversions/TestVars.gf +++ /dev/null @@ -1,43 +0,0 @@ - --- param Num = Sg | Pl; --- param Gen = Utr | Neu; --- param NumGen = NG Num Gen; - -concrete TestVars of TestVarsA = open TestVarsR in { - --- lincat S = { s : Str; n : Num }; --- lincat A = { s1 : Str; s2 : Num => Str ; g : Gen }; --- lincat B = { s : Str; n : Num }; --- lin a x = { s = table { Sg => "sg" ; Pl => "pl" } ! x.n ++ x.s ; n = x.n }; --- lin b x y = { s = table { Neu => variants{"neu";"NEU"} ; Utr => "utr" } ! x.g; --- n = variants { y.n ; Sg } }; --- lin c = { s = variants{"a";"A"} ++ variants{"b";"B"} ++ variants{"c";"C"}; n = Sg }; - --- lincat V = { a : { s1 : Str ; s2 : Str } }; --- lincat W = { s1 : Str ; ng:{n:Num;g:Gen} ; s2 : Str }; --- lin v = { a = variants { {s1="a1";s2="a2"} ; {s1="b1";s2=variants{}} } }; --- lin w = variants { {s1="a1";ng=variants{};s2="a2"} ; --- {s1="b1";ng=variants{{n=Pl;g=Utr};{n=Sg;g=Neu}};s2="b2"} }; - --- lincat E = { a : { b : {s1:Str; s2:Str} ; c : {n:Num;g:Gen} }; d:{e:{f:{s:Str}}} }; --- lin e = { a = { b = {s1="1"; s2="2"} ; c = {n=Sg ;g=Utr} }; d={e={f={s="s"}}} }; --- lin f x = { a = { b = {s1=x.d.e.f.s;s2=x.a.b.s1}; c = {n=x.a.c.n;g=Neu}}; --- d={e={f={s="s"++x.a.b.s2}}} }; - -lincat S = { s : Str }; -lin ---s = { s = variants { "a" ; "b" ; "c" } }; ---e = { s = variants { "e" ; "f" } }; -e = { s = "e" }; -ee x = { s = x.s ++ x.s }; -f = { s = "g" }; -ff x = { s = "e" ++ x.s }; - - --- lincat D = { s1 : Str; s2 : Str }; - - - - -} - diff --git a/grammars/testConversions/TestVarsA.gf b/grammars/testConversions/TestVarsA.gf deleted file mode 100644 index 1b34ddef1..000000000 --- a/grammars/testConversions/TestVarsA.gf +++ /dev/null @@ -1,24 +0,0 @@ - -abstract TestVarsA = { - --- cat S; A; B; --- fun a : B -> S; --- fun b : A -> B -> S; --- fun c : S; - --- cat V; W; --- fun v : V; --- fun w : W; - -cat S; ---fun s : S; -fun e : S; -fun ee : S -> S; -fun f : S; -fun ff : S -> S; - --- cat D; --- fun d : D; --- fun dd : D -> D; -} - diff --git a/grammars/testConversions/TestVarsR.gf b/grammars/testConversions/TestVarsR.gf deleted file mode 100644 index d56d56603..000000000 --- a/grammars/testConversions/TestVarsR.gf +++ /dev/null @@ -1,28 +0,0 @@ - -resource TestVarsR = { - -param Num = Sg | Pl; -param Gen = Utr | Neu; -param NumGen = NG Num Gen; - -} - - - - - - - - - - - - - - - - - - - - diff --git a/grammars/testConversions/TimeFlies.gf b/grammars/testConversions/TimeFlies.gf deleted file mode 100644 index f46592b55..000000000 --- a/grammars/testConversions/TimeFlies.gf +++ /dev/null @@ -1,24 +0,0 @@ - -concrete TimeFlies of TimeFliesAbs = { - -lin -s1 x y = {s = x.s ++ y.s}; -vp1 x = {s = x.s}; -vp2 x y = {s = x.s ++ y.s}; -vp3 x y = {s = x.s ++ y.s}; -np1 x = {s = x.s}; -np2 x y = {s = x.s ++ y.s}; -np3 x y = {s = x.s ++ y.s}; -pp1 x y = {s = x.s ++ y.s}; - -flyV = {s = "flies"}; -timeV = {s = "time"}; -likeV = {s = "like"}; -flyN = {s = "flies"}; -timeN = {s = "time"}; -arrowN = {s = "arrow"}; -anD = {s = "an"}; -timeD = {s = "time"}; -likeP = {s = "like"}; - -} diff --git a/grammars/testConversions/TimeFliesAbs.gf b/grammars/testConversions/TimeFliesAbs.gf deleted file mode 100644 index fe52f82b6..000000000 --- a/grammars/testConversions/TimeFliesAbs.gf +++ /dev/null @@ -1,27 +0,0 @@ - -abstract TimeFliesAbs = { - -cat -S; VP; NP; PP; V; N; D; P; - -fun -s1 : NP -> VP -> S; -vp1 : V -> VP; -vp2 : V -> NP -> VP; -vp3 : VP -> PP -> VP; -np1 : N -> NP; -np2 : D -> N -> NP; -np3 : NP -> PP -> NP; -pp1 : P -> NP -> PP; - -flyV : V; -timeV : V; -likeV : V; -flyN : N; -timeN : N; -arrowN : N; -anD : D; -timeD : D; -likeP : P; -} - diff --git a/grammars/testConversions/TimeFliesCnc.gf b/grammars/testConversions/TimeFliesCnc.gf deleted file mode 100644 index 5952dda49..000000000 --- a/grammars/testConversions/TimeFliesCnc.gf +++ /dev/null @@ -1,2 +0,0 @@ - -resource diff --git a/grammars/timetable/Timetable.gf b/grammars/timetable/Timetable.gf deleted file mode 100644 index 8eab2600b..000000000 --- a/grammars/timetable/Timetable.gf +++ /dev/null @@ -1,31 +0,0 @@ -abstract Timetable = { - cat - Table ; - TrainList CityList ; - City ; - CityList ; - Train CityList ; - Stop ; - Time ; - Number ; - - fun - MkTable : (cs : CityList) -> TrainList cs -> Table ; - NilTrain : (cs : CityList) -> TrainList cs ; - ConsTrain : - (cs : CityList) -> Number -> Train cs -> TrainList cs -> TrainList cs ; - OneCity : City -> CityList ; - ConsCity : City -> CityList -> CityList ; - - StopTime : Time -> Stop ; - NoStop : Stop ; - - LocTrain : (c : City) -> Stop -> Train (OneCity c) ; - CityTrain : - (c : City) -> Stop -> (cs : CityList) -> - Train cs -> Train (ConsCity c cs) ; - - T : Int -> Time ; - N : Int -> Number ; - C : String -> City ; -} diff --git a/grammars/timetable/TimetableEng.gf b/grammars/timetable/TimetableEng.gf deleted file mode 100644 index 498f96975..000000000 --- a/grammars/timetable/TimetableEng.gf +++ /dev/null @@ -1,23 +0,0 @@ ---# -path=.:../prelude - -concrete TimetableEng of Timetable = open Prelude in { - - lin - MkTable cs ts = - ss (["The following trains run on the line from"] ++ cs.s ++ "." ++ ts.s) ; - NilTrain _ = ss [] ; - ConsTrain cs n t ts = ss (n.s ++ ":" ++ t.s ++ "." ++ ts.s) ; - OneCity c = c ; - ConsCity c cs = ss (c.s ++ "to" ++ cs.s) ; - - StopTime t = t ; - NoStop = ss ["no stop"] ; - - LocTrain c s = cc2 c s ; - CityTrain c s cs t = ss (c.s ++ s.s ++ "," ++ t.s) ; - - T i = prefixSS "at" i ; - N n = prefixSS "Train" n ; - C s = s ; - -} diff --git a/grammars/timetable/TimetableHTML.gf b/grammars/timetable/TimetableHTML.gf deleted file mode 100644 index 0fec2a1ab..000000000 --- a/grammars/timetable/TimetableHTML.gf +++ /dev/null @@ -1,24 +0,0 @@ ---# -path=.:../prelude - -concrete TimetableHTML of Timetable = open Prelude, HTML in { - - lin - MkTable cs ts = - ss (intagAttr "table" - "border=ON" (intag "tr" (intag "td" [] ++ cs.s) ++ ts.s)) ; - NilTrain _ = ss [] ; - ConsTrain cs n t ts = ss (intag "tr" (intag "td" n.s ++ t.s) ++ ts.s) ; - OneCity c = ss (intag "td" c.s) ; - ConsCity c cs = ss (intag "td" c.s ++ cs.s) ; - - StopTime t = ss (intag "td" t.s) ; - NoStop = ss (intag "td" "-") ; - - LocTrain c s = s ; - CityTrain c s cs t = ss (s.s ++ t.s) ; - - T i = i ; - N n = ss (intag "b" n.s) ; - C s = ss (intag "b" s.s) ; - -} diff --git a/grammars/timetable/TimetableLatex.gf b/grammars/timetable/TimetableLatex.gf deleted file mode 100644 index f0d4f0939..000000000 --- a/grammars/timetable/TimetableLatex.gf +++ /dev/null @@ -1,28 +0,0 @@ ---# -path=.:../prelude - -concrete TimetableLatex of Timetable = open Prelude, Latex in { - - lincat - CityList = {s,s2 : Str} ; -- s2 encodes table width - - lin - MkTable cs ts = - ss ("\\documentstyle{article}" ++ inEnv "document" ( - (inEnv "tabular" ("{" ++ cs.s2 ++ "}" ++ "&" ++ cs.s ++ - command "hline" ++ ts.s)))) ; - NilTrain _ = ss [] ; - ConsTrain cs n t ts = ss (n.s ++ "&" ++ t.s ++ "\\\\" ++ ts.s) ; - OneCity c = {s = c.s ++ "\\\\" ; s2 = "l|l"} ; - ConsCity c cs = {s = c.s ++ "&" ++ cs.s ; s2 = "l|" ++ cs.s2} ; - - StopTime t = t ; - NoStop = ss "---" ; - - LocTrain c s = s ; - CityTrain c s cs t = ss (s.s ++ "&" ++ t.s) ; - - T i = i ; - N n = n ; --- ss (fun1 "textbf" n.s) ; - C s = s ; --- ss (fun1 "textbf" s.s) ; - -} diff --git a/grammars/timetable/click.gf b/grammars/timetable/click.gf deleted file mode 100644 index d752fb027..000000000 --- a/grammars/timetable/click.gf +++ /dev/null @@ -1,36 +0,0 @@ -cat - Request ; - Place ; - Position ; - -fun - GoTo : Place -> Request ; - GoFromTo : Place -> Place -> Request ; - - Named : String -> Place ; - Pointed : Position -> Place ; - - Pos : Int -> Int -> Position ; - -lincat - Request, Place = {s,s2 : Str} ; - -lin - GoTo x = { - s = ["I want to go to"] ++ x.s ; - s2 = x.s2 - } ; - GoFromTo x y = { - s = ["I want to go from"] ++ x.s ++ "to" ++ y.s ; - s2 = x.s2 ++ "," ++ y.s2 - } ; - - Named c = { - s = c.s ; - s2 = [] - } ; - Pointed p = { - s = "here" ; - s2 = p.s - } ; - Pos x y = {s = "(" ++ x.s ++ "," ++ y.s ++ ")"} ; diff --git a/grammars/tst.sh b/grammars/tst.sh deleted file mode 100644 index d957fa263..000000000 --- a/grammars/tst.sh +++ /dev/null @@ -1,19 +0,0 @@ -cd gf-grammars/numerals -gf i allSwe.gf - > i allProlog.gf - - > gr -cat=DMove | l -tr -lang=allSwe | p -cat=DMove -lang=allSwe | l -lang=allProlog - vill du använda svenska eller engelska - ask ([language (X)]) - -The intended use of that grammar is in dialogue systems to program a -video recorder. Queries in Swedish are translated to Prolog. - -The original grammar is written in GF 1.2 and includes. There is a -very nice modular structure, which could not be reproduced with the -single inheritance straightjacket of GF 2.0. But now we can finally -do this again! - - -Map of abstract syntax inheritances. - - all - / \ - / \ - specUser specSystem - / \ / \ - genUser specific genSystem - | / | | \ | - | / | | \ | - | / channel time weekday | - | | | - | | | - -----general ------------------ - - -The map was obtained by: - -grep abstract *.gf */*.gf - -all.gf:abstract all = specUser,specSystem ** { -Channel/channel.gf:abstract channel = { -Shared/general.gf:abstract general = { -Shared/specific.gf:abstract specific = general, weekday, time, channel ** { -System/genSystem.gf:abstract genSystem = general ** { -System/specSystem.gf:abstract specSystem = specific, genSystem ** { -Time/time.gf:abstract time = { -User/genUser.gf:abstract genUser = general ** { -User/specUser.gf:abstract specUser = specific, genUser ** { -Weekday/weekday.gf:abstract weekday = { diff --git a/grammars/video/Shared/general.Prolog.gf b/grammars/video/Shared/general.Prolog.gf deleted file mode 100644 index 322c805b4..000000000 --- a/grammars/video/Shared/general.Prolog.gf +++ /dev/null @@ -1,50 +0,0 @@ --- File name Shared/general.Prolog.gf -include - general.Abs.gf ; - -flags lexer=codelit ; unlexer=codelit ; startcat=DMoveList ; - - -oper -app : Str -> Str -> Str = - \pred -> \arg -> - pred ++ "(" ++ arg ++ ")" ; -appHakeOne : Str -> Str = - \arg -> - "["++ arg ++ "]" ; - - -lin -dmoves dm = {s = appHakeOne dm.s }; -dmoves1 dm = {s = dm.s }; -dmoves2 dm dms = {s = dm.s ++ "," ++ dms.s }; - -lin -answer p = {s = app "answer" p.s}; ---request a = {s = app "request" a.s }; - ---- Answers -propans a = {s = a.s} ; -negpropans a = {s = app "not" a.s} ; -shortans a = {s = a.s} ; -negShortAns a = {s = a.s} ; - -negprop n p = {s = n.s ++ p.s} ; - -pattern -neg = [] ; - -pattern -----Short answers -yes = "yes" ; -no = "no"; -english = "english" ; ----??? -swedish = "swedish" ; ----??? - -lin -indShortAns a = {s = a.s} ; -not n = {s = n.s} ; - ---avsluta?? ---börja om -top = { s = "top"} ; diff --git a/grammars/video/Shared/general.gf b/grammars/video/Shared/general.gf deleted file mode 100644 index 98922c8c6..000000000 --- a/grammars/video/Shared/general.gf +++ /dev/null @@ -1,51 +0,0 @@ -abstract general = { - -cat -Action ; -DMove ; -DMoves ; -DMoveList ; - -Ind ; -Prop ; - -fun ---- DMove -dmoves : DMoves -> DMoveList ; -dmoves1 : DMove -> DMoves ; -dmoves2 : DMove -> DMoves -> DMove ; - --- File name User/general.Abs.gf - -cat -Answer ; -ShortAns ; -NegShortAns ; -NegProp ; -Neg ; - -fun -answer : Answer -> DMove ; ---request : Action -> DMove ; - ---- Answers -propans : Prop -> Answer ; -negpropans : NegProp -> Answer ; -shortans : ShortAns -> Answer ; -negShortAns : NegShortAns -> Answer ; - -negprop : Neg -> Prop -> NegProp ; -neg : Neg ; - ---Short answers -swedish : ShortAns ; -english : ShortAns ; -yes : ShortAns ; -no : NegShortAns ; -indShortAns : Ind -> ShortAns ; -not : ShortAns -> NegShortAns ; - ---avsluta?? ---börja om -top : Action ; -} diff --git a/grammars/video/Shared/generalProlog.gf b/grammars/video/Shared/generalProlog.gf deleted file mode 100644 index 907a6b787..000000000 --- a/grammars/video/Shared/generalProlog.gf +++ /dev/null @@ -1,43 +0,0 @@ --- File name Shared/general.Prolog.gf - -concrete generalProlog of general = open prologResource in { - -flags lexer=codelit ; unlexer=codelit ; startcat=DMoveList ; - - - -lin -dmoves dm = {s = appHakeOne dm.s }; -dmoves1 dm = {s = dm.s }; -dmoves2 dm dms = {s = dm.s ++ "," ++ dms.s }; - -lin -answer p = {s = app "answer" p.s}; ---request a = {s = app "request" a.s }; - ---- Answers -propans a = {s = a.s} ; -negpropans a = {s = app "not" a.s} ; -shortans a = {s = a.s} ; -negShortAns a = {s = a.s} ; - -negprop n p = {s = n.s ++ p.s} ; - -pattern -neg = [] ; - -pattern -----Short answers -yes = "yes" ; -no = "no"; -english = "english" ; ----??? -swedish = "swedish" ; ----??? - -lin -indShortAns a = {s = a.s} ; -not n = {s = n.s} ; - ---avsluta?? ---börja om -top = { s = "top"} ; -} \ No newline at end of file diff --git a/grammars/video/Shared/generalSwe.gf b/grammars/video/Shared/generalSwe.gf deleted file mode 100644 index b8e0c8f0f..000000000 --- a/grammars/video/Shared/generalSwe.gf +++ /dev/null @@ -1,43 +0,0 @@ -concrete generalSwe of general = { - -flags lexer=codelit ; unlexer=codelit ; startcat=DMoveList ; - - -lincat DMove = {s : Str} ; - -lin -dmoves dm = {s = dm.s }; -dmoves1 dm = {s = dm.s }; -dmoves2 dm dms = {s = dm.s ++ "," ++ dms.s }; -lin - -answer a = {s = a.s } ; - - ---- Answers -propans a = {s = a.s} ; -negpropans a = {s = a.s} ; -shortans a = {s = a.s} ; -negShortAns a = {s = a.s} ; - -negprop n p = {s= n.s ++ p.s} ; - -pattern -neg = "inte" ; - -pattern ---Short answers -swedish = "svenska" ; -english = "engelska" ; -yes = (variants {"ja" ; "jajamensan" ; "japp"}) ; -no = "nej"; - -lin -indShortAns a = {s = a.s} ; -not n = {s = n.s} ; - ---avsluta?? ---börja om --- variants? från början etc? -top = { s = ["börja om"]} ; -} diff --git a/grammars/video/Shared/prologResource.gf b/grammars/video/Shared/prologResource.gf deleted file mode 100644 index a527500e1..000000000 --- a/grammars/video/Shared/prologResource.gf +++ /dev/null @@ -1,19 +0,0 @@ -resource prologResource = { - -oper -app : Str -> Str -> Str = - \pred -> \arg -> - pred ++ "(" ++ arg ++ ")" ; -appHakeOne : Str -> Str = - \arg -> - "["++ arg ++ "]" ; -oper ---with single quotes ---app2 : Str -> Str -> Str -> Str = \pred -> \argH -> \argM -> pred ++ "(" ++ "'" ++ argH ++ ":" ++ argM ++ "'" ++ ")" ; ---without single quotes ---app2 : Str -> Str -> Str -> Str = \pred -> \argH -> \argM -> pred ++ "(" ++ argH ++ ":" ++ argM ++ ")" ; - -app3 : Str -> Str -> Str = \argH -> \argM -> argH ++ ":" ++ argM ; - - -} diff --git a/grammars/video/Shared/specific.gf b/grammars/video/Shared/specific.gf deleted file mode 100644 index 424b1023e..000000000 --- a/grammars/video/Shared/specific.gf +++ /dev/null @@ -1,29 +0,0 @@ -abstract specific = general, weekday, time, channel ** { - -cat -StartTime ; -EndTime ; -ChToStore ; -WdToStore ; - -cat -DelAction ; - -fun ---- Inds -indTime : Time -> Ind; -indChannel : Channel -> Ind; -indWeekday : Weekday -> Ind; - -fun -delAction : DelAction -> Action ; -delete_rec_job : DelAction ; - -fun -startTimeToStore : Time -> StartTime ; -endTimeToStore : Time -> EndTime ; -channelToStore : Channel -> ChToStore ; -weekdayToStore : Weekday -> WdToStore ; - -vcr_add_rec_job_no_args : Action ; ---- moved from specUser and specSystem -} diff --git a/grammars/video/Shared/specificProlog.gf b/grammars/video/Shared/specificProlog.gf deleted file mode 100644 index 8ca76dbed..000000000 --- a/grammars/video/Shared/specificProlog.gf +++ /dev/null @@ -1,22 +0,0 @@ --- File name Shared/specific.Prolog.gf - -concrete specificProlog of specific = - generalProlog, weekdayProlog, channelProlog, timeProlog ** - open prologResource in { - -lin -indTime t = {s = t.s} ; -indChannel c = {s = c.s} ; -indWeekday w = {s = w.s} ; - -delete_rec_job = {s = "delete_rec_job"} ; -delAction dact = {s = dact.s }; - - -startTimeToStore st = {s = app "start_time_to_store" st.s } ; -endTimeToStore et = {s = app "stop_time_to_store" et.s } ; -channelToStore ch = {s = app "channel_to_store" ch.s } ; -weekdayToStore wd = {s = app "weekday_to_store" wd.s } ; - -vcr_add_rec_job_no_args = {s = ["add_rec_job"]} ; -- hack!!! -} diff --git a/grammars/video/Shared/specificSwe.gf b/grammars/video/Shared/specificSwe.gf deleted file mode 100644 index 2361a0c5e..000000000 --- a/grammars/video/Shared/specificSwe.gf +++ /dev/null @@ -1,20 +0,0 @@ ---# -path=.:../Time:../Channel:../Weekday - -concrete specificSwe of specific = generalSwe, weekdaySwe, timeSwe, channelSwe ** { - -lin -indTime t = {s = t.s} ; -indChannel c = {s = c.s} ; -indWeekday w = {s = w.s} ; - -delete_rec_job = {s = ["ta bort inspelning"]} ; -delAction dact = {s = dact.s }; - - -startTimeToStore st = {s = "från" ++ st.s } ; -endTimeToStore et = {s = "till" ++ et.s } ; -channelToStore ch = {s = "på" ++ ch.s } ; -weekdayToStore wd = {s = "på" ++ wd.s } ; - -vcr_add_rec_job_no_args = {s = ["spela in"]} ; ---- -} diff --git a/grammars/video/System/genSystem.gf b/grammars/video/System/genSystem.gf deleted file mode 100644 index d25fb0fee..000000000 --- a/grammars/video/System/genSystem.gf +++ /dev/null @@ -1,37 +0,0 @@ --- general.Abs.gf - -abstract genSystem = general ** { - - -cat -Empty ; -- whatever this is good for? -Question ; -YNQuestion ; -WHQuestion ; -AltQuestion ; -PropQ ; - - -fun -greet : DMove ; -- "Welcome" -quit : DMove ; -- "Goodbye" - -ask : Question -> DMove ; - ---- Language -change_language : Action ; -language_alt : Question ; - ---- Actions -actionQ : WHQuestion ; - ---- Questions -whQuestion : WHQuestion -> Question ; -altQuestion : YNQuestion -> YNQuestion -> AltQuestion ; - ---- Issue -issue : Question -> PropQ ; - ---- Lists -nil : Empty ; -} diff --git a/grammars/video/System/genSystemProlog.gf b/grammars/video/System/genSystemProlog.gf deleted file mode 100644 index 511c80b7e..000000000 --- a/grammars/video/System/genSystemProlog.gf +++ /dev/null @@ -1,32 +0,0 @@ --- File name system.Prolog.gf - -concrete genSystemProlog of genSystem = generalProlog ** - open prologResource in { - - -pattern -greet = "greet" ; -quit = "quit" ; - -lin -ask q = {s = app "ask" q.s} ; - -lin ----Language -change_language = {s = "change_language"} ; -language_alt = {s = "[" ++ "language" ++ "(" ++ "X" ++ ")" ++ "]" } ; -- hack! - ----Actions -pattern -actionQ = "action" ; - -lin -whQuestion f = {s = "X" ++ "^" ++ app f.s "X"} ; -altQuestion a1 a2 = {s = a1.s ++ a2.s}; - ---- Issue -issue i = {s = app "issue" i.s} ; - -pattern -nil = "[]" ; -} diff --git a/grammars/video/System/genSystemSwe.gf b/grammars/video/System/genSystemSwe.gf deleted file mode 100644 index 8b9a93b0d..000000000 --- a/grammars/video/System/genSystemSwe.gf +++ /dev/null @@ -1,32 +0,0 @@ --- File name System/general.Swe.gf - -concrete genSystemSwe of genSystem = generalSwe ** open icm100ResSwe in { - ----- flags lexer=codelit ; unlexer=codelit ; startcat=DMoveList ; - -pattern -greet = ["Välkommen till videobandspelaren"] ; -quit = "hejdå" ; - -lin -ask a = {s = a.s} ; - -lin ----Language -change_language = {s = "byt" ++ "språk"} ; -language_alt = {s = ["vill du använda svenska eller engelska"]} ; - ----Actions -lin -actionQ = {s = "Vad" ++ "kan" ++ "jag" ++ "stå" ++ "till" ++ "tjänst" ++ "med"} ; - -lin -whQuestion w = {s = w.s }; -altQuestion a1 a2 = {s = "vill" ++ "du" ++ "spela" ++ "in" ++ a1.s ++ "eller" ++ a2.s}; - ---- Issue -issue i = {s = i.s} ; - -pattern -nil = "[]" ; -} \ No newline at end of file diff --git a/grammars/video/System/general.Prolog.gf b/grammars/video/System/general.Prolog.gf deleted file mode 100644 index 942d43e9c..000000000 --- a/grammars/video/System/general.Prolog.gf +++ /dev/null @@ -1,32 +0,0 @@ --- File name system.Prolog.gf - -include - general.Abs.gf ; - ../icm100.Prolog.gf ; - - -pattern -greet = "greet" ; -quit = "quit" ; - -lin -ask q = {s = app "ask" q.s} ; - -lin ----Language -change_language = {s = "change_language"} ; -language_alt = {s = "[" ++ "language" ++ "(" ++ "X" ++ ")" ++ "]" } ; -- hack! - ----Actions -pattern -actionQ = "action" ; - -lin -whQuestion f = {s = "X" ++ "^" ++ app f.s "X"} ; -altQuestion a1 a2 = {s = a1.s ++ a2.s}; - ---- Issue -issue i = {s = app "issue" i.s} ; - -pattern -nil = "[]" ; \ No newline at end of file diff --git a/grammars/video/System/re2specific.Swe.gf b/grammars/video/System/re2specific.Swe.gf deleted file mode 100644 index 664f3ef95..000000000 --- a/grammars/video/System/re2specific.Swe.gf +++ /dev/null @@ -1,60 +0,0 @@ --- File name System/specific.Swe.gf - -include - specific.Abs.gf ; - -lin --- Confirm recording job -confirmRecJob act = {s = ["bekräftar"] ++ act.s } ; --- programmet är inspelat -- spela in --- inspelningen är tillagd -- lägga till --- programmet är borttaget -- ta bort - -q_lambdaActionDel dact = {s = ["vilket programnummer vill du ta bort"]}; - - - -vcr_add_rec_job_no_args = {s = ["spela in"]} ; -- hack!!! - - - ---- Time in question -startTimeToStoreQ st = {s = "från" ++ st.s } ; --- prep Time -endTimeToStoreQ et = {s = "till" ++ et.s } ; --- prep Time - ---- Channel and Weekday in question -channelToStoreQ ch = {s = "på" ++ ch.s } ; --- prep Channel -weekdayToStoreQ wd = {s = "på" ++ wd.s } ; ---prep Weekday - - ---- WHQuestions --- Lambdas -q_lambdaWeekday wdts = {s = ["vilken dag vill du spela in på"]}; -q_lambdaChannel chts = {s = ["vilken kanal vill du spela in från"]}; -q_lambdaStartTime stts = {s = ["vilken tid vill du påbörja inspelningen"]}; -q_lambdaEndTime etts = {s = ["vilken tid vill du avsluta inspelningen"]}; - - - ---- Constructions for ynquestions -lin -ynQuST y = {s = y.s} ; -ynQuET y = {s = y.s} ; -ynQuCH y = {s = y.s} ; -ynQuWD y = {s = y.s} ; - -lin ---- Props -startTimeToStoreProp st = {s = st.s } ; -endTimeToStoreProp et = {s = et.s } ; -channelToStoreProp chst = {s = chst.s } ; -weekdayToStoreProp wdts = {s = wdts.s } ; - -channelListing chs = {s = chs.s } ; -channels1 ch = {s = ch.s } ; -channels2 ch chs = {s = ch.s ++ "," ++ chs.s } ; -channelListAction ch = {s = ch.s } ; -channelListActionDMove ch = {s = ch.s } ; \ No newline at end of file diff --git a/grammars/video/System/specSystem.gf b/grammars/video/System/specSystem.gf deleted file mode 100644 index 0b5f6957e..000000000 --- a/grammars/video/System/specSystem.gf +++ /dev/null @@ -1,59 +0,0 @@ --- File name System/specific.Abs.gf - -abstract specSystem = specific, genSystem ** { - -cat -StartTimeQ ; -EndTimeQ ; -ChToStoreQ ; -WdToStoreQ ; - -fun -confirmRecJob : Action -> DMove; ----- vcr_add_rec_job_no_args : Action ; -- spela in! moved to specific - -q_lambdaActionDel : DelAction -> WHQuestion ; - --- Time in question -startTimeToStoreQ : Time -> StartTimeQ ; -endTimeToStoreQ : Time -> EndTimeQ ; - ---- Channel and Weekday in question -channelToStoreQ : Channel -> ChToStoreQ ; -weekdayToStoreQ : Weekday -> WdToStoreQ ; - ---- WHQuestions --- Lambdas -q_lambdaStartTime : StartTime -> WHQuestion ; -q_lambdaEndTime : EndTime -> WHQuestion ; -q_lambdaWeekday : WdToStore -> WHQuestion ; -q_lambdaChannel : ChToStore -> WHQuestion ; - - ---- Constructions for ynquestions -ynQuST : StartTimeQ -> YNQuestion ; -ynQuET : EndTimeQ -> YNQuestion ; -ynQuCH : ChToStoreQ -> YNQuestion ; -ynQuWD: WdToStoreQ -> YNQuestion ; - - ---- Props -startTimeToStoreProp : StartTime -> Prop ; -endTimeToStoreProp : EndTime -> Prop ; -channelToStoreProp : ChToStore -> Prop ; -weekdayToStoreProp : WdToStore -> Prop ; - - -cat -ChannelList ; -Channels ; -ChannelAction ; - -fun -channelListing : Channels -> ChannelList ; -channels1 : Channel -> Channels ; -channels2 : Channel -> Channels -> Channel ; -channelListAction : ChannelList -> ChannelAction ; ---channelListAction : ChannelList -> DMove ; -channelListActionDMove : ChannelAction -> DMove ; - -} diff --git a/grammars/video/System/specSystemProlog.gf b/grammars/video/System/specSystemProlog.gf deleted file mode 100644 index 6ee65c4e3..000000000 --- a/grammars/video/System/specSystemProlog.gf +++ /dev/null @@ -1,45 +0,0 @@ --- File name System/specific.Prolog.gf - -concrete specSystemProlog of specSystem = genSystemProlog, specificProlog ** - open prologResource in { - -lin --- Confirm recording job -confirmRecJob act = {s = app "confirm" act.s } ; - -q_lambdaActionDel dact = {s = ["rec_job_to_delete"]} ; - ---- Time in question -startTimeToStoreQ st = {s = app "start_time_to_store" st.s } ; -endTimeToStoreQ et = {s = app "stop_time_to_store" et.s } ; - ---- Channel and Weekday in question -channelToStoreQ ch = {s = app "channel_to_store" ch.s } ; -weekdayToStoreQ wd = {s = app "weekday_to_store" wd.s } ; - ---- WHQuestions --- Lambdas -q_lambdaWeekday wdts = {s = ["weekday_to_store"]} ; -q_lambdaChannel chts = {s = ["channel_to_store"]} ; -q_lambdaStartTime stts = {s = ["start_time_to_store"]} ; -q_lambdaEndTime etts = {s = ["stop_time_to_store"]} ; - - ---- Constructions for ynquestions -lin -ynQuST y = {s = y.s} ; -ynQuET y = {s = y.s} ; -ynQuCH y = {s = y.s} ; -ynQuWD y = {s = y.s} ; - ---- Props -startTimeToStoreProp st = {s = st.s } ; -endTimeToStoreProp et = {s = et.s } ; -channelToStoreProp chst = {s = chst.s } ; -weekdayToStoreProp wdts = {s = wdts.s } ; - -channelListing chs = {s = chs.s } ; -channels1 ch = {s = ch.s } ; -channels2 ch chs = {s = ch.s ++ "," ++ chs.s } ; -channelListAction ch = {s = ch.s } ; -channelListActionDMove ch = {s = ch.s } ; -} \ No newline at end of file diff --git a/grammars/video/System/specSystemSwe.gf b/grammars/video/System/specSystemSwe.gf deleted file mode 100644 index e2f59cb89..000000000 --- a/grammars/video/System/specSystemSwe.gf +++ /dev/null @@ -1,49 +0,0 @@ ---# -path=.:..:../Shared:../Weekday:../Time:../Channel - --- File name System/specific.Swe.gf - -concrete specSystemSwe of specSystem = specificSwe, genSystemSwe ** { - -lin --- Confirm recording job -confirmRecJob act = {s = ["bekräftar"] ++ act.s } ; - -q_lambdaActionDel dact = {s = ["vilket programnummer vill du ta bort"]}; - ----- vcr_add_rec_job_no_args = {s = ["spela in"]} ; -- hack!!! - ---- Time in question -startTimeToStoreQ st = {s = "från" ++ st.s } ; -endTimeToStoreQ et = {s = "till" ++ et.s } ; - ---- Channel and Weekday in question -channelToStoreQ ch = {s = "på" ++ ch.s } ; -weekdayToStoreQ wd = {s = "på" ++ wd.s } ; - ---- WHQuestions --- Lambdas -q_lambdaWeekday wdts = {s = ["vilken dag vill du spela in på"]}; -q_lambdaChannel chts = {s = ["vilken kanal vill du spela in från"]}; -q_lambdaStartTime stts = {s = ["vilken tid vill du påbörja inspelningen"]}; -q_lambdaEndTime etts = {s = ["vilken tid vill du avsluta inspelningen"]}; - - ---- Constructions for ynquestions -lin -ynQuST y = {s = y.s} ; -ynQuET y = {s = y.s} ; -ynQuCH y = {s = y.s} ; -ynQuWD y = {s = y.s} ; - -lin ---- Props -startTimeToStoreProp st = {s = st.s } ; -endTimeToStoreProp et = {s = et.s } ; -channelToStoreProp chst = {s = chst.s } ; -weekdayToStoreProp wdts = {s = wdts.s } ; - -channelListing chs = {s = chs.s } ; -channels1 ch = {s = ch.s } ; -channels2 ch chs = {s = ch.s ++ "," ++ chs.s } ; -channelListAction ch = {s = ch.s } ; -channelListActionDMove ch = {s = ch.s } ; -} diff --git a/grammars/video/System/specific.Prolog.gf b/grammars/video/System/specific.Prolog.gf deleted file mode 100644 index 80f9d0764..000000000 --- a/grammars/video/System/specific.Prolog.gf +++ /dev/null @@ -1,46 +0,0 @@ --- File name System/specific.Prolog.gf - -include - specific.Abs.gf ; - -lin --- Confirm recording job -confirmRecJob act = {s = app "confirm" act.s } ; - -q_lambdaActionDel dact = {s = ["rec_job_to_delete"]} ; - -vcr_add_rec_job_no_args = {s = ["add_rec_job"]} ; -- hack!!! - ---- Time in question -startTimeToStoreQ st = {s = app "start_time_to_store" st.s } ; -endTimeToStoreQ et = {s = app "stop_time_to_store" et.s } ; - ---- Channel and Weekday in question -channelToStoreQ ch = {s = app "channel_to_store" ch.s } ; -weekdayToStoreQ wd = {s = app "weekday_to_store" wd.s } ; - ---- WHQuestions --- Lambdas -q_lambdaWeekday wdts = {s = ["weekday_to_store"]} ; -q_lambdaChannel chts = {s = ["channel_to_store"]} ; -q_lambdaStartTime stts = {s = ["start_time_to_store"]} ; -q_lambdaEndTime etts = {s = ["stop_time_to_store"]} ; - - ---- Constructions for ynquestions -lin -ynQuST y = {s = y.s} ; -ynQuET y = {s = y.s} ; -ynQuCH y = {s = y.s} ; -ynQuWD y = {s = y.s} ; - ---- Props -startTimeToStoreProp st = {s = st.s } ; -endTimeToStoreProp et = {s = et.s } ; -channelToStoreProp chst = {s = chst.s } ; -weekdayToStoreProp wdts = {s = wdts.s } ; - -channelListing chs = {s = chs.s } ; -channels1 ch = {s = ch.s } ; -channels2 ch chs = {s = ch.s ++ "," ++ chs.s } ; -channelListAction ch = {s = ch.s } ; -channelListActionDMove ch = {s = ch.s } ; \ No newline at end of file diff --git a/grammars/video/Time/time.Catalan.gf b/grammars/video/Time/time.Catalan.gf deleted file mode 100644 index b987486cb..000000000 --- a/grammars/video/Time/time.Catalan.gf +++ /dev/null @@ -1,135 +0,0 @@ --- Time grammar Catalan - -include time.Abs.gf ; - -lin - -hour0 = {s = refs "dotze" "una"} ; -hour1 = {s = refs ["la una"] "dues"} ; -hour2 = {s = refs "dues" "tres"} ; -hour3 = {s = refs "tres" "quatre"} ; -hour4 = {s = refs "quatre" "cinc"} ; -hour5 = {s = refs "cinc" "sis"} ; -hour6 = {s = refs "sis" "set"} ; -hour7 = {s = refs "set" "vuit"} ; -hour8 = {s = refs "vuit" "nou"} ; -hour9 = {s = refs "nou" "deu"} ; -hour10 = {s = refs "deu" "onze"} ; -hour11 = {s = refs "onze" "dotze"} ; -hour12 = {s = refs "dotze" "una" } ; -hour13 = {s = refs "tretze" "dues" }; -hour14 = {s = refs "catorze" "tres" }; -hour15 = {s = refs "quinze" "quatre" }; -hour16 = {s = refs "setze" "cinc" }; -hour17 = {s = refs "disset" "sis" }; -hour18 = {s = refs "divuit" "set" }; -hour19 = {s = refs "dinou" "vuit" } ; -hour20 = {s = refs "vint" "nou" } ; -hour21 = {s = refs "vintiun_a" "deu" } ; -hour22 = {s = refs "vintidues_dos" "onze" } ; -hour23 = {s = refs "vintitres" "dotze" }; - -pattern ---Minutes -minute0 = "zero" ; -minute1 = "una" ; -minute2 = "dues" ; -minute3 = "tres" ; -minute4 = "quatre" ; -minute5 = "cinc" ; -minute6 = "sis" ; -minute7 = "set" ; -minute8 = "vuit" ; -minute9 = "nou" ; -minute10 = "deu" ; -minute11 = "onze" ; -minute12 = "dotze" ; -minute13 = "tretze" ; -minute14 = "catorze" ; -minute15 = "quinze" ; -minute16 = "setze" ; -minute17 = "disset" ; -minute18 = "divuit" ; -minute19 = "dinou" ; -minute20 = "vint" ; -minute21 = "vintiun_a" ; -minute22 = "vintidues_dos" ; -minute23 = "vintitres" ; -minute24 = "vintiquatre" ; -minute25 = "vinticinc" ; -minute26 = "vintisis" ; -minute27 = "vintiset" ; -minute28 = "vintivuit" ; -minute29 = "vintinou" ; -minute30 = "trenta" ; -minute31 = "trentauna" ; -minute32 = "trentadues" ; -minute33 = "trentatres" ; -minute34 = "trentaquatre" ; -minute35 = "trentacinc" ; -minute36 = "trentasis" ; -minute37 = "trentaset" ; -minute38 = "trentavuit" ; -minute39 = "trentanou" ; -minute40 = "quaranta" ; -minute41 = "quarantauna" ; -minute42 = "quarantadues" ; -minute43 = "quarantatres" ; -minute44 = "quarantaquatre" ; -minute45 = "quarantacinc" ; -minute46 = "quarantasis" ; -minute47 = "quarantaset" ; -minute48 = "quarantavuit" ; -minute49 = "quarantanou" ; -minute50 = "cinquenta" ; -minute51 = "cinquentauna" ; -minute52 = "cinquentadues" ; -minute53 = "cinquentatres" ; -minute54 = "cinquentaquatre" ; -minute55 = "cinquentacinc" ; -minute56 = "cinquentasis" ; -minute57 = "cinquentaset" ; -minute58 = "cinquentavuit" ; -minute59 = "cinquentanou" ; - --- LexMinuteZero -minuteZero = [] ; - --- LexMinute -minuteQuarter = "un" ++ "quart" ++ "de"; -minuteFive = "mig" ++ "quart" ++ "de"; -minuteTen = "cinc" ++ "minuts" ++ "per" ++ "a" ++ "un" ++ "quart" ++ "de"; -minuteTwenty = "un" ++ "quart" ++ "i" ++ "cinc" ++ "de"; - --- LexMinuteHalfFive -minuteTwentyFive = "un" ++ "quart" ++ "i" ++ "deu" ++ "de"; -minuteThirtyFive = "dos" ++ "quarts" ++ "i" ++ "cinc" ++ "de"; - --- LexMinuteTo -minuteQuarterTo = "tres" ++ "quarts" ++ "de" ; -minuteFiveTo = "tres" ++ "quarts" ++ "i" ++ "deu" ++ "de"; ---minuteFiveTo = "cinc" ++ "minuts" ++ "per" ++ "a" ; -minuteTenTo = "tres" ++ "quarts" ++ "i" ++ "cinc" ++ "de"; -minuteTwentyTo = "dos" ++ "quarts" ++ "i" ++ "deu" ++ "de"; ---minuteTwentyTo = "cinc" ++ "minuts" ++ "per" ++ "a" ++ "tres" ++ "quarts" ++ "de"; - --- LexMinuteHalf -minuteHalf = "dos" ++ "quarts" ; - --- Creates tables for each hour, consisting of --- Present hour - Formal, Next hour informal, --- (in catalan of the n:nd hour) -param RefHour = ThisFormal | NextLex ; -oper refs : Str -> Str -> RefHour => Str = - \x,y -> table {ThisFormal => x ; NextLex => y } ; - -lincat Hour = {s : RefHour => Str} ; - -lin -time h m = {s = h.s ! ThisFormal ++ "i" ++ m.s} ; -timeOnTheHour h m = {s = h.s ! ThisFormal ++ m.s } ; -timePast h m = {s = m.s ++ h.s ! NextLex} ; -timeTo h m = {s = m.s ++ h.s ! NextLex } ; -timeHalf h m = {s = m.s ++ h.s ! NextLex } ; -timeFiveToHalf h m = {s = m.s ++ h.s ! NextLex } ; -timeFivePastHalf h m = {s = m.s ++ h.s ! NextLex } ; \ No newline at end of file diff --git a/grammars/video/Time/time.Eng.gf b/grammars/video/Time/time.Eng.gf deleted file mode 100644 index 04ee13c95..000000000 --- a/grammars/video/Time/time.Eng.gf +++ /dev/null @@ -1,130 +0,0 @@ --- Time grammar English - -include time.Abs.gf ; - - -lin -hour0 = {s = refs ["null null"] (variants {["midnight"];["twelve"]}) "one"} ; -hour1 = {s = refs "one" (variants {["one"];["one a.m"]}) "two"} ; -hour2 = {s = refs "two" (variants {["two"];["two a.m"]}) "three"} ; -hour3 = {s = refs "three" (variants {["three"];["three a.m"]}) "four"} ; -hour4 = {s = refs "four" (variants {["four"];["four a.m"]}) "five"} ; -hour5 = {s = refs "five" (variants {["five"];["five a.m"]}) "six"} ; -hour6 = {s = refs "six" (variants {["six"];["six a.m"]}) "seven"} ; -hour7 = {s = refs "seven" (variants {["seven"];["seven a.m"]}) "eight"} ; -hour8 = {s = refs "eight" (variants {["eight"];["eight a.m"]}) "nine"} ; -hour9 = {s = refs "nine" (variants {["nine"];["nine a.m"]}) "ten"} ; -hour10 = {s = refs "ten" (variants {["ten"];["ten a.m"]}) "eleven"} ; -hour11 = {s = refs "eleven" (variants {["eleven"];["eleven a.m"]}) "twelve"} ; -hour12 = {s = refs "twelve" (variants {["twelve"];["twelve a.m"]}) "one" } ; -hour13 = {s = refs "thirten" (variants {["one"];["one p.m"]}) "two" }; -hour14 = {s = refs "fourteen" (variants {["two"];["two p.m"]}) "three" } ; -hour15 = {s = refs "fifteen" (variants {["three"];["three p.m"]}) "four" } ; -hour16 = {s = refs "sixteen" (variants {["four"];["four p.m"]}) "five" } ; -hour17 = {s = refs "seventeen" (variants {["five"];["five p.m"]}) "six" } ; -hour18 = {s = refs "eighteen" (variants {["six"];["six p.m"]}) "seven" } ; -hour19 = {s = refs "nineteen" (variants {["seven"];["seven p.m"]}) "eight" } ; -hour20 = {s = refs "twenty" (variants {["eight"];["eight p.m"]}) "nine" } ; -hour21 = {s = refs ["twenty one"] (variants {["nine"];["nine p.m"]}) "eight" } ; -hour22 = {s = refs ["twenty two"] (variants {["ten"];["ten p.m"]}) "eleven" } ; -hour23 = {s = refs ["twenty three"] (variants {["eleven"]}) (variants {["midnight"];["twelve"]})} ; - - -lin - -minute0 = {s = mins (variants {["o'clock"];["sharp"];["hundred hours"]}) (variants{[""]}) (variants{})}; -minute1 = {s = mins ["oh one"] (variants{["one minute past"];["one past"]}) (variants{})}; -minute2 = {s = mins ["oh two"] (variants{["two minutes past"];["two past"]}) (variants{})}; -minute3 = {s = mins ["oh three"] (variants{["three minutes past"];["three past"]}) (variants{})}; -minute4 = {s = mins ["oh four"] (variants{["four minutes past"];["four past"]}) (variants{})}; -minute5 = {s = mins ["oh five"] (variants{["five minutes past"];["five past"]}) (variants{})}; -minute6 = {s = mins ["oh six"] (variants{["six minutes past"];["six past"]}) (variants{})}; -minute7 = {s = mins ["oh seven"] (variants{["seven minutes past"];["seven past"]}) (variants{})}; -minute8 = {s = mins ["oh eight"] (variants{["eight minutes past"];["eight past"]}) (variants{})}; -minute9 = {s = mins ["oh nine"] (variants{["nine minutes past"];["nine past"]}) (variants{})}; - -minute10 = {s = mins ["ten"] (variants{["ten minutes past"];["ten past"]}) (variants{})}; -minute11 = {s = mins ["eleven"] (variants{["eleven minutes past"];["eleven past"]}) (variants{})}; -minute12 = {s = mins ["twelve"] (variants{["twelve minutes past"];["twelve past"]}) (variants{})}; -minute13 = {s = mins ["thirteen"] (variants{["thirteen minutes past"];["thirteen past"]}) (variants{})}; -minute14 = {s = mins ["fourteen"] (variants{["fourteen minutes past"];["fourteen past"]}) (variants{})}; -minute15 = {s = mins ["fifteen"] (variants{["fifteen minutes past"];["fifteen past"];["quarter past"];["a quarter past"]}) (variants{})}; -minute16 = {s = mins ["sixteen"] (variants{["sixteen minutes past"];["sixteen past"]}) (variants{})}; -minute17 = {s = mins ["seventeen"] (variants{["seventeen minutes past"];["seventeen past"]}) (variants{})}; -minute18 = {s = mins ["eightteen"] (variants{["eighteen minutes past"];["eighteen past"]}) (variants{})}; -minute19 = {s = mins ["nineteen"] (variants{["nineteen minutes past"];["nineteen past"]}) (variants{})}; - -minute20 = {s = mins ["twenty"] (variants{["twenty minutes past"];["twenty past"]}) (variants{})}; -minute21 = {s = mins ["twenty one"] (variants{["twenty one minutes past"];["twenty one past"]}) (variants{})}; -minute22 = {s = mins ["twenty two"] (variants{["twenty two minutes past"];["twenty two past"]}) (variants{})}; -minute23 = {s = mins ["twenty three"] (variants{["twenty three minutes past"];["twenty three past"]}) (variants{})}; -minute24 = {s = mins ["twenty four"] (variants{["twenty four minutes past"];["twenty four past"]}) (variants{})}; -minute25 = {s = mins ["twenty five"] (variants{["twenty five minutes past"];["twenty two five past"]}) (variants{})}; -minute26 = {s = mins ["twenty six"] (variants{["twenty six minutes past"];["twenty six past"]}) (variants{})}; -minute27 = {s = mins ["twenty seven"] (variants{["twenty seven minutes past"];["twenty seven past"]}) (variants{})}; -minute28 = {s = mins ["twenty eight"] (variants{["twenty eight minutes past"];["twenty eight past"]}) (variants{})}; -minute29 = {s = mins ["twenty nine"] (variants{["twenty nine minutes past"];["twenty nine past"]}) (variants{})}; - -minute30 = {s = mins ["thirty"] (variants{["thirty minutes past"];["thirty past"];["half past"]}) (variants{})}; - -minute31 = {s = mins ["thirty one"] (variants{["one minute past half past????"]}) (variants{["twenty nine minutes to"];["twenty nine to"]})}; -minute32 = {s = mins ["thirty two"] (variants{}) (variants{["twenty eight minutes to"];["twenty eight to"]})}; -minute33 = {s = mins ["thirty three"] (variants{}) (variants{["twenty seven minutes to"];["twenty seven to"]})}; -minute34 = {s = mins ["thirty four"] (variants{}) (variants{["twenty six minutes to"];["twenty six to"]})}; -minute35 = {s = mins ["thirty five"] (variants{}) (variants{["twenty five minutes to"];["twenty five to"]})}; -minute36 = {s = mins ["thirty six"] (variants{}) (variants{["twenty four minutes to"];["twenty four to"]})}; -minute37 = {s = mins ["thirty seven"] (variants{}) (variants{["twenty three minutes to"];["twenty three to"]})}; -minute38 = {s = mins ["thirty eight"] (variants{}) (variants{["twenty two minutes to"];["twenty two to"]})}; -minute39 = {s = mins ["thirty nine"] (variants{}) (variants{["twenty one minutes to"];["twenty one to"]})}; -minute40 = {s = mins ["fourty"] (variants{}) (variants{["twenty minutes to"];["twenty to"]})}; - -minute41 = {s = mins ["fourty one"] (variants{}) (variants{["nineteen minutes to"];["nineteen to"]})}; -minute42 = {s = mins ["fourty two"] (variants{}) (variants{["eightteen minutes to"];["eightteen to"]})}; -minute43 = {s = mins ["fourty three"] (variants{}) (variants{["seventeen minutes to"];["seventeen to"]})}; -minute44 = {s = mins ["fourty four"] (variants{}) (variants{["sixteen minutes to"];["sixteen to"]})}; -minute45 = {s = mins ["fourty five"] (variants{["three quarters past???"]}) (variants{["fifteen minutes to"];["fifteen to"]})}; -minute46 = {s = mins ["fourty six"] (variants{}) (variants{["fourteen minutes to"];["fourteen to"]})}; -minute47 = {s = mins ["fourty seven"] (variants{}) (variants{["thirteen minutes to"];["thirteen to"]})}; -minute48 = {s = mins ["fourty eight"] (variants{}) (variants{["twelve minutes to"];["twelve to"]})}; -minute49 = {s = mins ["fourty nine"] (variants{}) (variants{["eleven minutes to"];["eleven to"]})}; -minute50 = {s = mins ["fifty"] (variants{}) (variants{["ten minutes to"];["ten to"]})}; - -minute51 = {s = mins ["fifty one"] (variants{}) (variants{["nine minutes to"];["nine to"]})}; -minute52 = {s = mins ["fifty two"] (variants{}) (variants{["eight minutes to"];["eight to"]})}; -minute53 = {s = mins ["fifty three"] (variants{}) (variants{["seven minutes to"];["seven to"]})}; -minute54 = {s = mins ["fifty four"] (variants{}) (variants{["six minutes to"];["six to"]})}; -minute55 = {s = mins ["fifty five"] (variants{}) (variants{["five minutes to"];["five to"]})}; -minute56 = {s = mins ["fifty six"] (variants{}) (variants{["four minutes to"];["four to"]})}; -minute57 = {s = mins ["fifty seven"] (variants{}) (variants{["three minutes to"];["three to"]})}; -minute58 = {s = mins ["fifty eight"] (variants{}) (variants{["two minutes to"];["two to"]})}; -minute59 = {s = mins ["fifty nine"] (variants{}) (variants{["one minute to"];["one to"]})}; - - -param RefHour = ThisFormal | ThisLex | NextLex ; -oper refs : Str -> Str -> Str -> RefHour => Str = - \x,y,z -> table {ThisFormal => x ; ThisLex => y ; NextLex => z } ; - -lincat Hour = {s : RefHour => Str} ; -lincat Minute = {s : MinMin => Str} ; - -param MinMin = Form | Past | To ; -oper mins : Str -> Str -> Str -> MinMin => Str = \x,y,z -> table {Form => x ; Past => y ; To => z } ; ---oper mins : Str -> Str -> Str -> MinMin => Str = \x,y,z -> table {Form => x ; Past => y ; To => z } ; --- jag vill ha en variantsexpanderare, tänk tänk ---oper mins : Str -> Str -> Str -> MinMin => Str = \x,y,z -> table {Form => (variants{x}) ; Past => (variants{y}) ; To => (variants{z}) } ; --- Time expressions -lin - ---timeFormal h m = {s = h.s ! ThisFormal ++ m.s ! Form} ; ---timeInformal h m = {s = variants { - --m.s ! Past ++ h.s ! ThisLex ; - --m.s ! To ++ h.s ! NextLex - --} - --}; - -time h m = {s = variants { - h.s ! ThisFormal ++ m.s ! Form ; - m.s ! Past ++ h.s ! ThisLex ; - m.s ! To ++ h.s ! NextLex - } - }; \ No newline at end of file diff --git a/grammars/video/Time/time.Prolog.gf b/grammars/video/Time/time.Prolog.gf deleted file mode 100644 index 564a12431..000000000 --- a/grammars/video/Time/time.Prolog.gf +++ /dev/null @@ -1,110 +0,0 @@ --- Time grammar Prolog output notation - -include time.Abs.gf ; - ---flags lexer=codelit ; unlexer=codelit ; startcat=Time ; ---flags lexer=code ; unlexer=code ; startcat=Time ; - -pattern - -hour0 = "00" ; -hour1 = "01" ; -hour2 = "02" ; -hour3 = "03" ; -hour4 = "04" ; -hour5 = "05" ; -hour6 = "06" ; -hour7 = "07" ; -hour8 = "08" ; -hour9 = "09" ; -hour10 = "10" ; -hour11 = "11" ; -hour12 = "12" ; -hour13 = "13" ; -hour14 = "14" ; -hour15 = "15" ; -hour16 = "16" ; -hour17 = "17" ; -hour18 = "18" ; -hour19 = "19" ; -hour20 = "20" ; -hour21 = "21" ; -hour22 = "22" ; -hour23 = "23" ; - ---Minutes -minute0 = "00" ; -minute1 = "01" ; -minute2 = "02" ; -minute3 = "03" ; -minute4 = "04" ; -minute5 = "05" ; -minute6 = "06" ; -minute7 = "07" ; -minute8 = "08" ; -minute9 = "09" ; -minute10 = "10" ; -minute11 = "11" ; -minute12 = "12" ; -minute13 = "13" ; -minute14 = "14" ; -minute15 = "15" ; -minute16 = "16" ; -minute17 = "17" ; -minute18 = "18" ; -minute19 = "19" ; -minute20 = "20" ; -minute21 = "21" ; -minute22 = "22" ; -minute23 = "23" ; -minute24 = "24" ; -minute25 = "25" ; -minute26 = "26" ; -minute27 = "27" ; -minute28 = "28" ; -minute29 = "29" ; -minute30 = "30" ; - -minute31 = "31" ; -minute32 = "32" ; -minute33 = "33" ; -minute34 = "34" ; -minute35 = "35" ; -minute36 = "36" ; -minute37 = "37" ; -minute38 = "38" ; -minute39 = "39" ; -minute40 = "40" ; -minute41 = "41" ; -minute42 = "42" ; -minute43 = "43" ; -minute44 = "44" ; -minute45 = "45" ; -minute46 = "46" ; -minute47 = "47" ; -minute48 = "48" ; -minute49 = "49" ; -minute50 = "50" ; -minute51 = "51" ; -minute52 = "52" ; -minute53 = "53" ; -minute54 = "54" ; -minute55 = "55" ; -minute56 = "56" ; -minute57 = "57" ; -minute58 = "58" ; -minute59 = "59" ; - -oper ---with single quotes ---app2 : Str -> Str -> Str -> Str = \pred -> \argH -> \argM -> pred ++ "(" ++ "'" ++ argH ++ ":" ++ argM ++ "'" ++ ")" ; ---without single quotes ---app2 : Str -> Str -> Str -> Str = \pred -> \argH -> \argM -> pred ++ "(" ++ argH ++ ":" ++ argM ++ ")" ; - -app3 : Str -> Str -> Str = \argH -> \argM -> argH ++ ":" ++ argM ; - -lin ---timeFormal h m = {s = app2 "time" h.s m.s } ; ---timeInformal h m = {s = app2 "time" h.s m.s } ; ---time h m = {s = app2 "time" h.s m.s } ; -time h m = {s = app3 h.s m.s } ; \ No newline at end of file diff --git a/grammars/video/Time/time.Symb.gf b/grammars/video/Time/time.Symb.gf deleted file mode 100644 index 81f877668..000000000 --- a/grammars/video/Time/time.Symb.gf +++ /dev/null @@ -1,127 +0,0 @@ --- Time grammar Symbolic/Numerical - -include time.Abs.gf ; - -pattern - -hour0 = "00" ; -hour1 = "01" ; -hour2 = "02" ; -hour3 = "03" ; -hour4 = "04" ; -hour5 = "05" ; -hour6 = "06" ; -hour7 = "07" ; -hour8 = "08" ; -hour9 = "09" ; -hour10 = "10" ; -hour11 = "11" ; -hour12 = "12" ; -hour13 = "13" ; -hour14 = "14" ; -hour15 = "15" ; -hour16 = "16" ; -hour17 = "17" ; -hour18 = "18" ; -hour19 = "19" ; -hour20 = "20" ; -hour21 = "21" ; -hour22 = "22" ; -hour23 = "23" ; - ---Minutes -minute0 = "00" ; -minute1 = "01" ; -minute2 = "02" ; -minute3 = "03" ; -minute4 = "04" ; -minute5 = "05" ; -minute6 = "06" ; -minute7 = "07" ; -minute8 = "08" ; -minute9 = "09" ; -minute10 = "10" ; -minute11 = "11" ; -minute12 = "12" ; -minute13 = "13" ; -minute14 = "14" ; -minute15 = "15" ; -minute16 = "16" ; -minute17 = "17" ; -minute18 = "18" ; -minute19 = "19" ; -minute20 = "20" ; -minute21 = "21" ; -minute22 = "22" ; -minute23 = "23" ; -minute24 = "24" ; -minute25 = "25" ; -minute26 = "26" ; -minute27 = "27" ; -minute28 = "28" ; -minute29 = "29" ; -minute30 = "30" ; -minute31 = "31" ; -minute32 = "32" ; -minute33 = "33" ; -minute34 = "34" ; -minute35 = "35" ; -minute36 = "36" ; -minute37 = "37" ; -minute38 = "38" ; -minute39 = "39" ; -minute40 = "40" ; -minute41 = "41" ; -minute42 = "42" ; -minute43 = "43" ; -minute44 = "44" ; -minute45 = "45" ; -minute46 = "46" ; -minute47 = "47" ; -minute48 = "48" ; -minute49 = "49" ; -minute50 = "50" ; -minute51 = "51" ; -minute52 = "52" ; -minute53 = "53" ; -minute54 = "54" ; -minute55 = "55" ; -minute56 = "56" ; -minute57 = "57" ; -minute58 = "58" ; -minute59 = "59" ; - --- LexMinuteZero -minuteZero = "00" ; - ---LexMinutePast -minuteQuarter = "15" ; -minuteFive = "05" ; -minuteTen = "10" ; -minuteTwenty = "20" ; ---minuteTwentyFive = "25" ; - ---LexMinuteToHalf -minuteTwentyFive = "25" ; - ---LexMinutePastHalf -minuteThirtyFive = "35" ; - ---LexMinuteHalf -minuteHalf = "30" ; - ---LexMinuteTo -minuteQuarterTo = "45" ; -minuteFiveTo = "55" ; -minuteTenTo = "50" ; -minuteTwentyTo = "40" ; ---minuteTwentyFiveTo = "35" ; - -lin -time h m = {s = h.s ++ m.s} ; -- 11 30 -timeOnTheHour h m = {s = h.s ++ m.s} ; -- 11 00 -timePast h m = {s = h.s ++ m.s} ; -- 11 10 -timeTo h m = {s = h.s ++ m.s} ; -- 10 50 -timeHalf h m = {s = h.s ++ m.s} ; -timeFiveToHalf h m = {s = h.s ++ m.s } ; -timeFivePastHalf h m = {s = h.s ++ m.s } ; \ No newline at end of file diff --git a/grammars/video/Time/time.gf b/grammars/video/Time/time.gf deleted file mode 100644 index 30023a0b4..000000000 --- a/grammars/video/Time/time.gf +++ /dev/null @@ -1,106 +0,0 @@ --- Time grammar Abstract syntax - -abstract time = { -cat - --- Times -Time ; -Hour ; -Minute ; - -fun --- Time -hour0 : Hour ; -hour1 : Hour ; -hour2 : Hour ; -hour3 : Hour ; -hour4 : Hour ; -hour5 : Hour ; -hour6 : Hour ; -hour7 : Hour ; -hour8 : Hour ; -hour9 : Hour ; -hour10 : Hour ; -hour11 : Hour ; -hour12 : Hour ; -hour13 : Hour ; -hour14 : Hour ; -hour15 : Hour ; -hour16 : Hour ; -hour17 : Hour ; -hour18 : Hour ; -hour19 : Hour ; -hour20 : Hour ; -hour21 : Hour ; -hour22 : Hour ; -hour23 : Hour ; - --- Minutes -minute0 : Minute ; -minute1 : Minute ; -minute2 : Minute ; -minute3 : Minute ; -minute4 : Minute ; -minute5 : Minute ; -minute6 : Minute ; -minute7 : Minute ; -minute8 : Minute ; -minute9 : Minute ; -minute10 : Minute ; -minute11 : Minute ; -minute12 : Minute ; -minute13 : Minute ; -minute14 : Minute ; -minute15 : Minute ; -minute16 : Minute ; -minute17 : Minute ; -minute18 : Minute ; -minute19 : Minute ; -minute20 : Minute ; -minute21 : Minute ; -minute22 : Minute ; -minute23 : Minute ; -minute24 : Minute ; -minute25 : Minute ; -minute26 : Minute ; -minute27 : Minute ; -minute28 : Minute ; -minute29 : Minute ; -minute30 : Minute ; -minute31 : Minute ; -minute32 : Minute ; -minute33 : Minute ; -minute34 : Minute ; -minute35 : Minute ; -minute36 : Minute ; -minute37 : Minute ; -minute38 : Minute ; -minute39 : Minute ; -minute40 : Minute ; -minute41 : Minute ; -minute42 : Minute ; -minute43 : Minute ; -minute44 : Minute ; -minute45 : Minute ; -minute46 : Minute ; -minute47 : Minute ; -minute48 : Minute ; -minute49 : Minute ; -minute50 : Minute ; -minute51 : Minute ; -minute52 : Minute ; -minute53 : Minute ; -minute54 : Minute ; -minute55 : Minute ; -minute56 : Minute ; -minute57 : Minute ; -minute58 : Minute ; -minute59 : Minute ; - --- Time expressions ---timeFormal : Hour -> Minute -> Time ; ---timeInformal : Hour -> Minute -> Time ; -time : Hour -> Minute -> Time ; - - -} diff --git a/grammars/video/Time/timeProlog.gf b/grammars/video/Time/timeProlog.gf deleted file mode 100644 index 8a791ae0b..000000000 --- a/grammars/video/Time/timeProlog.gf +++ /dev/null @@ -1,103 +0,0 @@ --- Time grammar Prolog output notation - -concrete timeProlog of time = open prologResource in { - ---flags lexer=codelit ; unlexer=codelit ; startcat=Time ; ---flags lexer=code ; unlexer=code ; startcat=Time ; - -pattern - -hour0 = "00" ; -hour1 = "01" ; -hour2 = "02" ; -hour3 = "03" ; -hour4 = "04" ; -hour5 = "05" ; -hour6 = "06" ; -hour7 = "07" ; -hour8 = "08" ; -hour9 = "09" ; -hour10 = "10" ; -hour11 = "11" ; -hour12 = "12" ; -hour13 = "13" ; -hour14 = "14" ; -hour15 = "15" ; -hour16 = "16" ; -hour17 = "17" ; -hour18 = "18" ; -hour19 = "19" ; -hour20 = "20" ; -hour21 = "21" ; -hour22 = "22" ; -hour23 = "23" ; - ---Minutes -minute0 = "00" ; -minute1 = "01" ; -minute2 = "02" ; -minute3 = "03" ; -minute4 = "04" ; -minute5 = "05" ; -minute6 = "06" ; -minute7 = "07" ; -minute8 = "08" ; -minute9 = "09" ; -minute10 = "10" ; -minute11 = "11" ; -minute12 = "12" ; -minute13 = "13" ; -minute14 = "14" ; -minute15 = "15" ; -minute16 = "16" ; -minute17 = "17" ; -minute18 = "18" ; -minute19 = "19" ; -minute20 = "20" ; -minute21 = "21" ; -minute22 = "22" ; -minute23 = "23" ; -minute24 = "24" ; -minute25 = "25" ; -minute26 = "26" ; -minute27 = "27" ; -minute28 = "28" ; -minute29 = "29" ; -minute30 = "30" ; - -minute31 = "31" ; -minute32 = "32" ; -minute33 = "33" ; -minute34 = "34" ; -minute35 = "35" ; -minute36 = "36" ; -minute37 = "37" ; -minute38 = "38" ; -minute39 = "39" ; -minute40 = "40" ; -minute41 = "41" ; -minute42 = "42" ; -minute43 = "43" ; -minute44 = "44" ; -minute45 = "45" ; -minute46 = "46" ; -minute47 = "47" ; -minute48 = "48" ; -minute49 = "49" ; -minute50 = "50" ; -minute51 = "51" ; -minute52 = "52" ; -minute53 = "53" ; -minute54 = "54" ; -minute55 = "55" ; -minute56 = "56" ; -minute57 = "57" ; -minute58 = "58" ; -minute59 = "59" ; - -lin ---timeFormal h m = {s = app2 "time" h.s m.s } ; ---timeInformal h m = {s = app2 "time" h.s m.s } ; ---time h m = {s = app2 "time" h.s m.s } ; -time h m = {s = app3 h.s m.s } ; -} diff --git a/grammars/video/Time/timeResSwe.gf b/grammars/video/Time/timeResSwe.gf deleted file mode 100644 index 0f9ad0526..000000000 --- a/grammars/video/Time/timeResSwe.gf +++ /dev/null @@ -1,7 +0,0 @@ -resource timeResSwe = { -param RefHour = ThisFormal | ThisLex | NextLex ; -oper refs : Str -> Str -> Str -> RefHour => Str = \x,y,z -> table {ThisFormal => x ; ThisLex => y ; NextLex => z } ; -param MinMin = Form | Past | To ; -oper mins : Str -> Str -> Str -> MinMin => Str = \u,x,y -> table {Form => u ; Past => x ; To => y } ; - -} diff --git a/grammars/video/Time/timeSwe.gf b/grammars/video/Time/timeSwe.gf deleted file mode 100644 index e9ea45e31..000000000 --- a/grammars/video/Time/timeSwe.gf +++ /dev/null @@ -1,149 +0,0 @@ --- Time grammar Swedish - -concrete timeSwe of time = open timeResSwe in { - -lincat Time = {s : Str} ; - ---Hours -lin --- Some of the time expressions is omitted because of the prolog in godis. --- hours after 13 and 00 are only interpreted as 13,14 etc when explicitly uttered, --- one o'clock is ONLY interpreted as 01:00, not 13:00. --- if someone needs the more elaborated forms of time use --- the commented lines, and comment the corresponding units. - ---hour0 = {s = refs (variants{["noll noll"];["noll"]}) "tolv" "ett"} ; -hour0 = {s = refs (variants{["noll noll"];["noll"]})(variants{}) (variants{})} ; -hour1 = {s = refs "ett" "ett" "två"} ; -hour2 = {s = refs "två" "två" "tre"} ; -hour3 = {s = refs "tre" "tre" "fyra"} ; -hour4 = {s = refs "fyra" "fyra" "fem"} ; -hour5 = {s = refs "fem" "fem" "sex"} ; -hour6 = {s = refs "sex" "sex" "sju"} ; -hour7 = {s = refs "sju" "sju" "åtta"} ; -hour8 = {s = refs "åtta" "åtta" "nio"} ; -hour9 = {s = refs "nio" "nio" "tio"} ; -hour10 = {s = refs "tio" "tio" "elva"} ; -hour11 = {s = refs "elva""elva" "tolv"} ; -hour12 = {s = refs "tolv" "tolv" "ett" } ; - ---hour13 = {s = refs "tretton" "ett" "två" }; ---hour14 = {s = refs "fjorton" "två" "tre" }; ---hour15 = {s = refs "femton" "tre" "fyra" }; ---hour16 = {s = refs "sexton" "fyra" "fem" }; ---hour17 = {s = refs "sjutton" "fem" "sex" }; ---hour18 = {s = refs "arton" "sex" "sju" }; ---hour19 = {s = refs "nitton" "sju" "åtta" } ; ---hour20 = {s = refs "tjugo" "åtta" "nio" } ; ---hour21 = {s = refs ["tjugo ett"] "nio" "tio" } ; ---hour22 = {s = refs ["tjugo två"] "tio" "elva" } ; ---hour23 = {s = refs ["tjugo tre"] "elva" "tolv" }; - -hour13 = {s = refs "tretton" (variants{})(variants{}) }; -hour14 = {s = refs "fjorton"(variants{})(variants{})}; -hour15 = {s = refs "femton"(variants{})(variants{})}; -hour16 = {s = refs "sexton"(variants{})(variants{})}; -hour17 = {s = refs "sjutton"(variants{})(variants{})}; -hour18 = {s = refs "arton"(variants{})(variants{})}; -hour19 = {s = refs "nitton"(variants{})(variants{})} ; -hour20 = {s = refs "tjugo"(variants{})(variants{})} ; -hour21 = {s = refs ["tjugo ett"](variants{})(variants{})} ; -hour22 = {s = refs ["tjugo två"](variants{})(variants{})} ; -hour23 = {s = refs ["tjugo tre"](variants{})(variants{})}; - - ---Minutes ---0-9 ---minute0 = {s = mins (variants{["noll noll"]}) (variants{}) (variants{}) (variants{[""]})} ; -minute0 = {s = mins ["noll noll"] (variants{[""]}) (variants{})} ; -minute1 = {s = mins ["noll ett"] (variants {["ett över"] ; ["en minut över"]}) (variants{}) } ; -minute2 = {s = mins ["noll två"] (variants {["två över"] ; ["två minuter över"]}) (variants{})} ; -minute3 = {s = mins ["noll tre"] (variants { ["tre över"] ; ["tre minuter över"]}) (variants{})} ; -minute4 = {s = mins ["noll fyra"] (variants { ["fyra över"] ; ["fyra minuter över"]}) (variants{})} ; -minute5 = {s = mins ["noll fem"] (variants { ["fem över"] ; ["fem minuter över"]}) (variants{})} ; -minute6 = {s = mins ["noll sex"] (variants { ["sex över"] ; ["sex minuter över"]}) (variants{})} ; -minute7 = {s = mins ["noll sju"] (variants { ["sju över"] ; ["sju minuter över"]}) (variants{})} ; -minute8 = {s = mins ["noll åtta"] (variants { ["åtta över"] ; ["åtta minuter över"]}) (variants{})} ; -minute9 = {s = mins ["noll nio"] (variants { ["nio över"] ; ["nio minuter över"]}) (variants{})} ; - ---10-19 -minute10 = {s = mins ["tio"] (variants { ["tio över"] ; ["tio minuter över"]}) (variants{})} ; -minute11 = {s = mins ["elva"] (variants { ["elva över"] ; ["elva minuter över"]}) (variants{})} ; -minute12 = {s = mins ["tolv"] (variants { ["tolv över"] ; ["tolv minuter över"]}) (variants{})} ; -minute13 = {s = mins ["tretton"] (variants { ["tretton över"] ; ["tretton minuter över"]}) (variants{})} ; -minute14 = {s = mins ["fjorton"] (variants { ["fjorton över"] ; ["fjorton minuter över"]}) (variants{})} ; -minute15 = {s = mins ["femton"] (variants { ["femton över"] ; ["femton minuter över"] ; ["kvart över"]}) (variants{})} ; -minute16 = {s = mins ["sexton"] (variants { ["sexton över"] ; ["sexton minuter över"]}) (variants{})} ; -minute17 = {s = mins ["sjutton"] (variants { ["sjutton över"] ; ["sjutton minuter över"]}) (variants{})} ; -minute18 = {s = mins ["arton"] (variants { ["arton över"] ; ["arton minuter över"]}) (variants{})} ; -minute19 = {s = mins ["nitton"] (variants { ["nitton över"] ; ["nitton minuter över"]}) (variants{})} ; - ---20-29 -minute20 = {s = mins ["tjugo"] (variants { ["tjugo över"] ; ["tjugo minuter över"]}) (variants {})} ; -minute21 = {s = mins ["tjugo ett"] (variants { ["tjugo en över"] ;["tjugo ett över"] ; ["tjugo en minuter över"]}) (variants {}) } ; -minute22 = {s = mins ["tjugo två"] (variants { ["tjugo två över"] ; ["tjugo två minuter över"]}) (variants {}) } ; -minute23 = {s = mins ["tjugo tre"] (variants { ["tjugo tre över"] ; ["tjugo tre minuter över"]}) (variants {}) } ; -minute24 = {s = mins ["tjugo fyra"] (variants { ["tjugo fyra över"] ; ["tjugo fyra minuter över"]}) (variants {["sex minuter i halv"];["sex i halv"]}) } ; -minute25 = {s = mins ["tjugo fem"] (variants { ["tjugo fem över"] ; ["tjugo fem minuter över"]}) (variants {["fem minuter i halv"];["fem i halv"]}) } ; -minute26 = {s = mins ["tjugo sex"] (variants { ["tjugo sex över"] ; ["tjugo sex minuter över"]}) (variants {["fyra minuter i halv"];["fyra i halv"]}) } ; -minute27 = {s = mins ["tjugo sju"] (variants { ["tjugo sju över"] ; ["tjugo sju minuter över"]}) (variants {["tre minuter i halv"];["tre i halv"]}) } ; -minute28 = {s = mins ["tjugo åtta"] (variants { ["tjugo åtta över"] ; ["tjugo åtta minuter över"]}) (variants {["två minuter i halv"];["två i halv"]}) } ; -minute29 = {s = mins ["tjugo nio"] (variants { ["tjugo nio över"] ; ["tjugo nio minuter över"]}) (variants {["en minut i halv"];["en i halv"]}) } ; - ---30-39 -minute30 = {s = mins ["trettio"] (variants { ["trettio minuter över"]}) ["halv"] } ; -minute31 = {s = mins ["trettio ett"] (variants { ["trettio en över"] ; ["trettio ett över"] ; ["trettio en minuter över"]}) (variants {["tjugo nio minuter i"];["tjugo nio i"];["en minut över halv"];["en över halv"]}) } ; -minute32 = {s = mins ["trettio två"] (variants { ["trettio två över"] ; ["trettio två minuter över"]}) (variants {["tjugo åtta minuter i"];["tjugo åtta i"];["två minuter över halv"];["två över halv"]}) } ; -minute33 = {s = mins ["trettio tre"] (variants { ["trettio tre över"] ; ["trettio tre minuter över"]}) (variants {["tjugo sju minuter i"];["tjugo sju i"];["tre minuter över halv"];["tre över halv"]}) } ; -minute34 = {s = mins ["trettio fyra"] (variants { ["trettio fyra över"] ; ["trettio fyra minuter över"]}) (variants {["tjugosex minuter i"];["tjugosex i"];["fyra minuter över halv"];["fyra över halv"]}) } ; -minute35 = {s = mins ["trettio fem"] (variants { ["trettio fem över"] ; ["trettio fem minuter över"]}) (variants {["tjugo fem minuter i"];["tjugo fem i"];["fem minuter över halv"]; ["fem över halv"]}) } ; -minute36 = {s = mins ["trettio sex"] (variants { ["trettio sex över"] ; ["trettio sex minuter över"]}) (variants {["tjugo fyra minuter i"];["tjugo fyra i"];["sex minuter över halv"];["sex över halv"]}) } ; -minute37 = {s = mins ["trettio sju"] (variants { ["trettio sju över"] ; ["trettio sju minuter över"]}) (variants {["tjugo tre minuter i"];["tjugo tre i"];["sju minuter över halv"];["sju över halv"]}) } ; -minute38 = {s = mins ["trettio åtta"] (variants { ["trettio åtta över"] ; ["trettio åtta minuter över"]}) (variants {["tjugo två minuter i"];["tjugo två i"]}) } ; -minute39 = {s = mins ["trettio nio"] (variants { ["trettio nio över"] ; ["trettio nio minuter över"]}) (variants {["tjugo en minuter i"];["tjugo en i"];["tjugo ett i"]}) } ; - ---40-49 -minute40 = {s = mins ["fyrtio"] (variants {}) (variants {["tjugo minuter i"];["tjugo i"]}) } ; -minute41 = {s = mins ["fyrtio ett"] (variants {}) (variants {["nitton minuter i"];["nitton i"]}) } ; -minute42 = {s = mins ["fyrtio två"] (variants {}) (variants {["arton minuter i"];["arton i"]}) } ; -minute43 = {s = mins ["fyrtio tre"] (variants {}) (variants {["sjutton minuter i"];["sjutton i"]}) } ; -minute44 = {s = mins ["fyrtio fyra"] (variants {}) (variants {["sexton minuter i"];["sexton i"]}) } ; -minute45 = {s = mins (variants {["fyrtio fem"];["tre kvart"]}) (variants {}) (variants {["femton minuter i"];["femton i"];["kvart i"]}) } ; -minute46 = {s = mins ["fyrtio sex"] (variants {}) (variants {["fjorton minuter i"];["fjorton i"]}) } ; -minute47 = {s = mins ["fyrtio sju"] (variants {}) (variants {["tretton minuter i"];["tretton i"]}) } ; -minute48 = {s = mins ["fyrtio åtta"] (variants {}) (variants {["tolv minuter i"];["tolv i"]}) } ; -minute49 = {s = mins ["fyrtio nio"] (variants {}) (variants {["elva minuter i"];["elva i"]}) } ; - ---50-59 -minute50 = {s = mins ["femtio"] (variants {}) (variants {["tio minuter i"];["tio i"]}) } ; -minute51 = {s = mins ["femtio ett"] (variants {}) (variants {["nio minuter i"];["nio i"]}) } ; -minute52 = {s = mins ["femtio två"] (variants {}) (variants {["åtta minuter i"];["åtta i"]}) } ; -minute53 = {s = mins ["femtio tre"] (variants {}) (variants {["sju minuter i"];["sju i"]}) } ; -minute54 = {s = mins ["femtio fyra"] (variants {}) (variants {["sex minuter i"];["sex i"]}) } ; -minute55 = {s = mins ["femtio fem"] (variants {}) (variants {["fem minuter i"];["fem i"]}) } ; -minute56 = {s = mins ["femtio sex"] (variants {}) (variants {["fyra minuter i"];["fyra i"]}) } ; -minute57 = {s = mins ["femtio sju"] (variants {}) (variants {["tre minuter i"];["tre i"]}) } ; -minute58 = {s = mins ["femtio åtta"] (variants {}) (variants {["två minuter i"];["två i"]}) } ; -minute59 = {s = mins ["femtio nio"] (variants {}) (variants {["en minut i"];["en i"];["ett i"]}) } ; - -lincat Hour = {s : RefHour => Str} ; - -lincat Minute = {s : MinMin => Str} ; - --- Time expressions -lin ---timeDotty h m = {s = h.s ! ThisLex ++ m.s ! Dot }; ---timeInformal h m = {s = variants { - --m.s ! Past ++ h.s ! ThisLex ; - --m.s ! To ++ h.s ! NextLex - --} - --}; ---timeFormal h m = {s = h.s ! ThisFormal ++ m.s ! Form} ; -time h m = {s = variants { - h.s ! ThisFormal ++ m.s ! Form ; - h.s ! ThisFormal ++ "och" ++ m.s ! Form ; - m.s ! Past ++ h.s ! ThisLex ; - m.s ! To ++ h.s ! NextLex - } - }; -} diff --git a/grammars/video/User/genUser.gf b/grammars/video/User/genUser.gf deleted file mode 100644 index 60afeafd6..000000000 --- a/grammars/video/User/genUser.gf +++ /dev/null @@ -1,7 +0,0 @@ --- File name User/general.Abs.gf - -abstract genUser = general ** { - -fun -request : Action -> DMove ; -} \ No newline at end of file diff --git a/grammars/video/User/genUserProlog.gf b/grammars/video/User/genUserProlog.gf deleted file mode 100644 index c1731a9ce..000000000 --- a/grammars/video/User/genUserProlog.gf +++ /dev/null @@ -1,8 +0,0 @@ --- File name User/general.Prolog.gf ---- the rest formarly known as User-general --- is now considered shared-general - -concrete genUserProlog of genUser = generalProlog ** open prologResource in { -lin -request a = {s = app "request" a.s }; -} diff --git a/grammars/video/User/genUserSwe.gf b/grammars/video/User/genUserSwe.gf deleted file mode 100644 index d173d3711..000000000 --- a/grammars/video/User/genUserSwe.gf +++ /dev/null @@ -1,8 +0,0 @@ --- File name User/general.Swe.gf - -concrete genUserSwe of genUser = generalSwe ** { - -lin - -request a = {s = a.s }; -} diff --git a/grammars/video/User/general.Prolog.gf b/grammars/video/User/general.Prolog.gf deleted file mode 100644 index bb148a33e..000000000 --- a/grammars/video/User/general.Prolog.gf +++ /dev/null @@ -1,6 +0,0 @@ --- File name User/general.Prolog.gf ---- the rest formarly known as User-general --- is now considered shared-general - -lin -request a = {s = app "request" a.s }; \ No newline at end of file diff --git a/grammars/video/User/specUser.gf b/grammars/video/User/specUser.gf deleted file mode 100644 index 00aa69a44..000000000 --- a/grammars/video/User/specUser.gf +++ /dev/null @@ -1,36 +0,0 @@ --- File name User/specific.Abs.gf - - -abstract specUser = specific, genUser ** { - -cat -AnswerReq ; -AnswerListReq ; -Request ; - -fun ---- Answers in request list -vcr_add_rec_job_args4 : AnswerReq -> AnswerReq -> AnswerReq -> AnswerReq -> Action ; -vcr_add_rec_job_args3 : AnswerReq -> AnswerReq -> AnswerReq -> Action ; -vcr_add_rec_job_args2 : AnswerReq -> AnswerReq -> Action ; -vcr_add_rec_job_args1 : AnswerReq -> Action ; ----- vcr_add_rec_job_no_args : Action ; -- spela in! moved to specific - -fun ---- Possible answers in request list -startTimeToStoreReq : StartTime -> AnswerReq ; -endTimeToStoreReq : EndTime -> AnswerReq ; -channelToStoreReq : ChToStore -> AnswerReq ; -weekdayToStoreReq : WdToStore -> AnswerReq ; - ---- AnswerList -answerListReq4 : AnswerReq -> AnswerReq -> AnswerReq -> AnswerReq -> AnswerListReq ; -answerListReq3 : AnswerReq -> AnswerReq -> AnswerReq -> AnswerListReq ; -answerListReq2 : AnswerReq -> AnswerReq -> AnswerListReq ; -answerListReq : AnswerListReq -> DMove; - -answerReq : AnswerReq -> Answer ; - ---requestChannelsDMove : Request -> DMove; -requestChannels : Action ; -} diff --git a/grammars/video/User/specUserProlog.gf b/grammars/video/User/specUserProlog.gf deleted file mode 100644 index f586951ce..000000000 --- a/grammars/video/User/specUserProlog.gf +++ /dev/null @@ -1,68 +0,0 @@ --- File name User/specific.Prolog.gf - -concrete specUserProlog of specUser = genUserProlog, specificProlog ** - open prologResource in { - - - ---- Answers in request list -lin -vcr_add_rec_job_args4 chst wdts stts etts = - {s = - "add_rec_job" ++ "," ++ - app "answer" chst.s ++ "," ++ - app "answer" wdts.s ++ "," ++ - app "answer" stts.s ++ "," ++ - "answer" ++ "(" ++ etts.s } ; - -vcr_add_rec_job_args3 chst wdts stts = - {s = - "add_rec_job" ++ "," ++ - app "answer" chst.s ++ "," ++ - app "answer" wdts.s ++ "," ++ - "answer" ++ "(" ++ stts.s} ; - -vcr_add_rec_job_args2 chst wdts = {s = - "add_rec_job" ++ "," ++ - app "answer" chst.s ++ "," ++ - "answer" ++ "(" ++ wdts.s } ; - -vcr_add_rec_job_args1 chst = {s = - "add_rec_job" ++ "," ++ - "answer" ++ "(" ++ chst.s } ; - ----- vcr_add_rec_job_no_args = {s = "add_rec_job"} ; -- moved to specific - - - ---- Possible answers in request list -startTimeToStoreReq v = {s= v.s} ; -endTimeToStoreReq v = {s= v.s} ; -channelToStoreReq v = {s= v.s} ; -weekdayToStoreReq v = {s= v.s} ; - ---- AnswerList -answerListReq4 chts wdts stts etts = - { s = - app "answer" chts.s ++ "," ++ - app "answer" wdts.s ++ "," ++ - app "answer" stts.s ++ "," ++ - app "answer" etts.s } ; - -answerListReq3 chts wdts stts = - { s = - app "answer" chts.s ++ "," ++ - app "answer" wdts.s ++ "," ++ - app "answer" stts.s} ; - -answerListReq2 chts wdts = - { s = - app "answer" chts.s ++ "," ++ - app "answer" wdts.s } ; - -answerListReq aL = {s = aL.s} ; - -answerReq v = {s= v.s} ; - -requestChannels = {s = ["list_channels"]} ; -} diff --git a/grammars/video/User/specUserSwe.gf b/grammars/video/User/specUserSwe.gf deleted file mode 100644 index b5ac0aa86..000000000 --- a/grammars/video/User/specUserSwe.gf +++ /dev/null @@ -1,37 +0,0 @@ ---# -path=.:..:../Shared:../Weekday:../Time:../Channel - --- File name User/specific.Swe.gf - -concrete specUserSwe of specUser = specificSwe, genUserSwe ** { - -flags startcat=DMove ; - -lin ---- Answers in request list -vcr_add_rec_job_args4 chts wdts stts etts = {s = - ["spela in"] ++ stts.s ++ "," ++ etts.s ++ "," ++ wdts.s ++ "," ++ chts.s }; -vcr_add_rec_job_args3 chts wdts stts = {s = - ["spela in"] ++ chts.s ++ "," ++ wdts.s ++ "," ++ stts.s }; -vcr_add_rec_job_args2 chts wdts = {s = - ["spela in"] ++ chts.s ++ "," ++ wdts.s }; -vcr_add_rec_job_args1 chts = {s = ["spela in"] ++ chts.s } ; ----- vcr_add_rec_job_no_args = {s = ["spela in"]} ; - -lin - ---- Possible answers in request list -startTimeToStoreReq v = {s= v.s} ; -endTimeToStoreReq v = {s= v.s} ; -channelToStoreReq v = {s= v.s} ; -weekdayToStoreReq v = {s= v.s} ; - ---- AnswerList -answerListReq4 chts wdts stts etts = {s = stts.s ++ "," ++ etts.s ++ "," ++ wdts.s ++ "," ++ chts.s }; -answerListReq3 chts wdts stts = {s = chts.s ++ "," ++ wdts.s ++ "," ++ stts.s }; -answerListReq2 chts wdts = {s = chts.s ++ "," ++ wdts.s }; -answerListReq aL = {s = aL.s} ; - -answerReq v = {s= v.s} ; - -requestChannels = {s= (variants{["lista alla kanaler"];["vilka kanaler finns det"]})}; -} diff --git a/grammars/video/User/specific.Prolog.gf b/grammars/video/User/specific.Prolog.gf deleted file mode 100644 index fb3dd07a8..000000000 --- a/grammars/video/User/specific.Prolog.gf +++ /dev/null @@ -1,68 +0,0 @@ --- File name User/specific.Prolog.gf - -include - specific.Abs.gf ; - general.Prolog.gf ; - - - ---- Answers in request list -lin -vcr_add_rec_job_args4 chst wdts stts etts = - {s = - "add_rec_job" ++ "," ++ - app "answer" chst.s ++ "," ++ - app "answer" wdts.s ++ "," ++ - app "answer" stts.s ++ "," ++ - "answer" ++ "(" ++ etts.s } ; - -vcr_add_rec_job_args3 chst wdts stts = - {s = - "add_rec_job" ++ "," ++ - app "answer" chst.s ++ "," ++ - app "answer" wdts.s ++ "," ++ - "answer" ++ "(" ++ stts.s} ; - -vcr_add_rec_job_args2 chst wdts = {s = - "add_rec_job" ++ "," ++ - app "answer" chst.s ++ "," ++ - "answer" ++ "(" ++ wdts.s } ; - -vcr_add_rec_job_args1 chst = {s = - "add_rec_job" ++ "," ++ - "answer" ++ "(" ++ chst.s } ; - -vcr_add_rec_job_no_args = {s = "add_rec_job"} ; - - - ---- Possible answers in request list -startTimeToStoreReq v = {s= v.s} ; -endTimeToStoreReq v = {s= v.s} ; -channelToStoreReq v = {s= v.s} ; -weekdayToStoreReq v = {s= v.s} ; - ---- AnswerList -answerListReq4 chts wdts stts etts = - { s = - app "answer" chts.s ++ "," ++ - app "answer" wdts.s ++ "," ++ - app "answer" stts.s ++ "," ++ - app "answer" etts.s } ; - -answerListReq3 chts wdts stts = - { s = - app "answer" chts.s ++ "," ++ - app "answer" wdts.s ++ "," ++ - app "answer" stts.s} ; - -answerListReq2 chts wdts = - { s = - app "answer" chts.s ++ "," ++ - app "answer" wdts.s } ; - -answerListReq aL = {s = aL.s} ; - -answerReq v = {s= v.s} ; - -requestChannels = {s = ["list_channels"]} ; diff --git a/grammars/video/Weekday/weekday.Eng.gf b/grammars/video/Weekday/weekday.Eng.gf deleted file mode 100644 index 773f41380..000000000 --- a/grammars/video/Weekday/weekday.Eng.gf +++ /dev/null @@ -1,12 +0,0 @@ ----File name weekday.Eng.gf - -include weekday.Abs.gf ; - -pattern -monday = "monday" ; -tuesday = "tuesday" ; -wednesday = "wednesday" ; -thursday = "thursday" ; -friday = "friday" ; -saturday = "saturday" ; -sunday = "sunday" ; \ No newline at end of file diff --git a/grammars/video/Weekday/weekday.Prolog.gf b/grammars/video/Weekday/weekday.Prolog.gf deleted file mode 100644 index 29018f420..000000000 --- a/grammars/video/Weekday/weekday.Prolog.gf +++ /dev/null @@ -1,13 +0,0 @@ ----File name weekday.Swe.gf - -include weekday.Abs.gf ; - -pattern ---today = "today" ; -monday = "monday" ; -tuesday = "tuesday" ; -wednesday = "wednesday" ; -thursday = "thursday" ; -friday = "friday" ; -saturday = "saturday" ; -sunday = "sunday" ; \ No newline at end of file diff --git a/grammars/video/Weekday/weekday.gf b/grammars/video/Weekday/weekday.gf deleted file mode 100644 index 1c37968e1..000000000 --- a/grammars/video/Weekday/weekday.gf +++ /dev/null @@ -1,15 +0,0 @@ -abstract weekday = { - -cat -Weekday ; - -fun ---today : Weekday ; -monday : Weekday ; -tuesday : Weekday ; -wednesday : Weekday ; -thursday : Weekday ; -friday : Weekday ; -saturday : Weekday ; -sunday : Weekday ; -} \ No newline at end of file diff --git a/grammars/video/Weekday/weekdayProlog.gf b/grammars/video/Weekday/weekdayProlog.gf deleted file mode 100644 index ae824fce5..000000000 --- a/grammars/video/Weekday/weekdayProlog.gf +++ /dev/null @@ -1,14 +0,0 @@ ----File name weekday.Swe.gf - -concrete weekdayProlog of weekday = { - -pattern ---today = "today" ; -monday = "monday" ; -tuesday = "tuesday" ; -wednesday = "wednesday" ; -thursday = "thursday" ; -friday = "friday" ; -saturday = "saturday" ; -sunday = "sunday" ; -} diff --git a/grammars/video/Weekday/weekdaySwe.gf b/grammars/video/Weekday/weekdaySwe.gf deleted file mode 100644 index 38afb73fb..000000000 --- a/grammars/video/Weekday/weekdaySwe.gf +++ /dev/null @@ -1,12 +0,0 @@ -concrete weekdaySwe of weekday = { - -pattern ---today = "idag" ; -monday = "måndag" ; -tuesday = "tisdag" ; -wednesday = "onsdag" ; -thursday = "torsdag" ; -friday = "fredag" ; -saturday = "lördag" ; -sunday = "söndag" ; -} diff --git a/grammars/video/all.gf b/grammars/video/all.gf deleted file mode 100644 index 9fd96be95..000000000 --- a/grammars/video/all.gf +++ /dev/null @@ -1,13 +0,0 @@ --- wrapper module containing both User's and System's grammars. AR 16/9/2004 - -abstract all = specUser,specSystem ** { - --- Suggestion: use different categories for system's and user's moves --- and bring them together only here; now both use DMove - --- cat Move ; --- fun userMove : UMove -> Move ; --- fun systemMove : SMove -> Move ; - -} ; - diff --git a/grammars/video/allProlog.gf b/grammars/video/allProlog.gf deleted file mode 100644 index 639106454..000000000 --- a/grammars/video/allProlog.gf +++ /dev/null @@ -1,5 +0,0 @@ ---# -path=.:Shared:Weekday:Time:Channel:User:System - -concrete allProlog of all = specUserProlog, specSystemProlog ** { - -} diff --git a/grammars/video/allSwe.gf b/grammars/video/allSwe.gf deleted file mode 100644 index 00098a1ff..000000000 --- a/grammars/video/allSwe.gf +++ /dev/null @@ -1,9 +0,0 @@ ---# -path=.:Shared:Weekday:Time:Channel:User:System - -concrete allSwe of all = specUserSwe, specSystemSwe ** { - --- lincat Move = {s : Str} ; --- lin userMove m = {s = "Användaren:" ++ m.s} ; --- lin systemMove m = {s = "Systemet:" ++ m.s} ; - -} diff --git a/grammars/video/icm100ResSwe.gf b/grammars/video/icm100ResSwe.gf deleted file mode 100644 index e43e26bf8..000000000 --- a/grammars/video/icm100ResSwe.gf +++ /dev/null @@ -1,30 +0,0 @@ -resource icm100ResSwe = { - - param RefPol = Pos | Neg | Inter ; - param RefLev = Per | Sem | Und | Acc ; - - oper ex1 : RefPol => RefLev => Str = table { - Pos => table { - Per => ["jag hörde"]; - Sem => [""]; - Und => [""]; - Acc => ["okej"] - }; - - Neg => table { - Per => ["ursäkta jag hörde inte alls vad du sa"]; - Sem => ["jag förstår inte vad du menar"]; - Und => ["jag förstår inte riktigt vad du menar"]; - Acc => ["tyvärr kan inte hantera"] - }; - - Inter => table { - Per => (variants{}); - Sem => (variants{}); --- Und => ["stämmer det"]; --hack! - Und => (variants{}); - Acc => (variants{}) - } - }; - -} \ No newline at end of file diff --git a/grammars/video/systemSwe.gf b/grammars/video/systemSwe.gf deleted file mode 100644 index dcf3e084e..000000000 --- a/grammars/video/systemSwe.gf +++ /dev/null @@ -1,4 +0,0 @@ -include Shared/specific.Swe.gf ; - Shared/general.Swe.gf ; - System/specific.Swe.gf ; - System/general.Swe.gf ; \ No newline at end of file