Language-mangling rude word filters

A large green plastic barrel with thick walls in a garden, against an outdoor wall and next to a wooden fence with foliage growing on it. This is used to store rainwater and has a capacity of about 200 litres.
“Rainwater tank, about 200 litres” by Jeuwre, available under a CC-BY-SA 4.0 licence, via Wikimedia.

What we have here on the right is a water butt also known as a rainwater tank. These are large containers which collect rainwater so are an environmentally friendly way for people to save water so that they can water the plants in their garden during a dryer season. A very clever idea and totally inoffensive.

Context is everything

However… the word ‘butt’ can also refer to your bottom. Well not your bottom of course, I wouldn’t be so rude as to make any comment about your own bottom, I mean bottoms in general.

In the United States a less polite word for bottom is ‘ass’ (which also means ‘donkey’ in the UK) but there are times when saying or writing the word ‘ass’ wouldn’t be so polite and for those situations you might use another word, like butt.

Well that’s probably just making it worse

In an effort to make online communications politer people have tried a variety of tactics. Sometimes a word is on a banned list so if you were to type it into your message it wouldn’t send and you have to come up with a different way of saying it. Or your system could use regular expressions (‘regex’) to find all instances of a word or phrase in published text and replace it with something deemed more appropriate and less offensive.

If you were to replace all instances of ‘ass’ with ‘butt’ in a piece of text you’d increase the politeness of your communication, but you wouldn’t necessarily increase its readability. It’s a clbuttic mistake, produce by a software filter that’s a little too broad in its reach. In that last sentence you can see what happens when I replace the ‘ass’ in classic with ‘butt’ – absolute gibberish.

Of course, people noticed

If you had to write, politely, about clothing you might prefer to put ‘trousers’ rather than ‘pants’ (in the US meaning, rather than underwear) but you might be a bit irritated if your other article on housing referenced ‘occutrousers’ rather than ‘occupants’…

My favourite (real-world) example of this silliness was when a newspaper article referenced the fact that a historical American president had been ‘buttbuttinated’ instead of ‘assassinated’.

Although that really happened and a few other pages on the internet were filled with nonsense words* people did notice pretty quickly (I mean you would, wouldn’t you?!) and rapidly solved it by tweaking their filters to make sure that unwanted words that are found within a word were left alone, and perhaps they did a bit of proofreading to double-check too.

[*mostly it’s now articles like this drawing attention to the problem!]

I’ve made this mistake too

I wish I’d done a bit of proofreading when I did what I thought was a clever ‘find and replace’. A couple of thousand schools and home educators in the UK receive free copies of our printed CS4FN magazine (if your school would like to sign up…) and I keep all the addresses stored in a password-protected spreadsheet with different columns for the name, lines of the address, post code etc.

One day I had the brilliant idea of tidying up the ‘Country’ column in my database so that if someone had typed ‘UK’ it would now say ‘United Kingdom’.

Unfortunately I did this as a ‘global’ (across the entire spreadsheet) find and replace instead of specifying more clearly what should be changed. I didn’t realise until a few magazines came back as undeliverable because the address made absolutely no sense. If your teacher’s name was Luke or your school name or address had a ‘Duke’ in it I had now managed to turn these into “LUnited Kingdome” or “DUnited Kingdome”.

Oops!

– Jo Brodie, Queen Mary University of London


Share this post


Part of a series of ‘whimsical fun in computing’ to celebrate April Fool’s (all month long!).

Find out about some of the rather surprising things computer scientists have got up to when they're in a playful mood.

Subscribe to be notified whenever we publish a new post to the CS4FN blog.


This page is funded by EPSRC on research agreement EP/W033615/1.

QMUL CS4FN EPSRC logos

The red sock of doom – trying to catch mistakes before they happen

A red sock in with your white clothes wash – guess what happened next? What can you do to prevent it from happening again? Why should a computer scientist care? It turns out that red socks have something to teach us about medical gadgets.

