Skip to content

google_olc

google_olc

Classes:

Name Description
GoogleOLC

OLC

GoogleOLC()

Bases: RegexPredictor

OLC

Source code in src/nemo_safe_synthesizer/pii_replacer/ner/regexes/google_olc.py
def __init__(self):
    entity = Entity.GOOGLE_OLC

    match = Pattern(
        pattern=r"^[{digit}]{{4,8}}\+[{digit}]{{2,4}}$".format(digit=CODE_DIGIT),
        context_score=Score.HIGH,
        raw_score=Score.HIGH,
    )

    super().__init__(entity=entity, patterns=[match])