Facebook pixel tracking

The Science and Information (SAI) Organization publishes open-access peer-reviewed journals in computer science and artificial intelligence.

Contact Info
Website thesai.org
Follow Us
Contact Info
Follow Us
Research Article | Open Access |

A Hybrid NLP Framework for Topic Relevance and Advertisement Detection in Trending Hashtags on X (Twitter)

Author 1: Aadil Alshammari Author 2: Khulud Alashjaee Author 3: Balsam Alzamam Author 4: Aryam Alshammari Author 5: Milaf Alshammari Author 6: Mohamed Ayari
International Journal of Advanced Computer Science and Applications (IJACSA) · Vol. 17, No. 9 · Published 2026

DOI: 10.14569/IJACSA.2026.0170987

Abstract

Trending hashtags on X (formerly Twitter) are widely used for real-time news tracking and public discourse, yet they are increasingly polluted by advertisements and off-topic posts that exploit hashtag visibility. This study proposes a hybrid natural language processing (NLP) framework for improving the reliability of hashtag streams through two complementary modules: 1) semantic topic relevance detection and 2) supervised advertisement classification. Using 9,671 Arabic tweets retained in the six final research datasets collected via the X API from multiple trending hashtags spanning diverse domains, we apply a dedicated Arabic preprocessing pipeline including noise removal and normalization. Topic relevance is assessed using AraBERT contextual embeddings by computing cosine similarity between each tweet and a concise hashtag topic description, followed by threshold-based labeling of on-topic versus off-topic content. In parallel, advertisement detection is formulated as a binary classification task using TF–IDF features and standard machine learning models (Logistic Regression, SVM, Random Forest, Naive Bayes, and SGD). Experimental results show that advertisement detection performance varies by hashtag and topic type: technical hashtags yield stronger and more stable F1-scores, while broad event hashtags are more challenging due to heterogeneous language and content. Across multiple hashtags, Random Forest and linear classifiers provide the most consistent trade-off between precision and recall. The proposed framework enables fine-grained quantification of promotional intrusion and semantic drift within hashtag discussions, providing a practical foundation for trustworthy hashtag analytics, improved trend monitoring, and downstream social media analysis in Arabic settings.

Keywords

How to Cite this Article

Alshammari, A., Alashjaee, K., Alzamam, B., Alshammari, A., Alshammari, M., & Ayari, M. (2026). A Hybrid NLP Framework for Topic Relevance and Advertisement Detection in Trending Hashtags on X (Twitter). International Journal of Advanced Computer Science and Applications, 17(9). https://doi.org/10.14569/IJACSA.2026.0170987

Alshammari, Aadil, et al.. "A Hybrid NLP Framework for Topic Relevance and Advertisement Detection in Trending Hashtags on X (Twitter)." International Journal of Advanced Computer Science and Applications, vol. 17, no. 9, 2026, https://doi.org/10.14569/IJACSA.2026.0170987.

@article{Alshammari2026,
  title     = {A Hybrid NLP Framework for Topic Relevance and Advertisement Detection in Trending Hashtags on X (Twitter)},
  journal   = {International Journal of Advanced Computer Science and Applications},
  volume    = {17},
  number    = {9},
  year      = {2026},
  publisher = {The Science and Information Organization},
  author    = {Aadil Alshammari and Khulud Alashjaee and Balsam Alzamam and Aryam Alshammari and Milaf Alshammari and Mohamed Ayari},
  doi       = {10.14569/IJACSA.2026.0170987},
  url       = {https://doi.org/10.14569/IJACSA.2026.0170987}
}

Open Access — licensed under a Creative Commons Attribution 4.0 International License. Unrestricted use, distribution, and reproduction in any medium, even commercially, as long as the original work is properly cited.

Call for Papers - Important Dates

Volume 17 No. 11, November 2026
Paper Submission Due October 25, 2026
Review Notification November 15, 2026
Publication Date November 30, 2026