Skip to content

Instantly share code, notes, and snippets.

View huangruizhe's full-sized avatar

huangruizhe

View GitHub Profile
@huangruizhe
huangruizhe / english.py
Created June 12, 2024 08:43
A simple rule based english text perturbator that preserves the pronunciation similarity
class TextPerturbator:
def __init__(self):
rules = """
a aa
aa ar
a e
a o
a ei
a ay
a ey