M
murphy
Hi
I am writing a VB macro to scan through a story and highlight words that are
inappropriate for readers of certain ability levels. Appropriate words are
listed in a file and there over 60,000 of them for the highest level.
Basically I have an outerloop that selects each word in the story in order
and then I call my InWordList function to see if it is contained in the
wordlist. (If it isn't, I highlight the word, because it's inappropriate.)
For a wordlist of 60,000 words, this scan is taking over a second on average
for each word.
I have thought of sorting the wordlist by order of word frequency, and
several other ways I could massage the wordlist itself, but before I try
that, I'd like to make sure there isn't a way to speed up the search function
itself. Perhaps there is another command?
Thanks for any advice
I am writing a VB macro to scan through a story and highlight words that are
inappropriate for readers of certain ability levels. Appropriate words are
listed in a file and there over 60,000 of them for the highest level.
Basically I have an outerloop that selects each word in the story in order
and then I call my InWordList function to see if it is contained in the
wordlist. (If it isn't, I highlight the word, because it's inappropriate.)
For a wordlist of 60,000 words, this scan is taking over a second on average
for each word.
I have thought of sorting the wordlist by order of word frequency, and
several other ways I could massage the wordlist itself, but before I try
that, I'd like to make sure there isn't a way to speed up the search function
itself. Perhaps there is another command?
Thanks for any advice