From 6d458d19dcb0d86ad07c62473c0344b5f81af1d8 Mon Sep 17 00:00:00 2001 From: aarne Date: Wed, 17 Sep 2008 15:37:45 +0000 Subject: [PATCH] latin: able to parse "ego te amo" --- lib/next-resource/latin/AdjectiveLat.gf | 40 ++ lib/next-resource/latin/AdverbLat.gf | 21 + .../latin/AdverbLat.gfAdjectiveLat.gf | 21 + ...AdverbLat.gfAdjectiveLat.gfAdjectiveLat.gf | 21 + lib/next-resource/latin/AllEngAbs.gf | 9 + lib/next-resource/latin/AllLat.gf | 9 + .../latin/AllLat.gfAdjectiveLat.gf | 9 + .../AllLat.gfAdjectiveLat.gfAdjectiveLat.gf | 9 + lib/next-resource/latin/BackwardLat.gf | 76 +++ .../latin/BackwardLat.gfAdjectiveLat.gf | 76 +++ ...ckwardLat.gfAdjectiveLat.gfAdjectiveLat.gf | 76 +++ lib/next-resource/latin/CatLat.gf | 90 +++ .../latin/CatLat.gfAdjectiveLat.gf | 89 +++ .../CatLat.gfAdjectiveLat.gfAdjectiveLat.gf | 89 +++ lib/next-resource/latin/ConjunctionLat.gf | 60 ++ .../latin/ConjunctionLat.gfAdjectiveLat.gf | 60 ++ ...nctionLat.gfAdjectiveLat.gfAdjectiveLat.gf | 60 ++ lib/next-resource/latin/ExtraEngAbs.gf | 16 + lib/next-resource/latin/ExtraLat.gf | 53 ++ .../latin/ExtraLat.gfAdjectiveLat.gf | 53 ++ .../ExtraLat.gfAdjectiveLat.gfAdjectiveLat.gf | 53 ++ lib/next-resource/latin/GrammarLat.gf | 18 + .../latin/GrammarLat.gfAdjectiveLat.gf | 21 + ...rammarLat.gfAdjectiveLat.gfAdjectiveLat.gf | 21 + lib/next-resource/latin/IdiomLat.gf | 30 + .../latin/IdiomLat.gfAdjectiveLat.gf | 30 + .../IdiomLat.gfAdjectiveLat.gfAdjectiveLat.gf | 30 + lib/next-resource/latin/IrregEngAbs.gf | 176 ++++++ lib/next-resource/latin/IrregLat.gf | 181 ++++++ .../latin/IrregLat.gfAdjectiveLat.gf | 181 ++++++ .../IrregLat.gfAdjectiveLat.gfAdjectiveLat.gf | 181 ++++++ lib/next-resource/latin/LangLat.gf | 10 + .../latin/LangLat.gfAdjectiveLat.gf | 10 + .../LangLat.gfAdjectiveLat.gfAdjectiveLat.gf | 10 + lib/next-resource/latin/LexiconLat.gf | 377 ++++++++++++ .../latin/LexiconLat.gfAdjectiveLat.gf | 375 ++++++++++++ ...exiconLat.gfAdjectiveLat.gfAdjectiveLat.gf | 375 ++++++++++++ lib/next-resource/latin/MorphoLat.gf | 197 ++++++ .../latin/MorphoLat.gfAdjectiveLat.gf | 197 ++++++ ...MorphoLat.gfAdjectiveLat.gfAdjectiveLat.gf | 197 ++++++ lib/next-resource/latin/NounLat.gf | 135 ++++ .../latin/NounLat.gfAdjectiveLat.gf | 135 ++++ .../NounLat.gfAdjectiveLat.gfAdjectiveLat.gf | 135 ++++ lib/next-resource/latin/NumeralLat.gf | 95 +++ .../latin/NumeralLat.gfAdjectiveLat.gf | 95 +++ ...umeralLat.gfAdjectiveLat.gfAdjectiveLat.gf | 95 +++ lib/next-resource/latin/OverloadLat.gf | 1 + .../latin/OverloadLat.gfAdjectiveLat.gf | 1 + ...erloadLat.gfAdjectiveLat.gfAdjectiveLat.gf | 1 + lib/next-resource/latin/ParadigmsLat.gf | 56 ++ .../latin/ParadigmsLat.gfAdjectiveLat.gf | 577 ++++++++++++++++++ ...adigmsLat.gfAdjectiveLat.gfAdjectiveLat.gf | 577 ++++++++++++++++++ lib/next-resource/latin/PhraseLat.gf | 24 + .../latin/PhraseLat.gfAdjectiveLat.gf | 24 + ...PhraseLat.gfAdjectiveLat.gfAdjectiveLat.gf | 24 + lib/next-resource/latin/QuestionLat.gf | 55 ++ .../latin/QuestionLat.gfAdjectiveLat.gf | 55 ++ ...estionLat.gfAdjectiveLat.gfAdjectiveLat.gf | 55 ++ lib/next-resource/latin/RelativeLat.gf | 54 ++ .../latin/RelativeLat.gfAdjectiveLat.gf | 54 ++ ...lativeLat.gfAdjectiveLat.gfAdjectiveLat.gf | 54 ++ lib/next-resource/latin/ResLat.gf | 467 ++++++++++++++ .../latin/ResLat.gfAdjectiveLat.gf | 485 +++++++++++++++ .../ResLat.gfAdjectiveLat.gfAdjectiveLat.gf | 485 +++++++++++++++ lib/next-resource/latin/SentenceLat.gf | 67 ++ .../latin/SentenceLat.gfAdjectiveLat.gf | 67 ++ ...ntenceLat.gfAdjectiveLat.gfAdjectiveLat.gf | 67 ++ lib/next-resource/latin/StructuralLat.gf | 132 ++++ .../latin/StructuralLat.gfAdjectiveLat.gf | 131 ++++ ...cturalLat.gfAdjectiveLat.gfAdjectiveLat.gf | 131 ++++ lib/next-resource/latin/SymbolLat.gf | 37 ++ .../latin/SymbolLat.gfAdjectiveLat.gf | 37 ++ ...SymbolLat.gfAdjectiveLat.gfAdjectiveLat.gf | 37 ++ lib/next-resource/latin/VerbLat.gf | 50 ++ .../latin/VerbLat.gfAdjectiveLat.gf | 50 ++ .../VerbLat.gfAdjectiveLat.gfAdjectiveLat.gf | 50 ++ 76 files changed, 8202 insertions(+) create mode 100644 lib/next-resource/latin/AdjectiveLat.gf create mode 100644 lib/next-resource/latin/AdverbLat.gf create mode 100644 lib/next-resource/latin/AdverbLat.gfAdjectiveLat.gf create mode 100644 lib/next-resource/latin/AdverbLat.gfAdjectiveLat.gfAdjectiveLat.gf create mode 100644 lib/next-resource/latin/AllEngAbs.gf create mode 100644 lib/next-resource/latin/AllLat.gf create mode 100644 lib/next-resource/latin/AllLat.gfAdjectiveLat.gf create mode 100644 lib/next-resource/latin/AllLat.gfAdjectiveLat.gfAdjectiveLat.gf create mode 100644 lib/next-resource/latin/BackwardLat.gf create mode 100644 lib/next-resource/latin/BackwardLat.gfAdjectiveLat.gf create mode 100644 lib/next-resource/latin/BackwardLat.gfAdjectiveLat.gfAdjectiveLat.gf create mode 100644 lib/next-resource/latin/CatLat.gf create mode 100644 lib/next-resource/latin/CatLat.gfAdjectiveLat.gf create mode 100644 lib/next-resource/latin/CatLat.gfAdjectiveLat.gfAdjectiveLat.gf create mode 100644 lib/next-resource/latin/ConjunctionLat.gf create mode 100644 lib/next-resource/latin/ConjunctionLat.gfAdjectiveLat.gf create mode 100644 lib/next-resource/latin/ConjunctionLat.gfAdjectiveLat.gfAdjectiveLat.gf create mode 100644 lib/next-resource/latin/ExtraEngAbs.gf create mode 100644 lib/next-resource/latin/ExtraLat.gf create mode 100644 lib/next-resource/latin/ExtraLat.gfAdjectiveLat.gf create mode 100644 lib/next-resource/latin/ExtraLat.gfAdjectiveLat.gfAdjectiveLat.gf create mode 100644 lib/next-resource/latin/GrammarLat.gf create mode 100644 lib/next-resource/latin/GrammarLat.gfAdjectiveLat.gf create mode 100644 lib/next-resource/latin/GrammarLat.gfAdjectiveLat.gfAdjectiveLat.gf create mode 100644 lib/next-resource/latin/IdiomLat.gf create mode 100644 lib/next-resource/latin/IdiomLat.gfAdjectiveLat.gf create mode 100644 lib/next-resource/latin/IdiomLat.gfAdjectiveLat.gfAdjectiveLat.gf create mode 100644 lib/next-resource/latin/IrregEngAbs.gf create mode 100644 lib/next-resource/latin/IrregLat.gf create mode 100644 lib/next-resource/latin/IrregLat.gfAdjectiveLat.gf create mode 100644 lib/next-resource/latin/IrregLat.gfAdjectiveLat.gfAdjectiveLat.gf create mode 100644 lib/next-resource/latin/LangLat.gf create mode 100644 lib/next-resource/latin/LangLat.gfAdjectiveLat.gf create mode 100644 lib/next-resource/latin/LangLat.gfAdjectiveLat.gfAdjectiveLat.gf create mode 100644 lib/next-resource/latin/LexiconLat.gf create mode 100644 lib/next-resource/latin/LexiconLat.gfAdjectiveLat.gf create mode 100644 lib/next-resource/latin/LexiconLat.gfAdjectiveLat.gfAdjectiveLat.gf create mode 100644 lib/next-resource/latin/MorphoLat.gf create mode 100644 lib/next-resource/latin/MorphoLat.gfAdjectiveLat.gf create mode 100644 lib/next-resource/latin/MorphoLat.gfAdjectiveLat.gfAdjectiveLat.gf create mode 100644 lib/next-resource/latin/NounLat.gf create mode 100644 lib/next-resource/latin/NounLat.gfAdjectiveLat.gf create mode 100644 lib/next-resource/latin/NounLat.gfAdjectiveLat.gfAdjectiveLat.gf create mode 100644 lib/next-resource/latin/NumeralLat.gf create mode 100644 lib/next-resource/latin/NumeralLat.gfAdjectiveLat.gf create mode 100644 lib/next-resource/latin/NumeralLat.gfAdjectiveLat.gfAdjectiveLat.gf create mode 100644 lib/next-resource/latin/OverloadLat.gf create mode 100644 lib/next-resource/latin/OverloadLat.gfAdjectiveLat.gf create mode 100644 lib/next-resource/latin/OverloadLat.gfAdjectiveLat.gfAdjectiveLat.gf create mode 100644 lib/next-resource/latin/ParadigmsLat.gf create mode 100644 lib/next-resource/latin/ParadigmsLat.gfAdjectiveLat.gf create mode 100644 lib/next-resource/latin/ParadigmsLat.gfAdjectiveLat.gfAdjectiveLat.gf create mode 100644 lib/next-resource/latin/PhraseLat.gf create mode 100644 lib/next-resource/latin/PhraseLat.gfAdjectiveLat.gf create mode 100644 lib/next-resource/latin/PhraseLat.gfAdjectiveLat.gfAdjectiveLat.gf create mode 100644 lib/next-resource/latin/QuestionLat.gf create mode 100644 lib/next-resource/latin/QuestionLat.gfAdjectiveLat.gf create mode 100644 lib/next-resource/latin/QuestionLat.gfAdjectiveLat.gfAdjectiveLat.gf create mode 100644 lib/next-resource/latin/RelativeLat.gf create mode 100644 lib/next-resource/latin/RelativeLat.gfAdjectiveLat.gf create mode 100644 lib/next-resource/latin/RelativeLat.gfAdjectiveLat.gfAdjectiveLat.gf create mode 100644 lib/next-resource/latin/ResLat.gf create mode 100644 lib/next-resource/latin/ResLat.gfAdjectiveLat.gf create mode 100644 lib/next-resource/latin/ResLat.gfAdjectiveLat.gfAdjectiveLat.gf create mode 100644 lib/next-resource/latin/SentenceLat.gf create mode 100644 lib/next-resource/latin/SentenceLat.gfAdjectiveLat.gf create mode 100644 lib/next-resource/latin/SentenceLat.gfAdjectiveLat.gfAdjectiveLat.gf create mode 100644 lib/next-resource/latin/StructuralLat.gf create mode 100644 lib/next-resource/latin/StructuralLat.gfAdjectiveLat.gf create mode 100644 lib/next-resource/latin/StructuralLat.gfAdjectiveLat.gfAdjectiveLat.gf create mode 100644 lib/next-resource/latin/SymbolLat.gf create mode 100644 lib/next-resource/latin/SymbolLat.gfAdjectiveLat.gf create mode 100644 lib/next-resource/latin/SymbolLat.gfAdjectiveLat.gfAdjectiveLat.gf create mode 100644 lib/next-resource/latin/VerbLat.gf create mode 100644 lib/next-resource/latin/VerbLat.gfAdjectiveLat.gf create mode 100644 lib/next-resource/latin/VerbLat.gfAdjectiveLat.gfAdjectiveLat.gf diff --git a/lib/next-resource/latin/AdjectiveLat.gf b/lib/next-resource/latin/AdjectiveLat.gf new file mode 100644 index 000000000..c5abc2730 --- /dev/null +++ b/lib/next-resource/latin/AdjectiveLat.gf @@ -0,0 +1,40 @@ +concrete AdjectiveLat of Adjective = CatLat ** open ResLat, Prelude in { + +{- + lin + + PositA a = { + s = \\_ => a.s ! AAdj Posit ; + isPre = True + } ; + ComparA a np = { + s = \\_ => a.s ! AAdj Compar ++ "than" ++ np.s ! Nom ; + isPre = False + } ; + +-- $SuperlA$ belongs to determiner syntax in $Noun$. + + ComplA2 a np = { + s = \\_ => a.s ! AAdj Posit ++ a.c2 ++ np.s ! Acc ; + isPre = False + } ; + + ReflA2 a = { + s = \\ag => a.s ! AAdj Posit ++ a.c2 ++ reflPron ! ag ; + isPre = False + } ; + + SentAP ap sc = { + s = \\a => ap.s ! a ++ sc.s ; + isPre = False + } ; + + AdAP ada ap = { + s = \\a => ada.s ++ ap.s ! a ; + isPre = ap.isPre + } ; + + UseA2 a = a ; +-} + +} diff --git a/lib/next-resource/latin/AdverbLat.gf b/lib/next-resource/latin/AdverbLat.gf new file mode 100644 index 000000000..b7f4e5ff1 --- /dev/null +++ b/lib/next-resource/latin/AdverbLat.gf @@ -0,0 +1,21 @@ +--concrete AdverbLat of Adverb = CatLat ** open ResLat, Prelude in { +-- +-- lin +-- PositAdvAdj a = {s = a.s ! AAdv} ; +-- ComparAdvAdj cadv a np = { +-- s = cadv.s ++ a.s ! AAdv ++ "than" ++ np.s ! Nom +-- } ; +-- ComparAdvAdjS cadv a s = { +-- s = cadv.s ++ a.s ! AAdv ++ "than" ++ s.s +-- } ; +-- +-- PrepNP prep np = {s = prep.s ++ np.s ! Acc} ; +-- +-- AdAdv = cc2 ; +-- +-- SubjS = cc2 ; +-----b AdvSC s = s ; --- this rule give stack overflow in ordinary parsing +-- +-- AdnCAdv cadv = {s = cadv.s ++ "than"} ; +-- +--} diff --git a/lib/next-resource/latin/AdverbLat.gfAdjectiveLat.gf b/lib/next-resource/latin/AdverbLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..b7f4e5ff1 --- /dev/null +++ b/lib/next-resource/latin/AdverbLat.gfAdjectiveLat.gf @@ -0,0 +1,21 @@ +--concrete AdverbLat of Adverb = CatLat ** open ResLat, Prelude in { +-- +-- lin +-- PositAdvAdj a = {s = a.s ! AAdv} ; +-- ComparAdvAdj cadv a np = { +-- s = cadv.s ++ a.s ! AAdv ++ "than" ++ np.s ! Nom +-- } ; +-- ComparAdvAdjS cadv a s = { +-- s = cadv.s ++ a.s ! AAdv ++ "than" ++ s.s +-- } ; +-- +-- PrepNP prep np = {s = prep.s ++ np.s ! Acc} ; +-- +-- AdAdv = cc2 ; +-- +-- SubjS = cc2 ; +-----b AdvSC s = s ; --- this rule give stack overflow in ordinary parsing +-- +-- AdnCAdv cadv = {s = cadv.s ++ "than"} ; +-- +--} diff --git a/lib/next-resource/latin/AdverbLat.gfAdjectiveLat.gfAdjectiveLat.gf b/lib/next-resource/latin/AdverbLat.gfAdjectiveLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..5594e3546 --- /dev/null +++ b/lib/next-resource/latin/AdverbLat.gfAdjectiveLat.gfAdjectiveLat.gf @@ -0,0 +1,21 @@ +concrete AdverbLat of Adverb = CatLat ** open ResLat, Prelude in { + + lin + PositAdvAdj a = {s = a.s ! AAdv} ; + ComparAdvAdj cadv a np = { + s = cadv.s ++ a.s ! AAdv ++ "than" ++ np.s ! Nom + } ; + ComparAdvAdjS cadv a s = { + s = cadv.s ++ a.s ! AAdv ++ "than" ++ s.s + } ; + + PrepNP prep np = {s = prep.s ++ np.s ! Acc} ; + + AdAdv = cc2 ; + + SubjS = cc2 ; +---b AdvSC s = s ; --- this rule give stack overflow in ordinary parsing + + AdnCAdv cadv = {s = cadv.s ++ "than"} ; + +} diff --git a/lib/next-resource/latin/AllEngAbs.gf b/lib/next-resource/latin/AllEngAbs.gf new file mode 100644 index 000000000..687d573a5 --- /dev/null +++ b/lib/next-resource/latin/AllEngAbs.gf @@ -0,0 +1,9 @@ +--# -path=.:../abstract:../common:prelude + +abstract AllEngAbs = + Lang, + IrregEngAbs-[ + blow_V,burn_V,come_V,dig_V,fall_V,fly_V,freeze_V,go_V,lie_V,run_V, + sew_V,sing_V,sit_V,sleep_V,spit_V,stand_V,swell_V,swim_V,think_V], + ExtraEngAbs + ** {} ; diff --git a/lib/next-resource/latin/AllLat.gf b/lib/next-resource/latin/AllLat.gf new file mode 100644 index 000000000..87781114e --- /dev/null +++ b/lib/next-resource/latin/AllLat.gf @@ -0,0 +1,9 @@ +----# -path=.:../abstract:../common:prelude +-- +--concrete AllLat of AllLatAbs = +-- LangLat, +-- IrregLat-[ +-- blow_V,burn_V,come_V,dig_V,fall_V,fly_V,freeze_V,go_V,lie_V,run_V, +-- sew_V,sing_V,sit_V,sleep_V,spit_V,stand_V,swell_V,swim_V,think_V], +-- ExtraLat +-- ** {} ; diff --git a/lib/next-resource/latin/AllLat.gfAdjectiveLat.gf b/lib/next-resource/latin/AllLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..87781114e --- /dev/null +++ b/lib/next-resource/latin/AllLat.gfAdjectiveLat.gf @@ -0,0 +1,9 @@ +----# -path=.:../abstract:../common:prelude +-- +--concrete AllLat of AllLatAbs = +-- LangLat, +-- IrregLat-[ +-- blow_V,burn_V,come_V,dig_V,fall_V,fly_V,freeze_V,go_V,lie_V,run_V, +-- sew_V,sing_V,sit_V,sleep_V,spit_V,stand_V,swell_V,swim_V,think_V], +-- ExtraLat +-- ** {} ; diff --git a/lib/next-resource/latin/AllLat.gfAdjectiveLat.gfAdjectiveLat.gf b/lib/next-resource/latin/AllLat.gfAdjectiveLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..34230572a --- /dev/null +++ b/lib/next-resource/latin/AllLat.gfAdjectiveLat.gfAdjectiveLat.gf @@ -0,0 +1,9 @@ +--# -path=.:../abstract:../common:prelude + +concrete AllLat of AllLatAbs = + LangLat, + IrregLat-[ + blow_V,burn_V,come_V,dig_V,fall_V,fly_V,freeze_V,go_V,lie_V,run_V, + sew_V,sing_V,sit_V,sleep_V,spit_V,stand_V,swell_V,swim_V,think_V], + ExtraLat + ** {} ; diff --git a/lib/next-resource/latin/BackwardLat.gf b/lib/next-resource/latin/BackwardLat.gf new file mode 100644 index 000000000..6f57b8ede --- /dev/null +++ b/lib/next-resource/latin/BackwardLat.gf @@ -0,0 +1,76 @@ +--concrete BackwardLat of Backward = CatLat ** open ResLat in { +-- +-- flags optimize=all_subs ; +-- +-- lin +-- +---- A repository of obsolete constructs, needed for backward compatibility. +---- They create spurious ambiguities if used in combination with Lang. +-- +---- from Verb 19/4/2008 +-- +-- ComplV2 v np = insertObj (\\_ => v.c2 ++ np.s ! Acc) (predV v) ; +-- ComplV3 v np np2 = +-- insertObj (\\_ => v.c2 ++ np.s ! Acc ++ v.c3 ++ np2.s ! Acc) (predV v) ; +-- ComplV2V v np vp = +-- insertObj (\\a => infVP v.isAux vp a) +-- (insertObj (\\_ => v.c2 ++ np.s ! Acc) (predV v)) ; +-- ComplV2S v np s = +-- insertObj (\\_ => conjThat ++ s.s) +-- (insertObj (\\_ => v.c2 ++ np.s ! Acc) (predV v)) ; +-- ComplV2Q v np q = +-- insertObj (\\_ => q.s ! QIndir) +-- (insertObj (\\_ => v.c2 ++ np.s ! Acc) (predV v)) ; +-- ComplV2A v np ap = +-- insertObj (\\_ => v.c2 ++ np.s ! Acc ++ ap.s ! np.a) (predV v) ; +-- +-- ReflV2 v = insertObj (\\a => v.c2 ++ reflPron ! a) (predV v) ; +-- +---- from Sentence 19/4/2008 +-- +-- SlashV2 np v2 = +-- mkClause (np.s ! Nom) np.a (predV v2) ** {c2 = v2.c2} ; +-- +-- SlashVVV2 np vv v2 = +-- mkClause (np.s ! Nom) np.a +-- (insertObj (\\a => infVP vv.isAux (predV v2) a) (predVV vv)) ** +-- {c2 = v2.c2} ; +-- +---- from Noun 19/4/2008 +-- +-- NumInt n = {s = n.s ; n = Pl} ; +-- OrdInt n = {s = n.s ++ "th"} ; --- DEPRECATED +-- +-- DetSg quant ord = { +-- s = quant.s ! Sg ++ ord.s ; +-- n = Sg +-- } ; +-- +-- DetPl quant num ord = { +-- s = quant.s ! num.n ++ num.s ++ ord.s ; +-- n = num.n +-- } ; +-- +-- NoNum = {s = []; n = Pl } ; +-- +-- DefArt = {s = \\_ => artDef} ; +-- +-- IndefArt = { +-- s = table { +-- Sg => artIndef ; +-- Pl => [] +-- } +-- } ; +-- +-- MassDet = {s = \\_ => []} ; +-- +-- +-- +---- from Structural 19/4/2008 +-- +-- that_NP = regNP "that" Sg ; +-- these_NP = regNP "these" Pl ; +-- this_NP = regNP "this" Sg ; +-- those_NP = regNP "those" Pl ; +-- +--} diff --git a/lib/next-resource/latin/BackwardLat.gfAdjectiveLat.gf b/lib/next-resource/latin/BackwardLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..6f57b8ede --- /dev/null +++ b/lib/next-resource/latin/BackwardLat.gfAdjectiveLat.gf @@ -0,0 +1,76 @@ +--concrete BackwardLat of Backward = CatLat ** open ResLat in { +-- +-- flags optimize=all_subs ; +-- +-- lin +-- +---- A repository of obsolete constructs, needed for backward compatibility. +---- They create spurious ambiguities if used in combination with Lang. +-- +---- from Verb 19/4/2008 +-- +-- ComplV2 v np = insertObj (\\_ => v.c2 ++ np.s ! Acc) (predV v) ; +-- ComplV3 v np np2 = +-- insertObj (\\_ => v.c2 ++ np.s ! Acc ++ v.c3 ++ np2.s ! Acc) (predV v) ; +-- ComplV2V v np vp = +-- insertObj (\\a => infVP v.isAux vp a) +-- (insertObj (\\_ => v.c2 ++ np.s ! Acc) (predV v)) ; +-- ComplV2S v np s = +-- insertObj (\\_ => conjThat ++ s.s) +-- (insertObj (\\_ => v.c2 ++ np.s ! Acc) (predV v)) ; +-- ComplV2Q v np q = +-- insertObj (\\_ => q.s ! QIndir) +-- (insertObj (\\_ => v.c2 ++ np.s ! Acc) (predV v)) ; +-- ComplV2A v np ap = +-- insertObj (\\_ => v.c2 ++ np.s ! Acc ++ ap.s ! np.a) (predV v) ; +-- +-- ReflV2 v = insertObj (\\a => v.c2 ++ reflPron ! a) (predV v) ; +-- +---- from Sentence 19/4/2008 +-- +-- SlashV2 np v2 = +-- mkClause (np.s ! Nom) np.a (predV v2) ** {c2 = v2.c2} ; +-- +-- SlashVVV2 np vv v2 = +-- mkClause (np.s ! Nom) np.a +-- (insertObj (\\a => infVP vv.isAux (predV v2) a) (predVV vv)) ** +-- {c2 = v2.c2} ; +-- +---- from Noun 19/4/2008 +-- +-- NumInt n = {s = n.s ; n = Pl} ; +-- OrdInt n = {s = n.s ++ "th"} ; --- DEPRECATED +-- +-- DetSg quant ord = { +-- s = quant.s ! Sg ++ ord.s ; +-- n = Sg +-- } ; +-- +-- DetPl quant num ord = { +-- s = quant.s ! num.n ++ num.s ++ ord.s ; +-- n = num.n +-- } ; +-- +-- NoNum = {s = []; n = Pl } ; +-- +-- DefArt = {s = \\_ => artDef} ; +-- +-- IndefArt = { +-- s = table { +-- Sg => artIndef ; +-- Pl => [] +-- } +-- } ; +-- +-- MassDet = {s = \\_ => []} ; +-- +-- +-- +---- from Structural 19/4/2008 +-- +-- that_NP = regNP "that" Sg ; +-- these_NP = regNP "these" Pl ; +-- this_NP = regNP "this" Sg ; +-- those_NP = regNP "those" Pl ; +-- +--} diff --git a/lib/next-resource/latin/BackwardLat.gfAdjectiveLat.gfAdjectiveLat.gf b/lib/next-resource/latin/BackwardLat.gfAdjectiveLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..c722801b9 --- /dev/null +++ b/lib/next-resource/latin/BackwardLat.gfAdjectiveLat.gfAdjectiveLat.gf @@ -0,0 +1,76 @@ +concrete BackwardLat of Backward = CatLat ** open ResLat in { + + flags optimize=all_subs ; + + lin + +-- A repository of obsolete constructs, needed for backward compatibility. +-- They create spurious ambiguities if used in combination with Lang. + +-- from Verb 19/4/2008 + + ComplV2 v np = insertObj (\\_ => v.c2 ++ np.s ! Acc) (predV v) ; + ComplV3 v np np2 = + insertObj (\\_ => v.c2 ++ np.s ! Acc ++ v.c3 ++ np2.s ! Acc) (predV v) ; + ComplV2V v np vp = + insertObj (\\a => infVP v.isAux vp a) + (insertObj (\\_ => v.c2 ++ np.s ! Acc) (predV v)) ; + ComplV2S v np s = + insertObj (\\_ => conjThat ++ s.s) + (insertObj (\\_ => v.c2 ++ np.s ! Acc) (predV v)) ; + ComplV2Q v np q = + insertObj (\\_ => q.s ! QIndir) + (insertObj (\\_ => v.c2 ++ np.s ! Acc) (predV v)) ; + ComplV2A v np ap = + insertObj (\\_ => v.c2 ++ np.s ! Acc ++ ap.s ! np.a) (predV v) ; + + ReflV2 v = insertObj (\\a => v.c2 ++ reflPron ! a) (predV v) ; + +-- from Sentence 19/4/2008 + + SlashV2 np v2 = + mkClause (np.s ! Nom) np.a (predV v2) ** {c2 = v2.c2} ; + + SlashVVV2 np vv v2 = + mkClause (np.s ! Nom) np.a + (insertObj (\\a => infVP vv.isAux (predV v2) a) (predVV vv)) ** + {c2 = v2.c2} ; + +-- from Noun 19/4/2008 + + NumInt n = {s = n.s ; n = Pl} ; + OrdInt n = {s = n.s ++ "th"} ; --- DEPRECATED + + DetSg quant ord = { + s = quant.s ! Sg ++ ord.s ; + n = Sg + } ; + + DetPl quant num ord = { + s = quant.s ! num.n ++ num.s ++ ord.s ; + n = num.n + } ; + + NoNum = {s = []; n = Pl } ; + + DefArt = {s = \\_ => artDef} ; + + IndefArt = { + s = table { + Sg => artIndef ; + Pl => [] + } + } ; + + MassDet = {s = \\_ => []} ; + + + +-- from Structural 19/4/2008 + + that_NP = regNP "that" Sg ; + these_NP = regNP "these" Pl ; + this_NP = regNP "this" Sg ; + those_NP = regNP "those" Pl ; + +} diff --git a/lib/next-resource/latin/CatLat.gf b/lib/next-resource/latin/CatLat.gf new file mode 100644 index 000000000..ff3d42762 --- /dev/null +++ b/lib/next-resource/latin/CatLat.gf @@ -0,0 +1,90 @@ +concrete CatLat of Cat = CommonX ** open ResLat, Prelude in { + + flags optimize=all_subs ; + + lincat + +---- Tensed/Untensed +-- +-- S = {s : Str} ; +-- QS = {s : QForm => Str} ; +-- RS = {s : Agr => Str ; c : Case} ; -- c for it clefts +-- SSlash = {s : Str ; c2 : Str} ; +-- +---- Sentence +-- + Cl = {s : VAnter => VTense => Polarity => Str} ; +-- ClSlash = { +-- s : ResLat.Tense => Anteriority => CPolarity => Order => Str ; +-- c2 : Str +-- } ; +-- Imp = {s : CPolarity => ImpForm => Str} ; +-- +---- Question +-- +-- QCl = {s : ResLat.Tense => Anteriority => CPolarity => QForm => Str} ; +-- IP = {s : Case => Str ; n : Number} ; +-- IComp = {s : Str} ; +-- IDet = {s : Str ; n : Number} ; +-- IQuant = {s : Number => Str} ; +-- +---- Relative +-- +-- RCl = { +-- s : ResLat.Tense => Anteriority => CPolarity => Agr => Str ; +-- c : Case +-- } ; +-- RP = {s : RCase => Str ; a : RAgr} ; +-- +---- Verb +-- + VP = ResLat.VP ; + VPSlash = ResLat.VP ** {c2 : Preposition} ; +-- Comp = {s : Agr => Str} ; +-- +---- Adjective +-- +-- AP = {s : Agr => Str ; isPre : Bool} ; +-- +---- Noun +-- +-- CN = {s : Number => Case => Str ; g : Gender} ; + NP, Pron = {s : Case => Str ; g : Gender ; n : Number ; p : Person} ; +-- Det = {s,sp : Str ; n : Number} ; +-- Predet, Ord = {s : Str} ; +-- Num = {s : Str ; n : Number ; hasCard : Bool} ; +-- Card = {s : Str ; n : Number} ; +-- Quant = {s,sp : Bool => Number => Str} ; +-- +---- Numeral +-- +-- Numeral = {s : CardOrd => Str ; n : Number} ; +-- Digits = {s : CardOrd => Str ; n : Number ; tail : DTail} ; +-- +---- Structural +-- +-- Conj = {s1,s2 : Str ; n : Number} ; +-----b Conj = {s : Str ; n : Number} ; +-----b DConj = {s1,s2 : Str ; n : Number} ; +-- Subj = {s : Str} ; +-- Prep = {s : Str} ; +-- +---- Open lexical classes, e.g. Lexicon + + V = Verb ; + V2 = Verb ** {c : Preposition} ; +-- V, VS, VQ, VA = Verb ; -- = {s : VForm => Str} ; +-- V2, V2A, V2Q, V2S = Verb ** {c2 : Str} ; +-- V3 = Verb ** {c2, c3 : Str} ; +-- VV = {s : VVForm => Str ; isAux : Bool} ; +-- V2V = Verb ** {c2 : Str ; isAux : Bool} ; +-- + A = Adjective ; +-- A2 = {s : AForm => Str ; c2 : Str} ; +-- + N = Noun ; +-- N2 = {s : Number => Case => Str ; g : Gender} ** {c2 : Str} ; +-- N3 = {s : Number => Case => Str ; g : Gender} ** {c2,c3 : Str} ; +-- PN = {s : Case => Str ; g : Gender} ; +-- +} diff --git a/lib/next-resource/latin/CatLat.gfAdjectiveLat.gf b/lib/next-resource/latin/CatLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..2810412b1 --- /dev/null +++ b/lib/next-resource/latin/CatLat.gfAdjectiveLat.gf @@ -0,0 +1,89 @@ +--concrete CatLat of Cat = CommonX ** open ResLat, Prelude in { +-- +-- flags optimize=all_subs ; +-- +-- lincat +-- +---- Tensed/Untensed +-- +-- S = {s : Str} ; +-- QS = {s : QForm => Str} ; +-- RS = {s : Agr => Str ; c : Case} ; -- c for it clefts +-- SSlash = {s : Str ; c2 : Str} ; +-- +---- Sentence +-- +-- Cl = {s : ResLat.Tense => Anteriority => CPolarity => Order => Str} ; +-- ClSlash = { +-- s : ResLat.Tense => Anteriority => CPolarity => Order => Str ; +-- c2 : Str +-- } ; +-- Imp = {s : CPolarity => ImpForm => Str} ; +-- +---- Question +-- +-- QCl = {s : ResLat.Tense => Anteriority => CPolarity => QForm => Str} ; +-- IP = {s : Case => Str ; n : Number} ; +-- IComp = {s : Str} ; +-- IDet = {s : Str ; n : Number} ; +-- IQuant = {s : Number => Str} ; +-- +---- Relative +-- +-- RCl = { +-- s : ResLat.Tense => Anteriority => CPolarity => Agr => Str ; +-- c : Case +-- } ; +-- RP = {s : RCase => Str ; a : RAgr} ; +-- +---- Verb +-- +-- VP = ResLat.VP ; +-- VPSlash = ResLat.VP ** {c2 : Str} ; +-- Comp = {s : Agr => Str} ; +-- +---- Adjective +-- +-- AP = {s : Agr => Str ; isPre : Bool} ; +-- +---- Noun +-- +-- CN = {s : Number => Case => Str ; g : Gender} ; +-- NP = {s : Case => Str ; a : Agr} ; +-- Pron = {s : Case => Str ; sp : Str ; a : Agr} ; +-- Det = {s,sp : Str ; n : Number} ; +-- Predet, Ord = {s : Str} ; +-- Num = {s : Str ; n : Number ; hasCard : Bool} ; +-- Card = {s : Str ; n : Number} ; +-- Quant = {s,sp : Bool => Number => Str} ; +-- +---- Numeral +-- +-- Numeral = {s : CardOrd => Str ; n : Number} ; +-- Digits = {s : CardOrd => Str ; n : Number ; tail : DTail} ; +-- +---- Structural +-- +-- Conj = {s1,s2 : Str ; n : Number} ; +-----b Conj = {s : Str ; n : Number} ; +-----b DConj = {s1,s2 : Str ; n : Number} ; +-- Subj = {s : Str} ; +-- Prep = {s : Str} ; +-- +---- Open lexical classes, e.g. Lexicon +-- +-- V, VS, VQ, VA = Verb ; -- = {s : VForm => Str} ; +-- V2, V2A, V2Q, V2S = Verb ** {c2 : Str} ; +-- V3 = Verb ** {c2, c3 : Str} ; +-- VV = {s : VVForm => Str ; isAux : Bool} ; +-- V2V = Verb ** {c2 : Str ; isAux : Bool} ; +-- +-- A = {s : AForm => Str} ; +-- A2 = {s : AForm => Str ; c2 : Str} ; +-- +-- N = {s : Number => Case => Str ; g : Gender} ; +-- N2 = {s : Number => Case => Str ; g : Gender} ** {c2 : Str} ; +-- N3 = {s : Number => Case => Str ; g : Gender} ** {c2,c3 : Str} ; +-- PN = {s : Case => Str ; g : Gender} ; +-- +--} diff --git a/lib/next-resource/latin/CatLat.gfAdjectiveLat.gfAdjectiveLat.gf b/lib/next-resource/latin/CatLat.gfAdjectiveLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..fe6ecb86e --- /dev/null +++ b/lib/next-resource/latin/CatLat.gfAdjectiveLat.gfAdjectiveLat.gf @@ -0,0 +1,89 @@ +concrete CatLat of Cat = CommonX ** open ResLat, Prelude in { + + flags optimize=all_subs ; + + lincat + +-- Tensed/Untensed + + S = {s : Str} ; + QS = {s : QForm => Str} ; + RS = {s : Agr => Str ; c : Case} ; -- c for it clefts + SSlash = {s : Str ; c2 : Str} ; + +-- Sentence + + Cl = {s : ResLat.Tense => Anteriority => CPolarity => Order => Str} ; + ClSlash = { + s : ResLat.Tense => Anteriority => CPolarity => Order => Str ; + c2 : Str + } ; + Imp = {s : CPolarity => ImpForm => Str} ; + +-- Question + + QCl = {s : ResLat.Tense => Anteriority => CPolarity => QForm => Str} ; + IP = {s : Case => Str ; n : Number} ; + IComp = {s : Str} ; + IDet = {s : Str ; n : Number} ; + IQuant = {s : Number => Str} ; + +-- Relative + + RCl = { + s : ResLat.Tense => Anteriority => CPolarity => Agr => Str ; + c : Case + } ; + RP = {s : RCase => Str ; a : RAgr} ; + +-- Verb + + VP = ResLat.VP ; + VPSlash = ResLat.VP ** {c2 : Str} ; + Comp = {s : Agr => Str} ; + +-- Adjective + + AP = {s : Agr => Str ; isPre : Bool} ; + +-- Noun + + CN = {s : Number => Case => Str ; g : Gender} ; + NP = {s : Case => Str ; a : Agr} ; + Pron = {s : Case => Str ; sp : Str ; a : Agr} ; + Det = {s,sp : Str ; n : Number} ; + Predet, Ord = {s : Str} ; + Num = {s : Str ; n : Number ; hasCard : Bool} ; + Card = {s : Str ; n : Number} ; + Quant = {s,sp : Bool => Number => Str} ; + +-- Numeral + + Numeral = {s : CardOrd => Str ; n : Number} ; + Digits = {s : CardOrd => Str ; n : Number ; tail : DTail} ; + +-- Structural + + Conj = {s1,s2 : Str ; n : Number} ; +---b Conj = {s : Str ; n : Number} ; +---b DConj = {s1,s2 : Str ; n : Number} ; + Subj = {s : Str} ; + Prep = {s : Str} ; + +-- Open lexical classes, e.g. Lexicon + + V, VS, VQ, VA = Verb ; -- = {s : VForm => Str} ; + V2, V2A, V2Q, V2S = Verb ** {c2 : Str} ; + V3 = Verb ** {c2, c3 : Str} ; + VV = {s : VVForm => Str ; isAux : Bool} ; + V2V = Verb ** {c2 : Str ; isAux : Bool} ; + + A = {s : AForm => Str} ; + A2 = {s : AForm => Str ; c2 : Str} ; + + N = {s : Number => Case => Str ; g : Gender} ; + N2 = {s : Number => Case => Str ; g : Gender} ** {c2 : Str} ; + N3 = {s : Number => Case => Str ; g : Gender} ** {c2,c3 : Str} ; + PN = {s : Case => Str ; g : Gender} ; + +} diff --git a/lib/next-resource/latin/ConjunctionLat.gf b/lib/next-resource/latin/ConjunctionLat.gf new file mode 100644 index 000000000..a857eef25 --- /dev/null +++ b/lib/next-resource/latin/ConjunctionLat.gf @@ -0,0 +1,60 @@ +--concrete ConjunctionLat of Conjunction = +-- CatLat ** open ResLat, Coordination, Prelude in { +-- +-- flags optimize=all_subs ; +-- +-- lin +-- +-- ConjS = conjunctDistrSS ; +-- +-- ConjAdv = conjunctDistrSS ; +-- +-- ConjNP conj ss = conjunctDistrTable Case conj ss ** { +-- a = conjAgr (agrP3 conj.n) ss.a +-- } ; +-- +-- ConjAP conj ss = conjunctDistrTable Agr conj ss ** { +-- isPre = ss.isPre +-- } ; +-- +--{---b +-- +-- ConjS = conjunctSS ; +-- DConjS = conjunctDistrSS ; +-- +-- ConjAdv = conjunctSS ; +-- DConjAdv = conjunctDistrSS ; +-- +-- ConjNP conj ss = conjunctTable Case conj ss ** { +-- a = conjAgr (agrP3 conj.n) ss.a +-- } ; +-- DConjNP conj ss = conjunctDistrTable Case conj ss ** { +-- a = conjAgr (agrP3 conj.n) ss.a +-- } ; +-- +-- ConjAP conj ss = conjunctTable Agr conj ss ** { +-- isPre = ss.isPre +-- } ; +-- DConjAP conj ss = conjunctDistrTable Agr conj ss ** { +-- isPre = ss.isPre +-- } ; +---} +-- +---- These fun's are generated from the list cat's. +-- +-- BaseS = twoSS ; +-- ConsS = consrSS comma ; +-- BaseAdv = twoSS ; +-- ConsAdv = consrSS comma ; +-- BaseNP x y = twoTable Case x y ** {a = conjAgr x.a y.a} ; +-- ConsNP xs x = consrTable Case comma xs x ** {a = conjAgr xs.a x.a} ; +-- BaseAP x y = twoTable Agr x y ** {isPre = andB x.isPre y.isPre} ; +-- ConsAP xs x = consrTable Agr comma xs x ** {isPre = andB xs.isPre x.isPre} ; +-- +-- lincat +-- [S] = {s1,s2 : Str} ; +-- [Adv] = {s1,s2 : Str} ; +-- [NP] = {s1,s2 : Case => Str ; a : Agr} ; +-- [AP] = {s1,s2 : Agr => Str ; isPre : Bool} ; +-- +--} diff --git a/lib/next-resource/latin/ConjunctionLat.gfAdjectiveLat.gf b/lib/next-resource/latin/ConjunctionLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..a857eef25 --- /dev/null +++ b/lib/next-resource/latin/ConjunctionLat.gfAdjectiveLat.gf @@ -0,0 +1,60 @@ +--concrete ConjunctionLat of Conjunction = +-- CatLat ** open ResLat, Coordination, Prelude in { +-- +-- flags optimize=all_subs ; +-- +-- lin +-- +-- ConjS = conjunctDistrSS ; +-- +-- ConjAdv = conjunctDistrSS ; +-- +-- ConjNP conj ss = conjunctDistrTable Case conj ss ** { +-- a = conjAgr (agrP3 conj.n) ss.a +-- } ; +-- +-- ConjAP conj ss = conjunctDistrTable Agr conj ss ** { +-- isPre = ss.isPre +-- } ; +-- +--{---b +-- +-- ConjS = conjunctSS ; +-- DConjS = conjunctDistrSS ; +-- +-- ConjAdv = conjunctSS ; +-- DConjAdv = conjunctDistrSS ; +-- +-- ConjNP conj ss = conjunctTable Case conj ss ** { +-- a = conjAgr (agrP3 conj.n) ss.a +-- } ; +-- DConjNP conj ss = conjunctDistrTable Case conj ss ** { +-- a = conjAgr (agrP3 conj.n) ss.a +-- } ; +-- +-- ConjAP conj ss = conjunctTable Agr conj ss ** { +-- isPre = ss.isPre +-- } ; +-- DConjAP conj ss = conjunctDistrTable Agr conj ss ** { +-- isPre = ss.isPre +-- } ; +---} +-- +---- These fun's are generated from the list cat's. +-- +-- BaseS = twoSS ; +-- ConsS = consrSS comma ; +-- BaseAdv = twoSS ; +-- ConsAdv = consrSS comma ; +-- BaseNP x y = twoTable Case x y ** {a = conjAgr x.a y.a} ; +-- ConsNP xs x = consrTable Case comma xs x ** {a = conjAgr xs.a x.a} ; +-- BaseAP x y = twoTable Agr x y ** {isPre = andB x.isPre y.isPre} ; +-- ConsAP xs x = consrTable Agr comma xs x ** {isPre = andB xs.isPre x.isPre} ; +-- +-- lincat +-- [S] = {s1,s2 : Str} ; +-- [Adv] = {s1,s2 : Str} ; +-- [NP] = {s1,s2 : Case => Str ; a : Agr} ; +-- [AP] = {s1,s2 : Agr => Str ; isPre : Bool} ; +-- +--} diff --git a/lib/next-resource/latin/ConjunctionLat.gfAdjectiveLat.gfAdjectiveLat.gf b/lib/next-resource/latin/ConjunctionLat.gfAdjectiveLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..eac686916 --- /dev/null +++ b/lib/next-resource/latin/ConjunctionLat.gfAdjectiveLat.gfAdjectiveLat.gf @@ -0,0 +1,60 @@ +concrete ConjunctionLat of Conjunction = + CatLat ** open ResLat, Coordination, Prelude in { + + flags optimize=all_subs ; + + lin + + ConjS = conjunctDistrSS ; + + ConjAdv = conjunctDistrSS ; + + ConjNP conj ss = conjunctDistrTable Case conj ss ** { + a = conjAgr (agrP3 conj.n) ss.a + } ; + + ConjAP conj ss = conjunctDistrTable Agr conj ss ** { + isPre = ss.isPre + } ; + +{---b + + ConjS = conjunctSS ; + DConjS = conjunctDistrSS ; + + ConjAdv = conjunctSS ; + DConjAdv = conjunctDistrSS ; + + ConjNP conj ss = conjunctTable Case conj ss ** { + a = conjAgr (agrP3 conj.n) ss.a + } ; + DConjNP conj ss = conjunctDistrTable Case conj ss ** { + a = conjAgr (agrP3 conj.n) ss.a + } ; + + ConjAP conj ss = conjunctTable Agr conj ss ** { + isPre = ss.isPre + } ; + DConjAP conj ss = conjunctDistrTable Agr conj ss ** { + isPre = ss.isPre + } ; +-} + +-- These fun's are generated from the list cat's. + + BaseS = twoSS ; + ConsS = consrSS comma ; + BaseAdv = twoSS ; + ConsAdv = consrSS comma ; + BaseNP x y = twoTable Case x y ** {a = conjAgr x.a y.a} ; + ConsNP xs x = consrTable Case comma xs x ** {a = conjAgr xs.a x.a} ; + BaseAP x y = twoTable Agr x y ** {isPre = andB x.isPre y.isPre} ; + ConsAP xs x = consrTable Agr comma xs x ** {isPre = andB xs.isPre x.isPre} ; + + lincat + [S] = {s1,s2 : Str} ; + [Adv] = {s1,s2 : Str} ; + [NP] = {s1,s2 : Case => Str ; a : Agr} ; + [AP] = {s1,s2 : Agr => Str ; isPre : Bool} ; + +} diff --git a/lib/next-resource/latin/ExtraEngAbs.gf b/lib/next-resource/latin/ExtraEngAbs.gf new file mode 100644 index 000000000..9ee849627 --- /dev/null +++ b/lib/next-resource/latin/ExtraEngAbs.gf @@ -0,0 +1,16 @@ +abstract ExtraEngAbs = Extra ** { + +-- uncontracted negations; contracted are the default + fun + UncNegCl : Tense -> Ant -> Cl -> S ; + UncNegQCl : Tense -> Ant -> QCl -> QS ; + UncNegRCl : Tense -> Ant -> RCl -> RS ; + + UncNegImpSg : Imp -> Utt; -- do not help yourself + UncNegImpPl : Imp -> Utt; -- do not help yourselves + +-- freely compounded nouns + + CompoundCN : CN -> CN -> CN ; -- rock album + +} diff --git a/lib/next-resource/latin/ExtraLat.gf b/lib/next-resource/latin/ExtraLat.gf new file mode 100644 index 000000000..5fc660221 --- /dev/null +++ b/lib/next-resource/latin/ExtraLat.gf @@ -0,0 +1,53 @@ +--concrete ExtraLat of ExtraLatAbs = CatLat ** +-- open ResLat, Coordination, Prelude in { +-- +-- lin +-- GenNP np = {s,sp = \\_,_ => np.s ! Gen} ; +-- ComplBareVS v s = insertObj (\\_ => s.s) (predV v) ; +-- +-- StrandRelSlash rp slash = { +-- s = \\t,a,p,ag => +-- rp.s ! RC (fromAgr ag).g Acc ++ slash.s ! t ! a ! p ! ODir ++ slash.c2 ; +-- c = Acc +-- } ; +-- EmptyRelSlash rp slash = { +-- s = \\t,a,p,_ => slash.s ! t ! a ! p ! ODir ++ slash.c2 ; +-- c = Acc +-- } ; +-- +-- StrandQuestSlash ip slash = +-- {s = \\t,a,b,q => +-- (mkQuestion (ss (ip.s ! Acc)) slash).s ! t ! a ! b ! q ++ slash.c2 +-- }; +-- +-- lincat +-- VPI = {s : VPIForm => Agr => Str} ; +-- [VPI] = {s1,s2 : VPIForm => Agr => Str} ; +-- +-- lin +-- BaseVPI = twoTable2 VPIForm Agr ; +-- ConsVPI = consrTable2 VPIForm Agr comma ; +-- +-- MkVPI vp = { +-- s = \\v,a => vp.ad ++ vp.inf ++ vp.s2 ! a +-- } ; +-- ConjVPI = conjunctDistrTable2 VPIForm Agr ; +-- ComplVPIVV vv vpi = +-- insertObj (\\a => (if_then_Str vv.isAux [] "to") ++ vpi.s ! VPIInf ! a) (predVV vv) ; +-- +-- UncNegCl t a cl = {s = t.s ++ a.s ++ cl.s ! t.t ! a.a ! neg ! ODir} ; +-- UncNegQCl t a cl = {s = \\q => t.s ++ a.s ++ cl.s ! t.t ! a.a ! neg !q} ; +-- UncNegRCl t a cl = { +-- s = \\r => t.s ++ a.s ++ cl.s ! t.t ! a.a ! neg ! r ; +-- c = cl.c +-- } ; +-- UncNegImpSg imp = {s = imp.s ! neg ! ImpF Sg False} ; +-- UncNegImpPl imp = {s = imp.s ! neg ! ImpF Pl False} ; +-- +-- CompoundCN a b = {s = \\n,c => a.s ! Sg ! Nom ++ b.s ! n ! c ; g = b.g} ; +-- +-- +-- oper +-- neg = CNeg False ; +-- +--} diff --git a/lib/next-resource/latin/ExtraLat.gfAdjectiveLat.gf b/lib/next-resource/latin/ExtraLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..5fc660221 --- /dev/null +++ b/lib/next-resource/latin/ExtraLat.gfAdjectiveLat.gf @@ -0,0 +1,53 @@ +--concrete ExtraLat of ExtraLatAbs = CatLat ** +-- open ResLat, Coordination, Prelude in { +-- +-- lin +-- GenNP np = {s,sp = \\_,_ => np.s ! Gen} ; +-- ComplBareVS v s = insertObj (\\_ => s.s) (predV v) ; +-- +-- StrandRelSlash rp slash = { +-- s = \\t,a,p,ag => +-- rp.s ! RC (fromAgr ag).g Acc ++ slash.s ! t ! a ! p ! ODir ++ slash.c2 ; +-- c = Acc +-- } ; +-- EmptyRelSlash rp slash = { +-- s = \\t,a,p,_ => slash.s ! t ! a ! p ! ODir ++ slash.c2 ; +-- c = Acc +-- } ; +-- +-- StrandQuestSlash ip slash = +-- {s = \\t,a,b,q => +-- (mkQuestion (ss (ip.s ! Acc)) slash).s ! t ! a ! b ! q ++ slash.c2 +-- }; +-- +-- lincat +-- VPI = {s : VPIForm => Agr => Str} ; +-- [VPI] = {s1,s2 : VPIForm => Agr => Str} ; +-- +-- lin +-- BaseVPI = twoTable2 VPIForm Agr ; +-- ConsVPI = consrTable2 VPIForm Agr comma ; +-- +-- MkVPI vp = { +-- s = \\v,a => vp.ad ++ vp.inf ++ vp.s2 ! a +-- } ; +-- ConjVPI = conjunctDistrTable2 VPIForm Agr ; +-- ComplVPIVV vv vpi = +-- insertObj (\\a => (if_then_Str vv.isAux [] "to") ++ vpi.s ! VPIInf ! a) (predVV vv) ; +-- +-- UncNegCl t a cl = {s = t.s ++ a.s ++ cl.s ! t.t ! a.a ! neg ! ODir} ; +-- UncNegQCl t a cl = {s = \\q => t.s ++ a.s ++ cl.s ! t.t ! a.a ! neg !q} ; +-- UncNegRCl t a cl = { +-- s = \\r => t.s ++ a.s ++ cl.s ! t.t ! a.a ! neg ! r ; +-- c = cl.c +-- } ; +-- UncNegImpSg imp = {s = imp.s ! neg ! ImpF Sg False} ; +-- UncNegImpPl imp = {s = imp.s ! neg ! ImpF Pl False} ; +-- +-- CompoundCN a b = {s = \\n,c => a.s ! Sg ! Nom ++ b.s ! n ! c ; g = b.g} ; +-- +-- +-- oper +-- neg = CNeg False ; +-- +--} diff --git a/lib/next-resource/latin/ExtraLat.gfAdjectiveLat.gfAdjectiveLat.gf b/lib/next-resource/latin/ExtraLat.gfAdjectiveLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..b381da60f --- /dev/null +++ b/lib/next-resource/latin/ExtraLat.gfAdjectiveLat.gfAdjectiveLat.gf @@ -0,0 +1,53 @@ +concrete ExtraLat of ExtraLatAbs = CatLat ** + open ResLat, Coordination, Prelude in { + + lin + GenNP np = {s,sp = \\_,_ => np.s ! Gen} ; + ComplBareVS v s = insertObj (\\_ => s.s) (predV v) ; + + StrandRelSlash rp slash = { + s = \\t,a,p,ag => + rp.s ! RC (fromAgr ag).g Acc ++ slash.s ! t ! a ! p ! ODir ++ slash.c2 ; + c = Acc + } ; + EmptyRelSlash rp slash = { + s = \\t,a,p,_ => slash.s ! t ! a ! p ! ODir ++ slash.c2 ; + c = Acc + } ; + + StrandQuestSlash ip slash = + {s = \\t,a,b,q => + (mkQuestion (ss (ip.s ! Acc)) slash).s ! t ! a ! b ! q ++ slash.c2 + }; + + lincat + VPI = {s : VPIForm => Agr => Str} ; + [VPI] = {s1,s2 : VPIForm => Agr => Str} ; + + lin + BaseVPI = twoTable2 VPIForm Agr ; + ConsVPI = consrTable2 VPIForm Agr comma ; + + MkVPI vp = { + s = \\v,a => vp.ad ++ vp.inf ++ vp.s2 ! a + } ; + ConjVPI = conjunctDistrTable2 VPIForm Agr ; + ComplVPIVV vv vpi = + insertObj (\\a => (if_then_Str vv.isAux [] "to") ++ vpi.s ! VPIInf ! a) (predVV vv) ; + + UncNegCl t a cl = {s = t.s ++ a.s ++ cl.s ! t.t ! a.a ! neg ! ODir} ; + UncNegQCl t a cl = {s = \\q => t.s ++ a.s ++ cl.s ! t.t ! a.a ! neg !q} ; + UncNegRCl t a cl = { + s = \\r => t.s ++ a.s ++ cl.s ! t.t ! a.a ! neg ! r ; + c = cl.c + } ; + UncNegImpSg imp = {s = imp.s ! neg ! ImpF Sg False} ; + UncNegImpPl imp = {s = imp.s ! neg ! ImpF Pl False} ; + + CompoundCN a b = {s = \\n,c => a.s ! Sg ! Nom ++ b.s ! n ! c ; g = b.g} ; + + + oper + neg = CNeg False ; + +} diff --git a/lib/next-resource/latin/GrammarLat.gf b/lib/next-resource/latin/GrammarLat.gf new file mode 100644 index 000000000..6218ee331 --- /dev/null +++ b/lib/next-resource/latin/GrammarLat.gf @@ -0,0 +1,18 @@ +--# -path=.:../abstract:../common:prelude + +concrete GrammarLat of Grammar = + NounLat, + VerbLat, + AdjectiveLat, +-- AdverbLat, +-- NumeralLat, + SentenceLat, +-- QuestionLat, +-- RelativeLat, +-- ConjunctionLat, +-- PhraseLat, + TextX, + StructuralLat, +-- IdiomLat + ** { +} ; diff --git a/lib/next-resource/latin/GrammarLat.gfAdjectiveLat.gf b/lib/next-resource/latin/GrammarLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..4112146c2 --- /dev/null +++ b/lib/next-resource/latin/GrammarLat.gfAdjectiveLat.gf @@ -0,0 +1,21 @@ +----# -path=.:../abstract:../common:prelude +-- +--concrete GrammarLat of Grammar = +-- NounLat, +-- VerbLat, +-- AdjectiveLat, +-- AdverbLat, +-- NumeralLat, +-- SentenceLat, +-- QuestionLat, +-- RelativeLat, +-- ConjunctionLat, +-- PhraseLat, +-- TextX, +-- StructuralLat, +-- IdiomLat +-- ** { +-- +--flags startcat = Phr ; unlexer = text ; lexer = text ; +-- +--} ; diff --git a/lib/next-resource/latin/GrammarLat.gfAdjectiveLat.gfAdjectiveLat.gf b/lib/next-resource/latin/GrammarLat.gfAdjectiveLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..46c4d2efe --- /dev/null +++ b/lib/next-resource/latin/GrammarLat.gfAdjectiveLat.gfAdjectiveLat.gf @@ -0,0 +1,21 @@ +--# -path=.:../abstract:../common:prelude + +concrete GrammarLat of Grammar = + NounLat, + VerbLat, + AdjectiveLat, + AdverbLat, + NumeralLat, + SentenceLat, + QuestionLat, + RelativeLat, + ConjunctionLat, + PhraseLat, + TextX, + StructuralLat, + IdiomLat + ** { + +flags startcat = Phr ; unlexer = text ; lexer = text ; + +} ; diff --git a/lib/next-resource/latin/IdiomLat.gf b/lib/next-resource/latin/IdiomLat.gf new file mode 100644 index 000000000..b8adec832 --- /dev/null +++ b/lib/next-resource/latin/IdiomLat.gf @@ -0,0 +1,30 @@ +--concrete IdiomLat of Idiom = CatLat ** open Prelude, ResLat in { +-- +-- flags optimize=all_subs ; +-- +-- lin +-- ImpersCl vp = mkClause "it" (agrP3 Sg) vp ; +-- GenericCl vp = mkClause "one" (agrP3 Sg) vp ; +-- +-- CleftNP np rs = mkClause "it" (agrP3 Sg) +-- (insertObj (\\_ => rs.s ! np.a) +-- (insertObj (\\_ => np.s ! rs.c) (predAux auxBe))) ; +-- +-- CleftAdv ad s = mkClause "it" (agrP3 Sg) +-- (insertObj (\\_ => conjThat ++ s.s) +-- (insertObj (\\_ => ad.s) (predAux auxBe))) ; +-- +-- ExistNP np = +-- mkClause "there" (agrP3 (fromAgr np.a).n) +-- (insertObj (\\_ => np.s ! Acc) (predAux auxBe)) ; +-- +-- ExistIP ip = +-- mkQuestion (ss (ip.s ! Nom)) +-- (mkClause "there" (agrP3 ip.n) (predAux auxBe)) ; +-- +-- ProgrVP vp = insertObj (\\a => vp.ad ++ vp.prp ++ vp.s2 ! a) (predAux auxBe) ; +-- +-- ImpPl1 vp = {s = "let's" ++ infVP True vp (AgP1 Pl)} ; +-- +--} +-- diff --git a/lib/next-resource/latin/IdiomLat.gfAdjectiveLat.gf b/lib/next-resource/latin/IdiomLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..b8adec832 --- /dev/null +++ b/lib/next-resource/latin/IdiomLat.gfAdjectiveLat.gf @@ -0,0 +1,30 @@ +--concrete IdiomLat of Idiom = CatLat ** open Prelude, ResLat in { +-- +-- flags optimize=all_subs ; +-- +-- lin +-- ImpersCl vp = mkClause "it" (agrP3 Sg) vp ; +-- GenericCl vp = mkClause "one" (agrP3 Sg) vp ; +-- +-- CleftNP np rs = mkClause "it" (agrP3 Sg) +-- (insertObj (\\_ => rs.s ! np.a) +-- (insertObj (\\_ => np.s ! rs.c) (predAux auxBe))) ; +-- +-- CleftAdv ad s = mkClause "it" (agrP3 Sg) +-- (insertObj (\\_ => conjThat ++ s.s) +-- (insertObj (\\_ => ad.s) (predAux auxBe))) ; +-- +-- ExistNP np = +-- mkClause "there" (agrP3 (fromAgr np.a).n) +-- (insertObj (\\_ => np.s ! Acc) (predAux auxBe)) ; +-- +-- ExistIP ip = +-- mkQuestion (ss (ip.s ! Nom)) +-- (mkClause "there" (agrP3 ip.n) (predAux auxBe)) ; +-- +-- ProgrVP vp = insertObj (\\a => vp.ad ++ vp.prp ++ vp.s2 ! a) (predAux auxBe) ; +-- +-- ImpPl1 vp = {s = "let's" ++ infVP True vp (AgP1 Pl)} ; +-- +--} +-- diff --git a/lib/next-resource/latin/IdiomLat.gfAdjectiveLat.gfAdjectiveLat.gf b/lib/next-resource/latin/IdiomLat.gfAdjectiveLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..a4f1cd39a --- /dev/null +++ b/lib/next-resource/latin/IdiomLat.gfAdjectiveLat.gfAdjectiveLat.gf @@ -0,0 +1,30 @@ +concrete IdiomLat of Idiom = CatLat ** open Prelude, ResLat in { + + flags optimize=all_subs ; + + lin + ImpersCl vp = mkClause "it" (agrP3 Sg) vp ; + GenericCl vp = mkClause "one" (agrP3 Sg) vp ; + + CleftNP np rs = mkClause "it" (agrP3 Sg) + (insertObj (\\_ => rs.s ! np.a) + (insertObj (\\_ => np.s ! rs.c) (predAux auxBe))) ; + + CleftAdv ad s = mkClause "it" (agrP3 Sg) + (insertObj (\\_ => conjThat ++ s.s) + (insertObj (\\_ => ad.s) (predAux auxBe))) ; + + ExistNP np = + mkClause "there" (agrP3 (fromAgr np.a).n) + (insertObj (\\_ => np.s ! Acc) (predAux auxBe)) ; + + ExistIP ip = + mkQuestion (ss (ip.s ! Nom)) + (mkClause "there" (agrP3 ip.n) (predAux auxBe)) ; + + ProgrVP vp = insertObj (\\a => vp.ad ++ vp.prp ++ vp.s2 ! a) (predAux auxBe) ; + + ImpPl1 vp = {s = "let's" ++ infVP True vp (AgP1 Pl)} ; + +} + diff --git a/lib/next-resource/latin/IrregEngAbs.gf b/lib/next-resource/latin/IrregEngAbs.gf new file mode 100644 index 000000000..103fe3278 --- /dev/null +++ b/lib/next-resource/latin/IrregEngAbs.gf @@ -0,0 +1,176 @@ +abstract IrregEngAbs = Cat ** { +fun + awake_V : V ; + bear_V : V ; + beat_V : V ; + become_V : V ; + begin_V : V ; + bend_V : V ; + beset_V : V ; + bet_V : V ; + bid_V : V ; + bind_V : V ; + bite_V : V ; + bleed_V : V ; + blow_V : V ; + break_V : V ; + breed_V : V ; + bring_V : V ; + broadcast_V : V ; + build_V : V ; + burn_V : V ; + burst_V : V ; + buy_V : V ; + cast_V : V ; + catch_V : V ; + choose_V : V ; + cling_V : V ; + come_V : V ; + cost_V : V ; + creep_V : V ; + cut_V : V ; + deal_V : V ; + dig_V : V ; + dive_V : V ; + do_V : V ; + draw_V : V ; + dream_V : V ; + drive_V : V ; + drink_V : V ; + eat_V : V ; + fall_V : V ; + feed_V : V ; + feel_V : V ; + fight_V : V ; + find_V : V ; + fit_V : V ; + flee_V : V ; + fling_V : V ; + fly_V : V ; + forbid_V : V ; + forget_V : V ; + forgive_V : V ; + forsake_V : V ; + freeze_V : V ; + get_V : V ; + give_V : V ; + go_V : V ; + grind_V : V ; + grow_V : V ; + hang_V : V ; + have_V : V ; + hear_V : V ; + hide_V : V ; + hit_V : V ; + hold_V : V ; + hurt_V : V ; + keep_V : V ; + kneel_V : V ; + knit_V : V ; + know_V : V ; + lay_V : V ; + lead_V : V ; + leap_V : V ; + learn_V : V ; + leave_V : V ; + lend_V : V ; + let_V : V ; + lie_V : V ; + light_V : V ; + lose_V : V ; + make_V : V ; + mean_V : V ; + meet_V : V ; + misspell_V : V ; + mistake_V : V ; + mow_V : V ; + overcome_V : V ; + overdo_V : V ; + overtake_V : V ; + overthrow_V : V ; + pay_V : V ; + plead_V : V ; + prove_V : V ; + put_V : V ; + quit_V : V ; + read_V : V ; + rid_V : V ; + ride_V : V ; + ring_V : V ; + rise_V : V ; + run_V : V ; + saw_V : V ; + say_V : V ; + see_V : V ; + seek_V : V ; + sell_V : V ; + send_V : V ; + set_V : V ; + sew_V : V ; + shake_V : V ; + shave_V : V ; + shear_V : V ; + shed_V : V ; + shine_V : V ; + shoe_V : V ; + shoot_V : V ; + show_V : V ; + shrink_V : V ; + shut_V : V ; + sing_V : V ; + sink_V : V ; + sit_V : V ; + sleep_V : V ; + slay_V : V ; + slide_V : V ; + sling_V : V ; + slit_V : V ; + smite_V : V ; + sow_V : V ; + speak_V : V ; + speed_V : V ; + spend_V : V ; + spill_V : V ; + spin_V : V ; + spit_V : V ; + split_V : V ; + spread_V : V ; + spring_V : V ; + stand_V : V ; + steal_V : V ; + stick_V : V ; + sting_V : V ; + stink_V : V ; + stride_V : V ; + strike_V : V ; + string_V : V ; + strive_V : V ; + swear_V : V ; + sweep_V : V ; + swell_V : V ; + swim_V : V ; + swing_V : V ; + take_V : V ; + teach_V : V ; + tear_V : V ; + tell_V : V ; + think_V : V ; + thrive_V : V ; + throw_V : V ; + thrust_V : V ; + tread_V : V ; + understand_V : V ; + uphold_V : V ; + upset_V : V ; + wake_V : V ; + wear_V : V ; + weave_V : V ; + wed_V : V ; + weep_V : V ; + wind_V : V ; + win_V : V ; + withhold_V : V ; + withstand_V : V ; + wring_V : V ; + write_V : V ; +} diff --git a/lib/next-resource/latin/IrregLat.gf b/lib/next-resource/latin/IrregLat.gf new file mode 100644 index 000000000..20657f086 --- /dev/null +++ b/lib/next-resource/latin/IrregLat.gf @@ -0,0 +1,181 @@ +----# -path=.:prelude:../abstract:../common +-- +--concrete IrregLat of IrregLatAbs = CatLat ** open ParadigmsLat in { +-- +--flags optimize=values ; +-- +-- lin +-- awake_V = irregV "awake" "awoke" "awoken" ; +-- bear_V = irregV "bear" "bore" "born" ; +-- beat_V = irregV "beat" "beat" "beat" ; +-- become_V = irregV "become" "became" "become" ; +-- begin_V = irregV "begin" "began" "begun" ; +-- bend_V = irregV "bend" "bent" "bent" ; +-- beset_V = irregV "beset" "beset" "beset" ; +-- bet_V = irregDuplV "bet" "bet" "bet" ; +-- bid_V = irregDuplV "bid" (variants {"bid" ; "bade"}) (variants {"bid" ; "bidden"}) ; +-- bind_V = irregV "bind" "bound" "bound" ; +-- bite_V = irregV "bite" "bit" "bitten" ; +-- bleed_V = irregV "bleed" "bled" "bled" ; +-- blow_V = irregV "blow" "blew" "blown" ; +-- break_V = irregV "break" "broke" "broken" ; +-- breed_V = irregV "breed" "bred" "bred" ; +-- bring_V = irregV "bring" "brought" "brought" ; +-- broadcast_V = irregV "broadcast" "broadcast" "broadcast" ; +-- build_V = irregV "build" "built" "built" ; +-- burn_V = irregV "burn" (variants {"burned" ; "burnt"}) (variants {"burned" ; "burnt"}) ; +-- burst_V = irregV "burst" "burst" "burst" ; +-- buy_V = irregV "buy" "bought" "bought" ; +-- cast_V = irregV "cast" "cast" "cast" ; +-- catch_V = irregV "catch" "caught" "caught" ; +-- choose_V = irregV "choose" "chose" "chosen" ; +-- cling_V = irregV "cling" "clung" "clung" ; +-- come_V = irregV "come" "came" "come" ; +-- cost_V = irregV "cost" "cost" "cost" ; +-- creep_V = irregV "creep" "crept" "crept" ; +-- cut_V = irregDuplV "cut" "cut" "cut" ; +-- deal_V = irregV "deal" "dealt" "dealt" ; +-- dig_V = irregDuplV "dig" "dug" "dug" ; +-- dive_V = irregV "dive" (variants {"dived" ; "dove"}) "dived" ; +-- do_V = mk5V "do" "does" "did" "done" "doing" ; +-- draw_V = irregV "draw" "drew" "drawn" ; +-- dream_V = irregV "dream" (variants {"dreamed" ; "dreamt"}) (variants {"dreamed" ; "dreamt"}) ; +-- drive_V = irregV "drive" "drove" "driven" ; +-- drink_V = irregV "drink" "drank" "drunk" ; +-- eat_V = irregV "eat" "ate" "eaten" ; +-- fall_V = irregV "fall" "fell" "fallen" ; +-- feed_V = irregV "feed" "fed" "fed" ; +-- feel_V = irregV "feel" "felt" "felt" ; +-- fight_V = irregV "fight" "fought" "fought" ; +-- find_V = irregV "find" "found" "found" ; +-- fit_V = irregDuplV "fit" "fit" "fit" ; +-- flee_V = irregV "flee" "fled" "fled" ; +-- fling_V = irregV "fling" "flung" "flung" ; +-- fly_V = irregV "fly" "flew" "flown" ; +-- forbid_V = irregDuplV "forbid" "forbade" "forbidden" ; +-- forget_V = irregDuplV "forget" "forgot" "forgotten" ; +-- forgive_V = irregV "forgive" "forgave" "forgiven" ; +-- forsake_V = irregV "forsake" "forsook" "forsaken" ; +-- freeze_V = irregV "freeze" "froze" "frozen" ; +-- get_V = irregDuplV "get" "got" "gotten" ; +-- give_V = irregV "give" "gave" "given" ; +-- go_V = mk5V "go" "goes" "went" "gone" "going" ; +-- grind_V = irregV "grind" "ground" "ground" ; +-- grow_V = irregV "grow" "grew" "grown" ; +-- hang_V = irregV "hang" "hung" "hung" ; +-- have_V = mk5V "have" "has" "had" "had" "having" ; +-- hear_V = irregV "hear" "heard" "heard" ; +-- hide_V = irregV "hide" "hid" "hidden" ; +-- hit_V = irregDuplV "hit" "hit" "hit" ; +-- hold_V = irregV "hold" "held" "held" ; +-- hurt_V = irregV "hurt" "hurt" "hurt" ; +-- keep_V = irregV "keep" "kept" "kept" ; +-- kneel_V = irregV "kneel" "knelt" "knelt" ; +-- knit_V = irregDuplV "knit" "knit" "knit" ; +-- know_V = irregV "know" "knew" "know" ; +-- lay_V = irregV "lay" "laid" "laid" ; +-- lead_V = irregV "lead" "led" "led" ; +-- leap_V = irregV "leap" (variants {"leaped" ; "lept"}) (variants {"leaped" ; "lept"}) ; +-- learn_V = irregV "learn" (variants {"learned" ; "learnt"}) (variants {"learned" ; "learnt"}) ; +-- leave_V = irregV "leave" "left" "left" ; +-- lend_V = irregV "lend" "lent" "lent" ; +-- let_V = irregDuplV "let" "let" "let" ; +-- lie_V = irregV "lie" "lay" "lain" ; +-- light_V = irregV "light" (variants {"lighted" ; "lit"}) "lighted" ; +-- lose_V = irregV "lose" "lost" "lost" ; +-- make_V = irregV "make" "made" "made" ; +-- mean_V = irregV "mean" "meant" "meant" ; +-- meet_V = irregV "meet" "met" "met" ; +-- misspell_V = irregV "misspell" (variants {"misspelled" ; "misspelt"}) (variants {"misspelled" ; "misspelt"}) ; +-- mistake_V = irregV "mistake" "mistook" "mistaken" ; +-- mow_V = irregV "mow" "mowed" (variants {"mowed" ; "mown"}) ; +-- overcome_V = irregV "overcome" "overcame" "overcome" ; +-- overdo_V = mk5V "overdo" "overdoes" "overdid" "overdone" "overdoing" ; +-- overtake_V = irregV "overtake" "overtook" "overtaken" ; +-- overthrow_V = irregV "overthrow" "overthrew" "overthrown" ; +-- pay_V = irregV "pay" "paid" "paid" ; +-- plead_V = irregV "plead" "pled" "pled" ; +-- prove_V = irregV "prove" "proved" (variants {"proved" ; "proven"}) ; +-- put_V = irregDuplV "put" "put" "put" ; +-- quit_V = irregDuplV "quit" "quit" "quit" ; +-- read_V = irregV "read" "read" "read" ; +-- rid_V = irregDuplV "rid" "rid" "rid" ; +-- ride_V = irregV "ride" "rode" "ridden" ; +-- ring_V = irregV "ring" "rang" "rung" ; +-- rise_V = irregV "rise" "rose" "risen" ; +-- run_V = irregDuplV "run" "ran" "run" ; +-- saw_V = irregV "saw" "sawed" (variants {"sawed" ; "sawn"}) ; +-- say_V = irregV "say" "said" "said" ; +-- see_V = irregV "see" "saw" "seen" ; +-- seek_V = irregV "seek" "sought" "sought" ; +-- sell_V = irregV "sell" "sold" "sold" ; +-- send_V = irregV "send" "sent" "sent" ; +-- set_V = irregDuplV "set" "set" "set" ; +-- sew_V = irregV "sew" "sewed" (variants {"sewed" ; "sewn"}) ; +-- shake_V = irregV "shake" "shook" "shaken" ; +-- shave_V = irregV "shave" "shaved" (variants {"shaved" ; "shaven"}) ; +-- shear_V = irregV "shear" "shore" "shorn" ; +-- shed_V = irregDuplV "shed" "shed" "shed" ; +-- shine_V = irregV "shine" "shone" "shone" ; +-- shoe_V = irregV "shoe" "shoed" (variants {"shoed" ; "shod"}) ; +-- shoot_V = irregV "shoot" "shot" "shot" ; +-- show_V = irregV "show" "showed" (variants {"showed" ; "shown"}) ; +-- shrink_V = irregV "shrink" "shrank" "shrunk" ; +-- shut_V = irregDuplV "shut" "shut" "shut" ; +-- sing_V = irregV "sing" "sang" "sung" ; +-- sink_V = irregV "sink" "sank" "sunk" ; +-- sit_V = irregDuplV "sit" "sat" "sat" ; +-- sleep_V = irregV "sleep" "slept" "slept" ; +-- slay_V = irregV "slay" "slew" "slain" ; +-- slide_V = irregV "slide" "slid" "slid" ; +-- sling_V = irregV "sling" "slung" "slung" ; +-- slit_V = irregDuplV "slit" "slit" "slit" ; +-- smite_V = irregV "smite" "smote" "smitten" ; +-- sow_V = irregV "sow" "sowed" (variants {"sowed" ; "sown"}) ; +-- speak_V = irregV "speak" "spoke" "spoken" ; +-- speed_V = irregV "speed" "sped" "sped" ; +-- spend_V = irregV "spend" "spent" "spent" ; +-- spill_V = irregV "spill" (variants {"spilled" ; "spilt"}) (variants {"spilled" ; "spilt"}) ; +-- spin_V = irregDuplV "spin" "spun" "spun" ; +-- spit_V = irregDuplV "spit" (variants {"spit" ; "spat"}) "spit" ; +-- split_V = irregDuplV "split" "split" "split" ; +-- spread_V = irregV "spread" "spread" "spread" ; +-- spring_V = irregV "spring" (variants {"sprang" ; "sprung"}) "sprung" ; +-- stand_V = irregV "stand" "stood" "stood" ; +-- steal_V = irregV "steal" "stole" "stolen" ; +-- stick_V = irregV "stick" "stuck" "stuck" ; +-- sting_V = irregV "sting" "stung" "stung" ; +-- stink_V = irregV "stink" "stank" "stunk" ; +-- stride_V = irregV "stride" "strod" "stridden" ; +-- strike_V = irregV "strike" "struck" "struck" ; +-- string_V = irregV "string" "strung" "strung" ; +-- strive_V = irregV "strive" "strove" "striven" ; +-- swear_V = irregV "swear" "swore" "sworn" ; +-- sweep_V = irregV "sweep" "swept" "swept" ; +-- swell_V = irregV "swell" "swelled" (variants {"swelled" ; "swollen"}) ; +-- swim_V = irregDuplV "swim" "swam" "swum" ; +-- swing_V = irregV "swing" "swung" "swung" ; +-- take_V = irregV "take" "took" "taken" ; +-- teach_V = irregV "teach" "taught" "taught" ; +-- tear_V = irregV "tear" "tore" "torn" ; +-- tell_V = irregV "tell" "told" "told" ; +-- think_V = irregV "think" "thought" "thought" ; +-- thrive_V = irregV "thrive" (variants {"thrived" ; "throve"}) "thrived" ; +-- throw_V = irregV "throw" "threw" "thrown" ; +-- thrust_V = irregV "thrust" "thrust" "thrust" ; +-- tread_V = irregV "tread" "trod" "trodden" ; +-- understand_V = irregV "understand" "understood" "understood" ; +-- uphold_V = irregV "uphold" "upheld" "upheld" ; +-- upset_V = irregDuplV "upset" "upset" "upset" ; +-- wake_V = irregV "wake" "woke" "woken" ; +-- wear_V = irregV "wear" "wore" "worn" ; +-- weave_V = irregV "weave" (variants {"weaved" ; "wove"}) (variants {"weaved" ; "woven"}) ; +-- wed_V = irregDuplV "wed" "wed" "wed" ; +-- weep_V = irregV "weep" "wept" "wept" ; +-- wind_V = irregV "wind" "wound" "wound" ; +-- win_V = irregDuplV "win" "won" "won" ; +-- withhold_V = irregV "withhold" "withheld" "withheld" ; +-- withstand_V = irregV "withstand" "withstood" "withstood" ; +-- wring_V = irregV "wring" "wrung" "wrung" ; +-- write_V = irregV "write" "wrote" "written" ; +--} diff --git a/lib/next-resource/latin/IrregLat.gfAdjectiveLat.gf b/lib/next-resource/latin/IrregLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..20657f086 --- /dev/null +++ b/lib/next-resource/latin/IrregLat.gfAdjectiveLat.gf @@ -0,0 +1,181 @@ +----# -path=.:prelude:../abstract:../common +-- +--concrete IrregLat of IrregLatAbs = CatLat ** open ParadigmsLat in { +-- +--flags optimize=values ; +-- +-- lin +-- awake_V = irregV "awake" "awoke" "awoken" ; +-- bear_V = irregV "bear" "bore" "born" ; +-- beat_V = irregV "beat" "beat" "beat" ; +-- become_V = irregV "become" "became" "become" ; +-- begin_V = irregV "begin" "began" "begun" ; +-- bend_V = irregV "bend" "bent" "bent" ; +-- beset_V = irregV "beset" "beset" "beset" ; +-- bet_V = irregDuplV "bet" "bet" "bet" ; +-- bid_V = irregDuplV "bid" (variants {"bid" ; "bade"}) (variants {"bid" ; "bidden"}) ; +-- bind_V = irregV "bind" "bound" "bound" ; +-- bite_V = irregV "bite" "bit" "bitten" ; +-- bleed_V = irregV "bleed" "bled" "bled" ; +-- blow_V = irregV "blow" "blew" "blown" ; +-- break_V = irregV "break" "broke" "broken" ; +-- breed_V = irregV "breed" "bred" "bred" ; +-- bring_V = irregV "bring" "brought" "brought" ; +-- broadcast_V = irregV "broadcast" "broadcast" "broadcast" ; +-- build_V = irregV "build" "built" "built" ; +-- burn_V = irregV "burn" (variants {"burned" ; "burnt"}) (variants {"burned" ; "burnt"}) ; +-- burst_V = irregV "burst" "burst" "burst" ; +-- buy_V = irregV "buy" "bought" "bought" ; +-- cast_V = irregV "cast" "cast" "cast" ; +-- catch_V = irregV "catch" "caught" "caught" ; +-- choose_V = irregV "choose" "chose" "chosen" ; +-- cling_V = irregV "cling" "clung" "clung" ; +-- come_V = irregV "come" "came" "come" ; +-- cost_V = irregV "cost" "cost" "cost" ; +-- creep_V = irregV "creep" "crept" "crept" ; +-- cut_V = irregDuplV "cut" "cut" "cut" ; +-- deal_V = irregV "deal" "dealt" "dealt" ; +-- dig_V = irregDuplV "dig" "dug" "dug" ; +-- dive_V = irregV "dive" (variants {"dived" ; "dove"}) "dived" ; +-- do_V = mk5V "do" "does" "did" "done" "doing" ; +-- draw_V = irregV "draw" "drew" "drawn" ; +-- dream_V = irregV "dream" (variants {"dreamed" ; "dreamt"}) (variants {"dreamed" ; "dreamt"}) ; +-- drive_V = irregV "drive" "drove" "driven" ; +-- drink_V = irregV "drink" "drank" "drunk" ; +-- eat_V = irregV "eat" "ate" "eaten" ; +-- fall_V = irregV "fall" "fell" "fallen" ; +-- feed_V = irregV "feed" "fed" "fed" ; +-- feel_V = irregV "feel" "felt" "felt" ; +-- fight_V = irregV "fight" "fought" "fought" ; +-- find_V = irregV "find" "found" "found" ; +-- fit_V = irregDuplV "fit" "fit" "fit" ; +-- flee_V = irregV "flee" "fled" "fled" ; +-- fling_V = irregV "fling" "flung" "flung" ; +-- fly_V = irregV "fly" "flew" "flown" ; +-- forbid_V = irregDuplV "forbid" "forbade" "forbidden" ; +-- forget_V = irregDuplV "forget" "forgot" "forgotten" ; +-- forgive_V = irregV "forgive" "forgave" "forgiven" ; +-- forsake_V = irregV "forsake" "forsook" "forsaken" ; +-- freeze_V = irregV "freeze" "froze" "frozen" ; +-- get_V = irregDuplV "get" "got" "gotten" ; +-- give_V = irregV "give" "gave" "given" ; +-- go_V = mk5V "go" "goes" "went" "gone" "going" ; +-- grind_V = irregV "grind" "ground" "ground" ; +-- grow_V = irregV "grow" "grew" "grown" ; +-- hang_V = irregV "hang" "hung" "hung" ; +-- have_V = mk5V "have" "has" "had" "had" "having" ; +-- hear_V = irregV "hear" "heard" "heard" ; +-- hide_V = irregV "hide" "hid" "hidden" ; +-- hit_V = irregDuplV "hit" "hit" "hit" ; +-- hold_V = irregV "hold" "held" "held" ; +-- hurt_V = irregV "hurt" "hurt" "hurt" ; +-- keep_V = irregV "keep" "kept" "kept" ; +-- kneel_V = irregV "kneel" "knelt" "knelt" ; +-- knit_V = irregDuplV "knit" "knit" "knit" ; +-- know_V = irregV "know" "knew" "know" ; +-- lay_V = irregV "lay" "laid" "laid" ; +-- lead_V = irregV "lead" "led" "led" ; +-- leap_V = irregV "leap" (variants {"leaped" ; "lept"}) (variants {"leaped" ; "lept"}) ; +-- learn_V = irregV "learn" (variants {"learned" ; "learnt"}) (variants {"learned" ; "learnt"}) ; +-- leave_V = irregV "leave" "left" "left" ; +-- lend_V = irregV "lend" "lent" "lent" ; +-- let_V = irregDuplV "let" "let" "let" ; +-- lie_V = irregV "lie" "lay" "lain" ; +-- light_V = irregV "light" (variants {"lighted" ; "lit"}) "lighted" ; +-- lose_V = irregV "lose" "lost" "lost" ; +-- make_V = irregV "make" "made" "made" ; +-- mean_V = irregV "mean" "meant" "meant" ; +-- meet_V = irregV "meet" "met" "met" ; +-- misspell_V = irregV "misspell" (variants {"misspelled" ; "misspelt"}) (variants {"misspelled" ; "misspelt"}) ; +-- mistake_V = irregV "mistake" "mistook" "mistaken" ; +-- mow_V = irregV "mow" "mowed" (variants {"mowed" ; "mown"}) ; +-- overcome_V = irregV "overcome" "overcame" "overcome" ; +-- overdo_V = mk5V "overdo" "overdoes" "overdid" "overdone" "overdoing" ; +-- overtake_V = irregV "overtake" "overtook" "overtaken" ; +-- overthrow_V = irregV "overthrow" "overthrew" "overthrown" ; +-- pay_V = irregV "pay" "paid" "paid" ; +-- plead_V = irregV "plead" "pled" "pled" ; +-- prove_V = irregV "prove" "proved" (variants {"proved" ; "proven"}) ; +-- put_V = irregDuplV "put" "put" "put" ; +-- quit_V = irregDuplV "quit" "quit" "quit" ; +-- read_V = irregV "read" "read" "read" ; +-- rid_V = irregDuplV "rid" "rid" "rid" ; +-- ride_V = irregV "ride" "rode" "ridden" ; +-- ring_V = irregV "ring" "rang" "rung" ; +-- rise_V = irregV "rise" "rose" "risen" ; +-- run_V = irregDuplV "run" "ran" "run" ; +-- saw_V = irregV "saw" "sawed" (variants {"sawed" ; "sawn"}) ; +-- say_V = irregV "say" "said" "said" ; +-- see_V = irregV "see" "saw" "seen" ; +-- seek_V = irregV "seek" "sought" "sought" ; +-- sell_V = irregV "sell" "sold" "sold" ; +-- send_V = irregV "send" "sent" "sent" ; +-- set_V = irregDuplV "set" "set" "set" ; +-- sew_V = irregV "sew" "sewed" (variants {"sewed" ; "sewn"}) ; +-- shake_V = irregV "shake" "shook" "shaken" ; +-- shave_V = irregV "shave" "shaved" (variants {"shaved" ; "shaven"}) ; +-- shear_V = irregV "shear" "shore" "shorn" ; +-- shed_V = irregDuplV "shed" "shed" "shed" ; +-- shine_V = irregV "shine" "shone" "shone" ; +-- shoe_V = irregV "shoe" "shoed" (variants {"shoed" ; "shod"}) ; +-- shoot_V = irregV "shoot" "shot" "shot" ; +-- show_V = irregV "show" "showed" (variants {"showed" ; "shown"}) ; +-- shrink_V = irregV "shrink" "shrank" "shrunk" ; +-- shut_V = irregDuplV "shut" "shut" "shut" ; +-- sing_V = irregV "sing" "sang" "sung" ; +-- sink_V = irregV "sink" "sank" "sunk" ; +-- sit_V = irregDuplV "sit" "sat" "sat" ; +-- sleep_V = irregV "sleep" "slept" "slept" ; +-- slay_V = irregV "slay" "slew" "slain" ; +-- slide_V = irregV "slide" "slid" "slid" ; +-- sling_V = irregV "sling" "slung" "slung" ; +-- slit_V = irregDuplV "slit" "slit" "slit" ; +-- smite_V = irregV "smite" "smote" "smitten" ; +-- sow_V = irregV "sow" "sowed" (variants {"sowed" ; "sown"}) ; +-- speak_V = irregV "speak" "spoke" "spoken" ; +-- speed_V = irregV "speed" "sped" "sped" ; +-- spend_V = irregV "spend" "spent" "spent" ; +-- spill_V = irregV "spill" (variants {"spilled" ; "spilt"}) (variants {"spilled" ; "spilt"}) ; +-- spin_V = irregDuplV "spin" "spun" "spun" ; +-- spit_V = irregDuplV "spit" (variants {"spit" ; "spat"}) "spit" ; +-- split_V = irregDuplV "split" "split" "split" ; +-- spread_V = irregV "spread" "spread" "spread" ; +-- spring_V = irregV "spring" (variants {"sprang" ; "sprung"}) "sprung" ; +-- stand_V = irregV "stand" "stood" "stood" ; +-- steal_V = irregV "steal" "stole" "stolen" ; +-- stick_V = irregV "stick" "stuck" "stuck" ; +-- sting_V = irregV "sting" "stung" "stung" ; +-- stink_V = irregV "stink" "stank" "stunk" ; +-- stride_V = irregV "stride" "strod" "stridden" ; +-- strike_V = irregV "strike" "struck" "struck" ; +-- string_V = irregV "string" "strung" "strung" ; +-- strive_V = irregV "strive" "strove" "striven" ; +-- swear_V = irregV "swear" "swore" "sworn" ; +-- sweep_V = irregV "sweep" "swept" "swept" ; +-- swell_V = irregV "swell" "swelled" (variants {"swelled" ; "swollen"}) ; +-- swim_V = irregDuplV "swim" "swam" "swum" ; +-- swing_V = irregV "swing" "swung" "swung" ; +-- take_V = irregV "take" "took" "taken" ; +-- teach_V = irregV "teach" "taught" "taught" ; +-- tear_V = irregV "tear" "tore" "torn" ; +-- tell_V = irregV "tell" "told" "told" ; +-- think_V = irregV "think" "thought" "thought" ; +-- thrive_V = irregV "thrive" (variants {"thrived" ; "throve"}) "thrived" ; +-- throw_V = irregV "throw" "threw" "thrown" ; +-- thrust_V = irregV "thrust" "thrust" "thrust" ; +-- tread_V = irregV "tread" "trod" "trodden" ; +-- understand_V = irregV "understand" "understood" "understood" ; +-- uphold_V = irregV "uphold" "upheld" "upheld" ; +-- upset_V = irregDuplV "upset" "upset" "upset" ; +-- wake_V = irregV "wake" "woke" "woken" ; +-- wear_V = irregV "wear" "wore" "worn" ; +-- weave_V = irregV "weave" (variants {"weaved" ; "wove"}) (variants {"weaved" ; "woven"}) ; +-- wed_V = irregDuplV "wed" "wed" "wed" ; +-- weep_V = irregV "weep" "wept" "wept" ; +-- wind_V = irregV "wind" "wound" "wound" ; +-- win_V = irregDuplV "win" "won" "won" ; +-- withhold_V = irregV "withhold" "withheld" "withheld" ; +-- withstand_V = irregV "withstand" "withstood" "withstood" ; +-- wring_V = irregV "wring" "wrung" "wrung" ; +-- write_V = irregV "write" "wrote" "written" ; +--} diff --git a/lib/next-resource/latin/IrregLat.gfAdjectiveLat.gfAdjectiveLat.gf b/lib/next-resource/latin/IrregLat.gfAdjectiveLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..64cb5e77c --- /dev/null +++ b/lib/next-resource/latin/IrregLat.gfAdjectiveLat.gfAdjectiveLat.gf @@ -0,0 +1,181 @@ +--# -path=.:prelude:../abstract:../common + +concrete IrregLat of IrregLatAbs = CatLat ** open ParadigmsLat in { + +flags optimize=values ; + + lin + awake_V = irregV "awake" "awoke" "awoken" ; + bear_V = irregV "bear" "bore" "born" ; + beat_V = irregV "beat" "beat" "beat" ; + become_V = irregV "become" "became" "become" ; + begin_V = irregV "begin" "began" "begun" ; + bend_V = irregV "bend" "bent" "bent" ; + beset_V = irregV "beset" "beset" "beset" ; + bet_V = irregDuplV "bet" "bet" "bet" ; + bid_V = irregDuplV "bid" (variants {"bid" ; "bade"}) (variants {"bid" ; "bidden"}) ; + bind_V = irregV "bind" "bound" "bound" ; + bite_V = irregV "bite" "bit" "bitten" ; + bleed_V = irregV "bleed" "bled" "bled" ; + blow_V = irregV "blow" "blew" "blown" ; + break_V = irregV "break" "broke" "broken" ; + breed_V = irregV "breed" "bred" "bred" ; + bring_V = irregV "bring" "brought" "brought" ; + broadcast_V = irregV "broadcast" "broadcast" "broadcast" ; + build_V = irregV "build" "built" "built" ; + burn_V = irregV "burn" (variants {"burned" ; "burnt"}) (variants {"burned" ; "burnt"}) ; + burst_V = irregV "burst" "burst" "burst" ; + buy_V = irregV "buy" "bought" "bought" ; + cast_V = irregV "cast" "cast" "cast" ; + catch_V = irregV "catch" "caught" "caught" ; + choose_V = irregV "choose" "chose" "chosen" ; + cling_V = irregV "cling" "clung" "clung" ; + come_V = irregV "come" "came" "come" ; + cost_V = irregV "cost" "cost" "cost" ; + creep_V = irregV "creep" "crept" "crept" ; + cut_V = irregDuplV "cut" "cut" "cut" ; + deal_V = irregV "deal" "dealt" "dealt" ; + dig_V = irregDuplV "dig" "dug" "dug" ; + dive_V = irregV "dive" (variants {"dived" ; "dove"}) "dived" ; + do_V = mk5V "do" "does" "did" "done" "doing" ; + draw_V = irregV "draw" "drew" "drawn" ; + dream_V = irregV "dream" (variants {"dreamed" ; "dreamt"}) (variants {"dreamed" ; "dreamt"}) ; + drive_V = irregV "drive" "drove" "driven" ; + drink_V = irregV "drink" "drank" "drunk" ; + eat_V = irregV "eat" "ate" "eaten" ; + fall_V = irregV "fall" "fell" "fallen" ; + feed_V = irregV "feed" "fed" "fed" ; + feel_V = irregV "feel" "felt" "felt" ; + fight_V = irregV "fight" "fought" "fought" ; + find_V = irregV "find" "found" "found" ; + fit_V = irregDuplV "fit" "fit" "fit" ; + flee_V = irregV "flee" "fled" "fled" ; + fling_V = irregV "fling" "flung" "flung" ; + fly_V = irregV "fly" "flew" "flown" ; + forbid_V = irregDuplV "forbid" "forbade" "forbidden" ; + forget_V = irregDuplV "forget" "forgot" "forgotten" ; + forgive_V = irregV "forgive" "forgave" "forgiven" ; + forsake_V = irregV "forsake" "forsook" "forsaken" ; + freeze_V = irregV "freeze" "froze" "frozen" ; + get_V = irregDuplV "get" "got" "gotten" ; + give_V = irregV "give" "gave" "given" ; + go_V = mk5V "go" "goes" "went" "gone" "going" ; + grind_V = irregV "grind" "ground" "ground" ; + grow_V = irregV "grow" "grew" "grown" ; + hang_V = irregV "hang" "hung" "hung" ; + have_V = mk5V "have" "has" "had" "had" "having" ; + hear_V = irregV "hear" "heard" "heard" ; + hide_V = irregV "hide" "hid" "hidden" ; + hit_V = irregDuplV "hit" "hit" "hit" ; + hold_V = irregV "hold" "held" "held" ; + hurt_V = irregV "hurt" "hurt" "hurt" ; + keep_V = irregV "keep" "kept" "kept" ; + kneel_V = irregV "kneel" "knelt" "knelt" ; + knit_V = irregDuplV "knit" "knit" "knit" ; + know_V = irregV "know" "knew" "know" ; + lay_V = irregV "lay" "laid" "laid" ; + lead_V = irregV "lead" "led" "led" ; + leap_V = irregV "leap" (variants {"leaped" ; "lept"}) (variants {"leaped" ; "lept"}) ; + learn_V = irregV "learn" (variants {"learned" ; "learnt"}) (variants {"learned" ; "learnt"}) ; + leave_V = irregV "leave" "left" "left" ; + lend_V = irregV "lend" "lent" "lent" ; + let_V = irregDuplV "let" "let" "let" ; + lie_V = irregV "lie" "lay" "lain" ; + light_V = irregV "light" (variants {"lighted" ; "lit"}) "lighted" ; + lose_V = irregV "lose" "lost" "lost" ; + make_V = irregV "make" "made" "made" ; + mean_V = irregV "mean" "meant" "meant" ; + meet_V = irregV "meet" "met" "met" ; + misspell_V = irregV "misspell" (variants {"misspelled" ; "misspelt"}) (variants {"misspelled" ; "misspelt"}) ; + mistake_V = irregV "mistake" "mistook" "mistaken" ; + mow_V = irregV "mow" "mowed" (variants {"mowed" ; "mown"}) ; + overcome_V = irregV "overcome" "overcame" "overcome" ; + overdo_V = mk5V "overdo" "overdoes" "overdid" "overdone" "overdoing" ; + overtake_V = irregV "overtake" "overtook" "overtaken" ; + overthrow_V = irregV "overthrow" "overthrew" "overthrown" ; + pay_V = irregV "pay" "paid" "paid" ; + plead_V = irregV "plead" "pled" "pled" ; + prove_V = irregV "prove" "proved" (variants {"proved" ; "proven"}) ; + put_V = irregDuplV "put" "put" "put" ; + quit_V = irregDuplV "quit" "quit" "quit" ; + read_V = irregV "read" "read" "read" ; + rid_V = irregDuplV "rid" "rid" "rid" ; + ride_V = irregV "ride" "rode" "ridden" ; + ring_V = irregV "ring" "rang" "rung" ; + rise_V = irregV "rise" "rose" "risen" ; + run_V = irregDuplV "run" "ran" "run" ; + saw_V = irregV "saw" "sawed" (variants {"sawed" ; "sawn"}) ; + say_V = irregV "say" "said" "said" ; + see_V = irregV "see" "saw" "seen" ; + seek_V = irregV "seek" "sought" "sought" ; + sell_V = irregV "sell" "sold" "sold" ; + send_V = irregV "send" "sent" "sent" ; + set_V = irregDuplV "set" "set" "set" ; + sew_V = irregV "sew" "sewed" (variants {"sewed" ; "sewn"}) ; + shake_V = irregV "shake" "shook" "shaken" ; + shave_V = irregV "shave" "shaved" (variants {"shaved" ; "shaven"}) ; + shear_V = irregV "shear" "shore" "shorn" ; + shed_V = irregDuplV "shed" "shed" "shed" ; + shine_V = irregV "shine" "shone" "shone" ; + shoe_V = irregV "shoe" "shoed" (variants {"shoed" ; "shod"}) ; + shoot_V = irregV "shoot" "shot" "shot" ; + show_V = irregV "show" "showed" (variants {"showed" ; "shown"}) ; + shrink_V = irregV "shrink" "shrank" "shrunk" ; + shut_V = irregDuplV "shut" "shut" "shut" ; + sing_V = irregV "sing" "sang" "sung" ; + sink_V = irregV "sink" "sank" "sunk" ; + sit_V = irregDuplV "sit" "sat" "sat" ; + sleep_V = irregV "sleep" "slept" "slept" ; + slay_V = irregV "slay" "slew" "slain" ; + slide_V = irregV "slide" "slid" "slid" ; + sling_V = irregV "sling" "slung" "slung" ; + slit_V = irregDuplV "slit" "slit" "slit" ; + smite_V = irregV "smite" "smote" "smitten" ; + sow_V = irregV "sow" "sowed" (variants {"sowed" ; "sown"}) ; + speak_V = irregV "speak" "spoke" "spoken" ; + speed_V = irregV "speed" "sped" "sped" ; + spend_V = irregV "spend" "spent" "spent" ; + spill_V = irregV "spill" (variants {"spilled" ; "spilt"}) (variants {"spilled" ; "spilt"}) ; + spin_V = irregDuplV "spin" "spun" "spun" ; + spit_V = irregDuplV "spit" (variants {"spit" ; "spat"}) "spit" ; + split_V = irregDuplV "split" "split" "split" ; + spread_V = irregV "spread" "spread" "spread" ; + spring_V = irregV "spring" (variants {"sprang" ; "sprung"}) "sprung" ; + stand_V = irregV "stand" "stood" "stood" ; + steal_V = irregV "steal" "stole" "stolen" ; + stick_V = irregV "stick" "stuck" "stuck" ; + sting_V = irregV "sting" "stung" "stung" ; + stink_V = irregV "stink" "stank" "stunk" ; + stride_V = irregV "stride" "strod" "stridden" ; + strike_V = irregV "strike" "struck" "struck" ; + string_V = irregV "string" "strung" "strung" ; + strive_V = irregV "strive" "strove" "striven" ; + swear_V = irregV "swear" "swore" "sworn" ; + sweep_V = irregV "sweep" "swept" "swept" ; + swell_V = irregV "swell" "swelled" (variants {"swelled" ; "swollen"}) ; + swim_V = irregDuplV "swim" "swam" "swum" ; + swing_V = irregV "swing" "swung" "swung" ; + take_V = irregV "take" "took" "taken" ; + teach_V = irregV "teach" "taught" "taught" ; + tear_V = irregV "tear" "tore" "torn" ; + tell_V = irregV "tell" "told" "told" ; + think_V = irregV "think" "thought" "thought" ; + thrive_V = irregV "thrive" (variants {"thrived" ; "throve"}) "thrived" ; + throw_V = irregV "throw" "threw" "thrown" ; + thrust_V = irregV "thrust" "thrust" "thrust" ; + tread_V = irregV "tread" "trod" "trodden" ; + understand_V = irregV "understand" "understood" "understood" ; + uphold_V = irregV "uphold" "upheld" "upheld" ; + upset_V = irregDuplV "upset" "upset" "upset" ; + wake_V = irregV "wake" "woke" "woken" ; + wear_V = irregV "wear" "wore" "worn" ; + weave_V = irregV "weave" (variants {"weaved" ; "wove"}) (variants {"weaved" ; "woven"}) ; + wed_V = irregDuplV "wed" "wed" "wed" ; + weep_V = irregV "weep" "wept" "wept" ; + wind_V = irregV "wind" "wound" "wound" ; + win_V = irregDuplV "win" "won" "won" ; + withhold_V = irregV "withhold" "withheld" "withheld" ; + withstand_V = irregV "withstand" "withstood" "withstood" ; + wring_V = irregV "wring" "wrung" "wrung" ; + write_V = irregV "write" "wrote" "written" ; +} diff --git a/lib/next-resource/latin/LangLat.gf b/lib/next-resource/latin/LangLat.gf new file mode 100644 index 000000000..c84169b5a --- /dev/null +++ b/lib/next-resource/latin/LangLat.gf @@ -0,0 +1,10 @@ +--# -path=.:../abstract:../common:prelude + +concrete LangLat of Lang = + GrammarLat, + LexiconLat + ** { + +flags startcat = Phr ; unlexer = text ; lexer = text ; + +} ; diff --git a/lib/next-resource/latin/LangLat.gfAdjectiveLat.gf b/lib/next-resource/latin/LangLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..9575afbb6 --- /dev/null +++ b/lib/next-resource/latin/LangLat.gfAdjectiveLat.gf @@ -0,0 +1,10 @@ +----# -path=.:../abstract:../common:prelude +-- +--concrete LangLat of Lang = +-- GrammarLat, +-- LexiconLat +-- ** { +-- +--flags startcat = Phr ; unlexer = text ; lexer = text ; +-- +--} ; diff --git a/lib/next-resource/latin/LangLat.gfAdjectiveLat.gfAdjectiveLat.gf b/lib/next-resource/latin/LangLat.gfAdjectiveLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..c84169b5a --- /dev/null +++ b/lib/next-resource/latin/LangLat.gfAdjectiveLat.gfAdjectiveLat.gf @@ -0,0 +1,10 @@ +--# -path=.:../abstract:../common:prelude + +concrete LangLat of Lang = + GrammarLat, + LexiconLat + ** { + +flags startcat = Phr ; unlexer = text ; lexer = text ; + +} ; diff --git a/lib/next-resource/latin/LexiconLat.gf b/lib/next-resource/latin/LexiconLat.gf new file mode 100644 index 000000000..0c3e0e411 --- /dev/null +++ b/lib/next-resource/latin/LexiconLat.gf @@ -0,0 +1,377 @@ +--# -path=.:prelude + +concrete LexiconLat of Lexicon = CatLat ** open + ParadigmsLat, +-- IrregLat, + Prelude in { + +flags + optimize=values ; + +lin +-- airplane_N = regN "airplane" ; +-- answer_V2S = mkV2S (regV "answer") toP ; +-- apartment_N = regN "apartment" ; +-- apple_N = regN "apple" ; +-- art_N = regN "art" ; +-- ask_V2Q = mkV2Q (regV "ask") noPrep ; +-- baby_N = regN "baby" ; +-- bad_A = mkADeg "bad" "worse" "worst" "badly" ; +-- bank_N = regN "bank" ; +-- beautiful_A = compoundADeg (regA "beautiful") ; +-- become_VA = mkVA (irregV "become" "became" "become") ; +-- beer_N = regN "beer" ; +-- beg_V2V = mkV2V (regDuplV "beg") noPrep toP ; +-- big_A = duplADeg "big" ; +-- bike_N = regN "bike" ; +-- bird_N = regN "bird" ; +-- black_A = regADeg "black" ; +-- blue_A = regADeg "blue" ; +-- boat_N = regN "boat" ; +-- book_N = regN "book" ; +-- boot_N = regN "boot" ; +-- boss_N = mkN human (regN "boss") ; +-- boy_N = mkN masculine (regN "boy") ; +-- bread_N = regN "bread" ; +-- break_V2 = dirV2 (irregV "break" "broke" "broken") ; +-- broad_A = regADeg "broad" ; +-- brother_N2 = mkN2 (mkN masculine (mkN "brother")) (mkPrep "of") ; +-- brown_A = regADeg "brown" ; +-- butter_N = regN "butter" ; +-- buy_V2 = dirV2 (irregV "buy" "bought" "bought") ; +-- camera_N = regN "camera" ; +-- cap_N = regN "cap" ; +-- car_N = regN "car" ; +-- carpet_N = regN "carpet" ; +-- cat_N = regN "cat" ; +-- ceiling_N = regN "ceiling" ; +-- chair_N = regN "chair" ; +-- cheese_N = regN "cheese" ; +-- child_N = mk2N "child" "children" ; +-- church_N = regN "church" ; +-- city_N = regN "city" ; +-- clean_A = regADeg "clean" ; +-- clever_A = regADeg "clever" ; +-- close_V2 = dirV2 (regV "close") ; +-- coat_N = regN "coat" ; +-- cold_A = regADeg "cold" ; +-- come_V = (irregV "come" "came" "come") ; +-- computer_N = regN "computer" ; +-- country_N = regN "country" ; +-- cousin_N = mkN human (regN "cousin") ; +-- cow_N = regN "cow" ; +-- die_V = (regV "die") ; +-- dirty_A = regADeg "dirty" ; +-- distance_N3 = mkN3 (regN "distance") fromP toP ; +-- doctor_N = mkN human (regN "doctor") ; +-- dog_N = regN "dog" ; +-- door_N = regN "door" ; +-- drink_V2 = dirV2 (irregV "drink" "drank" "drunk") ; +-- easy_A2V = mkA2V (regA "easy") forP ; +-- eat_V2 = dirV2 (irregV "eat" "ate" "eaten") ; +-- empty_A = regADeg "empty" ; +-- enemy_N = regN "enemy" ; +-- factory_N = regN "factory" ; +-- father_N2 = mkN2 (mkN masculine (mkN "father")) (mkPrep "of") ; +-- fear_VS = mkVS (regV "fear") ; +-- find_V2 = dirV2 (irregV "find" "found" "found") ; +-- fish_N = mk2N "fish" "fish" ; +-- floor_N = regN "floor" ; +-- forget_V2 = dirV2 (irregDuplV "forget" "forgot" "forgotten") ; +-- fridge_N = regN "fridge" ; +-- friend_N = mkN human (regN "friend") ; +-- fruit_N = regN "fruit" ; +-- fun_AV = mkAV (regA "fun") ; +-- garden_N = regN "garden" ; +-- girl_N = mkN feminine (regN "girl") ; +-- glove_N = regN "glove" ; +-- gold_N = regN "gold" ; +-- good_A = mkADeg "good" "better" "best" "well" ; +-- go_V = mk5V "go" "goes" "went" "gone" "going" ; +-- green_A = regADeg "green" ; +-- harbour_N = regN "harbour" ; +-- hate_V2 = dirV2 (regV "hate") ; +-- hat_N = regN "hat" ; +-- have_V2 = dirV2 (mk5V "have" "has" "had" "had" "having") ; +-- hear_V2 = dirV2 (irregV "hear" "heard" "heard") ; +-- hill_N = regN "hill" ; +-- hope_VS = mkVS (regV "hope") ; +-- horse_N = regN "horse" ; +-- hot_A = duplADeg "hot" ; +-- house_N = regN "house" ; +-- important_A = compoundADeg (regA "important") ; +-- industry_N = regN "industry" ; +-- iron_N = regN "iron" ; +-- king_N = mkN masculine (regN "king") ; +-- know_V2 = dirV2 (irregV "know" "knew" "known") ; +-- lake_N = regN "lake" ; +-- lamp_N = regN "lamp" ; +-- learn_V2 = dirV2 (regV "learn") ; +-- leather_N = regN "leather" ; +-- leave_V2 = dirV2 (irregV "leave" "left" "left") ; +-- like_V2 = dirV2 (regV "like") ; +-- listen_V2 = prepV2 (regV "listen") toP ; +-- live_V = (regV "live") ; +-- long_A = regADeg "long" ; +-- lose_V2 = dirV2 (irregV "lose" "lost" "lost") ; + love_N = mkN "amor" ; + love_V2 = mkV2 "amare" ; +-- man_N = mkN masculine (mk2N "man" "men") ; +-- married_A2 = mkA2 (regA "married") toP ; +-- meat_N = regN "meat" ; +-- milk_N = regN "milk" ; +-- moon_N = regN "moon" ; +-- mother_N2 = mkN2 (mkN feminine (mkN "mother")) (mkPrep "of") ; +-- mountain_N = regN "mountain" ; +-- music_N = regN "music" ; +-- narrow_A = regADeg "narrow" ; +-- new_A = regADeg "new" ; +-- newspaper_N = regN "newspaper" ; +-- oil_N = regN "oil" ; +-- old_A = regADeg "old" ; +-- open_V2 = dirV2 (regV "open") ; +-- paint_V2A = mkV2A (regV "paint") noPrep ; +-- paper_N = regN "paper" ; +-- paris_PN = mkPN (mkN nonhuman (mkN "Paris")) ; +-- peace_N = regN "peace" ; +-- pen_N = regN "pen" ; +-- planet_N = regN "planet" ; +-- plastic_N = regN "plastic" ; +-- play_V2 = dirV2 (regV "play") ; +-- policeman_N = mkN masculine (mkN "policeman" "policemen") ; +-- priest_N = mkN human (regN "priest") ; +-- probable_AS = mkAS (regA "probable") ; +-- queen_N = mkN feminine (regN "queen") ; +-- radio_N = regN "radio" ; +-- rain_V0 = mkV0 (regV "rain") ; +-- read_V2 = dirV2 (irregV "read" "read" "read") ; +-- red_A = duplADeg "red" ; +-- religion_N = regN "religion" ; +-- restaurant_N = regN "restaurant" ; +-- river_N = regN "river" ; +-- rock_N = regN "rock" ; +-- roof_N = regN "roof" ; +-- rubber_N = regN "rubber" ; +-- run_V = (irregDuplV "run" "ran" "run") ; +-- say_VS = mkVS (irregV "say" "said" "said") ; +-- school_N = regN "school" ; +-- science_N = regN "science" ; +-- sea_N = regN "sea" ; +-- seek_V2 = dirV2 (irregV "seek" "sought" "sought") ; +-- see_V2 = dirV2 (irregV "see" "saw" "seen") ; +-- sell_V3 = dirV3 (irregV "sell" "sold" "sold") toP ; +-- send_V3 = dirV3 (irregV "send" "sent" "sent") toP ; +-- sheep_N = mk2N "sheep" "sheep" ; +-- ship_N = regN "ship" ; +-- shirt_N = regN "shirt" ; +-- shoe_N = regN "shoe" ; +-- shop_N = regN "shop" ; +-- short_A = regADeg "short" ; +-- silver_N = regN "silver" ; +-- sister_N = mkN2 (mkN feminine (mkN "sister")) (mkPrep "of") ; + sleep_V = mkV "dormio" "dormivi" "dormitus" "dormire" ; +-- small_A = regADeg "small" ; +-- snake_N = regN "snake" ; +-- sock_N = regN "sock" ; +-- speak_V2 = dirV2 (irregV "speak" "spoke" "spoken") ; +-- star_N = regN "star" ; +-- steel_N = regN "steel" ; +-- stone_N = regN "stone" ; +-- stove_N = regN "stove" ; +-- student_N = mkN human (regN "student") ; +-- stupid_A = regADeg "stupid" ; +-- sun_N = regN "sun" ; +-- switch8off_V2 = dirV2 (partV (regV "switch") "off") ; +-- switch8on_V2 = dirV2 (partV (regV "switch") "on") ; +-- table_N = regN "table" ; +-- talk_V3 = mkV3 (regV "talk") toP aboutP ; +-- teacher_N = mkN human (regN "teacher") ; +-- teach_V2 = dirV2 (irregV "teach" "taught" "taught") ; +-- television_N = regN "television" ; +-- thick_A = regADeg "thick" ; +-- thin_A = duplADeg "thin" ; +-- train_N = regN "train" ; +-- travel_V = (regDuplV "travel") ; +-- tree_N = regN "tree" ; +-- ---- trousers_N = regN "trousers" ; +-- ugly_A = regADeg "ugly" ; +-- understand_V2 = dirV2 (irregV "understand" "understood" "understood") ; +-- university_N = regN "university" ; +-- village_N = regN "village" ; +-- wait_V2 = prepV2 (regV "wait") forP ; +-- walk_V = (regV "walk") ; +-- warm_A = regADeg "warm" ; +-- war_N = regN "war" ; +-- watch_V2 = dirV2 (regV "watch") ; +-- water_N = regN "water" ; +-- white_A = regADeg "white" ; +-- window_N = regN "window" ; +-- wine_N = regN "wine" ; +-- win_V2 = dirV2 (irregDuplV "win" "won" "won") ; +-- woman_N = mkN feminine (mk2N "woman" "women") ; +-- wonder_VQ = mkVQ (regV "wonder") ; +-- wood_N = regN "wood" ; +-- write_V2 = dirV2 (irregV "write" "wrote" "written") ; +-- yellow_A = regADeg "yellow" ; +-- young_A = regADeg "young" ; +-- +-- do_V2 = dirV2 (mk5V "do" "does" "did" "done" "doing") ; +-- now_Adv = mkAdv "now" ; +-- already_Adv = mkAdv "already" ; +-- song_N = regN "song" ; +-- add_V3 = dirV3 (regV "add") toP ; +-- number_N = regN "number" ; +-- put_V2 = prepV2 (irregDuplV "put" "put" "put") noPrep ; +-- stop_V = regDuplV "stop" ; +-- jump_V = regV "jump" ; +-- +-- left_Ord = ss "left" ; +-- right_Ord = ss "right" ; +-- far_Adv = mkAdv "far" ; +-- correct_A = (regA "correct") ; +-- dry_A = regA "dry" ; +-- dull_A = regA "dull" ; +-- full_A = regA "full" ; +-- heavy_A = regA "heavy" ; +-- near_A = regA "near" ; +-- rotten_A = (regA "rotten") ; +-- round_A = regA "round" ; +-- sharp_A = regA "sharp" ; +-- smooth_A = regA "smooth" ; +-- straight_A = regA "straight" ; +-- wet_A = regA "wet" ; ---- +-- wide_A = regA "wide" ; +-- animal_N = regN "animal" ; +-- ashes_N = regN "ash" ; -- FIXME: plural only? +-- back_N = regN "back" ; +-- bark_N = regN "bark" ; +-- belly_N = regN "belly" ; +-- blood_N = regN "blood" ; +-- bone_N = regN "bone" ; +-- breast_N = regN "breast" ; +-- cloud_N = regN "cloud" ; +-- day_N = regN "day" ; +-- dust_N = regN "dust" ; +-- ear_N = regN "ear" ; +-- earth_N = regN "earth" ; +-- egg_N = regN "egg" ; +-- eye_N = regN "eye" ; +-- fat_N = regN "fat" ; +-- feather_N = regN "feather" ; +-- fingernail_N = regN "fingernail" ; +-- fire_N = regN "fire" ; +-- flower_N = regN "flower" ; +-- fog_N = regN "fog" ; +-- foot_N = mk2N "foot" "feet" ; +-- forest_N = regN "forest" ; +-- grass_N = regN "grass" ; +-- guts_N = regN "gut" ; -- FIXME: no singular +-- hair_N = regN "hair" ; +-- hand_N = regN "hand" ; +-- head_N = regN "head" ; +-- heart_N = regN "heart" ; +-- horn_N = regN "horn" ; +-- husband_N = mkN masculine (regN "husband") ; +-- ice_N = regN "ice" ; +-- knee_N = regN "knee" ; +-- leaf_N = mk2N "leaf" "leaves" ; +-- leg_N = regN "leg" ; +-- liver_N = regN "liver" ; +-- louse_N = mk2N "louse" "lice" ; +-- mouth_N = regN "mouth" ; +-- name_N = regN "name" ; +-- neck_N = regN "neck" ; +-- night_N = regN "night" ; +-- nose_N = regN "nose" ; +-- person_N = mkN human (regN "person") ; +-- rain_N = regN "rain" ; +-- road_N = regN "road" ; +-- root_N = regN "root" ; +-- rope_N = regN "rope" ; +-- salt_N = regN "salt" ; +-- sand_N = regN "sand" ; +-- seed_N = regN "seed" ; +-- skin_N = regN "skin" ; +-- sky_N = regN "sky" ; +-- smoke_N = regN "smoke" ; +-- snow_N = regN "snow" ; +-- stick_N = regN "stick" ; +-- tail_N = regN "tail" ; +-- tongue_N = regN "tongue" ; +-- tooth_N = mk2N "tooth" "teeth" ; +-- wife_N = mkN feminine (mk2N "wife" "wives") ; +-- wind_N = regN "wind" ; +-- wing_N = regN "wing" ; +-- worm_N = regN "worm" ; +-- year_N = regN "year" ; +-- blow_V = IrregLat.blow_V ; +-- breathe_V = dirV2 (regV "breathe") ; +-- burn_V = IrregLat.burn_V ; +-- dig_V = IrregLat.dig_V ; +-- fall_V = IrregLat.fall_V ; +-- float_V = regV "float" ; +-- flow_V = regV "flow" ; +-- fly_V = IrregLat.fly_V ; +-- freeze_V = IrregLat.freeze_V ; +-- give_V3 = dirV3 give_V toP ; +-- laugh_V = regV "laugh" ; +-- lie_V = IrregLat.lie_V ; +-- play_V = regV "play" ; +-- sew_V = IrregLat.sew_V ; +-- sing_V = IrregLat.sing_V ; +-- sit_V = IrregLat.sit_V ; +-- smell_V = regV "smell" ; +-- spit_V = IrregLat.spit_V ; +-- stand_V = IrregLat.stand_V ; +-- swell_V = IrregLat.swell_V ; +-- swim_V = IrregLat.swim_V ; +-- think_V = IrregLat.think_V ; +-- turn_V = regV "turn" ; +-- vomit_V = regV "vomit" ; +-- +-- bite_V2 = dirV2 IrregLat.bite_V ; +-- count_V2 = dirV2 (regV "count") ; +-- cut_V2 = dirV2 IrregLat.cut_V ; +-- fear_V2 = dirV2 (regV "fear") ; +-- fight_V2 = dirV2 fight_V ; +-- hit_V2 = dirV2 hit_V ; +-- hold_V2 = dirV2 hold_V ; +-- hunt_V2 = dirV2 (regV "hunt") ; +-- kill_V2 = dirV2 (regV "kill") ; +-- pull_V2 = dirV2 (regV "pull") ; +-- push_V2 = dirV2 (regV "push") ; +-- rub_V2 = dirV2 (regDuplV "rub") ; +-- scratch_V2 = dirV2 (regV "scratch") ; +-- split_V2 = dirV2 split_V ; +-- squeeze_V2 = dirV2 (regV "squeeze") ; +-- stab_V2 = dirV2 (regDuplV "stab") ; +-- suck_V2 = dirV2 (regV "suck") ; +-- throw_V2 = dirV2 throw_V ; +-- tie_V2 = dirV2 (regV "tie") ; +-- wash_V2 = dirV2 (regV "wash") ; +-- wipe_V2 = dirV2 (regV "wipe") ; +-- +---- other_A = regA "other" ; +-- +-- grammar_N = regN "grammar" ; +-- language_N = regN "language" ; +-- rule_N = regN "rule" ; +-- +---- added 4/6/2007 +-- john_PN = mkPN (mkN masculine (mkN "John")) ; +-- question_N = regN "question" ; +-- ready_A = regA "ready" ; +-- reason_N = regN "reason" ; +-- today_Adv = mkAdv "today" ; +-- uncertain_A = regA "uncertain" ; +-- +--oper +-- aboutP = mkPrep "about" ; +-- atP = mkPrep "at" ; +-- forP = mkPrep "for" ; +-- fromP = mkPrep "from" ; +-- inP = mkPrep "in" ; +-- onP = mkPrep "on" ; +-- toP = mkPrep "to" ; +-- +} diff --git a/lib/next-resource/latin/LexiconLat.gfAdjectiveLat.gf b/lib/next-resource/latin/LexiconLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..2290fde3e --- /dev/null +++ b/lib/next-resource/latin/LexiconLat.gfAdjectiveLat.gf @@ -0,0 +1,375 @@ +----# -path=.:prelude +-- +--concrete LexiconLat of Lexicon = CatLat ** +-- open ParadigmsLat, IrregLat, Prelude in { +-- +--flags +-- optimize=values ; +-- +--lin +-- airplane_N = regN "airplane" ; +-- answer_V2S = mkV2S (regV "answer") toP ; +-- apartment_N = regN "apartment" ; +-- apple_N = regN "apple" ; +-- art_N = regN "art" ; +-- ask_V2Q = mkV2Q (regV "ask") noPrep ; +-- baby_N = regN "baby" ; +-- bad_A = mkADeg "bad" "worse" "worst" "badly" ; +-- bank_N = regN "bank" ; +-- beautiful_A = compoundADeg (regA "beautiful") ; +-- become_VA = mkVA (irregV "become" "became" "become") ; +-- beer_N = regN "beer" ; +-- beg_V2V = mkV2V (regDuplV "beg") noPrep toP ; +-- big_A = duplADeg "big" ; +-- bike_N = regN "bike" ; +-- bird_N = regN "bird" ; +-- black_A = regADeg "black" ; +-- blue_A = regADeg "blue" ; +-- boat_N = regN "boat" ; +-- book_N = regN "book" ; +-- boot_N = regN "boot" ; +-- boss_N = mkN human (regN "boss") ; +-- boy_N = mkN masculine (regN "boy") ; +-- bread_N = regN "bread" ; +-- break_V2 = dirV2 (irregV "break" "broke" "broken") ; +-- broad_A = regADeg "broad" ; +-- brother_N2 = mkN2 (mkN masculine (mkN "brother")) (mkPrep "of") ; +-- brown_A = regADeg "brown" ; +-- butter_N = regN "butter" ; +-- buy_V2 = dirV2 (irregV "buy" "bought" "bought") ; +-- camera_N = regN "camera" ; +-- cap_N = regN "cap" ; +-- car_N = regN "car" ; +-- carpet_N = regN "carpet" ; +-- cat_N = regN "cat" ; +-- ceiling_N = regN "ceiling" ; +-- chair_N = regN "chair" ; +-- cheese_N = regN "cheese" ; +-- child_N = mk2N "child" "children" ; +-- church_N = regN "church" ; +-- city_N = regN "city" ; +-- clean_A = regADeg "clean" ; +-- clever_A = regADeg "clever" ; +-- close_V2 = dirV2 (regV "close") ; +-- coat_N = regN "coat" ; +-- cold_A = regADeg "cold" ; +-- come_V = (irregV "come" "came" "come") ; +-- computer_N = regN "computer" ; +-- country_N = regN "country" ; +-- cousin_N = mkN human (regN "cousin") ; +-- cow_N = regN "cow" ; +-- die_V = (regV "die") ; +-- dirty_A = regADeg "dirty" ; +-- distance_N3 = mkN3 (regN "distance") fromP toP ; +-- doctor_N = mkN human (regN "doctor") ; +-- dog_N = regN "dog" ; +-- door_N = regN "door" ; +-- drink_V2 = dirV2 (irregV "drink" "drank" "drunk") ; +-- easy_A2V = mkA2V (regA "easy") forP ; +-- eat_V2 = dirV2 (irregV "eat" "ate" "eaten") ; +-- empty_A = regADeg "empty" ; +-- enemy_N = regN "enemy" ; +-- factory_N = regN "factory" ; +-- father_N2 = mkN2 (mkN masculine (mkN "father")) (mkPrep "of") ; +-- fear_VS = mkVS (regV "fear") ; +-- find_V2 = dirV2 (irregV "find" "found" "found") ; +-- fish_N = mk2N "fish" "fish" ; +-- floor_N = regN "floor" ; +-- forget_V2 = dirV2 (irregDuplV "forget" "forgot" "forgotten") ; +-- fridge_N = regN "fridge" ; +-- friend_N = mkN human (regN "friend") ; +-- fruit_N = regN "fruit" ; +-- fun_AV = mkAV (regA "fun") ; +-- garden_N = regN "garden" ; +-- girl_N = mkN feminine (regN "girl") ; +-- glove_N = regN "glove" ; +-- gold_N = regN "gold" ; +-- good_A = mkADeg "good" "better" "best" "well" ; +-- go_V = mk5V "go" "goes" "went" "gone" "going" ; +-- green_A = regADeg "green" ; +-- harbour_N = regN "harbour" ; +-- hate_V2 = dirV2 (regV "hate") ; +-- hat_N = regN "hat" ; +-- have_V2 = dirV2 (mk5V "have" "has" "had" "had" "having") ; +-- hear_V2 = dirV2 (irregV "hear" "heard" "heard") ; +-- hill_N = regN "hill" ; +-- hope_VS = mkVS (regV "hope") ; +-- horse_N = regN "horse" ; +-- hot_A = duplADeg "hot" ; +-- house_N = regN "house" ; +-- important_A = compoundADeg (regA "important") ; +-- industry_N = regN "industry" ; +-- iron_N = regN "iron" ; +-- king_N = mkN masculine (regN "king") ; +-- know_V2 = dirV2 (irregV "know" "knew" "known") ; +-- lake_N = regN "lake" ; +-- lamp_N = regN "lamp" ; +-- learn_V2 = dirV2 (regV "learn") ; +-- leather_N = regN "leather" ; +-- leave_V2 = dirV2 (irregV "leave" "left" "left") ; +-- like_V2 = dirV2 (regV "like") ; +-- listen_V2 = prepV2 (regV "listen") toP ; +-- live_V = (regV "live") ; +-- long_A = regADeg "long" ; +-- lose_V2 = dirV2 (irregV "lose" "lost" "lost") ; +-- love_N = regN "love" ; +-- love_V2 = dirV2 (regV "love") ; +-- man_N = mkN masculine (mk2N "man" "men") ; +-- married_A2 = mkA2 (regA "married") toP ; +-- meat_N = regN "meat" ; +-- milk_N = regN "milk" ; +-- moon_N = regN "moon" ; +-- mother_N2 = mkN2 (mkN feminine (mkN "mother")) (mkPrep "of") ; +-- mountain_N = regN "mountain" ; +-- music_N = regN "music" ; +-- narrow_A = regADeg "narrow" ; +-- new_A = regADeg "new" ; +-- newspaper_N = regN "newspaper" ; +-- oil_N = regN "oil" ; +-- old_A = regADeg "old" ; +-- open_V2 = dirV2 (regV "open") ; +-- paint_V2A = mkV2A (regV "paint") noPrep ; +-- paper_N = regN "paper" ; +-- paris_PN = mkPN (mkN nonhuman (mkN "Paris")) ; +-- peace_N = regN "peace" ; +-- pen_N = regN "pen" ; +-- planet_N = regN "planet" ; +-- plastic_N = regN "plastic" ; +-- play_V2 = dirV2 (regV "play") ; +-- policeman_N = mkN masculine (mkN "policeman" "policemen") ; +-- priest_N = mkN human (regN "priest") ; +-- probable_AS = mkAS (regA "probable") ; +-- queen_N = mkN feminine (regN "queen") ; +-- radio_N = regN "radio" ; +-- rain_V0 = mkV0 (regV "rain") ; +-- read_V2 = dirV2 (irregV "read" "read" "read") ; +-- red_A = duplADeg "red" ; +-- religion_N = regN "religion" ; +-- restaurant_N = regN "restaurant" ; +-- river_N = regN "river" ; +-- rock_N = regN "rock" ; +-- roof_N = regN "roof" ; +-- rubber_N = regN "rubber" ; +-- run_V = (irregDuplV "run" "ran" "run") ; +-- say_VS = mkVS (irregV "say" "said" "said") ; +-- school_N = regN "school" ; +-- science_N = regN "science" ; +-- sea_N = regN "sea" ; +-- seek_V2 = dirV2 (irregV "seek" "sought" "sought") ; +-- see_V2 = dirV2 (irregV "see" "saw" "seen") ; +-- sell_V3 = dirV3 (irregV "sell" "sold" "sold") toP ; +-- send_V3 = dirV3 (irregV "send" "sent" "sent") toP ; +-- sheep_N = mk2N "sheep" "sheep" ; +-- ship_N = regN "ship" ; +-- shirt_N = regN "shirt" ; +-- shoe_N = regN "shoe" ; +-- shop_N = regN "shop" ; +-- short_A = regADeg "short" ; +-- silver_N = regN "silver" ; +-- sister_N = mkN2 (mkN feminine (mkN "sister")) (mkPrep "of") ; +-- sleep_V = (irregV "sleep" "slept" "slept") ; +-- small_A = regADeg "small" ; +-- snake_N = regN "snake" ; +-- sock_N = regN "sock" ; +-- speak_V2 = dirV2 (irregV "speak" "spoke" "spoken") ; +-- star_N = regN "star" ; +-- steel_N = regN "steel" ; +-- stone_N = regN "stone" ; +-- stove_N = regN "stove" ; +-- student_N = mkN human (regN "student") ; +-- stupid_A = regADeg "stupid" ; +-- sun_N = regN "sun" ; +-- switch8off_V2 = dirV2 (partV (regV "switch") "off") ; +-- switch8on_V2 = dirV2 (partV (regV "switch") "on") ; +-- table_N = regN "table" ; +-- talk_V3 = mkV3 (regV "talk") toP aboutP ; +-- teacher_N = mkN human (regN "teacher") ; +-- teach_V2 = dirV2 (irregV "teach" "taught" "taught") ; +-- television_N = regN "television" ; +-- thick_A = regADeg "thick" ; +-- thin_A = duplADeg "thin" ; +-- train_N = regN "train" ; +-- travel_V = (regDuplV "travel") ; +-- tree_N = regN "tree" ; +-- ---- trousers_N = regN "trousers" ; +-- ugly_A = regADeg "ugly" ; +-- understand_V2 = dirV2 (irregV "understand" "understood" "understood") ; +-- university_N = regN "university" ; +-- village_N = regN "village" ; +-- wait_V2 = prepV2 (regV "wait") forP ; +-- walk_V = (regV "walk") ; +-- warm_A = regADeg "warm" ; +-- war_N = regN "war" ; +-- watch_V2 = dirV2 (regV "watch") ; +-- water_N = regN "water" ; +-- white_A = regADeg "white" ; +-- window_N = regN "window" ; +-- wine_N = regN "wine" ; +-- win_V2 = dirV2 (irregDuplV "win" "won" "won") ; +-- woman_N = mkN feminine (mk2N "woman" "women") ; +-- wonder_VQ = mkVQ (regV "wonder") ; +-- wood_N = regN "wood" ; +-- write_V2 = dirV2 (irregV "write" "wrote" "written") ; +-- yellow_A = regADeg "yellow" ; +-- young_A = regADeg "young" ; +-- +-- do_V2 = dirV2 (mk5V "do" "does" "did" "done" "doing") ; +-- now_Adv = mkAdv "now" ; +-- already_Adv = mkAdv "already" ; +-- song_N = regN "song" ; +-- add_V3 = dirV3 (regV "add") toP ; +-- number_N = regN "number" ; +-- put_V2 = prepV2 (irregDuplV "put" "put" "put") noPrep ; +-- stop_V = regDuplV "stop" ; +-- jump_V = regV "jump" ; +-- +-- left_Ord = ss "left" ; +-- right_Ord = ss "right" ; +-- far_Adv = mkAdv "far" ; +-- correct_A = (regA "correct") ; +-- dry_A = regA "dry" ; +-- dull_A = regA "dull" ; +-- full_A = regA "full" ; +-- heavy_A = regA "heavy" ; +-- near_A = regA "near" ; +-- rotten_A = (regA "rotten") ; +-- round_A = regA "round" ; +-- sharp_A = regA "sharp" ; +-- smooth_A = regA "smooth" ; +-- straight_A = regA "straight" ; +-- wet_A = regA "wet" ; ---- +-- wide_A = regA "wide" ; +-- animal_N = regN "animal" ; +-- ashes_N = regN "ash" ; -- FIXME: plural only? +-- back_N = regN "back" ; +-- bark_N = regN "bark" ; +-- belly_N = regN "belly" ; +-- blood_N = regN "blood" ; +-- bone_N = regN "bone" ; +-- breast_N = regN "breast" ; +-- cloud_N = regN "cloud" ; +-- day_N = regN "day" ; +-- dust_N = regN "dust" ; +-- ear_N = regN "ear" ; +-- earth_N = regN "earth" ; +-- egg_N = regN "egg" ; +-- eye_N = regN "eye" ; +-- fat_N = regN "fat" ; +-- feather_N = regN "feather" ; +-- fingernail_N = regN "fingernail" ; +-- fire_N = regN "fire" ; +-- flower_N = regN "flower" ; +-- fog_N = regN "fog" ; +-- foot_N = mk2N "foot" "feet" ; +-- forest_N = regN "forest" ; +-- grass_N = regN "grass" ; +-- guts_N = regN "gut" ; -- FIXME: no singular +-- hair_N = regN "hair" ; +-- hand_N = regN "hand" ; +-- head_N = regN "head" ; +-- heart_N = regN "heart" ; +-- horn_N = regN "horn" ; +-- husband_N = mkN masculine (regN "husband") ; +-- ice_N = regN "ice" ; +-- knee_N = regN "knee" ; +-- leaf_N = mk2N "leaf" "leaves" ; +-- leg_N = regN "leg" ; +-- liver_N = regN "liver" ; +-- louse_N = mk2N "louse" "lice" ; +-- mouth_N = regN "mouth" ; +-- name_N = regN "name" ; +-- neck_N = regN "neck" ; +-- night_N = regN "night" ; +-- nose_N = regN "nose" ; +-- person_N = mkN human (regN "person") ; +-- rain_N = regN "rain" ; +-- road_N = regN "road" ; +-- root_N = regN "root" ; +-- rope_N = regN "rope" ; +-- salt_N = regN "salt" ; +-- sand_N = regN "sand" ; +-- seed_N = regN "seed" ; +-- skin_N = regN "skin" ; +-- sky_N = regN "sky" ; +-- smoke_N = regN "smoke" ; +-- snow_N = regN "snow" ; +-- stick_N = regN "stick" ; +-- tail_N = regN "tail" ; +-- tongue_N = regN "tongue" ; +-- tooth_N = mk2N "tooth" "teeth" ; +-- wife_N = mkN feminine (mk2N "wife" "wives") ; +-- wind_N = regN "wind" ; +-- wing_N = regN "wing" ; +-- worm_N = regN "worm" ; +-- year_N = regN "year" ; +-- blow_V = IrregLat.blow_V ; +-- breathe_V = dirV2 (regV "breathe") ; +-- burn_V = IrregLat.burn_V ; +-- dig_V = IrregLat.dig_V ; +-- fall_V = IrregLat.fall_V ; +-- float_V = regV "float" ; +-- flow_V = regV "flow" ; +-- fly_V = IrregLat.fly_V ; +-- freeze_V = IrregLat.freeze_V ; +-- give_V3 = dirV3 give_V toP ; +-- laugh_V = regV "laugh" ; +-- lie_V = IrregLat.lie_V ; +-- play_V = regV "play" ; +-- sew_V = IrregLat.sew_V ; +-- sing_V = IrregLat.sing_V ; +-- sit_V = IrregLat.sit_V ; +-- smell_V = regV "smell" ; +-- spit_V = IrregLat.spit_V ; +-- stand_V = IrregLat.stand_V ; +-- swell_V = IrregLat.swell_V ; +-- swim_V = IrregLat.swim_V ; +-- think_V = IrregLat.think_V ; +-- turn_V = regV "turn" ; +-- vomit_V = regV "vomit" ; +-- +-- bite_V2 = dirV2 IrregLat.bite_V ; +-- count_V2 = dirV2 (regV "count") ; +-- cut_V2 = dirV2 IrregLat.cut_V ; +-- fear_V2 = dirV2 (regV "fear") ; +-- fight_V2 = dirV2 fight_V ; +-- hit_V2 = dirV2 hit_V ; +-- hold_V2 = dirV2 hold_V ; +-- hunt_V2 = dirV2 (regV "hunt") ; +-- kill_V2 = dirV2 (regV "kill") ; +-- pull_V2 = dirV2 (regV "pull") ; +-- push_V2 = dirV2 (regV "push") ; +-- rub_V2 = dirV2 (regDuplV "rub") ; +-- scratch_V2 = dirV2 (regV "scratch") ; +-- split_V2 = dirV2 split_V ; +-- squeeze_V2 = dirV2 (regV "squeeze") ; +-- stab_V2 = dirV2 (regDuplV "stab") ; +-- suck_V2 = dirV2 (regV "suck") ; +-- throw_V2 = dirV2 throw_V ; +-- tie_V2 = dirV2 (regV "tie") ; +-- wash_V2 = dirV2 (regV "wash") ; +-- wipe_V2 = dirV2 (regV "wipe") ; +-- +---- other_A = regA "other" ; +-- +-- grammar_N = regN "grammar" ; +-- language_N = regN "language" ; +-- rule_N = regN "rule" ; +-- +---- added 4/6/2007 +-- john_PN = mkPN (mkN masculine (mkN "John")) ; +-- question_N = regN "question" ; +-- ready_A = regA "ready" ; +-- reason_N = regN "reason" ; +-- today_Adv = mkAdv "today" ; +-- uncertain_A = regA "uncertain" ; +-- +--oper +-- aboutP = mkPrep "about" ; +-- atP = mkPrep "at" ; +-- forP = mkPrep "for" ; +-- fromP = mkPrep "from" ; +-- inP = mkPrep "in" ; +-- onP = mkPrep "on" ; +-- toP = mkPrep "to" ; +-- +--} ; diff --git a/lib/next-resource/latin/LexiconLat.gfAdjectiveLat.gfAdjectiveLat.gf b/lib/next-resource/latin/LexiconLat.gfAdjectiveLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..691271e6c --- /dev/null +++ b/lib/next-resource/latin/LexiconLat.gfAdjectiveLat.gfAdjectiveLat.gf @@ -0,0 +1,375 @@ +--# -path=.:prelude + +concrete LexiconLat of Lexicon = CatLat ** + open ParadigmsLat, IrregLat, Prelude in { + +flags + optimize=values ; + +lin + airplane_N = regN "airplane" ; + answer_V2S = mkV2S (regV "answer") toP ; + apartment_N = regN "apartment" ; + apple_N = regN "apple" ; + art_N = regN "art" ; + ask_V2Q = mkV2Q (regV "ask") noPrep ; + baby_N = regN "baby" ; + bad_A = mkADeg "bad" "worse" "worst" "badly" ; + bank_N = regN "bank" ; + beautiful_A = compoundADeg (regA "beautiful") ; + become_VA = mkVA (irregV "become" "became" "become") ; + beer_N = regN "beer" ; + beg_V2V = mkV2V (regDuplV "beg") noPrep toP ; + big_A = duplADeg "big" ; + bike_N = regN "bike" ; + bird_N = regN "bird" ; + black_A = regADeg "black" ; + blue_A = regADeg "blue" ; + boat_N = regN "boat" ; + book_N = regN "book" ; + boot_N = regN "boot" ; + boss_N = mkN human (regN "boss") ; + boy_N = mkN masculine (regN "boy") ; + bread_N = regN "bread" ; + break_V2 = dirV2 (irregV "break" "broke" "broken") ; + broad_A = regADeg "broad" ; + brother_N2 = mkN2 (mkN masculine (mkN "brother")) (mkPrep "of") ; + brown_A = regADeg "brown" ; + butter_N = regN "butter" ; + buy_V2 = dirV2 (irregV "buy" "bought" "bought") ; + camera_N = regN "camera" ; + cap_N = regN "cap" ; + car_N = regN "car" ; + carpet_N = regN "carpet" ; + cat_N = regN "cat" ; + ceiling_N = regN "ceiling" ; + chair_N = regN "chair" ; + cheese_N = regN "cheese" ; + child_N = mk2N "child" "children" ; + church_N = regN "church" ; + city_N = regN "city" ; + clean_A = regADeg "clean" ; + clever_A = regADeg "clever" ; + close_V2 = dirV2 (regV "close") ; + coat_N = regN "coat" ; + cold_A = regADeg "cold" ; + come_V = (irregV "come" "came" "come") ; + computer_N = regN "computer" ; + country_N = regN "country" ; + cousin_N = mkN human (regN "cousin") ; + cow_N = regN "cow" ; + die_V = (regV "die") ; + dirty_A = regADeg "dirty" ; + distance_N3 = mkN3 (regN "distance") fromP toP ; + doctor_N = mkN human (regN "doctor") ; + dog_N = regN "dog" ; + door_N = regN "door" ; + drink_V2 = dirV2 (irregV "drink" "drank" "drunk") ; + easy_A2V = mkA2V (regA "easy") forP ; + eat_V2 = dirV2 (irregV "eat" "ate" "eaten") ; + empty_A = regADeg "empty" ; + enemy_N = regN "enemy" ; + factory_N = regN "factory" ; + father_N2 = mkN2 (mkN masculine (mkN "father")) (mkPrep "of") ; + fear_VS = mkVS (regV "fear") ; + find_V2 = dirV2 (irregV "find" "found" "found") ; + fish_N = mk2N "fish" "fish" ; + floor_N = regN "floor" ; + forget_V2 = dirV2 (irregDuplV "forget" "forgot" "forgotten") ; + fridge_N = regN "fridge" ; + friend_N = mkN human (regN "friend") ; + fruit_N = regN "fruit" ; + fun_AV = mkAV (regA "fun") ; + garden_N = regN "garden" ; + girl_N = mkN feminine (regN "girl") ; + glove_N = regN "glove" ; + gold_N = regN "gold" ; + good_A = mkADeg "good" "better" "best" "well" ; + go_V = mk5V "go" "goes" "went" "gone" "going" ; + green_A = regADeg "green" ; + harbour_N = regN "harbour" ; + hate_V2 = dirV2 (regV "hate") ; + hat_N = regN "hat" ; + have_V2 = dirV2 (mk5V "have" "has" "had" "had" "having") ; + hear_V2 = dirV2 (irregV "hear" "heard" "heard") ; + hill_N = regN "hill" ; + hope_VS = mkVS (regV "hope") ; + horse_N = regN "horse" ; + hot_A = duplADeg "hot" ; + house_N = regN "house" ; + important_A = compoundADeg (regA "important") ; + industry_N = regN "industry" ; + iron_N = regN "iron" ; + king_N = mkN masculine (regN "king") ; + know_V2 = dirV2 (irregV "know" "knew" "known") ; + lake_N = regN "lake" ; + lamp_N = regN "lamp" ; + learn_V2 = dirV2 (regV "learn") ; + leather_N = regN "leather" ; + leave_V2 = dirV2 (irregV "leave" "left" "left") ; + like_V2 = dirV2 (regV "like") ; + listen_V2 = prepV2 (regV "listen") toP ; + live_V = (regV "live") ; + long_A = regADeg "long" ; + lose_V2 = dirV2 (irregV "lose" "lost" "lost") ; + love_N = regN "love" ; + love_V2 = dirV2 (regV "love") ; + man_N = mkN masculine (mk2N "man" "men") ; + married_A2 = mkA2 (regA "married") toP ; + meat_N = regN "meat" ; + milk_N = regN "milk" ; + moon_N = regN "moon" ; + mother_N2 = mkN2 (mkN feminine (mkN "mother")) (mkPrep "of") ; + mountain_N = regN "mountain" ; + music_N = regN "music" ; + narrow_A = regADeg "narrow" ; + new_A = regADeg "new" ; + newspaper_N = regN "newspaper" ; + oil_N = regN "oil" ; + old_A = regADeg "old" ; + open_V2 = dirV2 (regV "open") ; + paint_V2A = mkV2A (regV "paint") noPrep ; + paper_N = regN "paper" ; + paris_PN = mkPN (mkN nonhuman (mkN "Paris")) ; + peace_N = regN "peace" ; + pen_N = regN "pen" ; + planet_N = regN "planet" ; + plastic_N = regN "plastic" ; + play_V2 = dirV2 (regV "play") ; + policeman_N = mkN masculine (mkN "policeman" "policemen") ; + priest_N = mkN human (regN "priest") ; + probable_AS = mkAS (regA "probable") ; + queen_N = mkN feminine (regN "queen") ; + radio_N = regN "radio" ; + rain_V0 = mkV0 (regV "rain") ; + read_V2 = dirV2 (irregV "read" "read" "read") ; + red_A = duplADeg "red" ; + religion_N = regN "religion" ; + restaurant_N = regN "restaurant" ; + river_N = regN "river" ; + rock_N = regN "rock" ; + roof_N = regN "roof" ; + rubber_N = regN "rubber" ; + run_V = (irregDuplV "run" "ran" "run") ; + say_VS = mkVS (irregV "say" "said" "said") ; + school_N = regN "school" ; + science_N = regN "science" ; + sea_N = regN "sea" ; + seek_V2 = dirV2 (irregV "seek" "sought" "sought") ; + see_V2 = dirV2 (irregV "see" "saw" "seen") ; + sell_V3 = dirV3 (irregV "sell" "sold" "sold") toP ; + send_V3 = dirV3 (irregV "send" "sent" "sent") toP ; + sheep_N = mk2N "sheep" "sheep" ; + ship_N = regN "ship" ; + shirt_N = regN "shirt" ; + shoe_N = regN "shoe" ; + shop_N = regN "shop" ; + short_A = regADeg "short" ; + silver_N = regN "silver" ; + sister_N = mkN2 (mkN feminine (mkN "sister")) (mkPrep "of") ; + sleep_V = (irregV "sleep" "slept" "slept") ; + small_A = regADeg "small" ; + snake_N = regN "snake" ; + sock_N = regN "sock" ; + speak_V2 = dirV2 (irregV "speak" "spoke" "spoken") ; + star_N = regN "star" ; + steel_N = regN "steel" ; + stone_N = regN "stone" ; + stove_N = regN "stove" ; + student_N = mkN human (regN "student") ; + stupid_A = regADeg "stupid" ; + sun_N = regN "sun" ; + switch8off_V2 = dirV2 (partV (regV "switch") "off") ; + switch8on_V2 = dirV2 (partV (regV "switch") "on") ; + table_N = regN "table" ; + talk_V3 = mkV3 (regV "talk") toP aboutP ; + teacher_N = mkN human (regN "teacher") ; + teach_V2 = dirV2 (irregV "teach" "taught" "taught") ; + television_N = regN "television" ; + thick_A = regADeg "thick" ; + thin_A = duplADeg "thin" ; + train_N = regN "train" ; + travel_V = (regDuplV "travel") ; + tree_N = regN "tree" ; + ---- trousers_N = regN "trousers" ; + ugly_A = regADeg "ugly" ; + understand_V2 = dirV2 (irregV "understand" "understood" "understood") ; + university_N = regN "university" ; + village_N = regN "village" ; + wait_V2 = prepV2 (regV "wait") forP ; + walk_V = (regV "walk") ; + warm_A = regADeg "warm" ; + war_N = regN "war" ; + watch_V2 = dirV2 (regV "watch") ; + water_N = regN "water" ; + white_A = regADeg "white" ; + window_N = regN "window" ; + wine_N = regN "wine" ; + win_V2 = dirV2 (irregDuplV "win" "won" "won") ; + woman_N = mkN feminine (mk2N "woman" "women") ; + wonder_VQ = mkVQ (regV "wonder") ; + wood_N = regN "wood" ; + write_V2 = dirV2 (irregV "write" "wrote" "written") ; + yellow_A = regADeg "yellow" ; + young_A = regADeg "young" ; + + do_V2 = dirV2 (mk5V "do" "does" "did" "done" "doing") ; + now_Adv = mkAdv "now" ; + already_Adv = mkAdv "already" ; + song_N = regN "song" ; + add_V3 = dirV3 (regV "add") toP ; + number_N = regN "number" ; + put_V2 = prepV2 (irregDuplV "put" "put" "put") noPrep ; + stop_V = regDuplV "stop" ; + jump_V = regV "jump" ; + + left_Ord = ss "left" ; + right_Ord = ss "right" ; + far_Adv = mkAdv "far" ; + correct_A = (regA "correct") ; + dry_A = regA "dry" ; + dull_A = regA "dull" ; + full_A = regA "full" ; + heavy_A = regA "heavy" ; + near_A = regA "near" ; + rotten_A = (regA "rotten") ; + round_A = regA "round" ; + sharp_A = regA "sharp" ; + smooth_A = regA "smooth" ; + straight_A = regA "straight" ; + wet_A = regA "wet" ; ---- + wide_A = regA "wide" ; + animal_N = regN "animal" ; + ashes_N = regN "ash" ; -- FIXME: plural only? + back_N = regN "back" ; + bark_N = regN "bark" ; + belly_N = regN "belly" ; + blood_N = regN "blood" ; + bone_N = regN "bone" ; + breast_N = regN "breast" ; + cloud_N = regN "cloud" ; + day_N = regN "day" ; + dust_N = regN "dust" ; + ear_N = regN "ear" ; + earth_N = regN "earth" ; + egg_N = regN "egg" ; + eye_N = regN "eye" ; + fat_N = regN "fat" ; + feather_N = regN "feather" ; + fingernail_N = regN "fingernail" ; + fire_N = regN "fire" ; + flower_N = regN "flower" ; + fog_N = regN "fog" ; + foot_N = mk2N "foot" "feet" ; + forest_N = regN "forest" ; + grass_N = regN "grass" ; + guts_N = regN "gut" ; -- FIXME: no singular + hair_N = regN "hair" ; + hand_N = regN "hand" ; + head_N = regN "head" ; + heart_N = regN "heart" ; + horn_N = regN "horn" ; + husband_N = mkN masculine (regN "husband") ; + ice_N = regN "ice" ; + knee_N = regN "knee" ; + leaf_N = mk2N "leaf" "leaves" ; + leg_N = regN "leg" ; + liver_N = regN "liver" ; + louse_N = mk2N "louse" "lice" ; + mouth_N = regN "mouth" ; + name_N = regN "name" ; + neck_N = regN "neck" ; + night_N = regN "night" ; + nose_N = regN "nose" ; + person_N = mkN human (regN "person") ; + rain_N = regN "rain" ; + road_N = regN "road" ; + root_N = regN "root" ; + rope_N = regN "rope" ; + salt_N = regN "salt" ; + sand_N = regN "sand" ; + seed_N = regN "seed" ; + skin_N = regN "skin" ; + sky_N = regN "sky" ; + smoke_N = regN "smoke" ; + snow_N = regN "snow" ; + stick_N = regN "stick" ; + tail_N = regN "tail" ; + tongue_N = regN "tongue" ; + tooth_N = mk2N "tooth" "teeth" ; + wife_N = mkN feminine (mk2N "wife" "wives") ; + wind_N = regN "wind" ; + wing_N = regN "wing" ; + worm_N = regN "worm" ; + year_N = regN "year" ; + blow_V = IrregLat.blow_V ; + breathe_V = dirV2 (regV "breathe") ; + burn_V = IrregLat.burn_V ; + dig_V = IrregLat.dig_V ; + fall_V = IrregLat.fall_V ; + float_V = regV "float" ; + flow_V = regV "flow" ; + fly_V = IrregLat.fly_V ; + freeze_V = IrregLat.freeze_V ; + give_V3 = dirV3 give_V toP ; + laugh_V = regV "laugh" ; + lie_V = IrregLat.lie_V ; + play_V = regV "play" ; + sew_V = IrregLat.sew_V ; + sing_V = IrregLat.sing_V ; + sit_V = IrregLat.sit_V ; + smell_V = regV "smell" ; + spit_V = IrregLat.spit_V ; + stand_V = IrregLat.stand_V ; + swell_V = IrregLat.swell_V ; + swim_V = IrregLat.swim_V ; + think_V = IrregLat.think_V ; + turn_V = regV "turn" ; + vomit_V = regV "vomit" ; + + bite_V2 = dirV2 IrregLat.bite_V ; + count_V2 = dirV2 (regV "count") ; + cut_V2 = dirV2 IrregLat.cut_V ; + fear_V2 = dirV2 (regV "fear") ; + fight_V2 = dirV2 fight_V ; + hit_V2 = dirV2 hit_V ; + hold_V2 = dirV2 hold_V ; + hunt_V2 = dirV2 (regV "hunt") ; + kill_V2 = dirV2 (regV "kill") ; + pull_V2 = dirV2 (regV "pull") ; + push_V2 = dirV2 (regV "push") ; + rub_V2 = dirV2 (regDuplV "rub") ; + scratch_V2 = dirV2 (regV "scratch") ; + split_V2 = dirV2 split_V ; + squeeze_V2 = dirV2 (regV "squeeze") ; + stab_V2 = dirV2 (regDuplV "stab") ; + suck_V2 = dirV2 (regV "suck") ; + throw_V2 = dirV2 throw_V ; + tie_V2 = dirV2 (regV "tie") ; + wash_V2 = dirV2 (regV "wash") ; + wipe_V2 = dirV2 (regV "wipe") ; + +-- other_A = regA "other" ; + + grammar_N = regN "grammar" ; + language_N = regN "language" ; + rule_N = regN "rule" ; + +-- added 4/6/2007 + john_PN = mkPN (mkN masculine (mkN "John")) ; + question_N = regN "question" ; + ready_A = regA "ready" ; + reason_N = regN "reason" ; + today_Adv = mkAdv "today" ; + uncertain_A = regA "uncertain" ; + +oper + aboutP = mkPrep "about" ; + atP = mkPrep "at" ; + forP = mkPrep "for" ; + fromP = mkPrep "from" ; + inP = mkPrep "in" ; + onP = mkPrep "on" ; + toP = mkPrep "to" ; + +} ; diff --git a/lib/next-resource/latin/MorphoLat.gf b/lib/next-resource/latin/MorphoLat.gf new file mode 100644 index 000000000..1236145d0 --- /dev/null +++ b/lib/next-resource/latin/MorphoLat.gf @@ -0,0 +1,197 @@ +----# -path=.:../../prelude +-- +----1 A Simple Latlish Resource Morphology +---- +---- Aarne Ranta 2002 -- 2005 +---- +---- This resource morphology contains definitions needed in the resource +---- syntax. To build a lexicon, it is better to use $ParadigmsLat$, which +---- gives a higher-level access to this module. +-- +--resource MorphoLat = ResLat ** open Prelude, (Predef=Predef) in { +-- +-- flags optimize=all ; +-- +----2 Phonology +---- +---- To regulate the use of endings for both nouns, adjectives, and verbs: +-- +--oper +-- y2ie : Str -> Str -> Str = \fly,s -> +-- let y = last (init fly) in +-- case y of { +-- "a" => fly + s ; +-- "e" => fly + s ; +-- "o" => fly + s ; +-- "u" => fly + s ; +-- _ => init fly + "ie" + s +-- } ; +-- +-- +----2 Nouns +---- +---- For conciseness and abstraction, we define a worst-case macro for +---- noun inflection. It is used for defining special case that +---- only need one string as argument. +-- +--oper +-- CommonNoun : Type = {s : Number => Case => Str} ; +-- +-- nounGen : Str -> CommonNoun = \dog -> case last dog of { +-- "y" => nounY "dog" ; +-- "s" => nounS (init "dog") ; +-- _ => nounReg "dog" +-- } ; +-- +---- These are auxiliaries to $nounGen$. +-- +-- 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 -> Gender -> {s : Case => Str} = \john,g -> +-- {s = table {Gen => john + "'s" ; _ => john} ; g = g} ; +-- +----2 Determiners +-- +-- mkDeterminer : Number -> Str -> {s,sp : Str ; n : Number} = \n,s -> +-- {s,sp = s ; n = n} ; +-- +----2 Pronouns +---- +---- Here we define personal pronouns. +---- +---- We record the form "mine" and the gender for later use. +-- +-- Pronoun : Type = +-- {s : Case => Str ; a : Agr} ; +-- +-- mkPronoun : (_,_,_,_ : Str) -> Number -> Person -> Gender -> Pronoun = +-- \I,me,my,mine,n,p,g -> +-- {s = table {Nom => I ; Acc => me ; Gen => my} ; +-- a = toAgr n p g +-- } ; +-- +-- human : Gender = Masc ; --- doesn't matter +-- +-- pronI = mkPronoun "I" "me" "my" "mine" Sg P1 human ; +-- pronYouSg = mkPronoun "you" "you" "your" "yours" Sg P2 human ; -- verb agr OK +-- pronHe = mkPronoun "he" "him" "his" "his" Sg P3 Masc ; +-- pronShe = mkPronoun "she" "her" "her" "hers" Sg P3 Fem ; +-- pronIt = mkPronoun "it" "it" "its" "it" Sg P3 Neutr ; +-- +-- pronWe = mkPronoun "we" "us" "our" "ours" Pl P1 human ; +-- pronYouPl = mkPronoun "you" "you" "your" "yours" Pl P2 human ; +-- pronThey = mkPronoun "they" "them" "their" "theirs" Pl P3 human ; --- +-- +-- +----2 Adjectives +---- +---- To form the adjectival and the adverbial forms, two strings are needed +---- in the worst case. (First without degrees.) +-- +-- Adjective = {s : AForm => Str} ; +-- +---- However, most adjectives can be inflected using the final character. +---- N.B. this is not correct for "shy", but $mkAdjective$ has to be used. +-- +-- regAdjective : Str -> Adjective = \free -> +-- let +-- e = last free ; +-- fre = init free ; +-- freely = case e of { +-- "y" => fre + "ily" ; +-- _ => free + "ly" +-- } ; +-- fre = case e of { +-- "e" => fre ; +-- "y" => fre + "i" ; +-- _ => free +-- } +-- in +-- mkAdjective free (fre + "er") (fre + "est") freely ; +-- +---- Many adjectives are 'inflected' by adding a comparison word. +-- +-- adjDegrLong : Str -> Adjective = \ridiculous -> +-- mkAdjective +-- ridiculous +-- ("more" ++ ridiculous) +-- ("most" ++ ridiculous) +-- ((regAdjective ridiculous).s ! AAdv) ; +-- +-- +----3 Verbs +---- +---- The worst case needs five forms. (The verb "be" is treated separately.) +-- +-- mkVerb4 : (_,_,_,_: Str) -> Verb = \go,goes,went,gone -> +-- let going = case last go of { +-- "e" => init go + "ing" ; +-- _ => go + "ing" +-- } +-- in +-- mkVerb go goes went gone going ; +-- +---- This is what we use to derive the irregular forms in almost all cases +-- +-- mkVerbIrreg : (_,_,_ : Str) -> Verb = \bite,bit,bitten -> +-- let bites = case last bite of { +-- "y" => y2ie bite "s" ; +-- "s" => init bite + "es" ; +-- _ => bite + "s" +-- } +-- in mkVerb4 bite bites bit bitten ; +-- +---- This is used to derive regular forms. +-- +-- mkVerbReg : Str -> Verb = \soak -> +-- let +-- soaks = case last soak of { +-- "y" => y2ie soak "s" ; +-- "s" => init soak + "es" ; +-- _ => soak + "s" +-- } ; +-- soaked = case last soak of { +-- "e" => init soak + "s" ; +-- _ => soak + "ed" +-- } +-- in +-- mkVerb4 soak soaks soaked soaked ; +-- +-- verbGen : Str -> Verb = \kill -> case last kill of { +-- "y" => verbP3y (init kill) ; +-- "e" => verbP3e (init kill) ; +-- "s" => verbP3s (init kill) ; +-- _ => regVerbP3 kill +-- } ; +-- +---- These are just auxiliary to $verbGen$. +-- +-- regVerbP3 : Str -> Verb = \walk -> +-- mkVerbIrreg walk (walk + "ed") (walk + "ed") ; +-- verbP3s : Str -> Verb = \kiss -> +-- mkVerb4 kiss (kiss + "es") (kiss + "ed") (kiss + "ed") ; +-- verbP3e : Str -> Verb = \love -> +-- mkVerb4 love (love + "s") (love + "d") (love + "d") ; +-- verbP3y : Str -> Verb = \cr -> +-- mkVerb4 (cr + "y") (cr + "ies") (cr + "ied") (cr + "ied") ; +-- +----- The particle always appears right after the verb. +-- +-- verbPart : Verb -> Str -> Verb = \v,p -> +-- {s = \\f => v.s ! f ++ p ; isRefl = v.isRefl} ; +-- +-- verbNoPart : Verb -> Verb = \v -> verbPart v [] ; +-- +-- +--} ; +-- diff --git a/lib/next-resource/latin/MorphoLat.gfAdjectiveLat.gf b/lib/next-resource/latin/MorphoLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..1236145d0 --- /dev/null +++ b/lib/next-resource/latin/MorphoLat.gfAdjectiveLat.gf @@ -0,0 +1,197 @@ +----# -path=.:../../prelude +-- +----1 A Simple Latlish Resource Morphology +---- +---- Aarne Ranta 2002 -- 2005 +---- +---- This resource morphology contains definitions needed in the resource +---- syntax. To build a lexicon, it is better to use $ParadigmsLat$, which +---- gives a higher-level access to this module. +-- +--resource MorphoLat = ResLat ** open Prelude, (Predef=Predef) in { +-- +-- flags optimize=all ; +-- +----2 Phonology +---- +---- To regulate the use of endings for both nouns, adjectives, and verbs: +-- +--oper +-- y2ie : Str -> Str -> Str = \fly,s -> +-- let y = last (init fly) in +-- case y of { +-- "a" => fly + s ; +-- "e" => fly + s ; +-- "o" => fly + s ; +-- "u" => fly + s ; +-- _ => init fly + "ie" + s +-- } ; +-- +-- +----2 Nouns +---- +---- For conciseness and abstraction, we define a worst-case macro for +---- noun inflection. It is used for defining special case that +---- only need one string as argument. +-- +--oper +-- CommonNoun : Type = {s : Number => Case => Str} ; +-- +-- nounGen : Str -> CommonNoun = \dog -> case last dog of { +-- "y" => nounY "dog" ; +-- "s" => nounS (init "dog") ; +-- _ => nounReg "dog" +-- } ; +-- +---- These are auxiliaries to $nounGen$. +-- +-- 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 -> Gender -> {s : Case => Str} = \john,g -> +-- {s = table {Gen => john + "'s" ; _ => john} ; g = g} ; +-- +----2 Determiners +-- +-- mkDeterminer : Number -> Str -> {s,sp : Str ; n : Number} = \n,s -> +-- {s,sp = s ; n = n} ; +-- +----2 Pronouns +---- +---- Here we define personal pronouns. +---- +---- We record the form "mine" and the gender for later use. +-- +-- Pronoun : Type = +-- {s : Case => Str ; a : Agr} ; +-- +-- mkPronoun : (_,_,_,_ : Str) -> Number -> Person -> Gender -> Pronoun = +-- \I,me,my,mine,n,p,g -> +-- {s = table {Nom => I ; Acc => me ; Gen => my} ; +-- a = toAgr n p g +-- } ; +-- +-- human : Gender = Masc ; --- doesn't matter +-- +-- pronI = mkPronoun "I" "me" "my" "mine" Sg P1 human ; +-- pronYouSg = mkPronoun "you" "you" "your" "yours" Sg P2 human ; -- verb agr OK +-- pronHe = mkPronoun "he" "him" "his" "his" Sg P3 Masc ; +-- pronShe = mkPronoun "she" "her" "her" "hers" Sg P3 Fem ; +-- pronIt = mkPronoun "it" "it" "its" "it" Sg P3 Neutr ; +-- +-- pronWe = mkPronoun "we" "us" "our" "ours" Pl P1 human ; +-- pronYouPl = mkPronoun "you" "you" "your" "yours" Pl P2 human ; +-- pronThey = mkPronoun "they" "them" "their" "theirs" Pl P3 human ; --- +-- +-- +----2 Adjectives +---- +---- To form the adjectival and the adverbial forms, two strings are needed +---- in the worst case. (First without degrees.) +-- +-- Adjective = {s : AForm => Str} ; +-- +---- However, most adjectives can be inflected using the final character. +---- N.B. this is not correct for "shy", but $mkAdjective$ has to be used. +-- +-- regAdjective : Str -> Adjective = \free -> +-- let +-- e = last free ; +-- fre = init free ; +-- freely = case e of { +-- "y" => fre + "ily" ; +-- _ => free + "ly" +-- } ; +-- fre = case e of { +-- "e" => fre ; +-- "y" => fre + "i" ; +-- _ => free +-- } +-- in +-- mkAdjective free (fre + "er") (fre + "est") freely ; +-- +---- Many adjectives are 'inflected' by adding a comparison word. +-- +-- adjDegrLong : Str -> Adjective = \ridiculous -> +-- mkAdjective +-- ridiculous +-- ("more" ++ ridiculous) +-- ("most" ++ ridiculous) +-- ((regAdjective ridiculous).s ! AAdv) ; +-- +-- +----3 Verbs +---- +---- The worst case needs five forms. (The verb "be" is treated separately.) +-- +-- mkVerb4 : (_,_,_,_: Str) -> Verb = \go,goes,went,gone -> +-- let going = case last go of { +-- "e" => init go + "ing" ; +-- _ => go + "ing" +-- } +-- in +-- mkVerb go goes went gone going ; +-- +---- This is what we use to derive the irregular forms in almost all cases +-- +-- mkVerbIrreg : (_,_,_ : Str) -> Verb = \bite,bit,bitten -> +-- let bites = case last bite of { +-- "y" => y2ie bite "s" ; +-- "s" => init bite + "es" ; +-- _ => bite + "s" +-- } +-- in mkVerb4 bite bites bit bitten ; +-- +---- This is used to derive regular forms. +-- +-- mkVerbReg : Str -> Verb = \soak -> +-- let +-- soaks = case last soak of { +-- "y" => y2ie soak "s" ; +-- "s" => init soak + "es" ; +-- _ => soak + "s" +-- } ; +-- soaked = case last soak of { +-- "e" => init soak + "s" ; +-- _ => soak + "ed" +-- } +-- in +-- mkVerb4 soak soaks soaked soaked ; +-- +-- verbGen : Str -> Verb = \kill -> case last kill of { +-- "y" => verbP3y (init kill) ; +-- "e" => verbP3e (init kill) ; +-- "s" => verbP3s (init kill) ; +-- _ => regVerbP3 kill +-- } ; +-- +---- These are just auxiliary to $verbGen$. +-- +-- regVerbP3 : Str -> Verb = \walk -> +-- mkVerbIrreg walk (walk + "ed") (walk + "ed") ; +-- verbP3s : Str -> Verb = \kiss -> +-- mkVerb4 kiss (kiss + "es") (kiss + "ed") (kiss + "ed") ; +-- verbP3e : Str -> Verb = \love -> +-- mkVerb4 love (love + "s") (love + "d") (love + "d") ; +-- verbP3y : Str -> Verb = \cr -> +-- mkVerb4 (cr + "y") (cr + "ies") (cr + "ied") (cr + "ied") ; +-- +----- The particle always appears right after the verb. +-- +-- verbPart : Verb -> Str -> Verb = \v,p -> +-- {s = \\f => v.s ! f ++ p ; isRefl = v.isRefl} ; +-- +-- verbNoPart : Verb -> Verb = \v -> verbPart v [] ; +-- +-- +--} ; +-- diff --git a/lib/next-resource/latin/MorphoLat.gfAdjectiveLat.gfAdjectiveLat.gf b/lib/next-resource/latin/MorphoLat.gfAdjectiveLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..624edf2d5 --- /dev/null +++ b/lib/next-resource/latin/MorphoLat.gfAdjectiveLat.gfAdjectiveLat.gf @@ -0,0 +1,197 @@ +--# -path=.:../../prelude + +--1 A Simple Latlish Resource Morphology +-- +-- Aarne Ranta 2002 -- 2005 +-- +-- This resource morphology contains definitions needed in the resource +-- syntax. To build a lexicon, it is better to use $ParadigmsLat$, which +-- gives a higher-level access to this module. + +resource MorphoLat = ResLat ** open Prelude, (Predef=Predef) in { + + flags optimize=all ; + +--2 Phonology +-- +-- To regulate the use of endings for both nouns, adjectives, and verbs: + +oper + y2ie : Str -> Str -> Str = \fly,s -> + let y = last (init fly) in + case y of { + "a" => fly + s ; + "e" => fly + s ; + "o" => fly + s ; + "u" => fly + s ; + _ => init fly + "ie" + s + } ; + + +--2 Nouns +-- +-- For conciseness and abstraction, we define a worst-case macro for +-- noun inflection. It is used for defining special case that +-- only need one string as argument. + +oper + CommonNoun : Type = {s : Number => Case => Str} ; + + nounGen : Str -> CommonNoun = \dog -> case last dog of { + "y" => nounY "dog" ; + "s" => nounS (init "dog") ; + _ => nounReg "dog" + } ; + +-- These are auxiliaries to $nounGen$. + + 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 -> Gender -> {s : Case => Str} = \john,g -> + {s = table {Gen => john + "'s" ; _ => john} ; g = g} ; + +--2 Determiners + + mkDeterminer : Number -> Str -> {s,sp : Str ; n : Number} = \n,s -> + {s,sp = s ; n = n} ; + +--2 Pronouns +-- +-- Here we define personal pronouns. +-- +-- We record the form "mine" and the gender for later use. + + Pronoun : Type = + {s : Case => Str ; a : Agr} ; + + mkPronoun : (_,_,_,_ : Str) -> Number -> Person -> Gender -> Pronoun = + \I,me,my,mine,n,p,g -> + {s = table {Nom => I ; Acc => me ; Gen => my} ; + a = toAgr n p g + } ; + + human : Gender = Masc ; --- doesn't matter + + pronI = mkPronoun "I" "me" "my" "mine" Sg P1 human ; + pronYouSg = mkPronoun "you" "you" "your" "yours" Sg P2 human ; -- verb agr OK + pronHe = mkPronoun "he" "him" "his" "his" Sg P3 Masc ; + pronShe = mkPronoun "she" "her" "her" "hers" Sg P3 Fem ; + pronIt = mkPronoun "it" "it" "its" "it" Sg P3 Neutr ; + + pronWe = mkPronoun "we" "us" "our" "ours" Pl P1 human ; + pronYouPl = mkPronoun "you" "you" "your" "yours" Pl P2 human ; + pronThey = mkPronoun "they" "them" "their" "theirs" Pl P3 human ; --- + + +--2 Adjectives +-- +-- To form the adjectival and the adverbial forms, two strings are needed +-- in the worst case. (First without degrees.) + + Adjective = {s : AForm => Str} ; + +-- However, most adjectives can be inflected using the final character. +-- N.B. this is not correct for "shy", but $mkAdjective$ has to be used. + + regAdjective : Str -> Adjective = \free -> + let + e = last free ; + fre = init free ; + freely = case e of { + "y" => fre + "ily" ; + _ => free + "ly" + } ; + fre = case e of { + "e" => fre ; + "y" => fre + "i" ; + _ => free + } + in + mkAdjective free (fre + "er") (fre + "est") freely ; + +-- Many adjectives are 'inflected' by adding a comparison word. + + adjDegrLong : Str -> Adjective = \ridiculous -> + mkAdjective + ridiculous + ("more" ++ ridiculous) + ("most" ++ ridiculous) + ((regAdjective ridiculous).s ! AAdv) ; + + +--3 Verbs +-- +-- The worst case needs five forms. (The verb "be" is treated separately.) + + mkVerb4 : (_,_,_,_: Str) -> Verb = \go,goes,went,gone -> + let going = case last go of { + "e" => init go + "ing" ; + _ => go + "ing" + } + in + mkVerb go goes went gone going ; + +-- This is what we use to derive the irregular forms in almost all cases + + mkVerbIrreg : (_,_,_ : Str) -> Verb = \bite,bit,bitten -> + let bites = case last bite of { + "y" => y2ie bite "s" ; + "s" => init bite + "es" ; + _ => bite + "s" + } + in mkVerb4 bite bites bit bitten ; + +-- This is used to derive regular forms. + + mkVerbReg : Str -> Verb = \soak -> + let + soaks = case last soak of { + "y" => y2ie soak "s" ; + "s" => init soak + "es" ; + _ => soak + "s" + } ; + soaked = case last soak of { + "e" => init soak + "s" ; + _ => soak + "ed" + } + in + mkVerb4 soak soaks soaked soaked ; + + verbGen : Str -> Verb = \kill -> case last kill of { + "y" => verbP3y (init kill) ; + "e" => verbP3e (init kill) ; + "s" => verbP3s (init kill) ; + _ => regVerbP3 kill + } ; + +-- These are just auxiliary to $verbGen$. + + regVerbP3 : Str -> Verb = \walk -> + mkVerbIrreg walk (walk + "ed") (walk + "ed") ; + verbP3s : Str -> Verb = \kiss -> + mkVerb4 kiss (kiss + "es") (kiss + "ed") (kiss + "ed") ; + verbP3e : Str -> Verb = \love -> + mkVerb4 love (love + "s") (love + "d") (love + "d") ; + verbP3y : Str -> Verb = \cr -> + mkVerb4 (cr + "y") (cr + "ies") (cr + "ied") (cr + "ied") ; + +--- The particle always appears right after the verb. + + verbPart : Verb -> Str -> Verb = \v,p -> + {s = \\f => v.s ! f ++ p ; isRefl = v.isRefl} ; + + verbNoPart : Verb -> Verb = \v -> verbPart v [] ; + + +} ; + diff --git a/lib/next-resource/latin/NounLat.gf b/lib/next-resource/latin/NounLat.gf new file mode 100644 index 000000000..0ae8eda4e --- /dev/null +++ b/lib/next-resource/latin/NounLat.gf @@ -0,0 +1,135 @@ +concrete NounLat of Noun = CatLat ** open ResLat, Prelude in { + + flags optimize=all_subs ; + + lin +-- DetCN det cn = { +-- s = \\c => det.s ++ cn.s ! det.n ! c ; +-- a = agrgP3 det.n cn.g +-- } ; +-- +-- UsePN pn = pn ** {a = agrgP3 Sg pn.g} ; + UsePron p = p ; + +-- PredetNP pred np = { +-- s = \\c => pred.s ++ np.s ! c ; +-- a = np.a +-- } ; +-- +-- PPartNP np v2 = { +-- s = \\c => np.s ! c ++ v2.s ! VPPart ; +-- a = np.a +-- } ; +-- +-- RelNP np rs = { +-- s = \\c => np.s ! c ++ "," ++ rs.s ! np.a ; +-- a = np.a +-- } ; +-- +-- AdvNP np adv = { +-- s = \\c => np.s ! c ++ adv.s ; +-- a = np.a +-- } ; +-- +-- DetQuantOrd quant num ord = { +-- s = quant.s ! num.hasCard ! num.n ++ num.s ++ ord.s ; +-- sp = quant.sp ! num.hasCard ! num.n ++ num.s ++ ord.s ; +-- n = num.n +-- } ; +-- +-- DetQuant quant num = { +-- s = quant.s ! num.hasCard ! num.n ++ num.s ; +-- sp = quant.sp ! num.hasCard ! num.n ++ num.s ; +-- n = num.n +-- } ; +-- +-- DetNP det = { +-- s = \\c => det.sp ; ---- case +-- a = agrP3 det.n +-- } ; +-- +-- PossPron p = { +-- s = \\_,_ => p.s ! Gen ; +-- sp = \\_,_ => p.sp +-- } ; +-- +-- NumSg = {s = []; n = Sg ; hasCard = False} ; +-- NumPl = {s = []; n = Pl ; hasCard = False} ; +-----b NoOrd = {s = []} ; +-- +-- NumCard n = n ** {hasCard = True} ; +-- +-- NumDigits n = {s = n.s ! NCard ; n = n.n} ; +-- OrdDigits n = {s = n.s ! NOrd} ; +-- +-- NumNumeral numeral = {s = numeral.s ! NCard; n = numeral.n} ; +-- OrdNumeral numeral = {s = numeral.s ! NOrd} ; +-- +-- AdNum adn num = {s = adn.s ++ num.s ; n = num.n} ; +-- +-- OrdSuperl a = {s = a.s ! AAdj Superl} ; +-- +-- DefArt = { +-- s = \\c,n => artDef ; +-- sp = \\c,n => case of { +-- => "it" ; +-- => "they" ; +-- _ => artDef +-- } +-- } ; +-- +-- IndefArt = { +-- s = \\c,n => case of { +-- => artIndef ; +-- _ => [] +-- } ; +-- sp = \\c,n => case of { +-- => "one" ; +-- => "ones" ; +-- _ => [] +-- } +-- } ; +-- +-- MassNP cn = { +-- s = cn.s ! Sg ; +-- a = agrP3 Sg +-- } ; +-- +-- UseN n = n ; +-- UseN2 n = n ; +-----b UseN3 n = n ; +-- +-- Use2N3 f = { +-- s = \\n,c => f.s ! n ! Nom ; +-- g = f.g ; +-- c2 = f.c2 +-- } ; +-- +-- Use3N3 f = { +-- s = \\n,c => f.s ! n ! Nom ; +-- g = f.g ; +-- c2 = f.c3 +-- } ; +-- +-- ComplN2 f x = {s = \\n,c => f.s ! n ! Nom ++ f.c2 ++ x.s ! c ; g = f.g} ; +-- ComplN3 f x = { +-- s = \\n,c => f.s ! n ! Nom ++ f.c2 ++ x.s ! c ; +-- g = f.g ; +-- c2 = f.c3 +-- } ; +-- +-- AdjCN ap cn = { +-- s = \\n,c => preOrPost ap.isPre (ap.s ! agrgP3 n cn.g) (cn.s ! n ! c) ; +-- g = cn.g +-- } ; +-- RelCN cn rs = { +-- s = \\n,c => cn.s ! n ! c ++ rs.s ! agrgP3 n cn.g ; +-- g = cn.g +-- } ; +-- AdvCN cn ad = {s = \\n,c => cn.s ! n ! c ++ ad.s ; g = cn.g} ; +-- +-- SentCN cn sc = {s = \\n,c => cn.s ! n ! c ++ sc.s ; g = cn.g} ; +-- +-- ApposCN cn np = {s = \\n,c => cn.s ! n ! Nom ++ np.s ! c ; g = cn.g} ; +-- +} diff --git a/lib/next-resource/latin/NounLat.gfAdjectiveLat.gf b/lib/next-resource/latin/NounLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..61cfea991 --- /dev/null +++ b/lib/next-resource/latin/NounLat.gfAdjectiveLat.gf @@ -0,0 +1,135 @@ +--concrete NounLat of Noun = CatLat ** open ResLat, Prelude in { +-- +-- flags optimize=all_subs ; +-- +-- lin +-- DetCN det cn = { +-- s = \\c => det.s ++ cn.s ! det.n ! c ; +-- a = agrgP3 det.n cn.g +-- } ; +-- +-- UsePN pn = pn ** {a = agrgP3 Sg pn.g} ; +-- UsePron p = p ; +-- +-- PredetNP pred np = { +-- s = \\c => pred.s ++ np.s ! c ; +-- a = np.a +-- } ; +-- +-- PPartNP np v2 = { +-- s = \\c => np.s ! c ++ v2.s ! VPPart ; +-- a = np.a +-- } ; +-- +-- RelNP np rs = { +-- s = \\c => np.s ! c ++ "," ++ rs.s ! np.a ; +-- a = np.a +-- } ; +-- +-- AdvNP np adv = { +-- s = \\c => np.s ! c ++ adv.s ; +-- a = np.a +-- } ; +-- +-- DetQuantOrd quant num ord = { +-- s = quant.s ! num.hasCard ! num.n ++ num.s ++ ord.s ; +-- sp = quant.sp ! num.hasCard ! num.n ++ num.s ++ ord.s ; +-- n = num.n +-- } ; +-- +-- DetQuant quant num = { +-- s = quant.s ! num.hasCard ! num.n ++ num.s ; +-- sp = quant.sp ! num.hasCard ! num.n ++ num.s ; +-- n = num.n +-- } ; +-- +-- DetNP det = { +-- s = \\c => det.sp ; ---- case +-- a = agrP3 det.n +-- } ; +-- +-- PossPron p = { +-- s = \\_,_ => p.s ! Gen ; +-- sp = \\_,_ => p.sp +-- } ; +-- +-- NumSg = {s = []; n = Sg ; hasCard = False} ; +-- NumPl = {s = []; n = Pl ; hasCard = False} ; +-----b NoOrd = {s = []} ; +-- +-- NumCard n = n ** {hasCard = True} ; +-- +-- NumDigits n = {s = n.s ! NCard ; n = n.n} ; +-- OrdDigits n = {s = n.s ! NOrd} ; +-- +-- NumNumeral numeral = {s = numeral.s ! NCard; n = numeral.n} ; +-- OrdNumeral numeral = {s = numeral.s ! NOrd} ; +-- +-- AdNum adn num = {s = adn.s ++ num.s ; n = num.n} ; +-- +-- OrdSuperl a = {s = a.s ! AAdj Superl} ; +-- +-- DefArt = { +-- s = \\c,n => artDef ; +-- sp = \\c,n => case of { +-- => "it" ; +-- => "they" ; +-- _ => artDef +-- } +-- } ; +-- +-- IndefArt = { +-- s = \\c,n => case of { +-- => artIndef ; +-- _ => [] +-- } ; +-- sp = \\c,n => case of { +-- => "one" ; +-- => "ones" ; +-- _ => [] +-- } +-- } ; +-- +-- MassNP cn = { +-- s = cn.s ! Sg ; +-- a = agrP3 Sg +-- } ; +-- +-- UseN n = n ; +-- UseN2 n = n ; +-----b UseN3 n = n ; +-- +-- Use2N3 f = { +-- s = \\n,c => f.s ! n ! Nom ; +-- g = f.g ; +-- c2 = f.c2 +-- } ; +-- +-- Use3N3 f = { +-- s = \\n,c => f.s ! n ! Nom ; +-- g = f.g ; +-- c2 = f.c3 +-- } ; +-- +-- ComplN2 f x = {s = \\n,c => f.s ! n ! Nom ++ f.c2 ++ x.s ! c ; g = f.g} ; +-- ComplN3 f x = { +-- s = \\n,c => f.s ! n ! Nom ++ f.c2 ++ x.s ! c ; +-- g = f.g ; +-- c2 = f.c3 +-- } ; +-- +-- AdjCN ap cn = { +-- s = \\n,c => preOrPost ap.isPre (ap.s ! agrgP3 n cn.g) (cn.s ! n ! c) ; +-- g = cn.g +-- } ; +-- RelCN cn rs = { +-- s = \\n,c => cn.s ! n ! c ++ rs.s ! agrgP3 n cn.g ; +-- g = cn.g +-- } ; +-- AdvCN cn ad = {s = \\n,c => cn.s ! n ! c ++ ad.s ; g = cn.g} ; +-- +-- SentCN cn sc = {s = \\n,c => cn.s ! n ! c ++ sc.s ; g = cn.g} ; +-- +-- ApposCN cn np = {s = \\n,c => cn.s ! n ! Nom ++ np.s ! c ; g = cn.g} ; +-- +--} diff --git a/lib/next-resource/latin/NounLat.gfAdjectiveLat.gfAdjectiveLat.gf b/lib/next-resource/latin/NounLat.gfAdjectiveLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..d07caa260 --- /dev/null +++ b/lib/next-resource/latin/NounLat.gfAdjectiveLat.gfAdjectiveLat.gf @@ -0,0 +1,135 @@ +concrete NounLat of Noun = CatLat ** open ResLat, Prelude in { + + flags optimize=all_subs ; + + lin + DetCN det cn = { + s = \\c => det.s ++ cn.s ! det.n ! c ; + a = agrgP3 det.n cn.g + } ; + + UsePN pn = pn ** {a = agrgP3 Sg pn.g} ; + UsePron p = p ; + + PredetNP pred np = { + s = \\c => pred.s ++ np.s ! c ; + a = np.a + } ; + + PPartNP np v2 = { + s = \\c => np.s ! c ++ v2.s ! VPPart ; + a = np.a + } ; + + RelNP np rs = { + s = \\c => np.s ! c ++ "," ++ rs.s ! np.a ; + a = np.a + } ; + + AdvNP np adv = { + s = \\c => np.s ! c ++ adv.s ; + a = np.a + } ; + + DetQuantOrd quant num ord = { + s = quant.s ! num.hasCard ! num.n ++ num.s ++ ord.s ; + sp = quant.sp ! num.hasCard ! num.n ++ num.s ++ ord.s ; + n = num.n + } ; + + DetQuant quant num = { + s = quant.s ! num.hasCard ! num.n ++ num.s ; + sp = quant.sp ! num.hasCard ! num.n ++ num.s ; + n = num.n + } ; + + DetNP det = { + s = \\c => det.sp ; ---- case + a = agrP3 det.n + } ; + + PossPron p = { + s = \\_,_ => p.s ! Gen ; + sp = \\_,_ => p.sp + } ; + + NumSg = {s = []; n = Sg ; hasCard = False} ; + NumPl = {s = []; n = Pl ; hasCard = False} ; +---b NoOrd = {s = []} ; + + NumCard n = n ** {hasCard = True} ; + + NumDigits n = {s = n.s ! NCard ; n = n.n} ; + OrdDigits n = {s = n.s ! NOrd} ; + + NumNumeral numeral = {s = numeral.s ! NCard; n = numeral.n} ; + OrdNumeral numeral = {s = numeral.s ! NOrd} ; + + AdNum adn num = {s = adn.s ++ num.s ; n = num.n} ; + + OrdSuperl a = {s = a.s ! AAdj Superl} ; + + DefArt = { + s = \\c,n => artDef ; + sp = \\c,n => case of { + => "it" ; + => "they" ; + _ => artDef + } + } ; + + IndefArt = { + s = \\c,n => case of { + => artIndef ; + _ => [] + } ; + sp = \\c,n => case of { + => "one" ; + => "ones" ; + _ => [] + } + } ; + + MassNP cn = { + s = cn.s ! Sg ; + a = agrP3 Sg + } ; + + UseN n = n ; + UseN2 n = n ; +---b UseN3 n = n ; + + Use2N3 f = { + s = \\n,c => f.s ! n ! Nom ; + g = f.g ; + c2 = f.c2 + } ; + + Use3N3 f = { + s = \\n,c => f.s ! n ! Nom ; + g = f.g ; + c2 = f.c3 + } ; + + ComplN2 f x = {s = \\n,c => f.s ! n ! Nom ++ f.c2 ++ x.s ! c ; g = f.g} ; + ComplN3 f x = { + s = \\n,c => f.s ! n ! Nom ++ f.c2 ++ x.s ! c ; + g = f.g ; + c2 = f.c3 + } ; + + AdjCN ap cn = { + s = \\n,c => preOrPost ap.isPre (ap.s ! agrgP3 n cn.g) (cn.s ! n ! c) ; + g = cn.g + } ; + RelCN cn rs = { + s = \\n,c => cn.s ! n ! c ++ rs.s ! agrgP3 n cn.g ; + g = cn.g + } ; + AdvCN cn ad = {s = \\n,c => cn.s ! n ! c ++ ad.s ; g = cn.g} ; + + SentCN cn sc = {s = \\n,c => cn.s ! n ! c ++ sc.s ; g = cn.g} ; + + ApposCN cn np = {s = \\n,c => cn.s ! n ! Nom ++ np.s ! c ; g = cn.g} ; + +} diff --git a/lib/next-resource/latin/NumeralLat.gf b/lib/next-resource/latin/NumeralLat.gf new file mode 100644 index 000000000..2b70db375 --- /dev/null +++ b/lib/next-resource/latin/NumeralLat.gf @@ -0,0 +1,95 @@ +--concrete NumeralLat of Numeral = CatLat ** open ResLat in { +-- +--lincat +-- Digit = {s : DForm => CardOrd => Str} ; +-- Sub10 = {s : DForm => CardOrd => Str ; n : Number} ; +-- Sub100 = {s : CardOrd => Str ; n : Number} ; +-- Sub1000 = {s : CardOrd => Str ; n : Number} ; +-- Sub1000000 = {s : CardOrd => Str ; n : Number} ; +-- +--lin num x = x ; +--lin n2 = let two = mkNum "two" "twelve" "twenty" "second" in +-- {s = \\f,c => case of { +-- => "twelfth" ; +-- _ => two.s ! f ! c +-- } +-- } ; +-- +--lin n3 = mkNum "three" "thirteen" "thirty" "third" ; +--lin n4 = mkNum "four" "fourteen" "forty" "fourth" ; +--lin n5 = mkNum "five" "fifteen" "fifty" "fifth" ; +--lin n6 = regNum "six" ; +--lin n7 = regNum "seven" ; +--lin n8 = mkNum "eight" "eighteen" "eighty" "eighth" ; +--lin n9 = mkNum "nine" "nineteen" "ninety" "ninth" ; +-- +--lin pot01 = mkNum "one" "eleven" "ten" "first" ** {n = Sg} ; +--lin pot0 d = d ** {n = Pl} ; +--lin pot110 = regCardOrd "ten" ** {n = Pl} ; +--lin pot111 = regCardOrd "eleven" ** {n = Pl} ; +--lin pot1to19 d = {s = d.s ! teen} ** {n = Pl} ; +--lin pot0as1 n = {s = n.s ! unit} ** {n = n.n} ; +--lin pot1 d = {s = d.s ! ten} ** {n = Pl} ; +--lin pot1plus d e = { +-- s = \\c => d.s ! ten ! NCard ++ "-" ++ e.s ! unit ! c ; n = Pl} ; +--lin pot1as2 n = n ; +--lin pot2 d = {s = \\c => d.s ! unit ! NCard ++ mkCard c "hundred"} ** {n = Pl} ; +--lin pot2plus d e = { +-- s = \\c => d.s ! unit ! NCard ++ "hundred" ++ "and" ++ e.s ! c ; n = Pl} ; +--lin pot2as3 n = n ; +--lin pot3 n = { +-- s = \\c => n.s ! NCard ++ mkCard c "thousand" ; n = Pl} ; +--lin pot3plus n m = { +-- s = \\c => n.s ! NCard ++ "thousand" ++ m.s ! c ; n = Pl} ; +-- +---- numerals as sequences of digits +-- +-- lincat +-- Dig = TDigit ; +-- +-- lin +-- IDig d = d ** {tail = T1} ; +-- +-- IIDig d i = { +-- s = \\o => d.s ! NCard ++ commaIf i.tail ++ i.s ! o ; +-- n = Pl ; +-- tail = inc i.tail +-- } ; +-- +-- D_0 = mkDig "0" ; +-- D_1 = mk3Dig "1" "1st" Sg ; +-- D_2 = mk2Dig "2" "2nd" ; +-- D_3 = mk2Dig "3" "3rd" ; +-- D_4 = mkDig "4" ; +-- D_5 = mkDig "5" ; +-- D_6 = mkDig "6" ; +-- D_7 = mkDig "7" ; +-- D_8 = mkDig "8" ; +-- D_9 = mkDig "9" ; +-- +-- oper +-- commaIf : DTail -> Str = \t -> case t of { +-- T3 => "," ; +-- _ => [] +-- } ; +-- +-- inc : DTail -> DTail = \t -> case t of { +-- T1 => T2 ; +-- T2 => T3 ; +-- T3 => T1 +-- } ; +-- +-- mk2Dig : Str -> Str -> TDigit = \c,o -> mk3Dig c o Pl ; +-- mkDig : Str -> TDigit = \c -> mk2Dig c (c + "th") ; +-- +-- mk3Dig : Str -> Str -> Number -> TDigit = \c,o,n -> { +-- s = table {NCard => c ; NOrd => o} ; +-- n = n +-- } ; +-- +-- TDigit = { +-- n : Number ; +-- s : CardOrd => Str +-- } ; +-- +--} diff --git a/lib/next-resource/latin/NumeralLat.gfAdjectiveLat.gf b/lib/next-resource/latin/NumeralLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..2b70db375 --- /dev/null +++ b/lib/next-resource/latin/NumeralLat.gfAdjectiveLat.gf @@ -0,0 +1,95 @@ +--concrete NumeralLat of Numeral = CatLat ** open ResLat in { +-- +--lincat +-- Digit = {s : DForm => CardOrd => Str} ; +-- Sub10 = {s : DForm => CardOrd => Str ; n : Number} ; +-- Sub100 = {s : CardOrd => Str ; n : Number} ; +-- Sub1000 = {s : CardOrd => Str ; n : Number} ; +-- Sub1000000 = {s : CardOrd => Str ; n : Number} ; +-- +--lin num x = x ; +--lin n2 = let two = mkNum "two" "twelve" "twenty" "second" in +-- {s = \\f,c => case of { +-- => "twelfth" ; +-- _ => two.s ! f ! c +-- } +-- } ; +-- +--lin n3 = mkNum "three" "thirteen" "thirty" "third" ; +--lin n4 = mkNum "four" "fourteen" "forty" "fourth" ; +--lin n5 = mkNum "five" "fifteen" "fifty" "fifth" ; +--lin n6 = regNum "six" ; +--lin n7 = regNum "seven" ; +--lin n8 = mkNum "eight" "eighteen" "eighty" "eighth" ; +--lin n9 = mkNum "nine" "nineteen" "ninety" "ninth" ; +-- +--lin pot01 = mkNum "one" "eleven" "ten" "first" ** {n = Sg} ; +--lin pot0 d = d ** {n = Pl} ; +--lin pot110 = regCardOrd "ten" ** {n = Pl} ; +--lin pot111 = regCardOrd "eleven" ** {n = Pl} ; +--lin pot1to19 d = {s = d.s ! teen} ** {n = Pl} ; +--lin pot0as1 n = {s = n.s ! unit} ** {n = n.n} ; +--lin pot1 d = {s = d.s ! ten} ** {n = Pl} ; +--lin pot1plus d e = { +-- s = \\c => d.s ! ten ! NCard ++ "-" ++ e.s ! unit ! c ; n = Pl} ; +--lin pot1as2 n = n ; +--lin pot2 d = {s = \\c => d.s ! unit ! NCard ++ mkCard c "hundred"} ** {n = Pl} ; +--lin pot2plus d e = { +-- s = \\c => d.s ! unit ! NCard ++ "hundred" ++ "and" ++ e.s ! c ; n = Pl} ; +--lin pot2as3 n = n ; +--lin pot3 n = { +-- s = \\c => n.s ! NCard ++ mkCard c "thousand" ; n = Pl} ; +--lin pot3plus n m = { +-- s = \\c => n.s ! NCard ++ "thousand" ++ m.s ! c ; n = Pl} ; +-- +---- numerals as sequences of digits +-- +-- lincat +-- Dig = TDigit ; +-- +-- lin +-- IDig d = d ** {tail = T1} ; +-- +-- IIDig d i = { +-- s = \\o => d.s ! NCard ++ commaIf i.tail ++ i.s ! o ; +-- n = Pl ; +-- tail = inc i.tail +-- } ; +-- +-- D_0 = mkDig "0" ; +-- D_1 = mk3Dig "1" "1st" Sg ; +-- D_2 = mk2Dig "2" "2nd" ; +-- D_3 = mk2Dig "3" "3rd" ; +-- D_4 = mkDig "4" ; +-- D_5 = mkDig "5" ; +-- D_6 = mkDig "6" ; +-- D_7 = mkDig "7" ; +-- D_8 = mkDig "8" ; +-- D_9 = mkDig "9" ; +-- +-- oper +-- commaIf : DTail -> Str = \t -> case t of { +-- T3 => "," ; +-- _ => [] +-- } ; +-- +-- inc : DTail -> DTail = \t -> case t of { +-- T1 => T2 ; +-- T2 => T3 ; +-- T3 => T1 +-- } ; +-- +-- mk2Dig : Str -> Str -> TDigit = \c,o -> mk3Dig c o Pl ; +-- mkDig : Str -> TDigit = \c -> mk2Dig c (c + "th") ; +-- +-- mk3Dig : Str -> Str -> Number -> TDigit = \c,o,n -> { +-- s = table {NCard => c ; NOrd => o} ; +-- n = n +-- } ; +-- +-- TDigit = { +-- n : Number ; +-- s : CardOrd => Str +-- } ; +-- +--} diff --git a/lib/next-resource/latin/NumeralLat.gfAdjectiveLat.gfAdjectiveLat.gf b/lib/next-resource/latin/NumeralLat.gfAdjectiveLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..c2b61d08a --- /dev/null +++ b/lib/next-resource/latin/NumeralLat.gfAdjectiveLat.gfAdjectiveLat.gf @@ -0,0 +1,95 @@ +concrete NumeralLat of Numeral = CatLat ** open ResLat in { + +lincat + Digit = {s : DForm => CardOrd => Str} ; + Sub10 = {s : DForm => CardOrd => Str ; n : Number} ; + Sub100 = {s : CardOrd => Str ; n : Number} ; + Sub1000 = {s : CardOrd => Str ; n : Number} ; + Sub1000000 = {s : CardOrd => Str ; n : Number} ; + +lin num x = x ; +lin n2 = let two = mkNum "two" "twelve" "twenty" "second" in + {s = \\f,c => case of { + => "twelfth" ; + _ => two.s ! f ! c + } + } ; + +lin n3 = mkNum "three" "thirteen" "thirty" "third" ; +lin n4 = mkNum "four" "fourteen" "forty" "fourth" ; +lin n5 = mkNum "five" "fifteen" "fifty" "fifth" ; +lin n6 = regNum "six" ; +lin n7 = regNum "seven" ; +lin n8 = mkNum "eight" "eighteen" "eighty" "eighth" ; +lin n9 = mkNum "nine" "nineteen" "ninety" "ninth" ; + +lin pot01 = mkNum "one" "eleven" "ten" "first" ** {n = Sg} ; +lin pot0 d = d ** {n = Pl} ; +lin pot110 = regCardOrd "ten" ** {n = Pl} ; +lin pot111 = regCardOrd "eleven" ** {n = Pl} ; +lin pot1to19 d = {s = d.s ! teen} ** {n = Pl} ; +lin pot0as1 n = {s = n.s ! unit} ** {n = n.n} ; +lin pot1 d = {s = d.s ! ten} ** {n = Pl} ; +lin pot1plus d e = { + s = \\c => d.s ! ten ! NCard ++ "-" ++ e.s ! unit ! c ; n = Pl} ; +lin pot1as2 n = n ; +lin pot2 d = {s = \\c => d.s ! unit ! NCard ++ mkCard c "hundred"} ** {n = Pl} ; +lin pot2plus d e = { + s = \\c => d.s ! unit ! NCard ++ "hundred" ++ "and" ++ e.s ! c ; n = Pl} ; +lin pot2as3 n = n ; +lin pot3 n = { + s = \\c => n.s ! NCard ++ mkCard c "thousand" ; n = Pl} ; +lin pot3plus n m = { + s = \\c => n.s ! NCard ++ "thousand" ++ m.s ! c ; n = Pl} ; + +-- numerals as sequences of digits + + lincat + Dig = TDigit ; + + lin + IDig d = d ** {tail = T1} ; + + IIDig d i = { + s = \\o => d.s ! NCard ++ commaIf i.tail ++ i.s ! o ; + n = Pl ; + tail = inc i.tail + } ; + + D_0 = mkDig "0" ; + D_1 = mk3Dig "1" "1st" Sg ; + D_2 = mk2Dig "2" "2nd" ; + D_3 = mk2Dig "3" "3rd" ; + D_4 = mkDig "4" ; + D_5 = mkDig "5" ; + D_6 = mkDig "6" ; + D_7 = mkDig "7" ; + D_8 = mkDig "8" ; + D_9 = mkDig "9" ; + + oper + commaIf : DTail -> Str = \t -> case t of { + T3 => "," ; + _ => [] + } ; + + inc : DTail -> DTail = \t -> case t of { + T1 => T2 ; + T2 => T3 ; + T3 => T1 + } ; + + mk2Dig : Str -> Str -> TDigit = \c,o -> mk3Dig c o Pl ; + mkDig : Str -> TDigit = \c -> mk2Dig c (c + "th") ; + + mk3Dig : Str -> Str -> Number -> TDigit = \c,o,n -> { + s = table {NCard => c ; NOrd => o} ; + n = n + } ; + + TDigit = { + n : Number ; + s : CardOrd => Str + } ; + +} diff --git a/lib/next-resource/latin/OverloadLat.gf b/lib/next-resource/latin/OverloadLat.gf new file mode 100644 index 000000000..466d54b75 --- /dev/null +++ b/lib/next-resource/latin/OverloadLat.gf @@ -0,0 +1 @@ +--resource OverloadLat = Overload with (Grammar = GrammarLat) ; diff --git a/lib/next-resource/latin/OverloadLat.gfAdjectiveLat.gf b/lib/next-resource/latin/OverloadLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..466d54b75 --- /dev/null +++ b/lib/next-resource/latin/OverloadLat.gfAdjectiveLat.gf @@ -0,0 +1 @@ +--resource OverloadLat = Overload with (Grammar = GrammarLat) ; diff --git a/lib/next-resource/latin/OverloadLat.gfAdjectiveLat.gfAdjectiveLat.gf b/lib/next-resource/latin/OverloadLat.gfAdjectiveLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..6ba2235e8 --- /dev/null +++ b/lib/next-resource/latin/OverloadLat.gfAdjectiveLat.gfAdjectiveLat.gf @@ -0,0 +1 @@ +resource OverloadLat = Overload with (Grammar = GrammarLat) ; diff --git a/lib/next-resource/latin/ParadigmsLat.gf b/lib/next-resource/latin/ParadigmsLat.gf new file mode 100644 index 000000000..c47074a88 --- /dev/null +++ b/lib/next-resource/latin/ParadigmsLat.gf @@ -0,0 +1,56 @@ +--# -path=.:../abstract:../../prelude:../common + +--1 Latin Lexical Paradigms +-- +-- Aarne Ranta 2008 +-- +-- This is an API for the user of the resource grammar +-- for adding lexical items. It gives functions for forming +-- expressions of open categories: nouns, adjectives, verbs. +-- +-- Closed categories (determiners, pronouns, conjunctions) are +-- accessed through the resource syntax API, $Structural.gf$. + +resource ParadigmsLat = open + (Predef=Predef), + Prelude, + ResLat, + CatLat + in { + +--2 Parameters +-- +-- To abstract over gender names, we define the following identifiers. + +oper + masculine : Gender ; + feminine : Gender ; + neuter : Gender ; + + mkN = overload { + mkN : (verbum : Str) -> N + = \n -> noun n ** {lock_N = <>} ; + mkN : (verbum, verbi : Str) -> Gender -> N + = \x,y,z -> noun_ngg x y z ** {lock_N = <>} ; + } ; + + + mkV = overload { + mkV : (tacere : Str) -> V + = \v -> verb v ** {lock_V = <>} ; + mkV : (iacio,ieci,iactus,iacere : Str) -> V + = \v,x,y,z -> verb_pppi v x y z ** {lock_V = <>} ; + } ; + + mkV2 = overload { + mkV2 : (amare : Str) -> V2 + = \v -> verb v ** {c = {s = [] ; c = Acc} ; lock_V2 = <>} ; + mkV2 : (facere : V) -> V2 + = \v -> v ** {c = {s = [] ; c = Acc} ; lock_V2 = <>} ; + } ; +--. + masculine = Masc ; + feminine = Fem ; + neuter = Neutr ; + +} diff --git a/lib/next-resource/latin/ParadigmsLat.gfAdjectiveLat.gf b/lib/next-resource/latin/ParadigmsLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..4958d09e3 --- /dev/null +++ b/lib/next-resource/latin/ParadigmsLat.gfAdjectiveLat.gf @@ -0,0 +1,577 @@ +----# -path=.:../abstract:../../prelude:../common +-- +----1 Latlish Lexical Paradigms +---- +---- Aarne Ranta 2003--2005 +---- +---- This is an API for the user of the resource grammar +---- for adding lexical items. It gives functions for forming +---- expressions of open categories: nouns, adjectives, verbs. +---- +---- Closed categories (determiners, pronouns, conjunctions) are +---- accessed through the resource syntax API, $Structural.gf$. +---- +---- The main difference with $MorphoLat.gf$ is that the types +---- referred to are compiled resource grammar types. We have moreover +---- had the design principle of always having existing forms, rather +---- than stems, as string arguments of the paradigms. +---- +---- The structure of functions for each word class $C$ is the following: +---- first we give a handful of patterns that aim to cover all +---- regular cases. Then we give a worst-case function $mkC$, which serves as an +---- escape to construct the most irregular words of type $C$. +---- However, this function should only seldom be needed: we have a +---- separate module [``IrregLat`` ../../english/IrregLat.gf], +---- which covers irregular verbss. +-- +--resource ParadigmsLat = open +-- (Predef=Predef), +-- Prelude, +-- MorphoLat, +-- CatLat +-- in { +----2 Parameters +---- +---- To abstract over gender names, we define the following identifiers. +-- +--oper +-- Gender : Type ; +-- +-- human : Gender ; +-- nonhuman : Gender ; +-- masculine : Gender ; +-- feminine : Gender ; +-- +---- To abstract over number names, we define the following. +-- +-- Number : Type ; +-- +-- singular : Number ; +-- plural : Number ; +-- +---- To abstract over case names, we define the following. +-- +-- Case : Type ; +-- +-- nominative : Case ; +-- genitive : Case ; +-- +---- Prepositions are used in many-argument functions for rection. +---- The resource category $Prep$ is used. +-- +-- +-- +----2 Nouns +-- +---- Nouns are constructed by the function $mkN$, which takes a varying +---- number of arguments. +-- +-- mkN : overload { +-- +---- The regular function captures the variants for nouns ending with +---- "s","sh","x","z" or "y": "kiss - kisses", "flash - flashes"; +---- "fly - flies" (but "toy - toys"), +-- +-- mkN : (flash : Str) -> N ; +-- +---- In practice the worst case is to give singular and plural nominative. +-- +-- mkN : (man,men : Str) -> N ; +-- +---- The theoretical worst case: give all four forms. +-- +-- mkN : (man,men,man's,men's : Str) -> N ; +-- +---- Change gender from the default $nonhuman$. +-- +-- mkN : Gender -> N -> N ; +-- +----3 Compound nouns +---- +---- A compound noun is an uninflected string attached to an inflected noun, +---- such as "baby boom", "chief executive officer". +-- +-- mkN : Str -> N -> N +-- } ; +-- +-- +----3 Relational nouns +---- +---- Relational nouns ("daughter of x") need a preposition. +-- +-- mkN2 : N -> Prep -> N2 ; +-- +---- The most common preposition is "of", and the following is a +---- shortcut for regular relational nouns with "of". +-- +-- regN2 : Str -> N2 ; +-- +---- Use the function $mkPrep$ or see the section on prepositions below to +---- form other prepositions. +---- +---- Three-place relational nouns ("the connection from x to y") need two prepositions. +-- +-- mkN3 : N -> Prep -> Prep -> N3 ; +-- +-- +-- +----3 Proper names and noun phrases +---- +---- Proper names, with a regular genitive, are formed from strings. +-- +-- mkPN : overload { +-- +-- mkPN : Str -> PN ; +-- +---- Sometimes a common noun can be reused as a proper name, e.g. "Bank" +-- +-- mkPN : N -> PN +-- } ; +-- +-- +----2 Adjectives +-- +-- mkA : overload { +-- +---- For regular adjectives, the adverbial and comparison forms are derived. This holds +---- even for cases with the variations "happy - happily - happier - happiest", +---- "free - freely - freer - freest", and "rude - rudest". +-- +-- mkA : (happy : Str) -> A ; +-- +---- However, the duplication of the final consonant cannot be predicted, +---- but a separate case is used to give the comparative +-- +-- mkA : (fat,fatter : Str) -> A ; +-- +---- As many as four forms may be needed. +-- +-- mkA : (good,better,best,well : Str) -> A +-- } ; +-- +---- To force comparison to be formed by "more - most", +---- the following function is used: +-- +-- compoundA : A -> A ; -- -/more/most ridiculous +-- +-- +-- +----3 Two-place adjectives +---- +---- Two-place adjectives need a preposition for their second argument. +-- +-- mkA2 : A -> Prep -> A2 ; +-- +-- +-- +----2 Adverbs +-- +---- Adverbs are not inflected. Most lexical ones have position +---- after the verb. Some can be preverbal (e.g. "always"). +-- +-- mkAdv : Str -> Adv ; +-- mkAdV : Str -> AdV ; +-- +---- Adverbs modifying adjectives and sentences can also be formed. +-- +-- mkAdA : Str -> AdA ; +-- +----2 Prepositions +---- +---- A preposition as used for rection in the lexicon, as well as to +---- build $PP$s in the resource API, just requires a string. +-- +-- mkPrep : Str -> Prep ; +-- noPrep : Prep ; +-- +---- (These two functions are synonyms.) +-- +----2 Verbs +---- +-- +---- Verbs are constructed by the function $mkV$, which takes a varying +---- number of arguments. +-- +-- mkV : overload { +-- +---- The regular verb function recognizes the special cases where the last +---- character is "y" ("cry-cries" but "buy-buys") or a sibilant +---- ("kiss-"kisses", "jazz-jazzes", "rush-rushes", "munch - munches", +---- "fix - fixes"). +-- +-- mkV : (cry : Str) -> V ; +-- +---- Give the present and past forms for regular verbs where +---- the last letter is duplicated in some forms, +---- e.g. "rip - ripped - ripping". +-- +-- mkV : (stop, stopped : Str) -> V ; +-- +---- There is an extensive list of irregular verbs in the module $IrregularLat$. +---- In practice, it is enough to give three forms, +---- e.g. "drink - drank - drunk". +-- +-- mkV : (drink, drank, drunk : Str) -> V ; +-- +---- Irregular verbs with duplicated consonant in the present participle. +-- +-- mkV : (run, ran, run, running : Str) -> V ; +-- +---- Except for "be", the worst case needs five forms: the infinitive and +---- the third person singular present, the past indicative, and the +---- past and present participles. +-- +-- mkV : (go, goes, went, gone, going : Str) -> V +-- }; +-- +---- Verbs with a particle. +---- The particle, such as in "switch on", is given as a string. +-- +-- partV : V -> Str -> V ; +-- +---- Reflexive verbs. +---- By default, verbs are not reflexive; this function makes them that. +-- +-- reflV : V -> V ; +-- +----3 Two-place verbs +---- +---- Two-place verbs need a preposition, except the special case with direct object. +---- (transitive verbs). Notice that a particle comes from the $V$. +-- +-- mkV2 : overload { +-- mkV2 : V -> Prep -> V2 ; -- believe in +-- mkV2 : V -> V2 -- kill +-- }; +-- +----3 Three-place verbs +---- +---- Three-place (ditransitive) verbs need two prepositions, of which +---- the first one or both can be absent. +-- +-- mkV3 : V -> Prep -> Prep -> V3 ; -- speak, with, about +-- dirV3 : V -> Prep -> V3 ; -- give,_,to +-- dirdirV3 : V -> V3 ; -- give,_,_ +-- +----3 Other complement patterns +---- +---- Verbs and adjectives can take complements such as sentences, +---- questions, verb phrases, and adjectives. +-- +-- mkV0 : V -> V0 ; +-- mkVS : V -> VS ; +-- mkV2S : V -> Prep -> V2S ; +-- mkVV : V -> VV ; +-- mkV2V : V -> Prep -> Prep -> V2V ; +-- mkVA : V -> VA ; +-- mkV2A : V -> Prep -> V2A ; +-- mkVQ : V -> VQ ; +-- mkV2Q : V -> Prep -> V2Q ; +-- +-- mkAS : A -> AS ; +-- mkA2S : A -> Prep -> A2S ; +-- mkAV : A -> AV ; +-- mkA2V : A -> Prep -> A2V ; +-- +---- Notice: Categories $V0, AS, A2S, AV, A2V$ are just $A$. +---- $V0$ is just $V$; the second argument is treated as adverb. +-- +-- V0 : Type ; +-- AS, A2S, AV, A2V : Type ; +-- +----. +----2 Definitions of paradigms +---- +---- The definitions should not bother the user of the API. So they are +---- hidden from the document. +-- +-- Gender = MorphoLat.Gender ; +-- Number = MorphoLat.Number ; +-- Case = MorphoLat.Case ; +-- human = Masc ; +-- nonhuman = Neutr ; +-- masculine = Masc ; +-- feminine = Fem ; +-- singular = Sg ; +-- plural = Pl ; +-- nominative = Nom ; +-- genitive = Gen ; +-- +-- Preposition : Type = Str ; -- obsolete +-- +-- regN = \ray -> +-- let rays = add_s ray +-- in +-- mk2N ray rays ; +-- +-- +-- add_s : Str -> Str = \w -> case w of { +-- _ + ("io" | "oo") => w + "s" ; -- radio, bamboo +-- _ + ("s" | "z" | "x" | "sh" | "ch" | "o") => w + "es" ; -- bus, hero +-- _ + ("a" | "o" | "u" | "e") + "y" => w + "s" ; -- boy +-- x + "y" => x + "ies" ; -- fly +-- _ => w + "s" -- car +-- } ; +-- +-- mk2N = \man,men -> +-- let mens = case last men of { +-- "s" => men + "'" ; +-- _ => men + "'s" +-- } +-- in +-- mk4N man men (man + "'s") mens ; +-- +-- mk4N = \man,men,man's,men's -> +-- mkNoun man man's men men's ** {g = Neutr ; lock_N = <>} ; +-- +-- genderN g man = {s = man.s ; g = g ; lock_N = <>} ; +-- +-- compoundN s n = {s = \\x,y => s ++ n.s ! x ! y ; g=n.g ; lock_N = <>} ; +-- +-- mkPN = overload { +-- mkPN : Str -> PN = regPN ; +-- mkPN : N -> PN = nounPN +-- } ; +-- +-- +-- mkN2 = \n,p -> n ** {lock_N2 = <> ; c2 = p.s} ; +-- regN2 n = mkN2 (regN n) (mkPrep "of") ; +-- mkN3 = \n,p,q -> n ** {lock_N3 = <> ; c2 = p.s ; c3 = q.s} ; +-- +----3 Relational common noun phrases +---- +---- In some cases, you may want to make a complex $CN$ into a +---- relational noun (e.g. "the old town hall of"). +-- +-- cnN2 : CN -> Prep -> N2 ; +-- cnN3 : CN -> Prep -> Prep -> N3 ; +-- +---- This is obsolete. +-- cnN2 = \n,p -> n ** {lock_N2 = <> ; c2 = p.s} ; +-- cnN3 = \n,p,q -> n ** {lock_N3 = <> ; c2 = p.s ; c3 = q.s} ; +-- +-- regPN n = regGenPN n human ; +-- regGenPN n g = nameReg n g ** {g = g ; lock_PN = <>} ; +-- nounPN n = {s = n.s ! singular ; g = n.g ; lock_PN = <>} ; +-- +-- mk2A a b = mkAdjective a a a b ** {lock_A = <>} ; +-- regA a = regADeg a ** {lock_A = <>} ; +-- +-- mkA2 a p = a ** {c2 = p.s ; lock_A2 = <>} ; +-- +-- ADeg = A ; ---- +-- +-- mkADeg a b c d = mkAdjective a b c d ** {lock_A = <>} ; +-- +-- regADeg happy = +-- let +-- happ = init happy ; +-- y = last happy ; +-- happie = case y of { +-- "y" => happ + "ie" ; +-- "e" => happy ; +-- _ => happy + "e" +-- } ; +-- happily : Str = case happy of { +-- _ + "y" => happ + "ily" ; +-- _ + "ll" => happy + "y" ; +-- _ => happy + "ly" +-- } ; +-- in mkADeg happy (happie + "r") (happie + "st") happily ; +-- +-- duplADeg fat = +-- mkADeg fat +-- (fat + last fat + "er") (fat + last fat + "est") (fat + "ly") ; +-- +-- compoundADeg a = +-- let ad = (a.s ! AAdj Posit) +-- in mkADeg ad ("more" ++ ad) ("most" ++ ad) (a.s ! AAdv) ; +-- +-- adegA a = a ; +-- +-- mkAdv x = ss x ** {lock_Adv = <>} ; +-- mkAdV x = ss x ** {lock_AdV = <>} ; +-- mkAdA x = ss x ** {lock_AdA = <>} ; +-- +-- mkPrep p = ss p ** {lock_Prep = <>} ; +-- noPrep = mkPrep [] ; +-- +-- mk5V a b c d e = mkVerb a b c d e ** {s1 = [] ; lock_V = <>} ; +-- +-- regV cry = +-- let +-- cr = init cry ; +-- y = last cry ; +-- cries = (regN cry).s ! Pl ! Nom ; -- ! +-- crie = init cries ; +-- cried = case last crie of { +-- "e" => crie + "d" ; +-- _ => crie + "ed" +-- } ; +-- crying = case y of { +-- "e" => case last cr of { +-- "e" => cry + "ing" ; +-- _ => cr + "ing" +-- } ; +-- _ => cry + "ing" +-- } +-- in mk5V cry cries cried cried crying ; +-- +-- reg2V fit fitted = +-- let fitt = Predef.tk 2 fitted ; +-- in mk5V fit (fit + "s") (fitt + "ed") (fitt + "ed") (fitt + "ing") ; +-- +-- regDuplV fit = +-- case last fit of { +-- ("a" | "e" | "i" | "o" | "u" | "y") => +-- Predef.error (["final duplication makes no sense for"] ++ fit) ; +-- t => +-- let fitt = fit + t in +-- mk5V fit (fit + "s") (fitt + "ed") (fitt + "ed") (fitt + "ing") +-- } ; +-- +-- irregV x y z = let reg = (regV x).s in +-- mk5V x (reg ! VPres) y z (reg ! VPresPart) ** {s1 = [] ; lock_V = <>} ; +-- +-- irreg4V x y z w = let reg = (regV x).s in +-- mk5V x (reg ! VPres) y z w ** {s1 = [] ; lock_V = <>} ; +-- +-- irregDuplV fit y z = +-- let +-- fitting = (regDuplV fit).s ! VPresPart +-- in +-- mk5V fit (fit + "s") y z fitting ; +-- +-- partV v p = verbPart v p ** {lock_V = <>} ; +-- reflV v = {s = v.s ; part = v.part ; lock_V = v.lock_V ; isRefl = True} ; +-- +-- prepV2 v p = v ** {s = v.s ; s1 = v.s1 ; c2 = p.s ; lock_V2 = <>} ; +-- dirV2 v = prepV2 v noPrep ; +-- +-- mkV3 v p q = v ** {s = v.s ; s1 = v.s1 ; c2 = p.s ; c3 = q.s ; lock_V3 = <>} ; +-- dirV3 v p = mkV3 v noPrep p ; +-- dirdirV3 v = dirV3 v noPrep ; +-- +-- mkVS v = v ** {lock_VS = <>} ; +-- mkVV v = { +-- s = table {VVF vf => v.s ! vf ; _ => variants {}} ; +-- isAux = False ; lock_VV = <> +-- } ; +-- mkVQ v = v ** {lock_VQ = <>} ; +-- +-- V0 : Type = V ; +---- V2S, V2V, V2Q : Type = V2 ; +-- AS, A2S, AV : Type = A ; +-- A2V : Type = A2 ; +-- +-- mkV0 v = v ** {lock_V = <>} ; +-- mkV2S v p = prepV2 v p ** {lock_V2S = <>} ; +-- mkV2V v p t = prepV2 v p ** {isAux = False ; lock_V2V = <>} ; +-- mkVA v = v ** {lock_VA = <>} ; +-- mkV2A v p = prepV2 v p ** {lock_V2A = <>} ; +-- mkV2Q v p = prepV2 v p ** {lock_V2Q = <>} ; +-- +-- mkAS v = v ** {lock_A = <>} ; +-- mkA2S v p = mkA2 v p ** {lock_A = <>} ; +-- mkAV v = v ** {lock_A = <>} ; +-- mkA2V v p = mkA2 v p ** {lock_A2 = <>} ; +-- +-- +---- pre-overload API and overload definitions +-- +-- mk4N : (man,men,man's,men's : Str) -> N ; +-- regN : Str -> N ; +-- mk2N : (man,men : Str) -> N ; +-- genderN : Gender -> N -> N ; +-- compoundN : Str -> N -> N ; +-- +-- mkN = overload { +-- mkN : (man,men,man's,men's : Str) -> N = mk4N ; +-- mkN : Str -> N = regN ; +-- mkN : (man,men : Str) -> N = mk2N ; +-- mkN : Gender -> N -> N = genderN ; +-- mkN : Str -> N -> N = compoundN +-- } ; +-- +-- +-- mk2A : (free,freely : Str) -> A ; +-- regA : Str -> A ; +-- +-- mkA = overload { +-- mkA : Str -> A = regA ; +-- mkA : (fat,fatter : Str) -> A = \fat,fatter -> +-- mkAdjective fat fatter (init fatter + "st") (fat + "ly") ** {lock_A = <>} ; +-- mkA : (good,better,best,well : Str) -> A = \a,b,c,d -> +-- mkAdjective a b c d ** {lock_A = <>} +-- } ; +-- +-- compoundA = compoundADeg ; +-- +-- +-- mk5V : (go, goes, went, gone, going : Str) -> V ; +-- regV : (cry : Str) -> V ; +-- reg2V : (stop, stopped : Str) -> V; +-- irregV : (drink, drank, drunk : Str) -> V ; +-- irreg4V : (run, ran, run, running : Str) -> V ; +-- +-- -- Use reg2V instead +-- regDuplV : Str -> V ; +-- -- Use irreg4V instead +-- irregDuplV : (get, got, gotten : Str) -> V ; +-- +-- mkV = overload { +-- mkV : (cry : Str) -> V = regV ; +-- mkV : (stop, stopped : Str) -> V = reg2V ; +-- mkV : (drink, drank, drunk : Str) -> V = irregV ; +-- mkV : (run, ran, run, running : Str) -> V = irreg4V ; +-- mkV : (go, goes, went, gone, going : Str) -> V = mk5V +-- }; +-- +-- prepV2 : V -> Prep -> V2 ; +-- dirV2 : V -> V2 ; +-- +-- mkV2 = overload { +-- mkV2 : V -> Prep -> V2 = prepV2; +-- mkV2 : V -> V2 = dirV2 +-- }; +-- +-- +------ obsolete +-- +---- Comparison adjectives may two more forms. +-- +-- ADeg : Type ; +-- +-- mkADeg : (good,better,best,well : Str) -> ADeg ; +-- +---- The regular pattern recognizes two common variations: +---- "-e" ("rude" - "ruder" - "rudest") and +---- "-y" ("happy - happier - happiest - happily") +-- +-- regADeg : Str -> ADeg ; -- long, longer, longest +-- +---- However, the duplication of the final consonant is nor predicted, +---- but a separate pattern is used: +-- +-- duplADeg : Str -> ADeg ; -- fat, fatter, fattest +-- +---- If comparison is formed by "more", "most", as in general for +---- long adjective, the following pattern is used: +-- +-- compoundADeg : A -> ADeg ; -- -/more/most ridiculous +-- +---- From a given $ADeg$, it is possible to get back to $A$. +-- +-- adegA : ADeg -> A ; +-- +-- +-- regPN : Str -> PN ; +-- regGenPN : Str -> Gender -> PN ; -- John, John's +-- +---- Sometimes you can reuse a common noun as a proper name, e.g. "Bank". +-- +-- nounPN : N -> PN ; +-- +-- +-- +--} ; diff --git a/lib/next-resource/latin/ParadigmsLat.gfAdjectiveLat.gfAdjectiveLat.gf b/lib/next-resource/latin/ParadigmsLat.gfAdjectiveLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..5e5f3d925 --- /dev/null +++ b/lib/next-resource/latin/ParadigmsLat.gfAdjectiveLat.gfAdjectiveLat.gf @@ -0,0 +1,577 @@ +--# -path=.:../abstract:../../prelude:../common + +--1 Latlish Lexical Paradigms +-- +-- Aarne Ranta 2003--2005 +-- +-- This is an API for the user of the resource grammar +-- for adding lexical items. It gives functions for forming +-- expressions of open categories: nouns, adjectives, verbs. +-- +-- Closed categories (determiners, pronouns, conjunctions) are +-- accessed through the resource syntax API, $Structural.gf$. +-- +-- The main difference with $MorphoLat.gf$ is that the types +-- referred to are compiled resource grammar types. We have moreover +-- had the design principle of always having existing forms, rather +-- than stems, as string arguments of the paradigms. +-- +-- The structure of functions for each word class $C$ is the following: +-- first we give a handful of patterns that aim to cover all +-- regular cases. Then we give a worst-case function $mkC$, which serves as an +-- escape to construct the most irregular words of type $C$. +-- However, this function should only seldom be needed: we have a +-- separate module [``IrregLat`` ../../english/IrregLat.gf], +-- which covers irregular verbss. + +resource ParadigmsLat = open + (Predef=Predef), + Prelude, + MorphoLat, + CatLat + in { +--2 Parameters +-- +-- To abstract over gender names, we define the following identifiers. + +oper + Gender : Type ; + + human : Gender ; + nonhuman : Gender ; + masculine : Gender ; + feminine : Gender ; + +-- To abstract over number names, we define the following. + + Number : Type ; + + singular : Number ; + plural : Number ; + +-- To abstract over case names, we define the following. + + Case : Type ; + + nominative : Case ; + genitive : Case ; + +-- Prepositions are used in many-argument functions for rection. +-- The resource category $Prep$ is used. + + + +--2 Nouns + +-- Nouns are constructed by the function $mkN$, which takes a varying +-- number of arguments. + + mkN : overload { + +-- The regular function captures the variants for nouns ending with +-- "s","sh","x","z" or "y": "kiss - kisses", "flash - flashes"; +-- "fly - flies" (but "toy - toys"), + + mkN : (flash : Str) -> N ; + +-- In practice the worst case is to give singular and plural nominative. + + mkN : (man,men : Str) -> N ; + +-- The theoretical worst case: give all four forms. + + mkN : (man,men,man's,men's : Str) -> N ; + +-- Change gender from the default $nonhuman$. + + mkN : Gender -> N -> N ; + +--3 Compound nouns +-- +-- A compound noun is an uninflected string attached to an inflected noun, +-- such as "baby boom", "chief executive officer". + + mkN : Str -> N -> N + } ; + + +--3 Relational nouns +-- +-- Relational nouns ("daughter of x") need a preposition. + + mkN2 : N -> Prep -> N2 ; + +-- The most common preposition is "of", and the following is a +-- shortcut for regular relational nouns with "of". + + regN2 : Str -> N2 ; + +-- Use the function $mkPrep$ or see the section on prepositions below to +-- form other prepositions. +-- +-- Three-place relational nouns ("the connection from x to y") need two prepositions. + + mkN3 : N -> Prep -> Prep -> N3 ; + + + +--3 Proper names and noun phrases +-- +-- Proper names, with a regular genitive, are formed from strings. + + mkPN : overload { + + mkPN : Str -> PN ; + +-- Sometimes a common noun can be reused as a proper name, e.g. "Bank" + + mkPN : N -> PN + } ; + + +--2 Adjectives + + mkA : overload { + +-- For regular adjectives, the adverbial and comparison forms are derived. This holds +-- even for cases with the variations "happy - happily - happier - happiest", +-- "free - freely - freer - freest", and "rude - rudest". + + mkA : (happy : Str) -> A ; + +-- However, the duplication of the final consonant cannot be predicted, +-- but a separate case is used to give the comparative + + mkA : (fat,fatter : Str) -> A ; + +-- As many as four forms may be needed. + + mkA : (good,better,best,well : Str) -> A + } ; + +-- To force comparison to be formed by "more - most", +-- the following function is used: + + compoundA : A -> A ; -- -/more/most ridiculous + + + +--3 Two-place adjectives +-- +-- Two-place adjectives need a preposition for their second argument. + + mkA2 : A -> Prep -> A2 ; + + + +--2 Adverbs + +-- Adverbs are not inflected. Most lexical ones have position +-- after the verb. Some can be preverbal (e.g. "always"). + + mkAdv : Str -> Adv ; + mkAdV : Str -> AdV ; + +-- Adverbs modifying adjectives and sentences can also be formed. + + mkAdA : Str -> AdA ; + +--2 Prepositions +-- +-- A preposition as used for rection in the lexicon, as well as to +-- build $PP$s in the resource API, just requires a string. + + mkPrep : Str -> Prep ; + noPrep : Prep ; + +-- (These two functions are synonyms.) + +--2 Verbs +-- + +-- Verbs are constructed by the function $mkV$, which takes a varying +-- number of arguments. + + mkV : overload { + +-- The regular verb function recognizes the special cases where the last +-- character is "y" ("cry-cries" but "buy-buys") or a sibilant +-- ("kiss-"kisses", "jazz-jazzes", "rush-rushes", "munch - munches", +-- "fix - fixes"). + + mkV : (cry : Str) -> V ; + +-- Give the present and past forms for regular verbs where +-- the last letter is duplicated in some forms, +-- e.g. "rip - ripped - ripping". + + mkV : (stop, stopped : Str) -> V ; + +-- There is an extensive list of irregular verbs in the module $IrregularLat$. +-- In practice, it is enough to give three forms, +-- e.g. "drink - drank - drunk". + + mkV : (drink, drank, drunk : Str) -> V ; + +-- Irregular verbs with duplicated consonant in the present participle. + + mkV : (run, ran, run, running : Str) -> V ; + +-- Except for "be", the worst case needs five forms: the infinitive and +-- the third person singular present, the past indicative, and the +-- past and present participles. + + mkV : (go, goes, went, gone, going : Str) -> V + }; + +-- Verbs with a particle. +-- The particle, such as in "switch on", is given as a string. + + partV : V -> Str -> V ; + +-- Reflexive verbs. +-- By default, verbs are not reflexive; this function makes them that. + + reflV : V -> V ; + +--3 Two-place verbs +-- +-- Two-place verbs need a preposition, except the special case with direct object. +-- (transitive verbs). Notice that a particle comes from the $V$. + + mkV2 : overload { + mkV2 : V -> Prep -> V2 ; -- believe in + mkV2 : V -> V2 -- kill + }; + +--3 Three-place verbs +-- +-- Three-place (ditransitive) verbs need two prepositions, of which +-- the first one or both can be absent. + + mkV3 : V -> Prep -> Prep -> V3 ; -- speak, with, about + dirV3 : V -> Prep -> V3 ; -- give,_,to + dirdirV3 : V -> V3 ; -- give,_,_ + +--3 Other complement patterns +-- +-- Verbs and adjectives can take complements such as sentences, +-- questions, verb phrases, and adjectives. + + mkV0 : V -> V0 ; + mkVS : V -> VS ; + mkV2S : V -> Prep -> V2S ; + mkVV : V -> VV ; + mkV2V : V -> Prep -> Prep -> V2V ; + mkVA : V -> VA ; + mkV2A : V -> Prep -> V2A ; + mkVQ : V -> VQ ; + mkV2Q : V -> Prep -> V2Q ; + + mkAS : A -> AS ; + mkA2S : A -> Prep -> A2S ; + mkAV : A -> AV ; + mkA2V : A -> Prep -> A2V ; + +-- Notice: Categories $V0, AS, A2S, AV, A2V$ are just $A$. +-- $V0$ is just $V$; the second argument is treated as adverb. + + V0 : Type ; + AS, A2S, AV, A2V : Type ; + +--. +--2 Definitions of paradigms +-- +-- The definitions should not bother the user of the API. So they are +-- hidden from the document. + + Gender = MorphoLat.Gender ; + Number = MorphoLat.Number ; + Case = MorphoLat.Case ; + human = Masc ; + nonhuman = Neutr ; + masculine = Masc ; + feminine = Fem ; + singular = Sg ; + plural = Pl ; + nominative = Nom ; + genitive = Gen ; + + Preposition : Type = Str ; -- obsolete + + regN = \ray -> + let rays = add_s ray + in + mk2N ray rays ; + + + add_s : Str -> Str = \w -> case w of { + _ + ("io" | "oo") => w + "s" ; -- radio, bamboo + _ + ("s" | "z" | "x" | "sh" | "ch" | "o") => w + "es" ; -- bus, hero + _ + ("a" | "o" | "u" | "e") + "y" => w + "s" ; -- boy + x + "y" => x + "ies" ; -- fly + _ => w + "s" -- car + } ; + + mk2N = \man,men -> + let mens = case last men of { + "s" => men + "'" ; + _ => men + "'s" + } + in + mk4N man men (man + "'s") mens ; + + mk4N = \man,men,man's,men's -> + mkNoun man man's men men's ** {g = Neutr ; lock_N = <>} ; + + genderN g man = {s = man.s ; g = g ; lock_N = <>} ; + + compoundN s n = {s = \\x,y => s ++ n.s ! x ! y ; g=n.g ; lock_N = <>} ; + + mkPN = overload { + mkPN : Str -> PN = regPN ; + mkPN : N -> PN = nounPN + } ; + + + mkN2 = \n,p -> n ** {lock_N2 = <> ; c2 = p.s} ; + regN2 n = mkN2 (regN n) (mkPrep "of") ; + mkN3 = \n,p,q -> n ** {lock_N3 = <> ; c2 = p.s ; c3 = q.s} ; + +--3 Relational common noun phrases +-- +-- In some cases, you may want to make a complex $CN$ into a +-- relational noun (e.g. "the old town hall of"). + + cnN2 : CN -> Prep -> N2 ; + cnN3 : CN -> Prep -> Prep -> N3 ; + +-- This is obsolete. + cnN2 = \n,p -> n ** {lock_N2 = <> ; c2 = p.s} ; + cnN3 = \n,p,q -> n ** {lock_N3 = <> ; c2 = p.s ; c3 = q.s} ; + + regPN n = regGenPN n human ; + regGenPN n g = nameReg n g ** {g = g ; lock_PN = <>} ; + nounPN n = {s = n.s ! singular ; g = n.g ; lock_PN = <>} ; + + mk2A a b = mkAdjective a a a b ** {lock_A = <>} ; + regA a = regADeg a ** {lock_A = <>} ; + + mkA2 a p = a ** {c2 = p.s ; lock_A2 = <>} ; + + ADeg = A ; ---- + + mkADeg a b c d = mkAdjective a b c d ** {lock_A = <>} ; + + regADeg happy = + let + happ = init happy ; + y = last happy ; + happie = case y of { + "y" => happ + "ie" ; + "e" => happy ; + _ => happy + "e" + } ; + happily : Str = case happy of { + _ + "y" => happ + "ily" ; + _ + "ll" => happy + "y" ; + _ => happy + "ly" + } ; + in mkADeg happy (happie + "r") (happie + "st") happily ; + + duplADeg fat = + mkADeg fat + (fat + last fat + "er") (fat + last fat + "est") (fat + "ly") ; + + compoundADeg a = + let ad = (a.s ! AAdj Posit) + in mkADeg ad ("more" ++ ad) ("most" ++ ad) (a.s ! AAdv) ; + + adegA a = a ; + + mkAdv x = ss x ** {lock_Adv = <>} ; + mkAdV x = ss x ** {lock_AdV = <>} ; + mkAdA x = ss x ** {lock_AdA = <>} ; + + mkPrep p = ss p ** {lock_Prep = <>} ; + noPrep = mkPrep [] ; + + mk5V a b c d e = mkVerb a b c d e ** {s1 = [] ; lock_V = <>} ; + + regV cry = + let + cr = init cry ; + y = last cry ; + cries = (regN cry).s ! Pl ! Nom ; -- ! + crie = init cries ; + cried = case last crie of { + "e" => crie + "d" ; + _ => crie + "ed" + } ; + crying = case y of { + "e" => case last cr of { + "e" => cry + "ing" ; + _ => cr + "ing" + } ; + _ => cry + "ing" + } + in mk5V cry cries cried cried crying ; + + reg2V fit fitted = + let fitt = Predef.tk 2 fitted ; + in mk5V fit (fit + "s") (fitt + "ed") (fitt + "ed") (fitt + "ing") ; + + regDuplV fit = + case last fit of { + ("a" | "e" | "i" | "o" | "u" | "y") => + Predef.error (["final duplication makes no sense for"] ++ fit) ; + t => + let fitt = fit + t in + mk5V fit (fit + "s") (fitt + "ed") (fitt + "ed") (fitt + "ing") + } ; + + irregV x y z = let reg = (regV x).s in + mk5V x (reg ! VPres) y z (reg ! VPresPart) ** {s1 = [] ; lock_V = <>} ; + + irreg4V x y z w = let reg = (regV x).s in + mk5V x (reg ! VPres) y z w ** {s1 = [] ; lock_V = <>} ; + + irregDuplV fit y z = + let + fitting = (regDuplV fit).s ! VPresPart + in + mk5V fit (fit + "s") y z fitting ; + + partV v p = verbPart v p ** {lock_V = <>} ; + reflV v = {s = v.s ; part = v.part ; lock_V = v.lock_V ; isRefl = True} ; + + prepV2 v p = v ** {s = v.s ; s1 = v.s1 ; c2 = p.s ; lock_V2 = <>} ; + dirV2 v = prepV2 v noPrep ; + + mkV3 v p q = v ** {s = v.s ; s1 = v.s1 ; c2 = p.s ; c3 = q.s ; lock_V3 = <>} ; + dirV3 v p = mkV3 v noPrep p ; + dirdirV3 v = dirV3 v noPrep ; + + mkVS v = v ** {lock_VS = <>} ; + mkVV v = { + s = table {VVF vf => v.s ! vf ; _ => variants {}} ; + isAux = False ; lock_VV = <> + } ; + mkVQ v = v ** {lock_VQ = <>} ; + + V0 : Type = V ; +-- V2S, V2V, V2Q : Type = V2 ; + AS, A2S, AV : Type = A ; + A2V : Type = A2 ; + + mkV0 v = v ** {lock_V = <>} ; + mkV2S v p = prepV2 v p ** {lock_V2S = <>} ; + mkV2V v p t = prepV2 v p ** {isAux = False ; lock_V2V = <>} ; + mkVA v = v ** {lock_VA = <>} ; + mkV2A v p = prepV2 v p ** {lock_V2A = <>} ; + mkV2Q v p = prepV2 v p ** {lock_V2Q = <>} ; + + mkAS v = v ** {lock_A = <>} ; + mkA2S v p = mkA2 v p ** {lock_A = <>} ; + mkAV v = v ** {lock_A = <>} ; + mkA2V v p = mkA2 v p ** {lock_A2 = <>} ; + + +-- pre-overload API and overload definitions + + mk4N : (man,men,man's,men's : Str) -> N ; + regN : Str -> N ; + mk2N : (man,men : Str) -> N ; + genderN : Gender -> N -> N ; + compoundN : Str -> N -> N ; + + mkN = overload { + mkN : (man,men,man's,men's : Str) -> N = mk4N ; + mkN : Str -> N = regN ; + mkN : (man,men : Str) -> N = mk2N ; + mkN : Gender -> N -> N = genderN ; + mkN : Str -> N -> N = compoundN + } ; + + + mk2A : (free,freely : Str) -> A ; + regA : Str -> A ; + + mkA = overload { + mkA : Str -> A = regA ; + mkA : (fat,fatter : Str) -> A = \fat,fatter -> + mkAdjective fat fatter (init fatter + "st") (fat + "ly") ** {lock_A = <>} ; + mkA : (good,better,best,well : Str) -> A = \a,b,c,d -> + mkAdjective a b c d ** {lock_A = <>} + } ; + + compoundA = compoundADeg ; + + + mk5V : (go, goes, went, gone, going : Str) -> V ; + regV : (cry : Str) -> V ; + reg2V : (stop, stopped : Str) -> V; + irregV : (drink, drank, drunk : Str) -> V ; + irreg4V : (run, ran, run, running : Str) -> V ; + + -- Use reg2V instead + regDuplV : Str -> V ; + -- Use irreg4V instead + irregDuplV : (get, got, gotten : Str) -> V ; + + mkV = overload { + mkV : (cry : Str) -> V = regV ; + mkV : (stop, stopped : Str) -> V = reg2V ; + mkV : (drink, drank, drunk : Str) -> V = irregV ; + mkV : (run, ran, run, running : Str) -> V = irreg4V ; + mkV : (go, goes, went, gone, going : Str) -> V = mk5V + }; + + prepV2 : V -> Prep -> V2 ; + dirV2 : V -> V2 ; + + mkV2 = overload { + mkV2 : V -> Prep -> V2 = prepV2; + mkV2 : V -> V2 = dirV2 + }; + + +---- obsolete + +-- Comparison adjectives may two more forms. + + ADeg : Type ; + + mkADeg : (good,better,best,well : Str) -> ADeg ; + +-- The regular pattern recognizes two common variations: +-- "-e" ("rude" - "ruder" - "rudest") and +-- "-y" ("happy - happier - happiest - happily") + + regADeg : Str -> ADeg ; -- long, longer, longest + +-- However, the duplication of the final consonant is nor predicted, +-- but a separate pattern is used: + + duplADeg : Str -> ADeg ; -- fat, fatter, fattest + +-- If comparison is formed by "more", "most", as in general for +-- long adjective, the following pattern is used: + + compoundADeg : A -> ADeg ; -- -/more/most ridiculous + +-- From a given $ADeg$, it is possible to get back to $A$. + + adegA : ADeg -> A ; + + + regPN : Str -> PN ; + regGenPN : Str -> Gender -> PN ; -- John, John's + +-- Sometimes you can reuse a common noun as a proper name, e.g. "Bank". + + nounPN : N -> PN ; + + + +} ; diff --git a/lib/next-resource/latin/PhraseLat.gf b/lib/next-resource/latin/PhraseLat.gf new file mode 100644 index 000000000..1c92d447b --- /dev/null +++ b/lib/next-resource/latin/PhraseLat.gf @@ -0,0 +1,24 @@ +--concrete PhraseLat of Phrase = CatLat ** open Prelude, ResLat in { +-- +-- lin +-- PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ; +-- +-- UttS s = s ; +-- UttQS qs = {s = qs.s ! QDir} ; +-- UttImpSg pol imp = {s = pol.s ++ imp.s ! contrNeg True pol.p ! ImpF Sg False} ; +-- UttImpPl pol imp = {s = pol.s ++ imp.s ! contrNeg True pol.p ! ImpF Pl False} ; +-- UttImpPol pol imp = {s = pol.s ++ imp.s ! contrNeg True pol.p ! ImpF Sg True} ; +-- +-- UttIP ip = {s = ip.s ! Nom} ; --- Acc also +-- UttIAdv iadv = iadv ; +-- UttNP np = {s = np.s ! Nom} ; +-- UttVP vp = {s = infVP False vp (agrP3 Sg)} ; +-- UttAdv adv = adv ; +-- +-- NoPConj = {s = []} ; +-- PConjConj conj = {s = conj.s2} ; --- +-- +-- NoVoc = {s = []} ; +-- VocNP np = {s = "," ++ np.s ! Nom} ; +-- +--} diff --git a/lib/next-resource/latin/PhraseLat.gfAdjectiveLat.gf b/lib/next-resource/latin/PhraseLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..1c92d447b --- /dev/null +++ b/lib/next-resource/latin/PhraseLat.gfAdjectiveLat.gf @@ -0,0 +1,24 @@ +--concrete PhraseLat of Phrase = CatLat ** open Prelude, ResLat in { +-- +-- lin +-- PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ; +-- +-- UttS s = s ; +-- UttQS qs = {s = qs.s ! QDir} ; +-- UttImpSg pol imp = {s = pol.s ++ imp.s ! contrNeg True pol.p ! ImpF Sg False} ; +-- UttImpPl pol imp = {s = pol.s ++ imp.s ! contrNeg True pol.p ! ImpF Pl False} ; +-- UttImpPol pol imp = {s = pol.s ++ imp.s ! contrNeg True pol.p ! ImpF Sg True} ; +-- +-- UttIP ip = {s = ip.s ! Nom} ; --- Acc also +-- UttIAdv iadv = iadv ; +-- UttNP np = {s = np.s ! Nom} ; +-- UttVP vp = {s = infVP False vp (agrP3 Sg)} ; +-- UttAdv adv = adv ; +-- +-- NoPConj = {s = []} ; +-- PConjConj conj = {s = conj.s2} ; --- +-- +-- NoVoc = {s = []} ; +-- VocNP np = {s = "," ++ np.s ! Nom} ; +-- +--} diff --git a/lib/next-resource/latin/PhraseLat.gfAdjectiveLat.gfAdjectiveLat.gf b/lib/next-resource/latin/PhraseLat.gfAdjectiveLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..38cc6c38b --- /dev/null +++ b/lib/next-resource/latin/PhraseLat.gfAdjectiveLat.gfAdjectiveLat.gf @@ -0,0 +1,24 @@ +concrete PhraseLat of Phrase = CatLat ** open Prelude, ResLat in { + + lin + PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ; + + UttS s = s ; + UttQS qs = {s = qs.s ! QDir} ; + UttImpSg pol imp = {s = pol.s ++ imp.s ! contrNeg True pol.p ! ImpF Sg False} ; + UttImpPl pol imp = {s = pol.s ++ imp.s ! contrNeg True pol.p ! ImpF Pl False} ; + UttImpPol pol imp = {s = pol.s ++ imp.s ! contrNeg True pol.p ! ImpF Sg True} ; + + UttIP ip = {s = ip.s ! Nom} ; --- Acc also + UttIAdv iadv = iadv ; + UttNP np = {s = np.s ! Nom} ; + UttVP vp = {s = infVP False vp (agrP3 Sg)} ; + UttAdv adv = adv ; + + NoPConj = {s = []} ; + PConjConj conj = {s = conj.s2} ; --- + + NoVoc = {s = []} ; + VocNP np = {s = "," ++ np.s ! Nom} ; + +} diff --git a/lib/next-resource/latin/QuestionLat.gf b/lib/next-resource/latin/QuestionLat.gf new file mode 100644 index 000000000..834fabcd7 --- /dev/null +++ b/lib/next-resource/latin/QuestionLat.gf @@ -0,0 +1,55 @@ +--concrete QuestionLat of Question = CatLat ** open ResLat, Prelude in { +-- +-- flags optimize=all_subs ; +-- +-- lin +-- +-- QuestCl cl = { +-- s = \\t,a,p => +-- let cls = cl.s ! t ! a ! p +-- in table { +-- QDir => cls ! OQuest ; +-- QIndir => "if" ++ cls ! ODir +-- } ---- "whether" in ExtLat +-- } ; +-- +-- QuestVP qp vp = +-- let cl = mkClause (qp.s ! Nom) (agrP3 qp.n) vp +-- in {s = \\t,a,b,_ => cl.s ! t ! a ! b ! ODir} ; +-- +-- QuestSlash ip slash = +-- mkQuestion (ss (slash.c2 ++ ip.s ! Acc)) slash ; +-- --- stranding in ExratLat +-- +-- QuestIAdv iadv cl = mkQuestion iadv cl ; +-- +-- QuestIComp icomp np = +-- mkQuestion icomp (mkClause (np.s ! Nom) np.a (predAux auxBe)) ; +-- +-- +-- PrepIP p ip = {s = p.s ++ ip.s ! Acc} ; +-- +-- AdvIP ip adv = { +-- s = \\c => ip.s ! c ++ adv.s ; +-- n = ip.n +-- } ; +-- +-- IdetCN idet cn = { +-- s = \\c => idet.s ++ cn.s ! idet.n ! c ; +-- n = idet.n +-- } ; +-- +-- IdetIP idet = { +-- s = \\c => idet.s ; +-- n = idet.n +-- } ; +-- +-- IdetQuant idet num = { +-- s = idet.s ! num.n ++ num.s ; +-- n = num.n +-- } ; +-- +-- CompIAdv a = a ; +-- CompIP p = ss (p.s ! Nom) ; +-- +--} diff --git a/lib/next-resource/latin/QuestionLat.gfAdjectiveLat.gf b/lib/next-resource/latin/QuestionLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..834fabcd7 --- /dev/null +++ b/lib/next-resource/latin/QuestionLat.gfAdjectiveLat.gf @@ -0,0 +1,55 @@ +--concrete QuestionLat of Question = CatLat ** open ResLat, Prelude in { +-- +-- flags optimize=all_subs ; +-- +-- lin +-- +-- QuestCl cl = { +-- s = \\t,a,p => +-- let cls = cl.s ! t ! a ! p +-- in table { +-- QDir => cls ! OQuest ; +-- QIndir => "if" ++ cls ! ODir +-- } ---- "whether" in ExtLat +-- } ; +-- +-- QuestVP qp vp = +-- let cl = mkClause (qp.s ! Nom) (agrP3 qp.n) vp +-- in {s = \\t,a,b,_ => cl.s ! t ! a ! b ! ODir} ; +-- +-- QuestSlash ip slash = +-- mkQuestion (ss (slash.c2 ++ ip.s ! Acc)) slash ; +-- --- stranding in ExratLat +-- +-- QuestIAdv iadv cl = mkQuestion iadv cl ; +-- +-- QuestIComp icomp np = +-- mkQuestion icomp (mkClause (np.s ! Nom) np.a (predAux auxBe)) ; +-- +-- +-- PrepIP p ip = {s = p.s ++ ip.s ! Acc} ; +-- +-- AdvIP ip adv = { +-- s = \\c => ip.s ! c ++ adv.s ; +-- n = ip.n +-- } ; +-- +-- IdetCN idet cn = { +-- s = \\c => idet.s ++ cn.s ! idet.n ! c ; +-- n = idet.n +-- } ; +-- +-- IdetIP idet = { +-- s = \\c => idet.s ; +-- n = idet.n +-- } ; +-- +-- IdetQuant idet num = { +-- s = idet.s ! num.n ++ num.s ; +-- n = num.n +-- } ; +-- +-- CompIAdv a = a ; +-- CompIP p = ss (p.s ! Nom) ; +-- +--} diff --git a/lib/next-resource/latin/QuestionLat.gfAdjectiveLat.gfAdjectiveLat.gf b/lib/next-resource/latin/QuestionLat.gfAdjectiveLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..e8495dded --- /dev/null +++ b/lib/next-resource/latin/QuestionLat.gfAdjectiveLat.gfAdjectiveLat.gf @@ -0,0 +1,55 @@ +concrete QuestionLat of Question = CatLat ** open ResLat, Prelude in { + + flags optimize=all_subs ; + + lin + + QuestCl cl = { + s = \\t,a,p => + let cls = cl.s ! t ! a ! p + in table { + QDir => cls ! OQuest ; + QIndir => "if" ++ cls ! ODir + } ---- "whether" in ExtLat + } ; + + QuestVP qp vp = + let cl = mkClause (qp.s ! Nom) (agrP3 qp.n) vp + in {s = \\t,a,b,_ => cl.s ! t ! a ! b ! ODir} ; + + QuestSlash ip slash = + mkQuestion (ss (slash.c2 ++ ip.s ! Acc)) slash ; + --- stranding in ExratLat + + QuestIAdv iadv cl = mkQuestion iadv cl ; + + QuestIComp icomp np = + mkQuestion icomp (mkClause (np.s ! Nom) np.a (predAux auxBe)) ; + + + PrepIP p ip = {s = p.s ++ ip.s ! Acc} ; + + AdvIP ip adv = { + s = \\c => ip.s ! c ++ adv.s ; + n = ip.n + } ; + + IdetCN idet cn = { + s = \\c => idet.s ++ cn.s ! idet.n ! c ; + n = idet.n + } ; + + IdetIP idet = { + s = \\c => idet.s ; + n = idet.n + } ; + + IdetQuant idet num = { + s = idet.s ! num.n ++ num.s ; + n = num.n + } ; + + CompIAdv a = a ; + CompIP p = ss (p.s ! Nom) ; + +} diff --git a/lib/next-resource/latin/RelativeLat.gf b/lib/next-resource/latin/RelativeLat.gf new file mode 100644 index 000000000..de25508e0 --- /dev/null +++ b/lib/next-resource/latin/RelativeLat.gf @@ -0,0 +1,54 @@ +--concrete RelativeLat of Relative = CatLat ** open ResLat in { +-- +-- flags optimize=all_subs ; +-- +-- lin +-- +-- RelCl cl = { +-- s = \\t,a,p,_ => "such" ++ "that" ++ cl.s ! t ! a ! p ! ODir ; +-- c = Nom +-- } ; +-- +-- RelVP rp vp = { +-- s = \\t,ant,b,ag => +-- let +-- agr = case rp.a of { +-- RNoAg => ag ; +-- RAg a => a +-- } ; +-- cl = mkClause (rp.s ! RC (fromAgr agr).g Nom) agr vp +-- in +-- cl.s ! t ! ant ! b ! ODir ; +-- c = Nom +-- } ; +-- +---- Pied piping: "at which we are looking". Stranding and empty +---- relative are defined in $ExtraLat.gf$ ("that we are looking at", +---- "we are looking at"). +-- +-- RelSlash rp slash = { +-- s = \\t,a,p,agr => +-- slash.c2 ++ rp.s ! RPrep (fromAgr agr).g ++ slash.s ! t ! a ! p ! ODir ; +-- c = Acc +-- } ; +-- +-- FunRP p np rp = { +-- s = \\c => np.s ! Acc ++ p.s ++ rp.s ! RPrep (fromAgr np.a).g ; +-- a = RAg np.a +-- } ; +-- +-- IdRP = +-- let varr : Str -> Str = \x -> variants {x ; "that"} --- for bwc +-- in { +-- s = table { +-- RC _ Gen => "whose" ; +-- RC Neutr _ => varr "which" ; +-- RC _ Acc => varr "whom" ; +-- RC _ Nom => varr "who" ; +-- RPrep Neutr => "which" ; +-- RPrep _ => "whom" +-- } ; +-- a = RNoAg +-- } ; +-- +--} diff --git a/lib/next-resource/latin/RelativeLat.gfAdjectiveLat.gf b/lib/next-resource/latin/RelativeLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..de25508e0 --- /dev/null +++ b/lib/next-resource/latin/RelativeLat.gfAdjectiveLat.gf @@ -0,0 +1,54 @@ +--concrete RelativeLat of Relative = CatLat ** open ResLat in { +-- +-- flags optimize=all_subs ; +-- +-- lin +-- +-- RelCl cl = { +-- s = \\t,a,p,_ => "such" ++ "that" ++ cl.s ! t ! a ! p ! ODir ; +-- c = Nom +-- } ; +-- +-- RelVP rp vp = { +-- s = \\t,ant,b,ag => +-- let +-- agr = case rp.a of { +-- RNoAg => ag ; +-- RAg a => a +-- } ; +-- cl = mkClause (rp.s ! RC (fromAgr agr).g Nom) agr vp +-- in +-- cl.s ! t ! ant ! b ! ODir ; +-- c = Nom +-- } ; +-- +---- Pied piping: "at which we are looking". Stranding and empty +---- relative are defined in $ExtraLat.gf$ ("that we are looking at", +---- "we are looking at"). +-- +-- RelSlash rp slash = { +-- s = \\t,a,p,agr => +-- slash.c2 ++ rp.s ! RPrep (fromAgr agr).g ++ slash.s ! t ! a ! p ! ODir ; +-- c = Acc +-- } ; +-- +-- FunRP p np rp = { +-- s = \\c => np.s ! Acc ++ p.s ++ rp.s ! RPrep (fromAgr np.a).g ; +-- a = RAg np.a +-- } ; +-- +-- IdRP = +-- let varr : Str -> Str = \x -> variants {x ; "that"} --- for bwc +-- in { +-- s = table { +-- RC _ Gen => "whose" ; +-- RC Neutr _ => varr "which" ; +-- RC _ Acc => varr "whom" ; +-- RC _ Nom => varr "who" ; +-- RPrep Neutr => "which" ; +-- RPrep _ => "whom" +-- } ; +-- a = RNoAg +-- } ; +-- +--} diff --git a/lib/next-resource/latin/RelativeLat.gfAdjectiveLat.gfAdjectiveLat.gf b/lib/next-resource/latin/RelativeLat.gfAdjectiveLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..7ed4e0700 --- /dev/null +++ b/lib/next-resource/latin/RelativeLat.gfAdjectiveLat.gfAdjectiveLat.gf @@ -0,0 +1,54 @@ +concrete RelativeLat of Relative = CatLat ** open ResLat in { + + flags optimize=all_subs ; + + lin + + RelCl cl = { + s = \\t,a,p,_ => "such" ++ "that" ++ cl.s ! t ! a ! p ! ODir ; + c = Nom + } ; + + RelVP rp vp = { + s = \\t,ant,b,ag => + let + agr = case rp.a of { + RNoAg => ag ; + RAg a => a + } ; + cl = mkClause (rp.s ! RC (fromAgr agr).g Nom) agr vp + in + cl.s ! t ! ant ! b ! ODir ; + c = Nom + } ; + +-- Pied piping: "at which we are looking". Stranding and empty +-- relative are defined in $ExtraLat.gf$ ("that we are looking at", +-- "we are looking at"). + + RelSlash rp slash = { + s = \\t,a,p,agr => + slash.c2 ++ rp.s ! RPrep (fromAgr agr).g ++ slash.s ! t ! a ! p ! ODir ; + c = Acc + } ; + + FunRP p np rp = { + s = \\c => np.s ! Acc ++ p.s ++ rp.s ! RPrep (fromAgr np.a).g ; + a = RAg np.a + } ; + + IdRP = + let varr : Str -> Str = \x -> variants {x ; "that"} --- for bwc + in { + s = table { + RC _ Gen => "whose" ; + RC Neutr _ => varr "which" ; + RC _ Acc => varr "whom" ; + RC _ Nom => varr "who" ; + RPrep Neutr => "which" ; + RPrep _ => "whom" + } ; + a = RNoAg + } ; + +} diff --git a/lib/next-resource/latin/ResLat.gf b/lib/next-resource/latin/ResLat.gf new file mode 100644 index 000000000..2143e095e --- /dev/null +++ b/lib/next-resource/latin/ResLat.gf @@ -0,0 +1,467 @@ +--# -path=.:../abstract:../common:../../prelude + +--1 Latlish auxiliary operations. + +resource ResLat = ParamX ** open Prelude in { + +param + Gender = Masc | Fem | Neutr ; + Case = Nom | Acc | Gen | Dat | Abl | Voc ; +-- Degree = DPos | DComp | DSup ; + +oper + Noun : Type = {s : Number => Case => Str ; g : Gender} ; + Adjective : Type = {s : Gender => Number => Case => Str} ; + + -- worst case + + mkNoun : (n1,_,_,_,_,_,_,_,_,n10 : Str) -> Gender -> Noun = + \sn,sa,sg,sd,sab,sv,pn,pa,pg,pd, g -> { + s = table { + Sg => table { + Nom => sn ; + Acc => sa ; + Gen => sg ; + Dat => sd ; + Abl => sab ; + Voc => sv + } ; + Pl => table { + Nom | Voc => pn ; + Acc => pa ; + Gen => pg ; + Dat | Abl => pd + } + } ; + g = g + } ; + + -- declensions + + noun1 : Str -> Noun = \mensa -> + let + mensae = mensa + "a" ; + mensis = init mensa + "is" ; + in + mkNoun + mensa (mensa +"m") mensae mensae mensa mensa + mensae (mensa + "s") (mensa + "rum") mensis + Fem ; + + noun2us : Str -> Noun = \servus -> + let + serv = Predef.tk 2 servus ; + servum = serv + "um" ; + servi = serv + "i" ; + servo = serv + "o" ; + in + mkNoun + servus servum servi servo servo (serv + "e") + servi (serv + "os") (serv + "orum") (serv + "is") + Masc ; + + noun2er : Str -> Noun = \puer -> + let + puerum = puer + "um" ; + pueri = puer + "i" ; + puero = puer + "o" ; + in + mkNoun + puer puerum pueri puero puero (puer + "e") + pueri (puer + "os") (puer + "orum") (puer + "is") + Masc ; + + noun2um : Str -> Noun = \bellum -> + let + bell = Predef.tk 2 bellum ; + belli = bell + "i" ; + bello = bell + "o" ; + bella = bell + "a" ; + in + mkNoun + bellum bellum belli bello bello (bell + "e") + bella bella (bell + "orum") (bell + "is") + Neutr ; + +-- smart paradigm for declensions 1&2 + + noun12 : Str -> Noun = \verbum -> + case verbum of { + _ + "a" => noun1 verbum ; + _ + "us" => noun2us verbum ; + _ + "um" => noun2um verbum ; + _ + "er" => noun2er verbum ; + _ => Predef.error ("noun12 does not apply to" ++ verbum) + } ; + + noun3c : Str -> Str -> Gender -> Noun = \rex,regis,g -> + let + reg = Predef.tk 2 regis ; + rege : Str = case rex of { + _ + "e" => reg + "i" ; + _ + ("al" | "ar") => rex + "i" ; + _ => reg + "e" + } ; + regemes : Str * Str = case g of { + Neutr => ; + _ => + } ; + in + mkNoun + rex regemes.p1 (reg + "is") (reg + "i") rege rex + regemes.p2 regemes.p2 (reg + "um") (reg + "ibus") + g ; + + + noun3 : Str -> Noun = \labor -> + case labor of { + _ + "r" => noun3c labor (labor + "is") Masc ; + fl + "os" => noun3c labor (fl + "oris") Masc ; + lim + "es" => noun3c labor (lim + "itis") Masc ; + cod + "ex" => noun3c labor (cod + "icis") Masc ; + poem + "a" => noun3c labor (poem + "atis") Neutr ; + calc + "ar" => noun3c labor (calc + "aris") Neutr ; + mar + "e" => noun3c labor (mar + "is") Neutr ; + car + "men" => noun3c labor (car + "minis") Neutr ; + rob + "ur" => noun3c labor (rob + "oris") Neutr ; + temp + "us" => noun3c labor (temp + "oris") Neutr ; + vers + "io" => noun3c labor (vers + "ionis") Fem ; + imag + "o" => noun3c labor (imag + "inis") Fem ; + ae + "tas" => noun3c labor (ae + "tatis") Fem ; + vo + "x" => noun3c labor (vo + "cis") Fem ; + pa + "rs" => noun3c labor (pa + "rtis") Fem ; + cut + "is" => noun3c labor (cut + "is") Fem ; + urb + "s" => noun3c labor (urb + "is") Fem ; + _ => Predef.error ("noun3 does not apply to" ++ labor) + } ; + + noun4us : Str -> Noun = \fructus -> + let + fructu = init fructus ; + fruct = init fructu + in + mkNoun + fructus (fructu + "m") fructus (fructu + "i") fructu fructus + fructus fructus (fructu + "um") (fruct + "ibus") + Masc ; + + noun4u : Str -> Noun = \cornu -> + let + corn = init cornu ; + cornua = cornu + "a" + in + mkNoun + cornu cornu (cornu + "s") (cornu + "i") cornu cornu + cornua cornua (cornu + "um") (corn + "ibus") + Neutr ; + + noun5 : Str -> Noun = \res -> + let + re = init res ; + rei = re + "i" + in + mkNoun + res (re+ "m") rei rei re res + res res (re + "rum") (re + "bus") + Fem ; + +-- to change the default gender + + nounWithGen : Gender -> Noun -> Noun = \g,n -> + {s = n.s ; g = g} ; + +-- smart paradigms + + noun_ngg : Str -> Str -> Gender -> Noun = \verbum,verbi,g -> + let s : Noun = case of { + <_ + "a", _ + "ae"> => noun1 verbum ; + <_ + "us", _ + "i"> => noun2us verbum ; + <_ + "um", _ + "i"> => noun2um verbum ; + <_ + "er", _ + "i"> => noun2er verbum ; + <_ + "us", _ + "us"> => noun4us verbum ; + <_ + "u", _ + "us"> => noun4u verbum ; + <_ + "es", _ + "ei"> => noun5 verbum ; + _ => noun3c verbum verbi g + } + in + nounWithGen g s ; + + noun : Str -> Noun = \verbum -> + case verbum of { + _ + "a" => noun1 verbum ; + _ + "us" => noun2us verbum ; + _ + "um" => noun2um verbum ; + _ + "er" => noun2er verbum ; + _ + "u" => noun4u verbum ; + _ + "es" => noun5 verbum ; + _ => noun3 verbum + } ; + + + +-- adjectives + + mkAdjective : (_,_,_ : Noun) -> Adjective = \bonus,bona,bonum -> { + s = table { + Masc => bonus.s ; + Fem => bona.s ; + Neutr => bonum.s + } + } ; + + adj12 : Str -> Adjective = \bonus -> + let + bon : Str = case bonus of { + pulch + "er" => pulch + "r" ; + bon + "us" => bon ; + _ => Predef.error ("adj12 does not apply to" ++ bonus) + } + in + mkAdjective (noun12 bonus) (noun1 (bon + "a")) (noun2um (bon + "um")) ; + +-- verbs + + param + VActForm = VAct VAnter VTense Number Person ; + VPassForm = VPass VTense Number Person ; + VInfForm = VInfActPres | VInfActPerf ; + VImpForm = VImpPres Number | VImpFut2 Number | VImpFut3 Number ; + VGerund = VGenAcc | VGenGen |VGenDat | VGenAbl ; + VSupine = VSupAcc | VSupAbl ; + + VAnter = VSim | VAnt ; + VTense = VPres VMood | VImpf VMood | VFut ; + VMood = VInd | VConj ; + + oper + Verb : Type = { + act : VActForm => Str ; +-- pass : VPassForm => Str ; + inf : VAnter => Str ; +-- imp : VImpForm => Str ; +-- ger : VGerund => Str ; +-- sup : VSupine => Str ; +-- partActPres : Adjective ; +-- partActFut : Adjective ; +-- partPassPerf : Adjective ; +-- partPassFut : Adjective ; + } ; + + mkVerb : + (cela,cele,celab,celo,celare,celavi,celatus,celabo,celabunt,celabi : Str) + -> Verb = + \cela,cele,celab,celo,celare,celavi,celatus,celabo,celabunt,celabi -> + let + celav = init celavi + in { + act = table { + VAct VSim (VPres VInd) Sg P1 => celo ; + VAct VSim (VPres VInd) n p => cela + actPresEnding n p ; + VAct VSim (VPres VConj) n p => cele + actPresEnding n p ; + VAct VSim (VImpf VInd) n p => celab + "ba" + actPresEnding n p ; + VAct VSim (VImpf VConj) n p => celare + actPresEnding n p ; + VAct VSim VFut Sg P1 => celabo ; + VAct VSim VFut Pl P3 => celabunt ; + VAct VSim VFut n p => celabi + actPresEnding n p ; + VAct VAnt (VPres VInd) Pl P3 => celav + "erunt" ; + VAct VAnt (VPres VInd) n p => celavi + actPerfEnding n p ; + VAct VAnt (VPres VConj) n p => celav + "eri" + actPresEnding n p ; + VAct VAnt (VImpf VInd) n p => celav + "era" + actPresEnding n p ; + VAct VAnt (VImpf VConj) n p => celav + "isse" + actPresEnding n p ; + VAct VAnt VFut Sg P1 => celav + "ero" ; + VAct VAnt VFut n p => celav + "eri" + actPresEnding n p + } ; + inf = table { + VSim => celare ; + VAnt => celav + "isse" + } + } ; + + actPresEnding : Number -> Person -> Str = + useEndingTable <"m", "s", "t", "mus", "tis", "nt"> ; + + actPerfEnding : Number -> Person -> Str = + useEndingTable <"", "sti", "t", "mus", "stis", "erunt"> ; + + useEndingTable : (Str*Str*Str*Str*Str*Str) -> Number -> Person -> Str = + \es,n,p -> case n of { + Sg => case p of { + P1 => es.p1 ; + P2 => es.p2 ; + P3 => es.p3 + } ; + Pl => case p of { + P1 => es.p4 ; + P2 => es.p5 ; + P3 => es.p6 + } + } ; + + esseV : Verb = + let + esse = mkVerb "es" "si" "era" "sum" "esse" "fui" "*futus" + "ero" "erunt" "eri" ; + in { + act = table { + VAct VSim (VPres VInd) Sg P2 => "es" ; + VAct VSim (VPres VInd) Pl P1 => "sumus" ; + VAct VSim (VPres VInd) Pl P3 => "sunt" ; + v => esse.act ! v + } ; + inf = esse.inf + } ; + + verb1 : Str -> Verb = \celare -> + let + cela = Predef.tk 2 celare ; + cel = init cela ; + celo = cel + "o" ; + cele = cel + "e" ; + celavi = cela + "vi" ; + celatus = cela + "tus" ; + in mkVerb cela cele cela celo celare celavi celatus + (cela + "bo") (cela + "bunt") (cela + "bi") ; + + verb2 : Str -> Verb = \habere -> + let + habe = Predef.tk 2 habere ; + hab = init habe ; + habeo = habe + "o" ; + habea = habe + "a" ; + habui = hab + "ui" ; + habitus = hab + "itus" ; + in mkVerb habe habea habe habeo habere habui habitus + (habe + "bo") (habe + "bunt") (habe + "bi") ; + + verb3 : (_,_,_ : Str) -> Verb = \gerere,gessi,gestus -> + let + gere = Predef.tk 2 gerere ; + ger = init gere ; + gero = ger + "o" ; + geri = ger + "i" ; + gera = ger + "a" ; + in mkVerb geri gera gere gero gerere gessi gestus + (ger + "am") (ger + "ent") gere ; + + verb3i : (_,_,_ : Str) -> Verb = \iacere,ieci,iactus -> + let + iac = Predef.tk 3 iacere ; + iaco = iac + "io" ; + iaci = iac + "i" ; + iacie = iac + "ie" ; + iacia = iac + "ia" ; + in mkVerb iaci iacia iacie iaco iacere ieci iactus + (iac + "iam") (iac + "ient") iacie ; + + verb4 : (_,_,_ : Str) -> Verb = \sentire,sensi,sensus -> + let + senti = Predef.tk 2 sentire ; + sentio = senti + "o" ; + sentia = senti + "a" ; + sentie = senti + "e" ; + in mkVerb senti sentia sentie sentio sentire sensi sensus + (senti + "am") (senti + "ent") sentie ; + + +-- smart paradigms + + verb_pppi : (iacio,ieci,iactus,iacere : Str) -> Verb = + \iacio,ieci,iactus,iacere -> + case iacere of { + _ + "are" => verb1 iacere ; + _ + "ire" => verb4 iacere ieci iactus ; + _ + "ere" => case iacio of { + _ + "eo" => verb2 iacere ; + _ + "io" => verb3i iacere ieci iactus ; + _ => verb3 iacere ieci iactus + } ; + _ => Predef.error ("verb_pppi: illegal infinitive form" ++ iacere) + } ; + + verb : (iacere : Str) -> Verb = + \iacere -> + case iacere of { + _ + "are" => verb1 iacere ; + _ + "ire" => let iaci = Predef.tk 2 iacere + in verb4 iacere (iaci + "vi") (iaci + "tus") ; + _ + "ere" => verb2 iacere ; + _ => Predef.error ("verb: illegal infinitive form" ++ iacere) + } ; + +-- pronouns + + Pronoun : Type = { + s : Case => Str ; + g : Gender ; + n : Number ; + p : Person ; + } ; + + mkPronoun : (_,_,_,_,_ : Str) -> Gender -> Number -> Person -> Pronoun = + \ego,me,mei,mihi,mee,g,n,p -> { + s = pronForms ego me mei mihi mee ; + g = g ; + n = n ; + p = p + } ; + + pronForms : (_,_,_,_,_ : Str) -> Case => Str = + \ego,me,mei,mihi,mee -> table Case [ego ; me ; mei ; mihi ; mee ; ego] ; + + personalPronoun : Gender -> Number -> Person -> Pronoun = \g,n,p -> { + s = case of { + <_,Sg,P1> => pronForms "ego" "me" "mei" "mihi" "me" ; + <_,Sg,P2> => pronForms "tu" "te" "tui" "tibi" "te" ; + <_,Pl,P1> => pronForms "nos" "nos" "nostri" "nobis" "nobis" ; --- nostrum + <_,Pl,P2> => pronForms "vos" "vos" "vestri" "vobis" "vobis" ; --- vestrum + => pronForms "is" "eum" "eius" "ei" "eo" ; + => pronForms "ea" "eam" "eius" "ei" "ea" ; + => pronForms "id" "id" "eius" "ei" "eo" ; + => pronForms "ii" "eos" "eorum" "iis" "iis" ; + => pronForms "ii" "eas" "earum" "iis" "iis" ; + => pronForms "ea" "ea" "eorum" "iis" "iis" + } ; + g = g ; + n = n ; + p = p + } ; + + Preposition : Type = {s : Str ; c : Case} ; + + VP : Type = { + fin : VActForm => Str ; + inf : VAnter => Str ; + obj : Str + } ; + + VPSlash = VP ** {c2 : Preposition} ; + + predV : Verb -> VP = \v -> { + fin = v.act ; + inf = v.inf ; + obj = [] + } ; + + predV2 : (Verb ** {c : Preposition}) -> VPSlash = \v -> predV v ** {c2 = v.c} ; + + appPrep : Preposition -> (Case => Str) -> Str = \c,s -> c.s ++ s ! c.c ; + + insertObj : Str -> VP -> VP = \obj,vp -> { + fin = vp.fin ; + inf = vp.inf ; + obj = obj ++ vp.obj + } ; + + Clause = {s : VAnter => VTense => Polarity => Str} ; + + mkClause : Pronoun -> VP -> Clause = \np,vp -> { + s = \\a,t,p => np.s ! Nom ++ vp.obj ++ negation p ++ + vp.fin ! VAct a t np.n np.p + } ; + + negation : Polarity -> Str = \p -> case p of { + Pos => [] ; + Neg => "non" + } ; +} + diff --git a/lib/next-resource/latin/ResLat.gfAdjectiveLat.gf b/lib/next-resource/latin/ResLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..135d33dc0 --- /dev/null +++ b/lib/next-resource/latin/ResLat.gfAdjectiveLat.gf @@ -0,0 +1,485 @@ +----# -path=.:../abstract:../common:../../prelude +-- +----1 Latlish auxiliary operations. +-- +---- This module contains operations that are needed to make the +---- resource syntax work. To define everything that is needed to +---- implement $Test$, it moreover contains regular lexical +---- patterns needed for $Lex$. +-- +--resource ResLat = ParamX ** open Prelude in { +-- +-- flags optimize=all ; +-- +-- +---- Some parameters, such as $Number$, are inherited from $ParamX$. +-- +----2 For $Noun$ +-- +---- This is the worst-case $Case$ needed for pronouns. +-- +-- param +-- Case = Nom | Acc | Gen ; +-- +---- Agreement of $NP$ has 8 values. $Gender$ is needed for "who"/"which" and +---- for "himself"/"herself"/"itself". +-- +-- param +-- Agr = AgP1 Number | AgP2 Number | AgP3Sg Gender | AgP3Pl ; +-- +-- param +-- Gender = Neutr | Masc | Fem ; +-- +-- +----2 For $Verb$ +-- +---- Only these five forms are needed for open-lexicon verbs. +-- +-- param +-- VForm = +-- VInf +-- | VPres +-- | VPPart +-- | VPresPart +-- | VPast --# notpresent +-- ; +-- +---- Auxiliary verbs have special negative forms. +-- +-- VVForm = +-- VVF VForm +-- | VVPresNeg +-- | VVPastNeg --# notpresent +-- ; +-- +---- The order of sentence is needed already in $VP$. +-- +-- Order = ODir | OQuest ; +-- +-- +----2 For $Adjective$ +-- +-- AForm = AAdj Degree | AAdv ; +-- +----2 For $Relative$ +-- +-- RAgr = RNoAg | RAg Agr ; +-- RCase = RPrep Gender | RC Gender Case ; +-- +----2 For $Numeral$ +-- +-- CardOrd = NCard | NOrd ; +-- DForm = unit | teen | ten ; +-- +----2 Transformations between parameter types +-- +-- oper +-- toAgr : Number -> Person -> Gender -> Agr = \n,p,g -> +-- case p of { +-- P1 => AgP1 n ; +-- P2 => AgP2 n ; +-- P3 => case n of { +-- Sg => AgP3Sg g ; +-- Pl => AgP3Pl +-- } +-- } ; +-- +-- fromAgr : Agr -> {n : Number ; p : Person ; g : Gender} = \a -> case a of { +-- AgP1 n => {n = n ; p = P1 ; g = Masc} ; +-- AgP2 n => {n = n ; p = P2 ; g = Masc} ; +-- AgP3Pl => {n = Pl ; p = P3 ; g = Masc} ; +-- AgP3Sg g => {n = Sg ; p = P3 ; g = g} +-- } ; +-- +-- agrP3 : Number -> Agr = \n -> agrgP3 n Neutr ; +-- +-- agrgP3 : Number -> Gender -> Agr = \n,g -> toAgr n P3 g ; +-- +-- conjAgr : Agr -> Agr -> Agr = \a0,b0 -> +-- let a = fromAgr a0 ; b = fromAgr b0 +-- in +-- toAgr +-- (conjNumber a.n b.n) +-- (conjPerson a.p b.p) a.g ; +-- +---- For $Lex$. +-- +---- For each lexical category, here are the worst-case constructors. +-- +-- mkNoun : (_,_,_,_ : Str) -> {s : Number => Case => Str} = +-- \man,mans,men,mens -> { +-- s = table { +-- Sg => table { +-- Gen => mans ; +-- _ => man +-- } ; +-- Pl => table { +-- Gen => mens ; +-- _ => men +-- } +-- } +-- } ; +-- +-- mkAdjective : (_,_,_,_ : Str) -> {s : AForm => Str} = +-- \good,better,best,well -> { +-- s = table { +-- AAdj Posit => good ; +-- AAdj Compar => better ; +-- AAdj Superl => best ; +-- AAdv => well +-- } +-- } ; +-- +-- mkVerb : (_,_,_,_,_ : Str) -> Verb = +-- \go,goes,went,gone,going -> { +-- s = table { +-- VInf => go ; +-- VPres => goes ; +-- VPast => went ; --# notpresent +-- VPPart => gone ; +-- VPresPart => going +-- } ; +-- isRefl = False +-- } ; +-- +-- mkIP : (i,me,my : Str) -> Number -> {s : Case => Str ; n : Number} = +-- \i,me,my,n -> let who = mkNP i me my n P3 Neutr in { +-- s = who.s ; +-- n = n +-- } ; +-- +-- mkPron : (i,me,my,mine : Str) -> Number -> Person -> Gender -> +-- {s : Case => Str ; sp : Str ; a : Agr} = +-- \i,me,my,mine,n,p,g -> { +-- s = table { +-- Nom => i ; +-- Acc => me ; +-- Gen => my +-- } ; +-- a = toAgr n p g ; +-- sp = mine +-- } ; +-- +-- mkNP : (i,me,my : Str) -> Number -> Person -> Gender -> +-- {s : Case => Str ; a : Agr} = +-- \i,me,my,n,p,g -> mkPron i me my me n p g ; +-- +---- These functions cover many cases; full coverage inflectional patterns are +---- in $MorphoLat$. +-- +-- regN : Str -> {s : Number => Case => Str} = \car -> +-- mkNoun car (car + "'s") (car + "s") (car + "s'") ; +-- +-- regA : Str -> {s : AForm => Str} = \warm -> +-- mkAdjective warm (warm + "er") (warm + "est") (warm + "ly") ; +-- +-- regV : Str -> Verb = \walk -> +-- mkVerb walk (walk + "s") (walk + "ed") (walk + "ed") (walk + "ing") ; +-- +-- regNP : Str -> Number -> {s : Case => Str ; a : Agr} = \that,n -> +-- mkNP that that (that + "'s") n P3 Neutr ; +-- +---- 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" ; +-- +---- For $Verb$. +-- +-- Verb : Type = { +-- s : VForm => Str ; +-- isRefl : Bool +-- } ; +-- +-- param +-- CPolarity = +-- CPos +-- | CNeg Bool ; -- contracted or not +-- +-- oper +-- contrNeg : Bool -> Polarity -> CPolarity = \b,p -> case p of { +-- Pos => CPos ; +-- Neg => CNeg b +-- } ; +-- +-- VerbForms : Type = +-- Tense => Anteriority => CPolarity => Order => Agr => +-- {aux, adv, fin, inf : Str} ; -- would, not, sleeps, slept +-- +-- VP : Type = { +-- s : VerbForms ; +-- prp : Str ; -- present participle +-- inf : Str ; -- the infinitive form ; VerbForms would be the logical place +-- ad : Str ; -- sentence adverb +-- s2 : Agr => Str -- complement +-- } ; +-- +-- +-- SlashVP = VP ** {c2 : Str} ; +-- +-- predVc : (Verb ** {c2 : Str}) -> SlashVP = \verb -> +-- predV verb ** {c2 = verb.c2} ; +-- +-- predV : Verb -> VP = \verb -> { +-- s = \\t,ant,b,ord,agr => +-- let +-- inf = verb.s ! VInf ; +-- fin = presVerb verb agr ; +-- part = verb.s ! VPPart ; +-- in +-- case of { +-- => vff fin [] ; +-- => vf (does agr) inf ; +-- => vf (have agr) part ; --# notpresent +-- => vfn c (have agr) (havent agr) part ; --# notpresent +-- => vff (verb.s ! VPast) [] ; --# notpresent +-- => vf "did" inf ; --# notpresent +-- => vfn c "did" "didn't" inf ; --# notpresent +-- => vf "had" part ; --# notpresent +-- => vfn c "had" "hadn't" part ; --# notpresent +-- => vf "will" inf ; --# notpresent +-- => vfn c "will" "won't" inf ; --# notpresent +-- => vf "will" ("have" ++ part) ; --# notpresent +-- => vfn c "will" "won't"("have" ++ part) ; --# notpresent +-- => vf "would" inf ; --# notpresent +-- => vfn c "would" "wouldn't" inf ; --# notpresent +-- => vf "would" ("have" ++ part) ; --# notpresent +-- => vfn c "would" "wouldn't" ("have" ++ part) ; --# notpresent +-- => vfn c (does agr) (doesnt agr) inf +-- } ; +-- prp = verb.s ! VPresPart ; +-- inf = verb.s ! VInf ; +-- ad = [] ; +-- s2 = \\a => if_then_Str verb.isRefl (reflPron ! a) [] +-- } ; +-- +-- predAux : Aux -> VP = \verb -> { +-- s = \\t,ant,cb,ord,agr => +-- let +-- b = case cb of { +-- CPos => Pos ; +-- _ => Neg +-- } ; +-- inf = verb.inf ; +-- fin = verb.pres ! b ! agr ; +-- finp = verb.pres ! Pos ! agr ; +-- part = verb.ppart ; +-- in +-- case of { +-- => vf (have agr) part ; --# notpresent +-- => vfn c (have agr) (havent agr) part ; --# notpresent +-- => vf (verb.past ! b ! agr) [] ; --# notpresent +-- => vfn c (verb.past!Pos!agr)(verb.past!Neg!agr) [] ; --# notpresent +-- => vf "had" part ; --# notpresent +-- => vfn c "had" "hadn't" part ; --# notpresent +-- => vf "will" inf ; --# notpresent +-- => vfn c "will" "won't" inf ; --# notpresent +-- => vf "will" ("have" ++ part) ; --# notpresent +-- => vfn c "will" "won't"("have" ++ part) ; --# notpresent +-- => vf "would" inf ; --# notpresent +-- => vfn c "would" "wouldn't" inf ; --# notpresent +-- => vf "would" ("have" ++ part) ; --# notpresent +-- => vfn c "would" "wouldn't" ("have" ++ part) ; --# notpresent +-- => vf fin [] ; +-- => vfn c finp fin [] +-- } ; +-- prp = verb.prpart ; +-- inf = verb.inf ; +-- ad = [] ; +-- s2 = \\_ => [] +-- } ; +-- +-- vff : Str -> Str -> {aux, adv, fin, inf : Str} = \x,y -> +-- {aux = [] ; adv = [] ; fin = x ; inf = y} ; +-- +-- vf : Str -> Str -> {aux, adv, fin, inf : Str} = \x,y -> vfn True x x y ; +-- +-- vfn : Bool -> Str -> Str -> Str -> {aux, fin, adv, inf : Str} = +-- \contr,x,y,z -> +-- case contr of { +-- True => {aux = y ; adv = [] ; fin = [] ; inf = z} ; +-- False => {aux = x ; adv = "not" ; fin = [] ; inf = z} +-- } ; +-- +-- insertObj : (Agr => Str) -> VP -> VP = \obj,vp -> { +-- s = vp.s ; +-- prp = vp.prp ; +-- inf = vp.inf ; +-- ad = vp.ad ; +-- s2 = \\a => vp.s2 ! a ++ obj ! a +-- } ; +-- +-- insertObjPre : (Agr => Str) -> VP -> VP = \obj,vp -> { +-- s = vp.s ; +-- prp = vp.prp ; +-- inf = vp.inf ; +-- ad = vp.ad ; +-- s2 = \\a => obj ! a ++ vp.s2 ! a +-- } ; +-- +-- insertObjc : (Agr => Str) -> SlashVP -> SlashVP = \obj,vp -> +-- insertObj obj vp ** {c2 = vp.c2} ; +-- +----- The adverb should be before the finite verb. +-- +-- insertAdV : Str -> VP -> VP = \ad,vp -> { +-- s = vp.s ; +-- prp = vp.prp ; +-- inf = vp.inf ; +-- ad = vp.ad ++ ad ; +-- s2 = \\a => vp.s2 ! a +-- } ; +-- +---- +-- +-- predVV : {s : VVForm => Str ; isAux : Bool} -> VP = \verb -> +-- let verbs = verb.s +-- in +-- case verb.isAux of { +-- True => predAux { +-- pres = table { +-- Pos => \\_ => verbs ! VVF VPres ; +-- Neg => \\_ => verbs ! VVPresNeg +-- } ; +-- past = table { --# notpresent +-- Pos => \\_ => verbs ! VVF VPast ; --# notpresent +-- Neg => \\_ => verbs ! VVPastNeg --# notpresent +-- } ; --# notpresent +-- inf = verbs ! VVF VInf ; +-- ppart = verbs ! VVF VPPart ; +-- prpart = verbs ! VVF VPresPart ; +-- } ; +-- _ => predV {s = \\vf => verbs ! VVF vf ; isRefl = False} +-- } ; +-- +-- presVerb : {s : VForm => Str} -> Agr -> Str = \verb -> +-- agrVerb (verb.s ! VPres) (verb.s ! VInf) ; +-- +-- infVP : Bool -> VP -> Agr -> Str = \isAux,vp,a -> +-- vp.ad ++ +-- case isAux of {True => [] ; False => "to"} ++ +-- vp.inf ++ vp.s2 ! a ; +-- +-- agrVerb : Str -> Str -> Agr -> Str = \has,have,agr -> +-- case agr of { +-- AgP3Sg _ => has ; +-- _ => have +-- } ; +-- +-- have = agrVerb "has" "have" ; +-- havent = agrVerb "hasn't" "haven't" ; +-- does = agrVerb "does" "do" ; +-- doesnt = agrVerb "doesn't" "don't" ; +-- +-- Aux = { +-- pres : Polarity => Agr => Str ; +-- past : Polarity => Agr => Str ; --# notpresent +-- inf,ppart,prpart : Str +-- } ; +-- +-- auxBe : Aux = { +-- pres = \\b,a => case of { +-- => "am" ; +-- => ["am not"] ; --- am not I +-- _ => agrVerb (posneg b "is") (posneg b "are") a +-- } ; +-- past = \\b,a => case a of { --# notpresent +-- AgP1 Sg | AgP3Sg _ => posneg b "was" ; --# notpresent +-- _ => (posneg b "were") --# notpresent +-- } ; --# notpresent +-- inf = "be" ; +-- ppart = "been" ; +-- prpart = "being" +-- } ; +-- +-- posneg : Polarity -> Str -> Str = \p,s -> case p of { +-- Pos => s ; +-- Neg => s + "n't" +-- } ; +-- +-- conjThat : Str = "that" ; +-- +-- reflPron : Agr => Str = table { +-- AgP1 Sg => "myself" ; +-- AgP2 Sg => "yourself" ; +-- AgP3Sg Masc => "himself" ; +-- AgP3Sg Fem => "herself" ; +-- AgP3Sg Neutr => "itself" ; +-- AgP1 Pl => "ourselves" ; +-- AgP2 Pl => "yourselves" ; +-- AgP3Pl => "themselves" +-- } ; +-- +---- For $Sentence$. +-- +-- Clause : Type = { +-- s : Tense => Anteriority => CPolarity => Order => Str +-- } ; +-- +-- mkClause : Str -> Agr -> VP -> Clause = +-- \subj,agr,vp -> { +-- s = \\t,a,b,o => +-- let +-- verb = vp.s ! t ! a ! b ! o ! agr ; +-- compl = vp.s2 ! agr +-- in +-- case o of { +-- ODir => subj ++ verb.aux ++ verb.adv ++ vp.ad ++ verb.fin ++ verb.inf ++ compl ; +-- OQuest => verb.aux ++ subj ++ verb.adv ++ vp.ad ++ verb.fin ++ verb.inf ++ compl +-- } +-- } ; +-- +-- +---- For $Numeral$. +-- +-- mkNum : Str -> Str -> Str -> Str -> {s : DForm => CardOrd => Str} = +-- \two, twelve, twenty, second -> +-- {s = table { +-- unit => table {NCard => two ; NOrd => second} ; +-- teen => \\c => mkCard c twelve ; +-- ten => \\c => mkCard c twenty +-- } +-- } ; +-- +-- regNum : Str -> {s : DForm => CardOrd => Str} = +-- \six -> mkNum six (six + "teen") (six + "ty") (regOrd six) ; +-- +-- regCardOrd : Str -> {s : CardOrd => Str} = \ten -> +-- {s = table {NCard => ten ; NOrd => regOrd ten}} ; +-- +-- mkCard : CardOrd -> Str -> Str = \c,ten -> +-- (regCardOrd ten).s ! c ; +-- +-- regOrd : Str -> Str = \ten -> +-- case last ten of { +-- "y" => init ten + "ieth" ; +-- _ => ten + "th" +-- } ; +-- +-- mkQuestion : +-- {s : Str} -> Clause -> +-- {s : Tense => Anteriority => CPolarity => QForm => Str} = \wh,cl -> +-- { +-- s = \\t,a,p => +-- let +-- cls = cl.s ! t ! a ! p ; +-- why = wh.s +-- in table { +-- QDir => why ++ cls ! OQuest ; +-- QIndir => why ++ cls ! ODir +-- } +-- } ; +-- +---- for VP conjunction +-- +-- param +-- VPIForm = VPIInf | VPIPPart ; +-- +-- +--} diff --git a/lib/next-resource/latin/ResLat.gfAdjectiveLat.gfAdjectiveLat.gf b/lib/next-resource/latin/ResLat.gfAdjectiveLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..562dcb6d9 --- /dev/null +++ b/lib/next-resource/latin/ResLat.gfAdjectiveLat.gfAdjectiveLat.gf @@ -0,0 +1,485 @@ +--# -path=.:../abstract:../common:../../prelude + +--1 Latlish auxiliary operations. + +-- This module contains operations that are needed to make the +-- resource syntax work. To define everything that is needed to +-- implement $Test$, it moreover contains regular lexical +-- patterns needed for $Lex$. + +resource ResLat = ParamX ** open Prelude in { + + flags optimize=all ; + + +-- Some parameters, such as $Number$, are inherited from $ParamX$. + +--2 For $Noun$ + +-- This is the worst-case $Case$ needed for pronouns. + + param + Case = Nom | Acc | Gen ; + +-- Agreement of $NP$ has 8 values. $Gender$ is needed for "who"/"which" and +-- for "himself"/"herself"/"itself". + + param + Agr = AgP1 Number | AgP2 Number | AgP3Sg Gender | AgP3Pl ; + + param + Gender = Neutr | Masc | Fem ; + + +--2 For $Verb$ + +-- Only these five forms are needed for open-lexicon verbs. + + param + VForm = + VInf + | VPres + | VPPart + | VPresPart + | VPast --# notpresent + ; + +-- Auxiliary verbs have special negative forms. + + VVForm = + VVF VForm + | VVPresNeg + | VVPastNeg --# notpresent + ; + +-- The order of sentence is needed already in $VP$. + + Order = ODir | OQuest ; + + +--2 For $Adjective$ + + AForm = AAdj Degree | AAdv ; + +--2 For $Relative$ + + RAgr = RNoAg | RAg Agr ; + RCase = RPrep Gender | RC Gender Case ; + +--2 For $Numeral$ + + CardOrd = NCard | NOrd ; + DForm = unit | teen | ten ; + +--2 Transformations between parameter types + + oper + toAgr : Number -> Person -> Gender -> Agr = \n,p,g -> + case p of { + P1 => AgP1 n ; + P2 => AgP2 n ; + P3 => case n of { + Sg => AgP3Sg g ; + Pl => AgP3Pl + } + } ; + + fromAgr : Agr -> {n : Number ; p : Person ; g : Gender} = \a -> case a of { + AgP1 n => {n = n ; p = P1 ; g = Masc} ; + AgP2 n => {n = n ; p = P2 ; g = Masc} ; + AgP3Pl => {n = Pl ; p = P3 ; g = Masc} ; + AgP3Sg g => {n = Sg ; p = P3 ; g = g} + } ; + + agrP3 : Number -> Agr = \n -> agrgP3 n Neutr ; + + agrgP3 : Number -> Gender -> Agr = \n,g -> toAgr n P3 g ; + + conjAgr : Agr -> Agr -> Agr = \a0,b0 -> + let a = fromAgr a0 ; b = fromAgr b0 + in + toAgr + (conjNumber a.n b.n) + (conjPerson a.p b.p) a.g ; + +-- For $Lex$. + +-- For each lexical category, here are the worst-case constructors. + + mkNoun : (_,_,_,_ : Str) -> {s : Number => Case => Str} = + \man,mans,men,mens -> { + s = table { + Sg => table { + Gen => mans ; + _ => man + } ; + Pl => table { + Gen => mens ; + _ => men + } + } + } ; + + mkAdjective : (_,_,_,_ : Str) -> {s : AForm => Str} = + \good,better,best,well -> { + s = table { + AAdj Posit => good ; + AAdj Compar => better ; + AAdj Superl => best ; + AAdv => well + } + } ; + + mkVerb : (_,_,_,_,_ : Str) -> Verb = + \go,goes,went,gone,going -> { + s = table { + VInf => go ; + VPres => goes ; + VPast => went ; --# notpresent + VPPart => gone ; + VPresPart => going + } ; + isRefl = False + } ; + + mkIP : (i,me,my : Str) -> Number -> {s : Case => Str ; n : Number} = + \i,me,my,n -> let who = mkNP i me my n P3 Neutr in { + s = who.s ; + n = n + } ; + + mkPron : (i,me,my,mine : Str) -> Number -> Person -> Gender -> + {s : Case => Str ; sp : Str ; a : Agr} = + \i,me,my,mine,n,p,g -> { + s = table { + Nom => i ; + Acc => me ; + Gen => my + } ; + a = toAgr n p g ; + sp = mine + } ; + + mkNP : (i,me,my : Str) -> Number -> Person -> Gender -> + {s : Case => Str ; a : Agr} = + \i,me,my,n,p,g -> mkPron i me my me n p g ; + +-- These functions cover many cases; full coverage inflectional patterns are +-- in $MorphoLat$. + + regN : Str -> {s : Number => Case => Str} = \car -> + mkNoun car (car + "'s") (car + "s") (car + "s'") ; + + regA : Str -> {s : AForm => Str} = \warm -> + mkAdjective warm (warm + "er") (warm + "est") (warm + "ly") ; + + regV : Str -> Verb = \walk -> + mkVerb walk (walk + "s") (walk + "ed") (walk + "ed") (walk + "ing") ; + + regNP : Str -> Number -> {s : Case => Str ; a : Agr} = \that,n -> + mkNP that that (that + "'s") n P3 Neutr ; + +-- 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" ; + +-- For $Verb$. + + Verb : Type = { + s : VForm => Str ; + isRefl : Bool + } ; + + param + CPolarity = + CPos + | CNeg Bool ; -- contracted or not + + oper + contrNeg : Bool -> Polarity -> CPolarity = \b,p -> case p of { + Pos => CPos ; + Neg => CNeg b + } ; + + VerbForms : Type = + Tense => Anteriority => CPolarity => Order => Agr => + {aux, adv, fin, inf : Str} ; -- would, not, sleeps, slept + + VP : Type = { + s : VerbForms ; + prp : Str ; -- present participle + inf : Str ; -- the infinitive form ; VerbForms would be the logical place + ad : Str ; -- sentence adverb + s2 : Agr => Str -- complement + } ; + + + SlashVP = VP ** {c2 : Str} ; + + predVc : (Verb ** {c2 : Str}) -> SlashVP = \verb -> + predV verb ** {c2 = verb.c2} ; + + predV : Verb -> VP = \verb -> { + s = \\t,ant,b,ord,agr => + let + inf = verb.s ! VInf ; + fin = presVerb verb agr ; + part = verb.s ! VPPart ; + in + case of { + => vff fin [] ; + => vf (does agr) inf ; + => vf (have agr) part ; --# notpresent + => vfn c (have agr) (havent agr) part ; --# notpresent + => vff (verb.s ! VPast) [] ; --# notpresent + => vf "did" inf ; --# notpresent + => vfn c "did" "didn't" inf ; --# notpresent + => vf "had" part ; --# notpresent + => vfn c "had" "hadn't" part ; --# notpresent + => vf "will" inf ; --# notpresent + => vfn c "will" "won't" inf ; --# notpresent + => vf "will" ("have" ++ part) ; --# notpresent + => vfn c "will" "won't"("have" ++ part) ; --# notpresent + => vf "would" inf ; --# notpresent + => vfn c "would" "wouldn't" inf ; --# notpresent + => vf "would" ("have" ++ part) ; --# notpresent + => vfn c "would" "wouldn't" ("have" ++ part) ; --# notpresent + => vfn c (does agr) (doesnt agr) inf + } ; + prp = verb.s ! VPresPart ; + inf = verb.s ! VInf ; + ad = [] ; + s2 = \\a => if_then_Str verb.isRefl (reflPron ! a) [] + } ; + + predAux : Aux -> VP = \verb -> { + s = \\t,ant,cb,ord,agr => + let + b = case cb of { + CPos => Pos ; + _ => Neg + } ; + inf = verb.inf ; + fin = verb.pres ! b ! agr ; + finp = verb.pres ! Pos ! agr ; + part = verb.ppart ; + in + case of { + => vf (have agr) part ; --# notpresent + => vfn c (have agr) (havent agr) part ; --# notpresent + => vf (verb.past ! b ! agr) [] ; --# notpresent + => vfn c (verb.past!Pos!agr)(verb.past!Neg!agr) [] ; --# notpresent + => vf "had" part ; --# notpresent + => vfn c "had" "hadn't" part ; --# notpresent + => vf "will" inf ; --# notpresent + => vfn c "will" "won't" inf ; --# notpresent + => vf "will" ("have" ++ part) ; --# notpresent + => vfn c "will" "won't"("have" ++ part) ; --# notpresent + => vf "would" inf ; --# notpresent + => vfn c "would" "wouldn't" inf ; --# notpresent + => vf "would" ("have" ++ part) ; --# notpresent + => vfn c "would" "wouldn't" ("have" ++ part) ; --# notpresent + => vf fin [] ; + => vfn c finp fin [] + } ; + prp = verb.prpart ; + inf = verb.inf ; + ad = [] ; + s2 = \\_ => [] + } ; + + vff : Str -> Str -> {aux, adv, fin, inf : Str} = \x,y -> + {aux = [] ; adv = [] ; fin = x ; inf = y} ; + + vf : Str -> Str -> {aux, adv, fin, inf : Str} = \x,y -> vfn True x x y ; + + vfn : Bool -> Str -> Str -> Str -> {aux, fin, adv, inf : Str} = + \contr,x,y,z -> + case contr of { + True => {aux = y ; adv = [] ; fin = [] ; inf = z} ; + False => {aux = x ; adv = "not" ; fin = [] ; inf = z} + } ; + + insertObj : (Agr => Str) -> VP -> VP = \obj,vp -> { + s = vp.s ; + prp = vp.prp ; + inf = vp.inf ; + ad = vp.ad ; + s2 = \\a => vp.s2 ! a ++ obj ! a + } ; + + insertObjPre : (Agr => Str) -> VP -> VP = \obj,vp -> { + s = vp.s ; + prp = vp.prp ; + inf = vp.inf ; + ad = vp.ad ; + s2 = \\a => obj ! a ++ vp.s2 ! a + } ; + + insertObjc : (Agr => Str) -> SlashVP -> SlashVP = \obj,vp -> + insertObj obj vp ** {c2 = vp.c2} ; + +--- The adverb should be before the finite verb. + + insertAdV : Str -> VP -> VP = \ad,vp -> { + s = vp.s ; + prp = vp.prp ; + inf = vp.inf ; + ad = vp.ad ++ ad ; + s2 = \\a => vp.s2 ! a + } ; + +-- + + predVV : {s : VVForm => Str ; isAux : Bool} -> VP = \verb -> + let verbs = verb.s + in + case verb.isAux of { + True => predAux { + pres = table { + Pos => \\_ => verbs ! VVF VPres ; + Neg => \\_ => verbs ! VVPresNeg + } ; + past = table { --# notpresent + Pos => \\_ => verbs ! VVF VPast ; --# notpresent + Neg => \\_ => verbs ! VVPastNeg --# notpresent + } ; --# notpresent + inf = verbs ! VVF VInf ; + ppart = verbs ! VVF VPPart ; + prpart = verbs ! VVF VPresPart ; + } ; + _ => predV {s = \\vf => verbs ! VVF vf ; isRefl = False} + } ; + + presVerb : {s : VForm => Str} -> Agr -> Str = \verb -> + agrVerb (verb.s ! VPres) (verb.s ! VInf) ; + + infVP : Bool -> VP -> Agr -> Str = \isAux,vp,a -> + vp.ad ++ + case isAux of {True => [] ; False => "to"} ++ + vp.inf ++ vp.s2 ! a ; + + agrVerb : Str -> Str -> Agr -> Str = \has,have,agr -> + case agr of { + AgP3Sg _ => has ; + _ => have + } ; + + have = agrVerb "has" "have" ; + havent = agrVerb "hasn't" "haven't" ; + does = agrVerb "does" "do" ; + doesnt = agrVerb "doesn't" "don't" ; + + Aux = { + pres : Polarity => Agr => Str ; + past : Polarity => Agr => Str ; --# notpresent + inf,ppart,prpart : Str + } ; + + auxBe : Aux = { + pres = \\b,a => case of { + => "am" ; + => ["am not"] ; --- am not I + _ => agrVerb (posneg b "is") (posneg b "are") a + } ; + past = \\b,a => case a of { --# notpresent + AgP1 Sg | AgP3Sg _ => posneg b "was" ; --# notpresent + _ => (posneg b "were") --# notpresent + } ; --# notpresent + inf = "be" ; + ppart = "been" ; + prpart = "being" + } ; + + posneg : Polarity -> Str -> Str = \p,s -> case p of { + Pos => s ; + Neg => s + "n't" + } ; + + conjThat : Str = "that" ; + + reflPron : Agr => Str = table { + AgP1 Sg => "myself" ; + AgP2 Sg => "yourself" ; + AgP3Sg Masc => "himself" ; + AgP3Sg Fem => "herself" ; + AgP3Sg Neutr => "itself" ; + AgP1 Pl => "ourselves" ; + AgP2 Pl => "yourselves" ; + AgP3Pl => "themselves" + } ; + +-- For $Sentence$. + + Clause : Type = { + s : Tense => Anteriority => CPolarity => Order => Str + } ; + + mkClause : Str -> Agr -> VP -> Clause = + \subj,agr,vp -> { + s = \\t,a,b,o => + let + verb = vp.s ! t ! a ! b ! o ! agr ; + compl = vp.s2 ! agr + in + case o of { + ODir => subj ++ verb.aux ++ verb.adv ++ vp.ad ++ verb.fin ++ verb.inf ++ compl ; + OQuest => verb.aux ++ subj ++ verb.adv ++ vp.ad ++ verb.fin ++ verb.inf ++ compl + } + } ; + + +-- For $Numeral$. + + mkNum : Str -> Str -> Str -> Str -> {s : DForm => CardOrd => Str} = + \two, twelve, twenty, second -> + {s = table { + unit => table {NCard => two ; NOrd => second} ; + teen => \\c => mkCard c twelve ; + ten => \\c => mkCard c twenty + } + } ; + + regNum : Str -> {s : DForm => CardOrd => Str} = + \six -> mkNum six (six + "teen") (six + "ty") (regOrd six) ; + + regCardOrd : Str -> {s : CardOrd => Str} = \ten -> + {s = table {NCard => ten ; NOrd => regOrd ten}} ; + + mkCard : CardOrd -> Str -> Str = \c,ten -> + (regCardOrd ten).s ! c ; + + regOrd : Str -> Str = \ten -> + case last ten of { + "y" => init ten + "ieth" ; + _ => ten + "th" + } ; + + mkQuestion : + {s : Str} -> Clause -> + {s : Tense => Anteriority => CPolarity => QForm => Str} = \wh,cl -> + { + s = \\t,a,p => + let + cls = cl.s ! t ! a ! p ; + why = wh.s + in table { + QDir => why ++ cls ! OQuest ; + QIndir => why ++ cls ! ODir + } + } ; + +-- for VP conjunction + + param + VPIForm = VPIInf | VPIPPart ; + + +} diff --git a/lib/next-resource/latin/SentenceLat.gf b/lib/next-resource/latin/SentenceLat.gf new file mode 100644 index 000000000..78676ee0c --- /dev/null +++ b/lib/next-resource/latin/SentenceLat.gf @@ -0,0 +1,67 @@ +concrete SentenceLat of Sentence = CatLat ** open Prelude, ResLat in { + + flags optimize=all_subs ; + + lin + + PredVP = mkClause ; +-- +-- PredSCVP sc vp = mkClause sc.s (agrP3 Sg) vp ; +-- +-- ImpVP vp = { +-- s = \\pol,n => +-- let +-- agr = AgP2 (numImp n) ; +-- verb = infVP True vp agr ; +-- dont = case pol of { +-- CNeg True => "don't" ; +-- CNeg False => "do" ++ "not" ; +-- _ => [] +-- } +-- in +-- dont ++ verb +-- } ; +-- +-- SlashVP np vp = +-- mkClause (np.s ! Nom) np.a vp ** {c2 = vp.c2} ; +-- +-- AdvSlash slash adv = { +-- s = \\t,a,b,o => slash.s ! t ! a ! b ! o ++ adv.s ; +-- c2 = slash.c2 +-- } ; +-- +-- SlashPrep cl prep = cl ** {c2 = prep.s} ; +-- +-- SlashVS np vs slash = +-- mkClause (np.s ! Nom) np.a +-- (insertObj (\\_ => conjThat ++ slash.s) (predV vs)) ** +-- {c2 = slash.c2} ; +-- +-- EmbedS s = {s = conjThat ++ s.s} ; +-- EmbedQS qs = {s = qs.s ! QIndir} ; +-- EmbedVP vp = {s = infVP False vp (agrP3 Sg)} ; --- agr +-- +-- UseCl t p cl = { +-- s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! ctr p.p ! ODir +-- } ; +-- UseQCl t p cl = { +-- s = \\q => t.s ++ p.s ++ cl.s ! t.t ! t.a ! ctr p.p ! q +-- } ; +-- UseRCl t p cl = { +-- s = \\r => t.s ++ p.s ++ cl.s ! t.t ! t.a ! ctr p.p ! r ; +-- c = cl.c +-- } ; +-- UseSlash t p cl = { +-- s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! ctr p.p ! ODir ; +-- c2 = cl.c2 +-- } ; +-- +-- AdvS a s = {s = a.s ++ "," ++ s.s} ; +-- +-- RelS s r = {s = s.s ++ "," ++ r.s ! agrP3 Sg} ; +-- +-- oper +-- ctr = contrNeg True ; -- contracted negations +-- +} + diff --git a/lib/next-resource/latin/SentenceLat.gfAdjectiveLat.gf b/lib/next-resource/latin/SentenceLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..66f61b163 --- /dev/null +++ b/lib/next-resource/latin/SentenceLat.gfAdjectiveLat.gf @@ -0,0 +1,67 @@ +--concrete SentenceLat of Sentence = CatLat ** open Prelude, ResLat in { +-- +-- flags optimize=all_subs ; +-- +-- lin +-- +-- PredVP np vp = mkClause (np.s ! Nom) np.a vp ; +-- +-- PredSCVP sc vp = mkClause sc.s (agrP3 Sg) vp ; +-- +-- ImpVP vp = { +-- s = \\pol,n => +-- let +-- agr = AgP2 (numImp n) ; +-- verb = infVP True vp agr ; +-- dont = case pol of { +-- CNeg True => "don't" ; +-- CNeg False => "do" ++ "not" ; +-- _ => [] +-- } +-- in +-- dont ++ verb +-- } ; +-- +-- SlashVP np vp = +-- mkClause (np.s ! Nom) np.a vp ** {c2 = vp.c2} ; +-- +-- AdvSlash slash adv = { +-- s = \\t,a,b,o => slash.s ! t ! a ! b ! o ++ adv.s ; +-- c2 = slash.c2 +-- } ; +-- +-- SlashPrep cl prep = cl ** {c2 = prep.s} ; +-- +-- SlashVS np vs slash = +-- mkClause (np.s ! Nom) np.a +-- (insertObj (\\_ => conjThat ++ slash.s) (predV vs)) ** +-- {c2 = slash.c2} ; +-- +-- EmbedS s = {s = conjThat ++ s.s} ; +-- EmbedQS qs = {s = qs.s ! QIndir} ; +-- EmbedVP vp = {s = infVP False vp (agrP3 Sg)} ; --- agr +-- +-- UseCl t p cl = { +-- s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! ctr p.p ! ODir +-- } ; +-- UseQCl t p cl = { +-- s = \\q => t.s ++ p.s ++ cl.s ! t.t ! t.a ! ctr p.p ! q +-- } ; +-- UseRCl t p cl = { +-- s = \\r => t.s ++ p.s ++ cl.s ! t.t ! t.a ! ctr p.p ! r ; +-- c = cl.c +-- } ; +-- UseSlash t p cl = { +-- s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! ctr p.p ! ODir ; +-- c2 = cl.c2 +-- } ; +-- +-- AdvS a s = {s = a.s ++ "," ++ s.s} ; +-- +-- RelS s r = {s = s.s ++ "," ++ r.s ! agrP3 Sg} ; +-- +-- oper +-- ctr = contrNeg True ; -- contracted negations +-- +--} +-- diff --git a/lib/next-resource/latin/SentenceLat.gfAdjectiveLat.gfAdjectiveLat.gf b/lib/next-resource/latin/SentenceLat.gfAdjectiveLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..9717c8278 --- /dev/null +++ b/lib/next-resource/latin/SentenceLat.gfAdjectiveLat.gfAdjectiveLat.gf @@ -0,0 +1,67 @@ +concrete SentenceLat of Sentence = CatLat ** open Prelude, ResLat in { + + flags optimize=all_subs ; + + lin + + PredVP np vp = mkClause (np.s ! Nom) np.a vp ; + + PredSCVP sc vp = mkClause sc.s (agrP3 Sg) vp ; + + ImpVP vp = { + s = \\pol,n => + let + agr = AgP2 (numImp n) ; + verb = infVP True vp agr ; + dont = case pol of { + CNeg True => "don't" ; + CNeg False => "do" ++ "not" ; + _ => [] + } + in + dont ++ verb + } ; + + SlashVP np vp = + mkClause (np.s ! Nom) np.a vp ** {c2 = vp.c2} ; + + AdvSlash slash adv = { + s = \\t,a,b,o => slash.s ! t ! a ! b ! o ++ adv.s ; + c2 = slash.c2 + } ; + + SlashPrep cl prep = cl ** {c2 = prep.s} ; + + SlashVS np vs slash = + mkClause (np.s ! Nom) np.a + (insertObj (\\_ => conjThat ++ slash.s) (predV vs)) ** + {c2 = slash.c2} ; + + EmbedS s = {s = conjThat ++ s.s} ; + EmbedQS qs = {s = qs.s ! QIndir} ; + EmbedVP vp = {s = infVP False vp (agrP3 Sg)} ; --- agr + + UseCl t p cl = { + s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! ctr p.p ! ODir + } ; + UseQCl t p cl = { + s = \\q => t.s ++ p.s ++ cl.s ! t.t ! t.a ! ctr p.p ! q + } ; + UseRCl t p cl = { + s = \\r => t.s ++ p.s ++ cl.s ! t.t ! t.a ! ctr p.p ! r ; + c = cl.c + } ; + UseSlash t p cl = { + s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! ctr p.p ! ODir ; + c2 = cl.c2 + } ; + + AdvS a s = {s = a.s ++ "," ++ s.s} ; + + RelS s r = {s = s.s ++ "," ++ r.s ! agrP3 Sg} ; + + oper + ctr = contrNeg True ; -- contracted negations + +} + diff --git a/lib/next-resource/latin/StructuralLat.gf b/lib/next-resource/latin/StructuralLat.gf new file mode 100644 index 000000000..9234af5e5 --- /dev/null +++ b/lib/next-resource/latin/StructuralLat.gf @@ -0,0 +1,132 @@ +concrete StructuralLat of Structural = CatLat ** + open ResLat, (P = ParadigmsLat), Prelude in + { + + flags optimize=all ; + + lin +-- above_Prep = ss "above" ; +-- after_Prep = ss "after" ; +-- all_Predet = ss "all" ; +-- almost_AdA, almost_AdN = ss "almost" ; +-- although_Subj = ss "although" ; +-- always_AdV = ss "always" ; +-- and_Conj = sd2 [] "and" ** {n = Pl} ; +-----b and_Conj = ss "and" ** {n = Pl} ; +-- because_Subj = ss "because" ; +-- before_Prep = ss "before" ; +-- behind_Prep = ss "behind" ; +-- between_Prep = ss "between" ; +-- both7and_DConj = sd2 "both" "and" ** {n = Pl} ; +-- but_PConj = ss "but" ; +-- by8agent_Prep = ss "by" ; +-- by8means_Prep = ss "by" ; +-- can8know_VV, can_VV = { +-- s = table { +-- VVF VInf => ["be able to"] ; +-- VVF VPres => "can" ; +-- VVF VPPart => ["been able to"] ; +-- VVF VPresPart => ["being able to"] ; +-- VVF VPast => "could" ; --# notpresent +-- VVPastNeg => "couldn't" ; --# notpresent +-- VVPresNeg => "can't" +-- } ; +-- isAux = True +-- } ; +-- during_Prep = ss "during" ; +-- either7or_DConj = sd2 "either" "or" ** {n = Sg} ; +-- everybody_NP = regNP "everybody" Sg ; +-- every_Det = mkDeterminer Sg "every" ; +-- everything_NP = regNP "everything" Sg ; +-- everywhere_Adv = ss "everywhere" ; +-- few_Det = mkDeterminer Pl "few" ; +----- first_Ord = ss "first" ; DEPRECATED +-- for_Prep = ss "for" ; +-- from_Prep = ss "from" ; +-- he_Pron = mkPron "he" "him" "his" "his" Sg P3 Masc ; +-- here_Adv = ss "here" ; +-- here7to_Adv = ss ["to here"] ; +-- here7from_Adv = ss ["from here"] ; +-- how_IAdv = ss "how" ; +-- how8many_IDet = mkDeterminer Pl ["how many"] ; +-- if_Subj = ss "if" ; +-- in8front_Prep = ss ["in front of"] ; + i_Pron = personalPronoun Fem Sg P1 ; +-- in_Prep = ss "in" ; +-- it_Pron = mkPron "it" "it" "its" "its" Sg P3 Neutr ; +-- less_CAdv = ss "less" ; +-- many_Det = mkDeterminer Pl "many" ; +-- more_CAdv = ss "more" ; +-- most_Predet = ss "most" ; +-- much_Det = mkDeterminer Sg "much" ; +-- must_VV = { +-- s = table { +-- VVF VInf => ["have to"] ; +-- VVF VPres => "must" ; +-- VVF VPPart => ["had to"] ; +-- VVF VPresPart => ["having to"] ; +-- VVF VPast => ["had to"] ; --# notpresent +-- VVPastNeg => ["hadn't to"] ; --# notpresent +-- VVPresNeg => "mustn't" +-- } ; +-- isAux = True +-- } ; +-----b no_Phr = ss "no" ; +-- no_Utt = ss "no" ; +-- on_Prep = ss "on" ; +------ one_Quant = mkDeterminer Sg "one" ; -- DEPRECATED +-- only_Predet = ss "only" ; +-- or_Conj = sd2 [] "or" ** {n = Sg} ; +-- otherwise_PConj = ss "otherwise" ; +-- part_Prep = ss "of" ; +-- please_Voc = ss "please" ; +-- possess_Prep = ss "of" ; +-- quite_Adv = ss "quite" ; +-- she_Pron = mkPron "she" "her" "her" "hers" Sg P3 Fem ; +-- so_AdA = ss "so" ; +-- somebody_NP = regNP "somebody" Sg ; +-- someSg_Det = mkDeterminer Sg "some" ; +-- somePl_Det = mkDeterminer Pl "some" ; +-- something_NP = regNP "something" Sg ; +-- somewhere_Adv = ss "somewhere" ; +-- that_Quant = mkQuant "that" "those" ; +-- there_Adv = ss "there" ; +-- there7to_Adv = ss "there" ; +-- there7from_Adv = ss ["from there"] ; +-- therefore_PConj = ss "therefore" ; +-- they_Pron = mkPron "they" "them" "their" "theirs" Pl P3 Masc ; ---- +-- this_Quant = mkQuant "this" "these" ; +-- through_Prep = ss "through" ; +-- too_AdA = ss "too" ; +-- to_Prep = ss "to" ; +-- under_Prep = ss "under" ; +-- very_AdA = ss "very" ; +-- want_VV = P.mkVV (P.regV "want") ; +-- we_Pron = mkPron "we" "us" "our" "ours" Pl P1 Masc ; +-- whatPl_IP = mkIP "what" "what" "what's" Pl ; +-- whatSg_IP = mkIP "what" "what" "what's" Sg ; +-- when_IAdv = ss "when" ; +-- when_Subj = ss "when" ; +-- where_IAdv = ss "where" ; +-- which_IQuant = {s = \\_ => "which"} ; +-----b whichPl_IDet = mkDeterminer Pl ["which"] ; +-----b whichSg_IDet = mkDeterminer Sg ["which"] ; +-- whoPl_IP = mkIP "who" "whom" "whose" Pl ; +-- whoSg_IP = mkIP "who" "whom" "whose" Sg ; +-- why_IAdv = ss "why" ; +-- without_Prep = ss "without" ; +-- with_Prep = ss "with" ; +-----b yes_Phr = ss "yes" ; +-- yes_Utt = ss "yes" ; + youSg_Pron = personalPronoun Fem Sg P2 ; +-- youPl_Pron = mkPron "you" "you" "your" "yours" Pl P2 Masc ; +-- youPol_Pron = mkPron "you" "you" "your" "yours" Sg P2 Masc ; +-- +-- +--oper +-- mkQuant : Str -> Str -> {s,sp : Bool => Number => Str} = \x,y -> { +-- s,sp = \\_ => table Number [x ; y] +-- } ; +-- +} + diff --git a/lib/next-resource/latin/StructuralLat.gfAdjectiveLat.gf b/lib/next-resource/latin/StructuralLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..6ff95bc3c --- /dev/null +++ b/lib/next-resource/latin/StructuralLat.gfAdjectiveLat.gf @@ -0,0 +1,131 @@ +--concrete StructuralLat of Structural = CatLat ** +-- open MorphoLat, (P = ParadigmsLat), Prelude in { +-- +-- flags optimize=all ; +-- +-- lin +-- above_Prep = ss "above" ; +-- after_Prep = ss "after" ; +-- all_Predet = ss "all" ; +-- almost_AdA, almost_AdN = ss "almost" ; +-- although_Subj = ss "although" ; +-- always_AdV = ss "always" ; +-- and_Conj = sd2 [] "and" ** {n = Pl} ; +-----b and_Conj = ss "and" ** {n = Pl} ; +-- because_Subj = ss "because" ; +-- before_Prep = ss "before" ; +-- behind_Prep = ss "behind" ; +-- between_Prep = ss "between" ; +-- both7and_DConj = sd2 "both" "and" ** {n = Pl} ; +-- but_PConj = ss "but" ; +-- by8agent_Prep = ss "by" ; +-- by8means_Prep = ss "by" ; +-- can8know_VV, can_VV = { +-- s = table { +-- VVF VInf => ["be able to"] ; +-- VVF VPres => "can" ; +-- VVF VPPart => ["been able to"] ; +-- VVF VPresPart => ["being able to"] ; +-- VVF VPast => "could" ; --# notpresent +-- VVPastNeg => "couldn't" ; --# notpresent +-- VVPresNeg => "can't" +-- } ; +-- isAux = True +-- } ; +-- during_Prep = ss "during" ; +-- either7or_DConj = sd2 "either" "or" ** {n = Sg} ; +-- everybody_NP = regNP "everybody" Sg ; +-- every_Det = mkDeterminer Sg "every" ; +-- everything_NP = regNP "everything" Sg ; +-- everywhere_Adv = ss "everywhere" ; +-- few_Det = mkDeterminer Pl "few" ; +----- first_Ord = ss "first" ; DEPRECATED +-- for_Prep = ss "for" ; +-- from_Prep = ss "from" ; +-- he_Pron = mkPron "he" "him" "his" "his" Sg P3 Masc ; +-- here_Adv = ss "here" ; +-- here7to_Adv = ss ["to here"] ; +-- here7from_Adv = ss ["from here"] ; +-- how_IAdv = ss "how" ; +-- how8many_IDet = mkDeterminer Pl ["how many"] ; +-- if_Subj = ss "if" ; +-- in8front_Prep = ss ["in front of"] ; +-- i_Pron = mkPron "I" "me" "my" "mine" Sg P1 Masc ; +-- in_Prep = ss "in" ; +-- it_Pron = mkPron "it" "it" "its" "its" Sg P3 Neutr ; +-- less_CAdv = ss "less" ; +-- many_Det = mkDeterminer Pl "many" ; +-- more_CAdv = ss "more" ; +-- most_Predet = ss "most" ; +-- much_Det = mkDeterminer Sg "much" ; +-- must_VV = { +-- s = table { +-- VVF VInf => ["have to"] ; +-- VVF VPres => "must" ; +-- VVF VPPart => ["had to"] ; +-- VVF VPresPart => ["having to"] ; +-- VVF VPast => ["had to"] ; --# notpresent +-- VVPastNeg => ["hadn't to"] ; --# notpresent +-- VVPresNeg => "mustn't" +-- } ; +-- isAux = True +-- } ; +-----b no_Phr = ss "no" ; +-- no_Utt = ss "no" ; +-- on_Prep = ss "on" ; +------ one_Quant = mkDeterminer Sg "one" ; -- DEPRECATED +-- only_Predet = ss "only" ; +-- or_Conj = sd2 [] "or" ** {n = Sg} ; +-- otherwise_PConj = ss "otherwise" ; +-- part_Prep = ss "of" ; +-- please_Voc = ss "please" ; +-- possess_Prep = ss "of" ; +-- quite_Adv = ss "quite" ; +-- she_Pron = mkPron "she" "her" "her" "hers" Sg P3 Fem ; +-- so_AdA = ss "so" ; +-- somebody_NP = regNP "somebody" Sg ; +-- someSg_Det = mkDeterminer Sg "some" ; +-- somePl_Det = mkDeterminer Pl "some" ; +-- something_NP = regNP "something" Sg ; +-- somewhere_Adv = ss "somewhere" ; +-- that_Quant = mkQuant "that" "those" ; +-- there_Adv = ss "there" ; +-- there7to_Adv = ss "there" ; +-- there7from_Adv = ss ["from there"] ; +-- therefore_PConj = ss "therefore" ; +-- they_Pron = mkPron "they" "them" "their" "theirs" Pl P3 Masc ; ---- +-- this_Quant = mkQuant "this" "these" ; +-- through_Prep = ss "through" ; +-- too_AdA = ss "too" ; +-- to_Prep = ss "to" ; +-- under_Prep = ss "under" ; +-- very_AdA = ss "very" ; +-- want_VV = P.mkVV (P.regV "want") ; +-- we_Pron = mkPron "we" "us" "our" "ours" Pl P1 Masc ; +-- whatPl_IP = mkIP "what" "what" "what's" Pl ; +-- whatSg_IP = mkIP "what" "what" "what's" Sg ; +-- when_IAdv = ss "when" ; +-- when_Subj = ss "when" ; +-- where_IAdv = ss "where" ; +-- which_IQuant = {s = \\_ => "which"} ; +-----b whichPl_IDet = mkDeterminer Pl ["which"] ; +-----b whichSg_IDet = mkDeterminer Sg ["which"] ; +-- whoPl_IP = mkIP "who" "whom" "whose" Pl ; +-- whoSg_IP = mkIP "who" "whom" "whose" Sg ; +-- why_IAdv = ss "why" ; +-- without_Prep = ss "without" ; +-- with_Prep = ss "with" ; +-----b yes_Phr = ss "yes" ; +-- yes_Utt = ss "yes" ; +-- youSg_Pron = mkPron "you" "you" "your" "yours" Sg P2 Masc ; +-- youPl_Pron = mkPron "you" "you" "your" "yours" Pl P2 Masc ; +-- youPol_Pron = mkPron "you" "you" "your" "yours" Sg P2 Masc ; +-- +-- +--oper +-- mkQuant : Str -> Str -> {s,sp : Bool => Number => Str} = \x,y -> { +-- s,sp = \\_ => table Number [x ; y] +-- } ; +-- +--} +-- diff --git a/lib/next-resource/latin/StructuralLat.gfAdjectiveLat.gfAdjectiveLat.gf b/lib/next-resource/latin/StructuralLat.gfAdjectiveLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..778705a32 --- /dev/null +++ b/lib/next-resource/latin/StructuralLat.gfAdjectiveLat.gfAdjectiveLat.gf @@ -0,0 +1,131 @@ +concrete StructuralLat of Structural = CatLat ** + open MorphoLat, (P = ParadigmsLat), Prelude in { + + flags optimize=all ; + + lin + above_Prep = ss "above" ; + after_Prep = ss "after" ; + all_Predet = ss "all" ; + almost_AdA, almost_AdN = ss "almost" ; + although_Subj = ss "although" ; + always_AdV = ss "always" ; + and_Conj = sd2 [] "and" ** {n = Pl} ; +---b and_Conj = ss "and" ** {n = Pl} ; + because_Subj = ss "because" ; + before_Prep = ss "before" ; + behind_Prep = ss "behind" ; + between_Prep = ss "between" ; + both7and_DConj = sd2 "both" "and" ** {n = Pl} ; + but_PConj = ss "but" ; + by8agent_Prep = ss "by" ; + by8means_Prep = ss "by" ; + can8know_VV, can_VV = { + s = table { + VVF VInf => ["be able to"] ; + VVF VPres => "can" ; + VVF VPPart => ["been able to"] ; + VVF VPresPart => ["being able to"] ; + VVF VPast => "could" ; --# notpresent + VVPastNeg => "couldn't" ; --# notpresent + VVPresNeg => "can't" + } ; + isAux = True + } ; + during_Prep = ss "during" ; + either7or_DConj = sd2 "either" "or" ** {n = Sg} ; + everybody_NP = regNP "everybody" Sg ; + every_Det = mkDeterminer Sg "every" ; + everything_NP = regNP "everything" Sg ; + everywhere_Adv = ss "everywhere" ; + few_Det = mkDeterminer Pl "few" ; +--- first_Ord = ss "first" ; DEPRECATED + for_Prep = ss "for" ; + from_Prep = ss "from" ; + he_Pron = mkPron "he" "him" "his" "his" Sg P3 Masc ; + here_Adv = ss "here" ; + here7to_Adv = ss ["to here"] ; + here7from_Adv = ss ["from here"] ; + how_IAdv = ss "how" ; + how8many_IDet = mkDeterminer Pl ["how many"] ; + if_Subj = ss "if" ; + in8front_Prep = ss ["in front of"] ; + i_Pron = mkPron "I" "me" "my" "mine" Sg P1 Masc ; + in_Prep = ss "in" ; + it_Pron = mkPron "it" "it" "its" "its" Sg P3 Neutr ; + less_CAdv = ss "less" ; + many_Det = mkDeterminer Pl "many" ; + more_CAdv = ss "more" ; + most_Predet = ss "most" ; + much_Det = mkDeterminer Sg "much" ; + must_VV = { + s = table { + VVF VInf => ["have to"] ; + VVF VPres => "must" ; + VVF VPPart => ["had to"] ; + VVF VPresPart => ["having to"] ; + VVF VPast => ["had to"] ; --# notpresent + VVPastNeg => ["hadn't to"] ; --# notpresent + VVPresNeg => "mustn't" + } ; + isAux = True + } ; +---b no_Phr = ss "no" ; + no_Utt = ss "no" ; + on_Prep = ss "on" ; +---- one_Quant = mkDeterminer Sg "one" ; -- DEPRECATED + only_Predet = ss "only" ; + or_Conj = sd2 [] "or" ** {n = Sg} ; + otherwise_PConj = ss "otherwise" ; + part_Prep = ss "of" ; + please_Voc = ss "please" ; + possess_Prep = ss "of" ; + quite_Adv = ss "quite" ; + she_Pron = mkPron "she" "her" "her" "hers" Sg P3 Fem ; + so_AdA = ss "so" ; + somebody_NP = regNP "somebody" Sg ; + someSg_Det = mkDeterminer Sg "some" ; + somePl_Det = mkDeterminer Pl "some" ; + something_NP = regNP "something" Sg ; + somewhere_Adv = ss "somewhere" ; + that_Quant = mkQuant "that" "those" ; + there_Adv = ss "there" ; + there7to_Adv = ss "there" ; + there7from_Adv = ss ["from there"] ; + therefore_PConj = ss "therefore" ; + they_Pron = mkPron "they" "them" "their" "theirs" Pl P3 Masc ; ---- + this_Quant = mkQuant "this" "these" ; + through_Prep = ss "through" ; + too_AdA = ss "too" ; + to_Prep = ss "to" ; + under_Prep = ss "under" ; + very_AdA = ss "very" ; + want_VV = P.mkVV (P.regV "want") ; + we_Pron = mkPron "we" "us" "our" "ours" Pl P1 Masc ; + whatPl_IP = mkIP "what" "what" "what's" Pl ; + whatSg_IP = mkIP "what" "what" "what's" Sg ; + when_IAdv = ss "when" ; + when_Subj = ss "when" ; + where_IAdv = ss "where" ; + which_IQuant = {s = \\_ => "which"} ; +---b whichPl_IDet = mkDeterminer Pl ["which"] ; +---b whichSg_IDet = mkDeterminer Sg ["which"] ; + whoPl_IP = mkIP "who" "whom" "whose" Pl ; + whoSg_IP = mkIP "who" "whom" "whose" Sg ; + why_IAdv = ss "why" ; + without_Prep = ss "without" ; + with_Prep = ss "with" ; +---b yes_Phr = ss "yes" ; + yes_Utt = ss "yes" ; + youSg_Pron = mkPron "you" "you" "your" "yours" Sg P2 Masc ; + youPl_Pron = mkPron "you" "you" "your" "yours" Pl P2 Masc ; + youPol_Pron = mkPron "you" "you" "your" "yours" Sg P2 Masc ; + + +oper + mkQuant : Str -> Str -> {s,sp : Bool => Number => Str} = \x,y -> { + s,sp = \\_ => table Number [x ; y] + } ; + +} + diff --git a/lib/next-resource/latin/SymbolLat.gf b/lib/next-resource/latin/SymbolLat.gf new file mode 100644 index 000000000..c1572616c --- /dev/null +++ b/lib/next-resource/latin/SymbolLat.gf @@ -0,0 +1,37 @@ +--concrete SymbolLat of Symbol = CatLat ** open Prelude, ResLat in { +-- +--lin +-- SymbPN i = {s = \\c => i.s ; g = Neutr} ; --- c +-- IntPN i = {s = \\c => i.s ; g = Neutr} ; --- c +-- FloatPN i = {s = \\c => i.s ; g = Neutr} ; --- c +-- NumPN i = {s = \\c => i.s ; g = Neutr} ; --- c +-- CNIntNP cn i = { +-- s = \\c => (cn.s ! Sg ! Nom ++ i.s) ; +-- a = agrgP3 Sg cn.g +-- } ; +-- CNSymbNP det cn xs = { +-- s = \\c => det.s ++ cn.s ! det.n ! c ++ xs.s ; +-- a = agrgP3 det.n cn.g +-- } ; +-- CNNumNP cn i = { +-- s = \\c => (cn.s ! Sg ! Nom ++ i.s) ; +-- a = agrgP3 Sg cn.g +-- } ; +-- +-- SymbS sy = sy ; +-- +-- SymbNum sy = {s = sy.s ; n = Pl ; hasCard = True} ; +-- SymbOrd sy = {s = sy.s ++ "th"} ; +-- +--lincat +-- +-- Symb, [Symb] = SS ; +-- +--lin +-- +-- MkSymb s = s ; +-- +-- BaseSymb = infixSS "and" ; +-- ConsSymb = infixSS "," ; +-- +--} diff --git a/lib/next-resource/latin/SymbolLat.gfAdjectiveLat.gf b/lib/next-resource/latin/SymbolLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..c1572616c --- /dev/null +++ b/lib/next-resource/latin/SymbolLat.gfAdjectiveLat.gf @@ -0,0 +1,37 @@ +--concrete SymbolLat of Symbol = CatLat ** open Prelude, ResLat in { +-- +--lin +-- SymbPN i = {s = \\c => i.s ; g = Neutr} ; --- c +-- IntPN i = {s = \\c => i.s ; g = Neutr} ; --- c +-- FloatPN i = {s = \\c => i.s ; g = Neutr} ; --- c +-- NumPN i = {s = \\c => i.s ; g = Neutr} ; --- c +-- CNIntNP cn i = { +-- s = \\c => (cn.s ! Sg ! Nom ++ i.s) ; +-- a = agrgP3 Sg cn.g +-- } ; +-- CNSymbNP det cn xs = { +-- s = \\c => det.s ++ cn.s ! det.n ! c ++ xs.s ; +-- a = agrgP3 det.n cn.g +-- } ; +-- CNNumNP cn i = { +-- s = \\c => (cn.s ! Sg ! Nom ++ i.s) ; +-- a = agrgP3 Sg cn.g +-- } ; +-- +-- SymbS sy = sy ; +-- +-- SymbNum sy = {s = sy.s ; n = Pl ; hasCard = True} ; +-- SymbOrd sy = {s = sy.s ++ "th"} ; +-- +--lincat +-- +-- Symb, [Symb] = SS ; +-- +--lin +-- +-- MkSymb s = s ; +-- +-- BaseSymb = infixSS "and" ; +-- ConsSymb = infixSS "," ; +-- +--} diff --git a/lib/next-resource/latin/SymbolLat.gfAdjectiveLat.gfAdjectiveLat.gf b/lib/next-resource/latin/SymbolLat.gfAdjectiveLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..eac4dcdbd --- /dev/null +++ b/lib/next-resource/latin/SymbolLat.gfAdjectiveLat.gfAdjectiveLat.gf @@ -0,0 +1,37 @@ +concrete SymbolLat of Symbol = CatLat ** open Prelude, ResLat in { + +lin + SymbPN i = {s = \\c => i.s ; g = Neutr} ; --- c + IntPN i = {s = \\c => i.s ; g = Neutr} ; --- c + FloatPN i = {s = \\c => i.s ; g = Neutr} ; --- c + NumPN i = {s = \\c => i.s ; g = Neutr} ; --- c + CNIntNP cn i = { + s = \\c => (cn.s ! Sg ! Nom ++ i.s) ; + a = agrgP3 Sg cn.g + } ; + CNSymbNP det cn xs = { + s = \\c => det.s ++ cn.s ! det.n ! c ++ xs.s ; + a = agrgP3 det.n cn.g + } ; + CNNumNP cn i = { + s = \\c => (cn.s ! Sg ! Nom ++ i.s) ; + a = agrgP3 Sg cn.g + } ; + + SymbS sy = sy ; + + SymbNum sy = {s = sy.s ; n = Pl ; hasCard = True} ; + SymbOrd sy = {s = sy.s ++ "th"} ; + +lincat + + Symb, [Symb] = SS ; + +lin + + MkSymb s = s ; + + BaseSymb = infixSS "and" ; + ConsSymb = infixSS "," ; + +} diff --git a/lib/next-resource/latin/VerbLat.gf b/lib/next-resource/latin/VerbLat.gf new file mode 100644 index 000000000..c57db77d2 --- /dev/null +++ b/lib/next-resource/latin/VerbLat.gf @@ -0,0 +1,50 @@ +concrete VerbLat of Verb = CatLat ** open ResLat in { + + flags optimize=all_subs ; + + lin + UseV = predV ; + + SlashV2a v = predV2 v ; +-- Slash2V3 v np = +-- insertObjc (\\_ => v.c2 ++ np.s ! Acc) (predV v ** {c2 = v.c3}) ; +-- Slash3V3 v np = +-- insertObjc (\\_ => v.c3 ++ np.s ! Acc) (predVc v) ; ---- +-- +-- ComplVV v vp = insertObj (\\a => infVP v.isAux vp a) (predVV v) ; +-- ComplVS v s = insertObj (\\_ => conjThat ++ s.s) (predV v) ; +-- ComplVQ v q = insertObj (\\_ => q.s ! QIndir) (predV v) ; +-- ComplVA v ap = insertObj (ap.s) (predV v) ; +-- +-- SlashV2V v vp = insertObjc (\\a => infVP v.isAux vp a) (predVc v) ; +-- SlashV2S v s = insertObjc (\\_ => conjThat ++ s.s) (predVc v) ; +-- SlashV2Q v q = insertObjc (\\_ => q.s ! QIndir) (predVc v) ; +-- SlashV2A v ap = insertObjc (\\a => ap.s ! a) (predVc v) ; ---- +-- + ComplSlash vp np = insertObj (appPrep vp.c2 np.s) vp ; +-- +-- SlashVV vv vp = +-- insertObj (\\a => infVP vv.isAux vp a) (predVV vv) ** +-- {c2 = vp.c2} ; +-- SlashV2VNP vv np vp = +-- insertObjPre (\\_ => vv.c2 ++ np.s ! Acc) +-- (insertObjc (\\a => infVP vv.isAux vp a) (predVc vv)) ** +-- {c2 = vp.c2} ; +-- +-- UseComp comp = insertObj comp.s (predAux auxBe) ; +-- +-- AdvVP vp adv = insertObj (\\_ => adv.s) vp ; +-- +-- AdVVP adv vp = insertAdV adv.s vp ; +-- +-- ReflVP v = insertObjPre (\\a => v.c2 ++ reflPron ! a) v ; +-- +-- PassV2 v = insertObj (\\_ => v.s ! VPPart) (predAux auxBe) ; +-- +-----b UseVS, UseVQ = \vv -> {s = vv.s ; c2 = [] ; isRefl = vv.isRefl} ; -- no "to" +-- +-- CompAP ap = ap ; +-- CompNP np = {s = \\_ => np.s ! Acc} ; +-- CompAdv a = {s = \\_ => a.s} ; +-- +} diff --git a/lib/next-resource/latin/VerbLat.gfAdjectiveLat.gf b/lib/next-resource/latin/VerbLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..349c8e0d9 --- /dev/null +++ b/lib/next-resource/latin/VerbLat.gfAdjectiveLat.gf @@ -0,0 +1,50 @@ +--concrete VerbLat of Verb = CatLat ** open ResLat in { +-- +-- flags optimize=all_subs ; +-- +-- lin +-- UseV = predV ; +-- +-- SlashV2a v = predVc v ; +-- Slash2V3 v np = +-- insertObjc (\\_ => v.c2 ++ np.s ! Acc) (predV v ** {c2 = v.c3}) ; +-- Slash3V3 v np = +-- insertObjc (\\_ => v.c3 ++ np.s ! Acc) (predVc v) ; ---- +-- +-- ComplVV v vp = insertObj (\\a => infVP v.isAux vp a) (predVV v) ; +-- ComplVS v s = insertObj (\\_ => conjThat ++ s.s) (predV v) ; +-- ComplVQ v q = insertObj (\\_ => q.s ! QIndir) (predV v) ; +-- ComplVA v ap = insertObj (ap.s) (predV v) ; +-- +-- SlashV2V v vp = insertObjc (\\a => infVP v.isAux vp a) (predVc v) ; +-- SlashV2S v s = insertObjc (\\_ => conjThat ++ s.s) (predVc v) ; +-- SlashV2Q v q = insertObjc (\\_ => q.s ! QIndir) (predVc v) ; +-- SlashV2A v ap = insertObjc (\\a => ap.s ! a) (predVc v) ; ---- +-- +-- ComplSlash vp np = insertObjPre (\\_ => vp.c2 ++ np.s ! Acc) vp ; +-- +-- SlashVV vv vp = +-- insertObj (\\a => infVP vv.isAux vp a) (predVV vv) ** +-- {c2 = vp.c2} ; +-- SlashV2VNP vv np vp = +-- insertObjPre (\\_ => vv.c2 ++ np.s ! Acc) +-- (insertObjc (\\a => infVP vv.isAux vp a) (predVc vv)) ** +-- {c2 = vp.c2} ; +-- +-- UseComp comp = insertObj comp.s (predAux auxBe) ; +-- +-- AdvVP vp adv = insertObj (\\_ => adv.s) vp ; +-- +-- AdVVP adv vp = insertAdV adv.s vp ; +-- +-- ReflVP v = insertObjPre (\\a => v.c2 ++ reflPron ! a) v ; +-- +-- PassV2 v = insertObj (\\_ => v.s ! VPPart) (predAux auxBe) ; +-- +-----b UseVS, UseVQ = \vv -> {s = vv.s ; c2 = [] ; isRefl = vv.isRefl} ; -- no "to" +-- +-- CompAP ap = ap ; +-- CompNP np = {s = \\_ => np.s ! Acc} ; +-- CompAdv a = {s = \\_ => a.s} ; +-- +--} diff --git a/lib/next-resource/latin/VerbLat.gfAdjectiveLat.gfAdjectiveLat.gf b/lib/next-resource/latin/VerbLat.gfAdjectiveLat.gfAdjectiveLat.gf new file mode 100644 index 000000000..56ed31a2f --- /dev/null +++ b/lib/next-resource/latin/VerbLat.gfAdjectiveLat.gfAdjectiveLat.gf @@ -0,0 +1,50 @@ +concrete VerbLat of Verb = CatLat ** open ResLat in { + + flags optimize=all_subs ; + + lin + UseV = predV ; + + SlashV2a v = predVc v ; + Slash2V3 v np = + insertObjc (\\_ => v.c2 ++ np.s ! Acc) (predV v ** {c2 = v.c3}) ; + Slash3V3 v np = + insertObjc (\\_ => v.c3 ++ np.s ! Acc) (predVc v) ; ---- + + ComplVV v vp = insertObj (\\a => infVP v.isAux vp a) (predVV v) ; + ComplVS v s = insertObj (\\_ => conjThat ++ s.s) (predV v) ; + ComplVQ v q = insertObj (\\_ => q.s ! QIndir) (predV v) ; + ComplVA v ap = insertObj (ap.s) (predV v) ; + + SlashV2V v vp = insertObjc (\\a => infVP v.isAux vp a) (predVc v) ; + SlashV2S v s = insertObjc (\\_ => conjThat ++ s.s) (predVc v) ; + SlashV2Q v q = insertObjc (\\_ => q.s ! QIndir) (predVc v) ; + SlashV2A v ap = insertObjc (\\a => ap.s ! a) (predVc v) ; ---- + + ComplSlash vp np = insertObjPre (\\_ => vp.c2 ++ np.s ! Acc) vp ; + + SlashVV vv vp = + insertObj (\\a => infVP vv.isAux vp a) (predVV vv) ** + {c2 = vp.c2} ; + SlashV2VNP vv np vp = + insertObjPre (\\_ => vv.c2 ++ np.s ! Acc) + (insertObjc (\\a => infVP vv.isAux vp a) (predVc vv)) ** + {c2 = vp.c2} ; + + UseComp comp = insertObj comp.s (predAux auxBe) ; + + AdvVP vp adv = insertObj (\\_ => adv.s) vp ; + + AdVVP adv vp = insertAdV adv.s vp ; + + ReflVP v = insertObjPre (\\a => v.c2 ++ reflPron ! a) v ; + + PassV2 v = insertObj (\\_ => v.s ! VPPart) (predAux auxBe) ; + +---b UseVS, UseVQ = \vv -> {s = vv.s ; c2 = [] ; isRefl = vv.isRefl} ; -- no "to" + + CompAP ap = ap ; + CompNP np = {s = \\_ => np.s ! Acc} ; + CompAdv a = {s = \\_ => a.s} ; + +}