Suppose I have a dictionary:
{apple:large apple, apple:red apple, apple:aple, orange:mandarin, orange:orang, orange:blood orange}
and so on...
And then I want to replace a large document of entries with the keys. However, occasionally a new value will come up, i.e. {apple:green apple}
Is there a method where I can replace all values with the corresponding key, but then also replace 'close' values like the one given if they appear?
Example document:
var1
_____
aple
apple
orange
Apple
Red apple
gren Apple
blood Orange
orang
var1_replaced
______________
apple
apple
orange
apple
apple
apple
orange
orange