diff --git a/fastNLP/io/pipe/matching.py b/fastNLP/io/pipe/matching.py index 016730f2..6af8f5a6 100644 --- a/fastNLP/io/pipe/matching.py +++ b/fastNLP/io/pipe/matching.py @@ -352,8 +352,7 @@ class MNLIPipe(MatchingPipe): class LCQMCPipe(MatchingPipe): def __init__(self): - super().__init__() - self.tokenizer = 'cn-char' + super().__init__(tokenizer='cn-char') def process_from_file(self, paths=None): data_bundle = LCQMCLoader().load(paths) @@ -365,8 +364,7 @@ class LCQMCPipe(MatchingPipe): class CNXNLIPipe(MatchingPipe): def __init__(self): - super().__init__() - self.tokenizer = 'cn-char' + super().__init__(tokenizer='cn-char') def process_from_file(self, paths=None): data_bundle = CNXNLILoader().load(paths) @@ -379,8 +377,7 @@ class CNXNLIPipe(MatchingPipe): class BQCorpusPipe(MatchingPipe): def __init__(self): - super().__init__() - self.tokenizer = 'cn-char' + super().__init__(tokenizer='cn-char') def process_from_file(self, paths=None): data_bundle = BQCorpusLoader().load(paths) @@ -475,8 +472,7 @@ class MachingTruncatePipe(Pipe): # truncate sentence for bert, modify seq_len class LCQMCBertPipe(MatchingBertPipe): def __init__(self): - super().__init__() - self.tokenizer = 'cn-char' + super().__init__(tokenizer='cn-char') def process_from_file(self, paths=None): data_bundle = LCQMCLoader().load(paths) @@ -489,8 +485,7 @@ class LCQMCBertPipe(MatchingBertPipe): class BQCorpusBertPipe(MatchingBertPipe): def __init__(self): - super().__init__() - self.tokenizer = 'cn-char' + super().__init__(tokenizer='cn-char') def process_from_file(self, paths=None): data_bundle = BQCorpusLoader().load(paths) @@ -503,8 +498,7 @@ class BQCorpusBertPipe(MatchingBertPipe): class CNXNLIBertPipe(MatchingBertPipe): def __init__(self): - super().__init__() - self.tokenizer = 'cn-char' + super().__init__(tokenizer='cn-char') def process_from_file(self, paths=None): data_bundle = CNXNLILoader().load(paths)