mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
numeral spacing in some languages
This commit is contained in:
@@ -61,16 +61,17 @@ lin
|
||||
s = \\_,c => d.s ! c ++ BIND ++ kymmentaN.s ! c ++ BIND ++ e.s ! NumIndep ! c
|
||||
} ;
|
||||
pot1as2 n = n ;
|
||||
pot2 d = {n = Pl ; s = \\_,c => d.s ! NumAttr ! c ++ BIND ++ sataaN.s ! d.n ! c} ; ----
|
||||
pot2 d = {n = Pl ; s = \\_,c => d.s ! NumAttr ! c ++ nBIND d.n ++ sataaN.s ! d.n ! c} ; ----
|
||||
pot2plus d e = {
|
||||
n = Pl ;
|
||||
s = \\_,c => d.s ! NumAttr ! c ++ BIND ++ sataaN.s ! d.n ! c ++ e.s ! NumIndep ! c
|
||||
s = \\_,c => d.s ! NumAttr ! c ++ nBIND d.n ++ sataaN.s ! d.n ! c ++
|
||||
BIND ++ e.s ! NumIndep ! c
|
||||
} ;
|
||||
pot2as3 n = {n = n.n ; s = n.s ! NumIndep} ;
|
||||
pot3 d = {n = Pl ; s = \\c => d.s ! NumAttr ! c ++ tuhattaN.s ! d.n ! c} ; ----
|
||||
pot3 d = {n = Pl ; s = \\c => d.s ! NumAttr ! c ++ nBIND d.n ++ tuhattaN.s ! d.n ! c} ; ----
|
||||
pot3plus d e = {
|
||||
n = Pl ;
|
||||
s = \\c => d.s ! NumAttr ! c ++ tuhattaN.s ! d.n ! c ++ e.s ! NumIndep ! c
|
||||
s = \\c => d.s ! NumAttr ! c ++ nBIND d.n ++ tuhattaN.s ! d.n ! c ++ e.s ! NumIndep ! c
|
||||
} ;
|
||||
|
||||
oper
|
||||
@@ -81,6 +82,8 @@ oper
|
||||
}
|
||||
} ;
|
||||
|
||||
nBIND : Number -> Str = \n -> case n of {Sg => [] ; _ => BIND} ; -- no BIND after silent 1
|
||||
|
||||
-- Too much trouble to infer vowel, cf. "kuudes" vs. "viides".
|
||||
|
||||
ordN : Str -> Str -> {s : NForm => Str} = \a,sadas ->
|
||||
|
||||
@@ -44,7 +44,7 @@ lin
|
||||
pot3 n = {s = \\g =>
|
||||
multiple n.s n.n ++ cardOrd "tausend" "tausendte" ! g ; n = Pl} ; ----
|
||||
pot3plus n m = {s = \\g =>
|
||||
multiple n.s n.n ++ "tausend" ++ BIND ++ m.s ! g ; n = Pl} ;
|
||||
multiple n.s n.n ++ "tausend" ++ m.s ! g ; n = Pl} ;
|
||||
|
||||
oper
|
||||
multiple : (CardOrd => Str) -> Number -> Str = \d,n ->
|
||||
|
||||
@@ -35,7 +35,7 @@ lin pot01 =
|
||||
NCard Fem => "una" ;
|
||||
_ => uno ! f ! g
|
||||
};
|
||||
indep => case g of
|
||||
indip => case g of
|
||||
{ NCard _ => [] ;
|
||||
_ => uno ! f ! g
|
||||
}
|
||||
@@ -54,25 +54,27 @@ lin pot1 d = spl (d.s ! tiotal) ;
|
||||
lin pot1plus d e =
|
||||
let ss = if_then_Str e.isContr (d.s ! tiouno ! NCard Masc) (d.s ! tiotal ! NCard Masc)
|
||||
in
|
||||
{s = table {NCard g => ss ++ "&+" ++(e.s ! ental pred ! NCard Masc) ;
|
||||
NOrd g n => ss ++ "&+" ++e.s ! ental indip ! NOrd g n};
|
||||
{s = table {NCard g => ss ++ BIND ++(e.s ! ental pred ! NCard Masc) ;
|
||||
NOrd g n => ss ++ BIND ++e.s ! ental indip ! NOrd g n};
|
||||
n = Pl} ;
|
||||
|
||||
lin pot1as2 n = n ;
|
||||
|
||||
lin pot2 d = spl (\\co => d.s ! ental indip ! NCard Masc ++ "&+"++
|
||||
lin pot2 d = spl (\\co => d.s ! ental indip ! NCard Masc ++ nBIND d.n ++
|
||||
(mkTall "cento" [] [] [] "cent").s ! ental indip ! co) ;
|
||||
lin pot2plus d e =
|
||||
{s = table {NCard g => d.s ! ental indip ! NCard Masc ++ "&+" ++"cento" ++ "&+" ++e.s ! NCard Masc ;
|
||||
NOrd g n => d.s ! ental indip ! NCard Masc ++ "&+" ++"cento" ++ "&+" ++ e.s ! NOrd g n};
|
||||
{s = table {NCard g => d.s ! ental indip ! NCard Masc ++ nBIND d.n ++"cento" ++ BIND ++e.s ! NCard Masc ;
|
||||
NOrd g n => d.s ! ental indip ! NCard Masc ++ nBIND d.n ++"cento" ++ BIND ++ e.s ! NOrd g n};
|
||||
n = Pl} ;
|
||||
lin pot2as3 n = n ;
|
||||
lin pot3 n = spl (\\co => n.s ! NCard Masc ++ "&+" ++
|
||||
lin pot3 n = spl (\\co => n.s ! NCard Masc ++ nBIND n.n ++
|
||||
(mkTall (mille ! n.n) [] [] [] "mill").s ! ental indip ! co ) ;
|
||||
|
||||
lin pot3plus n m = {s = \\g => n.s ! NCard Masc ++ "&+" ++ mille ! n.n ++ "e" ++ m.s ! g ; n = Pl} ;
|
||||
lin pot3plus n m = {s = \\g => n.s ! NCard Masc ++ nBIND n.n ++ mille ! n.n ++ "e" ++ m.s ! g ; n = Pl} ;
|
||||
|
||||
oper
|
||||
nBIND : Number -> Str = \n -> case n of {Sg => [] ; _ => BIND} ; -- no BIND after silent 1
|
||||
|
||||
mkTall : (x1,_,_,_,x5 : Str) -> {s : DForm => CardOrd => Str} =
|
||||
\due,dodici,venti,secondo,du ->
|
||||
{s = \\d,co => case <d,co> of {
|
||||
|
||||
Reference in New Issue
Block a user