nlu.data_loader¶
This file contains the main functions for loading database and tag_words files for NLU.
Module Contents¶
Classes¶
Attributes¶
- nlu.data_loader.DEFAULT_SLOT_VALUE_PATH = 'data/slot_values.json'¶
- nlu.data_loader.logger¶
- class nlu.data_loader.DataLoader(config: Dict[str, Any], lemmatize_value: Callable[[str, bool], str])¶
- load_tag_words(file_path: str) Dict[str, Any]¶
Loads the tag words for the path provided. This can be for the slots in the database or the patterns.
- Parameters:
file_path – The path to the input json file.
- Returns:
The output dictionary extracted from the file.
- load_slot_value_pairs() Dict[str, Any]¶
Loads slot-value pairs from a file.
If the file does not exist, it generates slot-value pairs from database.
- Returns:
Dictionary of slot-value(s) pairs.