autointent.generation.utterances.HumanUtteranceGenerator#
- class autointent.generation.utterances.HumanUtteranceGenerator(generator, critic, async_mode=False, max_at_once=5, max_per_second=10)#
Generator of human-like utterances.
This class rewrites given user utterances to make them sound more natural and human-like, while preserving their original intent. The generation process is iterative and attempts to bypass a critic that identifies machine-generated text.
Warning
This method is experimental and can yield inferior data quality.
- Parameters:
generator (autointent.generation.Generator)
critic (autointent.generation.utterances._adversarial.critic_human_like.CriticHumanLike)
async_mode (bool)
max_at_once (int)
max_per_second (int)
- generator#
- critic#
- async_mode = False#
- max_at_once = 5#
- max_per_second = 10#
- augment(dataset, split_name=Split.TRAIN, update_split=True, n_final_per_class=5)#
Generate human-like utterances for each intent by iteratively refining machine-generated candidates.
- Parameters:
dataset (autointent.Dataset) – The dataset to augment.
split_name (str) – The name of the split to augment (e.g., ‘train’).
update_split (bool) – Whether to update the dataset split with the new utterances.
n_final_per_class (int) – Number of successful utterances to generate per intent.
- Returns:
List of newly generated samples.
- Return type:
- async augment_async(dataset, split_name=Split.TRAIN, update_split=True, n_final_per_class=5)#
- Parameters:
dataset (autointent.Dataset)
split_name (str)
update_split (bool)
n_final_per_class (int)
- Return type: