langtest.augmentation.augmenter.DataAugmenter#
- class DataAugmenter(task: str | TaskManager, config: str | dict)#
Bases:
object
- __init__(task: str | TaskManager, config: str | dict) None #
Initialize the DataAugmenter.
- Parameters:
config (Union[str, dict]) – Configuration file or dictionary.
task (Union[str, TaskManager]) – Task Manager.
columns_info ([type], optional) – Columns information. Defaults to None.
Methods
__init__
(task, config)Initialize the DataAugmenter.
augment
(data)Augment the content.
extend
(data)Extend the content.
inplace
(data)Inplace augmentation.
load_config
(config)Load the configuration file.
new_data
(data)Create new data.
prepare_hash_map
(data)save
(file_path)Save the augmented data.
size
(category, test_name)- augment(data: str | Iterable) str #
Augment the content.
- extend(data: Iterable) DataAugmenter #
Extend the content.
- inplace(data: Iterable) DataAugmenter #
Inplace augmentation.
- load_config(config: str) dict #
Load the configuration file.
- new_data(data: Iterable) DataAugmenter #
Create new data.
- save(file_path: str)#
Save the augmented data.