mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-21 09:02:50 -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 ->
|
dSDP : Str -> NForms = \SDP ->
|
||||||
let
|
let
|
||||||
c = case last SDP of {
|
c = case Predef.toUpper (last SDP) of {
|
||||||
"A" =>
|
"A" =>
|
||||||
<"n","ta","na","han","iden","ita","ina","issa","ihin"> ;
|
<"n","ta","na","han","iden","ita","ina","issa","ihin"> ;
|
||||||
"B" | "C" | "D" | "E" | "G" | "P" | "T" | "V" | "W" =>
|
"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"> ;
|
||||||
"Ö" =>
|
"Ö" =>
|
||||||
<"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)
|
_ => Predef.error (["illegal abbreviation"] ++ SDP)
|
||||||
} ;
|
} ;
|
||||||
in nForms10
|
in nForms10
|
||||||
|
|||||||
@@ -365,6 +365,7 @@ oper
|
|||||||
ukon = weakGrade ukko + "n" ;
|
ukon = weakGrade ukko + "n" ;
|
||||||
in
|
in
|
||||||
case <ukko,ukkoja> of {
|
case <ukko,ukkoja> of {
|
||||||
|
<_, _ + ":" + ? + ("a" | "ä")> => dSDP ukko ;
|
||||||
<_ + "ea", _ + "oita"> =>
|
<_ + "ea", _ + "oita"> =>
|
||||||
dSilakka ukko ukon ukkoja ; -- idea, but not korkea
|
dSilakka ukko ukon ukkoja ; -- idea, but not korkea
|
||||||
<_ + ("aa" | "ee" | "ii" | "oo" | "uu" | "yy" | "ää" | "öö" |
|
<_ + ("aa" | "ee" | "ii" | "oo" | "uu" | "yy" | "ää" | "öö" |
|
||||||
@@ -380,7 +381,6 @@ oper
|
|||||||
<_ + ("ut" | "yt"),_ + ("uita" | "yitä")> => dRae ukko (init ukko + "en") ;
|
<_ + ("ut" | "yt"),_ + ("uita" | "yitä")> => dRae ukko (init ukko + "en") ;
|
||||||
<_ + "e", nuk + ("eja" | "ejä")> =>
|
<_ + "e", nuk + ("eja" | "ejä")> =>
|
||||||
dNukke ukko ukon ;
|
dNukke ukko ukon ;
|
||||||
<_, _ + ":" + _ + ("a" | "ä")> => dSDP ukko ;
|
|
||||||
<_ + ("l" | "n" | "r" | "s"), _ + ("eja" | "ejä")> => dUnix ukko ;
|
<_ + ("l" | "n" | "r" | "s"), _ + ("eja" | "ejä")> => dUnix ukko ;
|
||||||
<_, _ + ("a" | "ä")> => ukot ;
|
<_, _ + ("a" | "ä")> => ukot ;
|
||||||
_ =>
|
_ =>
|
||||||
@@ -394,6 +394,7 @@ oper
|
|||||||
ukot = nForms2 ukko ukkoja ;
|
ukot = nForms2 ukko ukkoja ;
|
||||||
in
|
in
|
||||||
case <ukko,ukon> of {
|
case <ukko,ukon> of {
|
||||||
|
<_, _ + ":n"> => dSDP ukko ;
|
||||||
<_ + ("aa" | "ee" | "ii" | "oo" | "uu" | "yy" | "ää" | "öö" |
|
<_ + ("aa" | "ee" | "ii" | "oo" | "uu" | "yy" | "ää" | "öö" |
|
||||||
"ie" | "uo" | "yö" | "ea" | "eä" |
|
"ie" | "uo" | "yö" | "ea" | "eä" |
|
||||||
"ia" | "iä" | "io" | "iö" | "ja" | "jä"), _ + "n"> =>
|
"ia" | "iä" | "io" | "iö" | "ja" | "jä"), _ + "n"> =>
|
||||||
@@ -409,7 +410,6 @@ oper
|
|||||||
<nukk + "e", nuk + "een"> => dRae ukko ukon ;
|
<nukk + "e", nuk + "een"> => dRae ukko ukon ;
|
||||||
<arp + "i", arv + "en"> => dArpi ukko ukon ;
|
<arp + "i", arv + "en"> => dArpi ukko ukon ;
|
||||||
<_ + ("us" | "ys"), _ + "den"> => dLujuus ukko ;
|
<_ + ("us" | "ys"), _ + "den"> => dLujuus ukko ;
|
||||||
<_, _ + ":n"> => dSDP ukko ;
|
|
||||||
<_, _ + "n"> => ukot ;
|
<_, _ + "n"> => ukot ;
|
||||||
_ =>
|
_ =>
|
||||||
Predef.error (["second argument should end in n, not"] ++ ukon)
|
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 eqStr : Tok -> Tok -> PBool = variants {} ; -- test if equal strings
|
||||||
oper occur : Tok -> Tok -> PBool = variants {} ; -- test if occurs as substring
|
oper occur : Tok -> Tok -> PBool = variants {} ; -- test if occurs as substring
|
||||||
oper occurs : Tok -> Tok -> PBool = variants {} ; -- test if any char occurs
|
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 show : (P : Type) -> P -> Tok = variants {} ; -- convert param to string
|
||||||
oper read : (P : Type) -> Tok -> P = variants {} ; -- convert string to param
|
oper read : (P : Type) -> Tok -> P = variants {} ; -- convert string to param
|
||||||
oper toStr : (L : Type) -> L -> Str = variants {} ; -- find the "first" string
|
oper toStr : (L : Type) -> L -> Str = variants {} ; -- find the "first" string
|
||||||
|
|||||||
Reference in New Issue
Block a user