hiroshi-matsuda-rit commited on
Commit
7e0cd70
1 Parent(s): c264b78

Update filtered_mc4.py

Browse files
Files changed (1) hide show
  1. filtered_mc4.py +1 -1
filtered_mc4.py CHANGED
@@ -285,7 +285,7 @@ class FilteredMc4Config(datasets.BuilderConfig):
285
  self.max_reject_pattern_occurence = max_reject_pattern_occurence
286
 
287
  def filter(self, example: dict) -> bool:
288
- reject_patterns = [re.compile(_) for _ in reject_patterns]
289
  for reject_pattern in reject_patterns:
290
  for count, _ in enumerate(reject_pattern.finditer(example[self.filter_target_field])):
291
  if count == self.max_reject_pattern_occurence:
 
285
  self.max_reject_pattern_occurence = max_reject_pattern_occurence
286
 
287
  def filter(self, example: dict) -> bool:
288
+ reject_patterns = [re.compile(_) for _ in self.reject_patterns]
289
  for reject_pattern in reject_patterns:
290
  for count, _ in enumerate(reject_pattern.finditer(example[self.filter_target_field])):
291
  if count == self.max_reject_pattern_occurence: