A Wrapper for Extracting Information Records from Forums based on Page Segmentation

Chunshan Li, Jingjing Chen, Dianhui Chu, Ge Song, Haijun Zhang, Yunming Ye, Jianliang XuInternational Journal of Database Theory and Application 2014

TL;DR

This paper introduces a novel "wrapper" system designed to extract structured information from web forums, which are notoriously difficult to parse due to their dynamic nature and mixed content. By combining a new page segmentation algorithm with a decision tree classifier, the system effectively identifies and extracts key data like author, time, and content from forum posts, outperforming existing methods with less reliance on manual labeling.

What Problem Does This Paper Address?

Web forums are a rich source of information, but extracting this data is a significant challenge. Forum pages are often cluttered with "noise" like advertisements and navigation elements, and the content itself is a mix of auto-generated page structures and user-generated text and images. Traditional information extraction techniques, such as those relying on duplicated subtree patterns or machine learning, struggle with the frequent template changes and diverse content found in forums. This makes it hard to build robust and generalizable tools for automatically collecting valuable forum data for applications like opinion analysis or specialized search engines.

Methods

The proposed system, termed a "wrapper," operates in two main phases:

  1. Segmentation Phase: This phase aims to identify and isolate individual "post modules" within a forum page. The core of this is a novel page segmentation algorithm that leverages:
  2. DOM Tree Structure: Analyzing the hierarchical structure of the web page's Document Object Model.
  3. Visual Style: Considering visual cues like module size and text font to distinguish content blocks.
  4. Heuristic Rules: A set of rules are defined to identify potential post nodes based on DOM tree types (DIV, TABLE), similarity of child node types, module dimensions, visual differences between adjacent modules, and the presence of a timestamp.
  5. Extraction Phase: Once post modules are segmented, this phase extracts the structured data (author, time, content). This is framed as a classification problem. Text nodes within posts are treated as samples, and their attributes (like width, height, parent type, class attribute, and depth in the DOM tree) are used to train a Decision Tree (DT) classifier, specifically the C4.5 algorithm. The DT learns to classify text nodes into predefined categories like "author," "time," and "content," effectively parsing the detailed data pattern within each post.

Datasets

The paper describes experiments using two types of datasets:

  • Generated Data: Post pages and posts were generated automatically by forum generation programs.
  • Crawled Data: Post pages were crawled from popular web forums.

A total of 14 web forums were used, with semantic modules and data records manually labeled for evaluation. The paper does not introduce a new benchmark dataset but rather uses a combination of generated and crawled data to test their system's robustness.

Key Insights and Ideas

  • Combining DOM and Visual Cues is Crucial: The paper highlights that relying solely on DOM structure or visual cues is insufficient for robust forum parsing. Their approach effectively combines both, leading to better segmentation.
  • Heuristics for Segmentation are Effective: The defined heuristic rules for identifying post modules, considering DOM structure, visual properties, and temporal information, prove to be a practical way to segment complex forum pages.
  • Decision Trees Excel at Forum Data Extraction: The DT classifier, particularly C4.5, demonstrates superior performance in extracting specific data fields (author, time, content) compared to Naive Bayes, especially for the "content" and "additional information" categories.
  • Generalizability with Minimal Labeling: The proposed wrapper is designed to be generalized across different forum layouts and requires only a small amount of labeled training data, making it more practical than methods that need extensive manual annotation or predefined templates.

Key Results

  • Segmentation Performance: The proposed FPPS (Forum Post Segmentation) algorithm achieved high precision and recall, often reaching 1.000 for precision and close to 1.000 for recall across various forums, outperforming the PS-STS baseline.
  • Extraction Performance: The Decision Tree classifier achieved significantly better results than the Naive Bayes classifier for data extraction, particularly for "content" and "additional information." For instance, the recall for "content" was 1.000 for DT versus 0.856 for NB, and for "additional information," it was 0.993 for DT versus 0.443 for NB.
  • Efficiency: The DT classifier was found to be approximately 2 times faster than the Naive Bayes classifier for processing test samples, attributed to its lower average tree height.

Limitations and Future Work

  • Limitations:
    • The paper acknowledges that the "additional information" category has little explicit semantic meaning and was largely ignored in the final extraction, focusing on author, time, and content.
  • The PS-STS algorithm was found to be invalid for pages with only one post, a scenario where FPPS performed well.
  • Future Work: The authors are currently investigating how to extend their system to extract data from other types of web data beyond forums.

Summary updated

Abstract

Foraging information from web forums is still one of the most challenging information retrieval tasks due to various combinations of auto-generated page structural information and user-created contents. Traditional information extraction methods employ either duplicated subtree pattern detection methods, or machine learning methods. Due to the periodical update of forum templates and diversity of page contents, aforementioned approaches do not work very well on forum sites. In this paper, we present a pagesegmentation based wrapper specially designed for mining data pattern of web forums, which combines a novel page segmentation algorithm and decision tree classifier together to detect the data pattern in forum. In the segmentation phase, a novel page segmentation algorithm is proposed to identify the records areas in a page, then a classifier is adopted to identify the detailed pattern of each record in the extraction phase. Extensive experiments on various types of web forums are conducted and the results conclude that our wrapper is a more generalized one which requires only few labeled training data.
BibTeX
@article{li2014wrapper,
  author = {Chunshan Li and Jingjing Chen and Dianhui Chu and Ge Song and Haijun Zhang and Yunming Ye and Jianliang Xu},
  title = {{A Wrapper for Extracting Information Records from Forums based on Page Segmentation}},
  journal = {International Journal of Database Theory and Application},
  year = {2014},
  doi = {10.14257/ijdta.2014.7.4.02},
}
Figure