Text this: A Locomotion Mode Recognition Algorithm Using Adaptive Dynamic Movement Primitives