updated Ina so that API compiles

This commit is contained in:
aarne
2010-12-14 09:52:39 +00:00
parent 8a0b3b8ba8
commit 473c986274
9 changed files with 48 additions and 20 deletions

View File

@@ -65,10 +65,10 @@ langsLangAll = langs
langsLang = langs `except` langsIncomplete ---- [] langsLang = langs `except` langsIncomplete ---- []
-- languages for which Lang can be compiled but which are incomplete -- languages for which Lang can be compiled but which are incomplete
langsIncomplete = ["Amh","Ara","Hin","Lat","Pnb","Tha","Tur","Urd"] langsIncomplete = ["Amh","Ara","Hin","Lat","Pnb","Tha","Tur"]
-- languages for which to compile Try -- languages for which to compile Try
langsAPI = langsLang `except` (langsIncomplete ++ ["Ina"]) langsAPI = langsLang `except` langsIncomplete
-- languages for which to compile Symbolic -- languages for which to compile Symbolic
langsSymbolic = langsLang `except` (langsIncomplete ++ ["Rus","Ina"]) langsSymbolic = langsLang `except` (langsIncomplete ++ ["Rus","Ina"])

View File

@@ -13,6 +13,20 @@ concrete AdjectiveIna of Adjective = CatIna ** open ResIna, Prelude in {
isPre = False isPre = False
} ; } ;
UseComparA a = {
s = \\_ => a.s ! AAdj Compar ;
isPre = False
} ;
AdjOrd ord = {
s = \\_ => ord.s ;
isPre = False
} ;
CAdvAP ad ap np = {
s = \\a => ad.s ++ ap.s ! a ++ ad.p ++ np.s ! Nom ;
isPre = False
} ;
-- $SuperlA$ belongs to determiner syntax in $Noun$. -- $SuperlA$ belongs to determiner syntax in $Noun$.
ComplA2 a np = { ComplA2 a np = {

View File

@@ -18,6 +18,8 @@ concrete ConjunctionIna of Conjunction =
isPre = ss.isPre isPre = ss.isPre
} ; } ;
ConjRS = conjunctDistrTable Agr ;
-- These fun's are generated from the list cat's. -- These fun's are generated from the list cat's.
BaseS = twoSS ; BaseS = twoSS ;
@@ -28,11 +30,14 @@ concrete ConjunctionIna of Conjunction =
ConsNP xs x = consrTable Case comma xs x ** {a = conjAgr xs.a x.a} ; ConsNP xs x = consrTable Case comma xs x ** {a = conjAgr xs.a x.a} ;
BaseAP x y = twoTable Agr x y ** {isPre = andB x.isPre y.isPre} ; BaseAP x y = twoTable Agr x y ** {isPre = andB x.isPre y.isPre} ;
ConsAP xs x = consrTable Agr comma xs x ** {isPre = andB xs.isPre x.isPre} ; ConsAP xs x = consrTable Agr comma xs x ** {isPre = andB xs.isPre x.isPre} ;
BaseRS x y = twoTable Agr x y ;
ConsRS xs x = consrTable Agr comma xs x ;
lincat lincat
[S] = {s1,s2 : Str} ; [S] = {s1,s2 : Str} ;
[Adv] = {s1,s2 : Str} ; [Adv] = {s1,s2 : Str} ;
[NP] = {s1,s2 : Case => Str ; a : Agr} ; [NP] = {s1,s2 : Case => Str ; a : Agr} ;
[AP] = {s1,s2 : Agr => Str ; isPre : Bool} ; [AP] = {s1,s2 : Agr => Str ; isPre : Bool} ;
[RS] = {s1,s2 : Agr => Str} ;
} }

View File

