Hello, Luka.
There are several sample web services included with brat that document
how the service is supposed to look like: tools/*taggerservice.py
Off the top of my head, it should accept the text to be tagged in the
POST HTTP request body. It should return an `application/json`
response with a JSON-formatted collection, with keys being annotation
names (typically in the format of `T#`, with `#` being a number), and
the values an object with three keys:
* `type`, a string that specifies the found type
* `offsets`, a list of text spans, each span being a two-element list
of `[start_offset, end_offset]`
* `texts`, a list of the original text's substrings matching the offsets.
For example, a POST request might have `to boldly go where no man has
gone before` in its body. A valid response might be:
{
"T1": {
"type": "Infinitive",
"offsets": [[0, 2], [10, 12]],
"texts": ["to", "go"]
}
}
Please note that there is an error in the current version of
nersuitetaggerservice.py: it incorrectly accepts GET instead of POST.
Someone might want to fix that (**nudges Pontus and Sampo**)
Goran
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "brat-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
brat-users+...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.