mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 03:32:51 -06:00
MAth
This commit is contained in:
@@ -4,9 +4,10 @@ concrete LangFin of Lang =
|
||||
RulesFin,
|
||||
ClauseFin,
|
||||
StructuralFin,
|
||||
BasicFin
|
||||
BasicFin,
|
||||
---- TimeEng,
|
||||
---- CountryEng
|
||||
MathFin
|
||||
|
||||
** open Prelude, ParadigmsFin in {
|
||||
|
||||
|
||||
50
lib/resource/finnish/MathFin.gf
Normal file
50
lib/resource/finnish/MathFin.gf
Normal file
@@ -0,0 +1,50 @@
|
||||
--# -path=.:../abstract:../../prelude
|
||||
|
||||
concrete MathFin of Math = CategoriesFin ** open Prelude, SyntaxFin, ParadigmsFin in {
|
||||
|
||||
lin
|
||||
SymbPN i = {s = \\c => i.s} ; --- case endings often needed
|
||||
IntPN i = {s = \\c => i.s} ;
|
||||
IntNP cn i = nameNounPhrase {
|
||||
s = \\c => cn.s ! False ! Sg ! c ++ i.s
|
||||
} ;
|
||||
|
||||
IndefSymbNumNP nu cn xs =
|
||||
addSymbNounPhrase (nounPhraseNum False nu cn) xs.s ;
|
||||
DefSymbNumNP nu cn xs =
|
||||
addSymbNounPhrase (nounPhraseNum True nu cn) xs.s ;
|
||||
NDetSymbNP det nu cn xs =
|
||||
addSymbNounPhrase (numDetNounPhrase det nu cn) xs.s ;
|
||||
|
||||
lincat
|
||||
SymbList = SS ;
|
||||
|
||||
lin
|
||||
SymbTwo = infixSS "ja" ;
|
||||
SymbMore = infixSS "," ;
|
||||
|
||||
|
||||
LetCN x cn = {
|
||||
s = \\_ => "olkoon" ++ x.s ++ (indefNounPhrase singular cn).s !
|
||||
NPCase Nom
|
||||
} ;
|
||||
LetNumCN x nu cn = {
|
||||
s = \\_ => "olkoot" ++ x.s ++ (nounPhraseNum False nu cn).s
|
||||
! NPCase Part
|
||||
} ;
|
||||
|
||||
ExistNP np =
|
||||
sats2clause (
|
||||
mkSatsCopula impersNounPhrase ("olemassa" ++ np.s ! NPCase Nom)
|
||||
) ;
|
||||
|
||||
-- Moved from $RulesFin$.
|
||||
|
||||
SymbCN cn s =
|
||||
{s = \\f,n,c => cn.s ! f ! n ! c ++ s.s ;
|
||||
g = cn.g} ;
|
||||
IntCN cn s =
|
||||
{s = \\f,n,c => cn.s ! f ! n ! c ++ s.s ;
|
||||
g = cn.g} ;
|
||||
|
||||
}
|
||||
@@ -24,14 +24,6 @@ lin
|
||||
UseN = noun2CommNounPhrase ;
|
||||
UsePN = nameNounPhrase ;
|
||||
|
||||
SymbPN i = {s = \\_ => i.s} ; --- case endings often needed
|
||||
SymbCN cn s =
|
||||
{s = \\f,n,c => cn.s ! f ! n ! c ++ s.s ;
|
||||
g = cn.g} ;
|
||||
IntCN cn s =
|
||||
{s = \\f,n,c => cn.s ! f ! n ! c ++ s.s ;
|
||||
g = cn.g} ;
|
||||
|
||||
IndefOneNP = indefNounPhrase singular ;
|
||||
IndefNumNP = nounPhraseNum False ;
|
||||
DefOneNP = defNounPhrase singular ;
|
||||
@@ -206,6 +198,8 @@ lin
|
||||
|
||||
---- OneNP = nameNounPhrase (nameReg "one" human) ;
|
||||
|
||||
--- should be partitive in negative forms: "ei ole olemassa puista autoa"
|
||||
|
||||
ExistCN cn =
|
||||
sats2clause (
|
||||
mkSatsCopula impersNounPhrase ("olemassa" ++ (singularNounPhrase cn).s ! NPCase Nom)
|
||||
|
||||
@@ -157,6 +157,14 @@ oper
|
||||
|
||||
noNum : Numeral = {s = \\_ => [] ; isNum = False ; n = Pl} ;
|
||||
|
||||
-- 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 ;
|
||||
n = np.n ;
|
||||
p = np.p
|
||||
} ;
|
||||
|
||||
--2 Determiners
|
||||
--
|
||||
|
||||
Reference in New Issue
Block a user