@@ -13,7 +13,8 @@ concrete GrammarIna of Grammar =
PhraseIna, PhraseIna,
TextX, TextX,
StructuralIna, StructuralIna,
IdiomIna IdiomIna,
TenseX
** { ** {
flags startcat = Phr ; unlexer = text ; lexer = text ; flags startcat = Phr ; unlexer = text ; lexer = text ;

View File

@@ -149,7 +149,7 @@ oper
---- as an adverb. Likewise $AS, A2S, AV, A2V$ are just $A$. ---- as an adverb. Likewise $AS, A2S, AV, A2V$ are just $A$.
---- $V0$ is just $V$. ---- $V0$ is just $V$.
-- --
V0, V2S, V2V, V2Q : Type ; V0 : Type ; --- V2S, V2V, V2Q : Type ;
AS, A2S, AV, A2V : Type ; AS, A2S, AV, A2V : Type ;
-- --
----. ----.
@@ -222,16 +222,16 @@ oper
mkVQ v = v ** {lock_VQ = <>} ; mkVQ v = v ** {lock_VQ = <>} ;
V0 : Type = V ; V0 : Type = V ;
V2S, V2V, V2Q : Type = V2 ; --- V2S, V2V, V2Q : Type = V2 ;
AS, A2S, AV : Type = A ; AS, A2S, AV : Type = A ;
A2V : Type = A2 ; A2V : Type = A2 ;
-- --
mkV0 v = v ** {lock_V = <>} ; mkV0 v = v ** {lock_V = <>} ;
-- mkV2S v p = prepV2 v p ** {lock_V2 = <>} ; -- mkV2S v p = prepV2 v p ** {lock_V2 = <>} ;
mkV2V p t v = prepV2 p v ** {s4 = t ; lock_V2 = <>} ; mkV2V p t v = prepV2 p v ** {s4 = t ; lock_V2V = <>} ;
mkVA v = v ** {lock_VA = <>} ; mkVA v = v ** {lock_VA = <>} ;
mkV2A p2 p3 v = (prepV3 p3 (prepV2 p2 v)) ** {lock_V2A = <>} ; mkV2A p2 p3 v = (prepV3 p3 (prepV2 p2 v)) ** {lock_V2A = <>} ;
mkV2Q p v = prepV2 p v ** {lock_V2 = <>} ; mkV2Q p v = prepV2 p v ** {lock_V2Q = <>} ;
mkAS v = v ** {lock_A = <>} ; mkAS v = v ** {lock_A = <>} ;
-- mkA2S v p = mkA2 v p ** {lock_A = <>} ; -- mkA2S v p = mkA2 v p ** {lock_A = <>} ;
mkAV v = v ** {lock_A = <>} ; mkAV v = v ** {lock_A = <>} ;

View File

@@ -15,6 +15,11 @@ concrete PhraseIna of Phrase = CatIna ** open Prelude, ResIna in {
UttVP vp = {s = infVP vp} ; UttVP vp = {s = infVP vp} ;
UttAdv adv = adv ; UttAdv adv = adv ;
UttCN n = {s = n.s ! Sg} ;
UttCard n = {s = n.s} ;
UttAP ap = {s = ap.s ! agrP3 Sg} ;
UttInterj i = i ;
NoPConj = {s = []} ; NoPConj = {s = []} ;
PConjConj conj = ss conj.s2 ; PConjConj conj = ss conj.s2 ;

View File

@@ -47,6 +47,8 @@ concrete QuestionIna of Question = CatIna ** open ResIna, Prelude in {
n = num.n n = num.n
} ; } ;
AdvIAdv i a = ss (i.s ++ a.s) ;
CompIAdv a = a ; CompIAdv a = a ;
CompIP ip = ss (ip.s ! Nom) ; CompIP ip = ss (ip.s ! Nom) ;

View File

@@ -4,8 +4,8 @@ concrete StructuralIna of Structural = CatIna **
flags optimize=all ; flags optimize=all ;
oper oper
mkPrep = P.mkPrep; --- mkPrep = P.mkPrep;
pp : Str -> Prep = \s-> mkPrep s Acc; pp : Str -> Prep = \s-> P.mkPrep s Acc;
lin lin
above_Prep = pp "supra"; above_Prep = pp "supra";
after_Prep = pp "post" ; after_Prep = pp "post" ;
@@ -36,7 +36,7 @@ concrete StructuralIna of Structural = CatIna **
he_Pron = mkPron "ille" "le" "su" Sp3; he_Pron = mkPron "ille" "le" "su" Sp3;
here_Adv = ss "hic" ; here_Adv = ss "hic" ;
here7to_Adv = ss "hac" ; here7to_Adv = ss "hac" ;
here7from_Adv = mkPrep ["de ci"] Dat; here7from_Adv = P.mkPrep ["de ci"] Dat;
how_IAdv = ss "como" ; how_IAdv = ss "como" ;
how8many_IDet = mkIDeterminer Pl ["quante"] ; how8many_IDet = mkIDeterminer Pl ["quante"] ;
if_Subj = ss "ii" ; if_Subj = ss "ii" ;
@@ -51,13 +51,13 @@ concrete StructuralIna of Structural = CatIna **
much_Det = mkDeterminer Sg "tanto" ; much_Det = mkDeterminer Sg "tanto" ;
must_VV = P.regV "deber"; must_VV = P.regV "deber";
no_Utt = ss "no" ; no_Utt = ss "no" ;
on_Prep = mkPrep "super" Acc; on_Prep = P.mkPrep "super" Acc;
only_Predet = ss "unic" ; only_Predet = ss "unic" ;
or_Conj = {s1 = [] ; s2 = "o" ; n = Sg} ; or_Conj = {s1 = [] ; s2 = "o" ; n = Sg} ;
otherwise_PConj = ss "alias" ; otherwise_PConj = ss "alias" ;
part_Prep = mkPrep [] Abl; -- de ... part_Prep = P.mkPrep [] Abl; -- de ...
please_Voc = ss ("per"++"favor") ; please_Voc = ss ("per"++"favor") ;
possess_Prep = mkPrep [] Gen; -- the possesive preposition can not generate clitics, and fuses with the definite determiner "le". Pronoun form: "mie", "sue", etc. possess_Prep = P.mkPrep [] Gen; -- the possesive preposition can not generate clitics, and fuses with the definite determiner "le". Pronoun form: "mie", "sue", etc.
quite_Adv = ss "assi" ; quite_Adv = ss "assi" ;
she_Pron = mkPron "illa" "la" "su" Sp3; she_Pron = mkPron "illa" "la" "su" Sp3;
so_AdA = ss "tam" ; so_AdA = ss "tam" ;
@@ -66,7 +66,7 @@ concrete StructuralIna of Structural = CatIna **
somePl_Det = mkDeterminer Pl (variants {"alicun"; "alcun"}); somePl_Det = mkDeterminer Pl (variants {"alicun"; "alcun"});
something_NP = regNP ("alcun"++"cosa") ; -- very many variants something_NP = regNP ("alcun"++"cosa") ; -- very many variants
somewhere_Adv = ss "alicubi" ; -- variants somewhere_Adv = ss "alicubi" ; -- variants
that_Quant = mkQuant "ille" "ille" ; that_Quant = mkQuantf "ille" "ille" ;
-- that_NP = regNP "illo" ; -- Also exsits gender variants! -- that_NP = regNP "illo" ; -- Also exsits gender variants!
there_Adv = ss "ibi"; -- la there_Adv = ss "ibi"; -- la
there7to_Adv = ss "ibi" ; there7to_Adv = ss "ibi" ;
@@ -74,12 +74,12 @@ concrete StructuralIna of Structural = CatIna **
therefore_PConj = ss "ergo" ; therefore_PConj = ss "ergo" ;
-- these_NP = regNP "istes" ; -- these_NP = regNP "istes" ;
they_Pron = mkPron "illos" "los" "lor" Pp3; they_Pron = mkPron "illos" "los" "lor" Pp3;
this_Quant = mkQuant "iste" "istes" ; this_Quant = mkQuantf "iste" "istes" ;
-- this_NP = regNP "isto" ; -- this_NP = regNP "isto" ;
-- those_NP = regNP "illos" ; -- Also exsits gender variants! -- those_NP = regNP "illos" ; -- Also exsits gender variants!
through_Prep = mkPrep "per" Acc; through_Prep = P.mkPrep "per" Acc;
too_AdA = ss "alsi" ; too_AdA = ss "alsi" ;
to_Prep = mkPrep "" Dat; to_Prep = P.mkPrep "" Dat;
under_Prep = pp "infra" ; under_Prep = pp "infra" ;
very_AdA = ss "multo" ; very_AdA = ss "multo" ;
want_VV = P.regV "want" ; want_VV = P.regV "want" ;
@@ -97,8 +97,8 @@ concrete StructuralIna of Structural = CatIna **
whoSg_IP = mkIP "qui" Sg ; whoSg_IP = mkIP "qui" Sg ;
whoPl_IP = mkIP "qui" Pl ; whoPl_IP = mkIP "qui" Pl ;
why_IAdv = ss "proque" ; why_IAdv = ss "proque" ;
without_Prep = mkPrep "sin" Acc; without_Prep = P.mkPrep "sin" Acc;
with_Prep = mkPrep "con" Acc ; with_Prep = P.mkPrep "con" Acc ;
yes_Utt = ss "itaque" ; -- ita? yes_Utt = ss "itaque" ; -- ita?
youSg_Pron = mkPron "tu" "te" "tu" Sp2; youSg_Pron = mkPron "tu" "te" "tu" Sp2;
youPl_Pron = mkPron "vos" "vos" "vostre" Pp2; youPl_Pron = mkPron "vos" "vos" "vostre" Pp2;
@@ -107,7 +107,7 @@ concrete StructuralIna of Structural = CatIna **
-- have_V2 = dirV2 (R.haberV ** {lock_V = <>}); -- have_V2 = dirV2 (R.haberV ** {lock_V = <>});
oper oper
mkQuant : Str -> Str -> {s : Number => Case => Str} = \x,y -> { mkQuantf : Str -> Str -> {s : Number => Case => Str} = \x,y -> {
s = \\n,c=> case n of { s = \\n,c=> case n of {
Sg => x; Sg => x;
Pl => y Pl => y

View File

@@ -61,6 +61,7 @@ concrete VerbIna of Verb = CatIna ** open ResIna, Prelude in {
CompAP ap = ap ; CompAP ap = ap ;
CompNP np = {s = \\_ => np.s ! Acc} ; CompNP np = {s = \\_ => np.s ! Acc} ;
CompCN cn = {s = \\a => cn.s ! a.n} ;
CompAdv a = {s = \\_ => a.s} ; CompAdv a = {s = \\_ => a.s} ;
} }