1
0
forked from GitHub/gf-core

fix the compilation of LangTur

This commit is contained in:
kr.angelov
2013-09-01 11:48:02 +00:00
parent 1f3f604c99
commit 07b0cc7926
6 changed files with 43 additions and 48 deletions

View File

@@ -16,21 +16,21 @@ concrete CatTur of Cat = CommonX ** open ResTur, Prelude in {
Card = {s : Number => Case => Str} ;
Ord = {s : Number => Case => Str} ;
Quant = {s : Str} ;
Prep = {s : Str} ;
Prep = Compl ;
Numeral = {s : CardOrd => Number => Case => Str ; n : Number} ;
Digits = {s : CardOrd => Number => Case => Str ; n : Number; tail : DTail} ;
-- Open lexical classes, e.g. Lexicon
V, VS, VQ, VA = Verb ;
V2, V2Q, V2V, V2A, V2S = Verb ** {c : Case; p : Prep} ;
V3 = Verb ** {c1 : Case; p1 : Prep; c2 : Case; p2 : Prep} ;
V2, V2Q, V2V, V2A, V2S = Verb ** {c : Compl} ;
V3 = Verb ** {c1,c2 : Compl} ;
A = Adjective ;
A2 = Adjective ** {c : Case; p : Prep} ;
A2 = Adjective ** {c : Compl} ;
N = Noun ;
N2 = Noun ** {c : Case} ;
N3 = Noun ** {c1 : Case; c2 : Case} ;
N2 = Noun ** {c : Compl} ;
N3 = Noun ** {c1,c2 : Compl} ;
PN = Noun ;
}
}

View File

@@ -27,5 +27,5 @@ concrete IrregTur of IrregTurAbs = CatTur ** open ParadigmsTur, ResTur in {
ol_Aux : Verb = mkV "olmak" SgSylConIrreg ;
koy_Aux : Verb = mkV "koymak" ;
gec_Aux : Verb = mkV "geçmek" ;
against_Prep : Prep = mkPrep "karşı" ;
against_Prep : Prep = mkPrep "karşı" Dat;
}

View File

@@ -269,8 +269,8 @@ concrete LexiconTur of Lexicon = CatTur **
eat_V2 = mkV2 (mkV "yemek" "yemek" "yimek") ;
fall_V = mkV "düşmek" ;
fear_VS = mkV "korkmak" ;
fear_V2 = mkV2 IrregTur.fear_V Ablat;
fight_V2 = mkV2 (mkV "dövüşmek") Dat against_Prep;
fear_V2 = mkV2 IrregTur.fear_V ablat_Case;
fight_V2 = mkV2 (mkV "dövüşmek") against_Prep;
find_V2 = mkV2 (mkV "bulmak" SgSylConIrreg) ;
float_V = mkV "yüzmek" ;
flow_V = mkV "akmak" ;
@@ -279,9 +279,9 @@ concrete LexiconTur of Lexicon = CatTur **
freeze_V = mkV "donmak" ;
give_V3 = mkV3 (mkV "vermek" SgSylConIrreg) ;
go_V = mkV "gitmek" "gidmek" ;
hate_V2 = mkV2 IrregTur.hate_V Ablat;
hate_V2 = mkV2 IrregTur.hate_V ablat_Case;
hear_V2 = mkV2 (mkV "duymak") ;
hit_V2 = mkV2 IrregTur.hit_V Dat;
hit_V2 = mkV2 IrregTur.hit_V dat_Case;
hold_V2 = mkV2 (mkV "tutmak") ;
hope_VS = mkV "ummak" ;
hunt_V2 = mkV2 (mkV "avlamak") ;
@@ -291,9 +291,9 @@ concrete LexiconTur of Lexicon = CatTur **
know_VS = mkV "bilmek" ;
laugh_V = mkV "gülmek" ;
learn_V2 = mkV2 (mkV "öğrenmek") ;
leave_V2 = mkV2 IrregTur.leave_V Ablat;
leave_V2 = mkV2 IrregTur.leave_V ablat_Case;
lie_V = mkV "yalan" soyle_Aux ;
like_V2 = mkV2 IrregTur.like_V Ablat;
like_V2 = mkV2 IrregTur.like_V ablat_Case;
listen_V2 = mkV2 (mkV "dinlemek") ;
live_V = mkV "yaşamak" ;
lose_V2 = mkV2 (mkV "yitirmek") ;
@@ -332,7 +332,7 @@ concrete LexiconTur of Lexicon = CatTur **
swim_V = mkV "yüzmek" ;
switch8off_V2 = mkV2 (mkV "kapatmak") ;
switch8on_V2 = mkV2 (mkV "açmak") ;
talk_V3 = mkV3 (mkV "konuşmak") Acc no_Prep Acc with_Prep ;
talk_V3 = mkV3 (mkV "konuşmak") acc_Case with_Prep ;
teach_V2 = mkV2 (mkV "öğretmek") ;
think_V = mkV "düşünmek" ;
throw_V2 = mkV2 (mkV "atmak") ;

