amineabdaoui / python-heideltime

A python wrapper for the multilingual temporal tagger HeidelTime.
GNU General Public License v3.0
26 stars 5 forks source link

demo output #1

Closed alabrashJr closed 5 years ago

alabrashJr commented 5 years ago

Hello, would you please add a demo to the readme.

Best Regards

amineabdaoui commented 5 years ago

Hello @alabrashJr

I am working right now on the packaging. I am using setuptools to facilitate the installation process but the main difficulty is to include TreeTagger in the dependency and set its correct path in the config.props file (used by the HeidelTime jar). The aim is to put everything in the same python package, the user will just have to install this package and use it in python code.

Meanwhile, I suggest you use the current version of the wrapper as follows:

  1. Clone the current github repo: git clone https://github.com/amineabdaoui/python-heideltime
  2. install its requirements: pip install -r requirements.txt
  3. Create a python file in the same directory with the following code:
    import HeidelTime
    hw = HeidelTime.HeidelTimeWrapper('english')
    hw.parse('Neil Armstrong was born in 1930')

    Note that this will work only on Mac and Linux. For Windows, you will have to download the corresponding TreeTagger scripts : http://www.cis.uni-muenchen.de/~schmid/tools/TreeTagger/

I will also try to handle this in the packaged version.

Hope this helps ?

Bests

alabrashJr commented 5 years ago

Thanks for kindly replay, it works now.

Best Regards.