Spaces:
Sleeping
Sleeping
updated preprocess curriculum before running both preprocessing scripts.
Browse files- preprocess_curriculum.py +4 -4
preprocess_curriculum.py
CHANGED
|
@@ -8,7 +8,7 @@ from PIL import Image
|
|
| 8 |
import nltk
|
| 9 |
import json
|
| 10 |
|
| 11 |
-
nltk.download('
|
| 12 |
|
| 13 |
def extract_text_from_pdf(pdf_path, page_ranges):
|
| 14 |
text = ''
|
|
@@ -91,9 +91,9 @@ if __name__ == '__main__':
|
|
| 91 |
# Define the page ranges you want to process
|
| 92 |
# For example: [(10, 20), (30, 40), (50, 60)]
|
| 93 |
page_ranges = [
|
| 94 |
-
(
|
| 95 |
-
(
|
| 96 |
-
(
|
| 97 |
]
|
| 98 |
|
| 99 |
# Extract text from PDF
|
|
|
|
| 8 |
import nltk
|
| 9 |
import json
|
| 10 |
|
| 11 |
+
nltk.download('punkt_tab')
|
| 12 |
|
| 13 |
def extract_text_from_pdf(pdf_path, page_ranges):
|
| 14 |
text = ''
|
|
|
|
| 91 |
# Define the page ranges you want to process
|
| 92 |
# For example: [(10, 20), (30, 40), (50, 60)]
|
| 93 |
page_ranges = [
|
| 94 |
+
(3, 59),
|
| 95 |
+
(103, 148),
|
| 96 |
+
(167, 194)
|
| 97 |
]
|
| 98 |
|
| 99 |
# Extract text from PDF
|