Closed dimitrismistriotis closed 1 year ago
Continuing here.
Also from Peter Willemsen:
Hey there,
When using just the word 'eat', it is being triggered as offensive.
>>> from profanity_check import predict, predict_prob
>>> predict(['eat'])
array([1])
I used alt-profanity-check 1.1.1
So retraining the model fixes everything? I currently have a workaround I call the profanity filter filter:
def text_is_unsafe(text) -> bool:
# Some words trigger false-positives like 'eat', 'lame' etc.
# Instead of retraining the whole model I opted for simply ignoring them.
# See https://gitlab.com/dimitrios/alt-profanity-check/-/issues/12
filter_words = [
'eat',
'lame',
'loser'
]
for word in filter_words:
text = text.replace(word, '')
return predict_profanity([text])[0] == 1
Ping: is @jsilver33 the same person here as in Gitlab?
This is what should be avoided although necessary for some applications at this point.
We should train the model with additional and better data or fix the current dataset.
So retraining the model fixes everything? I currently have a workaround I call the profanity filter filter:
We could get better data from public data such as: https://hatespeechdata.com/#English-header
Each database has roughly 25000~ each I would say, maybe we could combine them by combining similar tags together. Like some of them tag items as [(Personal attack, Not)] while others use something like [Multi-thematic (Abusive, Hateful, Normal, Spam)].
Hey, @Jm15itch and thank you for your interest in the project.
Profane doesn’t necessarily mean hateful, so we’re unsure if these datasets would best serve our needs here. Have not checked thoroughly but do you find a subset in this that applies only to profanity?
Copy from original https://gitlab.com/dimitrios/alt-profanity-check/-/issues/11.
Initial from Jonathon Silver
Dimitrios:
Menelaos:
Jonathon:
Dimitrios: