Learning from Semantically Heterogeneous Data