Spam Detection and Filter Service

This is a web service that can be utlized to classify a piece of text through Bayesian spam filter to check if a given twitter status is spam or not. This is usually the same mechanism that email server utilize for spam detection. This involves training your spam filter with good and spam text. I have seeded my spam filter with some very strict text from lot of twitter messages for variety of twitter topics. I have tried to cover as many categories as I could. The spam filter is constantly being trained. With time it will be able to detect spam with more accuracy. Following are details on how you can call this web service to classify your text.

Spam Detect Web Service

Request Url

http://spamfilter.byteblocks.com/CheckContent.aspx

Request Parameters

  • stype: Source type. Set value for this parameters to "twitter"
  • txt: Status text. This is message posted by user. Make sure that this value is URL encoded.
  • txtfrom: User screen name. Set this value to screen name of user posting message on twitter

Response

The server will send JSON reponse for every request. JSON format for the response is as follows.

{"ContentType":0,"Message":"Error: No source type specified","Score":-1,"Status":500}

  • Status: The value of this parameter will be 200 is call is successful otherwise this value will be 500.
  • Message: The value of this parameter will be "OK" if call is successful otherwise this will contain error message.
  • Score: If call is successful, the value of this parameter will be between 0 and 1. Otherwise it will be -1. Value of 0.5 usually can be interpreted as non spam text.
  • ContentType: Value of the parameter is 0 or 1. Meaning of this parameter is relative. For now you can ingnore it.

Spam Reporting Service

You can help in fighting spam and get me more data for filter trainers. I have added a web service that you can call to send spam twitter messages.

Request Url

http://spamfilter.byteblocks.com/SubmitSpam.aspx

Request Parameters

  • stype: Source type. Set value for this parameters to "twitter"
  • txt: Status text. This is message posted by user. Make sure that this value is URL encoded.
  • txtfrom: User screen name. Set this value to screen name of user posting message on twitter

Response

The server will always send a string "OK" as response. You can treat this service as fire and forget mechanism.



See It In Action

Click on the following link to see sample client that leverages to classify tweets into good and spam messages.

Detect Spam Twitter Messages

Views: 1103

Related

Refine spam filter serviceRefine bayesian spam filter for twitter messages.Spam Filter TrainerBuild Bayesian spam filter trainer for twitter messages. Eliminate twitter spam using Bayesian spam ...Write WCF Service For Silverlight ApplicationForEx curreny converter Silverlight control. How to write WCF service that can be consumed by silver...WCF Error in the ServiceModel client configuration section{System.InvalidOperationException: Could not find endpoint element with name 'BasicEndPoint' and c...Error when adding service reference for WCF serviceThe type provided as the Service attribute value in the ServiceHost directive could not be found

Powered by BlogEngine.NET 1.5.1.7
Theme by Naveen Kohli

By Categories