Text this: An RRAM-based implementation of a template matching circuit for low-power analogue classification