@@ -37,7 +37,7 @@ class EasyDataAugmenter(Augmenter):
3737 https://arxiv.org/abs/1901.11196
3838 """
3939
40- def __init__ (self , pct_words_to_swap = 0.1 , transformations_per_example = 4 ):
40+ def __init__ (self , pct_words_to_swap = 0.1 , transformations_per_example = 4 , ** kwargs ):
4141 assert 0.0 <= pct_words_to_swap <= 1.0 , "pct_words_to_swap must be in [0., 1.]"
4242 assert (
4343 transformations_per_example > 0
@@ -49,17 +49,22 @@ def __init__(self, pct_words_to_swap=0.1, transformations_per_example=4):
4949 self .synonym_replacement = WordNetAugmenter (
5050 pct_words_to_swap = pct_words_to_swap ,
5151 transformations_per_example = n_aug_each ,
52+ ** kwargs ,
5253 )
5354 self .random_deletion = DeletionAugmenter (
5455 pct_words_to_swap = pct_words_to_swap ,
5556 transformations_per_example = n_aug_each ,
57+ ** kwargs ,
5658 )
5759 self .random_swap = SwapAugmenter (
5860 pct_words_to_swap = pct_words_to_swap ,
5961 transformations_per_example = n_aug_each ,
62+ ** kwargs ,
6063 )
6164 self .random_insertion = SynonymInsertionAugmenter (
62- pct_words_to_swap = pct_words_to_swap , transformations_per_example = n_aug_each
65+ pct_words_to_swap = pct_words_to_swap ,
66+ transformations_per_example = n_aug_each ,
67+ ** kwargs ,
6368 )
6469
6570 def augment (self , text ):
0 commit comments