Support for custom keyword segmentation functions.