Skip to content

Add TranscriptionEntity.text helper

A TranscriptionEntity.text hybrid property should be added to provide a slice of the transcription's text corresponding to the TranscriptionEntity's offset and length.

Because the slicing has to be done differently in Python and SQL, two functions will need to be declared, one with @hybrid_property for Python and the other with @text.expression for SQL. The docs show a good example of that.

A unit test should show that both the Python and SQL implementations return the same result.