Quote:
Originally Posted by lomkiri
Try to replace the sub-function replace_word() that is inside the code of the example by this one, that does a replace when the compound word is NOT is the dict
|
No, I did this -- the problem with this code is that I find every occurrence of a hyphenated word and then whether to replace it or not.
What I really want is a way to FIND the ones not in the dictionary and THEN decide whether to replace them. Out of 500 hyphenated words, maybe only 50 will need to be looked at as candidates for replacement, instead of looking at all 500. But I can't see any way to do that, so I'll just have to look at all 500.