thomasw21 commited on
Commit
8bf249a
·
1 Parent(s): a43f5e6

Debug the filtering of yfcc100m

Browse files
Files changed (1) hide show
  1. pmd.py +4 -1
pmd.py CHANGED
@@ -632,14 +632,17 @@ class YFCC100MLoader(BaseLoaderWithDLManager):
632
  # # TODO @thomasw21 we probably don't need to split all the way til the end ...
633
  # if len([substring for substring in self.WHITE_SPACE_REGEX.split(text) if substring != ""]) < 2:
634
  # return False
635
-
636
  if self.WEIRD_CHARACTERS_REGEX.search(text) is not None:
 
637
  return False
638
 
639
  if self.SECOND_WORD_REGEX.search(text) is None:
 
640
  return False
641
 
642
  if self.DATE_HOUR_REGEX.search(text) is not None:
 
643
  return False
644
 
645
  # filter only english
 
632
  # # TODO @thomasw21 we probably don't need to split all the way til the end ...
633
  # if len([substring for substring in self.WHITE_SPACE_REGEX.split(text) if substring != ""]) < 2:
634
  # return False
635
+ print(text)
636
  if self.WEIRD_CHARACTERS_REGEX.search(text) is not None:
637
+ print("there's a weird character")
638
  return False
639
 
640
  if self.SECOND_WORD_REGEX.search(text) is None:
641
+ print("there's no second word")
642
  return False
643
 
644
  if self.DATE_HOUR_REGEX.search(text) is not None:
645
+ print("there are dates")
646
  return False
647
 
648
  # filter only english