Skip to content

Commit

Permalink
fix: pre-commit issue
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinHsu1019 committed Nov 14, 2024
1 parent b57b11a commit d714f29
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Preprocess/data_process/read_pdf_noocr.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


def read_pdf(pdf_loc):
""" 讀取單個PDF文件並返回其文本內容 """
"""讀取單個PDF文件並返回其文本內容"""
pdf = pdfplumber.open(pdf_loc)
pdf_text = ''
for page in pdf.pages:
Expand All @@ -18,7 +18,7 @@ def read_pdf(pdf_loc):


def load_data_by_category(source_path, category):
""" 從指定資料夾載入PDF文件,並根據資料夾名稱設定category """
"""從指定資料夾載入PDF文件,並根據資料夾名稱設定category"""
pdf_files = [f for f in os.listdir(source_path) if f.endswith('.pdf')]
data = []
for file in tqdm(pdf_files):
Expand All @@ -29,7 +29,7 @@ def load_data_by_category(source_path, category):


def generate_json(output_path):
""" Gen JSON 主程式 """
"""Gen JSON 主程式"""
all_data = []

# 載入不同類別的PDF資料
Expand Down

0 comments on commit d714f29

Please sign in to comment.