Lightweight rule engine that maps attributes onto a semantic structure