pcyin / tranX

A general-purpose neural semantic parser for mapping natural language queries into machine executable code
Apache License 2.0
460 stars 111 forks source link

Setup scripts #42

Open stadlerb opened 2 years ago

stadlerb commented 2 years ago

Hello,

I made setup scripts for TranX so it can be installed into Python environments. I didn't find any version number other than 0.1.0 for a very old Git tag, so I used 0.2.0.

As there is no base package, the Python modules and packages will be installed into the site-packages root. It would be a good idea to move everything into a base package. Also, I could not configure any scripts as the Python scripts under scripts/ don't use the "python -m" syntax, so they don't work outside the source tree, and all of them are named either train.sh or test.sh so there are name collisions when they are put into the environment's bin directory. I also could not use entry_points.console_scripts as exp.py doesn't have a "main" function.

If you're fine with me doing these additional changes, I can make another PR.