message: Clarify error messages in case of invalid vocabulary format for index lookup layers.
diff: @@ -248,21 +248,29 @@ class IndexLookup(base_preprocessing_layer.CombinerPreprocessingLayer):
  has_oov = False
  if all([should_have_mask, has_mask, should_have_oov]) and not has_oov:
  - raise ValueError("The passed vocabulary has the correct mask token `%s` "
  + raise ValueError("Invalid vocabulary format. The layer was created with "
  + "`mask_token=%s` and `oov_token=%s`. These tokens should"
  + " be included in the provided vocabulary. "
  + "The passed vocabulary has the correct mask token `%s` "
  "at index 0, but does not have the OOV token `%s` in "
  "indices [%s:%s]. Instead, we found `%s`. Was this "
  "vocabulary generated by a layer with incompatible "
  "settings?" %
  - (self.mask_token, self.oov_token, oov_start, oov_end,
  + (self.mask_token, self.oov_token,
  + self.mask_token, self.oov_token, oov_start, oov_end,
  vocab[oov_start:oov_end]))
  if all([should_have_oov, has_oov, should_have_mask]) and not has_mask:
  raise ValueError(
  + "Invalid vocabulary format. The layer was created with "
  + "`mask_token=%s` and `oov_token=%s`. These tokens should "
  + "be included in the provided vocabulary. "
  "The passed vocabulary has the correct OOV token `%s` at "
  "indices [%s:%s], but does not have the mask token `%s` in "
  "index 0. Instead, we found `%s`. Was this vocabulary "
  "generated by a layer with incompatible settings?" %
  - (self.oov_token, oov_start, oov_end, self.mask_token, vocab[0]))
  + (self.mask_token, self.oov_token, self.oov_token,
  + oov_start, oov_end, self.mask_token, vocab[0]))
  insert_special_tokens = not has_oov and not has_mask
  