sd
Browse files- tokenizeConfig.py +2 -2
tokenizeConfig.py
CHANGED
|
@@ -90,7 +90,7 @@ class OBITokenizer(PreTrainedTokenizer):
|
|
| 90 |
def _tokenize(self, text):
|
| 91 |
"""Returns a tokenized string."""
|
| 92 |
encoding = self.tokenizer.encode(text)
|
| 93 |
-
return encoding.
|
| 94 |
|
| 95 |
def _convert_token_to_id(self, token):
|
| 96 |
"""Converts a token (str) in an id using the vocab."""
|
|
@@ -102,7 +102,7 @@ class OBITokenizer(PreTrainedTokenizer):
|
|
| 102 |
|
| 103 |
def convert_tokens_to_string(self, tokens):
|
| 104 |
"""Converts a sequence of tokens (string) into a single string."""
|
| 105 |
-
return self.tokenizer.decode(tokens)
|
| 106 |
|
| 107 |
def save_vocabulary(self, save_directory, filename_prefix: Optional[str] = None) -> Tuple[str]:
|
| 108 |
"""
|
|
|
|
| 90 |
def _tokenize(self, text):
|
| 91 |
"""Returns a tokenized string."""
|
| 92 |
encoding = self.tokenizer.encode(text)
|
| 93 |
+
return encoding.ids
|
| 94 |
|
| 95 |
def _convert_token_to_id(self, token):
|
| 96 |
"""Converts a token (str) in an id using the vocab."""
|
|
|
|
| 102 |
|
| 103 |
def convert_tokens_to_string(self, tokens):
|
| 104 |
"""Converts a sequence of tokens (string) into a single string."""
|
| 105 |
+
return self.tokenizer.decode(tokens)
|
| 106 |
|
| 107 |
def save_vocabulary(self, save_directory, filename_prefix: Optional[str] = None) -> Tuple[str]:
|
| 108 |
"""
|