<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Extracting Objects and Their Attributes from Tables in Text Documents</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>© Nikita Astrakhantsev</string-name>
          <email>astrakhantsev@ispras.ru</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Institute for System Programming of the Russian Academy of Sciences</institution>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2011</year>
      </pub-date>
      <abstract>
        <p>Extracting information from tables is an important and rather complex part of information retrieval. For the task of objects extraction from HTML tables we introduce the following methods: determining table orientation, processing of aggregating objects (like Total) and scattered headers (super row labels, subheaders).</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1 Introduction</title>
      <p>Significant amount of text information has relational
structure, which is often represented in a table view.
Since this view is designed for humans and contains
many ambiguous elements, it follows that automatic
processing of tables is rather complex.</p>
      <p>For example, table 1 contains scattered header,
complex hierarchical header, special objects, and other
elements. They play particular roles in the table and,
thus, should be treated in a special way. These elements
are described in the rest of the paper.</p>
      <p>Another non-trivial task is to determine table
orientation: it can be horizontal (row wise, table 1) or
vertical (column wise, table 2).</p>
      <p>We consider tables in structured formats such as
HTML and Wiki markup1. The main goal of our table
processing is to extract objects as collections of
attribute-value pairs. Thereupon we focus on
determining table orientation and understanding the role
of each element in the table.</p>
    </sec>
    <sec id="sec-2">
      <title>2 Related work</title>
      <p>
        Silva et al [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] distinguish five tasks of extraction
information from table in their detailed survey:
1. Location: differentiating the table from other text
elements such as body text, titles, lists, etc.
2. Segmentation: identifying table cells, rows, and
columns and their relative positions.
3. Functional analysis: classifying a table area (cell,
column, row) to data or attribute area.
4. Structural analysis: connecting each data cell to
all characterizing attribute cells.
5. Interpretation: understanding and further using
extracted information.
      </p>
      <p>
        First of them occurs mostly in plain text and image
formats. The last task depends on kind of table usage:
generating ontology from tables [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], mapping extracted
information to predefined scheme [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], and so on.
      </p>
      <p>Our work is devoted to the three last tasks while
structural analysis is a principal one.</p>
      <p>
        Table 1
Early works deal with tables in plain text, usually in
ASCII format [
        <xref ref-type="bibr" rid="ref4 ref5 ref6 ref7">4-7</xref>
        ]. The main problem here is to detect
table, to recognize table delimiters (spaces, tabs, special
characters like hyphens, etc), and thereby to understand
table structure.
      </p>
      <p>
        Rus and Summers [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] consider a text block to be a
table if it consists of columns separated by white space
and if cells of such columns are lexically persistent. A
similar approach is used in the work of Douglas et
al. [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]; they group text blocks surrounded by white
spaces and use heuristic to determine whether these
blocks are parts of tables.
      </p>
      <p>
        There are many works concerned plain text and
most of them use approaches inapplicable for HTML
tables. However there are some useful ideas, which
were explored in these works and inspired by linguistic
characteristics of table content. For example,
similarity/cohesion among different table elements
(cells/lines/columns) became a common feature in
future works including HTML tables oriented ones.
Hurst and Douglas [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] suggest explicit string-based
formulas for computing cell values cohesion.
      </p>
      <p>
        Pinto et al. [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] present Conditional random field
algorithm for classification of each row in ASCII table
to one of 12 classes such as “data row”, “section
header”, “super header”, etc.
      </p>
      <sec id="sec-2-1">
        <title>2.2 Image format</title>
        <p>
          The majority of these works are devoted to performing
location and segmentation of a table (Tupaj et al. [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ],
Wang et al. [
          <xref ref-type="bibr" rid="ref10 ref9">9, 10</xref>
          ], inter alia).
        </p>
        <p>
          At a distance, Gatterbauer et al. [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ] process HTML
tables treating them as images. More precisely, they
distinguish two representations of web pages: DOM tree
representation and visual box (topological)
representation. Our work is based on the first
representation, while their approach is based on the
second one, and thereby it cannot be applied to our
work.
        </p>
      </sec>
      <sec id="sec-2-2">
        <title>2.3 HTML format</title>
        <p>
          A main source of HTML tables is Web pages, but many
