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

Clip side for rules that hit non-terminals does not make sense #52

Closed ftyers closed 4 years ago

ftyers commented 4 years ago

At the moment we have

         <tag><clip pos="1" side="sl" part="a_gen"/></tag>

and

         <tag><clip pos="1" side="tl" part="a_gen"/></tag>

These can be used the same way in terminals and in non-terminals, but in non-terminals there is no target side to the clip, so it returns null. A simple start would be to allow:

         <tag><clip pos="1" part="a_gen"/></tag>

For non-terminals. But potentially we need to rethink how this works.

ftyers commented 4 years ago

It might also be interesting to allow both SL and TL (and ref?) of non-terminals.

mr-martian commented 4 years ago

<clip pos="1" part="a_gen"/> and <clip pos="1" part="a_gen" side="tl"/> are already equivalent and non-terminals have a target side and nothing else.

ftyers commented 4 years ago

Yeah, I worked that out, but then it should maybe give an error or warning if you try and clip from an sl side?

mr-martian commented 4 years ago

The problem is that terminals and non-terminals are actually indistinguishable unless you want to explicitly mark it on all your <def-cat>s.

mr-martian commented 4 years ago

Also, due to #59, clipping the source side of a non-terminal will soon make sense.