title: Stanford Parser (Typed Dependencee) Exception
body: <p>I want to see Dependence output format in Stanford Parser for NLP. I downloaded the jar file from this link.
  <a href="http://nlp.stanford.edu/software/lex-parser.shtml" rel="nofollow">http://nlp.stanford.edu/software/lex-parser.shtml</a></p>
  
  <p>Then I import it in Eclipse and wrote following code.</p>
  
  <pre><code>package hammad.NLP;
  
  import java.io.StringReader;
  import java.util.Collection;
  import java.util.List;
  
  import com.chaoticity.dependensee.Main;
  
  import edu.stanford.nlp.ling.CoreLabel;
  import edu.stanford.nlp.parser.lexparser.LexicalizedParser;
  import edu.stanford.nlp.process.CoreLabelTokenFactory;
  import edu.stanford.nlp.process.PTBTokenizer;
  import edu.stanford.nlp.process.TokenizerFactory;
  import edu.stanford.nlp.trees.GrammaticalStructure;
  import edu.stanford.nlp.trees.GrammaticalStructureFactory;
  import edu.stanford.nlp.trees.PennTreebankLanguagePack;
  import edu.stanford.nlp.trees.Tree;
  import edu.stanford.nlp.trees.TreebankLanguagePack;
  import edu.stanford.nlp.trees.TypedDependency;
  
  public class Test {
  /**
   * @param args
   */
  public static void main(String[] args) {
      // TODO Auto-generated method stub
  
      try
      {
  
          String text = "A quick brown fox jumped over the lazy dog.";
          TreebankLanguagePack tlp = new PennTreebankLanguagePack();
          GrammaticalStructureFactory gsf = tlp.grammaticalStructureFactory();
          LexicalizedParser lp = LexicalizedParser.loadModel("C:/Stanford Parser/Java/stanford-parser-full-2015-04-20/stanford-parser-3.5.2-models/edu/stanford/nlp/models/lexparser/englishPCFG.ser.gz");
          lp.setOptionFlags(new String[]{"-maxLength", "500", "-retainTmpSubcategories"});
          TokenizerFactory&lt;CoreLabel&gt; tokenizerFactory =
                  PTBTokenizer.factory(new CoreLabelTokenFactory(), "");
          List&lt;CoreLabel&gt; wordList = tokenizerFactory.getTokenizer(new StringReader(text)).tokenize();
          Tree tree = lp.apply(wordList);    
          GrammaticalStructure gs = gsf.newGrammaticalStructure(tree);
          Collection&lt;TypedDependency&gt; tdl = gs.typedDependenciesCCprocessed(true);
  
          Main.writeImage(tree,tdl, "image.png",3);
  
      }
      catch(Exception e)
      {
          e.printStackTrace();
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p>It gives following Exception.</p>
  
  <pre><code>Exception in thread "main" java.lang.NoSuchMethodError: edu.stanford.nlp.trees.TypedDependency.gov()Ledu/stanford/nlp/trees/TreeGraphNode;
  </code></pre>
  
  <p>I searched for TypedDependency and found that gov() exist in it but exception is coming. I searched a lot about it but found no help regarding this. I will be thankful to you if you help me on this.</p>