Steve, I've had a go with your code which seems to be nearly working (or probably working correctly, but I misunderstand). By the way I've changed from a,i,n,o,e to a,e,i,o,u as those are the only ones which Petoro wants. I find the following in a converted file:
For orignal word abaceriá (grocery), the code gives abaceri and loses the a.
I cannot see why the code would give this error, or maybe I'm misunderstanding the original file.
Petoro, would you confirm that abaceriá is the correct Spanish and not abaceri? Thank you.