add on_ambiguity callback