Stanford NLP parse tree format
问题 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 array nor a dictionary or any other collection type I've used. (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)))))))) 回答1: This particular output format of the Stanford Parser is call the "bracketed parse (tree)". It is