Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add location addresses data from Korea #445 #991

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions faker-cxx
Submodule faker-cxx added at 5a47de
318 changes: 182 additions & 136 deletions src/modules/internet_data.h

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/modules/location.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ CountryAddressesInfo getAddresses(const Locale& locale)
return portugalAddresses;
case Locale::he_IL:
return israelAddresses;
case Locale::ko_KR:
return korAddresses;
default:
return usaAddresses;
}
Expand Down
316 changes: 290 additions & 26 deletions src/modules/location_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -7400,41 +7400,20 @@ const auto israelStreetNames = std::to_array<std::string_view>({
"תשבי",
});

const auto israelStreetPrefixes = std::to_array<std::string_view>({
"רחוב",
"שדרות",
"משעול",
"דרך",
"סמטת"
});
const auto israelStreetPrefixes = std::to_array<std::string_view>({"רחוב", "שדרות", "משעול", "דרך", "סמטת"});

const std::string_view israelZipCodeFormat{"#######"};

const auto israelAddressFormats =
std::to_array<std::string_view>({
const auto israelAddressFormats = std::to_array<std::string_view>({
"{street} {buildingNumber}",
"{street} {buildingNumber} {secondaryAddress}",
});

const auto israelSecondaryAddressFormats = std::to_array<std::string_view>({
"דירה #",
"דירה ##",
"חדר ##",
"חדר #"
});
const auto israelSecondaryAddressFormats = std::to_array<std::string_view>({"דירה #", "דירה ##", "חדר ##", "חדר #"});

const auto israelBuildingNumberFormats = std::to_array<std::string_view>({
"###",
"##",
"#",
"##ב",
"##א",
"#א",
"#ב"
});
const auto israelBuildingNumberFormats = std::to_array<std::string_view>({"###", "##", "#", "##ב", "##א", "#א", "#ב"});

const auto israelStreetFormats =
std::to_array<std::string_view>({
const auto israelStreetFormats = std::to_array<std::string_view>({
"{streetPrefix} {streetName}",
});

Expand Down Expand Up @@ -12127,4 +12106,289 @@ const CountryAddressesInfo usaAddresses{
usaStates,
};

// South Korea

const auto korCities = std::to_array<std::string_view>({
"고양시",
"과천시",
"광명시",
"구리시",
"군포시",
"김포시",
"남양주시",
"동두천시",
"부천시",
"성남시",
"수원시",
"시흥시",
"안산시",
"안성시",
"안양시",
"양주시",
"여주시",
"오산시",
"용인시",
"의왕시",
"의정부시",
"이천시",
"파주시",
"평택시",
"포천시",
"하남시",
"화성시",
"춘천시",
"원주시",
"강릉시",
"동해시",
"태백시",
"속초시",
"삼척시",
"청주시",
"충주시",
"제천시",
"천안시",
"공주시",
"보령시",
"아산시",
"서산시",
"논산시",
"계룡시",
"당진시",
"전주시",
"군산시",
"익산시",
"정읍시",
"남원시",
"김제시",
"목포시",
"여수시",
"순천시",
"나주시",
"광양시",
"포항시",
"경주시",
"김천시",
"안동시",
"구미시",
"영주시",
"영천시",
"상주시",
"문경시",
"경산시",
"창원시",
"진주시",
"통영시",
"사천시",
"김해시",
"밀양시",
"거제시",
"양산시",
"제주시",
"서귀포시",
"양평군",
"가평군",
"연천군",
"홍천군",
"횡성군",
"영월군",
"평창군",
"정선군",
"철원군",
"화천군",
"양구군",
"인제군",
"고성군",
"양양군",
"보은군",
"옥천군",
"영동군",
"증평군",
"진천군",
"괴산군",
"음성군",
"단양군",
"금산군",
"부여군",
"서천군",
"청양군",
"홍성군",
"예산군",
"태안군",
"완주군",
"진안군",
"무주군",
"장수군",
"임실군",
"순창군",
"고창군",
"부안군",
"담양군",
"곡성군",
"구례군",
"고흥군",
"보성군",
"화순군",
"장흥군",
"강진군",
"해남군",
"영암군",
"무안군",
"함평군",
"영광군",
"장성군",
"완도군",
"진도군",
"신안군",
"의성군",
"청송군",
"영양군",
"영덕군",
"청도군",
"고령군",
"성주군",
"칠곡군",
"예천군",
"봉화군",
"울진군",
"울릉군",
"의령군",
"함안군",
"창녕군",
"고성군",
"남해군",
"하동군",
"산청군",
"함양군",
"거창군",
"합천군"
});

const auto korStates = std::to_array<std::string_view>({
"서울특별시",
"부산광역시",
"대구광역시",
"인천광역시",
"광주광역시",
"대전광역시",
"울산광역시",
"세종특별자치시",
"경기도",
"강원도",
"충청북도",
"충청남도",
"전라북도",
"전라남도",
"경상북도",
"경상남도",
"제주특별자치도"
});

const auto korStreetSuffixes = std::to_array<std::string_view>({
"대로",
"로",
"길",
"산길",
"고개",
"사거리",
"삼거리",
"오거리",
"고속도로",
"순환로",
"다리",
"항구",
"골목",
"터널",
"진입로",
"나들목",
"입구",
"교",
"역로",
"공원로",
"대로변",
"교차로",
"산로",
"주차장길",
"회전로",
"공단로",
"산업로",
"지하차도",
"고가도로"
});

const std::string_view korZipCodeFormat{"#####"};

const auto korAddressFormats = std::to_array<std::string_view>({
"{buildingNumber} {street}",
"{buildingNumber} {street} {secondaryAddress}",
});

const auto korSecondaryAddressFormats = std::to_array<std::string_view>({
"아파트 ###호",
"빌라 ###호",
"오피스텔 ###호",
});

const auto korBuildingNumberFormats = std::to_array<std::string_view>({
"###",
"###-#",
"##",
});

const auto korStreetFormats = std::to_array<std::string_view>({
"{streetName}{streetSuffix}",
});

const auto korStreetNames = std::to_array<std::string_view>({
"중앙", "광화문", "청계천", "명동", "종로", "남대문", "동대문", "서초", "강남", "잠실",
"신촌", "홍대", "이태원", "한남", "압구정", "삼성", "선릉", "역삼", "여의도", "성수",
"건대", "왕십리", "부평", "송도", "서구", "계양", "부천", "안양", "평촌", "의왕",
"군포", "과천", "안산", "시흥", "광명", "용산", "금천", "관악", "구로", "영등포",
"양천", "마포", "서대문", "은평", "노원", "도봉", "강북", "성북", "중랑", "동대문",
"광진", "강동", "송파", "강서", "양재", "도곡", "대치", "삼전", "풍납", "길동",
"둔촌", "마곡", "가양", "염창", "방화", "화곡", "신월", "목동", "신정", "흑석",
"동작", "상도", "노량진", "삼각지", "효창", "용문", "해방촌", "남영", "이촌", "도원",
"용답", "송정", "공항", "가락", "문정", "장지", "오금", "수서", "위례", "하남",
"미사", "남양", "별내", "풍산", "와부", "진접", "오남", "호평", "평내", "퇴계원",
"화정", "백석", "주엽", "탄현", "마두", "대화", "후곡", "중산", "장항", "풍동",
"서현", "정자", "수내", "금곡", "야탑", "판교", "이매", "백현", "삼평", "분당",
"율동", "금토", "모란", "가천", "태평", "단대", "신흥", "수진", "상대원", "여수",
"복정", "하대원", "은행", "매탄", "원천", "영통", "망포", "동탄", "기흥", "구갈",
"신갈", "죽전", "수지", "성복", "동백", "흥덕", "상현", "광교", "오산", "세교",
"금암", "금오", "원흥", "지축", "삼송", "신원", "덕이", "내유", "식사", "설문",
"주교", "백마", "파주", "문산", "운정", "교하", "금촌", "금릉", "조리", "봉일천",
"용미", "가람", "목동", "도내", "당리", "송파", "문래", "아현", "도림", "역촌",
"미아", "돈암", "망원", "중림", "서빙고", "용강", "당산", "역삼", "포이", "대치",
"불광", "녹번", "진관", "수색", "구파발", "쌍문", "창동", "방학", "회기", "휘경",
"제기", "답십리", "전농", "금호", "옥수", "상왕십리", "행당", "마장", "도화", "염리",
"합정", "성산", "서교", "연희", "냉천", "충정", "아현", "공덕", "창천", "용호",
"효창", "신당", "상도", "하월곡", "장위", "석관", "종암", "보문", "안암", "혜화",
"창신", "숭인", "하왕십리", "하계", "상계", "월계", "공릉", "중계", "면목", "상봉",
"망우", "중화", "묵", "신내", "길음", "정릉", "삼양", "송중", "송천", "돈암",
"장충", "광희", "약수", "청구", "행촌", "숭인", "황학", "풍납", "송파", "석촌",
"문정", "방이", "오금", "위례", "삼전", "둔촌", "고덕", "암사", "명일", "길동",
"천호", "성내", "마곡", "등촌", "화곡", "발산", "가양", "개화", "방화", "공항",
"염창", "행주", "수진", "백현", "갈현", "대방", "노량진", "신대방", "장승배기",
"사당", "양평", "도림", "양화", "합정", "망원", "성산", "연남", "동교", "창천"
});


const auto korCityFormats = std::to_array<std::string_view>({
"{cityName}",
});

const CountryAddressesInfo korAddresses{
korZipCodeFormat,
(korAddressFormats),
(korSecondaryAddressFormats),
(korStreetFormats),
{},
(korStreetNames),
(korStreetSuffixes),
(korBuildingNumberFormats),
(korCityFormats),
{},
(korCities),
{},
(korStates),
};
}
1 change: 0 additions & 1 deletion src/modules/string.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,5 +358,4 @@ std::string nanoId(int minLength, int maxLength)
return id;
}


}
Loading