mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 19:42:50 -06:00
factored out RET in letter grammars
This commit is contained in:
@@ -30,6 +30,8 @@ oper
|
|||||||
cnum cn => cn
|
cnum cn => cn
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
RET = "" ; -- &-
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
Letter = SS ;
|
Letter = SS ;
|
||||||
Recipient = SSSrc ;
|
Recipient = SSSrc ;
|
||||||
@@ -44,8 +46,8 @@ Position = SSDep ;
|
|||||||
|
|
||||||
lin
|
lin
|
||||||
MkLetter head mess end =
|
MkLetter head mess end =
|
||||||
ss (head.s ++ "," ++ "&-" ++
|
ss (head.s ++ "," ++ RET ++
|
||||||
mess.s ! end.n ! end.x ! head.n ! head.x ++ "." ++ "&-" ++
|
mess.s ! end.n ! end.x ! head.n ! head.x ++ "." ++ RET ++
|
||||||
end.s ! head.n ! head.x) ;
|
end.s ! head.n ! head.x) ;
|
||||||
|
|
||||||
DearRec rec = {s = "Dear" ++ rec.s ; n = rec.n ; x = rec.x} ;
|
DearRec rec = {s = "Dear" ++ rec.s ; n = rec.n ; x = rec.x} ;
|
||||||
@@ -62,10 +64,10 @@ PlainSent sent = sent ;
|
|||||||
|
|
||||||
FormalEnding auth =
|
FormalEnding auth =
|
||||||
{s = table {n => table {x =>
|
{s = table {n => table {x =>
|
||||||
["Sincerely yours &-"] ++ auth.s ! n ! x}} ; n = auth.n ; x = auth.x} ;
|
["Sincerely yours"] ++ RET ++ auth.s ! n ! x}} ; n = auth.n ; x = auth.x} ;
|
||||||
InformalEnding auth =
|
InformalEnding auth =
|
||||||
{s = table {n => table {x =>
|
{s = table {n => table {x =>
|
||||||
["With best regards &-"] ++ auth.s ! n ! x}} ; n = auth.n ; x = auth.x} ;
|
["With best regards"] ++ RET ++ auth.s ! n ! x}} ; n = auth.n ; x = auth.x} ;
|
||||||
|
|
||||||
ColleaguesHe = {s = kollega ! pl ; n = pl ; x = masc} ;
|
ColleaguesHe = {s = kollega ! pl ; n = pl ; x = masc} ;
|
||||||
ColleaguesShe = {s = kollega ! pl ; n = pl ; x = fem} ;
|
ColleaguesShe = {s = kollega ! pl ; n = pl ; x = fem} ;
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ oper
|
|||||||
cgen cg => cg
|
cgen cg => cg
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
RET = "" ; -- &-
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
Letter = SS ;
|
Letter = SS ;
|
||||||
@@ -84,8 +85,8 @@ Position = SSDep ;
|
|||||||
|
|
||||||
lin
|
lin
|
||||||
MkLetter head mess end =
|
MkLetter head mess end =
|
||||||
ss (head.s ++ "," ++ "&-" ++
|
ss (head.s ++ "," ++ RET ++
|
||||||
mess.s ! end.n ! end.g ! head.n ! head.g ++ "." ++ "&-" ++
|
mess.s ! end.n ! end.g ! head.n ! head.g ++ "." ++ RET ++
|
||||||
end.s ! head.n ! head.g) ;
|
end.s ! head.n ! head.g) ;
|
||||||
|
|
||||||
DearRec rec = {s = cher ! rec.n ! rec.g ++ rec.s ; n = rec.n ; g = rec.g} ;
|
DearRec rec = {s = cher ! rec.n ! rec.g ++ rec.s ; n = rec.n ; g = rec.g} ;
|
||||||
@@ -101,10 +102,10 @@ ModeSent mode sent =
|
|||||||
PlainSent sent = sent ;
|
PlainSent sent = sent ;
|
||||||
|
|
||||||
FormalEnding auth =
|
FormalEnding auth =
|
||||||
{s = table {n => table {g => ["parhain terveisin &-"] ++ auth.s ! n ! g}} ;
|
{s = table {n => table {g => ["parhain terveisin"] ++ RET ++ auth.s ! n ! g}} ;
|
||||||
n = auth.n ; g = auth.g} ;
|
n = auth.n ; g = auth.g} ;
|
||||||
InformalEnding auth =
|
InformalEnding auth =
|
||||||
{s = table {n => table {g => ["terveisin &-"] ++ auth.s ! n ! g}} ;
|
{s = table {n => table {g => ["terveisin"] ++ RET ++ auth.s ! n ! g}} ;
|
||||||
n = auth.n ; g = auth.g} ;
|
n = auth.n ; g = auth.g} ;
|
||||||
|
|
||||||
ColleaguesHe = {s = regNom "kollega" ! pl ; n = pl ; g = masc} ;
|
ColleaguesHe = {s = regNom "kollega" ! pl ; n = pl ; g = masc} ;
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ oper
|
|||||||
cgen cg => cg
|
cgen cg => cg
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
RET = "" ; -- &-
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
Letter = SS ;
|
Letter = SS ;
|
||||||
@@ -81,8 +82,8 @@ Position = SSDep ;
|
|||||||
|
|
||||||
lin
|
lin
|
||||||
MkLetter head mess end =
|
MkLetter head mess end =
|
||||||
ss (head.s ++ "," ++ "&-" ++
|
ss (head.s ++ "," ++ RET ++
|
||||||
mess.s ! end.n ! end.g ! head.n ! head.g ++ "." ++ "&-" ++
|
mess.s ! end.n ! end.g ! head.n ! head.g ++ "." ++ RET ++
|
||||||
end.s ! head.n ! head.g) ;
|
end.s ! head.n ! head.g) ;
|
||||||
|
|
||||||
DearRec rec = {s = cher ! rec.n ! rec.g ++ rec.s ; n = rec.n ; g = rec.g} ;
|
DearRec rec = {s = cher ! rec.n ! rec.g ++ rec.s ; n = rec.n ; g = rec.g} ;
|
||||||
@@ -101,10 +102,10 @@ FormalEnding auth =
|
|||||||
{s =
|
{s =
|
||||||
table {n => table {g =>
|
table {n => table {g =>
|
||||||
"avec" ++ mes ! dep2num auth.n n ++
|
"avec" ++ mes ! dep2num auth.n n ++
|
||||||
["salutations distinguées &-"] ++ auth.s ! n ! g}} ;
|
["salutations distinguées"] ++ RET ++ auth.s ! n ! g}} ;
|
||||||
n = auth.n ; g = auth.g} ;
|
n = auth.n ; g = auth.g} ;
|
||||||
InformalEnding auth =
|
InformalEnding auth =
|
||||||
{s = table {n => table {g => ["Amicalement &-"] ++ auth.s ! n ! g}} ;
|
{s = table {n => table {g => ["Amicalement"] ++ RET ++ auth.s ! n ! g}} ;
|
||||||
n = auth.n ; g = auth.g} ;
|
n = auth.n ; g = auth.g} ;
|
||||||
|
|
||||||
ColleaguesHe = {s = regNom "collègue" ! pl ; n = pl ; g = masc} ;
|
ColleaguesHe = {s = regNom "collègue" ! pl ; n = pl ; g = masc} ;
|
||||||
|
|||||||
@@ -72,6 +72,9 @@ dep2gen : DepGen -> Gen -> Gen = \dg,g -> case dg of {
|
|||||||
cgen cg => cg
|
cgen cg => cg
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
RET = "" ; -- &-
|
||||||
|
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
Letter = SS ;
|
Letter = SS ;
|
||||||
Recipient = SSSrc ;
|
Recipient = SSSrc ;
|
||||||
@@ -86,8 +89,8 @@ Position = SSDep ;
|
|||||||
|
|
||||||
lin
|
lin
|
||||||
MkLetter head mess end =
|
MkLetter head mess end =
|
||||||
ss ("," ++ head.s ++ "&-" ++
|
ss ("," ++ head.s ++ RET ++
|
||||||
mess.s ! end.n ! end.g ! head.n ! head.g ++ "&-" ++
|
mess.s ! end.n ! end.g ! head.n ! head.g ++ RET ++
|
||||||
end.s ! head.n ! head.g) ;
|
end.s ! head.n ! head.g) ;
|
||||||
|
|
||||||
DearRec rec = {s = rec.s ++ regAdj "יקר" ! rec.n ! rec.g;
|
DearRec rec = {s = rec.s ++ regAdj "יקר" ! rec.n ! rec.g;
|
||||||
@@ -107,13 +110,13 @@ PlainSent sent = sent ;
|
|||||||
FormalEnding auth =
|
FormalEnding auth =
|
||||||
{s =
|
{s =
|
||||||
table {n => table {g =>
|
table {n => table {g =>
|
||||||
[",בכבוד רב &-"] ++
|
[", בכבוד רב"] ++ RET ++
|
||||||
auth.s ! n ! g
|
auth.s ! n ! g
|
||||||
}} ;
|
}} ;
|
||||||
n = auth.n ; g = auth.g} ;
|
n = auth.n ; g = auth.g} ;
|
||||||
|
|
||||||
InformalEnding auth =
|
InformalEnding auth =
|
||||||
{s = table {n => table {g => [",בברכה &-"] ++ auth.s ! n ! g}} ;
|
{s = table {n => table {g => [", בברכה"] ++ RET ++ auth.s ! n ! g}} ;
|
||||||
n = auth.n ; g = auth.g} ;
|
n = auth.n ; g = auth.g} ;
|
||||||
|
|
||||||
ColleagueHe = {s = "עמית" ; n = sg ; g = masc} ;
|
ColleagueHe = {s = "עמית" ; n = sg ; g = masc} ;
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ oper
|
|||||||
cgen cg => cg
|
cgen cg => cg
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
RET = "" ; -- &-
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
Letter = SS ;
|
Letter = SS ;
|
||||||
@@ -85,8 +86,8 @@ Position = SSDep ;
|
|||||||
|
|
||||||
lin
|
lin
|
||||||
MkLetter head mess end =
|
MkLetter head mess end =
|
||||||
ss (head.s ++ "," ++ "&-" ++
|
ss (head.s ++ "," ++ RET ++
|
||||||
mess.s ! end.n ! end.g ! head.n ! head.g ++ "." ++ "&-" ++
|
mess.s ! end.n ! end.g ! head.n ! head.g ++ "." ++ RET ++
|
||||||
end.s ! head.n ! head.g) ;
|
end.s ! head.n ! head.g) ;
|
||||||
|
|
||||||
DearRec rec = {s = regAdj "Дорог"
|
DearRec rec = {s = regAdj "Дорог"
|
||||||
@@ -106,10 +107,10 @@ FormalEnding auth =
|
|||||||
{s =
|
{s =
|
||||||
table {n => table {g =>
|
table {n => table {g =>
|
||||||
"С" ++
|
"С" ++
|
||||||
["наилучшими пожеланиями, &-"] ++ auth.s ! n ! g}} ;
|
["наилучшими пожеланиями ,"] ++ RET ++ auth.s ! n ! g}} ;
|
||||||
n = auth.n ; g = auth.g} ;
|
n = auth.n ; g = auth.g} ;
|
||||||
InformalEnding auth =
|
InformalEnding auth =
|
||||||
{s = table {n => table {g => ["С дружеским приветом, &-"] ++ auth.s ! n ! g}} ;
|
{s = table {n => table {g => ["С дружеским приветом , "] ++ RET ++ auth.s ! n ! g}} ;
|
||||||
n = auth.n ; g = auth.g} ;
|
n = auth.n ; g = auth.g} ;
|
||||||
|
|
||||||
ColleaguesHe = {s = "коллеги" ; n = pl ; g = masc} ;
|
ColleaguesHe = {s = "коллеги" ; n = pl ; g = masc} ;
|
||||||
|
|||||||
@@ -36,6 +36,8 @@ oper
|
|||||||
cnum cn => cn
|
cnum cn => cn
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
RET = "" ; -- &-
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
Letter = SS ;
|
Letter = SS ;
|
||||||
Recipient = SSSrc ;
|
Recipient = SSSrc ;
|
||||||
@@ -50,8 +52,8 @@ Position = SSDep ;
|
|||||||
|
|
||||||
lin
|
lin
|
||||||
MkLetter head mess end =
|
MkLetter head mess end =
|
||||||
ss (head.s ++ "," ++ "&-" ++
|
ss (head.s ++ "," ++ RET ++
|
||||||
mess.s ! end.n ! end.x ! head.n ! head.x ++ "." ++ "&-" ++
|
mess.s ! end.n ! end.x ! head.n ! head.x ++ "." ++ RET ++
|
||||||
end.s ! head.n ! head.x) ;
|
end.s ! head.n ! head.x) ;
|
||||||
|
|
||||||
DearRec rec = {s = kaer ! rec.n ! rec.x ++ rec.s ; n = rec.n ; x = rec.x} ;
|
DearRec rec = {s = kaer ! rec.n ! rec.x ++ rec.s ; n = rec.n ; x = rec.x} ;
|
||||||
@@ -68,11 +70,11 @@ PlainSent sent = sent ;
|
|||||||
|
|
||||||
FormalEnding auth =
|
FormalEnding auth =
|
||||||
{s = table {n => table {x =>
|
{s = table {n => table {x =>
|
||||||
["Med vänlig hälsning &-"] ++ auth.s ! n ! x}} ; n = auth.n ; x = auth.x} ;
|
["Med vänlig hälsning"] ++ RET ++ auth.s ! n ! x}} ; n = auth.n ; x = auth.x} ;
|
||||||
|
|
||||||
InformalEnding auth =
|
InformalEnding auth =
|
||||||
{s = table {n => table {x =>
|
{s = table {n => table {x =>
|
||||||
["Med hälsningar &-"] ++ auth.s ! n ! x}} ; n = auth.n ; x = auth.x} ;
|
["Med hälsningar"] ++ RET ++ auth.s ! n ! x}} ; n = auth.n ; x = auth.x} ;
|
||||||
|
|
||||||
ColleaguesHe = {s = kollega ! pl ; n = pl ; x = masc} ;
|
ColleaguesHe = {s = kollega ! pl ; n = pl ; x = masc} ;
|
||||||
ColleaguesShe = {s = kollega ! pl ; n = pl ; x = fem} ;
|
ColleaguesShe = {s = kollega ! pl ; n = pl ; x = fem} ;
|
||||||
|
|||||||
Reference in New Issue
Block a user