Skip to content

word range overlap in canonical JSON #18

Description

@mromanello

In the canonical JSON of Jebb (sophoclesplaysa05campgoog), the word ἔργον (word_range=32615) and the words ἐννέπειν δʼ: (word_range=32614, 32615) end up having overlapping word_ranges – which should never happen. This causes a problem with the display of corresponding glosses.

      {
        "word_range": [
          32615,
          32615
        ],
        "shifts": [
          0,
          0
        ],
        "transcript": "ἔργον,",
        "label": "word-anchor",
        "anchor_target": "{\"url\" : \"https://raw.githubusercontent.com/gregorycrane/Wolf1807/master/ajax-2019/ajax-lj.xml\", \"selector\" : \"tei-l@n=12[4]:tei-l@n=12[9]\", \"textAnchor\": \"ἔργον\"}"
      },
      {
        "word_range": [
          32614,
          32615
        ],
        "shifts": [
          0,
          0
        ],
        "transcript": "ἐννέπειν δʼ:",
        "label": "word-anchor",
        "anchor_target": "{\"url\" : \"https://raw.githubusercontent.com/gregorycrane/Wolf1807/master/ajax-2019/ajax-lj.xml\", \"selector\" : \"tei-l@n=12[17]:tei-l@n=12[28]\", \"textAnchor\": \"ἐννέπειν δʼ\"}"
      },

Printing out the word text for that range gives the following (wrong) output:

for buggy_lemma in buggy_lemmata:
    print([w.text for w in buggy_lemma.children.words])
['ov,']
['12', 'ov,']

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions