<!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>Product Centric Web Page Segmentation and Localization</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Dragan Gašević</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Athabasca University 1 University Drive Athabasca</institution>
          ,
          <addr-line>AB T9S 3A3</addr-line>
          <country country="CA">Canada</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>John Cuzzola Ryerson University 350</institution>
          <addr-line>Victoria St Toronto, ON M5B 2K3</addr-line>
          <country country="CA">Canada</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Ryerson University 350</institution>
          <addr-line>Victoria St Toronto, ON M5B 2K3</addr-line>
          <country country="CA">Canada</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>The Internet is home to an ever increasing array of goods and services available to the general consumer. These products are often discovered through search engines whose focus is on document retrieval rather than product procurement. The demand for details of specific products as opposed to just documents containing such information has resulted in an influx of product collection databases, deal aggregation services, mobile apps, twitter feeds and other just-in-time methods for rapid finding, indexing, and notifying shoppers to sale events. This has led to our development of intelligent Web crawler technology aimed towards this specific category of information retrieval. In this paper, we demonstrate our solution for Web page categorization, segmentation and localization for identifying Web pages with shopping deals and automatically extracting specifics from the identified Web pages. Our work is supported with empirical data of its effectiveness. A screencast demonstration is also available online at http://youtu.be/HHPme6AJuCk.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Natural language processing</kwd>
        <kwd>search</kwd>
        <kwd>classification</kwd>
        <kwd>segmentation</kwd>
        <kwd>localization</kwd>
        <kwd>deals</kwd>
        <kwd>products</kwd>
        <kwd>web crawling</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. INTRODUCTION</title>
      <p>The World Wide Web has given rise to a digital marketplace
where goods and services of all varieties are sold. Retailers,
wholesalers, and private individuals are using this communication
medium to advertise their products directly to the consumer.
Conversely, consumers are looking for these products and are
using the traditional search engine as the method for discovery.
However, these engines are document-centric rather than
productcentric; hence they are optimized for the former rather than the
latter. A successful search engine relies on its web crawlers to
intelligently process visited Web pages for useful information
while discarding data that does not contribute to retrieval. Geared
specifically to this domain of product search, we have created
technology that can identify product Web pages, segment Web
pages into logical regions, and discard those regions that do not
Permission to make digital or hard copies of all or part of this work for
personal or classroom use is granted without fee provided that copies are
not made or distributed for profit or commercial advantage and that copies
bear this notice and the full citation on the first page. To copy otherwise,
or republish, to post on servers or to redistribute to lists, requires prior
specific permission and/or a fee.
contain information regarding a specific goods or service. The
remainder of this paper explains our Web page classification,
segmentation and deal localization technology.</p>
    </sec>
    <sec id="sec-2">
      <title>2. BACKGROUND</title>
      <p>
        Our work reported in this paper was inspired by the needs of our
