Neural Networks and the Chomsky Hierarchy