Skip to content

StageDP RST parser (Wang et al. 2017) in Docker with a REST API

License

Notifications You must be signed in to change notification settings

NLPbox/stagedp-service

 
 

Repository files navigation

Two-stage Discourse Parser

This is a fork of the StageDP RST parser parser. I keep the orginal README in a separate file to avoid confusion regarding the installation process.

Usage

Commandline usage

To run the parser on the file input_short.neuraleduseg from this repo, copy it to your /tmp directory, mount that directory into the Docker container and run it:

$ docker-compose up -d
$ cp tests/fixtures/input_short.txt /tmp/
$ docker run --net host -v /tmp:/tmp -ti stage-dp /tmp/input_short.txt
Load action classifier from file: /opt/stage-dp/data/model/model.action.gz with 110976 features and 4 actions.
Load relation classifier from file: /opt/stage-dp/data/model/model.relation.gz with 35376 features at level 0, 17911 features at level 1, 16665 features at level 2, and 18 relations.
Load Brown clusters for creating features ...
(EDU _!Although_they_did_n't_like_it_,_they_accepted_the_offer_.!_)
$ docker-compose down

REST API usage

$ curl -X POST -F "input=@tests/fixtures/input_short.txt" http://localhost:9002/parse
(EDU _!<P>_<S>_Although_they_did_n't_like_it_,_they_accepted_the_offer_.!_)

Running tests

docker-compose -f docker-compose-test.yml up --exit-code-from stagedp

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.5%
  • Other 0.5%