This is an adapter for NLP2RDF and the MontyLingua Toolkit.
Before using the tool you have to define an environment variable called MONTYLINGUA which links to the directory containing the datafiles (.MDF).
For example:
export MONTYLINGUA=/home/foo/montylingua-2.1/python
python server.py
The webservice runs on port 8001 at /service by default. For parameters etc see the NIF spec.
Therefore you can curl
your query like this
curl "http://localhost:8001/service?nif=true&input-type=text&input=This%20is%20a%20city%20called%20Berlin."
or simply use your browser to query the target.
python nif.py
But this method is mainly for debugging purposes and supports only hardcoded options.
Take a look at this gist for an example output.
-
There are abnormal POS tags used instead of the normal PENN tagset.
This means that the lexicon files of MontyLingua weren't created correctly. Try removing the
FASTLEXICON_*.MDF
files in thepython
directory of MontyLingua and run your query again. MontyLingua will create new lexicon files.