Web-tables are created just for layout, not for
representing relational information. Wang and Hu [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ]
call such tables non-genuine. They suggest machine
learning classifiers (SVM and decision tree) to
determine whether the table is genuine or non-genuine.
Features are divided into three types: length consistency
of the cell contents, type of cell content, and word
group.
        </p>
        <p>
          Chen et al. [
          <xref ref-type="bibr" rid="ref13">13</xref>
          ] apply string and content type
similarity to this task. They also use cell similarity for
determining table orientation.
        </p>
        <p>
          Yoshida et al. [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ] suggest Expectation
Maximization algorithm for classifying each table into
one of 9 predefined types. Ontological knowledge are
used as a parameter for the model, e.g. "Name" and
"Birthday" are more often attributes than values.
        </p>
        <p>
          Cafarella et al. [
          <xref ref-type="bibr" rid="ref15">15</xref>
          ] process the corpus of 14 billion
Web tables. They introduce a tool for
synonymic attributes searching (Attribute Correlation
Statistics), which can be useful in the task of
attribute/value classifying. Also the statistics gathered
by authors corroborates the assumption that there is a
small set of schemas that most tables in the world
conform to.
        </p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3 Table orientation</title>
      <p>What is an object in a table? Often the answer is
obvious. For example, in table 2 objects are two
airbuses: A310-200 and A310-200F. Table 1 is a little
bit vaguer. It contains SVT vehicles manufactured in
different years. Sometimes tables with nondefinable
objects are found, e.g. multiplication table or table 3.
Table 3</p>
      <p>NFPA 704</p>
      <p>0
Fire diamond for aluminium shot</p>
      <p>As a rough definition, table object is a real world
entity, whose attributes are set in the table. We assume
that either row or column represents an object. So, table
has either horizontal or vertical orientation.</p>
      <p>We use 2 machine learning algorithms with the
same features to determine table orientation: decision
tree and naïve Bayes. All features have common nature:
some function is computed on horizontal table as well
as on vertical one and the difference between obtained
values is found.</p>
      <p>First feature is the difference in header depth. The
function is very simple; it returns the depth of table
header hierarchy. E.g. the header depth for horizontal
table in figure 1 is 2, due to Power, hp, and kW cells;
the header depth for the vertical table is 1. The header
depths for both orientations of table 2 are 1. The
motivation is following: orientation with deeper header
is more likely to be correct.</p>
      <p>Second feature is difference in maximum cell
cohesion. Cell cohesion is an average string similarity
of all cells in a row or in a column. Average string
similarity is computed by summation of all pairwise
string similarities/metrics of cells and normalization
(dividing by square of total count of cells). Maximum
cell cohesion for the horizontal table is simply a
maximum of cell cohesion in all rows; the same stands
for the vertical one with replacement of rows by
columns.</p>
      <p>Third feature is the difference in average cell
cohesion. The only distinction from the previous feature
is that all cell cohesions are summed and then divided
by total count of rows or columns.</p>
      <p>After experiments with a small set of Wikipedia
tables (about 70) we found that the most valuable
feature is the difference in average cell cohesion. All
other features aren’t presented in decision tree without
overlearning (see figure 1).</p>
      <p>Figure 1</p>
      <p>Also we experimented with introducing the third
type of tables, which contain no object, but
effectiveness decreased dramatically. This can be easy
explained because even human can’t label classify some
table into the third type with confidence. So we don't
take into account tables without objects.</p>
    </sec>
    <sec id="sec-4">
      <title>4 Aggregating objects processing</title>
      <p>Some tables contain aggregating objects, which
actually store information about other objects from the
same table. For example, in table 4 the last row isn't an
ordinary entity and should be processed in special way.
Table 4</p>
    </sec>
    <sec id="sec-5">
      <title>5 Scattered header processing</title>
      <p>Some tables contain special rows, or scattered headers,
which add structural information and are not table
objects. Example is the row Sports car from table 1. We
called the object extracted from such scattered header
row during the initial processing the scattered header
object.</p>
      <p>We extract scattered header objects only from the
object set, which corresponds to the horizontal
orientation of the table. Vertical objects aren't
processed, because width of any table is limited and
scattered headers are useless in vertical tables.</p>
      <sec id="sec-5-1">
        <title>5.1 Scattered header recognizing</title>
        <p>Deciding whether each row is a scattered header (SH) is
