Scalable Bayesian Nonparametric Models for Networks and Documents