pardata.loaders.text.PlainTextLoader.load

PlainTextLoader.load(path, options)

The type hint says Dict, because this loader will be handling those situations in the future.

Parameters
  • path (Union[str, os.PathLike, Dict[str, str]]) – The path to the plain text file.

  • options (Dict[str, Any]) –

    • encoding key specifies the encoding of the plain text.

Raises

TypeErrorpath is not a path object.

Returns

Data loaded into a str.

Return type

str