![]() ![]() The current implementation uses a simple score: the score is the size of the matrix (columns x height). The score indicates how 'good' the columns are. The goal is to give a score to each line. (The idea is to prefer full columns)Īgain, a number of small columns are removed (almost-empty columns). Like the stripes, each line will have a number of columns that start on that line.įor each column, a simple statistic 'word-fillage' is calculated, which reflects the number of words in that column relative to the number of lines covered by that column. The shortest stripe defines the height of the column. The small stripes are removed (not wide or height enought, defined as input parameter) ColumnsĪ column is defined as the space between 2 stripes. Line 2 will have stripes that start on line 2 and descend as far as possible. Line 1 will have stripes that start on that line and descend as far as possible. The process of building stripes is repeated for each line. The stripes are vertical separators without crossing a word. A stripe will be stretched as long there is an overlapping span in the next line. If a span of a line N overlaps a span of the line N+1, the common part of the overlapping spans will form a stripe. Spans are defined on a single line, in constrast stripes will cover multiple lines. The small spans are removed (minimum width as given as input parameter) Stripes The list of words is sorted by page / line / x1.įor each page/line, the spans are calculated (the white space between the words) The font information is currently not used, but will serve to estimate the minimum width / height. x1 (x1,y1) - (x2,y2) are the bounding box of the word.The input file contains the positions from the PDF. Usageĭistributed under the Eclipse Public License either version 1.0 or (at A Clojure application that extracts matrixes from PDF's files and saves those as csv files.Ī separate application extracts the word positions from a PDF. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |