Fix punctuation to use SOFT_BIND and BIND in the whole RGL

This commit is contained in:
Inari Listenmaa
2017-06-30 15:28:27 +02:00
parent f79e27c688
commit a49ce31f8d
26 changed files with 57 additions and 95 deletions

View File

@@ -29,7 +29,7 @@ lin
SymbS sy = {s = \\_ => sy.s} ; SymbS sy = {s = \\_ => sy.s} ;
SymbNum n = {s = \\_,_ => n.s ; n = Pl ; isNum = True} ; SymbNum n = {s = \\_,_ => n.s ; n = Pl ; isNum = True} ;
SymbOrd n = {s = \\_ => n.s ++ "."} ; SymbOrd n = {s = \\_ => glue n.s "."} ;
lincat lincat

View File

@@ -1,5 +1,5 @@
--# -coding=cp1251 --# -coding=cp1251
concrete TextBul of Text = CatBul ** { concrete TextBul of Text = CatBul ** open Prelude in {
flags coding=cp1251 ; flags coding=cp1251 ;
@@ -7,8 +7,8 @@ concrete TextBul of Text = CatBul ** {
lin lin
TEmpty = {s = []} ; TEmpty = {s = []} ;
TFullStop x xs = {s = x.s ++ "." ++ xs.s} ; TFullStop x xs = {s = x.s ++ SOFT_BIND ++ "." ++ xs.s} ;
TQuestMark x xs = {s = x.s ++ "?" ++ xs.s} ; TQuestMark x xs = {s = x.s ++ SOFT_BIND ++ "?" ++ xs.s} ;
TExclMark x xs = {s = x.s ++ "!" ++ xs.s} ; TExclMark x xs = {s = x.s ++ SOFT_BIND ++ "!" ++ xs.s} ;
} }

View File

@@ -6,6 +6,6 @@ concrete CompatibilityCat of Compatibility = CatCat ** open Prelude, CommonRoman
lin lin
NumInt n = {s = \\_ => n.s ; isNum = True ; n = Pl} ; NumInt n = {s = \\_ => n.s ; isNum = True ; n = Pl} ;
OrdInt n = {s = \\_ => n.s ++ "."} ; --- OrdInt n = {s = \\_ => n.s ++ SOFT_BIND ++ "."} ; ---
} }

View File

@@ -41,16 +41,5 @@ lin
perfect_neg_Chunk = ss "no ha" ; perfect_neg_Chunk = ss "no ha" ;
past_perfect_Chunk = ss "havia" ; past_perfect_Chunk = ss "havia" ;
past_perfect_neg_Chunk = ss "no havia" ; past_perfect_neg_Chunk = ss "no havia" ;
fullstop_Chunk = ss "." ;
exclmark_Chunk = ss "!" ;
questmark_Chunk = ss "?" ;
comma_Chunk = ss "," ;
colon_Chunk = ss ":" ;
semicolon_Chunk = ss ";" ;
quote_Chunk = ss "\"" ;
lpar_Chunk = ss "(" ;
rpar_Chunk = ss ")" ;
dash_Chunk = ss "-" ;
} }

View File

