package Preprocessors; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.util.Scanner; public class BasicPreprocessor implements Preprocessor { @Override public void preprocess(String trainingData, String testingData, String modifiedData) throws IOException { File train = new File(trainingData); File modified = new File(modifiedData); Scanner s = new Scanner(train); FileWriter w = new FileWriter(modified); while (s.hasNext()) w.write(s.next()+"\n"); s.close(); w.close(); } @Override public void setSettings(String settings) { // TODO Auto-generated method stub } @Override public String getSettings() { // TODO Auto-generated method stub return null; } @Override public String getName() { return "BasicPreprocessor"; } }