title: Stanford NER running
body: <p>I'm using Stanfor-NER and when I use its demo or the serialized code that was presented by @ChristopherManning, I get the following error:</p>
  
  <pre><code>import edu.stanford.nlp.ie.NERClassifierCombiner;
  import edu.stanford.nlp.io.IOUtils;
  import edu.stanford.nlp.ling.CoreLabel;
  import java.io.IOException;
  import java.util.List;
  
  public class Ner {
  
    public static void main(String[] args) throws IOException {
      String serializedClassifier = "/local/stanford-ner-2015-01-30/classifiers/english.all.3class.distsim.crf.ser.gz";
      String serializedClassifier2 = "/local/stanford-ner-2015-01-30/classifiers/english.muc.7class.distsim.crf.ser.gz";
  
      if (args.length &gt; 0) {
        serializedClassifier = args[0];
      }
  
      NERClassifierCombiner classifier = new NERClassifierCombiner(false, false, 
              serializedClassifier, serializedClassifier2);
  
      String fileContents = IOUtils.slurpFile("input.txt");
      List&lt;List&lt;CoreLabel&gt;&gt; out = classifier.classify(fileContents);
  
      int i = 0;
      for (List&lt;CoreLabel&gt; lcl : out) {
        i++;
        int j = 0;
        for (CoreLabel cl : lcl) {
          j++;
          System.out.printf("%d:%d: %s%n", i, j,
                  cl.toShorterString("Text", "CharacterOffsetBegin", "CharacterOffsetEnd", "NamedEntityTag"));
        }
      }
    }
  
  }
  </code></pre>
  
  <p>the error is: </p>
  
  <pre><code> java.lang.ClassCastException: java.util.ArrayList cannot be cast to      [Ledu.stanford.nlp.util.Index
  </code></pre>