CSC 101 : Computer Literacy

LAB 10

Thursday, December 5, 1996 Bergmann-Streinu-Thiebaut

The purpose of today's lab is to think about some of the ingredients that might be necessary to program a computer to understand the English language, by doing detective work with two programs: Eliza, and the Word grammar checker.

Note that neither of the programs in this lab is "intelligent"; your task will be to find evidence that they aren't intelligent.
1. Getting started You will be handing in files that contain images of windows today, so the first thing is to practice capturing window images in a file.

a. Eliza from the courses/computer science/101 menu. (If Eliza comes up full-screen-sized, you should change it to a window by pressing alt-Enter.)
b. Press alt-PrintScreen. This copies the active window onto the Windows95 clipboard. Launch WORD. Select Edit/Paste.
c. You should now see the Eliza window image in the open WORD file.

You may exit WORD at this point- you don't need to save this file.
2. Try out Eliza by typing in responses to what Eliza says. When you are done, you may terminate the session by typing bye.

3. Figure out how Eliza comes up with some of her (its?) responses. Carry on a dialogue with Eliza and, at each of Eliza's responses, try to figure out what you said (or didn't say) that provoked that response.

4. Create a WORD file with an image of an Eliza window. The window should be filled with a dialogue. This should be your own dialogue, not a dialogue that we looked at in class.

In the WORD file, after the image, add an explanation of each one of ELIZA's responses. (Note: you are making educated guesses here. We won't be looking for the CORRECT explanation, but a reasonable explanation.)

Save this file as ixxiyy.

5. Launch Eliza again, and get the program to say something nonsensical. The nonsense may be either syntactic (Eliza says something that is ungrammatical) or semantic (the grammar is okay, but Eliza's response is a nonsensical thing to say at that point). For example, here are two responses that I got in a dialog with Eliza:

I like it when you understand me.
PERHAPS IN YOUR FANTASY WE LIKE IT WHEN EACH OTHER.
(syntactic nonsense; the response is ungrammatical)

It happens when I wake up in the morning.
WHY DO YOU ASK?

(syntactic nonsense; I wasn't asking a question)

Your dialog must include some other example of syntactic or semantic nonsense.

Copy this new Eliza window image into the file ixxiyy, at the end. (Put the cursor

at the end of the file before pasting the image.) After the image, explain why the

response is nonsensical, and then explain why you think Eliza came up with that

response.

6. Try Word's grammar checker. Word, like many software applications, has a grammar checker. Unfortunately, grammar checkers are not yet truly intelligent; they find "mistakes" that aren't mistakes, and they sometimes miss real grammatical mistakes altogether.

Create a file with the following sentence:

Here comes the children.

Now pull down the Tools menu, and choose Grammar. A Grammar dialog box

will pop up, highlighting the word comes and suggesting that the word come be

used instead. Click on the Explain button. You will get an explanation of the

rule that the grammar checker is using. Change comes to come, and run the

grammar checker again. It won't flag any errors, but will give you some

"Readability Statistics" instead.

Now type in the following:

Here comes three children.

Run the grammar checker. Note that it doesn't catch an almost identical

grammatical error! My guess is that the grammar checker doesn't know that

"three children" is a plural expression.

Let's take a look at the list of rules that the grammar checker uses. Pull down the

Tools menu, and choose Options. Click on the Grammar tab, and press the

Customize Settings button. In the scroll box, find and highlight Repetitive

Expressions and then click the Explain button. Read what this rule does.

We are now going to test how well the rule works when checking for repeated

words. Type in

I like eating at at noon.

The Grammar dialog box will pop up, flagging the second at. The grammar

checker is right in this case; make the suggested change.

Now type in

The orange orange is tasty.

The Grammar dialog box pops and flags the second orange. The grammar checker

is not right; this is a perfectly good sentence. What has happened here is that

WORD is blindly suspicious of all double occurrences of words.

7. Come up with two other examples for which the grammar checker gives incorrect advice.

Your first example will be another case where the "Repetitive expressions" rule is

incorrect. Think of another sentence in which some word appears twice in a row,

but which is perfectly grammatical. Open a new file called jxxjyy, type in your

sentence, and run the grammar checker. The Grammar dialog box should pop up.

Capture this box on the clipboard: alt-PrintScreen, and then paste it into your

file.

Finally, find a completely different example of incorrect advice from the grammar

checker. Either:

a. Find an ungrammatical sentence that the grammar checker doesn't flag,

or
b. a grammatical sentence that the grammar checker incorrectly flags

If you choose a, your example must not be a "Here comes" type example - find

some different grammatical error that the grammar checker can't detect.

If you choose b, the rule that is incorrectly cited must be a different rule from the

"Repetitive Expression" rule.

Type your new example into the file jxxjyy, run the grammar checker, and

capture the grammar dialog box in your file.

In addition, explain what went wrong and suggest how to fix it:

If you chose a, then explain why the sentence is ungrammatical and why you

think WORD didn't catch the error. In addition, state a rule that would catch

your error. For example, for my sentence Here comes three children I would state the rule:

A noun phrase that begins with a plural number word like two or three

is a plural noun phrase and its verb must be a plural verb.

If you chose b, then explain why WORD incorrectly thought that a

grammatical rule was violated. In addition, state an exception to the rule that

WORD cites. For example, for my sentence The orange orange is tasty I

would cite the exception:

The rule forbidding repetitive expressions does not apply when the

expression is both an adjective and a noun, such as orange.

What to submit: Deposit files ixxiyy and jxxjyy into the Literacy dropbox.