langchain.document_loaders.helpers.FileEncoding¶

class langchain.document_loaders.helpers.FileEncoding(encoding: Optional[str], confidence: float, language: Optional[str])[source]¶

Bases: NamedTuple

A file encoding as the NamedTuple.

Create new instance of FileEncoding(encoding, confidence, language)

Methods

__init__()

count(value, /)

Return number of occurrences of value.

index(value[, start, stop])

Return first index of value.

Attributes

confidence

The confidence of the encoding.

encoding

The encoding of the file.

language

The language of the file.

count(value, /)¶

Return number of occurrences of value.

index(value, start=0, stop=9223372036854775807, /)¶

Return first index of value.

Raises ValueError if the value is not present.

confidence: float¶

The confidence of the encoding.

encoding: Optional[str]¶

The encoding of the file.

language: Optional[str]¶

The language of the file.