Washing machine mistake
Washing machine with red sock in white washing. Image by Dominic Furniss from Errordiary and Flikr, provided for this article
CC BY-NC-SA 2.0

How can we stop red socks from ever turning our clothes pink again? We need a strategy. Here are some possibilities.

  • Don’t wear red socks.
  • Take a ‘how to wash your clothes’ course.
  • Never make mistakes.
  • Get used to pink clothes.

Let’s look at them in turn – will they work?

Don’t wear red socks: That might help but it’s not much use if you like red socks or if you need them to match your outfit. And how would it help when you wear purple, blue or green socks? Perhaps your clothes will just turn green instead.

Take a ‘how to wash your clothes’ course: Training might help: you’d certainly learn that a red sock and white clothes shouldn’t be mixed, you probably did know that anyway, though. It won’t stop you making a similar mistake again.

Never make misteaks: Just never leave a red sock in your white wash. If only! Unfortunately everyone makes mistakes – that’s why we have erasers on pencils and a delete key on computers – this idea just won’t work.

Get used to pink clothes: Maybe, but it’s not ideal. It might not be so great turning up to school in a pink shirt if everyone else is wearing a white one.

What if the problem’s more serious?

We can probably live with pink clothes, but what happens if a similar mistake is made at a hospital? Not socks, but medicines. We know everyone makes mistakes so how do we stop those mistakes from harming patients? Special machines are used in hospitals to pump medicine directly into a patient’s arm, for example, and a nurse needs to tell it how much medicine to give – if the dose is wrong the patient won’t get better, and might even get worse.

What have we learned from our red sock strategies? We can’t stop giving patients medicine and we don’t want to get used to mistakes so our first and fourth strategies won’t work. We can give nurses more training but everyone makes mistakes even when trained, so the third suggestion isn’t good enough either and it doesn’t stop someone else making the same mistake.

We need to stop thinking of mistakes as a problem that people make and instead as a problem that systems thinking can solve. That way we can find solutions that work for everyone. One possibility is to check whether changes to the device might make mistakes less likely in the first place.

Errors? Or arrows?

Most medical machines are controlled with a panel with numbered keys (a number keypad) like on mobile phones, or up and down arrows (an arrow keypad) like you sometimes get on alarm clocks. CHI+MED researchers have been asking questions like: which way is best for entering numbers quickly, but also which is best for entering numbers accurately? They’ve been running experiments where people use different keypads, are timed and their mistakes are recorded. The researchers also track where people are looking while they use the keypads. Another approach has been to create mathematical descriptions of the different keypads and then mathematically explore how bad different errors might be.

It turns out that if you can see the numbers on a keypad in front of you it’s very easy to type them in quickly, though not always correctly! You need to check the display to see if you have actually put in the right ones. Worse, mistakes that are made are often massive – ten times too much or more. The arrow keypads are a little slower to use but because people are already looking at the display (to see what numbers are appearing) they can help nurses be more accurate, not only are fewer mistakes made but those that are made tend to be smaller.

Smart machines help users

A medical device that actively helps users avoid mistakes helps everyone using it (and the patients it’s being used on!). Changing the interface to reduce errors isn’t the only solution though. Modern machines have ‘intelligent drug libraries’ that contain information about the medicines and what sort of doses are likely and safe. Someone might still mistakenly tell the machine to give too high a dose but now it can catch the error and ask the nurse to double-check. That’s like having a washing machine that can spot a brightly coloured sock in a white wash and that refuses to switch on till it has been removed.

Building machines with a better ability to catch errors (remember, we all make mistakes) and helping users to recover from them easily is much more reliable than trying to get rid of all possible errors by training people. It’s not about avoiding red socks, or errors, but about putting better systems in place to make sure that we find them before we press that big ‘Start’ button.

Further reading / watching
You can find a copy of this article on pages 4 and 5 in issue 17 (Machines Making Medicine Safer) of CS4FN 17. This article was originally published on CHI+MED