This research compares PDF parsing and Optical Character Recognition (OCR) methods for extracting Nepali content from PDFs. PDF parsing offers fast and accurate extraction but faces challenges with non-Unicode Nepali fonts. OCR, specifically PyTesseract, overcomes these challenges, providing versatility for both digital and scanned PDFs. The study reveals that while PDF parsers are faster, their accuracy fluctuates based on PDF types. In contrast, OCRs, with a focus on PyTesseract, demonstrate consistent accuracy at the expense of slightly longer extraction times. Considering the project's emphasis on Nepali PDFs, PyTesseract emerges as the most suitable library, balancing extraction speed and accuracy.
翻译:本研究比较了PDF解析与光学字符识别(OCR)方法在从PDF中提取尼泊尔语内容方面的表现。PDF解析提供了快速且准确的提取,但在处理非Unicode尼泊尔语字体时面临挑战。OCR技术,特别是PyTesseract,克服了这些挑战,为数字PDF和扫描PDF均提供了通用性。研究表明,虽然PDF解析器速度更快,但其准确性随PDF类型的不同而波动。相比之下,以PyTesseract为代表的OCR方法,以稍长的提取时间为代价,展现出稳定一致的准确性。考虑到本项目对尼泊尔语PDF的侧重,PyTesseract成为最合适的库,在提取速度与准确性之间取得了平衡。