@@ -1,5 +1,5 @@
concrete ChunkFre of Chunk = CatFre, ExtensionsFre [VPS,VPI] ** concrete ChunkFre of Chunk = CatFre, ExtensionsFre [VPS,VPI] **
ChunkFunctor - [AP_Chunk, SSlash_Chunk] ChunkFunctor - [AP_Chunk, SSlash_Chunk, quote_Chunk]
with (Syntax = SyntaxFre), (Extensions = ExtensionsFre) ** with (Syntax = SyntaxFre), (Extensions = ExtensionsFre) **
open open
SyntaxFre, (E = ExtensionsFre), Prelude, SyntaxFre, (E = ExtensionsFre), Prelude,
@@ -10,6 +10,11 @@ lin
SSlash_Chunk s = mkUtt <lin S {s = s.s ! {g = Masc ; n = Sg}} : S> ; SSlash_Chunk s = mkUtt <lin S {s = s.s ! {g = Masc ; n = Sg}} : S> ;
quote_Chunk = variants { ss (SOFT_BIND ++ "\"") ;
ss ("\"" ++ SOFT_BIND) ;
ss ("«" ++ SOFT_BIND) ;
ss (SOFT_BIND ++ "»") } ;
lin lin
NP_Acc_Chunk np = ss (np.s ! Acc).ton ; NP_Acc_Chunk np = ss (np.s ! Acc).ton ;
NP_Gen_Chunk np = ss (np.s ! genitive).comp ; NP_Gen_Chunk np = ss (np.s ! genitive).comp ;
@@ -42,15 +47,4 @@ lin
past_perfect_Chunk = ss "avait" ; past_perfect_Chunk = ss "avait" ;
past_perfect_neg_Chunk = ss "n'avait pas" ; past_perfect_neg_Chunk = ss "n'avait pas" ;
fullstop_Chunk = ss "." ;
exclmark_Chunk = ss "!" ;
questmark_Chunk = ss "?" ;
comma_Chunk = ss "," ;
colon_Chunk = ss ":" ;
semicolon_Chunk = ss ";" ;
quote_Chunk = ss "\"" ;
lpar_Chunk = ss "(" ;
rpar_Chunk = ss ")" ;
dash_Chunk = ss "-" ;
} }

View File

@@ -67,18 +67,19 @@ lin
Symb_Chunk s = lin Utt s ; Symb_Chunk s = lin Utt s ;
fullstop_Chunk = ss "." ; fullstop_Chunk = sbSS "." ;
exclmark_Chunk = ss "!" ; exclmark_Chunk = sbSS "!" ;
questmark_Chunk = ss "?" ; questmark_Chunk = sbSS "?" ;
comma_Chunk = ss "," ; comma_Chunk = sbSS "," ;
colon_Chunk = ss ":" ; colon_Chunk = sbSS ":" ;
semicolon_Chunk = ss ";" ; semicolon_Chunk = sbSS ";" ;
quote_Chunk = ss "\"" ; quote_Chunk = variants {sbSS "\"" ; ss ("\"" ++ SOFT_BIND) } ;
lpar_Chunk = ss "(" ; lpar_Chunk = ss ("(" ++ SOFT_BIND) ;
rpar_Chunk = ss ")" ; rpar_Chunk = sbSS ")" ;
dash_Chunk = ss "-" ; dash_Chunk = sbSS "-" ;
oper oper
emptyNP : NP = Syntax.mkNP (P.mkPN []) ; emptyNP : NP = Syntax.mkNP (P.mkPN []) ;
sbSS : Str -> SS = \s -> ss (SOFT_BIND ++ s) ;
} }

View File

@@ -42,15 +42,4 @@ oper
past_perfect_Chunk = ss "aveva" ; past_perfect_Chunk = ss "aveva" ;
past_perfect_neg_Chunk = ss "non aveva" ; past_perfect_neg_Chunk = ss "non aveva" ;
fullstop_Chunk = ss "." ;
exclmark_Chunk = ss "!" ;
questmark_Chunk = ss "?" ;
comma_Chunk = ss "," ;
colon_Chunk = ss ":" ;
semicolon_Chunk = ss ";" ;
quote_Chunk = ss "\"" ;
lpar_Chunk = ss "(" ;
rpar_Chunk = ss ")" ;
dash_Chunk = ss "-" ;
} }

View File

@@ -40,16 +40,5 @@ lin
perfect_neg_Chunk = ss "no ha" ; perfect_neg_Chunk = ss "no ha" ;
past_perfect_Chunk = ss "había" ; past_perfect_Chunk = ss "había" ;
past_perfect_neg_Chunk = ss "no había" ; past_perfect_neg_Chunk = ss "no había" ;
fullstop_Chunk = ss "." ;
exclmark_Chunk = ss "!" ;
questmark_Chunk = ss "?" ;
comma_Chunk = ss "," ;
colon_Chunk = ss ":" ;
semicolon_Chunk = ss ";" ;
quote_Chunk = ss "\"" ;
lpar_Chunk = ss "(" ;
rpar_Chunk = ss ")" ;
dash_Chunk = ss "-" ;
} }

