Closed khannatanmai closed 5 years ago
Read the instructions to modifying transfer at http://wiki.apertium.org/wiki/Transfer#Adding_structural_transfer_.28grammar.29_rules
Committed several changes to apertium transfer code in apertium/apertium repo
Changes to add a new side for clip called "ref" so that we can detect the extra LU passed and then write transfer rules related to that!
Made changes to code, now writing the transfer rule to verify changes. will fix last remaining errors after transfer rule written. (currently writing transfer rules only for possessive determiners)
Transfer rule written and working. However, longer rules match instead of this rule. Solutions: write macro and put everywhere det-pos is used? is there a way to pick a rule even if its not the LRLM?
@unhammer @ftyers any suggestions?
Sure, macros are nice. Where are your transfer code changes?
If a rule that shouldn't match still matches, there is a way to drop to the next rule (e.g. if after inspecting the tags you find that a shorter rule should match) with reject-current-rule
, but I can't quite imagine that's what you'd want now
@unhammer the transfer code changes can be found in this repo: https://github.com/apertium/apertium/tree/anaphora
The transfer rules used to test are here: https://github.com/khannatanmai/apertium-anaphora/blob/master/Transfer_Check/transfer_anaphora.t1x
I basically need a way to make the anaphora rule match and then the chunking rule match. One possible solution could be to do it even before chunking, but that would mean the creation of a whole module which works which transfer rules, and I'm hoping there's a better solution.
The problem with macros is putting the macro in every rule which has det_pos, pronouns, even verbs, and having to do that even in the future when more rules are added. A better solution might be more sustainable.
I put macros and it works!
Even if you call it in rules which have just
Write transfer rules for basic anaphora (Possessive pronouns)