<commit_before>/*
 * Copyright (c) 2008. All rights reserved.
 */
package ro.isdc.wro.processor;

import java.io.IOException;
import java.io.Reader;
import java.io.Writer;

import ro.isdc.wro.resource.Resource;


/**
 * ResourcePreProcessor. A processor which will be applied to the resource before merging. TODO: maybe it would be a
 * good idea to have List<ResourceType> support() method used to identify the type of resources this should apply on?
 *
 * @author <NAME>
 * @created Created on Nov 19, 2008
 */
public interface ResourcePreProcessor {
  /**
   * Process a content supplied by a reader and perform some sort of processing.
   *
   * @param resource
   *          the original resource as it found in the model.
   * @param reader
   *          {@link Reader} used to read original resource content.
   * @param writer
   *          {@link Writer} where used to write processed results.
   * @throws IOException
   *           when IO exception occurs.
   */
  public void process(final Resource resource, final Reader reader,
      final Writer writer) throws IOException;
}
<commit_msg>add a TODO about some refactoring<commit_after>/*
 * Copyright (c) 2008. All rights reserved.
 */
package ro.isdc.wro.processor;

import java.io.IOException;
import java.io.Reader;
import java.io.Writer;

import ro.isdc.wro.resource.Resource;


/**
 * ResourcePreProcessor. A processor which will be applied to the resource before merging. TODO: maybe it would be a
 * good idea to have List<ResourceType> support() method used to identify the type of resources this should apply on?
 *
 * @author <NAME>
 * @created Created on Nov 19, 2008
 */
public interface ResourcePreProcessor {
  //TODO add a closure responsible for applying preprocessor on new resources instead of modifying the model.
  /**
   * Process a content supplied by a reader and perform some sort of processing.
   *
   * @param resource
   *          the original resource as it found in the model.
   * @param reader
   *          {@link Reader} used to read original resource content.
   * @param writer
   *          {@link Writer} where used to write processed results.
   * @throws IOException
   *           when IO exception occurs.
   */
  public void process(final Resource resource, final Reader reader,
      final Writer writer) throws IOException;
}

{'fraction_non_alphanumeric': 0.07711757269279393, 'fraction_numerical': 0.008428150021070375, 'mean_word_length': 2.9435215946843853, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6542940', 'n_tokens_mistral': 645, 'n_tokens_neox': 611, 'n_words': 275}