Closed loretoparisi closed 5 years ago
@loretoparisi yes, that is correct, because each text fragment is a list of lines --- to account for e.g. closed captioning, where you want to compute the time alignment for the text which is the union of the lines forming a caption, but the text of the lines still need to be stored as separate entities for visual rendering them on two different lines. See the docs: https://www.readbeyond.it/aeneas/docs/textfile.html#aeneas.textfile.TextFragment
@pettarin thank you, closing then!
I want to load a
TextFile
programmaticallybut in my case I do not have the fragments, just a plain text like
If I try like
I get an error
while if I pass the arguments
lines
andfiltered_lines
as lists likeit creates a
TextFile
instance that seems to respect the structure:Is that correct?