How a computer reads
Why counting words is not the same as reading.
Can counting words be enough?
A simple program reads a message by counting happy words and unhappy words. Will it read every message the way a person does?
What this lesson covers
The idea
A simple language program counts words, so it can miss negatives like "not", sarcasm and meaning that depends on context.
Can counting words be enough?
A simple program reads a message by counting happy words and unhappy words. Will it read every message the way a person does?
- Yes, it counts every word, so it cannot miss
- Mostly, but some messages could trick it
- No, I expect it to fail on most messages
Teach the reader some words
This very simple reader scores a message by counting flagged words. Tap a word to flag it Happy or Unhappy.
Flag words until the reader gets 4 messages right. Then flag good and great as Happy and fire as Unhappy, and read the orange notes.
Counting is not reading
The reader only added up flagged words. It did well when the words did the job, such as wonderful or terrible.
It was fooled by not, by an idiom and by sarcasm. A person reads the whole sentence and the situation. A counting program does not.
A simple language program counts words, so it can miss not, sarcasm and meaning that depends on context.
Working with human language is called natural language processing, or NLP. Real NLP is smarter than counting, but it can still get tone wrong.
Notes
A simple language program counts words, so it can miss not, sarcasm and meaning that depends on context.
When a program reads people's messages, a person should check its decisions, and people should be told.
Check yourself
Which message is most likely to fool a reader that only counts happy and unhappy words?
What would help a language program handle not bad better?
A school chat app uses a word-counting program to find unkind messages. Which plan is the fairest?
- The road was muddy and the old bus was badly broken. Both flagged words are plainly unhappy, so a counter gets this one right.
- The lassi was delicious and the staff were lovely. Both flagged words are happy ones, so a counter gets this one right too.
- Great, rain on sports day, just what we wanted — correct. Yes. The words sound happy, but the speaker is being sarcastic. A counter only sees the happy words.
- Give it a longer list of happy and unhappy words. More flags do not help. The problem is how words combine, not how many are flagged.
- Let it study labelled messages and learn word pairs, like not bad — correct. Yes. Looking at words together, with many examples, lets it learn that this pair means something happy.
- Make it read each message more slowly, one word at a time, to be careful. Reading slowly changes nothing. A counter reading one word at a time would make the same mistakes, only later.
- Tell students, and let a teacher check each flagged message first — correct. Yes. The program will flag some friendly jokes and miss some tricky messages, so a person must check. Students also deserve to know.
- Punish students automatically whenever the program flags their message. Counting words cannot tell a joke from an insult. Automatic punishment would be unfair to students who did nothing wrong.
- Use it in secret so students do not change how they write. People should know when their messages are checked, and why. Secrets break trust.