code: public List<int[]> collectSamples(SequenceModel model, int numSamples, int sampleInterval, int[] initialSequence) {
      if (verbose>0) System.err.print("Collecting samples");
      listener.setInitialSequence(initialSequence);
      List<int[]> result = new ArrayList<int[]>();
      int[] sequence = initialSequence;
      for (int i=0; i<numSamples; i++) {
        sequence = copy(sequence); // so we don't change the initial, or the one we just stored
        sampleSequenceRepeatedly(model, sequence, sampleInterval); // modifies tagSequence
        result.add(sequence); // save it to return later
        if (verbose>0) System.err.print(".");
        System.err.flush();
      }
      if (verbose>1) {
        System.err.println();
        printSamples(result, System.err);
      }
      if (verbose>0) System.err.println("done.");
      return result;
    }
docs: Collects numSamples samples of sequences, from the distribution over sequences defined
  by the sequence model passed on construction.
  All samples collected are sampleInterval samples apart, in an attempt to reduce
  autocorrelation.
  @return a Counter containing the sequence samples, as arrays of type int, and their scores