Can pattern recognition explain grammatical learning?