I want to work with the tool FreeLing in Python. I was able to use it as a module on my ubuntu system, because the installation there is pretty easy. But now I need to make it work on Windows, because the end-users of the script only use Windows.
I want to be able to call the freeling library like a module as shown in this example: https://github.com/TALP-UPC/FreeLing/blob/master/APIs/python/sample.py
I also can't find any tipps on how to do this, there are either tutorials on how to use freeling on windows (but not as a python module) or how to use freeling as python module (but only on Unix systems).
The makefile in the API folder of FreeLing only works on Unix-Systems, and I don't know what to try anymore.
Please tell me if you need me to provide more information.
Edit: In their FAQ section, they state that the API makefile only exists for Unix, but theoretically I could replicate the steps on windows. But I really don't know how to do that, so if any of you could help me, I would be super grateful.
The makefile looks like this:
# You may need to change these paths to match your installation.
# Alternatively, you can call 'make' overriding variable values, E.g.:
# make FREELINGDIR=/my/freeling/dir PYTHONDIR=/my/python/dir
FREELINGDIR = /usr/local
PYTHONVER = python3.5.2
PYTHONDIR = /usr/include/$(PYTHONVER)
_freeling.so: freeling_pythonAPI.cxx
g++ -shared -o _freeling.so freeling_pythonAPI.cxx -lfreeling -I$(FREELINGDIR)/include -L$(FREELINGDIR)/lib -I$(PYTHONDIR) -fPIC -std=gnu++0x
# Mac OSX users: Comment the line above, and uncomment the line below:
# g++ -dynamiclib -o _freeling.so freeling_pythonAPI.cxx -lboost_system -l$(PYTHONVER) -lfreeling -I$(FREELINGDIR)/include -L$(FREELINGDIR)/lib -I$(PYTHONDIR) $(CPPFLAGS) $(LDFLAGS) -fPIC -std=c++0x
freeling_pythonAPI.cxx: freeling_pythonAPI.i ../common/freeling.i ../common/templates.i
swig -python -py3 -c++ -o freeling_pythonAPI.cxx freeling_pythonAPI.i
# Python2 users: Remove option "-py3" from the above line
clean:
rm -rf __pycache__ freeling_pythonAPI.cxx _freeling.so freeling.py*