TextParser#

class langchain_community.document_loaders.parsers.txt.TextParser[source]#

Parser for text blobs.

Methods

lazy_parse(blob)

Lazily parse the blob.

parse(blob)

Eagerly parse the blob into a document or documents.

lazy_parse(blob: Blob) Iterator[Document][source]#

Lazily parse the blob.

Parameters:

blob (Blob)

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]