ulf1 / augtxt

yet another text augmentation python package
Apache License 2.0
2 stars 0 forks source link

Apply augmentation probability centrally #3

Closed ulf1 closed 3 years ago

ulf1 commented 3 years ago
augm_proba: Optional[float] = 1.0
"""
augm_proba : float (Default 1.0, i.e. always)
        The probability that an augmentation is applied here
"""

# run augmentation in p% of attempts
if augm_proba > scipy.stats.uniform.rvs():  # same s np.random.random()

Modi:

ulf1 commented 3 years ago

see wordaug function