Representing and Recognizing Temporal Sequences