from langtest.augmentation import TemplaticAugment
from langtest.tasks import TaskManager
templates = ["{Medicine} is used to cure {MedicalCondition}"]
data_kwargs = {
"data_source": "conll03.conll",
}
TemplaticAugment(
templates=templates,
task=TaskManager("ner"),
generate_templates=True,
show_templates=True,
num_extra_templates=10
).fix(
training_data=data_kwargs,
output_path="save_data_path.conll",
max_num=10, # maximum number of augmented data on each template
append_original=False, # Create a new file with the augmented data
Description:
1088
templates = ["{Medicine} is used to cure {MedicalCondition}"] data_kwargs = { "data_source": "conll03.conll", } TemplaticAugment( templates=templates, task=TaskManager("ner"), generate_templates=True, show_templates=True, num_extra_templates=10 ).fix( training_data=data_kwargs, output_path="save_data_path.conll", max_num=10, # maximum number of augmented data on each template append_original=False, # Create a new file with the augmented data
)