Segmentation working, though hits recursion limit for texts longer than 250 characters