Browse Source

minor changes

pull/217/head
erikamenezes 5 years ago
parent
commit
2a0cc35667
1 changed files with 2 additions and 2 deletions
  1. 4
      app/server/api.py

4
app/server/api.py

@ -211,8 +211,8 @@ class TextDownloadAPI(APIView):
painter = self.select_painter(format)
# json1 format prints text labels while json format prints annotations with label ids
# json1 format - "labels": [[0, 15, "PERSON"], ..]
# json format "annotations": [{"label": 5, "start_offset": 0, "end_offset": 2, "user": 1},..]
# json1 format - "labels": [[0, 15, "PERSON"], ..]
# json format - "annotations": [{"label": 5, "start_offset": 0, "end_offset": 2, "user": 1},..]
if format == "json1":
labels = project.labels.all()
data = painter.paint_labels(documents, labels)

Loading…
Cancel
Save