View Single Post
Old 08-26-2025, 02:49 PM   #7
lomkiri
Groupie
lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.
 
lomkiri's Avatar
 
Posts: 174
Karma: 1497966
Join Date: Jul 2021
Device: N/A
Quote:
Originally Posted by Phssthpok View Post
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.

Last edited by lomkiri; 08-26-2025 at 02:53 PM.
lomkiri is offline   Reply With Quote