code: public DocSample processSample(DocSample sample) {
  
      if (sample.isClearAdaptiveDataSet()) {
        this.docClassifier.clearFeatureData();
      }
      String[] document = sample.getTokens();
      String cat = docClassifier.classify(document);
  
      if (sample.getLabel().equals(cat)) {
        accuracy.add(1);
      }
      else {
        accuracy.add(0);
      }
      return new DocSample(cat, sample.getTokens(), sample.isClearAdaptiveDataSet());
    }
docs: Evaluates the given reference {@link DocSample} object.
  
  This is done by categorizing the document from the provided
  {@link DocSample}. The detected category is then used
  to calculate and update the score.
  
  @param sample the reference {@link DocSample}.