How it works
- Deterministic layer — regex candidates validated by checksum/format (
python-stdnum,phonenumbers). Owns the structured identifiers; every match is validated, not guessed, and scores1.0. - Neural layer — multilingual GLiNER NER for names and locations, in one pass over the text.
/analyze HTTP contract, is configured through the detector_url setting, and runs as a separate service (see detector/).
Supported Entities
| Entity | Examples |
|---|---|
PERSON | Dr. Sarah Chen, John Smith |
LOCATION | New York, München, Milano |
EMAIL_ADDRESS | sarah.chen@hospital.org |
PHONE_NUMBER | +49 171 1234567 |
IBAN_CODE | DE89 3704 0044 0532 0130 00 |
CREDIT_CARD | 4111 1111 1111 1111 |
IP_ADDRESS | 192.168.1.1 |
VAT_CODE | EU VAT number, e.g. DE136695976, IT00743110157, FR40303265045 |
+ international-only by default; set phone_regions for local formats. VAT_CODE requires a country prefix and is validated with python-stdnum.
Languages and phone regions
Detection is multilingual and language-agnostic. PasteGuard does not auto-detect language. National-format phone numbers need country rules. Configurephone_regions only for regions your traffic uses.
Confidence Scoring
Neural detections carry a confidence score (0.0–1.0); checksum-validated identifiers are always1.0. The default request threshold is 0.7:
DETECTOR_FLOOR_PERSON and DETECTOR_FLOOR_LOCATION environment variables on the detector.