Conditions | 1 |
Total Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | import json |
||
9 | def parse(self, text): |
||
10 | r = requests.post(self.server, params={'properties' : '{"annotators": "tokenize,ssplit,pos,lemma,ner,parse", "outputFormat": "json", "parse.flags": " -makeCopulaHead"}'}, data=text.encode('utf8')) |
||
11 | result = r.json()['sentences'][0] |
||
12 | result['text'] = text |
||
13 | return result |
||
14 | |||
22 |