View File

@@ -1,11 +1,11 @@
concrete TextX of Text = CommonX ** { concrete TextX of Text = CommonX ** open Prelude in {
-- This will work for almost all languages except Spanish. -- This will work for almost all languages except Spanish.
lin lin
TEmpty = {s = []} ; TEmpty = {s = []} ;
TFullStop x xs = {s = x.s ++ "." ++ xs.s} ; TFullStop x xs = {s = x.s ++ SOFT_BIND ++ "." ++ xs.s} ;
TQuestMark x xs = {s = x.s ++ "?" ++ xs.s} ; TQuestMark x xs = {s = x.s ++ SOFT_BIND ++ "?" ++ xs.s} ;
TExclMark x xs = {s = x.s ++ "!" ++ xs.s} ; TExclMark x xs = {s = x.s ++ SOFT_BIND ++ "!" ++ xs.s} ;
} }

View File

@@ -29,7 +29,7 @@ lin
SymbS sy = {s = \\_ => sy.s} ; SymbS sy = {s = \\_ => sy.s} ;
SymbNum n = {s = \\_,_ => n.s ; n = Pl ; isNum = True} ; SymbNum n = {s = \\_,_ => n.s ; n = Pl ; isNum = True} ;
SymbOrd n = {s = \\_ => n.s ++ "."} ; SymbOrd n = {s = \\_ => glue n.s "."} ;
lincat lincat

View File

@@ -27,7 +27,7 @@ lin
SymbS sy = sy ; SymbS sy = sy ;
SymbNum n = {s = \\_,_ => n.s ; isNum = True ; n = Pl} ; SymbNum n = {s = \\_,_ => n.s ; isNum = True ; n = Pl} ;
SymbOrd n = {s = \\_ => n.s ++ "."} ; SymbOrd n = {s = \\_ => glue n.s "."} ;
lincat lincat

View File

@@ -6,6 +6,6 @@ concrete CompatibilityFin of Compatibility = CatFin ** open Prelude, ResFin in {
lin lin
NumInt n = {s = \\_,_ => n.s ; isNum = True ; n = Pl} ; NumInt n = {s = \\_,_ => n.s ; isNum = True ; n = Pl} ;
OrdInt n = {s = \\_ => n.s ++ "."} ; OrdInt n = {s = \\_ => n.s ++ SOFT_BIND ++ "."} ;
} }

View File

@@ -27,7 +27,7 @@ lin
SymbS sy = sy ; SymbS sy = sy ;
SymbNum n = {s = \\_,_ => n.s ; isNum = True ; n = Pl} ; SymbNum n = {s = \\_,_ => n.s ; isNum = True ; n = Pl} ;
SymbOrd n = {s = \\_ => n.s ++ "."} ; SymbOrd n = {s = \\_ => glue n.s "."} ;
lincat lincat

View File

@@ -6,6 +6,6 @@ concrete CompatibilityFre of Compatibility = CatFre ** open Prelude, CommonRoman
lin lin
NumInt n = {s = \\_ => n.s ; isNum = True ; n = Pl} ; NumInt n = {s = \\_ => n.s ; isNum = True ; n = Pl} ;
OrdInt n = {s = \\_ => n.s ++ "."} ; --- OrdInt n = {s = \\_ => n.s ++ SOFT_BIND ++ "."} ; ---
} }

View File

@@ -31,7 +31,7 @@ lin
SymbS sy = {s = \\_ => sy.s} ; SymbS sy = {s = \\_ => sy.s} ;
SymbNum n = {s = \\_,_ => n.s ; n = Pl ; isNum = True} ; SymbNum n = {s = \\_,_ => n.s ; n = Pl ; isNum = True} ;
SymbOrd n = {s = \\_ => n.s ++ "."} ; SymbOrd n = {s = \\_ => glue n.s "."} ;
lincat lincat

View File

