<commit_before>/*
 * Copyright 2013-2015 <NAME> <<EMAIL>>
 *
 * This file is part of globalpomutils-core.
 *
 * globalpomutils-core is free software: you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as published by the
 * Free Software Foundation, either version 3 of the License, or (at your
 * option) any later version.
 *
 * globalpomutils-core is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 * details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with globalpomutils-core. If not, see <http://www.gnu.org/licenses/>.
 */
package com.anrisoftware.globalpom.posixlocale;

import static com.anrisoftware.globalpom.charset.SerializableCharset.decorateSerializableCharset;
import static org.apache.commons.lang3.Validate.notNull;

import java.io.Serializable;
import java.nio.charset.Charset;
import java.util.Locale;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;

import com.anrisoftware.globalpom.charset.SerializableCharset;
import com.google.inject.assistedinject.Assisted;
import com.google.inject.assistedinject.AssistedInject;

/**
 * Locale as used in POSIX platforms. Contains the language, country and
 * character set.
 *
 * @see http://en.wikipedia.org/wiki/Locale
 *
 * @author <NAME>, <EMAIL>
 * @since 2.6
 */
@SuppressWarnings("serial")
public final class PosixLocale implements Serializable {

    private final Locale locale;

    private final SerializableCharset charset;

    /**
     * Sets the locale with the default character set.
     *
     * @param locale
     *            the {@link Locale} locale.
     *
     * @see Charset#defaultCharset()
     *
     * @throws NullPointerException
     *             if the specified locale is <code>null</code>.
     */<commit_msg>Add default POSIX locales.<commit_after>/*
 * Copyright 2013-2015 <NAME> <<EMAIL>>
 *
 * This file is part of globalpomutils-core.
 *
 * globalpomutils-core is free software: you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as published by the
 * Free Software Foundation, either version 3 of the License, or (at your
 * option) any later version.
 *
 * globalpomutils-core is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 * details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with globalpomutils-core. If not, see <http://www.gnu.org/licenses/>.
 */
package com.anrisoftware.globalpom.posixlocale;

import static com.anrisoftware.globalpom.charset.SerializableCharset.decorateSerializableCharset;
import static org.apache.commons.lang3.Validate.notNull;

import java.io.Serializable;
import java.nio.charset.Charset;
import java.util.Locale;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;

import com.anrisoftware.globalpom.charset.SerializableCharset;
import com.google.inject.assistedinject.Assisted;
import com.google.inject.assistedinject.AssistedInject;

/**
 * Locale as used in POSIX platforms. Contains the language, country and
 * character set.
 *
 * @see http://en.wikipedia.org/wiki/Locale
 *
 * @author <NAME>, <EMAIL>
 * @since 2.6
 */
@SuppressWarnings("serial")
public final class PosixLocale implements Serializable {

    /**
     * @see Locale#ENGLISH
     * @see Charset#defaultCharset()
     */
    static public final PosixLocale ENGLISH = new PosixLocale(Locale.ENGLISH);

    /**
     * @see Locale#FRENCH
     * @see Charset#defaultCharset()
     */
    static public final PosixLocale FRENCH = new PosixLocale(Locale.FRENCH);

    /**
     * @see Locale#GERMAN
     * @see Charset#defaultCharset()
     */
    static public final PosixLocale GERMAN = new PosixLocale(Locale.GERMAN);

    /**
     * @see Locale#ITALIAN
     * @see Charset#defaultCharset()
     */
    static public final PosixLocale ITALIAN = new PosixLocale(Locale.ITALIAN);

    /**
     * @see Locale#JAPANESE
     * @see Charset#defaultCharset()
     */
    static public final PosixLocale JAPANESE = new PosixLocale(Locale.JAPANESE);

    /**
     * @see Locale#KOREAN
     * @see Charset#defaultCharset()
     */
    static public final PosixLocale KOREAN = new PosixLocale(Locale.KOREAN);

    /**
     * @see Locale#CHINESE
     * @see Charset#defaultCharset()
     */
    static public final PosixLocale CHINESE = new PosixLocale(Locale.CHINESE);

    /**
     * @see Locale#SIMPLIFIED_CHINESE
     * @see Charset#defaultCharset()
     */
    static public final PosixLocale SIMPLIFIED_CHINESE = new PosixLocale(
            Locale.SIMPLIFIED_CHINESE);

    /**
     * @see Locale#TRADITIONAL_CHINESE
     * @see Charset#defaultCharset()
     */
    static public final PosixLocale TRADITIONAL_CHINESE = new PosixLocale(
            Locale.TRADITIONAL_CHINESE);

    /**
     * @see Locale#FRANCE
     * @see Charset#defaultCharset()
     */
    static public final PosixLocale FRANCE = new PosixLocale(Locale.FRANCE);

    /**
     * @see Locale#GERMANY
     * @see Charset#defaultCharset()
     */
    static public final PosixLocale GERMANY = new PosixLocale(Locale.GERMANY);

    /**
     * @see Locale#ITALY
     * @see Charset#defaultCharset()
     */
    static public final PosixLocale ITALY = new PosixLocale(Locale.ITALY);

    /**
     * @see Locale#JAPAN
     * @see Charset#defaultCharset()
     */
    static public final PosixLocale JAPAN = new PosixLocale(Locale.JAPAN);

    /**
     * @see Locale#KOREA
     * @see Charset#defaultCharset()
     */
    static public final PosixLocale KOREA = new PosixLocale(Locale.KOREA);

    /**
     * @see Locale#CHINA
     * @see Charset#defaultCharset()
     */
    static public final PosixLocale CHINA = new PosixLocale(Locale.CHINA);

    /**
     * @see Locale#PRC
     * @see Charset#defaultCharset()
     */
    static public final PosixLocale PRC = new PosixLocale(Locale.PRC);

    /**
     * @see Locale#TAIWAN
     * @see Charset#defaultCharset()
     */
    static public final PosixLocale TAIWAN = new PosixLocale(Locale.TAIWAN);

    /**
     * @see Locale#UK
     * @see Charset#defaultCharset()
     */
    static public final PosixLocale UK = new PosixLocale(Locale.UK);

    /**
     * @see Locale#US
     * @see Charset#defaultCharset()
     */
    static public final PosixLocale US = new PosixLocale(Locale.US);

    /**
     * @see Locale#CANADA
     * @see Charset#defaultCharset()
     */
    static public final PosixLocale CANADA = new PosixLocale(Locale.CANADA);

    /**
     * @see Locale#CANADA_FRENCH
     * @see Charset#defaultCharset()
     */
    static public final PosixLocale CANADA_FRENCH = new PosixLocale(
            Locale.CANADA_FRENCH);

    private final Locale locale;

    private final SerializableCharset charset;

    /**
     * Sets the locale with the default character set.
     *
     * @param locale
     *            the {@link Locale} locale.
     *
     * @see Charset#defaultCharset()
     *
     * @throws NullPointerException
     *             if the specified locale is <code>null</code>.
     */
{'fraction_non_alphanumeric': 0.09910502763885233, 'fraction_numerical': 0.003948407475651487, 'mean_word_length': 3.191395477109763, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '7155147', 'n_tokens_mistral': 2376, 'n_tokens_neox': 2310, 'n_words': 625}