From ffd520f415d7cb58d88401641b9f55c421c5d845 Mon Sep 17 00:00:00 2001 From: Dan Minor Date: Mon, 7 Jun 2021 15:13:17 -0400 Subject: [PATCH] Add canonicalize method to LocaleCanonicalizer (#747) Add canonicalize method to LocaleCanonicalizer --- components/locale_canonicalizer/README.md | 14 + .../fixtures/uncanonicalized-locales.json | 88 + .../benches/locale_canonicalizer.rs | 63 +- components/locale_canonicalizer/src/lib.rs | 14 + .../src/locale_canonicalizer.rs | 418 +- .../locale_canonicalizer/src/provider.rs | 28 +- .../tests/fixtures/canonicalize.json | 444 ++ .../tests/fixtures/mod.rs | 3 +- .../tests/locale_canonicalizer.rs | 35 +- .../locid/src/extensions/unicode/key.rs | 17 + .../locid/src/extensions/unicode/keywords.rs | 40 + components/locid/src/subtags/region.rs | 16 + provider/cldr/src/transform/aliases.rs | 419 ++ provider/cldr/src/transform/mod.rs | 14 + provider/core/src/resource.rs | 13 +- provider/testdata/Cargo.toml | 1 + .../cldr/cldr-core/supplemental/aliases.json | 5216 +++++++++++++++++ .../testdata/data/json/aliases/aliases@1.json | 3868 ++++++++++++ 18 files changed, 10696 insertions(+), 15 deletions(-) create mode 100644 components/locale_canonicalizer/benches/fixtures/uncanonicalized-locales.json create mode 100644 components/locale_canonicalizer/tests/fixtures/canonicalize.json create mode 100644 provider/cldr/src/transform/aliases.rs create mode 100644 provider/testdata/data/cldr/cldr-core/supplemental/aliases.json create mode 100644 provider/testdata/data/json/aliases/aliases@1.json diff --git a/components/locale_canonicalizer/README.md b/components/locale_canonicalizer/README.md index 31614e3c917..c06b161fb6e 100644 --- a/components/locale_canonicalizer/README.md +++ b/components/locale_canonicalizer/README.md @@ -55,6 +55,20 @@ assert_eq!(lc.minimize(&mut locale), CanonicalizationResult::Unmodified); assert_eq!(locale.to_string(), "zh"); ``` +```rust +use icu_locale_canonicalizer::{CanonicalizationResult, LocaleCanonicalizer}; +use icu_locid::Locale; + +let provider = icu_testdata::get_provider(); +let lc = LocaleCanonicalizer::new(&provider) + .expect("create failed"); + +let mut locale : Locale = "ja-Latn-fonipa-hepburn-heploc".parse() + .expect("parse failed"); +assert_eq!(lc.canonicalize(&mut locale), CanonicalizationResult::Modified); +assert_eq!(locale.to_string(), "ja-Latn-alalc97-fonipa"); +``` + [`ICU4X`]: ../icu/index.html [`CLDR`]: http://cldr.unicode.org/ [`UTS #35: Unicode LDML 3. Likely Subtags`]: https://www.unicode.org/reports/tr35/#Likely_Subtags. diff --git a/components/locale_canonicalizer/benches/fixtures/uncanonicalized-locales.json b/components/locale_canonicalizer/benches/fixtures/uncanonicalized-locales.json new file mode 100644 index 00000000000..18eadbce68e --- /dev/null +++ b/components/locale_canonicalizer/benches/fixtures/uncanonicalized-locales.json @@ -0,0 +1,88 @@ +[ + "cka", + "cze", + "gfx", + "sgn-BR", + "sgn-DD", + "tam", + "und-aaland", + "nob-bokmal", + "no-nynorsk", + "und-Qaai", + "en-554", + "en-084", + "art-lojban", + "zh-guoyu", + "zh-hakka", + "zh-xiang", + "aar-x-private", + "heb-x-private", + "ces", + "hy-arevela", + "hy-arevmda", + "cel-gaulish", + "ja-latn-hepburn-heploc", + "ja-Latn-fonipa-hepburn-heploc", + "und-Armn-SU", + "sh", + "sh-Cyrl", + "cnr", + "cnr-BA", + "ru-SU", + "ru-810", + "en-SU", + "en-810", + "und-SU", + "und-810", + "und-Latn-SU", + "und-Latn-810", + "hy-SU", + "hy-810", + "und-Armn-SU", + "und-Armn-810", + "sr-CS", + "sr-Latn-CS", + "sr-Cyrl-CS", + "az-NT", + "sl-t-sl-rozaj-biske-1994", + "DE-T-M0-DIN-K0-QWERTZ", + "en-t-m0-true", + "en-t-iw", + "und-u-rg-no23", + "und-u-rg-cn11", + "und-u-rg-cz10a", + "und-u-rg-fra", + "und-u-rg-frg", + "und-u-rg-lud", + "und-NO-u-rg-no23", + "und-CN-u-rg-cn11", + "und-CZ-u-rg-cz10a", + "und-FR-u-rg-fra", + "und-FR-u-rg-frg", + "und-u-rg-lud", + "und-u-sd-no23", + "und-u-sd-cn11", + "und-u-sd-cz10a", + "und-u-sd-fra", + "hy-arevela", + "hy-Armn-arevela", + "hy-AM-arevela", + "hy-arevela-fonipa", + "hy-fonipa-arevela", + "hy-arevmda", + "hy-Armn-arevmda", + "hy-AM-arevmda", + "hy-arevmda-fonipa", + "hy-fonipa-arevmda", + "ja-Latn-hepburn-heploc", + "ja-Latn-JP-hepburn-heploc", + "sv-aaland", + "el-polytoni", + "ja-Latn-alalc97-hepburn-heploc", + "ja-Latn-hepburn-alalc97-heploc", + "ja-Latn-hepburn-heploc-alalc97", + "ja-Latn-heploc-hepburn", + "ja-Latn-heploc", + "ja-Latn-aaland-heploc", + "ja-Latn-heploc-polytoni" +] diff --git a/components/locale_canonicalizer/benches/locale_canonicalizer.rs b/components/locale_canonicalizer/benches/locale_canonicalizer.rs index 5ca001ad828..ce5e28c65e8 100644 --- a/components/locale_canonicalizer/benches/locale_canonicalizer.rs +++ b/components/locale_canonicalizer/benches/locale_canonicalizer.rs @@ -8,6 +8,62 @@ use criterion::{criterion_group, criterion_main, Criterion}; use icu_locale_canonicalizer::LocaleCanonicalizer; use icu_locid::Locale; +fn canonicalize_bench(c: &mut Criterion) { + let provider = icu_testdata::get_provider(); + let lc = LocaleCanonicalizer::new(&provider).unwrap(); + + let mut group = c.benchmark_group("canonicalize"); + + let path = "./benches/fixtures/uncanonicalized-locales.json"; + let data: Vec = helpers::read_fixture(path).expect("Failed to read a fixture"); + + group.bench_function("create", |b| { + b.iter(|| { + let _: Vec = data.iter().map(|s| s.parse().unwrap()).collect(); + }) + }); + + group.bench_function("create+canonicalize", |b| { + b.iter(|| { + let locales: Vec = data.iter().map(|s| s.parse().unwrap()).collect(); + for locale in locales.iter() { + lc.canonicalize(&mut locale.clone()); + } + }) + }); + + group.finish(); +} + +fn canonicalize_noop_bench(c: &mut Criterion) { + let provider = icu_testdata::get_provider(); + let lc = LocaleCanonicalizer::new(&provider).unwrap(); + + let mut group = c.benchmark_group("canonicalize-noop"); + + // None of these locales require canonicalization, so this measures the cost of calling + // the canonicalizer on locales that will not be modified. + let path = "./benches/fixtures/locales.json"; + let data: Vec = helpers::read_fixture(path).expect("Failed to read a fixture"); + + group.bench_function("create", |b| { + b.iter(|| { + let _: Vec = data.iter().map(|s| s.parse().unwrap()).collect(); + }) + }); + + group.bench_function("create+canonicalize", |b| { + b.iter(|| { + let locales: Vec = data.iter().map(|s| s.parse().unwrap()).collect(); + for locale in locales.iter() { + lc.canonicalize(&mut locale.clone()); + } + }) + }); + + group.finish(); +} + fn maximize_bench(c: &mut Criterion) { let provider = icu_testdata::get_provider(); let lc = LocaleCanonicalizer::new(&provider).unwrap(); @@ -30,5 +86,10 @@ fn maximize_bench(c: &mut Criterion) { group.finish(); } -criterion_group!(benches, maximize_bench); +criterion_group!( + benches, + canonicalize_bench, + canonicalize_noop_bench, + maximize_bench +); criterion_main!(benches); diff --git a/components/locale_canonicalizer/src/lib.rs b/components/locale_canonicalizer/src/lib.rs index 80542f847ce..80e9435c06a 100644 --- a/components/locale_canonicalizer/src/lib.rs +++ b/components/locale_canonicalizer/src/lib.rs @@ -57,6 +57,20 @@ //! assert_eq!(locale.to_string(), "zh"); //! ``` //! +//! ``` +//! use icu_locale_canonicalizer::{CanonicalizationResult, LocaleCanonicalizer}; +//! use icu_locid::Locale; +//! +//! let provider = icu_testdata::get_provider(); +//! let lc = LocaleCanonicalizer::new(&provider) +//! .expect("create failed"); +//! +//! let mut locale : Locale = "ja-Latn-fonipa-hepburn-heploc".parse() +//! .expect("parse failed"); +//! assert_eq!(lc.canonicalize(&mut locale), CanonicalizationResult::Modified); +//! assert_eq!(locale.to_string(), "ja-Latn-alalc97-fonipa"); +//! ``` +//! //! [`ICU4X`]: ../icu/index.html //! [`CLDR`]: http://cldr.unicode.org/ //! [`UTS #35: Unicode LDML 3. Likely Subtags`]: https://www.unicode.org/reports/tr35/#Likely_Subtags. diff --git a/components/locale_canonicalizer/src/locale_canonicalizer.rs b/components/locale_canonicalizer/src/locale_canonicalizer.rs index 3c925f0c96d..5eaff7a0e68 100644 --- a/components/locale_canonicalizer/src/locale_canonicalizer.rs +++ b/components/locale_canonicalizer/src/locale_canonicalizer.rs @@ -3,8 +3,12 @@ // (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). use crate::provider::*; -use icu_locid::LanguageIdentifier; +use icu_locid::{ + extensions::unicode::{Key, Value}, + subtags, LanguageIdentifier, Locale, +}; use icu_provider::prelude::*; +use tinystr::{tinystr4, TinyStr4, TinyStr8}; /// Used to track the result of a canonicalization operation that potentially modifies its argument in place. #[derive(Debug, PartialEq)] @@ -14,7 +18,81 @@ pub enum CanonicalizationResult { } pub struct LocaleCanonicalizer<'a> { + aliases: DataPayload<'a, 'a, AliasesV1Marker>, likely_subtags: DataPayload<'a, 'a, LikelySubtagsV1Marker>, + extension_keys: Vec, +} + +#[inline] +fn uts35_rule_matches(source: &Locale, ruletype: &LanguageIdentifier) -> bool { + (ruletype.language.is_empty() || ruletype.language == source.id.language) + && (ruletype.script.is_none() || ruletype.script == source.id.script) + && (ruletype.region.is_none() || ruletype.region == source.id.region) + && (ruletype.variants.is_empty() + || ruletype + .variants + .iter() + .all(|v| source.id.variants.contains(v))) +} + +fn uts35_replacement( + source: &mut Locale, + ruletype_has_language: bool, + ruletype_has_script: bool, + ruletype_has_region: bool, + ruletype_variants: Option<&subtags::Variants>, + replacement: &LanguageIdentifier, +) { + if ruletype_has_language || (source.id.language.is_empty() && !replacement.language.is_empty()) + { + source.id.language = replacement.language; + } + if ruletype_has_script || (source.id.script.is_none() && replacement.script.is_some()) { + source.id.script = replacement.script; + } + if ruletype_has_region || (source.id.region.is_none() && replacement.region.is_some()) { + source.id.region = replacement.region; + } + if let Some(ruletype_variants) = ruletype_variants { + // The rule matches if the ruletype variants are a subset of the source variants. + // This means ja-Latn-fonipa-hepburn-heploc matches against the rule for + // hepburn-heploc and is canonicalized to ja-Latn-alalc97-fonipa + let mut variants: Vec = source + .id + .variants + .iter() + .filter(|x| !ruletype_variants.contains(x)) + .copied() + .collect(); + for variant in replacement.variants.iter() { + variants.push(*variant); + } + variants.sort(); + variants.dedup(); + source.id.variants = subtags::Variants::from_vec_unchecked(variants); + } +} + +#[inline] +fn uts35_check_language_rules( + locale: &mut Locale, + alias_data: &DataPayload, +) -> CanonicalizationResult { + let maybe_lang: Option = locale.id.language.into(); + if let Some(lang) = maybe_lang { + let aliases = if lang.len() == 2 { + &alias_data.get().language_len2 + } else { + &alias_data.get().language_len3 + }; + + if let Ok(index) = aliases.binary_search_by_key(&lang, |alias| alias.0) { + uts35_replacement(locale, true, false, false, None, &aliases[index].1); + return CanonicalizationResult::Modified; + } + } + + CanonicalizationResult::Unmodified } #[inline] @@ -47,18 +125,284 @@ macro_rules! maximize_locale { impl LocaleCanonicalizer<'_> { /// A constructor which takes a [`DataProvider`] and creates a [`LocaleCanonicalizer`]. - pub fn new<'d>( - provider: &(impl DataProvider<'d, 'd, LikelySubtagsV1Marker> + ?Sized), - ) -> Result, DataError> { - let payload: DataPayload = provider + pub fn new<'d, P>(provider: &P) -> Result, DataError> + where + P: DataProvider<'d, 'd, AliasesV1Marker> + + DataProvider<'d, 'd, LikelySubtagsV1Marker> + + ?Sized, + { + let extension_keys = vec![ + Key::from_tinystr4_unchecked(tinystr4!("rg")), + Key::from_tinystr4_unchecked(tinystr4!("sd")), + ]; + let aliases: DataPayload = + // The `rg` region override and `sd` regional subdivision keys may contain + // language codes that require canonicalization. + provider + .load_payload(&DataRequest::from(key::ALIASES_V1))? + .take_payload()? + ; + + let likely_subtags: DataPayload = provider .load_payload(&DataRequest::from(key::LIKELY_SUBTAGS_V1))? .take_payload()?; Ok(LocaleCanonicalizer { - likely_subtags: payload, + aliases, + likely_subtags, + extension_keys, }) } + /// The canonicalize method potentially updates a passed in locale in place + /// depending up the results of running the canonicalization algorithm + /// from http://unicode.org/reports/tr35/#LocaleId_Canonicalization + /// + /// Some BCP47 canonicalization data is not part of the CLDR json package. Because + /// of this, some canonicalizations are not performed, e.g. the canonicalization of + /// `und-u-ca-islamicc` to `und-u-ca-islamic-civil`. This will be fixed in a future + /// release once the missing data has been added to the CLDR json data. + /// + /// # Examples + /// + /// ``` + /// use icu_locale_canonicalizer::{CanonicalizationResult, LocaleCanonicalizer}; + /// use icu_locid::Locale; + /// + /// let provider = icu_testdata::get_provider(); + /// let lc = LocaleCanonicalizer::new(&provider) + /// .expect("create failed"); + /// + /// let mut locale : Locale = "ja-Latn-fonipa-hepburn-heploc".parse() + /// .expect("parse failed"); + /// assert_eq!(lc.canonicalize(&mut locale), CanonicalizationResult::Modified); + /// assert_eq!(locale.to_string(), "ja-Latn-alalc97-fonipa"); + /// ``` + /// + pub fn canonicalize(&self, locale: &mut Locale) -> CanonicalizationResult { + let mut result = CanonicalizationResult::Unmodified; + + // This loops until we get a 'fixed point', where applying the rules do not + // result in any more changes. + loop { + let language_aliases = if locale.id.variants.is_empty() { + &self.aliases.get().language + } else { + &self.aliases.get().language_variants + }; + + // This is a linear search due to the ordering imposed by the canonicalization + // rules, where rules with more variants should be considered first. With the + // current data in CLDR, we will only do this for locales which have variants, + // and there are fewer than 20 rules to consider. In benchmarking, the run + // time of this loop was negligible. + let mut matched = false; + for rule in language_aliases.iter() { + if uts35_rule_matches(locale, &rule.0) { + uts35_replacement( + locale, + !rule.0.language.is_empty(), + rule.0.script.is_some(), + rule.0.region.is_some(), + Some(&rule.0.variants), + &rule.1, + ); + result = CanonicalizationResult::Modified; + matched = true; + break; + } + } + + if matched { + continue; + } + + if !locale.id.language.is_empty() { + // If the region is specified, check sgn-region rules first + if let Some(region) = locale.id.region { + if locale.id.language == "sgn" { + if let Ok(index) = self + .aliases + .get() + .sgn_region + .binary_search_by_key(®ion.into(), |alias| alias.0) + { + uts35_replacement( + locale, + true, + false, + true, + None, + &self.aliases.get().sgn_region[index].1, + ); + result = CanonicalizationResult::Modified; + continue; + } + } + } + + if uts35_check_language_rules(locale, &self.aliases) + == CanonicalizationResult::Modified + { + result = CanonicalizationResult::Modified; + continue; + } + } + + if let Some(script) = locale.id.script { + if let Ok(index) = self + .aliases + .get() + .script + .binary_search_by_key(&script.into(), |alias| alias.0) + { + if let Ok(replacement) = self.aliases.get().script[index].1.parse() { + locale.id.script = Some(replacement); + result = CanonicalizationResult::Modified; + continue; + } + } + } + + if let Some(region) = locale.id.region { + let region_aliases = if region.is_alphabetic() { + &self.aliases.get().region_alpha + } else { + &self.aliases.get().region_num + }; + + if let Ok(index) = + region_aliases.binary_search_by_key(®ion.into(), |alias| alias.0) + { + if let Ok(replacement) = region_aliases[index].1.parse() { + locale.id.region = Some(replacement); + result = CanonicalizationResult::Modified; + continue; + } + } + + if let Ok(index) = self + .aliases + .get() + .complex_region + .binary_search_by_key(®ion.into(), |alias| alias.0) + { + let rule = &self.aliases.get().complex_region[index]; + + let mut for_likely = LanguageIdentifier { + language: locale.id.language, + script: locale.id.script, + region: None, + variants: subtags::Variants::default(), + }; + + let replacement = + if self.maximize(&mut for_likely) == CanonicalizationResult::Modified { + if let Some(likely_region) = for_likely.region { + let as_tinystr4: TinyStr4 = likely_region.into(); + if let Some(region) = + rule.1.iter().find(|region| as_tinystr4 == **region) + { + region + } else { + &rule.1[0] + } + } else { + &rule.1[0] + } + } else { + &rule.1[0] + }; + if let Ok(replacement) = replacement.parse::() { + locale.id.region = Some(replacement); + result = CanonicalizationResult::Modified; + continue; + } + } + } + + if !locale.id.variants.is_empty() { + let mut modified = Vec::new(); + let mut unmodified = Vec::new(); + for variant in locale.id.variants.iter() { + let variant_as_tinystr: TinyStr8 = (*variant).into(); + if let Ok(index) = self + .aliases + .get() + .variant + .binary_search_by_key(&variant_as_tinystr, |alias| alias.0) + { + if let Ok(updated) = subtags::Variant::from_bytes( + self.aliases.get().variant[index].1.as_bytes(), + ) { + modified.push(updated); + } + } else { + unmodified.push(variant); + } + } + + if !modified.is_empty() { + for variant in unmodified { + modified.push(*variant); + } + modified.sort(); + modified.dedup(); + locale.id.variants = subtags::Variants::from_vec_unchecked(modified); + result = CanonicalizationResult::Modified; + continue; + } + } + + // Nothing matched in this iteration, we're done. + break; + } + + // Handle Locale extensions in their own loops, because these rules do not interact + // with each other. + if let Some(lang) = &locale.extensions.transform.lang { + let mut tlang: Locale = lang.clone().into(); + let mut matched = false; + loop { + if uts35_check_language_rules(&mut tlang, &self.aliases) + == CanonicalizationResult::Modified + { + result = CanonicalizationResult::Modified; + matched = true; + continue; + } + + break; + } + + if matched { + locale.extensions.transform.lang = Some(tlang.id); + } + } + + for key in self.extension_keys.iter() { + if let Some(value) = locale.extensions.unicode.keywords.get_mut(key) { + if let Ok(value_as_tinystr) = value.to_string().parse::() { + if let Ok(index) = self + .aliases + .get() + .subdivision + .binary_search_by_key(&value_as_tinystr, |alias| alias.0) + { + if let Ok(modified_value) = + Value::from_bytes(&self.aliases.get().subdivision[index].1.as_bytes()) + { + *value = modified_value; + result = CanonicalizationResult::Modified; + } + } + } + } + } + + result + } + /// The maximize method potentially updates a passed in locale in place /// depending up the results of running the 'Add Likely Subtags' algorithm /// from https://www.unicode.org/reports/tr35/#Likely_Subtags. @@ -202,3 +546,65 @@ impl LocaleCanonicalizer<'_> { } } } + +#[test] +fn test_uts35_rule_matches() { + assert!(uts35_rule_matches( + &"ja".parse().unwrap(), + &LanguageIdentifier::und() + )); + + assert!(uts35_rule_matches( + &"und-heploc-hepburn".parse().unwrap(), + &"und-hepburn".parse().unwrap() + )); + + assert!(uts35_rule_matches( + &"ja-heploc-hepburn".parse().unwrap(), + &"und-hepburn".parse().unwrap() + )); + + assert!(!uts35_rule_matches( + &"ja-hepburn".parse().unwrap(), + &"und-hepburn-heploc".parse().unwrap() + )); +} + +#[test] +fn test_uts35_replacement() { + let mut locale = "ja-Latn-fonipa-hepburn-heploc".parse().unwrap(); + let ruletype: LanguageIdentifier = "und-hepburn-heploc".parse().unwrap(); + uts35_replacement( + &mut locale, + !ruletype.language.is_empty(), + ruletype.script.is_some(), + ruletype.region.is_some(), + Some(&ruletype.variants), + &"und-alalc97".parse().unwrap(), + ); + assert_eq!(locale, "ja-Latn-alalc97-fonipa".parse::().unwrap()); + + let mut locale = "sgn-DD".parse().unwrap(); + let ruletype: LanguageIdentifier = "und-DD".parse().unwrap(); + uts35_replacement( + &mut locale, + !ruletype.language.is_empty(), + ruletype.script.is_some(), + ruletype.region.is_some(), + Some(&ruletype.variants), + &"und-DE".parse().unwrap(), + ); + assert_eq!(locale, "sgn-DE".parse::().unwrap()); + + let mut locale = "sgn-DE".parse().unwrap(); + let ruletype: LanguageIdentifier = "sgn-DE".parse().unwrap(); + uts35_replacement( + &mut locale, + !ruletype.language.is_empty(), + ruletype.script.is_some(), + ruletype.region.is_some(), + None, + &"gsg".parse().unwrap(), + ); + assert_eq!(locale, "gsg".parse::().unwrap()); +} diff --git a/components/locale_canonicalizer/src/provider.rs b/components/locale_canonicalizer/src/provider.rs index 03b6f361903..2e3fb4c2949 100644 --- a/components/locale_canonicalizer/src/provider.rs +++ b/components/locale_canonicalizer/src/provider.rs @@ -7,13 +7,39 @@ //! Read more about data providers: [`icu_provider`] use icu_locid::LanguageIdentifier; -use tinystr::TinyStr4; +use tinystr::{TinyStr4, TinyStr8}; pub mod key { use icu_provider::{resource_key, ResourceKey}; + pub const ALIASES_V1: ResourceKey = resource_key!(aliases, "aliases", 1); pub const LIKELY_SUBTAGS_V1: ResourceKey = resource_key!(likelysubtags, "likelysubtags", 1); } +#[derive(Debug, PartialEq, Clone, Default)] +#[cfg_attr( + feature = "provider_serde", + derive(serde::Serialize, serde::Deserialize) +)] +pub struct AliasesV1 { + pub language: Vec<(LanguageIdentifier, LanguageIdentifier)>, + pub language_variants: Vec<(LanguageIdentifier, LanguageIdentifier)>, + pub sgn_region: Vec<(TinyStr4, LanguageIdentifier)>, + pub language_len2: Vec<(TinyStr4, LanguageIdentifier)>, + pub language_len3: Vec<(TinyStr4, LanguageIdentifier)>, + pub script: Vec<(TinyStr4, TinyStr4)>, + pub region_alpha: Vec<(TinyStr4, TinyStr4)>, + pub region_num: Vec<(TinyStr4, TinyStr4)>, + pub complex_region: Vec<(TinyStr4, Vec)>, + pub variant: Vec<(TinyStr8, TinyStr8)>, + pub subdivision: Vec<(TinyStr8, TinyStr8)>, +} + +icu_provider::impl_data_marker_no_lifetime!( + AliasesV1, + /// Marker type for [`AliasesV1`] + AliasesV1Marker +); + #[derive(Debug, PartialEq, Clone, Default)] #[cfg_attr( feature = "provider_serde", diff --git a/components/locale_canonicalizer/tests/fixtures/canonicalize.json b/components/locale_canonicalizer/tests/fixtures/canonicalize.json new file mode 100644 index 00000000000..7c2d5a49d0a --- /dev/null +++ b/components/locale_canonicalizer/tests/fixtures/canonicalize.json @@ -0,0 +1,444 @@ +[ + { + "input": "es", + "output": "es" + }, + { + "input": "en-CA", + "output": "en-CA" + }, + { + "input": "cka", + "output": "cmr" + }, + { + "input": "cze", + "output": "cs" + }, + { + "input": "gfx", + "output": "vaj" + }, + { + "input": "sgn-BR", + "output": "bzs" + }, + { + "input": "sgn-DD", + "output": "gsg" + }, + { + "input": "tam", + "output": "ta" + }, + { + "input": "und-aaland", + "output": "und-AX" + }, + { + "input": "nob-bokmal", + "output": "nb" + }, + { + "input": "no-nynorsk", + "output": "nn" + }, + { + "input": "und-Qaai", + "output": "und-Zinh" + }, + { + "input": "en-554", + "output": "en-NZ" + }, + { + "input": "en-084", + "output": "en-BZ" + }, + { + "input": "art-lojban", + "output": "jbo" + }, + { + "input": "zh-guoyu", + "output": "zh" + }, + { + "input": "zh-hakka", + "output": "hak" + }, + { + "input": "zh-xiang", + "output": "hsn" + }, + { + "input": "aar-x-private", + "output": "aa-x-private" + }, + { + "input": "heb-x-private", + "output": "he-x-private" + }, + { + "input": "ces", + "output": "cs" + }, + { + "input": "hy-arevela", + "output": "hy" + }, + { + "input": "hy-arevmda", + "output": "hyw" + }, + { + "input": "cel-gaulish", + "output": "xtg" + }, + { + "input": "ja-latn-hepburn-heploc", + "output": "ja-Latn-alalc97" + }, + { + "input": "ja-Latn-fonipa-hepburn-heploc", + "output": "ja-Latn-alalc97-fonipa" + }, + { + "input": "und-Armn-SU", + "output": "und-Armn-AM" + }, + { + "input": "sh", + "output": "sr-Latn" + }, + { + "input": "sh-Cyrl", + "output": "sr-Cyrl" + }, + { + "input": "cnr", + "output": "sr-ME" + }, + { + "input": "cnr-BA", + "output": "sr-BA" + }, + { + "input": "ru-SU", + "output": "ru-RU" + }, + { + "input": "ru-810", + "output": "ru-RU" + }, + { + "input": "en-SU", + "output": "en-RU" + }, + { + "input": "en-810", + "output": "en-RU" + }, + { + "input": "und-SU", + "output": "und-RU" + }, + { + "input": "und-810", + "output": "und-RU" + }, + { + "input": "und-Latn-SU", + "output": "und-Latn-RU" + }, + { + "input": "und-Latn-810", + "output": "und-Latn-RU" + }, + { + "input": "hy-SU", + "output": "hy-AM" + }, + { + "input": "hy-810", + "output": "hy-AM" + }, + { + "input": "und-Armn-SU", + "output": "und-Armn-AM" + }, + { + "input": "und-Armn-810", + "output": "und-Armn-AM" + }, + { + "input": "sr-CS", + "output": "sr-RS" + }, + { + "input": "sr-Latn-CS", + "output": "sr-Latn-RS" + }, + { + "input": "sr-Cyrl-CS", + "output": "sr-Cyrl-RS" + }, + { + "input": "az-NT", + "output": "az-SA" + }, + { + "input": "sl-t-sl-rozaj-biske-1994", + "output": "sl-t-sl-1994-biske-rozaj" + }, + { + "input": "DE-T-M0-DIN-K0-QWERTZ", + "output": "de-t-k0-qwertz-m0-din" + }, + { + "input": "en-t-m0-true", + "output": "en-t-m0-true" + }, + { + "input": "en-t-iw", + "output": "en-t-he" + }, + { + "input": "und-u-rg-no23", + "output": "und-u-rg-no50" + }, + { + "input": "und-u-rg-cn11", + "output": "und-u-rg-cnbj" + }, + { + "input": "und-u-rg-cz10a", + "output": "und-u-rg-cz110" + }, + { + "input": "und-u-rg-fra", + "output": "und-u-rg-frges" + }, + { + "input": "und-u-rg-frg", + "output": "und-u-rg-frges" + }, + { + "input": "und-u-rg-lud", + "output": "und-u-rg-lucl" + }, + { + "input": "und-NO-u-rg-no23", + "output": "und-NO-u-rg-no50" + }, + { + "input": "und-CN-u-rg-cn11", + "output": "und-CN-u-rg-cnbj" + }, + { + "input": "und-CZ-u-rg-cz10a", + "output": "und-CZ-u-rg-cz110" + }, + { + "input": "und-FR-u-rg-fra", + "output": "und-FR-u-rg-frges" + }, + { + "input": "und-FR-u-rg-frg", + "output": "und-FR-u-rg-frges" + }, + { + "input": "und-u-rg-lud", + "output": "und-u-rg-lucl" + }, + { + "input": "und-u-sd-no23", + "output": "und-u-sd-no50" + }, + { + "input": "und-u-sd-cn11", + "output": "und-u-sd-cnbj" + }, + { + "input": "und-u-sd-cz10a", + "output": "und-u-sd-cz110" + }, + { + "input": "und-u-sd-fra", + "output": "und-u-sd-frges" + }, + { + "input": "hy-arevela", + "output": "hy" + }, + { + "input": "hy-Armn-arevela", + "output": "hy-Armn" + }, + { + "input": "hy-AM-arevela", + "output": "hy-AM" + }, + { + "input": "hy-arevela-fonipa", + "output": "hy-fonipa" + }, + { + "input": "hy-fonipa-arevela", + "output": "hy-fonipa" + }, + { + "input": "hy-arevmda", + "output": "hyw" + }, + { + "input": "hy-Armn-arevmda", + "output": "hyw-Armn" + }, + { + "input": "hy-AM-arevmda", + "output": "hyw-AM" + }, + { + "input": "hy-arevmda-fonipa", + "output": "hyw-fonipa" + }, + { + "input": "hy-fonipa-arevmda", + "output": "hyw-fonipa" + }, + { + "input": "ja-Latn-hepburn-heploc", + "output": "ja-Latn-alalc97" + }, + { + "input": "ja-Latn-JP-hepburn-heploc", + "output": "ja-Latn-JP-alalc97" + }, + { + "input": "sv-aaland", + "output": "sv-AX" + }, + { + "input": "el-polytoni", + "output": "el-polyton" + }, + { + "input": "ja-Latn-alalc97-hepburn-heploc", + "output": "ja-Latn-alalc97" + }, + { + "input": "ja-Latn-hepburn-alalc97-heploc", + "output": "ja-Latn-alalc97" + }, + { + "input": "ja-Latn-hepburn-heploc-alalc97", + "output": "ja-Latn-alalc97" + }, + { + "input": "ja-Latn-heploc-hepburn", + "output": "ja-Latn-alalc97" + }, + { + "input": "ja-Latn-heploc", + "output": "ja-Latn-alalc97" + }, + { + "input": "ja-Latn-aaland-heploc", + "output": "ja-Latn-AX-alalc97" + }, + { + "input": "ja-Latn-heploc-polytoni", + "output": "ja-Latn-alalc97-polyton" + }, + { + "input": "und-Latn-t-und-hani-m0-names", + "output": "und-Latn-t-und-hani-m0-prprname", + "disabled": true + }, + { + "input": "und-u-ca-ethiopic-amete-alem", + "output": "und-u-ca-ethioaa", + "disabled": true + }, + { + "input": "und-u-ca-islamicc", + "output": "und-u-ca-islamic-civil", + "disabled": true + }, + { + "input": "und-u-ks-primary", + "output": "und-u-ks-level1", + "disabled": true + }, + { + "input": "und-u-ks-tertiary", + "output": "und-u-ks-level3", + "disabled": true + }, + { + "input": "und-u-ms-imperial", + "output": "und-u-ms-uksystem", + "disabled": true + }, + { + "input": "und-u-kb-yes", + "output": "und-u-kb", + "disabled": true + }, + { + "input": "und-u-kc-yes", + "output": "und-u-k", + "disabled": true + }, + { + "input": "und-u-kh-yes", + "output": "und-u-kh", + "disabled": true + }, + { + "input": "und-u-kk-yes", + "output": "und-u-kk", + "disabled": true + }, + { + "input": "und-u-kn-yes", + "output": "und-u-kn", + "disabled": true + }, + { + "input": "und-u-ka-yes", + "output": "und-u-ka-yes", + "disabled": true + }, + { + "input": "und-u-tz-cnckg", + "output": "und-u-tz-cnsha", + "disabled": true + }, + { + "input": "und-u-tz-eire", + "output": "und-u-tz-iedub", + "disabled": true + }, + { + "input": "und-u-tz-est", + "output": "und-u-tz-utcw05", + "disabled": true + }, + { + "input": "und-u-tz-gmt0", + "output": "und-u-tz-gmt", + "disabled": true + }, + { + "input": "und-u-tz-uct", + "output": "und-u-tz-utc", + "disabled": true + }, + { + "input": "und-u-tz-zulu", + "output": "und-u-tz-utc", + "disabled": true + } +] \ No newline at end of file diff --git a/components/locale_canonicalizer/tests/fixtures/mod.rs b/components/locale_canonicalizer/tests/fixtures/mod.rs index 4318faf2eda..70dfb0381d3 100644 --- a/components/locale_canonicalizer/tests/fixtures/mod.rs +++ b/components/locale_canonicalizer/tests/fixtures/mod.rs @@ -5,7 +5,8 @@ use serde::Deserialize; #[derive(Deserialize)] -pub struct LikelySubtagsTest { +pub struct CanonicalizationTest { pub input: String, pub output: String, + pub disabled: Option, } diff --git a/components/locale_canonicalizer/tests/locale_canonicalizer.rs b/components/locale_canonicalizer/tests/locale_canonicalizer.rs index 44692b17eca..38afe838714 100644 --- a/components/locale_canonicalizer/tests/locale_canonicalizer.rs +++ b/components/locale_canonicalizer/tests/locale_canonicalizer.rs @@ -14,10 +14,13 @@ fn test_maximize() { let lc = LocaleCanonicalizer::new(&provider).unwrap(); let path = "./tests/fixtures/maximize.json"; - let testcases: Vec = + let testcases: Vec = helpers::read_fixture(path).expect("Failed to read a fixture"); for case in testcases { + if let Some(true) = case.disabled { + continue; + } let mut locale: Locale = case.input.parse().unwrap(); let unmodified = locale.clone(); let result = lc.maximize(&mut locale); @@ -36,10 +39,13 @@ fn test_minimize() { let lc = LocaleCanonicalizer::new(&provider).unwrap(); let path = "./tests/fixtures/minimize.json"; - let testcases: Vec = + let testcases: Vec = helpers::read_fixture(path).expect("Failed to read a fixture"); for case in testcases { + if let Some(true) = case.disabled { + continue; + } let mut locale: Locale = case.input.parse().unwrap(); let unmodified = locale.clone(); let result = lc.minimize(&mut locale); @@ -51,3 +57,28 @@ fn test_minimize() { } } } + +#[test] +fn test_canonicalize() { + let provider = icu_testdata::get_provider(); + let lc = LocaleCanonicalizer::new(&provider).unwrap(); + + let path = "./tests/fixtures/canonicalize.json"; + let testcases: Vec = + helpers::read_fixture(path).expect("Failed to read a fixture"); + + for case in testcases { + if let Some(true) = case.disabled { + continue; + } + let mut locale: Locale = case.input.parse().expect("Unable to parse input"); + let unmodified = locale.clone(); + let result = lc.canonicalize(&mut locale); + assert_eq!(locale.to_string(), case.output); + if result == CanonicalizationResult::Modified { + assert_ne!(locale, unmodified); + } else { + assert_eq!(locale, unmodified); + } + } +} diff --git a/components/locid/src/extensions/unicode/key.rs b/components/locid/src/extensions/unicode/key.rs index 7b5edcd7167..b1aefb815d3 100644 --- a/components/locid/src/extensions/unicode/key.rs +++ b/components/locid/src/extensions/unicode/key.rs @@ -54,6 +54,23 @@ impl Key { Ok(Self(key.to_ascii_lowercase())) } + /// A constructor which takes a TinyStr4 and produces a [`Key`] + /// without doing any checking. + /// + /// # Examples + /// + /// ``` + /// use icu::locid::extensions::unicode::Key; + /// use tinystr::tinystr4; + /// + /// let key = Key::from_tinystr4_unchecked(tinystr4!("ca")); + /// + /// assert_eq!(key, "ca"); + /// ``` + pub fn from_tinystr4_unchecked(key: TinyStr4) -> Self { + Self(key) + } + /// A helper function for displaying /// a [`Key`] subtag as a `&`[`str`]. /// diff --git a/components/locid/src/extensions/unicode/keywords.rs b/components/locid/src/extensions/unicode/keywords.rs index f71f1a9e848..147dd28d48b 100644 --- a/components/locid/src/extensions/unicode/keywords.rs +++ b/components/locid/src/extensions/unicode/keywords.rs @@ -132,6 +132,46 @@ impl Keywords { None } } + + /// Returns a mutable reference to the [`Value`] corresponding to the [`Key`]. + /// + /// + /// # Examples + /// + /// ``` + /// use icu::locid::extensions::unicode::{Keywords, Key, Value}; + /// + /// let key: Key = "ca".parse() + /// .expect("Failed to parse a Key."); + /// let value: Value = "buddhist".parse() + /// .expect("Failed to parse a Value."); + /// let mut keywords = Keywords::from_vec_unchecked(vec![(key, value)]); + /// + /// let key: Key = "ca".parse() + /// .expect("Failed to parse a Key."); + /// if let Some(value) = keywords.get_mut(key) { + /// *value = "gregory".parse() + /// .expect("Failed to parse a Value."); + /// } + /// assert_eq!( + /// keywords.get(&key).map(|v| v.to_string()), + /// Some("gregory".to_string()) + /// ); + /// ``` + pub fn get_mut(&mut self, key: Q) -> Option<&mut Value> + where + Q: Borrow, + { + if let Ok(idx) = self.binary_search_by_key(key.borrow(), |(key, _)| *key) { + if let Some(ref mut data) = self.0 { + Some(&mut data[idx].1) + } else { + None + } + } else { + None + } + } } impl_writeable_for_key_value!(Keywords, "ca", "islamic-civil", "aa", "aa"); diff --git a/components/locid/src/subtags/region.rs b/components/locid/src/subtags/region.rs index 3fec2bb8616..f0dc3889e3c 100644 --- a/components/locid/src/subtags/region.rs +++ b/components/locid/src/subtags/region.rs @@ -123,6 +123,22 @@ impl Region { pub fn as_str(&self) -> &str { self.0.as_str() } + + /// Returns true if the Region has an alphabetic code. + /// + /// # Examples + /// + /// ``` + /// use icu::locid::subtags::Region; + /// + /// let region = Region::from_bytes(b"us") + /// .expect("Parsing failed."); + /// + /// assert_eq!(region.is_alphabetic(), true); + /// ``` + pub fn is_alphabetic(&self) -> bool { + self.0.is_ascii_alphabetic() + } } impl FromStr for Region { diff --git a/provider/cldr/src/transform/aliases.rs b/provider/cldr/src/transform/aliases.rs new file mode 100644 index 00000000000..9df2b28b5e4 --- /dev/null +++ b/provider/cldr/src/transform/aliases.rs @@ -0,0 +1,419 @@ +// This file is part of ICU4X. For terms of use, please see the file +// called LICENSE at the top level of the ICU4X source tree +// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). + +use crate::error::Error; +use crate::reader::open_reader; +use crate::CldrPaths; +use icu_locale_canonicalizer::provider::*; +use icu_locid::{subtags, LanguageIdentifier}; +use icu_provider::iter::{IterableDataProviderCore, KeyedDataProvider}; +use icu_provider::prelude::*; +use std::convert::TryFrom; +use std::marker::PhantomData; +use tinystr::{TinyStr4, TinyStr8}; + +/// All keys that this module is able to produce. +pub const ALL_KEYS: [ResourceKey; 1] = [key::ALIASES_V1]; + +/// A data provider reading from CLDR JSON likely subtags rule files. +#[derive(PartialEq, Debug)] +pub struct AliasesProvider<'d> { + data: cldr_json::Resource, + _phantom: PhantomData<&'d ()>, // placeholder for when we need the lifetime param +} + +impl TryFrom<&dyn CldrPaths> for AliasesProvider<'_> { + type Error = Error; + fn try_from(cldr_paths: &dyn CldrPaths) -> Result { + let data: cldr_json::Resource = { + let path = cldr_paths + .cldr_core()? + .join("supplemental") + .join("aliases.json"); + serde_json::from_reader(open_reader(&path)?).map_err(|e| (e, path))? + }; + Ok(Self { + data, + _phantom: PhantomData, + }) + } +} + +impl<'d> TryFrom<&'d str> for AliasesProvider<'d> { + type Error = serde_json::error::Error; + /// Attempt to parse a JSON string. + fn try_from(s: &'d str) -> Result { + let data: cldr_json::Resource = serde_json::from_str(s)?; + Ok(Self { + data, + _phantom: PhantomData, + }) + } +} + +impl<'d> KeyedDataProvider for AliasesProvider<'d> { + fn supports_key(resc_key: &ResourceKey) -> Result<(), DataError> { + if resc_key.category != ResourceCategory::Aliases || resc_key.version != 1 { + return Err(resc_key.into()); + } + Ok(()) + } +} + +impl<'d, 's> DataProvider<'d, 's, AliasesV1Marker> for AliasesProvider<'d> { + fn load_payload( + &self, + req: &DataRequest, + ) -> Result, DataError> { + AliasesProvider::supports_key(&req.resource_path.key)?; + let langid = &req.resource_path.options.langid; + + // We treat searching for und as a request for all data. Other requests + // are not currently supported. + if langid.is_none() { + Ok(DataResponse { + metadata: DataResponseMetadata { + data_langid: langid.clone(), + }, + payload: Some(DataPayload::from_owned(AliasesV1::from(&self.data))), + }) + } else { + Err(DataError::UnavailableResourceOptions(req.clone())) + } + } +} + +icu_provider::impl_dyn_provider!(AliasesProvider<'d>, { + _ => AliasesV1Marker, +}, SERDE_SE, 'd, 's); + +impl<'d> IterableDataProviderCore for AliasesProvider<'d> { + fn supported_options_for_key( + &self, + _resc_key: &ResourceKey, + ) -> Result>, DataError> { + let list: Vec = vec![ResourceOptions::default()]; + Ok(Box::new(list.into_iter())) + } +} + +// The size of the union of all field value sets. +fn union_size(langid: &LanguageIdentifier) -> usize { + let mut size = langid.variants.len(); + if !langid.language.is_empty() { + size += 1; + } + if langid.script.is_some() { + size += 1; + } + if langid.region.is_some() { + size += 1; + } + size +} + +// Sort rules by size of union of field sets and alphabeticaly +// following rules in Preprocessing, step 5 of Appendix C. +fn rules_cmp(a: &LanguageIdentifier, b: &LanguageIdentifier) -> std::cmp::Ordering { + let size_a = union_size(a); + let size_b = union_size(b); + if size_a == size_b { + a.cmp(b) + } else { + size_b.cmp(&size_a) + } +} + +impl From<&cldr_json::Resource> for AliasesV1 { + // Step 1. Load the rules from aliases.json + fn from(other: &cldr_json::Resource) -> Self { + // These all correspond to language aliases in the CLDR data. By storing known + // special cases in the CLDR data, we can minimize the number of comparisons done + // for commonly used languages. With the current CLDR data, all aliases end up in + // a special case, but we retain the catchall language category in case new or + // customized CLDR data is used. + let mut language: Vec<(LanguageIdentifier, LanguageIdentifier)> = Vec::new(); + let mut language_variants: Vec<(LanguageIdentifier, LanguageIdentifier)> = Vec::new(); + let mut language_region: Vec<(TinyStr4, TinyStr4, LanguageIdentifier)> = Vec::new(); + let mut sgn_region: Vec<(TinyStr4, LanguageIdentifier)> = Vec::new(); + let mut language_len2: Vec<(TinyStr4, LanguageIdentifier)> = Vec::new(); + let mut language_len3: Vec<(TinyStr4, LanguageIdentifier)> = Vec::new(); + + let mut script: Vec<(TinyStr4, TinyStr4)> = Vec::new(); + + // There are many more aliases for numeric region codes than for alphabetic, + // so by storing them separately, we can minimize comparisons for alphabetic codes. + let mut region_alpha: Vec<(TinyStr4, TinyStr4)> = Vec::new(); + let mut region_num: Vec<(TinyStr4, TinyStr4)> = Vec::new(); + + // Complex regions are cases similar to the Soviet Union, where an old region + // is replaced by multiple new regions. Determining the new region requires using + // likely subtags. Many implementations preprocess the complex regions into simple + // regions as part of data import, but that would introduce a dependency between + // CDLR providers that we're not currently set up to handle. + let mut complex_region: Vec<(TinyStr4, Vec)> = Vec::new(); + + let mut variant: Vec<(TinyStr8, TinyStr8)> = Vec::new(); + let mut subdivision: Vec<(TinyStr8, TinyStr8)> = Vec::new(); + + // Step 2. Capture all languageAlias rules where the type is an invalid languageId + // into a set of BCP47 LegacyRules. This implementation discards these. + // Step 3. Discard all rules where the type is an invalid languageId + for alias in other.supplemental.metadata.alias.language_aliases.iter() { + if let Ok(langid) = alias.0.parse::() { + if let Ok(replacement) = alias.1.replacement.parse::() { + // Variants are stored separately to not slow down canonicalization + // of locales without variants. + if !langid.variants.is_empty() { + language_variants.push((langid, replacement)); + continue; + } + + let maybe_lang: Option = langid.language.into(); + if let Some(lang) = maybe_lang { + if langid.region.is_none() && langid.variants.is_empty() { + // Relatively few aliases exist for two character language identifiers, + // so we store them separately to not slow down canonicalization of + // common identifiers. + if lang.len() == 2 { + language_len2.push((lang, replacement)); + } else { + language_len3.push((lang, replacement)); + } + } else if let Some(region) = langid.region { + // All current language-region aliases are for "sgn", so we store them + // separately to not slow down canonicalization of common identifiers. + if lang == "sgn" { + sgn_region.push((region.into(), replacement)); + } else { + language.push((langid, replacement)); + } + } else { + language.push((langid, replacement)); + } + } else { + language.push((langid, replacement)); + } + } + } + } + + for alias in other.supplemental.metadata.alias.script_aliases.iter() { + // Don't store data for invalid script codes, we only canonicalize valid locales, so we + // would never see these anyways. + if alias.0.parse::().is_err() { + continue; + } + + script.push((alias.0, alias.1.replacement)); + } + + for alias in other.supplemental.metadata.alias.region_aliases.iter() { + // Don't store data for invalid region codes, we only canonicalize valid locales, so we + // would never see these anyways. + if alias.0.parse::().is_err() { + continue; + } + + if let Ok(replacement) = alias.1.replacement.parse::() { + if alias.0.is_ascii_alphabetic() { + region_alpha.push((alias.0, replacement)); + } else { + region_num.push((alias.0, replacement)); + } + } else { + complex_region.push(( + alias.0, + alias + .1 + .replacement + .split(' ') + .into_iter() + .filter_map(|r| r.parse::().ok()) + .collect(), + )); + } + } + + for alias in other.supplemental.metadata.alias.variant_aliases.iter() { + variant.push((alias.0, alias.1.replacement)); + } + + for alias in other.supplemental.metadata.alias.subdivision_aliases.iter() { + if let Some(replacement) = alias + .1 + .replacement + .split(' ') + .into_iter() + .filter_map(|r| { + if r.len() == 2 { + // Following http://unicode.org/reports/tr35/#Canonical_Unicode_Locale_Identifiers, + // append "zzzz" to make this syntactically correct. + let replacement = r.to_string().to_ascii_lowercase() + "zzzz"; + TinyStr8::from_bytes(replacement.as_bytes()).ok() + } else { + TinyStr8::from_bytes(r.as_bytes()).ok() + } + }) + .next() + { + subdivision.push((alias.0, replacement)); + } + } + + // 5. Order the set of rules by + // 1. the size of the union of all field value sets, with largest size first + // 2. and then alphabetically by field. + language.sort_unstable_by(|a, b| rules_cmp(&a.0, &b.0)); + language_variants.sort_unstable_by(|a, b| rules_cmp(&a.0, &b.0)); + language_region.sort_unstable(); + sgn_region.sort_unstable(); + language_len2.sort_unstable(); + language_len3.sort_unstable(); + region_alpha.sort_unstable(); + region_num.sort_unstable(); + complex_region.sort_unstable(); + variant.sort_unstable(); + subdivision.sort_unstable(); + + Self { + language, + language_variants, + sgn_region, + language_len2, + language_len3, + script, + region_alpha, + region_num, + complex_region, + variant, + subdivision, + } + } +} + +/// Serde structs for the CLDR JSON aliases file. +pub(self) mod cldr_json { + use serde::Deserialize; + use tinystr::{TinyStr4, TinyStr8}; + + #[derive(PartialEq, Debug, Deserialize)] + pub struct Replacement { + #[serde(rename = "_replacement")] + pub replacement: T, + } + + #[derive(PartialEq, Debug, Deserialize)] + pub struct Alias { + #[serde(with = "tuple_vec_map", rename = "languageAlias")] + pub language_aliases: Vec<(String, Replacement)>, + #[serde(with = "tuple_vec_map", rename = "scriptAlias")] + pub script_aliases: Vec<(TinyStr4, Replacement)>, + #[serde(with = "tuple_vec_map", rename = "territoryAlias")] + pub region_aliases: Vec<(TinyStr4, Replacement)>, + #[serde(with = "tuple_vec_map", rename = "variantAlias")] + pub variant_aliases: Vec<(TinyStr8, Replacement)>, + #[serde(with = "tuple_vec_map", rename = "subdivisionAlias")] + pub subdivision_aliases: Vec<(TinyStr8, Replacement)>, + } + + #[derive(PartialEq, Debug, Deserialize)] + pub struct Metadata { + pub alias: Alias, + } + + #[derive(PartialEq, Debug, Deserialize)] + pub struct Supplemental { + pub metadata: Metadata, + } + + #[derive(PartialEq, Debug, Deserialize)] + pub struct Resource { + pub supplemental: Supplemental, + } +} + +#[test] +fn test_rules_cmp() { + let mut rules: Vec = vec![ + "en-GB".parse().unwrap(), + "CA".parse().unwrap(), + "und-hepburn-heploc".parse().unwrap(), + "fr-CA".parse().unwrap(), + ]; + + assert_eq!(union_size(&rules[0]), 2); + assert_eq!(union_size(&rules[1]), 1); + assert_eq!(union_size(&rules[2]), 2); + assert_eq!(union_size(&rules[3]), 2); + + rules.sort_unstable_by(|a, b| rules_cmp(a, b)); + assert_eq!(rules[0], "und-hepburn-heploc"); + assert_eq!(rules[1], "en-GB"); + assert_eq!(rules[2], "fr-CA"); + assert_eq!(rules[3], "CA"); +} + +#[test] +fn test_basic() { + use std::str::FromStr; + + let cldr_paths = crate::cldr_paths::for_test(); + let provider = AliasesProvider::try_from(&cldr_paths as &dyn CldrPaths).unwrap(); + let data: DataPayload = provider + .load_payload(&DataRequest::from(key::ALIASES_V1)) + .unwrap() + .take_payload() + .unwrap(); + + // We should handle all language rules as special cases, leaving the generic category empty. + assert!(data.get().language.is_empty()); + + // We should have data in all other categories + assert!(!data.get().language_variants.is_empty()); + assert!(!data.get().sgn_region.is_empty()); + assert!(!data.get().language_len2.is_empty()); + assert!(!data.get().language_len3.is_empty()); + assert!(!data.get().script.is_empty()); + assert!(!data.get().region_alpha.is_empty()); + assert!(!data.get().region_num.is_empty()); + assert!(!data.get().complex_region.is_empty()); + assert!(!data.get().variant.is_empty()); + assert!(!data.get().subdivision.is_empty()); + + // Spot check a few expected results. There are more extensive tests in the + // locale canonicalizer itself. + let lang = TinyStr4::from_str("iw").unwrap(); + let res = data + .get() + .language_len2 + .binary_search_by_key(&lang, |alias| alias.0); + assert!(res.is_ok()); + assert_eq!(data.get().language_len2[res.unwrap()].0, "iw"); + assert_eq!(data.get().language_len2[res.unwrap()].1, "he"); + + let res = data + .get() + .language_len3 + .binary_search_by_key(&lang, |alias| alias.0); + assert!(res.is_err()); + + assert_eq!(data.get().script[0].0, "Qaai"); + assert_eq!(data.get().script[0].1, "Zinh"); + + let region = TinyStr4::from_str("768").unwrap(); + let res = data + .get() + .region_alpha + .binary_search_by_key(®ion, |alias| alias.0); + assert!(res.is_err()); + + let res = data + .get() + .region_num + .binary_search_by_key(®ion, |alias| alias.0); + assert!(res.is_ok()); + assert_eq!(data.get().region_num[res.unwrap()].0, "768"); + assert_eq!(data.get().region_num[res.unwrap()].1, "TG"); +} diff --git a/provider/cldr/src/transform/mod.rs b/provider/cldr/src/transform/mod.rs index 9e85e9a38c8..ddf0d316824 100644 --- a/provider/cldr/src/transform/mod.rs +++ b/provider/cldr/src/transform/mod.rs @@ -2,12 +2,14 @@ // called LICENSE at the top level of the ICU4X source tree // (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). +mod aliases; mod dates; mod likelysubtags; mod numbers; mod plurals; mod time_zones; +pub use aliases::AliasesProvider; pub use dates::DatesProvider; pub use likelysubtags::LikelySubtagsProvider; pub use numbers::NumbersProvider; @@ -24,6 +26,7 @@ use self::time_zones::TimeZonesProvider; /// Returns a list of all [`ResourceKeys`](ResourceKey) that this provider can produce. pub fn get_all_cldr_keys() -> Vec { let mut result: Vec = vec![]; + result.extend(&aliases::ALL_KEYS); result.extend(&dates::ALL_KEYS); result.extend(&likelysubtags::ALL_KEYS); result.extend(&numbers::ALL_KEYS); @@ -35,6 +38,7 @@ pub fn get_all_cldr_keys() -> Vec { #[derive(Debug)] pub struct CldrJsonDataProvider<'a, 'd> { pub cldr_paths: &'a dyn CldrPaths, + aliases: LazyCldrProvider>, dates: LazyCldrProvider>, likelysubtags: LazyCldrProvider>, numbers: LazyCldrProvider, @@ -46,6 +50,7 @@ impl<'a, 'd> CldrJsonDataProvider<'a, 'd> { pub fn new(cldr_paths: &'a dyn CldrPaths) -> Self { CldrJsonDataProvider { cldr_paths, + aliases: Default::default(), dates: Default::default(), likelysubtags: Default::default(), numbers: Default::default(), @@ -62,6 +67,9 @@ impl<'a, 'd, 's: 'd> DataProvider<'d, 's, SerdeSeDataStructMarker> &self, req: &DataRequest, ) -> Result, DataError> { + if let Some(result) = self.aliases.try_load_serde(req, self.cldr_paths)? { + return Ok(result); + } if let Some(result) = self.dates.try_load_serde(req, self.cldr_paths)? { return Ok(result); } @@ -86,6 +94,12 @@ impl<'a, 'd> IterableDataProviderCore for CldrJsonDataProvider<'a, 'd> { &self, resc_key: &ResourceKey, ) -> Result>, DataError> { + if let Some(resp) = self + .aliases + .try_supported_options(resc_key, self.cldr_paths)? + { + return Ok(resp); + } if let Some(resp) = self .dates .try_supported_options(resc_key, self.cldr_paths)? diff --git a/provider/core/src/resource.rs b/provider/core/src/resource.rs index f3a04d68000..0a6f1770b60 100644 --- a/provider/core/src/resource.rs +++ b/provider/core/src/resource.rs @@ -17,13 +17,14 @@ use tinystr::{TinyStr16, TinyStr4}; #[non_exhaustive] #[derive(PartialEq, Eq, PartialOrd, Ord, Copy, Clone, Debug)] pub enum ResourceCategory { + Aliases, + Dates, + Decimal, Icu4x, LikelySubtags, Plurals, - Dates, TimeZones, Uniset, - Decimal, PrivateUse(TinyStr4), } @@ -31,13 +32,14 @@ impl ResourceCategory { /// Gets or builds a string form of this [`ResourceCategory`]. pub fn as_str(&self) -> Cow<'static, str> { match self { + Self::Aliases => Cow::Borrowed("aliases"), + Self::Dates => Cow::Borrowed("dates"), + Self::Decimal => Cow::Borrowed("decimal"), Self::Icu4x => Cow::Borrowed("icu4x"), Self::LikelySubtags => Cow::Borrowed("likelysubtags"), Self::Plurals => Cow::Borrowed("plurals"), - Self::Dates => Cow::Borrowed("dates"), Self::TimeZones => Cow::Borrowed("time_zones"), Self::Uniset => Cow::Borrowed("uniset"), - Self::Decimal => Cow::Borrowed("decimal"), Self::PrivateUse(id) => { let mut result = String::from("x-"); result.push_str(id.as_str()); @@ -89,6 +91,9 @@ pub struct ResourceKey { /// ``` #[macro_export] macro_rules! resource_key { + (aliases, $sub_category:literal, $version:tt) => { + $crate::resource_key!($crate::ResourceCategory::Aliases, $sub_category, $version) + }; (dates, $sub_category:literal, $version:tt) => { $crate::resource_key!($crate::ResourceCategory::Dates, $sub_category, $version) }; diff --git a/provider/testdata/Cargo.toml b/provider/testdata/Cargo.toml index a4f183e124d..2605543bc3a 100644 --- a/provider/testdata/Cargo.toml +++ b/provider/testdata/Cargo.toml @@ -100,6 +100,7 @@ locales = [ # Paths from CLDR JSON to copy into testdata. Uses gitignore-like syntax. # The variable "$LOCALES" is replaced with the list of locales from above. cldr_json_glob = [ + "cldr-core/supplemental/aliases.json", "cldr-core/supplemental/likelySubtags.json", "cldr-core/supplemental/numberingSystems.json", "cldr-core/supplemental/ordinals.json", diff --git a/provider/testdata/data/cldr/cldr-core/supplemental/aliases.json b/provider/testdata/data/cldr/cldr-core/supplemental/aliases.json new file mode 100644 index 00000000000..93462b59ad6 --- /dev/null +++ b/provider/testdata/data/cldr/cldr-core/supplemental/aliases.json @@ -0,0 +1,5216 @@ +{ + "supplemental": { + "version": { + "_unicodeVersion": "13.0.0", + "_cldrVersion": "39" + }, + "metadata": { + "alias": { + "languageAlias": { + "aa-saaho": { + "_reason": "deprecated", + "_replacement": "ssy" + }, + "aam": { + "_reason": "deprecated", + "_replacement": "aas" + }, + "aar": { + "_reason": "overlong", + "_replacement": "aa" + }, + "abk": { + "_reason": "overlong", + "_replacement": "ab" + }, + "adp": { + "_reason": "deprecated", + "_replacement": "dz" + }, + "afr": { + "_reason": "overlong", + "_replacement": "af" + }, + "agp": { + "_reason": "deprecated", + "_replacement": "apf" + }, + "ais": { + "_reason": "deprecated", + "_replacement": "ami" + }, + "aju": { + "_reason": "macrolanguage", + "_replacement": "jrb" + }, + "aka": { + "_reason": "overlong", + "_replacement": "ak" + }, + "alb": { + "_reason": "bibliographic", + "_replacement": "sq" + }, + "als": { + "_reason": "macrolanguage", + "_replacement": "sq" + }, + "amh": { + "_reason": "overlong", + "_replacement": "am" + }, + "ara": { + "_reason": "overlong", + "_replacement": "ar" + }, + "arb": { + "_reason": "macrolanguage", + "_replacement": "ar" + }, + "arg": { + "_reason": "overlong", + "_replacement": "an" + }, + "arm": { + "_reason": "bibliographic", + "_replacement": "hy" + }, + "art-lojban": { + "_reason": "deprecated", + "_replacement": "jbo" + }, + "asd": { + "_reason": "deprecated", + "_replacement": "snz" + }, + "asm": { + "_reason": "overlong", + "_replacement": "as" + }, + "aue": { + "_reason": "deprecated", + "_replacement": "ktz" + }, + "ava": { + "_reason": "overlong", + "_replacement": "av" + }, + "ave": { + "_reason": "overlong", + "_replacement": "ae" + }, + "aym": { + "_reason": "overlong", + "_replacement": "ay" + }, + "ayr": { + "_reason": "macrolanguage", + "_replacement": "ay" + }, + "ayx": { + "_reason": "deprecated", + "_replacement": "nun" + }, + "aze": { + "_reason": "overlong", + "_replacement": "az" + }, + "azj": { + "_reason": "macrolanguage", + "_replacement": "az" + }, + "bak": { + "_reason": "overlong", + "_replacement": "ba" + }, + "bam": { + "_reason": "overlong", + "_replacement": "bm" + }, + "baq": { + "_reason": "bibliographic", + "_replacement": "eu" + }, + "baz": { + "_reason": "deprecated", + "_replacement": "nvo" + }, + "bcc": { + "_reason": "macrolanguage", + "_replacement": "bal" + }, + "bcl": { + "_reason": "macrolanguage", + "_replacement": "bik" + }, + "bel": { + "_reason": "overlong", + "_replacement": "be" + }, + "ben": { + "_reason": "overlong", + "_replacement": "bn" + }, + "bgm": { + "_reason": "deprecated", + "_replacement": "bcg" + }, + "bh": { + "_reason": "macrolanguage", + "_replacement": "bho" + }, + "bhk": { + "_reason": "deprecated", + "_replacement": "fbl" + }, + "bih": { + "_reason": "overlong", + "_replacement": "bho" + }, + "bis": { + "_reason": "overlong", + "_replacement": "bi" + }, + "bjd": { + "_reason": "deprecated", + "_replacement": "drl" + }, + "bjq": { + "_reason": "deprecated", + "_replacement": "bzc" + }, + "bkb": { + "_reason": "deprecated", + "_replacement": "ebk" + }, + "bod": { + "_reason": "overlong", + "_replacement": "bo" + }, + "bos": { + "_reason": "overlong", + "_replacement": "bs" + }, + "bre": { + "_reason": "overlong", + "_replacement": "br" + }, + "btb": { + "_reason": "deprecated", + "_replacement": "beb" + }, + "bul": { + "_reason": "overlong", + "_replacement": "bg" + }, + "bur": { + "_reason": "bibliographic", + "_replacement": "my" + }, + "bxk": { + "_reason": "macrolanguage", + "_replacement": "luy" + }, + "bxr": { + "_reason": "macrolanguage", + "_replacement": "bua" + }, + "cat": { + "_reason": "overlong", + "_replacement": "ca" + }, + "ccq": { + "_reason": "deprecated", + "_replacement": "rki" + }, + "cel-gaulish": { + "_reason": "legacy", + "_replacement": "xtg" + }, + "ces": { + "_reason": "overlong", + "_replacement": "cs" + }, + "cha": { + "_reason": "overlong", + "_replacement": "ch" + }, + "che": { + "_reason": "overlong", + "_replacement": "ce" + }, + "chi": { + "_reason": "bibliographic", + "_replacement": "zh" + }, + "chu": { + "_reason": "overlong", + "_replacement": "cu" + }, + "chv": { + "_reason": "overlong", + "_replacement": "cv" + }, + "cjr": { + "_reason": "deprecated", + "_replacement": "mom" + }, + "cka": { + "_reason": "deprecated", + "_replacement": "cmr" + }, + "cld": { + "_reason": "macrolanguage", + "_replacement": "syr" + }, + "cmk": { + "_reason": "deprecated", + "_replacement": "xch" + }, + "cmn": { + "_reason": "macrolanguage", + "_replacement": "zh" + }, + "cnr": { + "_reason": "legacy", + "_replacement": "sr-ME" + }, + "cor": { + "_reason": "overlong", + "_replacement": "kw" + }, + "cos": { + "_reason": "overlong", + "_replacement": "co" + }, + "coy": { + "_reason": "deprecated", + "_replacement": "pij" + }, + "cqu": { + "_reason": "deprecated", + "_replacement": "quh" + }, + "cre": { + "_reason": "overlong", + "_replacement": "cr" + }, + "cwd": { + "_reason": "macrolanguage", + "_replacement": "cr" + }, + "cym": { + "_reason": "overlong", + "_replacement": "cy" + }, + "cze": { + "_reason": "bibliographic", + "_replacement": "cs" + }, + "daf": { + "_reason": "deprecated", + "_replacement": "dnj" + }, + "dan": { + "_reason": "overlong", + "_replacement": "da" + }, + "dap": { + "_reason": "deprecated", + "_replacement": "njz" + }, + "deu": { + "_reason": "overlong", + "_replacement": "de" + }, + "dgo": { + "_reason": "macrolanguage", + "_replacement": "doi" + }, + "dhd": { + "_reason": "macrolanguage", + "_replacement": "mwr" + }, + "dik": { + "_reason": "macrolanguage", + "_replacement": "din" + }, + "diq": { + "_reason": "macrolanguage", + "_replacement": "zza" + }, + "dit": { + "_reason": "deprecated", + "_replacement": "dif" + }, + "div": { + "_reason": "overlong", + "_replacement": "dv" + }, + "djl": { + "_reason": "deprecated", + "_replacement": "dze" + }, + "dkl": { + "_reason": "deprecated", + "_replacement": "aqd" + }, + "drh": { + "_reason": "deprecated", + "_replacement": "mn" + }, + "drr": { + "_reason": "deprecated", + "_replacement": "kzk" + }, + "drw": { + "_reason": "deprecated", + "_replacement": "fa-AF" + }, + "dud": { + "_reason": "deprecated", + "_replacement": "uth" + }, + "duj": { + "_reason": "deprecated", + "_replacement": "dwu" + }, + "dut": { + "_reason": "bibliographic", + "_replacement": "nl" + }, + "dwl": { + "_reason": "deprecated", + "_replacement": "dbt" + }, + "dzo": { + "_reason": "overlong", + "_replacement": "dz" + }, + "ekk": { + "_reason": "macrolanguage", + "_replacement": "et" + }, + "ell": { + "_reason": "overlong", + "_replacement": "el" + }, + "elp": { + "_reason": "deprecated", + "_replacement": "amq" + }, + "emk": { + "_reason": "macrolanguage", + "_replacement": "man" + }, + "en-GB-oed": { + "_reason": "deprecated", + "_replacement": "en-GB-oxendict" + }, + "eng": { + "_reason": "overlong", + "_replacement": "en" + }, + "epo": { + "_reason": "overlong", + "_replacement": "eo" + }, + "esk": { + "_reason": "macrolanguage", + "_replacement": "ik" + }, + "est": { + "_reason": "overlong", + "_replacement": "et" + }, + "eus": { + "_reason": "overlong", + "_replacement": "eu" + }, + "ewe": { + "_reason": "overlong", + "_replacement": "ee" + }, + "fao": { + "_reason": "overlong", + "_replacement": "fo" + }, + "fas": { + "_reason": "overlong", + "_replacement": "fa" + }, + "fat": { + "_reason": "macrolanguage", + "_replacement": "ak" + }, + "fij": { + "_reason": "overlong", + "_replacement": "fj" + }, + "fin": { + "_reason": "overlong", + "_replacement": "fi" + }, + "fra": { + "_reason": "overlong", + "_replacement": "fr" + }, + "fre": { + "_reason": "bibliographic", + "_replacement": "fr" + }, + "fry": { + "_reason": "overlong", + "_replacement": "fy" + }, + "fuc": { + "_reason": "macrolanguage", + "_replacement": "ff" + }, + "ful": { + "_reason": "overlong", + "_replacement": "ff" + }, + "gav": { + "_reason": "deprecated", + "_replacement": "dev" + }, + "gaz": { + "_reason": "macrolanguage", + "_replacement": "om" + }, + "gbc": { + "_reason": "deprecated", + "_replacement": "wny" + }, + "gbo": { + "_reason": "macrolanguage", + "_replacement": "grb" + }, + "geo": { + "_reason": "bibliographic", + "_replacement": "ka" + }, + "ger": { + "_reason": "bibliographic", + "_replacement": "de" + }, + "gfx": { + "_reason": "deprecated", + "_replacement": "vaj" + }, + "ggn": { + "_reason": "deprecated", + "_replacement": "gvr" + }, + "ggo": { + "_reason": "deprecated", + "_replacement": "esg" + }, + "ggr": { + "_reason": "deprecated", + "_replacement": "gtu" + }, + "gio": { + "_reason": "deprecated", + "_replacement": "aou" + }, + "gla": { + "_reason": "overlong", + "_replacement": "gd" + }, + "gle": { + "_reason": "overlong", + "_replacement": "ga" + }, + "glg": { + "_reason": "overlong", + "_replacement": "gl" + }, + "gli": { + "_reason": "deprecated", + "_replacement": "kzk" + }, + "glv": { + "_reason": "overlong", + "_replacement": "gv" + }, + "gno": { + "_reason": "macrolanguage", + "_replacement": "gon" + }, + "gre": { + "_reason": "bibliographic", + "_replacement": "el" + }, + "grn": { + "_reason": "overlong", + "_replacement": "gn" + }, + "gti": { + "_reason": "deprecated", + "_replacement": "nyc" + }, + "gug": { + "_reason": "macrolanguage", + "_replacement": "gn" + }, + "guj": { + "_reason": "overlong", + "_replacement": "gu" + }, + "guv": { + "_reason": "deprecated", + "_replacement": "duz" + }, + "gya": { + "_reason": "macrolanguage", + "_replacement": "gba" + }, + "hat": { + "_reason": "overlong", + "_replacement": "ht" + }, + "hau": { + "_reason": "overlong", + "_replacement": "ha" + }, + "hbs": { + "_reason": "overlong", + "_replacement": "sr-Latn" + }, + "hdn": { + "_reason": "macrolanguage", + "_replacement": "hai" + }, + "hea": { + "_reason": "macrolanguage", + "_replacement": "hmn" + }, + "heb": { + "_reason": "overlong", + "_replacement": "he" + }, + "her": { + "_reason": "overlong", + "_replacement": "hz" + }, + "him": { + "_reason": "macrolanguage", + "_replacement": "srx" + }, + "hin": { + "_reason": "overlong", + "_replacement": "hi" + }, + "hmo": { + "_reason": "overlong", + "_replacement": "ho" + }, + "hrr": { + "_reason": "deprecated", + "_replacement": "jal" + }, + "hrv": { + "_reason": "overlong", + "_replacement": "hr" + }, + "hun": { + "_reason": "overlong", + "_replacement": "hu" + }, + "hy-arevmda": { + "_reason": "deprecated", + "_replacement": "hyw" + }, + "hye": { + "_reason": "overlong", + "_replacement": "hy" + }, + "i-ami": { + "_reason": "deprecated", + "_replacement": "ami" + }, + "i-bnn": { + "_reason": "deprecated", + "_replacement": "bnn" + }, + "i-default": { + "_reason": "legacy", + "_replacement": "en-x-i-default" + }, + "i-enochian": { + "_reason": "legacy", + "_replacement": "und-x-i-enochian" + }, + "i-hak": { + "_reason": "deprecated", + "_replacement": "hak" + }, + "i-klingon": { + "_reason": "deprecated", + "_replacement": "tlh" + }, + "i-lux": { + "_reason": "deprecated", + "_replacement": "lb" + }, + "i-mingo": { + "_reason": "legacy", + "_replacement": "see-x-i-mingo" + }, + "i-navajo": { + "_reason": "deprecated", + "_replacement": "nv" + }, + "i-pwn": { + "_reason": "deprecated", + "_replacement": "pwn" + }, + "i-tao": { + "_reason": "deprecated", + "_replacement": "tao" + }, + "i-tay": { + "_reason": "deprecated", + "_replacement": "tay" + }, + "i-tsu": { + "_reason": "deprecated", + "_replacement": "tsu" + }, + "ibi": { + "_reason": "deprecated", + "_replacement": "opa" + }, + "ibo": { + "_reason": "overlong", + "_replacement": "ig" + }, + "ice": { + "_reason": "bibliographic", + "_replacement": "is" + }, + "ido": { + "_reason": "overlong", + "_replacement": "io" + }, + "iii": { + "_reason": "overlong", + "_replacement": "ii" + }, + "ike": { + "_reason": "macrolanguage", + "_replacement": "iu" + }, + "iku": { + "_reason": "overlong", + "_replacement": "iu" + }, + "ile": { + "_reason": "overlong", + "_replacement": "ie" + }, + "ill": { + "_reason": "deprecated", + "_replacement": "ilm" + }, + "ilw": { + "_reason": "deprecated", + "_replacement": "gal" + }, + "in": { + "_reason": "deprecated", + "_replacement": "id" + }, + "ina": { + "_reason": "overlong", + "_replacement": "ia" + }, + "ind": { + "_reason": "overlong", + "_replacement": "id" + }, + "ipk": { + "_reason": "overlong", + "_replacement": "ik" + }, + "isl": { + "_reason": "overlong", + "_replacement": "is" + }, + "ita": { + "_reason": "overlong", + "_replacement": "it" + }, + "iw": { + "_reason": "deprecated", + "_replacement": "he" + }, + "izi": { + "_reason": "deprecated", + "_replacement": "eza" + }, + "jar": { + "_reason": "deprecated", + "_replacement": "jgk" + }, + "jav": { + "_reason": "overlong", + "_replacement": "jv" + }, + "jeg": { + "_reason": "deprecated", + "_replacement": "oyb" + }, + "ji": { + "_reason": "deprecated", + "_replacement": "yi" + }, + "jpn": { + "_reason": "overlong", + "_replacement": "ja" + }, + "jw": { + "_reason": "deprecated", + "_replacement": "jv" + }, + "kal": { + "_reason": "overlong", + "_replacement": "kl" + }, + "kan": { + "_reason": "overlong", + "_replacement": "kn" + }, + "kas": { + "_reason": "overlong", + "_replacement": "ks" + }, + "kat": { + "_reason": "overlong", + "_replacement": "ka" + }, + "kau": { + "_reason": "overlong", + "_replacement": "kr" + }, + "kaz": { + "_reason": "overlong", + "_replacement": "kk" + }, + "kdv": { + "_reason": "deprecated", + "_replacement": "zkd" + }, + "kgc": { + "_reason": "deprecated", + "_replacement": "tdf" + }, + "kgd": { + "_reason": "deprecated", + "_replacement": "ncq" + }, + "kgh": { + "_reason": "deprecated", + "_replacement": "kml" + }, + "khk": { + "_reason": "macrolanguage", + "_replacement": "mn" + }, + "khm": { + "_reason": "overlong", + "_replacement": "km" + }, + "kik": { + "_reason": "overlong", + "_replacement": "ki" + }, + "kin": { + "_reason": "overlong", + "_replacement": "rw" + }, + "kir": { + "_reason": "overlong", + "_replacement": "ky" + }, + "kmr": { + "_reason": "macrolanguage", + "_replacement": "ku" + }, + "knc": { + "_reason": "macrolanguage", + "_replacement": "kr" + }, + "kng": { + "_reason": "macrolanguage", + "_replacement": "kg" + }, + "knn": { + "_reason": "macrolanguage", + "_replacement": "kok" + }, + "koj": { + "_reason": "deprecated", + "_replacement": "kwv" + }, + "kom": { + "_reason": "overlong", + "_replacement": "kv" + }, + "kon": { + "_reason": "overlong", + "_replacement": "kg" + }, + "kor": { + "_reason": "overlong", + "_replacement": "ko" + }, + "kpp": { + "_reason": "deprecated", + "_replacement": "jkm" + }, + "kpv": { + "_reason": "macrolanguage", + "_replacement": "kv" + }, + "krm": { + "_reason": "deprecated", + "_replacement": "bmf" + }, + "ktr": { + "_reason": "deprecated", + "_replacement": "dtp" + }, + "kua": { + "_reason": "overlong", + "_replacement": "kj" + }, + "kur": { + "_reason": "overlong", + "_replacement": "ku" + }, + "kvs": { + "_reason": "deprecated", + "_replacement": "gdj" + }, + "kwq": { + "_reason": "deprecated", + "_replacement": "yam" + }, + "kxe": { + "_reason": "deprecated", + "_replacement": "tvd" + }, + "kxl": { + "_reason": "deprecated", + "_replacement": "kru" + }, + "kzh": { + "_reason": "deprecated", + "_replacement": "dgl" + }, + "kzj": { + "_reason": "deprecated", + "_replacement": "dtp" + }, + "kzt": { + "_reason": "deprecated", + "_replacement": "dtp" + }, + "lao": { + "_reason": "overlong", + "_replacement": "lo" + }, + "lat": { + "_reason": "overlong", + "_replacement": "la" + }, + "lav": { + "_reason": "overlong", + "_replacement": "lv" + }, + "lbk": { + "_reason": "macrolanguage", + "_replacement": "bnc" + }, + "leg": { + "_reason": "deprecated", + "_replacement": "enl" + }, + "lii": { + "_reason": "deprecated", + "_replacement": "raq" + }, + "lim": { + "_reason": "overlong", + "_replacement": "li" + }, + "lin": { + "_reason": "overlong", + "_replacement": "ln" + }, + "lit": { + "_reason": "overlong", + "_replacement": "lt" + }, + "llo": { + "_reason": "deprecated", + "_replacement": "ngt" + }, + "lmm": { + "_reason": "deprecated", + "_replacement": "rmx" + }, + "ltz": { + "_reason": "overlong", + "_replacement": "lb" + }, + "lub": { + "_reason": "overlong", + "_replacement": "lu" + }, + "lug": { + "_reason": "overlong", + "_replacement": "lg" + }, + "lvs": { + "_reason": "macrolanguage", + "_replacement": "lv" + }, + "mac": { + "_reason": "bibliographic", + "_replacement": "mk" + }, + "mah": { + "_reason": "overlong", + "_replacement": "mh" + }, + "mal": { + "_reason": "overlong", + "_replacement": "ml" + }, + "mao": { + "_reason": "bibliographic", + "_replacement": "mi" + }, + "mar": { + "_reason": "overlong", + "_replacement": "mr" + }, + "may": { + "_reason": "bibliographic", + "_replacement": "ms" + }, + "meg": { + "_reason": "deprecated", + "_replacement": "cir" + }, + "mgx": { + "_reason": "deprecated", + "_replacement": "jbk" + }, + "mhr": { + "_reason": "macrolanguage", + "_replacement": "chm" + }, + "mkd": { + "_reason": "overlong", + "_replacement": "mk" + }, + "mlg": { + "_reason": "overlong", + "_replacement": "mg" + }, + "mlt": { + "_reason": "overlong", + "_replacement": "mt" + }, + "mnk": { + "_reason": "macrolanguage", + "_replacement": "man" + }, + "mnt": { + "_reason": "deprecated", + "_replacement": "wnn" + }, + "mo": { + "_reason": "deprecated", + "_replacement": "ro" + }, + "mof": { + "_reason": "deprecated", + "_replacement": "xnt" + }, + "mol": { + "_reason": "overlong", + "_replacement": "ro" + }, + "mon": { + "_reason": "overlong", + "_replacement": "mn" + }, + "mri": { + "_reason": "overlong", + "_replacement": "mi" + }, + "msa": { + "_reason": "overlong", + "_replacement": "ms" + }, + "mst": { + "_reason": "deprecated", + "_replacement": "mry" + }, + "mup": { + "_reason": "macrolanguage", + "_replacement": "raj" + }, + "mwd": { + "_reason": "deprecated", + "_replacement": "dmw" + }, + "mwj": { + "_reason": "deprecated", + "_replacement": "vaj" + }, + "mya": { + "_reason": "overlong", + "_replacement": "my" + }, + "myd": { + "_reason": "deprecated", + "_replacement": "aog" + }, + "myt": { + "_reason": "deprecated", + "_replacement": "mry" + }, + "nad": { + "_reason": "deprecated", + "_replacement": "xny" + }, + "nau": { + "_reason": "overlong", + "_replacement": "na" + }, + "nav": { + "_reason": "overlong", + "_replacement": "nv" + }, + "nbf": { + "_reason": "deprecated", + "_replacement": "nru" + }, + "nbl": { + "_reason": "overlong", + "_replacement": "nr" + }, + "nbx": { + "_reason": "deprecated", + "_replacement": "ekc" + }, + "ncp": { + "_reason": "deprecated", + "_replacement": "kdz" + }, + "nde": { + "_reason": "overlong", + "_replacement": "nd" + }, + "ndo": { + "_reason": "overlong", + "_replacement": "ng" + }, + "nep": { + "_reason": "overlong", + "_replacement": "ne" + }, + "nld": { + "_reason": "overlong", + "_replacement": "nl" + }, + "nln": { + "_reason": "deprecated", + "_replacement": "azd" + }, + "nlr": { + "_reason": "deprecated", + "_replacement": "nrk" + }, + "nno": { + "_reason": "overlong", + "_replacement": "nn" + }, + "nns": { + "_reason": "deprecated", + "_replacement": "nbr" + }, + "nnx": { + "_reason": "deprecated", + "_replacement": "ngv" + }, + "no-bok": { + "_reason": "deprecated", + "_replacement": "nb" + }, + "no-bokmal": { + "_reason": "deprecated", + "_replacement": "nb" + }, + "no-nyn": { + "_reason": "deprecated", + "_replacement": "nn" + }, + "no-nynorsk": { + "_reason": "deprecated", + "_replacement": "nn" + }, + "nob": { + "_reason": "overlong", + "_replacement": "nb" + }, + "noo": { + "_reason": "deprecated", + "_replacement": "dtd" + }, + "nor": { + "_reason": "overlong", + "_replacement": "no" + }, + "npi": { + "_reason": "macrolanguage", + "_replacement": "ne" + }, + "nts": { + "_reason": "deprecated", + "_replacement": "pij" + }, + "nxu": { + "_reason": "deprecated", + "_replacement": "bpp" + }, + "nya": { + "_reason": "overlong", + "_replacement": "ny" + }, + "oci": { + "_reason": "overlong", + "_replacement": "oc" + }, + "ojg": { + "_reason": "macrolanguage", + "_replacement": "oj" + }, + "oji": { + "_reason": "overlong", + "_replacement": "oj" + }, + "ori": { + "_reason": "overlong", + "_replacement": "or" + }, + "orm": { + "_reason": "overlong", + "_replacement": "om" + }, + "ory": { + "_reason": "macrolanguage", + "_replacement": "or" + }, + "oss": { + "_reason": "overlong", + "_replacement": "os" + }, + "oun": { + "_reason": "deprecated", + "_replacement": "vaj" + }, + "pan": { + "_reason": "overlong", + "_replacement": "pa" + }, + "pbu": { + "_reason": "macrolanguage", + "_replacement": "ps" + }, + "pcr": { + "_reason": "deprecated", + "_replacement": "adx" + }, + "per": { + "_reason": "bibliographic", + "_replacement": "fa" + }, + "pes": { + "_reason": "macrolanguage", + "_replacement": "fa" + }, + "pli": { + "_reason": "overlong", + "_replacement": "pi" + }, + "plt": { + "_reason": "macrolanguage", + "_replacement": "mg" + }, + "pmc": { + "_reason": "deprecated", + "_replacement": "huw" + }, + "pmu": { + "_reason": "deprecated", + "_replacement": "phr" + }, + "pnb": { + "_reason": "macrolanguage", + "_replacement": "lah" + }, + "pol": { + "_reason": "overlong", + "_replacement": "pl" + }, + "por": { + "_reason": "overlong", + "_replacement": "pt" + }, + "ppa": { + "_reason": "deprecated", + "_replacement": "bfy" + }, + "ppr": { + "_reason": "deprecated", + "_replacement": "lcq" + }, + "prs": { + "_reason": "overlong", + "_replacement": "fa-AF" + }, + "pry": { + "_reason": "deprecated", + "_replacement": "prt" + }, + "pus": { + "_reason": "overlong", + "_replacement": "ps" + }, + "puz": { + "_reason": "deprecated", + "_replacement": "pub" + }, + "que": { + "_reason": "overlong", + "_replacement": "qu" + }, + "quz": { + "_reason": "macrolanguage", + "_replacement": "qu" + }, + "rmr": { + "_reason": "deprecated", + "_replacement": "emx" + }, + "rmy": { + "_reason": "macrolanguage", + "_replacement": "rom" + }, + "roh": { + "_reason": "overlong", + "_replacement": "rm" + }, + "ron": { + "_reason": "overlong", + "_replacement": "ro" + }, + "rum": { + "_reason": "bibliographic", + "_replacement": "ro" + }, + "run": { + "_reason": "overlong", + "_replacement": "rn" + }, + "rus": { + "_reason": "overlong", + "_replacement": "ru" + }, + "sag": { + "_reason": "overlong", + "_replacement": "sg" + }, + "san": { + "_reason": "overlong", + "_replacement": "sa" + }, + "sap": { + "_reason": "deprecated", + "_replacement": "aqt" + }, + "sca": { + "_reason": "deprecated", + "_replacement": "hle" + }, + "scc": { + "_reason": "deprecated", + "_replacement": "sr" + }, + "scr": { + "_reason": "deprecated", + "_replacement": "hr" + }, + "sgl": { + "_reason": "deprecated", + "_replacement": "isk" + }, + "sgn-BE-FR": { + "_reason": "deprecated", + "_replacement": "sfb" + }, + "sgn-BE-NL": { + "_reason": "deprecated", + "_replacement": "vgt" + }, + "sgn-BR": { + "_reason": "deprecated", + "_replacement": "bzs" + }, + "sgn-CH-DE": { + "_reason": "deprecated", + "_replacement": "sgg" + }, + "sgn-CO": { + "_reason": "deprecated", + "_replacement": "csn" + }, + "sgn-DE": { + "_reason": "deprecated", + "_replacement": "gsg" + }, + "sgn-DK": { + "_reason": "deprecated", + "_replacement": "dsl" + }, + "sgn-ES": { + "_reason": "deprecated", + "_replacement": "ssp" + }, + "sgn-FR": { + "_reason": "deprecated", + "_replacement": "fsl" + }, + "sgn-GB": { + "_reason": "deprecated", + "_replacement": "bfi" + }, + "sgn-GR": { + "_reason": "deprecated", + "_replacement": "gss" + }, + "sgn-IE": { + "_reason": "deprecated", + "_replacement": "isg" + }, + "sgn-IT": { + "_reason": "deprecated", + "_replacement": "ise" + }, + "sgn-JP": { + "_reason": "deprecated", + "_replacement": "jsl" + }, + "sgn-MX": { + "_reason": "deprecated", + "_replacement": "mfs" + }, + "sgn-NI": { + "_reason": "deprecated", + "_replacement": "ncs" + }, + "sgn-NL": { + "_reason": "deprecated", + "_replacement": "dse" + }, + "sgn-NO": { + "_reason": "deprecated", + "_replacement": "nsi" + }, + "sgn-PT": { + "_reason": "deprecated", + "_replacement": "psr" + }, + "sgn-SE": { + "_reason": "deprecated", + "_replacement": "swl" + }, + "sgn-US": { + "_reason": "deprecated", + "_replacement": "ase" + }, + "sgn-ZA": { + "_reason": "deprecated", + "_replacement": "sfs" + }, + "sh": { + "_reason": "legacy", + "_replacement": "sr-Latn" + }, + "sin": { + "_reason": "overlong", + "_replacement": "si" + }, + "skk": { + "_reason": "deprecated", + "_replacement": "oyb" + }, + "slk": { + "_reason": "overlong", + "_replacement": "sk" + }, + "slo": { + "_reason": "bibliographic", + "_replacement": "sk" + }, + "slv": { + "_reason": "overlong", + "_replacement": "sl" + }, + "sme": { + "_reason": "overlong", + "_replacement": "se" + }, + "smo": { + "_reason": "overlong", + "_replacement": "sm" + }, + "sna": { + "_reason": "overlong", + "_replacement": "sn" + }, + "snd": { + "_reason": "overlong", + "_replacement": "sd" + }, + "som": { + "_reason": "overlong", + "_replacement": "so" + }, + "sot": { + "_reason": "overlong", + "_replacement": "st" + }, + "spa": { + "_reason": "overlong", + "_replacement": "es" + }, + "spy": { + "_reason": "macrolanguage", + "_replacement": "kln" + }, + "sqi": { + "_reason": "overlong", + "_replacement": "sq" + }, + "src": { + "_reason": "macrolanguage", + "_replacement": "sc" + }, + "srd": { + "_reason": "overlong", + "_replacement": "sc" + }, + "srp": { + "_reason": "overlong", + "_replacement": "sr" + }, + "ssw": { + "_reason": "overlong", + "_replacement": "ss" + }, + "sul": { + "_reason": "deprecated", + "_replacement": "sgd" + }, + "sum": { + "_reason": "deprecated", + "_replacement": "ulw" + }, + "sun": { + "_reason": "overlong", + "_replacement": "su" + }, + "swa": { + "_reason": "overlong", + "_replacement": "sw" + }, + "swc": { + "_reason": "overlong", + "_replacement": "sw-CD" + }, + "swe": { + "_reason": "overlong", + "_replacement": "sv" + }, + "swh": { + "_reason": "macrolanguage", + "_replacement": "sw" + }, + "tah": { + "_reason": "overlong", + "_replacement": "ty" + }, + "tam": { + "_reason": "overlong", + "_replacement": "ta" + }, + "tat": { + "_reason": "overlong", + "_replacement": "tt" + }, + "tdu": { + "_reason": "deprecated", + "_replacement": "dtp" + }, + "tel": { + "_reason": "overlong", + "_replacement": "te" + }, + "tgg": { + "_reason": "deprecated", + "_replacement": "bjp" + }, + "tgk": { + "_reason": "overlong", + "_replacement": "tg" + }, + "tgl": { + "_reason": "overlong", + "_replacement": "fil" + }, + "tha": { + "_reason": "overlong", + "_replacement": "th" + }, + "thc": { + "_reason": "deprecated", + "_replacement": "tpo" + }, + "thw": { + "_reason": "deprecated", + "_replacement": "ola" + }, + "thx": { + "_reason": "deprecated", + "_replacement": "oyb" + }, + "tib": { + "_reason": "bibliographic", + "_replacement": "bo" + }, + "tid": { + "_reason": "deprecated", + "_replacement": "itd" + }, + "tie": { + "_reason": "deprecated", + "_replacement": "ras" + }, + "tir": { + "_reason": "overlong", + "_replacement": "ti" + }, + "tkk": { + "_reason": "deprecated", + "_replacement": "twm" + }, + "tl": { + "_reason": "legacy", + "_replacement": "fil" + }, + "tlw": { + "_reason": "deprecated", + "_replacement": "weo" + }, + "tmp": { + "_reason": "deprecated", + "_replacement": "tyj" + }, + "tne": { + "_reason": "deprecated", + "_replacement": "kak" + }, + "tnf": { + "_reason": "deprecated", + "_replacement": "fa-AF" + }, + "ton": { + "_reason": "overlong", + "_replacement": "to" + }, + "tsf": { + "_reason": "deprecated", + "_replacement": "taj" + }, + "tsn": { + "_reason": "overlong", + "_replacement": "tn" + }, + "tso": { + "_reason": "overlong", + "_replacement": "ts" + }, + "ttq": { + "_reason": "macrolanguage", + "_replacement": "tmh" + }, + "tuk": { + "_reason": "overlong", + "_replacement": "tk" + }, + "tur": { + "_reason": "overlong", + "_replacement": "tr" + }, + "tw": { + "_reason": "macrolanguage", + "_replacement": "ak" + }, + "twi": { + "_reason": "overlong", + "_replacement": "ak" + }, + "uig": { + "_reason": "overlong", + "_replacement": "ug" + }, + "ukr": { + "_reason": "overlong", + "_replacement": "uk" + }, + "umu": { + "_reason": "macrolanguage", + "_replacement": "del" + }, + "und-aaland": { + "_reason": "deprecated", + "_replacement": "und-AX" + }, + "und-arevela": { + "_reason": "deprecated", + "_replacement": "und" + }, + "und-arevmda": { + "_reason": "deprecated", + "_replacement": "und" + }, + "und-bokmal": { + "_reason": "deprecated", + "_replacement": "und" + }, + "und-hakka": { + "_reason": "deprecated", + "_replacement": "und" + }, + "und-hepburn-heploc": { + "_reason": "deprecated", + "_replacement": "und-alalc97" + }, + "und-lojban": { + "_reason": "deprecated", + "_replacement": "und" + }, + "und-nynorsk": { + "_reason": "deprecated", + "_replacement": "und" + }, + "und-saaho": { + "_reason": "deprecated", + "_replacement": "und" + }, + "und-xiang": { + "_reason": "deprecated", + "_replacement": "und" + }, + "unp": { + "_reason": "deprecated", + "_replacement": "wro" + }, + "uok": { + "_reason": "deprecated", + "_replacement": "ema" + }, + "urd": { + "_reason": "overlong", + "_replacement": "ur" + }, + "uzb": { + "_reason": "overlong", + "_replacement": "uz" + }, + "uzn": { + "_reason": "macrolanguage", + "_replacement": "uz" + }, + "ven": { + "_reason": "overlong", + "_replacement": "ve" + }, + "vie": { + "_reason": "overlong", + "_replacement": "vi" + }, + "vol": { + "_reason": "overlong", + "_replacement": "vo" + }, + "wel": { + "_reason": "bibliographic", + "_replacement": "cy" + }, + "wgw": { + "_reason": "deprecated", + "_replacement": "wgb" + }, + "wit": { + "_reason": "deprecated", + "_replacement": "nol" + }, + "wiw": { + "_reason": "deprecated", + "_replacement": "nwo" + }, + "wln": { + "_reason": "overlong", + "_replacement": "wa" + }, + "wol": { + "_reason": "overlong", + "_replacement": "wo" + }, + "xba": { + "_reason": "deprecated", + "_replacement": "cax" + }, + "xho": { + "_reason": "overlong", + "_replacement": "xh" + }, + "xia": { + "_reason": "deprecated", + "_replacement": "acn" + }, + "xkh": { + "_reason": "deprecated", + "_replacement": "waw" + }, + "xpe": { + "_reason": "macrolanguage", + "_replacement": "kpe" + }, + "xrq": { + "_reason": "deprecated", + "_replacement": "dmw" + }, + "xsj": { + "_reason": "deprecated", + "_replacement": "suj" + }, + "xsl": { + "_reason": "macrolanguage", + "_replacement": "den" + }, + "ybd": { + "_reason": "deprecated", + "_replacement": "rki" + }, + "ydd": { + "_reason": "macrolanguage", + "_replacement": "yi" + }, + "yen": { + "_reason": "deprecated", + "_replacement": "ynq" + }, + "yid": { + "_reason": "overlong", + "_replacement": "yi" + }, + "yiy": { + "_reason": "deprecated", + "_replacement": "yrm" + }, + "yma": { + "_reason": "deprecated", + "_replacement": "lrr" + }, + "ymt": { + "_reason": "deprecated", + "_replacement": "mtm" + }, + "yor": { + "_reason": "overlong", + "_replacement": "yo" + }, + "yos": { + "_reason": "deprecated", + "_replacement": "zom" + }, + "yuu": { + "_reason": "deprecated", + "_replacement": "yug" + }, + "zai": { + "_reason": "macrolanguage", + "_replacement": "zap" + }, + "zh-cmn": { + "_reason": "deprecated", + "_replacement": "zh" + }, + "zh-cmn-Hans": { + "_reason": "deprecated", + "_replacement": "zh-Hans" + }, + "zh-cmn-Hant": { + "_reason": "deprecated", + "_replacement": "zh-Hant" + }, + "zh-gan": { + "_reason": "deprecated", + "_replacement": "gan" + }, + "zh-guoyu": { + "_reason": "deprecated", + "_replacement": "zh" + }, + "zh-hakka": { + "_reason": "deprecated", + "_replacement": "hak" + }, + "zh-min": { + "_reason": "legacy", + "_replacement": "nan-x-zh-min" + }, + "zh-min-nan": { + "_reason": "deprecated", + "_replacement": "nan" + }, + "zh-wuu": { + "_reason": "deprecated", + "_replacement": "wuu" + }, + "zh-xiang": { + "_reason": "deprecated", + "_replacement": "hsn" + }, + "zh-yue": { + "_reason": "deprecated", + "_replacement": "yue" + }, + "zha": { + "_reason": "overlong", + "_replacement": "za" + }, + "zho": { + "_reason": "overlong", + "_replacement": "zh" + }, + "zir": { + "_reason": "deprecated", + "_replacement": "scv" + }, + "zsm": { + "_reason": "macrolanguage", + "_replacement": "ms" + }, + "zul": { + "_reason": "overlong", + "_replacement": "zu" + }, + "zyb": { + "_reason": "macrolanguage", + "_replacement": "za" + } + }, + "scriptAlias": { + "Qaai": { + "_reason": "deprecated", + "_replacement": "Zinh" + } + }, + "territoryAlias": { + "004": { + "_reason": "overlong", + "_replacement": "AF" + }, + "008": { + "_reason": "overlong", + "_replacement": "AL" + }, + "010": { + "_reason": "overlong", + "_replacement": "AQ" + }, + "012": { + "_reason": "overlong", + "_replacement": "DZ" + }, + "016": { + "_reason": "overlong", + "_replacement": "AS" + }, + "020": { + "_reason": "overlong", + "_replacement": "AD" + }, + "024": { + "_reason": "overlong", + "_replacement": "AO" + }, + "028": { + "_reason": "overlong", + "_replacement": "AG" + }, + "031": { + "_reason": "overlong", + "_replacement": "AZ" + }, + "032": { + "_reason": "overlong", + "_replacement": "AR" + }, + "036": { + "_reason": "overlong", + "_replacement": "AU" + }, + "040": { + "_reason": "overlong", + "_replacement": "AT" + }, + "044": { + "_reason": "overlong", + "_replacement": "BS" + }, + "048": { + "_reason": "overlong", + "_replacement": "BH" + }, + "050": { + "_reason": "overlong", + "_replacement": "BD" + }, + "051": { + "_reason": "overlong", + "_replacement": "AM" + }, + "052": { + "_reason": "overlong", + "_replacement": "BB" + }, + "056": { + "_reason": "overlong", + "_replacement": "BE" + }, + "060": { + "_reason": "overlong", + "_replacement": "BM" + }, + "062": { + "_reason": "deprecated", + "_replacement": "034 143" + }, + "064": { + "_reason": "overlong", + "_replacement": "BT" + }, + "068": { + "_reason": "overlong", + "_replacement": "BO" + }, + "070": { + "_reason": "overlong", + "_replacement": "BA" + }, + "072": { + "_reason": "overlong", + "_replacement": "BW" + }, + "074": { + "_reason": "overlong", + "_replacement": "BV" + }, + "076": { + "_reason": "overlong", + "_replacement": "BR" + }, + "084": { + "_reason": "overlong", + "_replacement": "BZ" + }, + "086": { + "_reason": "overlong", + "_replacement": "IO" + }, + "090": { + "_reason": "overlong", + "_replacement": "SB" + }, + "092": { + "_reason": "overlong", + "_replacement": "VG" + }, + "096": { + "_reason": "overlong", + "_replacement": "BN" + }, + "100": { + "_reason": "overlong", + "_replacement": "BG" + }, + "104": { + "_reason": "overlong", + "_replacement": "MM" + }, + "108": { + "_reason": "overlong", + "_replacement": "BI" + }, + "112": { + "_reason": "overlong", + "_replacement": "BY" + }, + "116": { + "_reason": "overlong", + "_replacement": "KH" + }, + "120": { + "_reason": "overlong", + "_replacement": "CM" + }, + "124": { + "_reason": "overlong", + "_replacement": "CA" + }, + "132": { + "_reason": "overlong", + "_replacement": "CV" + }, + "136": { + "_reason": "overlong", + "_replacement": "KY" + }, + "140": { + "_reason": "overlong", + "_replacement": "CF" + }, + "144": { + "_reason": "overlong", + "_replacement": "LK" + }, + "148": { + "_reason": "overlong", + "_replacement": "TD" + }, + "152": { + "_reason": "overlong", + "_replacement": "CL" + }, + "156": { + "_reason": "overlong", + "_replacement": "CN" + }, + "158": { + "_reason": "overlong", + "_replacement": "TW" + }, + "162": { + "_reason": "overlong", + "_replacement": "CX" + }, + "166": { + "_reason": "overlong", + "_replacement": "CC" + }, + "170": { + "_reason": "overlong", + "_replacement": "CO" + }, + "172": { + "_reason": "deprecated", + "_replacement": "RU AM AZ BY GE KG KZ MD TJ TM UA UZ" + }, + "174": { + "_reason": "overlong", + "_replacement": "KM" + }, + "175": { + "_reason": "overlong", + "_replacement": "YT" + }, + "178": { + "_reason": "overlong", + "_replacement": "CG" + }, + "180": { + "_reason": "overlong", + "_replacement": "CD" + }, + "184": { + "_reason": "overlong", + "_replacement": "CK" + }, + "188": { + "_reason": "overlong", + "_replacement": "CR" + }, + "191": { + "_reason": "overlong", + "_replacement": "HR" + }, + "192": { + "_reason": "overlong", + "_replacement": "CU" + }, + "196": { + "_reason": "overlong", + "_replacement": "CY" + }, + "200": { + "_reason": "deprecated", + "_replacement": "CZ SK" + }, + "203": { + "_reason": "overlong", + "_replacement": "CZ" + }, + "204": { + "_reason": "overlong", + "_replacement": "BJ" + }, + "208": { + "_reason": "overlong", + "_replacement": "DK" + }, + "212": { + "_reason": "overlong", + "_replacement": "DM" + }, + "214": { + "_reason": "overlong", + "_replacement": "DO" + }, + "218": { + "_reason": "overlong", + "_replacement": "EC" + }, + "222": { + "_reason": "overlong", + "_replacement": "SV" + }, + "226": { + "_reason": "overlong", + "_replacement": "GQ" + }, + "230": { + "_reason": "deprecated", + "_replacement": "ET" + }, + "231": { + "_reason": "overlong", + "_replacement": "ET" + }, + "232": { + "_reason": "overlong", + "_replacement": "ER" + }, + "233": { + "_reason": "overlong", + "_replacement": "EE" + }, + "234": { + "_reason": "overlong", + "_replacement": "FO" + }, + "238": { + "_reason": "overlong", + "_replacement": "FK" + }, + "239": { + "_reason": "overlong", + "_replacement": "GS" + }, + "242": { + "_reason": "overlong", + "_replacement": "FJ" + }, + "246": { + "_reason": "overlong", + "_replacement": "FI" + }, + "248": { + "_reason": "overlong", + "_replacement": "AX" + }, + "249": { + "_reason": "overlong", + "_replacement": "FR" + }, + "250": { + "_reason": "overlong", + "_replacement": "FR" + }, + "254": { + "_reason": "overlong", + "_replacement": "GF" + }, + "258": { + "_reason": "overlong", + "_replacement": "PF" + }, + "260": { + "_reason": "overlong", + "_replacement": "TF" + }, + "262": { + "_reason": "overlong", + "_replacement": "DJ" + }, + "266": { + "_reason": "overlong", + "_replacement": "GA" + }, + "268": { + "_reason": "overlong", + "_replacement": "GE" + }, + "270": { + "_reason": "overlong", + "_replacement": "GM" + }, + "275": { + "_reason": "overlong", + "_replacement": "PS" + }, + "276": { + "_reason": "overlong", + "_replacement": "DE" + }, + "278": { + "_reason": "overlong", + "_replacement": "DE" + }, + "280": { + "_reason": "deprecated", + "_replacement": "DE" + }, + "288": { + "_reason": "overlong", + "_replacement": "GH" + }, + "292": { + "_reason": "overlong", + "_replacement": "GI" + }, + "296": { + "_reason": "overlong", + "_replacement": "KI" + }, + "300": { + "_reason": "overlong", + "_replacement": "GR" + }, + "304": { + "_reason": "overlong", + "_replacement": "GL" + }, + "308": { + "_reason": "overlong", + "_replacement": "GD" + }, + "312": { + "_reason": "overlong", + "_replacement": "GP" + }, + "316": { + "_reason": "overlong", + "_replacement": "GU" + }, + "320": { + "_reason": "overlong", + "_replacement": "GT" + }, + "324": { + "_reason": "overlong", + "_replacement": "GN" + }, + "328": { + "_reason": "overlong", + "_replacement": "GY" + }, + "332": { + "_reason": "overlong", + "_replacement": "HT" + }, + "334": { + "_reason": "overlong", + "_replacement": "HM" + }, + "336": { + "_reason": "overlong", + "_replacement": "VA" + }, + "340": { + "_reason": "overlong", + "_replacement": "HN" + }, + "344": { + "_reason": "overlong", + "_replacement": "HK" + }, + "348": { + "_reason": "overlong", + "_replacement": "HU" + }, + "352": { + "_reason": "overlong", + "_replacement": "IS" + }, + "356": { + "_reason": "overlong", + "_replacement": "IN" + }, + "360": { + "_reason": "overlong", + "_replacement": "ID" + }, + "364": { + "_reason": "overlong", + "_replacement": "IR" + }, + "368": { + "_reason": "overlong", + "_replacement": "IQ" + }, + "372": { + "_reason": "overlong", + "_replacement": "IE" + }, + "376": { + "_reason": "overlong", + "_replacement": "IL" + }, + "380": { + "_reason": "overlong", + "_replacement": "IT" + }, + "384": { + "_reason": "overlong", + "_replacement": "CI" + }, + "388": { + "_reason": "overlong", + "_replacement": "JM" + }, + "392": { + "_reason": "overlong", + "_replacement": "JP" + }, + "398": { + "_reason": "overlong", + "_replacement": "KZ" + }, + "400": { + "_reason": "overlong", + "_replacement": "JO" + }, + "404": { + "_reason": "overlong", + "_replacement": "KE" + }, + "408": { + "_reason": "overlong", + "_replacement": "KP" + }, + "410": { + "_reason": "overlong", + "_replacement": "KR" + }, + "414": { + "_reason": "overlong", + "_replacement": "KW" + }, + "417": { + "_reason": "overlong", + "_replacement": "KG" + }, + "418": { + "_reason": "overlong", + "_replacement": "LA" + }, + "422": { + "_reason": "overlong", + "_replacement": "LB" + }, + "426": { + "_reason": "overlong", + "_replacement": "LS" + }, + "428": { + "_reason": "overlong", + "_replacement": "LV" + }, + "430": { + "_reason": "overlong", + "_replacement": "LR" + }, + "434": { + "_reason": "overlong", + "_replacement": "LY" + }, + "438": { + "_reason": "overlong", + "_replacement": "LI" + }, + "440": { + "_reason": "overlong", + "_replacement": "LT" + }, + "442": { + "_reason": "overlong", + "_replacement": "LU" + }, + "446": { + "_reason": "overlong", + "_replacement": "MO" + }, + "450": { + "_reason": "overlong", + "_replacement": "MG" + }, + "454": { + "_reason": "overlong", + "_replacement": "MW" + }, + "458": { + "_reason": "overlong", + "_replacement": "MY" + }, + "462": { + "_reason": "overlong", + "_replacement": "MV" + }, + "466": { + "_reason": "overlong", + "_replacement": "ML" + }, + "470": { + "_reason": "overlong", + "_replacement": "MT" + }, + "474": { + "_reason": "overlong", + "_replacement": "MQ" + }, + "478": { + "_reason": "overlong", + "_replacement": "MR" + }, + "480": { + "_reason": "overlong", + "_replacement": "MU" + }, + "484": { + "_reason": "overlong", + "_replacement": "MX" + }, + "492": { + "_reason": "overlong", + "_replacement": "MC" + }, + "496": { + "_reason": "overlong", + "_replacement": "MN" + }, + "498": { + "_reason": "overlong", + "_replacement": "MD" + }, + "499": { + "_reason": "overlong", + "_replacement": "ME" + }, + "500": { + "_reason": "overlong", + "_replacement": "MS" + }, + "504": { + "_reason": "overlong", + "_replacement": "MA" + }, + "508": { + "_reason": "overlong", + "_replacement": "MZ" + }, + "512": { + "_reason": "overlong", + "_replacement": "OM" + }, + "516": { + "_reason": "overlong", + "_replacement": "NA" + }, + "520": { + "_reason": "overlong", + "_replacement": "NR" + }, + "524": { + "_reason": "overlong", + "_replacement": "NP" + }, + "528": { + "_reason": "overlong", + "_replacement": "NL" + }, + "530": { + "_reason": "overlong", + "_replacement": "CW SX BQ" + }, + "531": { + "_reason": "overlong", + "_replacement": "CW" + }, + "532": { + "_reason": "deprecated", + "_replacement": "CW SX BQ" + }, + "533": { + "_reason": "overlong", + "_replacement": "AW" + }, + "534": { + "_reason": "overlong", + "_replacement": "SX" + }, + "535": { + "_reason": "overlong", + "_replacement": "BQ" + }, + "536": { + "_reason": "overlong", + "_replacement": "SA IQ" + }, + "540": { + "_reason": "overlong", + "_replacement": "NC" + }, + "548": { + "_reason": "overlong", + "_replacement": "VU" + }, + "554": { + "_reason": "overlong", + "_replacement": "NZ" + }, + "558": { + "_reason": "overlong", + "_replacement": "NI" + }, + "562": { + "_reason": "overlong", + "_replacement": "NE" + }, + "566": { + "_reason": "overlong", + "_replacement": "NG" + }, + "570": { + "_reason": "overlong", + "_replacement": "NU" + }, + "574": { + "_reason": "overlong", + "_replacement": "NF" + }, + "578": { + "_reason": "overlong", + "_replacement": "NO" + }, + "580": { + "_reason": "overlong", + "_replacement": "MP" + }, + "581": { + "_reason": "overlong", + "_replacement": "UM" + }, + "582": { + "_reason": "deprecated", + "_replacement": "FM MH MP PW" + }, + "583": { + "_reason": "overlong", + "_replacement": "FM" + }, + "584": { + "_reason": "overlong", + "_replacement": "MH" + }, + "585": { + "_reason": "overlong", + "_replacement": "PW" + }, + "586": { + "_reason": "overlong", + "_replacement": "PK" + }, + "591": { + "_reason": "overlong", + "_replacement": "PA" + }, + "598": { + "_reason": "overlong", + "_replacement": "PG" + }, + "600": { + "_reason": "overlong", + "_replacement": "PY" + }, + "604": { + "_reason": "overlong", + "_replacement": "PE" + }, + "608": { + "_reason": "overlong", + "_replacement": "PH" + }, + "612": { + "_reason": "overlong", + "_replacement": "PN" + }, + "616": { + "_reason": "overlong", + "_replacement": "PL" + }, + "620": { + "_reason": "overlong", + "_replacement": "PT" + }, + "624": { + "_reason": "overlong", + "_replacement": "GW" + }, + "626": { + "_reason": "overlong", + "_replacement": "TL" + }, + "630": { + "_reason": "overlong", + "_replacement": "PR" + }, + "634": { + "_reason": "overlong", + "_replacement": "QA" + }, + "638": { + "_reason": "overlong", + "_replacement": "RE" + }, + "642": { + "_reason": "overlong", + "_replacement": "RO" + }, + "643": { + "_reason": "overlong", + "_replacement": "RU" + }, + "646": { + "_reason": "overlong", + "_replacement": "RW" + }, + "652": { + "_reason": "overlong", + "_replacement": "BL" + }, + "654": { + "_reason": "overlong", + "_replacement": "SH" + }, + "659": { + "_reason": "overlong", + "_replacement": "KN" + }, + "660": { + "_reason": "overlong", + "_replacement": "AI" + }, + "662": { + "_reason": "overlong", + "_replacement": "LC" + }, + "663": { + "_reason": "overlong", + "_replacement": "MF" + }, + "666": { + "_reason": "overlong", + "_replacement": "PM" + }, + "670": { + "_reason": "overlong", + "_replacement": "VC" + }, + "674": { + "_reason": "overlong", + "_replacement": "SM" + }, + "678": { + "_reason": "overlong", + "_replacement": "ST" + }, + "682": { + "_reason": "overlong", + "_replacement": "SA" + }, + "686": { + "_reason": "overlong", + "_replacement": "SN" + }, + "688": { + "_reason": "overlong", + "_replacement": "RS" + }, + "690": { + "_reason": "overlong", + "_replacement": "SC" + }, + "694": { + "_reason": "overlong", + "_replacement": "SL" + }, + "702": { + "_reason": "overlong", + "_replacement": "SG" + }, + "703": { + "_reason": "overlong", + "_replacement": "SK" + }, + "704": { + "_reason": "overlong", + "_replacement": "VN" + }, + "705": { + "_reason": "overlong", + "_replacement": "SI" + }, + "706": { + "_reason": "overlong", + "_replacement": "SO" + }, + "710": { + "_reason": "overlong", + "_replacement": "ZA" + }, + "716": { + "_reason": "overlong", + "_replacement": "ZW" + }, + "720": { + "_reason": "overlong", + "_replacement": "YE" + }, + "724": { + "_reason": "overlong", + "_replacement": "ES" + }, + "728": { + "_reason": "overlong", + "_replacement": "SS" + }, + "729": { + "_reason": "overlong", + "_replacement": "SD" + }, + "732": { + "_reason": "overlong", + "_replacement": "EH" + }, + "736": { + "_reason": "deprecated", + "_replacement": "SD" + }, + "740": { + "_reason": "overlong", + "_replacement": "SR" + }, + "744": { + "_reason": "overlong", + "_replacement": "SJ" + }, + "748": { + "_reason": "overlong", + "_replacement": "SZ" + }, + "752": { + "_reason": "overlong", + "_replacement": "SE" + }, + "756": { + "_reason": "overlong", + "_replacement": "CH" + }, + "760": { + "_reason": "overlong", + "_replacement": "SY" + }, + "762": { + "_reason": "overlong", + "_replacement": "TJ" + }, + "764": { + "_reason": "overlong", + "_replacement": "TH" + }, + "768": { + "_reason": "overlong", + "_replacement": "TG" + }, + "772": { + "_reason": "overlong", + "_replacement": "TK" + }, + "776": { + "_reason": "overlong", + "_replacement": "TO" + }, + "780": { + "_reason": "overlong", + "_replacement": "TT" + }, + "784": { + "_reason": "overlong", + "_replacement": "AE" + }, + "788": { + "_reason": "overlong", + "_replacement": "TN" + }, + "792": { + "_reason": "overlong", + "_replacement": "TR" + }, + "795": { + "_reason": "overlong", + "_replacement": "TM" + }, + "796": { + "_reason": "overlong", + "_replacement": "TC" + }, + "798": { + "_reason": "overlong", + "_replacement": "TV" + }, + "800": { + "_reason": "overlong", + "_replacement": "UG" + }, + "804": { + "_reason": "overlong", + "_replacement": "UA" + }, + "807": { + "_reason": "overlong", + "_replacement": "MK" + }, + "810": { + "_reason": "overlong", + "_replacement": "RU AM AZ BY EE GE KZ KG LV LT MD TJ TM UA UZ" + }, + "818": { + "_reason": "overlong", + "_replacement": "EG" + }, + "826": { + "_reason": "overlong", + "_replacement": "GB" + }, + "830": { + "_reason": "deprecated", + "_replacement": "JE GG" + }, + "831": { + "_reason": "overlong", + "_replacement": "GG" + }, + "832": { + "_reason": "overlong", + "_replacement": "JE" + }, + "833": { + "_reason": "overlong", + "_replacement": "IM" + }, + "834": { + "_reason": "overlong", + "_replacement": "TZ" + }, + "840": { + "_reason": "overlong", + "_replacement": "US" + }, + "850": { + "_reason": "overlong", + "_replacement": "VI" + }, + "854": { + "_reason": "overlong", + "_replacement": "BF" + }, + "858": { + "_reason": "overlong", + "_replacement": "UY" + }, + "860": { + "_reason": "overlong", + "_replacement": "UZ" + }, + "862": { + "_reason": "overlong", + "_replacement": "VE" + }, + "876": { + "_reason": "overlong", + "_replacement": "WF" + }, + "882": { + "_reason": "overlong", + "_replacement": "WS" + }, + "886": { + "_reason": "deprecated", + "_replacement": "YE" + }, + "887": { + "_reason": "overlong", + "_replacement": "YE" + }, + "890": { + "_reason": "deprecated", + "_replacement": "RS ME SI HR MK BA" + }, + "891": { + "_reason": "overlong", + "_replacement": "RS ME" + }, + "894": { + "_reason": "overlong", + "_replacement": "ZM" + }, + "958": { + "_reason": "overlong", + "_replacement": "AA" + }, + "959": { + "_reason": "overlong", + "_replacement": "QM" + }, + "960": { + "_reason": "overlong", + "_replacement": "QN" + }, + "962": { + "_reason": "overlong", + "_replacement": "QP" + }, + "963": { + "_reason": "overlong", + "_replacement": "QQ" + }, + "964": { + "_reason": "overlong", + "_replacement": "QR" + }, + "965": { + "_reason": "overlong", + "_replacement": "QS" + }, + "966": { + "_reason": "overlong", + "_replacement": "QT" + }, + "967": { + "_reason": "overlong", + "_replacement": "EU" + }, + "968": { + "_reason": "overlong", + "_replacement": "QV" + }, + "969": { + "_reason": "overlong", + "_replacement": "QW" + }, + "970": { + "_reason": "overlong", + "_replacement": "QX" + }, + "971": { + "_reason": "overlong", + "_replacement": "QY" + }, + "972": { + "_reason": "overlong", + "_replacement": "QZ" + }, + "973": { + "_reason": "overlong", + "_replacement": "XA" + }, + "974": { + "_reason": "overlong", + "_replacement": "XB" + }, + "975": { + "_reason": "overlong", + "_replacement": "XC" + }, + "976": { + "_reason": "overlong", + "_replacement": "XD" + }, + "977": { + "_reason": "overlong", + "_replacement": "XE" + }, + "978": { + "_reason": "overlong", + "_replacement": "XF" + }, + "979": { + "_reason": "overlong", + "_replacement": "XG" + }, + "980": { + "_reason": "overlong", + "_replacement": "XH" + }, + "981": { + "_reason": "overlong", + "_replacement": "XI" + }, + "982": { + "_reason": "overlong", + "_replacement": "XJ" + }, + "983": { + "_reason": "overlong", + "_replacement": "XK" + }, + "984": { + "_reason": "overlong", + "_replacement": "XL" + }, + "985": { + "_reason": "overlong", + "_replacement": "XM" + }, + "986": { + "_reason": "overlong", + "_replacement": "XN" + }, + "987": { + "_reason": "overlong", + "_replacement": "XO" + }, + "988": { + "_reason": "overlong", + "_replacement": "XP" + }, + "989": { + "_reason": "overlong", + "_replacement": "XQ" + }, + "990": { + "_reason": "overlong", + "_replacement": "XR" + }, + "991": { + "_reason": "overlong", + "_replacement": "XS" + }, + "992": { + "_reason": "overlong", + "_replacement": "XT" + }, + "993": { + "_reason": "overlong", + "_replacement": "XU" + }, + "994": { + "_reason": "overlong", + "_replacement": "XV" + }, + "995": { + "_reason": "overlong", + "_replacement": "XW" + }, + "996": { + "_reason": "overlong", + "_replacement": "XX" + }, + "997": { + "_reason": "overlong", + "_replacement": "XY" + }, + "998": { + "_reason": "overlong", + "_replacement": "XZ" + }, + "999": { + "_reason": "overlong", + "_replacement": "ZZ" + }, + "AAA": { + "_reason": "overlong", + "_replacement": "AA" + }, + "ABW": { + "_reason": "overlong", + "_replacement": "AW" + }, + "AFG": { + "_reason": "overlong", + "_replacement": "AF" + }, + "AGO": { + "_reason": "overlong", + "_replacement": "AO" + }, + "AIA": { + "_reason": "overlong", + "_replacement": "AI" + }, + "ALA": { + "_reason": "overlong", + "_replacement": "AX" + }, + "ALB": { + "_reason": "overlong", + "_replacement": "AL" + }, + "AN": { + "_reason": "deprecated", + "_replacement": "CW SX BQ" + }, + "AND": { + "_reason": "overlong", + "_replacement": "AD" + }, + "ANT": { + "_reason": "overlong", + "_replacement": "CW SX BQ" + }, + "ARE": { + "_reason": "overlong", + "_replacement": "AE" + }, + "ARG": { + "_reason": "overlong", + "_replacement": "AR" + }, + "ARM": { + "_reason": "overlong", + "_replacement": "AM" + }, + "ASC": { + "_reason": "overlong", + "_replacement": "AC" + }, + "ASM": { + "_reason": "overlong", + "_replacement": "AS" + }, + "ATA": { + "_reason": "overlong", + "_replacement": "AQ" + }, + "ATF": { + "_reason": "overlong", + "_replacement": "TF" + }, + "ATG": { + "_reason": "overlong", + "_replacement": "AG" + }, + "AUS": { + "_reason": "overlong", + "_replacement": "AU" + }, + "AUT": { + "_reason": "overlong", + "_replacement": "AT" + }, + "AZE": { + "_reason": "overlong", + "_replacement": "AZ" + }, + "BDI": { + "_reason": "overlong", + "_replacement": "BI" + }, + "BEL": { + "_reason": "overlong", + "_replacement": "BE" + }, + "BEN": { + "_reason": "overlong", + "_replacement": "BJ" + }, + "BES": { + "_reason": "overlong", + "_replacement": "BQ" + }, + "BFA": { + "_reason": "overlong", + "_replacement": "BF" + }, + "BGD": { + "_reason": "overlong", + "_replacement": "BD" + }, + "BGR": { + "_reason": "overlong", + "_replacement": "BG" + }, + "BHR": { + "_reason": "overlong", + "_replacement": "BH" + }, + "BHS": { + "_reason": "overlong", + "_replacement": "BS" + }, + "BIH": { + "_reason": "overlong", + "_replacement": "BA" + }, + "BLM": { + "_reason": "overlong", + "_replacement": "BL" + }, + "BLR": { + "_reason": "overlong", + "_replacement": "BY" + }, + "BLZ": { + "_reason": "overlong", + "_replacement": "BZ" + }, + "BMU": { + "_reason": "overlong", + "_replacement": "BM" + }, + "BOL": { + "_reason": "overlong", + "_replacement": "BO" + }, + "BRA": { + "_reason": "overlong", + "_replacement": "BR" + }, + "BRB": { + "_reason": "overlong", + "_replacement": "BB" + }, + "BRN": { + "_reason": "overlong", + "_replacement": "BN" + }, + "BTN": { + "_reason": "overlong", + "_replacement": "BT" + }, + "BU": { + "_reason": "deprecated", + "_replacement": "MM" + }, + "BUR": { + "_reason": "overlong", + "_replacement": "MM" + }, + "BVT": { + "_reason": "overlong", + "_replacement": "BV" + }, + "BWA": { + "_reason": "overlong", + "_replacement": "BW" + }, + "CAF": { + "_reason": "overlong", + "_replacement": "CF" + }, + "CAN": { + "_reason": "overlong", + "_replacement": "CA" + }, + "CCK": { + "_reason": "overlong", + "_replacement": "CC" + }, + "CHE": { + "_reason": "overlong", + "_replacement": "CH" + }, + "CHL": { + "_reason": "overlong", + "_replacement": "CL" + }, + "CHN": { + "_reason": "overlong", + "_replacement": "CN" + }, + "CIV": { + "_reason": "overlong", + "_replacement": "CI" + }, + "CMR": { + "_reason": "overlong", + "_replacement": "CM" + }, + "COD": { + "_reason": "overlong", + "_replacement": "CD" + }, + "COG": { + "_reason": "overlong", + "_replacement": "CG" + }, + "COK": { + "_reason": "overlong", + "_replacement": "CK" + }, + "COL": { + "_reason": "overlong", + "_replacement": "CO" + }, + "COM": { + "_reason": "overlong", + "_replacement": "KM" + }, + "CPT": { + "_reason": "overlong", + "_replacement": "CP" + }, + "CPV": { + "_reason": "overlong", + "_replacement": "CV" + }, + "CRI": { + "_reason": "overlong", + "_replacement": "CR" + }, + "CS": { + "_reason": "deprecated", + "_replacement": "RS ME" + }, + "CT": { + "_reason": "deprecated", + "_replacement": "KI" + }, + "CUB": { + "_reason": "overlong", + "_replacement": "CU" + }, + "CUW": { + "_reason": "overlong", + "_replacement": "CW" + }, + "CXR": { + "_reason": "overlong", + "_replacement": "CX" + }, + "CYM": { + "_reason": "overlong", + "_replacement": "KY" + }, + "CYP": { + "_reason": "overlong", + "_replacement": "CY" + }, + "CZE": { + "_reason": "overlong", + "_replacement": "CZ" + }, + "DD": { + "_reason": "deprecated", + "_replacement": "DE" + }, + "DDR": { + "_reason": "overlong", + "_replacement": "DE" + }, + "DEU": { + "_reason": "overlong", + "_replacement": "DE" + }, + "DGA": { + "_reason": "overlong", + "_replacement": "DG" + }, + "DJI": { + "_reason": "overlong", + "_replacement": "DJ" + }, + "DMA": { + "_reason": "overlong", + "_replacement": "DM" + }, + "DNK": { + "_reason": "overlong", + "_replacement": "DK" + }, + "DOM": { + "_reason": "overlong", + "_replacement": "DO" + }, + "DY": { + "_reason": "deprecated", + "_replacement": "BJ" + }, + "DZA": { + "_reason": "overlong", + "_replacement": "DZ" + }, + "ECU": { + "_reason": "overlong", + "_replacement": "EC" + }, + "EGY": { + "_reason": "overlong", + "_replacement": "EG" + }, + "ERI": { + "_reason": "overlong", + "_replacement": "ER" + }, + "ESH": { + "_reason": "overlong", + "_replacement": "EH" + }, + "ESP": { + "_reason": "overlong", + "_replacement": "ES" + }, + "EST": { + "_reason": "overlong", + "_replacement": "EE" + }, + "ETH": { + "_reason": "overlong", + "_replacement": "ET" + }, + "FIN": { + "_reason": "overlong", + "_replacement": "FI" + }, + "FJI": { + "_reason": "overlong", + "_replacement": "FJ" + }, + "FLK": { + "_reason": "overlong", + "_replacement": "FK" + }, + "FQ": { + "_reason": "deprecated", + "_replacement": "AQ TF" + }, + "FRA": { + "_reason": "overlong", + "_replacement": "FR" + }, + "FRO": { + "_reason": "overlong", + "_replacement": "FO" + }, + "FSM": { + "_reason": "overlong", + "_replacement": "FM" + }, + "FX": { + "_reason": "deprecated", + "_replacement": "FR" + }, + "FXX": { + "_reason": "overlong", + "_replacement": "FR" + }, + "GAB": { + "_reason": "overlong", + "_replacement": "GA" + }, + "GBR": { + "_reason": "overlong", + "_replacement": "GB" + }, + "GEO": { + "_reason": "overlong", + "_replacement": "GE" + }, + "GGY": { + "_reason": "overlong", + "_replacement": "GG" + }, + "GHA": { + "_reason": "overlong", + "_replacement": "GH" + }, + "GIB": { + "_reason": "overlong", + "_replacement": "GI" + }, + "GIN": { + "_reason": "overlong", + "_replacement": "GN" + }, + "GLP": { + "_reason": "overlong", + "_replacement": "GP" + }, + "GMB": { + "_reason": "overlong", + "_replacement": "GM" + }, + "GNB": { + "_reason": "overlong", + "_replacement": "GW" + }, + "GNQ": { + "_reason": "overlong", + "_replacement": "GQ" + }, + "GRC": { + "_reason": "overlong", + "_replacement": "GR" + }, + "GRD": { + "_reason": "overlong", + "_replacement": "GD" + }, + "GRL": { + "_reason": "overlong", + "_replacement": "GL" + }, + "GTM": { + "_reason": "overlong", + "_replacement": "GT" + }, + "GUF": { + "_reason": "overlong", + "_replacement": "GF" + }, + "GUM": { + "_reason": "overlong", + "_replacement": "GU" + }, + "GUY": { + "_reason": "overlong", + "_replacement": "GY" + }, + "HKG": { + "_reason": "overlong", + "_replacement": "HK" + }, + "HMD": { + "_reason": "overlong", + "_replacement": "HM" + }, + "HND": { + "_reason": "overlong", + "_replacement": "HN" + }, + "HRV": { + "_reason": "overlong", + "_replacement": "HR" + }, + "HTI": { + "_reason": "overlong", + "_replacement": "HT" + }, + "HUN": { + "_reason": "overlong", + "_replacement": "HU" + }, + "HV": { + "_reason": "deprecated", + "_replacement": "BF" + }, + "IDN": { + "_reason": "overlong", + "_replacement": "ID" + }, + "IMN": { + "_reason": "overlong", + "_replacement": "IM" + }, + "IND": { + "_reason": "overlong", + "_replacement": "IN" + }, + "IOT": { + "_reason": "overlong", + "_replacement": "IO" + }, + "IRL": { + "_reason": "overlong", + "_replacement": "IE" + }, + "IRN": { + "_reason": "overlong", + "_replacement": "IR" + }, + "IRQ": { + "_reason": "overlong", + "_replacement": "IQ" + }, + "ISL": { + "_reason": "overlong", + "_replacement": "IS" + }, + "ISR": { + "_reason": "overlong", + "_replacement": "IL" + }, + "ITA": { + "_reason": "overlong", + "_replacement": "IT" + }, + "JAM": { + "_reason": "overlong", + "_replacement": "JM" + }, + "JEY": { + "_reason": "overlong", + "_replacement": "JE" + }, + "JOR": { + "_reason": "overlong", + "_replacement": "JO" + }, + "JPN": { + "_reason": "overlong", + "_replacement": "JP" + }, + "JT": { + "_reason": "deprecated", + "_replacement": "UM" + }, + "KAZ": { + "_reason": "overlong", + "_replacement": "KZ" + }, + "KEN": { + "_reason": "overlong", + "_replacement": "KE" + }, + "KGZ": { + "_reason": "overlong", + "_replacement": "KG" + }, + "KHM": { + "_reason": "overlong", + "_replacement": "KH" + }, + "KIR": { + "_reason": "overlong", + "_replacement": "KI" + }, + "KNA": { + "_reason": "overlong", + "_replacement": "KN" + }, + "KOR": { + "_reason": "overlong", + "_replacement": "KR" + }, + "KWT": { + "_reason": "overlong", + "_replacement": "KW" + }, + "LAO": { + "_reason": "overlong", + "_replacement": "LA" + }, + "LBN": { + "_reason": "overlong", + "_replacement": "LB" + }, + "LBR": { + "_reason": "overlong", + "_replacement": "LR" + }, + "LBY": { + "_reason": "overlong", + "_replacement": "LY" + }, + "LCA": { + "_reason": "overlong", + "_replacement": "LC" + }, + "LIE": { + "_reason": "overlong", + "_replacement": "LI" + }, + "LKA": { + "_reason": "overlong", + "_replacement": "LK" + }, + "LSO": { + "_reason": "overlong", + "_replacement": "LS" + }, + "LTU": { + "_reason": "overlong", + "_replacement": "LT" + }, + "LUX": { + "_reason": "overlong", + "_replacement": "LU" + }, + "LVA": { + "_reason": "overlong", + "_replacement": "LV" + }, + "MAC": { + "_reason": "overlong", + "_replacement": "MO" + }, + "MAF": { + "_reason": "overlong", + "_replacement": "MF" + }, + "MAR": { + "_reason": "overlong", + "_replacement": "MA" + }, + "MCO": { + "_reason": "overlong", + "_replacement": "MC" + }, + "MDA": { + "_reason": "overlong", + "_replacement": "MD" + }, + "MDG": { + "_reason": "overlong", + "_replacement": "MG" + }, + "MDV": { + "_reason": "overlong", + "_replacement": "MV" + }, + "MEX": { + "_reason": "overlong", + "_replacement": "MX" + }, + "MHL": { + "_reason": "overlong", + "_replacement": "MH" + }, + "MI": { + "_reason": "deprecated", + "_replacement": "UM" + }, + "MKD": { + "_reason": "overlong", + "_replacement": "MK" + }, + "MLI": { + "_reason": "overlong", + "_replacement": "ML" + }, + "MLT": { + "_reason": "overlong", + "_replacement": "MT" + }, + "MMR": { + "_reason": "overlong", + "_replacement": "MM" + }, + "MNE": { + "_reason": "overlong", + "_replacement": "ME" + }, + "MNG": { + "_reason": "overlong", + "_replacement": "MN" + }, + "MNP": { + "_reason": "overlong", + "_replacement": "MP" + }, + "MOZ": { + "_reason": "overlong", + "_replacement": "MZ" + }, + "MRT": { + "_reason": "overlong", + "_replacement": "MR" + }, + "MSR": { + "_reason": "overlong", + "_replacement": "MS" + }, + "MTQ": { + "_reason": "overlong", + "_replacement": "MQ" + }, + "MUS": { + "_reason": "overlong", + "_replacement": "MU" + }, + "MWI": { + "_reason": "overlong", + "_replacement": "MW" + }, + "MYS": { + "_reason": "overlong", + "_replacement": "MY" + }, + "MYT": { + "_reason": "overlong", + "_replacement": "YT" + }, + "NAM": { + "_reason": "overlong", + "_replacement": "NA" + }, + "NCL": { + "_reason": "overlong", + "_replacement": "NC" + }, + "NER": { + "_reason": "overlong", + "_replacement": "NE" + }, + "NFK": { + "_reason": "overlong", + "_replacement": "NF" + }, + "NGA": { + "_reason": "overlong", + "_replacement": "NG" + }, + "NH": { + "_reason": "deprecated", + "_replacement": "VU" + }, + "NIC": { + "_reason": "overlong", + "_replacement": "NI" + }, + "NIU": { + "_reason": "overlong", + "_replacement": "NU" + }, + "NLD": { + "_reason": "overlong", + "_replacement": "NL" + }, + "NOR": { + "_reason": "overlong", + "_replacement": "NO" + }, + "NPL": { + "_reason": "overlong", + "_replacement": "NP" + }, + "NQ": { + "_reason": "deprecated", + "_replacement": "AQ" + }, + "NRU": { + "_reason": "overlong", + "_replacement": "NR" + }, + "NT": { + "_reason": "deprecated", + "_replacement": "SA IQ" + }, + "NTZ": { + "_reason": "overlong", + "_replacement": "SA IQ" + }, + "NZL": { + "_reason": "overlong", + "_replacement": "NZ" + }, + "OMN": { + "_reason": "overlong", + "_replacement": "OM" + }, + "PAK": { + "_reason": "overlong", + "_replacement": "PK" + }, + "PAN": { + "_reason": "overlong", + "_replacement": "PA" + }, + "PC": { + "_reason": "deprecated", + "_replacement": "FM MH MP PW" + }, + "PCN": { + "_reason": "overlong", + "_replacement": "PN" + }, + "PER": { + "_reason": "overlong", + "_replacement": "PE" + }, + "PHL": { + "_reason": "overlong", + "_replacement": "PH" + }, + "PLW": { + "_reason": "overlong", + "_replacement": "PW" + }, + "PNG": { + "_reason": "overlong", + "_replacement": "PG" + }, + "POL": { + "_reason": "overlong", + "_replacement": "PL" + }, + "PRI": { + "_reason": "overlong", + "_replacement": "PR" + }, + "PRK": { + "_reason": "overlong", + "_replacement": "KP" + }, + "PRT": { + "_reason": "overlong", + "_replacement": "PT" + }, + "PRY": { + "_reason": "overlong", + "_replacement": "PY" + }, + "PSE": { + "_reason": "overlong", + "_replacement": "PS" + }, + "PU": { + "_reason": "deprecated", + "_replacement": "UM" + }, + "PYF": { + "_reason": "overlong", + "_replacement": "PF" + }, + "PZ": { + "_reason": "deprecated", + "_replacement": "PA" + }, + "QAT": { + "_reason": "overlong", + "_replacement": "QA" + }, + "QMM": { + "_reason": "overlong", + "_replacement": "QM" + }, + "QNN": { + "_reason": "overlong", + "_replacement": "QN" + }, + "QPP": { + "_reason": "overlong", + "_replacement": "QP" + }, + "QQQ": { + "_reason": "overlong", + "_replacement": "QQ" + }, + "QRR": { + "_reason": "overlong", + "_replacement": "QR" + }, + "QSS": { + "_reason": "overlong", + "_replacement": "QS" + }, + "QTT": { + "_reason": "overlong", + "_replacement": "QT" + }, + "QU": { + "_reason": "deprecated", + "_replacement": "EU" + }, + "QUU": { + "_reason": "overlong", + "_replacement": "EU" + }, + "QVV": { + "_reason": "overlong", + "_replacement": "QV" + }, + "QWW": { + "_reason": "overlong", + "_replacement": "QW" + }, + "QXX": { + "_reason": "overlong", + "_replacement": "QX" + }, + "QYY": { + "_reason": "overlong", + "_replacement": "QY" + }, + "QZZ": { + "_reason": "overlong", + "_replacement": "QZ" + }, + "REU": { + "_reason": "overlong", + "_replacement": "RE" + }, + "RH": { + "_reason": "deprecated", + "_replacement": "ZW" + }, + "ROU": { + "_reason": "overlong", + "_replacement": "RO" + }, + "RUS": { + "_reason": "overlong", + "_replacement": "RU" + }, + "RWA": { + "_reason": "overlong", + "_replacement": "RW" + }, + "SAU": { + "_reason": "overlong", + "_replacement": "SA" + }, + "SCG": { + "_reason": "overlong", + "_replacement": "RS ME" + }, + "SDN": { + "_reason": "overlong", + "_replacement": "SD" + }, + "SEN": { + "_reason": "overlong", + "_replacement": "SN" + }, + "SGP": { + "_reason": "overlong", + "_replacement": "SG" + }, + "SGS": { + "_reason": "overlong", + "_replacement": "GS" + }, + "SHN": { + "_reason": "overlong", + "_replacement": "SH" + }, + "SJM": { + "_reason": "overlong", + "_replacement": "SJ" + }, + "SLB": { + "_reason": "overlong", + "_replacement": "SB" + }, + "SLE": { + "_reason": "overlong", + "_replacement": "SL" + }, + "SLV": { + "_reason": "overlong", + "_replacement": "SV" + }, + "SMR": { + "_reason": "overlong", + "_replacement": "SM" + }, + "SOM": { + "_reason": "overlong", + "_replacement": "SO" + }, + "SPM": { + "_reason": "overlong", + "_replacement": "PM" + }, + "SRB": { + "_reason": "overlong", + "_replacement": "RS" + }, + "SSD": { + "_reason": "overlong", + "_replacement": "SS" + }, + "STP": { + "_reason": "overlong", + "_replacement": "ST" + }, + "SU": { + "_reason": "deprecated", + "_replacement": "RU AM AZ BY EE GE KZ KG LV LT MD TJ TM UA UZ" + }, + "SUN": { + "_reason": "overlong", + "_replacement": "RU AM AZ BY EE GE KZ KG LV LT MD TJ TM UA UZ" + }, + "SUR": { + "_reason": "overlong", + "_replacement": "SR" + }, + "SVK": { + "_reason": "overlong", + "_replacement": "SK" + }, + "SVN": { + "_reason": "overlong", + "_replacement": "SI" + }, + "SWE": { + "_reason": "overlong", + "_replacement": "SE" + }, + "SWZ": { + "_reason": "overlong", + "_replacement": "SZ" + }, + "SXM": { + "_reason": "overlong", + "_replacement": "SX" + }, + "SYC": { + "_reason": "overlong", + "_replacement": "SC" + }, + "SYR": { + "_reason": "overlong", + "_replacement": "SY" + }, + "TAA": { + "_reason": "overlong", + "_replacement": "TA" + }, + "TCA": { + "_reason": "overlong", + "_replacement": "TC" + }, + "TCD": { + "_reason": "overlong", + "_replacement": "TD" + }, + "TGO": { + "_reason": "overlong", + "_replacement": "TG" + }, + "THA": { + "_reason": "overlong", + "_replacement": "TH" + }, + "TJK": { + "_reason": "overlong", + "_replacement": "TJ" + }, + "TKL": { + "_reason": "overlong", + "_replacement": "TK" + }, + "TKM": { + "_reason": "overlong", + "_replacement": "TM" + }, + "TLS": { + "_reason": "overlong", + "_replacement": "TL" + }, + "TMP": { + "_reason": "overlong", + "_replacement": "TL" + }, + "TON": { + "_reason": "overlong", + "_replacement": "TO" + }, + "TP": { + "_reason": "deprecated", + "_replacement": "TL" + }, + "TTO": { + "_reason": "overlong", + "_replacement": "TT" + }, + "TUN": { + "_reason": "overlong", + "_replacement": "TN" + }, + "TUR": { + "_reason": "overlong", + "_replacement": "TR" + }, + "TUV": { + "_reason": "overlong", + "_replacement": "TV" + }, + "TWN": { + "_reason": "overlong", + "_replacement": "TW" + }, + "TZA": { + "_reason": "overlong", + "_replacement": "TZ" + }, + "UGA": { + "_reason": "overlong", + "_replacement": "UG" + }, + "UK": { + "_reason": "deprecated", + "_replacement": "GB" + }, + "UKR": { + "_reason": "overlong", + "_replacement": "UA" + }, + "UMI": { + "_reason": "overlong", + "_replacement": "UM" + }, + "URY": { + "_reason": "overlong", + "_replacement": "UY" + }, + "USA": { + "_reason": "overlong", + "_replacement": "US" + }, + "UZB": { + "_reason": "overlong", + "_replacement": "UZ" + }, + "VAT": { + "_reason": "overlong", + "_replacement": "VA" + }, + "VCT": { + "_reason": "overlong", + "_replacement": "VC" + }, + "VD": { + "_reason": "deprecated", + "_replacement": "VN" + }, + "VEN": { + "_reason": "overlong", + "_replacement": "VE" + }, + "VGB": { + "_reason": "overlong", + "_replacement": "VG" + }, + "VIR": { + "_reason": "overlong", + "_replacement": "VI" + }, + "VNM": { + "_reason": "overlong", + "_replacement": "VN" + }, + "VUT": { + "_reason": "overlong", + "_replacement": "VU" + }, + "WK": { + "_reason": "deprecated", + "_replacement": "UM" + }, + "WLF": { + "_reason": "overlong", + "_replacement": "WF" + }, + "WSM": { + "_reason": "overlong", + "_replacement": "WS" + }, + "XAA": { + "_reason": "overlong", + "_replacement": "XA" + }, + "XBB": { + "_reason": "overlong", + "_replacement": "XB" + }, + "XCC": { + "_reason": "overlong", + "_replacement": "XC" + }, + "XDD": { + "_reason": "overlong", + "_replacement": "XD" + }, + "XEE": { + "_reason": "overlong", + "_replacement": "XE" + }, + "XFF": { + "_reason": "overlong", + "_replacement": "XF" + }, + "XGG": { + "_reason": "overlong", + "_replacement": "XG" + }, + "XHH": { + "_reason": "overlong", + "_replacement": "XH" + }, + "XII": { + "_reason": "overlong", + "_replacement": "XI" + }, + "XJJ": { + "_reason": "overlong", + "_replacement": "XJ" + }, + "XKK": { + "_reason": "overlong", + "_replacement": "XK" + }, + "XLL": { + "_reason": "overlong", + "_replacement": "XL" + }, + "XMM": { + "_reason": "overlong", + "_replacement": "XM" + }, + "XNN": { + "_reason": "overlong", + "_replacement": "XN" + }, + "XOO": { + "_reason": "overlong", + "_replacement": "XO" + }, + "XPP": { + "_reason": "overlong", + "_replacement": "XP" + }, + "XQQ": { + "_reason": "overlong", + "_replacement": "XQ" + }, + "XRR": { + "_reason": "overlong", + "_replacement": "XR" + }, + "XSS": { + "_reason": "overlong", + "_replacement": "XS" + }, + "XTT": { + "_reason": "overlong", + "_replacement": "XT" + }, + "XUU": { + "_reason": "overlong", + "_replacement": "XU" + }, + "XVV": { + "_reason": "overlong", + "_replacement": "XV" + }, + "XWW": { + "_reason": "overlong", + "_replacement": "XW" + }, + "XXX": { + "_reason": "overlong", + "_replacement": "XX" + }, + "XYY": { + "_reason": "overlong", + "_replacement": "XY" + }, + "XZZ": { + "_reason": "overlong", + "_replacement": "XZ" + }, + "YD": { + "_reason": "deprecated", + "_replacement": "YE" + }, + "YEM": { + "_reason": "overlong", + "_replacement": "YE" + }, + "YMD": { + "_reason": "overlong", + "_replacement": "YE" + }, + "YU": { + "_reason": "deprecated", + "_replacement": "RS ME" + }, + "YUG": { + "_reason": "overlong", + "_replacement": "RS ME" + }, + "ZAF": { + "_reason": "overlong", + "_replacement": "ZA" + }, + "ZAR": { + "_reason": "overlong", + "_replacement": "CD" + }, + "ZMB": { + "_reason": "overlong", + "_replacement": "ZM" + }, + "ZR": { + "_reason": "deprecated", + "_replacement": "CD" + }, + "ZWE": { + "_reason": "overlong", + "_replacement": "ZW" + }, + "ZZZ": { + "_reason": "overlong", + "_replacement": "ZZ" + } + }, + "subdivisionAlias": { + "cn11": { + "_reason": "deprecated", + "_replacement": "cnbj" + }, + "cn12": { + "_reason": "deprecated", + "_replacement": "cntj" + }, + "cn13": { + "_reason": "deprecated", + "_replacement": "cnhe" + }, + "cn14": { + "_reason": "deprecated", + "_replacement": "cnsx" + }, + "cn15": { + "_reason": "deprecated", + "_replacement": "cnmn" + }, + "cn21": { + "_reason": "deprecated", + "_replacement": "cnln" + }, + "cn22": { + "_reason": "deprecated", + "_replacement": "cnjl" + }, + "cn23": { + "_reason": "deprecated", + "_replacement": "cnhl" + }, + "cn31": { + "_reason": "deprecated", + "_replacement": "cnsh" + }, + "cn32": { + "_reason": "deprecated", + "_replacement": "cnjs" + }, + "cn33": { + "_reason": "deprecated", + "_replacement": "cnzj" + }, + "cn34": { + "_reason": "deprecated", + "_replacement": "cnah" + }, + "cn35": { + "_reason": "deprecated", + "_replacement": "cnfj" + }, + "cn36": { + "_reason": "deprecated", + "_replacement": "cnjx" + }, + "cn37": { + "_reason": "deprecated", + "_replacement": "cnsd" + }, + "cn41": { + "_reason": "deprecated", + "_replacement": "cnha" + }, + "cn42": { + "_reason": "deprecated", + "_replacement": "cnhb" + }, + "cn43": { + "_reason": "deprecated", + "_replacement": "cnhn" + }, + "cn44": { + "_reason": "deprecated", + "_replacement": "cngd" + }, + "cn45": { + "_reason": "deprecated", + "_replacement": "cngx" + }, + "cn46": { + "_reason": "deprecated", + "_replacement": "cnhi" + }, + "cn50": { + "_reason": "deprecated", + "_replacement": "cncq" + }, + "cn51": { + "_reason": "deprecated", + "_replacement": "cnsc" + }, + "cn52": { + "_reason": "deprecated", + "_replacement": "cngz" + }, + "cn53": { + "_reason": "deprecated", + "_replacement": "cnyn" + }, + "cn54": { + "_reason": "deprecated", + "_replacement": "cnxz" + }, + "cn61": { + "_reason": "deprecated", + "_replacement": "cnsn" + }, + "cn62": { + "_reason": "deprecated", + "_replacement": "cngs" + }, + "cn63": { + "_reason": "deprecated", + "_replacement": "cnqh" + }, + "cn64": { + "_reason": "deprecated", + "_replacement": "cnnx" + }, + "cn65": { + "_reason": "deprecated", + "_replacement": "cnxj" + }, + "cn71": { + "_reason": "overlong", + "_replacement": "TW" + }, + "cn91": { + "_reason": "overlong", + "_replacement": "HK" + }, + "cn92": { + "_reason": "overlong", + "_replacement": "MO" + }, + "cz10a": { + "_reason": "deprecated", + "_replacement": "cz110" + }, + "cz10b": { + "_reason": "deprecated", + "_replacement": "cz111" + }, + "cz10c": { + "_reason": "deprecated", + "_replacement": "cz112" + }, + "cz10d": { + "_reason": "deprecated", + "_replacement": "cz113" + }, + "cz10e": { + "_reason": "deprecated", + "_replacement": "cz114" + }, + "cz10f": { + "_reason": "deprecated", + "_replacement": "cz115" + }, + "cz611": { + "_reason": "deprecated", + "_replacement": "cz663" + }, + "cz612": { + "_reason": "deprecated", + "_replacement": "cz632" + }, + "cz613": { + "_reason": "deprecated", + "_replacement": "cz633" + }, + "cz614": { + "_reason": "deprecated", + "_replacement": "cz634" + }, + "cz615": { + "_reason": "deprecated", + "_replacement": "cz635" + }, + "cz621": { + "_reason": "deprecated", + "_replacement": "cz641" + }, + "cz622": { + "_reason": "deprecated", + "_replacement": "cz642" + }, + "cz623": { + "_reason": "deprecated", + "_replacement": "cz643" + }, + "cz624": { + "_reason": "deprecated", + "_replacement": "cz644" + }, + "cz626": { + "_reason": "deprecated", + "_replacement": "cz646" + }, + "cz627": { + "_reason": "deprecated", + "_replacement": "cz647" + }, + "czjc": { + "_reason": "deprecated", + "_replacement": "cz31" + }, + "czjm": { + "_reason": "deprecated", + "_replacement": "cz64" + }, + "czka": { + "_reason": "deprecated", + "_replacement": "cz41" + }, + "czkr": { + "_reason": "deprecated", + "_replacement": "cz52" + }, + "czli": { + "_reason": "deprecated", + "_replacement": "cz51" + }, + "czmo": { + "_reason": "deprecated", + "_replacement": "cz80" + }, + "czol": { + "_reason": "deprecated", + "_replacement": "cz71" + }, + "czpa": { + "_reason": "deprecated", + "_replacement": "cz53" + }, + "czpl": { + "_reason": "deprecated", + "_replacement": "cz32" + }, + "czpr": { + "_reason": "deprecated", + "_replacement": "cz10" + }, + "czst": { + "_reason": "deprecated", + "_replacement": "cz20" + }, + "czus": { + "_reason": "deprecated", + "_replacement": "cz42" + }, + "czvy": { + "_reason": "deprecated", + "_replacement": "cz63" + }, + "czzl": { + "_reason": "deprecated", + "_replacement": "cz72" + }, + "fi01": { + "_reason": "overlong", + "_replacement": "AX" + }, + "fra": { + "_reason": "deprecated", + "_replacement": "frges" + }, + "frb": { + "_reason": "deprecated", + "_replacement": "frnaq" + }, + "frbl": { + "_reason": "overlong", + "_replacement": "BL" + }, + "frc": { + "_reason": "deprecated", + "_replacement": "frara" + }, + "frcp": { + "_reason": "overlong", + "_replacement": "CP" + }, + "frd": { + "_reason": "deprecated", + "_replacement": "frbfc" + }, + "fre": { + "_reason": "deprecated", + "_replacement": "frbre" + }, + "frf": { + "_reason": "deprecated", + "_replacement": "frcvl" + }, + "frg": { + "_reason": "deprecated", + "_replacement": "frges" + }, + "frgf": { + "_reason": "overlong", + "_replacement": "GF" + }, + "frgp": { + "_reason": "overlong", + "_replacement": "GP" + }, + "frh": { + "_reason": "deprecated", + "_replacement": "frcor" + }, + "fri": { + "_reason": "deprecated", + "_replacement": "frbfc" + }, + "frj": { + "_reason": "deprecated", + "_replacement": "fridf" + }, + "frk": { + "_reason": "deprecated", + "_replacement": "frocc" + }, + "frl": { + "_reason": "deprecated", + "_replacement": "frnaq" + }, + "frm": { + "_reason": "deprecated", + "_replacement": "frges" + }, + "frmf": { + "_reason": "overlong", + "_replacement": "MF" + }, + "frmq": { + "_reason": "overlong", + "_replacement": "MQ" + }, + "frn": { + "_reason": "deprecated", + "_replacement": "frocc" + }, + "frnc": { + "_reason": "overlong", + "_replacement": "NC" + }, + "fro": { + "_reason": "deprecated", + "_replacement": "frhdf" + }, + "frp": { + "_reason": "deprecated", + "_replacement": "frnor" + }, + "frpf": { + "_reason": "overlong", + "_replacement": "PF" + }, + "frpm": { + "_reason": "overlong", + "_replacement": "PM" + }, + "frq": { + "_reason": "deprecated", + "_replacement": "frnor" + }, + "frr": { + "_reason": "deprecated", + "_replacement": "frpdl" + }, + "frre": { + "_reason": "overlong", + "_replacement": "RE" + }, + "frs": { + "_reason": "deprecated", + "_replacement": "frhdf" + }, + "frt": { + "_reason": "deprecated", + "_replacement": "frnaq" + }, + "frtf": { + "_reason": "overlong", + "_replacement": "TF" + }, + "fru": { + "_reason": "deprecated", + "_replacement": "frpac" + }, + "frv": { + "_reason": "deprecated", + "_replacement": "frara" + }, + "frwf": { + "_reason": "overlong", + "_replacement": "WF" + }, + "fryt": { + "_reason": "overlong", + "_replacement": "YT" + }, + "laxn": { + "_reason": "deprecated", + "_replacement": "laxs" + }, + "lud": { + "_reason": "deprecated", + "_replacement": "lucl ludi lurd luvd luwi" + }, + "lug": { + "_reason": "deprecated", + "_replacement": "luec lugr lurm" + }, + "lul": { + "_reason": "deprecated", + "_replacement": "luca lues lulu lume" + }, + "mrnkc": { + "_reason": "deprecated", + "_replacement": "mr13 mr14 mr15" + }, + "nlaw": { + "_reason": "overlong", + "_replacement": "AW" + }, + "nlcw": { + "_reason": "overlong", + "_replacement": "CW" + }, + "nlsx": { + "_reason": "overlong", + "_replacement": "SX" + }, + "no23": { + "_reason": "deprecated", + "_replacement": "no50" + }, + "nzn": { + "_reason": "deprecated", + "_replacement": "nzauk nzbop nzgis nzhkb nzmwt nzntl nztki nzwgn nzwko" + }, + "nzs": { + "_reason": "deprecated", + "_replacement": "nzcan nzmbh nznsn nzota nzstl nztas nzwtc" + }, + "omba": { + "_reason": "deprecated", + "_replacement": "ombj ombs" + }, + "omsh": { + "_reason": "deprecated", + "_replacement": "omsj omss" + }, + "plds": { + "_reason": "deprecated", + "_replacement": "pl02" + }, + "plkp": { + "_reason": "deprecated", + "_replacement": "pl04" + }, + "pllb": { + "_reason": "deprecated", + "_replacement": "pl08" + }, + "plld": { + "_reason": "deprecated", + "_replacement": "pl10" + }, + "pllu": { + "_reason": "deprecated", + "_replacement": "pl06" + }, + "plma": { + "_reason": "deprecated", + "_replacement": "pl12" + }, + "plmz": { + "_reason": "deprecated", + "_replacement": "pl14" + }, + "plop": { + "_reason": "deprecated", + "_replacement": "pl16" + }, + "plpd": { + "_reason": "deprecated", + "_replacement": "pl20" + }, + "plpk": { + "_reason": "deprecated", + "_replacement": "pl18" + }, + "plpm": { + "_reason": "deprecated", + "_replacement": "pl22" + }, + "plsk": { + "_reason": "deprecated", + "_replacement": "pl26" + }, + "plsl": { + "_reason": "deprecated", + "_replacement": "pl24" + }, + "plwn": { + "_reason": "deprecated", + "_replacement": "pl28" + }, + "plwp": { + "_reason": "deprecated", + "_replacement": "pl30" + }, + "plzp": { + "_reason": "deprecated", + "_replacement": "pl32" + }, + "shta": { + "_reason": "overlong", + "_replacement": "TA" + }, + "tteto": { + "_reason": "deprecated", + "_replacement": "tttob" + }, + "ttrcm": { + "_reason": "deprecated", + "_replacement": "ttmrc" + }, + "ttwto": { + "_reason": "deprecated", + "_replacement": "tttob" + }, + "twkhq": { + "_reason": "deprecated", + "_replacement": "twkhh" + }, + "twtnq": { + "_reason": "deprecated", + "_replacement": "twtnn" + }, + "twtpq": { + "_reason": "deprecated", + "_replacement": "twnwt" + }, + "twtxq": { + "_reason": "deprecated", + "_replacement": "twtxg" + }, + "usas": { + "_reason": "overlong", + "_replacement": "AS" + }, + "usgu": { + "_reason": "overlong", + "_replacement": "GU" + }, + "usmp": { + "_reason": "overlong", + "_replacement": "MP" + }, + "uspr": { + "_reason": "overlong", + "_replacement": "PR" + }, + "usum": { + "_reason": "overlong", + "_replacement": "UM" + }, + "usvi": { + "_reason": "overlong", + "_replacement": "VI" + } + }, + "variantAlias": { + "heploc": { + "_reason": "deprecated", + "_replacement": "alalc97" + }, + "polytoni": { + "_reason": "deprecated", + "_replacement": "polyton" + } + }, + "zoneAlias": { + "Africa": { + "Timbuktu": { + "_reason": "deprecated", + "_replacement": "Africa/Bamako" + } + }, + "America": { + "Montreal": { + "_reason": "deprecated", + "_replacement": "America/Toronto" + }, + "Shiprock": { + "_reason": "deprecated", + "_replacement": "America/Denver" + } + }, + "Antarctica": { + "South_Pole": { + "_reason": "deprecated", + "_replacement": "Pacific/Auckland" + } + }, + "Asia": { + "Chongqing": { + "_reason": "deprecated", + "_replacement": "Asia/Shanghai" + }, + "Harbin": { + "_reason": "deprecated", + "_replacement": "Asia/Shanghai" + }, + "Kashgar": { + "_reason": "deprecated", + "_replacement": "Asia/Urumqi" + } + }, + "Atlantic": { + "Jan_Mayen": { + "_reason": "deprecated", + "_replacement": "Europe/Oslo" + } + }, + "EST": { + "_reason": "deprecated", + "_replacement": "America/Indianapolis" + }, + "Europe": { + "Belfast": { + "_reason": "deprecated", + "_replacement": "Europe/London" + } + }, + "HST": { + "_reason": "deprecated", + "_replacement": "Pacific/Honolulu" + }, + "MST": { + "_reason": "deprecated", + "_replacement": "America/Phoenix" + }, + "Pacific": { + "Yap": { + "_reason": "deprecated", + "_replacement": "Pacific/Truk" + } + }, + "SystemV": { + "AST4": { + "_reason": "deprecated", + "_replacement": "America/Puerto_Rico" + }, + "AST4ADT": { + "_reason": "deprecated", + "_replacement": "America/Halifax" + }, + "CST6": { + "_reason": "deprecated", + "_replacement": "America/Regina" + }, + "CST6CDT": { + "_reason": "deprecated", + "_replacement": "America/Chicago" + }, + "EST5": { + "_reason": "deprecated", + "_replacement": "America/Indianapolis" + }, + "EST5EDT": { + "_reason": "deprecated", + "_replacement": "America/New_York" + }, + "HST10": { + "_reason": "deprecated", + "_replacement": "Pacific/Honolulu" + }, + "MST7": { + "_reason": "deprecated", + "_replacement": "America/Phoenix" + }, + "MST7MDT": { + "_reason": "deprecated", + "_replacement": "America/Denver" + }, + "PST8": { + "_reason": "deprecated", + "_replacement": "Pacific/Pitcairn" + }, + "PST8PDT": { + "_reason": "deprecated", + "_replacement": "America/Los_Angeles" + }, + "YST9": { + "_reason": "deprecated", + "_replacement": "Pacific/Gambier" + }, + "YST9YDT": { + "_reason": "deprecated", + "_replacement": "America/Anchorage" + } + } + } + } + } + } +} diff --git a/provider/testdata/data/json/aliases/aliases@1.json b/provider/testdata/data/json/aliases/aliases@1.json new file mode 100644 index 00000000000..7aadbc80d5c --- /dev/null +++ b/provider/testdata/data/json/aliases/aliases@1.json @@ -0,0 +1,3868 @@ +{ + "language": [], + "language_variants": [ + [ + "und-hepburn-heploc", + "und-alalc97" + ], + [ + "aa-saaho", + "ssy" + ], + [ + "art-lojban", + "jbo" + ], + [ + "cel-gaulish", + "xtg" + ], + [ + "hy-arevmda", + "hyw" + ], + [ + "no-bokmal", + "nb" + ], + [ + "no-nynorsk", + "nn" + ], + [ + "zh-guoyu", + "zh" + ], + [ + "zh-hakka", + "hak" + ], + [ + "zh-xiang", + "hsn" + ], + [ + "und-aaland", + "und-AX" + ], + [ + "und-arevela", + "und" + ], + [ + "und-arevmda", + "und" + ], + [ + "und-bokmal", + "und" + ], + [ + "und-hakka", + "und" + ], + [ + "und-lojban", + "und" + ], + [ + "und-nynorsk", + "und" + ], + [ + "und-saaho", + "und" + ], + [ + "und-xiang", + "und" + ] + ], + "sgn_region": [ + [ + "BR", + "bzs" + ], + [ + "CO", + "csn" + ], + [ + "DE", + "gsg" + ], + [ + "DK", + "dsl" + ], + [ + "ES", + "ssp" + ], + [ + "FR", + "fsl" + ], + [ + "GB", + "bfi" + ], + [ + "GR", + "gss" + ], + [ + "IE", + "isg" + ], + [ + "IT", + "ise" + ], + [ + "JP", + "jsl" + ], + [ + "MX", + "mfs" + ], + [ + "NI", + "ncs" + ], + [ + "NL", + "dse" + ], + [ + "NO", + "nsi" + ], + [ + "PT", + "psr" + ], + [ + "SE", + "swl" + ], + [ + "US", + "ase" + ], + [ + "ZA", + "sfs" + ] + ], + "language_len2": [ + [ + "bh", + "bho" + ], + [ + "in", + "id" + ], + [ + "iw", + "he" + ], + [ + "ji", + "yi" + ], + [ + "jw", + "jv" + ], + [ + "mo", + "ro" + ], + [ + "sh", + "sr-Latn" + ], + [ + "tl", + "fil" + ], + [ + "tw", + "ak" + ] + ], + "language_len3": [ + [ + "aam", + "aas" + ], + [ + "aar", + "aa" + ], + [ + "abk", + "ab" + ], + [ + "adp", + "dz" + ], + [ + "afr", + "af" + ], + [ + "agp", + "apf" + ], + [ + "ais", + "ami" + ], + [ + "aju", + "jrb" + ], + [ + "aka", + "ak" + ], + [ + "alb", + "sq" + ], + [ + "als", + "sq" + ], + [ + "amh", + "am" + ], + [ + "ara", + "ar" + ], + [ + "arb", + "ar" + ], + [ + "arg", + "an" + ], + [ + "arm", + "hy" + ], + [ + "asd", + "snz" + ], + [ + "asm", + "as" + ], + [ + "aue", + "ktz" + ], + [ + "ava", + "av" + ], + [ + "ave", + "ae" + ], + [ + "aym", + "ay" + ], + [ + "ayr", + "ay" + ], + [ + "ayx", + "nun" + ], + [ + "aze", + "az" + ], + [ + "azj", + "az" + ], + [ + "bak", + "ba" + ], + [ + "bam", + "bm" + ], + [ + "baq", + "eu" + ], + [ + "baz", + "nvo" + ], + [ + "bcc", + "bal" + ], + [ + "bcl", + "bik" + ], + [ + "bel", + "be" + ], + [ + "ben", + "bn" + ], + [ + "bgm", + "bcg" + ], + [ + "bhk", + "fbl" + ], + [ + "bih", + "bho" + ], + [ + "bis", + "bi" + ], + [ + "bjd", + "drl" + ], + [ + "bjq", + "bzc" + ], + [ + "bkb", + "ebk" + ], + [ + "bod", + "bo" + ], + [ + "bos", + "bs" + ], + [ + "bre", + "br" + ], + [ + "btb", + "beb" + ], + [ + "bul", + "bg" + ], + [ + "bur", + "my" + ], + [ + "bxk", + "luy" + ], + [ + "bxr", + "bua" + ], + [ + "cat", + "ca" + ], + [ + "ccq", + "rki" + ], + [ + "ces", + "cs" + ], + [ + "cha", + "ch" + ], + [ + "che", + "ce" + ], + [ + "chi", + "zh" + ], + [ + "chu", + "cu" + ], + [ + "chv", + "cv" + ], + [ + "cjr", + "mom" + ], + [ + "cka", + "cmr" + ], + [ + "cld", + "syr" + ], + [ + "cmk", + "xch" + ], + [ + "cmn", + "zh" + ], + [ + "cnr", + "sr-ME" + ], + [ + "cor", + "kw" + ], + [ + "cos", + "co" + ], + [ + "coy", + "pij" + ], + [ + "cqu", + "quh" + ], + [ + "cre", + "cr" + ], + [ + "cwd", + "cr" + ], + [ + "cym", + "cy" + ], + [ + "cze", + "cs" + ], + [ + "daf", + "dnj" + ], + [ + "dan", + "da" + ], + [ + "dap", + "njz" + ], + [ + "deu", + "de" + ], + [ + "dgo", + "doi" + ], + [ + "dhd", + "mwr" + ], + [ + "dik", + "din" + ], + [ + "diq", + "zza" + ], + [ + "dit", + "dif" + ], + [ + "div", + "dv" + ], + [ + "djl", + "dze" + ], + [ + "dkl", + "aqd" + ], + [ + "drh", + "mn" + ], + [ + "drr", + "kzk" + ], + [ + "drw", + "fa-AF" + ], + [ + "dud", + "uth" + ], + [ + "duj", + "dwu" + ], + [ + "dut", + "nl" + ], + [ + "dwl", + "dbt" + ], + [ + "dzo", + "dz" + ], + [ + "ekk", + "et" + ], + [ + "ell", + "el" + ], + [ + "elp", + "amq" + ], + [ + "emk", + "man" + ], + [ + "eng", + "en" + ], + [ + "epo", + "eo" + ], + [ + "esk", + "ik" + ], + [ + "est", + "et" + ], + [ + "eus", + "eu" + ], + [ + "ewe", + "ee" + ], + [ + "fao", + "fo" + ], + [ + "fas", + "fa" + ], + [ + "fat", + "ak" + ], + [ + "fij", + "fj" + ], + [ + "fin", + "fi" + ], + [ + "fra", + "fr" + ], + [ + "fre", + "fr" + ], + [ + "fry", + "fy" + ], + [ + "fuc", + "ff" + ], + [ + "ful", + "ff" + ], + [ + "gav", + "dev" + ], + [ + "gaz", + "om" + ], + [ + "gbc", + "wny" + ], + [ + "gbo", + "grb" + ], + [ + "geo", + "ka" + ], + [ + "ger", + "de" + ], + [ + "gfx", + "vaj" + ], + [ + "ggn", + "gvr" + ], + [ + "ggo", + "esg" + ], + [ + "ggr", + "gtu" + ], + [ + "gio", + "aou" + ], + [ + "gla", + "gd" + ], + [ + "gle", + "ga" + ], + [ + "glg", + "gl" + ], + [ + "gli", + "kzk" + ], + [ + "glv", + "gv" + ], + [ + "gno", + "gon" + ], + [ + "gre", + "el" + ], + [ + "grn", + "gn" + ], + [ + "gti", + "nyc" + ], + [ + "gug", + "gn" + ], + [ + "guj", + "gu" + ], + [ + "guv", + "duz" + ], + [ + "gya", + "gba" + ], + [ + "hat", + "ht" + ], + [ + "hau", + "ha" + ], + [ + "hbs", + "sr-Latn" + ], + [ + "hdn", + "hai" + ], + [ + "hea", + "hmn" + ], + [ + "heb", + "he" + ], + [ + "her", + "hz" + ], + [ + "him", + "srx" + ], + [ + "hin", + "hi" + ], + [ + "hmo", + "ho" + ], + [ + "hrr", + "jal" + ], + [ + "hrv", + "hr" + ], + [ + "hun", + "hu" + ], + [ + "hye", + "hy" + ], + [ + "ibi", + "opa" + ], + [ + "ibo", + "ig" + ], + [ + "ice", + "is" + ], + [ + "ido", + "io" + ], + [ + "iii", + "ii" + ], + [ + "ike", + "iu" + ], + [ + "iku", + "iu" + ], + [ + "ile", + "ie" + ], + [ + "ill", + "ilm" + ], + [ + "ilw", + "gal" + ], + [ + "ina", + "ia" + ], + [ + "ind", + "id" + ], + [ + "ipk", + "ik" + ], + [ + "isl", + "is" + ], + [ + "ita", + "it" + ], + [ + "izi", + "eza" + ], + [ + "jar", + "jgk" + ], + [ + "jav", + "jv" + ], + [ + "jeg", + "oyb" + ], + [ + "jpn", + "ja" + ], + [ + "kal", + "kl" + ], + [ + "kan", + "kn" + ], + [ + "kas", + "ks" + ], + [ + "kat", + "ka" + ], + [ + "kau", + "kr" + ], + [ + "kaz", + "kk" + ], + [ + "kdv", + "zkd" + ], + [ + "kgc", + "tdf" + ], + [ + "kgd", + "ncq" + ], + [ + "kgh", + "kml" + ], + [ + "khk", + "mn" + ], + [ + "khm", + "km" + ], + [ + "kik", + "ki" + ], + [ + "kin", + "rw" + ], + [ + "kir", + "ky" + ], + [ + "kmr", + "ku" + ], + [ + "knc", + "kr" + ], + [ + "kng", + "kg" + ], + [ + "knn", + "kok" + ], + [ + "koj", + "kwv" + ], + [ + "kom", + "kv" + ], + [ + "kon", + "kg" + ], + [ + "kor", + "ko" + ], + [ + "kpp", + "jkm" + ], + [ + "kpv", + "kv" + ], + [ + "krm", + "bmf" + ], + [ + "ktr", + "dtp" + ], + [ + "kua", + "kj" + ], + [ + "kur", + "ku" + ], + [ + "kvs", + "gdj" + ], + [ + "kwq", + "yam" + ], + [ + "kxe", + "tvd" + ], + [ + "kxl", + "kru" + ], + [ + "kzh", + "dgl" + ], + [ + "kzj", + "dtp" + ], + [ + "kzt", + "dtp" + ], + [ + "lao", + "lo" + ], + [ + "lat", + "la" + ], + [ + "lav", + "lv" + ], + [ + "lbk", + "bnc" + ], + [ + "leg", + "enl" + ], + [ + "lii", + "raq" + ], + [ + "lim", + "li" + ], + [ + "lin", + "ln" + ], + [ + "lit", + "lt" + ], + [ + "llo", + "ngt" + ], + [ + "lmm", + "rmx" + ], + [ + "ltz", + "lb" + ], + [ + "lub", + "lu" + ], + [ + "lug", + "lg" + ], + [ + "lvs", + "lv" + ], + [ + "mac", + "mk" + ], + [ + "mah", + "mh" + ], + [ + "mal", + "ml" + ], + [ + "mao", + "mi" + ], + [ + "mar", + "mr" + ], + [ + "may", + "ms" + ], + [ + "meg", + "cir" + ], + [ + "mgx", + "jbk" + ], + [ + "mhr", + "chm" + ], + [ + "mkd", + "mk" + ], + [ + "mlg", + "mg" + ], + [ + "mlt", + "mt" + ], + [ + "mnk", + "man" + ], + [ + "mnt", + "wnn" + ], + [ + "mof", + "xnt" + ], + [ + "mol", + "ro" + ], + [ + "mon", + "mn" + ], + [ + "mri", + "mi" + ], + [ + "msa", + "ms" + ], + [ + "mst", + "mry" + ], + [ + "mup", + "raj" + ], + [ + "mwd", + "dmw" + ], + [ + "mwj", + "vaj" + ], + [ + "mya", + "my" + ], + [ + "myd", + "aog" + ], + [ + "myt", + "mry" + ], + [ + "nad", + "xny" + ], + [ + "nau", + "na" + ], + [ + "nav", + "nv" + ], + [ + "nbf", + "nru" + ], + [ + "nbl", + "nr" + ], + [ + "nbx", + "ekc" + ], + [ + "ncp", + "kdz" + ], + [ + "nde", + "nd" + ], + [ + "ndo", + "ng" + ], + [ + "nep", + "ne" + ], + [ + "nld", + "nl" + ], + [ + "nln", + "azd" + ], + [ + "nlr", + "nrk" + ], + [ + "nno", + "nn" + ], + [ + "nns", + "nbr" + ], + [ + "nnx", + "ngv" + ], + [ + "nob", + "nb" + ], + [ + "noo", + "dtd" + ], + [ + "nor", + "no" + ], + [ + "npi", + "ne" + ], + [ + "nts", + "pij" + ], + [ + "nxu", + "bpp" + ], + [ + "nya", + "ny" + ], + [ + "oci", + "oc" + ], + [ + "ojg", + "oj" + ], + [ + "oji", + "oj" + ], + [ + "ori", + "or" + ], + [ + "orm", + "om" + ], + [ + "ory", + "or" + ], + [ + "oss", + "os" + ], + [ + "oun", + "vaj" + ], + [ + "pan", + "pa" + ], + [ + "pbu", + "ps" + ], + [ + "pcr", + "adx" + ], + [ + "per", + "fa" + ], + [ + "pes", + "fa" + ], + [ + "pli", + "pi" + ], + [ + "plt", + "mg" + ], + [ + "pmc", + "huw" + ], + [ + "pmu", + "phr" + ], + [ + "pnb", + "lah" + ], + [ + "pol", + "pl" + ], + [ + "por", + "pt" + ], + [ + "ppa", + "bfy" + ], + [ + "ppr", + "lcq" + ], + [ + "prs", + "fa-AF" + ], + [ + "pry", + "prt" + ], + [ + "pus", + "ps" + ], + [ + "puz", + "pub" + ], + [ + "que", + "qu" + ], + [ + "quz", + "qu" + ], + [ + "rmr", + "emx" + ], + [ + "rmy", + "rom" + ], + [ + "roh", + "rm" + ], + [ + "ron", + "ro" + ], + [ + "rum", + "ro" + ], + [ + "run", + "rn" + ], + [ + "rus", + "ru" + ], + [ + "sag", + "sg" + ], + [ + "san", + "sa" + ], + [ + "sap", + "aqt" + ], + [ + "sca", + "hle" + ], + [ + "scc", + "sr" + ], + [ + "scr", + "hr" + ], + [ + "sgl", + "isk" + ], + [ + "sin", + "si" + ], + [ + "skk", + "oyb" + ], + [ + "slk", + "sk" + ], + [ + "slo", + "sk" + ], + [ + "slv", + "sl" + ], + [ + "sme", + "se" + ], + [ + "smo", + "sm" + ], + [ + "sna", + "sn" + ], + [ + "snd", + "sd" + ], + [ + "som", + "so" + ], + [ + "sot", + "st" + ], + [ + "spa", + "es" + ], + [ + "spy", + "kln" + ], + [ + "sqi", + "sq" + ], + [ + "src", + "sc" + ], + [ + "srd", + "sc" + ], + [ + "srp", + "sr" + ], + [ + "ssw", + "ss" + ], + [ + "sul", + "sgd" + ], + [ + "sum", + "ulw" + ], + [ + "sun", + "su" + ], + [ + "swa", + "sw" + ], + [ + "swc", + "sw-CD" + ], + [ + "swe", + "sv" + ], + [ + "swh", + "sw" + ], + [ + "tah", + "ty" + ], + [ + "tam", + "ta" + ], + [ + "tat", + "tt" + ], + [ + "tdu", + "dtp" + ], + [ + "tel", + "te" + ], + [ + "tgg", + "bjp" + ], + [ + "tgk", + "tg" + ], + [ + "tgl", + "fil" + ], + [ + "tha", + "th" + ], + [ + "thc", + "tpo" + ], + [ + "thw", + "ola" + ], + [ + "thx", + "oyb" + ], + [ + "tib", + "bo" + ], + [ + "tid", + "itd" + ], + [ + "tie", + "ras" + ], + [ + "tir", + "ti" + ], + [ + "tkk", + "twm" + ], + [ + "tlw", + "weo" + ], + [ + "tmp", + "tyj" + ], + [ + "tne", + "kak" + ], + [ + "tnf", + "fa-AF" + ], + [ + "ton", + "to" + ], + [ + "tsf", + "taj" + ], + [ + "tsn", + "tn" + ], + [ + "tso", + "ts" + ], + [ + "ttq", + "tmh" + ], + [ + "tuk", + "tk" + ], + [ + "tur", + "tr" + ], + [ + "twi", + "ak" + ], + [ + "uig", + "ug" + ], + [ + "ukr", + "uk" + ], + [ + "umu", + "del" + ], + [ + "unp", + "wro" + ], + [ + "uok", + "ema" + ], + [ + "urd", + "ur" + ], + [ + "uzb", + "uz" + ], + [ + "uzn", + "uz" + ], + [ + "ven", + "ve" + ], + [ + "vie", + "vi" + ], + [ + "vol", + "vo" + ], + [ + "wel", + "cy" + ], + [ + "wgw", + "wgb" + ], + [ + "wit", + "nol" + ], + [ + "wiw", + "nwo" + ], + [ + "wln", + "wa" + ], + [ + "wol", + "wo" + ], + [ + "xba", + "cax" + ], + [ + "xho", + "xh" + ], + [ + "xia", + "acn" + ], + [ + "xkh", + "waw" + ], + [ + "xpe", + "kpe" + ], + [ + "xrq", + "dmw" + ], + [ + "xsj", + "suj" + ], + [ + "xsl", + "den" + ], + [ + "ybd", + "rki" + ], + [ + "ydd", + "yi" + ], + [ + "yen", + "ynq" + ], + [ + "yid", + "yi" + ], + [ + "yiy", + "yrm" + ], + [ + "yma", + "lrr" + ], + [ + "ymt", + "mtm" + ], + [ + "yor", + "yo" + ], + [ + "yos", + "zom" + ], + [ + "yuu", + "yug" + ], + [ + "zai", + "zap" + ], + [ + "zha", + "za" + ], + [ + "zho", + "zh" + ], + [ + "zir", + "scv" + ], + [ + "zsm", + "ms" + ], + [ + "zul", + "zu" + ], + [ + "zyb", + "za" + ] + ], + "script": [ + [ + "Qaai", + "Zinh" + ] + ], + "region_alpha": [ + [ + "BU", + "MM" + ], + [ + "CT", + "KI" + ], + [ + "DD", + "DE" + ], + [ + "DY", + "BJ" + ], + [ + "FX", + "FR" + ], + [ + "HV", + "BF" + ], + [ + "JT", + "UM" + ], + [ + "MI", + "UM" + ], + [ + "NH", + "VU" + ], + [ + "NQ", + "AQ" + ], + [ + "PU", + "UM" + ], + [ + "PZ", + "PA" + ], + [ + "QU", + "EU" + ], + [ + "RH", + "ZW" + ], + [ + "TP", + "TL" + ], + [ + "UK", + "GB" + ], + [ + "VD", + "VN" + ], + [ + "WK", + "UM" + ], + [ + "YD", + "YE" + ], + [ + "ZR", + "CD" + ] + ], + "region_num": [ + [ + "004", + "AF" + ], + [ + "008", + "AL" + ], + [ + "010", + "AQ" + ], + [ + "012", + "DZ" + ], + [ + "016", + "AS" + ], + [ + "020", + "AD" + ], + [ + "024", + "AO" + ], + [ + "028", + "AG" + ], + [ + "031", + "AZ" + ], + [ + "032", + "AR" + ], + [ + "036", + "AU" + ], + [ + "040", + "AT" + ], + [ + "044", + "BS" + ], + [ + "048", + "BH" + ], + [ + "050", + "BD" + ], + [ + "051", + "AM" + ], + [ + "052", + "BB" + ], + [ + "056", + "BE" + ], + [ + "060", + "BM" + ], + [ + "064", + "BT" + ], + [ + "068", + "BO" + ], + [ + "070", + "BA" + ], + [ + "072", + "BW" + ], + [ + "074", + "BV" + ], + [ + "076", + "BR" + ], + [ + "084", + "BZ" + ], + [ + "086", + "IO" + ], + [ + "090", + "SB" + ], + [ + "092", + "VG" + ], + [ + "096", + "BN" + ], + [ + "100", + "BG" + ], + [ + "104", + "MM" + ], + [ + "108", + "BI" + ], + [ + "112", + "BY" + ], + [ + "116", + "KH" + ], + [ + "120", + "CM" + ], + [ + "124", + "CA" + ], + [ + "132", + "CV" + ], + [ + "136", + "KY" + ], + [ + "140", + "CF" + ], + [ + "144", + "LK" + ], + [ + "148", + "TD" + ], + [ + "152", + "CL" + ], + [ + "156", + "CN" + ], + [ + "158", + "TW" + ], + [ + "162", + "CX" + ], + [ + "166", + "CC" + ], + [ + "170", + "CO" + ], + [ + "174", + "KM" + ], + [ + "175", + "YT" + ], + [ + "178", + "CG" + ], + [ + "180", + "CD" + ], + [ + "184", + "CK" + ], + [ + "188", + "CR" + ], + [ + "191", + "HR" + ], + [ + "192", + "CU" + ], + [ + "196", + "CY" + ], + [ + "203", + "CZ" + ], + [ + "204", + "BJ" + ], + [ + "208", + "DK" + ], + [ + "212", + "DM" + ], + [ + "214", + "DO" + ], + [ + "218", + "EC" + ], + [ + "222", + "SV" + ], + [ + "226", + "GQ" + ], + [ + "230", + "ET" + ], + [ + "231", + "ET" + ], + [ + "232", + "ER" + ], + [ + "233", + "EE" + ], + [ + "234", + "FO" + ], + [ + "238", + "FK" + ], + [ + "239", + "GS" + ], + [ + "242", + "FJ" + ], + [ + "246", + "FI" + ], + [ + "248", + "AX" + ], + [ + "249", + "FR" + ], + [ + "250", + "FR" + ], + [ + "254", + "GF" + ], + [ + "258", + "PF" + ], + [ + "260", + "TF" + ], + [ + "262", + "DJ" + ], + [ + "266", + "GA" + ], + [ + "268", + "GE" + ], + [ + "270", + "GM" + ], + [ + "275", + "PS" + ], + [ + "276", + "DE" + ], + [ + "278", + "DE" + ], + [ + "280", + "DE" + ], + [ + "288", + "GH" + ], + [ + "292", + "GI" + ], + [ + "296", + "KI" + ], + [ + "300", + "GR" + ], + [ + "304", + "GL" + ], + [ + "308", + "GD" + ], + [ + "312", + "GP" + ], + [ + "316", + "GU" + ], + [ + "320", + "GT" + ], + [ + "324", + "GN" + ], + [ + "328", + "GY" + ], + [ + "332", + "HT" + ], + [ + "334", + "HM" + ], + [ + "336", + "VA" + ], + [ + "340", + "HN" + ], + [ + "344", + "HK" + ], + [ + "348", + "HU" + ], + [ + "352", + "IS" + ], + [ + "356", + "IN" + ], + [ + "360", + "ID" + ], + [ + "364", + "IR" + ], + [ + "368", + "IQ" + ], + [ + "372", + "IE" + ], + [ + "376", + "IL" + ], + [ + "380", + "IT" + ], + [ + "384", + "CI" + ], + [ + "388", + "JM" + ], + [ + "392", + "JP" + ], + [ + "398", + "KZ" + ], + [ + "400", + "JO" + ], + [ + "404", + "KE" + ], + [ + "408", + "KP" + ], + [ + "410", + "KR" + ], + [ + "414", + "KW" + ], + [ + "417", + "KG" + ], + [ + "418", + "LA" + ], + [ + "422", + "LB" + ], + [ + "426", + "LS" + ], + [ + "428", + "LV" + ], + [ + "430", + "LR" + ], + [ + "434", + "LY" + ], + [ + "438", + "LI" + ], + [ + "440", + "LT" + ], + [ + "442", + "LU" + ], + [ + "446", + "MO" + ], + [ + "450", + "MG" + ], + [ + "454", + "MW" + ], + [ + "458", + "MY" + ], + [ + "462", + "MV" + ], + [ + "466", + "ML" + ], + [ + "470", + "MT" + ], + [ + "474", + "MQ" + ], + [ + "478", + "MR" + ], + [ + "480", + "MU" + ], + [ + "484", + "MX" + ], + [ + "492", + "MC" + ], + [ + "496", + "MN" + ], + [ + "498", + "MD" + ], + [ + "499", + "ME" + ], + [ + "500", + "MS" + ], + [ + "504", + "MA" + ], + [ + "508", + "MZ" + ], + [ + "512", + "OM" + ], + [ + "516", + "NA" + ], + [ + "520", + "NR" + ], + [ + "524", + "NP" + ], + [ + "528", + "NL" + ], + [ + "531", + "CW" + ], + [ + "533", + "AW" + ], + [ + "534", + "SX" + ], + [ + "535", + "BQ" + ], + [ + "540", + "NC" + ], + [ + "548", + "VU" + ], + [ + "554", + "NZ" + ], + [ + "558", + "NI" + ], + [ + "562", + "NE" + ], + [ + "566", + "NG" + ], + [ + "570", + "NU" + ], + [ + "574", + "NF" + ], + [ + "578", + "NO" + ], + [ + "580", + "MP" + ], + [ + "581", + "UM" + ], + [ + "583", + "FM" + ], + [ + "584", + "MH" + ], + [ + "585", + "PW" + ], + [ + "586", + "PK" + ], + [ + "591", + "PA" + ], + [ + "598", + "PG" + ], + [ + "600", + "PY" + ], + [ + "604", + "PE" + ], + [ + "608", + "PH" + ], + [ + "612", + "PN" + ], + [ + "616", + "PL" + ], + [ + "620", + "PT" + ], + [ + "624", + "GW" + ], + [ + "626", + "TL" + ], + [ + "630", + "PR" + ], + [ + "634", + "QA" + ], + [ + "638", + "RE" + ], + [ + "642", + "RO" + ], + [ + "643", + "RU" + ], + [ + "646", + "RW" + ], + [ + "652", + "BL" + ], + [ + "654", + "SH" + ], + [ + "659", + "KN" + ], + [ + "660", + "AI" + ], + [ + "662", + "LC" + ], + [ + "663", + "MF" + ], + [ + "666", + "PM" + ], + [ + "670", + "VC" + ], + [ + "674", + "SM" + ], + [ + "678", + "ST" + ], + [ + "682", + "SA" + ], + [ + "686", + "SN" + ], + [ + "688", + "RS" + ], + [ + "690", + "SC" + ], + [ + "694", + "SL" + ], + [ + "702", + "SG" + ], + [ + "703", + "SK" + ], + [ + "704", + "VN" + ], + [ + "705", + "SI" + ], + [ + "706", + "SO" + ], + [ + "710", + "ZA" + ], + [ + "716", + "ZW" + ], + [ + "720", + "YE" + ], + [ + "724", + "ES" + ], + [ + "728", + "SS" + ], + [ + "729", + "SD" + ], + [ + "732", + "EH" + ], + [ + "736", + "SD" + ], + [ + "740", + "SR" + ], + [ + "744", + "SJ" + ], + [ + "748", + "SZ" + ], + [ + "752", + "SE" + ], + [ + "756", + "CH" + ], + [ + "760", + "SY" + ], + [ + "762", + "TJ" + ], + [ + "764", + "TH" + ], + [ + "768", + "TG" + ], + [ + "772", + "TK" + ], + [ + "776", + "TO" + ], + [ + "780", + "TT" + ], + [ + "784", + "AE" + ], + [ + "788", + "TN" + ], + [ + "792", + "TR" + ], + [ + "795", + "TM" + ], + [ + "796", + "TC" + ], + [ + "798", + "TV" + ], + [ + "800", + "UG" + ], + [ + "804", + "UA" + ], + [ + "807", + "MK" + ], + [ + "818", + "EG" + ], + [ + "826", + "GB" + ], + [ + "831", + "GG" + ], + [ + "832", + "JE" + ], + [ + "833", + "IM" + ], + [ + "834", + "TZ" + ], + [ + "840", + "US" + ], + [ + "850", + "VI" + ], + [ + "854", + "BF" + ], + [ + "858", + "UY" + ], + [ + "860", + "UZ" + ], + [ + "862", + "VE" + ], + [ + "876", + "WF" + ], + [ + "882", + "WS" + ], + [ + "886", + "YE" + ], + [ + "887", + "YE" + ], + [ + "894", + "ZM" + ], + [ + "958", + "AA" + ], + [ + "959", + "QM" + ], + [ + "960", + "QN" + ], + [ + "962", + "QP" + ], + [ + "963", + "QQ" + ], + [ + "964", + "QR" + ], + [ + "965", + "QS" + ], + [ + "966", + "QT" + ], + [ + "967", + "EU" + ], + [ + "968", + "QV" + ], + [ + "969", + "QW" + ], + [ + "970", + "QX" + ], + [ + "971", + "QY" + ], + [ + "972", + "QZ" + ], + [ + "973", + "XA" + ], + [ + "974", + "XB" + ], + [ + "975", + "XC" + ], + [ + "976", + "XD" + ], + [ + "977", + "XE" + ], + [ + "978", + "XF" + ], + [ + "979", + "XG" + ], + [ + "980", + "XH" + ], + [ + "981", + "XI" + ], + [ + "982", + "XJ" + ], + [ + "983", + "XK" + ], + [ + "984", + "XL" + ], + [ + "985", + "XM" + ], + [ + "986", + "XN" + ], + [ + "987", + "XO" + ], + [ + "988", + "XP" + ], + [ + "989", + "XQ" + ], + [ + "990", + "XR" + ], + [ + "991", + "XS" + ], + [ + "992", + "XT" + ], + [ + "993", + "XU" + ], + [ + "994", + "XV" + ], + [ + "995", + "XW" + ], + [ + "996", + "XX" + ], + [ + "997", + "XY" + ], + [ + "998", + "XZ" + ], + [ + "999", + "ZZ" + ] + ], + "complex_region": [ + [ + "062", + [ + "034", + "143" + ] + ], + [ + "172", + [ + "RU", + "AM", + "AZ", + "BY", + "GE", + "KG", + "KZ", + "MD", + "TJ", + "TM", + "UA", + "UZ" + ] + ], + [ + "200", + [ + "CZ", + "SK" + ] + ], + [ + "530", + [ + "CW", + "SX", + "BQ" + ] + ], + [ + "532", + [ + "CW", + "SX", + "BQ" + ] + ], + [ + "536", + [ + "SA", + "IQ" + ] + ], + [ + "582", + [ + "FM", + "MH", + "MP", + "PW" + ] + ], + [ + "810", + [ + "RU", + "AM", + "AZ", + "BY", + "EE", + "GE", + "KZ", + "KG", + "LV", + "LT", + "MD", + "TJ", + "TM", + "UA", + "UZ" + ] + ], + [ + "830", + [ + "JE", + "GG" + ] + ], + [ + "890", + [ + "RS", + "ME", + "SI", + "HR", + "MK", + "BA" + ] + ], + [ + "891", + [ + "RS", + "ME" + ] + ], + [ + "AN", + [ + "CW", + "SX", + "BQ" + ] + ], + [ + "CS", + [ + "RS", + "ME" + ] + ], + [ + "FQ", + [ + "AQ", + "TF" + ] + ], + [ + "NT", + [ + "SA", + "IQ" + ] + ], + [ + "PC", + [ + "FM", + "MH", + "MP", + "PW" + ] + ], + [ + "SU", + [ + "RU", + "AM", + "AZ", + "BY", + "EE", + "GE", + "KZ", + "KG", + "LV", + "LT", + "MD", + "TJ", + "TM", + "UA", + "UZ" + ] + ], + [ + "YU", + [ + "RS", + "ME" + ] + ] + ], + "variant": [ + [ + "heploc", + "alalc97" + ], + [ + "polytoni", + "polyton" + ] + ], + "subdivision": [ + [ + "cn11", + "cnbj" + ], + [ + "cn12", + "cntj" + ], + [ + "cn13", + "cnhe" + ], + [ + "cn14", + "cnsx" + ], + [ + "cn15", + "cnmn" + ], + [ + "cn21", + "cnln" + ], + [ + "cn22", + "cnjl" + ], + [ + "cn23", + "cnhl" + ], + [ + "cn31", + "cnsh" + ], + [ + "cn32", + "cnjs" + ], + [ + "cn33", + "cnzj" + ], + [ + "cn34", + "cnah" + ], + [ + "cn35", + "cnfj" + ], + [ + "cn36", + "cnjx" + ], + [ + "cn37", + "cnsd" + ], + [ + "cn41", + "cnha" + ], + [ + "cn42", + "cnhb" + ], + [ + "cn43", + "cnhn" + ], + [ + "cn44", + "cngd" + ], + [ + "cn45", + "cngx" + ], + [ + "cn46", + "cnhi" + ], + [ + "cn50", + "cncq" + ], + [ + "cn51", + "cnsc" + ], + [ + "cn52", + "cngz" + ], + [ + "cn53", + "cnyn" + ], + [ + "cn54", + "cnxz" + ], + [ + "cn61", + "cnsn" + ], + [ + "cn62", + "cngs" + ], + [ + "cn63", + "cnqh" + ], + [ + "cn64", + "cnnx" + ], + [ + "cn65", + "cnxj" + ], + [ + "cn71", + "twzzzz" + ], + [ + "cn91", + "hkzzzz" + ], + [ + "cn92", + "mozzzz" + ], + [ + "cz10a", + "cz110" + ], + [ + "cz10b", + "cz111" + ], + [ + "cz10c", + "cz112" + ], + [ + "cz10d", + "cz113" + ], + [ + "cz10e", + "cz114" + ], + [ + "cz10f", + "cz115" + ], + [ + "cz611", + "cz663" + ], + [ + "cz612", + "cz632" + ], + [ + "cz613", + "cz633" + ], + [ + "cz614", + "cz634" + ], + [ + "cz615", + "cz635" + ], + [ + "cz621", + "cz641" + ], + [ + "cz622", + "cz642" + ], + [ + "cz623", + "cz643" + ], + [ + "cz624", + "cz644" + ], + [ + "cz626", + "cz646" + ], + [ + "cz627", + "cz647" + ], + [ + "czjc", + "cz31" + ], + [ + "czjm", + "cz64" + ], + [ + "czka", + "cz41" + ], + [ + "czkr", + "cz52" + ], + [ + "czli", + "cz51" + ], + [ + "czmo", + "cz80" + ], + [ + "czol", + "cz71" + ], + [ + "czpa", + "cz53" + ], + [ + "czpl", + "cz32" + ], + [ + "czpr", + "cz10" + ], + [ + "czst", + "cz20" + ], + [ + "czus", + "cz42" + ], + [ + "czvy", + "cz63" + ], + [ + "czzl", + "cz72" + ], + [ + "fi01", + "axzzzz" + ], + [ + "fra", + "frges" + ], + [ + "frb", + "frnaq" + ], + [ + "frbl", + "blzzzz" + ], + [ + "frc", + "frara" + ], + [ + "frcp", + "cpzzzz" + ], + [ + "frd", + "frbfc" + ], + [ + "fre", + "frbre" + ], + [ + "frf", + "frcvl" + ], + [ + "frg", + "frges" + ], + [ + "frgf", + "gfzzzz" + ], + [ + "frgp", + "gpzzzz" + ], + [ + "frh", + "frcor" + ], + [ + "fri", + "frbfc" + ], + [ + "frj", + "fridf" + ], + [ + "frk", + "frocc" + ], + [ + "frl", + "frnaq" + ], + [ + "frm", + "frges" + ], + [ + "frmf", + "mfzzzz" + ], + [ + "frmq", + "mqzzzz" + ], + [ + "frn", + "frocc" + ], + [ + "frnc", + "nczzzz" + ], + [ + "fro", + "frhdf" + ], + [ + "frp", + "frnor" + ], + [ + "frpf", + "pfzzzz" + ], + [ + "frpm", + "pmzzzz" + ], + [ + "frq", + "frnor" + ], + [ + "frr", + "frpdl" + ], + [ + "frre", + "rezzzz" + ], + [ + "frs", + "frhdf" + ], + [ + "frt", + "frnaq" + ], + [ + "frtf", + "tfzzzz" + ], + [ + "fru", + "frpac" + ], + [ + "frv", + "frara" + ], + [ + "frwf", + "wfzzzz" + ], + [ + "fryt", + "ytzzzz" + ], + [ + "laxn", + "laxs" + ], + [ + "lud", + "lucl" + ], + [ + "lug", + "luec" + ], + [ + "lul", + "luca" + ], + [ + "mrnkc", + "mr13" + ], + [ + "nlaw", + "awzzzz" + ], + [ + "nlcw", + "cwzzzz" + ], + [ + "nlsx", + "sxzzzz" + ], + [ + "no23", + "no50" + ], + [ + "nzn", + "nzauk" + ], + [ + "nzs", + "nzcan" + ], + [ + "omba", + "ombj" + ], + [ + "omsh", + "omsj" + ], + [ + "plds", + "pl02" + ], + [ + "plkp", + "pl04" + ], + [ + "pllb", + "pl08" + ], + [ + "plld", + "pl10" + ], + [ + "pllu", + "pl06" + ], + [ + "plma", + "pl12" + ], + [ + "plmz", + "pl14" + ], + [ + "plop", + "pl16" + ], + [ + "plpd", + "pl20" + ], + [ + "plpk", + "pl18" + ], + [ + "plpm", + "pl22" + ], + [ + "plsk", + "pl26" + ], + [ + "plsl", + "pl24" + ], + [ + "plwn", + "pl28" + ], + [ + "plwp", + "pl30" + ], + [ + "plzp", + "pl32" + ], + [ + "shta", + "tazzzz" + ], + [ + "tteto", + "tttob" + ], + [ + "ttrcm", + "ttmrc" + ], + [ + "ttwto", + "tttob" + ], + [ + "twkhq", + "twkhh" + ], + [ + "twtnq", + "twtnn" + ], + [ + "twtpq", + "twnwt" + ], + [ + "twtxq", + "twtxg" + ], + [ + "usas", + "aszzzz" + ], + [ + "usgu", + "guzzzz" + ], + [ + "usmp", + "mpzzzz" + ], + [ + "uspr", + "przzzz" + ], + [ + "usum", + "umzzzz" + ], + [ + "usvi", + "vizzzz" + ] + ] +}