Abstract
Web user reviews are a critical source of information for applications such as public opinion monitoring and sentiment analysis. However, extracting these reviews accurately is challenging because user-generated content (UGC) often lacks a rigid template. This paper proposes WeRE (Web Review Extraction), a comprehensive solution that addresses two main hurdles: structural inconsistency across different user posts and the complexity of review subtrees within the Document Object Model (DOM). By employing a Level-Weighted Tree Similarity Algorithm (LTSA) and a node consistency check, WeRE isolates pure review content from noisy web environments with high precision and efficiency.
The Challenge of Unstructured Reviews
In the era of Web 2.0, user-generated content like comments and reviews is a goldmine for data analysis. However, extracting this data is significantly more difficult than scraping standard database-driven pages. Traditional template-based methods struggle with two primary issues:
- Structural Inconsistency: One user might write a single sentence, while another contributes a multi-paragraph essay with embedded images, links, and formatting. This causes the DOM trees of visually similar review records to look structurally distinct.
- Subtree Complexity: A review is rarely a single text node; it is typically a complex subtree containing metadata (timestamps, usernames, ratings) alongside the actual body text.
Methodology: A Two-Step Extraction Process
1. Review Record Extraction (LTSA)
To identify the boundaries of individual reviews, the authors developed the Level-Weighted Tree Similarity Algorithm (LTSA). Unlike standard algorithms that treat all nodes equally, LTSA operates on the principle that matches deeper in the DOM tree are more significant indicators of structural similarity. By assigning higher weights to deeper nodes, the system can recognize that two blocks are "review records" even if their surface-level text length varies significantly.
2. Review Content Extraction (Node Consistency)
Once records are isolated, the system must distinguish the actual review text from surrounding metadata. The authors utilize a metric called Consistency (Consis). Elements like "Username" or "Post Date" are highly consistent across records—they share the same fonts, positions, and tag paths. Conversely, the actual review content is highly inconsistent in terms of text length and internal HTML structure. By filtering out these consistent "template" nodes, the system zeroed in on the inconsistent subtree containing the user's unique comment.
Experimental Results and Performance
The WeRE system was evaluated using two massive, manually labeled datasets: the News Data Set (NDS), comprising over 153,000 records from 10 major Chinese news sites, and the Forum Data Set (FDS), containing over 165,000 records from 20 diverse forum sites.
- High Accuracy: On news sites, WeRE achieved a Precision of 99.9% and a Recall of 98.8%.
- Robustness: Even on structurally diverse forum sites, it maintained a 99.9% Precision for record extraction, significantly outperforming existing tools like MDR and ViDRE.
- Efficiency: The system is optimized for production, with processing times ranging from 328ms to 561ms per page.
Conclusion
WeRE demonstrates that by leveraging structural inconsistency as a signal rather than a hurdle, it is possible to automate the extraction of messy user-generated content. While the system currently requires multiple records per page to establish a baseline for consistency, its high precision and speed make it a powerful tool for large-scale public opinion analysis and web data mining.
Summary updated