Text this: On improving dynamic time warping for pattern matching