industrial partner, SideBuy Technologies, which is a daily deal
aggregator; a service which collects for-purchase goods and
services from various deal sites such as Groupon, PriceGrabber
and others. The process of collecting and aggregating these deal
information is performed manually where large numbers of staff
are employed as deal seekers [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. Deal aggregators commonly
deploy web scraping tools targeted at deal sites to harvest these
deals. However, the collection process usually is dependent on
pre-programmed recognized patterns specific to the site being
scraped, e.g., using specific sequence of HTML tags.
Consequently, even small modifications in such Websites will
require programming changes in scraping tools to accommodate
these changes. Furthermore, this targeted pattern matching
approach does not scale to the unstructured and ever-changing
content of the Web where many products are being sold but
remain unnoticed and out-of-reach from the scrapers. Finally, the
time sensitive nature of these deals further fuels the desire to
leverage a more automated solution to the deal discovery
dilemma.
      </p>
      <p>To this end, we have developed algorithms to allow Web crawlers
to identify unstructured, previously unseen, Web pages as
containing information regarding relevant online deals. Once a
page is classified as containing relevant information, our
algorithms can segment and localize the regions of the Web page
that contain product information, while discarding those areas that
are not of interest.</p>
    </sec>
    <sec id="sec-3">
      <title>3. SYSTEM PIPELINE</title>
      <p>Our process of information extraction from unstructured Web
content is summarized in Figure 1. A Web crawler scrapes a given
page for its HTML content (a). A binary classifier then determines
whether the text of the page contains products for purchase (deal)
or no such offerings exists on that page (no-deal). Those pages
classified as not containing products (no-deal) are discarded (f)
while those pages categorized as deal undergo segmentation
resulting in several segments per page (c). Each of the extracted
segments will in turn be recursively classified as either containing
deal or no-deal information in their own respect in an effort to
localize individual products (d). Further processing on the deal
segments involve semantic annotation, pattern matching, and
image recognition that would extract property/value pairs, which
are ultimately stored in a central repository (e).</p>
    </sec>
    <sec id="sec-4">
      <title>3.1 Binary Classifier</title>
      <p>
        We have developed a binary classifier capable of classifying a
text/html fragment as either containing relevant products (deals)
information or being void of such information (no-deal). The
classifier is a hybrid Naive Bayes/Expectation-Maximization
model trained using the WEKA machine learning framework [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
We use the OpenNLP toolkit to incorporate named entity
recognition for dates, organizational entities, time, location,
percentages, money, and people. Part of speech tagging is
combined with the WordNet lexical database to disambiguate
word sense forms [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. This information is used as features within
our training dataset. The classifier is trained on information
already manually extracted using SideBuy Technologies’ deal
scrapers. The detail of our classifier is available in [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
&lt;div class&gt;
|________&lt;div style&gt;
      </p>
      <p>|________&lt;p&gt;
&lt;div class&gt;
|________&lt;div style&gt;</p>
      <p>The X7 Smartphone
features a/b/g/n WiFi.
|________&lt;blockquote&gt;</p>
      <p>The model S2 tablet
comes with 4-GB RAM.</p>
      <sec id="sec-4-1">
        <title>Listing 1: A sample recurring pattern in HTML.</title>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>3.2 Segmentation</title>
      <p>
        Web page segmentation is the process of partitioning a Web page
into logically grouped sections either visually, structurally, or
semantically to form cohesive subsets of the Web page. As
already reported by various researchers [
        <xref ref-type="bibr" rid="ref6 ref7 ref8">6,7,8</xref>
        ], ecommerce
Websites often use a recurring pattern to represent product
information. Therefore, each of the product information sets is
represented under its own Web segment within the page. Besides
the product segments on the page, there may be other segments
such as banners, Web page footers, and others that are not
relevant to product retrieval and search and can hence be
discarded for our purpose (see Figure 2). We base our work on
this observation and develop a Web page partitioning algorithm
that processes Web page HTML contents and extracts all possible
Web segments from that page.
      </p>
      <p>
        Our system segments web pages based on HTML structure and
textual clues obtained from natural language processing.
Segmentation of a Web page is accomplished by finding the
Longest Frequent Pattern (LFP) [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] of HTML tags at the topmost
(outermost) block level. The identified LFP becomes the
boundary of division for each partition in the Web page. For
example, consider the sequence of nested HTML tags and textual
content in Listing 1.
      </p>
      <p>The topmost longest frequent pattern occurs twice with &lt;div
class&gt;,&lt;div style&gt; resulting in two segments with fragments of
“&lt;p&gt; the X7 Smartphone feature a/b/g/n WiFi” and
“&lt;blockquote&gt; the model S2 tablet comes with 4-GB RAM”. The
result of this segmentation process is the localization of individual
product offerings within each page in such a way that each
individual segment will either contain individual product
specifications such as name, description, and price or will
represent non-product information in which case the segment is of
no interest to us.</p>
      <p>1. Let C be a set of candidate blocks of a web page.</p>
      <p>1.1 Initialize C with the outermost block.</p>
      <p>(Typically C←&lt;HTML&gt;…&lt;/HTML&gt;)
2. For each block in C, classify block as either deal or
nodeal using the binary classifier. Separate blocks into a deal
set (η) or non-deal set.</p>
      <p>2.1 for each block ƒ ϵ η</p>
      <sec id="sec-5-1">
        <title>2.1.1 Find the longest frequent HTML pattern</title>
        <p>(LFP) of sentence block ƒ.
2.1.2 If (LFP) exists:</p>
      </sec>
      <sec id="sec-5-2">
        <title>2.1.2.1 Split ƒ in blocks on (LFP) → β</title>
        <p>2.1.2.2 Add split blocks to C: C ← C + β</p>
      </sec>
      <sec id="sec-5-3">
        <title>3. Goto Step 2 if C is non-empty</title>
        <sec id="sec-5-3-1">
          <title>Algorithm 1: The Segmentation-Localization algorithm</title>
        </sec>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>3.3 Localization</title>
      <p>Once Web segments have been extracted from a Web page, we
perform localization on each of these segments. Localization is
the process of determining which of these extracted segments
contain useful and relevant product information such as the green
dashed boxes in Figure 2 and also identifying those segments that
contain non-relevant information and can be discarded such as the
solid yellow boxes in Figure 2. In order to be able to efficiently
perform the location process, we employ the same classifier that
was introduced in Section 3.1. The classifier will now be used to
determine whether each segment on their own would be classified
as containing product-specific information or not. Therefore, the
difference between the first step and the localization step would
be that in the first step the classifier is used to determine whether
the whole page contains product information, while in the
localization step an individual segment within an already
positively classified page is tested for containing product-specific
information. Here, rather than evaluating the text of the entire
page, only the text within this candidate segment is considered. If
this block is positively classified, it is split recursively into
smaller segments using the segmentation approach of Section 3.2.
This process repeats iteratively for each newly segmented block
until either the new block is negatively labeled, or a frequent
pattern of HTML tags cannot be found. This process is illustrated
in Figure 3 and can be visually summarized in a segmentation
parse tree which is constructed by our implementation shown in
Figure 4. The leaves of the segmentation parse tree represent the
final outcome where each leaf node is either a segment of
noninterest (negatively classified) or a segment containing a single
product offering (positively classified localized segment). The
localization algorithm is formally defined in Algorithm 1.</p>
    </sec>
    <sec id="sec-7">
      <title>4. EVALUATION</title>
      <p>Initial testing of our segmentation and deal localization algorithm
involved 42 individual Web pages each from different Web sites.
This set gave us a total of 1,402 individual products. The criteria
used in the determination whether the final outcome was
successful were as follows.</p>
      <p>Criteria 1: A block is correctly classified if and only if the block
makes reference to exactly one product offering. If the block
contains information for more than a single product then it was
under-partitioned and should have undergone further
segmentation in order to split its contents into individual
products.</p>
      <p>Criteria 2: Because the descriptiveness of a product will vary
significantly between websites; the minimum amount of
information necessary is the name of the product and its price.
Blocks that do not meet this minimum were considered to be
over-partitioned.</p>
      <p>Criteria 3: A leaf node that satisfies Criteria 1 and 2 but makes
reference to the same product will only get credit for correctly
classifying the product once.</p>
      <p>With the above criteria in place, our system performed favorably
with an average F-score of 0.903. The algorithm correctly
identified 1,282 products with 154 misclassifications (false
positives). A summary of the results is given in Table 1 sorted by
best F-score. The relatively poor F-score’s of the bottom 5 web
pages appeared to be related to either the structure of the web
page in which frequent patterns were difficult to find or the
content of the page itself where the classifier mislabeled the
segmented region as a non-deal area.</p>
    </sec>
    <sec id="sec-8">
      <title>5. DEMONSTRATION</title>
      <p>Our segmentation/localization system was tested on a Web page
from a deal aggregator’s website: pushadeal.com. The output of
the analysis is shown in Figure 5. Our intelligent crawler
correctly identified the HTML pattern that encompasses
individual products on this Web page.
The leaves of the generated segmentation parse tree reveal two
potential product offerings that were classified as non-relevant
( ). By looking closely at the content of the page, one can see
that this was correct since one product offer had “expired” while
the other was “coming soon” and therefore not yet available. A
further illustration of our system is available as a screencast at:
http://youtu.be/HHPme6AJuCk. Also, visit the inextweb
showcase section at http://inextweb.com which demonstrates
how a database of localized segments are being utilized to
provide an object-centered search engine over the familiar
document centric engines of Google, Bing, and others.</p>
    </sec>
    <sec id="sec-9">
      <title>6. CONCLUSION</title>
      <p>This paper demonstrates our approach to Web page
classification, segmentation and localization specific to the
domain of goods and services procurement. We describe an
intelligent Web crawler implementation that sees Web pages as
containing product information. Our technology can be used to
build a collection of properly annotated product objects, which
can be leveraged for smarter search in the domain of
ecommerce. In our demonstration we will showcase the described
technology as follows 1) We will demonstrate how our machine
learning and page segmentation techniques were trained and
built; 2) We will introduce and provide open access to the
wrapper API of our technology that is able to extract product
information segments from Web pages; 3) We will show how to
use our API to quickly write an application that would crawl a
given website and extract product segments. An online demo is
available at:</p>
    </sec>
    <sec id="sec-10">
      <title>7. ACKNOWLEDGMENTS</title>
      <p>The authors would like to thank The National Science and
Research Council of Canada (NSERC) and SideBuy
Technologies Inc. for their funding support.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Cuzzola</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gašević</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bagheri</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <article-title>"What's the Deal? - Identifying Online Bargains,"</article-title>
          <source>In Proceedings of the 2013 Australasian Web Conference (AWC</source>
          <year>2013</year>
          ), Adelaide, Australia,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>J.</given-names>
            <surname>Kang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Yang</surname>
          </string-name>
          , J. Choi, “
          <article-title>Repetition-based Web Page Segmentation by Detecting Tag Patterns for Small-Screen Devices”</article-title>
          ,
          <source>IEEE Transactions on Consumer Electronics</source>
          , vol.
          <volume>56</volume>
          , no.
          <issue>2</issue>
          , pp.
          <fpage>980</fpage>
          -
          <lpage>986</lpage>
          ,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>Miller</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          “
          <article-title>WordNet: A Lexical Database for English”</article-title>
          .
          <source>Communications of the ACM</source>
          <volume>38</volume>
          (
          <issue>11</issue>
          ):
          <fpage>39</fpage>
          -
          <lpage>41</lpage>
          ,
          <year>1995</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <surname>Hall</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Eibe</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Holmes</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          <string-name>
            <surname>Pfahringer</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Reutemann</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          <string-name>
            <surname>Witten</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          <article-title>The WEKA Data Mining Software: An Update</article-title>
          .
          <source>SIGKDD Explorations</source>
          ,
          <volume>11</volume>
          (
          <issue>1</issue>
          ):
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <surname>Ghigliotty</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          “
          <article-title>Do You Really Want a Job at Groupon?” Retrieved from http://salesjobs</article-title>
          .fins.com/Articles/ SBB0001424052970204528204577012073472414832/ Do-You-
          <article-title>ReallyWant-a-Job-at-</article-title>
          <string-name>
            <surname>Groupon</surname>
          </string-name>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <surname>Chakrabarti</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kumar</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Punera</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          <article-title>Page-level template detection via isotonic smoothing</article-title>
          .
          <source>In Proceedings of the 16th international conference on World Wide Web (WWW '07)</source>
          . ACM, New York, NY, USA,
          <fpage>61</fpage>
          -
          <lpage>70</lpage>
          ,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>Kao</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ho</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chen</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <article-title>WISDOM: Web Intrapage Informative Structure Mining Based on Document Object Model</article-title>
          .
          <source>IEEE TKDE 17</source>
          (
          <issue>5</issue>
          ):
          <fpage>614</fpage>
          -
          <lpage>627</lpage>
          ,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <surname>Chakrabarti</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kumar</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Punera</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          <article-title>A graph-theoretic approach to webpage segmentation</article-title>
          ,
          <source>International conference on World Wide Web</source>
          , pp
          <fpage>377</fpage>
          -
          <lpage>386</lpage>
          .,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>