<commit_before>import java.io.*;
import java.lang.Object;
import java.util.*;
import java.util.regex.*;


public class rtf {
	private static String nomFichier = "map.csv";
	private static String destination = "final.txt";
	private static String CSV_SEPARATOR = ";";
	private File fileEntree;
	private File fileSortie;
	// Regex marche à moitié celui la marche mieux -> \{[^\;]+\;\}|\\[^ ]+[ ]+|\{|\}|^\\.*()$|[0-9a-fA-F]{127}|[0-9a-fA-F]{12} mais faut le changer pour java
	private String REGEX = "\\{[^\\;]+\\;\\}|\\\\[^ ]+[ ]+|\\{|\\}|^\\.*()|[0-9a-fA-F]{127}|[0-9a-fA-F]{12}";
	private String REPLACE = "";

	public rtf(String in, String out){
		this.fileEntree = new File(in);
		this.fileSortie = new File(out);
		
	}
	

	//I have no idea why it's here
	private String cleanline(String line, String key, String value) {
		return value;

	}
	
	//replace line by line with the regular expression
	public void test() throws IOException{
		FileWriter fw = new FileWriter(this.fileSortie);
		BufferedWriter bw = new BufferedWriter(fw);
		FileReader fr = new FileReader(this.fileEntree);
		BufferedReader br = new BufferedReader(fr);
		String line = br.readLine();
		while((line=br.readLine())!=null){
			String newline = line.replaceAll(this.REGEX,this.REPLACE);
			bw.write(newline);
		}
		br.close();
		bw.close();
		
	}

	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		rtf test = new rtf("buffalo96.rtf","test.rtf");
		test.test();
	}
}
<commit_msg>Update rtf.java<commit_after>import java.io.*;
import java.lang.Object;
import java.util.*;
import java.util.regex.*;


public class rtf {
	private static String destination = "final.txt";
	private File fileEntree;
	private File fileSortie;
	private String REGEX = "\\{[^\\;]+\\;\\}|\\\\[^ ]+[ ]+|\\{|\\}|[0-9a-fA-F]{127}|[0-9a-fA-F]{12}";
	private String REGEX2 = "^\\.*\\(\\)";
	private String REPLACE = "";

	public rtf(String in, String out){
		this.fileEntree = new File(in);
		this.fileSortie = new File(out);
		
	}
	
	
	//replace line by line with the regular expression
	public void test() throws IOException{
		FileWriter fw = new FileWriter(this.fileSortie);
		BufferedWriter bw = new BufferedWriter(fw);
		FileReader fr = new FileReader(this.fileEntree);
		BufferedReader br = new BufferedReader(fr);
		String line = br.readLine();
		while((line=br.readLine())!=null){
			String newline = line.replaceAll(this.REGEX,this.REPLACE);
			bw.write(newline);
		}
		br.close();
		bw.close();
		
	}
	
	public void test2() throws IOException{
		FileWriter fw = new FileWriter(this.fileSortie);
		BufferedWriter bw = new BufferedWriter(fw);
		FileReader fr = new FileReader(this.fileEntree);
		BufferedReader br = new BufferedReader(fr);
		String line = br.readLine();
		while((line=br.readLine())!=null){
			String newline = line.replaceAll(this.REGEX2,this.REPLACE);
			bw.write(newline);
		}
		br.close();
		bw.close();
		
	}

	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		rtf test = new rtf("korea_final.rtf","test.rtf");
		test.test();
		rtf test2 = new rtf("test.rtf", "test2.rtf");
		test2.test2();
	}
}

{'fraction_non_alphanumeric': 0.17387188387503943, 'fraction_numerical': 0.011360050489113285, 'mean_word_length': 3.832317073170732, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '6774040', 'n_tokens_mistral': 1231, 'n_tokens_neox': 1123, 'n_words': 272}