Refine word replacement