import { Rectangle, Container } from './geometry'; /** Group horizontally contiguous elements into containers. Usually this is called with an array of all text spans on a single page. It traverses through the elements in their natural order, and starts putting elements into a new container when there appears to be a sizable vertical jump, which usually indicates a line break. The large number of resulting containers should roughly correspond to each line. containers = empty list of containers currentContainer = uninitialized empty container for each span in spans: if container is uninitialized initialize new currentContainer with span else if span is within (dx, dy) of currentContainer add it to the currentContainer else add currentContainer to containers initialize new currentContainer with span 5 is approximately half the mean font size. */ export declare function groupLines(elements: T[], dy_threshold?: number): Container[]; /** Group a list of lines into columns (groups of vertically close/overlapping elements) */ export declare function groupColumns(elements: T[], threshold_dx?: number, threshold_dy?: number): Container[]; /** The given elements should all have approximately the same Y value. This takes all the TextAtoms (or whatever) that comprise a line, and puts them into a list of containers, each of which corresponds to a word. */ export declare function partitionWords(elements: T[], spaceWidth?: number): Container[]; /** Paragraphs are distinguished by an unusual first line. This initial line is unusual compared to preceding lines, as well as subsequent lines. If paragraphs are very short, it can be hard to distinguish which are the start lines and which are the end lines simply by shape, since paragraphs may have normal positive indentation, or have hanging indentation. The given lines will come from a variety of different layout components, but in determining the oddity of the left offset of any given line, we only want to compare its left offset to the left offsets of other lines in the same layout component. @param column - A column whose elements are containers of lines of text. */ export declare function splitParagraphs(column: Container, indent_threshold?: number): Container[];