I'm writing an add-on to assist with word analysis in my writing. Ultimately, the I want to be presented with a list of words that are used often, and then go through the document to make sure I'm not using any one word too frequently in any one place. It seems like the easiest way to do this is just plugging in each word to the native "find" (ctrl-f) function. Is there a way to access this functionality (pass in a word and start the search) programmatically?
Edit: to clarify - I'm looking to activate the "find in document" user interface that exists in Docs natively. I'm not trying to figure out how to parse a string.