Holds loaded intent and entity training data.
Fingerprint the training data.
hex string as a fingerprint of the training data.
Fingerprints the labels in the training data.
hex string as a fingerprint of the training data labels.
Return merged instance of this data with other training data.
others- other training data instances to merge this one with
Merged training data object. Merging is not done in place, this will be a new instance.
Filter training examples.
condition- A function that will be applied to filter training examples.
TrainingData- A TrainingData with filtered training examples.
Calculate hash for the training data object.
Hash of the training data object.
Makes sure the training data is clean.
Remove trailing whitespaces from intent and response annotations and drop duplicate examples.
Return examples which have come from NLU training data.
E.g. If the example came from a story or domain it is not included.
List of NLU training examples.
Returns the list of examples that have intent.
Returns the list of examples that have response.
Returns the list of examples that have entities.
Returns the set of intents in the training data.
Returns the set of action names in the training data.
Returns the total number of response types in the training data.
Calculates the number of examples per intent.
Calculates the number of examples per response.
Returns the set of entity types in the training data.
Returns the set of entity roles in the training data.
Returns the set of entity groups in the training data.
Checks if any entity roles or groups are used in the training data.
Calculates the number of examples per entity.
Sorts regex features lexicographically by name+pattern
Represent this set of training examples as json.
Generates the markdown representation of the response phrases (NLG) of TrainingData.
Generates yaml representation of the response phrases (NLG) of TrainingData.
responses in yaml format as a string
Generates the markdown representation of the NLU part of TrainingData.
Persists this training data to disk and returns necessary information to load it again.
Extract all entities from examples and sorts them by entity type.
Sorts the intent examples by the name of the intent and then response.
Ensures that the loaded training data is valid.
Checks that the data has a minimum of certain training examples.
Split into a training and test dataset, preserving the fraction of examples per intent.
Split the training data into a train and test set.
train_frac- percentage of examples to add to the training set.
random_seed- random seed used to shuffle examples.
Test and training examples.
Checks if any training data was loaded.
Checks if any NLU training data was loaded.
Checks if there are any training examples from e2e stories.
Converts list to a string.
lst- The list to convert.
delim- The delimiter that is used to separate list inputs.
quote- The quote that is used to wrap list inputs.