1. A method for segmenting a string comprising one or more segments into discrete segments, wherein each of the one or more segments comprises data that is the same as or similar to a marker string, the method comprising: generating a similarity vector comprising a plurality of similarity values and associated locations within the string wherein a similarity value represents a comparison of the marker string and at least a portion of the string and an associated location associated with the similarity value is the location within the string of the start of the at least a portion of the string used in the comparison; generating a set of segmentation locations identified using a set of ideal segmentation locations and a set of candidate segmentation locations obtained from a set of locations in the similarity vector corresponding to local maximum similarity values within a distance threshold of the locations in the similarity vector corresponding to ideal segmentation locations from the set of ideal segmentation locations; and using the set of segmentation locations to segment the string.