Generalized Louvain Method for Community Detection in Large Networks