Abstract
Unstructured enterprise data such as reports, manuals and guidelines often contain tables. The traditional way of integrating data from these tables is through a two-step process of table detection/extraction and mapping the table layouts to an appropriate schema. This can be an expensive process. In this paper we show that by using semantic technologies (RDF/SPARQL and database dependencies) paired with a simple but powerful way to transform tables with non-relational layouts, it is possible to offer query answering services over these tables with minimal manual work or domain-specific mappings. Our method enables users to exploit data in tables embedded in documents with little effort, not only for simple retrieval queries, but also for structured queries that require joining multiple interrelated tables.
Introduction
In enterprise environments, critical technical data is frequently "trapped" within tables found in PDF reports, manuals, and guidelines. Unlike standard relational databases, these document tables are optimized for human readability, often employing complex matrix layouts, nested headers, and spanning cells to save space. Extracting and querying this data traditionally requires labor-intensive manual ETL (Extract, Transform, Load) processes to map diverse layouts to a rigid global schema. This approach is brittle and fails to scale across the thousands of heterogeneous documents typical of large industrial organizations.
This paper presents a system developed by researchers from IBM and Google that bridges the "impedance mismatch" between human-centric document layouts and machine-readable query formats. By treating complex layouts as a form of data compression, the system automatically "decompresses" tables into a queryable format without requiring users to navigate a complex underlying schema.
System Architecture
The proposed solution utilizes a multi-stage pipeline to transform raw documents into a semantically enriched queryable store.
The pipeline begins by converting documents (PDF or HTML) into a structured JSON representation of the tables. These tables are then classified into "families" using machine learning. Once classified, a flattening algorithm expands the complex layouts into relational-style tuples. This data is stored in an RDF triple store using a universal schema, supplemented by automatically discovered functional and inclusion dependencies.
Table Flattening and Classification
The core of the transformation process is the Table Expansion (Flattening) phase. Most document tables use horizontal and vertical groupings to represent multi-dimensional data compactly. The system employs a "pivot window" algorithm that slides across the matrix, merging values from the axes to produce expanded rows that resemble standard relational tuples.
To handle the variety of layouts, the system uses a supervised machine learning classifier (such as Naive Bayes or Random Forest) to categorize tables into predefined families. Each family provides the necessary parameters for the flattening algorithm, ensuring that headers and data cells are correctly interpreted regardless of their original visual arrangement.
Semantic Storage and Schemaless Querying
Instead of a traditional SQL database, the flattened data is ingested into an RDF triple store. This "universal schema" approach avoids the limitations of a fixed schema, allowing the system to ingest diverse tables and make them immediately searchable via SPARQL.
A key innovation is the use of Dependency Discovery. The system automatically identifies functional dependencies (keys) and inclusion dependencies (foreign keys). When a user submits an under-specified query through a simple API (e.g., "Find the max torque for screw 3A with coating C2"), the engine uses these dependencies as logical rules to "rewrite" the query. If a single table cannot satisfy the query, the engine automatically performs joins across related tables using inclusion dependencies to recover missing values and provide a complete answer.
Evaluation and Results
The system was validated using a real-world corpus of technical manuals from a large industrial partner, focusing on fastener specifications. The dataset included thousands of tables categorized into seven distinct families.
- Classification Accuracy: The supervised classifiers performed exceptionally well, with the Naive Bayes model achieving a performance score near 1.0 in identifying table families.
- Operational Efficiency: In practical industrial use cases, the system reduced the time required for technicians to find specific reference data from minutes of manual searching to seconds via structured queries.
- Robustness: While the flattening process can introduce minor "noise" (such as column headers being treated as row values), the search-based query approach proved robust enough to ignore irrelevant data and return accurate results.
Conclusion
By combining table flattening algorithms with semantic technologies and database dependency theory, this research demonstrates a scalable way to unlock data from complex document tables. The approach minimizes manual mapping efforts and enables sophisticated, multi-table queries over unstructured data. Future work will explore deep learning for more generalized table family detection and the use of probabilistic dependencies to handle noisy OCR data typical of lower-quality document scans.
Summary updated