Quote:
Originally Posted by Phssthpok
What I really want is a way to FIND the ones not in the dictionary and THEN decide whether to replace them.
|
You could modify the regex-function so it selects the candidates and writes them down into a file (e.g..
not_in_dict.txt) without changing anything in your text.
Then you open this file in a text-editor and delete from it all but the occurrences you want to correct
Then you modify the regex-function to load this new file in a list, and to check each occurrence against this list : if it's present in the list, correct it in the text
Note: It could be more convenient to delete from the file only the occurrences you want to correct (deleting only more or less 50 instead of 450), in that case you'll have to do the contrary: correct only the ones which are NOT in the list.