<commit_before>package cluster.worker;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.zip.GZIPInputStream;

import utils.Translate;

public class MakeMatrixWithAllKmers
{
	
	public static String EXPECTED_SUFFIX = "kmers.txt.gz";
		
	/*
	 * This worker takes a directory of kmer files (created with MakeKmers )
	 * and outputs a distance matrix across all the files 
	 * based on pairwise comparison utilizing all kmers in both files
	 */
	public static void main(String[] args) throws Exception
	{
		if( args.length != 2)
		{
			System.out.println("Usage inKmerDirectory outDistanceFile");
			System.exit(1);
		}
		
		BufferedWriter writer = new BufferedWriter(new FileWriter(new File(args[1])));<commit_msg>output file must be zip (and is zipped)<commit_after>package cluster.worker;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.HashMap;
import java.util.zip.GZIPInputStream;
import java.util.zip.GZIPOutputStream;

import utils.Translate;

public class MakeMatrixWithAllKmers
{
	
	public static String EXPECTED_SUFFIX = "kmers.txt.gz";
		
	/*
	 * This worker takes a directory of kmer files (created with MakeKmers )
	 * and outputs a distance matrix across all the files 
	 * based on pairwise comparison utilizing all kmers in both files
	 */
	public static void main(String[] args) throws Exception
	{
		if( args.length != 2)
		{
			System.out.println("Usage inKmerDirectory outDistanceFile");
			System.exit(1);
		}
		
		if( ! args[1].toLowerCase().endsWith("gz"))
		{
			System.out.println("output file must end with gz");
			System.exit(1);
		}
		
		BufferedWriter writer = new BufferedWriter( new OutputStreamWriter(
				new GZIPOutputStream(new FileOutputStream(args[1]))));
		
{'fraction_non_alphanumeric': 0.09725565719788155, 'fraction_numerical': 0.0038517091959557053, 'mean_word_length': 4.571045576407506, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5705818', 'n_tokens_mistral': 676, 'n_tokens_neox': 621, 'n_words': 180}