From b14c0f849279e59d67be38f687e1964f9516fce5 Mon Sep 17 00:00:00 2001 From: aarneranta Date: Fri, 10 Jul 2026 12:29:30 +0200 Subject: [PATCH] complete the Czech Symbol module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- src/czech/SymbolCze.gf | 43 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/src/czech/SymbolCze.gf b/src/czech/SymbolCze.gf index 7cef10b4..a64c3a76 100644 --- a/src/czech/SymbolCze.gf +++ b/src/czech/SymbolCze.gf @@ -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} ; }