Joint segmentation and named entity recognition