title: How to use stanford dependency parser to extract aspect terms from text?
body: <p>I'm currently working on an aspect-level sentiment analysis project using online travel reviews.</p>
  
  <p>I'm using <code>Stanford CoreNLP</code> to get things done. So far, I have managed to pre-process the data by POS tagging and lemmatizing the review content.</p>
  
  <p>I read several papers related to sentiment analysis and it looks like the next step is to extract aspect terms from the review text, along with their sentiment polarity.I have seen a video tutorial in Python NLTK where regex were used to find relationships between POS tagged words to find Noun phrases etc. I want to do the same using Stanford Dependency parser.</p>
  
  <p>Unfortunately, I do not understand how to use the output of Stanford Dependency Parser to write such rules to identify aspect terms.</p>
  
  <p>For two days, I have looked for a sample Java code that would explain how exactly I could accomplish this task. But so far, no luck. </p>
  
  <p>Would really appreciate if someone could point me to a tutorial/sample code where I could take a look and understand the procedure. </p>
  
  <p>Say I have an output similar to following;</p>
  
  <pre><code>(ROOT
    (S
      (NP (PRP It))
      (VP (VBZ is) (RB not)
        (NP
          (NP (DT a) (NN museum))
          (PP (CC but)
            (NP
              (NP (DT a) (VBG living) (JJ historic) (NN town))
              (PP (IN with)
                (NP (JJ wonderful) (NNS places)))
              (S
                (VP (TO to)
                  (VP
                    (VP (VB eat)
                      (NP (NN drink)))
                    (CC and)
                    (VP (VB do)
                      (NP (NN shopping))))))))))
  </code></pre>
  
  <p>How can I extract <strong>museum</strong>, <strong>eat</strong>, <strong>drink</strong>, <strong>shopping</strong> as aspects? </p>
  
  <p>Any help is greatly appreciated.</p>