pub fn check_document(doc: &Document, l: &Limits) -> Result<(), Error>
The check for a finished extraction: unit and segment counts, the length of every unit, and the context bytes of all units together.