View File

@@ -36,18 +36,16 @@ oper
mkV2 : overload {
-- make V2, use default case and preposition which are accusative case and no preposition
mkV2 : (sormak : Verb) -> Verb ** {c : Case; p : Prep} ;
mkV2 : (sormak : Verb) -> Verb ** {c : Compl} ;
-- make V2, set case explicitly
mkV2 : (korkmak : Verb) -> (dat : Case) -> Verb ** {c : Case; p : Prep} ;
-- make V2, set case and preposition explicitly
mkV2 : (dovusmek : Verb) -> (dat : Case) -> (against : Prep) -> Verb ** {c : Case; p : Prep} ;
mkV2 : (korkmak : Verb) -> Compl -> Verb ** {c : Compl} ;
} ;
mkV3 : overload {
-- make V3, use default cases and prepositions which are accusative and dative cases and no preposition.
mkV3 : (satmak : Verb) -> Verb ** {c1 : Case; p1 : Prep; c2 : Case; p2 : Prep} ;
mkV3 : (satmak : Verb) -> Verb ** {c1,c2 : Compl} ;
-- make V3, set cases and prepositions explicitly.
mkV3 : (konusmak : Verb) -> Case -> Prep -> Case -> Prep -> Verb ** {c1 : Case; p1 : Prep; c2 : Case; p2 : Prep} ;
mkV3 : (konusmak : Verb) -> Compl -> Compl -> Verb ** {c1,c2 : Compl} ;
} ;
@@ -71,20 +69,18 @@ oper
mkV2 = overload {
-- sormak
mkV2 : Verb -> Verb ** {c : Case; p : Prep} = \verb -> verb ** {c = Acc; p = no_Prep} ;
mkV2 : Verb -> Verb ** {c : Compl} = \verb -> verb ** {c = no_Prep} ;
-- (bir şeyden) korkmak
mkV2 : Verb -> Case -> Verb ** {c : Case; p : Prep} = \verb,ca -> verb ** {c = ca; p = no_Prep} ;
-- (bir şeye karşı) dövüşmek
mkV2 : Verb -> Case -> Prep -> Verb ** {c : Case; p : Prep} = \verb,ca,prep -> verb ** {c = ca; p = prep} ;
mkV2 : Verb -> Compl -> Verb ** {c : Compl} = \verb,c -> verb ** {c = c} ;
} ;
mkV3 = overload {
-- (birine bir şeyi) satmak
mkV3 : Verb -> Verb ** {c1 : Case; p1 : Prep; c2 : Case; p2 : Prep} = \verb -> verb ** {c1 = Acc; p1 = no_Prep; c2 = Dat; p2 = no_Prep} ;
mkV3 : Verb -> Verb ** {c1,c2 : Compl} = \verb -> verb ** {c1 = no_Prep; c2 = no_Prep} ;
-- (biri ile bir şeyi) konuşmak
mkV3 : Verb -> Case -> Prep -> Case -> Prep -> Verb ** {c1 : Case; p1 : Prep; c2 : Case; p2 : Prep} =
\verb,c1,p1,c2,p2 -> verb ** {c1 = c1; p1 = p1; c2 = c2; p2 = p2} ;
mkV3 : Verb -> Compl -> Compl -> Verb ** {c1 : Compl; c2 : Compl} =
\verb,c1,c2 -> verb ** {c1 = c1; c2 = c2} ;
} ;
-- Paradigms for noun
@@ -106,9 +102,9 @@ oper
mkN : (zeytin, yag : Noun) -> Noun ;
} ;
mkN2 : Str -> Noun ** {c : Case} ;
mkN2 : Str -> Noun ** {c : Compl} ;
mkN3 : Str -> Noun ** {c1 : Case; c2 : Case} ;
mkN3 : Str -> Noun ** {c1,c2 : Compl} ;
-- worst case function
-- parameters: all singular cases of base, base of genitive table, plural form of base and harmony of base
@@ -142,12 +138,10 @@ oper
mkA2 : overload {
-- (biri) ile evli
mkA2 : Adjective -> Case -> Prep -> Adjective ** {c : Case; p : Prep} ;
-- makes default case accusative
mkA2 : Adjective -> Prep -> Adjective ** {c : Case; p : Prep} ;
mkA2 : Adjective -> Compl -> Adjective ** {c : Compl};
} ;
mkAdj2 : Adjective -> Case -> Prep -> Adjective ** {c : Case; p : Prep} ;
mkAdj2 : Adjective -> Compl -> Adjective ** {c : Compl} ;
-- Paradigms for numerals
mkNum : overload {
@@ -156,7 +150,7 @@ oper
-- an irregular numeral of which two form is needed. e.g. "kırk" "kırkıncı" "kırk" "kırkıncı" (does not soften)
mkNum : Str -> Str -> Str -> Str -> {s : DForm => CardOrd => Number => Case => Str} ;
} ;
regNum : Str -> Str -> {s : DForm => CardOrd => Number => Case => Str} ;
makeNum : Str -> Str -> Str -> Str -> {s : DForm => CardOrd => Number => Case => Str} ;
@@ -393,13 +387,10 @@ oper
mkN : (zeytin, yag : Noun) -> Noun = \n1,n2 -> linkNoun n1 n2 Indef Con ;
} ;
mkN2 base = let noun = mkN base in noun ** {c = Gen} ;
mkN2 base = mkN base ** {c = {s=[]; c=Gen}} ;
mkN3 base = let noun = mkN base in noun ** {c1 = Gen; c2 = Dat} ;
mkN3 base = mkN base ** {c1,c2 = {s=[]; c=Gen}} ;
-- Implementation of adjactive paradigms
mkA = overload {
-- güzel
@@ -414,12 +405,11 @@ oper
mkA2 = overload {
mkA2 : Adjective -> Case -> Prep -> Adjective ** {c : Case; p : Prep} = mkAdj2 ;
mkA2 : Adjective -> Prep -> Adjective ** {c : Case; p : Prep} = \n,p -> mkAdj2 n Acc p ;
mkA2 : Adjective -> Compl -> Adjective ** {c : Compl} = mkAdj2 ;
} ;
mkAdj2 base c prep = base ** {c = c; p = prep} ;
mkAdj2 base c = base ** {c = c} ;
-- Implementation of numeral paradigms
mkNum = overload {
mkNum : Str -> Str -> {s : DForm => CardOrd => Number => Case => Str} = regNum ;
@@ -516,6 +506,10 @@ oper
Pl => addSuffix base (mkHar harVow SVow) plSuffix
} ;
ablat_Case = mkPrep [] Ablat;
dat_Case = mkPrep [] Dat;
acc_Case = mkPrep [] Dat;
param
AoristType = PlSyl -- more than one syllable, takes -ir
| SgSylConIrreg -- one syllable ending with consonant, but takes -ir (here is the list: al-, bil-, bul-, dur-, gel-, gör-, kal-, ol-, öl-, var-, ver-, vur-, san- )

View File

@@ -14,6 +14,7 @@ resource ResTur = ParamX ** open Prelude, Predef, HarmonyTur in {
oper
Agr = {n : Number ; p : Person} ;
Compl = {s : Str; c : Case} ;
Noun = {s : Number => Case => Str; gen : Number => Agr => Str; harmony : Harmony} ;
Pron = {s : Case => Str; a : Agr} ;
@@ -65,6 +66,6 @@ resource ResTur = ParamX ** open Prelude, Predef, HarmonyTur in {
--Prep
no_Prep = mkPrep [] ;
mkPrep : Str -> {s : Str} = \str -> ss str ;
}
no_Prep = mkPrep [] Acc;
mkPrep : Str -> Case -> {s : Str; c : Case} = \s,c -> {s=s; c=c};
}

View File

@@ -17,5 +17,5 @@ concrete StructuralTur of Structural = CatTur **
youPl_Pron = mkPron "siz" "sizi" "size" "sizin" "sizde" "sizden" "sizli" "sizsiz" Pl P2 ;
youPol_Pron = mkPron "siz" "sizi" "size" "sizin" "sizde" "sizden" "sizli" "sizsiz" Pl P2 ;
with_Prep = mkPrep "ile" ;
with_Prep = mkPrep "ile" Acc;
}