mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-20 08:32:50 -06:00
implementation for SymbolRon.gf from Ramona
This commit is contained in:
@@ -1,44 +1,75 @@
|
|||||||
--# -path=.:abstract:common
|
concrete SymbolRon of Symbol =
|
||||||
|
CatRon ** open Prelude, ResRon in {
|
||||||
|
|
||||||
concrete SymbolRon of Symbol = CatRon ** open Prelude, ResRon in {
|
|
||||||
{-
|
|
||||||
lin
|
lin
|
||||||
SymbPN i = {s = addGenitiveS i.s ; g = Neutr} ;
|
SymbPN i = mkSymb i.s ;
|
||||||
IntPN i = {s = addGenitiveS i.s ; g = Neutr} ;
|
IntPN i = mkSymb i.s ;
|
||||||
FloatPN i = {s = addGenitiveS i.s ; g = Neutr} ;
|
FloatPN i = mkSymb i.s ;
|
||||||
NumPN i = {s = i.s ; g = Neutr} ;
|
NumPN i = mkSymb (i.sp ! Masc) ;
|
||||||
CNIntNP cn i = {
|
|
||||||
s = \\c => cn.s ! Sg ! Nom ++ (addGenitiveS i.s) ! c ;
|
CNIntNP cn i = let gg = agrGender cn.g Sg in
|
||||||
a = agrgP3 Sg cn.g
|
heavyNP {
|
||||||
} ;
|
s = \\c => cn.s ! Sg ! Def ! (convCase c) ++ i.s ;
|
||||||
CNSymbNP det cn xs = {
|
a = agrP3 gg Sg ;
|
||||||
s = \\c => det.s ++ cn.s ! det.n ! Nom ++ (addGenitiveS xs.s) ! c ;
|
hasClit = False ;
|
||||||
a = agrgP3 det.n cn.g
|
ss = cn.s ! Sg ! Def ! ANomAcc ++ i.s
|
||||||
} ;
|
|
||||||
CNNumNP cn i = {
|
|
||||||
s = \\c => cn.s ! Sg ! Nom ++ i.s ! c ;
|
|
||||||
a = agrgP3 Sg cn.g
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
SymbS sy = sy ;
|
CNSymbNP det cn xs = let gg = agrGender cn.g det.n;
|
||||||
|
st = if_then_else Species det.isDef Def Indef;
|
||||||
|
rs = if_then_else Species det.hasRef Def Indef;
|
||||||
|
ag = agrP3 gg det.n ;
|
||||||
|
hr = andB (getClit cn.a) det.hasRef
|
||||||
|
in
|
||||||
|
{s = \\c => case c of
|
||||||
|
{Vo =>
|
||||||
|
{comp = det.s ! gg ! No ++ det.size ++ cn.s ! det.n ! st ! ANomAcc ++ det.post ! gg ! No ;
|
||||||
|
clit = \\cs => if_then_Str hr ((genCliticsCase ag c).s ! cs) [] };
|
||||||
|
_ => {comp = det.s ! gg ! c ++ det.size ++ cn.s ! det.n ! st ! (convCase c) ++ det.post ! gg ! c ;
|
||||||
|
clit = \\cs => if_then_Str hr ((genCliticsCase ag c).s ! cs) [] }
|
||||||
|
};
|
||||||
|
a = ag ;
|
||||||
|
hasClit = hr ;
|
||||||
|
hasRef = hr ;
|
||||||
|
isPronoun = False ;
|
||||||
|
indForm = det.s ! gg ! No ++ det.size ++cn.s ! det.n ! rs ! ANomAcc
|
||||||
|
} ;
|
||||||
|
|
||||||
SymbNum sy = { s = addGenitiveS sy.s ; n = Pl ; hasCard = True } ;
|
CNNumNP cn i = let gg = agrGender cn.g Sg in
|
||||||
SymbOrd sy = { s = \\c => sy.s ++ (regGenitiveS "th")!c} ;
|
heavyNP {
|
||||||
|
s = \\c => cn.s ! Sg ! Def ! (convCase c) ++ i.sp ! gg;
|
||||||
|
a = agrP3 gg Sg ;
|
||||||
|
hasClit = False ;
|
||||||
|
ss = cn.s ! Sg ! Def ! ANomAcc ++ i.sp ! gg
|
||||||
|
} ;
|
||||||
|
SymbS sy = {s = \\_ => sy.s} ;
|
||||||
|
|
||||||
|
SymbNum nn = {s,sp = \\_ => nn.s ; n = Pl; size = less20} ; -- need to know the size of the symbol to properly set it to less20 or plural
|
||||||
|
SymbOrd nn = {s = \\n,g,nc => case nc of
|
||||||
|
{Da | Ge => artDem g n AGenDat ++ "de-" ++ artPos g n ANomAcc ++ nn.s ++ "-lea";
|
||||||
|
_ => artPos g n ANomAcc ++ nn.s ++ "-lea"
|
||||||
|
};
|
||||||
|
isPre = True
|
||||||
|
} ;
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
|
|
||||||
Symb, [Symb] = SS ;
|
Symb, [Symb] = SS ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
|
|
||||||
MkSymb s = s ;
|
MkSymb s = s ;
|
||||||
|
|
||||||
BaseSymb = infixSS "and" ;
|
BaseSymb = infixSS "ºi" ;
|
||||||
ConsSymb = infixSS "," ;
|
ConsSymb = infixSS "," ;
|
||||||
|
|
||||||
oper
|
oper mkSymb : Str -> PN = \ss ->
|
||||||
-- Note: this results in a space before 's, but there's
|
{ s = \\c => case c of
|
||||||
-- not mauch we can do about that.
|
{Da | Ge => "lui" ++ ss;
|
||||||
addGenitiveS : Str -> Case => Str = \s ->
|
_ => ss
|
||||||
table { Gen => s ++ "'s"; _ => s } ;
|
};
|
||||||
-}
|
g = Masc; n = Sg; a = Animate ;
|
||||||
|
lock_PN = <>
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user