clean up glue example

This commit is contained in:
thomwolf committed 2019-07-05 16:31:13 +02:00
1 parent 162ba383b0
commit 1113f97f33
4 files changed
+423 -17

No files matched your search

@@ -110,6 +110,24 @@ class PreTrainedTokenizer(object):
return tokenizer
def tokenize(self, text):
raise NotImplementedError
def convert_tokens_to_ids(self, tokens):
raise NotImplementedError
def convert_ids_to_tokens(self, ids):
raise NotImplementedError
def encode(self, text):
raise NotImplementedError
def decode(self, token_ids, *input, **kwargs):
raise NotImplementedError
def save_vocabulary(self, vocab_path):
raise NotImplementedError
def clean_up_tokenization(out_string):
out_string.replace(' .', '.').replace(' ?', '?').replace(' !', '!').replace(' ,', ','