rasa.shared.data
yaml_file_extension
Return YAML file extension.
is_likely_yaml_file
Check if a file likely contains yaml.
Arguments:
file_path- path to the file
Returns:
True if the file likely contains data in yaml format, False otherwise.
is_likely_json_file
Check if a file likely contains json.
Arguments:
file_path- path to the file
Returns:
True if the file likely contains data in json format, False otherwise.
get_core_directory
Recursively collects all Core training files from a list of paths.
Arguments:
paths- List of paths to training files or folders containing them.
Returns:
Path to temporary directory containing all found Core training files.
get_nlu_directory
Recursively collects all NLU training files from a list of paths.
Arguments:
paths- List of paths to training files or folders containing them.
Returns:
Path to temporary directory containing all found NLU training files.
get_data_files
Recursively collects all training files from a list of paths.
Arguments:
paths- List of paths to training files or folders containing them.filter_predicate- property to use when filtering the paths, e.g.is_nlu_file.
Returns:
Paths of training data files.
is_valid_filetype
Checks if given file has a supported extension.
Arguments:
path- Path to the source file.
Returns:
True is given file has supported extension, False otherwise.
is_nlu_file
Checks if a file is a Rasa compatible nlu file.
Arguments:
file_path- Path of the file which should be checked.
Returns:
True if it's a nlu file, otherwise False.
is_config_file
Checks whether the given file path is a Rasa config file.
Arguments:
file_path- Path of the file which should be checked.
Returns:
True if it's a Rasa config file, otherwise False.
TrainingType Objects
Enum class for defining explicitly what training types exist.
model_type
Returns the type of model which this training yields.
