Hard coded robotic manipulation skills work well in known, predictable and repeatable situations. Human environments, however, are better described as dynamic, chaotic, uncertain or unstructured. Therefore, plans relying on preprogrammed trajectories are bound to fail in these settings. In order to increase robustness to uncertainty and avoid coding new skills from scratch, we can make flexible plans that execute existing autonomous primitives based on the sensed state of the environment. A key challenge of this approach is finding the sequence of primitives required to perform the desired task. This work uses a variation of a Hidden Markov Model (HMM) with an augmented particle filter to find the primitive sequence using only a reduced number of human demonstrations. The algorithm was tested on 40 demonstrations of two different manipulation tasks involving six primitives. It was seeded with a single manually labelled demonstration of each task and was able to automatically label the other 38 demonstration sequences with an average success of 81.5%. The results show improved convergence and a 9% increase in accuracy over other versions of the algorithm.