PDA

View Full Version : Extract nouns, verbs, adjectives



prefect
01-22-2016, 12:40 AM
Hi,

I am working with Word files (MS Office 2010) and would like a macro to do the following:
Go through all files in the folder, and create a separate document into which the macro would extract: 1) name of the file; 2)nouns, verbs, adjectives from the file(no duplicates from the same file).

So essentially the new file would contain filenames & nouns, verbs and adjectives from each file in the folder.

I have a macro that goes through all files in the folder and highlights certain keywords and extracts them into a separate file, but now I need to extract all nouns/verbs/adjectives, so that macro does not work.

Would a macro like this be possible? If not, is there a different way to achieve this?

Thanks,
Prefect

akuini
01-30-2016, 05:36 AM
Hi, prefect
I don’t think macro can do that.
But if you have a list of words that categorized as nouns, verbs and adjectives then it is possible.
For example you can get the list from https://en.wiktionary.org/wiki/Category:English_lemmas. But since the list must be huge then using excel is better than word macro.
The steps:


Extract all the words from the document, and delete all duplicate words.
In excel you can use vlookup to determine which extracted words exist in the list.

gmaxey
01-30-2016, 12:37 PM
That river is running fast! That is a fast running river!

Do you see the difficulty in what you are after? It can't be done with a macro.