From ee9b5354e7e1c6ab2e5cbb79d228657842d28878 Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Fri, 5 Jun 2020 21:18:43 +0200 Subject: [PATCH 1/5] (Swa) Move old Swahili files to src/swahili/old --- src/swahili/{ => old}/AdjectiveSwa.gf | 0 src/swahili/{ => old}/AdverbSwa.gf | 0 src/swahili/{ => old}/BackwardSwa.gf | 0 src/swahili/{ => old}/CatSwa.gf | 0 src/swahili/{ => old}/CompatibilitySwa.gf | 0 src/swahili/{ => old}/ConjunctionSwa.gf | 0 src/swahili/{ => old}/ExtraSwa.gf | 0 src/swahili/{ => old}/ExtraSwaAbs.gf | 0 src/swahili/{ => old}/GrammarSwa.gf | 0 src/swahili/{ => old}/IdiomSwa.gf | 0 src/swahili/{ => old}/IrregSwa.gf | 0 src/swahili/{ => old}/IrregSwaAbs.gf | 0 src/swahili/{ => old}/LangSwa.gf | 0 src/swahili/{ => old}/LexiconSwa.gf | 0 src/swahili/{ => old}/MakeStructuralSwa.gf | 0 src/swahili/{ => old}/MorphoSwa.gf | 0 src/swahili/{ => old}/NounSwa.gf | 0 src/swahili/{ => old}/NumeralSwa.gf | 0 src/swahili/{ => old}/OverloadSwa.gf | 0 src/swahili/{ => old}/ParadigmsSwa.gf | 0 src/swahili/{ => old}/PhraseSwa.gf | 0 src/swahili/{ => old}/QuestionSwa.gf | 0 src/swahili/{ => old}/RelativeSwa.gf | 0 src/swahili/{ => old}/ResSwa.gf | 0 src/swahili/{ => old}/SentenceSwa.gf | 0 src/swahili/{ => old}/StructuralSwa.gf | 0 src/swahili/{ => old}/SymbolSwa.gf | 0 src/swahili/{ => old}/VerbSwa.gf | 0 src/swahili/{ => old}/noun0.gf | 0 29 files changed, 0 insertions(+), 0 deletions(-) rename src/swahili/{ => old}/AdjectiveSwa.gf (100%) rename src/swahili/{ => old}/AdverbSwa.gf (100%) rename src/swahili/{ => old}/BackwardSwa.gf (100%) rename src/swahili/{ => old}/CatSwa.gf (100%) rename src/swahili/{ => old}/CompatibilitySwa.gf (100%) rename src/swahili/{ => old}/ConjunctionSwa.gf (100%) rename src/swahili/{ => old}/ExtraSwa.gf (100%) rename src/swahili/{ => old}/ExtraSwaAbs.gf (100%) rename src/swahili/{ => old}/GrammarSwa.gf (100%) rename src/swahili/{ => old}/IdiomSwa.gf (100%) rename src/swahili/{ => old}/IrregSwa.gf (100%) rename src/swahili/{ => old}/IrregSwaAbs.gf (100%) rename src/swahili/{ => old}/LangSwa.gf (100%) rename src/swahili/{ => old}/LexiconSwa.gf (100%) rename src/swahili/{ => old}/MakeStructuralSwa.gf (100%) rename src/swahili/{ => old}/MorphoSwa.gf (100%) rename src/swahili/{ => old}/NounSwa.gf (100%) rename src/swahili/{ => old}/NumeralSwa.gf (100%) rename src/swahili/{ => old}/OverloadSwa.gf (100%) rename src/swahili/{ => old}/ParadigmsSwa.gf (100%) rename src/swahili/{ => old}/PhraseSwa.gf (100%) rename src/swahili/{ => old}/QuestionSwa.gf (100%) rename src/swahili/{ => old}/RelativeSwa.gf (100%) rename src/swahili/{ => old}/ResSwa.gf (100%) rename src/swahili/{ => old}/SentenceSwa.gf (100%) rename src/swahili/{ => old}/StructuralSwa.gf (100%) rename src/swahili/{ => old}/SymbolSwa.gf (100%) rename src/swahili/{ => old}/VerbSwa.gf (100%) rename src/swahili/{ => old}/noun0.gf (100%) diff --git a/src/swahili/AdjectiveSwa.gf b/src/swahili/old/AdjectiveSwa.gf similarity index 100% rename from src/swahili/AdjectiveSwa.gf rename to src/swahili/old/AdjectiveSwa.gf diff --git a/src/swahili/AdverbSwa.gf b/src/swahili/old/AdverbSwa.gf similarity index 100% rename from src/swahili/AdverbSwa.gf rename to src/swahili/old/AdverbSwa.gf diff --git a/src/swahili/BackwardSwa.gf b/src/swahili/old/BackwardSwa.gf similarity index 100% rename from src/swahili/BackwardSwa.gf rename to src/swahili/old/BackwardSwa.gf diff --git a/src/swahili/CatSwa.gf b/src/swahili/old/CatSwa.gf similarity index 100% rename from src/swahili/CatSwa.gf rename to src/swahili/old/CatSwa.gf diff --git a/src/swahili/CompatibilitySwa.gf b/src/swahili/old/CompatibilitySwa.gf similarity index 100% rename from src/swahili/CompatibilitySwa.gf rename to src/swahili/old/CompatibilitySwa.gf diff --git a/src/swahili/ConjunctionSwa.gf b/src/swahili/old/ConjunctionSwa.gf similarity index 100% rename from src/swahili/ConjunctionSwa.gf rename to src/swahili/old/ConjunctionSwa.gf diff --git a/src/swahili/ExtraSwa.gf b/src/swahili/old/ExtraSwa.gf similarity index 100% rename from src/swahili/ExtraSwa.gf rename to src/swahili/old/ExtraSwa.gf diff --git a/src/swahili/ExtraSwaAbs.gf b/src/swahili/old/ExtraSwaAbs.gf similarity index 100% rename from src/swahili/ExtraSwaAbs.gf rename to src/swahili/old/ExtraSwaAbs.gf diff --git a/src/swahili/GrammarSwa.gf b/src/swahili/old/GrammarSwa.gf similarity index 100% rename from src/swahili/GrammarSwa.gf rename to src/swahili/old/GrammarSwa.gf diff --git a/src/swahili/IdiomSwa.gf b/src/swahili/old/IdiomSwa.gf similarity index 100% rename from src/swahili/IdiomSwa.gf rename to src/swahili/old/IdiomSwa.gf diff --git a/src/swahili/IrregSwa.gf b/src/swahili/old/IrregSwa.gf similarity index 100% rename from src/swahili/IrregSwa.gf rename to src/swahili/old/IrregSwa.gf diff --git a/src/swahili/IrregSwaAbs.gf b/src/swahili/old/IrregSwaAbs.gf similarity index 100% rename from src/swahili/IrregSwaAbs.gf rename to src/swahili/old/IrregSwaAbs.gf diff --git a/src/swahili/LangSwa.gf b/src/swahili/old/LangSwa.gf similarity index 100% rename from src/swahili/LangSwa.gf rename to src/swahili/old/LangSwa.gf diff --git a/src/swahili/LexiconSwa.gf b/src/swahili/old/LexiconSwa.gf similarity index 100% rename from src/swahili/LexiconSwa.gf rename to src/swahili/old/LexiconSwa.gf diff --git a/src/swahili/MakeStructuralSwa.gf b/src/swahili/old/MakeStructuralSwa.gf similarity index 100% rename from src/swahili/MakeStructuralSwa.gf rename to src/swahili/old/MakeStructuralSwa.gf diff --git a/src/swahili/MorphoSwa.gf b/src/swahili/old/MorphoSwa.gf similarity index 100% rename from src/swahili/MorphoSwa.gf rename to src/swahili/old/MorphoSwa.gf diff --git a/src/swahili/NounSwa.gf b/src/swahili/old/NounSwa.gf similarity index 100% rename from src/swahili/NounSwa.gf rename to src/swahili/old/NounSwa.gf diff --git a/src/swahili/NumeralSwa.gf b/src/swahili/old/NumeralSwa.gf similarity index 100% rename from src/swahili/NumeralSwa.gf rename to src/swahili/old/NumeralSwa.gf diff --git a/src/swahili/OverloadSwa.gf b/src/swahili/old/OverloadSwa.gf similarity index 100% rename from src/swahili/OverloadSwa.gf rename to src/swahili/old/OverloadSwa.gf diff --git a/src/swahili/ParadigmsSwa.gf b/src/swahili/old/ParadigmsSwa.gf similarity index 100% rename from src/swahili/ParadigmsSwa.gf rename to src/swahili/old/ParadigmsSwa.gf diff --git a/src/swahili/PhraseSwa.gf b/src/swahili/old/PhraseSwa.gf similarity index 100% rename from src/swahili/PhraseSwa.gf rename to src/swahili/old/PhraseSwa.gf diff --git a/src/swahili/QuestionSwa.gf b/src/swahili/old/QuestionSwa.gf similarity index 100% rename from src/swahili/QuestionSwa.gf rename to src/swahili/old/QuestionSwa.gf diff --git a/src/swahili/RelativeSwa.gf b/src/swahili/old/RelativeSwa.gf similarity index 100% rename from src/swahili/RelativeSwa.gf rename to src/swahili/old/RelativeSwa.gf diff --git a/src/swahili/ResSwa.gf b/src/swahili/old/ResSwa.gf similarity index 100% rename from src/swahili/ResSwa.gf rename to src/swahili/old/ResSwa.gf diff --git a/src/swahili/SentenceSwa.gf b/src/swahili/old/SentenceSwa.gf similarity index 100% rename from src/swahili/SentenceSwa.gf rename to src/swahili/old/SentenceSwa.gf diff --git a/src/swahili/StructuralSwa.gf b/src/swahili/old/StructuralSwa.gf similarity index 100% rename from src/swahili/StructuralSwa.gf rename to src/swahili/old/StructuralSwa.gf diff --git a/src/swahili/SymbolSwa.gf b/src/swahili/old/SymbolSwa.gf similarity index 100% rename from src/swahili/SymbolSwa.gf rename to src/swahili/old/SymbolSwa.gf diff --git a/src/swahili/VerbSwa.gf b/src/swahili/old/VerbSwa.gf similarity index 100% rename from src/swahili/VerbSwa.gf rename to src/swahili/old/VerbSwa.gf diff --git a/src/swahili/noun0.gf b/src/swahili/old/noun0.gf similarity index 100% rename from src/swahili/noun0.gf rename to src/swahili/old/noun0.gf From 0f67332f31087b486a843e2ded0fa3e3a9ecd6d2 Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Fri, 5 Jun 2020 21:19:14 +0200 Subject: [PATCH 2/5] (Bantu) Minor fixes to make Swahili compile --- src/bantu/CatBantu.gf | 8 +++----- src/bantu/ResBantu.gf | 12 +----------- src/bantu/SentenceBantu.gf | 17 +++++++---------- src/bantu/VerbBantu.gf | 4 +--- 4 files changed, 12 insertions(+), 29 deletions(-) diff --git a/src/bantu/CatBantu.gf b/src/bantu/CatBantu.gf index 7d86007e..8105755e 100644 --- a/src/bantu/CatBantu.gf +++ b/src/bantu/CatBantu.gf @@ -1,5 +1,5 @@ -incomplete concrete CatBantu of Cat = - CommonX - [Pol] +incomplete concrete CatBantu of Cat = + CommonX ** open ResBantu, Prelude, ParamX in { flags optimize=all_subs ; @@ -7,8 +7,6 @@ incomplete concrete CatBantu of Cat = lincat - Pol = {s : Str ; b : Bool} ; - S = {s : Str} ; QS = {s : QForm => Str} ; RS = {s : Agr => Str ; c : NPCase} ; -- c for it clefts @@ -16,7 +14,7 @@ incomplete concrete CatBantu of Cat = -- Sentence - -- Cl = {s : Tense => Anteriority => Bool => Str} ; + Cl = {s : Tense => Anteriority => Bool => Str} ; -- ClSlash = { -- s : ResKam.Tense => Anteriority => Bool => Str ; -- } ; diff --git a/src/bantu/ResBantu.gf b/src/bantu/ResBantu.gf index b77a6132..d8e646c5 100644 --- a/src/bantu/ResBantu.gf +++ b/src/bantu/ResBantu.gf @@ -11,6 +11,7 @@ flags oper npNom : NPCase = NCase Nom ; npLoc : NPCase = NCase Loc ; + NPAcc : NPCase = NCase Nom ; -- Added this so that swahili compiles. /IL2020 npcase2case : NPCase -> Case = \nc -> case nc of {NCase c => c ; _ => Nom} ; @@ -81,14 +82,3 @@ oper finalComma : Str = pre {"," | "." => []; "" => SOFT_BIND ++ ","; _ => []} ; frontComma : Str = SOFT_BIND ++ "," ; } - --- insertObject: --- p -cat=Cl -tr "la femme te l' envoie" --- PredVP (DetCN (DetSg DefSg NoOrd) (UseN woman_N)) --- (ComplV3 send_V3 (UsePron he_Pron) (UsePron thou_Pron)) --- la femme te l' a envoyé --- --- p -cat=Cl -tr "la femme te lui envoie" --- PredVP (DetCN (DetSg DefSg NoOrd) (UseN woman_N)) --- (ComplV3 send_V3 (UsePron thou_Pron) (UsePron he_Pron)) --- la femme te lui a envoyée diff --git a/src/bantu/SentenceBantu.gf b/src/bantu/SentenceBantu.gf index 9735f197..ec4e190f 100644 --- a/src/bantu/SentenceBantu.gf +++ b/src/bantu/SentenceBantu.gf @@ -1,14 +1,10 @@ incomplete concrete SentenceBantu of Sentence = CatBantu ** open Prelude, CommonBantu, ResBantu in { -{- - flags optimize=all_subs ; - coding=utf8 ; lin - - - PredVP np vp = mkClause (np.s ! npNom) np.a vp ; + PredVP np vp = mkClause (np.s ! npNom) (agrFeatures np.a) vp ; +{- PredSCVP sc vp = mkClause sc.s (agrP3 Sg) vp ; ImpVP vp = { @@ -43,11 +39,12 @@ incomplete concrete SentenceBantu of Sentence = EmbedS s = {s = conjThat ++ s.s} ; EmbedQS qs = {s = qs.s ! QIndir} ; EmbedVP vp = {s = infVP VVInf vp Simul CPos (agrP3 Sg)} ; --- agr - UseCl t p cl = { - s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.b } ; +-} + UseCl t p cl = + let b : Bool = case p.p of {Pos => True ; _ => False} + in {s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! b} ; - -- UseCl t p cl = {s = t.s ++ p.s ++ cl.s ! t.t ! p.b} ; - UseQCl t p cl = { +{- UseQCl t p cl = { s = \\q => t.s ++ p.s ++ cl.s ! t.t ! t.a ! ctr p.p ! q } ; UseRCl t p cl = { diff --git a/src/bantu/VerbBantu.gf b/src/bantu/VerbBantu.gf index 3edc98bd..f300c0b3 100644 --- a/src/bantu/VerbBantu.gf +++ b/src/bantu/VerbBantu.gf @@ -1,11 +1,9 @@ incomplete concrete VerbBantu of Verb = CatBantu ** open Prelude, CommonBantu, ResBantu in { -{- - flags optimize=all_subs ; lin UseV = predV ; - +{- SlashV2a v = predV v ** {c2 = v.c2 ; gapInMiddle = False} ; Slash2V3 v np = insertObjc (\\_ => v.c2 ++ np.s ! NPAcc) (predV v ** {c2 = v.c3 ; gapInMiddle = False}) ; From abf0ec17fb7a54bbfe12e8daf85d65eadb7a8ce4 Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Fri, 5 Jun 2020 21:22:24 +0200 Subject: [PATCH 3/5] (Swa) Rename Kiswahili to Swahili --- src/kiswahili/CatKis.gf | 2 -- src/kiswahili/ConjunctionKis.gf | 2 -- src/kiswahili/GrammarKis.gf | 30 ------------------- src/kiswahili/LangKis.gf | 8 ----- src/kiswahili/NounKis.gf | 2 -- src/kiswahili/PhraseKis.gf | 3 -- src/kiswahili/QuestionKis.gf | 2 -- src/kiswahili/RelativeKis.gf | 2 -- src/kiswahili/SentenceKis.gf | 3 -- src/kiswahili/VerbKis.gf | 2 -- .../AdjectiveSwa.gf} | 6 ++-- .../AdverbKis.gf => swahili/AdverbSwa.gf} | 6 ++-- src/swahili/CatSwa.gf | 2 ++ src/swahili/ConjunctionSwa.gf | 2 ++ .../DiffKis.gf => swahili/DiffSwa.gf} | 6 ++-- src/swahili/GrammarSwa.gf | 21 +++++++++++++ .../IdiomKis.gf => swahili/IdiomSwa.gf} | 2 +- src/swahili/LangSwa.gf | 8 +++++ .../LexiconKis.gf => swahili/LexiconSwa.gf} | 4 +-- .../MorphoKis.gf => swahili/MorphoSwa.gf} | 2 +- src/swahili/NounSwa.gf | 2 ++ .../NumeralKis.gf => swahili/NumeralSwa.gf} | 4 +-- .../ParadigmsSwa.gf} | 26 ++++++++-------- src/swahili/PhraseSwa.gf | 3 ++ src/swahili/QuestionSwa.gf | 2 ++ src/swahili/RelativeSwa.gf | 2 ++ .../ResKis.gf => swahili/ResSwa.gf} | 2 +- src/swahili/SentenceSwa.gf | 2 ++ .../StructuralSwa.gf} | 12 ++++---- src/swahili/VerbSwa.gf | 2 ++ 30 files changed, 81 insertions(+), 91 deletions(-) delete mode 100644 src/kiswahili/CatKis.gf delete mode 100644 src/kiswahili/ConjunctionKis.gf delete mode 100644 src/kiswahili/GrammarKis.gf delete mode 100644 src/kiswahili/LangKis.gf delete mode 100644 src/kiswahili/NounKis.gf delete mode 100644 src/kiswahili/PhraseKis.gf delete mode 100644 src/kiswahili/QuestionKis.gf delete mode 100644 src/kiswahili/RelativeKis.gf delete mode 100644 src/kiswahili/SentenceKis.gf delete mode 100644 src/kiswahili/VerbKis.gf rename src/{kiswahili/AdjectiveKis.gf => swahili/AdjectiveSwa.gf} (75%) rename src/{kiswahili/AdverbKis.gf => swahili/AdverbSwa.gf} (72%) create mode 100644 src/swahili/CatSwa.gf create mode 100644 src/swahili/ConjunctionSwa.gf rename src/{kiswahili/DiffKis.gf => swahili/DiffSwa.gf} (97%) create mode 100644 src/swahili/GrammarSwa.gf rename src/{kiswahili/IdiomKis.gf => swahili/IdiomSwa.gf} (95%) create mode 100644 src/swahili/LangSwa.gf rename src/{kiswahili/LexiconKis.gf => swahili/LexiconSwa.gf} (99%) rename src/{kiswahili/MorphoKis.gf => swahili/MorphoSwa.gf} (99%) create mode 100644 src/swahili/NounSwa.gf rename src/{kiswahili/NumeralKis.gf => swahili/NumeralSwa.gf} (96%) rename src/{kiswahili/ParadigmsKis.gf => swahili/ParadigmsSwa.gf} (96%) create mode 100644 src/swahili/PhraseSwa.gf create mode 100644 src/swahili/QuestionSwa.gf create mode 100644 src/swahili/RelativeSwa.gf rename src/{kiswahili/ResKis.gf => swahili/ResSwa.gf} (60%) create mode 100644 src/swahili/SentenceSwa.gf rename src/{kiswahili/StructuralKis.gf => swahili/StructuralSwa.gf} (95%) create mode 100644 src/swahili/VerbSwa.gf diff --git a/src/kiswahili/CatKis.gf b/src/kiswahili/CatKis.gf deleted file mode 100644 index 0f93da54..00000000 --- a/src/kiswahili/CatKis.gf +++ /dev/null @@ -1,2 +0,0 @@ -concrete CatKis of Cat = CommonX - [Pol] - ** CatBantu with (ResBantu = ResKis); diff --git a/src/kiswahili/ConjunctionKis.gf b/src/kiswahili/ConjunctionKis.gf deleted file mode 100644 index 4e0b34ef..00000000 --- a/src/kiswahili/ConjunctionKis.gf +++ /dev/null @@ -1,2 +0,0 @@ -concrete ConjunctionKis of Conjunction = CatKis ** ConjunctionBantu with - (ResBantu = ResKis); \ No newline at end of file diff --git a/src/kiswahili/GrammarKis.gf b/src/kiswahili/GrammarKis.gf deleted file mode 100644 index 71e66339..00000000 --- a/src/kiswahili/GrammarKis.gf +++ /dev/null @@ -1,30 +0,0 @@ ---# -path=.:../abstract:../common:prelude - -concrete GrammarKis of Grammar = - NounKis, - VerbKis, - AdjectiveKis, - AdverbKis, - NumeralKis, - SentenceKis, - QuestionKis, - RelativeKis, - ConjunctionKis, - PhraseKis, - TextX - [Pol,PPos,PNeg,Pres], - StructuralKis, - IdiomKis, - TenseX - [Pol,PPos,PNeg,Pres] - ** { - -flags startcat = Phr ; unlexer = text ; lexer = text; - ---lin - --PPos = {s = [] ; p = CPos} ; - -- PNeg = {s = [] ; p = CNeg True} ; -- contracted: don't - --PPos = {s = [] ; b = True} ; - -- PNeg = {s = [] ; b = False} ; - -- TPres = {s = [] ; t = ResKis.Pres} ; - -- TPast = {s = [] ; t = ResKis.Past }; - -- TFut = {s = [] ; t = ResKis.Fut }; -} ; diff --git a/src/kiswahili/LangKis.gf b/src/kiswahili/LangKis.gf deleted file mode 100644 index 115e8f53..00000000 --- a/src/kiswahili/LangKis.gf +++ /dev/null @@ -1,8 +0,0 @@ ---# -path=.:../abstract:../common:../api - -concrete LangKis of Lang = - GrammarKis, - LexiconKis --- ,ConstructionSwa - ** { -} ; diff --git a/src/kiswahili/NounKis.gf b/src/kiswahili/NounKis.gf deleted file mode 100644 index 45f24b93..00000000 --- a/src/kiswahili/NounKis.gf +++ /dev/null @@ -1,2 +0,0 @@ -concrete NounKis of Noun = - CatKis ** NounBantu with (Structural = StructuralKis), (ResBantu = ResKis); diff --git a/src/kiswahili/PhraseKis.gf b/src/kiswahili/PhraseKis.gf deleted file mode 100644 index 26531643..00000000 --- a/src/kiswahili/PhraseKis.gf +++ /dev/null @@ -1,3 +0,0 @@ -concrete PhraseKis of Phrase = CatKis ** PhraseBantu with - (ResBantu = ResKis); - \ No newline at end of file diff --git a/src/kiswahili/QuestionKis.gf b/src/kiswahili/QuestionKis.gf deleted file mode 100644 index b3c2c9cb..00000000 --- a/src/kiswahili/QuestionKis.gf +++ /dev/null @@ -1,2 +0,0 @@ -concrete QuestionKis of Question = CatKis ** QuestionBantu with - (ResBantu = ResKis); \ No newline at end of file diff --git a/src/kiswahili/RelativeKis.gf b/src/kiswahili/RelativeKis.gf deleted file mode 100644 index e10032bb..00000000 --- a/src/kiswahili/RelativeKis.gf +++ /dev/null @@ -1,2 +0,0 @@ -concrete RelativeKis of Relative = CatKis ** RelativeBantu with - (ResBantu = ResKis); \ No newline at end of file diff --git a/src/kiswahili/SentenceKis.gf b/src/kiswahili/SentenceKis.gf deleted file mode 100644 index ef3ddc73..00000000 --- a/src/kiswahili/SentenceKis.gf +++ /dev/null @@ -1,3 +0,0 @@ -concrete SentenceKis of Sentence = CatKis ** SentenceBantu with - (ResBantu = ResKis); - diff --git a/src/kiswahili/VerbKis.gf b/src/kiswahili/VerbKis.gf deleted file mode 100644 index b33f1b82..00000000 --- a/src/kiswahili/VerbKis.gf +++ /dev/null @@ -1,2 +0,0 @@ -concrete VerbKis of Verb = CatKis ** VerbBantu with - (ResBantu = ResKis); diff --git a/src/kiswahili/AdjectiveKis.gf b/src/swahili/AdjectiveSwa.gf similarity index 75% rename from src/kiswahili/AdjectiveKis.gf rename to src/swahili/AdjectiveSwa.gf index 98b3d4d9..3c0a32ff 100644 --- a/src/kiswahili/AdjectiveKis.gf +++ b/src/swahili/AdjectiveSwa.gf @@ -1,5 +1,5 @@ -concrete AdjectiveKis of Adjective = CatKis **AdjectiveBantu-[ComparA,UseComparA,ComplA2] -with (ResBantu = ResKis)** open DiffKis in +concrete AdjectiveSwa of Adjective = CatSwa **AdjectiveBantu-[ComparA,UseComparA,ComplA2] +with (ResBantu = ResSwa)** open DiffSwa in { flags coding=utf8; lin @@ -13,4 +13,4 @@ flags coding=utf8; s = \\g,n => a.s !AAdj g n ++ a.c2 ++ np.s ! NPAcc; isPre = False } ; - } \ No newline at end of file + } diff --git a/src/kiswahili/AdverbKis.gf b/src/swahili/AdverbSwa.gf similarity index 72% rename from src/kiswahili/AdverbKis.gf rename to src/swahili/AdverbSwa.gf index 205fb841..c8eca324 100644 --- a/src/kiswahili/AdverbKis.gf +++ b/src/swahili/AdverbSwa.gf @@ -1,5 +1,5 @@ -concrete AdverbKis of Adverb = CatKis **AdverbBantu -[ComparAdvAdj,ComparAdvAdjS] with - (ResBantu = ResKis)** open DiffKis in +concrete AdverbSwa of Adverb = CatSwa **AdverbBantu -[ComparAdvAdj,ComparAdvAdjS] with + (ResBantu = ResSwa)** open DiffSwa in { flags coding=utf8; lin @@ -10,4 +10,4 @@ flags coding=utf8; ComparAdvAdjS cadv a s = { s = cadv.s ++ a.s !AAdj G1 Sg ++ cadv.p ++ s.s } ; - } \ No newline at end of file + } diff --git a/src/swahili/CatSwa.gf b/src/swahili/CatSwa.gf new file mode 100644 index 00000000..9d7f5c6c --- /dev/null +++ b/src/swahili/CatSwa.gf @@ -0,0 +1,2 @@ +concrete CatSwa of Cat = CommonX + ** CatBantu with (ResBantu = ResSwa); diff --git a/src/swahili/ConjunctionSwa.gf b/src/swahili/ConjunctionSwa.gf new file mode 100644 index 00000000..36a15bc9 --- /dev/null +++ b/src/swahili/ConjunctionSwa.gf @@ -0,0 +1,2 @@ +concrete ConjunctionSwa of Conjunction = CatSwa ** ConjunctionBantu with + (ResBantu = ResSwa); diff --git a/src/kiswahili/DiffKis.gf b/src/swahili/DiffSwa.gf similarity index 97% rename from src/kiswahili/DiffKis.gf rename to src/swahili/DiffSwa.gf index c0bdc842..7a4f05cf 100644 --- a/src/kiswahili/DiffKis.gf +++ b/src/swahili/DiffSwa.gf @@ -1,9 +1,9 @@ -instance DiffKis of DiffBantu = open CommonBantu, Prelude in { +instance DiffSwa of DiffBantu = open CommonBantu, Prelude in { param - GenderKis = G1|G2|G3|G4|G5|G6|G7|G8|G9|G10|G11|G12|G13 ; + GenderSwa = G1|G2|G3|G4|G5|G6|G7|G8|G9|G10|G11|G12|G13 ; oper - Gender = GenderKis ; + Gender = GenderSwa ; firstGender = G1 ; secondGender = G2 ; conjThan = "kuliko" ; conjThat = "kuvita" ; diff --git a/src/swahili/GrammarSwa.gf b/src/swahili/GrammarSwa.gf new file mode 100644 index 00000000..023714da --- /dev/null +++ b/src/swahili/GrammarSwa.gf @@ -0,0 +1,21 @@ +--# -path=.:../abstract:../common:../bantu:prelude + +concrete GrammarSwa of Grammar = + NounSwa, + VerbSwa, + AdjectiveSwa, + AdverbSwa, + NumeralSwa, + SentenceSwa, + QuestionSwa, + RelativeSwa, + ConjunctionSwa, + PhraseSwa, + TextX, + StructuralSwa, + IdiomSwa, + TenseX + ** { + +flags startcat = Phr ; +} ; diff --git a/src/kiswahili/IdiomKis.gf b/src/swahili/IdiomSwa.gf similarity index 95% rename from src/kiswahili/IdiomKis.gf rename to src/swahili/IdiomSwa.gf index 089f74b0..780b71b5 100644 --- a/src/kiswahili/IdiomKis.gf +++ b/src/swahili/IdiomSwa.gf @@ -1,4 +1,4 @@ -concrete IdiomKis of Idiom = CatKis ** open Prelude, ResKis in { +concrete IdiomSwa of Idiom = CatSwa ** open Prelude, ResSwa in { flags optimize=all_subs ; {- diff --git a/src/swahili/LangSwa.gf b/src/swahili/LangSwa.gf new file mode 100644 index 00000000..def8c6d4 --- /dev/null +++ b/src/swahili/LangSwa.gf @@ -0,0 +1,8 @@ +--# -path=.:../abstract:../bantu:../common:../api + +concrete LangSwa of Lang = + GrammarSwa, + LexiconSwa +-- ,ConstructionSwa + ** { +} ; diff --git a/src/kiswahili/LexiconKis.gf b/src/swahili/LexiconSwa.gf similarity index 99% rename from src/kiswahili/LexiconKis.gf rename to src/swahili/LexiconSwa.gf index cec711b5..f0615baf 100644 --- a/src/kiswahili/LexiconKis.gf +++ b/src/swahili/LexiconSwa.gf @@ -1,7 +1,7 @@ --# -path=.:prelude -concrete LexiconKis of Lexicon = CatKis ** - open ParadigmsKis,StructuralKis, Prelude in { +concrete LexiconSwa of Lexicon = CatSwa ** + open ParadigmsSwa,StructuralSwa, Prelude in { flags optimize=values ; diff --git a/src/kiswahili/MorphoKis.gf b/src/swahili/MorphoSwa.gf similarity index 99% rename from src/kiswahili/MorphoKis.gf rename to src/swahili/MorphoSwa.gf index 0b2e0dd0..bd0e777e 100644 --- a/src/kiswahili/MorphoKis.gf +++ b/src/swahili/MorphoSwa.gf @@ -5,7 +5,7 @@ -- Benson Kituku 2017-2018 -resource MorphoKis = CommonBantu ,ResKis +resource MorphoSwa = CommonBantu ,ResSwa ** open Prelude, Predef in { diff --git a/src/swahili/NounSwa.gf b/src/swahili/NounSwa.gf new file mode 100644 index 00000000..c0898de4 --- /dev/null +++ b/src/swahili/NounSwa.gf @@ -0,0 +1,2 @@ +concrete NounSwa of Noun = + CatSwa ** NounBantu with (Structural = StructuralSwa), (ResBantu = ResSwa); diff --git a/src/kiswahili/NumeralKis.gf b/src/swahili/NumeralSwa.gf similarity index 96% rename from src/kiswahili/NumeralKis.gf rename to src/swahili/NumeralSwa.gf index 9cd45e2a..8e097ba0 100644 --- a/src/kiswahili/NumeralKis.gf +++ b/src/swahili/NumeralSwa.gf @@ -1,5 +1,5 @@ -concrete NumeralKis of Numeral = CatKis [Numeral,Digits] ** -open Prelude,DiffKis,MorphoKis in { +concrete NumeralSwa of Numeral = CatSwa [Numeral,Digits] ** +open Prelude,DiffSwa,MorphoSwa in { lincat Digit = {s : DForm => CardOrd => Gender => Str} ; diff --git a/src/kiswahili/ParadigmsKis.gf b/src/swahili/ParadigmsSwa.gf similarity index 96% rename from src/kiswahili/ParadigmsKis.gf rename to src/swahili/ParadigmsSwa.gf index bd1e894f..ce3a4f87 100644 --- a/src/kiswahili/ParadigmsKis.gf +++ b/src/swahili/ParadigmsSwa.gf @@ -1,11 +1,11 @@ --# -path=.:../abstract:../../prelude:../common -resource ParadigmsKis = open +resource ParadigmsSwa = open (Predef=Predef), Prelude, - MorphoKis, - ResKis, - CatKis + MorphoSwa, + ResSwa, + CatSwa in { oper @@ -199,9 +199,9 @@ mkInterj : Str -> Interj -- The definitions should not bother the user of the API. So they are -- hidden from the document. - Gender = MorphoKis.Gender ; - Number = MorphoKis.Number ; - Case = MorphoKis.NPCase ; + Gender = MorphoSwa.Gender ; + Number = MorphoSwa.Number ; + Case = MorphoSwa.NPCase ; a_wa = G1 ;--% u_i = G2 ; li_ya = G3 ; @@ -223,8 +223,8 @@ mkInterj : Str -> Interj npNumber np = (agrFeatures np.a).n ; - regN = MorphoKis.regN ; - iregN = MorphoKis.iregN ; + regN = MorphoSwa.regN ; + iregN = MorphoSwa.iregN ; compoundN s n = lin N {s = \\x,y => s ++ n.s ! x ! y ; g=n.g} ; @@ -370,9 +370,9 @@ mkN2 = overload { regN2 : N -> N2 ; - regA : Str -> A = \s -> lin A (MorphoKis.regA s) ; - cregA : Str -> A = \s -> lin A (MorphoKis.cregA s) ; - iregA : (fat,fatter : Str) -> A =\a,b -> lin A (MorphoKis.iregA a b); + regA : Str -> A = \s -> lin A (MorphoSwa.regA s) ; + cregA : Str -> A = \s -> lin A (MorphoSwa.cregA s) ; + iregA : (fat,fatter : Str) -> A =\a,b -> lin A (MorphoSwa.iregA a b); mkA = overload { mkA : Str -> A = \a -> lin A (regA a |cregA a); mkA : (fat,fatter : Str) -> A =\a,b -> lin A (iregA a b); @@ -388,7 +388,7 @@ mkN2 = overload { } ; - regV=MorphoKis.regV ; + regV=MorphoSwa.regV ; {- mkV = overload { mkV : Str -> V =\v ->lin V(regV v) ; diff --git a/src/swahili/PhraseSwa.gf b/src/swahili/PhraseSwa.gf new file mode 100644 index 00000000..62290c1e --- /dev/null +++ b/src/swahili/PhraseSwa.gf @@ -0,0 +1,3 @@ +concrete PhraseSwa of Phrase = CatSwa ** PhraseBantu with + (ResBantu = ResSwa); + diff --git a/src/swahili/QuestionSwa.gf b/src/swahili/QuestionSwa.gf new file mode 100644 index 00000000..970e6927 --- /dev/null +++ b/src/swahili/QuestionSwa.gf @@ -0,0 +1,2 @@ +concrete QuestionSwa of Question = CatSwa ** QuestionBantu with + (ResBantu = ResSwa); diff --git a/src/swahili/RelativeSwa.gf b/src/swahili/RelativeSwa.gf new file mode 100644 index 00000000..be3f10d7 --- /dev/null +++ b/src/swahili/RelativeSwa.gf @@ -0,0 +1,2 @@ +concrete RelativeSwa of Relative = CatSwa ** RelativeBantu with + (ResBantu = ResSwa); diff --git a/src/kiswahili/ResKis.gf b/src/swahili/ResSwa.gf similarity index 60% rename from src/kiswahili/ResKis.gf rename to src/swahili/ResSwa.gf index 94a50124..ea8a9930 100644 --- a/src/kiswahili/ResKis.gf +++ b/src/swahili/ResSwa.gf @@ -2,7 +2,7 @@ --1 Swalish auxiliary operations. -instance ResKis of ResBantu = DiffKis, CommonBantu ** open Prelude in { +instance ResSwa of ResBantu = DiffSwa, CommonBantu ** open Prelude in { } ; diff --git a/src/swahili/SentenceSwa.gf b/src/swahili/SentenceSwa.gf new file mode 100644 index 00000000..50c37082 --- /dev/null +++ b/src/swahili/SentenceSwa.gf @@ -0,0 +1,2 @@ +concrete SentenceSwa of Sentence = CatSwa ** SentenceBantu with + (ResBantu = ResSwa); diff --git a/src/kiswahili/StructuralKis.gf b/src/swahili/StructuralSwa.gf similarity index 95% rename from src/kiswahili/StructuralKis.gf rename to src/swahili/StructuralSwa.gf index 2967c2fc..bc3b6d67 100644 --- a/src/kiswahili/StructuralKis.gf +++ b/src/swahili/StructuralSwa.gf @@ -1,5 +1,5 @@ -concrete StructuralKis of Structural = CatKis ** - open MorphoKis, ParadigmsKis, +concrete StructuralSwa of Structural = CatSwa ** + open MorphoSwa, ParadigmsSwa, (C = ConstructX), Prelude in { flags optimize=all ; lin @@ -50,7 +50,7 @@ concrete StructuralKis of Structural = CatKis ** n= Pl } ; more_Adv = mkAdv "zaidi" ; - most_Predet = {s = \\g => MorphoKis.Mostpredetprefix g + "ngi"} ; + most_Predet = {s = \\g => MorphoSwa.Mostpredetprefix g + "ngi"} ; -- must_VV = { ---b no_Phr = ss "no" ; no_Utt = ss "hapana" ; @@ -61,7 +61,7 @@ concrete StructuralKis of Structural = CatKis ** otherwise_PConj = ss "ila" ; please_Voc = ss "tafadhari" ; part_Prep, possess_Prep = let - questo : ParadigmsKis.Number => MorphoKis.Gender => Str = table { + questo : ParadigmsSwa.Number => MorphoSwa.Gender => Str = table { Sg => \\g=> case of { => "la" ; => "cha" ; => "ya" ; @@ -94,7 +94,7 @@ concrete StructuralKis of Structural = CatKis ** something_NP = regNP "kitu fulani" ki_vi singular ; somewhere_Adv = mkAdv "seheme fulani" ; that_Quant = let - questo : ParadigmsKis.Number => MorphoKis.Gender => Str = table { + questo : ParadigmsSwa.Number => MorphoSwa.Gender => Str = table { Sg => \\g=> case of { => "huyo" ; => "huo"; @@ -134,7 +134,7 @@ concrete StructuralKis of Structural = CatKis ** therefore_PConj = ss "kwa ajili" ; they_Pron =mkPron "wao" "ao" G1 Pl P3 ; this_Quant = let - questo : ParadigmsKis.Number => MorphoKis.Gender => Str = table { + questo : ParadigmsSwa.Number => MorphoSwa.Gender => Str = table { Sg => \\g=> case of { => "huyu" ; => "hapa" ; diff --git a/src/swahili/VerbSwa.gf b/src/swahili/VerbSwa.gf new file mode 100644 index 00000000..4572be6c --- /dev/null +++ b/src/swahili/VerbSwa.gf @@ -0,0 +1,2 @@ +concrete VerbSwa of Verb = CatSwa ** VerbBantu with + (ResBantu = ResSwa); From 03179d4ac37ede5042ec98786b4b68843db1e7ad Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Fri, 5 Jun 2020 21:26:43 +0200 Subject: [PATCH 4/5] (Swa) Update new Swahili in languages.csv --- languages.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/languages.csv b/languages.csv index 49216ef9..6fddd409 100644 --- a/languages.csv +++ b/languages.csv @@ -41,7 +41,7 @@ Slo,Slovak,slovak,,,,,,n,,y Slv,Slovenian,slovenian,,,,,n,n,,n Snd,Sindhi,sindhi,,,,,,,,y Spa,Spanish,spanish,Romance,,y,,,,y,y -Swa,Swahili,swahili,,,,n,n,n,y,n +Swa,Swahili,swahili,Bantu,,,n,n,n,n,n Swe,Swedish,swedish,Scand,,y,,,,y,y Tel,Telugu,telugu,,,y,n,n,n,,n Tha,Thai,thai,,to_thai,,,,,,y From 4b1905014938511a106098f015af4f34910427a0 Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Fri, 5 Jun 2020 21:33:30 +0200 Subject: [PATCH 5/5] (Swa) Add readme --- src/swahili/README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/swahili/README.md diff --git a/src/swahili/README.md b/src/swahili/README.md new file mode 100644 index 00000000..2d0ee632 --- /dev/null +++ b/src/swahili/README.md @@ -0,0 +1,13 @@ +# Swahili + +## Language info + +* English name: Swahili +* Autonym: Kiswahili +* ISO code: Swa + +## Authors + +2009: Initial work by Wanjiku Ng'ang'a and Juliet Mutahi. These files are in the subdirectory `old`. + +2018: New version by Benson Kituku, using the [Bantu functor](https://github.com/GrammaticalFramework/gf-rgl/tree/master/src/bantu).