title: Using stanford parser to parse Chinese
body: <p>here is my code, mostly from the demo. The program runs perfectly, but the result is very wrong. It did not spilt the words. 
  Thank you</p>
  
  <pre><code>public static void main(String[] args) {
   LexicalizedParser lp = LexicalizedParser.loadModel("edu/stanford/nlp/models/lexparser/xinhuaFactored.ser.gz");
  
    demoAPI(lp);
  
  }
  
  
  public static void demoAPI(LexicalizedParser lp) {
  
  
  // This option shows loading and using an explicit tokenizer
  String sent2 = "我爱你";
  TokenizerFactory&lt;CoreLabel&gt; tokenizerFactory =
      PTBTokenizer.factory(new CoreLabelTokenFactory(), "");
  Tokenizer&lt;CoreLabel&gt; tok =
      tokenizerFactory.getTokenizer(new StringReader(sent2));
  List&lt;CoreLabel&gt; rawWords2 = tok.tokenize();
  
  Tree parse = lp.apply(rawWords2);
  
  TreebankLanguagePack tlp = new PennTreebankLanguagePack();
  GrammaticalStructureFactory gsf = tlp.grammaticalStructureFactory();
  GrammaticalStructure gs = gsf.newGrammaticalStructure(parse);
  List&lt;TypedDependency&gt; tdl = gs.typedDependenciesCCprocessed();
  System.out.println(tdl);
  System.out.println();
  
  // You can also use a TreePrint object to print trees and dependencies
  TreePrint tp = new TreePrint("penn,typedDependenciesCollapsed");
  tp.printTree(parse);
  }
  </code></pre>