Remove wide coverage translator

It had now been migrated to a new repository:
https://github.com/GrammaticalFramework/wide-coverage
This commit is contained in:
John J. Camilleri
2018-06-20 10:06:22 +02:00
parent 77d8ff1ba8
commit a3ad324dc2
116 changed files with 3 additions and 990790 deletions

View File

@@ -2,13 +2,12 @@ RUNGHC=runghc
RUNMAKE=$(RUNGHC) Make.hs
PROBSFILE=../../treebanks/PennTreebank/ParseEngAbs.probs
TPROBSFILE=translator/translate.probs
#GF_LIB_PATH=..
.PHONY: all present alltenses full lang api math prelude test demo parse synopsis link compiled constructX clean
all: link prelude constructX present alltenses
all: link prelude constructX present alltenses
#full
present:
@@ -16,12 +15,12 @@ present:
$(RUNMAKE) present api
$(RUNMAKE) present symbolic
alltenses:
alltenses:
$(RUNMAKE) alltenses lang
$(RUNMAKE) alltenses api
$(RUNMAKE) alltenses symbolic
full:
full:
$(RUNMAKE) lang
lang:
@@ -120,96 +119,6 @@ compiled:
clean:
$(RUNMAKE) clean
# the previous translation grammar "Parse" now replaced by Translate:
# Dummy targets, just for convenience
Translate: TranslateEng TranslateBul TranslateEus TranslateChi TranslateGer TranslateSwe TranslateHin TranslateFin TranslateFre Translate8
TranslateEng: TranslateEng.pgf
TranslateBul: TranslateBul.pgf
TranslateChi: TranslateChi.pgf
TranslateGer: TranslateGer.pgf
TranslateDut: TranslateDut.pgf
TranslateSwe: TranslateSwe.pgf
TranslateHin: TranslateHin.pgf
TranslateFin: TranslateFin.pgf
TranslateFre: TranslateFre.pgf
TranslateIta: TranslateIta.pgf
TranslateSpa: TranslateSpa.pgf
TranslateEus: TranslateEus.pgf
S=-s
GFMKT=mkdir -p ../translator && gf $S -make -literal=PN,Symb -probs=$(TPROBSFILE) -gfo-dir ../translator
TRANSLATE8=TranslateEng.pgf TranslateBul.pgf TranslateChi.pgf TranslateGer.pgf TranslateSwe.pgf TranslateHin.pgf TranslateFin.pgf TranslateFre.pgf
TRANSLATE10=TranslateEng.pgf TranslateBul.pgf TranslateChi.pgf TranslateGer.pgf TranslateSwe.pgf TranslateHin.pgf TranslateFin.pgf TranslateFre.pgf TranslateIta.pgf TranslateSpa.pgf
TRANSLATE11=$(TRANSLATE10) TranslateDut.pgf
TRANSLATE15=$(TRANSLATE10) TranslateDut.pgf TranslateCat.pgf TranslateEst.pgf TranslateTha.pgf TranslateJpn.pgf
# Without dependencies:
Translate10:
$(GFMKT) -name=Translate10 $(TRANSLATE10) +RTS -K32M
# With dependencies:
Translate10.pgf: $(TRANSLATE10)
$(GFMKT) -name=Translate10 $(TRANSLATE10) +RTS -K32M
# Without dependencies:
Translate11:
$(GFMKT) -name=Translate11 $(TRANSLATE11) +RTS -K32M
# With dependencies:
Translate11.pgf: $(TRANSLATE11)
$(GFMKT) -name=Translate11 $(TRANSLATE11) +RTS -K32M
# Without dependencies:
Translate8:
$(GFMKT) -name=Translate8 $(TRANSLATE8) +RTS -K32M
# With dependencies:
Translate8.pgf: $(TRANSLATE8)
$(GFMKT) -name=Translate8 $(TRANSLATE8) +RTS -K32M
Translate15.pgf: $(TRANSLATE15)
$(GFMKT) -name=Translate15 $(TRANSLATE15) +RTS -K32M
# Translate grammars for individual languages
TranslateEng.pgf:: ; $(GFMKT) -name=TranslateEng translator/TranslateEng.gf
TranslateBul.pgf:: ; $(GFMKT) -name=TranslateBul translator/TranslateBul.gf
TranslateChi.pgf:: ; $(GFMKT) -name=TranslateChi translator/TranslateChi.gf +RTS -K200M
TranslateEus.pgf:: ; $(GFMKT) -name=TranslateEus translator/TranslateEus.gf
TranslateFin.pgf:: ; $(GFMKT) -name=TranslateFin translator/TranslateFin.gf +RTS -K64M
TranslateGer.pgf:: ; $(GFMKT) -name=TranslateGer translator/TranslateGer.gf
TranslateDut.pgf:: ; $(GFMKT) -name=TranslateDut translator/TranslateDut.gf
TranslateHin.pgf:: ; $(GFMKT) -name=TranslateHin translator/TranslateHin.gf
TranslateFre.pgf:: ; $(GFMKT) -name=TranslateFre translator/TranslateFre.gf +RTS -K64M
TranslateSwe.pgf:: ; $(GFMKT) -name=TranslateSwe translator/TranslateSwe.gf
TranslateIta.pgf:: ; $(GFMKT) -name=TranslateIta translator/TranslateIta.gf +RTS -K64M
TranslateSpa.pgf:: ; $(GFMKT) -name=TranslateSpa translator/TranslateSpa.gf +RTS -K64M
TranslateCat.pgf:: ; $(GFMKT) -name=TranslateCat translator/TranslateCat.gf +RTS -K64M
TranslateEst.pgf:: ; $(GFMKT) -name=TranslateEst translator/TranslateEst.gf +RTS -K64M
TranslateTha.pgf:: ; $(GFMKT) -name=TranslateTha translator/TranslateTha.gf +RTS -K64M
TranslateJpn.pgf:: ; $(GFMKT) -name=TranslateJpn translator/TranslateJpn.gf +RTS -K64M
# Selected language pairs:
TranslateEngFin: ; $(GFMKT) -name=TranslateEngFin TranslateEng.pgf TranslateFin.pgf
TranslateEngGer: ; $(GFMKT) -name=TranslateEngGer TranslateEng.pgf TranslateGer.pgf
TranslateEngHin: ; $(GFMKT) -name=TranslateEngHin TranslateEng.pgf TranslateHin.pgf
TranslateEngBul: ; $(GFMKT) -name=TranslateEngBul TranslateEng.pgf TranslateBul.pgf
TranslateEngSpa: ; $(GFMKT) -name=TranslateEngSpa TranslateEng.pgf TranslateSpa.pgf
TranslateEngFre: ; $(GFMKT) -name=TranslateEngFre TranslateEng.pgf TranslateFre.pgf
TranslateEngSwe: ; $(GFMKT) -name=TranslateEngSwe TranslateEng.pgf TranslateSwe.pgf
TranslateEngChi: ; $(GFMKT) -name=TranslateEngChi TranslateEng.pgf TranslateChi.pgf
############################## begin Parse
## now obsolete
@@ -260,4 +169,3 @@ ParseEngSwe: ; $(GFMKP) -name=ParseEngSwe ParseEng.pgf ParseSwe.pgf
ParseEngChi: ; $(GFMKP) -name=ParseEngChi ParseEng.pgf ParseChi.pgf
############################################## end Parse

View File

@@ -1,105 +0,0 @@
abstract Chunk = Cat, Symbol [Symb], Extensions [VPS,VPI] ** {
cat
Chunks ;
Chunk ;
VC ;
fun
OneChunk : Chunk -> Chunks ;
PlusChunk : Chunk -> Chunks -> Chunks ;
ChunkPhr : Chunks -> Phr ;
fun
AP_Chunk : AP -> Chunk ;
AdA_Chunk : AdA -> Chunk ;
Adv_Chunk : Adv -> Chunk ;
AdV_Chunk : AdV -> Chunk ;
AdN_Chunk : AdN -> Chunk ;
S_Chunk : S -> Chunk ;
SSlash_Chunk : SSlash -> Chunk ;
QS_Chunk : QS -> Chunk ;
CN_Pl_Chunk : CN -> Chunk ;
CN_Sg_Chunk : CN -> Chunk ;
CN_Pl_Gen_Chunk : CN -> Chunk ;
CN_Sg_Gen_Chunk : CN -> Chunk ;
Conj_Chunk : Conj -> Chunk ;
Det_Chunk : Det -> Chunk ; -- needed if article form is different from NP form, e.g. English a/an
IAdv_Chunk : IAdv -> Chunk ;
IP_Chunk : IP -> Chunk ;
NP_Nom_Chunk : NP -> Chunk ;
NP_Acc_Chunk : NP -> Chunk ;
NP_Gen_Chunk : NP -> Chunk ;
Numeral_Nom_Chunk : Numeral -> Chunk ;
Numeral_Gen_Chunk : Numeral -> Chunk ;
Ord_Nom_Chunk : Ord -> Chunk ;
Ord_Gen_Chunk : Ord -> Chunk ;
Predet_Chunk : Predet -> Chunk ;
Prep_Chunk : Prep -> Chunk ;
RP_Nom_Chunk : RP -> Chunk ;
RP_Gen_Chunk : RP -> Chunk ;
RP_Acc_Chunk : RP -> Chunk ;
Subj_Chunk : Subj -> Chunk ;
--- PConj_Chunk : PConj -> Chunk ;
VPS_Chunk : VPS -> Chunk ;
VPI_Chunk : VPI -> Chunk ;
-- verbs lifted to one cat
V2_V : V2 -> VC ;
VA_V : VA -> VC ;
VQ_V : VQ -> VC ;
VS_V : VS -> VC ;
VV_V : VV -> VC ;
V3_V : V3 -> VC ;
V2A_V : V2A -> VC ;
V2Q_V : V2Q -> VC ;
V2S_V : V2S -> VC ;
V2V_V : V2V -> VC ;
UseVC : Temp -> Pol -> VC -> VPS ;
-- for unknown words that are not names
Symb_Chunk : Symb -> Chunk ;
-- syncategorematic chunks
refl_SgP1_Chunk,
refl_SgP2_Chunk,
refl_SgP3_Chunk,
refl_PlP1_Chunk,
refl_PlP2_Chunk,
refl_PlP3_Chunk : Chunk ;
neg_Chunk : Chunk ;
copula_Chunk : Chunk ;
copula_neg_Chunk : Chunk ;
copula_inf_Chunk : Chunk ;
past_copula_Chunk : Chunk ;
past_copula_neg_Chunk : Chunk ;
future_Chunk : Chunk ;
future_neg_Chunk : Chunk ;
cond_Chunk : Chunk ;
cond_neg_Chunk : Chunk ;
perfect_Chunk : Chunk ;
perfect_neg_Chunk : Chunk ;
past_perfect_Chunk : Chunk ;
past_perfect_neg_Chunk : Chunk ;
-- chunks for punctuation marks
fullstop_Chunk : Chunk ;
exclmark_Chunk : Chunk ;
questmark_Chunk : Chunk ;
comma_Chunk : Chunk ;
colon_Chunk : Chunk ;
semicolon_Chunk : Chunk ;
quote_Chunk : Chunk ;
lpar_Chunk : Chunk ;
rpar_Chunk : Chunk ;
dash_Chunk : Chunk ;
}

View File

@@ -1,69 +0,0 @@
concrete ChunkBul of Chunk = CatBul, ExtensionsBul [VPS,VPI] **
ChunkFunctor - [
CN_Pl_Chunk, CN_Sg_Chunk, Conj_Chunk, IAdv_Chunk, IP_Chunk, Numeral_Nom_Chunk, SSlash_Chunk, Predet_Chunk,
emptyNP, Prep_Chunk
]
with (Syntax = SyntaxBul), (Extensions = ExtensionsBul) **
open
SyntaxBul, (E = ExtensionsBul), Prelude,
ResBul, MorphoFunsBul, (P = ParadigmsBul) in {
lin VPI_Chunk vpi = {s = vpi.s ! {gn = GSg allGender ; p = P3}} ;
lin CN_Pl_Chunk, CN_Pl_Gen_Chunk = \cn -> {s = cn.s ! (NF Pl allSpecies | NFPlCount)} ;
lin CN_Sg_Chunk, CN_Sg_Gen_Chunk = \cn -> {s = cn.s ! (NF Sg allSpecies | NFSgDefNom)} ;
lin Conj_Chunk c = {s = c.s ++ linCoord ! c.conj};
lin IAdv_Chunk iadv = {s = iadv.s ! allQForm};
lin IP_Chunk ip = {s = ip.s ! (RSubj | RObj allCases | RVoc) ! allQForm};
lin Predet_Chunk predet = {s = predet.s ! allGenNum};
lin Numeral_Nom_Chunk, Numeral_Gen_Chunk = \num -> {s = num.s ! NCard allCardForm};
lin Prep_Chunk prep = prep;
lin NP_Acc_Chunk np = {s = np.s ! RObj allCases};
lin NP_Gen_Chunk np = {s = np.s ! RSubj};
oper
emptyNP : NP = SyntaxBul.mkNP (P.mkPN [] Masc) ;
lin refl_SgP1_Chunk, refl_SgP2_Chunk, refl_SgP3_Chunk, refl_PlP1_Chunk,
refl_PlP2_Chunk, refl_PlP3_Chunk =
{s = reflClitics ! allCases};
lin neg_Chunk = {s = "не"};
lin copula_Chunk = {s = auxBe ! VPres allNumber allPerson};
lin copula_neg_Chunk = {s = "не" ++ auxBe ! VPres allNumber allPerson};
lin copula_inf_Chunk = {s = auxWould ! VPres allNumber allPerson};
lin past_copula_Chunk = {s = auxBe ! VAorist allNumber allPerson};
lin past_copula_neg_Chunk = {s = "не" ++ auxBe ! VAorist allNumber allPerson};
lin future_Chunk = {s = "ще"};
lin future_neg_Chunk = {s = "не ще"};
lin cond_Chunk = {s = auxWould ! VAorist allNumber allPerson} ;
lin cond_neg_Chunk = {s = "не" ++ auxWould ! VAorist allNumber allPerson} ;
lin perfect_Chunk = {s = "*"} ;
lin perfect_neg_Chunk = {s = "не" ++ "*"} ;
lin past_perfect_Chunk = {s = "*"} ;
lin past_perfect_neg_Chunk = {s = "не" ++ "*"} ;
lin SSlash_Chunk s = mkUtt <lin S {s = s.s ! agrP3 (GSg Masc) ++ s.c2.s} : S> ;
oper
allAForm
= ASg allGender allSpecies
| ASgMascDefNom
| APl allSpecies ;
allGender = Masc | Fem | Neut ;
allSpecies = Indef | Def ;
allCases = Acc | Dat ;
allQForm = QDir | QIndir ;
allAnimacy = Human | NonHuman ;
allCardForm =
CFMasc allSpecies allAnimacy
| CFMascDefNom allAnimacy
| CFFem allSpecies
| CFNeut allSpecies ;
allGenNum = GSg allGender | GPl ;
allNumber = Sg | Pl ;
allPerson = P1 | P2 | P3 ;
}

View File

@@ -1,45 +0,0 @@
concrete ChunkCat of Chunk = CatCat, ExtensionsCat [VPS,VPI] **
ChunkFunctor - [AP_Chunk, SSlash_Chunk]
with (Syntax = SyntaxCat), (Extensions = ExtensionsCat) **
open
SyntaxCat, (E = ExtensionsCat), Prelude,
ResCat, CommonRomance, (P = ParadigmsCat) in {
lin
AP_Chunk ap = {s = ap.s ! AF (Masc | Fem) (Sg | Pl)} ;
SSlash_Chunk s = mkUtt <lin S {s = s.s ! {g = Masc ; n = Sg}} : S> ;
lin
NP_Acc_Chunk np = ss (np.s ! Acc).ton ;
NP_Gen_Chunk np = ss (np.s ! genitive).comp ;
VPI_Chunk vpi = vpi ;
oper
emptyNP = mkNP (P.mkPN []) ;
lin
copula_inf_Chunk = ss "ser" ;
refl_SgP1_Chunk = ss "jo mateix" ;
refl_SgP2_Chunk = ss "tu mateix" ;
refl_SgP3_Chunk = ss "aquell mateix" ;
refl_PlP1_Chunk = ss "nosaltres mateixos" ;
refl_PlP2_Chunk = ss "vosaltres mateixos" ;
refl_PlP3_Chunk = ss "ells mateixos" ;
neg_Chunk = ss "no" ;
copula_Chunk = ss "és" ;
copula_neg_Chunk = ss "no és" ;
past_copula_Chunk = ss "va ser" ;
past_copula_neg_Chunk = ss "no va ser" ;
future_Chunk = ss "va" ; ----
future_neg_Chunk = ss "no va" ; ----
cond_Chunk = ss "aniria" ; ----
cond_neg_Chunk = ss "no aniria" ; ----
perfect_Chunk = ss "ha" ;
perfect_neg_Chunk = ss "no ha" ;
past_perfect_Chunk = ss "havia" ;
past_perfect_neg_Chunk = ss "no havia" ;
}

View File

@@ -1,53 +0,0 @@
concrete ChunkChi of Chunk = CatChi, ExtensionsChi [VPS,VPI] **
ChunkFunctor - [Numeral_Nom_Chunk, Conj_Chunk, CN_Pl_Chunk, Subj_Chunk, emptyNP, Prep_Chunk, Predet_Chunk]
with (Syntax = SyntaxChi), (Extensions = ExtensionsChi) **
open
SyntaxChi, (E = ExtensionsChi), Prelude,
ResChi, (P = ParadigmsChi) in {
oper
emptyNP : NP = mkNP [] ;
-- exceptions to functor
lin
Conj_Chunk conj = ss (conj.s ! CSent).s2 ;
Numeral_Nom_Chunk num = ss (num.s ++ ge_s) ;
CN_Pl_Chunk cn = cn ;
Subj_Chunk subj = ss (subj.prePart ++ subj.sufPart) ;
Prep_Chunk prep = ss (prep.prepPre ++ prep.prepPost) ;
Predet_Chunk predet = predet ;
lin
NP_Acc_Chunk np = np ;
NP_Gen_Chunk np = ss (np.s ++ de_s) ;
VPI_Chunk vpi = vpi ;
copula_inf_Chunk = ss copula_s ;
refl_SgP1_Chunk = ss reflPron ;
refl_SgP2_Chunk = ss reflPron ;
refl_SgP3_Chunk = ss reflPron ;
refl_PlP1_Chunk = ss reflPron ;
refl_PlP2_Chunk = ss reflPron ;
refl_PlP3_Chunk = ss reflPron ;
neg_Chunk = ss neg_s ;
copula_Chunk = ss copula_s ;
copula_neg_Chunk = ss (neg_s ++ copula_s) ;
past_copula_Chunk = ss "了" ;
past_copula_neg_Chunk = ss (neg_s ++ copula_s ++ "了") ;
future_Chunk = ss copula_s ; ----
future_neg_Chunk = ss (neg_s ++ copula_s) ;
cond_Chunk = ss copula_s ; ----
cond_neg_Chunk = ss (neg_s ++ copula_s) ;
perfect_Chunk = ss "了" ;
perfect_neg_Chunk = ss (neg_s ++ copula_s ++ "了") ;
past_perfect_Chunk = ss "了" ;
past_perfect_neg_Chunk = ss (neg_s ++ copula_s ++ "了") ;
}

View File

@@ -1,42 +0,0 @@
concrete ChunkDut of Chunk = CatDut, ExtensionsDut [VPS,VPI]
**
ChunkFunctor - [emptyNP]
with (Syntax = SyntaxDut), (Extensions = ExtensionsDut)
**
open
SyntaxDut, (E = ExtensionsDut), Prelude,
ResDut, (P = ParadigmsDut) in {
oper
emptyNP = SyntaxDut.mkNP (P.mkPN []) ;
lin
NP_Acc_Chunk np = ss (np.s ! NPAcc) ;
NP_Gen_Chunk np = ss ("van" ++ np.s ! NPAcc) ; ----
VPI_Chunk vpi = {s = vpi.s ! (True | False)} ;
lin
copula_inf_Chunk = ss "zijn" ;
refl_SgP1_Chunk = ss "mij zelf" ;
refl_SgP2_Chunk = ss "jij zelf" ;
refl_SgP3_Chunk = ss "zij zelf" ;
refl_PlP1_Chunk = ss "ons zelf" ;
refl_PlP2_Chunk = ss "jullie zelf" ;
refl_PlP3_Chunk = ss "zij zelf" ;
neg_Chunk = ss "niet" ;
copula_Chunk = ss "is" ;
copula_neg_Chunk = ss "is niet" ;
past_copula_Chunk = ss "was" ;
past_copula_neg_Chunk = ss "was niet" ;
future_Chunk = ss "zal" ;
future_neg_Chunk = ss "zal niet" ;
cond_Chunk = ss "zou" ;
cond_neg_Chunk = ss "zou niet" ;
perfect_Chunk = ss "heeft" ;
perfect_neg_Chunk = ss "heeft niet" ;
past_perfect_Chunk = ss "had" ;
past_perfect_neg_Chunk = ss "had niet" ;
}

View File

@@ -1,47 +0,0 @@
concrete ChunkEng of Chunk = CatEng, SymbolEng [Symb], ExtensionsEng [VPS,VPI] **
ChunkFunctor - [Det_Chunk]
with (Syntax = SyntaxEng), (Extensions = ExtensionsEng) **
open
SyntaxEng, (E = ExtensionsEng), Prelude,
(R = ResEng), (P = ParadigmsEng) in {
lin
Det_Chunk det = lin Utt {
s = case det.n of {
R.Sg => det.s ;
R.Pl => det.sp ! R.NCase R.Nom
}
} ;
NP_Acc_Chunk np = ss (np.s ! R.NPAcc) ;
NP_Gen_Chunk np = ss (np.s ! R.NCase R.Gen) | ss (np.s ! R.NPNomPoss) ;
VPI_Chunk vpi = {s = vpi.s ! (R.VVInf | R.VVPresPart) ! R.AgP3Sg R.Masc} ; ----
oper
emptyNP = mkNP (P.mkPN []) ;
lin
copula_inf_Chunk = ss "to be" | ss "be" ;
refl_SgP1_Chunk = ss "myself" ;
refl_SgP2_Chunk = ss "yourself" ;
refl_SgP3_Chunk = ss "himself" | ss "herself" | ss "itself" ;
refl_PlP1_Chunk = ss "ourselves" ;
refl_PlP2_Chunk = ss "yourselves" ;
refl_PlP3_Chunk = ss "themselves" ;
neg_Chunk = ss "not" | ss "doesn't" | ss "don't" ;
copula_Chunk = ss "is" | ss "are" | ss "am" ; ---- | ss (Predef.BIND ++ "'s") | ss (Predef.BIND ++ "'re") ;
copula_neg_Chunk = ss "isn't" | ss "aren't" ;
past_copula_Chunk = ss "was" | ss "were" ;
past_copula_neg_Chunk = ss "wasn't" | ss "weren't" ;
future_Chunk = ss "will" ;
future_neg_Chunk = ss "won't" ;
cond_Chunk = ss "would" ;
cond_neg_Chunk = ss "wouldn't" ;
perfect_Chunk = ss "has" | ss "have" ;
perfect_neg_Chunk = ss "hasn't" | ss "haven't" ;
past_perfect_Chunk = ss "had" ;
past_perfect_neg_Chunk = ss "hadn't" ;
}

View File

@@ -1,43 +0,0 @@
concrete ChunkEst of Chunk = CatEst, ExtensionsEst [VPS,VPI] **
ChunkFunctor - [Prep_Chunk] with (Syntax = SyntaxEst), (Extensions = ExtensionsEst) **
open
SyntaxEst, (E = ExtensionsEst), Prelude,
ResEst, (P = ParadigmsEst) in {
oper
emptyNP = mkNP (lin PN {s = \\_ => []}) ;
-- overridden, to avoid the generation of dangling case endings
lin
Prep_Chunk prep = mkAdv prep something_NP ;
lin
NP_Acc_Chunk np = ss (np.s ! NPAcc) ;
NP_Gen_Chunk np = ss (np.s ! NPCase Gen) ;
---- VPI_Chunk vpi = {s = vpi.s ! (VVIllat | VVInf)} ;
lin
copula_inf_Chunk = ss "olla" ;
refl_SgP1_Chunk = ss "ise" ;
refl_SgP2_Chunk = ss "ise" ;
refl_SgP3_Chunk = ss "ise" ;
refl_PlP1_Chunk = ss "ise" ;
refl_PlP2_Chunk = ss "ise" ;
refl_PlP3_Chunk = ss "ise" ;
neg_Chunk = ss "ei" ;
copula_Chunk = ss "on" ;
copula_neg_Chunk = ss "ei ole" ;
past_copula_Chunk = ss "oli" ;
past_copula_neg_Chunk = ss "ei olnud" ;
future_Chunk = ss "tuleb" ;
future_neg_Chunk = ss "ei tule" ;
cond_Chunk = ss "oleks" ;
cond_neg_Chunk = ss "ei oleks" ;
perfect_Chunk = ss "on" ;
perfect_neg_Chunk = ss "ei ole" ;
past_perfect_Chunk = ss "oli" ;
past_perfect_neg_Chunk = ss "ei olnud" ;
}

View File

@@ -1,44 +0,0 @@
concrete ChunkEus of Chunk = CatEus, SymbolEus [Symb], ExtensionsEus [VPS,VPI] **
ChunkFunctor - [Det_Chunk]
with (Syntax = SyntaxEus), (Extensions = ExtensionsEus) **
open
Prelude, (R = ResEus), (P=ParadigmsEus), (E=ExtensionsEus) in {
lin
NP_Acc_Chunk np = ss (np.s ! R.Abs) ; -- lol I'm ergative-absolutive
NP_Gen_Chunk np = ss (np.s ! R.Gen) ;
VPI_Chunk vpi = vpi ; ----
oper
empty_NP : NP = lin NP R.empty_NP ;
lin
--TODO: these are just Google translate / my wild guesses
copula_inf_Chunk = ss "izan" | ss "izaten" ;
refl_SgP1_Chunk = ss "neuk" ;
refl_SgP2_Chunk = ss "zeuk" | ss "heuk" ;
refl_SgP3_Chunk = ss "berau" ;
refl_PlP1_Chunk = ss "geuk" ;
refl_PlP2_Chunk = ss "zeuek" ;
refl_PlP3_Chunk = ss "beraiek " ;
neg_Chunk = ss "not" | ss "doesn't" | ss "don't" ;
copula_Chunk = ss "naiz" | ss "zara" | ss "da" | ss "gara" | ss "zarete" | ss "dira" ;
copula_neg_Chunk = ss "ez naiz" | ss "ez zara" | ss "ez da" | ss "ez gara" | ss "ez zarete" | ss "ez dira" ;
past_copula_Chunk = ss "zen" ;
past_copula_neg_Chunk = ss "ez zen" ;
future_Chunk = ss "izango" ;
future_neg_Chunk = ss "ez izango" ;
cond_Chunk = ss "litzateke" ;
cond_neg_Chunk = ss "ez litzateke" ;
perfect_Chunk = ss "izan" ;
perfect_neg_Chunk = ss "ez izan" ;
past_perfect_Chunk = ss "zen" ;
past_perfect_neg_Chunk = ss "ez zen" ;
}

View File

@@ -1,43 +0,0 @@
concrete ChunkFin of Chunk = CatFin, ExtensionsFin [VPS,VPI] **
ChunkFunctor - [Prep_Chunk] with (Syntax = SyntaxFin), (Extensions = ExtensionsFin) **
open
SyntaxFin, (E = ExtensionsFin), Prelude,
ResFin, (P = ParadigmsFin) in {
oper
emptyNP = mkNP (lin PN {s = \\_ => []}) ;
-- overridden, to avoid the generation of dangling case endings
lin
Prep_Chunk prep = mkAdv prep something_NP ;
lin
NP_Acc_Chunk np = ss (np.s ! NPAcc) ;
NP_Gen_Chunk np = ss (np.s ! NPCase Gen) ;
VPI_Chunk vpi = {s = vpi.s ! (VVIllat | VVInf)} ;
lin
copula_inf_Chunk = ss "olla" ;
refl_SgP1_Chunk = ss "itseni" ;
refl_SgP2_Chunk = ss "itsesi" ;
refl_SgP3_Chunk = ss "itse" ;
refl_PlP1_Chunk = ss "itsemme" ;
refl_PlP2_Chunk = ss "itsenne" ;
refl_PlP3_Chunk = ss "itsensä" ;
neg_Chunk = ss "ei" ;
copula_Chunk = ss "on" ;
copula_neg_Chunk = ss "ei ole" ;
past_copula_Chunk = ss "oli" ;
past_copula_neg_Chunk = ss "ei ollut" ;
future_Chunk = ss "tulee" ;
future_neg_Chunk = ss "ei tule" ;
cond_Chunk = ss "olisi" ;
cond_neg_Chunk = ss "ei olisi" ;
perfect_Chunk = ss "on" ;
perfect_neg_Chunk = ss "ei ole" ;
past_perfect_Chunk = ss "oli" ;
past_perfect_neg_Chunk = ss "ei ollut" ;
}

View File

@@ -1,50 +0,0 @@
concrete ChunkFre of Chunk = CatFre, ExtensionsFre [VPS,VPI] **
ChunkFunctor - [AP_Chunk, SSlash_Chunk, quote_Chunk]
with (Syntax = SyntaxFre), (Extensions = ExtensionsFre) **
open
SyntaxFre, (E = ExtensionsFre), Prelude,
ResFre, PhonoFre, CommonRomance, (P = ParadigmsFre) in {
lin
AP_Chunk ap = {s = ap.s ! AF (Masc | Fem) (Sg | Pl)} ;
SSlash_Chunk s = mkUtt <lin S {s = s.s ! {g = Masc ; n = Sg}} : S> ;
quote_Chunk = variants { ss (SOFT_BIND ++ "\"") ;
ss ("\"" ++ SOFT_BIND) ;
ss ("«" ++ SOFT_BIND) ;
ss (SOFT_BIND ++ "»") } ;
lin
NP_Acc_Chunk np = ss (np.s ! Acc).ton ;
NP_Gen_Chunk np = ss (np.s ! genitive).comp ;
VPI_Chunk vpi = vpi ;
oper
emptyNP = mkNP (P.mkPN []) ;
lin
copula_inf_Chunk = ss "être" ;
refl_SgP1_Chunk = ss "moi-même" ;
refl_SgP2_Chunk = ss "toi-même" ;
refl_SgP3_Chunk = ss "lui-même" ;
refl_PlP1_Chunk = ss "nous-mêmes" ;
refl_PlP2_Chunk = ss "vous-mêmes" ;
refl_PlP3_Chunk = ss "eux-mêmes" ;
neg_Chunk = ss "non" ;
copula_Chunk = ss "est" ;
copula_neg_Chunk = ss "n'est pas" ;
past_copula_Chunk = ss "était" ;
past_copula_neg_Chunk = ss "n'était pas" ;
future_Chunk = ss "va" ;
future_neg_Chunk = ss "ne va pas" ;
cond_Chunk = ss "ferait" ; ----
cond_neg_Chunk = ss "ne ferait pas" ; ----
perfect_Chunk = ss "a" ;
perfect_neg_Chunk = ss "n'a pas" ;
past_perfect_Chunk = ss "avait" ;
past_perfect_neg_Chunk = ss "n'avait pas" ;
}

View File

@@ -1,85 +0,0 @@
incomplete concrete ChunkFunctor of Chunk = Cat, Symbol [Symb], Extensions [VPS,VPI] **
open
Syntax, Extensions,
Prelude in {
lincat
Chunks = {s : Str} ;
Chunk = {s : Str};
VC = V ;
lin
OneChunk c = c ;
PlusChunk c cs = cc2 c cs ;
ChunkPhr c = ss ("*" ++ c.s) | c ;
lin
AP_Chunk ap = mkUtt ap ;
AdA_Chunk ada = ada ;
Adv_Chunk adv = adv ;
AdV_Chunk adv = adv ;
AdN_Chunk adn = adn ;
S_Chunk s = mkUtt s ;
SSlash_Chunk s = mkUtt <lin S s : S> ;
QS_Chunk qs = mkUtt qs ;
CN_Pl_Chunk cn = mkUtt (Syntax.mkNP aPl_Det cn) ;
CN_Sg_Chunk cn = mkUtt cn ;
---- CN_Pl_Gen_Chunk cn = ss (cn.s ! Pl ! Gen) ;
---- CN_Sg_Gen_Chunk cn = ss (cn.s ! Sg ! Gen) ;
Conj_Chunk conj = ss conj.s2 ; ----
Det_Chunk det = mkUtt (Syntax.mkNP det) ;
IAdv_Chunk iadv = iadv ;
IP_Chunk ip = mkUtt ip ;
NP_Nom_Chunk np = mkUtt np ;
---- NP_Acc_Chunk np = ss (np.s ! NPAcc) ;
---- NP_Gen_Chunk np = ss (np.s ! NCase Gen) | ss (np.s ! NPNomPoss) ;
Numeral_Nom_Chunk num = mkUtt (Syntax.mkNP (Syntax.mkDet num)) ;
---- Numeral_Gen_Chunk num = ss (num.s ! NCard ! Gen) ;
---- Ord_Nom_Chunk ord = ss (ord.s ! Nom) ;
---- Ord_Gen_Chunk ord = ss (ord.s ! Gen) ;
Predet_Chunk predet = mkUtt (Syntax.mkNP predet emptyNP) ;
Prep_Chunk prep = mkAdv prep emptyNP ; ----
---- RP_Nom_Chunk rp = ss (rp.s ! RC Neutr (NCase Nom)) ;
---- RP_Acc_Chunk rp = ss (rp.s ! RPrep Masc) ; ----
---- RP_Gen_Chunk rp = ss (rp.s ! RC Neutr (NCase Gen)) ;
Subj_Chunk subj = subj ;
--- PConj_Chunk pconj = pconj ;
VPS_Chunk vps = mkUtt (E.PredVPS emptyNP vps) ;
-- VPI_Chunk : VPI -> Chunk ;
V2_V,
VA_V,
VQ_V,
VS_V,
---- VV_V,
V3_V,
V2A_V,
V2Q_V,
V2S_V,
V2V_V
= \v -> <lin V v : V> ;
UseVC t p vc = E.MkVPS t p (mkVP vc) ;
Symb_Chunk s = lin Utt s ;
fullstop_Chunk = sbSS "." ;
exclmark_Chunk = sbSS "!" ;
questmark_Chunk = sbSS "?" ;
comma_Chunk = sbSS "," ;
colon_Chunk = sbSS ":" ;
semicolon_Chunk = sbSS ";" ;
quote_Chunk = variants {sbSS "\"" ; ss ("\"" ++ SOFT_BIND) } ;
lpar_Chunk = ss ("(" ++ SOFT_BIND) ;
rpar_Chunk = sbSS ")" ;
dash_Chunk = sbSS "-" ;
oper
emptyNP : NP = Syntax.mkNP (P.mkPN []) ;
sbSS : Str -> SS = \s -> ss (SOFT_BIND ++ s) ;
}

View File

@@ -1,39 +0,0 @@
concrete ChunkGer of Chunk = CatGer, ExtensionsGer [VPS,VPI] **
ChunkFunctor with (Syntax = SyntaxGer), (Extensions = ExtensionsGer) **
open
SyntaxGer, (E = ExtensionsGer), Prelude,
ResGer, (P = ParadigmsGer) in {
oper
emptyNP = mkNP (P.mkPN []) ;
lin
NP_Acc_Chunk np = ss (np.s ! NPC Acc ++ bigNP np) ;
NP_Gen_Chunk np = ss (np.s ! NPC Gen ++ bigNP np) ;
VPI_Chunk vpi = {s = vpi.s ! (True | False)} ;
lin
copula_inf_Chunk = ss "sein" ;
refl_SgP1_Chunk = ss "mich selbst" ;
refl_SgP2_Chunk = ss "dich selbst" ;
refl_SgP3_Chunk = ss "sich selbst" ;
refl_PlP1_Chunk = ss "uns selbst" ;
refl_PlP2_Chunk = ss "euch selbst" ;
refl_PlP3_Chunk = ss "sich selbst" ;
neg_Chunk = ss "nicht" ;
copula_Chunk = ss "ist" ;
copula_neg_Chunk = ss "ist nicht" ;
past_copula_Chunk = ss "war" ;
past_copula_neg_Chunk = ss "war nicht" ;
future_Chunk = ss "wird" ;
future_neg_Chunk = ss "wird nicht" ;
cond_Chunk = ss "würde" ;
cond_neg_Chunk = ss "würde nicht" ;
perfect_Chunk = ss "hat" ;
perfect_neg_Chunk = ss "hat nicht" ;
past_perfect_Chunk = ss "hatte" ;
past_perfect_neg_Chunk = ss "hatte nicht" ;
}

View File

@@ -1,48 +0,0 @@
concrete ChunkHin of Chunk = CatHin, ExtensionsHin [VPS,VPI] **
ChunkFunctor - [Adv_Chunk, Prep_Chunk]
with (Syntax = SyntaxHin), (Extensions = ExtensionsHin) **
open
SyntaxHin, (E = ExtensionsHin), Prelude, CommonHindustani,
(R = ResHin), (P = ParadigmsHin) in {
lin
Adv_Chunk adv = mkUtt adv ;
Prep_Chunk prep = pss (prep.s ! Masc) ; ----
oper
emptyNP = mkNP (P.mkPN []) ;
pss = Prelude.ss ;
lin
NP_Acc_Chunk np = mkUtt np ;
NP_Gen_Chunk np = mkUtt (mkAdv possess_Prep np) ;
---- VPI_Chunk vpi = vpi ;
copula_inf_Chunk = pss " है " ;
refl_SgP1_Chunk,
refl_SgP2_Chunk,
refl_SgP3_Chunk,
refl_PlP1_Chunk,
refl_PlP2_Chunk,
refl_PlP3_Chunk = pss " आप " ; ----
neg_Chunk = pss " नहीं " ;
copula_Chunk = pss " है " ;
copula_neg_Chunk = pss " नहीं है " ;
past_copula_Chunk = pss " था " ;
past_copula_neg_Chunk = pss " नहीं था " ;
future_Chunk = pss " हीं होगा " ;
future_neg_Chunk = pss " नहीं होगा " ;
cond_Chunk = pss " हीं होगा " ; ---- same as future
cond_neg_Chunk = pss " नहीं होगा " ;
perfect_Chunk = pss " है " ;
perfect_neg_Chunk = pss " नहीं " ;
past_perfect_Chunk = pss " था " ;
past_perfect_neg_Chunk = pss " नहीं " ;
}

View File

@@ -1,45 +0,0 @@
concrete ChunkIta of Chunk = CatIta, ExtensionsIta [VPS,VPI] **
ChunkFunctor - [AP_Chunk, SSlash_Chunk]
with (Syntax = SyntaxIta), (Extensions = ExtensionsIta) **
open
SyntaxIta, (E = ExtensionsIta), Prelude,
ResIta, CommonRomance, (P = ParadigmsIta) in {
lin
AP_Chunk ap = {s = ap.s ! AF (Masc | Fem) (Sg | Pl)} ;
SSlash_Chunk s = mkUtt <lin S {s = s.s ! {g = Masc ; n = Sg}} : S> ;
lin
NP_Acc_Chunk np = ss (np.s ! Acc).ton ;
NP_Gen_Chunk np = ss (np.s ! genitive).comp ;
VPI_Chunk vpi = vpi ;
oper
emptyNP = mkNP (P.mkPN []) ;
copula_inf_Chunk = ss "essere" ;
refl_SgP1_Chunk = ss "me stesso" ;
refl_SgP2_Chunk = ss "te stesso" ;
refl_SgP3_Chunk = ss "lui stesso" ;
refl_PlP1_Chunk = ss "noi stessi" ;
refl_PlP2_Chunk = ss "voi stessi" ;
refl_PlP3_Chunk = ss "loro stessi" ;
neg_Chunk = ss "non" ;
copula_Chunk = ss "è" ;
copula_neg_Chunk = ss "non è" ;
past_copula_Chunk = ss "era" ;
past_copula_neg_Chunk = ss "non era" ;
future_Chunk = ss "vuole" ; ----
future_neg_Chunk = ss "non vuole" ; ----
cond_Chunk = ss "vorrebbe" ; ----
cond_neg_Chunk = ss "non vorrebbe" ; ----
perfect_Chunk = ss "ha" ;
perfect_neg_Chunk = ss "non ha" ;
past_perfect_Chunk = ss "aveva" ;
past_perfect_neg_Chunk = ss "non aveva" ;
}

View File

@@ -1,144 +0,0 @@
concrete ChunkJpn of Chunk = CatJpn, ExtensionsJpn [VPS,VPI] **
ChunkFunctor[Chunk, Chunks, OneChunk, PlusChunk, ChunkPhr,
AdA_Chunk, AdV_Chunk, AdN_Chunk, PConj_Chunk, Symb_Chunk,
fullstop_Chunk, exclmark_Chunk, questmark_Chunk, comma_Chunk,
colon_Chunk, semicolon_Chunk, quote_Chunk, lpar_Chunk,
rpar_Chunk, dash_Chunk, sbSS]
with (Syntax = SyntaxJpn), (Extensions = ExtensionsJpn) **
open
SyntaxJpn, (E = ExtensionsJpn), Prelude,
ResJpn, (P = ParadigmsJpn) in {
flags coding = utf8 ;
lincat
VC = {s : Speaker => Style => TTense => Polarity => Str ;
a_stem, i_stem : Speaker => Str ;
te, ba : Speaker => Polarity => Str} ;
lin
AP_Chunk ap = {s = (mkUtt ap).s ! Wa ! Resp} ;
Adv_Chunk adv = {s = adv.s ! Resp} ;
S_Chunk s = {s = s.s ! Wa ! Resp} ;
SSlash_Chunk sslash = {s = sslash.s ! Resp} ;
QS_Chunk qs = {s = qs.s ! Wa ! Resp} ;
CN_Pl_Chunk cn = {s = cn.prepositive ! Resp ++ cn.object ! Resp ++ cn.s ! Pl ! Resp} ;
CN_Sg_Chunk cn = {s = cn.prepositive ! Resp ++ cn.object ! Resp ++ cn.s ! Sg ! Resp} ;
CN_Pl_Gen_Chunk = CN_Pl_Chunk ;
CN_Sg_Gen_Chunk = CN_Sg_Chunk ;
Conj_Chunk conj = {s = conj.s} ;
Det_Chunk det = {s = det.quant ! Resp ++ det.num ++ det.postpositive} ;
IAdv_Chunk iadv = {s = iadv.s ! Resp} ;
IP_Chunk ip = {s = ip.s_subj ! Resp} ;
NP_Nom_Chunk np = {s = (mkUtt np).s ! Wa ! Resp} ;
NP_Acc_Chunk, NP_Gen_Chunk = NP_Nom_Chunk ;
Numeral_Nom_Chunk num = {s = num.s} ;
Numeral_Gen_Chunk = Numeral_Nom_Chunk ;
Ord_Nom_Chunk ord = {s = ord.attr} ;
Ord_Gen_Chunk = Ord_Nom_Chunk ;
Predet_Chunk predet = {s = predet.s} ;
Prep_Chunk prep = {s = prep.s} ;
RP_Nom_Chunk rp = {s = rp.s ! Resp} ;
RP_Gen_Chunk, RP_Acc_Chunk = RP_Nom_Chunk ;
Subj_Chunk subj = {s = subj.s} ;
VPS_Chunk vps = {s = vps.prepositive ! Resp ++ vps.obj ! Resp ++ vps. prep ++
vps.verb ! SomeoneElse ! Inanim ! Resp} ;
VPI_Chunk vpi = {s = vpi.prepositive ! Resp ++ vpi.obj ! Resp ++ vpi. prep ++
vpi.verb ! SomeoneElse ! Inanim } ;
refl_SgP1_Chunk, refl_SgP2_Chunk, refl_SgP3_Chunk,
refl_PlP1_Chunk, refl_PlP2_Chunk, refl_PlP3_Chunk = ss "自分" | ss "自分自身" ; -- "jibun" | "jibunjishin"
neg_Chunk = ss "ない" | ss "しない" | ss "ではない" | ss "ません" | ss "ないで" ;
copula_Chunk, future_Chunk = ss "です" | ss "だ" ;
copula_neg_Chunk, future_neg_Chunk = ss "ではない" | ss "ではありません" ;
copula_inf_Chunk = ss "です" | ss "だ" ;
past_copula_Chunk = ss "でした" | ss "だった" ;
past_copula_neg_Chunk = ss "ではありませんでした" | ss "ではなかった" ;
cond_Chunk = copula_Chunk ; -- no "would" in Japanese
cond_neg_Chunk = copula_neg_Chunk ;
perfect_Chunk = past_copula_Chunk ** (ss "てしまった" | ss "ちゃった" | ss "でしまった" |
ss "じゃった" | ss "ことがある" | ss "ことがあります") ;
perfect_neg_Chunk = past_copula_neg_Chunk ** (ss "てしまわない" | ss "でしまわない" |
ss "ことがありません" | ss "ことがない") ;
past_perfect_Chunk = perfect_Chunk ;
past_perfect_neg_Chunk = perfect_neg_Chunk ;
V2_V v2 = lin VC {
s = \\sp => v2.s ;
a_stem = \\sp => v2.a_stem ;
i_stem = \\sp => v2.i_stem ;
te = \\sp => v2.te ;
ba = \\sp => v2.ba
} ;
VA_V va = lin VC {
s = \\sp => va.s ;
a_stem = \\sp => va.a_stem ;
i_stem = \\sp => va.i_stem ;
te = \\sp => va.te ;
ba = \\sp => va.ba
} ;
VQ_V, VS_V = V2_V ;
VV_V vv = lin VC {
s = vv.s ;
a_stem = vv.a_stem ;
i_stem = vv.i_stem ;
te = vv.te ;
ba = vv.ba
} ;
V3_V v3 = lin VC {
s = v3.s ;
a_stem = v3.a_stem ;
i_stem = v3.i_stem ;
te = v3.te ;
ba = v3.ba
} ;
V2A_V v2a = lin VC {
s = \\sp => v2a.s ;
a_stem = \\sp => v2a.a_stem ;
i_stem = \\sp => v2a.i_stem ;
te = \\sp => v2a.te ;
ba = \\sp => v2a.ba
} ;
V2Q_V, V2S_V, V2V_V = V2A_V ;
UseVC t p vc = lin VPS {
verb = \\sp,a,st => case t.a of {
Simul => vc.s ! sp ! st ! t.t ! p.b ;
Anter => case t.t of {
TFut => vc.s ! sp ! st ! TPres ! p.b ;
_ => vc.s ! sp ! st ! TPast ! p.b
}
} ;
a_stem = \\sp,a,st => vc.a_stem ! sp ;
i_stem = \\sp,a,st => vc.i_stem ! sp ;
te = \\sp,a,st => vc.te ! sp ! p.b ;
ba = \\sp,a,st => vc.ba ! sp ! p.b ;
prep = "" ;
obj = \\st => "" ;
prepositive = \\st => ""
} ;
}
{-
emptyNP : NP = lin NP {s = \\st => "" ;
prepositive = \\st => "" ;
needPart = False ;
changePolar = False ;
meaning = SomeoneElse ;
anim = Inanim} ;
lin
NP_Acc_Chunk np = np ;
NP_Gen_Chunk np = ss (np.s ++ de_s) ;
VPI_Chunk vpi = vpi ;
-}

View File

@@ -1,57 +0,0 @@
concrete ChunkRus of Chunk = CatRus, ExtensionsRus [VPS,VPI] **
ChunkFunctor - [
CN_Pl_Chunk, CN_Sg_Chunk, Conj_Chunk, IP_Chunk, Numeral_Nom_Chunk, Predet_Chunk, Prep_Chunk, VPS_Chunk, UseVC, emptyNP
]
with (Syntax = SyntaxRus), (Extensions = ExtensionsRus) **
open
SyntaxRus, (E = ExtensionsRus), Prelude,
ResRus, (P = ParadigmsRus) in {
lin VPI_Chunk vpi = {s = vpi.s} ;
lin CN_Pl_Chunk, CN_Pl_Gen_Chunk = \cn -> {s = cn.nounpart ! NF Pl allCases allSizes ++ cn.relcl ! Pl ! allCases} ;
lin CN_Sg_Chunk, CN_Sg_Gen_Chunk = \cn -> {s = cn.nounpart ! NF Sg allCases allSizes ++ cn.relcl ! Sg ! allCases} ;
lin Conj_Chunk c = {s = c.s1 | c.s2 };
lin IP_Chunk ip = {s = ip.s ! (PF allCases allAfterPrep allPossessive)};
lin Predet_Chunk predet = {s = predet.s ! AF allCases allAnimacy allGenNum};
lin Numeral_Nom_Chunk, Numeral_Gen_Chunk = \num -> {s = num.s ! allGender ! allAnimacy ! allCases };
lin Prep_Chunk prep = { s = prep.s };
lin NP_Acc_Chunk np = { s = np.s ! PF Acc allAfterPrep allPossessive } ;
lin NP_Gen_Chunk np = { s = np.s ! PF Acc allAfterPrep allPossessive } ;
oper
emptyNP : NP = lin NP {s = \\_ => ""; n = allNumber; p = allPerson; g=PNoGen; anim = allAnimacy; pron=False} ;
lin refl_SgP1_Chunk, refl_SgP2_Chunk, refl_SgP3_Chunk, refl_PlP1_Chunk,
refl_PlP2_Chunk, refl_PlP3_Chunk =
{s = sam.s ! allCases};
lin neg_Chunk = variants {};
lin copula_Chunk = { s = "является" | "являются" | "являешься" | "являемся" | "являемся" | "являетесь"} ;
lin copula_neg_Chunk = { s = "не является" | "не являются" | "не являешься" | "не являемся" | "не являемся" | "не являетесь"} ;
lin copula_inf_Chunk = variants {} ;
lin past_copula_Chunk = { s = "был" | "были" | "была" | "было" } ;
lin past_copula_neg_Chunk = { s = "не был" | "не были" | "не была" | "не было" } ;
lin future_Chunk = { s = "буду" | "будем" | "будешь" | "будете" | "будет" | "будут" } ;
lin future_neg_Chunk = { s = "не буду" | "не будем" | "не будешь" | "не будете" | "не будет" | "не будут" } ;
lin cond_Chunk = variants {} ;
lin cond_neg_Chunk = variants {} ;
lin perfect_Chunk = variants {} ;
lin perfect_neg_Chunk = variants {} ;
lin past_perfect_Chunk = variants {} ;
lin past_perfect_neg_Chunk = variants {} ;
oper
allGender = Masc | Fem | Neut ;
allCases = Nom | Gen | Dat | Acc | Inst | Prepos PrepOther ;
allQForm = QDir | QIndir ;
allAnimacy = Animate | Inanimate ;
allGenNum = GSg allGender | GPl ;
allNumber = Sg | Pl ;
allPerson = P1 | P2 | P3 ;
allSizes = nom | nompl | sgg | plg ;
allAfterPrep = Yes | No ;
allPossessive = NonPoss | Poss (GSg allGender | GPl) ;
}

View File

@@ -1,44 +0,0 @@
concrete ChunkSpa of Chunk = CatSpa, ExtensionsSpa [VPS,VPI] **
ChunkFunctor - [AP_Chunk, SSlash_Chunk]
with (Syntax = SyntaxSpa), (Extensions = ExtensionsSpa) **
open
SyntaxSpa, (E = ExtensionsSpa), Prelude,
ResSpa, CommonRomance, (P = ParadigmsSpa) in {
lin
AP_Chunk ap = {s = ap.s ! AF (Masc | Fem) (Sg | Pl)} ;
SSlash_Chunk s = mkUtt <lin S {s = s.s ! {g = Masc ; n = Sg}} : S> ;
lin
NP_Acc_Chunk np = ss (np.s ! Acc).ton ;
NP_Gen_Chunk np = ss (np.s ! genitive).comp ;
VPI_Chunk vpi = vpi ;
oper
emptyNP = mkNP (P.mkPN []) ;
lin
copula_inf_Chunk = ss "ser" | ss "estar" ;
refl_SgP1_Chunk = ss "yo mismo" ;
refl_SgP2_Chunk = ss "tu mismo" ;
refl_SgP3_Chunk = ss "ello mismo" ;
refl_PlP1_Chunk = ss "nosotros mismos" ;
refl_PlP2_Chunk = ss "vosotros mismos" ;
refl_PlP3_Chunk = ss "ellos mismos" ;
neg_Chunk = ss "no" ;
copula_Chunk = ss "es" | ss "está" ;
copula_neg_Chunk = ss "no es" | ss "no está" ;
past_copula_Chunk = ss "era" ;
past_copula_neg_Chunk = ss "no era" ;
future_Chunk = ss "va" ; ----
future_neg_Chunk = ss "no va" ; ----
cond_Chunk = ss "iría" ; ----
cond_neg_Chunk = ss "no iría" ; ----
perfect_Chunk = ss "ha" ;
perfect_neg_Chunk = ss "no ha" ;
past_perfect_Chunk = ss "había" ;
past_perfect_neg_Chunk = ss "no había" ;
}

View File

@@ -1,38 +0,0 @@
concrete ChunkSwe of Chunk = CatSwe, ExtensionsSwe [VPS,VPI] **
ChunkFunctor with (Syntax = SyntaxSwe), (Extensions = ExtensionsSwe) **
open
SyntaxSwe, (E = ExtensionsSwe), Prelude,
(C=CommonScand), (R=ResSwe), (P = ParadigmsSwe) in {
lin
NP_Acc_Chunk np = ss (np.s ! C.NPAcc) ;
NP_Gen_Chunk np = ss (np.s ! C.NPPoss (C.GSg C.Utr) C.Nom) ;
VPI_Chunk vpi = {s = optStr "att" ++ vpi.s ! R.VPIInf ! R.agrP3 (C.Utr | C.Neutr) C.Sg} ;
oper
emptyNP = mkNP (P.mkPN []) ;
lin
copula_inf_Chunk = ss "att vara" | ss "vara" ;
refl_SgP1_Chunk = ss "mig själv" ;
refl_SgP2_Chunk = ss "dig själv" ;
refl_SgP3_Chunk = ss "sig själv" ;
refl_PlP1_Chunk = ss "oss själva" ;
refl_PlP2_Chunk = ss "er själva" ;
refl_PlP3_Chunk = ss "sig själva" ;
neg_Chunk = ss "inte" ;
copula_Chunk = ss "är" ;
copula_neg_Chunk = ss "är inte" ;
past_copula_Chunk = ss "var" ;
past_copula_neg_Chunk = ss "var inte" ;
future_Chunk = ss "ska" | ss "skall" ;
future_neg_Chunk = ss "ska inte" | ss "skall inte" ;
cond_Chunk = ss "skulle" ;
cond_neg_Chunk = ss "skulle inte" ;
perfect_Chunk = ss "har" ;
perfect_neg_Chunk = ss "har inte" ;
past_perfect_Chunk = ss "hade" ;
past_perfect_neg_Chunk = ss "hade inte" ;
}

View File

@@ -1,54 +0,0 @@
concrete ChunkTha of Chunk = CatTha, ExtensionsTha [VPS,VPI] **
ChunkFunctor -- - [Numeral_Nom_Chunk, Conj_Chunk, CN_Pl_Chunk, Subj_Chunk, emptyNP, Prep_Chunk, Predet_Chunk]
with (Syntax = SyntaxTha), (Extensions = ExtensionsTha) **
open
SyntaxTha, (E = ExtensionsTha), Prelude,
ResTha, (P = ParadigmsTha), StringsTha in {
oper
emptyNP : NP = mkNP [] ;
{-
-- exceptions to functor ONLY IF NEEDED
lin
Conj_Chunk conj = ss (conj.s ! CSent).s2 ;
Numeral_Nom_Chunk num = ss (num.s ++ ge_s) ;
CN_Pl_Chunk cn = cn ;
Subj_Chunk subj = ss (subj.prePart ++ subj.sufPart) ;
Prep_Chunk prep = ss (prep.prepPre ++ prep.prepPost) ;
Predet_Chunk predet = predet ;
-}
-- THESE ARE NEEDED
lin
NP_Acc_Chunk np = np ;
NP_Gen_Chunk np = ss (khoog_s ++ np.s) ;
VPI_Chunk vpi = vpi ;
copula_inf_Chunk = ss pen_s ;
refl_SgP1_Chunk = ss reflPron ;
refl_SgP2_Chunk = ss reflPron ;
refl_SgP3_Chunk = ss reflPron ;
refl_PlP1_Chunk = ss reflPron ;
refl_PlP2_Chunk = ss reflPron ;
refl_PlP3_Chunk = ss reflPron ;
neg_Chunk = ss may_s ;
copula_Chunk = ss pen_s ;
copula_neg_Chunk = ss (thbind may_s chay_s) ;
{- ---- TODO
past_copula_Chunk = ss "了" ;
past_copula_neg_Chunk = ss (neg_s ++ copula_s ++ "了") ;
future_Chunk = ss copula_s ; ----
future_neg_Chunk = ss (neg_s ++ copula_s) ;
cond_Chunk = ss copula_s ; ----
cond_neg_Chunk = ss (neg_s ++ copula_s) ;
perfect_Chunk = ss "了" ;
perfect_neg_Chunk = ss (neg_s ++ copula_s ++ "了") ;
past_perfect_Chunk = ss "了" ;
past_perfect_neg_Chunk = ss (neg_s ++ copula_s ++ "了") ;
-}
}

View File

@@ -1,48 +0,0 @@
concrete ChunkUrd of Chunk = CatUrd, ExtensionsUrd [VPS,VPI] **
ChunkFunctor - [Adv_Chunk, Prep_Chunk]
with (Syntax = SyntaxUrd), (Extensions = ExtensionsUrd) **
open
SyntaxUrd, (E = ExtensionsUrd), Prelude, CommonHindustani,
(R = ResUrd), (P = ParadigmsUrd) in {
lin
Adv_Chunk adv = mkUtt adv ;
Prep_Chunk prep = pss (prep.s ! Masc) ; ----
oper
emptyNP = mkNP (P.mkPN []) ;
pss = Prelude.ss ;
lin
NP_Acc_Chunk np = mkUtt np ;
NP_Gen_Chunk np = mkUtt (mkAdv possess_Prep np) ;
---- VPI_Chunk vpi = vpi ;
copula_inf_Chunk = pss " है " ;
refl_SgP1_Chunk,
refl_SgP2_Chunk,
refl_SgP3_Chunk,
refl_PlP1_Chunk,
refl_PlP2_Chunk,
refl_PlP3_Chunk = pss " आप " ; ----
neg_Chunk = pss " नहीं " ;
copula_Chunk = pss " है " ;
copula_neg_Chunk = pss " नहीं है " ;
past_copula_Chunk = pss " था " ;
past_copula_neg_Chunk = pss " नहीं था " ;
future_Chunk = pss " हीं होगा " ;
future_neg_Chunk = pss " नहीं होगा " ;
cond_Chunk = pss " हीं होगा " ; ---- same as future
cond_neg_Chunk = pss " नहीं होगा " ;
perfect_Chunk = pss " है " ;
perfect_neg_Chunk = pss " नहीं " ;
past_perfect_Chunk = pss " था " ;
past_perfect_neg_Chunk = pss " नहीं " ;
}

View File

@@ -1,135 +0,0 @@
import qualified Data.Map
import qualified Data.Set
import Data.List
langs = words "Bul Cat Chi Dut Eng Fin Fre Ger Hin Ita Jpn Mlt Spa Swe Tha"
-- apply a function to every line, changing it to a list
changeLinesLang :: (String -> [String]) -> String -> IO ()
changeLinesLang f lang = do
dict <- readFile (gfFile "Dictionary" lang) >>= return . lines
writeFile (gfFile "tmp/Dictionary" lang) $ unlines $ concatMap f dict
createAllConcretes = do
createAbstract
mapM_ createConcrete langs
createAbstract = do
bnc <- readFile "bnc-to-check.txt" >>= return . words -- list of BNC funs
writeFile (gfFile "todo/tmp/TopDictionary" "") $
unlines $ ["abstract TopDictionary = Cat **{"] ++
[unwords ("fun":f:":": snd (splitFun f) :[";"]) | f <- bnc] ++ ["}"] -- print inspectable file, to todo/tmp/
createConcrete lang = do
bnc <- readFile "bnc-to-check.txt" >>= return . words -- list of BNC funs
dict <- readFile (gfFile "Dictionary" lang) >>= return . lines -- current lang lexicon
let header = getHeader dict
let dictmap = Data.Map.fromList [(f,unwords ws) | "lin":f:"=":ws <- map words dict] -- lin rules to a map
let bncdict = [(f,lookupFun f dictmap) | f <- bnc] -- current lang for BNC
writeFile (gfFile "todo/tmp/TopDictionary" lang) $
unlines $ toTop header ++ [unwords ("lin":f:"=":[ws]) | (f,ws) <- bncdict] ++ ["}"] -- print inspectable file, to todo/tmp/
gfFile body lang = body ++ lang ++ ".gf"
mergeDict lang = do
old <- readFile (gfFile "Dictionary" lang) >>= return . lines -- read old lexicon
new <- readFile (gfFile "todo/TopDictionary" lang) >>= return . lines -- read corrected and new words
let header = getHeader new
let oldmap = Data.Map.fromList [(f,unwords ws) | "lin":f:"=":ws <- map words old]
let newlist = [(f,unwords ws) | "lin":f:"=":ws <- map words new]
let newmap = foldr (uncurry Data.Map.insert) oldmap newlist -- insert corrected words
writeFile (gfFile "tmp/Dictionary" lang) $
unlines $ fromTop header ++ [unwords ("lin":f:"=":[ws]) | (f,ws) <- Data.Map.assocs newmap] ++ ["}"] -- print revised file to tmp/
changeFunNames nameFile lang = do
ns <- readFile nameFile
let names = Data.Map.fromList [(old,new) | old:new:_ <- map words (lines ns)] -- format: "old new" on separate lines
let look w = Data.Map.lookup w names
dict <- readFile (gfFile "Dictionary" lang) >>= return . lines -- read old lexicon
let
change line = case words line of
"lin":f:ws -> case look f of
Just g -> unwords $ "lin":g:ws
_ -> line
_ -> line
writeFile (gfFile "tmp/Dictionary" lang) $ unlines $ map change dict
-- get the part of Dict before the first lin rule
getHeader = takeWhile ((/= "lin") . take 3)
toTop = map tt where
tt s = case s of
'D':'i':'c':'t':cs -> "TopDict" ++ tt cs
c:cs -> c : tt cs
_ -> s
fromTop = map tt where
tt s = case s of
'T':'o':'p':'D':'i':'c':'t':cs -> "Dict" ++ tt cs
c:cs -> c : tt cs
_ -> s
-- try to find lin rules by searching first literally, then subcategories in priority order
lookupFun f dictmap = case look f of
Just rule | notEmpty rule -> rule
_ -> case [r | Just r <- map look (subCats f), notEmpty r] of
rule:_ -> "variants{}; -- " ++ rule -- cannot return it as such, as probably type incorrect
_ -> "variants{} ; -- "
where
look = flip Data.Map.lookup dictmap
notEmpty r = take 1 (words r) `notElem` [["variants"],["variants{}"]]
subCats f = case splitFun f of
(fun,cat) -> case cat of
"V" -> [fun ++ c | c <- words "V2 V3 VS VQ VA VV V2S V2Q V2A V2V"]
"V2" -> [fun ++ c | c <- words "V3 V2S V2Q V2A V2V V VS VQ VA VV"]
"VS" -> [fun ++ c | c <- words "VQ V2S V2Q V2 V V2A V2V V3 VA VV"]
"VQ" -> [fun ++ c | c <- words "VS V2Q V2S V2 V V2A V2V V3 VA VV"]
"VA" -> [fun ++ c | c <- words "V V2A V2 V3 VS VQ VV V2S V2Q V2V"]
"VV" -> [fun ++ c | c <- words "V2V V V2 V3 VS VQ VV V2S V2Q V2V"]
"V3" -> [fun ++ c | c <- words "V2 V2S V2Q V2A V2V V VS VQ VA VV"]
"V2S" -> [fun ++ c | c <- words "VS VQ V2Q V2A V2V V2 V3 VA V VV"]
"V2Q" -> [fun ++ c | c <- words "VQ VS V2S V2A V2V V2 V3 VA V VV"]
"V2A" -> [fun ++ c | c <- words "VA V2 V3 V VS VQ VV V2S V2Q V2V"]
"V2V" -> [fun ++ c | c <- words "VV V2 V2 V VS VQ VV V2S V2Q V2V"]
"Adv" -> [fun ++ c | c <- words "AdV Prep"]
"AdV" -> [fun ++ c | c <- words "Adv Prep"]
_ -> []
splitFun f = case span (/='_') (reverse f) of (tac,nuf) -> (reverse nuf, reverse tac)
------ word statistics
isUnchecked line = isInfixOf "--" line -- checked = no comments
isUnknown line = isInfixOf "{}" line -- known = not variants {}
statLang lang = do
dict <- readFile (gfFile "Dictionary" lang) >>= return . lines
let lins = filter ((==["lin"]) . take 1 . words) dict
let nall = length $ filter (not . isUnknown) lins
let nchecked = length $ filter (not . (\x -> isUnknown x || isUnchecked x)) lins
putStrLn $ lang ++ "\t" ++ show nall ++ "\t" ++ show nchecked
statAll = mapM_ statLang langs
{-
-- lin f = def ; -- comment
analyseLine :: String -> (String,String,String,String,String)
analyseLine s = case words s of
k:f:s:dc -> (k,f,s)
-------
-- handle split senses: remove the unsplit variant ; if the split ones are empty, copy the unsplit to them
handleSplit :: Data.Set.Set String -> String -> [String]
handleSplit sset line =
let (keyw,fun,sep,def,comment) = analyseLine line
-}

View File

@@ -1,42 +0,0 @@
-- elementary soundness check of a dictionary, e.g. if all verbs have verb-like endings
-- usage: checkSoundness <Filename> <Lang>
-- comment out bad lines in tmp/file with --UNSOUND
checkSoundness file lang = do
dict <- readFile file >>= return . lines
let wrongs = [(if has then ("--UNSOUND " ++ d) else d,has) | d <- dict, let has = hasError lang (words d)]
putStrLn $ unlines $ [p | (p,h) <- wrongs, h]
writeFile ("tmp/" ++ file) $ unlines $ map fst wrongs
hasError lang ws = case ws of
u:v:ww | isError lang u v -> True
_:v:ww -> hasError lang (v:ww)
_ -> False
isError lang u v = case lang of
"Spa" -> case bareOp u of
"mkV" | head v == '"' -> notElem (dp 2 (stringOf v)) ["ar","er","ir","se"] || elem '_' v
"mkV2" | head v == '"' -> notElem (dp 2 (stringOf v)) ["ar","er","ir","se"] || elem '_' v
"mkA" -> elem '_' (stringOf v)
_ -> False
"Ita" -> case take 3 (bareOp u) of
"mkV" | head v == '"' -> notElem (dp 3 (stringOf v)) ["are","ere","ire","rsi"] || elem '_' v
"mkA" -> elem '_' (stringOf v)
_ -> False
"Fre" -> case take 3 (bareOp u) of
"mkV" | head v == '"' -> notElem (dp 2 (stringOf v)) ["er","ir","re"] || elem '_' v
"mkv" | head v == '"' -> notElem (dp 2 (stringOf v)) ["er","ir","re"] || elem '_' v
_ | bareOp u == "mkA" -> elem '_' (stringOf v)
_ -> False
"Ger" -> case bareOp u of
"mkV" | head v == '"' -> notElem (dp 2 (stringOf v)) ["en","rn","ln"]
_ -> False
dp :: Int -> String -> String
dp i s = drop (length s - i) s
stringOf s = takeWhile (/='"') (tail s)
bareOp = filter (flip notElem "()")
lexs s = case lex s of [(t,cs@(_:_))] -> t:lexs cs ; [(t,[])] -> [t] ; _ -> []

View File

@@ -1,29 +0,0 @@
abstract Dataview = Dictionary ** {
-- Generating database entries from Dictionary
-- AR 9/1/2015 under LGPL/BSD
cat
Row ; -- a row in the database
fun
RowN : N -> Row ;
RowN2 : N2 -> Row ;
RowN3 : N3 -> Row ;
RowA : A -> Row ;
RowA2 : A2 -> Row ;
RowV : V -> Row ;
RowV2 : V2 -> Row ;
RowVV : VV -> Row ;
RowVS : VS -> Row ;
RowVQ : VQ -> Row ;
RowVA : VA -> Row ;
RowV3 : V3 -> Row ;
RowV2V : V2V -> Row ;
RowV2S : V2S -> Row ;
RowV2Q : V2Q -> Row ;
RowV2A : V2A -> Row ;
RowAdv : Adv -> Row ;
RowPrep : Prep -> Row ;
}

View File

@@ -1,27 +0,0 @@
module Dataview where
import Data.List
dataFile :: FilePath -> IO ()
dataFile file = do
wss <- readFile file >>= return . filter (not . null) . map commaSep . lines
let d = view2data wss
writeFile (file ++ ".tsv") (unlines d)
view2data :: [[String]] -> [String]
view2data ss = case ss of
s:ss2 -> case s of
"Dataview":f:_ ->
let (s1,s2) = break ((=="Dataview") . head) ss2
in [last (words f) ++ sp ++ values l | l <- s1] ++ view2data s2
_ -> error (show s)
_ -> []
where
values (w:ws) = concat $ intersperse sp $ map normalize $ case w of {'D':'a':'t':'a':'v':'i':'e':'w':_:_ -> ws ; _ -> w:ws}
sp = "\t"
commaSep :: String -> [String]
commaSep = lines . map (\c -> if elem c ":," then '\n' else c) . normalize
normalize = unwords . words

View File

@@ -1,74 +0,0 @@
concrete DataviewSwe of Dataview = DictionarySwe ** open ResSwe, CommonScand, Prelude in {
-- Generating database entries from Dictionary
-- AR 9/1/2015 under LGPL/BSD
lincat
Row = {s : Str} ; -- a row in the database
lin
RowN noun = ss (sep
(noun.s ! Sg ! Indef ! Nom)
(noun.s ! Sg ! Def ! Nom)
(noun.s ! Pl ! Indef ! Nom)
(noun.s ! Pl ! Def ! Nom)
(gender (lin N noun))
[]
) ;
{-
RowN2 : N2 -> Row ;
RowN3 : N3 -> Row ;
RowA : A -> Row ;
RowA2 : A2 -> Row ;
-}
RowV verb = ss (sep (rowV (lin V verb)) []) ;
RowV2 verb = ss (sep (rowV (lin V verb)) (pad verb.c2.s) []) ;
oper
rowV : V -> Str = \verb -> sep
(verb.s ! VI (VInfin Act))
(verb.s ! VF (VPres Act))
(sep
(verb.s ! VF (VImper Act))
(verb.s ! VF (VPret Act))
(verb.s ! VI (VSupin Act))
(verb.s ! VI (VPtPret (Strong (GSg Utr)) Nom))
(pad verb.part)
(vtype verb.vtype)
) ;
{-
RowV2 : V2 -> Row ;
RowVV : VV -> Row ;
RowVS : VS -> Row ;
RowVQ : VQ -> Row ;
RowVA : VA -> Row ;
RowV3 : V3 -> Row ;
RowV2V : V2V -> Row ;
RowV2S : V2S -> Row ;
RowV2Q : V2Q -> Row ;
RowV2A : V2A -> Row ;
RowAdv : Adv -> Row ;
RowPrep : Prep -> Row ;
-}
oper
gender : N -> Str = \noun -> case noun.g of {Utr => "Utr" ; Neutr => "Neutr"} ;
vtype : VType -> Str = \vt -> case vt of {VAct => "Act" ; VPass => "Dep" ; VRefl => "Refl"} ;
oper
sep = overload {
sep : (_,_ : Str) -> Str = \x,y -> seps x y ;
sep : (_,_,_ : Str) -> Str = \x,y,z -> seps x (seps y z) ;
sep : (_,_,_,_ : Str) -> Str = \x,y,z,u -> seps x (seps y (seps z u)) ;
sep : (_,_,_,_,_ : Str) -> Str = \x,y,z,u,v -> seps x (seps y (seps z (seps u v))) ;
sep : (_,_,_,_,_,_ : Str) -> Str = \x,y,z,u,v,w -> seps x (seps y (seps z (seps u (seps v w)))) ;
} ;
seps : Str -> Str -> Str = \x,y -> x ++ BIND ++ "," ++ y ;
pad : Str -> Str = \s -> "+" ++ s ;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,523 +0,0 @@
--# -path=.:../maltese
-- Maltese translation dictionary
-- started by Aarne Ranta 2015
-- based on Maltese resource grammar by John J. Camilleri 2011 -- 2013
-- Licensed under LGPL
concrete DictionaryMlt of Dictionary = CatMlt ** open
MorphoMlt,
ResMlt,
ParadigmsMlt,
IrregMlt,
DictMlt,
(C = ConstructX),
Prelude
in {
flags
coding=utf8 ;
oper
fuqP = mkPrep "fuq" ;
ghandP = mkPrep "għand" ;
ghalP = mkPrep "għal" ;
minnP = mkPrep "minn" ;
goP = mkPrep "ġo" ;
lilP = mkPrep "lil" ;
maP = mkPrep "ma'" ;
taP = mkPrep "ta'" ;
saP = mkPrep "sa" ;
biP = mkPrep "bi" ;
fiP = mkPrep "fi" ;
lilV2 : V -> V2 ;
lilV2 v = prepV2 v (mkPrep "lil") ;
genderedN : N = overload {
genderedN : Str -> Str -> N = \qattus,qtates ->
let
m : N = mkN qattus qtates masculine ;
f : N = mkN (qattus+"a") qtates feminine ;
in (m | f) ;
genderedN : Str -> Str -> Str -> N = \qattus,qattusa,qtates ->
let
m : N = mkN qattus qtates masculine ;
f : N = mkN qattusa qtates feminine ;
in (m | f) ;
} ;
af_V = irregularV form1 (ResMlt.mkRoot "'-'-f") (ResMlt.mkVowels "a" [])
"kont naf" "kont taf" "kien jaf" "kienet taf" "konna nafu" "kontu tafu" "kienu jafu" --- will fail for negative
"naf" "taf" "jaf" "taf" "nafu" "tafu" "jafu"
"kun af" "kunu afu"
;
sata'_V = mkV "sata'" (ResMlt.mkRoot "s-t-għ") ;
ried_V = mkV "ried" (ResMlt.mkRoot "r-j-d") ;
kellu_V = irregularV form1 (ResMlt.mkRoot) (ResMlt.mkVowels)
"kelli" "kellek" "kellu" "kellha" "kellna" "kellkom" "kellhom"
"għandi" "għandek" "għandu" "għandha" "għandna" "għandkom" "għandhom"
"kollok" "kollkom"
;
lin above_Prep = mkPrep "fuq" ;
lin add_V3 = mkV3 zied_ZJD_1_10424_V maP ;
lin after_Prep = mkPrep "wara" ;
lin airplane_N = mkN "ajruplan" "ajruplani" ;
lin alas_Interj = ss "sfortunatament" ;
lin all_Predet = ss "kollha" ;
lin almost_AdA = mkAdA "kważi" ;
lin almost_AdN = mkAdN "kważi" ;
lin already_Adv = mkAdv "diġà" ;
lin although_Subj = ss "avolja" ;
lin always_AdV = mkAdV "dejjem" ;
lin and_Conj = mkConj "u" ;
lin animal_N = mkN "annimal" "annimali" ;
lin answer_V2S = lilV2 (wiegeb_WGB_3_10033_V) ;
lin apartment_N = mkN "appartament" "appartamenti" ;
lin apple_N = mkNColl "tuffieħa" "tuffieħ" "tuffieħat" ;
lin art_N = mkNNoPlural "arti" feminine ;
lin as_CAdv = C.mkCAdv "" "daqs" ; -- "as good as gold"
lin ashes_N = mkN "rmied" "rmiet" ;
lin ask_V2Q = lilV2 (saqsa_SQSJ_1_7268_V) ;
lin at_least_AdN = mkAdN "mill-inqas" ;
lin at_most_AdN = mkAdN "l-iktar" ;
lin baby_N = mkN "tarbija" "trabi" ;
lin back_N = possN (mkN "dahar" "dhur") ;
lin bad_A = brokenA "ħażin" "hżiena" "agħar" ;
lin bank_1_N = mkN "bank" "bankijiet" ;
lin bank_2_N = mkN "bank" "bankijiet" ;
lin bark_N = mkN "qoxra" "qoxriet" ;
lin beautiful_A = brokenA "sabiħ" "sbieħ" "isbaħ" ;
lin because_Subj = ss "għax" ;
lin become_VA = sar_SJR_1_9797_V ;
lin beer_N = mkN "birra" "birer" ;
lin before_Prep = mkPrep "qabel" "qabli" "qablek" "qablu" "qabilha" "qabilna" "qabilkom" "qabilhom" ;
lin beg_V2V = mkV2V ttallab_TLB_5_9893_V ghalP minnP ;
lin behind_Prep = after_Prep ;
lin belly_N = possN (mkN "żaqq" "żquq") ;
lin between_Prep = mkPrep "bejn" ;
lin big_A = brokenA "kbir" "kbar" "ikbar" ;
lin bike_N = mkN "rota" "roti" ;
lin bird_N = mkN "għasfur" "għasafar" ; -- genderedN
lin bite_V2 = lilV2 (gidem_GDM_1_8009_V) ;
lin black_A = mkA "iswed" "sewda" "suwed" ;
lin blood_N = possN (mkNColl "demm" "dmija") ;
lin blow_V = nefah_NFH_1_8966_V ;
lin blue_A = sameA "blu" ;
lin boat_N = mkN "dgħajsa" "dgħajjes" ;
lin bone_N = mkNColl "għadma" "għadam" "għadmiet" ;
lin book_N = mkN "ktieb" "kotba" ;
lin boot_N = mkNColl "żarbuna" "żarbun" "żraben" ;
lin boss_N = mkN "mgħallem" "mgħallmin" ;
lin both7and_DConj = mkConj "kemm" "u kemm";
lin boy_N = mkN "tifel" "subien" ;
lin bread_N = mkNColl "ħobża" "ħobż" "ħobżiet" ;
lin break_V2 = dirV2 (kiser_KSR_1_8636_V) ;
lin breast_N = possN (mkN "sider" "sdur") ;
lin breathe_V = mkV "respira" ; -- ĦA N-NIFS
lin broad_A = mkA "wiesgħa" "wiesgħa" "wiesgħin" ;
lin brother_N2 = mkN2 (possN (mkN "ħu" "aħwa")) ;
lin brown_A = sameA "kannella" ;
lin burn_V = haraq_HRQ_1_8367_V ;
lin but_PConj = ss "imma" ;
lin butter_N = mkNColl "butir" "butirijiet" ;
lin buy_V2 = dirV2 (xtara_XRJ_8_10296_V) ;
lin by8agent_Prep = prep_minn ; -- mkPrep "minn" "mill-" "mit-" ;
lin by8means_Prep = mkPrep "bi" "b'" "bil-" "bit-" "bl-" ;
lin camera_N = mkN "kamera" "kameras" ;
lin can8know_VV = af_V ;
lin can_VV = sata'_V ;
lin cap_1_N = mkN "kappell" "kpiepel" ;
lin cap_2_N = mkN "kappell" "kpiepel" ;
lin car_N = mkN "karozza" "karozzi" ;
lin carpet_N = mkN "tapit" "twapet" ;
lin cat_N = mkN "qattus" "qtates" ; -- genderedN
lin ceiling_N = mkN "saqaf" "soqfa" ;
lin chair_N = mkN "siġġu" "siġġijiet" ;
lin cheese_N = mkNColl "ġobna" "ġobon" "ġobniet" ;
lin child_N = mkN "tifel / tifla" "tfal" ; -- genderedN
lin church_N = mkN "knisja" "knejjes" ;
lin city_N = mkN "belt" "bliet" feminine ;
lin clean_A = brokenA "nadif" "nodfa" ;
lin clever_A = mkA "bravu" ;
lin close_V2 = dirV2 (ghalaq_GHLQ_1_10530_V) ;
lin cloud_N = mkNColl "sħaba" "sħab" "sħabiet" ;
lin coat_N = mkN "kowt" "kowtijiet" ;
lin cold_A = mkA "kiesaħ" "kiesħa" "kesħin" ;
lin come_V = gie_GJ'_1_8123_V ;
lin computer_N = mkN "kompjuter" "kompjuters" ;
lin correct_A = mkA "korrett" ;
lin count_V2 = dirV2 (ghadd_GHDD_1_10460_V) ;
lin country_N = possN (mkN "pajjiż" "pajjiżi") ;
lin cousin_N = mkN "kuġin" "kuġini" ; -- genderedN
lin cow_N = mkNColl "baqra" "baqar" "baqriet" ;
lin cut_V2 = dirV2 (qata'_QTGH_1_9305_V) ;
lin day_N = mkN "ġurnata" "ġranet" ;
lin die_V = miet_MWT_1_8923_V ;
lin dig_V = haffer_HFR_2_8236_V ;
lin dirty_A = mkA "maħmuġ" ;
lin distance_N3 = mkN3 (mkN "distanza") saP minnP ;
lin do_V2 = dirV2 (ghamel_GHML_1_10544_V) ;
lin doctor_N = mkN "tabib" "tobba" ; -- genderedN
lin dog_N = mkN "kelb" "klieb" ;
lin door_N = mkN "bieb" "bibien" ;
lin drink_V2 = dirV2 (xorob_XRB_1_10231_V) ;
lin dry_A = mkA "niexef" ;
lin dull_A = sameA "tad-dwejjaq" ;
lin during_Prep = mkPrep "waqt" ;
lin dust_N = mkNColl "traba" "trab" "trabiet" ;
lin ear_N = possN (mkNDual "widna" "widnejn" "widniet") ;
lin earth_N = mkN "art" "artijiet" feminine ;
lin easy_A2V = dirA2 (sameA "faċli") ;
lin eat_V2 = dirV2 (kiel_KJL_1_8672_V) ;
lin egg_N = mkNColl "bajda" "bajd" "bajdiet" ;
lin either7or_DConj = mkConj "jew" "inkella" ;
lin empty_A = mkA "vojt" "vojta" "vojta" ;
lin enemy_N = mkN "għadu" "għedewwa" ;
lin every_Det = mkDeterminer singular "kull" ;
lin everybody_NP = regNP "kulħadd" ;
lin everything_NP = regNP "kollox" ;
lin everywhere_Adv = mkAdv "kullimkien" ;
lin except_Prep = mkPrep "apparti" ; --- special case..
lin eye_N = possN (mkNDual "għajn" "għajnejn" "għajnejn" "għejun" feminine) ;
lin factory_N = mkN "fabbrika" "fabbriki" ;
lin fall_V = waqa'_WQGH_1_10070_V ;
lin far_Adv = mkAdv "il-bogħod" ; -- use glue?
lin fat_N = mkNColl "xaħma" "xaħam" "xaħmiet" "xaħmijiet" ;
lin father_N2 = mkN2 (possN (mkN "missier" "missirijiet")) ;
lin fear_V2 = prepV2 (beza'_BZGH_1_7541_V) minnP ;
lin fear_VS = beza'_BZGH_1_7541_V;
lin feather_N = mkNColl "rixa" "rix" "rixiet" ;
lin few_Det = mkDeterminer plural "ftit" ;
lin fight_V2 = prepV2 (ggieled_GLD_6_8074_V) maP ;
lin find_V2 = lilV2 (sab_SJB_1_9779_V) ;
lin fingernail_N = possN (mkNDual "difer" "difrejn" "dwiefer") ;
lin fire_N = mkN "nar" "nirien" ;
lin fish_N = mkNColl "ħuta" "ħut" "ħutiet" ;
lin float_V = gham_GHWM_1_10750_V ; ---
lin floor_N = mkN "art" "artijiet" feminine ;
lin flow_V = ghadda_GHDJ_2_10679_V ;
lin flower_N = mkN "fjura" "fjuri" ;
lin fly_V = tar_TJR_1_9972_V ;
lin fog_N = mkNColl "ċpar" ;
lin foot_N = possN (mkNDual "sieq" "saqajn" "saqajn" feminine) ;
lin for_Prep = mkPrep "għal" "għall-" "għall-" "għat-" "għall-" "għalija" "għalik" "għalih" "għaliha" "għalina" "għalikom" "għalihom" True ;
lin forest_N = mkN "foresta" "foresti" ;
lin forget_V2 = lilV2 (nesa_NSJ_1_9126_V) ;
lin freeze_V = ffriza_V ;
lin fridge_N = mkN "friġġ" "friġġijiet" ;
lin friend_N = possN (mkN "ħabib" "ħbieb") ; -- genderedN
lin from_Prep = mkPrep "mingħand" ;
lin fruit_N = mkNColl "frotta" "frott" "frottiet" "frottijiet" ;
lin full_A = mkA "mimli" ;
lin fun_AV = sameA "pjaċevoli" ;
lin garden_N = mkN "ġnien" "ġonna" ;
lin girl_N = mkN "tifla" "tfajliet" ;
lin give_V3 = mkV3 ta_GHTJ_1_10767_V lilP ;
lin glove_N = mkN "ingwanta" "ingwanti" ;
lin go_V = mar_MWR_1_8918_V ;
lin gold_N = mkNColl "deheb" "dehbijiet" ;
lin good_A = mkA "tajjeb" "tajba" "tajbin" ;
lin grammar_N = mkN "grammatika" "grammatiki" ;
lin grass_N = mkNColl "ħaxixa" "ħaxix" "ħxejjex" ;
lin green_A = mkA "aħdar" "ħadra" "ħodor" ;
lin guts_N = possN (mkN "musrana" "musraniet" "msaren") ;
lin hair_N = possN (mkNColl "xagħara" "xagħar" "xagħariet" "xgħur") ;
lin hand_N = possN (mkNDual "id" "idejn" "idejn" feminine) ;
lin harbour_N = mkN "port" "portijiet" ;
lin hat_N = mkN "kappell" "kpiepel" ;
lin hate_V2 = lilV2 (baghad_BGHD_1_7402_V) ;
lin have_V2 = dirV2 (kellu_V) ;
lin he_Pron = mkPron "hu" "u" singular P3 masculine ; --- also HUWA
lin head_N = possN (mkN "ras" "rjus" feminine) ;
lin hear_V2 = lilV2 (sema'_SMGH_1_9698_V) ;
lin heart_N = possN (mkN "qalb" "qlub" feminine) ;
lin heavy_A = brokenA "tqil" "tqal" "itqal" ;
lin here7from_Adv = mkAdv ["minn hawn"] ;
lin here7to_Adv = mkAdv ["s'hawn"] ;
lin here_Adv = mkAdv "hawn" ;
lin hill_N = mkN "għolja" "għoljiet" ;
lin hit_V2 = lilV2 (laqat_LQT_1_8772_V) ;
lin hold_V2 = lilV2 (zamm_ZMM_1_10392_V) ;
lin hope_VS = xtaq_XWQ_8_10313_V ;
lin horn_N = mkN "ħorn" "ħornijiet" ;
lin horse_N = mkN "żiemel" "żwiemel" ;
lin hot_A = mkA "jaħraq" "taħraq" "jaħarqu" ;
lin house_N = mkN "dar" "djar" feminine ;
lin how8many_IDet = {s = "kemm" ; n = plural} ;
lin how8much_IAdv = ss "kemm" ;
lin how_IAdv = ss "kif" ;
lin hunt_V2 = prepV2 (kaccac_KCC_2_8571_V) ghalP ;
lin husband_N = mkN "raġel" "rġiel" ;
lin i_Pron = mkPron "jien" "i" singular P1 masculine ; --- also JIENA
lin ice_N = mkN "silġ" "silġiet" ;
lin if_Subj = ss "jekk" ;
lin if_then_Conj = mkConj "jekk" ;
lin important_A = sameA "importanti" ;
lin in8front_Prep = mkPrep "quddiem" ;
lin in_Prep = mkPrep "fi" "f'" "fil-" "fit-" "fl-" ;
lin industry_N = mkN "industrija" "industriji" ;
lin iron_N = mkNColl "ħadida" "ħadid" "ħadidiet" "ħdejjed" ;
lin it_Pron = he_Pron ;
lin john_PN = mkPN "Ġanni" masculine singular ;
lin jump_V = qabez_QBZ_1_9182_V ;
lin kill_V2 = lilV2 (qatel_QTL_1_9312_V) ;
lin king_N = mkN "re" "rejjiet" ;
lin knee_N = possN (mkNDual "rkoppa" "rkopptejn" "rkoppiet") ;
lin know_V2 = lilV2 (af_''F_1_10774_V) ;
lin know_VQ = af_''F_1_10774_V ;
lin know_VS = af_''F_1_10774_V ;
lin lake_N = mkN "għadira" "għadajjar" ;
lin lamp_N = mkN "lampa" "lampi" ;
lin language_N = mkN "lingwa" "lingwi" ;
lin language_title_Utt = ss "Malti" ;
lin laugh_V = dahak_DHK_1_7688_V ;
lin leaf_N = mkNDual "werqa" "werqtejn" "werqiet" ;
lin learn_V2 = dirV2 (tghallem_GHLM_5_10527_V) ;
lin leather_N = mkN "ġilda" "ġildiet" ;
lin leave_V2 = prepV2 (telaq_TLQ_1_9903_V) minnP ;
lin left_Ord = mkOrd "xellug" ;
lin leg_N = (mkNDual "riġel" "riġlejn" "riġlejn") ;
lin less_CAdv = C.mkCAdv "inqas" "minn" ; --- inqas mill-ieħor
lin lie_V = mtedd_MDD_8_8816_V ; -- lie down
lin like_V2 = lilV2 (ghogob_GHGB_1_10485_V) ;
lin listen_V2 = lilV2 (sema'_SMGH_1_9698_V) ;
lin live_V = ghex_GHJX_1_10711_V ;
lin liver_N = mkN "fwied" "ifdwa" ;
lin long_A = brokenA "twil" "twal" "itwal" ;
lin lose_V2 = lilV2 (tilef_TLF_1_9895_V) ;
lin louse_N = mkN "qamla" "qamliet" ;
lin love_N = mkN "mħabba" "mħabbiet" ;
lin love_V2 = lilV2 (habb_HBB_1_8174_V) ;
lin man_N = mkN "raġel" "rġiel" ;
lin many_Det = mkDeterminer plural "ħafna" ;
lin married_A2 = mkA2 (mkA "miżżewweġ" "miżżewġa") lilP ;
lin meat_N = mkNColl "laħma" "laħam" "laħmiet" "laħmijiet" ;
lin milk_N = mkNColl "ħalib" "ħalibijiet" ;
lin moon_N = mkN "qamar" "oqmra" ;
lin more_CAdv = C.mkCAdv "iktar" "minn" ; --- iktar mit-tnejn
lin most_Predet = ss "il-maġġoranza ta'" ; --- tal-, tan-
lin mother_N2 = mkN2 (possN (mkN "omm" "ommijiet" feminine)) ;
lin mountain_N = mkN "muntanja" "muntanji" ;
lin mouth_N = possN (mkN "ħalq" "ħluq") ;
lin much_Det = mkDeterminer singular "ħafna" ;
lin music_N = mkN "mużika" "mużiki" ;
lin must_VV = kellu_V ;
lin name_N = possN (mkN "isem" "ismijiet") ;
lin narrow_A = mkA "dejjaq" "dejqa" "dojoq" "idjaq" ;
lin near_A = mkA "viċin" ;
lin neck_N = possN (mkN "għonq" "għenuq") ;
lin new_A = brokenA "ġdid" "ġodda" ;
lin newspaper_N = mkN "gazzetta" "gazzetti" ;
lin night_N = mkN "lejl" "ljieli" ;
lin no_Quant = let l_ebda = artDef ++ "ebda" in mkQuant l_ebda l_ebda l_ebda False ;
lin no_Utt = ss "le" ;
lin nobody_NP = regNP "ħadd" ;
lin nose_N = possN (mkN "mnieħer" "mniħrijiet") ;
lin not_Predet = ss "mhux" ;
lin nothing_NP = regNP "xejn" ;
lin now_Adv = mkAdv "issa" ;
lin number_N = mkN "numru" "numrui" ;
lin oil_N = mkN "żejt" "żjut" ;
lin old_A = brokenA "qadim" "qodma" "eqdem" ; -- xiħ
lin on_Prep = mkPrep "fuq" ;
lin only_Predet = ss "biss" ;
lin open_V2 = dirV2 (fetah_FTH_1_7932_V) ;
lin or_Conj = mkConj "jew" ;
lin otherwise_PConj = ss "inkella" ;
lin paint_V2A = dirV2 (zeba'_ZBGH_1_10339_V) ; -- dirV2 (pitter_PTR_2_9152_V) ;
lin paper_N = mkN "karta" "karti" ;
lin paris_PN = mkPN "Pariġi" feminine singular ;
lin part_Prep = possess_Prep ;
lin peace_N = mkN "paċi" "paċijiet" feminine ;
lin pen_1_N = mkN "pinna" "pinen" ;
lin pen_2_N = mkN "pinna" "pinen" ;
lin person_N = mkNColl "persuna" "persuni" ;
lin planet_N = mkN "pjaneta" "pjaneti" ;
lin plastic_N = mkNNoPlural "plastik" ;
lin play_V = daqq_DQQ_1_7736_V ;
lin play_V2 = prepV2 (laghab_LGHB_1_8724_V) maP ;
lin please_Voc = ss "jekk jgħoġbok" ; --- JEKK JGĦOĠOBKOM
lin policeman_N = mkNNoPlural "pulizija" ;
lin possess_Prep = prep_ta ; -- mkPrep "ta'" "t'" "tal-" "tat-" "tal-" ;
lin priest_N = mkN "qassis" "qassisin" ;
lin probable_AS = mkAS (sameA "probabbli") ;
lin pull_V2 = lilV2 (gibed_GBD_1_8043_V) ;
lin push_V2 = dirV2 (mbotta_V) ; -- GĦAFAS
lin put_V2 = lilV2 (qieghed_QGHD_3_9212_V) ;
lin queen_N = mkN "reġina" "rġejjen" ;
lin question_N = mkN "mistoqsija" "mistoqsijiet" ;
lin quite_Adv = mkAdv "pjuttost" ;
lin radio_N = mkN "radju" "radjijiet" ;
lin rain_N = mkNNoPlural "xita" ;
lin rain_V0 = xita_XTW_1_10297_V ; -- TAGĦMEL IX-XITA
lin read_V2 = dirV2 (qara_QRJ_1_9350_V) ;
lin ready_A = mkA "lest" ;
lin reason_N = mkN "raġun" "raġunijiet" ;
lin red_A = mkA "aħmar" "ħamra" "ħomor" ;
lin religion_N = mkN "reliġjon" "reliġjonijiet" ;
lin restaurant_N = mkN "restorant" "restoranti" ;
lin right_Ord = mkOrd "lemin" ;
lin river_N = mkN "xmara" "xmajjar" ;
lin road_N = mkN "triq" "triqat" "toroq" feminine ;
lin rock_1_N = mkNColl "blata" "blat" "blatiet" ;
lin rock_2_N = mkNColl "blata" "blat" "blatiet" ;
lin roof_N = mkN "saqaf" "soqfa" ;
lin root_N = mkN "qħerq" "qħeruq" ;
lin rope_N = mkN "ħabel" "ħbula" ;
lin rotten_A = mkA "mħassar" "mħassra" "mħassrin" ;
lin round_A = mkA "tond" ;
lin rub_V2 = dirV2 (ghorok_GHRK_1_10599_V) ;
lin rubber_N = mkN "gomma" "gomom" ;
lin rule_N = mkN "regola" "regoli" ;
lin run_V = gera_GRJ_1_8131_V ;
lin salt_N = mkN "melħ" "melħiet" ;
lin sand_N = mkNColl "ramla" "ramel" "ramliet" ;
lin say_VS = qal_QWL_1_9357_V ;
lin school_1_N = mkN "skola" "skejjel" ;
lin school_2_N = mkN "skola" "skejjel" ;
lin science_N = mkN "xjenza" "xjenzi" ;
lin scratch_V2 = lilV2 (barax_BRX_1_7504_V) ;
lin sea_N = mkNDual "baħar" "baħrejn" "ibħra" ;
lin see_V2 = lilV2 (ra_R'J_1_9513_V) ;
lin seed_N = mkN "żerriegħa" "żerrigħat" ;
lin seek_V2 = lilV2 (fittex_FTX_2_7952_V) ;
lin sell_V3 = mkV3 biegh_BJGH_1_7565_V lilP ;
lin send_V3 = mkV3 baghat_BGHT_1_7412_V lilP ;
lin sew_V = hat_HJT_1_8508_V ;
lin sharp_A = mkA "jaqta'" "taqta'" "jaqtgħu" ;
lin she_Pron = mkPron "hi" "ha" singular P3 feminine ; --- also HIJA
lin sheep_N = mkNColl "nagħġa" "ngħaġ" "nagħġiet" ;
lin ship_N = mkN "vapur" "vapuri" ;
lin shirt_N = mkN "qmis" "qomos" feminine ;
lin shoe_N = mkN "żarbun" "żraben" ;
lin shop_N = mkN "ħanut" "ħwienet" ;
lin short_A = brokenA "qasir" "qosra" "iqsar" ;
lin silver_N = mkN "fidda" "fided" ;
lin sing_V = kanta_KNTJ_1_7016_V ;
lin sister_N = (mkN "oħt" "aħwa" feminine) ;
lin sit_V = pogga_PGJ_2_9157_V ;
lin skin_N = mkN "ġilda" "ġildiet" ;
lin sky_N = mkN "sema" "smewwiet" masculine ;
lin sleep_V = raqad_RQD_1_9469_V ;
lin small_A = brokenA "zgħir" "zgħar" "iżgħar" ;
lin smell_V = xamm_XMM_1_10207_V ;
lin smoke_N = mkN "duħħan" "dħaħen" ;
lin smooth_A = mkA "lixx" ;
lin snake_N = mkN "serp" "sriep" ;
lin snow_N = mkNColl "borra" ;
lin so_AdA = mkAdA "allura" ;
lin sock_N = mkN "kalzetta" "kalzetti" ;
lin somePl_Det = mkDeterminer plural "xi uħud" ;
lin someSg_Det = mkDeterminer singular "xi" ;
lin somebody_NP = regNP "xi ħadd" ;
lin something_NP = regNP "xi ħaġa" ;
lin somewhere_Adv = mkAdv "x'imkien" ;
lin song_N = mkN "kanzunetta" "kanzunetti" ;
lin speak_V2 = prepV2 (kellem_KLM_2_8597_V) maP ;
lin spit_V = bezaq_BZQ_1_7549_V ;
lin split_V2 = lilV2 (qasam_QSM_1_9292_V) ;
lin squeeze_V2 = dirV2 (ghasar_GHSR_1_10625_V) ;
lin stab_V2 = lilV2 (mewwes_MWS_2_8921_V) ;
lin stand_V = qaghad_QGHD_1_9210_V ;
lin star_N = mkN "stilla" "stilel" ;
lin steel_N = mkNNoPlural "azzar" ;
lin stick_N = mkN "lasta" "lasti" ;
lin stone_1_N = mkNColl "ġebla" "ġebel" "ġebliet" "ġbiel" ;
lin stone_2_N = mkNColl "ġebla" "ġebel" "ġebliet" "ġbiel" ;
lin stop_V = waqaf_WQF_1_10067_V ;
lin stove_N = mkN "kuker" "kukers" ;
lin straight_A = mkA "dritt" ;
lin student_N = mkN "student" "studenti" ;
lin stupid_A = mkA "iblah" "belha" "boloh" ;
lin suck_V2 = lilV2 (rada'_RDGH_1_9388_V) ;
lin sun_N = mkN "xemx" "xmux" feminine ;
lin swell_V = ntefah_NFH_8_8970_V ;
lin swim_V = gham_GHWM_1_10750_V ;
lin switch8off_V2 = dirV2 (tefa_TFJ_1_9960_V) ;
lin switch8on_V2 = dirV2 (xeghel_XGHL_1_10155_V) ;
lin table_1_N = mkN "mejda" "mwejjed" ;
lin table_2_N = mkN "mejda" "mwejjed" ;
lin tail_N = (mkN "denb" "dnieb") ;
lin talk_V3 = mkV3 kellem_KLM_2_8597_V maP fuqP ; -- PAĊPAĊ, PARLA
lin teach_V2 = lilV2 (ghallem_GHLM_2_10526_V) ;
lin teacher_N = mkN "għalliem" "għalliema" ; -- genderedN
lin television_N = mkN "televixin" "televixins" ;
lin that_Quant = mkQuant "dak" "dik" "dawk" True ;
lin that_Subj = ss "li" ;
lin there7from_Adv = mkAdv ["minn hemm"] ;
lin there7to_Adv = mkAdv "s'hemm" ;
lin there_Adv = mkAdv "hemm" ;
lin therefore_PConj = ss "allura" ;
lin they_Pron = mkPron "huma" "hom" plural P3 masculine ;
lin thick_A = mkA "oħxon" "ħoxna" "ħoxnin" "eħxen" ;
lin thin_A = brokenA "rqiq" "rqaq" "rqaq" ;
lin think_V = haseb_HSB_1_8387_V ;
lin this_Quant = mkQuant "dan" "din" "dawn" True ;
lin through_Prep = mkPrep "minn ġo" "minn ġo" "minn ġol-" "minn ġot-" "minn ġol-" "minn ġo fija" "minn ġo fik" "minn ġo fih" "minn ġo fiha" "minn ġo fina" "minn ġo fikom" "minn ġo fihom" False ;
lin throw_V2 = dirV2 (waddab_WDB_2_10027_V) ;
lin tie_V2 = dirV2 (qafel_QFL_1_9206_V) ;
lin to_Prep = mkPrep "lil" "lill-" "lit-" ;
lin today_Adv = mkAdv "illum" ;
lin tongue_N = possN (mkN "lsien" "ilsna") ;
lin too_AdA = mkAdA "ukoll" ;
lin tooth_N = possN (mkN "sinna" "sinniet" "snien") ;
lin train_N = mkN "ferrovija" "ferroviji" ;
lin travel_V = vvjagga_V ;
lin tree_N = mkNColl "siġra" "siġar" "siġriet" ;
lin turn_V = dar_DWR_1_7803_V ;
lin ugly_A = mkA "ikrah" "kerha" "koroh" ;
lin uncertain_A = mkA "inċert" ;
lin under_Prep = mkPrep "taħt" ;
lin understand_V2 = lilV2 (fehem_FHM_1_10830_V) ;
lin university_N = mkN "università" "universitàjiet" ;
lin very_AdA = mkAdA "ħafna" ;
lin village_N = mkN "raħal" "rħula" ;
lin vomit_V = qala'_QLGH_1_9223_V ;
lin wait_V2 = lilV2 (stenna_'NJ_10_10781_V) ;
lin walk_V = mexa_MXJ_1_8926_V ;
lin want_VV = ried_V ;
lin war_N = mkN "gwerra" "gwerrer" ;
lin warm_A = brokenA "sħun" "sħan" ;
lin wash_V2 = lilV2 (hasel_HSL_1_8395_V) ;
lin watch_V2 = dirV2 (ra_R'J_1_9513_V) ;
lin water_N = mkN "ilma" "ilmijiet" masculine ;
lin we_Pron = mkPron "aħna" "na" plural P1 masculine ;
lin wet_A = mkA "mxarrab" "mxarrba" "mxarrbin" ;
lin whatPl_IP = mkIP ("x'" ++ BIND) plural ;
lin whatSg_IP = mkIP ("x'" ++ BIND) singular ;
lin when_IAdv = ss "meta" ;
lin when_Subj = ss "meta" ;
lin where_IAdv = ss "fejn" ;
lin which_IQuant = ss "liema" ;
lin white_A = mkA "abjad" "bajda" "bojod" ;
lin whoPl_IP = mkIP "min" plural ;
lin whoSg_IP = mkIP "min" singular ;
lin who_PN = mkPN "ODS" ;
lin why_IAdv = ss "għalfejn" ;
lin wide_A = broad_A ;
lin wife_N = mkN "mara" "nisa" ;
lin win_V2 = dirV2 (rebah_RBH_1_9371_V) ;
lin wind_N = mkN "riħ" "rjieħ" ;
lin window_N = mkN "tieqa" "twieqi" ;
lin wine_N = mkNColl "nbid" "nbejjed" ;
lin wing_N = mkN "ġewnaħ" "ġwienaħ" ;
lin wipe_V2 = dirV2 (mesah_MSH_1_8881_V) ;
lin with_Prep = mkPrep "ma'" "m'" "mal-" "mat-" "mal-" ;
lin without_Prep = mkPrep "mingħajr" ;
lin woman_N = mkN "mara" "nisa" ;
lin wonder_VQ = kkuntempla_V ;
lin wood_N = mkN "injam" "injamiet" ;
lin worm_N = mkNColl "dudu" "dud" "dudiet" ;
lin write_V2 = dirV2 (kiteb_KTB_1_8641_V) ;
lin year_N = mkNDual "sena" "sentejn" "snin" ;
lin yellow_A = mkA "isfar" "safra" "sofor" ;
lin yes_Utt = ss "iva" ;
lin youPl_Pron = mkPron "intom" "kom" plural P2 masculine ;
lin youPol_Pron = youSg_Pron ;
lin youSg_Pron = mkPron "int" "ek" singular P2 masculine ; --- also INTI
lin young_A = small_A ;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,135 +0,0 @@
abstract Extensions =
Cat
** {
---- from ExtraEngAbs
cat
---- hard to merge VPI and VPS
VPI ;
[VPI] {2} ;
VPS ;
[VPS] {2} ;
fun
MkVPI : VP -> VPI ; -- to walk
ConjVPI : Conj -> ListVPI -> VPI ; -- to walk and drink beer
ComplVPIVV : VV -> VPI -> VP ; -- want to walk and drink beer
MkVPS : Temp -> Pol -> VP -> VPS ; -- had walked
ConjVPS : Conj -> ListVPS -> VPS ; -- had walked and drank beer
PredVPS : NP -> VPS -> S ; -- I had walked and drank beer
---- merge VPS and VPI
---- MkVPS, BaseVPS, ConsVPS, ConjVPS, PredVPS,
---- VPIForm, VPIInf, VPIPresPart, MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV,
-- generalizing Grammar
PassVPSlash : VPSlash -> VP ; -- be forced to sleep
PassAgentVPSlash : VPSlash -> NP -> VP ; -- be begged by her to go
ComplVV : VV -> Ant -> Pol -> VP -> VP ; -- want not to have slept
PredFrontVS : Temp -> NP -> VS -> S -> S ; -- I am here, she said -- no negation
PredFrontVQ : Temp -> NP -> VQ -> QS -> S ; -- are you here, she asked -- no negation; direct order
---- merge?
SlashV2V : V2V -> Ant -> Pol -> VP -> VPSlash ; -- force (her) not to have slept
SlashVPIV2V : V2V -> Pol -> VPI -> VPSlash ; -- force (her) not to sleep and dream
-- new structures
GenNP : NP -> Quant ; -- this man's
GenIP : IP -> IQuant ; -- whose
GenRP : Num -> CN -> RP ; -- whose car(s)
CompoundN : N -> N -> N ; -- control system / controls system / control-system
CompoundAP : N -> A -> AP ; -- language independent / language-independent
GerundCN : VP -> CN ; -- publishing of the document (can get a determiner)
GerundNP : VP -> NP ; -- publishing the document (by nature definite)
GerundAdv : VP -> Adv ; -- publishing the document (prepositionless adverb)
WithoutVP : VP -> Adv ; -- without publishing the document
ByVP : VP -> Adv ; -- by publishing the document
InOrderToVP : VP -> Adv ; -- (in order) to publish the document
PresPartAP : VP -> AP ; -- sleeping (man), (man) sleeping in the car
PastPartAP : VPSlash -> AP ; -- lost (opportunity) ; (opportunity) lost in space
PastPartAgentAP : VPSlash -> NP -> AP ; -- (opportunity) lost by the company
UseQuantPN : Quant -> PN -> NP ; -- this John
---- merge with IdRP?
that_RP : RP ; -- that [relative pronoun]
who_RP : RP ; -- who [relative pronoun]
EmptyRelSlash : ClSlash -> RCl ; -- (the city) he lives in
---- overgenerating?
VPSlashVS : VS -> VP -> VPSlash ; -- to believe (her) to sleep --- she was believed to sleep
PastPartRS : Ant -> Pol -> VPSlash -> RS ; -- (man) not seen by her --- maybe no Anter
PresPartRS : Ant -> Pol -> VP -> RS ; -- (man) not having seen her
ApposNP : NP -> NP -> NP ; -- Mr Hollande, the president of France,
---- move to standard RGL?
AdAdV : AdA -> AdV -> AdV ; -- almost always
UttAdV : AdV -> Utt ; -- always(!)
PositAdVAdj : A -> AdV ; -- (that she) positively (sleeps)
CompS : S -> Comp ; -- (the fact is) that she sleeps
CompQS : QS -> Comp ; -- (the question is) who sleeps
CompVP : Ant -> Pol -> VP -> Comp ; -- (she is) to go
SlashSlashV2V : V2V -> Ant -> Pol -> VPSlash -> VPSlash ; -- induce them to sell (it) -- analogous to Verb.SlashVV
DirectComplVS : Temp -> NP -> VS -> Utt -> S ; -- I am here, she said / she said: I am here -- no negation possible
DirectComplVQ : Temp -> NP -> VQ -> QS -> S ; -- who is there, she asked / she asked: who is there -- no negation possible
FocusObjS : NP -> SSlash -> S ; -- this woman I love -- in declarative S, not in QS
{-
-- for documentation
BaseVPI : VPI -> VPI -> ListVPI ; -- to walk, to run
ConsVPI : VPI -> ListVPI -> ListVPI ; -- to walk, to run, to stop
BaseVPS : VPS -> VPS -> ListVPS ; -- walks, has run
ConsVPS : VPS -> ListVPS -> ListVPS ; -- walks, has run, will stop
-}
}
{-
-- changes from ParseEngAbs
ComplBareVS --> ComplVS -- as variant
SlashBareV2S --> SlashV2S -- as variant
ComplSlashPartLast --> ComplSlash -- as variant
CompoundCN Sg/Pl --> CompoundCN -- as variants
DashCN --> CompoundCN -- as variant
GerundN --> GerundCN -- special case: now CN
--> GerundNP -- an NP version without determiner
--> GerundAdv -- an Adv version without determiner or preposition
GerundAP --> PresPartAP -- special case: now with a VP argument
PastPartAP --> PastPartAP -- now with VPSlash argument
--> PastPartAgentAP -- VPSlash + by NP
OrdCompar --> UseComparA -- the only use in PTB reduces to this standard RGL function
PredVPosv --> PredFrontVS, PredFrontVQ -- restricted to the special case actually occurring in PTB
PredVPovs --> -- inversion treated as variant: I am here, said she
-}

View File

@@ -1,203 +0,0 @@
--# -path=.:../abstract
concrete ExtensionsBul of Extensions =
CatBul ** open ResBul, (E = ExtraBul), Prelude, SyntaxBul in {
flags
coding = utf8 ;
lincat
VPI = E.VPI ;
ListVPI = E.ListVPI ;
VPS = E.VPS ;
ListVPS = E.ListVPS ;
lin
MkVPI = E.MkVPI ;
ConjVPI = E.ConjVPI ;
ComplVPIVV = E.ComplVPIVV ;
MkVPS = E.MkVPS ;
ConjVPS = E.ConjVPS ;
PredVPS = E.PredVPS ;
BaseVPI = E.BaseVPI ;
ConsVPI = E.ConsVPI ;
BaseVPS = E.BaseVPS ;
ConsVPS = E.ConsVPS ;
---- GenNP = E.GenNP ;
---- GenIP = E.GenIP ;
---- GenRP = E.GenRP ;
PassVPSlash = E.PassVPSlash ;
PassAgentVPSlash = E.PassAgentVPSlash ;
EmptyRelSlash = E.EmptyRelSlash ;
lin
CompoundN noun cn = {
s = \\nf => (noun.rel ! nform2aform nf cn.g) ++ (cn.s ! (indefNForm nf)) ;
rel = \\af => (noun.rel ! af) ++ (cn.rel ! af) ; ---- is this correct? AR 29/5/2014
g = cn.g
} ;
CompoundAP n a =
let ap : AForm => Str
= \\aform => n.rel ! (ASg Neut Indef) ++ a.s ! aform
in {s = ap; adv = ap ! (ASg Neut Indef); isPre = True} ;
GerundCN vp = {
s = \\nform => vp.ad.s ++
vp.s ! Imperf ! VNoun nform ++
vp.compl ! {gn=GSg Neut; p=P3} ;
g = ANeut
} ;
GerundNP vp = {
s = \\_ => daComplex Simul Pos vp ! Imperf ! {gn=GSg Neut; p=P1};
a = {gn=GSg Neut; p=P3};
p = Pos
} ;
GerundAdv vp =
{s = vp.ad.s ++
vp.s ! Imperf ! VGerund ++
vp.compl ! {gn=GSg Neut; p=P3}} ;
PresPartAP vp =
let ap : AForm => Str
= \\aform => vp.ad.s ++
vp.s ! Imperf ! VPresPart aform ++
case vp.vtype of {
VMedial c => reflClitics ! c;
_ => []
} ++
vp.compl ! {gn=aform2gennum aform; p=P3} ;
in {s = ap; adv = ap ! (ASg Neut Indef); isPre = True} ;
PastPartAP vp =
let ap : AForm => Str
= \\aform => vp.ad.s ++
vp.s ! Perf ! VPassive aform ++
vp.compl1 ! {gn=aform2gennum aform; p=P3} ++
vp.compl2 ! {gn=aform2gennum aform; p=P3}
in {s = ap; adv = ap ! ASg Neut Indef; isPre = True} ;
PastPartAgentAP vp np =
let ap : AForm => Str
= \\aform => vp.ad.s ++
vp.s ! Perf ! VPassive aform ++
vp.compl1 ! {gn=aform2gennum aform; p=P3} ++
vp.compl2 ! {gn=aform2gennum aform; p=P3} ++
"от" ++ np.s ! RObj Acc
in {s = ap; adv = ap ! ASg Neut Indef; isPre = True} ;
ByVP vp =
{s = vp.ad.s ++
vp.s ! Imperf ! VGerund ++
vp.compl ! {gn=GSg Neut; p=P3}} ;
InOrderToVP vp =
{s = "за" ++ daComplex Simul Pos (vp**{vtype=VMedial Acc}) ! Imperf ! {gn=GSg Neut; p=P3}};
WithoutVP vp =
{s = "без" ++ daComplex Simul Pos (vp**{vtype=VMedial Acc}) ! Imperf ! {gn=GSg Neut; p=P3}};
PositAdVAdj a = {s = a.adv} ;
that_RP = {
s = whichRP
} ;
UseQuantPN q pn = { s = table {
RObj Dat => "на" ++ pn.s;
_ => pn.s
} ;
a = {gn = GSg pn.g; p = P3};
p = q.p
} ;
PastPartRS ant pol vp = {
s = \\agr =>
ant.s ++ pol.s ++
vp.ad.s ++
case pol.p of {Pos => ""; Neg => "не"} ++
case ant.a of {Simul => ""; Anter => auxBe ! VPerfect (aform agr.gn Indef (RObj Acc))} ++
vp.s ! Perf ! VPassive (aform agr.gn Indef (RObj Acc)) ++
case vp.vtype of {
VMedial c => reflClitics ! c;
_ => []
} ++
vp.compl1 ! agr ++ vp.compl2 ! agr ;
} ;
PresPartRS ant pol vp = {
s = \\agr =>
ant.s ++ pol.s ++
vp.ad.s ++
case pol.p of {Pos => ""; Neg => "не"} ++
case ant.a of {Simul => ""; Anter => auxBe ! VPerfect (aform agr.gn Indef (RObj Acc))} ++
vp.s ! Imperf ! VPresPart (aform agr.gn Indef (RObj Acc)) ++
case vp.vtype of {
VMedial c => reflClitics ! c;
_ => []
} ++
vp.compl ! agr ;
} ;
SlashV2V vv ant p vp =
insertSlashObj2 (\\agr => ant.s ++ p.s ++ vv.c3.s ++
daComplex ant.a (orPol p.p vp.p) vp ! Perf ! agr)
Pos
(slashV vv vv.c2) ;
ComplVV vv ant p vp =
insertObj (\\agr => ant.s ++ p.s ++
case vv.typ of {
VVInf => daComplex ant.a p.p vp ! Perf ! agr;
VVGerund => gerund vp ! Imperf ! agr
}) vp.p
(predV vv) ;
CompS s = {s = \\_ => "че" ++ s.s; p = Pos} ;
CompQS qs = {s = \\_ => qs.s ! QIndir; p = Pos} ;
CompVP ant p vp = {s = let p' = case vp.p of {
Neg => Neg;
Pos => p.p
}
in \\agr => ant.s ++ p.s ++
daComplex ant.a p' vp ! Perf ! agr;
p = Pos
} ;
VPSlashVS vs vp =
let vp = insertObj (daComplex Simul Pos vp ! Perf) vp.p (predV vs)
in { s = vp.s;
ad = vp.ad;
compl1 = \\_ => "";
compl2 = vp.compl;
vtype = vp.vtype;
p = vp.p;
c2 = {s=""; c=Acc}
} ;
ApposNP np1 np2 = {
s = \\role => np1.s ! role ++ comma ++ np2.s ! RSubj ;
a = np1.a ;
p = np1.p
} ;
UttAdV adv = adv;
AdAdV = cc2 ;
DirectComplVS t np vs utt =
mkS (lin Adv (optCommaSS utt)) (mkS t positivePol (mkCl np (lin V vs))) ;
DirectComplVQ t np vs q =
mkS (lin Adv (optCommaSS (mkUtt q))) (mkS t positivePol (mkCl np (lin V vs))) ;
FocusObjS np sslash =
mkS (lin Adv (optCommaSS (ss (sslash.c2.s ++ np.s ! RObj sslash.c2.c)))) (lin S {s=sslash.s ! np.a}) ;
}

View File

@@ -1,139 +0,0 @@
concrete ExtensionsCat of Extensions =
CatCat **
open
PhonoCat, MorphoCat, ResCat, CommonRomance, ParadigmsCat, SyntaxCat, Prelude, (G = GrammarCat), (E = ExtraCat) in {
lincat
VPI = E.VPI ;
---- ListVPI = E.ListVPI ;
VPS = E.VPS ;
---- ListVPS = E.ListVPS ;
lin
MkVPI = E.MkVPI ;
---- ConjVPI = E.ConjVPI ;
---- ComplVPIVV = E.ComplVPIVV ;
MkVPS = E.MkVPS ;
---- ConjVPS = E.ConjVPS ;
PredVPS = E.PredVPS ;
---- BaseVPI = E.BaseVPI ;
---- ConsVPI = E.ConsVPI ;
---- BaseVPS = E.BaseVPS ;
---- ConsVPS = E.ConsVPS ;
---- GenIP = E.GenIP ;
---- GenRP = E.GenRP ;
PassVPSlash = E.PassVPSlash ;
PassAgentVPSlash = E.PassAgentVPSlash ;
lin
GenNP np =
let denp = (np.s ! ResCat.genitive).ton in {
s = \\_,_,_,_ => [] ;
sp = \\_,_,_ => denp ;
s2 = denp ;
isNeg = False ;
} ;
EmptyRelSlash slash = mkRCl which_RP (lin ClSlash slash) ;
that_RP = which_RP ;
but_Subj = {s = "però" ; m = Indic} ; ---- strange to have this as Subj
lin
CompoundN noun cn = {
s = \\n => cn.s ! n ++ "de" ++ noun.s ! Sg ;
g = cn.g
} ;
CompoundAP noun adj = {
s = \\af => adj.s ! Posit ! af ++ "de" ++ noun.s ! Sg ;
isPre = False
} ;
{-
GerundN v = {
s = \\n,c => v.s ! VPresPart ;
g = Neutr
} ;
GerundAP v = {
s = \\agr => v.s ! VPresPart ;
isPre = True
} ;
-- }
PastPartAP v = {
s = table {
AF g n => v.s ! VPart g n ;
_ => v.s ! VPart Masc Sg ---- the adverb form
} ;
isPre = True
} ;
--{-
OrdCompar a = {s = \\c => a.s ! AAdj Compar c } ;
-}
PositAdVAdj a = {s = a.s ! Posit ! AA} ;
{-
UseQuantPN q pn = {s = \\c => q.s ! False ! Sg ++ pn.s ! npcase2case c ; a = agrgP3 Sg pn.g} ;
SlashV2V v ant p vp = insertObjc (\\a => v.c3 ++ ant.s ++ p.s ++
infVP v.typ vp ant.a p.p a)
(predVc v) ;
SlashVPIV2V v p vpi = insertObjc (\\a => p.s ++
v.c3 ++
vpi.s ! VVAux ! a)
(predVc v) ;
-}
ComplVV v a p vp =
insertComplement (\\a => prepCase v.c2.c ++ infVP vp a) (predV v) ; ---- a,p
---- TODO: find proper expressions for OSV and OVS in Cat
PredVPosv np vp = mkCl (lin NP np) (lin VP vp) ;
PredVPovs np vp = mkCl (lin NP np) (lin VP vp) ;
CompS s = {s = \\_ => "de" ++ "què" ++ s.s ! Indic ; cop = serCopula} ; ---- de ?
{-
CompQS qs = {s = \\_ => qs.s ! QIndir} ;
CompVP ant p vp = {s = \\a => ant.s ++ p.s ++
infVP VVInf vp ant.a p.p a} ;
VPSlashVS vs vp =
insertObj (\\a => infVP VVInf vp Simul CPos a) (predV vs) **
{c2 = ""; gapInMiddle = False} ;
PastPartRS ant pol vps = {
s = \\agr => vps.ad ++ vps.ptp ++ vps.s2 ! agr ;
c = npNom
} ;
PresPartRS ant pol vp = {
s = \\agr => vp.ad ++ vp.prp ++ vp.s2 ! agr ;
c = npNom
} ;
ApposNP np1 np2 = {
s = \\c => np1.s ! c ++ "," ++ np2.s ! npNom ;
a = np1.a
} ;
AdAdV = cc2 ;
UttAdV adv = adv;
-}
}

View File

@@ -1,140 +0,0 @@
--# -path=.:../abstract
concrete ExtensionsChi of Extensions =
CatChi ** open ResChi, ParadigmsChi, SyntaxChi, (G = GrammarChi), (E = ExtraChi), Prelude in {
lincat
VPI = E.VPI ;
ListVPI = E.ListVPI ;
VPS = E.VPS ;
ListVPS = E.ListVPS ;
lin
MkVPI = E.MkVPI ;
ConjVPI = E.ConjVPI ;
---- ComplVPIVV = E.ComplVPIVV ;
MkVPS = E.MkVPS ;
ConjVPS = E.ConjVPS ;
PredVPS = E.PredVPS ;
BaseVPI = E.BaseVPI ;
ConsVPI = E.ConsVPI ;
BaseVPS = E.BaseVPS ;
ConsVPS = E.ConsVPS ;
GenNP = E.GenNP ;
---- GenIP = E.GenIP ;
GenRP = E.GenRP ;
PassVPSlash = E.PassVPSlash ;
PassAgentVPSlash = E.PassAgentVPSlash ;
---- EmptyRelSlash = E.EmptyRelSlash ;
lin
that_RP = which_RP ;
-- lexical entries
-- another_Quant = mkQuantifier "otro" "otra" "otros" "otras" ;
-- some_Quant = mkQuantifier "algún" "alguna" "algunos" "algunas" ;
-- anySg_Det = mkDeterminer "algún" "alguna" Sg False ; ---- also meaning "whichever" ?
-- each_Det = SyntaxChi.every_Det ;
-- but_Subj = {s = "pero" ; m = Indic} ; ---- strange to have this as Subj
CompoundN noun cn = {s = noun.s ++ cn.s ; c = cn.c} ; ----
CompoundAP noun adj = complexAP (noun.s ++ possessive_s ++ adj.s) ; ----
GerundN v = {
s = v.s ;
c = ge_s ---- ge
} ;
GerundNP vp = {
s = infVP vp ; ---- ?
} ;
GerundAdv vp = {
s = infVP vp ++ "地" ; ---- ?
advType = ATManner ;
} ;
PastPartAP v = {
s = v.verb.s ++ de_s ; ----
monoSyl = False ;
hasAdA = True ; ---
} ;
---- PastPartAP v = v ; ----
{-
OrdCompar a = {s = \\c => a.s ! AAdj Compar c } ;
-}
PositAdVAdj a = {s = a.s} ;
UseQuantPN q pn = {s = q.s ++ ge_s ++ pn.s} ; ---- ge
SlashV2V v a p vp =
insertObj (ResChi.mkNP (a.s ++ p.s ++ useVerb vp.verb ! p.p ! APlain ++ vp.compl))
(predV v v.part) ** {c2 = v.c2 ; isPre = v.hasPrep} ; ---- aspect
{-
SlashVPIV2V v p vpi = insertObjc (\\a => p.s ++
v.c3 ++
vpi.s ! VVAux ! a)
(predVc v) ;
-}
---- TODO: find proper expressions for OSV and OVS in Chi
PredVPosv np vp = G.PredVP np vp ; ---- (lin NP np) (lin VP vp) ; ----
PredVPovs np vp = G.PredVP np vp ; ---- (lin NP np) (lin VP vp) ; ----
CompS s = insertObj s (predV copula []) ; ----
CompQS qs = insertObj (ss (qs.s ! False)) (predV copula []) ; ----
CompVP ant p vp = insertObj (ss (infVP vp)) (predV copula []) ; ----
{-
VPSlashVS vs vp =
insertObj (\\a => infVP VVInf vp Simul CPos a) (predV vs []) **
{c2 = ""; gapInMiddle = False} ;
-}
PastPartRS ant pol vp = { ---- copied from PresPartRS
s = ant.s ++ pol.s ++ vp.prePart ++ useVerb vp.verb ! pol.p ! APlain ++ vp.compl ++ which_RP.s ---- aspect
} ; ---- ??
PresPartRS ant pol vp = { ---- copied from RelVP
s = ant.s ++ pol.s ++ vp.prePart ++ useVerb vp.verb ! pol.p ! APlain ++ vp.compl ++ which_RP.s ---- aspect
} ; ---- ??
PresPartAP vp = { ---- copied from RelVP
s = vp.prePart ++ useVerb vp.verb ! Pos ! APlain ++ vp.compl ; -- ++ which_RP.s ;
monoSyl = False ;
hasAdA = False
} ; ---- ??
ComplVV v a p vp = {
verb = v ;
compl = a.s ++ p.s ++ vp.topic ++ vp.prePart ++ useVerb vp.verb ! p.p ! APlain ++ vp.compl ; ---- aspect
prePart, topic = []
} ;
ApposNP np1 np2 = {
s = np1.s ++ chcomma ++ np2.s
} ;
AdAdV = cc2 ;
UttAdV adv = adv;
}

View File

@@ -1,153 +0,0 @@
--# -path=.:../abstract
concrete ExtensionsDut of Extensions =
CatDut ** open ResDut, ParadigmsDut, SyntaxDut, (E = ExtraDut), ExtendDut, (G = GrammarDut), Prelude in {
flags literal=Symb ; coding = utf8 ;
lincat
VPI = E.VPI ;
ListVPI = E.ListVPI ;
VPS = E.VPS ;
ListVPS = E.ListVPS ;
lin
MkVPI = E.MkVPI ;
---- ConjVPI = E.ConjVPI ;
---- ComplVPIVV = E.ComplVPIVV ;
MkVPS = E.MkVPS ;
---- ConjVPS = E.ConjVPS ;
PredVPS = E.PredVPS ;
---- BaseVPI = E.BaseVPI ;
---- ConsVPI = E.ConsVPI ;
---- BaseVPS = E.BaseVPS ;
---- ConsVPS = E.ConsVPS ;
---- GenNP = E.GenNP ;
---- GenIP = E.GenIP ;
---- GenRP = E.GenRP ;
PassVPSlash = E.PassVPSlash ;
PassAgentVPSlash = E.PassAgentVPSlash ;
---- EmptyRelSlash = E.EmptyRelSlash ;
lin
{-
ComplVV v ant p vp =
let
vpi = infVP v.isAux vp
in
insertExtrapos vpi.p4 (
insertInfExt vpi.p3 (
insertInf vpi.p2 (
insertObj vpi.p1 (
predVGen v.isAux v)))) ;
PastPartRS ant pol sl = { -- guessed by KA, some fields in sl are ignored!!
s = \\gn => let agr = agrgP3 Masc (numGenNum gn)
in sl.s.s ! VPastPart APred ++
(sl.nn ! agr).p1 ++ (sl.nn ! agr).p2 ++ sl.a2;
c = Nom
} ;
PresPartRS ant pol vp = { -- guessed by KA!!
s = \\gn => let agr = agrgP3 Masc (numGenNum gn)
in vp.s.s ! VPresPart APred ++
(vp.nn ! agr).p1 ++ (vp.nn ! agr).p2;
c = Nom
} ;
-}
PredVPosv = G.PredVP;
PredVPovs = G.PredVP;
CompoundN noun cn = {
s = \\nf => glue (noun.s ! NF Sg Nom) (cn.s ! nf) ; ---- TODO: introduce compound form
g = cn.g
} ;
CompoundAP noun adj = {
s = \\agr,af => glue (noun.s ! NF Sg Nom) (adj.s ! Posit ! af) ;
isPre = True
} ;
GerundNP vp = heavyNP { -- infinitive: Bier zu trinken
s = \\c => useInfVP False vp ! agrP3 Sg ;
a = agrP3 Sg
} ;
GerundAdv vp = { -- Bier trinkend
s = vp.n0 ! agrP3 Sg ++ vp.n2 ! agrP3 Sg ++ vp.a2 ++ vp.a1 ! Pos ++ vp.inf.p1 ++ vp.ext ++ vp.s.s ! VGer
} ;
WithoutVP vp = { -- ohne Bier zu trinken
s = "zonder" ++ useInfVP False vp ! agrP3 Sg
} ;
InOrderToVP vp = { -- um Bier zu trinken
s = "om" ++ useInfVP False vp ! agrP3 Sg
} ;
ByVP vp = { ---- durch Bier zu drinken
s = "door" ++ useInfVP False vp ! agrP3 Sg ----
} ;
PastPartAP = ExtendDut.PastPartAP ;
PresPartAP vp = { --# notpresent
s = \\agr,af => let aForm = case vp.isHeavy of { --# notpresent
True => APred ; --# notpresent
False => af } ; --# notpresent
in (infClause [] agr vp aForm).s ! Pres ! Simul ! Pos ! Sub ; --# notpresent
isPre = notB vp.isHeavy ; --# notpresent
} ; --# notpresent
PastPartAgentAP vp np =
let agent = (SyntaxDut.mkAdv (mkPrep "door") (lin NP np)).s ;
ap = ExtendDut.PastPartAP vp ;
in ap ** { s = \\agr,af => ap.s ! agr ! af ++ agent } ;
{-
OrdCompar a = {s = \\c => a.s ! AAdj Compar c } ; -- higher
PositAdVAdj a = {s = a.s ! AAdv} ; -- really
UseQuantPN q pn = {s = \\c => q.s ! False ! Sg ++ pn.s ! npcase2case c ; a = agrgP3 Sg pn.g} ; -- this London
SlashV2V v p vp = insertObjc (\\a => p.s ++ case p.p of {CPos => ""; _ => "niet"} ++ -- force not to sleep
v.c3 ++
infVP v.typ vp a)
(predVc v) ;
ComplPredVP np vp = { -- ?
s = \\t,a,b,o =>
let
verb = vp.s ! t ! a ! b ! o ! np.a ;
compl = vp.s2 ! np.a
in
case o of {
ODir => compl ++ "," ++ np.s ! npNom ++ verb.aux ++ verb.adv ++ vp.ad ++ verb.fin ++ verb.inf ;
OQuest => verb.aux ++ compl ++ "," ++ np.s ! npNom ++ verb.adv ++ vp.ad ++ verb.fin ++ verb.inf
}
} ;
-}
CompS s = {s = \\_ => "dat" ++ s.s ! Main} ; -- S -> Comp
CompVP ant p vp = {s = useInfVP True vp} ; -- VP -> Comp
lin
that_RP = which_RP ;
UttAdV adv = adv ;
ApposNP np1 np2 = np1 ** {
s = \\c => np1.s ! c ++ SOFT_BIND ++ "," ++ np2.s ! NPNom ;
isPron = False
} ;
AdAdV = cc2 ;
}

View File

@@ -1,162 +0,0 @@
--# -path=.:../abstract
concrete ExtensionsEng of Extensions =
CatEng ** open MorphoEng, ResEng, ParadigmsEng, (S = SentenceEng), (E = ExtraEng), SyntaxEng, Prelude in {
lincat
VPI = E.VPI ;
ListVPI = E.ListVPI ;
VPS = E.VPS ;
ListVPS = E.ListVPS ;
lin
MkVPI = E.MkVPI ;
ConjVPI = E.ConjVPI ;
ComplVPIVV = E.ComplVPIVV ;
MkVPS = E.MkVPS ;
ConjVPS = E.ConjVPS ;
PredVPS = E.PredVPS ;
BaseVPI = E.BaseVPI ;
ConsVPI = E.ConsVPI ;
BaseVPS = E.BaseVPS ;
ConsVPS = E.ConsVPS ;
GenNP = E.GenNP ;
GenIP = E.GenIP ;
GenRP = E.GenRP ;
PassVPSlash = E.PassVPSlash ;
PassAgentVPSlash = E.PassAgentVPSlash ;
EmptyRelSlash = E.EmptyRelSlash ;
lin
CompoundN noun cn = {
s = (\\n,c => noun.s ! Sg ! Nom ++ cn.s ! n ! c)
| (\\n,c => noun.s ! Pl ! Nom ++ cn.s ! n ! c)
| (\\n,c => noun.s ! Sg ! Nom ++ Predef.BIND ++ "-" ++ Predef.BIND ++ cn.s ! n ! c)
| (\\n,c => noun.s ! Pl ! Nom ++ Predef.BIND ++ "-" ++ Predef.BIND ++ cn.s ! n ! c)
;
g = cn.g
} ;
CompoundAP noun adj = {
s = (\\_ => noun.s ! Sg ! Nom ++ Predef.BIND ++ "-" ++ Predef.BIND ++ adj.s ! AAdj Posit Nom)
| (\\_ => noun.s ! Sg ! Nom ++ adj.s ! AAdj Posit Nom)
;
isPre = True
} ;
GerundCN vp = {
s = \\n,c => vp.ad ! AgP3Sg Neutr ++ vp.prp ++
case <n,c> of {
<Sg,Nom> => "" ;
<Sg,Gen> => Predef.BIND ++ "'s" ;
<Pl,Nom> => Predef.BIND ++ "s" ;
<Pl,Gen> => Predef.BIND ++ "s'"
} ++
vp.p ++ vp.s2 ! AgP3Sg Neutr ++ vp.ext ;
g = Neutr
} ;
GerundNP vp =
let a = AgP3Sg Neutr ---- agr
in
{s = \\_ => vp.ad ! a ++ vp.prp ++ vp.p ++ vp.s2 ! a ++ vp.ext ; a = a} ;
GerundAdv vp =
let a = AgP3Sg Neutr
in
{s = vp.ad ! a ++ vp.prp ++ vp.p ++ vp.s2 ! a ++ vp.ext} ;
WithoutVP vp = {s = "without" ++ (GerundAdv (lin VP vp)).s} ;
InOrderToVP vp = {s = ("in order" | []) ++ infVP VVInf vp Simul CPos (AgP3Sg Neutr)} ;
ByVP vp = {s = "by" ++ (GerundAdv (lin VP vp)).s} ;
PresPartAP = E.PartVP ;
PastPartAP vp = {
s = \\a => vp.ad ! a ++ vp.ptp ++ vp.p ++ vp.c2 ++ vp.s2 ! a ++ vp.ext ;
isPre = vp.isSimple -- depends on whether there are complements
} ;
PastPartAgentAP vp np = {
s = \\a => vp.ad ! a ++ vp.ptp ++ vp.p ++ vp.c2 ++ vp.s2 ! a ++ "by" ++ np.s ! NPAcc ++ vp.ext ;
isPre = False
} ;
PositAdVAdj a = {s = a.s ! AAdv} ;
UseQuantPN q pn = {s = \\c => q.s ! False ! Sg ++ pn.s ! npcase2case c ; a = agrgP3 Sg pn.g} ;
SlashV2V v ant p vp = insertObjc (\\a => v.c3 ++ ant.s ++ p.s ++
infVP v.typ vp ant.a p.p a)
(predVc v) ;
SlashSlashV2V v ant p vp = insertObjc (\\a => v.c3 ++ ant.s ++ p.s ++
infVP v.typ vp ant.a p.p a)
(predVc v) ;
SlashVPIV2V v p vpi = insertObjc (\\a => p.s ++
v.c3 ++
vpi.s ! VVAux ! a)
(predVc v) ;
ComplVV v a p vp = insertObj (\\agr => a.s ++ p.s ++
infVP v.typ vp a.a p.p agr)
(predVV v) ;
PredFrontVS t np vs s =
let
cl = mkClause (np.s ! npNom) np.a (predV vs) | E.InvFrontExtPredVP np (predV vs)
in {
s = s.s ++ frontComma ++ t.s ++ t.s ++ cl.s ! t.t ! t.a ! CPos ! oDir
} ;
PredFrontVQ t np vs s =
let
cl = mkClause (np.s ! npNom) np.a (predV vs) | E.InvFrontExtPredVP np (predV vs)
in {
s = s.s ! QDir ++ frontComma ++ t.s ++ cl.s ! t.t ! t.a ! CPos ! oDir
} ;
CompS s = {s = \\_ => "that" ++ s.s} ;
CompQS qs = {s = \\_ => qs.s ! QIndir} ;
CompVP ant p vp = {s = \\a => ant.s ++ p.s ++
infVP VVInf vp ant.a p.p a} ;
VPSlashVS vs vp =
insertObj (\\a => infVP VVInf vp Simul CPos a) (predV vs) **
{c2 = ""; gapInMiddle = False ; missingAdv = True} ; ---- missingAdv?
PastPartRS ant pol vps = {
s = \\agr => vps.ad ! agr ++ vps.ptp ++ vps.p ++ vps.s2 ! agr ;
c = npNom
} ;
PresPartRS ant pol vp = {
s = \\agr => vp.ad ! agr ++ vp.prp ++ vp.p ++ vp.s2 ! agr;
c = npNom
} ;
ApposNP np1 np2 = {
s = \\c => np1.s ! c ++ frontComma ++ np2.s ! npNom ++ finalComma ;
a = np1.a
} ;
AdAdV = cc2 ;
UttAdV adv = adv;
DirectComplVS t np vs utt =
mkS (lin Adv (optCommaSS utt)) (mkS t positivePol (mkCl np (lin V vs))) ;
DirectComplVQ t np vs q =
mkS (lin Adv (optCommaSS (mkUtt q))) (mkS t positivePol (mkCl np (lin V vs))) ;
FocusObjS np sslash =
mkS (lin Adv (optCommaSS (ss (sslash.c2 ++ np.s ! NPAcc)))) <lin S sslash : S> ;
}

View File

@@ -1,203 +0,0 @@
--# -path=.:../abstract
concrete ExtensionsEst of Extensions =
CatEst ** open MorphoEst, ResEst, ParadigmsEst, SyntaxEst, (G = GrammarEst), (E = ExtraEst), Prelude in {
flags coding = utf8 ;
lincat
VPI = E.VPI ;
ListVPI = E.ListVPI ;
VPS = E.VPS ;
ListVPS = E.ListVPS ;
lin
MkVPI = E.MkVPI ;
ConjVPI = E.ConjVPI ;
ComplVPIVV = E.ComplVPIVV ;
MkVPS = E.MkVPS ;
ConjVPS = E.ConjVPS ;
PredVPS = E.PredVPS ;
BaseVPI = E.BaseVPI ;
ConsVPI = E.ConsVPI ;
BaseVPS = E.BaseVPS ;
ConsVPS = E.ConsVPS ;
GenNP = E.GenNP ;
GenIP = E.GenIP ;
GenRP = E.GenRP ;
PassVPSlash = E.PassVPSlash ;
{- ---- rest TODO
PassAgentVPSlash = E.PassAgentVPSlash ;
---- EmptyRelSlash = E.EmptyRelSlash ;
lin
ComplVV v ant pol vp =
insertObj
(\\_,b,a => infVPGen pol.p v.sc b a vp (vvtype2infform v.vi))
(predSV {s = v.s ;
sc = case vp.s.sc of {
NCNom => v.sc ; -- minun täytyy pestä auto
c => c -- minulla täytyy olla auto
} ;
h = v.h ; p = v.p
}
) ;
-}
CompoundN noun cn = lin N {
s = \\nf => noun.s ! NCase Sg Gen ++ BIND ++ cn.s ! nf
} ;
{-
CompoundAP noun adj = {
s = \\_ => (snoun2nounSep {s = \\f => noun.s ! 10 ++ BIND ++ adj.s ! Posit ! sAN f ; h = adj.h}).s
} ;
PredVPosv np vp = mkCl np vp ; ----
-- Ant -> Pol -> VPSlash -> RS ; --- here replaced by a relative clause
PastPartRS ant pol vps = mkRS ant pol (mkRCl which_RP (E.PassVPSlash (lin VPSlash vps))) ;
ApposNP np1 np2 = {
s = \\c => np1.s ! c ++ "," ++ np2.s ! c ;
a = np1.a ;
isPron = np1.isPron ; isNeg = np1.isNeg
} ;
GerundNP vp = {
s = \\c => vp.s2 ! True ! Pos ! agrP3 Sg ++ (mkNP the_Det (lin N (sverb2snoun vp.s))).s ! c ++ vp.adv ! Pos ++ vp.ext ;
a = agrP3 Sg ;
isPron = False ; isNeg = False
} ;
-- sen sanominen suoraan että...
---- se --> sen
---- lost agreement, lost genitive, lost possessive
---- minun saamiseni mukaan
-}
-- : VP -> Adv ;
GerundAdv vp =
{ s = vp2adv vp True (VIInf InfDes) } ;
WithoutVP vp = -- ilma raamatut nägemata
{ s = "ilma" ++ vp2adv vp False (VIInf InfMata) } ;
InOrderToVP vp = -- et raamatut paremini näha
{ s = "et" ++ vp2adv vp True (VIInf InfDa) } ;
ByVP vp =
{ s = vp2adv vp True (VIInf InfDes) } ;
-- : VP -> AP
PresPartAP vp = { -- raamatut nägev (mees)
s = \\_,_ => vp2adv vp True VIPresPart ;
infl = Invariable
} ;
-- täna leitud
PastPartAP vp =
{ s = \\_,_ => vp2adv vp True (VIPass Past) ;
infl = Invariable } ;
-- hobisukeldujate poolt leitud (süvaveepomm)
PastPartAgentAP vp np = {
s = \\_,_ => np.s ! NPCase Gen ++ "poolt"
++ vp2adv vp True (VIPass Past) ;
infl = Invariable } ;
--GerundAP vp = {s = \\f => vp.s2 ! True ! Pos ! agrP3 Sg ++ (snoun2nounSep (sverb2nounPresPartAct vp.s)).s ! f ++ vp.adv ! Pos ++ vp.ext} ;
oper
vp2adv : VP -> Bool -> VIForm -> Str = \vp,objIsPos,vif ->
vp.s2 ! objIsPos ! Pos ! agrP3 Sg -- raamatut
++ vp.adv -- paremini
++ vp.p -- ära
++ (vp.s ! vif ! Simul ! Pos ! agrP3 Sg).fin -- tunda/tundes/tundmata/...
++ vp.ext ;
lin
{-
OrdCompar a = snoun2nounSep {s = \\nc => a.s ! Compar ! SAN nc ; h = a.h} ;
PositAdVAdj a = {s = a.s ! Posit ! SAAdv} ; -- A -> AdV really
UseQuantPN quant pn = {
s = \\c => let k = (npform2case Sg c) in
quant.s1 ! Sg ! k ++ snoun2np Sg pn ! c ++ quant.s2 ! pn.h ;
a = agrP3 Sg ;
isPron = False ;
isNeg = quant.isNeg
} ;
SlashV2V v ant p vp =
insertObj (\\_,b,a => infVP v.sc b a vp (vvtype2infform v.vi)) (predSV v) ** {c2 = v.c2} ; ----
---- insertObj (\\_,b,a => infVPGen p.p v.sc b a vp v.vi) (predSV v) ** {c2 = v.c2} ;
-}
-- : QS -> Comp ; -- (the question is) who sleeps
CompQS qs = lin Comp {s = \\_ => qs.s } ;
-- : Ant -> Pol -> VP -> Comp ; -- (she is) to go
CompVP ant pol vp = lin Comp -- no idea which inf to choose /IL
{s = \\agr => infVPAnt ant.a (NPCase Nom) pol.p agr vp InfDa } ;
-- TODO: revisit pronouns? Looks a bit overly complicated. /IL
who_RP = { s = \\n,c => MorphoEst.kesPron ! NCase n (npform2case n c) ;
a = RNoAg } ;
that_RP = which_RP ;
UttAdV a = a ;
UncNeg = negativePol ;
-- : AdA -> AdV -> AdV ; -- almost always
AdAdV ada adv = {s = ada.s ++ adv.s} ;
{-
PresPartRS ant pol vp = mkRS ant pol (mkRCl which_RP vp) ; ---- present participle attr "teräviä ottava"
PredVPosv np vp = mkCl np vp ; ---- OSV yes, but not for Cl
PredVPovs np vp = mkCl np vp ; ---- SVO
EmptyRelSlash cls = mkRCl which_RP cls ;
SlashVPIV2V v pol vpi = -- : V2V -> Pol -> VPI -> VPSlash ;
insertObj (\\_,b,a => vpi.s ! v.vi) (predSV v) ** {c2 = v.c2} ;
VPSlashVS v vp = -- : VS -> VP -> VPSlash ; -- hän sanoo (minun) menevän (!) ---- menneen ?
insertObj (\\_,b,a => infVP v.sc b a vp InfPresPart) (predSV v) **
{c2 = mkPrep []} ;
-- SlashSlashV2V v ant pol vps = -- : V2V -> Ant -> Pol -> VPSlash -> VPSlash ; --- not implemented in Eng so far
-- insertObj (\\_,b,a => infVPGen pol.p v.sc b a vps v.vi) (predSV v) ** {c2 = v.c2} ; --- or vps.c2 ??
--in Verb, SlashV2VNP : V2V -> NP -> VPSlash -> VPSlash
DirectComplVS t np vs utt =
mkS (lin Adv (optCommaSS utt)) (mkS t positivePol (mkCl np (lin V vs))) ;
DirectComplVQ t np vs q =
mkS (lin Adv (optCommaSS (mkUtt q))) (mkS t positivePol (mkCl np (lin V vs))) ;
FocusObjS np sslash =
mkS (lin Adv (optCommaSS (ss (appCompl True Pos sslash.c2 np)))) <lin S sslash : S> ; ---- Pos could be Neg: häntä minä en tunne
-}
}

View File

@@ -1,58 +0,0 @@
--# -path=.:../abstract:../basque
concrete ExtensionsEus of Extensions =
CatEus ** open ResEus, ParamEus, ParadigmsEus, ExtraEus, SentenceEus, Prelude in {
lincat
VPI,VPS = SS ;
lin
-- : Temp -> Pol -> VP -> VPS ; -- had walked
MkVPS t p vp =
let emptyCl = clFromVP empty_NP vp ;
emptyS = UseCl t p emptyCl ;
in { s = linS emptyS.s } ;
-- : NP -> VPS -> S ; -- I had walked and drank beer
PredVPS np vps = lin S {
s = { beforeAux = np.s ! Erg ++ vps.s ;
aux = { indep, stem = [] } ;
afterAux = [] } } ; -- TODO: make VPS actually not lose all this info >__>
UttAdV adv = adv ;
--GerundCN : VP -> CN ; -- publishing of the document (can get a determiner)
--GerundNP : VP -> NP ; -- publishing the document (by nature definite)
--GerundAdv : VP -> Adv ; -- publishing the document (prepositionless adverb)
--ByVP : VP -> Adv ; -- by publishing the document
-- asko ibiltzeaz
-- WithoutVP : VP -> Adv ; -- without publishing the document
-- Artzain zaharra atera zen mendirantz inori ezer esan gabe.
-- shepherd old went mountain.toward to.nobody nothing said without
WithoutVP vp = { s = complOrder vp Neg
++ vp.prc ! Past -- eman
++ "gabe" } ; -- gabe
-- : VP -> Adv ; -- (in order) to publish the document
-- hemen ibiltzeko in order to walk here,
-- ongi hiltzeko in order to die well, ona izateko in order to be good.
-- haurra noratzen zuten ikusteko in order to see where they took the child.]
-- corresponding interrogative is zertarako what for
InOrderToVP vp = { s = complOrder vp Pos
++ glue vp.nstem "ko" } ; --emateko
oper
complOrder : VP -> Polarity -> Str = \vp,pol ->
vp.adv ++ -- gaur
vp.iobj.s ++ -- mutilari
vp.dobj.s ! pol ++ -- garagardoa
vp.comp ! Hau ;
}

View File

@@ -1,165 +0,0 @@
--# -path=.:../abstract
concrete ExtensionsFin of Extensions =
CatFin ** open MorphoFin, ResFin, ParadigmsFin, SyntaxFin, (G = GrammarFin), (E = ExtraFin), StemFin, Prelude in {
flags coding = utf8 ;
lincat
VPI = E.VPI ;
ListVPI = E.ListVPI ;
VPS = E.VPS ;
ListVPS = E.ListVPS ;
lin
MkVPI = E.MkVPI ;
ConjVPI = E.ConjVPI ;
ComplVPIVV = E.ComplVPIVV ;
MkVPS = E.MkVPS ;
ConjVPS = E.ConjVPS ;
PredVPS = E.PredVPS ;
BaseVPI = E.BaseVPI ;
ConsVPI = E.ConsVPI ;
BaseVPS = E.BaseVPS ;
ConsVPS = E.ConsVPS ;
GenNP = E.GenNP ;
GenIP = E.GenIP ;
GenRP = E.GenRP ;
PassVPSlash = E.PassVPSlash ;
PassAgentVPSlash = E.PassAgentVPSlash ;
---- EmptyRelSlash = E.EmptyRelSlash ;
lin
ComplVV v ant pol vp =
insertObj
(\\_,b,a => infVPGen pol.p v.sc b a vp (vvtype2infform v.vi))
(predSV {s = v.s ;
sc = case vp.s.sc of {
NCNom => v.sc ; -- minun täytyy pestä auto
c => c -- minulla täytyy olla auto
} ;
h = v.h ; p = v.p
}
) ;
CompoundN noun cn = {
s = \\nf => noun.s ! 10 ++ BIND ++ cn.s ! nf ;
h = cn.h
} ;
CompoundAP noun adj = {
s = \\_ => (snoun2nounSep {s = \\f => noun.s ! 10 ++ BIND ++ adj.s ! Posit ! sAN f ; h = adj.h}).s
} ;
PresPartAP vp = { ---- many things can go wrong here...
s = \\bool,nform =>
vp.s2 ! True ! Pos ! agrP3 Sg ++ vp.adv ! Pos ++ vp.ext ++
(sverb2verbSep vp.s).s ! PresPartAct (AN nform)
} ;
PredVPosv np vp = mkCl np vp ; ----
-- Ant -> Pol -> VPSlash -> RS ; --- here replaced by a relative clause
PastPartRS ant pol vps = mkRS ant pol (mkRCl which_RP (E.PassVPSlash (lin VPSlash vps))) ;
ApposNP np1 np2 = {
s = \\c => np1.s ! c ++ "," ++ np2.s ! c ;
a = np1.a ;
isPron = np1.isPron ; isNeg = np1.isNeg
} ;
GerundNP vp = {
s = \\c => vp.s2 ! True ! Pos ! agrP3 Sg ++ (mkNP the_Det (lin N (sverb2snoun vp.s))).s ! c ++ vp.adv ! Pos ++ vp.ext ;
a = agrP3 Sg ;
isPron = False ; isNeg = False
} ;
-- sen sanominen suoraan että...
---- se --> sen
---- lost agreement, lost genitive, lost possessive
---- minun saamiseni mukaan
GerundAP vp = {s = \\f => vp.s2 ! True ! Pos ! agrP3 Sg ++ (snoun2nounSep (sverb2nounPresPartAct vp.s)).s ! f ++ vp.adv ! Pos ++ vp.ext} ;
GerundAdv vp = {s = (sverb2verbSep vp.s).s ! Inf Inf2Instr ++ vp.s2 ! True ! Pos ! agrP3 Sg ++ vp.adv ! Pos ++ vp.ext} ; -- nukkuen
WithoutVP vp = {s = (sverb2verbSep vp.s).s ! Inf Inf3Abess ++ vp.s2 ! True ! Pos ! agrP3 Sg ++ vp.adv ! Pos ++ vp.ext} ; -- nukkumatta
InOrderToVP vp = {
s = (sverb2verbSep vp.s).s ! Inf Inf1Long ++ Predef.BIND ++ "en" ++ vp.s2 ! True ! Pos ! agrP3 Sg ++ vp.adv ! Pos ++ vp.ext
} ; -- nukkuakseen --- agr
ByVP vp = {s = (sverb2verbSep vp.s).s ! Inf Inf3Adess ++ vp.s2 ! True ! Pos ! agrP3 Sg ++ vp.adv ! Pos ++ vp.ext} ; -- nukkumalla
-- tänään löydetty
PastPartAP vp = {s = \\_,f => vp.s2 ! True ! Pos ! agrP3 Sg ++ vp.adv ! Pos ++ (sverb2verbSep vp.s).s ! PastPartPass (AN f) ++ vp.ext} ;
-- miehen tänään löytämä
PastPartAgentAP vp np =
{s = \\_,f => np.s ! NPCase Gen ++ vp.s2 ! True ! Pos ! agrP3 Sg ++ vp.adv ! Pos ++ (sverb2verbSep vp.s).s ! AgentPart (AN f) ++ vp.ext} ;
OrdCompar a = snoun2nounSep {s = \\nc => a.s ! Compar ! SAN nc ; h = a.h} ;
PositAdVAdj a = {s = a.s ! Posit ! SAAdv} ; -- A -> AdV really
UseQuantPN quant pn = {
s = \\c => let k = (npform2case Sg c) in
quant.s1 ! Sg ! k ++ snoun2np Sg pn ! c ++ quant.s2 ! pn.h ;
a = agrP3 Sg ;
isPron = False ;
isNeg = quant.isNeg
} ;
SlashV2V v ant p vp =
insertObj (\\_,b,a => infVP v.sc b a vp (vvtype2infform v.vi)) (predSV v) ** {c2 = v.c2} ; ----
---- insertObj (\\_,b,a => infVPGen p.p v.sc b a vp v.vi) (predSV v) ** {c2 = v.c2} ;
CompS s = {s = \\_ => "että" ++ s.s} ; -- S -> Comp ---- what are these expected to do ? 29/3/2013
CompVP ant pol vp = {s = \\a => infVPGen pol.p vp.s.sc Pos a vp Inf1} ; -- VP -> Comp
that_RP = which_RP ;
no_RP = which_RP ;
UttAdV a = a ;
UncNeg = negativePol ;
PresPartRS ant pol vp = mkRS ant pol (mkRCl which_RP vp) ; ---- present participle attr "teräviä ottava"
PredVPosv np vp = mkCl np vp ; ---- OSV yes, but not for Cl
PredVPovs np vp = mkCl np vp ; ---- SVO
EmptyRelSlash cls = mkRCl which_RP cls ;
CompQS qs = {s = \\_ => qs.s} ;
AdAdV ada adv = {s = ada.s ++ adv.s} ;
SlashVPIV2V v pol vpi = -- : V2V -> Pol -> VPI -> VPSlash ;
insertObj (\\_,b,a => vpi.s ! v.vi) (predSV v) ** {c2 = v.c2} ;
VPSlashVS v vp = -- : VS -> VP -> VPSlash ; -- hän sanoo (minun) menevän (!) ---- menneen ?
insertObj (\\_,b,a => infVP v.sc b a vp InfPresPart) (predSV v) **
{c2 = mkPrep []} ;
-- SlashSlashV2V v ant pol vps = -- : V2V -> Ant -> Pol -> VPSlash -> VPSlash ; --- not implemented in Eng so far
-- insertObj (\\_,b,a => infVPGen pol.p v.sc b a vps v.vi) (predSV v) ** {c2 = v.c2} ; --- or vps.c2 ??
--in Verb, SlashV2VNP : V2V -> NP -> VPSlash -> VPSlash
DirectComplVS t np vs utt =
mkS (lin Adv (optCommaSS utt)) (mkS t positivePol (mkCl np (lin V vs))) ;
DirectComplVQ t np vs q =
mkS (lin Adv (optCommaSS (mkUtt q))) (mkS t positivePol (mkCl np (lin V vs))) ;
FocusObjS np sslash =
mkS (lin Adv (optCommaSS (ss (appCompl True Pos sslash.c2 np)))) <lin S sslash : S> ; ---- Pos could be Neg: häntä minä en tunne
}

View File

@@ -1,154 +0,0 @@
concrete ExtensionsFre of Extensions =
CatFre **
open
PhonoFre, MorphoFre, ResFre, CommonRomance, ParadigmsFre, SyntaxFre, Prelude, (G = GrammarFre), (E = ExtraFre) in {
lincat
VPI = E.VPI ;
---- ListVPI = E.ListVPI ;
VPS = E.VPS ;
---- ListVPS = E.ListVPS ;
lin
MkVPI = E.MkVPI ;
---- ConjVPI = E.ConjVPI ;
---- ComplVPIVV = E.ComplVPIVV ;
MkVPS = E.MkVPS ;
---- ConjVPS = E.ConjVPS ;
PredVPS = E.PredVPS ;
---- BaseVPI = E.BaseVPI ;
---- ConsVPI = E.ConsVPI ;
---- BaseVPS = E.BaseVPS ;
---- ConsVPS = E.ConsVPS ;
---- GenIP = E.GenIP ;
---- GenRP = E.GenRP ;
PassVPSlash = E.PassVPSlash ;
PassAgentVPSlash = E.PassAgentVPSlash ;
lin
GenNP np =
let denp = (np.s ! ResFre.genitive).ton in {
s = \\_,_,_,_ => [] ;
sp = \\_,_,_ => denp ;
s2 = denp ;
isNeg = False ;
} ;
EmptyRelSlash slash = mkRCl which_RP (lin ClSlash slash) ;
that_RP = which_RP ;
but_Subj = {s = "mais" ; m = Indic} ; ---- strange to have this as Subj
lin
CompoundN noun cn = {
s = \\n => cn.s ! n ++ elisDe ++ noun.s ! Sg ;
g = cn.g
} ;
CompoundAP noun adj = {
s = \\af => adj.s ! Posit ! af ++ elisDe ++ noun.s ! Sg ;
isPre = False
} ;
GerundNP vp =
let a = agrP3 Masc Sg ---- agr
in
heavyNP {s = \\c => prepCase c ++ infVP vp a ; a = a} ; -- parlare tedesco non è facile
GerundAdv vp =
let a = agrP3 Masc Sg
in
{s = gerVP vp a} | {s = "en" ++ gerVP vp a} ;
WithoutVP vp = SyntaxFre.mkAdv without_Prep (lin NP (GerundNP (lin VP vp))) ; -- senza dormire
InOrderToVP vp = SyntaxFre.mkAdv for_Prep (lin NP (GerundNP (lin VP vp))) ; -- per dormire
ByVP vp = GerundAdv (lin VP vp) ;
PresPartAP vp = {
s = table {
AF g n => nominalVP (\_ -> VPresPart) vp (agrP3 g n) ;
_ => nominalVP (\_ -> VPresPart) vp (agrP3 Masc Sg) ---- the adverb form
} ;
isPre = False
} ;
PastPartAP vp = {
s = table {
AF g n => nominalVP (\_ -> VPart g n) vp (agrP3 g n) ;
_ => nominalVP (\_ -> VPart Masc Sg) vp (agrP3 Masc Sg) ---- the adverb form
} ;
isPre = False
} ;
PastPartAgentAP vp np =
let part = PastPartAP (lin VP vp)
in part ** {
s = \\a => part.s ! a ++ (SyntaxFre.mkAdv (mkPrep "par") (lin NP np)).s
} ;
PositAdVAdj a = {s = a.s ! Posit ! AA} ;
{-
UseQuantPN q pn = {s = \\c => q.s ! False ! Sg ++ pn.s ! npcase2case c ; a = agrgP3 Sg pn.g} ;
SlashV2V v ant p vp = insertObjc (\\a => v.c3 ++ ant.s ++ p.s ++
infVP v.typ vp ant.a p.p a)
(predVc v) ;
SlashVPIV2V v p vpi = insertObjc (\\a => p.s ++
v.c3 ++
vpi.s ! VVAux ! a)
(predVc v) ;
-}
ComplVV v a p vp =
insertComplement (\\a => prepCase v.c2.c ++ infVP vp a) (predV v) ; ---- a,p
---- TODO: find proper expressions for OSV and OVS in Fre
PredVPosv np vp = mkCl (lin NP np) (lin VP vp) ;
PredVPovs np vp = mkCl (lin NP np) (lin VP vp) ;
CompS s = {s = \\_ => "de" ++ "que" ++ s.s ! Indic ; cop = serCopula} ; ---- de ?
{-
CompQS qs = {s = \\_ => qs.s ! QIndir} ;
CompVP ant p vp = {s = \\a => ant.s ++ p.s ++
infVP VVInf vp ant.a p.p a} ;
VPSlashVS vs vp =
insertObj (\\a => infVP VVInf vp Simul CPos a) (predV vs) **
{c2 = ""; gapInMiddle = False} ;
PastPartRS ant pol vps = {
s = \\agr => vps.ad ++ vps.ptp ++ vps.s2 ! agr ;
c = npNom
} ;
PresPartRS ant pol vp = {
s = \\agr => vp.ad ++ vp.prp ++ vp.s2 ! agr ;
c = npNom
} ;
ApposNP np1 np2 = {
s = \\c => np1.s ! c ++ "," ++ np2.s ! npNom ;
a = np1.a
} ;
AdAdV = cc2 ;
UttAdV adv = adv;
-}
}

View File

@@ -1,183 +0,0 @@
--# -path=.:../abstract
concrete ExtensionsGer of Extensions =
CatGer ** open MorphoGer, ResGer, ParadigmsGer, SyntaxGer, (E = ExtraGer), (G = GrammarGer), Prelude in {
flags literal=Symb ; coding = utf8 ;
lincat
VPI = E.VPI ;
ListVPI = E.ListVPI ;
VPS = E.VPS ;
ListVPS = E.ListVPS ;
lin
MkVPI = E.MkVPI ;
ConjVPI = E.ConjVPI ;
ComplVPIVV = E.ComplVPIVV ;
MkVPS = E.MkVPS ;
ConjVPS = E.ConjVPS ;
PredVPS = E.PredVPS ;
BaseVPI = E.BaseVPI ;
ConsVPI = E.ConsVPI ;
BaseVPS = E.BaseVPS ;
ConsVPS = E.ConsVPS ;
---- GenNP = E.GenNP ;
---- GenIP = E.GenIP ;
---- GenRP = E.GenRP ;
PassVPSlash = E.PassVPSlash ;
PassAgentVPSlash = E.PassAgentVPSlash ;
EmptyRelSlash = E.EmptyRelSlash ;
lin
ComplVV v ant p vp =
let
vpi = infVP v.isAux vp
in
insertExtrapos vpi.p4 (
insertInfExt vpi.p3 (
insertInf vpi.p2 (
insertObj vpi.p1 (
predVGen v.isAux v)))) ;
PastPartRS ant pol sl = { -- guessed by KA, some fields in sl are ignored!!
s = \\rgn => let agr = case rgn of {RGenNum gn => agrgP3 Masc (numGenNum gn) ; _ => agrgP3 Neutr Sg}
in sl.s.s ! VPastPart APred ++
(sl.nn ! agr).p1 ++ (sl.nn ! agr).p2 ++ sl.a2;
c = Nom
} ;
PresPartRS ant pol vp = { -- guessed by KA!!
s = \\rgn => let agr = case rgn of {RGenNum gn => agrgP3 Masc (numGenNum gn) ; _ => agrgP3 Neutr Sg}
in vp.s.s ! VPresPart APred ++
(vp.nn ! agr).p1 ++ (vp.nn ! agr).p2;
c = Nom
} ;
PredVPosv = G.PredVP;
PredVPovs = G.PredVP;
CompoundN noun cn = {
s = \\n,c => glue noun.co (cn.uncap.s ! n ! c) ;
co = glue noun.co (cn.uncap.co) ;
uncap = {
s = \\n,c => glue noun.uncap.co (cn.uncap.s ! n ! c) ;
co = glue noun.uncap.co (cn.uncap.co)
} ;
g = cn.g
} ;
CompoundAP noun adj = {
s = \\af => glue (noun.s ! Sg ! Nom) (adj.s ! Posit ! af) ;
isPre = True ;
c = <[],[]>;
ext = []
} ;
GerundNP vp = { -- infinitive: Bier zu trinken
s = \\c => (prepC c).s ++ useInfVP False vp ;
a = Ag Neutr Sg P3 ;
isPron = False ;
rc, ext, adv = "";
} ;
GerundAdv vp = { -- Bier trinkend
s = (vp.nn ! agrP3 Sg).p1 ++ (vp.nn ! agrP3 Sg).p2 ++ vp.a2 ++ vp.inf ++ vp.ext ++ vp.infExt ++ vp.s.s ! VPresPart APred
} ;
WithoutVP vp = { -- ohne Bier zu trinken
s = "ohne" ++ useInfVP False vp
} ;
InOrderToVP vp = { -- um Bier zu trinken
s = "um" ++ useInfVP False vp
} ;
ByVP vp = { ---- durch Bier zu drinken
s = "durch" ++ useInfVP False vp ----
} ;
PresPartAP vp = {
s = \\af => vp.s.particle ++ (vp.nn ! agrP3 Sg).p1 ++ (vp.nn ! agrP3 Sg).p2 ++ vp.a2 ++ vp.inf ++ vp.ext ++ vp.infExt ++ vp.s.s ! VPresPart af ;
isPre = True ;
c = <[],[]>;
ext = []
} ;
PastPartAP vp = {
s = \\af => (vp.nn ! agrP3 Sg).p1 ++ (vp.nn ! agrP3 Sg).p2 ++ vp.a2 ++ vp.inf ++ vp.ext ++ vp.infExt ++ vp.s.s ! VPastPart af ;
isPre = True ;
c = <[],[]>;
ext = []
} ;
PastPartAgentAP vp np =
let agent = (SyntaxGer.mkAdv von_Prep (lin NP np)).s
in {
s = \\af => (vp.nn ! agrP3 Sg).p1 ++ (vp.nn ! agrP3 Sg).p2 ++ vp.a2 ++ agent ++ vp.inf ++ vp.ext ++ vp.infExt ++ vp.s.s ! VPastPart af ;
isPre = True ;
c = <[],[]>;
ext = []
} ;
{-
OrdCompar a = {s = \\c => a.s ! AAdj Compar c } ; -- higher
PositAdVAdj a = {s = a.s ! AAdv} ; -- really
UseQuantPN q pn = {s = \\c => q.s ! False ! Sg ++ pn.s ! npcase2case c ; a = agrgP3 Sg pn.g} ; -- this London
SlashV2V v p vp = insertObjc (\\a => p.s ++ case p.p of {CPos => ""; _ => "nicht"} ++ -- force not to sleep
v.c3 ++
infVP v.typ vp a)
(predVc v) ;
ComplPredVP np vp = { -- ?
s = \\t,a,b,o =>
let
verb = vp.s ! t ! a ! b ! o ! np.a ;
compl = vp.s2 ! np.a
in
case o of {
ODir => compl ++ "," ++ np.s ! npNom ++ verb.aux ++ verb.adv ++ vp.ad ++ verb.fin ++ verb.inf ;
OQuest => verb.aux ++ compl ++ "," ++ np.s ! npNom ++ verb.adv ++ vp.ad ++ verb.fin ++ verb.inf
}
} ;
-}
CompS s = {s = \\_ => "dass" ++ s.s ! Main ; ext = ""} ; -- S -> Comp
CompVP ant p vp = {s = \\_ => useInfVP True vp; ext = ""} ; -- VP -> Comp
lin
that_RP = which_RP ;
UttAdV adv = adv;
ApposNP np1 np2 = {
s = \\c => np1.s ! c ++ bigNP np1 ++ SOFT_BIND ++ "," ++ np2.s ! NPNom ;
ext = np2.ext ;
rc = np2.rc ;
adv = np2.adv ;
a = np1.a ;
isPron = False
} ;
AdAdV = cc2 ;
DirectComplVS t np vs utt =
mkS (lin Adv (optCommaSS utt)) (mkS t positivePol (mkCl np (lin V vs))) ;
DirectComplVQ t np vs q =
mkS (lin Adv (optCommaSS (mkUtt q))) (mkS t positivePol (mkCl np (lin V vs))) ;
FocusObjS np sslash =
mkS (lin Adv (ss (appPrep sslash.c2 np.s))) <lin S sslash : S> ;
}

View File

@@ -1,154 +0,0 @@
--# -path=.:../abstract
concrete ExtensionsHin of Extensions =
CatHin ** open MorphoHin, ResHin, ParadigmsHin, CommonHindustani, (E = ExtraHin), Prelude in {
flags coding = utf8 ;
lincat
---- VPI = E.VPI ;
---- ListVPI = E.ListVPI ;
VPS = E.VPS ;
ListVPS = E.ListVPS ;
lin
---- MkVPI = E.MkVPI ;
---- ConjVPI = E.ConjVPI ;
---- ComplVPIVV = E.ComplVPIVV ;
MkVPS = E.MkVPS ;
ConjVPS = E.ConjVPS ;
PredVPS = E.PredVPS ;
---- BaseVPI = E.BaseVPI ;
---- ConsVPI = E.ConsVPI ;
BaseVPS = E.BaseVPS ;
ConsVPS = E.ConsVPS ;
GenNP = E.GenNP ;
---- GenIP = E.GenIP ;
---- GenRP = E.GenRP ;
---- PassVPSlash = E.PassVPSlash ;
---- PassAgentVPSlash = E.PassAgentVPSlash ;
---- EmptyRelSlash = E.EmptyRelSlash ;
lin
CompoundN noun cn = {
s = \\n,c => cn.s ! Sg ! Dir ++ noun.s ! n ! c;
g = cn.g
} ;
GerundN v = {
s = \\n,c => v.cvp ++ v.s ! Inf ; -- v.s ! VF Imperf Pers2_Casual n Masc ++ hwa (Ag Masc n Pers2_Casual) ; --the main verb of compound verbs
g = Masc
} ;
GerundAP v = {
s = \\n,g,_,_ => v.cvp ++ v.s ! VF Imperf Pers2_Casual n g ++ hwa (Ag g n Pers2_Casual) ;
} ;
---- PastPartAP v = {
---- s = \\n,g,_,_ => v.cvp ++ v.s ! VF Imperf Pers2_Casual n g ; -- the main verb of compound versb needs to be attached here
---- } ;
OrdCompar a = {s = a.s ! Sg ! Masc ! Dir ! Compar ; n = Sg } ;
PositAdVAdj a = {s = a.s ! Sg ! Masc ! Dir ! Posit} ;
---------------
--SlashV2V v p vp = insertVV (infV2V v.isAux vp) (predV v) vp.embComp ** {c2 = {s = sE ; c = VTrans}}; -- changed from VTransPost
ComplVV v a p vp = insertTrans (insertVV (infVV v.isAux vp) (predV v) vp.embComp ) VTrans; -- changed from VTransPost
---------------
UseQuantPN q pn = {s = \\c => q.s ! Sg ! pn.g ! Dir ++ pn.s ! Dir ; a = agrP3 pn.g Sg} ;
PredVPosv np vp = mkClause np vp ; --{
{- s = \\t,a,b,o =>
let
verb = vp.s ! t ! a ! b ! o ! np.a ;
compl = vp.s2 ! np.a
in
case o of {
ODir => compl ++ "," ++ np.s ! npNom ++ verb.aux ++ vp.ad ++ verb.fin ++ verb.adv ++ verb.inf ;
OQuest => verb.aux ++ compl ++ "," ++ np.s ! npNom ++ verb.adv ++ vp.ad ++ verb.fin ++ verb.inf
}
} ;
-}
PredVPovs np vp = mkClause np vp ; --{
{- s = \\t,a,b,o =>
let
verb = vp.s ! t ! a ! b ! o ! np.a ;
compl = vp.s2 ! np.a
in
case o of {
ODir => compl ++ verb.aux ++ verb.adv ++ vp.ad ++ verb.fin ++ verb.inf ++ np.s ! npNom ;
OQuest => verb.aux ++ compl ++ verb.adv ++ vp.ad ++ verb.fin ++ verb.inf ++ np.s ! npNom
}
} ;
-}
{-
SlashV2V v p vp = insertObjc (\\a => p.s ++ case p.p of {CPos => ""; _ => "not"} ++
v.c3 ++
infVP v.typ vp a)
(predVc v) ;
ComplPredVP np vp = {
s = \\t,a,b,o =>
let
verb = vp.s ! t ! a ! b ! o ! np.a ;
compl = vp.s2 ! np.a
in
case o of {
ODir => compl ++ "," ++ np.s ! npNom ++ verb.aux ++ verb.adv ++ vp.ad ++ verb.fin ++ verb.inf ;
OQuest => verb.aux ++ compl ++ "," ++ np.s ! npNom ++ verb.adv ++ vp.ad ++ verb.fin ++ verb.inf
}
} ;
-}
CompVP ant p vp = {s = \\a => ant.s ++ p.s ++
infVP False vp a} ; -- check for vp.isAux
that_RP = {
s = \\_,_ => "कि" ;
a = RNoAg
} ;
--no_RP = {
-- s = \\_,_ => "" ;
-- a = RNoAg
-- } ;
CompS s = {s = \\_ => "कि" ++ s.s} ;
-- CompVP vp = {s = \\a => infVP VVInf vp a} ;
lin
PPos = {s = [] ; p = Pos} ;
PNeg = {s = [] ; p = Neg} ; -- contracted: don't
UncNeg = {s = [] ; p = Neg} ;
VPSlashPrep vp p = vp ** {c2 = {s = p.s!Masc ; c = VTrans}} ;
PastPartRS ant pol vps = {
s = \\agr => (vps.s!VPTense VPPast agr).inf ;
c = Dir
} ;
PresPartRS ant pol vp = {
s = \\agr => (vp.s!VPTense VPPres agr).inf ;
c = Dir
} ;
ApposNP np1 np2 = {
s = \\c => np1.s!NPC Dir ++ "," ++ np2.s ! c ;
a = np2.a
} ;
AdAdV = cc2 ;
UttAdV adv = adv;
}

View File

@@ -1,153 +0,0 @@
concrete ExtensionsIta of Extensions =
CatIta **
open
PhonoIta, MorphoIta, ResIta, CommonRomance, ParadigmsIta, SyntaxIta, Prelude, (G = GrammarIta), (E = ExtraIta) in {
lincat
VPI = E.VPI ;
---- ListVPI = E.ListVPI ;
VPS = E.VPS ;
---- ListVPS = E.ListVPS ;
lin
MkVPI = E.MkVPI ;
---- ConjVPI = E.ConjVPI ;
---- ComplVPIVV = E.ComplVPIVV ;
MkVPS = E.MkVPS ;
---- ConjVPS = E.ConjVPS ;
PredVPS = E.PredVPS ;
---- BaseVPI = E.BaseVPI ;
---- ConsVPI = E.ConsVPI ;
---- BaseVPS = E.BaseVPS ;
---- ConsVPS = E.ConsVPS ;
---- GenIP = E.GenIP ;
---- GenRP = E.GenRP ;
PassVPSlash = E.PassVPSlash ;
PassAgentVPSlash = E.PassAgentVPSlash ;
lin
GenNP np =
let denp = (np.s ! ResIta.genitive).ton in {
s = \\_,_,_,_ => [] ;
sp = \\_,_,_ => denp ;
s2 = denp ;
isNeg = False ;
} ;
EmptyRelSlash slash = mkRCl which_RP (lin ClSlash slash) ;
that_RP = which_RP ;
but_Subj = {s = "ma" ; m = Indic} ; ---- strange to have this as Subj
lin
CompoundN noun cn = {
s = \\n => cn.s ! n ++ "di" ++ noun.s ! Sg ;
g = cn.g
} ;
CompoundAP noun adj = {
s = \\af => adj.s ! Posit ! af ++ "di" ++ noun.s ! Sg ;
isPre = False
} ;
GerundNP vp =
let a = agrP3 Masc Sg ---- agr
in
heavyNP {s = \\c => prepCase c ++ infVP vp a ; a = a} ; -- parlare tedesco non è facile
GerundAdv vp =
let a = agrP3 Masc Sg
in
{s = gerVP vp a} ; -- dormendo
WithoutVP vp = SyntaxIta.mkAdv without_Prep (lin NP (GerundNP (lin VP vp))) ; -- senza dormire
InOrderToVP vp = SyntaxIta.mkAdv for_Prep (lin NP (GerundNP (lin VP vp))) ; -- per dormire
ByVP vp = GerundAdv (lin VP vp) ;
PresPartAP vp = {
s = table {
AF g n => nominalVP (\_ -> VPresPart) vp (agrP3 g n) ;
_ => nominalVP (\_ -> VPresPart) vp (agrP3 Masc Sg) ---- the adverb form
} ;
isPre = False
} ;
PastPartAP vp = {
s = table {
AF g n => nominalVP (\_ -> VPart g n) vp (agrP3 g n) ;
_ => nominalVP (\_ -> VPart Masc Sg) vp (agrP3 Masc Sg) ---- the adverb form
} ;
isPre = False
} ;
PastPartAgentAP vp np =
let part = PastPartAP (lin VP vp)
in part ** {
s = \\a => part.s ! a ++ (SyntaxIta.mkAdv da_Prep (lin NP np)).s
} ;
PositAdVAdj a = {s = a.s ! Posit ! AA} ;
{-
UseQuantPN q pn = {s = \\c => q.s ! False ! Sg ++ pn.s ! npcase2case c ; a = agrgP3 Sg pn.g} ;
SlashV2V v ant p vp = insertObjc (\\a => v.c3 ++ ant.s ++ p.s ++
infVP v.typ vp ant.a p.p a)
(predVc v) ;
SlashVPIV2V v p vpi = insertObjc (\\a => p.s ++
v.c3 ++
vpi.s ! VVAux ! a)
(predVc v) ;
-}
ComplVV v a p vp =
insertComplement (\\a => prepCase v.c2.c ++ infVP vp a) (predV v) ; ---- a,p
---- TODO: find proper expressions for OSV and OVS in Ita
PredVPosv np vp = mkCl (lin NP np) (lin VP vp) ;
PredVPovs np vp = mkCl (lin NP np) (lin VP vp) ;
CompS s = {s = \\_ => "di" ++ "che" ++ s.s ! Indic ; cop = serCopula} ; ---- de ?
{-
CompQS qs = {s = \\_ => qs.s ! QIndir} ;
CompVP ant p vp = {s = \\a => ant.s ++ p.s ++
infVP VVInf vp ant.a p.p a} ;
VPSlashVS vs vp =
insertObj (\\a => infVP VVInf vp Simul CPos a) (predV vs) **
{c2 = ""; gapInMiddle = False} ;
PastPartRS ant pol vps = {
s = \\agr => vps.ad ++ vps.ptp ++ vps.s2 ! agr ;
c = npNom
} ;
PresPartRS ant pol vp = {
s = \\agr => vp.ad ++ vp.prp ++ vp.s2 ! agr ;
c = npNom
} ;
ApposNP np1 np2 = {
s = \\c => np1.s ! c ++ "," ++ np2.s ! npNom ;
a = np1.a
} ;
AdAdV = cc2 ;
UttAdV adv = adv;
-}
}

View File

@@ -1,359 +0,0 @@
--# -path=.:../abstract
concrete ExtensionsJpn of Extensions =
CatJpn ** open ResJpn, ParadigmsJpn, SyntaxJpn, (G = GrammarJpn), (E = ExtraJpn), Prelude in {
lincat
VPI = E.VPI ;
VPS = E.VPS ;
[VPS] = {verbAnd, verbOr, verbIf, a_stemAnd, a_stemOr, a_stemIf,
i_stemAnd, i_stemOr, i_stemIf, teAnd, teOr, teIf,
baAnd, baOr, baIf : Speaker => Animateness => Style => Str ;
prep : Str ; obj, prepositive : Style => Str} ;
[VPI] = {verbAnd, verbOr : Speaker => Animateness => Str ;
a_stemAnd, a_stemOr, i_stemAnd, i_stemOr : Speaker => Animateness => Style => Str ;
teAnd, teOr, baAnd, baOr : Speaker => Animateness => Style => Polarity => Str ;
prep : Str ; obj, prepositive : Style => Str} ;
lin
MkVPI = E.MkVPI ;
MkVPS = E.MkVPS ;
ComplVPIVV = E.ComplVPIVV ;
PredVPS = E.PredVPS ;
ConjVPS = E.ConjVPS ;
ConjVPI = E.ConjVPI ;
BaseVPS = E.BaseVPS ;
ConsVPS = E.ConsVPS ;
BaseVPI = E.BaseVPI ;
ConsVPI = E.ConsVPI ;
GenNP = E.GenNP ;
GenIP = E.GenIP ;
GenRP = E.GenRP ;
CompoundN n1 n2 = {
s = \\n,st => n1.s ! n ! st ++ n2.s ! n ! st ;
anim = n2.anim ;
counter = n2.counter ;
counterReplace = n2.counterReplace ;
counterTsu = n2.counterTsu
} ;
CompoundAP n a = {
pred = \\st,t,p => n.s ! Sg ! st ++ "に" ++ a.pred ! st ! t ! p ;
attr = \\st => n.s ! Sg ! st ++ "に" ++ a.attr ;
adv = \\st => n.s ! Sg ! st ++ "に" ++ a.adv ! Pos ;
dropNaEnging = \\st => n.s ! Sg ! st ++ "に" ++ a.dropNaEnging ;
prepositive = \\st => "" ;
te = \\st,p => n.s ! Sg ! st ++ "に" ++ a.te ! p ;
ba = \\st,p => n.s ! Sg ! st ++ "に" ++ a.ba ! p ;
needSubject = True
} ;
GerundCN vp = {
s = \\n,st => vp.verb ! SomeoneElse ! Inanim ! Plain ! TPres ! Pos ++ "の" ;
anim = Inanim ;
counter = "つ" ;
counterReplace = False ;
counterTsu = True;
object = \\st => vp.obj ! st ++ vp.prep ;
prepositive = vp.prepositive ;
hasAttr = False
} ;
GerundNP vp = {
s = \\st => vp.obj ! st ++ vp.prep ++
vp.verb ! SomeoneElse ! Inanim ! Plain ! TPres ! Pos ++ "の" ;
anim = Inanim ;
changePolar = False ;
needPart = True;
meaning = SomeoneElse ;
prepositive = vp.prepositive ;
} ;
GerundAdv vp = {
s = \\st => vp.prepositive ! st ++ vp.obj ! st ++ vp.prep ++
vp.verb ! SomeoneElse ! Inanim ! Plain ! TPres ! Pos ++ "と" ;
prepositive = True
} ;
WithoutVP vp = {
s = \\st => vp.prepositive ! st ++ vp.obj ! st ++ vp.prep ++
vp.verb ! SomeoneElse ! Inanim ! Plain ! TPres ! Neg ++ "で" ;
prepositive = True
} ;
ByVP vp = {
s = \\st => vp.prepositive ! st ++ vp.obj ! st ++ vp.prep ++
vp.verb ! SomeoneElse ! Inanim ! Plain ! TPres ! Pos ++ "ことで" ;
prepositive = True
} ;
InOrderToVP vp = {
s = \\st => vp.prepositive ! st ++ vp.obj ! st ++ vp.prep ++
vp.verb ! SomeoneElse ! Inanim ! Plain ! TPres ! Pos ++ "ために" ;
prepositive = True
} ;
PresPartAP vp = {
pred = \\st,t,p => vp.te ! SomeoneElse ! Anim ! st ! Pos ++ (mkVerb "いる" Gr2).s ! st ! t ! p ;
attr = \\st => vp.te ! SomeoneElse ! Anim ! st ! Pos ++ "いる" ;
te = \\st,p => vp.te ! SomeoneElse ! Anim ! st ! Pos ++ mkExistV.te ! SomeoneElse ! Anim ! st ! p ;
ba = \\st,p => vp.te ! SomeoneElse ! Anim ! st ! Pos ++ mkExistV.ba ! SomeoneElse ! Anim ! st ! p ;
adv = \\st => vp.te ! SomeoneElse ! Anim ! st ! Pos ++ mkExistV.te ! SomeoneElse ! Anim ! st ! Pos ;
dropNaEnging = \\st => vp.te ! SomeoneElse ! Anim ! st ! Pos ++ "いる" ;
prepositive = vp. prepositive ;
needSubject = vp.needSubject
} ;
PastPartAP vpslash = {
pred = \\st,t,p => vpslash.a_stem ! SomeoneElse ++ "れた" ++ mkCopula.s ! st ! t ! p ;
-- works only for Gr1. Have to add verb group record to VPSlash
attr = \\st => vpslash.a_stem ! SomeoneElse ++ "れた" ;
te = \\st,p => vpslash.a_stem ! SomeoneElse ++ "れて" ;
ba = \\st,p => vpslash.a_stem ! SomeoneElse ++ "れば" ;
adv = \\st => vpslash.a_stem ! SomeoneElse ++ "れて" ;
dropNaEnging = \\st => vpslash.a_stem ! SomeoneElse ++ "れた" ;
prepositive = vpslash.prepositive ;
needSubject = True
} ;
PastPartAgentAP vpslash np = {
pred = \\st,t,p => np.s ! st ++ "に" ++ vpslash.a_stem ! SomeoneElse ++ "れた" ++ mkCopula.s ! st ! t ! p ;
-- works only for Gr1. Have to add verb group record to VPSlash
attr = \\st => np.s ! st ++ "に" ++ vpslash.a_stem ! SomeoneElse ++ "れた" ;
te = \\st,p => np.s ! st ++ "に" ++ vpslash.a_stem ! SomeoneElse ++ "れて" ;
ba = \\st,p => np.s ! st ++ "に" ++ vpslash.a_stem ! SomeoneElse ++ "れば" ;
adv = \\st => np.s ! st ++ "に" ++ vpslash.a_stem ! SomeoneElse ++ "れて" ;
dropNaEnging = \\st => np.s ! st ++ "に" ++ vpslash.a_stem ! SomeoneElse ++ "れた" ;
prepositive = \\st => np.prepositive ! st ++ vpslash.prepositive ! st ;
needSubject = True
} ;
ApposNP np1 np2 = {
s = \\st => np1.s ! st ++ "、" ++ np2.s ! st ;
prepositive = \\st => np1.prepositive ! st ++ np2.prepositive ! st ;
needPart = np1.needPart ;
changePolar = np1.changePolar ;
meaning = np1.meaning ;
anim = np1.anim
} ;
AdAdV = cc2 ;
UttAdV adv = {
s = \\part,st => adv.s ;
type = NoImp
} ;
DirectComplVS t np vs utt = {
s = case t.a of {
Simul => table {
Wa => \\st => t.s ++ np.prepositive ! st ++ np.s ! st ++ "は「" ++
utt.s ! Wa ! st ++ "」と" ++ vs.s ! st ! t.t ! Pos ;
Ga => \\st => t.s ++ np.prepositive ! st ++ np.s ! st ++ "が「" ++
utt.s ! Wa ! st ++ "」と" ++ vs.s ! st ! t.t ! Pos
} ;
Anter => case t.t of {
TPres => table {
Wa => \\st => t.s ++ np.prepositive ! st ++ np.s ! st ++ "は「" ++
utt.s ! Wa ! st ++ "」と" ++ vs.s ! st ! TPast ! Pos ;
Ga => \\st => t.s ++ np.prepositive ! st ++ np.s ! st ++ "が「" ++
utt.s ! Wa ! st ++ "」と" ++ vs.s ! st ! TPast ! Pos
} ;
TPast => table {
Wa => \\st => t.s ++ np.prepositive ! st ++ np.s ! st ++ "は「" ++
utt.s ! Wa ! st ++ "」と" ++ vs.s ! st ! TPast ! Pos ;
Ga => \\st => t.s ++ np.prepositive ! st ++ np.s ! st ++ "が「" ++
utt.s ! Wa ! st ++ "」と" ++ vs.s ! st ! TPast ! Pos
} ;
TFut => table {
Wa => \\st => t.s ++ np.prepositive ! st ++ np.s ! st ++ "は「" ++
utt.s ! Wa ! st ++ "」と" ++ vs.s ! st ! TPres ! Pos ;
Ga => \\st => t.s ++ np.prepositive ! st ++ np.s ! st ++ "が「" ++
utt.s ! Wa ! st ++ "」と" ++ vs.s ! st ! TPres ! Pos
}
}
} ;
te = table {
Wa => \\st => t.s ++ np.prepositive ! st ++ np.s ! st ++ "は「" ++
utt.s ! Wa ! st ++ "」と" ++ vs.te ! Pos ;
Ga => \\st => t.s ++ np.prepositive ! st ++ np.s ! st ++ "が「" ++
utt.s ! Wa ! st ++ "」と" ++ vs.te ! Pos
} ;
ba = table {
Wa => \\st => t.s ++ np.prepositive ! st ++ np.s ! st ++ "は「" ++
utt.s ! Wa ! st ++ "」と" ++ vs.ba ! Pos ;
Ga => \\st => t.s ++ np.prepositive ! st ++ np.s ! st ++ "が「" ++
utt.s ! Wa ! st ++ "」と" ++ vs.ba ! Pos
} ;
subj = table {
Wa => \\st => t.s ++ np.prepositive ! st ++ np.s ! st ++ "は" ;
Ga => \\st => t.s ++ np.prepositive ! st ++ np.s ! st ++ "が"
} ;
pred = case t.a of {
Simul => \\st => "「" ++ utt.s ! Wa ! st ++ "」と" ++ vs.s ! st ! t.t ! Pos ;
Anter => case t.t of {
TPres => \\st => "「" ++ utt.s ! Wa ! st ++ "」と" ++ vs.s ! st ! TPast ! Pos ;
TPast => \\st => "「" ++ utt.s ! Wa ! st ++ "」と" ++ vs.s ! st ! TPast ! Pos ;
TFut => \\st => "「" ++ utt.s ! Wa ! st ++ "」と" ++ vs.s ! st ! TPres ! Pos
}
} ;
pred_te = \\st => "「" ++ utt.s ! Wa ! st ++ "」と" ++ vs.te ! Pos ;
pred_ba = \\st => "「" ++ utt.s ! Wa ! st ++ "」と" ++ vs.ba ! Pos
} ;
DirectComplVQ t np vq qs = {
s = case t.a of {
Simul => table {
Wa => \\st => t.s ++ np.prepositive ! st ++ np.s ! st ++ "は「" ++
qs.s ! Wa ! st ++ "」と" ++ vq.s ! st ! t.t ! Pos ;
Ga => \\st => t.s ++ np.prepositive ! st ++ np.s ! st ++ "が「" ++
qs.s ! Wa ! st ++ "」と" ++ vq.s ! st ! t.t ! Pos
} ;
Anter => case t.t of {
TPres => table {
Wa => \\st => t.s ++ np.prepositive ! st ++ np.s ! st ++ "は「" ++
qs.s ! Wa ! st ++ "」と" ++ vq.s ! st ! TPast ! Pos ;
Ga => \\st => t.s ++ np.prepositive ! st ++ np.s ! st ++ "が「" ++
qs.s ! Wa ! st ++ "」と" ++ vq.s ! st ! TPast ! Pos
} ;
TPast => table {
Wa => \\st => t.s ++ np.prepositive ! st ++ np.s ! st ++ "は「" ++
qs.s ! Wa ! st ++ "」と" ++ vq.s ! st ! TPast ! Pos ;
Ga => \\st => t.s ++ np.prepositive ! st ++ np.s ! st ++ "が「" ++
qs.s ! Wa ! st ++ "」と" ++ vq.s ! st ! TPast ! Pos
} ;
TFut => table {
Wa => \\st => t.s ++ np.prepositive ! st ++ np.s ! st ++ "は「" ++
qs.s ! Wa ! st ++ "」と" ++ vq.s ! st ! TPres ! Pos ;
Ga => \\st => t.s ++ np.prepositive ! st ++ np.s ! st ++ "が「" ++
qs.s ! Wa ! st ++ "」と" ++ vq.s ! st ! TPres ! Pos
}
}
} ;
te = table {
Wa => \\st => t.s ++ np.prepositive ! st ++ np.s ! st ++ "は「" ++
qs.s ! Wa ! st ++ "」と" ++ vq.te ! Pos ;
Ga => \\st => t.s ++ np.prepositive ! st ++ np.s ! st ++ "が「" ++
qs.s ! Wa ! st ++ "」と" ++ vq.te ! Pos
} ;
ba = table {
Wa => \\st => t.s ++ np.prepositive ! st ++ np.s ! st ++ "は「" ++
qs.s ! Wa ! st ++ "」と" ++ vq.ba ! Pos ;
Ga => \\st => t.s ++ np.prepositive ! st ++ np.s ! st ++ "が「" ++
qs.s ! Wa ! st ++ "」と" ++ vq.ba ! Pos
} ;
subj = table {
Wa => \\st => t.s ++ np.prepositive ! st ++ np.s ! st ++ "は" ;
Ga => \\st => t.s ++ np.prepositive ! st ++ np.s ! st ++ "が"
} ;
pred = case t.a of {
Simul => \\st => "「" ++ qs.s ! Wa ! st ++ "」と" ++ vq.s ! st ! t.t ! Pos ;
Anter => case t.t of {
TPres => \\st => "「" ++ qs.s ! Wa ! st ++ "」と" ++ vq.s ! st ! TPast ! Pos ;
TPast => \\st => "「" ++ qs.s ! Wa ! st ++ "」と" ++ vq.s ! st ! TPast ! Pos ;
TFut => \\st => "「" ++ qs.s ! Wa ! st ++ "」と" ++ vq.s ! st ! TPres ! Pos
}
} ;
pred_te = \\st => "「" ++ qs.s ! Wa ! st ++ "」と" ++ vq.te ! Pos ;
pred_ba = \\st => "「" ++ qs.s ! Wa ! st ++ "」と" ++ vq.ba ! Pos
} ;
{-
FocusObjS, PastPartAgentAP,
ListVPI = E.ListVPI ;
ListVPS = E.ListVPS ;
lin
PassVPSlash = E.PassVPSlash ;
PassAgentVPSlash = E.PassAgentVPSlash ;
---- EmptyRelSlash = E.EmptyRelSlash ;
lin
that_RP = which_RP ;
-- lexical entries
-- another_Quant = mkQuantifier "otro" "otra" "otros" "otras" ;
-- some_Quant = mkQuantifier "algún" "alguna" "algunos" "algunas" ;
-- anySg_Det = mkDeterminer "algún" "alguna" Sg False ; ---- also meaning "whichever" ?
-- each_Det = SyntaxJpn.every_Det ;
-- but_Subj = {s = "pero" ; m = Indic} ; ---- strange to have this as Subj
CompoundN noun cn = {s = noun.s ++ cn.s ; c = cn.c} ; ----
CompoundAP noun adj = complexAP (noun.s ++ possessive_s ++ adj.s) ; ----
---- PastPartAP v = v ; ----
OrdCompar a = {s = \\c => a.s ! AAdj Compar c } ;
PositAdVAdj a = {s = a.s} ;
UseQuantPN q pn = {s = q.s ++ ge_s ++ pn.s} ; ---- ge
SlashV2V v a p vp =
insertObj (ResJpn.mkNP (a.s ++ p.s ++ useVerb vp.verb ! p.p ! APlain ++ vp.compl))
(predV v v.part) ** {c2 = v.c2 ; isPre = v.hasPrep} ; ---- aspect
SlashVPIV2V v p vpi = insertObjc (\\a => p.s ++
v.c3 ++
vpi.s ! VVAux ! a)
(predVc v) ;
---- TODO: find proper expressions for OSV and OVS in Jpn
PredVPosv np vp = G.PredVP np vp ; ---- (lin NP np) (lin VP vp) ; ----
PredVPovs np vp = G.PredVP np vp ; ---- (lin NP np) (lin VP vp) ; ----
CompS s = insertObj s (predV copula []) ; ----
CompQS qs = insertObj (ss (qs.s ! False)) (predV copula []) ; ----
CompVP ant p vp = insertObj (ss (infVP vp)) (predV copula []) ; ----
VPSlashVS vs vp =
insertObj (\\a => infVP VVInf vp Simul CPos a) (predV vs []) **
{c2 = ""; gapInMiddle = False} ;
PastPartRS ant pol vp = { ---- copied from PresPartRS
s = ant.s ++ pol.s ++ vp.prePart ++ useVerb vp.verb ! pol.p ! APlain ++ vp.compl ++ which_RP.s ---- aspect
} ; ---- ??
PresPartRS ant pol vp = { ---- copied from RelVP
s = ant.s ++ pol.s ++ vp.prePart ++ useVerb vp.verb ! pol.p ! APlain ++ vp.compl ++ which_RP.s ---- aspect
} ; ---- ??
ComplVV v a p vp = {
verb = v ;
compl = a.s ++ p.s ++ vp.topic ++ vp.prePart ++ useVerb vp.verb ! p.p ! APlain ++ vp.compl ; ---- aspect
prePart, topic = []
} ;
ApposNP np1 np2 = {
s = np1.s ++ chcomma ++ np2.s
} ;
AdAdV = cc2 ;
UttAdV adv = adv;
-}
}

View File

@@ -1,12 +0,0 @@
--# -path=.:../abstract
concrete ExtensionsRus of Extensions =
CatRus ** open ResRus, (E = ExtraRus), Prelude, SyntaxRus in {
flags
coding = utf8 ;
lincat
VPI = {s:Str} ;
}

View File

@@ -1,154 +0,0 @@
concrete ExtensionsSpa of Extensions =
CatSpa **
open
PhonoSpa, MorphoSpa, ResSpa, CommonRomance, ParadigmsSpa, SyntaxSpa, Prelude, (G = GrammarSpa), (E = ExtraSpa) in {
lincat
VPI = E.VPI ;
---- ListVPI = E.ListVPI ;
VPS = E.VPS ;
---- ListVPS = E.ListVPS ;
lin
MkVPI = E.MkVPI ;
---- ConjVPI = E.ConjVPI ;
---- ComplVPIVV = E.ComplVPIVV ;
MkVPS = E.MkVPS ;
---- ConjVPS = E.ConjVPS ;
PredVPS = E.PredVPS ;
---- BaseVPI = E.BaseVPI ;
---- ConsVPI = E.ConsVPI ;
---- BaseVPS = E.BaseVPS ;
---- ConsVPS = E.ConsVPS ;
---- GenIP = E.GenIP ;
---- GenRP = E.GenRP ;
PassVPSlash = E.PassVPSlash ;
PassAgentVPSlash = E.PassAgentVPSlash ;
lin
GenNP np =
let denp = (np.s ! ResSpa.genitive).ton in {
s = \\_,_,_,_ => [] ;
sp = \\_,_,_ => denp ;
s2 = denp ;
isNeg = False ;
} ;
EmptyRelSlash slash = mkRCl which_RP (lin ClSlash slash) ;
that_RP = which_RP ;
but_Subj = {s = "pero" ; m = Indic} ; ---- strange to have this as Subj
lin
CompoundN noun cn = {
s = \\n => cn.s ! n ++ "de" ++ noun.s ! Sg ;
g = cn.g
} ;
CompoundAP noun adj = {
s = \\af => adj.s ! Posit ! af ++ "de" ++ noun.s ! Sg ;
isPre = False
} ;
GerundNP vp =
let a = agrP3 Masc Sg ---- agr
in
heavyNP {s = \\c => prepCase c ++ infVP vp a ; a = a} ; -- parlare tedesco non è facile
GerundAdv vp =
let a = agrP3 Masc Sg
in
{s = gerVP vp a} ; -- dormendo
WithoutVP vp = SyntaxSpa.mkAdv without_Prep (lin NP (GerundNP (lin VP vp))) ; -- senza dormire
InOrderToVP vp = SyntaxSpa.mkAdv for_Prep (lin NP (GerundNP (lin VP vp))) ; -- per dormire
ByVP vp = GerundAdv (lin VP vp) ;
PresPartAP vp = {
s = table {
AF g n => nominalVP (\_ -> VPresPart) vp (agrP3 g n) ;
_ => nominalVP (\_ -> VPresPart) vp (agrP3 Masc Sg) ---- the adverb form
} ;
isPre = False
} ;
PastPartAP vp = {
s = table {
AF g n => nominalVP (\_ -> VPart g n) vp (agrP3 g n) ;
_ => nominalVP (\_ -> VPart Masc Sg) vp (agrP3 Masc Sg) ---- the adverb form
} ;
isPre = False
} ;
PastPartAgentAP vp np =
let part = PastPartAP (lin VP vp)
in part ** {
s = \\a => part.s ! a ++ (SyntaxSpa.mkAdv (mkPrep "por") (lin NP np)).s
} ;
PositAdVAdj a = {s = a.s ! Posit ! AA} ;
{-
UseQuantPN q pn = {s = \\c => q.s ! False ! Sg ++ pn.s ! npcase2case c ; a = agrgP3 Sg pn.g} ;
SlashV2V v ant p vp = insertObjc (\\a => v.c3 ++ ant.s ++ p.s ++
infVP v.typ vp ant.a p.p a)
(predVc v) ;
SlashVPIV2V v p vpi = insertObjc (\\a => p.s ++
v.c3 ++
vpi.s ! VVAux ! a)
(predVc v) ;
-}
ComplVV v a p vp =
insertComplement (\\a => prepCase v.c2.c ++ infVP vp a) (predV v) ; ---- a,p
---- TODO: find proper expressions for OSV and OVS in Spa
PredVPosv np vp = mkCl (lin NP np) (lin VP vp) ;
PredVPovs np vp = mkCl (lin NP np) (lin VP vp) ;
CompS s = {s = \\_ => "de" ++ "que" ++ s.s ! Indic ; cop = serCopula} ; ---- de ?
{-
CompQS qs = {s = \\_ => qs.s ! QIndir} ;
CompVP ant p vp = {s = \\a => ant.s ++ p.s ++
infVP VVInf vp ant.a p.p a} ;
VPSlashVS vs vp =
insertObj (\\a => infVP VVInf vp Simul CPos a) (predV vs) **
{c2 = ""; gapInMiddle = False} ;
PastPartRS ant pol vps = {
s = \\agr => vps.ad ++ vps.ptp ++ vps.s2 ! agr ;
c = npNom
} ;
PresPartRS ant pol vp = {
s = \\agr => vp.ad ++ vp.prp ++ vp.s2 ! agr ;
c = npNom
} ;
ApposNP np1 np2 = {
s = \\c => np1.s ! c ++ "," ++ np2.s ! npNom ;
a = np1.a
} ;
AdAdV = cc2 ;
UttAdV adv = adv;
-}
}

View File

@@ -1,158 +0,0 @@
--# -path=.:../abstract
concrete ExtensionsSwe of Extensions =
CatSwe ** open MorphoSwe, ResSwe, ParadigmsSwe, (E = ExtraSwe), (G = GrammarSwe), SyntaxSwe, CommonScand, Prelude in {
lincat
VPI = E.VPI ;
ListVPI = E.ListVPI ;
VPS = E.VPS ;
ListVPS = E.ListVPS ;
lin
MkVPI = E.MkVPI ;
ConjVPI = E.ConjVPI ;
ComplVPIVV = E.ComplVPIVV ;
MkVPS = E.MkVPS ;
ConjVPS = E.ConjVPS ;
PredVPS = E.PredVPS ;
BaseVPI = E.BaseVPI ;
ConsVPI = E.ConsVPI ;
BaseVPS = E.BaseVPS ;
ConsVPS = E.ConsVPS ;
GenNP = E.GenNP ;
---- GenIP = E.GenIP ;
---- GenRP = E.GenRP ;
PassVPSlash = E.PassVPSlash ;
PassAgentVPSlash = E.PassAgentVPSlash ;
EmptyRelSlash = E.EmptyRelSlash ;
lin
CompoundN noun cn = {
s = \\n,d,c => noun.co ++ BIND ++ cn.s ! n ! d ! c ;
co = noun.co ++ BIND ++ cn.s ! Sg ! Indef ! Gen -- (last+bil)s + chaufför
| noun.co ++ cn.co ;
g = cn.g
} ;
CompoundAP noun adj = {
s = \\ap => noun.co ++ BIND ++ adj.s ! AF (APosit ap) Nom ;
isPre = True
} ;
GerundNP vp = { -- infinitive: att dricka öl, att vara glad
s = \\_ => "att" ++ infVP vp {g = Utr ; n = Sg ; p = P3} ;
a = {g = Neutr ; n = Sg ; p = P3} ;
isPron = False
} ;
GerundAdv vp = {
s = partVPPlusPost vp (PartPres Sg Indef (Nom|Gen)) {g = Utr ; n = Sg ; p = P3} Pos -- sovande(s) i sängen
} ;
WithoutVP vp = { -- utan att dricka öl, utan att vara glad
s = "utan att" ++ infVP vp {g = Utr ; n = Sg ; p = P3}
} ;
InOrderToVP vp = { -- för att dricka öl, för att vara glad
s = "för att" ++ infVP vp {g = Utr ; n = Sg ; p = P3}
} ;
ByVP vp = { -- genom att dricka öl, genom att vara glad
s = "genom att" ++ infVP vp {g = Utr ; n = Sg ; p = P3}
} ;
PresPartAP vp = {
s = \\af => partVPPlus vp (PartPres Sg Indef Nom) (aformpos2agr af) Pos ;
isPre = True
} ;
PastPartAP vp = {
s = \\af => partVPPlus vp (PartPret af Nom) (aformpos2agr af) Pos ;
isPre = True
} ;
PastPartAgentAP vp np = {
s = \\af => "av" ++ np.s ! accusative ++ partVPPlus vp (PartPret af Nom) (aformpos2agr af) Pos ; ---- agent and other advs before;
isPre = True ---- the right choice in attributive but not predicative position
} ;
---- PastPartAP vp
OrdCompar a = {
s = case a.isComp of {
True => "mera" ++ a.s ! AF (APosit (Weak Sg)) Nom ;
_ => a.s ! AF ACompar Nom
} ;
isDet = True
} ;
PositAdVAdj a = {s = a.s ! AAdv} ;
UseQuantPN q pn = {
s = \\c => q.s ! Sg ! True ! False ! pn.g ++ pn.s ! caseNP c ;
a = agrP3 pn.g Sg ;
isPron = False
} ;
SlashV2V v ant p vp = predV v ** {
n3 = \\a => v.c3.s ++ ant.s ++ p.s ++ infVPPlus vp a ant.a p.p ;
c2 = v.c2
} ;
SlashVPIV2V v p vpi = predV v ** {
n3 = \\a => v.c3.s ++ p.s ++ negation ! p.p ++ vpi.s ! VPIInf ! a ;
c2 = v.c2
} ;
ComplVV v ant pol vp = insertObjPost (\\a => v.c2.s ++ ant.s ++ pol.s ++ infVPPlus vp a ant.a pol.p) (predV v) ;
PredVPosv np vp = mkCl np vp ; ---- TODO restructure all this using Extra.Foc
PredVPovs np vp = mkCl np vp ; ----
that_RP = which_RP ; -- som
who_RP = which_RP ;
CompS s = {s = \\_ => "att" ++ s.s ! Sub} ;
CompQS qs = {s = \\_ => qs.s ! QIndir} ;
CompVP ant p vp = {s = \\a => ant.s ++ p.s ++ infVPPlus vp a ant.a p.p} ;
-- VPSlashVS : VS -> VP -> VPSlash
---VPSlashVS vs vp =
--- insertObj (\\a => infVP VVInf vp Simul CPos a) (predV vs) **
--- {c2 = ""; gapInMiddle = False} ;
PastPartRS ant pol vps = mkRS ant pol (mkRCl which_RP <lin VP vps : VP> ) ; ---- maybe as participle construction?
PresPartRS ant pol vp = mkRS ant pol (mkRCl which_RP vp) ; --- probably not as participle construction
ApposNP np1 np2 = {
s = \\c => np1.s ! c ++ comma ++ np2.s ! NPNom ;
a = np1.a ;
isPron = False
} ;
AdAdV = cc2 ;
UttAdV adv = adv;
DirectComplVS t np vs utt =
mkS (lin Adv (optCommaSS utt)) (mkS t positivePol (mkCl np (lin V vs))) ;
DirectComplVQ t np vs q =
mkS (lin Adv (optCommaSS (mkUtt q))) (mkS t positivePol (mkCl np (lin V vs))) ;
FocusObjS np sslash =
mkS (lin Adv (ss (sslash.c2.s ++ np.s ! NPAcc))) <lin S sslash : S> ;
}

View File

@@ -1,135 +0,0 @@
--# -path=.:../abstract
concrete ExtensionsTha of Extensions =
CatTha ** open ResTha, ParadigmsTha, SyntaxTha, (G = GrammarTha), Prelude in {
lincat
VPI = SS ;
---- ListVPI = E.ListVPI ;
VPS = SS ;
---- ListVPS = E.ListVPS ;
lin
---- MkVPI = E.MkVPI ;
---- ConjVPI = E.ConjVPI ;
---- ComplVPIVV = E.ComplVPIVV ;
MkVPS t p vp = {s = t.s ++ p.s ++ vp.s ! p.p} ; ----
---- ConjVPS = E.ConjVPS ;
PredVPS np vp = thbind np vp ;
{-
BaseVPI = E.BaseVPI ;
ConsVPI = E.ConsVPI ;
BaseVPS = E.BaseVPS ;
ConsVPS = E.ConsVPS ;
GenNP = E.GenNP ;
---- GenIP = E.GenIP ;
GenRP = E.GenRP ;
PassVPSlash = E.PassVPSlash ;
PassAgentVPSlash = E.PassAgentVPSlash ;
---- EmptyRelSlash = E.EmptyRelSlash ;
lin
that_RP = which_RP ;
-- lexical entries
-- another_Quant = mkQuantifier "otro" "otra" "otros" "otras" ;
-- some_Quant = mkQuantifier "algún" "alguna" "algunos" "algunas" ;
-- anySg_Det = mkDeterminer "algún" "alguna" Sg False ; ---- also meaning "whichever" ?
-- each_Det = SyntaxTha.every_Det ;
-- but_Subj = {s = "pero" ; m = Indic} ; ---- strange to have this as Subj
CompoundN noun cn = {s = noun.s ++ cn.s ; c = cn.c} ; ----
CompoundAP noun adj = complexAP (noun.s ++ possessive_s ++ adj.s) ; ----
GerundN v = {
s = v.s ;
c = ge_s ---- ge
} ;
GerundNP vp = {
s = infVP vp ; ---- ?
} ;
GerundAdv vp = {
s = infVP vp ++ "地" ; ---- ?
advType = ATManner ;
} ;
PastPartAP v = {
s = v.verb.s ++ de_s ; ----
monoSyl = False ;
hasAdA = True ; ---
} ;
---- PastPartAP v = v ; ----
-- {-
OrdCompar a = {s = \\c => a.s ! AAdj Compar c } ;
-- - }
PositAdVAdj a = {s = a.s} ;
UseQuantPN q pn = {s = q.s ++ ge_s ++ pn.s} ; ---- ge
SlashV2V v a p vp =
insertObj (ResTha.mkNP (a.s ++ p.s ++ useVerb vp.verb ! p.p ! APlain ++ vp.compl))
(predV v v.part) ** {c2 = v.c2 ; isPre = v.hasPrep} ; ---- aspect
-- {-
SlashVPIV2V v p vpi = insertObjc (\\a => p.s ++
v.c3 ++
vpi.s ! VVAux ! a)
(predVc v) ;
-- - }
---- TODO: find proper expressions for OSV and OVS in Tha
PredVPosv np vp = G.PredVP np vp ; ---- (lin NP np) (lin VP vp) ; ----
PredVPovs np vp = G.PredVP np vp ; ---- (lin NP np) (lin VP vp) ; ----
CompS s = insertObj s (predV copula []) ; ----
CompQS qs = insertObj (ss (qs.s ! False)) (predV copula []) ; ----
CompVP ant p vp = insertObj (ss (infVP vp)) (predV copula []) ; ----
-- {-
VPSlashVS vs vp =
insertObj (\\a => infVP VVInf vp Simul CPos a) (predV vs []) **
{c2 = ""; gapInMiddle = False} ;
-- - }
PastPartRS ant pol vp = { ---- copied from PresPartRS
s = ant.s ++ pol.s ++ vp.prePart ++ useVerb vp.verb ! pol.p ! APlain ++ vp.compl ++ which_RP.s ---- aspect
} ; ---- ??
PresPartRS ant pol vp = { ---- copied from RelVP
s = ant.s ++ pol.s ++ vp.prePart ++ useVerb vp.verb ! pol.p ! APlain ++ vp.compl ++ which_RP.s ---- aspect
} ; ---- ??
ComplVV v a p vp = {
verb = v ;
compl = a.s ++ p.s ++ vp.topic ++ vp.prePart ++ useVerb vp.verb ! p.p ! APlain ++ vp.compl ; ---- aspect
prePart, topic = []
} ;
ApposNP np1 np2 = {
s = np1.s ++ chcomma ++ np2.s
} ;
AdAdV = cc2 ;
UttAdV adv = adv;
-}
}

View File

@@ -1,154 +0,0 @@
--# -path=.:../abstract
concrete ExtensionsUrd of Extensions =
CatUrd ** open MorphoUrd, ResUrd, ParadigmsUrd, CommonHindustani, (E = ExtraUrd), Prelude in {
flags coding = utf8 ;
lincat
---- VPI = E.VPI ;
---- ListVPI = E.ListVPI ;
VPS = E.VPS ;
ListVPS = E.ListVPS ;
lin
---- MkVPI = E.MkVPI ;
---- ConjVPI = E.ConjVPI ;
---- ComplVPIVV = E.ComplVPIVV ;
MkVPS = E.MkVPS ;
ConjVPS = E.ConjVPS ;
PredVPS = E.PredVPS ;
---- BaseVPI = E.BaseVPI ;
---- ConsVPI = E.ConsVPI ;
BaseVPS = E.BaseVPS ;
ConsVPS = E.ConsVPS ;
GenNP = E.GenNP ;
---- GenIP = E.GenIP ;
---- GenRP = E.GenRP ;
---- PassVPSlash = E.PassVPSlash ;
---- PassAgentVPSlash = E.PassAgentVPSlash ;
---- EmptyRelSlash = E.EmptyRelSlash ;
lin
CompoundN noun cn = {
s = \\n,c => cn.s ! Sg ! Dir ++ noun.s ! n ! c;
g = cn.g
} ;
GerundN v = {
s = \\n,c => v.cvp ++ v.s ! Inf ; -- v.s ! VF Imperf Pers2_Casual n Masc ++ hwa (Ag Masc n Pers2_Casual) ; --the main verb of compound verbs
g = Masc
} ;
GerundAP v = {
s = \\n,g,_,_ => v.cvp ++ v.s ! VF Imperf Pers2_Casual n g ++ hwa (Ag g n Pers2_Casual) ;
} ;
---- PastPartAP v = {
---- s = \\n,g,_,_ => v.cvp ++ v.s ! VF Imperf Pers2_Casual n g ; -- the main verb of compound versb needs to be attached here
---- } ;
OrdCompar a = {s = a.s ! Sg ! Masc ! Dir ! Compar ; n = Sg } ;
PositAdVAdj a = {s = a.s ! Sg ! Masc ! Dir ! Posit} ;
---------------
--SlashV2V v p vp = insertVV (infV2V v.isAux vp) (predV v) vp.embComp ** {c2 = {s = sE ; c = VTrans}}; -- changed from VTransPost
ComplVV v a p vp = insertTrans (insertVV (infVV v.isAux vp) (predV v) vp.embComp ) VTrans; -- changed from VTransPost
---------------
UseQuantPN q pn = {s = \\c => q.s ! Sg ! pn.g ! Dir ++ pn.s ! Dir ; a = agrP3 pn.g Sg} ;
PredVPosv np vp = mkClause np vp ; --{
{- s = \\t,a,b,o =>
let
verb = vp.s ! t ! a ! b ! o ! np.a ;
compl = vp.s2 ! np.a
in
case o of {
ODir => compl ++ "," ++ np.s ! npNom ++ verb.aux ++ vp.ad ++ verb.fin ++ verb.adv ++ verb.inf ;
OQuest => verb.aux ++ compl ++ "," ++ np.s ! npNom ++ verb.adv ++ vp.ad ++ verb.fin ++ verb.inf
}
} ;
-}
PredVPovs np vp = mkClause np vp ; --{
{- s = \\t,a,b,o =>
let
verb = vp.s ! t ! a ! b ! o ! np.a ;
compl = vp.s2 ! np.a
in
case o of {
ODir => compl ++ verb.aux ++ verb.adv ++ vp.ad ++ verb.fin ++ verb.inf ++ np.s ! npNom ;
OQuest => verb.aux ++ compl ++ verb.adv ++ vp.ad ++ verb.fin ++ verb.inf ++ np.s ! npNom
}
} ;
-}
{-
SlashV2V v p vp = insertObjc (\\a => p.s ++ case p.p of {CPos => ""; _ => "not"} ++
v.c3 ++
infVP v.typ vp a)
(predVc v) ;
ComplPredVP np vp = {
s = \\t,a,b,o =>
let
verb = vp.s ! t ! a ! b ! o ! np.a ;
compl = vp.s2 ! np.a
in
case o of {
ODir => compl ++ "," ++ np.s ! npNom ++ verb.aux ++ verb.adv ++ vp.ad ++ verb.fin ++ verb.inf ;
OQuest => verb.aux ++ compl ++ "," ++ np.s ! npNom ++ verb.adv ++ vp.ad ++ verb.fin ++ verb.inf
}
} ;
-}
CompVP ant p vp = {s = \\a => ant.s ++ p.s ++
infVP False vp a} ; -- check for vp.isAux
that_RP = {
s = \\_,_ => "कि" ;
a = RNoAg
} ;
--no_RP = {
-- s = \\_,_ => "" ;
-- a = RNoAg
-- } ;
CompS s = {s = \\_ => "कि" ++ s.s} ;
-- CompVP vp = {s = \\a => infVP VVInf vp a} ;
lin
PPos = {s = [] ; p = Pos} ;
PNeg = {s = [] ; p = Neg} ; -- contracted: don't
UncNeg = {s = [] ; p = Neg} ;
VPSlashPrep vp p = vp ** {c2 = {s = p.s!Masc ; c = VTrans}} ;
PastPartRS ant pol vps = {
s = \\agr => (vps.s!VPTense VPPast agr).inf ;
c = Dir
} ;
PresPartRS ant pol vp = {
s = \\agr => (vp.s!VPTense VPPres agr).inf ;
c = Dir
} ;
ApposNP np1 np2 = {
s = \\c => np1.s!NPC Dir ++ "," ++ np2.s ! c ;
a = np2.a
} ;
AdAdV = cc2 ;
UttAdV adv = adv;
}

View File

@@ -1,488 +0,0 @@
concrete FromCoreRgl of Dictionary = CatEng ** -- change Eng to your language
open
(S = StructuralEng), (L = LexiconEng), ParadigmsEng -- the standard imports in Dictionary
in {
-- AR 11/11/2015
-- to bootstrap Dictionary from Structural and Lexicon
-- some functions renamed, split senses expanded with comment
lin above_Prep = S.above_Prep ;
lin after_Prep = S.after_Prep ;
lin all_Predet = S.all_Predet ;
lin almost_AdA = S.almost_AdA ;
lin almost_AdN = S.almost_AdN ;
lin although_Subj = S.although_Subj ;
lin always_AdV = S.always_AdV ;
lin and_Conj = S.and_Conj ;
--lin as_CAdv = S.as_CAdv ;
lin at_least_AdN = S.at_least_AdN ;
--lin at_most_AdN = S.at_most_AdN ;
lin because_Subj = S.because_Subj ;
lin before_Prep = S.before_Prep ;
lin behind_Prep = S.behind_Prep ;
lin between_Prep = S.between_Prep ;
lin both7and_DConj = S.both7and_DConj ;
lin but_PConj = S.but_PConj ;
--lin by8agent_Prep = S.by8agent_Prep ;
--lin by8means_Prep = S.by8means_Prep ;
lin by_Prep = S.by8means_Prep ; ---- split?
lin can_2_VV = S.can8know_VV ;
lin can_1_VV = S.can_VV ;
lin during_Prep = S.during_Prep ;
lin either7or_DConj = S.either7or_DConj ;
lin every_Det = S.every_Det ;
lin everybody_NP = S.everybody_NP ;
lin everything_NP = S.everything_NP ;
lin everywhere_Adv = S.everywhere_Adv ;
lin except_Prep = S.except_Prep ;
lin few_Det = S.few_Det ;
lin for_Prep = S.for_Prep ;
lin from_Prep = S.from_Prep ;
lin have_V2 = S.have_V2 ;
lin he_Pron = S.he_Pron ;
--lin here7from_Adv = S.here7from_Adv ;
--lin here7to_Adv = S.here7to_Adv ;
lin here_Adv = S.here_Adv ;
lin how8many_IDet = S.how8many_IDet ;
--lin how8much_IAdv = S.how8much_IAdv ;
lin how_IAdv = S.how_IAdv ;
lin i_Pron = S.i_Pron ;
lin iFem_Pron = S.i_Pron ; ---- to check
lin if_Subj = S.if_Subj ;
--lin if_then_Conj = S.if_then_Conj ; -- not to be kept in Dictionary
lin in_front_of_Prep = S.in8front_Prep ;
lin in_Prep = S.in_Prep ;
lin it_Pron = S.it_Pron ;
--lin language_title_Utt = S.language_title_Utt ; -- not to be kept in Dictionary
lin less_Adv = S.less_CAdv ; ---- to check
lin many_Det = S.many_Det ;
lin more_Adv = S.more_CAdv ; ---- to check
--lin most_Predet = S.most_Predet ; -- most_Det in Dictionary
lin much_Det = S.much_Det ;
lin must_VV = S.must_VV ;
lin no_Quant = S.no_Quant ;
--lin no_Utt = S.no_Utt ;
lin nobody_NP = S.nobody_NP ;
--lin not_Predet = S.not_Predet ;
lin nothing_NP = S.nothing_NP ;
lin on_Prep = S.on_Prep ;
lin only_Predet = S.only_Predet ;
lin or_Conj = S.or_Conj ;
lin otherwise_Adv = S.otherwise_PConj ; ---- to check
--lin part_Prep = S.part_Prep ;
lin please_Adv = lin Adv S.please_Voc ; ---- to check
lin of_Prep = S.possess_Prep ;
lin quite_Adv = S.quite_Adv ;
lin she_Pron = S.she_Pron ;
lin so_AdA = S.so_AdA ;
--lin somePl_Det = S.somePl_Det ; ---- some_Quant is in Dictionary
lin some_Det = S.someSg_Det ; ---- to check
lin somebody_NP = S.somebody_NP ;
lin something_NP = S.something_NP ;
lin somewhere_Adv = S.somewhere_Adv ;
lin that_Quant = S.that_Quant ;
lin that_Subj = S.that_Subj ;
--lin there7from_Adv = S.there7from_Adv ;
--lin there7to_Adv = S.there7to_Adv ;
lin there_Adv = S.there_Adv ;
lin therefore_Adv = lin Adv S.therefore_PConj ; ---- to check
lin they_Pron = S.they_Pron ;
lin theyFem_Pron = S.they_Pron ; ---- to check
lin this_Quant = S.this_Quant ;
lin through_Prep = S.through_Prep ;
lin to_Prep = S.to_Prep ;
lin too_AdA = S.too_AdA ;
lin under_Prep = S.under_Prep ;
lin very_AdA = S.very_AdA ;
lin want_VV = S.want_VV ;
lin we_Pron = S.we_Pron ;
lin weFem_Pron = S.we_Pron ; ---- to check
lin whatPl_IP = S.whatPl_IP ;
lin whatSg_IP = S.whatSg_IP ;
lin when_IAdv = S.when_IAdv ;
lin when_Subj = S.when_Subj ;
lin where_IAdv = S.where_IAdv ;
lin which_IQuant = S.which_IQuant ;
lin whoPl_IP = S.whoPl_IP ;
lin whoSg_IP = S.whoSg_IP ;
lin why_IAdv = S.why_IAdv ;
lin with_Prep = S.with_Prep ;
lin without_Prep = S.without_Prep ;
lin yes_Interj = lin Interj S.yes_Utt ;
lin youPl_Pron = S.youPl_Pron ;
lin youPlFem_Pron = S.youPl_Pron ; ---- to check
lin youPol_Pron = S.youPol_Pron ;
lin youPolFem_Pron = S.youPol_Pron ; ---- to check
lin youSg_Pron = S.youSg_Pron ;
lin youSgFem_Pron = S.youSg_Pron ; ---- to check
--lin add_V3 = L.add_V3 ;
lin add_V2 = lin V2 L.add_V3 ; ---- to check
lin airplane_N = L.airplane_N ;
lin alas_Interj = L.alas_Interj ;
lin already_Adv = L.already_Adv ;
lin animal_N = L.animal_N ;
--lin answer_V2S = L.answer_V2S ;
lin answer_V = lin V L.answer_V2S ;
lin answer_V2 = lin V2 L.answer_V2S ;
lin apartment_N = L.apartment_N ;
lin apple_N = L.apple_N ;
lin art_N = L.art_N ;
lin ash_N = L.ashes_N ; ---- to check
--lin ask_V2Q = L.ask_V2Q ;
lin ask_VQ = lin VQ L.ask_V2Q ;
lin ask_V2 = lin V2 L.ask_V2Q ;
lin baby_N = L.baby_N ;
lin back_N = L.back_N ;
lin bad_A = L.bad_A ;
lin bank_N = L.bank_N ;
lin bark_N = L.bark_N ;
lin beautiful_A = L.beautiful_A ;
lin become_VA = L.become_VA ;
lin beer_N = L.beer_N ;
--lin beg_V2V = L.beg_V2V ;
lin beg_V2 = lin V2 L.beg_V2V ; ---- to check
lin belly_N = L.belly_N ;
lin big_A = L.big_A ;
lin bike_N = L.bike_N ;
lin bird_N = L.bird_N ;
lin bite_V2 = L.bite_V2 ;
lin black_A = L.black_A ;
lin blood_N = L.blood_N ;
lin blow_V = L.blow_V ;
lin blue_A = L.blue_A ;
lin boat_N = L.boat_N ;
lin bone_N = L.bone_N ;
lin book_N = L.book_N ;
lin boot_N = L.boot_N ;
lin boss_N = L.boss_N ;
lin boy_N = L.boy_N ;
lin bread_N = L.bread_N ;
lin break_V2 = L.break_V2 ;
lin breast_N = L.breast_N ;
lin breathe_V = L.breathe_V ;
lin broad_A = L.broad_A ;
--lin brother_N2 = L.brother_N2 ;
lin brother_N = lin N L.brother_N2 ;
lin brown_A = L.brown_A ;
lin burn_V = L.burn_V ;
lin butter_N = L.butter_N ;
lin buy_V2 = L.buy_V2 ;
lin camera_N = L.camera_N ;
lin cap_N = L.cap_N ;
lin car_N = L.car_N ;
lin carpet_N = L.carpet_N ;
lin cat_N = L.cat_N ;
lin ceiling_N = L.ceiling_N ;
lin chair_N = L.chair_N ;
lin cheese_N = L.cheese_N ;
lin child_N = L.child_N ;
lin church_N = L.church_N ;
lin city_N = L.city_N ;
lin clean_A = L.clean_A ;
lin clever_A = L.clever_A ;
lin close_V2 = L.close_V2 ;
lin cloud_N = L.cloud_N ;
lin coat_N = L.coat_N ;
lin cold_A = L.cold_A ;
lin come_V = L.come_V ;
lin computer_N = L.computer_N ;
lin correct_A = L.correct_A ;
lin count_V2 = L.count_V2 ;
lin country_N = L.country_N ;
lin cousin_N = L.cousin_N ;
lin cow_N = L.cow_N ;
lin cut_V2 = L.cut_V2 ;
lin day_N = L.day_N ;
lin die_V = L.die_V ;
lin dig_V = L.dig_V ;
lin dirty_A = L.dirty_A ;
--lin distance_N3 = L.distance_N3 ;
lin distance_N = lin N L.distance_N3 ;
lin do_V2 = L.do_V2 ;
lin doctor_N = L.doctor_N ;
lin dog_N = L.dog_N ;
lin door_N = L.door_N ;
lin drink_V2 = L.drink_V2 ;
lin dry_A = L.dry_A ;
lin dull_A = L.dull_A ;
lin dust_N = L.dust_N ;
lin ear_N = L.ear_N ;
lin earth_N = L.earth_N ;
--lin easy_A2V = L.easy_A2V ;
lin eat_V2 = L.eat_V2 ;
lin egg_N = L.egg_N ;
lin empty_A = L.empty_A ;
lin enemy_N = L.enemy_N ;
lin eye_N = L.eye_N ;
lin factory_N = L.factory_N ;
lin fall_V = L.fall_V ;
--lin far_Adv = L.far_Adv ;
lin fat_N = L.fat_N ;
--lin father_N2 = L.father_N2 ;
lin father_N = lin N L.father_N2 ;
lin fear_V2 = L.fear_V2 ;
lin fear_VS = L.fear_VS ;
lin feather_N = L.feather_N ;
lin fight_V2 = L.fight_V2 ;
lin find_V2 = L.find_V2 ;
lin fingernail_N = L.fingernail_N ;
--lin fire_N = L.fire_N ;
lin fish_N = L.fish_N ;
lin float_V = L.float_V ;
lin floor_N = L.floor_N ;
lin flow_V = L.flow_V ;
lin flower_N = L.flower_N ;
lin fly_V = L.fly_V ;
lin fog_N = L.fog_N ;
lin foot_N = L.foot_N ;
lin forest_N = L.forest_N ;
lin forget_V2 = L.forget_V2 ;
lin freeze_V = L.freeze_V ;
lin fridge_N = L.fridge_N ;
lin friend_N = L.friend_N ;
lin fruit_N = L.fruit_N ;
lin full_A = L.full_A ;
lin fun_A = L.fun_AV ;
lin garden_N = L.garden_N ;
lin girl_N = L.girl_N ;
lin give_V3 = L.give_V3 ;
lin glove_N = L.glove_N ;
lin go_V = L.go_V ;
lin gold_N = L.gold_N ;
lin good_A = L.good_A ;
lin grammar_N = L.grammar_N ;
lin grass_N = L.grass_N ;
lin green_A = L.green_A ;
--lin guts_N = L.guts_N ;
lin gut_N = L.guts_N ; ---- to check
lin hair_N = L.hair_N ;
lin hand_N = L.hand_N ;
lin harbour_N = L.harbour_N ;
lin hat_N = L.hat_N ;
lin hate_V2 = L.hate_V2 ;
lin head_N = L.head_N ;
lin hear_V2 = L.hear_V2 ;
lin heart_N = L.heart_N ;
lin heavy_A = L.heavy_A ;
lin hill_N = L.hill_N ;
lin hit_V2 = L.hit_V2 ;
lin hold_V2 = L.hold_V2 ;
lin hope_VS = L.hope_VS ;
lin horn_N = L.horn_N ;
lin horse_N = L.horse_N ;
lin hot_A = L.hot_A ;
lin house_N = L.house_N ;
lin hunt_V2 = L.hunt_V2 ;
lin husband_N = L.husband_N ;
lin ice_N = L.ice_N ;
lin important_A = L.important_A ;
lin industry_N = L.industry_N ;
lin iron_N = L.iron_N ;
lin john_PN = L.john_PN ;
lin jump_V = L.jump_V ;
lin kill_V2 = L.kill_V2 ;
lin king_N = L.king_N ;
lin knee_N = L.knee_N ;
lin know_V2 = L.know_V2 ;
lin know_VQ = L.know_VQ ;
lin know_VS = L.know_VS ;
lin lake_N = L.lake_N ;
lin lamp_N = L.lamp_N ;
lin language_N = L.language_N ;
lin laugh_V = L.laugh_V ;
lin leaf_N = L.leaf_N ;
lin learn_V2 = L.learn_V2 ;
lin leather_N = L.leather_N ;
lin leave_V2 = L.leave_V2 ;
--lin left_Ord = L.left_Ord ; ---- left_A in Dictionary
lin leg_N = L.leg_N ;
--lin lie_V = L.lie_V ;
lin lie_1_V = L.lie_V ; ---- to check, but "lying on the ground" is the original Swadesh meaning
lin like_V2 = L.like_V2 ;
--lin listen_V2 = L.listen_V2 ;
lin listen_V = lin V L.listen_V2 ;
lin live_V = L.live_V ;
lin liver_N = L.liver_N ;
lin long_A = L.long_A ;
lin lose_V2 = L.lose_V2 ;
lin louse_N = L.louse_N ;
lin love_N = L.love_N ;
lin love_V2 = L.love_V2 ;
lin man_N = L.man_N ;
--lin married_A2 = L.married_A2 ;
lin married_A = lin A L.married_A2 ; ---- to check
lin meat_N = L.meat_N ;
lin milk_N = L.milk_N ;
lin moon_N = L.moon_N ;
--lin mother_N2 = L.mother_N2 ;
lin mother_N = lin N L.mother_N2 ;
lin mountain_N = L.mountain_N ;
lin mouth_N = L.mouth_N ;
lin music_N = L.music_N ;
lin name_N = L.name_N ;
lin narrow_A = L.narrow_A ;
lin near_A = L.near_A ;
lin neck_N = L.neck_N ;
lin new_A = L.new_A ;
lin newspaper_N = L.newspaper_N ;
lin night_N = L.night_N ;
lin nose_N = L.nose_N ;
lin now_Adv = L.now_Adv ;
lin number_1_N = L.number_N ; ---- to check: sense "every number has a unique..."
lin oil_N = L.oil_N ;
lin old_A = L.old_A ;
lin open_V2 = L.open_V2 ;
--lin paint_V2A = L.paint_V2A ;
lin paint_V2 = lin V2 L.paint_V2A ;
lin paper_N = L.paper_N ;
lin paris_1_PN = L.paris_PN ; ---- the capital of France
lin peace_N = L.peace_N ;
lin pen_N = L.pen_N ;
lin person_N = L.person_N ;
lin planet_N = L.planet_N ;
lin plastic_N = L.plastic_N ;
lin play_1_V = L.play_V ; ---- to check: play in a team
lin play_1_V2 = L.play_V2 ; ---- to check: play football
lin policeman_N = L.policeman_N ;
lin priest_N = L.priest_N ;
lin probable_A = L.probable_AS ;
lin pull_V2 = L.pull_V2 ;
lin push_V2 = L.push_V2 ;
lin put_V2 = L.put_V2 ;
lin queen_N = L.queen_N ;
lin question_N = L.question_N ;
lin radio_N = L.radio_N ;
lin rain_N = L.rain_N ;
lin rain_V = L.rain_V0 ;
lin read_V2 = L.read_V2 ;
lin ready_A = L.ready_A ;
lin reason_N = L.reason_N ;
lin red_A = L.red_A ;
lin religion_N = L.religion_N ;
lin restaurant_N = L.restaurant_N ;
--lin right_Ord = L.right_Ord ; ---- right_2_A in Dictionary
lin river_N = L.river_N ;
lin road_N = L.road_N ;
lin rock_N = L.rock_N ;
lin roof_N = L.roof_N ;
lin root_N = L.root_N ;
lin rope_N = L.rope_N ;
lin rotten_A = L.rotten_A ;
lin round_A = L.round_A ;
lin rub_V2 = L.rub_V2 ;
lin rubber_N = L.rubber_N ;
lin rule_N = L.rule_N ;
lin run_V = L.run_V ;
lin salt_N = L.salt_N ;
lin sand_N = L.sand_N ;
lin say_VS = L.say_VS ;
lin school_N = L.school_N ;
lin science_N = L.science_N ;
lin scratch_V2 = L.scratch_V2 ;
lin sea_N = L.sea_N ;
lin see_V2 = L.see_V2 ;
lin seed_N = L.seed_N ;
lin seek_V2 = L.seek_V2 ;
--lin sell_V3 = L.sell_V3 ;
lin sell_V2 = lin V2 L.sell_V3 ;
--lin send_V3 = L.send_V3 ;
lin send_V2 = lin V2 L.send_V3 ;
lin sew_V = L.sew_V ;
lin sharp_A = L.sharp_A ;
lin sheep_N = L.sheep_N ;
lin ship_N = L.ship_N ;
lin shirt_N = L.shirt_N ;
lin shoe_N = L.shoe_N ;
lin shop_N = L.shop_N ;
lin short_A = L.short_A ;
lin silver_N = L.silver_N ;
lin sing_V = L.sing_V ;
lin sister_N = L.sister_N ;
lin sit_V = L.sit_V ;
lin skin_N = L.skin_N ;
lin sky_N = L.sky_N ;
lin sleep_V = L.sleep_V ;
lin small_A = L.small_A ;
lin smell_V = L.smell_V ;
lin smoke_N = L.smoke_N ;
lin smooth_A = L.smooth_A ;
lin snake_N = L.snake_N ;
lin snow_N = L.snow_N ;
lin sock_N = L.sock_N ;
lin song_N = L.song_N ;
lin speak_V2 = L.speak_V2 ;
lin spit_V = L.spit_V ;
lin split_V2 = L.split_V2 ;
lin squeeze_V2 = L.squeeze_V2 ;
lin stab_V2 = L.stab_V2 ;
lin stand_V = L.stand_V ;
lin star_N = L.star_N ;
lin steel_N = L.steel_N ;
lin stick_N = L.stick_N ;
lin stone_N = L.stone_N ;
lin stop_V = L.stop_V ;
lin stove_N = L.stove_N ;
lin straight_A = L.straight_A ;
--lin student_N = L.student_N ;
lin stupid_A = L.stupid_A ;
lin suck_V2 = L.suck_V2 ;
lin sun_N = L.sun_N ;
lin swell_V = L.swell_V ;
lin swim_V = L.swim_V ;
lin switch_off_V2 = L.switch8off_V2 ;
lin switch_on_V2 = L.switch8on_V2 ;
lin table_N = L.table_N ;
lin tail_N = L.tail_N ;
--lin talk_V3 = L.talk_V3 ;
lin talk_V2 = lin V2 L.talk_V3 ; ---- to check: there are two V2 projections of talk_V3
lin teach_V2 = L.teach_V2 ;
--lin teacher_N = L.teacher_N ;
lin teacherFem_N = L.teacher_N ; ---- to check
lin teacherMasc_N = L.teacher_N ; ---- to check
lin television_N = L.television_N ;
lin thick_A = L.thick_A ;
lin thin_A = L.thin_A ;
lin think_V = L.think_V ;
lin throw_V2 = L.throw_V2 ;
lin tie_V2 = L.tie_V2 ;
lin today_Adv = L.today_Adv ;
lin tongue_N = L.tongue_N ;
lin tooth_N = L.tooth_N ;
lin train_N = L.train_N ;
lin travel_V = L.travel_V ;
lin tree_N = L.tree_N ;
lin turn_V = L.turn_V ;
lin ugly_A = L.ugly_A ;
lin uncertain_A = L.uncertain_A ;
lin understand_V2 = L.understand_V2 ;
lin university_N = L.university_N ;
lin village_N = L.village_N ;
lin vomit_V = L.vomit_V ;
lin wait_V2 = L.wait_V2 ;
lin walk_V = L.walk_V ;
lin war_N = L.war_N ;
lin warm_A = L.warm_A ;
lin wash_V2 = L.wash_V2 ;
lin watch_1_V2 = L.watch_V2 ; ---- to check: sense "watch the TV"
lin water_N = L.water_N ;
lin wet_A = L.wet_A ;
lin white_A = L.white_A ;
lin wide_A = L.wide_A ;
lin wife_N = L.wife_N ;
lin win_V2 = L.win_V2 ;
lin wind_N = L.wind_N ;
lin window_N = L.window_N ;
lin wine_N = L.wine_N ;
lin wing_N = L.wing_N ;
lin wipe_V2 = L.wipe_V2 ;
lin woman_N = L.woman_N ;
lin wonder_VQ = L.wonder_VQ ;
lin wood_N = L.wood_N ;
lin worm_N = L.worm_N ;
lin write_V2 = L.write_V2 ;
lin year_N = L.year_N ;
lin yellow_A = L.yellow_A ;
lin young_A = L.young_A ;
}

View File

@@ -1,113 +0,0 @@
{-
Merge two concrete syntaxes that have lin rules of the form
lin f = t1 | ... | tn ; -- comment
one per line. The concrete syntaxes are marked "old" and "new", where "old" is more trusted. Merging
lin f = t1 | ... | tm ; -- comment1
lin f = u1 | ... | un ; -- comment2
results in
lin f = t1 | ... | tm | {- SEP -} u1' | ... | un' ; -- comment 1 -- comment2
where u1'... are without duplicates. The comment SEP is given as an argument.
If either grammar is missing the rule for f, then only the other grammar is used.
Comments can be added at the merging phase.
Other lines than 'lin' rules are taken from "old". The rules in the resulting grammar are sorted alphabetically.
The Preference argument is set POldOnly if you do not want to add new rules to already existing old ones:
lin f = t1 | ... | tm ; -- comment1
lin f = u1 | ... | un ; -- comment2
where m > 0, results in
lin f = t1 | ... | tm ; -- comment1
Usage:
mergeDict <OldFile> <NewFile> (POld|PNew|PMerge) (Maybe separator) <TargetFile>
Example:
mergeDict "DictionaryChi.gf" "../chinese/hsk/csv/hsku.gf" True (Just "HSK") "tmp/DictionaryChi.gf"
-}
import Data.List
data Preference = PNew | POld | PMerge deriving Eq
mergeDict :: FilePath -> FilePath -> Preference -> Maybe String -> FilePath -> IO ()
mergeDict old new pref comm file = do
olds1 <- readFile old >>= return . lines
news1 <- readFile new >>= return . lines
let (preamble,olds2) = break ((== ["lin"]) . take 1 . words) olds1
let lastopers = [l | l@('o':'p':'e':'r':_) <- olds2]
let olds = [mkRule 0 (w:ws) | w:ws <- map words olds2, w == "lin"]
let news = [mkRule 1 (w:ws) | w:ws <- map words news1, w == "lin"]
let lins = sort $ olds ++ news
let linss = groupBy (\x y -> (fun x) == (fun y)) lins
let lins2 = map (mergeRule pref comm) linss
writeFile file $ unlines preamble
appendFile file $ unlines $ map prRule lins2
appendFile file $ unlines $ lastopers
appendFile file "}"
data Rule = R {fun :: String, priority :: Int, lins :: [[String]], comment :: [String]} -- fun, variants, comment
deriving (Eq,Ord,Show)
mkRule :: Int -> [String] -> Rule
mkRule i ws = case ws of
"lin":f:"=":ww -> rule f i (getLin ww)
_ -> error $ "not a valid rule: " ++ unwords ws
where
rule f i (l,c) = R f i l c
getLin ws = case break isComment ws of
(ls,cc) -> (getVariants (initSC ls), cc)
getVariants ws = case break (=="|") ws of
(e,vs) | isEmpty e -> getVariants vs
(v,_:vs) -> v : getVariants vs
([],_) -> []
(v,_) -> [v]
isEmpty v = elem v [["variants{}"],["variants","{}"],["variants{};"],["variants","{};"]]
isComment = (=="--") . take 2
initSC :: [String] -> [String]
initSC ss =
let lss = last ss in
case lss of
";" -> init ss
_ -> if last lss == ';' then init ss ++ [init lss] else ss
mergeRule :: Preference -> Maybe String -> [Rule] -> Rule
mergeRule pref mco rs = case rs of
[r] -> r
[old,new]
| pref == POld && not (null (lins old)) -> old -- old has something: just keep it
| pref == PNew && not (null (lins new)) -> new -- new has something: just take it
| null (lins old) && null (lins new) -> old -- both are empty: just keep old
| null (lins old) -> new -- old is empty: just keep new
| otherwise -> case filter (flip notElem (lins old)) (lins new) of
l:ls -> case mco of
Just co -> R (fun old) 0 (lins old ++ (("{-"++co++"-}"):l):ls) (comment new ++ comment old)
_ -> R (fun old) 0 (lins old ++ l:ls) (comment new ++ comment old)
_ -> old
_ -> error $ "cannot handle more than two rule sources: " ++ show rs
prRule :: Rule -> String
prRule ru = unwords $ "lin" : fun ru : "=" : variants ru ++ [";"] ++ comment ru
variants :: Rule -> [String]
variants ru = case lins ru of
[] -> ["variants","{}"]
ls -> intersperse "|" (map unwords (filter (not . null) ls))

View File

@@ -1,7 +0,0 @@
abstract MyTranslator = Translate -- - [gfsg]
** {
fun google_V2 : V2 ;
}

View File

@@ -1,9 +0,0 @@
--# -path=.:../chunk:alltenses
concrete MyTranslatorSwe of MyTranslator = TranslateSwe -- - [gfsg]
** open ParadigmsSwe in {
lin google_V2 = mkV2 (mkV "googla") (mkPrep "efter") ;
}

File diff suppressed because one or more lines are too long

View File

@@ -1,64 +0,0 @@
-- if a sense is split in the abstract syntax, create baseline implementations by copying the old lin rules
--
-- usage: writeSplitsFile "Dictionary.gf" "DictionarySwe.gf"
--
-- then open MergeDict.hs and do: mergeDict "DictionarySwe.gf" "tmp/splitDictionarySwe.gf" POld Nothing "tmp/DictionarySwe.gf"
--
-- AR 8 June 2015
import Data.Char
import qualified Data.Map as M
import qualified Data.Set as S
type Fun = String
type Cat = String
type Sense = String
type Rule = String
analyseFun :: Fun -> (Fun, Maybe Sense, Cat)
analyseFun = split . reverse where
split nuf = case break (=='_') nuf of
(tac, '_':'c':'s':'a':'M':w) -> (reverse w, Just "Masc", reverse tac)
(tac, '_':'m':'e':'F' :w) -> (reverse w, Just "Fem", reverse tac)
(tac, '_':d:'_' :w) | isDigit d -> (reverse w, Just [d], reverse tac)
(tac, '_':w) -> (reverse w, Nothing, reverse tac)
_ -> (reverse nuf, Nothing, "") ---- should not happen
mkFun :: (Fun, Maybe Sense, Cat) -> Fun
mkFun (f,ms,c) = f ++ s ++ "_" ++ c where
s = case ms of
Just g | elem s ["Masc","Fem"] -> g
Just i -> "_" ++ i -- integer index
_ -> ""
unsplitFun :: Fun -> Fun
unsplitFun f = let (w,_,c) = analyseFun f in mkFun (w,Nothing,c)
isSplitFun :: Fun -> Bool
isSplitFun f = case analyseFun f of
(_,ms,_) -> maybe False (const True) ms
allSplitFuns :: FilePath -> IO [Fun]
allSplitFuns absfile = do
ls <- readFile absfile >>= return . lines
return [f | "fun":f:_ <- map words ls, isSplitFun f]
baselineLinSplitFuns :: [Fun] -> FilePath -> IO [Rule]
baselineLinSplitFuns funs cncfile = do
let funset = S.fromList (funs ++ map unsplitFun funs)
ls <- readFile cncfile >>= return . lines
let lmap = M.fromList [(f,unwords ws) | "lin":f:ws <- map words ls, S.member f funset]
let look f = case M.lookup f lmap of
Just l -> (l,False)
_ -> case M.lookup (unsplitFun f) lmap of
Just l -> (l ++ " ---- sense to be split", True)
_ -> ("= variants {} ; ---- sense to be split",True)
return [unwords ["lin",f,l] | f <- funs, let (l,notYet) = look f, notYet]
writeSplitsFile :: FilePath -> FilePath -> IO ()
writeSplitsFile abs cnc = do
fs <- allSplitFuns abs
rs <- baselineLinSplitFuns fs cnc
writeFile ("tmp/split"++cnc) (unlines rs)

View File

@@ -1,53 +0,0 @@
abstract Translate =
-- modules in Grammar, excluding Structural
Tense,
Noun - [PPartNP], -- to be generalized
Adjective,
Numeral,
Conjunction,
Verb - [
PassV2, -- generalized to VPSlash and agents
-- SlashV2V, ComplVV, -- generalized in Extensions, used in Penn. But (1) more expensive (2) not available for all languages
UseCopula ---- overgenerating, unnecessary
],
Adverb,
Phrase,
Sentence,
Question,
Relative,
Idiom,
Symbol [PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP], ---- why only these?
Chunk,
Construction,
Extensions [
{-
-- used in Penn treebank
CompQS,CompS,CompVP,ComplVPIVV,GenNP,GenRP,GenIP,PastPartRS,PositAdVAdj,
PredFrontVS,PredFrontVQ,PresPartRS,SlashSlashV2V,GerundCN,
SlashV2V,ComplVV,
SlashVPIV2V,UseQuantPN,VPSlashVS,
-}
ListVPS,BaseVPS,ConsVPS,ConjVPS,ListVPI,BaseVPI,ConsVPI,ConjVPI,
CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP,
DirectComplVS, DirectComplVQ, FocusObjS
, PastPartAP, PastPartAgentAP, PresPartAP, GerundNP, GerundAdv ---- not yet available for all languages
, WithoutVP, InOrderToVP, ByVP
],
Dictionary,
Documentation
** {
flags
startcat=Phr;
--- heuristic_search_factor=0.60; ---- what should we choose here?
---- robustness by Chunk now
---- meta_prob=1.0e-5;
---- meta_token_prob=1.1965149246222233e-9;
}

View File

@@ -1,42 +0,0 @@
--# -path=.:../chunk:alltenses
concrete TranslateBul of Translate =
TenseX - [IAdv, CAdv],
CatBul,
NounBul - [PPartNP],
AdjectiveBul,
NumeralBul,
SymbolBul [
PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP
],
ConjunctionBul,
VerbBul - [
UseCopula,
PassV2 -- generalized in Extensions
],
AdverbBul,
PhraseBul,
SentenceBul,
QuestionBul,
RelativeBul,
IdiomBul,
ConstructionBul,
DocumentationBul,
ChunkBul,
ExtensionsBul [
ListVPS,BaseVPS,ConsVPS,ConjVPS,ListVPI,BaseVPI,ConsVPI,ConjVPI,
CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP,
DirectComplVS, DirectComplVQ, FocusObjS,
PastPartAP, PastPartAgentAP, PresPartAP, GerundNP, GerundAdv,
WithoutVP, InOrderToVP, ByVP
],
DictionaryBul **
open MorphoBul, ResBul, ParadigmsBul, SyntaxBul, CommonScand, (E = ExtraBul), Prelude in {
flags
literal=Symb ;
}

View File

@@ -1,38 +0,0 @@
--# -path=.:../chunk:alltenses
concrete TranslateCat of Translate =
TenseCat,
NounCat - [
PPartNP
],
AdjectiveCat,
NumeralCat,
SymbolCat [
PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP
],
ConjunctionCat,
VerbCat - [
UseCopula,
PassV2 -- generalized in Extensions
],
AdverbCat,
PhraseCat,
SentenceCat,
QuestionCat,
RelativeCat,
IdiomCat,
ConstructionCat,
DocumentationCat,
ChunkCat,
ExtensionsCat [ ListVPS,BaseVPS,ConsVPS,ConjVPS,ListVPI,BaseVPI,ConsVPI,ConjVPI,
CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP],
DictionaryCat **
open MorphoCat, ResCat, ParadigmsCat, SyntaxCat, (E = ExtraCat), (G = GrammarCat), Prelude in {
flags
literal=Symb ;
}

View File

@@ -1,58 +0,0 @@
--# -path=.:../chunk:alltenses
concrete TranslateChi of Translate =
TenseChi,
NounChi - [PPartNP],
AdjectiveChi,
NumeralChi,
SymbolChi [
PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP
],
ConjunctionChi,
VerbChi - [
UseCopula, -- just removed
PassV2, -- generalized
CompAP, ExtAdvVP -- Chi exceptions
],
AdverbChi,
PhraseChi,
SentenceChi,
QuestionChi - [
QuestCl -- Chi exception
],
RelativeChi,
IdiomChi,
ConstructionChi,
DocumentationChi,
ChunkChi,
ExtensionsChi [
ListVPS,BaseVPS,ConsVPS,ConjVPS,ListVPI,BaseVPI,ConsVPI,ConjVPI,
CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP
, DirectComplVS, DirectComplVQ, FocusObjS
, PastPartAP, PastPartAgentAP, PresPartAP, GerundNP, GerundAdv
, WithoutVP, InOrderToVP, ByVP
],
DictionaryChi **
open ResChi, ParadigmsChi, SyntaxChi, Prelude, (G = GrammarChi), (E = ExtraChi) in {
flags
literal = Symb ;
coding = utf8 ;
-- Chinese-specific overrides
lin
CompAP = E.CompBareAP | G.CompAP ; -- he good | he is good
ExtAdvVP vp adv = G.ExtAdvVP vp adv ;
---- | E.TopicAdvVP vp adv ; -- he *today* here sleeps | *today* he here sleeps
QuestCl cl = G.QuestCl cl | E.QuestRepV cl ; -- he comes 'ma' | he come not come
}

View File

@@ -1,38 +0,0 @@
--# -path=.:../chunk:alltenses
concrete TranslateDut of Translate =
TenseX,
NounDut - [PPartNP],
AdjectiveDut,
NumeralDut,
SymbolDut [
PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP
],
ConjunctionDut,
VerbDut - [
UseCopula,
PassV2
],
AdverbDut,
PhraseDut,
SentenceDut,
QuestionDut,
RelativeDut,
IdiomDut,
ConstructionDut,
DocumentationDut,
ChunkDut,
ExtensionsDut [
ListVPS,BaseVPS,ConsVPS,ConjVPS,ListVPI,BaseVPI,ConsVPI,ConjVPI,
CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP
, PastPartAP, PastPartAgentAP, PresPartAP, GerundNP, GerundAdv
, WithoutVP, InOrderToVP, ByVP
],
DictionaryDut **
open ResDut, ParadigmsDut, SyntaxDut, (E = ExtendDut), Prelude in {
flags
literal=Symb ;
}

View File

@@ -1,103 +0,0 @@
--# -path=.:../chunk
concrete TranslateEng of Translate =
TenseX - [Pol, PNeg, PPos, SC],
CatEng,
NounEng - [
PPartNP
,DetNP -- Eng exception
,OrdNumeralSuperl -- variants third largest | third-largest
,PossNP -- variants: bank of England | England's bank
],
AdjectiveEng,
NumeralEng,
SymbolEng [
PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP,
addGenitiveS
],
ConjunctionEng,
VerbEng - [
UseCopula, -- just removed: not needed
PassV2, -- generalized in Extensions
AdvVP, -- more liberal placement of adv
ComplVS, SlashV2S, ComplSlash -- Eng exceptions
---- ,UseV -- variant progressive
],
AdverbEng,
PhraseEng,
SentenceEng - [
UseCl -- replaced by UseCl | ContractedUseCl
],
QuestionEng - [
QuestVP -- replaced by QuestVP | contracted QuestVP
,QuestIComp
,QuestSlash -- replaced by QuestSlash | PiedPipingQuestSlash
],
RelativeEng - [
IdRP -- with variants that/who/which/-
,RelSlash -- replaced by RelSlash | PiedPipingRelSlash
],
IdiomEng,
ConstructionEng,
DocumentationEng,
ChunkEng,
ExtensionsEng [
ListVPS,BaseVPS,ConsVPS,ConjVPS,ListVPI,BaseVPI,ConsVPI,ConjVPI,
CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP
, DirectComplVS, DirectComplVQ, FocusObjS
, PastPartAP, PastPartAgentAP, PresPartAP, GerundNP, GerundAdv
, WithoutVP, InOrderToVP, ByVP
],
DictionaryEng **
open MorphoEng, ResEng, ParadigmsEng, (G = GrammarEng), (E = ExtraEng), Prelude in {
flags
literal=Symb ;
-- exceptional linearizations
lin
UseCl t p cl =
G.UseCl t p cl -- I am here
| E.ContractedUseCl t p cl -- I'm here
;
QuestVP qp vp =
G.QuestVP qp vp -- who is there
|
let cl = mkClause (qp.s ! npNom) (agrP3 qp.n) vp -- who's there
in {s = \\t,a,b,_ => cl.s ! t ! a ! b ! ODir True}
;
QuestIComp icomp np =
G.QuestIComp icomp np
|
let cl = mkClause (icomp.s) np.a (insertObj (\\_ => np.s ! NCase Nom) (predAux auxBe))
in {s = \\t,a,b,_ => cl.s ! t ! a ! b ! ODir True}
;
QuestSlash ip cls = G.QuestSlash ip cls | E.PiedPipingQuestSlash ip cls ;
ComplVS vs s = G.ComplVS vs s | E.ComplBareVS vs s ;
SlashV2S vs s = G.SlashV2S vs s | E.SlashBareV2S vs s ;
ComplSlash vps np = G.ComplSlash vps np | E.ComplSlashPartLast vps np ;
---- UseV v = G.UseV v | G.ProgrVP (G.UseV v) ; ---- error in variant compilation
AdvVP vp adv = G.AdvVP vp adv | insertObjPre (\\_ => adv.s) vp ; -- I bought a car today | I bought today a car
PPos = {s = [] ; p = CPos} ;
PNeg = {s = [] ; p = CNeg True} | {s = [] ; p = CNeg False} ;
IdRP = E.that_RP | E.who_RP | E.which_RP | E.emptyRP ; --- "that" safest when gender is not known
RelSlash rp cls = G.RelSlash rp cls | E.PiedPipingRelSlash rp cls ;
DetNP d = G.DetNP d | G.DetCN d (UseN (mkN "one")) ; -- I like this / I like this one ; it / the one
OrdNumeralSuperl n a = G.OrdNumeralSuperl n a | {s = \\c => n.s ! NOrd ! Nom ++ Predef.BIND ++ "-" ++ Predef.BIND ++ a.s ! AAdj Superl c} ;
PossNP cn np = G.PossNP cn np | {s = \\n,c => np.s ! npGen ++ cn.s ! n ! c ; g = cn.g} ; ---- in the latter, no other determiners can be added
}

View File

@@ -1,58 +0,0 @@
--# -path=.:../chunk:../estonian
concrete TranslateEst of Translate =
TenseX,
CatEst,
NounEst - [
PPartNP
],
AdjectiveEst,
NumeralEst,
SymbolEst [
PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP
],
ConjunctionEst,
VerbEst - [
UseCopula, -- not used
-- CompAP, -- variant Nom/Part, in Finnish
PassV2 -- generalized in Extensions
],
AdverbEst,
PhraseEst,
SentenceEst,
QuestionEst,
RelativeEst,
IdiomEst,
ConstructionEst,
DocumentationEst,
ChunkEst,
ExtensionsEst [
ListVPS,BaseVPS,ConsVPS,ConjVPS,ListVPI,BaseVPI,ConsVPI,ConjVPI,
CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP,
DirectComplVS, DirectComplVQ, FocusObjS
, PastPartAP, PastPartAgentAP, PresPartAP, GerundNP, GerundAdv
, WithoutVP, InOrderToVP, ByVP
],
DictionaryEst **
open MorphoEst, ResEst, ParadigmsEst, SyntaxEst, (E = ExtraEst), (G = GrammarEst), Prelude in {
flags literal=Symb ; coding = utf8 ;
{-
--- in Estonian, too?
lin
CompAP ap = G.CompAP ap
|
{s = \\agr =>
let
n = complNumAgr agr ;
c = Part ;
in ap.s ! False ! (NCase n c)
} ;
-}
}

View File

@@ -1,35 +0,0 @@
--# -path=.:../chunk:alltenses:../basque
concrete TranslateEus of Translate =
TenseX,
CatEus,
NounEus - [PPartNP],
AdjectiveEus,
NumeralEus,
VerbEus - [PassV2,UseCopula],
SentenceEus,
ConjunctionEus,
AdverbEus,
PhraseEus,
QuestionEus,
RelativeEus,
IdiomEus,
SymbolEus [PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP], ---- why only these?
ConstructionEus,
ChunkEus,
ExtensionsEus [
-- ListVPS,BaseVPS,ConsVPS,ConjVPS,ListVPI,BaseVPI,ConsVPI,ConjVPI,
-- CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP,
-- DirectComplVS, DirectComplVQ, FocusObjS
-- , PastPartAP, PastPartAgentAP, PresPartAP, GerundNP, GerundAdv ---- not yet available for all languages
WithoutVP, InOrderToVP -- , ByVP
],
DictionaryEus **
open ResEus, Prelude in {
flags
literal=Symb ;
}

View File

@@ -1,55 +0,0 @@
--# -path=.:../chunk:../finnish/stemmed:../finnish:../api
concrete TranslateFin of Translate =
TenseX,
CatFin,
NounFin - [
PPartNP
],
AdjectiveFin,
NumeralFin,
SymbolFin [
PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP
],
ConjunctionFin,
VerbFin - [
UseCopula, -- not used
CompAP, -- variant Nom/Part
PassV2 -- generalized in Extensions
],
AdverbFin,
PhraseFin,
SentenceFin,
QuestionFin,
RelativeFin,
IdiomFin,
ConstructionFin,
DocumentationFin,
ChunkFin,
ExtensionsFin [
ListVPS,BaseVPS,ConsVPS,ConjVPS,ListVPI,BaseVPI,ConsVPI,ConjVPI,
CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP,
DirectComplVS, DirectComplVQ, FocusObjS
, PastPartAP, PastPartAgentAP, PresPartAP, GerundNP, GerundAdv
, WithoutVP, InOrderToVP, ByVP
],
DictionaryFin **
open MorphoFin, ResFin, ParadigmsFin, SyntaxFin, StemFin, (E = ExtraFin), (G = GrammarFin), Prelude in {
flags literal=Symb ; coding = utf8 ;
lin
CompAP ap = G.CompAP ap
|
{s = \\agr =>
let
n = complNumAgr agr ;
c = Part ;
in ap.s ! False ! (NCase n c)
} ;
}

View File

@@ -1,75 +0,0 @@
--# -path=.:../chunk:alltenses
concrete TranslateFre of Translate =
TenseFre,
NounFre - [PPartNP],
AdjectiveFre,
NumeralFre,
SymbolFre [
PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP
],
ConjunctionFre,
VerbFre - [
UseCopula,
PassV2 -- generalized in Extensions
],
AdverbFre,
PhraseFre,
SentenceFre,
QuestionFre - [
QuestCl,QuestIAdv -- french-specific overrides
],
RelativeFre,
IdiomFre,
ConstructionFre,
DocumentationFre,
ChunkFre,
ExtensionsFre [
ListVPS,BaseVPS,ConsVPS,ConjVPS,ListVPI,BaseVPI,ConsVPI,ConjVPI,
CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP
, PastPartAP, PastPartAgentAP, PresPartAP, GerundNP, GerundAdv
, WithoutVP, InOrderToVP, ByVP
],
DictionaryFre **
open PhonoFre, MorphoFre, ResFre, CommonRomance, ParadigmsFre, SyntaxFre, Prelude, (G = GrammarFre) in {
flags
literal=Symb ;
coding = utf8 ;
-- overrides from Lang
lin
QuestCl cl =
{s = \\t,a,p => -- est-ce qu'il dort ?
let cls = cl.s ! DDir ! t ! a ! p
in table {
QDir => "est-ce" ++ elisQue ++ cls ! Indic ;
QIndir => subjIf ++ cls ! Indic
}
}
| {s = \\t,a,p => -- dort-il ?
let cls = cl.s ! DInv ! t ! a ! p
in table {
QDir => cls ! Indic ;
QIndir => subjIf ++ cls ! Indic
}
}
| G.QuestCl cl -- il dort ?
;
QuestIAdv iadv cl =
G.QuestIAdv iadv cl -- où dort-il
| {s = \\t,a,p,q => -- où est-ce qu'il dort
let
ord = DDir ;
cls = cl.s ! ord ! t ! a ! p ! Indic ;
why = iadv.s
in why ++ "est-ce" ++ elisQue ++ cls
} ;
}

View File

@@ -1,39 +0,0 @@
--# -path=.:../chunk:alltenses:../german
concrete TranslateGer of Translate =
TenseGer,
NounGer - [PPartNP],
AdjectiveGer,
NumeralGer,
SymbolGer [
PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP
],
ConjunctionGer,
VerbGer - [
UseCopula,
PassV2
],
AdverbGer,
PhraseGer,
SentenceGer,
QuestionGer,
RelativeGer,
IdiomGer,
ConstructionGer,
DocumentationGer,
ChunkGer,
ExtensionsGer [
ListVPS,BaseVPS,ConsVPS,ConjVPS,ListVPI,BaseVPI,ConsVPI,ConjVPI,
CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP
, PastPartAP, PastPartAgentAP, PresPartAP, GerundNP, GerundAdv
, WithoutVP, InOrderToVP, ByVP
],
DictionaryGer **
open MorphoGer, ResGer, ParadigmsGer, SyntaxGer, CommonScand, (E = ExtraGer), Prelude in {
flags
literal=Symb ;
}

View File

@@ -1,36 +0,0 @@
--# -path=.:../chunk:alltenses
concrete TranslateHin of Translate =
TenseX - [AdN,Adv,SC],
CatHin,
NounHin - [PPartNP],
AdjectiveHin,
NumeralHin,
SymbolHin [
PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP
],
ConjunctionHin,
VerbHin - [
UseCopula,
PassV2 -- generalized in Extensions
],
AdverbHin,
PhraseHin,
SentenceHin,
QuestionHin,
RelativeHin,
IdiomHin,
ConstructionHin,
DocumentationHin,
ChunkHin,
ExtensionsHin [ ListVPS,BaseVPS,ConsVPS,ConjVPS,ListVPI,BaseVPI,ConsVPI,ConjVPI,
CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash],
DictionaryHin **
open MorphoHin, ResHin, ParadigmsHin, SyntaxHin, CommonScand, (E = ExtraHin), Prelude in {
flags
literal=Symb ;
}

View File

@@ -1,42 +0,0 @@
--# -path=.:../chunk:alltenses
concrete TranslateIta of Translate =
TenseIta,
NounIta - [
PPartNP
],
AdjectiveIta,
NumeralIta,
SymbolIta [
PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP
],
ConjunctionIta,
VerbIta - [
UseCopula,
PassV2 -- generalized in Extensions
],
AdverbIta,
PhraseIta,
SentenceIta,
QuestionIta,
RelativeIta,
IdiomIta,
ConstructionIta,
DocumentationIta,
ChunkIta,
ExtensionsIta [
ListVPS,BaseVPS,ConsVPS,ConjVPS,ListVPI,BaseVPI,ConsVPI,ConjVPI,
CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP
, PastPartAP, PastPartAgentAP, PresPartAP, GerundNP, GerundAdv
, WithoutVP, InOrderToVP, ByVP
],
DictionaryIta **
open MorphoIta, ResIta, ParadigmsIta, SyntaxIta, (E = ExtraIta), (G = GrammarIta), Prelude in {
flags
literal=Symb ;
}

View File

@@ -1,49 +0,0 @@
--# -path=.:../chunk:alltenses
concrete TranslateJpn of Translate =
TenseJpn,
NounJpn - [PPartNP],
AdjectiveJpn,
NumeralJpn,
SymbolJpn [
PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP
],
ConjunctionJpn,
VerbJpn - [
UseCopula, -- just removed
PassV2 -- generalized
],
AdverbJpn,
PhraseJpn,
SentenceJpn,
QuestionJpn,
RelativeJpn,
IdiomJpn,
ConstructionJpn,
DocumentationJpn, ---- TODO
ChunkJpn,
ExtensionsJpn [
ListVPS,BaseVPS,ConsVPS,ConjVPS,ListVPI,BaseVPI,ConsVPI,ConjVPI,
CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP
, DirectComplVS, DirectComplVQ, FocusObjS
, PastPartAP, PastPartAgentAP, PresPartAP, GerundNP, GerundAdv
, WithoutVP, InOrderToVP, ByVP
],
DictionaryJpn **
open ResJpn, ParadigmsJpn, SyntaxJpn, Prelude, (G = GrammarJpn), (E = ExtraJpn) in {
flags
literal = Symb ;
coding = utf8 ;
---- TODO: everything
-- Japanese-specific overrides (if any) here
}

View File

@@ -1,42 +0,0 @@
--# -path=.:../chunk:alltenses
concrete TranslateRus of Translate =
TenseX - [IAdv, CAdv],
CatRus,
NounRus - [PPartNP],
AdjectiveRus,
NumeralRus,
SymbolRus [
PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP
],
ConjunctionRus,
VerbRus - [
UseCopula,
PassV2 -- generalized in Extensions
],
AdverbRus,
PhraseRus,
SentenceRus,
QuestionRus,
RelativeRus,
IdiomRus,
ConstructionRus,
DocumentationRus,
ChunkRus,
ExtensionsRus [
ListVPS,BaseVPS,ConsVPS,ConjVPS,ListVPI,BaseVPI,ConsVPI,ConjVPI,
CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP,
DirectComplVS, DirectComplVQ, FocusObjS,
PastPartAP, PastPartAgentAP, PresPartAP, GerundNP, GerundAdv,
WithoutVP, InOrderToVP, ByVP
],
DictionaryRus **
{
flags
literal=Symb ;
}

View File

@@ -1,42 +0,0 @@
--# -path=.:../chunk:alltenses
concrete TranslateSpa of Translate =
TenseSpa,
NounSpa - [
PPartNP
],
AdjectiveSpa,
NumeralSpa,
SymbolSpa [
PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP
],
ConjunctionSpa,
VerbSpa - [
UseCopula,
PassV2 -- generalized in Extensions
],
AdverbSpa,
PhraseSpa,
SentenceSpa,
QuestionSpa,
RelativeSpa,
IdiomSpa,
ConstructionSpa,
DocumentationSpa,
ChunkSpa,
ExtensionsSpa [
ListVPS,BaseVPS,ConsVPS,ConjVPS,ListVPI,BaseVPI,ConsVPI,ConjVPI,
CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP
, PastPartAP, PastPartAgentAP, PresPartAP, GerundNP, GerundAdv
, WithoutVP, InOrderToVP, ByVP
],
DictionarySpa **
open MorphoSpa, ResSpa, ParadigmsSpa, SyntaxSpa, (E = ExtraSpa), (G = GrammarSpa), Prelude in {
flags
literal=Symb ;
}

View File

@@ -1,59 +0,0 @@
--# -path=.:../chunk:alltenses
concrete TranslateSwe of Translate =
TenseSwe,
NounSwe - [PPartNP,PossNP],
AdjectiveSwe,
NumeralSwe,
SymbolSwe [
PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP
],
ConjunctionSwe,
VerbSwe - [
UseCopula, -- not needed
PassV2 -- generalized in Extensions
],
AdverbSwe,
PhraseSwe,
SentenceSwe,
QuestionSwe - [
QuestSlash -- replaced by QuestSlash | PiedPipingQuestSlash
],
RelativeSwe - [
RelSlash -- replaced by RelSlash | PiedPipingRelSlash
,IdRP -- replaced by IdRP | emptyRP
],
IdiomSwe,
ConstructionSwe,
DocumentationSwe,
ChunkSwe,
ExtensionsSwe [
ListVPS,BaseVPS,ConsVPS,ConjVPS,ListVPI,BaseVPI,ConsVPI,ConjVPI,
CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP
, DirectComplVS, DirectComplVQ, FocusObjS
, PastPartAP, PastPartAgentAP, PresPartAP, GerundNP, GerundAdv
, WithoutVP, InOrderToVP, ByVP
],
DictionarySwe **
open MorphoSwe, ResSwe, ParadigmsSwe, SyntaxSwe, CommonScand, (E = ExtraSwe), (G = GrammarSwe), Prelude in {
flags
literal=Symb ;
-- exceptions
lin
PossNP cn np = -- min frus stora bil
G.PossNP cn np
| {s = \\n,d,c => np.s ! NPPoss (gennum (ngen2gen cn.g) n) Nom ++ cn.s ! n ! DDef Indef ! c ; g = cn.g ; isMod = True} ---- overgenerating
;
IdRP = G.IdRP | E.emptyRP ;
RelSlash rp cls = G.RelSlash rp cls | E.PiedPipingRelSlash rp cls ;
QuestSlash ip cls = G.QuestSlash ip cls | E.PiedPipingQuestSlash ip cls ;
}

View File

@@ -1,56 +0,0 @@
--# -path=.:../chunk:alltenses
concrete TranslateTha of Translate =
TenseX,
NounTha - [PPartNP],
AdjectiveTha,
NumeralTha,
SymbolTha [
PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP
],
ConjunctionTha,
VerbTha - [
UseCopula, -- just removed
PassV2 -- generalized
],
AdverbTha,
PhraseTha,
SentenceTha,
QuestionTha,
RelativeTha,
IdiomTha,
ConstructionTha,
DocumentationTha,
ChunkTha,
ExtensionsTha [
ListVPS,BaseVPS,ConsVPS,ConjVPS,ListVPI,BaseVPI,ConsVPI,ConjVPI,
CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP
, DirectComplVS, DirectComplVQ, FocusObjS
, PastPartAP, PastPartAgentAP, PresPartAP, GerundNP, GerundAdv
, WithoutVP, InOrderToVP, ByVP
],
DictionaryTha **
open ResTha, ParadigmsTha, SyntaxTha, Prelude, (G = GrammarTha) in {
flags
literal = Symb ;
coding = utf8 ;
{-
-- Thai-specific overrides
lin
CompAP = E.CompBareAP | G.CompAP ; -- he good | he is good
ExtAdvVP vp adv = G.ExtAdvVP vp adv ;
---- | E.TopicAdvVP vp adv ; -- he *today* here sleeps | *today* he here sleeps
QuestCl cl = G.QuestCl cl | E.QuestRepV cl ; -- he comes 'ma' | he come not come
-}
}

View File

@@ -1,36 +0,0 @@
--# -path=.:../chunk:alltenses
concrete TranslateUrd of Translate =
TenseX - [AdN,Adv,SC],
CatUrd,
NounUrd - [PPartNP],
AdjectiveUrd,
NumeralUrd,
SymbolUrd [
PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP
],
ConjunctionUrd,
VerbUrd - [
UseCopula,
PassV2 -- generalized in Extensions
],
AdverbUrd,
PhraseUrd,
SentenceUrd,
QuestionUrd,
RelativeUrd,
IdiomUrd,
ConstructionUrd,
DocumentationUrd,
ChunkUrd,
ExtensionsUrd [ ListVPS,BaseVPS,ConsVPS,ConjVPS,ListVPI,BaseVPI,ConsVPI,ConjVPI,
CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash],
DictionaryUrd **
open MorphoUrd, ResUrd, ParadigmsUrd, SyntaxUrd, CommonScand, (E = ExtraUrd), Prelude in {
flags
literal=Symb ;
}

View File

@@ -1,73 +0,0 @@
1. Create a check list for Swe
do
bnc <- readFile "bnc-to-check.txt" >>= return . words -- list of BNC funs
dict <- readFile "DictionarySwe.gf" >>= return . map words . lines -- current Swe lexicon
let dictmap = Data.Map.fromList [(f,unwords ws) | "lin":f:"=":ws <- dict]
let bncdict = [(f,maybe "variants{} ;" id $ Data.Map.lookup f dictmap) | f <- bnc] -- current Swe for BNC
writeFile "bncswe.txt" $ unlines [unwords ("lin":f:"=":[ws]) | (f,ws) <- bncdict] -- print inspectable file
2. Inspect the check list
went through one thousand
- corrected everything
- removed trailing comments from corrected entries
- split senses
- added a -- | comment for disambiguating new senses
move the checked words to correctswe.txt
3. Apply split senses
grep "\-\- |" correctswe.txt | sort
Copy split senses to bnc-to-check.txt
- *but don't remove the unsplit senses* because they are needed to find words from other languages
Copy split senses to Dictionary.gf, together with the -- | comments
Make copies for split senses in DictionaryEng.gf
Verify the result by compiling DictionaryEng.gf
4. Extend the Swe lexicon
do
old <- readFile "DictionarySwe.gf" >>= return . map words . lines -- read old lexicon
new <- readFile "correctswe.txt" >>= return . map words . lines -- read corrected and new words
let oldmap = Data.Map.fromList [(f,unwords ws) | "lin":f:"=":ws <- old]
let newlist = [(f,unwords (takeWhile (/= "--") ws)) | "lin":f:"=":ws <- new] -- drop comments from corrected words
let newmap = foldr (uncurry Data.Map.insert) oldmap newlist -- insert corrected words
writeFile "newswe.txt" $ unlines [unwords ("lin":f:"=":[ws]) | (f,ws) <- Data.Map.assocs newmap] -- print lin rules
Replace the body of DictionarySwe.gf by newswe.txt
Compile DictionarySwe.gf
5. Spare the rest to do
Remove the corrected words from bncswe.txt.
Or take note of the last word that was checked already.
6. Generate a spreadsheet view
Here for Swe and Bul:
do
bnc <- readFile "bnc-to-check.txt" >>= return . words
swe <- readFile "DictionarySwe.gf" >>= return . map words . lines
let swemap = Data.Map.fromList [(f,unwords ws) | "lin":f:"=":ws <- swe]
bul <- readFile "DictionaryBul.gf" >>= return . map words . lines
let bulmap = Data.Map.fromList [(f,unwords ws) | "lin":f:"=":ws <- bul]
let look f m = maybe "-" id $ Data.Map.lookup f m
let line f = f ++ "\t" ++ look f swemap ++ "\t" ++ look f bulmap
writeFile "bnc-swe-bul.tsv" $ unlines $ map line bnc

File diff suppressed because it is too large Load Diff

View File

@@ -1,275 +0,0 @@
import Text.EditDistance
import Data.List
import qualified Data.Set as Set
import qualified Data.Map.Strict as Map
import Data.Maybe(maybe,mapMaybe,fromMaybe)
import Data.Char
import Data.IORef
import Debug.Trace
import System.Random
import System.Random.Shuffle
import System.Environment
import Translit
import Control.Monad(forM_)
train = False
useTenFold = False
main = do
[src,dst] <- getArgs
src <- fmap (toEntries src) $ readFile ("data/wn-data-"++src++".tab")
dst <- fmap (toEntries dst) $ readFile ("data/wn-data-"++dst++".tab")
gen <- newStdGen
let wps = addCounts (join src dst)
rps <- if train
then fmap (Set.fromList . map (toReferencePair . tsv) . lines) $ readFile "data/fiwn-transls.tsv"
else return Set.empty
e2f <- fmap (Map.fromList . map (toAlignmentPair . words) . lines) $ readFile "data/europarl-v7.fi-en.lemma.intersect.lex.e2f"
let features = addFeatures rps wps
res <- newIORef Map.empty
(if useTenFold
then forM_ (tenfold gen features)
else (>>=) (return (features,features))) $ \(evalData,trainData) -> do
tbl <- if train
then do let stats = Map.fromListWith add2 [((crank,drank),(if cls then (1,0) else (0,1))) | (_,_,_,_,_,crank,drank,cls) <- trainData]
where
add2 (x1,y1) (x2,y2) = (x1+x2,y1+y2)
tbl = [[maybe 0 (\(c1,c2) -> fromIntegral c1 / fromIntegral (c1+c2)) (Map.lookup (rank,dist) stats) | dist <- [1..40]] | rank <- [1..7]]
writeFile "stats.tsv" (unlines [untsv [show crank,show drank,show c1,show c2] | ((crank,drank),(c1,c2)) <- Map.toList stats])
writeFile "table.tsv" (unlines (map (untsv . map show) tbl))
return tbl
else do fmap (map (map read . tsv) . lines) $ readFile "table.tsv"
g <- newStdGen
-- let predictions = randomChoice g evalData
let predictions = classify tbl evalData
--let predictions = alignmentChoice e2f evalData
writeFile "predictions.tsv" (unlines [untsv [sense_id,
lemma1,
lemma2,
show c,show d,
show crank,show drank,
show cls,show pred]
| (sense_id,lemma1,lemma2,c,d,crank,drank,cls,pred) <- predictions])
let result0 = Map.fromListWith (+) [((cls,pred),1) | (_,_,_,_,_,_,_,cls,pred) <- predictions]
total = length predictions
result = Map.map (\c -> fromIntegral c / fromIntegral total) result0
sum_result <- readIORef res
let sum_result' = Map.fromList [let k = (cls,pred) in (k,fromMaybe 0 (Map.lookup k result)+fromMaybe 0 (Map.lookup k sum_result)) | cls <- [True,False], pred <- [True,False]]
writeIORef res sum_result'
result <- readIORef res
writeFile ("result.tsv") (unlines [untsv ([show cls,show pred,show (c/(if useTenFold then 10 else 1))]) | ((cls,pred),c) <- Map.toList result])
toEntries lng =
foldr addElem Map.empty .
mapMaybe (toEntry lng . tsv) .
tail .
lines
where
toEntry lng [sense_id,rel,w]
| rel == "lemma" || rel == lng++":lemma" = Just (sense_id,w)
toEntry _ _ = Nothing
addElem (k,a) =
Map.alter (\mb_as -> Just (a:fromMaybe [] mb_as)) k
join src dst =
[(sense_id,x,y) | (sense_id,xs) <- Map.toList src,
x <- xs,
y <- fromMaybe [] (Map.lookup sense_id dst)]
addCounts src_dst =
let cmap = Map.fromListWith (+) [((x,y),1) | (sense_id,x,y) <- src_dst]
cdmap = Map.mapWithKey (\(x,y) c -> (c,dist x y)) cmap
in [(sense_id,x,y,c,d) | (sense_id,x,y) <- src_dst, let (c,d) = fromMaybe (0,0) (Map.lookup (x,y) cdmap)]
where
dist x y = levenshteinDistance defaultEditCosts (map toLower x) (map toLower y)
toReferencePair (fis:fi:ens:en:_) = (conv ens,en,fi)
where
conv s = drop 8 s ++ ['-',s !! 7]
toAlignmentPair (eng:fin:_:prob:_) = ((mapEng eng,mapFin fin),read prob :: Double)
where
mapEng w =
init w ++ ((:[]) $
case last w of
'n' -> 'n'
'v' -> 'v'
'j' -> 'a'
'r' -> 'r'
c -> c)
mapFin w =
init w ++ ((:[]) $
case last w of
'n' -> 'n'
'v' -> 'v'
'j' -> 'a'
'a' -> 'a'
'r' -> 'r'
c -> c)
tsv :: String -> [String]
tsv "" = []
tsv cs =
let (x,cs1) = break (=='\t') cs
in x : if null cs1 then [] else tsv (tail cs1)
untsv :: [String] -> String
untsv = intercalate "\t"
addFeatures ts ps =
let (xs,ys) = takeSynset ps
(cds,xs') = mapAccumL (addValues cds) (Set.empty,Set.empty) xs
in if null xs
then []
else xs' ++ addFeatures ts ys
where
takeSynset [] = ([],[])
takeSynset (p:ps) = let sense_id = get_sense_id p
(ps1,ps2) = break (\p1 -> get_sense_id p1 /= sense_id) ps
in (p : ps1, ps2)
where
get_sense_id (sense_id,_,_,_,_) = sense_id
addValues cds (cs,ds) (sense_id,lemma1,lemma2,c,d) =
let cls = Set.member (sense_id,lemma1,lemma2) ts
cs' = Set.insert c cs
ds' = Set.insert d ds
crank = findIndex 1 c (Set.toDescList (fst cds))
drank = findIndex 1 d (Set.toAscList (snd cds))
in ((cs',ds'),(sense_id,lemma1,lemma2,c,d,crank,drank,cls))
where
findIndex i x [] = i
findIndex i x (y:ys)
| x == y = i
| otherwise = findIndex (i+1) x ys
tenfold gen ps =
let synsets = takeSynset ps
len = length synsets
len10 = len `div` 10
in splitData len10 [] (shuffle' synsets len gen)
where
takeSynset [] = []
takeSynset (p:ps) = let sense_id = get_sense_id p
(ps1,ps2) = break (\p1 -> get_sense_id p1 /= sense_id) ps
in (p : ps1) : takeSynset ps2
where
get_sense_id (sense_id,_,_,_,_,_,_,_) = sense_id
splitData len10 zs ps =
let (xs,ys) = splitAt len10 ps
in if null ys
then []
else (concat xs,concat (zs++ys)) : splitData len10 (xs++zs) ys
--classify :: [[Double]] -> (String,Int,String,Int,String,Int,Int,Int,Int,Bool) -> (String,Int,String,Int,String,Int,Int,Int,Int,Bool,Bool)
{-classify tbl (sense_id,lemma_id1,lemma1,lemma_id2,lemma2,c,d,crank,drank,cls)
| tbl !! (crank-1) !! (drank-1) > 0.5 = (sense_id,lemma_id1,lemma1,lemma_id2,lemma2,c,d,crank,drank,cls,True)
| otherwise = (sense_id,lemma_id1,lemma1,lemma_id2,lemma2,c,d,crank,drank,cls,False)
-}
classify tbl ps =
let (xs,ys) = takeSynset ps
xs' = sortBy descProb (map pairProb xs)
(ids,sel1) = pick1 ([],[]) xs'
sel2 = pick2 ids xs'
sel = sel1++sel2
in if null xs
then []
else map (annotate sel) xs ++ classify tbl ys
where
takeSynset [] = ([],[])
takeSynset (p:ps) = let sense_id = get_sense_id p
(ps1,ps2) = break (\p1 -> get_sense_id p1 /= sense_id) ps
in (p : ps1, ps2)
where
get_sense_id (sense_id,_,_,_,_,_,_,_) = sense_id
pairProb x@(sense_id,lemma1,lemma2,c,d,crank,drank,cls) = (lemma1,lemma2,tbl !! (crank-1) !! (drank-1))
descProb (_,_,p1) (_,_,p2) = compare p2 p1
pick1 ids [] = (ids,[])
pick1 ids@(ids1,ids2) ((lemma1,lemma2,prob):xs)
| not (elem lemma1 ids1 || elem lemma2 ids2) = let (ids',xs') = pick1 (lemma1:ids1,lemma2:ids2) xs
in (ids',(lemma1,lemma2) : xs')
| otherwise = pick1 ids xs
pick2 ids [] = []
pick2 ids@(ids1,ids2) ((lemma1,lemma2,prob):xs)
| not (elem lemma1 ids1) = (lemma1,lemma2) : pick2 (lemma1:ids1,lemma2:ids2) xs
| not (elem lemma2 ids2) = (lemma1,lemma2) : pick2 (lemma1:ids1,lemma2:ids2) xs
| otherwise = pick2 ids xs
annotate sel (sense_id,lemma1,lemma2,c,d,crank,drank,cls) =
(sense_id,lemma1,lemma2,c,d,crank,drank,cls,elem (lemma1,lemma2) sel)
randomChoice g ps =
let (xs,ys) = takeSynset ps
(g',xs') = mapAccumL pairProb g xs
sel = pick [] (sortBy descProb xs')
in if null xs
then []
else map (annotate sel) xs ++ randomChoice g' ys
where
takeSynset [] = ([],[])
takeSynset (p:ps) = let sense_id = get_sense_id p
(ps1,ps2) = break (\p1 -> get_sense_id p1 /= sense_id) ps
in (p : ps1, ps2)
where
get_sense_id (sense_id,_,_,_,_,_,_,_) = sense_id
pairProb g x@(sense_id,lemma1,lemma2,c,d,crank,drank,cls) =
let (prob,g') = randomR (0.0,1.0::Double) g
in (g',(lemma1,lemma2,prob))
descProb (_,_,p1) (_,_,p2) = compare p2 p1
pick ids [] = []
pick ids ((lemma1,lemma2,prob):xs)
| not (elem lemma1 ids) = (lemma1,lemma2) : pick (lemma1:lemma2:ids) xs
| not (elem lemma2 ids) = (lemma1,lemma2) : pick (lemma1:lemma2:ids) xs
| otherwise = pick ids xs
annotate sel (sense_id,lemma1,lemma2,c,d,crank,drank,cls) =
(sense_id,lemma1,lemma2,c,d,crank,drank,cls,elem (lemma1,lemma2) sel)
alignmentChoice e2f ps =
let (xs,ys) = takeSynset ps
xs' = map pairProb xs
sel = pick ([],[]) (sortBy descProb xs')
in if null xs
then []
else map (annotate sel) xs ++ alignmentChoice e2f ys
where
takeSynset [] = ([],[])
takeSynset (p:ps) = let sense_id = get_sense_id p
(ps1,ps2) = break (\p1 -> get_sense_id p1 /= sense_id) ps
in (p : ps1, ps2)
where
get_sense_id (sense_id,_,_,_,_,_,_,_) = sense_id
pairProb x@(sense_id,lemma1,lemma2,c,d,crank,drank,cls) =
let prob = fromMaybe 0 (Map.lookup (lemma1++"|"++[sense_id!!9],lemma2++"|"++[sense_id!!9]) e2f)
in (lemma1,lemma2,prob)
descProb (_,_,p1) (_,_,p2) = compare p2 p1
pick ids [] = []
pick ids@(ids1,ids2) ((lemma1,lemma2,prob):xs)
| not (elem lemma1 ids1) = (lemma1,lemma2) : pick (lemma1:ids1,lemma2:ids2) xs
| not (elem lemma2 ids2) = (lemma1,lemma2) : pick (lemma1:ids1,lemma2:ids2) xs
| otherwise = pick ids xs
annotate sel (sense_id,lemma1,lemma2,c,d,crank,drank,cls) =
(sense_id,lemma1,lemma2,c,d,crank,drank,cls,elem (lemma1,lemma2) sel)

View File

@@ -1,688 +0,0 @@
fun abortionistFem_N : N ;
fun abortionistMasc_N : N ;
fun academicianFem_N : N ;
fun academicianMasc_N : N ;
fun accuserFem_N : N ;
fun accuserMasc_N : N ;
fun acrobatFem_N : N ;
fun acrobatMasc_N : N ;
fun activistFem_N : N ;
fun activistMasc_N : N ;
fun actor_1_N : N ; -- | a Shakespeare actor
fun actor_2_N : N ; -- | an important actor
fun administratorFem_N : N ;
fun administratorMasc_N : N ;
fun adventistFem_N : N ;
fun adventistMasc_N : N ;
fun adviserFem_N : N ;
fun adviserMasc_N : N ;
fun advocateFem_N : N ;
fun advocateMasc_N : N ;
fun aestheteFem_N : N ;
fun aestheteMasc_N : N ;
fun afghanFem_N : N ;
fun afghanMasc_N : N ;
fun afghanistaniFem_N : N ;
fun afghanistaniMasc_N : N ;
fun africanFem_N : N ;
fun africanMasc_N : N ;
fun afrikanerFem_N : N ;
fun afrikanerMasc_N : N ;
fun afro_americanFem_N : N ;
fun afro_americanMasc_N : N ;
fun agentFem_N : N ;
fun agentMasc_N : N ;
fun aggressorFem_N : N ;
fun aggressorMasc_N : N ;
fun alienFem_N : N ;
fun alienMasc_N : N ;
fun alsatianFem_N : N ;
fun alsatianMasc_N : N ;
fun amateurFem_N : N ;
fun amateurMasc_N : N ;
fun americanFem_N : N ;
fun americanMasc_N : N ;
fun anarchistFem_N : N ;
fun anarchistMasc_N : N ;
fun anglophilFem_N : N ;
fun anglophilMasc_N : N ;
fun anglophileFem_N : N ;
fun anglophileMasc_N : N ;
fun anthropologistFem_N : N ;
fun anthropologistMasc_N : N ;
fun arabianFem_N : N ;
fun arabianMasc_N : N ;
fun architectFem_N : N ;
fun architectMasc_N : N ;
fun area_1_N : N ;
fun area_2_N : N ;
fun area_3_N : N ;
fun area_4_N : N ;
fun area_5_N : N ;
fun area_6_N : N ;
fun arm_1_N : N ; -- | arms and legs
fun arm_2_N : N ; -- | a farewell to arms
fun aryanFem_N : N ;
fun aryanMasc_N : N ;
fun assistantFem_N : N ;
fun assistantMasc_N : N ;
fun athenianFem_N : N ;
fun athenianMasc_N : N ;
fun athens_1_PN : PN ; -- | city in Greece
fun athens_2_PN : PN ; -- | city in America
fun attempt_1_N : N ;
fun attempt_2_N : N ;
fun australianFem_N : N ;
fun australianMasc_N : N ;
fun austrianFem_N : N ;
fun austrianMasc_N : N ;
fun authority_1_N : N ; -- | he is an authority in his field
fun authority_2_N : N ; -- | the police and other authorities
fun aviatorFem_N : N ;
fun aviatorMasc_N : N ;
fun away_1_Adv : Adv ; -- | she is away
fun away_2_Adv : Adv ; -- | she went away
fun backerFem_N : N ;
fun backerMasc_N : N ;
fun bar_1_N : N ; -- | have a drink in the bar
fun bar_2_N : N ; -- | bars in front of the window
fun betrothedFem_N : N ;
fun betrothedMasc_N : N ;
fun board_1_N : N ; -- | write it on the board
fun board_2_N : N ; -- | board member
fun brassiere_1_N : N ;
fun brassiere_2_N : N ;
fun brunetteFem_N : N ;
fun brunetteMasc_N : N ;
fun buddhistFem_N : N ;
fun buddhistMasc_N : N ;
fun bulgarianFem_N : N ;
fun bulgarianMasc_N : N ;
fun buyerFem_N : N ;
fun buyerMasc_N : N ;
fun can_1_VV : VV ; -- | I can come with you (possibility)
fun can_2_VV : VV ; -- | I can speak English (know-how)
fun candidateFem_N : N ;
fun candidateMasc_N : N ;
fun canon_1_N : N ;
fun canon_2_N : N ;
fun capital_1_N : N ; -- | the capital of France
fun capital_2_N : N ; -- | risk capital
fun capital_3_N : N ; -- | written in capitals
fun captiveFem_N : N ;
fun captiveMasc_N : N ;
fun cardiologistFem_N : N ;
fun cardiologistMasc_N : N ;
fun cartoonistFem_N : N ;
fun cartoonistMasc_N : N ;
fun catalanFem_N : N ;
fun catalanMasc_N : N ;
fun catholicFem_N : N ;
fun catholicMasc_N : N ;
fun caucasianFem_N : N ;
fun caucasianMasc_N : N ;
fun cellistFem_N : N ;
fun cellistMasc_N : N ;
fun certain_1_A : A ; -- | I am certain
fun certain_2_A : A ; -- | a certain house
fun charabanc_1_N : N ;
fun charabanc_2_N : N ;
fun character_1_N : N ;
fun character_2_N : N ;
fun charge_1_N : N ; -- | battery charge
fun charge_2_N : N ; -- | charge against him
fun chemistFem_N : N ;
fun chemistMasc_N : N ;
fun chieftainFem_N : N ;
fun chieftainMasc_N : N ;
fun chileanFem_N : N ;
fun chileanMasc_N : N ;
fun chineseFem_N : N ;
fun chineseMasc_N : N ;
fun citizenFem_N : N ;
fun citizenMasc_N : N ;
fun clarinetistFem_N : N ;
fun clarinetistMasc_N : N ;
fun club_1_N : N ; -- | member of the club
fun club_2_N : N ; -- | hit the ball with a club
fun coach_1_N : N ; -- | football coach
fun coach_2_N : N ; -- | coach in a train
fun coach_3_N : N ; -- | bus
fun coauthorFem_N : N ;
fun coauthorMasc_N : N ;
fun columnistFem_N : N ;
fun columnistMasc_N : N ;
fun command_1_N : N ; -- | she gave us commands
fun command_2_N : N ; -- | she took the command
fun common_1_A : A ; -- | very common
fun common_2_A : A ; -- | common to us
fun company_1_N : N ;
fun company_2_N : N ;
fun compatriotFem_N : N ;
fun compatriotMasc_N : N ;
fun condition_1_N : N ; -- | there is one condition
fun condition_2_N : N ; -- | he is in a bad condition
fun confidantFem_N : N ;
fun confidantMasc_N : N ;
fun conservative_1_N : N ; -- | a person who is conservative
fun conservative_2_N : N ; -- | a preservative
fun correction_1_N : N; -- | the process of correction
fun correction_2_N : N; -- | the effect of the correction
fun cortege_1_N : N ;
fun cortege_2_N : N ;
fun court_1_N : N ; -- | the emperor's court
fun court_2_N : N ; -- | the supreme court
fun crepe_1_N : N ;
fun crepe_2_N : N ;
fun critical_1_A : A ; -- | you are very critical
fun critical_2_A : A ; -- | of critical importance
fun cure_1_N : N ;
fun cure_2_N : N ;
fun customerFem_N : N ;
fun customerMasc_N : N ;
fun danishFem_N : N ;
fun danishMasc_N : N ;
fun date_1_N : N ; -- | the specified day of the month
fun date_3_N : N ; -- | she was my first date
fun date_3_N : N ; -- | a meeting arranged in advance
fun date_7_N : N ; -- | sweet edible fruit of the date palm with a single long woody seed
fun debaucheeFem_N : N ;
fun debaucheeMasc_N : N ;
fun debris_1_N : N ;
fun debris_2_N : N ;
fun debut_1_N : N ;
fun debut_2_N : N ;
fun debutante_1_N : N ;
fun debutante_2_N : N ;
fun defenderFem_N : N ;
fun defenderMasc_N : N ;
fun degree_1_N : N ; -- | a position on a scale of intensity or amount or quality
fun degree_2_N : N ; -- | an award conferred by a college or university signifying that the recipient has satisfactorily completed a course of study
fun degree_3_N : N ; -- | a unit of temperature on a specified scale
fun dermatologistFem_N : N ;
fun dermatologistMasc_N : N ;
fun discovererFem_N : N ;
fun discovererMasc_N : N ;
fun division_1_N : N ; -- | division at university
fun division_2_N : N ; -- | division in the army
fun division_3_N : N ; -- | multiplication and division
fun draw_1_V2 : V2 ; -- | draw the carriage
fun draw_2_V2 : V2 ; -- | draw a picture
fun driverFem_N : N ; -- | taxi driver
fun driverMasc_N : N ; -- | taxi driver
fun dutchFem_N : N ;
fun dutchMasc_N : N ;
fun economy_1_N : N ; -- | the country has a good economy
fun economy_2_N : N ; -- | saving money
fun elitistFem_N : N ;
fun elitistMasc_N : N ;
fun elocutionistFem_N : N ;
fun elocutionistMasc_N : N ;
fun end_1_N : N ; -- | the end of his life
fun end_2_N : N ; -- | the other end of the room
fun englishFem_N : N ;
fun englishMasc_N : N ;
fun entry_1_N : N ; -- | no entry
fun entry_2_N : N ; -- | lexical entry
fun epilepticFem_N : N ;
fun epilepticMasc_N : N ;
fun evidence_1_N : N ; -- | give me some evidence
fun evidence_2_N : N ; -- | the evidence of his opinion
fun evolutionistFem_N : N ;
fun evolutionistMasc_N : N ;
fun experimenterFem_N : N ;
fun experimenterMasc_N : N ;
fun explorerFem_N : N ;
fun explorerMasc_N : N ;
fun exporterFem_N : N ;
fun exporterMasc_N : N ;
fun expressionistFem_N : N ;
fun expressionistMasc_N : N ;
fun fall_1_N : N ; -- | rise and fall
fun fall_2_N : N ; -- | autumn
fun fan_1_N : N ;
fun fan_2_N : N ;
fun fan_3_N : N ;
fun fanaticFem_N : N ;
fun fanaticMasc_N : N ;
fun fatalistFem_N : N ;
fun fatalistMasc_N : N ;
fun favouriteFem_N : N ;
fun favouriteMasc_N : N ;
fun feministFem_N : N ;
fun feministMasc_N : N ;
fun field_1_N : N ; -- | cotton field
fun field_2_N : N ; -- | field work
fun field_3_N : N ; -- | sports field
fun field_4_N : N ; -- | algebraic structure
fun figure_1_N : N ; -- | a round figure
fun figure_2_N : N ; -- | convincing figures
fun film_1_N : N ; -- | movie
fun film_2_N : N ; -- | thin layer
fun finnishFem_N : N ;
fun finnishMasc_N : N ;
fun fire_1_N : N ; --- ??
fun fire_2_N : N ; --- ??
fun florence_1_PN : PN; -- | the country name
fun florence_2_PN : PN; -- | personal name
fun foreign_1_A : A ; -- | a foreign citizen
fun foreign_2_A : A ; -- | don't throw foreign objects into the toilet
fun fork_1_N : N ;
fun fork_3_N : N ;
fun fork_4_N : N ;
fun frenchFem_N : N ;
fun frenchMasc_N : N ;
fun funambulistFem_N : N ;
fun funambulistMasc_N : N ;
fun future_1_N : N ;
fun future_3_N : N ;
fun futuristFem_N : N ;
fun futuristMasc_N : N ;
fun game_1_N : N ; -- | card game
fun game_2_N : N ; -- | children's game
fun game_3_N : N ; -- | eat game
fun gardenerFem_N : N ;
fun gardenerMasc_N : N ;
fun gastroenterologistFem_N : N ;
fun gastroenterologistMasc_N : N ;
fun geologistFem_N : N ;
fun geologistMasc_N : N ;
fun germanFem_N : N ;
fun germanMasc_N : N ;
fun get_on_1_V2 : V2 ;
fun get_on_2_V2 : V2 ;
fun gipsyFem_N : N ;
fun gipsyMasc_N : N ;
fun greekFem_N : N ;
fun greekMasc_N : N ;
fun ground_1_N : N ; -- | ground zero
fun ground_2_N : N ; -- | on dubious grounds
fun gynecologistFem_N : N ;
fun gynecologistMasc_N : N ;
fun hard_1_A : A ; -- | hard surface
fun hard_2_A : A ; -- | hard problem
fun helperFem_N : N ;
fun helperMasc_N : N ;
fun iFem_Pron : Pron ;
fun importerFem_N : N ;
fun importerMasc_N : N ;
fun in_1_Adv : Adv ; -- | he is in
fun in_2_Adv : Adv ; -- | he goes in
fun independent_1_A : A ; -- | independent of her parents
fun independent_2_A : A ; -- | Andorra is an independent state
fun indianFem_1_N : N ; -- national of India
fun indianFem_1_N : N ; -- national of India
fun indianFem_2_N : N ; -- indian of America
fun indianFem_2_N : N ; -- indian of America
fun indianMasc_1_N : N ; -- national of India
fun indianMasc_1_N : N ; -- national of India
fun indianMasc_2_N : N ; -- indian of America
fun indianMasc_2_N : N ; -- indian of America
fun inheritorFem_N : N ;
fun inheritorMasc_N : N ;
fun intelligence_1_N : N ;
fun intelligence_2_N : N ;
fun interest_1_N : N ; -- | interest in literature
fun interest_2_N : N ; -- | loan with a high interest rate
fun interest_4_N : N ;
fun iranianFem_N : N ;
fun iranianMasc_N : N ;
fun irishFem_N : N ;
fun irishMasc_N : N ;
fun issue_1_N : N ; -- | this is not an issue
fun issue_2_N : N ; -- | the next issue of the magazine
fun italianFem_N : N ;
fun italianMasc_N : N ;
fun japaneseFem_N : N ;
fun japaneseMasc_N : N ;
fun key_1_N : N ; -- | key to my house
fun key_2_N : N ; -- | the D major key
fun key_3_N : N ; -- | the keyboard key
fun last_1_A : A ; -- | the last supper
fun last_2_A : A ; -- | last week
fun laureateFem_N : N ;
fun laureateMasc_N : N ;
fun law_1_N : N ; -- | the law forbids it
fun law_2_N : N ; -- | he studies law
fun league_1_N : N ; -- | league of criminals
fun league_2_N : N ; -- | football league
fun lebaneseFem_N : N ;
fun lebaneseMasc_N : N ;
fun letter_1_N : N ; ---- which is which??
fun letter_2_N : N ;
fun level_1_N : N ; -- | reach a high level
fun level_2_N : N ; -- | level 4 of the building
fun lexicographerFem_N : N ;
fun lexicographerMasc_N : N ;
fun lie_1_V : V ; -- | lie on the ground
fun lie_2_V : V ; -- | tell a lie
fun listenerFem_N : N ;
fun listenerMasc_N : N ;
fun magyarFem_N : N ;
fun magyarMasc_N : N ;
fun malteseFem_N : N ;
fun malteseMasc_N : N ;
fun market_1_N : N ; -- | fish market (place)
fun market_2_N : N ; -- | stock market (abstract)
fun marxistFem_N : N ;
fun marxistMasc_N : N ;
fun master_1_N : N ; -- | master and slave
fun master_2_N : N ; -- | school master
fun match_1_N : N ; -- | football match
fun match_2_N : N ; -- | match box
fun match_3_N : N ; -- | perfect match
fun mateFem_1_N : N ;
fun mateFem_1_N : N ;
fun mateFem_2_N : N ;
fun mateFem_2_N : N ;
fun mateMasc_1_N : N ;
fun mateMasc_1_N : N ;
fun mateMasc_2_N : N ;
fun mateMasc_2_N : N ;
fun mathematicianFem_N : N ;
fun mathematicianMasc_N : N ;
fun matter_1_N : N ; -- | matter and form
fun matter_2_N : N ; -- | what is the matter
fun maturity_1_N : N ;
fun maturity_2_N : N ;
fun maturity_3_N : N ;
fun may_1_VV : VV ; -- be possible
fun may_2_VV : VV ; -- be allowed
fun middlemanFem_N : N ;
fun middlemanMasc_N : N ;
fun minister_1_N : N ; -- | prime minister
fun minister_2_N : N ; -- | minister in church
fun moscow_1_PN : PN ; -- | the Russian capital
fun moscow_2_PN : PN ; -- | city in America
fun move_1_V : V ; -- | it doesn't move any more
fun move_2_V : V ; -- | move to a new house
fun musicianFem_N : N ;
fun musicianMasc_N : N ;
fun mysticFem_N : N ;
fun mysticMasc_N : N ;
fun naive_1_A : A ;
fun naive_2_A : A ;
fun namibianFem_N : N ;
fun namibianMasc_N : N ;
fun nepaliFem_N : N ;
fun nepaliMasc_N : N ;
fun neurologistFem_N : N ;
fun neurologistMasc_N : N ;
fun nobleFem_N : N ;
fun nobleMasc_N : N ;
fun norwegianFem_N : N ;
fun norwegianMasc_N : N ;
fun note_1_N : N ; -- | take notes
fun note_2_N : N ; -- | make notes
fun note_3_N : N ; -- | notes in music
fun number_1_N : N ; -- | number five
fun number_2_N : N ; -- | a number of people
fun number_3_N : N ; -- | numbers singular and plural
fun numerologistFem_N : N ;
fun numerologistMasc_N : N ;
fun offenderFem_N : N ;
fun offenderMasc_N : N ;
fun officer_1_N : N ; -- | financial officer
fun officer_2_N : N ; -- | army officer
fun officer_3_N : N ; -- | police officer
fun officialFem_N : N ;
fun officialMasc_N : N ;
fun opponentFem_N : N ;
fun opponentMasc_N : N ;
fun opportunistFem_N : N ;
fun opportunistMasc_N : N ;
fun optimistFem_N : N ;
fun optimistMasc_N : N ;
fun orange_1_N : N ; -- | round yellow to orange fruit of any of several citrus trees
fun orange_2_N : N ; -- | orange color or pigment ; any of a range of colors between red and yellow
fun oratorFem_N : N ;
fun oratorMasc_N : N ;
fun orientalistFem_N : N ;
fun orientalistMasc_N : N ;
fun originatorFem_N : N ;
fun originatorMasc_N : N ;
fun ornithologistFem_N : N ;
fun ornithologistMasc_N : N ;
fun orologistFem_N : N ;
fun orologistMasc_N : N ;
fun ottomanFem_N : N ;
fun ottomanMasc_N : N ;
fun pacifistFem_N : N ;
fun pacifistMasc_N : N ;
fun pakistaniFem_N : N ;
fun pakistaniMasc_N : N ;
fun pamphleteerFem_N : N ;
fun pamphleteerMasc_N : N ;
fun paris_1_PN : PN ; -- | capital of France
fun paris_2_PN : PN ; -- | city in America
fun party_1_N : N ; -- | birthday party
fun party_2_N : N ; -- | political party
fun pate_1_N : N ;
fun pate_2_N : N ;
fun peasantFem_N : N ;
fun peasantMasc_N : N ;
fun pedagogueFem_N : N ;
fun pedagogueMasc_N : N ;
fun performance_1_N : N ; -- | high level of performance
fun performance_2_N : N ; -- | he made a strange performance
fun perfumerFem_N : N ;
fun perfumerMasc_N : N ;
fun period_1_N : N ; -- | it was a long period in her life
fun period_2_N : N ; -- | period or comma
fun period_3_N : N ; -- | she had her period
fun persianFem_N : N ;
fun persianMasc_N : N ;
fun pessimistFem_N : N ;
fun pessimistMasc_N : N ;
fun pianistFem_N : N ;
fun pianistMasc_N : N ;
fun play_1_V : V ; -- | play in a football team
fun play_1_V2 : V2 ; -- | play football
fun play_2_V : V ; -- | children play
fun play_2_V2 : V2 ; -- | play mum and dad
fun play_3_V : V ; -- | play in the band
fun play_3_V2 : V2 ; -- | play the guitar
fun point_1_N : N ; -- | at this point
fun point_2_N : N ; -- | he got six points
fun polishFem_N : N ;
fun polishMasc_N : N ;
fun polyglotFem_N : N ;
fun polyglotMasc_N : N ;
fun poor_1_A : A ; -- | poor or rich
fun poor_2_A : A ; -- | poor him
fun poor_3_A : A ; -- | poor quality
fun practitionerFem_N : N ;
fun practitionerMasc_N : N ;
fun presidentFem_N : N ;
fun presidentMasc_N : N ;
fun programmerFem_N : N ;
fun programmerMasc_N : N ;
fun property_1_N : N ; -- | some bad properties
fun property_2_N : N ; -- | an enormous property
fun prosecutorFem_N : N ;
fun prosecutorMasc_N : N ;
fun protectionistFem_N : N ;
fun protectionistMasc_N : N ;
fun race_1_N : N ; -- | win the race
fun race_2_N : N ; -- | the human race
fun racistFem_N : N ;
fun racistMasc_N : N ;
fun rationalistFem_N : N ;
fun rationalistMasc_N : N ;
fun recognize_1_V2 : V2 ;
fun recognize_4_V2 : V2 ;
fun record_1_N : N ; -- | Guinness book of records
fun record_2_N : N ; -- | Beatles records
fun record_3_N : N ; -- | we keep a record of visitors
fun regime_1_N : N ;
fun regime_2_N : N ;
fun renegadeFem_N : N ;
fun renegadeMasc_N : N ;
fun reporterFem_N : N ;
fun reporterMasc_N : N ;
fun representativeFem_N : N ;
fun representativeMasc_N : N ;
fun rescuerFem_N : N ;
fun rescuerMasc_N : N ;
fun researcherFem_N : N ;
fun researcherMasc_N : N ;
fun revisionistFem_N : N ;
fun revisionistMasc_N : N ;
fun riderFem_N : N ;
fun riderMasc_N : N ;
fun right_1_A : A ; -- | right or wrong
fun right_1_Adv : Adv ; -- | right or wrong
fun right_2_A : A ; -- | right or left
fun right_2_Adv : Adv ; -- | right or left
fun ring_4_V2 : V2 ; -- | get or try to get into communication (with someone) by telephone
fun ring_6_V2 : V2 ; -- | attach a ring to the foot of, in order to identify
fun role_1_N : N ;
fun role_2_N : N ;
fun romanianFem_N : N ;
fun romanianMasc_N : N ;
fun room_1_N : N ; -- | five rooms
fun room_2_N : N ; -- | there is room for five
fun russianFem_N : N ;
fun russianMasc_N : N ;
fun saboteurFem_N : N ;
fun saboteurMasc_N : N ;
fun sadomasochistFem_N : N ;
fun sadomasochistMasc_N : N ;
fun sake_1_N : N ;
fun sake_2_N : N ;
fun sellerFem_N : N ;
fun sellerMasc_N : N ;
fun servantFem_N : N ;
fun servantMasc_N : N ;
fun set_1_N : N ; -- | a reparation set
fun set_2_N : N ; -- | an infinite set
fun shopperFem_N : N ;
fun shopperMasc_N : N ;
fun singaporeanFem_N : N ;
fun singaporeanMasc_N : N ;
fun single_1_A : A ; -- | a single ticket
fun single_2_A : A ; -- | a single woman
fun solicitorFem_N : N ;
fun solicitorMasc_N : N ;
fun somaliFem_N : N ;
fun somaliMasc_N : N ;
fun somalianFem_N : N ;
fun somalianMasc_N : N ;
fun sophistFem_N : N ;
fun sophistMasc_N : N ;
fun spanishFem_N : N ;
fun spanishMasc_N : N ;
fun spartanFem_N : N ;
fun spartanMasc_N : N ;
fun spectatorFem_N : N ;
fun spectatorMasc_N : N ;
fun speculatorFem_N : N ;
fun speculatorMasc_N : N ;
fun spiritualistFem_N : N ;
fun spiritualistMasc_N : N ;
fun spouseFem_N : N ;
fun spouseMasc_N : N ;
fun spring_1_N : N ;
fun spring_2_N : N ;
fun spring_3_N : N ;
fun spring_4_N : N ;
fun staff_1_N : N ; -- | staff of 50 persons
fun staff_2_N : N ; -- | pike staff
fun starter_1_N : N ;
fun starter_2_N : N ;
fun starter_3_N : N ;
fun starter_4_N : N ;
fun starter_5_N : N ;
fun starter_6_N : N ;
fun starter_7_N : N ;
fun state_1_N : N ; -- | independent state
fun state_2_N : N ; -- | state of affairs
fun statisticianFem_N : N ;
fun statisticianMasc_N : N ;
fun strike_1_N : N ; -- | a group's refusal to work in protest against low pay or bad work conditions
fun strike_2_N : N ; -- | an attack that is intended to seize or inflict damage on or destroy an objective
fun studentFem_N : N ;
fun studentMasc_N : N ;
fun subject_1_N : N ; -- | subject matter
fun subject_2_N : N ; -- | subject and object
fun suckerFem_N : N ;
fun suckerMasc_N : N ;
fun swedeFem_N : N ;
fun swedeMasc_N : N ;
fun swedishFem_N : N ;
fun swedishMasc_N : N ;
fun syndicalistFem_N : N ;
fun syndicalistMasc_N : N ;
fun taiwaneseFem_N : N ;
fun taiwaneseMasc_N : N ;
fun tambour_1_N : N ;
fun tambour_2_N : N ;
fun teacherFem_N : N ;
fun teacherMasc_N : N ;
fun tectonic_1_A : A ; -- | tectonic plates
fun tectonic_2_A : A ; -- | the architectural term
fun telephonistFem_N : N ;
fun telephonistMasc_N : N ;
fun thaiFem_N : N ;
fun thaiMasc_N : N ;
fun theyFem_Pron : Pron ;
fun thinkerFem_N : N ;
fun thinkerMasc_N : N ;
fun thrusterFem_N : N ;
fun thrusterMasc_N : N ;
fun time_1_N : N ; -- | we have no time
fun time_2_N : N ; -- | I was there four times
fun torch_1_N : N ; -- | a light usually carried in the hand; consists of some flammable substance
fun torch_2_N : N ; -- | a small portable battery-powered electric lamp
fun torch_3_N : N ; -- | a burner that mixes air and gas to produce a very hot flame
fun traineeFem_N : N ;
fun traineeMasc_N : N ;
fun turkishFem_N : N ;
fun turkishMasc_N : N ;
fun typical_1_A : A ;
fun typical_2_A : A ;
fun typical_3_A : A ;
fun understudyFem_N : N ;
fun understudyMasc_N : N ;
fun unit_1_N : N ;
fun unit_2_N : N ;
fun unit_3_N : N ;
fun unit_4_N : N ;
fun unit_5_N : N ;
fun unit_6_N : N ;
fun userFem_N : N ;
fun userMasc_N : N ;
fun variety_1_N : N ; -- | there's a great variety
fun variety_2_N : N ; -- | the best variety
fun vegetarianFem_N : N ;
fun vegetarianMasc_N : N ;
fun venereologistFem_N : N ;
fun venereologistMasc_N : N ;
fun view_1_N : N ; -- | room with a view
fun view_2_N : N ; -- | people with strange views
fun violinistFem_N : N ;
fun violinistMasc_N : N ;
fun violistFem_N : N ;
fun violistMasc_N : N ;
fun volunteerFem_N : N ;
fun volunteerMasc_N : N ;
fun watch_1_V2 : V2 ; -- | watch the tv
fun watch_2_V2 : V2 ; -- | watch the bank
fun watcherFem_N : N ;
fun watcherMasc_N : N ;
fun way_1_N : N ; -- | the way to the city
fun way_2_N : N ; -- | do it the proper way
fun weFem_Pron : Pron ;
fun weaverFem_N : N ;
fun weaverMasc_N : N ;
fun web_1_N : N ; -- | www
fun web_2_N : N ; -- | spider web
fun work_1_V : V ; -- | I just work here
fun work_2_V : V ; -- | the computer doesn't work
fun yet_1_Adv : Adv ; -- | we are not there yet
fun yet_2_Adv : Adv ; -- | yet he was not satisfied
fun youPlFem_Pron : Pron ;
fun youPolFem_Pron : Pron ;
fun youSgFem_Pron : Pron ;
fun zealotFem_N : N ;
fun zealotMasc_N : N ;

View File

@@ -1,283 +0,0 @@
fun actor_1_N : N ; -- | a Shakespeare actor
fun actor_2_N : N ; -- | an important actor
fun apply_1_V2 : V2 ; -- | we apply the newest methods
fun apply_2_V2 : V2 ; -- | we apply for a job
fun area_1_N : N ; -- | mountaineous area
fun area_2_N : N ; -- | area of specialization
fun area_3_N : N ; -- | the abdominal area
fun area_4_N : N ; -- | closed area of employment
fun area_5_N : N ; -- | cooking area
fun area_6_N : N ; -- | the area of a rectangle
fun arm_1_N : N ; -- | arms and legs
fun arm_2_N : N ; -- | a farewell to arms
fun attempt_1_N : N ; -- | first attempt at driving a car
fun attempt_2_N : N ; -- | an attempt on his life
fun authority_1_N : N ; -- | he is an authority in his field
fun authority_2_N : N ; -- | the police and other authorities
fun away_1_Adv : Adv ; -- | she is away
fun away_2_Adv : Adv ; -- | she went away
fun bar_1_N : N ; -- | have a drink in the bar
fun bar_2_N : N ; -- | bars in front of the window
fun board_1_N : N ; -- | write it on the board
fun board_2_N : N ; -- | board member
fun brassiere_1_N : N ;
fun brassiere_2_N : N ;
fun can_1_VV : VV ; -- | I can come with you (possibility)
fun can_2_VV : VV ; -- | I can speak English (know-how)
fun canon_1_N : N ;
fun canon_2_N : N ;
fun capital_1_N : N ; -- | the capital of France
fun capital_2_N : N ; -- | risk capital
fun capital_3_N : N ; -- | written in capitals
fun certain_1_A : A ; -- | I am certain
fun certain_2_A : A ; -- | a certain house
fun charabanc_1_N : N ;
fun charabanc_2_N : N ;
fun character_1_N : N ; --| personality
fun character_2_N : N ; --| unicode
fun charge_1_N : N ; -- | battery charge
fun charge_2_N : N ; -- | charge against him
fun check_1_V2 : V2 ; -- | inspect, examine
fun check_2_V2 : V2 ; -- | mark with a checkmark
fun club_1_N : N ; -- | member of the club
fun club_2_N : N ; -- | hit the ball with a club
fun coach_1_N : N ; -- | football coach
fun coach_2_N : N ; -- | coach in a train
fun coach_3_N : N ; -- | bus
fun command_1_N : N ; -- | she gave us commands
fun command_2_N : N ; -- | she took the command
fun common_1_A : A ; -- | very common
fun common_2_A : A ; -- | common to us
fun company_1_N : N ; -- | start-up company
fun company_2_N : N ; -- | enjoy their company
fun condition_1_N : N ; -- | there is one condition
fun condition_2_N : N ; -- | he is in a bad condition
fun cortege_1_N : N ;
fun cortege_2_N : N ;
fun court_1_N : N ; -- | the emperor's court
fun court_2_N : N ; -- | the supreme court
fun crepe_1_N : N ;
fun crepe_2_N : N ;
fun critical_1_A : A ; -- | you are very critical
fun critical_2_A : A ; -- | of critical importance
fun cure_1_N : N ;
fun cure_2_N : N ;
fun date_1_N : N ; -- | the specified day of the month
fun date_3_N : N ; -- | she was my first date
fun date_3_N : N ; -- | a meeting arranged in advance
fun date_7_N : N ; -- | sweet edible fruit of the date palm with a single long woody seed
fun debris_1_N : N ;
fun debris_2_N : N ;
fun debut_1_N : N ;
fun debut_2_N : N ;
fun debutante_1_N : N ;
fun debutante_2_N : N ;
fun degree_1_N : N ; -- | a position on a scale of intensity or amount or quality
fun degree_2_N : N ; -- | an award conferred by a college or university signifying that the recipient has satisfactorily completed a course of study
fun degree_3_N : N ; -- | a unit of temperature on a specified scale
fun division_1_N : N ; -- | division at university
fun division_2_N : N ; -- | division in the army
fun division_3_N : N ; -- | multiplication and division
fun draw_1_V2 : V2 ; -- | draw the carriage
fun draw_2_V2 : V2 ; -- | draw a picture
fun economy_1_N : N ; -- | the country has a good economy
fun economy_2_N : N ; -- | saving money
fun end_1_N : N ; -- | the end of his life
fun end_2_N : N ; -- | the other end of the room
fun entry_1_N : N ; -- | no entry
fun entry_2_N : N ; -- | lexical entry
fun evidence_1_N : N ; -- | give me some evidence
fun evidence_2_N : N ; -- | the evidence of his opinion
fun fall_1_N : N ; -- | rise and fall
fun fall_2_N : N ; -- | autumn
fun fan_1_N : N ;
fun fan_2_N : N ;
fun fan_3_N : N ;
fun field_1_N : N ; -- | cotton field
fun field_2_N : N ; -- | field work
fun field_3_N : N ; -- | sports field
fun field_4_N : N ; -- | algebraic structure
fun figure_1_N : N ; -- | a round figure
fun figure_2_N : N ; -- | convincing figures
fun film_1_N : N ; -- | movie
fun film_2_N : N ; -- | thin layer
fun fire_1_N : N ; --- ??
fun fire_2_N : N ; --- ??
fun fit_1_V2 : V2 ; -- | this shirt doesn't fit me
fun fit_2_V2 : V2 ; -- | fit a line to the data
fun foreign_1_A : A ; -- | a foreign citizen
fun foreign_2_A : A ; -- | don't throw foreign objects into the toilet
fun fork_1_N : N ;
fun fork_3_N : N ;
fun fork_4_N : N ;
fun future_1_N : N ;
fun future_3_N : N ;
fun game_1_N : N ; -- | card game
fun game_2_N : N ; -- | children's game
fun game_3_N : N ; -- | eat game
fun get_on_1_V2 : V2 ;
fun get_on_2_V2 : V2 ;
fun goal_1_N : N ; --| my goal in life
fun goal_2_N : N ; --| sports: area in which you try to put an object
fun goal_3_N : N ; --| sports: act of placing the object into the goal
fun ground_1_N : N ; -- | ground zero
fun ground_2_N : N ; -- | on dubious grounds
fun hard_1_A : A ; -- | hard surface
fun hard_2_A : A ; -- | hard problem
fun in_1_Adv : Adv ; -- | he is in
fun in_2_Adv : Adv ; -- | he goes in
fun independent_1_A : A ; -- | independent of her parents
fun independent_2_A : A ; -- | Andorra is an independent state
fun intelligence_1_N : N ;
fun intelligence_2_N : N ;
fun interest_1_N : N ; -- | interest in literature
fun interest_2_N : N ; -- | loan with a high interest rate
fun interest_4_N : N ;
fun issue_1_N : N ; -- | this is not an issue
fun issue_2_N : N ; -- | the next issue of the magazine
fun key_1_N : N ; -- | key to my house
fun key_2_N : N ; -- | the D major key
fun last_1_A : A ; -- | the last supper
fun last_2_A : A ; -- | last week
fun law_1_N : N ; -- | the law forbids it
fun law_2_N : N ; -- | he studies law
fun league_1_N : N ; -- | league of criminals
fun league_2_N : N ; -- | football league
fun letter_1_N : N ; ---- which is which?? -- at least in finnish this
is letter to your mom, and letter2 is like letter H
fun letter_2_N : N ;
fun level_1_N : N ; -- | reach a high level
fun level_2_N : N ; -- | level 4 of the building
fun lie_1_V : V ; -- | lie on the ground
fun lie_2_V : V ; -- | tell a lie
fun market_1_N : N ; -- | fish market (place)
fun market_2_N : N ; -- | stock market (abstract)
fun master_1_N : N ; -- | master and slave
fun master_2_N : N ; -- | school master
fun match_1_N : N ; -- | football match
fun match_2_N : N ; -- | match box
fun match_3_N : N ; -- | perfect match
fun mate_1_N : N ;
fun mate_2_N : N ;
fun matter_1_N : N ; -- | matter and form
fun matter_2_N : N ; -- | what is the matter
fun maturity_1_N : N ;
fun maturity_2_N : N ;
fun maturity_3_N : N ;
fun may_1_VV : VV ; -- be possible
fun may_2_VV : VV ; -- be allowed
fun minister_1_N : N ; -- | prime minister
fun minister_2_N : N ; -- | minister in church
fun miss_1_V2 : V2 ; --| missed my chance
fun miss_2_V2 : V2 ; --| I miss you
fun miss_3_V2 : V2 ; --| missed the class
fun move_1_V : V ; -- | it doesn't move any more
fun move_2_V : V ; -- | move to a new house
fun naive_1_A : A ;
fun naive_2_A : A ;
fun note_1_N : N ; -- | take notes
fun note_2_N : N ; -- | make notes
fun note_3_N : N ; -- | notes in music
fun number_1_N : N ; -- | number five
fun number_2_N : N ; -- | a number of people
fun number_3_N : N ; -- | numbers singular and plural
fun officer_1_N : N ; -- | financial officer
fun officer_2_N : N ; -- | army officer
fun officer_3_N : N ; -- | police officer
fun orange_1_N : N ; -- | round yellow to orange fruit of any of several citrus trees
fun orange_2_N : N ; -- | orange color or pigment ; any of a range of colors between red and yellow
fun party_1_N : N ; -- | birthday party
fun party_2_N : N ; -- | political party
fun pate_1_N : N ;
fun pate_2_N : N ;
fun performance_1_N : N ; -- | high level of performance
fun performance_2_N : N ; -- | he made a strange performance
fun period_1_N : N ; -- | it was a long period in her life
fun period_2_N : N ; -- | period or comma
fun period_3_N : N ; -- | she had her period
fun play_1_V : V ; -- | play in a football team
fun play_1_V2 : V2 ; -- | play football
fun play_2_V : V ; -- | children play
fun play_2_V2 : V2 ; -- | play mum and dad
fun play_3_V : V ; -- | play in the band
fun play_3_V2 : V2 ; -- | play the guitar
fun point_1_N : N ; -- | at this point
fun point_2_N : N ; -- | he got six points
fun poor_1_A : A ; -- | poor or rich
fun poor_2_A : A ; -- | poor him
fun poor_3_A : A ; -- | poor quality
fun present_1_N : N ; -- | I bought you a present
fun present_2_N : N ; -- | past and present
fun property_1_N : N ; -- | some bad properties
fun property_2_N : N ; -- | an enormous property
fun race_1_N : N ; -- | win the race
fun race_2_N : N ; -- | the human race
fun recognize_1_V2 : V2 ; --| acknowledge; I recognize my mistake
fun recognize_4_V2 : V2 ; --| distinguish from something
fun record_1_N : N ; -- | Guinness book of records
fun record_2_N : N ; -- | Beatles records
fun record_3_N : N ; -- | we keep a record of visitors
fun regime_1_N : N ;
fun regime_2_N : N ;
fun right_1_A : A ; -- | right or wrong
fun right_1_Adv : Adv ; -- | right or wrong
fun right_2_A : A ; -- | right or left
fun right_2_Adv : Adv ; -- | right or left
fun ring_4_V2 : V2 ; -- | get or try to get into communication (with someone) by telephone
fun ring_6_V2 : V2 ; -- | attach a ring to the foot of, in order to identify
fun role_1_N : N ;
fun role_2_N : N ;
fun room_1_N : N ; -- | five rooms
fun room_2_N : N ; -- | there is room for five
fun sake_1_N : N ;
fun sake_2_N : N ;
fun set_1_N : N ; -- | a reparation set
fun set_2_N : N ; -- | an infinite set
fun share_1_V2 : V2 ; -- | share the wealth
fun share_2_V2 : V2 ; -- | we share a language (have in common)
fun sign_1_N : N ; --| sign language
fun sign_2_N : N ; --| visible indication
fun single_1_A : A ; -- | a single ticket
fun single_2_A : A ; -- | a single woman
fun staff_1_N : N ; -- | staff of 50 persons
fun staff_2_N : N ; -- | pike staff
fun starter_1_N : N ;
fun starter_2_N : N ;
fun starter_3_N : N ;
fun starter_4_N : N ;
fun starter_5_N : N ;
fun starter_6_N : N ;
fun starter_7_N : N ;
fun state_1_N : N ; -- | independent state
fun state_2_N : N ; -- | state of affairs
fun strike_1_N : N ; -- | a group's refusal to work in protest against low pay or bad work conditions
fun strike_2_N : N ; -- | an attack that is intended to seize or inflict damage on or destroy an objective
fun subject_1_N : N ; -- | subject matter
fun subject_2_N : N ; -- | subject and object
fun tell_1_V3 : V3 ; -- | tell him a story
fun tell_2_V3 : V3 ; -- | tell heaven from hell
fun time_1_N : N ; -- | we have no time
fun time_2_N : N ; -- | I was there four times
fun typical_1_A : A ;
fun typical_2_A : A ;
fun typical_3_A : A ;
fun unit_1_N : N ;
fun unit_2_N : N ;
fun unit_3_N : N ;
fun unit_4_N : N ;
fun unit_5_N : N ;
fun unit_6_N : N ;
fun variety_1_N : N ; -- | there's a great variety
fun variety_2_N : N ; -- | the best variety
fun view_1_N : N ; -- | room with a view
fun view_2_N : N ; -- | people with strange views
fun watch_1_V2 : V2 ; -- | watch the tv
fun watch_2_V2 : V2 ; -- | watch the bank
fun way_1_N : N ; -- | the way to the city
fun way_2_N : N ; -- | do it the proper way
fun web_1_N : N ; -- | www
fun web_2_N : N ; -- | spider web
fun work_1_V : V ; -- | I just work here
fun work_2_V : V ; -- | the computer doesn't work
fun yet_1_Adv : Adv ; -- | we are not there yet
fun yet_2_Adv : Adv ; -- | yet he was not satisfied

View File

@@ -1,247 +0,0 @@
Steps for Extending RGL to a Large Scale Translation Grammar
We will add Dutch to the system of big translation grammars.
=The Translate grammar=
This is where we are
$ pwd
/Users/aarne/GF/lib/src/translator
We start from files for German
$ ls -l *Ger.gf
-rw-r--r-- 1 aarne staff 1615550 Apr 10 23:38 DictionaryGer.gf
-rw-r--r-- 1 aarne staff 3042 Jan 22 15:39 ExtensionsGer.gf
-rw-r--r-- 1 aarne staff 662 Apr 9 11:14 TranslateGer.gf
We make copies of these ones
$ cp -p ExtensionsGer.gf ExtensionsDut.gf
$ cp -p TranslateGer.gf TranslateDut.gf
Then we change Ger->Dut in these files
We take the common parts of a dictionary ; Ger doesn't have them this way but Spa does
$ grep "L\." DictionarySpa.gf >DictionaryDut.gf
$ grep "S\." DictionarySpa.gf >>DictionaryDut.gf
Then we add a header, copying from DictionarySpa and changing Spa->Dut. And of course a "}" to the end!
concrete DictionarySpa of Dictionary = CatSpa
** open ParadigmsSpa, MorphoSpa, IrregSpa, (L=LexiconSpa), (S=StructuralSpa), Prelude in {
We can now try compile this, using -s to suppress 60k warnings about missing linearizations:
$ gf -s DictionaryDut.gf
This goes fine - but what about the translator itself?
$ gf -s TranslateDut.gf
File TenseDut.gf does not exist.
Just change it to TenseX as in many other languages, as Dutch has no special tenses. Try again (in GF shell):
> i TranslateDut.gf
File ConstructionDut.gf does not exist.
Let us just comment this inheritance out from TranslateDut, like in some other languages where
this module is not yet available. The same with DocumentationDut.
---- ConstructionDut,
---- DocumentationDut,
I use four dashes for comments meaning "to be fixed soon". Try again:
> i TranslateDut.gf
File ChunkDut.gf does not exist.
This is more critical, since we want a robust translator! Let's fix this:
$ cd ../chunk/
$ cp -p ChunkGer.gf ChunkDut.gf
$ cd ../translator/
Again, go to ChunkDut.gf and change Ger->Dut. Also look for double quotes and change strings in them. E.g.
copula_inf_Chunk = ss "sein" --> copula_inf_Chunk = ss "zijn"
Now try again (in GF):
> i TranslateDut.gf
Warning: In inherited module Extensions,
...
no occurrence of element BaseVPI
Now we notice that ExtraDut is just a dummy module. We comment out all references to it in ExtensionsDut; of course we
will fix ExtraDut later. E.g.
---- BaseVPI = E.BaseVPI ;
We could continue commenting out things that don't compile. We could just give up and comment out ExtensionsDut from TranslateDut.
It doesn't use many functions anyway...
---- ExtensionsDut [CompoundCN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash],
Unfortunately, ChunkDut also needs it. So let's at least make it compile by commenting out all offensive functions.
There is not much left, and in ChunkDut we also comment out whatever the compiler complains about, with four dashes.
We obtain
concrete ChunkDut of Chunk = CatDut
---- , ExtensionsDut
**
ChunkFunctor - [UseVC, VPS_Chunk, emptyNP, VPI_Chunk]
with (Syntax = SyntaxDut), (Extensions = ExtensionsDut)
**
open
SyntaxDut, (E = ExtensionsDut), Prelude,
ResDut, (P = ParadigmsDut) in {
Et voilà:
> i TranslateDut.gf
linking ... OK
Languages: TranslateDut
Let us try it:
> gr | l -treebank
Translate: ChunkPhr (PlusChunk fullstop_Chunk (OneChunk refl_SgP1_Chunk))
TranslateDut: * . mij zelf
Let us make it compilable in GF/lib/src/Makefile by adding entries for TranslateDut and Translate11 - since we now have 11 languages.
Again, we can look for TranslateGer and make a copy beside it, as well as Translate10:
TranslateGer: TranslateGer.pgf
TranslateDut: TranslateDut.pgf
TranslateDut.pgf:: ; $(GFMKT) -name=TranslateDut translator/TranslateDut.gf
# Without dependencies:
Translate11:
$(GFMKT) -name=Translate11 $(TRANSLATE11) +RTS -K32M
# With dependencies:
Translate11.pgf: $(TRANSLATE10)
$(GFMKT) -name=Translate11 $(TRANSLATE11) +RTS -K32M
Since we have everything up to date in Translate10, let us just add the necessary new things to include Dut:
$ pwd
/Users/aarne/GF/lib/src
$ make TranslateDut.pgf
$ make Translate11
We can first try it in the plain C runtime:
$ pgf-translate Translate11.pgf Phr TranslateEng TranslateDut
> what is this
0.07 sec
[18.070923] ChunkPhr (OneChunk (QS_Chunk (UseQCl (TTAnt TPres ASimul) PPos (QuestIComp (CompIP whatSg_IP)
(DetNP (DetQuant this_Quant NumSg))))))
* wat is dit
wat is dit
> can we translate now
0.19 sec
[35.258053] ChunkPhr (OneChunk (QS_Chunk (UseQCl (TTAnt TPres ASimul) PPos (QuestCl (PredVP (UsePron we_Pron)
(AdvVP (ComplVV can_1_VV (UseV translate_V)) now_Adv))))))
* kunnen we nu [translate_V]
kunnen we nu [translate_V]
What about the web application?
First make the new grammar accessible:
cd GF/src/www/robust/
$ ls
App10.pgf Translate10.pgf Translate8.pgf
$ ln -s /Users/aarne/GF/lib/src/Translate11.pgf
Then update the reference to this grammar - change Translate10 to Translate11 in one place:
$ cd ..
$ grep Translate10 */*.js
js/gftranslate.js:gftranslate.jsonurl="/robust/Translate10.pgf"
Try start the gf server
gf -server --document-root=/Users/aarne/GF/src/www/
Point your browser to http://localhost:41296/wc.html
Wait a bit, and you will see Dutch among the available languages!
=Building the Android app=
Navigate to the App directory and create AppDut; also change Ger->Dut as before
$ pwd
/Users/aarne/GF/examples/app
$ cp -p AppGer.gf AppDut.gf
Extend the Makefile as before:
TRANSLATE11=$(TRANSLATE10) AppDut.pgf
# Without dependencies:
App11:
$(GFMKT) -name=App11 $(TRANSLATE11) +RTS -K200M
Make it:
$ make AppDut.pgf
$ make App11
Check that all languages are consistently included:
$ gf +RTS -K200M App11.pgf
Languages: AppBul AppChi AppDut AppEng AppFin AppFre AppGer AppHin AppIta AppSpa AppSwe
App> l house_N
къща
房 子
huis
house
talo
maison
Haus
शाला
casa
casa
hus
Now follow the instructions in README in the app/ directory.
You also need to add to Translator.java, in a place near AppGer reference,
new Language("nl-NL", "Dutch", "AppDut", R.xml.qwerty),
=The TopDictionary=
Once you have DictionaryDut, go to GF/lib/src/translate/ and do
$ ghci
Prelude> :l CheckDict.hs
*Main> createConcrete "Dut"
This creates the file GF/lib/src/translate/todo/tmp/TopDictionaryDut.gf, which has words in frequency order.
Copy this one level up, to GF/lib/src/translate/todo/TopDictionaryDut.gf, and follow the instructions in
http://www.grammaticalframework.org/lib/src/translator/todo/check-dictionary.html
to improve the dictionary in frequency order.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More