GENERATIVE-AI-ENGINEER-ASSOCIATE · Question #82
A Generative AI Engineer is building a RAG application that will rely on context retrieved from source documents that have been scanned and saved as image files in formats like .jpeg or .png. They…
The correct answer is C. pytesseract. pytesseract is the correct choice because it is a Python wrapper for Google's Tesseract OCR (Optical Character Recognition) engine, designed specifically to extract text from image files such as .jpeg and .png. It requires very few lines of code for basic usage. beautifulsoup…
Question
A Generative AI Engineer is building a RAG application that will rely on context retrieved from source documents that have been scanned and saved as image files in formats like .jpeg or .png. They want to develop a solution using the least amount of lines of code. Which Python package should be used to extract the text from the source documents?
Options
- Abeautifulsoup
- Bscrapy
- Cpytesseract
- Dpyquery
How the community answered
(45 responses)- A2% (1)
- B4% (2)
- C93% (42)
Explanation
pytesseract is the correct choice because it is a Python wrapper for Google's Tesseract OCR (Optical Character Recognition) engine, designed specifically to extract text from image files such as .jpeg and .png. It requires very few lines of code for basic usage. beautifulsoup (A) and pyquery (D) parse HTML/XML from web pages. scrapy (B) is a full web scraping framework. None of A, B, or D have OCR capabilities for image files.
Topics
Community Discussion
No community discussion yet for this question.