Due to the way we host OpenCCG behind nginx at [litmus](https://litmus.informatik.uni-bremen.de/openccg), the URLs for web-openccg are all prefixed with "openccg".
However, for the two important endpoints (`/` for the GUI and `/parse` for the API), there are redirects in place.
For curl this means `curl -L --data "Take the cup." localhost/parse` will also work (note the `-L` (`--location`) argument).
Note that is is not production ready, as it is really slow and not optimized:
Instead of keeping one (or multiple) instances of OpenCCG running to query them faster, each request spawns an individual OpenCCG instance.
...
...
@@ -33,17 +46,17 @@ Instead of keeping one (or multiple) instances of OpenCCG running to query them
### Querying
To query the service visually, just open your browser at [http://localhost/](http://localhost/).
To query the service visually, just open your browser at [http://localhost/openccg](http://localhost/).
Otherwise, use curl, wget, or e.g. python requests to query web-openccg via the command line or your application.
If your client allows to build your request body manually, like curl, just put the sentence inside:
curl --data "Take the cup." localhost/parse
curl --data "Take the cup." localhost/openccg/parse
However, many high level frameworks like python requests usually use a
key-value mechanism for post data. In this case, use the key `sentence`:
requests.post('http://localhost/parse', data={'sentence': 'Take the cup.'})
requests.post('http://localhost/openccg/parse', data={'sentence': 'Take the cup.'})