Hebbian learning the local structure of language