Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save vikeshsingh37/10290996fd87daca15863774499735e4 to your computer and use it in GitHub Desktop.
Save vikeshsingh37/10290996fd87daca15863774499735e4 to your computer and use it in GitHub Desktop.
from snorkel.augmentation import ApplyOnePolicy, PandasTFApplier
tf_policy = ApplyOnePolicy(n_per_original=2, keep_original=True)
tf_applier = PandasTFApplier([tf_replace_word_with_synonym], tf_policy)
df_train_augmented = tf_applier.apply(df_train)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment