title: Stanford parser - count of tags
body: <p>I have been using the <a href="http://nlp.stanford.edu/software/lex-parser.shtml" rel="nofollow noreferrer">Stanford Parser</a> for CFG analysis. I can get the output displayed as a tree, but what I really want is a count of tags.</p>
  
  <p>So I can get out, for example (taken from <a href="https://stackoverflow.com/questions/14373557/how-to-get-phrase-tags-in-stanford-corenlp">another query</a> on Stack Overflow):</p>
  
  <pre><code>(ROOT (S (NP (PRP$ My) (NN dog)) (ADVP (RB also)) (VP (VBZ likes) (NP (JJ eating) (NN sausage))) (. .)))
  </code></pre>
  
  <p>But what I really want is a count of the tags output in a CSV file:</p>
  
  <pre><code>PRP - 1
  JJ - 1
  </code></pre>
  
  <p>Is this possible with the Stanford parser, particularly as I want to process several text files, or should I use a different program?</p>