apertium / apertium-recursive

Recursive structural transfer module for Apertium
https://wiki.apertium.org/wiki/Apertium-recursive
GNU General Public License v3.0
6 stars 4 forks source link

Possible extensions of tag-copy patterns #69

Open mr-martian opened 3 years ago

mr-martian commented 3 years ago

55619a0 added the ability to write tag patterns like num: %; for "when outputing num, just use the tl from biltrans".

Some possible useful extensions of this that we should consider implementing:

Copy tl and add a tag at the end:

n: %.number;

Modify a tag within a copied string:

adj: %;
NP -> n adj { 2[number=1.number] _ 1 }
      ! currently 2[number=1.number] and 2 are entirely equivalent here

Apply tag-rewrite rules (might need to be manually specified at output time).

Also, there should probably be an error message if this sort of pattern is used for a chunk.