| Conditions | 2 |
| Total Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 5 | ||
| Bugs | 0 | Features | 0 |
| 1 | #!/usr/bin/env python |
||
| 15 | def annotate(self, text): |
||
| 16 | try: |
||
| 17 | # load json and build Sentences and Document |
||
| 18 | annotated_text = post_json(self.service, json.dumps({"text":"{}".format(text)})) |
||
| 19 | return Document.load_from_JSON(annotated_text) |
||
| 20 | |||
| 21 | except Exception as e: |
||
| 22 | #print(e) |
||
| 23 | return None |
||
| 24 | #raise Exception("Connection refused! Is the server running?") |
||
| 41 |