Skip to content

About

No description, website, or topics provided.

Resources

Stars

23 stars

Watchers

3 watching

Forks

Repository files navigation

ai4privacy

An implementation to mask PII in Natural Language Text.

Installation:

pip install -U https://github.com/Sripaad/ai4privacy.git

Quick Start

from ai4p.AI4P import Anonymizer
import torch

def set_seed(seed):
    torch.manual_seed(seed)
    if torch.cuda.is_available():
        torch.cuda.manual_seed_all(seed)

set_seed(864)

anonymizer = Anonymizer(use_gpu=False)

input_sentence = "My name is Clara and I live in Berkeley, California."
pii_masked_sentence = anonymizer.pii_mask(input_sentence)

print("-" *100)
print("[INPUT]: ", input_sentence)
print("[PII_MASKED]: ", pii_masked_sentence)
print("-" *100)
------------------------------------------------------------------------------------------------------------------------
[INPUT]: "My name is Clara and I live in Berkeley, California."
[PII_MASKED]: "My name is [FIRSTNAME] and I live in [CITY], [STATE]."
------------------------------------------------------------------------------------------------------------------------

HF Models

Version 1:

Version 2:

Dataset

Version 1:

Version 2:

References

About

No description, website, or topics provided.

Resources

Stars

23 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages