<commit_before>package utybo.minkj.locale;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;

/**
 * The whole system of MinkJ!
 * 
 * @author utybo
 * @see {@link java.util.Locale} (MinkJ uses Locale intances)
 * 
 */
@SuppressWarnings("serial")
public final class MinkJ implements Serializable
{
	/**
	 * Stores the values. This HashMap can be very big. The first one (Locale,
	 * hashMap) stored the Locale and its corresponding HashMap (String, String)
	 * which stores the key (first String) and its associated translation
	 * (second String).
	 */
	private Map<Locale, Map<String, String>> map = new HashMap<Locale, Map<String, String>>();

	/**
	 * The default language. It is used in case of an unknown translation for a
	 * specific key.<br/>
	 * <br/>
	 * e.g : you have the key hello.world which has a translation in English
	 * which is the default language (Hello World) but, for some reasons, the
	 * translation in German does not exist. If you ask for the German
	 * translation for the key hello.world, the English translation will be
	 * returned. If the translation from the default translation is not
	 * available/does not exist, the key will be returned.
	 */
	private Locale defaultLanguage = Locale.ENGLISH;

	/**
	 * The selected language. The methods getting a translation will look for a
	 * translation for the Locale specified here. The default value is null,
	 * make sure you change this variable before using methods without any
	 * locale parameter, as they will use this variable!
	 */
	private Locale selectedLanguage = new Locale(System.getProperty("user.language"));

	public MinkJ()
	{}

	/**
	 * With this constructor, you can specify the default language. Using the
	 * default constructor with the method {@link #setDefaultLanguage(Locale)}
	 * does the same thing.
	 * 
	 * @param defaultLanguage<commit_msg>Fix javadoc and serialization stuff<commit_after>package utybo.minkj.locale;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;

/**
 * The whole system of MinkJ!<br/><br/>
 * 
 * You need to redefine the translations if you want to use the serialization with MinkJ 
 * 
 * @author utybo
 * @see {@link java.util.Locale} (MinkJ uses Locale intances)
 * 
 */
@SuppressWarnings("serial")
public final class MinkJ implements Serializable
{
	/**
	 * Stores the values. This HashMap can be very big. The first one (Locale,
	 * hashMap) stores the Locale and its corresponding HashMap (String, String)
	 * which stores the key (first String) and its associated translation
	 * (second String).
	 */
	private transient Map<Locale, Map<String, String>> map = new HashMap<Locale, Map<String, String>>();

	/**
	 * The default language. It is used in case of an unknown translation for a
	 * specific key.<br/>
	 * <br/>
	 * e.g : you have the key hello.world which has a translation in English
	 * which is the default language (Hello World) but, for some reasons, the
	 * translation in German does not exist. If you ask for the German
	 * translation for the key hello.world, the English translation will be
	 * returned. If the translation from the default translation is not
	 * available/does not exist, the key will be returned.
	 */
	private Locale defaultLanguage = Locale.ENGLISH;

	/**
	 * The selected language. The methods getting a translation will look for a
	 * translation for the Locale specified here. The default value is the system language.
	 */
	private Locale selectedLanguage = new Locale(System.getProperty("user.language"));

	public MinkJ()
	{}

	/**
	 * With this constructor, you can specify the default language. Using the
	 * default constructor with the method {@link #setDefaultLanguage(Locale)}
	 * does the same thing.
	 * 
	 * @param defaultLanguage
{'fraction_non_alphanumeric': 0.0895170789163722, 'fraction_numerical': 0.0, 'mean_word_length': 4.036773428232503, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '1765238', 'n_tokens_mistral': 1196, 'n_tokens_neox': 1122, 'n_words': 496}