title: how can I obtain the value of subject of the Stanford Dependencies "nsubj" of a tree?
body: <p>This is a part of my code:</p>
  
  <pre><code>String sentence="My dog also likes eating sausage.";
  LexicalizedParser lp = new LexicalizedParser("englishPCFG.ser.gz"); 
  TokenizerFactory tf = PTBTokenizer.factory(false, new WordTokenFactory());
  TreePrint tp = new TreePrint("penn,typedDependenciesCollapsed");
  
  List tokens = tf.getTokenizer(new StringReader(sentence)).tokenize(); 
  lp.parse(tokens); // parse the tokens
  Tree t = lp.getBestParse();
  </code></pre>
  
  <p>How can I get the value of the subject (dog)?</p>
  
  <p>This is a dependency where I would like to extract the Subject:</p>
  
  <pre><code>nsubj(likes-4, dog-2)
  </code></pre>