Skip to content

Commit

Permalink
Reduce chance to insert-augment and renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
geru-scotland committed Nov 9, 2024
1 parent 2f96888 commit 2480d74
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dataset/preprocessing/data_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ def __init__(self, outer_instance):
transformations_per_example=random.randint(1, 3)
)

self.augmenter_insert = Augmenter(
self.insert_augmenter = Augmenter(
transformation=WordSwapRandomCharacterInsertion(),
pct_words_to_swap=0.5,
pct_words_to_swap=0.4,
transformations_per_example=random.randint(1, 3)
)

Expand Down Expand Up @@ -125,7 +125,7 @@ def augment(self):

# Esto es de textattack, creo que será buena idea... veamos.
swapped_names = self.swap_augmenter.augment(name)
insertions_names = self.augmenter_insert.augment(name)
insertions_names = self.insert_augmenter.augment(name)

for aug_name in swapped_names + insertions_names:
augmented_data.append(f"{label} {aug_name}")
Expand Down

0 comments on commit 2480d74

Please sign in to comment.