Skip to content

Commit

Permalink
remove berttokenizer import
Browse files Browse the repository at this point in the history
  • Loading branch information
jxmorris12 committed May 6, 2020
1 parent aed4de1 commit 8b06e45
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions textattack/tokenizers/bert_tokenizer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from transformers.tokenization_bert import BertTokenizer, BertTokenizerFast
from textattack.tokenizers import AutoTokenizer

class BERTTokenizer(AutoTokenizer):
Expand Down Expand Up @@ -28,4 +27,4 @@ def convert_text_to_tokens(self, input_text):
tokens.append(self.tokenizer.sep_token)
pad_tokens_to_add = self.max_seq_length - len(tokens)
tokens += [self.tokenizer.pad_token] * pad_tokens_to_add
return tokens
return tokens

0 comments on commit 8b06e45

Please sign in to comment.