Automatic resolution of linguistic ambiguities