title: Serialization error : StanfordNLP java library
body: <p>I am trying to make my own model using StanfordNLP java library programmatically.</p>
  
  <p>"traindatacode-model.ser.gz" file is created but without any content. It is created correctly using following cmd command:</p>
  
  <pre><code>java -cp -Xmx1g stanford.ner.jar edu.stanford.nlp.ie.crf.CRFClassifier -prop traindata.prop
  </code></pre>
  
  <p>Following code is used to do same thing programmatically but creates empty serialized file.</p>
  
  <pre><code>public class Buildmodel {
      public static void main(String[] args) {
          String propPath = "C:\\Users\\kr277288\\Desktop\\traindata1.prop";
      String trainingfile ="C:\\Users\\kr277288\\Desktop\\traindata4labels.tsv";
      String serializePath = "C:\\Users\\kr277288\\Desktop\\NERtest\\testfiles\\traindatacode-model.ser.gz";
      Properties prop1= propFileToProperties(propPath);
      CRFClassifier crf1 = new CRFClassifier(prop1);
      crf1.serializeClassifier(crf1.flags.serializeTo);
      }
  }
  </code></pre>