User:Vaydheesh/GSoC2019Report

From Apertium
Jump to navigation Jump to search

Python API/Library for Apertium[edit]

For this project, I coded swig wrappers to be used in the Apertium Python.

Mentors[edit]

Sushain Cherivirala, Shoutout to various aperitum members that helped throughout the project Tino Didriksen, Kevin Brubeck Unhammer, Francis Tyers,

Documentation[edit]

The Documentation in form of markdown for Apertium Python is available at README and on Read The Docs


Work Done during GSoC 2019[edit]

1. SWIG wrapper for various binaries called by apertium mode files i.e. lt-proc, lrx-proc, apertium-transfer, apertium-interchunk, apertium-postchunk, apertium-pretransfer, apertium-tagger, cg-proc and their implementation in apertium-python with a subprocess fallback in absence of wrappers. The initialized wrapper objects are also stored for optimising the successive calls.

2. Installer for project on Ubuntu and Windows by executing `python setup.py install` which internally installs `aperitum-all-dev`, aperitum-eng & aperitum-en-es language package and also installs the wrapper binaries on Ubuntu.

3. Added support for tagger

4. Updated the documentation with changes in apertium python

Code for the module[edit]

Main Repository: https://github.com/apertium/apertium-python

Changes made to Apertium Code[edit]

https://apertium.projectjj.com/gsoc2019/Vaydheesh/Vaydheesh.html

1. apertium python

 - https://github.com/apertium/apertium-python/pull/42
 - https://github.com/apertium/apertium-python/pull/46
 - https://github.com/apertium/apertium-python/pull/53
 - https://github.com/apertium/apertium-python/pull/56
 - https://github.com/apertium/apertium-python/pull/57
 - https://github.com/apertium/apertium-python/pull/58
 - https://github.com/apertium/apertium-python/pull/59
 - https://github.com/apertium/apertium-python/pull/62
 - https://github.com/apertium/apertium-python/pull/63

2. lttoolbox

 - https://github.com/apertium/lttoolbox/pull/53
 - https://github.com/apertium/lttoolbox/pull/58
 - https://github.com/apertium/lttoolbox/pull/64
 - https://github.com/apertium/lttoolbox/pull/67
 - https://github.com/apertium/lttoolbox/pull/69

3. apertium core tools

 - https://github.com/apertium/apertium/pull/51
 - https://github.com/apertium/apertium/pull/52
 - https://github.com/apertium/apertium/pull/54
 - https://github.com/apertium/apertium/pull/56

4. apertium lex tools

 - https://github.com/apertium/apertium-lex-tools/pull/22
 - https://github.com/apertium/apertium-lex-tools/pull/26
 - https://github.com/apertium/apertium-lex-tools/pull/28

5. Constrain Grammar 3 SWIG Wrapper for cg-proc https://github.com/TinoDidriksen/cg3/pull/37


Experience[edit]

Overall, it was a wonderful and satisfying journey. I had a great learning experience and a great time coding. Debugging the wrapper had its own set of challenges. I got stuck in the debugging task for a some time during the GSoC period. Hadn't been there the help from my mentor and other member of Apertium, I don't think I could have fixed those bugs. Fortunately all these issues got fixed and I was able to complete the wrapping process within time


Open Pull Request[edit]

1. https://github.com/apertium/apertium-python/pull/64


TODO[edit]

1. Install wrapper on windows during python setup.py install

2. Optimise the wrapper caching process

3. Other issues mentioned in Apertium Python Issues


Endnote[edit]

Thanks a lot to all members of apertium. I was very fortunate to get this opportunity to work with this wonderful organisation. My mentor Sushain Cherivirala & the apertium members are very helpful and this project wouldn't be possible without their constant help and guidance. I would really like to thank all of them.