Expand description
Transcript detection: the one classifier the transform tier cannot pin.
is_transcript_like_markdown is not reachable from unwrap_markdown_prose —
the CLI asks it before the transform runs, and answers yes by leaving the
file alone entirely. So corpus/cases/ says nothing about it and
corpus/cli/ says everything, which is why the process tier was built first.
Both heading patterns count characters over an ASCII class, so the counted quantifiers here are the only ones in the crate where the character count and the byte count could part company — and they cannot, because a non-ASCII character is not in either class and stops the run before the count is reached.
Every expected value in the tests below came from running the Python.
Constants§
- TRANSCRIPT_
HEADING_ FLOOR _TRANSCRIPT_HEADING_FLOOR: fewer headings than this is not a transcript.- TRANSCRIPT_
HEADING_ RATIO _TRANSCRIPT_HEADING_RATIO: the density a transcript has to clear.
Functions§
- is_
transcript_ like_ markdown _is_transcript_like_markdown: does this document use repeated speaker turns?- match_
bare_ speaker_ heading _MATCH_BARE_SPEAKER_HEADING:^[A-Z][a-zA-Z0-9_. -]{0,39}:$.- match_
timestamped_ speaker_ heading _MATCH_TIMESTAMPED_SPEAKER_HEADING:^[A-Z][a-zA-Z0-9_.-]{0,19} [0-9]{1,2}:[0-9]{2}$.