Knowledge Inference and Structure Discovery for Education