From 9a15ac68c427f03741d2063bd1f4a3548dc409e1 Mon Sep 17 00:00:00 2001 From: Duy Huynh Date: Sat, 13 Jan 2024 18:13:42 -0600 Subject: [PATCH] add people names from Ghana (#441) --- include/faker-cxx/types/Country.h | 4 +- src/modules/person/Person.cpp | 2 + src/modules/person/PersonTest.cpp | 3 + .../person/data/ghana/GhanaianFirstNames.h | 277 ++++++++++++++++++ .../person/data/ghana/GhanaianLastNames.h | 130 ++++++++ .../person/data/ghana/GhanaianPeopleNames.h | 16 + 6 files changed, 431 insertions(+), 1 deletion(-) create mode 100644 src/modules/person/data/ghana/GhanaianFirstNames.h create mode 100644 src/modules/person/data/ghana/GhanaianLastNames.h create mode 100644 src/modules/person/data/ghana/GhanaianPeopleNames.h diff --git a/include/faker-cxx/types/Country.h b/include/faker-cxx/types/Country.h index 171cdc216..ca92b20ff 100644 --- a/include/faker-cxx/types/Country.h +++ b/include/faker-cxx/types/Country.h @@ -66,6 +66,7 @@ enum class Country Malta, SouthAfrica, Azerbaijan, + Ghana, }; const std::vector countries{ @@ -80,7 +81,7 @@ const std::vector countries{ Country::Ireland, Country::Belarus, Country::Estonia, Country::Iran, Country::Bulgaria, Country::Moldova, Country::Lithuania, Country::Iceland, Country::Palestine, Country::Israel, Country::Vietnam, Country::Monaco, Country::Bosnia, Country::Lebanon, Country::Syria, - Country::Malta, Country::SouthAfrica, Country::Azerbaijan, + Country::Malta, Country::SouthAfrica, Country::Azerbaijan, Country::Ghana, }; inline std::string toString(Country country) @@ -144,6 +145,7 @@ inline std::string toString(Country country) {Country::Malta, "Malta"}, {Country::SouthAfrica, "South Africa"}, {Country::Azerbaijan, "Azerbaijan"}, + {Country::Ghana, "Ghana"}, }; return countryToStringMapping.at(country); diff --git a/src/modules/person/Person.cpp b/src/modules/person/Person.cpp index e5c39f44b..8ac2d5d92 100644 --- a/src/modules/person/Person.cpp +++ b/src/modules/person/Person.cpp @@ -70,6 +70,7 @@ #include "data/ukraine/UkrainianPeopleNames.h" #include "data/usa/UsaPeopleNames.h" #include "data/vietnam/VietnamesePeopleNames.h" +#include "data/ghana/GhanaianPeopleNames.h" #include "data/ZodiacSigns.h" #include "faker-cxx/Helper.h" #include "faker-cxx/Internet.h" @@ -110,6 +111,7 @@ const std::map countryToPeopleNamesMapping{ {Country::Monaco, monacanPeopleNames}, {Country::Lebanon, lebanesePeopleNames}, {Country::Syria, syrianPeopleNames}, {Country::Malta, maltesePeopleNames}, {Country::SouthAfrica, southAfricanPeopleNames}, {Country::Azerbaijan, azerbaijaniPeopleNames}, + {Country::Ghana, ghanaianPeopleNames}, }; std::string middleNameForCountry(Country country, std::optional sex); diff --git a/src/modules/person/PersonTest.cpp b/src/modules/person/PersonTest.cpp index d8b4a2b99..9395d4503 100644 --- a/src/modules/person/PersonTest.cpp +++ b/src/modules/person/PersonTest.cpp @@ -61,6 +61,7 @@ #include "data/spain/SpanishPeopleNames.h" #include "data/sweden/SwedishPeopleNames.h" #include "data/switzerland/SwissPeopleNames.h" +#include "data/ghana/GhanaianPeopleNames.h" #include "data/syria/SyrianPeopleNames.h" #include "data/turkey/TurkishPeopleNames.h" #include "data/ukraine/UkrainianPeopleNames.h" @@ -108,6 +109,7 @@ const std::map countryToPeopleNamesMapping{ {Country::Bosnia, bosnianPeopleNames}, {Country::Lebanon, lebanesePeopleNames}, {Country::Syria, syrianPeopleNames}, {Country::Malta, maltesePeopleNames}, {Country::SouthAfrica, southAfricanPeopleNames}, {Country::Azerbaijan, azerbaijaniPeopleNames}, + {Country::Ghana, ghanaianPeopleNames}, }; const std::map generatedTestName{ @@ -140,6 +142,7 @@ const std::map generatedTestName{ {Country::Bosnia, "shouldGenerateBosnianNames"}, {Country::Lebanon, "shouldGenerateLebaneseName"}, {Country::Syria, "shouldGenerateSyrianName"}, {Country::Malta, "shouldGenerateMalteseName"}, {Country::SouthAfrica, "shouldGenerateSouthAfricanName"}, {Country::Azerbaijan, "shouldGenerateAzerbaijaniName"}, + {Country::Ghana, "shouldGenerateGhanaianName"}, }; } diff --git a/src/modules/person/data/ghana/GhanaianFirstNames.h b/src/modules/person/data/ghana/GhanaianFirstNames.h new file mode 100644 index 000000000..f0ef21411 --- /dev/null +++ b/src/modules/person/data/ghana/GhanaianFirstNames.h @@ -0,0 +1,277 @@ +#pragma once + +#include +#include + +namespace faker +{ +const std::vector ghanaianMalesFirstNames = { + "Aaron", + "Abeiku", + "Adam", + "Adrian", + "Akwesi", + "Albert", + "Alex", + "Alexander", + "Andrew", + "Anthony", + "Antony", + "Arthur", + "Ben", + "Benjamin", + "Bernard", + "Bless", + "Blessing", + "Bruce", + "Carl", + "Charles", + "Christian", + "Clifford", + "Colins", + "Daniel", + "Danny", + "David", + "Denis", + "Dennis", + "Derrick", + "Dominic", + "Donald", + "Douglas", + "Duncan", + "Edward", + "Ekow", + "Elliot", + "Elliott", + "Eyram", + "Eric", + "Fiifi", + "Francis", + "Frank", + "Frederick", + "George", + "Gerald", + "Gordon", + "Graham", + "Gregory", + "Harry", + "Henry", + "Howard", + "Isaac", + "Akwasi", + "Jack", + "Jacob", + "Jake", + "James", + "Jason", + "Jeffrey", + "Jeremy", + "Joe", + "Joel", + "John", + "Jonathan", + "Joojo", + "Joseph", + "Josh", + "Joshua", + "Josiah", + "Julian", + "Justin", + "Karl", + "Kenneth", + "Kevin", + "Kofi", + "Kojo", + "Kujoe", + "Kwabena", + "Kwadwo", + "Kwaku", + "Kwame", + "Kwamena", + "Kwasi", + "Kweku", + "Kwesi", + "Kyle", + "Lawrence", + "Leslie", + "Louis", + "Luke", + "Malcolm", + "Marcus", + "Mark", + "Martin", + "Mathew", + "Matthew", + "Max", + "Michael", + "Nathan", + "Nicholas", + "Nigel", + "Oliver", + "Patrick", + "Paul", + "Peter", + "Philip", + "Phillip", + "Promise", + "Raymond", + "Richard", + "Robert", + "Roger", + "Ronald", + "Russell", + "Sam", + "Samuel", + "Shaun", + "Simon", + "Stanley", + "Stephen", + "Steven", + "Terence", + "Thomas", + "Timothy", + "Thank God", + "Thy Will Be Done", + "Tom", + "Tony", + "Victor", + "Vincent", + "William", + "Yaw", +}; + +const std::vector ghanaianFemalesFirstNames = { + "Aba", + "Abena", + "Abigail", + "Adwoa", + "Afia", + "Afua", + "Akos", + "Akofa", + "Akorfa", + "Akosua", + "Akua", + "Akumaa", + "Alice", + "Ama", + "Amanda", + "Amber", + "Amelia", + "Angela", + "Ann", + "Annette", + "Awesi", + "Baaba", + "Barbara", + "Beatrice", + "COmfort", + "Caroline", + "Catherine", + "Charlotte", + "Christina", + "Comfort", + "Constance", + "Danielle", + "Deborah", + "Debra", + "Denise", + "Dora", + "Dorcas", + "Dorothy", + "Eliabeth", + "Elizabeth", + "Emily", + "Emma", + "Ernestina", + "Esi", + "Eunice", + "Eyram", + "Felicia", + "Francesca", + "Gemma", + "Georgia", + "Georgina", + "Gifty", + "Grace", + "Hannabel", + "Hannah", + "Harriet", + "Helen", + "Irene", + "Janet", + "Janice", + "Jasmine", + "Jennifer", + "Jessica", + "Jill", + "Joanna", + "Josephine", + "Joyce", + "Judith", + "Julia", + "Juliana", + "Julie", + "Karen", + "Kate", + "Katherine", + "Katy", + "Lawrencia", + "Linda", + "Lisa", + "Lorraine", + "Lucy", + "Lydia", + "Mandy", + "Margaret", + "Maria", + "Marian", + "Marilyn", + "Mary", + "Maureen", + "Mawuena", + "Mawusi", + "Michelle", + "Millicent", + "Nana Ama", + "Naomi", + "Natalie", + "Natasha", + "Nicola", + "Nimakoah", + "Olivia", + "Pamela", + "Patricia", + "Paula", + "Priscilla", + "Rachael", + "Rachel", + "Rebecca", + "Regina", + "Rita", + "Roselyn", + "Rosemary", + "Ruth", + "Salomey", + "Samantha", + "Sandra", + "Sarah", + "Sena", + "Sharon", + "Sheila", + "Shirley", + "Stephanie", + "Susan", + "Sylvia", + "Teresa", + "Tina", + "Tracy", + "Vanessa", + "Veronica", + "Victoria", + "Vida", + "Wendy", + "Yaa", + "Yvonne", +}; +} diff --git a/src/modules/person/data/ghana/GhanaianLastNames.h b/src/modules/person/data/ghana/GhanaianLastNames.h new file mode 100644 index 000000000..1ea21692b --- /dev/null +++ b/src/modules/person/data/ghana/GhanaianLastNames.h @@ -0,0 +1,130 @@ +#pragma once + +#include +#include + +namespace faker +{ +const std::vector ghanaianLastNames = { + "Acheampong", + "Adadevoh", + "Adomah", + "Adomako", + "Adongo", + "Adu", + "Adusei", + "Adutwum", + "Afirifa", + "Afoakwa", + "Agyapong", + "Agyare", + "Agyei", + "Agyemang", + "Ahortor", + "Akoto", + "Akowua", + "Akyeamfuɔ", + "Akyeampong", + "Akyena", + "Akyerεko", + "Amo", + "Amoa", + "Amoako", + "Amoasi", + "Ampadu", + "Ampofo", + "Amponsah", + "Andorful", + "Ankra", + "Anokye", + "Ansa", + "Antwi", + "Appia", + "Appiah", + "Asamoa", + "Asamoah", + "Asante", + "Asare", + "Asenso", + "Asiama", + "Asiedu", + "Ata", + "Awuah", + "Baa", + "Baafi", + "Baah", + "Baawia", + "Badu", + "Boadi", + "Boadu", + "Boahen", + "Boakye", + "Boaten", + "Boateng", + "Bona", + "Bonsra", + "Bonsu", + "Daako", + "Danso", + "Darko", + "Darteh", + "Dartey", + "Djokoto", + "Donkor", + "Duah", + "Dwamena", + "Dzokoto", + "Fofie", + "Fosu", + "Gyamfi", + "Gyasi", + "Karikari", + "Koomson", + "Kumi", + "Kusi", + "Kwaakye", + "Kwarteng", + "Kyei", + "Mensa", + "Mensah", + "Nkansa", + "Nkansah", + "Nkrumah", + "Nsia", + "Nti", + "Ntiamoa", + "Ntim", + "Nyaako", + "Nyame", + "Nyantakyi", + "Obeng", + "Ofori", + "Ofosu", + "Okyere", + "Okpattah", + "Omani", + "Opoku", + "Oppong", + "Opuku", + "Osei", + "Oti", + "Otiwa", + "Otuo", + "Owusu", + "Prempeh", + "Quartey", + "Safo", + "Sarpong", + "Takyi", + "Tawia", + "Tutu", + "Tweneboa", + "Twumasi", + "Wiafe", + "Yaamoa", + "Yawson", + "Yeboa", + "Yeboah", + "Yirenkyi", +}; +} diff --git a/src/modules/person/data/ghana/GhanaianPeopleNames.h b/src/modules/person/data/ghana/GhanaianPeopleNames.h new file mode 100644 index 000000000..18d6eeb81 --- /dev/null +++ b/src/modules/person/data/ghana/GhanaianPeopleNames.h @@ -0,0 +1,16 @@ +#pragma once + +#include "../NameFormats.h" +#include "../PeopleNames.h" +#include "GhanaianFirstNames.h" +#include "GhanaianLastNames.h" + +namespace faker +{ +const NameFormats ghanaianPersonNameFormats{{{"{firstName} {lastName}"}, 1}}; + +const PeopleNames ghanaianPeopleNames{{ghanaianMalesFirstNames, {}, ghanaianLastNames, {}, {}}, + {ghanaianFemalesFirstNames, {}, ghanaianLastNames, {}, {}}, + ghanaianPersonNameFormats}; + +}