A bi-clustering framework for categorical data