Trendminer: An Architecture for Real Time Analysis of Social Media Text

Daniel Preoțiuc-Pietro, Sina Samangooei, Trevor Cohn, Nicholas Gibbins, Mahesan NiranjanAAAI 2021 · DOI

TL;DR

This paper introduces Trendminer, an open-source framework for real-time analysis of social media text. It addresses the challenges of short, noisy, and streaming data from online social networks (OSNs) by providing a modular, extensible pipeline built on MapReduce for efficient distributed processing.

What Problem Does This Paper Address?

The explosion of online social networks (OSNs) like Twitter has generated massive amounts of text data. However, this data presents unique challenges for traditional Natural Language Processing (NLP) techniques. OSN texts are typically short, filled with abbreviations, misspellings, and informal language, making standard tools less accurate. Furthermore, the real-time nature of these streams demands immediate analysis, which is difficult to achieve with existing, often disparate, NLP tools. Researchers need a unified, efficient, and scalable system to process this data effectively for applications ranging from political analysis to market trend prediction.

Methods

Trendminer is built as a modular pipeline of command-line tools, designed for both batch and real-time processing. The core architecture leverages the MapReduce framework for distributed computing, allowing for parallel processing of large datasets. The system is implemented in Java and uses a pipeline approach where each stage processes the data and augments it with its analysis in a consistent JSON format. This ensures that the original data remains intact and that subsequent modules can access the results of previous stages. Key implemented modules include:

  • Twitter-specific Tokenization: Handles the unique characteristics of OSN text, such as URLs, emoticons, hashtags, and abbreviations.
  • Short Text Language Detection: Utilizes an n-gram based approach optimized for short, noisy texts, capable of classifying into 97 languages.
  • Stemming: Employs the traditional Porter Stemmer for reducing words to their root form.

The framework is designed for extensibility, allowing new modules to be easily integrated.

Datasets

The paper primarily discusses the use of Twitter data for development and evaluation. They mention using a microblog dataset for language detection evaluation, which was also used by Carter et al. (2012). No new benchmark datasets were introduced.

Key Insights and Ideas

  • The "noisy but structured" nature of OSN text: While OSN text is messy, it often follows specific conventions (like hashtags) that can be exploited for better analysis.
  • Modularity is key for adaptability: A pipeline architecture with interchangeable modules makes the system flexible for various analysis needs and future extensions.
  • MapReduce is well-suited for OSN data: The I/O-bound nature of processing large volumes of text data makes distributed frameworks like MapReduce a practical choice for achieving scalability.
  • Data consistency is paramount: Augmenting the original data with an "analysis" field in a structured format (JSON) ensures that all processing steps are traceable and reusable.

Key Results

  • Tokenization: The custom tokenizer was qualitatively evaluated and found to handle OSN text effectively.
  • Language Detection: The implemented language detection system achieved an accuracy of 89.3% on 2000 tweets using a 97-way classifier, performing well for the task of assigning texts to many languages.
  • Running Time: The Hadoop-based tool processed 7.6 million tweets per hour on a 6-machine cluster, demonstrating its scalability for near real-time analysis. The local tool processed 0.51 million tweets per hour on a single core. This indicates that processing a full day's worth of tweets (estimated at 250 million at the time) is feasible.

Limitations and Future Work

  • Limitations: The current tokenization module only supports Latin-script languages. The language identification system, while performing well, has room for improvement, particularly in distinguishing between a larger number of languages.
  • Future Work: The authors plan to add several modules, including:
  • Location detection
    • Part-of-Speech (POS) tagging
    • Named Entity Recognition (NER)
    • Normalization for out-of-vocabulary words
    • Spam detection
    • Message retrieval based on context rather than keywords
    • User influence scoring (e.g., via Klout API)
    • A graphical user interface for easier data visualization and exploration.

Summary updated

Abstract

The emergence of online social networks (OSNs) and the accompanying availability of large amounts of data, pose a number of new natural language processing (NLP) and computational challenges. Data from OSNs is different to data from traditional sources (e.g. newswire). The texts are short, noisy and conversational. Another important issue is that data occurs in a real-time streams, needing immediate analysis that is grounded in time and context. In this paper we describe a new open-source framework for efficient text processing of streaming OSN data (available at www.trendminer-project.eu). Whilst researchers have made progress in adapting or creating text analysis tools for OSN data, a system to unify these tasks has yet to be built. Our system is focused on a real world scenario where fast processing and accuracy is paramount. We use the MapReduce framework for distributed computing and present running times for our system in order to show that scaling to online scenarios is feasible.We describe the components of the system and evaluate their accuracy. Our system supports easy integration of future modules in order to extend its functionality.
BibTeX
@inproceedings{preotiucpietro2021trendminer,
  author = {Daniel Preoțiuc-Pietro and Sina Samangooei and Trevor Cohn and Nicholas Gibbins and Mahesan Niranjan},
  title = {{Trendminer: An Architecture for Real Time Analysis of Social Media Text}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2021},
  doi = {10.1609/icwsm.v6i3.14348},
}
Figure