The first problem that we will look into is known as part-of-speech tagging (POS tagging). According to Wikipedia, POS tagging, also known as grammatical tagging or word-category disambiguation, is the process of marking up a word in a text as corresponding to a particular part of speech based on both its definition and its context, that is, its relationship with adjacent and related words in a phrase, sentence, or paragraph. A simpler version of this, which is usually taught in schools, is classifying words as noun, verbs, adjectives, and so on.
POS tagging is not as easy as it sounds because the same word can take different parts of speech in different contexts. A simple example of this is the word dogs. The word dogs is usually considered a noun, but in the following sentence, it acts like a verb:
The sailor dogs the hatch.
Correct grammatical tagging...