junction icon indicating copy to clipboard operation
junction copied to clipboard

Spam detection in Junction

Open kracekumar opened this issue 10 years ago • 11 comments
trafficstars

Recently @pythonhacker and @harisibrahimkv reported few comments looks like a spam. Junction right now only allows logged in users to comment.

There are two levels of deducting/marking comment as a spam. During signup check the reputation of email/ip of user, if it is potential spam email id/ip, block the user, legit user can write back to the concerned person to activate the account.

One more way is to have a spam deduction based on the content. There are two ways to implement, one user can report this as spam, once threshold is crossed, differentiate it in UI and automatic spam detector can mark this as spam.

Once user has crossed the threshold of spam posting, account should be blocked.

Reddit also does similar stuff.

@vigneshsarma thoughts ?

kracekumar avatar Jun 02 '15 10:06 kracekumar

How about also,

  1. Thresholding comments from same login ? If you posted a comment on a talk at time t , you cannot post another comment within t + delta_t where delta_t could be even an hour.
  2. Not allowing postings from known spam IPs - there are well known lists we can scrub an internal SPAM IP list to.
  3. Not allowing postings with less than n characters. This prevents postings like All the best Sir!, Wonderful Sir! etc. This forces people to think and write something. Possibly keep n at something like 120 or 140 chars.

pythonhacker avatar Jun 09 '15 12:06 pythonhacker

All these three should be implemented.

kracekumar avatar Jun 10 '15 05:06 kracekumar

The order for implementing above should Point 3 -> Point 2 -> Point 1. We need to prevent spam account creation as well.

kracekumar avatar Jun 10 '15 05:06 kracekumar

How about just use a third party to evaluate the spammy nature of a particular comment. I suggest using askimet[1] if anyone doesn't have any objection with it.

I'm personally not in favour to including the spam detection logic coded into junction itself. If not askimet, then a publish pypi library that will give spam score for a comment should do.

[1] https://github.com/miracle2k/python-akismet https://akismet.com/

theskumar avatar Jun 15 '15 11:06 theskumar

akismet :+1:

ChillarAnand avatar Jun 15 '15 13:06 ChillarAnand

Reading the docs suggests wordpress api key is required. I am sure, there will be other libraries/services, if some one can do quick prototype, it will be awesome.

kracekumar avatar Jul 05 '15 08:07 kracekumar

I am taking this up. Will try and get it ready for PyCon 2017.

pythonhacker avatar Apr 06 '17 06:04 pythonhacker

First will collect comments across last 3-4 PyCons and using one of the libraries - get its spam detection rating - on each. Idea is to find out how much true and false positives are reported. Will update here with some libraries which are pure Python as much as possible.

pythonhacker avatar Apr 06 '17 06:04 pythonhacker

On Thu, 6 Apr 2017 at 11:34 AM Anand B Pillai [email protected] wrote:

First will collect comments across last 3-4 PyCons and using one of the libraries - get its spam detection rating - on each. Idea is to find out how much true and false positives are reported. Will update here with some libraries which are pure Python as much as possible.

I haven't seen any spam in last few years public comments. So it may be better to rely some external dataset as well. But the application domain here is proposal comments and but one of the available spam identification dataset belongs to email category 0.

You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pythonindia/junction/issues/273#issuecomment-292077489, or mute the thread https://github.com/notifications/unsubscribe-auth/AATCef3caOIDMsY8LCcQGXsyn4LFAmxjks5rtIB2gaJpZM4E0aX2 .

-- Sent from Gmail Mobile

kracekumar avatar Apr 09 '17 07:04 kracekumar

Here is a csv file which has spam and non-spam content from junction.

kracekumar avatar Jun 22 '17 20:06 kracekumar

Unfortunately the spam data is gone from one of the recent changes. Need to dump it somewhere, maybe in a different branch

ananyo2012 avatar Mar 20 '20 18:03 ananyo2012