Learning and Reasoning in Hybrid Structured Spaces