better postchunk rules for trx
Closed this issue · 0 comments
mr-martian commented
@ftyers @khannatanmai
Regarding introspecting chunks, there isn't really a way to do that in parsing rules and my way of implementing postchunk rules (copying the structure of t3x with lemma matching) is really messy.
What do you thinking rules like this?
<output-rule name="insert_det">
<!-- assorted manipulations -->
<out>
<lu>...</lu>
...
</out>
<!-- or -->
<output-all/>
<!-- for if you changed tags and things but haven't added or removed any chunks -->
</output-rule>
<rule>
<pattern>...</pattern>
<action>
<out>
<chunk output-rule="insert_det">...</chunk>
</out>
</action>
</rule>
Means of modifying which output rule was set for a chunk could of course also be added (whether with <let>
and <clip>
or with specialized instructions, I'm not sure).