For some reason all of my profanity scores are returning 0.3 (which I think is exactly the default threshold?). I know the filters are being hit, and both are enabled in the admin, but I can still make horribly obvious profane comments and have them pass. The spam filters still catch spam-like posts, however. From what I can tell this only happens on comment forms (advanced_forum forum posts and regular node comments). No custom hooks interfering with the CRUD process.

Could there be something that I'm doing wrong? When I manually add a swear word to the blacklist, the profanity filter DOES kick in for that particular word. Otherwise, it just kicks back a 0.3 score and says "Hey this looks pretty solid! Despite him dropping 46 F-bombs!"

Straight out of watchdog:

Ham: FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK
Data:
post_body = 'FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK'
author_name = 'KevinM'
author_mail = 'kabojnk@gmail.com'
author_id = '147'
author_ip = '192.168.1.128'
session_id = ''
checks = 'spam,profanity'
strictness = 'strict'
Result:
spam = 1
profanity = 0.3
session_id = '120725d96669d43f2c'

Comments

SelrahcD’s picture

I have the same issue here. Did you come up with a solution ?

sun’s picture

Category: bug » support
Priority: Major » Normal
Status: Active » Postponed (maintainer needs more info)

I quickly tested this myself, and I'm getting a proper profanity response:

(log message shortened to relevant details)

Ham: FUCK, FUCK, FUCK.

Request: POST http://rest.mollom.com/v1/content

  postBody = 'FUCK, FUCK, FUCK.'
  authorId = '2'
  checks =
    0 = 'spam'
    1 = 'profanity'
  strictness = 'normal'

Response: 200

  code = '200'
  content =
    id = '13012223b804124164'
    spamScore = '0.0'
    profanityScore = '1.0'
    spamClassification = 'ham'

Profanity: FUCK, FUCK, FUCK.

Do you still experience this issue?

Rob230’s picture

I am seeing exactly this issue. Are we required to manually add every swear word to the blacklist? I expected Mollom to detect profanity in the same way it does spam.

  postBody = 'fuck'
  checks =
    0 = 'spam'
    1 = 'profanity'
  strictness = 'normal'
code = '200'
  content =
    id = ####
    spamScore = '0.3557781577605149'
    profanityScore = '0.3'
    spamClassification = 'ham'

profanityScore is always 0.3.

Rob230’s picture

Can someone explain how the profanity filter is supposed to work? I have had the following profanity scores:

0.0: Jesus Christ you are such a bastard dick
0.0: dick
0.0: Bastard
0.0: Cunts.
0.0: Jesus Christ
0.3: dickhead
0.3: SHIT SHIT SHIT SHIT SHIT
0.3: FUCK
0.3: Motherfucker
0.3: NIGGER
0.51: SHITTING FUCK
0.51: fucking
0.6: Jesus Christ you are such a bastard dickhead
0.72: This is fucked.

This is on strict. Everything except the last 4 got through, so not very useful as a profanity filter. What is the logic behind it? It seems more than one swear word seems to add up to a higher profanity score?

Rob230’s picture

It seems that the threshold is hardcoded to 0.5 which in my experience is quite hard to get above:

if (isset($result['profanityScore']) && $result['profanityScore'] >= 0.5) {
  if ($form_state['mollom']['discard']) {
    form_set_error('mollom', t('Your submission has triggered the profanity filter and will not be accepted until the inappropriate language is removed.'));
  }
  // ...

It actually ignores the 'strictness' setting. That's for spam only. It would have been nice if we could choose how strict to be on profanity.

sun’s picture

Version: 7.x-2.1 » 7.x-2.x-dev

Hm. That's interesting. I'll try to get an answer for how the profanity score actually works from Mollom backend engineers.

It's not really clear to me as well. I was told to simply check for a score above 0.5. We'll figure it out. :)

Nick_vh’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)