Deep networks learn to parse uniform-depth context-free languages from local statistics