Get very basic measure-finding working.

The measure-finding function still needs to take similarity into
account when calculating the measure bars. Since it doesn't do that
yet, it always assigned the period with the highest prior probability,
which is 4 right now.