pyaiml21.utils.load_files.load_aiml_map¶
- pyaiml21.utils.load_files.load_aiml_map(filename: str) Mapping[str, str][source][source]¶
Guess the format and parse AIML map from the given file.
See aiml_map_fromstring for examples.
- Supported formats include:
ALICE format: key:value per each line,
Pandorabots format [json]: list of lists with 2 strings each
- Parameters
filename – file with AIML map
- Returns
parsed map
- Raises
ValueError if filename does not represent an AIML map