Full Idea
Grammatical sensitivity is in no way a physical property of the stimulus, and we can't imagine how to build a device which would produce grammatical structures in response to the environment.
Gist of Idea
Good grammar can't come simply from stimuli
Source
Georges Rey (Contemporary Philosophy of Mind [1997], 4.3)
Book Reference
Rey,Georges: 'Contemporary Philosophy of Mind' [Blackwell 1997], p.126
A Reaction
You could try to program it with a set of (say) Aristotelian categories, and mechanisms to sort the environment accordingly. It then has to query its database, in response to practical needs. A doddle.