-
Notifications
You must be signed in to change notification settings - Fork 8
Label Parser Utility
goldy4719 edited this page Apr 10, 2026
·
1 revision
The parser converts raw Rekognition detect_labels responses into a normalized and reusable tag format. It outputs a deterministic list of label names and confidence scores for consistent use across backend and frontend systems.
- Raw JSON responses from the lab harness
- Defined tag schema:
[{ "name": string, "confidence": number }] - Unit testing setup
- Established normalization policy
- The system extracts label names and confidence values from the raw response.
- The system normalizes label names using a consistent casing policy (lowercase).
- The system returns a list of tag objects following the defined schema.
- The system sorts tags in descending order by confidence.
- The system validates output using fixture-based tests without AWS calls.
- The system routes lab harness output through the parser for consistency.
- The parser remains pure Python for reuse and testing.
- Normalization ensures consistent output across consumers.
- Deterministic ordering supports downstream reliability.
- All transformation logic is centralized in one place.