Implemented function for initial segmentation.
Changed the interface of the segmenter.