programasweights/pii has 34 GitHub stars and 2 forks. GitHot measured 0 stars in 24 hours and 0 in 7 days. Last checked 2026-11-12 10:49 UTC. Last push 2026-10-24.
Detect and type PII locally with one ProgramAsWeights neural program.
Crecimiento de estrellas medido
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- Recopilando historial
- in 1 month
- Recopilando historial
Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.
README.md
OriginalPII detection with ProgramAsWeights
Detect and type personally identifiable information locally with one compiled ProgramAsWeights neural program.
Python
pip install programasweights --extra-index-url https://pypi.programasweights.com/simple/
import json
import programasweights as paw
detect_pii = paw.function("73a0e38b8bbe3427cd1d")
text = "Name: Ada Lovelace\nEmail: [email protected]\nPIN: 4821"
print(json.loads(detect_pii(text)))
[['Ada Lovelace', 'private_person'], ['[email protected]', 'private_email'], ['4821', 'secret']]
The program downloads once and then runs locally. See example.py for the complete runnable example.
Output
The function returns a JSON array of [text, type] pairs. Each text is copied exactly from the input, and each type is one of:
private_person private_email private_phone private_address private_url
private_date account_number secret other_pii
Compile it yourself
The public program was compiled from the English specification in spec.txt. compile.py contains the complete compilation script:
from pathlib import Path
import programasweights as paw
program = paw.compile(
Path("spec.txt").read_text().strip(),
compiler="paw-ft-bs48",
public=True,
)
print(program.id)
The published compilation used by this repository is:
73a0e38b8bbe3427cd1d
Compiling requires a PAW account and API key. Loading the published program by ID does not require recompiling it.
Results
On an untouched multilingual set of 512 AI4Privacy documents, the published program reached:
- 0.8464 typed-character F1
- 0.9085 label-agnostic extraction F1
- 93.9% type accuracy on characters where the prediction and annotation overlap
We compared compact JSON, reversed JSON, JSON objects, and TSV outputs on a separate 497-document search set, froze the finalists, and selected the published program on another 522 documents before opening the sealed set. All source groups are disjoint. The original compact [text, type] JSON interface won; simplifying its specification did not generalize.
See RESULTS.md for every specification, compiled program, failed run, and benchmark result.
Reproduce the benchmark
The benchmark implementation is under scripts/, the parser and metrics are under src/paw_pii/, and tests are under tests/. Downloaded datasets, model checkpoints, and generated prediction files are intentionally excluded from Git.
PYTHONPATH=src python -m pytest -q
Citation
If you use this PII program in research, cite Program-as-Weights for the programming paradigm and Compile by Training for the training compiler used to build it.
Program-as-Weights: A Programming Paradigm for Fuzzy Functions
NeurIPS 2026 · Preprint
@inproceedings{zhang2026programasweights,
title = {{Program-as-Weights: A Programming Paradigm for Fuzzy Functions}},
author = {Zhang, Wentao and Hotsko, Liliana and Kim, Woojeong and Nie, Pengyu and Shieber, Stuart and Deng, Yuntian},
booktitle = {The Fortieth Annual Conference on Neural Information Processing Systems},
year = {2026},
url = {https://arxiv.org/abs/2607.02512}
}
Compile by Training: Turning Natural-Language Specifications into Local Neural Functions
@inproceedings{paw_2609_04199,
title = {{Compile by Training: Turning Natural-Language Specifications into Local Neural Functions}},
author = {Deng, Yuntian and Nie, Pengyu and Shieber, Stuart},
booktitle = {EMNLP 2026 System Demonstrations},
year = {2026},
url = {https://arxiv.org/abs/2609.04199}
}
Explorar proyectos relacionados
trimstray/the-book-of-secret-knowledge
Una colección de listas inspiradoras, manuales, chuletas, blogs, trucos, comandos de una línea, herramientas de CLI y web, y más.
257,942 estrellasHack-with-Github/Awesome-Hacking
Una colección de diversas listas awesome para hackers, pentesters e investigadores de seguridad.
125,254 estrellasswisskyrepo/PayloadsAllTheThings
Una lista de payloads y métodos de bypass útiles para la seguridad de aplicaciones web y para pentesting/CTF.
82,623 estrellascaddyserver/caddy
Servidor web HTTP/1-2-3 rápido, extensible y multiplataforma con HTTPS automático
79,020 estrellas