A partial speech tagger tags the words in the input text. For example, the popular Penn Treebank tag contains about 40 labels, such as “plural noun,” “comparative adjective,” “past tense verb,” etc. The tagger also eliminates some ambiguity. For example, many English word forms can be either nouns or verbs, but in the context of other words, their part of speech is unambiguous. So, annotating your text with POS tags, you can answer questions such as: how many nouns do I have, how many sentences does the verb contain ?, etc.
For a chatbot, you obviously need a lot more. You need to find out objects and objects in the text and what verb (predicate) they attach; you need to allow anaphors (which individual does he or she indicates), what is the area of ​​negation and quantifiers (for example, each, more than 3), etc.
Ideally, you need to match the entered text with some kind of logical representation (for example, first-order logic), which will allow you to come up with to determine whether the two sentences are equivalent in meaning or in relation to occurrence, etc.
While the POS tag will display the sentence
Mary likes no man who owns a cat.
to such a structure
Mary/NNP likes/VBZ no/DT man/NN who/WP owns/VBZ a/DT cat/NN ./.
you need something like this:
SubClassOf( ObjectIntersectionOf( Class(:man) ObjectSomeValuesFrom( ObjectProperty(:own) Class(:cat) ) ) ObjectComplementOf( ObjectSomeValuesFrom( ObjectInverseOf(ObjectProperty(:like)) ObjectOneOf( NamedIndividual(:Mary) ) ) ) )
Of course, while POS tags have accuracy and recall close to 100%, more complex automatic processing will be much worse.
Good Java library for NLP LingPipe . However, this does not go beyond the scope of POS marking, chunking and named object recognition.