Skip to content

Commit

Permalink
Call set_span on the OCR annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
jayvarner committed Apr 24, 2024
1 parent a3ecdeb commit c35b37a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions readux_ingest_ecds/services/ocr_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,7 @@ def add_ocr_annotations(canvas, ocr):
anno.resource_type = anno.OCR
anno.content = word['content']
anno.order = word_order
anno.set_span()
annotations.append(anno)
word_order += 1

Expand Down
2 changes: 2 additions & 0 deletions test_app/iiif/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ class OCR(models.Model):
content = models.TextField(blank=True, null=True, default=' ')
resource_type = models.CharField(max_length=50, choices=TYPE_CHOICES, default=TEXT)

def set_span(self):
return True

class RelatedLink(models.Model):
""" Links to related resources """
Expand Down

0 comments on commit c35b37a

Please sign in to comment.