Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kenda/nlp2rdf.montylingua
An extension for NLP2RDF and the MontyLingua Toolkit
https://github.com/kenda/nlp2rdf.montylingua
Last synced: 7 days ago
JSON representation
An extension for NLP2RDF and the MontyLingua Toolkit
- Host: GitHub
- URL: https://github.com/kenda/nlp2rdf.montylingua
- Owner: kenda
- Created: 2011-10-24T11:37:35.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2011-12-03T00:53:39.000Z (about 13 years ago)
- Last Synced: 2023-03-23T22:31:46.106Z (almost 2 years ago)
- Language: Python
- Homepage:
- Size: 293 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# About
This is an adapter for [NLP2RDF](http://nlp2rdf.org) and the MontyLingua Toolkit.# Requirements
- [MontyLingua](http://web.media.mit.edu/~hugo/montylingua/)
- [rdflib](http://www.rdflib.net/)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`
# Usage
## Webservice
`python server.py`The webservice runs on port 8001 at /service by default. For parameters etc see the [NIF spec](http://nlp2rdf.org/nif-1-0#toc-parameters).
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.
## Console
`python nif.py`But this method is mainly for debugging purposes and supports only hardcoded options.
# Example
Take a look at this [gist](https://gist.github.com/1309886) for an example output.# Troubleshooting
* **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 the `python` directory of MontyLingua
and run your query again. MontyLingua will create new lexicon files.