
F-bombs are out, and pleases and thankyous are in. A system created by IBM translates offensive chatter on social media into more polite language, while keeping the content intact. It could be used to take some of the sting out of online abuse.
To create the system, the team first harvested just under ten million posts from Twitter and Reddit, labelled as either containing offensive language or not.
They then made an artificial intelligence algorithm made up of several parts. One part parsed a given offensive sentence to work out its meaning, whilst a second used this to create a new more palatable version.
Advertisement
As there’s no Rosetta Stone for offensive and non-offensive language, a third part of the system evaluated the translated sentence to see whether the tone had changed. The new sentence was then translated back to see how closely it resembled the original. If there were any errors, the system was then tweaked accordingly.
In this way, the team trained and refined the AI, before testing it on posts it had not previously seen.
“For fuck sake, first world problems are the worst,” became “for hell sake, first world problems are the worst”, for example. Though it wasn’t perfect, and produced some cordial but confusing sentences, such as translating “you’re fucking pathetic” to “you’re big pathetic”.
Mind your Ps and Qs
The AI performed better when tested against a state-of-the-art text-translation algorithm on both accuracy and content. In almost every case, offensive text was successfully converted into less-offensive language, with the intended meaning remaining.
In the future, the system will be able to handle “posts containing hate speech, racism and sexism,” says , one of the team.
“The act of modifying the style of a given written text to make it less offensive potentially raises complex issues of censorship and the restriction of free speech,” says at the University of Cambridge.
Dos Santos and his team agree. Rather than automatically replacing text, they imagine it being used as a prompt: telling online posters what they’re about to say is offensive, and offering a kinder option to go with instead.
Reference: