I am compiling a list of words for an index and I wondered is this exists--sure it does somewhere. The index is for a collection of literary analysis essays.
There is a tool named LIWC (linguistic inquiry and word count) might help you. The tool can analyze any document (varying from small to extremely big documents) based on 82 English language dictionary and domains. It calculates the degree to which various categories of words are used in a text.
Here is a part of a grammar. The type of program you are searching for is a parser. It would have to understand the structure of the sentence which is not always possible. A writer can be very creative in inventing new words. For example, one could inflect a noun like a verb. In German, Peter tigerte durch die Gassen (Peter tigered through the alleys). To tiger could mean: walk like a tiger, whatever this might be.
There is a tool named LIWC (linguistic inquiry and word count) might help you. The tool can analyze any document (varying from small to extremely big documents) based on 82 English language dictionary and domains. It calculates the degree to which various categories of words are used in a text.