I have a bunch of bank transaction records from which I want to extract merchants' names. In a few subsets of these records, the structure of the string is the same within the subset with only the merchant name changing. For example
XXXXX_ID_TIME_STAMP MERCHANT1 CREDIT
XXXXX_ID_TIME_STAMP MERCHANT2 CREDIT
BILL PAYMENT BANK_NAME MERCHANT NAME 3
BILL PAYMENT BANK_NAME MERCHANT NAME 4
In the above two subsets, the structure of the string is the same, only the merchant names changes
and so on ...
Using NLP, I want to extract merchant names in such cases. How should I approach this?
Using regex is not feasible because I'd have to manually go through the complete data, identify all such patterns and create regex strings that'll extract the name. I would also have to do this for every new pattern.
Is there a way where I can train a model that can identify/extract merchants in such cases?