Closed adityaraute closed 3 years ago
If you would like to continue contributing to open source and would like to do it with an awesome inclusive community, you should join our Discord chat and our GitHub Organisation - we help and encourage each other to contribute to open source little and often 🤓 . Any questions let us know.
We could perhaps use a second library for this? (personally, I was thinking, if we could run the message content through some sentiment classifier lib, to get more context and then send the interpretation through to alex, I think we could somehow account for this in that too 🤔 )
We could perhaps use a second library for this? (personally, I was thinking, if we could run the message content through some sentiment classifier lib, to get more context and then send the interpretation through to alex, I think we could somehow account for this in that too 🤔 )
Would be too heavy to do that according to me. A bot should not be burdened with so much as we need quick responses especially in this case.
oh :+1:
Maybe (though I'm not sure about this), we could add an extra RESTRICTED_WORDS_LIST
, in the config.ts file, and regex these to the message content, in order to check text that isn't flagged by alex?
(*Is there a way to add a project-specific word to alexjs-ban-list?)
What about something like this https://github.com/web-mech/badwords#readme
That looks interesting :+1: Though, since we're considering adding another library, it reminds me of something @nhcarrigan said in the discord server Is that a viable option? 🤔
Whatever we use, we need to have a distinction between non-inclusive pronouns and profane language. Can't judge them the same neither can we react to them similarly.
we used to have one that was custom built, but I think using library that has been used before is probably a better starting point.
I agree with @dumbcoder7 that "no tolerance" is best for bad language and there are 2 actions.
My thoughts are:
- add another feature that uses a library to check for bad words, which removes the message (similar to standup command) and puts a red bot response saying something like "please do not use bad language here"
We can code this ourselves as well as use the Bad Words library here that you mentioned before. What do you recommend?
We will have to integrate the library, so we will have to write code, but the less code we right about the profanity part the better and let the library do the heavy lifting
I meant coding the entire mechanism and only picking the 'bad' words from the library. But sure, no reason to overwork ourselves.
To clarify, if we scrap Alex.js and write our own parser, we could:
We originally started off with our own parser. Now seeing both ways of doing it, I definitely believe using AlexJS is the better options - then we can add to its ignore config for the ones we don't want flagged (this is a great green square for people too)
There's a new discussion #656 that discusses about using nlp, (I'm linking here, so that perhaps we could get some context from there as well)
Guys, I appreciate the discussion, but a methodology to remove obviously offensive words needs to be put in place ASAP. EddieHub is growing and with more members, we don't want exposed vulnerabilities. NLP and contextual flagging can be a secondary issue but the bad words
library should be implemented quickly in my opinion.
I think we could look at alex(or the library it uses retext
) and implement the bad-word-flags from there
or we could look at:
What about something like this https://github.com/web-mech/badwords#readme
I prefer the latter, but sadly I currently do not have the time or knowledge to implement this feature. Would request whoever can, to add it as soon as possible.
Yep, something simple and sooner is best 👍
I'm interested in working on this 🙃
The profanitySureness field is a number (the default is 0). We use cuss, which has a dictionary of words that have a rating between 0 and 2 of how likely it is that a word or phrase is a profanity (not how “bad” it is): The profanitySureness field is the minimum rating (including) that you want to check for. If you set it to 1 (maybe) then it will warn for level 1 and 2 (likely) profanities, but not for level 0 (unlikely).
AlexJS uses a profanity filter, I think we have the config incorrect
We have the profanitySureness
set to 2, which is the minimum level of flagging - we could try bumping it to 1
to see if it catches more.
it catches more but still not as functional as needed
moreover maybe, could we make the bot censor profane words?
How so? The most we could do is have the bot delete the offensive message entirely, since a bot can't edit a user's message. We could have it re-send the message as an edited form, but that gets messy IMHO.
No, I meant the embed made by the bot Example: A user says the b word EddieBot send the warning embed like this-
You used the word "b****(or some iteration of censoring)"
> this is profane.
-----
-----
Also, slight update profanitySureness at 1 works pretty much okay @adityaraute Could you perhaps dm me examples of what the bot was not flagging as offensive? (this way we could be sure if setting that to 1 is sufficient)
@Vyvy-vi Yes I think Level 1 can be enough. I did mean words that are overtly offensive with no other interpretation whatsoever. This includes abusive and profane language.
Recently the word a**hole
was not flagged or removed, it require manual removal. The config is still on 2
though, I will update to 1
now
This word is now flagged, but the whole message should really be removed
I think we can find out what has been triggered in the response object source: 'retext-equality'
and if cuss
is mentioned, the message can be removed - probably best to leave a reply tagging the author and saying it was removed
[
[1:17-1:20: `his` may be insensitive, when referring to a person, use `their`, `theirs`, `them` instead] {
message: '`his` may be insensitive, when referring to a ' +
'person, use `their`, `theirs`, `them` instead',
name: '1:17-1:20',
reason: '`his` may be insensitive, when referring to a ' +
'person, use `their`, `theirs`, `them` instead',
line: 1,
column: 17,
location: { start: [Object], end: [Object] },
source: 'retext-equality',
ruleId: 'her-him',
fatal: false,
actual: 'his',
expected: [ 'their', 'theirs', 'them' ]
}
]
Yes, that is the ideal way. Someone who can implement this, please make haste. It's already been two months since this issue was raised and still cusses are possible to use.
I'll try and open a PR after a while :)
Stale issue message
I think this can be closed, as this was resolved by 81b9584cf8e87989f8e3754959367643f6a1ff72
Description
Eddie bot flags non-inclusive pronouns, but does not flag many offensive words. It will be better if EddieBot can do it.
Screenshots
I can add screenshots but I will refrain from doing so as the words can be offensive. Head over to the Discord Server's
#bot-chat
channel to find live examples.Additional Context
Will add the screenshots if someone explicitly requests for it.
Join Eddie's discord community here