Flow format documents and fixed format documents are widely used and have different purposes. Flow format documents organize a document using complex logical formatting structures such as sections, paragraphs, columns, and tables. As a result, flow format documents offer flexibility and easy modification making them suitable for tasks involving documents that are frequently updated or subject to significant editing. In contrast, fixed format documents organize a document using basic physical layout elements such as text runs, paths, and images to preserve the appearance of the original. Fixed format documents offer consistent and precise format layout making them suitable for tasks involving documents that are not frequently or extensively changed or where uniformity is desired. Examples of such tasks include document archival, high-quality reproduction, and source files for commercial publishing and printing. Fixed format documents are often created from flow format source documents. Fixed format documents also include digital reproductions (e.g., scans and photos) of physical (i.e., paper) documents.
In situations where editing of a fixed format document is desired but the flow format source document is not available, the fixed format document must be converted into a flow format document. Conversion involves parsing the fixed format document and transforming the basic physical layout elements from the fixed format document into the more complex logical elements used in a flow format document. Existing document converters faced with complex elements, such as borderless tables, resort to base techniques designed to preserve the visual fidelity of the layout (e.g., text frames, line spacing, and character spacing) at the expense of the flowability of the output document. The result is a limited flow format document that requires the user to perform substantial manual reconstruction to have a truly useful flow format document. It is with respect to these and other considerations that the present invention has been made.
The following Brief Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Brief Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
One embodiment of the borderless table detection engine begins by selecting borderless table candidates using whitespace detection. The borderless table detection engine groups those whitespaces whose bounding boxes vertically overlap each other into whitespace groups. There is an edge between two whitespaces (i.e., the whitespaces are connected) if and only if the bounding boxes of the two whitespaces overlap vertically. All connected whitespaces make up one whitespace group.
Once the whitespace groups are detected, a table candidate is created from each of the whitespace groups. The topmost whitespace in each whitespace group is identified, and its top border defines the top border of the table candidate. Similarly, the bottommost whitespace in each whitespace group is identified, and its bottom border defines the bottom border of the table candidate. Next, all of the text between the top border and the bottom border of the table candidate is collected and assigned to the table candidate. After collecting the text, the borderless table detection engine establishes a bounding box for the table candidate. The bounding box is the smallest rectangle which contains all the text assigned to the table candidate.
After the initial set of table candidates is detected, the borderless table detection engine separately analyzes each table candidate. The first step is to screen the table candidates and discard low probability table candidates. Once the table candidates have been initially screened, the borderless table detection engine begins the process of reconstructing the cell layout for each remaining table candidate. The process of determining the cell layout starts with determining the column separator candidates using whitespace detection with a smaller minimum whitespace width threshold. Although useful for detecting potential column separators, the narrower minimum whitespace width threshold allows detection of whitespaces in places where column separators should not exist, i.e., inside a table cell. Accordingly, the whitespaces located during column separator detection are screened based on height and discarded, if appropriate.
Once whitespaces have been discarded, the borderless table detection engine creates the column separators at the right border of each remaining whitespace. Next, the borderless table detection engine adds a row separator for each column separator endpoint that does not lie on the top border or the bottom border. When available, the borderless table detection engine further splits the rows of the borderless table candidate using information, such as the rendering order of the text, obtained from a native fixed format document.
At the completion of cell layout reconstruction, the borderless table detection engine assigns the text to the individual cells. The text assignment process begins by screening each table candidate and discarding text likely to be part of the elements before or after the borderless table candidate. Finally, table candidates having only one column are discarded. The remaining table candidates are ready for reconstruction as tables, for example, during serialization.
The details of one or more embodiments are set forth in the accompanying drawings and description below. Other features and advantages will be apparent from a reading of the following detailed description and a review of the associated drawings. It is to be understood that the following detailed description is explanatory only and is not restrictive of the invention as claimed.
Further features, aspects, and advantages will become better understood by reference to the following detailed description, appended claims, and accompanying figures, wherein elements are not to scale so as to more clearly show the details, wherein like reference numbers indicate like elements throughout the several views, and wherein:
A borderless table detection engine and associated method for identifying borderless tables appearing in data extracted from a fixed format document is described herein and illustrated in the accompanying figures. Due to the lack of visible borders, reliable automated detection of a borderless table is difficult. The borderless table detection engine uses whitespace, rather than content, to detect borderless table candidates. Applying heuristic analysis, the borderless table detection engine discards borderless table candidates with a layout that lacks sufficient characteristics of a table and is unlikely to be a valid borderless table.
Where processing begins depends on the type of fixed format document 106 being parsed. A native fixed format document 106a created directly from a flow format source document contains the some or all of the basic physical layout elements. Generally, the data extracted from a native fixed format document 106a is available for immediate use by the document converter; although, in some instances, minor reformatting or other minor processor is applied to organize or standardize the data. In contrast, all information in an image-based fixed format document 106b created by digitally imaging a physical document (e.g., scanning or photographing) is stored as a series of page images with no additional data (i.e., no text-runs or paths). In this case, the optional optical character recognition engine 202 analyzes each page image and creates corresponding physical layout objects. Once the physical layout objects 208 are available, the layout analysis engine 204 determines the layout of the fixed format document and enriches the data store with new information (e.g., adds, removes, and updates the physical layout objects). After layout analysis is complete, the semantic analysis engine 206 enriches the data store with semantic information obtained from analysis of the physical layout objects and/or logical layout objects.
After the initial set of table candidates is detected, the borderless table detection engine 100 separately analyzes each table candidate. The first step is to screen 320 the table candidates and discard low probability table candidates. One test used to discard table candidates is to calculate 321 the area of a table candidate that is covered by text relative to total area of the table candidate. Unlike tables with borders, a borderless table contains only content (e.g., text or images), and the content of the borderless table determines the cell layout. Thus, it is unlikely that a borderless table will have little text and cover a large area. If the text coverage percentage falls below a selected threshold, the table candidate is discarded. Another test used to discard table candidates is to check for table candidates that are actually bulleted or numbered lists. To the borderless table detection engine, a bulleted/numbered list appears as a column of bullets or numbers and a column of text, or other content, separated by a vertical whitespace. Because of the structural resemblance between bullet/numbered lists and borderless tables, a bulleted/numbered list may be identified as a borderless table candidate. Accordingly, applying list detection allows the borderless table detection engine 100 to discard 322 borderless table candidates that match the structure of a bulleted/numbered list.
Once the table candidates have been initially screened, the borderless table detection engine 100 begins the process of reconstructing 330 the cell layout for each remaining table candidate. The reconstruction process starts with performing 331 a second whitespace detection on the table candidate using a smaller minimum whitespace width threshold to detect the narrower whitespaces likely to correspond to column breaks. Although useful for detecting potential column separators, the narrow minimum whitespace width threshold allows detection of whitespaces in places where column separators should not exist, i.e., inside a table cell. In the case of borderless tables, the cell layout is usually fairly regular, with a grid-like structure and few merged cells. Because of this, most whitespaces between columns span across the entire height of the borderless table, or at least across a substantial portion thereof. In one embodiment, the threshold for whitespace height depends on the height of the table and the average text height.
where the factor is a constant. As seen in the graph, the minWhitespaceHeight/tableHeight ratio decreases as the table height increases. Accordingly, the detected whitespaces are screened based on height and discarded, if appropriate.
Once whitespaces not meeting the height threshold have been discarded 332, the borderless table detection engine 100 creates the column separators.
Some native fixed format documents include information, such as the rendering order of the text, which allows the borderless table detection engine 100 to further split the rows of the borderless table candidate. In a table, the rendering order of the cells is left-to-right, top-to-bottom, which means that the rendering order of the text in one row is smaller than the rendering order of the text in all the following rows. When such information is available, the borderless table detection engine 100 draws 335 a row separator between consecutive text lines, from the left border to the right border, and checks the following inequality:
max(renderingOrder)(X)|XεtextAboveTheRowSeparator)<min(renderingOrder(Y)|YεtextBelowTheRowSeparator)
If the inequality does not hold true, the row separator is discarded. When a row separator based on rendering order overlaps with a row separator created during column separator detection, the row separator created during column separator is discarded in favor of the row separator based on rendering order that spans the entire width of the table candidate.
At the completion of cell layout reconstruction, the layout of the borderless table is finalized 340.
The borderless table detection engine and associated borderless table detection method described herein is useful to detect content having a structure corresponding to a borderless table in a fixed format document, thereby allowing the content to be reconstructed as a flowable table when the fixed format document is converted into a flow format document. While the invention has been described in the general context of program modules that execute in conjunction with an application program that runs on an operating system on a computer, those skilled in the art will recognize that the invention may also be implemented in combination with other program modules. Generally, program modules include routines, programs, components, data structures, and other types of structures that perform particular tasks or implement particular abstract data types.
The embodiments and functionalities described herein may operate via a multitude of computing systems including, without limitation, desktop computer systems, wired and wireless computing systems, mobile computing systems (e.g., mobile telephones, netbooks, tablet or slate type computers, notebook computers, and laptop computers), hand-held devices, multiprocessor systems, microprocessor-based or programmable consumer electronics, minicomputers, and mainframe computers.
As stated above, a number of program modules and data files may be stored in the system memory 1104. While executing on the processing unit 1102, the program modules 1106, such as the borderless table detection engine 100, the parser 110, the document processor 112, and the serializer 114 may perform processes including, for example, one or more of the stages of the borderless table detection method 300. The aforementioned process is an example, and the processing unit 1102 may perform other processes. Other program modules that may be used in accordance with embodiments of the present invention may include electronic mail and contacts applications, word processing applications, spreadsheet applications, database applications, slide presentation applications, drawing or computer-aided application programs, etc.
Furthermore, embodiments of the invention may be practiced in an electrical circuit comprising discrete electronic elements, packaged or integrated electronic chips containing logic gates, a circuit utilizing a microprocessor, or on a single chip containing electronic elements or microprocessors. For example, embodiments of the invention may be practiced via a system-on-a-chip (SOC) where each or many of the components illustrated in
The computing device 1100 may have one or more input device(s) 1112 such as a keyboard, a mouse, a pen, a sound input device, a touch input device, etc. The output device(s) 1114 such as a display, speakers, a printer, etc. may also be included. The aforementioned devices are examples and others may be used. The computing device 1100 may also include one or more communication connections 1116 allowing communications with other computing devices 1118. Examples of suitable communication connections 1116 include, but are not limited to, RF transmitter, receiver, and/or transceiver circuitry; universal serial bus (USB), parallel, or serial ports, and other connections appropriate for use with the applicable computer readable media.
Embodiments of the invention, for example, may be implemented as a computer process (method), a computing system, or as an article of manufacture, such as a computer program product or computer readable media. The computer program product may be a computer storage media readable by a computer system and encoding a computer program of instructions for executing a computer process.
The term computer readable media as used herein may include computer storage media and communications media. Computer storage media may include volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information, such as computer readable instructions, data structures, program modules, or other data. The system memory 1104, the removable storage device 1109, and the non-removable storage device 1110 are all computer storage media examples (i.e., memory storage.) Computer storage media may include, but is not limited to, RAM, ROM, electrically erasable read-only memory (EEPROM), flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store information and which can be accessed by the computing device 1100. Any such computer storage media may be part of the computing device 1100.
Communication media may be embodied by computer readable instructions, data structures, program modules, or other data in a modulated data signal, such as a carrier wave or other transport mechanism, and includes any information delivery media. The term “modulated data signal” may describe a signal that has one or more characteristics set or changed in such a manner as to encode information in the signal. By way of example, and not limitation, communication media may include wired media such as a wired network or direct-wired connection, and wireless media such as acoustic, radio frequency (RF), infrared, and other wireless media.
One or more application programs 1266 may be loaded into the memory 1262 and run on or in association with the operating system 1264. Examples of the application programs include phone dialer programs, e-mail programs, personal information management (PIM) programs, word processing programs, spreadsheet programs, Internet browser programs, messaging programs, and so forth. The system 1202 also includes a non-volatile storage area 1268 within the memory 1262. The non-volatile storage area 1268 may be used to store persistent information that should not be lost if the system 1202 is powered down. The application programs 1266 may use and store information in the non-volatile storage area 1268, such as e-mail or other messages used by an e-mail application, and the like. A synchronization application (not shown) also resides on the system 1202 and is programmed to interact with a corresponding synchronization application resident on a host computer to keep the information stored in the non-volatile storage area 1268 synchronized with corresponding information stored at the host computer. As should be appreciated, other applications may be loaded into the memory 1262 and run on the mobile computing device 1200, including the borderless table detection engine 100, the parser 110, the document processor 112, and the serializer 114 described herein.
The system 1202 has a power supply 1270, which may be implemented as one or more batteries. The power supply 1270 might further include an external power source, such as an AC adapter or a powered docking cradle that supplements or recharges the batteries.
The system 1202 may also include a radio 1272 that performs the function of transmitting and receiving radio frequency communications. The radio 1272 facilitates wireless connectivity between the system 1202 and the “outside world”, via a communications carrier or service provider. Transmissions to and from the radio 1272 are conducted under control of the operating system 1264. In other words, communications received by the radio 1272 may be disseminated to the application programs 1266 via the operating system 1264, and vice versa.
The radio 1272 allows the system 1202 to communicate with other computing devices, such as over a network. The radio 1272 is one example of communication media. Communication media may typically be embodied by computer readable instructions, data structures, program modules, or other data in a modulated data signal, such as a carrier wave or other transport mechanism, and includes any information delivery media. The term “modulated data signal” means a signal that has one or more of its characteristics set or changed in such a manner as to encode information in the signal. By way of example, and not limitation, communication media includes wired media such as a wired network or direct-wired connection, and wireless media such as acoustic, RF, infrared and other wireless media. The term computer readable media as used herein includes both storage media and communication media.
This embodiment of the system 1202 provides notifications using the visual indicator 1220 that can be used to provide visual notifications and/or an audio interface 1274 producing audible notifications via the audio transducer 1225. In the illustrated embodiment, the visual indicator 1220 is a light emitting diode (LED) and the audio transducer 1225 is a speaker. These devices may be directly coupled to the power supply 1270 so that when activated, they remain on for a duration dictated by the notification mechanism even though the processor 1260 and other components might shut down for conserving battery power. The LED may be programmed to remain on indefinitely until the user takes action to indicate the powered-on status of the device. The audio interface 1274 is used to provide audible signals to and receive audible signals from the user. For example, in addition to being coupled to the audio transducer 1225, the audio interface 1274 may also be coupled to a microphone to receive audible input, such as to facilitate a telephone conversation. In accordance with embodiments of the present invention, the microphone may also serve as an audio sensor to facilitate control of notifications, as will be described below. The system 1202 may further include a video interface 1276 that enables an operation of an on-board camera 1230 to record still images, video stream, and the like.
A mobile computing device 1200 implementing the system 1202 may have additional features or functionality. For example, the mobile computing device 1200 may also include additional data storage devices (removable and/or non-removable) such as, magnetic disks, optical disks, or tape. Such additional storage is illustrated in
Data/information generated or captured by the mobile computing device 1200 and stored via the system 1202 may be stored locally on the mobile computing device 1200, as described above, or the data may be stored on any number of storage media that may be accessed by the device via the radio 1272 or via a wired connection between the mobile computing device 1200 and a separate computing device associated with the mobile computing device 1200, for example, a server computer in a distributed computing network, such as the Internet. As should be appreciated such data/information may be accessed via the mobile computing device 1200 via the radio 1272 or via a distributed computing network. Similarly, such data/information may be readily transferred between computing devices for storage and use according to well-known data/information transfer and storage means, including electronic mail and collaborative data/information sharing systems.
The description and illustration of one or more embodiments provided in this application are not intended to limit or restrict the scope of the invention as claimed in any way. The embodiments, examples, and details provided in this application are considered sufficient to convey possession and enable others to make and use the best mode of claimed invention. The claimed invention should not be construed as being limited to any embodiment, example, or detail provided in this application. Regardless of whether shown and described in combination or separately, the various features (both structural and methodological) are intended to be selectively included or omitted to produce an embodiment with a particular set of features. Having been provided with the description and illustration of the present application, one skilled in the art may envision variations, modifications, and alternate embodiments falling within the spirit of the broader aspects of the claimed invention and the general inventive concept embodied in this application that do not depart from the broader scope.
Number | Date | Country | Kind |
---|---|---|---|
PCT/EP2012/000289 | Jan 2012 | EP | regional |
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/EP12/00289 | 1/23/2012 | WO | 00 | 7/10/2012 |