in augly/text/augmenters/upside_down.py [0:0]
def __init__(self, granularity: str, aug_min: int, aug_max: int, aug_p: float):
assert granularity in [
"char",
"word",
"all",
], "Granularity must be either char, word, or all"
assert (
0 <= aug_min <= aug_max
), "aug_min must be non-negative and aug_max must be greater than or equal to aug_min"
assert 0 <= aug_p <= 1, "aug_p must be a value in the range [0, 1]"
self.granularity = granularity
super().__init__(
name="UpsideDownAugmenter",
action=Action.INSERT,
method=Method.WORD,
aug_min=aug_min,
aug_max=aug_max,
aug_p=aug_p,
)