Skip to content

Commit

Permalink
Add modify-tags.regex to avoid
Browse files Browse the repository at this point in the history
continuous regressions in tags for apertium.relabel
  • Loading branch information
rueter committed Jul 6, 2024
1 parent 72013da commit c541ca0
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tools/mt/apertium/tagsets/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
TAGSET_SRCS=

# List reorder regex source files here:
REGEX_SRCS=
REGEX_SRCS=modify-tags.regex

####### Other targets: ###########

Expand Down
83 changes: 83 additions & 0 deletions tools/mt/apertium/tagsets/modify-tags.regex
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
[
[ %<n%> %<prop%> -> %<np%> ]
[ "<sg1>" -> "<p1>" "<sg>" ] .o.
[ "<sg2>" -> "<p2>" "<sg>" ] .o.
[ "<sg3>" -> "<p3>" "<sg>" ] .o.
[ "<pl1>" -> "<p1>" "<pl>" ] .o.
[ "<pl2>" -> "<p2>" "<pl>" ] .o.
[ "<pl3>" -> "<p3>" "<pl>" ] .o.
[ "<ocsg1>" -> "<o_sg1>" ] .o.
[ "<ocsg2>" -> "<o_sg2>" ] .o.
[ "<ocsp3>" -> "<o_sp3>" ] .o.
[ "<ocpl1>" -> "<o_pl1>" ] .o.
[ "<ocpl2>" -> "<o_pl2>" ] .o.
[ "<pxsg1>" -> "<px1sg>" ] .o.
[ "<pxsg2>" -> "<px2sg>" ] .o.
[ "<pxsg3>" -> "<px3sg>" ] .o.
[ "<pxpl1>" -> "<px1pl>" ] .o.
[ "<pxpl2>" -> "<px2pl>" ] .o.
[ "<pxpl3>" -> "<px3pl>" ] .o.
[ "#" -> "+" ] .o.
[ %<cc%> -> %<cnjcoo%> ] .o.
[ %<cs%> -> %<cnjsub%> ] .o.
[ "<hom1>" -> "¹" ,
"<hom2>" -> "²" ,
"<hom3>" -> "³" ,
"<hom4>" -> "" ,
"<hom5>" -> "" ,
"<hom6>" -> "" ,
"<hom7>" -> "" ,
"<hom8>" -> "" ,
"<hom9>" -> "" ,
"<ex_n><prop>" -> "<ex_np>" ,
"Ex/N" -> "<ex_n>" ,
"Ex/A" -> "<ex_adj>" ,
"Ex/V" -> "<ex_vblex>" ,
"<ex_a>" -> "<ex_adj>" ,
"<ex_v>" -> "<ex_vblex>" ,
"+Ex/TV" -> "<ex_tv>" ,
"+Ex/IV" -> "<ex_iv>" ,
"+AA" -> "<ex_adj>" ,
"+NN" -> "<ex_n>" ,
"+VV" -> "<ex_vblex>" ,
"+IVV" -> "<ex_iv>" ,
"+TVV" -> "<ex_tv>" ,
"<pron>" -> "<prn>" ,
"<superl>" -> "<sup>" ,
"<v>" -> "<vblex>" ,
"<interr>" -> "<itg>" ,
"<prs>" -> "<pres>" ,
"<imprt>" -> "<imp>" ,
"<prt>" -> "<pret>" ,
"<a>" -> "<adj>" ,
"<refl>" -> "<ref>" ,
"<interj>" -> "<ij>" ,
"<indef>" -> "<ind>" ,
"<ind>" -> "<indic>" ,
"<inan>" -> "<nn>" ,
"<comma>" -> "<cm>" ,
"<cmpnd>" -> "<cmp>" ,
"<cmpar>" -> "<comp>" ,
"<recipr>" -> "<res>" ] .o.
[ "^" -> 0 ] .o.
[ "<iv>" -> 0 ] .o.
[ "<tv>" -> 0 ] .o.
[ {excl} "<clb>" -> "!" "<sent>" ] .o.
[ {pipe} "<clb>" -> "|" "<sent>" ] .o.
[ "<clb>" -> "<cm>" || "," _ ] .o.
[ "<clb>" -> "<sent>" || "." _ ] .o.
[ "<clb>" -> "<sent>" || "" _ ] .o.
[ "<clb>" -> "<sent>" || {..} _ ] .o.
[ "<clb>" -> "<sent>" || {...} _ ] .o.
[ "<clb>" -> "<sent>" || "¿" _ ] .o.
[ "<clb>" -> "<sent>" || "" _ ] .o.
[ "<clb>" -> "<sent>" || "?" _ ] .o.
[ "<clb>" -> "<sent>" || ":" _ ] .o.
[ "<clb>" -> "<sent>" || ";" _ ] .o.
[ "<punct>" -> "<guio>" || "-" _ ] .o.
[ "-" -> "<guio>" || [ "<cmp>" ] _ ] .o.
[ "<punct>" "<left>" -> "<lquot>" ]
[ "<punct>" "<right>" -> "<rquot>" ]
[ "<punct>" -> "<quot>" || %" _ ]
] ;

0 comments on commit c541ca0

Please sign in to comment.