Most word-processors have spelling checkers. But could we make something that detects and corrects grammatical errors? This could help spelling checkers too - how else could such a program know whether to substitute ``their'' or ``there'' in the sentence ``ther are four chairs here.''?
There are several grammar-checkers already available, though most have a very sketchy coverage of the language. I worked on one such program, the ``Editor's Assistant''. One problem that arose: ``morphological generation''. If the program encounters the third person present plural of a verb, and decides it should be corrected to third person past plural, how to generate the correct word-form? The lexicon has to contain information about which verbs are irregular, and how to inflect them. Luckily, English has few inflections, and despite oddities like ``mother(s)-in-law'', ``child(ren)'', most are comparatively regular. Some other languages are much less regular. All this raises the question of how to index the lexicon in such a way that the right entry can be rapidly located and modified, given its root form and a list of grammatical features. Such questions of indexing and storage - how to represent information so it can be used efficiently - are a central part of AI, as mentioned above.
More speculatively, how about an ``intelligent'' editor that can be told ``find all references to Queen Harriet in this story I'm writing, and replace them by King Harry, changing the relevant pronouns where necessary. Warn me if I've mentioned details of dress etc that must be changed because they depend on sex.'' The Editor's Assistant could actually cope with a similar but simpler task, which involved finding explicit references to measurements in miles, and replacing them by the equivalent number of kilometers.
Such an editor would require a vast amount of knowledge about the real world. Again, how do we encode it so that it can be efficiently located? And is there any formalism which is general enough to say everything that needs to be said?
A need for such knowledge may crop up in unexpected places. The following example comes from Henry Thompson, a language researcher at Edinburgh. Consider translating the sentence ``The Council committee members banned the womens' parade because they feared violence'' into French. Does ``they'' become ``ils'' or ``elles''? Now replace ``feared'' by ``advocated''. It seems that our understanding of this depends on the real-world knowledge that, sexist though it be, Council committees are usually largely male. There are various theories of language understanding which call for the use of such knowledge at various stages of analysis. When is it brought in? How does the analyser know what it needs to look for?