The feature-extraction and sequence-construction code