RapidOCRBlobParser#

class langchain_community.document_loaders.parsers.images.RapidOCRBlobParser[source]#

Parser for extracting text from images using the RapidOCR library.

ocr#

The RapidOCR instance for performing OCR.

Initializes the RapidOCRBlobParser.

Methods

__init__()

Initializes the RapidOCRBlobParser.

lazy_parse(blob)

Lazily parse a blob and yields Documents containing the parsed content.

parse(blob)

Eagerly parse the blob into a document or documents.

__init__() None[source]#

Initializes the RapidOCRBlobParser.

Return type:

None

lazy_parse(blob: Blob) Iterator[Document]#

Lazily parse a blob and yields Documents containing the parsed content.

Parameters:

blob (Blob) – The blob to be parsed.

Yields:

Document – A document containing the parsed content and metadata.

Return type:

Iterator[Document]

parse(blob: Blob) list[Document]#

Eagerly parse the blob into a document or documents.

This is a convenience method for interactive development environment.

Production applications should favor the lazy_parse method instead.

Subclasses should generally not over-ride this parse method.

Parameters:

blob (Blob) – Blob instance

Returns:

List of documents

Return type:

list[Document]