Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PII Modifier should support documents greater than pre-configured length #417

Open
praateekmahajan opened this issue Dec 10, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@praateekmahajan
Copy link
Collaborator

Is your feature request related to a problem? Please describe.

Under the hood Pii Modifier uses Presidio (which uses spacy I believe).
Currently if the documents are very long (I believe 2,000,000 chars in length) then presidio errors out. See microsoft/presidio#957 (comment)

To solve this we might need to modify the nlp object that Presidio is using or create a new class that allows the modification of character limit.

For now to avoid this I've done

    dataset = DocumentDataset(
        dataset.df[dataset.df['text'].map(
            lambda x : len(x) < 2_000_000, meta={"text" : int}
        )]
    )

Describe the solution you'd like
support a max_char_length as an arg e.g. PiiModifier(max_char_length=3_000_000)

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant