Guillaume Raille commited on
Commit
7d99d45
·
unverified ·
1 Parent(s): 2d5acfc

change dataset path

Browse files
data/{tiny-moliere.txt → tinymoliere.txt} RENAMED
File without changes
main.py CHANGED
@@ -75,9 +75,9 @@ def main():
75
  else:
76
  print(f"{filename} already exists, skipping download.")
77
 
78
- # overwrite tiny-moliere.txt if it exists
79
- if (DATA_DIR / "tiny-moliere.txt").exists():
80
- (DATA_DIR / "tiny-moliere.txt").unlink()
81
 
82
  # process each PDF and write into a .txt file
83
  for path in paths:
@@ -96,7 +96,7 @@ def main():
96
  # we ignore the last page
97
  for page in doc[toc_end:-1]:
98
  page_text = page.get_text(clip=new_rect)
99
- with open(DATA_DIR / "tiny-moliere.txt", "a") as f:
100
  f.write(page_text)
101
 
102
 
 
75
  else:
76
  print(f"{filename} already exists, skipping download.")
77
 
78
+ # overwrite tinymoliere.txt if it exists
79
+ if (DATA_DIR / "tinymoliere.txt").exists():
80
+ (DATA_DIR / "tinymoliere.txt").unlink()
81
 
82
  # process each PDF and write into a .txt file
83
  for path in paths:
 
96
  # we ignore the last page
97
  for page in doc[toc_end:-1]:
98
  page_text = page.get_text(clip=new_rect)
99
+ with open(DATA_DIR / "tinymoliere.txt", "a") as f:
100
  f.write(page_text)
101
 
102