<commit_before>package org.jaudiotagger.tag.reference;

import java.util.HashMap;
import java.util.Map;


/**
 * Represents the ISO 3166-1 Country List with ISO 3166-1-alpha-2 code
 * <p/>
 * Contains an enum  of countries, their two letter code and description
 * with additional method to allow an enum to be found by its two letter code or its description.
 * More details at http://www.iso.org/iso/country_codes/iso_3166_code_lists/english_country_names_and_code_elements.htm#c
 */
public class ISOCountry
{
    private static Map<String, Country> codeMap;
    private static Map<String, Country> descriptionMap;

    static
    {
        codeMap = new HashMap<String, Country>();
        for (Country country : Country.values())
        {
            codeMap.put(country.code, country);
        }

        descriptionMap = new HashMap<String, Country>();
        for (Country country : Country.values())
        {
            descriptionMap.put(country.description, country);
        }

    }

    /**
     * @param code
     * @return enum with this two letter code
     */
    public static Country getCountryByCode(String code)
    {
        return codeMap.get(code);
    }

    /**
     * @param description
     * @return enum with this description
     */
    public static Country getCountryByDescription(String description)
    {
        return descriptionMap.get(description);
    }

    /**
     * List of valid Iso Country, shows 2 letter abbreviation and country human readable name
     */
    public static enum Country
    {
        AFGHANISTAN(" AF", "Afghanistan"),
        LAND_ISLANDS("AX", "land Islands"),
        ALBANIA("AL", "Albania"),
        ALGERIA("DZ", "Algeria"),
        AMERICAN_SAMOA("AS", "American Samoa"),
        ANDORRA("AD", "Andorra"),
        ANGOLA("AO", "Angola"),
        ANGUILLA("AI", "Anguilla"),
        ANTARCTICA("AQ", "Antarctica"),
        ANTIGUA_AND_BARBUDA("AG", "Antigua and Barbuda"),
        ARGENTINA("AR", "Argentina"),
        ARMENIA("AM", "Armenia"),
        ARUBA("AW", "Aruba"),
        AUSTRALIA("AU", "Australia"),
        AUSTRIA("AT", "Austria"),
        AZERBAIJAN("AZ", "Azerbaijan"),
        BAHAMAS("BS", "Bahamas"),
        BAHRAIN("BH", "Bahrain"),
        BANGLADESH("BD", "Bangladesh"),
        BARBADOS("BB", "Barbados"),
        BELARUS("BY", "Belarus"),
        BELGIUM("BE", "Belgium"),
        BELIZE("BZ", "Belize"),
        BENIN("BJ", "Benin"),
        BERMUDA("BM", "Bermuda"),
        BHUTAN("BT", "Bhutan"),
        BOLIVIA("BO", "Bolivia"),
        BOSNIA_AND_HERZEGOVINA("BA", "Bosnia and herzegovina"),
        BOTSWANA("BW", "Botswana"),
        BOUVET_ISLAND("BV", "Bouvet_Island"),
        BRAZIL("BR", "Brazil"),
        BRITISH_INDIAN_OCEAN_TERRITORY("IO", "British Indian Ocean Territory"),
        BRUNEI_DARUSSALAM("BN", "Brunei Darussalam"),
        BULGARIA("BG", "Bulgaria"),
        BURKINA_FASO("BF", "Burkina Faso"),
        BURUNDI("BI", "Burundi"),
        CAMBODIA("KH", "Cambodia"),
        CAMEROON("CM", "Cameroon"),
        CANADA("CA", "Canada"),
        CAPE_VERDE("CV", "Cape Verde"),
        CAYMAN_ISLANDS("KY", "Cayman Islands"),
        CENTRAL_AFRICAN_REPUBLIC("CF", "Central African Republic"),
        CHAD("TD", "Chad"),
        CHILE("CL", "Chile"),
        CHINA("CN", "China"),
        CHRISTMAS_ISLAND("CX", "Christmas Island"),
        COCOS_KEELING_ISLANDS("CC", "Cocos Keeling Islands"),
        COLOMBIA("CO", "Colombia"),
        COMOROS("KM", "Comoros"),
        CONGO("CG", "Congo"),
        THE_DEMOCRATIC_REPUBLIC_OF_CONGO("CD", "The Democratic Republic Of Congo"),
        COOK_ISLANDS("CK", "Cook Islands"),
        COSTA_RICA("CR", "Costa Rica"),
        CTE_D_IVOIRE("CI", "Ivory Coast"),
        CROATIA("HR", "Croatia"),
        CUBA("CU", "Cuba"),
        CYPRUS("CY", "Cyprus"),
        CZECH_REPUBLIC("CZ", "Czech Republic"),
        DENMARK("DK", "Denmark"),
        DJIBOUTI("DJ", "Djibouti"),
        DOMINICA("DM", "Dominica"),
        DOMINICAN_REPUBLIC("DO", "Dominican Republic"),
        ECUADOR("EC", "Ecuador"),
        EGYPT("EG", "Egypt"),
        EL_SALVADOR("SV", "El Salvador"),
        EQUATORIAL_GUINEA("GQ", "Equatorial Guinea"),
        ERITREA("ER", "Eritrea"),
        ESTONIA("EE", "Estonia"),
        ETHIOPIA("ET", "Ethiopia"),
        FALKLAND_ISLANDS("FK", "Falkland Islands"),
        FAROE_ISLANDS("FO", "Faroe Islands"),
        FIJI("FJ", "Fiji"),
        FINLAND("FI", "Finland"),
        FRANCE("FR", "France"),
        FRENCH_GUIANA("GF", "French Guiana"),
        FRENCH_POLYNESIA("PF", "French Polynesia"),
        FRENCH_SOUTHERN_TERRITORIES("TF", "French Southern Territories"),
        GABON("GA", "Gabon"),
        GAMBIA("GM", "Gambia"),
        GEORGIA("GE", "Georgia"),
        GERMANY("DE", "Germany"),
        GHANA("GH", "Ghana"),
        GIBRALTAR("GI", "Gibraltar"),
        GREECE("GR", "Greece"),
        GREENLAND("GL", "Greenland"),
        GRENADA("GD", "Grenada"),
        GUADELOUPE("GP", "Guadeloupe"),
        GUAM("GU", "Guam"),
        GUATEMALA("GT", "Guatemala"),
        GUERNSEY("GG", "Guernsey"),
        GUINEA("GN", "Guinea"),
        GUINEA_BISSAU("GW", "Guinea_Bissau"),
        GUYANA("GY", "Guyana"),
        HAITI("HT", "Haiti"),
        HEARD_ISLAND_AND_MCDONALD_ISLANDS("HM", "Heard Island and Mcdonald Islands"),
        HONDURAS("HN", "Honduras"),
        HONG_KONG("HK", "Hong_Kong"),
        HUNGARY("HU", "Hungary"),
        ICELAND("IS", "Iceland"),
        INDIA("IN", "India"),
        INDONESIA("ID", "Indonesia"),
        IRAN("IR", "Iran"),
        IRAQ("IQ", "Iraq"),
        IRELAND("IE", "Ireland"),
        ISLE_OF_MAN("IM", "Isle Of Man"),<commit_msg>Hong Kong shoudlnt have underscore in description<commit_after>package org.jaudiotagger.tag.reference;

import java.util.HashMap;
import java.util.Map;


/**
 * Represents the ISO 3166-1 Country List with ISO 3166-1-alpha-2 code
 * <p/>
 * Contains an enum  of countries, their two letter code and description
 * with additional method to allow an enum to be found by its two letter code or its description.
 * More details at http://www.iso.org/iso/country_codes/iso_3166_code_lists/english_country_names_and_code_elements.htm#c
 */
public class ISOCountry
{
    private static Map<String, Country> codeMap;
    private static Map<String, Country> descriptionMap;

