LASegmenter without using boost lib