BLLIP / bllip-parser

BLLIP reranking parser (also known as Charniak-Johnson parser, Charniak parser, Brown reranking parser) See http://pypi.python.org/pypi/bllipparser/ for Python module.
http://bllip.cs.brown.edu/
227 stars 53 forks source link

Python3 bindings (pip) not working #68

Closed Paulo-Jorge-PM closed 2 years ago

Paulo-Jorge-PM commented 2 years ago

Python 3 installation is not working, both on Linux (Python 3.8 on Ubuntu 18 and 20) and Windows (10 Python 3.5).

I am trying to install it with "pip3 install bllipparser" but it always fails ("Don't know how to compile first-stage/PARSE/swig/wrapper.C" etc.). Using "make" is not working also.

Thanks for your work.

dmcc commented 2 years ago

Thanks for the report! I think the issue is that the generated SWIG files have gone bad with the latest versions of things. I'll try to do a new PyPI release soon, but in the meantime, does it help if you run:

sudo apt-get install swig3.0 flex

and then try

python setup.py build
Paulo-Jorge-PM commented 2 years ago

You are the best, it works now! Thank you very much! I am building an hobbie text editor for linguistics and Thursday will have a presentation - it stopped crashing, you saved me in good time :)

For anyone with the same problem:

Installed the missing dependencies in Ubuntu 20 (Python 3.8): sudo apt-get install swig3.0 flex Dowloaded the Git repository; Extracted it and went to its dir and: python3 setup.py build All went ok. In the end, in the "builds" folder you will find the built "bllipparser" folder ready for use, just copy paste it to the root dir of some script/app that needs it and done: bllipparser back to life.

Thanks

dmcc commented 2 years ago

For others who find this bug: There's a new version of BLLIP Parser at https://pypi.org/project/bllipparser/2021.11.7/

This should fix the build issues. If not, please reopen this bug!