based on the assumptions that only one cell in the row is
nonempty and the row must stand out against other
table. In addition, we don't consider empty rows and
last rows.</p>
        <p>We divide all SHs into three subclasses: single-cell
SH, middle SH, first-cell SH.</p>
        <p>1) Single-cell SH is a row with just one cell in a
table where other rows have more than 1 cell (in HTML
terms, a row with colspan greater than 1).</p>
        <p>The example is given in table 5 (row Central Asia).
Table 5</p>
        <p>We consider such row to be an SH without other
criteria.</p>
        <p>2) Middle SH is a row with just one nonempty cell,
located in the middle of the table.</p>
        <p>The 4th row Bonus track of table 6 is a middle SH.
Table 6</p>
        <p>We require the nonempty cell of such row to be
decorated.</p>
        <p>In addition, we check the table to be non-sparse.
Sparse table is a table with many empty cells, e.g.
table 7. It is evident that the heuristic for determining
middle SH doesn't work correctly with sparse tables.
Table 7</p>
        <p>So we check the rows near the concerned middle SH
row (3 rows above and 3 below). If they have empty
cells, then the row under review isn't a middle SH. Of
course, the row with empty cells can be another middle
SH; to address this issue we don't take such rows into
account while checking their cells. But previous and
next rows must differ from the concerned one, because
scattered headers never have the same structure and
content with another SH.</p>
        <p>Thereby table 7 contains no SH.</p>
        <p>3) First-cell SH is a row whose only nonempty cell
is first.</p>
        <p>For example, the third row Cities (10 Largest) of
table 8 belongs to this type.</p>
        <p>Table 8</p>
        <p>The criteria for this type are the same as for the
previous type.</p>
      </sec>
      <sec id="sec-5-2">
        <title>5.2 Scattered header processing</title>
        <p>Scattered header object are removed from the original
set before the aggregating objects processing. Therefore
created aggregating objects have no information about
scattered header objects.</p>
        <p>We update attributes of all objects by adding the
new field; currently its name is Type. Every table object
located below the current scattered header and above
the next scattered header (if it exists) is updated by
adding a new value, which is the content of the
corresponding scattered header.</p>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>6 Conclusions and future work</title>
      <p>In this paper we concerned on the task of objects
extraction from HTML tables, gave a short survey of
occurring problems, and introduced methods (mostly
heuristics) for their solving. Of course, there are many
cases uncovered by this paper, e.g. accurate detection of
table header, processing of non-aggregating special
objects and so on. It's the scope of future research.</p>
      <p>
        The most common usage of extracted objects is to
