// Based on this data, create a Unit relation giving the details of the
// units to concatenate.
Relation unitRelation = utterance.createRelation(Relation.UNIT);
for (Item s = segs.getHead(); s != null; s = s.getNext()) {
Item unit = unitRelation.appendItem();
FeatureSet unitFeatureSet = unit.getFeatures();
int unitEntry = s.getFeatures().getInt("selected_unit");
// The item name is the segment name
unitFeatureSet.setString("name", s.getFeatures().getString("name"));