    static
    {
        codeMap = new HashMap<String, Country>();
        for (Country country : Country.values())
        {
            codeMap.put(country.code, country);
        }

        descriptionMap = new HashMap<String, Country>();
        for (Country country : Country.values())
        {
            descriptionMap.put(country.description, country);
        }

    }

    /**
     * @param code
     * @return enum with this two letter code
     */
    public static Country getCountryByCode(String code)
    {
        return codeMap.get(code);
    }

    /**
     * @param description
     * @return enum with this description
     */
    public static Country getCountryByDescription(String description)
    {
        return descriptionMap.get(description);
    }

    /**
     * List of valid Iso Country, shows 2 letter abbreviation and country human readable name
     */
    public static enum Country
    {
        AFGHANISTAN(" AF", "Afghanistan"),
        LAND_ISLANDS("AX", "land Islands"),
        ALBANIA("AL", "Albania"),
        ALGERIA("DZ", "Algeria"),
        AMERICAN_SAMOA("AS", "American Samoa"),
        ANDORRA("AD", "Andorra"),
        ANGOLA("AO", "Angola"),
        ANGUILLA("AI", "Anguilla"),
        ANTARCTICA("AQ", "Antarctica"),
        ANTIGUA_AND_BARBUDA("AG", "Antigua and Barbuda"),
        ARGENTINA("AR", "Argentina"),
        ARMENIA("AM", "Armenia"),
        ARUBA("AW", "Aruba"),
        AUSTRALIA("AU", "Australia"),
        AUSTRIA("AT", "Austria"),
        AZERBAIJAN("AZ", "Azerbaijan"),
        BAHAMAS("BS", "Bahamas"),
        BAHRAIN("BH", "Bahrain"),
        BANGLADESH("BD", "Bangladesh"),
        BARBADOS("BB", "Barbados"),
        BELARUS("BY", "Belarus"),
        BELGIUM("BE", "Belgium"),
        BELIZE("BZ", "Belize"),
        BENIN("BJ", "Benin"),
        BERMUDA("BM", "Bermuda"),
        BHUTAN("BT", "Bhutan"),
        BOLIVIA("BO", "Bolivia"),
        BOSNIA_AND_HERZEGOVINA("BA", "Bosnia and herzegovina"),
        BOTSWANA("BW", "Botswana"),
        BOUVET_ISLAND("BV", "Bouvet_Island"),
        BRAZIL("BR", "Brazil"),
        BRITISH_INDIAN_OCEAN_TERRITORY("IO", "British Indian Ocean Territory"),
        BRUNEI_DARUSSALAM("BN", "Brunei Darussalam"),
        BULGARIA("BG", "Bulgaria"),
        BURKINA_FASO("BF", "Burkina Faso"),
        BURUNDI("BI", "Burundi"),
        CAMBODIA("KH", "Cambodia"),
        CAMEROON("CM", "Cameroon"),
        CANADA("CA", "Canada"),
        CAPE_VERDE("CV", "Cape Verde"),
        CAYMAN_ISLANDS("KY", "Cayman Islands"),
        CENTRAL_AFRICAN_REPUBLIC("CF", "Central African Republic"),
        CHAD("TD", "Chad"),
        CHILE("CL", "Chile"),
        CHINA("CN", "China"),
        CHRISTMAS_ISLAND("CX", "Christmas Island"),
        COCOS_KEELING_ISLANDS("CC", "Cocos Keeling Islands"),
        COLOMBIA("CO", "Colombia"),
        COMOROS("KM", "Comoros"),
        CONGO("CG", "Congo"),
        THE_DEMOCRATIC_REPUBLIC_OF_CONGO("CD", "The Democratic Republic Of Congo"),
        COOK_ISLANDS("CK", "Cook Islands"),
        COSTA_RICA("CR", "Costa Rica"),
        CTE_D_IVOIRE("CI", "Ivory Coast"),
        CROATIA("HR", "Croatia"),
        CUBA("CU", "Cuba"),
        CYPRUS("CY", "Cyprus"),
        CZECH_REPUBLIC("CZ", "Czech Republic"),
        DENMARK("DK", "Denmark"),
        DJIBOUTI("DJ", "Djibouti"),
        DOMINICA("DM", "Dominica"),
        DOMINICAN_REPUBLIC("DO", "Dominican Republic"),
        ECUADOR("EC", "Ecuador"),
        EGYPT("EG", "Egypt"),
        EL_SALVADOR("SV", "El Salvador"),
        EQUATORIAL_GUINEA("GQ", "Equatorial Guinea"),
        ERITREA("ER", "Eritrea"),
        ESTONIA("EE", "Estonia"),
        ETHIOPIA("ET", "Ethiopia"),
        FALKLAND_ISLANDS("FK", "Falkland Islands"),
        FAROE_ISLANDS("FO", "Faroe Islands"),
        FIJI("FJ", "Fiji"),
        FINLAND("FI", "Finland"),
        FRANCE("FR", "France"),
        FRENCH_GUIANA("GF", "French Guiana"),
        FRENCH_POLYNESIA("PF", "French Polynesia"),
        FRENCH_SOUTHERN_TERRITORIES("TF", "French Southern Territories"),
        GABON("GA", "Gabon"),
        GAMBIA("GM", "Gambia"),
        GEORGIA("GE", "Georgia"),
        GERMANY("DE", "Germany"),
        GHANA("GH", "Ghana"),
        GIBRALTAR("GI", "Gibraltar"),
        GREECE("GR", "Greece"),
        GREENLAND("GL", "Greenland"),
        GRENADA("GD", "Grenada"),
        GUADELOUPE("GP", "Guadeloupe"),
        GUAM("GU", "Guam"),
        GUATEMALA("GT", "Guatemala"),
        GUERNSEY("GG", "Guernsey"),
        GUINEA("GN", "Guinea"),
        GUINEA_BISSAU("GW", "Guinea_Bissau"),
        GUYANA("GY", "Guyana"),
        HAITI("HT", "Haiti"),
        HEARD_ISLAND_AND_MCDONALD_ISLANDS("HM", "Heard Island and Mcdonald Islands"),
        HONDURAS("HN", "Honduras"),
        HONG_KONG("HK", "Hong Kong"),
        HUNGARY("HU", "Hungary"),
        ICELAND("IS", "Iceland"),
        INDIA("IN", "India"),
        INDONESIA("ID", "Indonesia"),
        IRAN("IR", "Iran"),
        IRAQ("IQ", "Iraq"),
        IRELAND("IE", "Ireland"),
        ISLE_OF_MAN("IM", "Isle Of Man"),
{'fraction_non_alphanumeric': 0.17133847231955152, 'fraction_numerical': 0.002803083391730904, 'mean_word_length': 2.748194353250164, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '6954644', 'n_tokens_mistral': 4318, 'n_tokens_neox': 3967, 'n_words': 774}