espnet3.utils.config.load_line
Less than 1 minute
espnet3.utils.config.load_line
espnet3.utils.config.load_line(path)
Load lines from a text file and return as a list of strings.
This function is used as a custom resolver in OmegaConf, allowing YAML files to reference external text line files dynamically via ${load_line:some/file.txt}.
This resolver is intended to load vocab file in configuration.
- Parameters:path (str or Path) β Path to the file.
- Returns: A list of stripped lines from the file.
- Return type: List[str]
