- This repository is an initial attempt towards making a full fleged python wrapper for the Apertium Lttoolbox module.
- In this repository a trivial wrapping of the
transducer.ccmodule has been attempted - Contents of the repository :
- Nessecary header files
- Nessecary
.ccfiles setup.pyDisuitls file to set things up for building the wrapperbugs.mdDescription of bugs and faults with this trivial system and a little insight on how to proceed with the project.transducer.iThe swig interface filetransducer.pyandtransducer.cxxThese are generated files and can be generated by building.oand.sofiles . These object and shared object files are also generated from the build
git clone repocd reposwig -python -c++ transducer.ipython setup.py build_ext --inplaceg++ -c -fcip transducer_wrap.cxx transducer.cc -I/{{path to python header}} -std=c++11g++ -shared transducer.o transducer_wrap.o -o _transducer.sopkg-config --cflags --libs python3 lttoolbox-std=c++11
chmod +x run.sh./run.sh
- After the above steps are completed just open python in the terminal and try to
import transducer - Make sure to run the appropriate version of python
- To get the path to python header in the environment, enter
python-config --cflagsin the terminal
