brain_pipe.parser.file.FileLoadMixin¶
- class FileLoadMixin¶
Bases:
object
Mixin class for a TextParser to load a file before parsing.
Attributes
READ_MODE
- __init__()¶
Methods
__init__
()get_additional_kwargs
(input_, info)Find the additional arguments that should be passed to the parser.
load_file
(path)Load a file into a text that can be parsed.
- get_additional_kwargs(input_: Any, info: Dict[str, Any]) Dict[str, Any] ¶
Find the additional arguments that should be passed to the parser.
This function identifies additional arguments that should be passed to the parser by e.g. a CLI.
- Parameters:
- Returns:
A dictionary containing the names of the arguments as keys and the options (kwargs) for a (CLI) argument parser as values.
- Return type:
Dict[str, Any]