Hi
I would appreciate to help me this:
how to replace words (file1.txt) using their similarity from another list (file2.txt) in a batch mode for hundreds of file? I mean how to replace AAAAAAA with AAAAAAA_dddddd and than replace BBBBBBB with BBBBBBB_eeeeee and so on for thousands of the words. example of files:
file1.txt looks like this:
AAAAAAA
BBBBBBB
CCCCCCC
file2.txt looks like this:
AAAAAAA_dddddd
BBBBBBB_eeeeee
CCCCCCC_ffffffffff
The package fuzzy_join allows to match strings based on similarities.
However, if the first part (before the underscore) matches the entry in file1 exactly it would be easier just to split the names in the file2 and match this against the entries in file1.