Segmentation and categorization of cells from structured documents