This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PyPDF2 import PdfFileReader | |
class Extractor: | |
def __init__(self, file_name: str) -> None: | |
self.pdf_reader = PdfFileReader(file_name) | |
self.sections = self._extract_sections(self.pdf_reader.outlines) | |
self.pages_range = self._find_pages_range() | |
self.raw_text = self._extract_raw_text() # useful for creating / testing new functionality |