Bayesian Nonparametric Modeling of Latent Structures