map them to predefined relational scheme. Embley et
al. [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] worked towards this task, but we believe that
fully automatic processing will be ineffective.
Gatterbauer et al. [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] make a similar note:
“domainindependent table interpretation cannot result in
unambiguously structured information because of
existing inherent domain-specific ambiguities that can
sometimes not even be resolved by humans”. Therefore,
we consider the computer-aided way to be more
promising for the task of objects mapping and, in
general, for table interpretation.
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>A.C.</given-names>
            <surname>Silva</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.M.</given-names>
            <surname>Jorge</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Torg</surname>
          </string-name>
          .
          <article-title>Design of an endto-end method to extract information from tables</article-title>
          ,
          <source>IJDAR(8)</source>
          ,
          <source>No. 2-3</source>
          , pp.
          <fpage>144</fpage>
          -
          <lpage>171</lpage>
          ,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>Y. A.</given-names>
            <surname>Tijerino</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. W.</given-names>
            <surname>Embley</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. W.</given-names>
            <surname>Lonsdale</surname>
          </string-name>
          ,. Y. Ding, and
          <string-name>
            <given-names>G.</given-names>
            <surname>Nagy</surname>
          </string-name>
          .
          <article-title>Towards ontology generation from tables</article-title>
          .
          <source>World Wide Web</source>
          ,
          <volume>8</volume>
          (
          <issue>3</issue>
          ):
          <fpage>261</fpage>
          -
          <lpage>285</lpage>
          ,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>D.W.</given-names>
            <surname>Embley</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Tao</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.W.</given-names>
            <surname>Liddle</surname>
          </string-name>
          .
          <article-title>Automating the Extraction of Data from HTML Tables with Unknown Structure</article-title>
          ,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>D.</given-names>
            <surname>Rus</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Summers</surname>
          </string-name>
          .
          <article-title>Using white space for automated document structuring</article-title>
          .
          <source>Workshop on the Principles of Document Processing</source>
          ,
          <year>1994</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>S.</given-names>
            <surname>Douglas</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Hurst</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Quinn</surname>
          </string-name>
          .
          <article-title>Using Natural Language Processing for Identifying and Interpreting tables in Plain Text</article-title>
          .
          <source>In: Fourth Symposium on Document Analysis and Information Retrieval</source>
          , pp.
          <fpage>535</fpage>
          -
          <lpage>545</lpage>
          ,
          <year>1995</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>M.</given-names>
            <surname>Hurst</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Douglas</surname>
          </string-name>
          .
          <article-title>Layout and Language: Preliminary investigations in recognizing the structure of tables</article-title>
          .
          <source>In: Proceedings of International Conference on Document Analysis and Recognition (ICDAR'97)</source>
          , pp.
          <fpage>1043</fpage>
          -
          <lpage>1047</lpage>
          ,
          <year>1997</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>D.</given-names>
            <surname>Pinto</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>McCallum</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Wei</surname>
          </string-name>
          , and
          <string-name>
            <given-names>W.B.</given-names>
            <surname>Croft</surname>
          </string-name>
          ,
          <article-title>Table Extraction Using Conditional Random Fields</article-title>
          ,
          <source>in Proc. DG.O</source>
          ,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>S.</given-names>
            <surname>Tupaj</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Shi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.H.</given-names>
            <surname>Chang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Hassan</surname>
          </string-name>
          .
          <article-title>Extracting tabular information from text files, EECS Department</article-title>
          . Tufts University,
          <year>1996</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.P.</given-names>
            <surname>Ihsin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Robert</surname>
          </string-name>
          .
          <article-title>Improvements of zone content classification by using background analysis</article-title>
          .
          <source>In: Proceedings of Document Analysis Systems</source>
          ,
          <year>2000</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.P.</given-names>
            <surname>Ihsin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Robert</surname>
          </string-name>
          .
          <article-title>Automatic ground truth generation and A background-analysis-based table structure extraction method</article-title>
          .
          <source>In: Sixth International Conference on Document Analysis and Recognition</source>
          ,
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>W.</given-names>
            <surname>Gatterbauer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Bohunsky</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Herzog</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Krüpl</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Pollak</surname>
          </string-name>
          .
          <article-title>Towards domain-independent information extraction from web tables</article-title>
          .
          <source>In: Proceedings WWW</source>
          ,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <surname>J. Hu.</surname>
          </string-name>
          <article-title>A machine learning based approach for table detection on the web</article-title>
          .
          <source>In: Proceedings of the Eleventh International WorldWideWeb Conference</source>
          ,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <surname>H.-H. Chen</surname>
            ,
            <given-names>S.-C.</given-names>
          </string-name>
          <string-name>
            <surname>Tsai</surname>
            , S.-C.,
            <given-names>J.-H.</given-names>
          </string-name>
          <string-name>
            <surname>Tsai</surname>
          </string-name>
          .
          <article-title>Mining tables from large scale HTML texts</article-title>
          .
          <source>In: 18th International Conference on Computational Linguistics (COLING)</source>
          , pp.
          <fpage>166</fpage>
          -
          <lpage>172</lpage>
          ,
          <year>2000</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>M.</given-names>
            <surname>Yoshida</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Torisawa</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Tsujii</surname>
          </string-name>
          .
          <article-title>A method to integrate tables of theWorldWideWeb</article-title>
          .
          <source>In: First International Workshop on Web Document Analysis</source>
          ,
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <surname>M.J. Cafarella</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Halevy</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          <string-name>
            <surname>Zhang</surname>
            ,
            <given-names>D.Z.</given-names>
          </string-name>
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>E. Wu.</given-names>
          </string-name>
          <article-title>WebTables: Exploring the Power of Tables on the Web</article-title>
          .
          <source>Proceedings of VLDB</source>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>