Skip to content

ALTO export of transcriptions that contains TAB surounded by spaces fails #91

Description

@kohuthonza

In to_altoxml_text()

words = []
space_idxs = [-1] + space_idxs + [len(aligned_letters)]
for i in range(len(space_idxs[1:])):
    if space_idxs[i] != space_idxs[i + 1] - 1:
        words.append([aligned_letters[space_idxs[i] + 1], aligned_letters[space_idxs[i + 1] - 1]])
splitted_transcription = self.transcription.split()

words and splitted_transcription do not fit, which causes a failure in indexing -> splitted_transcription[w]

  • python split ignores the tab, but, porbably, align_text() does not

Where to handle the TABs?

Metadata

Metadata

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