mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-06-29 18:48:37 -06:00
the names API in more languages
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
resource ParadigmsSlv = open CatSlv, ResSlv, Prelude, Predef in {
|
||||
resource ParadigmsSlv = open CatSlv, ResSlv, ParamX, Prelude, Predef in {
|
||||
|
||||
oper
|
||||
nominative : Case = Nom ;
|
||||
@@ -34,6 +34,10 @@ oper
|
||||
mkN : (_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> AGender -> N = worstN ;
|
||||
} ;
|
||||
|
||||
compoundN = overload {
|
||||
compoundN : N -> Str -> N = \noun,adv -> noun ** {s = \\c,n => noun.s ! c ! n ++ adv} ;
|
||||
} ;
|
||||
|
||||
mkN2 : N -> Prep -> N2 = \n,c -> n ** {c=c} ;
|
||||
|
||||
--All masculine forms (except those with long pluralstem) are formed here.
|
||||
@@ -241,6 +245,44 @@ oper
|
||||
};
|
||||
} ;
|
||||
|
||||
mkLN = overload {
|
||||
mkLN : N -> LN = \noun -> lin LN {
|
||||
s = \\c => noun.s ! c ! Sg ;
|
||||
g = noun.g ;
|
||||
n = Sg
|
||||
};
|
||||
mkLN : N -> Number -> LN = \noun,nr -> lin LN {
|
||||
s = \\c => noun.s ! c ! nr ;
|
||||
g = noun.g ;
|
||||
n = nr
|
||||
};
|
||||
mkLN : Str -> LN =
|
||||
\s -> lin LN {
|
||||
s = \\_ => s ;
|
||||
g = AMasc Inanimate ;
|
||||
n = Sg
|
||||
};
|
||||
mkLN : Str -> AGender -> Number -> LN =
|
||||
\s,g,n -> lin LN {
|
||||
s = \\_ => s ;
|
||||
g = g ;
|
||||
n = n
|
||||
};
|
||||
mkLN : (_,_,_,_,_,_ : Str) -> AGender -> Number -> LN =
|
||||
\nom,gen,dat,acc,loc,instr,g,n -> lin LN {
|
||||
s = table {
|
||||
Nom => nom;
|
||||
Gen => gen;
|
||||
Dat => dat;
|
||||
Acc => acc;
|
||||
Loc => loc;
|
||||
Instr => instr
|
||||
};
|
||||
g = g ;
|
||||
n = n
|
||||
};
|
||||
} ;
|
||||
|
||||
mkV = overload {
|
||||
mkV : (inf : Str) -> V = \v -> regV v (dp 2 v) ;
|
||||
mkV : (inf,stem : Str) -> V = regV ;
|
||||
|
||||
Reference in New Issue
Block a user