-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Possibly related to #80 , blanks are changed depending on unmatched rules.
b.rtx:
gender = m f nt ut un fn mf xpst xpsts xpsto xcomp xsup acr GD ;
number = sg pl sp ND ;
defnes = def ind ;
case = nom acc gen ;
a_det = dem rel qnt pos emph itg ;
a_clb = clb ;
sent: _.a_clb;
det: _.a_det.gender.number.case;
DP: _.gender.number.defnes;
S: _;
DP -> "DP ~> det" %det { %1 } ;
S ->
"3." det.qnt sent.clb.remspc { %1 2 }
! | "2007:" det.qnt sent { %1 2 }
;
Note the space added which wasn't in input:
$ rtx-comp b.rtx b.rtx.bin
$ echo '^2007<det><qnt><un><pl><date>/2007<det><qnt><un><pl><date>$^:<sent><clb>/:<sent><clb>$' | rtx-proc b.rtx.bin
^2007<det><qnt><un><pl><date>$ ^:<sent><clb>$
Now uncomment a rule that matches the sequence and force-removes the space:
$ tr -d '!' < b.rtx >c.rtx
$ rtx-comp c.rtx c.rtx.bin
$ echo '^2007<det><qnt><un><pl><date>/2007<det><qnt><un><pl><date>$^:<sent><clb>/:<sent><clb>$' | rtx-proc c.rtx.bin
^2007<det><qnt><un><pl>$^:<sent><clb>$
but the problem is also "fixed" if you drop the whole S rule with the non-matching (or partially matched) det sent sequence
Metadata
Metadata
Assignees
Labels
No labels