mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-08-22 04:06:23 -06:00
complete the Czech Symbol module
Implement the remaining Symbol functions, which previously fell back to
GF's default linearization: IntPN, FloatPN, NumPN, CNNumNP, CNIntNP,
CNSymbNP, SymbS, SymbNum, SymbOrd, and the [Symb] list.
Symbols and numbers are indeclinable neuters, but a cardinal used as a
name still declines (NumPN). CNNumNP treats the numeral as an invariable
label, so the noun carries the case: "město / městu / městem pět".
CNSymbNP goes through numSizeForm and numSizeAgr, as DetCN does, so
SymbNum's Num5 size gives "n měst x a y je staré".
SymbOrd is only approximate: CatCze has no lincat Ord, so it defaults to
{s : Str} and the masculine "n-tý" cannot agree.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+41
-2
@@ -3,9 +3,48 @@
|
||||
concrete SymbolCze of Symbol = CatCze ** open Prelude, ResCze in {
|
||||
|
||||
lincat
|
||||
Symb = {s : Str} ;
|
||||
Symb, [Symb] = SS ;
|
||||
|
||||
lin
|
||||
MkSymb s = s ;
|
||||
SymbPN s = lin PN {s = \\_ => s.s ; g = Neutr} ;
|
||||
|
||||
BaseSymb = infixSS "a" ;
|
||||
ConsSymb = infixSS bindComma ;
|
||||
|
||||
SymbPN s = symbolPN s.s ;
|
||||
IntPN i = symbolPN i.s ;
|
||||
FloatPN f = symbolPN f.s ;
|
||||
|
||||
-- unlike a bare symbol, a cardinal used as a name still declines
|
||||
NumPN card = lin PN {s = \\c => card.s ! Neutr ! c ; g = Neutr} ;
|
||||
|
||||
-- the numeral is an invariable label: "úroveň pět", "na úrovni pět"
|
||||
CNNumNP cn card = {
|
||||
s,clit,prep = \\c => cn.s ! Sg ! c ++ card.s ! cn.g ! Nom ;
|
||||
a = Ag cn.g Sg P3 ;
|
||||
hasClit = False ;
|
||||
} ;
|
||||
|
||||
CNIntNP cn i = {
|
||||
s,clit,prep = \\c => cn.s ! Sg ! c ++ i.s ;
|
||||
a = Ag cn.g Sg P3 ;
|
||||
hasClit = False ;
|
||||
} ;
|
||||
|
||||
-- as DetCN in NounCze, with the symbols in apposition
|
||||
CNSymbNP det cn xs = {
|
||||
s,clit,prep = \\c => det.s ! cn.g ! c ++ numSizeForm cn.s det.size c ++ xs.s ;
|
||||
a = numSizeAgr cn.g det.size P3 ;
|
||||
hasClit = False ;
|
||||
} ;
|
||||
|
||||
SymbS sy = sy ;
|
||||
|
||||
SymbNum sy = {s = \\_,_ => sy.s ; size = Num5} ; -- "n čísel", like numerals from 5 up
|
||||
SymbOrd sy = {s = glue sy.s "-tý"} ; ---- Ord is still an uninflected string
|
||||
|
||||
oper
|
||||
symbolPN : Str -> PN
|
||||
= \s -> lin PN {s = \\_ => s ; g = Neutr} ;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user