@@ -32,7 +32,7 @@ lin
SymbS sy = {s = \\_ => sy.s} ; SymbS sy = {s = \\_ => sy.s} ;
SymbNum n = {s = \\_,_ => n.s ; isNum = True ; n = Pl} ; SymbNum n = {s = \\_,_ => n.s ; isNum = True ; n = Pl} ;
SymbOrd n = {s = \\_,_,_,_ => n.s ++ "." ; adv= table { Posit => " " ; Compar => " " ; Superl => " "}} ; SymbOrd n = {s = \\_,_,_,_ => glue n.s "." ; adv= table { Posit => " " ; Compar => " " ; Superl => " "}} ;
lincat lincat

View File

@@ -1,11 +1,11 @@
concrete TextGre of Text = CatGre ** { concrete TextGre of Text = CatGre ** open Prelude in {
flags coding=utf8 ; flags coding=utf8 ;
lin lin
TEmpty = {s = []} ; TEmpty = {s = []} ;
TFullStop x xs = {s = x.s ++ "." ++ xs.s} ; TFullStop x xs = {s = x.s ++ SOFT_BIND ++ "." ++ xs.s} ;
TQuestMark x xs = {s = x.s ++ ";" ++ xs.s} ; TQuestMark x xs = {s = x.s ++ SOFT_BIND ++ ";" ++ xs.s} ;
TExclMark x xs = {s = x.s ++ "!" ++ xs.s} ; TExclMark x xs = {s = x.s ++ SOFT_BIND ++ "!" ++ xs.s} ;
} }

View File

@@ -6,6 +6,6 @@ concrete CompatibilityIta of Compatibility = CatIta ** open Prelude, CommonRoman
lin lin
NumInt n = {s = \\_ => n.s ; isNum = True ; n = Pl} ; NumInt n = {s = \\_ => n.s ; isNum = True ; n = Pl} ;
OrdInt n = {s = \\_ => n.s ++ "."} ; --- OrdInt n = {s = \\_ => n.s ++ SOFT_BIND ++ "."} ; ---
} }

View File

@@ -11,6 +11,6 @@ flags
lin lin
-- TODO: kāpēc citās valodās (piem., Eng, Bul) kategorijai Num (NumInt) ir lauks isNum (= True)? -- TODO: kāpēc citās valodās (piem., Eng, Bul) kategorijai Num (NumInt) ir lauks isNum (= True)?
NumInt n = { s = \\_,_ => n.s ; num = Pl ; hasCard = False } ; NumInt n = { s = \\_,_ => n.s ; num = Pl ; hasCard = False } ;
OrdInt n = { s = \\_,_ => n.s ++ "." } ; OrdInt n = { s = \\_,_ => n.s ++ SOFT_BIND ++ "." } ;
} }

View File

@@ -48,7 +48,7 @@ lin
SymbS sy = sy ; SymbS sy = sy ;
SymbNum sy = { s = \\_,_ => sy.s ; num = Pl } ; SymbNum sy = { s = \\_,_ => sy.s ; num = Pl } ;
SymbOrd sy = { s = \\_,_ => sy.s ++ "."} ; SymbOrd sy = { s = \\_,_ => glue sy.s "."} ;
lincat lincat

View File

@@ -1,10 +1,10 @@
concrete TextMon of Text = CatMon ** { concrete TextMon of Text = CatMon ** open Prelude in {
flags coding=utf8 ; flags coding=utf8 ;
lin lin
TEmpty = {s = []} ; TEmpty = {s = []} ;
TFullStop p t = {s = p.s ++ "." ++ t.s} ; TFullStop p t = {s = p.s ++ SOFT_BIND ++ "." ++ t.s} ;
TQuestMark p t = {s = p.s ++ "?" ++ t.s} ; TQuestMark p t = {s = p.s ++ SOFT_BIND ++ "?" ++ t.s} ;
TExclMark p t = {s = p.s ++ "!" ++ t.s} ; TExclMark p t = {s = p.s ++ SOFT_BIND ++ "!" ++ t.s} ;
} }

View File

