We provide a docker service for parsing Discourse Representation Structures (DRS). The service is built on the Transparent Semantic Parsing with Universal Dependencies Using Graph Transformations paper and on the ud-boxer github repository.
Our fork can be found at: https://github.com/adaamko/ud-boxer
The docker service can be started with docker-compose:
docker-compose up
The service is available at: http://localhost:5002/parse
Then you can make a post request to parse a text into DRG (Discourse Representation Graph):
curl -X POST -H "Content-Type: application/json" -d '{"text": "The cat is on the table."}' http://localhost:5002/parse
The response will be a JSON object with the parsed networkx graph.
You can also manually start the service if you don't prefer to use docker:
- Go to our fork and clone it: https://github.com/adaamko/ud-boxer
- Follow the instructions to install the package and the GREW parser
- With this environment, install flask: pip install flask
- Start the service: python service.py
- Test the service
curl -X POST -H "Content-Type: application/json" -d '{"text": "The cat is on the table."}' http://localhost:5002/parse