Runs every registered detector over normalised text, validates candidates (checksums, code tables), scores them from nearby context and resolves overlapping matches (the more confident, then the longer, span wins - so a GSTIN is reported once, not also as the PAN inside it).
Arguments
- text
A character vector.
- detectors
Detector ids to run;
NULLruns all registered detectors (seecg_detectors()).- context
Optional extra context per element of
text(recycled), treated as if it appeared next to every match.scan_pii()(planned) passes column names here, so a column calledvoter_idsupports Voter ID matches.- min_confidence
Drop matches scoring below this value.
- window
Number of characters either side of a match searched for context keywords;
NULLuses the spec'scontext_window.