title: Stanford NLP parse tree format
body: <p>This may be a silly question, but how does one iterate through a parse tree as an output of an NLP parser (like Stanford NLP)? It's all nested brackets, which is neither an <code>array</code> nor a <code>dictionary</code> or any other collection type I've used.</p>
  
  <pre><code>(ROOT\n  (S\n    (PP (IN As)\n      (NP (DT an) (NN accountant)))\n    (NP (PRP I))\n    (VP (VBP want)\n      (S\n        (VP (TO to)\n          (VP (VB make)\n            (NP (DT a) (NN payment))))))))
  </code></pre>