@Override
	public Boolean[] segment(Utterance utterance, boolean training, boolean trace) {
		// Get info about the utterance. Since the segmentation is a copy,
		// don't worry about modifying it
		Boolean[] segmentation = utterance.getBoundariesCopy();
		String[] units = utterance.getUnits();
		Boolean[] stresses = utterance.getStresses();

		// Go through the first n-1 words of the utterance, placing a boundary
		// if the next unit is stressed and we've already seen a stress this word
		boolean seenStress = false;
		for (int i = 0; i < units.length - 1; i++) {
			// Set the flag if this unit is stressed
			if (stresses[i]) seenStress = true;
			if (seenStress && stresses[i + 1]) {
				segmentation[i] = true;
				uscSegs++;
				// Each time you place a boundary, increment the word in the lexicon
				if (training) {
					lexicon.rewardWord((String[]) SegUtil.sliceFromLastBoundary(units, segmentation),
							(Boolean[]) SegUtil.sliceFromLastBoundary(stresses, segmentation));
				}
				seenStress = false;
			}
		}

		// Increment the final word in the lexicon
		if (training) {
			lexicon.rewardWord((String[]) SegUtil.sliceFromFinalBoundary(units, segmentation),
					(Boolean[]) SegUtil.sliceFromFinalBoundary(stresses, segmentation));
		}

		return segmentation;
	}