TL;DR, which stands for "Too Long; Didn't Read", is a text summarization service.
The pre-built Docker image can be obtained by running the following commands:
docker pull sumin/tldr
If you would like to build the code yourself, you will need the following things:
- Docker
- Python 2.x or 3.x
- Java 6 or higher
The Docker image can be built by running the following command:
docker build ${directory containing Dockderfile}
docker run -d -p 8804:${host port} sumin/tldr
For example, if you would like to map the 8804 port of the guest host to the identical port number (8804) of the host, you may want to run the following command.
docker run -d -p 8804:8804 sumin/tldr
RESTful APIs can be invoked via any standard HTTP client. Use of curl
or
wget
is advised.
curl -XPOST -d "text=This is a text" http://localhost:8804/api/v1/summarize
curl -XPOST -d "html=<html><body>Example</body></html>" \
http://localhost:8804/api/v1/extract-text
py.test -v tests