Skip to main content

A library for scanning Personally Identifiable Information (PII).

Project description

PII Scanner

A library for scanning Personally Identifiable Information (PII) from text.

Installation

pip install pii_scanner

Usage

from pii_scanner.main import PIIScanner

# Create an instance of the scanner
pii_scanner = PIIScanner()

# Sample data containing PII
data = [
    "Ankit Gupta",
    "Lucknow",
    "+9191840562195",
    "Indian",
    "Sofia Rossi",
    "Rome",
    "+390612345678",
    "Italian"
]

# Scan the structured data
results = pii_scanner.scan_structured_data(data, chunk_size=10, sample_size=1.0)

# Print the results
print(results)

Output

[
    {
        "text": "Ankit Gupta",
        "entity_detected": [
            {"type": "PERSON", "start": 0, "end": 11, "score": 0.85}
        ]
    },
    {
        "text": "Rome",
        "entity_detected": [
            {"type": "LOCATION", "start": 0, "end": 4, "score": 0.85}
        ]
    },
    {
        "text": "+919140562195",
        "entity_detected": [
            {"type": "PHONE_NUMBER", "start": 0, "end": 13, "score": 0.85}
        ]
    },
    {
        "text": "Sofia Rossi",
        "entity_detected": [
            {"type": "PERSON", "start": 0, "end": 11, "score": 0.85}
        ]
    },
    {
        "text": "Indian",
        "entity_detected": [
            {"type": "NATIONALITY", "start": 0, "end": 6, "score": 0.9}
        ]
    }
]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pii_scanner-0.1.3.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

pii_scanner-0.1.3-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file pii_scanner-0.1.3.tar.gz.

File metadata

  • Download URL: pii_scanner-0.1.3.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.10

File hashes

Hashes for pii_scanner-0.1.3.tar.gz
Algorithm Hash digest
SHA256 36bf9208ea40d428a58e592527f57b0e01d7536f2853154387a7c397b1b76cab
MD5 b853c9736a5f2a32744f735160d709b2
BLAKE2b-256 d52d672e0e75d183525ef0a889e6e6524080c18589a70f46917dcc91bab45375

See more details on using hashes here.

File details

Details for the file pii_scanner-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: pii_scanner-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.10

File hashes

Hashes for pii_scanner-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0393533a04f8bf96de37183dca0e8a8270c5503d0f72bd52c4708cf7c414834e
MD5 0c63bf722fb339b1f54aa1a470a5765f
BLAKE2b-256 db800a8973b1c0fcd61016f39cd9f94fa6b7e068c59130ffc0d6ecbc53237c66

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page