I have string called 'fish cakes'. I have an eligible dictionary of words, that contains "lemon", and "fish". I want agrep to match fish cakes to string fish in the eligible dictionary. But it won't work. It'll match fish with fish cakes.
I want it to detect typos of input data, and I have an eligible dictionary of the eligible words. And i want to suggest what was the appropriate word. So if I had lmon I want to say, did you mean 'lemon'. If i had fish cakes, i want to go, did you mean fish?
agrep("fish", c("lemon", "fish cakes"))
Will return index 2, matching it with fish cakes
if I do agrep("fish cakes", c("lemon", "fish"))
It returns nothing, meaning it doesn't match.
Any suggestions? Thanks