Pull structured entities out of free text without training a model for your labels: you pass the label set at call time. Names, emails, phone numbers, card numbers, addresses — or any labels you invent, since the model is zero-shot. Nothing leaves the device, which is the point when the text you are extracting from is exactly the text you cannot send anywhere.
The model is GLiNER2-PII. The whole ML surface is one call:
let extractor = try await InformationExtractor(catalog: "gliner2-pii")
let found = try await extractor.extract(from: text, entities: ["email", "phone number"])
For the common case there is a one-liner that redacts instead of returning spans:
import CoreAIOps
let clean = try await CoreAI.redact(text)
swift run infoextract-cli --text "email me at a@b.com" --labels email
swift run infoextract-cli --gate # reproduce the demo PII suite
xcodegen generate # app
open InfoExtract.xcodeproj
Omit --bundle and the model downloads from the Hugging Face Hub on first use. Pass a directory
holding the .aimodel plus tokenizer/ and extractor.json to run a local build instead.