mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-06-26 19:46:26 -06:00
(Ara) Add various functions to make SymbolicAra work.
This commit is contained in:
+25
-23
@@ -2,34 +2,32 @@
|
||||
|
||||
concrete SymbolAra of Symbol = CatAra ** open Prelude, ResAra in {
|
||||
|
||||
{-
|
||||
lin
|
||||
SymbPN i = {s = \\c => i.s ; g = Neutr} ; --- c
|
||||
IntPN i = {s = \\c => i.s ; g = Neutr} ; --- c
|
||||
FloatPN i = {s = \\c => i.s ; g = Neutr} ; --- c
|
||||
NumPN i = {s = i.s ! Neutr ; g = Neutr} ; --- c
|
||||
|
||||
CNIntNP cn i = {
|
||||
s = \\c => cn.s ! Weak ! Sg ! Nom ++ i.s ;
|
||||
a = agrP3 Sg ;
|
||||
isPron = False
|
||||
} ;
|
||||
CNSymbNP det cn xs = let g = cn.g in {
|
||||
s = \\c => det.s ! g ! c ++ cn.s ! adjfCase det.a c ! det.n ! c ++ xs.s ;
|
||||
a = agrP3 det.n ;
|
||||
isPron = False
|
||||
lin
|
||||
SymbPN i = {s = \\c => i.s ; g = Masc ; h = NoHum } ; --IL
|
||||
IntPN i = {s = \\c => i.s ; g = Masc ; h = NoHum } ; --IL
|
||||
FloatPN i = {s = \\c => i.s ; g = Masc ; h = NoHum } ; --IL
|
||||
NumPN i = {s = \\c => uttNum i ! Masc ; g = Masc ; h = NoHum } ; --IL
|
||||
-- CNIntNP cn i = {
|
||||
-- s = \\c => cn.s ! Sg ! Def ! c ++ uttNum i ! Masc ;
|
||||
-- a = dummyAgrP3 Sg ;
|
||||
-- } ;
|
||||
--IL TODO: check out some opers regarding state in ResAra. These are just dummy values.
|
||||
CNSymbNP det cn xs =
|
||||
let g = cn.g ; n = sizeToNumber det.n in {
|
||||
s = \\c => det.s ! NoHum ! g ! c ++ cn.s ! Sg ! Def ! c ++ cn.adj ! n ! Def ! c ++ xs.s; ----IL word order?? Seems to be nontrivial according to ResAra comments.
|
||||
a = dummyAgrP3 n ;
|
||||
} ;
|
||||
CNNumNP cn i = {
|
||||
s = \\c => artDef ! (GSg cn.g) ! c ++ cn.s ! Weak ! Sg ! Nom ++ i.s ! Neutr ! c ;
|
||||
a = agrP3 Sg ;
|
||||
isPron = False
|
||||
s = \\c => cn.s ! Sg ! Def ! c ++ uttNum i ! Masc ;
|
||||
a = dummyAgrP3 Sg ;
|
||||
} ;
|
||||
|
||||
SymbS sy = {s = \\_ => sy.s} ;
|
||||
SymbS sy = sy ;
|
||||
|
||||
SymbNum n = {s = \\_,_ => n.s ; n = Pl ; isNum = True} ;
|
||||
SymbOrd n = {s = \\_ => n.s ++ "."} ;
|
||||
|
||||
SymbOrd n = {s = \\_,_,_ => n.s ; n = None } ;
|
||||
SymbNum n = SymbOrd n ** { n = ThreeTen } ; ----IL
|
||||
|
||||
lincat
|
||||
|
||||
@@ -39,9 +37,13 @@ lin
|
||||
|
||||
MkSymb s = s ;
|
||||
|
||||
BaseSymb = infixSS "und" ;
|
||||
BaseSymb = infixSS "und" ; ----
|
||||
ConsSymb = infixSS "," ;
|
||||
-}
|
||||
|
||||
oper
|
||||
|
||||
dummyAgrP3 : Number -> Agr = \n ->
|
||||
{ pgn = Per3 Masc n ; isPron = False } ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user