Adding a new entry point for POS tagger only output
oterrier opened this issue · 0 comments
oterrier commented
Hi,
I'm thinking in adding a new entry point /tag to retrieve a result of the POS tagging of a document with detailed output for each token.
My basic idea is to accept a json request with the following body:
{
text : "text",
model: "model",
include_sentences : true|false, #include a sentence level or not in the output
attr_filter : [ ] #list of token attributes to include in the output, like ["lemma", "pos", ... "is_stop", ...]
}
The output could be a list of tokens like:
[ { text : "text", start : 111, end : 222, lemma : "lemma", ... } , {}, .. , ]
with eventually an additionnal sentence level like:
[
{ text : "sentence text", start : 0, end : 100000, tokens : [ {}, ... {}] },
...
]
What do you think ?
I need something like that to use spacy from a java program
Best regards
Olivier