<commit_before>package de.nlptools.languageid.cl;

import java.util.HashMap;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;

/**
 * @author <NAME> <<EMAIL>>
 */
public class TrainTest {

    @BeforeClass
    public static void setUpClass() {
        System.out.println("Testing the Train class.");
    }

    /**
     * Test of readClArgs method, of class Train.
     */
    @Test
    public void testReadClArgs1() {
        System.out.println("Test readClArgs(), Run 1");
        String[] args = new String[]{"train.in", "model.out"};
        HashMap<String, String> expResult = new HashMap<>();
        expResult.put(Train.TRAIN_SET, "train.in");
        expResult.put(Train.MODEL_FILE, "model.out");
        HashMap<String, String> result = Train.readClArgs(args);
        assertEquals(expResult, result);
    }
    
    /**
     * Test of readClArgs method, of class Train.
     */
    @Test
    public void testReadClArgs2() {
        System.out.println("Test readClArgs(), Run 2");
        String[] args = new String[]{"-t", "Liblinear", "-c", "5", "train.in"};
        HashMap<String, String> expResult = new HashMap<>();
        expResult.put(Train.CLASSIFIER, "Liblinear");
        expResult.put(Train.C_PARAMETER, "5");
        expResult.put(Train.TRAIN_SET, "train.in");
        HashMap<String, String> result = Train.readClArgs(args);
        assertEquals(expResult, result);
    }    

    /**
     * Test of readClArgs method, of class Train.
     */
    @Test
    public void testReadClArgs3() {
        System.out.println("Test readClArgs(), Run 3");
        String[] args = new String[]{};
        HashMap<String, String> result = Train.readClArgs(args);
        assertEquals(null, result);
    }     
}
<commit_msg>Fix for save model.<commit_after>package de.nlptools.languageid.cl;

import java.util.HashMap;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;

/**
 * @author <NAME> <<EMAIL>>
 */
public class TrainTest {

    @BeforeClass
    public static void setUpClass() {
        System.out.println("Testing the Train class.");
    }

    /**
     * Test of readClArgs method, of class Train.
     */
    @Test
    public void testReadClArgs1() {
        System.out.println("Test readClArgs(), Run 1");
        String[] args = new String[]{"train.in", "model.out"};
        HashMap<String, String> expResult = new HashMap<>();
        expResult.put(Train.DOCS_SET, "train.in");
        expResult.put(Train.MODEL_FILE, "model.out");
        HashMap<String, String> result = Train.readClArgs(args);
        assertEquals(expResult, result);
    }
    
    /**
     * Test of readClArgs method, of class Train.
     */
    @Test
    public void testReadClArgs2() {
        System.out.println("Test readClArgs(), Run 2");
        String[] args = new String[]{"-t", "Liblinear", "-c", "5", "train.in"};
        HashMap<String, String> expResult = new HashMap<>();
        expResult.put(Train.CLASSIFIER, "Liblinear");
        expResult.put(Train.C_PARAMETER, "5");
        expResult.put(Train.DOCS_SET, "train.in");
        HashMap<String, String> result = Train.readClArgs(args);
        assertEquals(expResult, result);
    }    

    /**
     * Test of readClArgs method, of class Train.
     */
    @Test
    public void testReadClArgs3() {
        System.out.println("Test readClArgs(), Run 3");
        String[] args = new String[]{};
        HashMap<String, String> result = Train.readClArgs(args);
        assertEquals(null, result);
    }     
}

{'fraction_non_alphanumeric': 0.14845070422535211, 'fraction_numerical': 0.004507042253521127, 'mean_word_length': 2.6797927461139897, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, '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': '6435909', 'n_tokens_mistral': 1094, 'n_tokens_neox': 1081, 'n_words': 255}