From 0f67332f31087b486a843e2ded0fa3e3a9ecd6d2 Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Fri, 5 Jun 2020 21:19:14 +0200 Subject: [PATCH] (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 7d86007eb..8105755e7 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 b77a6132a..d8e646c5b 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 9735f1974..ec4e190f7 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 3edc98bd2..f300c0b3d 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}) ;