Learning latent structure: carving nature at its joints