Holds loaded intent and entity training data.
Fingerprint the training data.
hex string as a fingerprint of the training data.
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.
Returns the set of intents 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.
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.