algorithm to align written form with pronunciation according to hand-made match table