Text this: Synaptic learning rules and sparse coding in a model sensory system.