From 32612a7bf7c1de1e01146adcc19ce5132a27677f Mon Sep 17 00:00:00 2001 From: Arianna Masciolini Date: Wed, 26 Mar 2025 15:10:59 +0100 Subject: [PATCH] re(moved) unused/non-lab files --- {grammar/foods => foods}/Foods.gf | 0 grammar/abstract/MicroLang.gf | 165 ----------------- grammar/abstract/MicroLang.labels | 16 -- grammar/abstract/MiniGrammar.gf | 121 ------------- grammar/abstract/MiniLang.gf | 8 - grammar/abstract/MiniLang.labels | 27 --- grammar/abstract/MiniLexicon.gf | 92 ---------- grammar/api/MiniSyntax.gf | 148 ---------------- grammar/api/MiniSyntaxEng.gf | 6 - grammar/english/MicroLangEng.gf | 225 ------------------------ grammar/english/MicroLangEng.labels | 1 - grammar/english/MicroResEng.gf | 75 -------- grammar/english/MiniGrammarEng.gf | 234 ------------------------- grammar/english/MiniLangEng.gf | 3 - grammar/english/MiniLangEng.labels | 6 - grammar/english/MiniLexiconEng.gf | 94 ---------- grammar/english/MiniParadigmsEng.gf | 49 ------ grammar/english/MiniResEng.gf | 99 ----------- grammar/functor/MicroLangFunctor.gf | 150 ---------------- grammar/functor/MicroLangFunctorEng.gf | 8 - grammar/functor/MicroLangFunctorSwe.gf | 7 - grammar/functor/MiniLangFunctor.gf | 196 --------------------- grammar/functor/MiniLangFunctorEng.gf | 8 - grammar/functor/MiniLangFunctorSwe.gf | 8 - grammar/intro/MicroLangEng.gf | 15 -- grammar/intro/MicroResEng.gf | 44 ----- grammar/italian/MicroLangIta.gf | 233 ------------------------ grammar/italian/MicroLangIta.gfo | Bin 3779 -> 0 bytes grammar/italian/MicroResIta.gf | 62 ------- grammar/italian/MicroResIta.gfo | Bin 2788 -> 0 bytes grammar/myproject/MicroLangEng.gf | 57 ------ grammar/myproject/MicroLangEng.gfo | Bin 2247 -> 0 bytes grammar/myproject/MicroLangSwe.gf | 15 -- grammar/myproject/MicroLangSwe.gfo | Bin 2661 -> 0 bytes grammar/myproject/MicroResEng.gf | 124 ------------- grammar/myproject/MicroResEng.gfo | Bin 917 -> 0 bytes grammar/myproject/MicroResSwe.gf | 36 ---- grammar/myproject/MicroResSwe.gfo | Bin 1232 -> 0 bytes grammar/test.gfs | 8 - {lab1/intro => intro}/Intro.gf | 0 {lab1/intro => intro}/IntroEng.gf | 0 {lab1/intro => intro}/IntroFre.gf | 0 {lab1/intro => intro}/english.cf | 0 lab1/README.md | 6 +- 44 files changed, 3 insertions(+), 2343 deletions(-) rename {grammar/foods => foods}/Foods.gf (100%) delete mode 100644 grammar/abstract/MicroLang.gf delete mode 100644 grammar/abstract/MicroLang.labels delete mode 100644 grammar/abstract/MiniGrammar.gf delete mode 100644 grammar/abstract/MiniLang.gf delete mode 100644 grammar/abstract/MiniLang.labels delete mode 100644 grammar/abstract/MiniLexicon.gf delete mode 100644 grammar/api/MiniSyntax.gf delete mode 100644 grammar/api/MiniSyntaxEng.gf delete mode 100644 grammar/english/MicroLangEng.gf delete mode 100644 grammar/english/MicroLangEng.labels delete mode 100644 grammar/english/MicroResEng.gf delete mode 100644 grammar/english/MiniGrammarEng.gf delete mode 100644 grammar/english/MiniLangEng.gf delete mode 100644 grammar/english/MiniLangEng.labels delete mode 100644 grammar/english/MiniLexiconEng.gf delete mode 100644 grammar/english/MiniParadigmsEng.gf delete mode 100644 grammar/english/MiniResEng.gf delete mode 100644 grammar/functor/MicroLangFunctor.gf delete mode 100644 grammar/functor/MicroLangFunctorEng.gf delete mode 100644 grammar/functor/MicroLangFunctorSwe.gf delete mode 100644 grammar/functor/MiniLangFunctor.gf delete mode 100644 grammar/functor/MiniLangFunctorEng.gf delete mode 100644 grammar/functor/MiniLangFunctorSwe.gf delete mode 100644 grammar/intro/MicroLangEng.gf delete mode 100644 grammar/intro/MicroResEng.gf delete mode 100644 grammar/italian/MicroLangIta.gf delete mode 100644 grammar/italian/MicroLangIta.gfo delete mode 100644 grammar/italian/MicroResIta.gf delete mode 100644 grammar/italian/MicroResIta.gfo delete mode 100644 grammar/myproject/MicroLangEng.gf delete mode 100644 grammar/myproject/MicroLangEng.gfo delete mode 100644 grammar/myproject/MicroLangSwe.gf delete mode 100644 grammar/myproject/MicroLangSwe.gfo delete mode 100644 grammar/myproject/MicroResEng.gf delete mode 100644 grammar/myproject/MicroResEng.gfo delete mode 100644 grammar/myproject/MicroResSwe.gf delete mode 100644 grammar/myproject/MicroResSwe.gfo delete mode 100644 grammar/test.gfs rename {lab1/intro => intro}/Intro.gf (100%) rename {lab1/intro => intro}/IntroEng.gf (100%) rename {lab1/intro => intro}/IntroFre.gf (100%) rename {lab1/intro => intro}/english.cf (100%) diff --git a/grammar/foods/Foods.gf b/foods/Foods.gf similarity index 100% rename from grammar/foods/Foods.gf rename to foods/Foods.gf diff --git a/grammar/abstract/MicroLang.gf b/grammar/abstract/MicroLang.gf deleted file mode 100644 index 0ee73b8..0000000 --- a/grammar/abstract/MicroLang.gf +++ /dev/null @@ -1,165 +0,0 @@ -abstract MicroLang = { - --- a very minimal version of MiniGrammar + MiniLexicon, helping to get started - ------------------------------------------------------ ----------------- Grammar part ----------------------- ------------------------------------------------------ - - cat - --- Common - Utt ; -- sentence, question, word... e.g. "be quiet" - --- Cat - S ; -- declarative sentence e.g. "she lives here" - VP ; -- verb phrase e.g. "lives here" - Comp ; -- complement of copula e.g. "warm" - AP ; -- adjectival phrase e.g. "warm" - CN ; -- common noun (without determiner) e.g. "red house" - NP ; -- noun phrase (subject or object) e.g. "the red house" - Det ; -- determiner phrase e.g. "those" - Prep ; -- preposition, or just case e.g. "in", dative - V ; -- one-place verb e.g. "sleep" - V2 ; -- two-place verb e.g. "love" - A ; -- one-place adjective e.g. "warm" - N ; -- common noun e.g. "house" - Pron ; -- personal pronoun e.g. "she" - Adv ; -- adverbial phrase e.g. "in the house" - - fun --- Phrase - UttS : S -> Utt ; -- he walks - UttNP : NP -> Utt ; -- he - --- Sentence - PredVPS : NP -> VP -> S ; -- John walks --s shortcut even wrt MiniGrammar - --- Verb - UseV : V -> VP ; -- sleep - ComplV2 : V2 -> NP -> VP ; -- love it ---s - UseComp : Comp -> VP ; -- be small - CompAP : AP -> Comp ; -- small - AdvVP : VP -> Adv -> VP ; -- sleep here - --- Noun - DetCN : Det -> CN -> NP ; -- the man - UsePron : Pron -> NP ; -- she - a_Det : Det ; -- indefinite singular ---s - aPl_Det : Det ; -- indefinite plural ---s - the_Det : Det ; -- definite singular ---s - thePl_Det : Det ; -- definite plural ---s - UseN : N -> CN ; -- house - AdjCN : AP -> CN -> CN ; -- big house - --- Adjective - PositA : A -> AP ; -- warm - --- Adverb - PrepNP : Prep -> NP -> Adv ; -- in the house - --- Structural - in_Prep : Prep ; - on_Prep : Prep ; - with_Prep : Prep ; - - he_Pron : Pron ; - she_Pron : Pron ; - they_Pron : Pron ; - - ------------------------------------------------------ ----------------- Lexicon part ----------------------- ------------------------------------------------------ - -fun - already_Adv : Adv ; - animal_N : N ; - apple_N : N ; - baby_N : N ; - bad_A : A ; - beer_N : N ; - big_A : A ; - bike_N : N ; - bird_N : N ; - black_A : A ; - blood_N : N ; - blue_A : A ; - boat_N : N ; - book_N : N ; - boy_N : N ; - bread_N : N ; - break_V2 : V2 ; - buy_V2 : V2 ; - car_N : N ; - cat_N : N ; - child_N : N ; - city_N : N ; - clean_A : A ; - clever_A : A ; - cloud_N : N ; - cold_A : A ; - come_V : V ; - computer_N : N ; - cow_N : N ; - dirty_A : A ; - dog_N : N ; - drink_V2 : V2 ; - eat_V2 : V2 ; - find_V2 : V2 ; - fire_N : N ; - fish_N : N ; - flower_N : N ; - friend_N : N ; - girl_N : N ; - good_A : A ; - go_V : V ; - grammar_N : N ; - green_A : A ; - heavy_A : A ; - horse_N : N ; - hot_A : A ; - house_N : N ; --- john_PN : PN ; - jump_V : V ; - kill_V2 : V2 ; --- know_VS : VS ; - language_N : N ; - live_V : V ; - love_V2 : V2 ; - man_N : N ; - milk_N : N ; - music_N : N ; - new_A : A ; - now_Adv : Adv ; - old_A : A ; --- paris_PN : PN ; - play_V : V ; - read_V2 : V2 ; - ready_A : A ; - red_A : A ; - river_N : N ; - run_V : V ; - sea_N : N ; - see_V2 : V2 ; - ship_N : N ; - sleep_V : V ; - small_A : A ; - star_N : N ; - swim_V : V ; - teach_V2 : V2 ; - train_N : N ; - travel_V : V ; - tree_N : N ; - understand_V2 : V2 ; - wait_V2 : V2 ; - walk_V : V ; - warm_A : A ; - water_N : N ; - white_A : A ; - wine_N : N ; - woman_N : N ; - yellow_A : A ; - young_A : A ; - -} \ No newline at end of file diff --git a/grammar/abstract/MicroLang.labels b/grammar/abstract/MicroLang.labels deleted file mode 100644 index 4540ba3..0000000 --- a/grammar/abstract/MicroLang.labels +++ /dev/null @@ -1,16 +0,0 @@ -PredVPS nsubj head -ComplV2 head obj -AdvVP head advmod -DetCN det head -AdjCN amod head -PrepNP case head - -Det DET -Prep ADP -V VERB -V2 VERB -A ADJ -N NOUN -Pron PRON -Adv ADV - diff --git a/grammar/abstract/MiniGrammar.gf b/grammar/abstract/MiniGrammar.gf deleted file mode 100644 index 945124e..0000000 --- a/grammar/abstract/MiniGrammar.gf +++ /dev/null @@ -1,121 +0,0 @@ -abstract MiniGrammar = { - --- collected from GF/lib/src/abstract/*.gf --- the functions marked ---s are shortcuts --- the leading comments, e.g. "-- Common", indicate the standard RGL module - - cat - --- Common - Utt ; -- sentence, question, word... e.g. "be quiet" - Pol ; -- polarity e.g. positive, negative - Temp ; -- temporal features e.g. present, anterior - --- Cat - Imp ; -- imperative e.g. "walk", "don't walk" - S ; -- declarative sentence e.g. "she lives here" - QS ; -- question sentence e.g. "does she live here" - Cl ; -- declarative clause, with all tenses e.g. "she looks at this" - QCl ; -- question clause e.g. "does she look at this" - VP ; -- verb phrase e.g. "lives here" - Comp ; -- complement of copula e.g. "in trouble" - AP ; -- adjectival phrase e.g. "very warm" - CN ; -- common noun (without determiner) e.g. "red house" - NP ; -- noun phrase (subject or object) e.g. "the red house" - IP ; -- interrogative phrase e.g. "who" - Pron ; -- personal pronoun e.g. "she" - Det ; -- determiner phrase e.g. "those" - Conj ; -- conjunction e.g. "and" - Prep ; -- preposition, or just case e.g. "in", dative - V ; -- one-place verb e.g. "sleep" - V2 ; -- two-place verb e.g. "love" - VS ; -- sentence-complement verb e.g. "know" - VV ; -- verb-phrase-complement verb e.g. "want" - A ; -- one-place adjective e.g. "warm" - N ; -- common noun e.g. "house" - PN ; -- proper name e.g. "Paris" - Adv ; -- adverbial phrase e.g. "in the house" - IAdv ; -- interrogative adverbial e.g. "where" - - fun --- Phrase - UttS : S -> Utt ; -- John walks - UttQS : QS -> Utt ; -- does John walk - UttNP : NP -> Utt ; -- John - UttAdv : Adv -> Utt ; -- in the house - UttIAdv : IAdv -> Utt ; -- why - UttImpSg : Pol -> Imp -> Utt ; -- (do not) walk - --- Sentence - UseCl : Temp -> Pol -> Cl -> S ; -- John has not walked - UseQCl : Temp -> Pol -> QCl -> QS ; -- has John walked - PredVP : NP -> VP -> Cl ; -- John walks / John does not walk - QuestCl : Cl -> QCl ; -- does John (not) walk - QuestVP : IP -> VP -> QCl ; -- who does (not) walk - ImpVP : VP -> Imp ; -- walk / do not walk - --- Verb - UseV : V -> VP ; -- sleep - ComplV2 : V2 -> NP -> VP ; -- love it ---s - ComplVS : VS -> S -> VP ; -- know that it is good - ComplVV : VV -> VP -> VP ; -- want to be good - UseComp : Comp -> VP ; -- be small - CompAP : AP -> Comp ; -- small - CompNP : NP -> Comp ; -- a man - CompAdv : Adv -> Comp ; -- in the house - AdvVP : VP -> Adv -> VP ; -- sleep here - --- Noun - DetCN : Det -> CN -> NP ; -- the man - UsePN : PN -> NP ; -- John - UsePron : Pron -> NP ; -- he - MassNP : CN -> NP ; -- milk - a_Det : Det ; -- indefinite singular ---s - aPl_Det : Det ; -- indefinite plural ---s - the_Det : Det ; -- definite singular ---s - thePl_Det : Det ; -- definite plural ---s - UseN : N -> CN ; -- house - AdjCN : AP -> CN -> CN ; -- big house - --- Adjective - PositA : A -> AP ; -- warm - --- Adverb - PrepNP : Prep -> NP -> Adv ; -- in the house - --- Conjunction - CoordS : Conj -> S -> S -> S ; -- he walks and she runs ---s - --- Tense - PPos : Pol ; -- I sleep [positive polarity] - PNeg : Pol ; -- I do not sleep [negative polarity] - TSim : Temp ; -- simultanous: she sleeps ---s - TAnt : Temp ; -- anterior: she has slept ---s - --- Structural - and_Conj : Conj ; - or_Conj : Conj ; - - every_Det : Det ; - - in_Prep : Prep ; - on_Prep : Prep ; - with_Prep : Prep ; - - i_Pron : Pron ; - youSg_Pron : Pron ; - he_Pron : Pron ; - she_Pron : Pron ; - we_Pron : Pron ; - youPl_Pron : Pron ; - they_Pron : Pron ; - - whoSg_IP : IP ; - - where_IAdv : IAdv ; - why_IAdv : IAdv ; - - have_V2 : V2 ; - want_VV : VV ; - -} \ No newline at end of file diff --git a/grammar/abstract/MiniLang.gf b/grammar/abstract/MiniLang.gf deleted file mode 100644 index ed8d6d1..0000000 --- a/grammar/abstract/MiniLang.gf +++ /dev/null @@ -1,8 +0,0 @@ -abstract MiniLang = - MiniGrammar, - MiniLexicon - ** { - - flags startcat = Utt ; - - } \ No newline at end of file diff --git a/grammar/abstract/MiniLang.labels b/grammar/abstract/MiniLang.labels deleted file mode 100644 index 516a176..0000000 --- a/grammar/abstract/MiniLang.labels +++ /dev/null @@ -1,27 +0,0 @@ -AdjCN amod head -AdvVP head advmod -ComplV2 head obj -ComplVS head ccomp -ComplVV head xcomp -CoordS cc head conj -DetCN det head -PredVP nsubj head -PrepNP case head -QuestVP nsubj head -UseCl empty empty head -UseQCl empty empty head -UttImpSg emoty head - -A ADJ -Adv ADV -Conj CONJ -Det DET -IAdv ADV -N NOUN -PN PROPN -Prep ADP -Pron PRON -V VERB -V2 VERB -VV VERB -VS VERB diff --git a/grammar/abstract/MiniLexicon.gf b/grammar/abstract/MiniLexicon.gf deleted file mode 100644 index ec0760d..0000000 --- a/grammar/abstract/MiniLexicon.gf +++ /dev/null @@ -1,92 +0,0 @@ -abstract MiniLexicon = MiniGrammar ** { -fun - already_Adv : Adv ; - animal_N : N ; - apple_N : N ; - baby_N : N ; - bad_A : A ; - beer_N : N ; - big_A : A ; - bike_N : N ; - bird_N : N ; - black_A : A ; - blood_N : N ; - blue_A : A ; - boat_N : N ; - book_N : N ; - boy_N : N ; - bread_N : N ; - break_V2 : V2 ; - buy_V2 : V2 ; - car_N : N ; - cat_N : N ; - child_N : N ; - city_N : N ; - clean_A : A ; - clever_A : A ; - cloud_N : N ; - cold_A : A ; - come_V : V ; - computer_N : N ; - cow_N : N ; - dirty_A : A ; - dog_N : N ; - drink_V2 : V2 ; - eat_V2 : V2 ; - find_V2 : V2 ; - fire_N : N ; - fish_N : N ; - flower_N : N ; - friend_N : N ; - girl_N : N ; - good_A : A ; - go_V : V ; - grammar_N : N ; - green_A : A ; - heavy_A : A ; - horse_N : N ; - hot_A : A ; - house_N : N ; - john_PN : PN ; - jump_V : V ; - kill_V2 : V2 ; - know_VS : VS ; - language_N : N ; - live_V : V ; - love_V2 : V2 ; - man_N : N ; - milk_N : N ; - music_N : N ; - new_A : A ; - now_Adv : Adv ; - old_A : A ; - paris_PN : PN ; - play_V : V ; - read_V2 : V2 ; - ready_A : A ; - red_A : A ; - river_N : N ; - run_V : V ; - sea_N : N ; - see_V2 : V2 ; - ship_N : N ; - sleep_V : V ; - small_A : A ; - star_N : N ; - swim_V : V ; - teach_V2 : V2 ; - train_N : N ; - travel_V : V ; - tree_N : N ; - understand_V2 : V2 ; - wait_V2 : V2 ; - walk_V : V ; - warm_A : A ; - water_N : N ; - white_A : A ; - wine_N : N ; - woman_N : N ; - yellow_A : A ; - young_A : A ; - -} diff --git a/grammar/api/MiniSyntax.gf b/grammar/api/MiniSyntax.gf deleted file mode 100644 index 6b8e3d3..0000000 --- a/grammar/api/MiniSyntax.gf +++ /dev/null @@ -1,148 +0,0 @@ -incomplete resource MiniSyntax = - open MiniGrammar - -in { - -oper - - mkUtt = overload { - mkUtt : S -> Utt - = UttS ; - mkUtt : QS -> Utt - = UttQS ; - mkUtt : NP -> Utt - = UttNP ; - mkUtt : Adv -> Utt - = UttAdv ; - mkUtt : Pol -> Imp -> Utt - = UttImpSg ; - mkUtt : Imp -> Utt - = UttImpSg PPos - } ; - - mkImp = overload { - mkImp : VP -> Imp - = ImpVP ; - } ; - - mkS = overload { - mkS : Temp -> Pol -> Cl -> S - = UseCl ; - mkS : Pol -> Cl -> S - = UseCl TSim ; - mkS : Temp -> Cl -> S - = \t -> UseCl t PPos ; - mkS : Cl -> S - = UseCl TSim PPos ; - mkS : Conj -> S -> S -> S - = CoordS ; - } ; - - mkQS = overload { - mkQS : Temp -> Pol -> QCl -> QS - = UseQCl ; - mkQS : Pol -> QCl -> QS - = UseQCl TSim ; - mkQS : Temp -> QCl -> QS - = \t -> UseQCl t PPos ; - mkQS : QCl -> QS - = UseQCl TSim PPos ; - } ; - - positivePol : Pol - = PPos ; - negativePol : Pol - = PNeg ; - - simultaneousAnt : Temp - = TSim ; - anteriorAnt : Temp - = TAnt ; - - mkCl = overload { - mkCl : NP -> VP -> Cl - = PredVP ; - mkCl : NP -> V -> Cl - = \np,v -> PredVP np (UseV v) ; - mkCl : NP -> V2 -> NP -> Cl - = \np,v,obj -> PredVP np (ComplV2 v obj) ; - mkCl : NP -> VS -> S -> Cl - = \np,v,obj -> PredVP np (ComplVS v obj) ; - mkCl : NP -> VV -> VP -> Cl - = \np,v,obj -> PredVP np (ComplVV v obj) ; - mkCl : NP -> AP -> Cl - = \np,ap -> PredVP np (UseComp (CompAP ap)) ; - mkCl : NP -> A -> Cl - = \np,a -> PredVP np (UseComp (CompAP (PositA a))) ; - } ; - - mkQCl = overload { - mkQCl : Cl -> QCl - = QuestCl ; - mkQCl : IP -> VP -> QCl - = QuestVP ; - } ; - - mkVP = overload { - mkVP : V -> VP - = UseV ; - mkVP : V2 -> NP -> VP - = ComplV2 ; - mkVP : AP -> VP - = \ap -> UseComp (CompAP ap) ; - mkVP : A -> VP - = \a -> UseComp (CompAP (PositA a)) ; - mkVP : NP -> VP - = \np -> UseComp (CompNP np) ; - mkVP : Adv -> VP - = \adv -> UseComp (CompAdv adv) ; - mkVP : VP -> Adv -> VP - = AdvVP ; - } ; - - mkNP = overload { - mkNP : Det -> CN -> NP - = DetCN ; - mkNP : Det -> N -> NP - = \det,n -> DetCN det (UseN n) ; - mkNP : Pron -> NP - = UsePron ; - mkNP : PN -> NP - = UsePN ; - mkNP : CN -> NP - = MassNP ; - mkNP : N -> NP - = \n -> MassNP (UseN n) ; - } ; - - i_NP : NP - = UsePron i_Pron ; - you_NP : NP - = UsePron youSg_Pron ; - he_NP : NP - = UsePron he_Pron ; - she_NP : NP - = UsePron she_Pron ; - - mkCN = overload { - mkCN : N -> CN - = UseN ; - mkCN : AP -> CN -> CN - = AdjCN ; - mkCN : A -> N -> CN - = \a,n -> AdjCN (PositA a) (UseN n) ; - mkCN : A -> CN -> CN - = \a,cn -> AdjCN (PositA a) cn ; - } ; - - mkAP = overload { - mkAP : A -> AP - = PositA ; - } ; - - mkAdv = overload { - mkAdv : Prep -> NP -> Adv - = PrepNP ; - } ; - -} \ No newline at end of file diff --git a/grammar/api/MiniSyntaxEng.gf b/grammar/api/MiniSyntaxEng.gf deleted file mode 100644 index f5d933b..0000000 --- a/grammar/api/MiniSyntaxEng.gf +++ /dev/null @@ -1,6 +0,0 @@ ---# -path=.:../english:../abstract - -resource MiniSyntaxEng = - MiniGrammarEng ** --- inheriting everything from Grammar, not just Cat and Structural - MiniSyntax with - (MiniGrammar=MiniGrammarEng) ; diff --git a/grammar/english/MicroLangEng.gf b/grammar/english/MicroLangEng.gf deleted file mode 100644 index e004e34..0000000 --- a/grammar/english/MicroLangEng.gf +++ /dev/null @@ -1,225 +0,0 @@ ---# -path=.:../abstract -concrete MicroLangEng of MicroLang = open MicroResEng, Prelude in { - ------------------------------------------------------ ----------------- Grammar part ----------------------- ------------------------------------------------------ - - lincat - Utt = {s : Str} ; - - S = {s : Str} ; - VP = {verb : Verb ; compl : Str} ; ---s special case of Mini - Comp = {s : Str} ; - AP = Adjective ; - CN = Noun ; - NP = {s : Case => Str ; a : Agreement} ; - Pron = {s : Case => Str ; a : Agreement} ; - Det = {s : Str ; n : Number} ; - Prep = {s : Str} ; - V = Verb ; - V2 = Verb2 ; - A = Adjective ; - N = Noun ; - Adv = {s : Str} ; - - lin - UttS s = s ; - UttNP np = {s = np.s ! Acc} ; - - PredVPS np vp = { - s = np.s ! Nom ++ vp.verb.s ! agr2vform np.a ++ vp.compl - } ; - - UseV v = { - verb = v ; - compl = [] ; - } ; - - ComplV2 v2 np = { - verb = v2 ; - compl = v2.c ++ np.s ! Acc -- NP object in the accusative, preposition first - } ; - - UseComp comp = { - verb = be_Verb ; -- the verb is the copula "be" - compl = comp.s - } ; - - CompAP ap = ap ; - - AdvVP vp adv = - vp ** {compl = vp.compl ++ adv.s} ; - - DetCN det cn = { - s = \\c => det.s ++ cn.s ! det.n ; - a = Agr det.n ; - } ; - - UsePron p = p ; - - a_Det = {s = pre {"a"|"e"|"i"|"o" => "an" ; _ => "a"} ; n = Sg} ; --- a/an can get wrong - aPl_Det = {s = "" ; n = Pl} ; - the_Det = {s = "the" ; n = Sg} ; - thePl_Det = {s = "the" ; n = Pl} ; - - UseN n = n ; - - AdjCN ap cn = { - s = table {n => ap.s ++ cn.s ! n} - } ; - - PositA a = a ; - - PrepNP prep np = {s = prep.s ++ np.s ! Acc} ; - - in_Prep = {s = "in"} ; - on_Prep = {s = "on"} ; - with_Prep = {s = "with"} ; - - he_Pron = { - s = table {Nom => "he" ; Acc => "him"} ; - a = Agr Sg ; - } ; - she_Pron = { - s = table {Nom => "she" ; Acc => "her"} ; - a = Agr Sg ; - } ; - they_Pron = { - s = table {Nom => "they" ; Acc => "them"} ; - a = Agr Pl ; - } ; - ------------------------------------------------------ ----------------- Lexicon part ----------------------- ------------------------------------------------------ - -lin already_Adv = mkAdv "already" ; -lin animal_N = mkN "animal" ; -lin apple_N = mkN "apple" ; -lin baby_N = mkN "baby" ; -lin bad_A = mkA "bad" ; -lin beer_N = mkN "beer" ; -lin big_A = mkA "big" ; -lin bike_N = mkN "bike" ; -lin bird_N = mkN "bird" ; -lin black_A = mkA "black" ; -lin blood_N = mkN "blood" ; -lin blue_A = mkA "blue" ; -lin boat_N = mkN "boat" ; -lin book_N = mkN "book" ; -lin boy_N = mkN "boy" ; -lin bread_N = mkN "bread" ; -lin break_V2 = mkV2 (mkV "break" "broke" "broken") ; -lin buy_V2 = mkV2 (mkV "buy" "bought" "bought") ; -lin car_N = mkN "car" ; -lin cat_N = mkN "cat" ; -lin child_N = mkN "child" "children" ; -lin city_N = mkN "city" ; -lin clean_A = mkA "clean" ; -lin clever_A = mkA "clever" ; -lin cloud_N = mkN "cloud" ; -lin cold_A = mkA "cold" ; -lin come_V = mkV "come" "came" "come" ; -lin computer_N = mkN "computer" ; -lin cow_N = mkN "cow" ; -lin dirty_A = mkA "dirty" ; -lin dog_N = mkN "dog" ; -lin drink_V2 = mkV2 (mkV "drink" "drank" "drunk") ; -lin eat_V2 = mkV2 (mkV "eat" "ate" "eaten") ; -lin find_V2 = mkV2 (mkV "find" "found" "found") ; -lin fire_N = mkN "fire" ; -lin fish_N = mkN "fish" "fish" ; -lin flower_N = mkN "flower" ; -lin friend_N = mkN "friend" ; -lin girl_N = mkN "girl" ; -lin good_A = mkA "good" ; -lin go_V = mkV "go" "went" "gone" ; -lin grammar_N = mkN "grammar" ; -lin green_A = mkA "green" ; -lin heavy_A = mkA "heavy" ; -lin horse_N = mkN "horse" ; -lin hot_A = mkA "hot" ; -lin house_N = mkN "house" ; --- lin john_PN = mkPN "John" ; -lin jump_V = mkV "jump" ; -lin kill_V2 = mkV2 "kill" ; --- lin know_VS = mkVS (mkV "know" "knew" "known") ; -lin language_N = mkN "language" ; -lin live_V = mkV "live" ; -lin love_V2 = mkV2 (mkV "love") ; -lin man_N = mkN "man" "men" ; -lin milk_N = mkN "milk" ; -lin music_N = mkN "music" ; -lin new_A = mkA "new" ; -lin now_Adv = mkAdv "now" ; -lin old_A = mkA "old" ; --- lin paris_PN = mkPN "Paris" ; -lin play_V = mkV "play" ; -lin read_V2 = mkV2 (mkV "read" "read" "read") ; -lin ready_A = mkA "ready" ; -lin red_A = mkA "red" ; -lin river_N = mkN "river" ; -lin run_V = mkV "run" "ran" "run" ; -lin sea_N = mkN "sea" ; -lin see_V2 = mkV2 (mkV "see" "saw" "seen") ; -lin ship_N = mkN "ship" ; -lin sleep_V = mkV "sleep" "slept" "slept" ; -lin small_A = mkA "small" ; -lin star_N = mkN "star" ; -lin swim_V = mkV "swim" "swam" "swum" ; -lin teach_V2 = mkV2 (mkV "teach" "taught" "taught") ; -lin train_N = mkN "train" ; -lin travel_V = mkV "travel" ; -lin tree_N = mkN "tree" ; -lin understand_V2 = mkV2 (mkV "understand" "understood" "understood") ; -lin wait_V2 = mkV2 "wait" "for" ; -lin walk_V = mkV "walk" ; -lin warm_A = mkA "warm" ; -lin water_N = mkN "water" ; -lin white_A = mkA "white" ; -lin wine_N = mkN "wine" ; -lin woman_N = mkN "woman" "women" ; -lin yellow_A = mkA "yellow" ; -lin young_A = mkA "young" ; - ---------------------------- --- Paradigms part --------- ---------------------------- - -oper - mkN = overload { - mkN : Str -> Noun -- predictable noun, e.g. car-cars, boy-boys, fly-flies, bush-bushes - = \n -> lin N (smartNoun n) ; - mkN : Str -> Str -> Noun -- irregular noun, e.g. man-men - = \sg,pl -> lin N (mkNoun sg pl) ; - } ; - - mkA : Str -> A - = \s -> lin A {s = s} ; - - mkV = overload { - mkV : (inf : Str) -> V -- predictable verb, e.g. play-plays, cry-cries, wash-washes - = \s -> lin V (smartVerb s) ; - mkV : (inf,pres,part : Str) -> V -- irregular verb, e.g. drink-drank-drunk - = \inf,pres,part -> lin V (irregVerb inf pres part) ; - } ; - - mkV2 = overload { - mkV2 : Str -> V2 -- predictable verb with direct object, e.g. "wash" - = \s -> lin V2 (smartVerb s ** {c = []}) ; - mkV2 : Str -> Str -> V2 -- predictable verb with preposition, e.g. "wait - for" - = \s,p -> lin V2 (smartVerb s ** {c = p}) ; - mkV2 : V -> V2 -- any verb with direct object, e.g. "drink" - = \v -> lin V2 (v ** {c = []}) ; - mkV2 : V -> Str -> V2 -- any verb with preposition - = \v,p -> lin V2 (v ** {c = p}) ; - } ; - - mkAdv : Str -> Adv - = \s -> lin Adv {s = s} ; - - mkPrep : Str -> Prep - = \s -> lin Prep {s = s} ; - -} diff --git a/grammar/english/MicroLangEng.labels b/grammar/english/MicroLangEng.labels deleted file mode 100644 index d258d12..0000000 --- a/grammar/english/MicroLangEng.labels +++ /dev/null @@ -1 +0,0 @@ -UseComp {"es","sont"} AUX cop head diff --git a/grammar/english/MicroResEng.gf b/grammar/english/MicroResEng.gf deleted file mode 100644 index b160b13..0000000 --- a/grammar/english/MicroResEng.gf +++ /dev/null @@ -1,75 +0,0 @@ -resource MicroResEng = open Prelude in { - -param - Number = Sg | Pl ; - Case = Nom | Acc ; - - - Agreement = Agr Number ; ---s Person to be added - - -- all forms of normal Eng verbs, although not yet used in MiniGrammar - VForm = Inf | PresSg3 | Past | PastPart | PresPart ; - -oper - Noun : Type = {s : Number => Str} ; - - mkNoun : Str -> Str -> Noun = \sg,pl -> { - s = table {Sg => sg ; Pl => pl} - } ; - - regNoun : Str -> Noun = \sg -> mkNoun sg (sg + "s") ; - - -- smart paradigm - smartNoun : Str -> Noun = \sg -> case sg of { - _ + ("ay"|"ey"|"oy"|"uy") => regNoun sg ; - x + "y" => mkNoun sg (x + "ies") ; - _ + ("ch"|"sh"|"s"|"o") => mkNoun sg (sg + "es") ; - _ => regNoun sg - } ; - - Adjective : Type = {s : Str} ; - - Verb : Type = {s : VForm => Str} ; - - mkVerb : (inf,pres,past,pastpart,prespart : Str) -> Verb - = \inf,pres,past,pastpart,prespart -> { - s = table { - Inf => inf ; - PresSg3 => pres ; - Past => past ; - PastPart => pastpart ; - PresPart => prespart - } - } ; - - regVerb : (inf : Str) -> Verb = \inf -> - mkVerb inf (inf + "s") (inf + "ed") (inf + "ed") (inf + "ing") ; - - -- regular verbs with predictable variations - smartVerb : Str -> Verb = \inf -> case inf of { - pl + ("a"|"e"|"i"|"o"|"u") + "y" => regVerb inf ; - cr + "y" => mkVerb inf (cr + "ies") (cr + "ied") (cr + "ied") (inf + "ing") ; - lov + "e" => mkVerb inf (inf + "s") (lov + "ed") (lov + "ed") (lov + "ing") ; - kis + ("s"|"sh"|"x"|"o") => mkVerb inf (inf + "es") (inf + "ed") (inf + "ed") (inf + "ing") ; - _ => regVerb inf - } ; - - -- normal irregular verbs e.g. drink,drank,drunk - irregVerb : (inf,past,pastpart : Str) -> Verb = - \inf,past,pastpart -> - let verb = smartVerb inf - in mkVerb inf (verb.s ! PresSg3) past pastpart (verb.s ! PresPart) ; - - -- two-place verb with "case" as preposition; for transitive verbs, c=[] - Verb2 : Type = Verb ** {c : Str} ; - - be_Verb : Verb = mkVerb "are" "is" "was" "been" "being" ; ---s to be generalized - - ----s a very simplified verb agreement function for Micro - agr2vform : Agreement -> VForm = \a -> case a of { - Agr Sg => PresSg3 ; - Agr Pl => Inf - } ; - -} diff --git a/grammar/english/MiniGrammarEng.gf b/grammar/english/MiniGrammarEng.gf deleted file mode 100644 index ebfa7fc..0000000 --- a/grammar/english/MiniGrammarEng.gf +++ /dev/null @@ -1,234 +0,0 @@ ---# -path=.:../abstract -concrete MiniGrammarEng of MiniGrammar = open MiniResEng, Prelude in { - - - lincat - Utt = {s : Str} ; - Pol = {s : Str ; isTrue : Bool} ; -- the s field is empty, but needed for parsing - Temp = {s : Str ; isPres : Bool} ; - - S = {s : Str} ; - QS = {s : Str} ; - Cl = { -- word order is fixed in S and QS - subj : Str ; -- subject - verb : Bool => Bool => {fin,inf : Str} ; -- dep. on Pol,Temp, e.g. "does","sleep" - compl : Str -- after verb: complement, adverbs - } ; - QCl = Cl ** {isWh : Bool} ; - Imp = {s : Bool => Str} ; - VP = {verb : GVerb ; compl : Str} ; - Comp = {s : Str} ; - AP = Adjective ; - CN = Noun ; - NP = {s : Case => Str ; a : Agreement} ; - IP = {s : Case => Str ; a : Agreement} ; - Pron = {s : Case => Str ; a : Agreement} ; - Det = {s : Str ; n : Number} ; - Conj = {s : Str} ; - Prep = {s : Str} ; - V = Verb ; - V2 = Verb2 ; - VS = Verb ; - VV = Verb ; ---- only VV to VP - A = Adjective ; - N = Noun ; - PN = {s : Str} ; - Adv = {s : Str} ; - IAdv = {s : Str} ; - - lin - UttS s = s ; - UttQS s = s ; - UttNP np = {s = np.s ! Acc} ; -- Acc: produce "me" rather than "I" - UttAdv adv = adv ; - UttIAdv iadv = iadv ; - UttImpSg pol imp = {s = pol.s ++ imp.s ! pol.isTrue} ; - - UseCl temp pol cl = - let clt = cl.verb ! pol.isTrue ! temp.isPres -- isTrue regulates if "do" is used - in { - s = pol.s ++ temp.s ++ --- needed for parsing: a GF hack - cl.subj ++ -- she - clt.fin ++ -- does - negation pol.isTrue ++ -- not - clt.inf ++ -- drink - cl.compl -- beer - } ; - - UseQCl temp pol qcl = - let - isWh = qcl.isWh ; - clt = qcl.verb ! andB isWh pol.isTrue ! temp.isPres ; -- no "do" in present positive Wh questions - verbsubj = case isWh of { - True => qcl.subj ++ clt.fin ; -- no inversion in Wh questions - False => clt.fin ++ qcl.subj - } - - in { - s = pol.s ++ temp.s ++ - verbsubj ++ - negation pol.isTrue ++ -- not - clt.inf ++ -- drink - qcl.compl -- beer - } ; - - PredVP np vp = { - subj = np.s ! Nom ; - compl = vp.compl ; - verb = \\plain,isPres => case of { - - -- non-auxiliary verbs, negative/question present: "does (not) drink" - => {fin = "does" ; inf = vp.verb.s ! VF Inf} ; - => {fin = "do" ; inf = vp.verb.s ! VF Inf} ; - - -- non-auxiliary, plain present ; auxiliary, all present: "drinks", "is (not)" - <_,_, True, Agr Sg Per1> => {fin = vp.verb.s ! PresSg1 ; inf = []} ; - <_,_, True, Agr Sg Per3> => {fin = vp.verb.s ! VF PresSg3 ; inf = []} ; - <_,_, True, _> => {fin = vp.verb.s ! PresPl ; inf = []} ; - - -- all verbs, past: "has (not) drunk", "has (not) been" - <_,_, False,Agr Sg Per3> => {fin = "has" ; inf = vp.verb.s ! VF PastPart} ; - <_,_, False,_ > => {fin = "have" ; inf = vp.verb.s ! VF PastPart} - - -- the negation word "not" is put in place in UseCl, UseQCl - } - } ; - - QuestCl cl = cl ** {isWh = False} ; -- since the parts are the same, we don't need to change anything - - QuestVP ip vp = PredVP ip vp ** {isWh = True} ; - - ImpVP vp = { - s = table { - True => vp.verb.s ! VF Inf ++ vp.compl ; -- in Eng, imperative = infinitive - False => "do not" ++ vp.verb.s ! VF Inf ++ vp.compl - } - } ; - - UseV v = { - verb = verb2gverb v ; -- lift ordinary verbs to generalized verbs - compl = [] - } ; - - ComplV2 v2 np = { - verb = verb2gverb v2 ; - compl = v2.c ++ np.s ! Acc -- NP object in the accusative, preposition first - } ; - - ComplVS vs s = { - verb = verb2gverb vs ; - compl = "that" ++ s.s ; - } ; - - ComplVV vv vp = { - verb = verb2gverb vv ; - compl = "to" ++ vp.verb.s ! VF Inf ++ vp.compl ; - } ; - - UseComp comp = { - verb = be_GVerb ; -- the verb is the copula "be" - compl = comp.s - } ; - - CompAP ap = ap ; - - CompNP np = { - s = np.s ! Nom -- NP complement is in the nominative - } ; - - CompAdv adv = adv ; - - AdvVP vp adv = - vp ** {compl = vp.compl ++ adv.s} ; - - DetCN det cn = { - s = table {c => det.s ++ cn.s ! det.n} ; - a = Agr det.n Per3 -- this kind of NP is always third person - } ; - - UsePN pn = { - s = \\_ => pn.s ; - a = Agr Sg Per3 - } ; - - UsePron p = p ; -- Pron is worst-case NP - - MassNP cn = { - s = \\_ => cn.s ! Sg ; - a = Agr Sg Per3 - } ; - - a_Det = {s = pre {"a"|"e"|"i"|"o" => "an" ; _ => "a"} ; n = Sg} ; --- a/an can get wrong - aPl_Det = {s = "" ; n = Pl} ; - the_Det = {s = "the" ; n = Sg} ; - thePl_Det = {s = "the" ; n = Pl} ; - - UseN n = n ; - - AdjCN ap cn = { - s = table {n => ap.s ++ cn.s ! n} - } ; - - PositA a = a ; - - PrepNP prep np = {s = prep.s ++ np.s ! Acc} ; - - CoordS conj a b = {s = a.s ++ conj.s ++ b.s} ; - - PPos = {s = [] ; isTrue = True} ; - PNeg = {s = [] ; isTrue = False} ; - - TSim = {s = [] ; isPres = True} ; - TAnt = {s = [] ; isPres = False} ; - - and_Conj = {s = "and"} ; - or_Conj = {s = "or"} ; - - every_Det = {s = "every" ; n = Sg} ; - - in_Prep = {s = "in"} ; - on_Prep = {s = "on"} ; - with_Prep = {s = "with"} ; - - i_Pron = { - s = table {Nom => "I" ; Acc => "me"} ; - a = Agr Sg Per1 - } ; - youSg_Pron = { - s = \\_ => "you" ; - a = Agr Sg Per2 - } ; - he_Pron = { - s = table {Nom => "he" ; Acc => "him"} ; - a = Agr Sg Per3 - } ; - she_Pron = { - s = table {Nom => "she" ; Acc => "her"} ; - a = Agr Sg Per3 - } ; - we_Pron = { - s = table {Nom => "we" ; Acc => "us"} ; - a = Agr Pl Per1 - } ; - youPl_Pron = { - s = \\_ => "you" ; - a = Agr Pl Per2 - } ; - they_Pron = { - s = table {Nom => "they" ; Acc => "them"} ; - a = Agr Pl Per3 - } ; - - whoSg_IP = { - s = table {Nom => "who" ; Acc => "whom"} ; - a = Agr Sg Per3 - } ; - - where_IAdv = {s = "where"} ; - why_IAdv = {s = "why"} ; - - have_V2 = mkVerb "have" "has" "had" "had" "having" ** {c = []} ; - - want_VV = regVerb "want" ; - -} diff --git a/grammar/english/MiniLangEng.gf b/grammar/english/MiniLangEng.gf deleted file mode 100644 index 60ecbfb..0000000 --- a/grammar/english/MiniLangEng.gf +++ /dev/null @@ -1,3 +0,0 @@ ---# -path=.:../abstract - -concrete MiniLangEng of MiniLang = MiniGrammarEng, MiniLexiconEng ; diff --git a/grammar/english/MiniLangEng.labels b/grammar/english/MiniLangEng.labels deleted file mode 100644 index 7270ffd..0000000 --- a/grammar/english/MiniLangEng.labels +++ /dev/null @@ -1,6 +0,0 @@ -UseCl, UseQCl, ImpVP {"not"} PART advmod head -UseComp {"is","are","am","was","were","been","be"} AUX cop head -PredVP, QuestVP {"has","had","have","do","does"} AUX aux head -ImpVP {"do"} AUX aux head -ComplVS {"that"} SCONJ mark ccomp -ComplVV {"to"} PART mark xcomp diff --git a/grammar/english/MiniLexiconEng.gf b/grammar/english/MiniLexiconEng.gf deleted file mode 100644 index 2bd793c..0000000 --- a/grammar/english/MiniLexiconEng.gf +++ /dev/null @@ -1,94 +0,0 @@ -concrete MiniLexiconEng of MiniLexicon = MiniGrammarEng ** - open - MiniParadigmsEng - in { -lin already_Adv = mkAdv "already" ; -lin animal_N = mkN "animal" ; -lin apple_N = mkN "apple" ; -lin baby_N = mkN "baby" ; -lin bad_A = mkA "bad" ; -lin beer_N = mkN "beer" ; -lin big_A = mkA "big" ; -lin bike_N = mkN "bike" ; -lin bird_N = mkN "bird" ; -lin black_A = mkA "black" ; -lin blood_N = mkN "blood" ; -lin blue_A = mkA "blue" ; -lin boat_N = mkN "boat" ; -lin book_N = mkN "book" ; -lin boy_N = mkN "boy" ; -lin bread_N = mkN "bread" ; -lin break_V2 = mkV2 (mkV "break" "broke" "broken") ; -lin buy_V2 = mkV2 (mkV "buy" "bought" "bought") ; -lin car_N = mkN "car" ; -lin cat_N = mkN "cat" ; -lin child_N = mkN "child" "children" ; -lin city_N = mkN "city" ; -lin clean_A = mkA "clean" ; -lin clever_A = mkA "clever" ; -lin cloud_N = mkN "cloud" ; -lin cold_A = mkA "cold" ; -lin come_V = mkV "come" "came" "come" ; -lin computer_N = mkN "computer" ; -lin cow_N = mkN "cow" ; -lin dirty_A = mkA "dirty" ; -lin dog_N = mkN "dog" ; -lin drink_V2 = mkV2 (mkV "drink" "drank" "drunk") ; -lin eat_V2 = mkV2 (mkV "eat" "ate" "eaten") ; -lin find_V2 = mkV2 (mkV "find" "found" "found") ; -lin fire_N = mkN "fire" ; -lin fish_N = mkN "fish" "fish" ; -lin flower_N = mkN "flower" ; -lin friend_N = mkN "friend" ; -lin girl_N = mkN "girl" ; -lin good_A = mkA "good" ; -lin go_V = mkV "go" "went" "gone" ; -lin grammar_N = mkN "grammar" ; -lin green_A = mkA "green" ; -lin heavy_A = mkA "heavy" ; -lin horse_N = mkN "horse" ; -lin hot_A = mkA "hot" ; -lin house_N = mkN "house" ; -lin john_PN = mkPN "John" ; -lin jump_V = mkV "jump" ; -lin kill_V2 = mkV2 "kill" ; -lin know_VS = mkVS (mkV "know" "knew" "known") ; -lin language_N = mkN "language" ; -lin live_V = mkV "live" ; -lin love_V2 = mkV2 (mkV "love") ; -lin man_N = mkN "man" "men" ; -lin milk_N = mkN "milk" ; -lin music_N = mkN "music" ; -lin new_A = mkA "new" ; -lin now_Adv = mkAdv "now" ; -lin old_A = mkA "old" ; -lin paris_PN = mkPN "Paris" ; -lin play_V = mkV "play" ; -lin read_V2 = mkV2 (mkV "read" "read" "read") ; -lin ready_A = mkA "ready" ; -lin red_A = mkA "red" ; -lin river_N = mkN "river" ; -lin run_V = mkV "run" "ran" "run" ; -lin sea_N = mkN "sea" ; -lin see_V2 = mkV2 (mkV "see" "saw" "seen") ; -lin ship_N = mkN "ship" ; -lin sleep_V = mkV "sleep" "slept" "slept" ; -lin small_A = mkA "small" ; -lin star_N = mkN "star" ; -lin swim_V = mkV "swim" "swam" "swum" ; -lin teach_V2 = mkV2 (mkV "teach" "taught" "taught") ; -lin train_N = mkN "train" ; -lin travel_V = mkV "travel" ; -lin tree_N = mkN "tree" ; -lin understand_V2 = mkV2 (mkV "understand" "understood" "understood") ; -lin wait_V2 = mkV2 "wait" "for" ; -lin walk_V = mkV "walk" ; -lin warm_A = mkA "warm" ; -lin water_N = mkN "water" ; -lin white_A = mkA "white" ; -lin wine_N = mkN "wine" ; -lin woman_N = mkN "woman" "women" ; -lin yellow_A = mkA "yellow" ; -lin young_A = mkA "young" ; - -} diff --git a/grammar/english/MiniParadigmsEng.gf b/grammar/english/MiniParadigmsEng.gf deleted file mode 100644 index 1f36ff4..0000000 --- a/grammar/english/MiniParadigmsEng.gf +++ /dev/null @@ -1,49 +0,0 @@ -resource MiniParadigmsEng = open - - MiniGrammarEng, - MiniResEng - -in { - -oper - mkN = overload { - mkN : Str -> Noun -- predictable noun, e.g. car-cars, boy-boys, fly-flies, bush-bushes - = \n -> lin N (smartNoun n) ; - mkN : Str -> Str -> Noun -- irregular noun, e.g. man-men - = \sg,pl -> lin N (mkNoun sg pl) ; - } ; - - mkPN : Str -> PN - = \s -> lin PN {s = s} ; - - mkA : Str -> A - = \s -> lin A {s = s} ; - - mkV = overload { - mkV : (inf : Str) -> V -- predictable verb, e.g. play-plays, cry-cries, wash-washes - = \s -> lin V (smartVerb s) ; - mkV : (inf,pres,part : Str) -> V -- irregular verb, e.g. drink-drank-drunk - = \inf,pres,part -> lin V (irregVerb inf pres part) ; - } ; - - mkV2 = overload { - mkV2 : Str -> V2 -- predictable verb with direct object, e.g. "wash" - = \s -> lin V2 (smartVerb s ** {c = []}) ; - mkV2 : Str -> Str -> V2 -- predictable verb with preposition, e.g. "wait - for" - = \s,p -> lin V2 (smartVerb s ** {c = p}) ; - mkV2 : V -> V2 -- any verb with direct object, e.g. "drink" - = \v -> lin V2 (v ** {c = []}) ; - mkV2 : V -> Str -> V2 -- any verb with preposition - = \v,p -> lin V2 (v ** {c = p}) ; - } ; - - mkVS : V -> VS - = \v -> lin VS v ; - - mkAdv : Str -> Adv - = \s -> lin Adv {s = s} ; - - mkPrep : Str -> Prep - = \s -> lin Prep {s = s} ; - -} \ No newline at end of file diff --git a/grammar/english/MiniResEng.gf b/grammar/english/MiniResEng.gf deleted file mode 100644 index 4fc6a60..0000000 --- a/grammar/english/MiniResEng.gf +++ /dev/null @@ -1,99 +0,0 @@ -resource MiniResEng = open Prelude in { - -param - Number = Sg | Pl ; - Case = Nom | Acc ; - Person = Per1 | Per2 | Per3 ; - - Agreement = Agr Number Person ; - - -- all forms of normal Eng verbs, although not yet used in MiniGrammar - VForm = Inf | PresSg3 | Past | PastPart | PresPart ; - -oper - Noun : Type = {s : Number => Str} ; - - mkNoun : Str -> Str -> Noun = \sg,pl -> { - s = table {Sg => sg ; Pl => pl} - } ; - - regNoun : Str -> Noun = \sg -> mkNoun sg (sg + "s") ; - - -- smart paradigm - smartNoun : Str -> Noun = \sg -> case sg of { - _ + ("ay"|"ey"|"oy"|"uy") => regNoun sg ; - x + "y" => mkNoun sg (x + "ies") ; - _ + ("ch"|"sh"|"s"|"o") => mkNoun sg (sg + "es") ; - _ => regNoun sg - } ; - - Adjective : Type = {s : Str} ; - - Verb : Type = {s : VForm => Str} ; - - mkVerb : (inf,pres,past,pastpart,prespart : Str) -> Verb - = \inf,pres,past,pastpart,prespart -> { - s = table { - Inf => inf ; - PresSg3 => pres ; - Past => past ; - PastPart => pastpart ; - PresPart => prespart - } - } ; - - regVerb : (inf : Str) -> Verb = \inf -> - mkVerb inf (inf + "s") (inf + "ed") (inf + "ed") (inf + "ing") ; - - -- regular verbs with predictable variations - smartVerb : Str -> Verb = \inf -> case inf of { - pl + ("a"|"e"|"i"|"o"|"u") + "y" => regVerb inf ; - cr + "y" => mkVerb inf (cr + "ies") (cr + "ied") (cr + "ied") (inf + "ing") ; - lov + "e" => mkVerb inf (inf + "s") (lov + "ed") (lov + "ed") (lov + "ing") ; - kis + ("s"|"sh"|"x"|"o") => mkVerb inf (inf + "es") (inf + "ed") (inf + "ed") (inf + "ing") ; - _ => regVerb inf - } ; - - -- normal irregular verbs e.g. drink,drank,drunk - irregVerb : (inf,past,pastpart : Str) -> Verb = - \inf,past,pastpart -> - let verb = smartVerb inf - in mkVerb inf (verb.s ! PresSg3) past pastpart (verb.s ! PresPart) ; - - negation : Bool -> Str = \b -> case b of {True => [] ; False => "not"} ; - - -- two-place verb with "case" as preposition; for transitive verbs, c=[] - Verb2 : Type = Verb ** {c : Str} ; - - -- generalized verb, here just "be" - param - GVForm = VF VForm | PresSg1 | PresPl | PastPl ; - - oper - GVerb : Type = { - s : GVForm => Str ; - isAux : Bool - } ; - - be_GVerb : GVerb = { - s = table { - PresSg1 => "am" ; - PresPl => "are" ; - PastPl => "were" ; - VF vf => (mkVerb "be" "is" "was" "been" "being").s ! vf - } ; - isAux = True - } ; - - -- in VP formation, all verbs are lifted to GVerb, but morphology doesn't need to know this - verb2gverb : Verb -> GVerb = \v -> {s = - table { - PresSg1 => v.s ! Inf ; - PresPl => v.s ! Inf ; - PastPl => v.s ! Past ; - VF vf => v.s ! vf - } ; - isAux = False - } ; - -} \ No newline at end of file diff --git a/grammar/functor/MicroLangFunctor.gf b/grammar/functor/MicroLangFunctor.gf deleted file mode 100644 index 14ff8d2..0000000 --- a/grammar/functor/MicroLangFunctor.gf +++ /dev/null @@ -1,150 +0,0 @@ -incomplete concrete MicroLangFunctor of MicroLang = - -open - Grammar, - Syntax, - Lexicon -in { - --- a functor implementation of MicroLang, using Grammar and Lexicon whenever the function is --- directly from there, Syntax otherwise - ------------------------------------------------------ ----------------- Grammar part ----------------------- ------------------------------------------------------ - -lincat - Utt = Grammar.Utt ; - S = Grammar.S ; - VP = Grammar.VP ; - Comp = Grammar.Comp ; - AP = Grammar.AP ; - CN = Grammar.CN ; - NP = Grammar.NP ; - Det = Grammar.Det ; - Prep = Grammar.Prep ; - V = Grammar.V ; - V2 = Grammar.V2 ; - A = Grammar.A ; - N = Grammar.N ; - Pron = Grammar.Pron ; - Adv = Grammar.Adv ; - -lin - UttS = Grammar.UttS ; - UttNP = Grammar.UttNP ; - PredVPS np vp = Syntax.mkS (Syntax.mkCl np vp) ; - UseV = Grammar.UseV ; - ComplV2 v2 np = Syntax.mkVP v2 np ; - UseComp = Grammar.UseComp ; - CompAP = Grammar.CompAP ; - AdvVP = Grammar.AdvVP ; - DetCN = Grammar.DetCN ; - UsePron = Grammar.UsePron ; - a_Det = Syntax.a_Det ; - aPl_Det = Syntax.aPl_Det ; - the_Det = Syntax.the_Det ; - thePl_Det = Syntax.thePl_Det ; - UseN = Grammar.UseN ; - AdjCN = Grammar.AdjCN ; - PositA = Grammar.PositA ; - PrepNP = Grammar.PrepNP ; - in_Prep = Grammar.in_Prep ; - on_Prep = Grammar.on_Prep ; - with_Prep = Grammar.with_Prep ; - he_Pron = Grammar.he_Pron ; - she_Pron = Grammar.she_Pron ; - they_Pron = Grammar.they_Pron ; - ------------------------------------------------------ ----------------- Lexicon part ----------------------- ------------------------------------------------------ - -lin - already_Adv = Lexicon.already_Adv ; - animal_N = Lexicon.animal_N ; - apple_N = Lexicon.apple_N ; - baby_N = Lexicon.baby_N ; - bad_A = Lexicon.bad_A ; - beer_N = Lexicon.beer_N ; - big_A = Lexicon.big_A ; - bike_N = Lexicon.bike_N ; - bird_N = Lexicon.bird_N ; - black_A = Lexicon.black_A ; - blood_N = Lexicon.blood_N ; - blue_A = Lexicon.blue_A ; - boat_N = Lexicon.boat_N ; - book_N = Lexicon.book_N ; - boy_N = Lexicon.boy_N ; - bread_N = Lexicon.bread_N ; - break_V2 = Lexicon.break_V2 ; - buy_V2 = Lexicon.buy_V2 ; - car_N = Lexicon.car_N ; - cat_N = Lexicon.cat_N ; - child_N = Lexicon.child_N ; - city_N = Lexicon.city_N ; - clean_A = Lexicon.clean_A ; - clever_A = Lexicon.clever_A ; - cloud_N = Lexicon.cloud_N ; - cold_A = Lexicon.cold_A ; - come_V = Lexicon.come_V ; - computer_N = Lexicon.computer_N ; - cow_N = Lexicon.cow_N ; - dirty_A = Lexicon.dirty_A ; - dog_N = Lexicon.dog_N ; - drink_V2 = Lexicon.drink_V2 ; - eat_V2 = Lexicon.eat_V2 ; - find_V2 = Lexicon.find_V2 ; - fire_N = Lexicon.fire_N ; - fish_N = Lexicon.fish_N ; - flower_N = Lexicon.flower_N ; - friend_N = Lexicon.friend_N ; - girl_N = Lexicon.girl_N ; - good_A = Lexicon.good_A ; - go_V = Lexicon.go_V ; - grammar_N = Lexicon.grammar_N ; - green_A = Lexicon.green_A ; - heavy_A = Lexicon.heavy_A ; - horse_N = Lexicon.horse_N ; - hot_A = Lexicon.hot_A ; - house_N = Lexicon.house_N ; - jump_V = Lexicon.jump_V ; - kill_V2 = Lexicon.kill_V2 ; - language_N = Lexicon.language_N ; - live_V = Lexicon.live_V ; - love_V2 = Lexicon.love_V2 ; - man_N = Lexicon.man_N ; - milk_N = Lexicon.milk_N ; - music_N = Lexicon.music_N ; - new_A = Lexicon.new_A ; - now_Adv = Lexicon.now_Adv ; - old_A = Lexicon.old_A ; - play_V = Lexicon.play_V ; - read_V2 = Lexicon.read_V2 ; - ready_A = Lexicon.ready_A ; - red_A = Lexicon.red_A ; - river_N = Lexicon.river_N ; - run_V = Lexicon.run_V ; - sea_N = Lexicon.sea_N ; - see_V2 = Lexicon.see_V2 ; - ship_N = Lexicon.ship_N ; - sleep_V = Lexicon.sleep_V ; - small_A = Lexicon.small_A ; - star_N = Lexicon.star_N ; - swim_V = Lexicon.swim_V ; - teach_V2 = Lexicon.teach_V2 ; - train_N = Lexicon.train_N ; - travel_V = Lexicon.travel_V ; - tree_N = Lexicon.tree_N ; - understand_V2 = Lexicon.understand_V2 ; - wait_V2 = Lexicon.wait_V2 ; - walk_V = Lexicon.walk_V ; - warm_A = Lexicon.warm_A ; - water_N = Lexicon.water_N ; - white_A = Lexicon.white_A ; - wine_N = Lexicon.wine_N ; - woman_N = Lexicon.woman_N ; - yellow_A = Lexicon.yellow_A ; - young_A = Lexicon.young_A ; - -} \ No newline at end of file diff --git a/grammar/functor/MicroLangFunctorEng.gf b/grammar/functor/MicroLangFunctorEng.gf deleted file mode 100644 index 3d4f515..0000000 --- a/grammar/functor/MicroLangFunctorEng.gf +++ /dev/null @@ -1,8 +0,0 @@ ---# -path=.:../abstract - -concrete MicroLangFunctorEng of MicroLang = MicroLangFunctor with - (Grammar = GrammarEng), - (Syntax = SyntaxEng), - (Lexicon = LexiconEng) - ; - \ No newline at end of file diff --git a/grammar/functor/MicroLangFunctorSwe.gf b/grammar/functor/MicroLangFunctorSwe.gf deleted file mode 100644 index 66bd101..0000000 --- a/grammar/functor/MicroLangFunctorSwe.gf +++ /dev/null @@ -1,7 +0,0 @@ ---# -path=.:../abstract - -concrete MicroLangFunctorSwe of MicroLang = MicroLangFunctor with - (Grammar = GrammarSwe), - (Syntax = SyntaxSwe), - (Lexicon = LexiconSwe) - ; \ No newline at end of file diff --git a/grammar/functor/MiniLangFunctor.gf b/grammar/functor/MiniLangFunctor.gf deleted file mode 100644 index 392f6ac..0000000 --- a/grammar/functor/MiniLangFunctor.gf +++ /dev/null @@ -1,196 +0,0 @@ -incomplete concrete MiniLangFunctor of MiniLang = -open - Grammar, - Syntax, - Lexicon -in { - --- A functor implementation of MiniLang, using Grammar and Lexicon whenever the function is --- directly from there, Syntax otherwise. --- Both Grammar and Lexicon are in a single file for simplicity. - ------------------------------------------------------ ----------------- Grammar part ----------------------- ------------------------------------------------------ - -lincat - Utt = Grammar.Utt ; - Pol = Grammar.Pol ; - Temp = Grammar.Temp ; - Imp = Grammar.Imp ; - S = Grammar.S ; - QS = Grammar.QS ; - Cl = Grammar.Cl ; - QCl = Grammar.QCl ; - VP = Grammar.VP ; - Comp = Grammar.Comp ; - AP = Grammar.AP ; - CN = Grammar.CN ; - NP = Grammar.NP ; - IP = Grammar.IP ; - Pron = Grammar.Pron ; - Det = Grammar.Det ; - Conj = Grammar.Conj ; - Prep = Grammar.Prep ; - V = Grammar.V ; - V2 = Grammar.V2 ; - VS = Grammar.VS ; - VV = Grammar.VV ; - A = Grammar.A ; - N = Grammar.N ; - PN = Grammar.PN ; - Adv = Grammar.Adv ; - IAdv = Grammar.IAdv ; - -lin - UttS = Grammar.UttS ; - UttQS = Grammar.UttQS ; - UttNP = Grammar.UttNP ; - UttAdv = Grammar.UttAdv ; - UttIAdv = Grammar.UttIAdv ; - UttImpSg pol imp = Syntax.mkUtt pol imp ; - UseCl = Grammar.UseCl ; - UseQCl = Grammar.UseQCl ; - PredVP = Grammar.PredVP ; - QuestCl = Grammar.QuestCl ; - QuestVP = Grammar.QuestVP ; - ImpVP = Grammar.ImpVP ; - UseV = Grammar.UseV ; - ComplV2 v2 np = Syntax.mkVP v2 np ; - ComplVS = Grammar.ComplVS ; - ComplVV = Grammar.ComplVV ; - UseComp = Grammar.UseComp ; - CompAP = Grammar.CompAP ; - CompNP = Grammar.CompNP ; - CompAdv = Grammar.CompAdv ; - AdvVP = Grammar.AdvVP ; - DetCN = Grammar.DetCN ; - UsePN = Grammar.UsePN ; - UsePron = Grammar.UsePron ; - MassNP = Grammar.MassNP ; - a_Det = Syntax.a_Det ; - aPl_Det = Syntax.aPl_Det ; - the_Det = Syntax.the_Det ; - thePl_Det = Syntax.thePl_Det ; - UseN = Grammar.UseN ; - AdjCN = Grammar.AdjCN ; - PositA = Grammar.PositA ; - PrepNP = Grammar.PrepNP ; - CoordS conj a b = Syntax.mkS conj a b ; - PPos = Grammar.PPos ; - PNeg = Grammar.PNeg ; - TSim = Syntax.mkTemp Syntax.presentTense Syntax.simultaneousAnt ; - TAnt = Syntax.mkTemp Syntax.presentTense Syntax.anteriorAnt ; - and_Conj = Grammar.and_Conj ; - or_Conj = Grammar.or_Conj ; - every_Det = Grammar.every_Det ; - in_Prep = Grammar.in_Prep ; - on_Prep = Grammar.on_Prep ; - with_Prep = Grammar.with_Prep ; - i_Pron = Grammar.i_Pron ; - youSg_Pron = Grammar.youSg_Pron ; - he_Pron = Grammar.he_Pron ; - she_Pron = Grammar.she_Pron ; - we_Pron = Grammar.we_Pron ; - youPl_Pron = Grammar.youPl_Pron ; - they_Pron = Grammar.they_Pron ; - whoSg_IP = Grammar.whoSg_IP ; - where_IAdv = Grammar.where_IAdv ; - why_IAdv = Grammar.why_IAdv ; - have_V2 = Grammar.have_V2 ; - want_VV = Grammar.want_VV ; - ------------------------------------- --- Lexicon part -------------------- ------------------------------------- - - already_Adv = Lexicon.already_Adv ; - animal_N = Lexicon.animal_N ; - apple_N = Lexicon.apple_N ; - baby_N = Lexicon.baby_N ; - bad_A = Lexicon.bad_A ; - beer_N = Lexicon.beer_N ; - big_A = Lexicon.big_A ; - bike_N = Lexicon.bike_N ; - bird_N = Lexicon.bird_N ; - black_A = Lexicon.black_A ; - blood_N = Lexicon.blood_N ; - blue_A = Lexicon.blue_A ; - boat_N = Lexicon.boat_N ; - book_N = Lexicon.book_N ; - boy_N = Lexicon.boy_N ; - bread_N = Lexicon.bread_N ; - break_V2 = Lexicon.break_V2 ; - buy_V2 = Lexicon.buy_V2 ; - car_N = Lexicon.car_N ; - cat_N = Lexicon.cat_N ; - child_N = Lexicon.child_N ; - city_N = Lexicon.city_N ; - clean_A = Lexicon.clean_A ; - clever_A = Lexicon.clever_A ; - cloud_N = Lexicon.cloud_N ; - cold_A = Lexicon.cold_A ; - come_V = Lexicon.come_V ; - computer_N = Lexicon.computer_N ; - cow_N = Lexicon.cow_N ; - dirty_A = Lexicon.dirty_A ; - dog_N = Lexicon.dog_N ; - drink_V2 = Lexicon.drink_V2 ; - eat_V2 = Lexicon.eat_V2 ; - find_V2 = Lexicon.find_V2 ; - fire_N = Lexicon.fire_N ; - fish_N = Lexicon.fish_N ; - flower_N = Lexicon.flower_N ; - friend_N = Lexicon.friend_N ; - girl_N = Lexicon.girl_N ; - good_A = Lexicon.good_A ; - go_V = Lexicon.go_V ; - grammar_N = Lexicon.grammar_N ; - green_A = Lexicon.green_A ; - heavy_A = Lexicon.heavy_A ; - horse_N = Lexicon.horse_N ; - hot_A = Lexicon.hot_A ; - house_N = Lexicon.house_N ; - john_PN = Lexicon.john_PN ; - jump_V = Lexicon.jump_V ; - kill_V2 = Lexicon.kill_V2 ; - know_VS = Lexicon.know_VS ; - language_N = Lexicon.language_N ; - live_V = Lexicon.live_V ; - love_V2 = Lexicon.love_V2 ; - man_N = Lexicon.man_N ; - milk_N = Lexicon.milk_N ; - music_N = Lexicon.music_N ; - new_A = Lexicon.new_A ; - now_Adv = Lexicon.now_Adv ; - old_A = Lexicon.old_A ; - paris_PN = Lexicon.paris_PN ; - play_V = Lexicon.play_V ; - read_V2 = Lexicon.read_V2 ; - ready_A = Lexicon.ready_A ; - red_A = Lexicon.red_A ; - river_N = Lexicon.river_N ; - run_V = Lexicon.run_V ; - sea_N = Lexicon.sea_N ; - see_V2 = Lexicon.see_V2 ; - ship_N = Lexicon.ship_N ; - sleep_V = Lexicon.sleep_V ; - small_A = Lexicon.small_A ; - star_N = Lexicon.star_N ; - swim_V = Lexicon.swim_V ; - teach_V2 = Lexicon.teach_V2 ; - train_N = Lexicon.train_N ; - travel_V = Lexicon.travel_V ; - tree_N = Lexicon.tree_N ; - understand_V2 = Lexicon.understand_V2 ; - wait_V2 = Lexicon.wait_V2 ; - walk_V = Lexicon.walk_V ; - warm_A = Lexicon.warm_A ; - water_N = Lexicon.water_N ; - white_A = Lexicon.white_A ; - wine_N = Lexicon.wine_N ; - woman_N = Lexicon.woman_N ; - yellow_A = Lexicon.yellow_A ; - young_A = Lexicon.young_A ; - -} \ No newline at end of file diff --git a/grammar/functor/MiniLangFunctorEng.gf b/grammar/functor/MiniLangFunctorEng.gf deleted file mode 100644 index 8205fd3..0000000 --- a/grammar/functor/MiniLangFunctorEng.gf +++ /dev/null @@ -1,8 +0,0 @@ ---# -path=.:../abstract - -concrete MiniLangFunctorEng of MiniLang = MiniLangFunctor with - (Grammar = GrammarEng), - (Syntax = SyntaxEng), - (Lexicon = LexiconEng) - ; - \ No newline at end of file diff --git a/grammar/functor/MiniLangFunctorSwe.gf b/grammar/functor/MiniLangFunctorSwe.gf deleted file mode 100644 index 26f3cf1..0000000 --- a/grammar/functor/MiniLangFunctorSwe.gf +++ /dev/null @@ -1,8 +0,0 @@ ---# -path=.:../abstract - -concrete MiniLangFunctorSwe of MiniLang = MiniLangFunctor with - (Grammar = GrammarSwe), - (Syntax = SyntaxSwe), - (Lexicon = LexiconSwe) - ; - \ No newline at end of file diff --git a/grammar/intro/MicroLangEng.gf b/grammar/intro/MicroLangEng.gf deleted file mode 100644 index 3c2b008..0000000 --- a/grammar/intro/MicroLangEng.gf +++ /dev/null @@ -1,15 +0,0 @@ ---# -path=.:../abstract - -concrete MicroLangEng of MicroLang = - open MicroResEng - in { - -lincat - N = Noun ; - -lin - animal_N = mkN "animal" ; - apple_N = mkN "apple" ; - baby_N = mkN "baby" ; - woman_N = mkN "woman" "women" ; -} \ No newline at end of file diff --git a/grammar/intro/MicroResEng.gf b/grammar/intro/MicroResEng.gf deleted file mode 100644 index 1e71999..0000000 --- a/grammar/intro/MicroResEng.gf +++ /dev/null @@ -1,44 +0,0 @@ --- live-coded MicroResEng for Lab 2 - -resource MicroResEng = { - -param - Number = Sg | Pl ; - -oper --- phonological patterns - sibilant : pattern Str - = #("s" | "x" | "ch" | "sh" | "z") ; - vowel : pattern Str - = #("a" | "e" | "i" | "o" | "u") ; - --- the type of nouns - Noun : Type = {s : Number => Str} ; - --- worst-case paradigm - mkNoun : (sg, pl : Str) -> Noun - = \sg, pl -> {s = table {Sg => sg ; Pl => pl}} ; - --- regular paradigm - regNoun : (sg : Str) -> Noun - = \sg -> mkNoun sg (sg + "s") ; - --- smart paradigm - smartNoun : (sg : Str) -> Noun - = \sg -> case sg of { - x + #vowel + "y" => regNoun sg ; - x + "y" => mkNoun sg (x + "ies") ; - x + #sibilant => mkNoun sg (sg + "es") ; - _ => regNoun sg - } ; - --- overloaded paradigm for lexicographers - mkN = overload { - mkN : (sg : Str) -> Noun = smartNoun ; - mkN : (sg, pl : Str) -> Noun = mkNoun ; - } ; - - - - -} \ No newline at end of file diff --git a/grammar/italian/MicroLangIta.gf b/grammar/italian/MicroLangIta.gf deleted file mode 100644 index b441318..0000000 --- a/grammar/italian/MicroLangIta.gf +++ /dev/null @@ -1,233 +0,0 @@ ---# -path=.:../abstract -concrete MicroLangIta of MicroLang = open MicroResIta in { - ------------------------------------------------------ ----------------- Grammar part ----------------------- ------------------------------------------------------ - - lincat -{- - Utt = {s : Str} ; - - S = {s : Str} ; - VP = {verb : Verb ; compl : Str} ; ---s special case of Mini - Comp = {s : Str} ; --} - AP = Adjective ; - CN = Noun ; -{- - NP = {s : Case => Str ; a : Agreement} ; - Pron = {s : Case => Str ; a : Agreement} ; - Det = {s : Str ; n : Number} ; - Prep = {s : Str} ; - V = Verb ; - V2 = Verb2 ; - -} - A = Adjective ; - N = Noun ; - Adv = {s : Str} ; - - - lin - {- - UttS s = s ; - UttNP np = {s = np.s ! Acc} ; - - PredVPS np vp = { - s = np.s ! Nom ++ vp.verb.s ! agr2vform np.a ++ vp.compl - } ; - - UseV v = { - verb = v ; - compl = [] ; - } ; - - ComplV2 v2 np = { - verb = v2 ; - compl = v2.c ++ np.s ! Acc -- NP object in the accusative, preposition first - } ; - - UseComp comp = { - verb = be_Verb ; -- the verb is the copula "be" - compl = comp.s - } ; - - CompAP ap = ap ; - - AdvVP vp adv = - vp ** {compl = vp.compl ++ adv.s} ; - - DetCN det cn = { - s = \\c => det.s ++ cn.s ! det.n ; - a = Agr det.n ; - } ; - - UsePron p = p ; - - a_Det = {s = pre {"a"|"e"|"i"|"o" => "an" ; _ => "a"} ; n = Sg} ; --- a/an can get wrong - aPl_Det = {s = "" ; n = Pl} ; - the_Det = {s = "the" ; n = Sg} ; - thePl_Det = {s = "the" ; n = Pl} ; - -} - UseN n = n ; - - AdjCN ap cn = { - s = table {n => cn.s ! n ++ ap.s ! cn.g ! n} ; - g = cn.g - } ; - - PositA a = a ; -{- - PrepNP prep np = {s = prep.s ++ np.s ! Acc} ; - - in_Prep = {s = "in"} ; - on_Prep = {s = "on"} ; - with_Prep = {s = "with"} ; - - he_Pron = { - s = table {Nom => "he" ; Acc => "him"} ; - a = Agr Sg ; - } ; - she_Pron = { - s = table {Nom => "she" ; Acc => "her"} ; - a = Agr Sg ; - } ; - they_Pron = { - s = table {Nom => "they" ; Acc => "them"} ; - a = Agr Pl ; - } ; --} ------------------------------------------------------ ----------------- Lexicon part ----------------------- ------------------------------------------------------ - --- lin already_Adv = mkAdv "already" ; -lin animal_N = mkN "animale" ; -lin apple_N = mkN "mela" ; -lin baby_N = mkN "bambino" ; -lin bad_A = mkA "cattivo" ; -lin beer_N = mkN "birra" ; -lin big_A = mkA "grande" ; -lin bike_N = mkN "bicicletta" ; -{- -lin bird_N = mkN "bird" ; -lin black_A = mkA "black" ; -lin blood_N = mkN "blood" ; -lin blue_A = mkA "blue" ; -lin boat_N = mkN "boat" ; -lin book_N = mkN "book" ; -lin boy_N = mkN "boy" ; -lin bread_N = mkN "bread" ; -lin break_V2 = mkV2 (mkV "break" "broke" "broken") ; -lin buy_V2 = mkV2 (mkV "buy" "bought" "bought") ; -lin car_N = mkN "car" ; -lin cat_N = mkN "cat" ; -lin child_N = mkN "child" "children" ; -lin city_N = mkN "city" ; -lin clean_A = mkA "clean" ; -lin clever_A = mkA "clever" ; -lin cloud_N = mkN "cloud" ; -lin cold_A = mkA "cold" ; -lin come_V = mkV "come" "came" "come" ; -lin computer_N = mkN "computer" ; -lin cow_N = mkN "cow" ; -lin dirty_A = mkA "dirty" ; -lin dog_N = mkN "dog" ; -lin drink_V2 = mkV2 (mkV "drink" "drank" "drunk") ; -lin eat_V2 = mkV2 (mkV "eat" "ate" "eaten") ; -lin find_V2 = mkV2 (mkV "find" "found" "found") ; -lin fire_N = mkN "fire" ; -lin fish_N = mkN "fish" "fish" ; -lin flower_N = mkN "flower" ; -lin friend_N = mkN "friend" ; -lin girl_N = mkN "girl" ; -lin good_A = mkA "good" ; -lin go_V = mkV "go" "went" "gone" ; -lin grammar_N = mkN "grammar" ; -lin green_A = mkA "green" ; -lin heavy_A = mkA "heavy" ; -lin horse_N = mkN "horse" ; -lin hot_A = mkA "hot" ; -lin house_N = mkN "house" ; --- lin john_PN = mkPN "John" ; -lin jump_V = mkV "jump" ; -lin kill_V2 = mkV2 "kill" ; --- lin know_VS = mkVS (mkV "know" "knew" "known") ; -lin language_N = mkN "language" ; -lin live_V = mkV "live" ; -lin love_V2 = mkV2 (mkV "love") ; -lin man_N = mkN "man" "men" ; -lin milk_N = mkN "milk" ; -lin music_N = mkN "music" ; -lin new_A = mkA "new" ; -lin now_Adv = mkAdv "now" ; -lin old_A = mkA "old" ; --- lin paris_PN = mkPN "Paris" ; -lin play_V = mkV "play" ; -lin read_V2 = mkV2 (mkV "read" "read" "read") ; -lin ready_A = mkA "ready" ; -lin red_A = mkA "red" ; -lin river_N = mkN "river" ; -lin run_V = mkV "run" "ran" "run" ; -lin sea_N = mkN "sea" ; -lin see_V2 = mkV2 (mkV "see" "saw" "seen") ; -lin ship_N = mkN "ship" ; -lin sleep_V = mkV "sleep" "slept" "slept" ; -lin small_A = mkA "small" ; -lin star_N = mkN "star" ; -lin swim_V = mkV "swim" "swam" "swum" ; -lin teach_V2 = mkV2 (mkV "teach" "taught" "taught") ; -lin train_N = mkN "train" ; -lin travel_V = mkV "travel" ; -lin tree_N = mkN "tree" ; -lin understand_V2 = mkV2 (mkV "understand" "understood" "understood") ; -lin wait_V2 = mkV2 "wait" "for" ; -lin walk_V = mkV "walk" ; -lin warm_A = mkA "warm" ; -lin water_N = mkN "water" ; -lin white_A = mkA "white" ; -lin wine_N = mkN "wine" ; -lin woman_N = mkN "woman" "women" ; -lin yellow_A = mkA "yellow" ; -lin young_A = mkA "young" ; - ---------------------------- --- Paradigms part --------- ---------------------------- - -oper - mkN = overload { - mkN : Str -> Noun -- predictable noun, e.g. car-cars, boy-boys, fly-flies, bush-bushes - = \n -> lin N (smartNoun n) ; - mkN : Str -> Str -> Noun -- irregular noun, e.g. man-men - = \sg,pl -> lin N (mkNoun sg pl) ; - } ; - - mkA : Str -> A - = \s -> lin A {s = s} ; - - mkV = overload { - mkV : (inf : Str) -> V -- predictable verb, e.g. play-plays, cry-cries, wash-washes - = \s -> lin V (smartVerb s) ; - mkV : (inf,pres,part : Str) -> V -- irregular verb, e.g. drink-drank-drunk - = \inf,pres,part -> lin V (irregVerb inf pres part) ; - } ; - - mkV2 = overload { - mkV2 : Str -> V2 -- predictable verb with direct object, e.g. "wash" - = \s -> lin V2 (smartVerb s ** {c = []}) ; - mkV2 : Str -> Str -> V2 -- predictable verb with preposition, e.g. "wait - for" - = \s,p -> lin V2 (smartVerb s ** {c = p}) ; - mkV2 : V -> V2 -- any verb with direct object, e.g. "drink" - = \v -> lin V2 (v ** {c = []}) ; - mkV2 : V -> Str -> V2 -- any verb with preposition - = \v,p -> lin V2 (v ** {c = p}) ; - } ; - - mkAdv : Str -> Adv - = \s -> lin Adv {s = s} ; - - mkPrep : Str -> Prep - = \s -> lin Prep {s = s} ; --} -} diff --git a/grammar/italian/MicroLangIta.gfo b/grammar/italian/MicroLangIta.gfo deleted file mode 100644 index 7dc4f0bbb43a5e05e503d8fd4f1166cf52a2664f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3779 zcmZ>FGce)t%}g%J_eso4_bf?d=7jSY7}=8ZQ!?|?8CXL@+;lA%7#JD2!LmWA#hxXJ z4DR}&#i>Qb`iY4}d8zvDZu-gjxdpn#m3bwJ6}suAy16+e`ZOW-x+eK_ZL{49p-lND(6g z0~44H5@BXf%*)J8%t>WnV1%(VL2Q=X)SN^Z10tK0n46TDmk$zThp@pa*^?7XN;1nJ z;t)2nIM@)V8n8L6Nts1OU{Np&EXI~zl$e)-!~~nbm6VyBnVgeaQUX?v;HFA4I_*&;S4b>lwk($jAuhfTE3= z1r)8I=w)&YU}Izy5FpQ+0s>U@Cc-f4dy~~MCCk~5osr4ekBNcBF(BT691k1DbS^C6JOc&cq5TQ9zbD`>`=H3JQ`Nkb;76 z*MNc%BTK>qD<0}j2F7#-l<)-SF_05r2I0(&D0vTDTq0#YMkY|^V`OA;&d)7iV`M-I zG6tB*kWvHc5JtE#3Bkqel3GGD!x=$QAuUaAR7gw1{YhC=APk}`DwzBNXcks%0r|z5 zC64TjOpXDJ49t$?6+PfYf|m0k85B(rl8m7_(BGevfiV$`KovEp{$^xgW?^Jw=U@pa zN~K-uV+knA&!bt8G6vJkXqM38R7gF+$iVCuZ$MrWCr=k6qlX74xG2s86|SJh7pSxa z#T)}86C)dQXbBCobQsOTlqt-JhGx?)=W;+AuJL~CjEsH^yfiKH?gS1 zFTXU84c;;ax6eQ=W=1AXF80KNf}B(eZOzKUX)C1N4QUgCs&gi89=4>!q)G~H%+AJX zBeX4_4@%MCx{ra8iIzI<2np~1umdeHs z=_(*u%gn+rASlF^l$u&Zp>K0@QSC;GRdAmpkpU@yg+*ACGSeyYYhE6zedvCLb#LG) giJ3)IOjL|5DKneWq?DhJYBiEq5&b0;|B6ch0M00s1ONa4 diff --git a/grammar/italian/MicroResIta.gf b/grammar/italian/MicroResIta.gf deleted file mode 100644 index 69778d4..0000000 --- a/grammar/italian/MicroResIta.gf +++ /dev/null @@ -1,62 +0,0 @@ -resource MicroResIta = { - -param --- define types of morphological parameters - Number = Sg | Pl ; - Gender = Masc | Fem ; - -oper --- define types for parts of speech --- they are recourd types with tables and inherent features - Noun : Type = {s : Number => Str ; g : Gender} ; - Adjective : Type = {s : Gender => Number => Str} ; - --- here is an example that is type-correct as a Noun - donna_N : Noun = { - s = table {Sg => "donna" ; Pl => "donne"} ; - g = Fem - } ; - --- define constructor function for Noun - mkNoun : Str -> Str -> Gender -> Noun = \sg, pl, g -> { - s = table {Sg => sg ; Pl => pl} ; - g = g - } ; - --- define a noun using this constructor - uomo_N : Noun = mkNoun "uomo" "uomini" Masc ; - --- define a smart paradigm - smartNoun : Str -> Noun = \s -> case s of { - x + "o" => mkNoun s (x + "i") Masc ; - x + "a" => mkNoun s (x + "e") Fem ; - x + "e" => mkNoun s (x + "i") Masc ; - _ => mkNoun s s Masc - } ; - --- the overloaded paradigm is what the lexicon will use - mkN = overload { - mkN : Str -> Noun = smartNoun ; - mkN : Str -> Str -> Gender -> Noun = mkNoun ; - mkN : Gender -> Noun -> Noun = \g, n -> n ** {g = g} ; - } ; - --- adjectives: - mkAdjective : (msg,fsg,mpl,fpl : Str) -> Adjective = \msg,fsg,mpl,fpl -> { - s = table { - Masc => table {Sg => msg ; Pl => mpl} ; - Fem => table {Sg => fsg ; Pl => fpl} - } - } ; - smartAdjective : Str -> Adjective = \s -> case s of { - x + "o" => mkAdjective s (x + "a") (x + "i") (x + "e") ; - x + "e" => mkAdjective s s (x + "i") (x + "i") ; - _ => mkAdjective s s s s - } ; - - mkA = overload { - mkA : Str -> Adjective = smartAdjective ; - mkA : (msg,fsg,mpl,fpl : Str) -> Adjective = mkAdjective ; - } ; - -} \ No newline at end of file diff --git a/grammar/italian/MicroResIta.gfo b/grammar/italian/MicroResIta.gfo deleted file mode 100644 index 1c93c3d91da3abf41cc5e6e2b64af2411ac8d5f8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2788 zcmZ>FGce)y%}g%J4@xceEJ}%&n?g`uFNY*tk6v_)y>T*(a%XtGSW{kO3ckoEYi;`NzBPi%+p6Q zUN1e3L6p@|UER=>g^_`UgOPzl0@-@D+-$%6(mV#nVz44Jtct)=rqT?I6>N-|V2(L% zb!L*t=Ck-F7ALbfs;gtSo;x?&F(oTCxg@hJm4UGsq|g$p(I6R92F7AexN;UoMjjq! zmXOMVR1k}wk%6&T7{zWj_tdeSpO=>y@5jQ($S*{m zdqFw{Kt5%}9Va4;Slz{loTxxvWn%@q2UR>EhXEp<%D|Y8W)LJXpcoE{D(2j5M^*+V zMoSwW2F7@BvLGiZFHMNa{c*dabyK-4p#L_av!F%X-8 zz^+5l56V3Z%((?QD59W5LV}@b#px*8A%>`@GGpcDJ5*jEk;Px|)T+gVc zg_6`b!AT8Ns34mSw*7XjB?5dPm!1V80D0ay~P4?Wj;!lgtU<$GKpx81Is}hQ>iGa2~^TR^rT`j4c(Iv va~K$lQOtmpfsDm$rTMw};L2KBn%v|mEsY*m(Cop+0y3QqWJhLRCZ_!Ww7=@e diff --git a/grammar/myproject/MicroLangEng.gf b/grammar/myproject/MicroLangEng.gf deleted file mode 100644 index 3473244..0000000 --- a/grammar/myproject/MicroLangEng.gf +++ /dev/null @@ -1,57 +0,0 @@ ---# -path=.:../abstract - -concrete MicroLangEng of MicroLang = open MicroResEng in { - -lincat - Utt = {s : Str} ; - S = {s : Str} ; - - VP = {verb : MicroResEng.V ; compl : Str} ; - - - CN = MicroResEng.N ; - AP = MicroResEng.A ; - - NP = MicroResEng.Pron ; - Pron = MicroResEng.Pron ; - - N = MicroResEng.N ; - A = MicroResEng.A ; - V = MicroResEng.V ; - V2 = MicroResEng.V2 ; - -lin - - PredVPS np vp = {s = np.s ! Nom ++ selectVerb vp.verb np.n ++ vp.compl} ; - - UseV v = {verb = v ; compl = []} ; - ComplV2 v np = {verb = v ; compl = np.s ! Acc} ; - - AdjCN ap cn = {s = \\n => ap.s ++ cn.s ! n} ; - - - UsePron p = p ; - - UseN n = n ; - PositA a = a ; - - - he_Pron = mkPron "he" "him" Sg ; - she_Pron = mkPron "she" "her" Sg ; - they_Pron = mkPron "they" "them" Pl ; - - - book_N = {s = table {Sg => "book" ; Pl => "books"}} ; - grammar_N = mkN "grammar" ; - woman_N = mkN "woman" "women" ; - child_N = mkN "child" "children" ; - boy_N = mkN "boy" ; - - big_A = mkA "big" ; - good_A = mkA "good" ; - live_V = mkV "live" ; - love_V2 = mkV2 "love" ; - - - -} \ No newline at end of file diff --git a/grammar/myproject/MicroLangEng.gfo b/grammar/myproject/MicroLangEng.gfo deleted file mode 100644 index ca13c0c07aa97cecb88ef10f8c545f4d15826107..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2247 zcmZ>FGce)t%}g%J_eso4cg;&@=7jSY7}=8ZQ!?|?8CXL@+;lA%7#JD2!LmWA#jbhj z4F39|#i>Qb`iY4}d8zs#sfo!MnR)5@$@#ejy2X`wC5aWf>7}~4IVJiziAhHK=|zdT zxrs&kxs?S)`B|ySCHi2)pcd<;r!g|{@-Z+lGBPlLtOAqFEJ=w;l?)7w%xp=CNtvm| zASQECK3Iq)DZdgTkepZql3+k*igG-7S88{hOi%W{)4Fo`93{Vb2SP&}0z*x+{$n@v`|Nr%j zV3#v8f;kL~Ob|~nGBP;^(9CRR$CNUf8P4SFM>Dfoobz)FXl6RIOKJ(t3}^IXV`OAy z1t%6^N#q>C=2x1Vlv)HyL5!@dsA))q8Jl88CdPPZS^}90(;|kHz)-X?1*hXoaG*2? z%0Nthv`cX;0Y#~_i#V2mqWnDC#auAWjAjlkp<#*(qnW#z!i;EWHtmujs5+>O_hV;d z^n(=J_;MmUJBI{HJ}u5oEGqG1gH$fyVjEOgGcqwTvnJ&eZ7dHDc4NWy6OySctgOk2 zMZ`LmiwlRTph^zOR5o@{FGce)t%}g%J_eso44=zt-=7jSY7}=8ZQ!?|?8CXL@+;lA%7#JD2!LmWA#lhvN z4F39|#i>Qb`iY4}d8zs#sfo!MnR)5@$@#ejy2X`wC5aWf>7}~4IVJiziAhHK=|zdT zxrs&kxs?S)`B|ySCHi2)pcd<;r!g{!iZL)SGBPlLtOAqFtVyX!nZ*nYjLhs{R%#xC zomd27bArVai}DgdJl2Bztn5?}iyh2@st2>7>Y;3idgi3e9FS_(q|6+MS`Z7Ol07Li z2WBoyMrmFONFf`D0Z|ENLX>iVL}6-~a}&X?WXny=%Y!Io&ON*YDt34YNKk~)k&Tgo zpOJyFn3*}aq==D$lYzCkq$u7%03^l$>yhk=m^ z5^9W$OpXCGGn?5lrHp2VGdcUw%xo6t{M-VXna=EzT0%3!8U5H88ChBRnHU(0g(Z=* zAe&!lZc=IysvvuCL27blDkNPoFs7sGa8J!kNi71I2TyPya~VXKQPn|AW@KWFN0WgW z50ZkX$#e!3-OQmSC{~DxAthfFl}y2??ql`LOG!;bq;Mt%Mo^IePvXohpmG5u#N$j^=HX>c$xo+=8#p+yx&hMaKym~hzkncXZekuy9Kp%S v0RkuqgRMNjsJO(B4b-M#gEnZ`z^xfJHc*=;FEtOPJO`Eh$T24*EFua3V}XSx diff --git a/grammar/myproject/MicroResEng.gf b/grammar/myproject/MicroResEng.gf deleted file mode 100644 index 166785a..0000000 --- a/grammar/myproject/MicroResEng.gf +++ /dev/null @@ -1,124 +0,0 @@ -resource MicroResEng = open Prelude in { - -param - Number = Sg | Pl ; - Case = Nom | Acc ; - - - Agreement = Agr Number ; ---s Person to be added - - -- all forms of normal Eng verbs, although not yet used in MiniGrammar - VForm = Inf | PresSg3 | Past | PastPart | PresPart ; - -oper - N : Type = {s : Number => Str} ; - - worstN : Str -> Str -> N = \sg,pl -> { - s = table {Sg => sg ; Pl => pl} - } ; - - regN : Str -> N = \sg -> worstN sg (sg + "s") ; - - -- smart paradigm - smartN : Str -> N = \sg -> case sg of { - _ + ("ay"|"ey"|"oy"|"uy") => regN sg ; - x + "y" => worstN sg (x + "ies") ; - _ + ("ch"|"sh"|"s"|"o") => worstN sg (sg + "es") ; - _ => regN sg - } ; - - A : Type = {s : Str} ; - - V : Type = {s : VForm => Str} ; - - mkVerb : (inf,pres,past,pastpart,prespart : Str) -> V - = \inf,pres,past,pastpart,prespart -> { - s = table { - Inf => inf ; - PresSg3 => pres ; - Past => past ; - PastPart => pastpart ; - PresPart => prespart - } - } ; - - regV : (inf : Str) -> V = \inf -> - mkVerb inf (inf + "s") (inf + "ed") (inf + "ed") (inf + "ing") ; - - -- regular verbs with predictable variations - smartV : Str -> V = \inf -> case inf of { - pl + ("a"|"e"|"i"|"o"|"u") + "y" => regV inf ; - cr + "y" => mkVerb inf (cr + "ies") (cr + "ied") (cr + "ied") (inf + "ing") ; - lov + "e" => mkVerb inf (inf + "s") (lov + "ed") (lov + "ed") (lov + "ing") ; - kis + ("s"|"sh"|"x"|"o") => mkVerb inf (inf + "es") (inf + "ed") (inf + "ed") (inf + "ing") ; - _ => regV inf - } ; - - -- normal irregular verbs e.g. drink,drank,drunk - irregV : (inf,past,pastpart : Str) -> V = - \inf,past,pastpart -> - let verb = smartV inf - in mkVerb inf (verb.s ! PresSg3) past pastpart (verb.s ! PresPart) ; - - -- two-place verb with "case" as preposition; for transitive verbs, c=[] - V2 : Type = V ** {c : Str} ; - - be_V : V = mkVerb "are" "is" "was" "been" "being" ; ---s to be generalized - - ----s a very simplified verb agreement function for Micro - agr2vform : Agreement -> VForm = \a -> case a of { - Agr Sg => PresSg3 ; - Agr Pl => Inf - } ; - - Pron : Type = {s : Case => Str ; n : Number} ; - - mkPron : Str -> Str -> Number -> Pron = \nom,acc,n -> {s = table {Nom => nom ; Acc => acc} ; n = n} ; - - selectVerb : V -> Number -> Str = \v,n -> case n of { - Sg => v.s ! PresSg3 ; - Pl => v.s ! Inf - } ; - ---------------------------- --- Paradigms part --------- ---------------------------- - -oper - mkN = overload { - mkN : Str -> N -- predictable noun, e.g. car-cars, boy-boys, fly-flies, bush-bushes - = \n -> lin N (smartN n) ; - mkN : Str -> Str -> N -- irregular noun, e.g. man-men - = \sg,pl -> lin N (worstN sg pl) ; - } ; - - mkA : Str -> A - = \s -> {s = s} ; - - mkV = overload { - mkV : (inf : Str) -> V -- predictable verb, e.g. play-plays, cry-cries, wash-washes - = \s -> lin V (smartV s) ; - mkV : (inf,pres,part : Str) -> V -- irregular verb, e.g. drink-drank-drunk - = \inf,pres,part -> lin V (irregV inf pres part) ; - } ; - - mkV2 = overload { - mkV2 : Str -> V2 -- predictable verb with direct object, e.g. "wash" - = \s -> lin V2 (smartV s ** {c = []}) ; - mkV2 : Str -> Str -> V2 -- predictable verb with preposition, e.g. "wait - for" - = \s,p -> lin V2 (smartV s ** {c = p}) ; - mkV2 : V -> V2 -- any verb with direct object, e.g. "drink" - = \v -> lin V2 (v ** {c = []}) ; - mkV2 : V -> Str -> V2 -- any verb with preposition - = \v,p -> lin V2 (v ** {c = p}) ; - } ; - --- mkAdv : Str -> Adv - -- = \s -> lin Adv {s = s} ; - --- mkPrep : Str -> Prep - -- = \s -> lin Prep {s = s} ; - - -} diff --git a/grammar/myproject/MicroResEng.gfo b/grammar/myproject/MicroResEng.gfo deleted file mode 100644 index 34d7a5e038ad6c3c88f542e78d1c1defda92352f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 917 zcmZ>FGce)y%}g%J4@xa|%}ZxuU}Q_qPsz+nXJ8EtanrS6U|?YI(+@39Eh^SeOf1Sv z)elKcOwP#6OV>}%&n?g`uFNY*tk6v_)y>T*(a%XtGSW{kO3ckoEYi=dEGWv)N=+`& zN3uXKJ&l2j#Zg_|fQ6BPg@ciSLju`;w(|U<;u1dw#tM)cBdlszic-@-Dj5A(7#Z2v zm{~$93sONWentkyVqr-X^ZZJ4lTwSAnS)D;*dS~sMn-04CZ^zY2Bv@<21X_n^-RI( zsQiE&rhpt~MrLLdVVF_D>A0krbF=+e8JHNwq92R4I;fjKu7!X(u=NZ5jdkA;zun}>&iF&=CtA%hsXc{mvuD^Q~f6hQ{k42%_Q zjKypam$EQ2@`(^{DxV0*R51}oup^jxnHZCJcvzVdD_NQHD_NOJD^WrNWSY@Mu diff --git a/grammar/myproject/MicroResSwe.gf b/grammar/myproject/MicroResSwe.gf deleted file mode 100644 index 07d2d11..0000000 --- a/grammar/myproject/MicroResSwe.gf +++ /dev/null @@ -1,36 +0,0 @@ -resource MicroResSwe = open Prelude in { - -param - Number = Sg | Pl ; - Species = Indef | Def ; - Gender = Utr | Neutr ; - -oper - N : Type = {s : Number => Species => Str ; g : Gender} ; - - worstN : Str -> Str -> Str -> Str -> Gender -> N - = \man,mannen,män,männen,g -> { - s = table { - Sg => table {Indef => man ; Def => mannen} ; - Pl => table {Indef => män ; Def => männen} - } ; - g = g - } ; --- https://en.wikipedia.org/wiki/Swedish_grammar - - decl1 : Str -> N - = \apa -> - let ap = init apa in - worstN apa (apa + "n") (ap + "or") (ap + "orna") Utr ; - - decl2 : Str -> N - = \bil -> case bil of { - pojk + "e" => worstN bil (bil + "en") (pojk + "ar") (pojk + "arna") Utr ; - _ => worstN bil (bil + "en") (bil + "ar") (bil + "arna") Utr - } ; - - - - - -} \ No newline at end of file diff --git a/grammar/myproject/MicroResSwe.gfo b/grammar/myproject/MicroResSwe.gfo deleted file mode 100644 index f15dd664120cbd185b94765ceeb0d57160f80e63..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1232 zcmZ>FGce)y%}g%J4@xZ#E>C4*U}Q_qPsz+nXJ8EtanrS6U|?YI(+@39Eh^SeOf1Sv z)elKcOwP#6OV>}%&n?g`uFNY*tk6v_)y>T*(a%XtGSW{kO3ckoEYi=dEGWv)N=+`& zN3uXKJ&l2f*(EiNnUR%M64`3@;DXfT%+z8w_tdW@KZ-CJQx|iII_og^4LRoq;JJ2i;Rl!Kel^1>`UVFxSQr^aM0pq(%*nu