MGMLaboratory
Back

Menu

01Home
02About Us
03Projects
04Publications
05Member
06Articles
07Contact

Let's Talk

Open in Mail app

Socials

Malang (ID) --:--Privacy PolicyTerms of Service

February 26, 20171 min read

Filtering Spam Out of a Twitter Timeline on AndroidFiltering Spam Out of a Twitter Timeline on Android

A reusable classifier module scored 82 percent accuracy on Indonesian tweets.

  • Conference
  • Publications

Written by

  • SRShirasaka RenIT & Infrastructure · Student Member

In this article

  1. 01Training it on real tweets
  2. 02What the classifiers scored

Twitter timelines fill up with more than conversation. Promotions, duplicate posts, and links to nothing useful arrive alongside the posts a user actually wants. A 2017 project built a way for Android developers to filter that noise out of their own apps.

A sample spam message. Image: public domain, via Wikimedia Commons.
Fig. 01A sample spam message. Image: public domain, via Wikimedia Commons.

The idea is a reusable framework rather than one finished app. A developer drops the classifier in as a module, and the app can label each incoming tweet as spam or legitimate before it reaches the timeline. The heavy work sits behind that interface.

01/02

Training it on real tweets

The team collected tweets through the Twitter search API around trending topics in Indonesia, all written in Indonesian. One hundred tweets were labelled by hand for training, and another hundred were held back for testing.

  • Training sets ran from 10 tweets up to 100, in steps of ten.
  • Text was cleaned, tokenised, and reduced to word stems first.
An Android handset. Image: Acabashi, CC BY-SA 4.0, via Wikimedia Commons.
Fig. 02An Android handset. Image: Acabashi, CC BY-SA 4.0, via Wikimedia Commons.

02/02

What the classifiers scored

Naive Bayes reached 82 percent accuracy on the test set. A nearest neighbour classifier, weighted with a term frequency measure, came in at 71 percent. Both beat guessing, and the simpler of the two was clearly ahead.

The value of the work is in that packaging. A small classifier that runs on the phone, trained on a hundred labelled examples, is a far easier thing for an app team to adopt than a research pipeline.

The honest limits are the dataset size and the language. Two hundred tweets from one country is a narrow base, and spam patterns shift quickly. The authors present the framework as a starting point developers can retrain on their own data.

Source

  1. Pinandito et al. (2017). Spam Detection Framework for Android Twitter Application Using Naive Bayes and K-Nearest Neighbor Classifiers. Proceedings of the 2017 International Conference on Software and Computer Applications.

    DOI10.1145/3056662.3056704 (opens in a new tab)

Next articleMengenal Pengembangan Aplikasi Perangkat Bergerak(Keep scrolling)(Read it next)(Loading)