mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-21 18:59:32 -06:00
updated Ina so that API compiles
This commit is contained in:
@@ -65,10 +65,10 @@ langsLangAll = langs
|
||||
langsLang = langs `except` langsIncomplete ---- []
|
||||
|
||||
-- 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
|
||||
langsAPI = langsLang `except` (langsIncomplete ++ ["Ina"])
|
||||
langsAPI = langsLang `except` langsIncomplete
|
||||
|
||||
-- languages for which to compile Symbolic
|
||||
langsSymbolic = langsLang `except` (langsIncomplete ++ ["Rus","Ina"])
|
||||
|
||||
@@ -13,6 +13,20 @@ concrete AdjectiveIna of Adjective = CatIna ** open ResIna, Prelude in {
|
||||
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$.
|
||||
|
||||
ComplA2 a np = {
|
||||
|
||||
@@ -18,6 +18,8 @@ concrete ConjunctionIna of Conjunction =
|
||||
isPre = ss.isPre
|
||||
} ;
|
||||
|
||||
ConjRS = conjunctDistrTable Agr ;
|
||||
|
||||
-- These fun's are generated from the list cat's.
|
||||
|
||||
BaseS = twoSS ;
|
||||
@@ -28,11 +30,14 @@ concrete ConjunctionIna of Conjunction =
|
||||
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} ;
|
||||
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
|
||||
[S] = {s1,s2 : Str} ;
|
||||
[Adv] = {s1,s2 : Str} ;
|
||||
[NP] = {s1,s2 : Case => Str ; a : Agr} ;
|
||||
[AP] = {s1,s2 : Agr => Str ; isPre : Bool} ;
|
||||
[RS] = {s1,s2 : Agr => Str} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -13,7 +13,8 @@ concrete GrammarIna of Grammar =
|
||||
PhraseIna,
|
||||
TextX,
|
||||
StructuralIna,
|
||||
IdiomIna
|
||||
IdiomIna,
|
||||
TenseX
|
||||
** {
|
||||
|
||||
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
||||
|
||||
@@ -149,7 +149,7 @@ oper
|
||||
---- as an adverb. Likewise $AS, A2S, AV, A2V$ are just $A$.
|
||||
---- $V0$ is just $V$.
|
||||
--
|
||||
V0, V2S, V2V, V2Q : Type ;
|
||||
V0 : Type ; --- V2S, V2V, V2Q : Type ;
|
||||
AS, A2S, AV, A2V : Type ;
|
||||
--
|
||||
----.
|
||||
@@ -222,16 +222,16 @@ oper
|
||||
mkVQ v = v ** {lock_VQ = <>} ;
|
||||
|
||||
V0 : Type = V ;
|
||||
V2S, V2V, V2Q : Type = V2 ;
|
||||
--- V2S, V2V, V2Q : Type = V2 ;
|
||||
AS, A2S, AV : Type = A ;
|
||||
A2V : Type = A2 ;
|
||||
--
|
||||
mkV0 v = v ** {lock_V = <>} ;
|
||||
-- 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 = <>} ;
|
||||
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 = <>} ;
|
||||
-- mkA2S v p = mkA2 v p ** {lock_A = <>} ;
|
||||
mkAV v = v ** {lock_A = <>} ;
|
||||
|
||||
@@ -15,6 +15,11 @@ concrete PhraseIna of Phrase = CatIna ** open Prelude, ResIna in {
|
||||
UttVP vp = {s = infVP vp} ;
|
||||
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 = []} ;
|
||||
PConjConj conj = ss conj.s2 ;
|
||||
|
||||
|
||||
@@ -47,6 +47,8 @@ concrete QuestionIna of Question = CatIna ** open ResIna, Prelude in {
|
||||
n = num.n
|
||||
} ;
|
||||
|
||||
AdvIAdv i a = ss (i.s ++ a.s) ;
|
||||
|
||||
CompIAdv a = a ;
|
||||
|
||||
CompIP ip = ss (ip.s ! Nom) ;
|
||||
|
||||
@@ -4,8 +4,8 @@ concrete StructuralIna of Structural = CatIna **
|
||||
flags optimize=all ;
|
||||
|
||||
oper
|
||||
mkPrep = P.mkPrep;
|
||||
pp : Str -> Prep = \s-> mkPrep s Acc;
|
||||
--- mkPrep = P.mkPrep;
|
||||
pp : Str -> Prep = \s-> P.mkPrep s Acc;
|
||||
lin
|
||||
above_Prep = pp "supra";
|
||||
after_Prep = pp "post" ;
|
||||
@@ -36,7 +36,7 @@ concrete StructuralIna of Structural = CatIna **
|
||||
he_Pron = mkPron "ille" "le" "su" Sp3;
|
||||
here_Adv = ss "hic" ;
|
||||
here7to_Adv = ss "hac" ;
|
||||
here7from_Adv = mkPrep ["de ci"] Dat;
|
||||
here7from_Adv = P.mkPrep ["de ci"] Dat;
|
||||
how_IAdv = ss "como" ;
|
||||
how8many_IDet = mkIDeterminer Pl ["quante"] ;
|
||||
if_Subj = ss "ii" ;
|
||||
@@ -51,13 +51,13 @@ concrete StructuralIna of Structural = CatIna **
|
||||
much_Det = mkDeterminer Sg "tanto" ;
|
||||
must_VV = P.regV "deber";
|
||||
no_Utt = ss "no" ;
|
||||
on_Prep = mkPrep "super" Acc;
|
||||
on_Prep = P.mkPrep "super" Acc;
|
||||
only_Predet = ss "unic" ;
|
||||
or_Conj = {s1 = [] ; s2 = "o" ; n = Sg} ;
|
||||
otherwise_PConj = ss "alias" ;
|
||||
part_Prep = mkPrep [] Abl; -- de ...
|
||||
part_Prep = P.mkPrep [] Abl; -- de ...
|
||||
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" ;
|
||||
she_Pron = mkPron "illa" "la" "su" Sp3;
|
||||
so_AdA = ss "tam" ;
|
||||
@@ -66,7 +66,7 @@ concrete StructuralIna of Structural = CatIna **
|
||||
somePl_Det = mkDeterminer Pl (variants {"alicun"; "alcun"});
|
||||
something_NP = regNP ("alcun"++"cosa") ; -- very many variants
|
||||
somewhere_Adv = ss "alicubi" ; -- variants
|
||||
that_Quant = mkQuant "ille" "ille" ;
|
||||
that_Quant = mkQuantf "ille" "ille" ;
|
||||
-- that_NP = regNP "illo" ; -- Also exsits gender variants!
|
||||
there_Adv = ss "ibi"; -- la
|
||||
there7to_Adv = ss "ibi" ;
|
||||
@@ -74,12 +74,12 @@ concrete StructuralIna of Structural = CatIna **
|
||||
therefore_PConj = ss "ergo" ;
|
||||
-- these_NP = regNP "istes" ;
|
||||
they_Pron = mkPron "illos" "los" "lor" Pp3;
|
||||
this_Quant = mkQuant "iste" "istes" ;
|
||||
this_Quant = mkQuantf "iste" "istes" ;
|
||||
-- this_NP = regNP "isto" ;
|
||||
-- those_NP = regNP "illos" ; -- Also exsits gender variants!
|
||||
through_Prep = mkPrep "per" Acc;
|
||||
through_Prep = P.mkPrep "per" Acc;
|
||||
too_AdA = ss "alsi" ;
|
||||
to_Prep = mkPrep "" Dat;
|
||||
to_Prep = P.mkPrep "" Dat;
|
||||
under_Prep = pp "infra" ;
|
||||
very_AdA = ss "multo" ;
|
||||
want_VV = P.regV "want" ;
|
||||
@@ -97,8 +97,8 @@ concrete StructuralIna of Structural = CatIna **
|
||||
whoSg_IP = mkIP "qui" Sg ;
|
||||
whoPl_IP = mkIP "qui" Pl ;
|
||||
why_IAdv = ss "proque" ;
|
||||
without_Prep = mkPrep "sin" Acc;
|
||||
with_Prep = mkPrep "con" Acc ;
|
||||
without_Prep = P.mkPrep "sin" Acc;
|
||||
with_Prep = P.mkPrep "con" Acc ;
|
||||
yes_Utt = ss "itaque" ; -- ita?
|
||||
youSg_Pron = mkPron "tu" "te" "tu" Sp2;
|
||||
youPl_Pron = mkPron "vos" "vos" "vostre" Pp2;
|
||||
@@ -107,7 +107,7 @@ concrete StructuralIna of Structural = CatIna **
|
||||
-- have_V2 = dirV2 (R.haberV ** {lock_V = <>});
|
||||
|
||||
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 {
|
||||
Sg => x;
|
||||
Pl => y
|
||||
|
||||
@@ -61,6 +61,7 @@ concrete VerbIna of Verb = CatIna ** open ResIna, Prelude in {
|
||||
|
||||
CompAP ap = ap ;
|
||||
CompNP np = {s = \\_ => np.s ! Acc} ;
|
||||
CompCN cn = {s = \\a => cn.s ! a.n} ;
|
||||
CompAdv a = {s = \\_ => a.s} ;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user