nthngdy commited on
Commit
cb7d89a
1 Parent(s): c3b663e

Update tokenization_character_bert.py

Browse files
Files changed (1) hide show
  1. tokenization_character_bert.py +2 -2
tokenization_character_bert.py CHANGED
@@ -905,8 +905,8 @@ class CharacterMapper:
905
  def convert_char_ids_to_word(self, char_ids: List[int]) -> str:
906
  "Converts a sequence of character ids into its corresponding word."
907
 
908
- assert len(char_ids) == self.max_word_length, (
909
- f"Got character sequence of length {len(char_ids)} while " "`max_word_length={self.max_word_length}`"
910
  )
911
 
912
  char_ids_ = [(i - 1) for i in char_ids]
905
  def convert_char_ids_to_word(self, char_ids: List[int]) -> str:
906
  "Converts a sequence of character ids into its corresponding word."
907
 
908
+ assert len(char_ids) <= self.max_word_length, (
909
+ f"Got character sequence of length {len(char_ids)} while `max_word_length={self.max_word_length}`"
910
  )
911
 
912
  char_ids_ = [(i - 1) for i in char_ids]