mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
Finnish SDP paradigm ported to lower-case by using Predef.toUpper
This commit is contained in:
@@ -277,7 +277,7 @@ resource MorphoFin = ResFin ** open Prelude in {
|
||||
|
||||
dSDP : Str -> NForms = \SDP ->
|
||||
let
|
||||
c = case last SDP of {
|
||||
c = case Predef.toUpper (last SDP) of {
|
||||
"A" =>
|
||||
<"n","ta","na","han","iden","ita","ina","issa","ihin"> ;
|
||||
"B" | "C" | "D" | "E" | "G" | "P" | "T" | "V" | "W" =>
|
||||
@@ -296,6 +296,8 @@ resource MorphoFin = ResFin ** open Prelude in {
|
||||
<"n","tä","nä","hän","iden","itä","inä","issä","ihin"> ;
|
||||
"Ö" =>
|
||||
<"n","tä","nä","hön","iden","itä","inä","issä","ihin"> ;
|
||||
"Y" =>
|
||||
<"n","tä","nä","hyn","iden","itä","inä","issä","ihin"> ;
|
||||
_ => Predef.error (["illegal abbreviation"] ++ SDP)
|
||||
} ;
|
||||
in nForms10
|
||||
|
||||
@@ -365,6 +365,7 @@ oper
|
||||
ukon = weakGrade ukko + "n" ;
|
||||
in
|
||||
case <ukko,ukkoja> of {
|
||||
<_, _ + ":" + ? + ("a" | "ä")> => dSDP ukko ;
|
||||
<_ + "ea", _ + "oita"> =>
|
||||
dSilakka ukko ukon ukkoja ; -- idea, but not korkea
|
||||
<_ + ("aa" | "ee" | "ii" | "oo" | "uu" | "yy" | "ää" | "öö" |
|
||||
@@ -380,7 +381,6 @@ oper
|
||||
<_ + ("ut" | "yt"),_ + ("uita" | "yitä")> => dRae ukko (init ukko + "en") ;
|
||||
<_ + "e", nuk + ("eja" | "ejä")> =>
|
||||
dNukke ukko ukon ;
|
||||
<_, _ + ":" + _ + ("a" | "ä")> => dSDP ukko ;
|
||||
<_ + ("l" | "n" | "r" | "s"), _ + ("eja" | "ejä")> => dUnix ukko ;
|
||||
<_, _ + ("a" | "ä")> => ukot ;
|
||||
_ =>
|
||||
@@ -394,6 +394,7 @@ oper
|
||||
ukot = nForms2 ukko ukkoja ;
|
||||
in
|
||||
case <ukko,ukon> of {
|
||||
<_, _ + ":n"> => dSDP ukko ;
|
||||
<_ + ("aa" | "ee" | "ii" | "oo" | "uu" | "yy" | "ää" | "öö" |
|
||||
"ie" | "uo" | "yö" | "ea" | "eä" |
|
||||
"ia" | "iä" | "io" | "iö" | "ja" | "jä"), _ + "n"> =>
|
||||
@@ -409,7 +410,6 @@ oper
|
||||
<nukk + "e", nuk + "een"> => dRae ukko ukon ;
|
||||
<arp + "i", arv + "en"> => dArpi ukko ukon ;
|
||||
<_ + ("us" | "ys"), _ + "den"> => dLujuus ukko ;
|
||||
<_, _ + ":n"> => dSDP ukko ;
|
||||
<_, _ + "n"> => ukot ;
|
||||
_ =>
|
||||
Predef.error (["second argument should end in n, not"] ++ ukon)
|
||||
|
||||
@@ -27,6 +27,9 @@ resource Predef = {
|
||||
oper eqStr : Tok -> Tok -> PBool = variants {} ; -- test if equal strings
|
||||
oper occur : Tok -> Tok -> PBool = variants {} ; -- test if occurs as substring
|
||||
oper occurs : Tok -> Tok -> PBool = variants {} ; -- test if any char occurs
|
||||
oper isUpper : Tok -> PBool = variants {} ; -- test if all chars are upper-case
|
||||
oper toUpper : Tok -> Tok = variants {} ; -- map all chars to upper case
|
||||
oper toLower : Tok -> Tok = variants {} ; -- map all chars to lower case
|
||||
oper show : (P : Type) -> P -> Tok = variants {} ; -- convert param to string
|
||||
oper read : (P : Type) -> Tok -> P = variants {} ; -- convert string to param
|
||||
oper toStr : (L : Type) -> L -> Str = variants {} ; -- find the "first" string
|
||||
|
||||
Reference in New Issue
Block a user