notice
This is documentation for Rasa Documentation v2.x, which is no longer actively maintained.
For up-to-date documentation, see the latest version (3.x).
rasa.shared.core.generator
TrackerWithCachedStates Objects
A tracker wrapper that caches the state creation of the tracker.
past_states_for_hashing
Generates and caches the past states of this tracker based on the history.
Arguments:
domain
- a :class:rasa.shared.core.domain.Domain
omit_unset_slots
- IfTrue
do not include the initial values of slots.
Returns:
A list of states
past_states
Generates the past states of this tracker based on the history.
Arguments:
domain
- The Domain.omit_unset_slots
- IfTrue
do not include the initial values of slots.ignore_rule_only_turns
- If True ignore dialogue turns that are present only in rules.rule_only_data
- Slots and loops, which only occur in rules but not in stories.
Returns:
a list of states
clear_states
Reset the states.
init_copy
Create a new state tracker with the same initial values.
copy
Creates a duplicate of this tracker.
A new tracker will be created and all events will be replayed.
update
Modify the state of the tracker according to an Event
.
TrainingDataGenerator Objects
__init__
Given a set of story parts, generates all stories that are possible.
The different story parts can end and start with checkpoints and this generator will match start and end checkpoints to connect complete stories. Afterwards, duplicate stories will be removed and the data is augmented (if augmentation is enabled).
generate
Generate trackers from stories and rules.
Returns:
The generated trackers.
generate_story_trackers
Generate trackers from stories (exclude rule trackers).
Returns:
The generated story trackers.