See [this issue](https://github.com/apertium/apertium-grn/issues/11) in [apertium-grn](https://github.com/apertium/apertium-grn/) for code/ideas.