apertium / apertium-anaphora

Anaphora Resolution Module in Apertium for low resource languages
https://wiki.apertium.org/wiki/Anaphora_resolution_module
GNU General Public License v3.0
5 stars 4 forks source link

Transfer Rules #8

Closed khannatanmai closed 5 years ago

khannatanmai commented 5 years ago

Write transfer rules for basic anaphora (Possessive pronouns)

khannatanmai commented 5 years ago

Read the instructions to modifying transfer at http://wiki.apertium.org/wiki/Transfer#Adding_structural_transfer_.28grammar.29_rules

khannatanmai commented 5 years ago

Committed several changes to apertium transfer code in apertium/apertium repo

khannatanmai commented 5 years ago

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!

khannatanmai commented 5 years ago

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)

khannatanmai commented 5 years ago

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?

unhammer commented 5 years ago

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

khannatanmai commented 5 years ago

@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.

khannatanmai commented 5 years ago

I put macros and it works! Even if you call it in rules which have just , it will only work in places where there IS an element in , because otherwise, the test fails.