The age filter keeps any number that follows an age or aged keyword, with no plausibility check, so clearly non-age values are redacted as ages:
| Input |
Matched as an age |
form AGE 2024 |
AGE 2024 |
Bronze Age 1200 |
Age 1200 |
An age written after a label is realistically 0 to about 125. Bounding the value on the keyword pattern in phileas/filters/age_filter.py drops these while keeping Age: 47 and age 39.5. The bound must apply only to the keyword pattern, not to the y/o and years old forms.
This trades a little recall for precision, since a genuine Age: 130 would stop being redacted, so the ceiling should be set generously rather than at a typical maximum lifespan.
Tracked for Java in philterd/phileas#334.
Acceptance Criteria
The age filter keeps any number that follows an
ageoragedkeyword, with no plausibility check, so clearly non-age values are redacted as ages:form AGE 2024AGE 2024Bronze Age 1200Age 1200An age written after a label is realistically 0 to about 125. Bounding the value on the keyword pattern in
phileas/filters/age_filter.pydrops these while keepingAge: 47andage 39.5. The bound must apply only to the keyword pattern, not to they/oandyears oldforms.This trades a little recall for precision, since a genuine
Age: 130would stop being redacted, so the ceiling should be set generously rather than at a typical maximum lifespan.Tracked for Java in philterd/phileas#334.
Acceptance Criteria
age/agedkeyword is not detected as an age, coveringform AGE 2024andBronze Age 1200Age: 47andaged 39are still detectedage 39.5are still detectedage 125is detected,age 126is noty/oandyears oldforms are unaffected2026-01-15are still not detected as agestests/test_age_detection.py