I am wondering if another word form can be seen through the Word API. I am creating an Open Source tool that automatically adds documentation to properties and methods when saving a document. This will be done only for public
or protected
methods.
The way I want to work is that if you follow a specific naming convention and use (for example) the AddPerson
or add_person
method name, the code takes these method names and converts them into an array of words, "Add" and "Face".
From these words, I would like to determine whether it is a verb or a noun. For example, in this example, βAddβ is a verb, and βPersonβ is a noun.
Once this is discovered, I would also like to convert the words to form the following documentation statement:
AddPerson (face)
Adds a person.
person: person.
I hope you understand.
In short, how can I convert Add to Add in a smart way, and how can I determine if Add is a verb or a noun programmatically?
I assumed that the Word API would be a good start. I just have no idea how.
source share