Text this: Memristor-based feature learning for pattern classification