mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 03:32:51 -06:00
MAth
This commit is contained in:
51
lib/resource/romance/MathRomance.gf
Normal file
51
lib/resource/romance/MathRomance.gf
Normal file
@@ -0,0 +1,51 @@
|
||||
--# -path=.:../romance:../abstract:../../prelude
|
||||
|
||||
incomplete concrete MathRomance of Math = CategoriesRomance **
|
||||
open Prelude, SyntaxRomance in {
|
||||
|
||||
lin
|
||||
SymbPN i = {s = i.s ; g = Masc} ; --- cannot know gender
|
||||
IntPN i = {s = i.s ; g = Masc} ;
|
||||
IntNP cn i = nameNounPhrase {
|
||||
s = cn.s ! Sg ++ i.s ;
|
||||
g = cn.g
|
||||
} ;
|
||||
|
||||
IndefSymbNumNP nu cn xs =
|
||||
addSymbNounPhrase (indefNounPhraseNum nu cn) xs.s ;
|
||||
DefSymbNumNP nu cn xs =
|
||||
addSymbNounPhrase (defNounPhraseNum nu cn) xs.s ;
|
||||
NDetSymbNP det nu cn xs =
|
||||
addSymbNounPhrase (numDetNounPhrase det nu cn) xs.s ;
|
||||
|
||||
lincat
|
||||
SymbList = SS ;
|
||||
|
||||
lin
|
||||
SymbTwo = infixSS etConj.s ;
|
||||
SymbMore = infixSS "," ;
|
||||
|
||||
|
||||
LetCN x cn = {
|
||||
s = \\_,_ => copula.s ! VFin (VPres Con) Sg P3 ++ x.s ++ (indefNounPhrase singular cn).s !
|
||||
unstressed nominative
|
||||
} ;
|
||||
LetNumCN x nu cn = {
|
||||
s = \\_,_ => copula.s ! VFin (VPres Con) Pl P3 ++ x.s ++ (indefNounPhraseNum nu cn).s
|
||||
! unstressed nominative
|
||||
} ;
|
||||
|
||||
--- to be replaced by "il existe", "esiste", etc.
|
||||
|
||||
ExistNP np = existNounPhrase np ;
|
||||
|
||||
-- Moved from $RulesRomance$.
|
||||
|
||||
SymbCN cn s =
|
||||
{s = \\n => cn.s ! n ++ s.s ;
|
||||
g = cn.g} ;
|
||||
IntCN cn i =
|
||||
{s = \\n => cn.s ! n ++ i.s ;
|
||||
g = cn.g} ;
|
||||
|
||||
}
|
||||
@@ -7,14 +7,6 @@ lin
|
||||
UseN = noun2CommNounPhrase ;
|
||||
UsePN = nameNounPhrase ;
|
||||
|
||||
SymbPN i = {s = i.s ; g = Masc} ; --- cannot know gender
|
||||
SymbCN cn s =
|
||||
{s = \\n => cn.s ! n ++ s.s ;
|
||||
g = cn.g} ;
|
||||
IntCN cn i =
|
||||
{s = \\n => cn.s ! n ++ i.s ;
|
||||
g = cn.g} ;
|
||||
|
||||
IndefOneNP = indefNounPhrase singular ;
|
||||
IndefNumNP = indefNounPhraseNum ;
|
||||
DefOneNP = defNounPhrase singular ;
|
||||
|
||||
@@ -80,6 +80,17 @@ oper
|
||||
|
||||
existNounPhrase : NounPhrase -> Clause ;
|
||||
|
||||
-- To add a symbol, such as a variable or variable list, to the end of
|
||||
-- an NP.
|
||||
|
||||
addSymbNounPhrase : NounPhrase -> Str -> NounPhrase = \np,x ->
|
||||
{s = \\c => np.s ! c ++ x ;
|
||||
g = np.g ;
|
||||
n = np.n ;
|
||||
p = np.p ;
|
||||
c = np.c
|
||||
} ;
|
||||
|
||||
|
||||
--2 Determiners
|
||||
--
|
||||
|
||||
Reference in New Issue
Block a user