JohnSnowLabs / langtest

Deliver safe & effective language models
http://langtest.org/
Apache License 2.0
490 stars 37 forks source link

Chore: Add Option to Configure Number of Generated Templates in Templatic Augmentation #1089

Closed chakravarthik27 closed 4 weeks ago

chakravarthik27 commented 4 weeks ago

Description:

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

)