ljm625 / syntaxnet-rest-api

A simple rest api for Google SyntaxNet, powered by docker
GNU General Public License v3.0
72 stars 29 forks source link

Some issues in response format (DRAGNN branch). #7

Closed malakhovks closed 7 years ago

malakhovks commented 7 years ago

Some issues in response format (DRAGNN branch).

  1. For the convenience of parsing, cast the names of fields to lowercase for example this { "category": "", "Case": "Nom", "head": -1, "Animacy": "Inan", "word": "системы", "break_level": 1, "pos_tag": "NN", "fPOS": "NOUN++NN", "Number": "Plur", "label": "root", "Gender": "Fem" } to this { "category": "", "case": "Nom", "head": -1, "animacy": "Inan", "word": "системы", "breakLevel": 1, "posTag": "NN", "fPOS": "NOUN++NN", "number": "Plur", "dep": "root", "gender": "Fem" }
  2. change the name of field "label" to "dep" (that's field means "dependency" according universaldependencies.org)
  3. The most important There is no field containing part of the speech of the word. In master branch with old version it was "pos" field - "pos": "VERB"
ljm625 commented 7 years ago

thanks for the feedback.. basically in the dragnn version, it doesn't have the pos params. But I believe by separating fPos it does the same stuff. So I add a pos_tag param which basically is the result of dividing fPos. As for the Upper case issue, I was just extracting what it shows in the DRAGNN but definitely I can change them to all lower case. The reason why it's called label is because of DRAGNN output, it's called label.. I am considering adding both label & dep field in the reply so it will be compatible

Thanks for all these suggestions

malakhovks commented 7 years ago

I understand all the stuff

ljm625 commented 7 years ago

fixed