Learning Discrete Latent Variable Structures with Tensor Rank Conditions