Introduction
Approximately 21% of daily English-language tweets contain URLs, and more than half of all retweets are "URLtweets." Despite their prevalence, standard Natural Language Processing (NLP) tools typically treat these tweets as monolithic strings. This approach ignores the fact that a typical URLtweet is often a "Frankenstein’s monster" of text: it may interleave the webpage title, an excerpt from the article body, and the user’s own commentary with hashtags and mentions.
This paper argues that URLtweets should be treated as structured data. Without specific segmentation to distinguish between the source content and the user's utterance, tasks like sentiment analysis (SA) suffer from "sentiment contamination." For example, if a user shares a tragic news headline ("100 killed in flood") but adds a hopeful comment ("Glad help is on the way"), a standard SA tool might incorrectly label the entire tweet as negative due to the headline's weight.
Methodology
Segment Classification
The authors formalize the URLtweet Segmentation problem by defining three primary segment classes:
- Title ($T$): Text overlapping with the linked URL’s page title.
- Body ($B$): Excerpts from the webpage's main content.
- User ($U$): The user’s original utterance.
Complexity and Algorithm
The paper proves that this segmentation is an instance of the String Block Edit Distance (SBED) problem. Because users often perform "block moves" (e.g., reordering title fragments) or "block deletes," traditional metrics like Levenshtein distance are insufficient. The authors demonstrate that the problem is NP-hard.
To address this, they propose a Greedy Approximation Algorithm that utilizes Longest Common Substring (LCS) matching between the tweet and the linked document (URLdoc). The algorithm recursively identifies and tags matches, prioritizing Title segments—which are generally shorter and easier to match—before scanning the larger article Body. It also includes heuristics to handle Twitter-specific markups, such as converting title words into hashtags.
Experimental Setup
The researchers utilized several datasets for validation:
- YM & MD Studies: Large-scale crawls (9.6M and 6M tweets respectively) to estimate URL frequency and validate the model.
- URLtweets-100k: A subset of 100,000 tweets with at least one user segment for sentiment experiments.
- SemEval-2017: A standard benchmark used to evaluate the impact of segmentation on downstream SA tasks.
Key Results and Insights
Segmentation Performance
The proposed greedy algorithm achieved a high segmentation accuracy of 90.1% in correctly identifying the boundaries of $T$, $B$, and $U$ segments. The researchers identified 82 different segmentation patterns, though the top 8 patterns account for over 95% of all cases. Notably, about 40% of URLtweets contain no user segment at all, representing simple "lurking" behavior where users share content without adding commentary.
Impact on Sentiment Analysis
Segmentation significantly mitigates sentiment contamination. In baseline tests, nearly 80% of raw URLtweets were flagged with a specific polarity. However, after segmentation, only ~30% of the actual user segments carried that same sentiment. By removing non-user segments ($T$ and $B$) before processing, the $F_1$ score on the SemEval dataset improved from 0.687 to 0.734 using a BERT-based model.
Limitations and Future Work
While effective, the approach has limitations. Identifying "Body" segments is computationally expensive due to the need to scan entire linked webpages. Additionally, ambiguity remains when a user's input is extremely short or highly similar to the article's text. Future work may extend this segmentation to other NLP tasks, such as Named Entity Recognition (NER) and event detection, to ensure article-level entities are not incorrectly attributed to the user's personal knowledge graph.
Summary updated