@@ -6,6 +6,6 @@ concrete CompatibilityPor of Compatibility = CatPor ** open Prelude, CommonRoman
lin lin
NumInt n = {s = \\_ => n.s ; isNum = True ; n = Pl} ; NumInt n = {s = \\_ => n.s ; isNum = True ; n = Pl} ;
OrdInt n = {s = \\_ => n.s ++ "."} ; --- OrdInt n = {s = \\_ => n.s ++ SOFT_BIND ++ "."} ; ---
} }

View File

@@ -1,12 +1,12 @@
concrete TextPor of Text = CommonX - [Temp,TTAnt,Tense,TPres,TPast,TFut,TCond] ** { concrete TextPor of Text = CommonX - [Temp,TTAnt,Tense,TPres,TPast,TFut,TCond] ** open Prelude in {
flags coding=utf8 ; flags coding=utf8 ;
-- This works for the special punctuation marks of Pornish. -- This works for the special punctuation marks of Portuguese.
lin lin
TEmpty = {s = []} ; TEmpty = {s = []} ;
TFullStop x xs = {s = x.s ++ "." ++ xs.s} ; TFullStop x xs = {s = x.s ++ SOFT_BIND ++ "." ++ xs.s} ;
TQuestMark x xs = {s = "¿" ++ x.s ++ "?" ++ xs.s} ; TQuestMark x xs = {s = "¿" ++ SOFT_BIND ++ x.s ++ SOFT_BIND ++ "?" ++ xs.s} ;
TExclMark x xs = {s = "¡" ++ x.s ++ "!" ++ xs.s} ; TExclMark x xs = {s = "¡" ++ SOFT_BIND ++ x.s ++ SOFT_BIND ++ "!" ++ xs.s} ;
} }

View File

@@ -25,7 +25,7 @@ lin
SymbS sy = {s = \\_ => sy.s} ; SymbS sy = {s = \\_ => sy.s} ;
SymbNum n = {s = \\_ => n.s ; isNum = True ; n = Pl} ; SymbNum n = {s = \\_ => n.s ; isNum = True ; n = Pl} ;
SymbOrd n = {s = \\_ => n.s ++ "."} ; --- SymbOrd n = {s = \\_ => n.s ++ BIND ++ "º"} ; -- feminine variant ª, also variants 1.º and 1.ª
lincat lincat

View File

@@ -6,6 +6,6 @@ concrete CompatibilitySpa of Compatibility = CatSpa ** open Prelude, CommonRoman
lin lin
NumInt n = {s = \\_ => n.s ; isNum = True ; n = Pl} ; NumInt n = {s = \\_ => n.s ; isNum = True ; n = Pl} ;
OrdInt n = {s = \\_ => n.s ++ "."} ; --- OrdInt n = {s = \\_ => n.s ++ SOFT_BIND ++ "."} ; ---
} }

View File

@@ -1,12 +1,12 @@
concrete TextSpa of Text = CommonX - [Temp,TTAnt,Tense,TPres,TPast,TFut,TCond] ** { concrete TextSpa of Text = CommonX - [Temp,TTAnt,Tense,TPres,TPast,TFut,TCond] ** open Prelude in {
flags coding=utf8 ; flags coding=utf8 ;
-- This works for the special punctuation marks of Spanish. -- This works for the special punctuation marks of Spanish.
lin lin
TEmpty = {s = []} ; TEmpty = {s = []} ;
TFullStop x xs = {s = x.s ++ "." ++ xs.s} ; TFullStop x xs = {s = x.s ++ SOFT_BIND ++ "." ++ xs.s} ;
TQuestMark x xs = {s = "¿" ++ x.s ++ "?" ++ xs.s} ; TQuestMark x xs = {s = "¿" ++ SOFT_BIND ++ x.s ++ SOFT_BIND ++ "?" ++ xs.s} ;
TExclMark x xs = {s = "¡" ++ x.s ++ "!" ++ xs.s} ; TExclMark x xs = {s = "¡" ++ SOFT_BIND ++ x.s ++ SOFT_BIND ++ "!" ++ xs.s} ;
} }