#duckling-rest
A REST enabled version of the Duckling project by Wit.ai with some extensions
To compile and run:
Install lein as in the link : https://github.com/technomancy/leiningen
To use the local (extended) version of duckling, go into the duckling folder in the project and run lein jar to generate a snapshot of the duckling project and then run lein install to install this this jar as a local dependency.
In case you want to use a non extended version of the duckling project, replace [wit/duckling "1.0.85-SNAPSHOT"] in project.clj (present in the main directory of the repository) with [wit/duckling "0.4.24"] or the latest version from the Duckling project
Back in the main project directory, run lein deps to download dependencies;
In the main project directory, run lein run to test it out or lein uberjar to generate a standalone jar
Run the jar with the following command: java -Xms256m -Xmx512m -Djava.awt.headless=true -jar target/standalone.jar (customise the Xms and Xmx memory options based on system capabilities)
The server should be accessible on port 9000
GET API's:
1) GET "/parse/all/:text?lang=en"
2) GET "/parse/time/:text?lang=en"
3) GET "/parse/number/:text?lang=en"
4) GET "/parse/ordinal/:text?lang=en"
5) GET "/parse/duration/:text?lang=en"
POST API's:
1) POST "/parse/all"
2) POST "/parse/time"
3) POST "/parse/number"
4) POST "/parse/ordinal"
5) POST "/parse/duration"
with JSON request body as: {text:"text", lang: "en"}
You can specify the following environment variables to configure duckling server:
en)Content type
Image
Digest
Size
121.8 MB
Last updated
almost 9 years ago
docker pull botique/duckling-rest