Classification-based chunking