mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
completed IdiomCat to compile api and math
This commit is contained in:
@@ -52,7 +52,7 @@ langs = map fst langsCoding
|
||||
langsLang = langs `except` ["Ara"]
|
||||
|
||||
-- languages for which to compile Try
|
||||
langsAPI = langsLang `except` ["Ara","Bul","Cat","Hin","Ina","Rus","Tha"]
|
||||
langsAPI = langsLang `except` ["Ara","Bul","Hin","Ina","Rus","Tha"]
|
||||
|
||||
-- languages for which to compile Mathematical
|
||||
langsMath = langsAPI
|
||||
|
||||
@@ -21,4 +21,32 @@ concrete IdiomCat of Idiom = CatCat **
|
||||
)
|
||||
(predV (verbV (estar_54 "estar"))) ;
|
||||
|
||||
----AR, for completeness
|
||||
|
||||
CleftNP np rs = mkClause [] True (agrP3 Masc Sg)
|
||||
(insertComplement (\\_ => rs.s ! Indic ! np.a)
|
||||
(insertComplement (\\_ => np.s ! Ton rs.c) (predV copula))) ;
|
||||
|
||||
|
||||
ExistIP ip = {
|
||||
s = \\t,a,p,_ =>
|
||||
ip.s ! Nom ++
|
||||
(mkClause [] True
|
||||
(agrP3 Masc Sg)
|
||||
(insertClit2 "hi" (insertComplement (\\_ => ip.s ! Acc) (predV haver_V))))
|
||||
.s ! DDir ! t ! a ! p ! Indic
|
||||
} ;
|
||||
|
||||
ImpPl1 vpr = let vp = useVP vpr in {s =
|
||||
(mkImperative False P1 vp).s ! Pos ! {n = Pl ; g = Masc} --- fem
|
||||
} ;
|
||||
|
||||
CleftAdv ad s = mkClause [] True (agrP3 Masc Sg)
|
||||
(insertComplement (\\_ => conjThat ++ s.s ! Indic)
|
||||
(insertComplement (\\_ => ad.s) (predV copula))) ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
26
lib/resource/mathematical/MathematicalCat.gf
Normal file
26
lib/resource/mathematical/MathematicalCat.gf
Normal file
@@ -0,0 +1,26 @@
|
||||
--# -path=.:present:prelude
|
||||
|
||||
concrete MathematicalCat of Mathematical =
|
||||
NounCat - [ComplN2], --- to avoid ambiguity
|
||||
-- VerbCat,
|
||||
AdjectiveCat,
|
||||
AdverbCat,
|
||||
NumeralCat,
|
||||
-- SentenceCat,
|
||||
QuestionCat,
|
||||
RelativeCat,
|
||||
ConjunctionCat,
|
||||
PhraseCat,
|
||||
TextX - [Tense,TPres,TPast,TFut,TCond],
|
||||
IdiomCat,
|
||||
StructuralCat,
|
||||
|
||||
SymbolCat,
|
||||
PredicationCat, -- - [predV3,predV2], --- gf bug
|
||||
|
||||
LexiconCat
|
||||
** {
|
||||
|
||||
flags startcat = Phr ;
|
||||
|
||||
} ;
|
||||
4
lib/resource/mathematical/PredicationCat.gf
Normal file
4
lib/resource/mathematical/PredicationCat.gf
Normal file
@@ -0,0 +1,4 @@
|
||||
concrete PredicationCat of Predication = CatCat ** PredicationI with
|
||||
(Syntax = SyntaxCat),
|
||||
(Lang = LangCat) ;
|
||||
|
||||
2
lib/resource/mathematical/SymbolCat.gf
Normal file
2
lib/resource/mathematical/SymbolCat.gf
Normal file
@@ -0,0 +1,2 @@
|
||||
concrete SymbolCat of Symbol = CatCat ** SymbolRomance with
|
||||
(ResRomance = ResCat) ;
|
||||
5
lib/resource/mathematical/SymbolicCat.gf
Normal file
5
lib/resource/mathematical/SymbolicCat.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:present:mathematical:prelude
|
||||
|
||||
resource SymbolicCat = Symbolic with
|
||||
(Symbol = SymbolCat),
|
||||
(Grammar = GrammarCat) ;
|
||||
@@ -33,8 +33,8 @@ import qualified Data.ByteString.Char8 as BS
|
||||
import Debug.Trace ----
|
||||
|
||||
-- when developing, swap commenting
|
||||
--traceD s t = trace s t
|
||||
traceD s t = t
|
||||
traceD s t = trace s t
|
||||
--traceD s t = t
|
||||
|
||||
|
||||
-- the main function: generate PGF from GF.
|
||||
|
||||
Reference in New Issue
Block a user