The question I have is regarding the identification of a series of string in python. Let me explain what I am trying to do:
A string such as tom and jerry
could also be written as in lowercase
- tom n jerry
- tom_jerry
- tom & jerry
- tom and jerry
and so on and so forth. As you can see there in the minimal example, there were 4 possible ways where even if I created a dictionary with these 3 ways, i will miss out on a string containing tom _ jerry
. What can I do to recognize tom and jerry, creating many rules seems very inefficient. Is there a more efficient way to do this ?