diff --git a/include/faker-cxx/types/Language.h b/include/faker-cxx/types/Language.h index b666a89e8..4e90567dd 100644 --- a/include/faker-cxx/types/Language.h +++ b/include/faker-cxx/types/Language.h @@ -13,14 +13,15 @@ enum class Language German, Russian, Romanian, + Hindi, }; inline std::string toString(Language language) { std::map languageToStringMapping{ - {Language::English, "English"}, {Language::Polish, "Polish"}, {Language::Italian, "Italian"}, - {Language::French, "French"}, {Language::German, "German"}, {Language::Russian, "Russian"}, - {Language::Romanian, "Romanian"}}; + {Language::English, "English"} , {Language::Polish, "Polish"}, {Language::Italian, "Italian"}, + {Language::French, "French"} , {Language::German, "German"}, {Language::Russian, "Russian"}, + {Language::Romanian, "Romanian"}, {Language::Hindi, "Hindi"}}; return languageToStringMapping.at(language); } diff --git a/src/modules/person/Person.cpp b/src/modules/person/Person.cpp index 4dc0d48e6..8b38fe437 100644 --- a/src/modules/person/Person.cpp +++ b/src/modules/person/Person.cpp @@ -13,6 +13,8 @@ #include "data/german/GermanFirstNamesFemales.h" #include "data/german/GermanFirstNamesMales.h" #include "data/german/GermanLastNames.h" +#include "data/indian/IndianFirstNames.h" +#include "data/indian/IndianLastNames.h" #include "data/italian/ItalianFirstNamesFemales.h" #include "data/italian/ItalianFirstNamesMales.h" #include "data/italian/ItalianLastNames.h" @@ -33,30 +35,32 @@ namespace faker { namespace { -const std::string malePrefix{"Mr."}; -const std::vector femalePrefixes{"Ms.", "Miss"}; -const std::vector allPrefixes{"Mr.", "Ms.", "Miss"}; -const std::vector sexes{"Male", "Female"}; - -const std::map>> languageToFirstNamesMapping{ - {Language::English, {{Sex::Male, englishFirstNamesMales}, {Sex::Female, englishFirstNamesFemales}}}, - {Language::French, {{Sex::Male, frenchFirstNamesMales}, {Sex::Female, frenchFirstNamesFemales}}}, - {Language::German, {{Sex::Male, germanFirstNamesMales}, {Sex::Female, germanFirstNamesFemales}}}, - {Language::Italian, {{Sex::Male, italianFirstNamesMales}, {Sex::Female, italianFirstNamesFemales}}}, - {Language::Polish, {{Sex::Male, polishFirstNamesMales}, {Sex::Female, polishFirstNamesFemales}}}, - {Language::Russian, {{Sex::Male, russianFirstNamesMales}, {Sex::Female, russianFirstNamesFemales}}}, - {Language::Romanian, {{Sex::Male, romanianFirstNamesMales}, {Sex::Female, romanianFirstNamesFemales}}}, -}; - -const std::map>> languageToLastNamesMapping{ - {Language::English, {{Sex::Male, englishLastNames}, {Sex::Female, englishLastNames}}}, - {Language::French, {{Sex::Male, frenchLastNames}, {Sex::Female, frenchLastNames}}}, - {Language::German, {{Sex::Male, germanLastNames}, {Sex::Female, germanLastNames}}}, - {Language::Italian, {{Sex::Male, italianLastNames}, {Sex::Female, italianLastNames}}}, - {Language::Polish, {{Sex::Male, polishLastNames}, {Sex::Female, polishLastNames}}}, - {Language::Russian, {{Sex::Male, russianLastNamesMales}, {Sex::Female, russianLastNamesFemales}}}, - {Language::Romanian, {{Sex::Male, romanianLastNames}, {Sex::Female, romanianLastNames}}}, -}; + const std::string malePrefix{"Mr."}; + const std::vector femalePrefixes{"Ms.", "Miss"}; + const std::vector allPrefixes{"Mr.", "Ms.", "Miss"}; + const std::vector sexes{"Male", "Female"}; + + const std::map>> languageToFirstNamesMapping{ + {Language::English, {{Sex::Male, englishFirstNamesMales}, {Sex::Female, englishFirstNamesFemales}}}, + {Language::French, {{Sex::Male, frenchFirstNamesMales}, {Sex::Female, frenchFirstNamesFemales}}}, + {Language::German, {{Sex::Male, germanFirstNamesMales}, {Sex::Female, germanFirstNamesFemales}}}, + {Language::Italian, {{Sex::Male, italianFirstNamesMales}, {Sex::Female, italianFirstNamesFemales}}}, + {Language::Polish, {{Sex::Male, polishFirstNamesMales}, {Sex::Female, polishFirstNamesFemales}}}, + {Language::Russian, {{Sex::Male, russianFirstNamesMales}, {Sex::Female, russianFirstNamesFemales}}}, + {Language::Romanian, {{Sex::Male, romanianFirstNamesMales}, {Sex::Female, romanianFirstNamesFemales}}}, + {Language::Hindi, {{Sex::Male, indianFirstNamesMales}, {Sex::Female, indianFirstNamesFemales}}}, + }; + + const std::map>> languageToLastNamesMapping{ + {Language::English, {{Sex::Male, englishLastNames}, {Sex::Female, englishLastNames}}}, + {Language::French, {{Sex::Male, frenchLastNames}, {Sex::Female, frenchLastNames}}}, + {Language::German, {{Sex::Male, germanLastNames}, {Sex::Female, germanLastNames}}}, + {Language::Italian, {{Sex::Male, italianLastNames}, {Sex::Female, italianLastNames}}}, + {Language::Polish, {{Sex::Male, polishLastNames}, {Sex::Female, polishLastNames}}}, + {Language::Russian, {{Sex::Male, russianLastNamesMales}, {Sex::Female, russianLastNamesFemales}}}, + {Language::Romanian, {{Sex::Male, romanianLastNames}, {Sex::Female, romanianLastNames}}}, + {Language::Hindi, {{Sex::Male, indianLastNames}, {Sex::Female, indianLastNames}}} + }; } std::string Person::firstName(Language language, std::optional sex) diff --git a/src/modules/person/PersonTest.cpp b/src/modules/person/PersonTest.cpp index a54a5eab6..d3e5c2f12 100644 --- a/src/modules/person/PersonTest.cpp +++ b/src/modules/person/PersonTest.cpp @@ -28,6 +28,8 @@ #include "data/russian/RussianFirstNamesMales.h" #include "data/russian/RussianLastNamesFemales.h" #include "data/russian/RussianLastNamesMales.h" +#include "data/indian/IndianFirstNames.h" +#include "data/indian/IndianLastNames.h" #include "src/common/StringHelper.h" using namespace ::testing; @@ -40,7 +42,7 @@ const std::vector femalePrefixes{"Ms.", "Miss"}; const std::vector allPrefixes{"Mr.", "Ms.", "Miss"}; const std::vector languages{Language::English, Language::French, Language::German, Language::Italian, - Language::Polish, Language::Russian, Language::Romanian}; + Language::Polish, Language::Russian, Language::Romanian, Language::Hindi}; const std::map>> languageToFirstNamesMapping{ {Language::English, {{Sex::Male, englishFirstNamesMales}, {Sex::Female, englishFirstNamesFemales}}}, @@ -50,6 +52,7 @@ const std::map>> languageToFirs {Language::Polish, {{Sex::Male, polishFirstNamesMales}, {Sex::Female, polishFirstNamesFemales}}}, {Language::Russian, {{Sex::Male, russianFirstNamesMales}, {Sex::Female, russianFirstNamesFemales}}}, {Language::Romanian, {{Sex::Male, romanianFirstNamesMales}, {Sex::Female, romanianFirstNamesFemales}}}, + {Language::Hindi, {{Sex::Male, indianFirstNamesMales}, {Sex::Female, indianFirstNamesFemales}}}, }; const std::map>> languageToLastNamesMapping{ @@ -60,13 +63,13 @@ const std::map>> languageToLast {Language::Polish, {{Sex::Male, polishLastNames}, {Sex::Female, polishLastNames}}}, {Language::Russian, {{Sex::Male, russianLastNamesMales}, {Sex::Female, russianLastNamesFemales}}}, {Language::Romanian, {{Sex::Male, romanianLastNames}, {Sex::Female, romanianLastNames}}}, -}; + {Language::Hindi, {{Sex::Male, indianLastNames}, {Sex::Female, indianLastNames}}}}; const std::map generatedTestName{ - {Language::English, "shouldGenerateEnglishName"}, {Language::French, "shouldGenerateFrenchName"}, - {Language::German, "shouldGenerateGermanName"}, {Language::Italian, "shouldGenerateItalianName"}, - {Language::Polish, "shouldGeneratePolishName"}, {Language::Russian, "shouldGenerateRussianName"}, - {Language::Romanian, "shouldGenerateRomanianName"}}; + {Language::English, "shouldGenerateEnglishName"}, {Language::French, "shouldGenerateFrenchName"}, + {Language::German, "shouldGenerateGermanName"}, {Language::Italian, "shouldGenerateItalianName"}, + {Language::Polish, "shouldGeneratePolishName"}, {Language::Russian, "shouldGenerateRussianName"}, + {Language::Romanian, "shouldGenerateRomanianName"}, {Language::Hindi, "shouldGenerateIndianName"}}; } class PersonTest : public TestWithParam diff --git a/src/modules/person/data/indian/IndianFirstNames.h b/src/modules/person/data/indian/IndianFirstNames.h new file mode 100644 index 000000000..9994cc6de --- /dev/null +++ b/src/modules/person/data/indian/IndianFirstNames.h @@ -0,0 +1,82 @@ +#pragma once + +#include +#include + +namespace faker +{ +const std::vector indianFirstNamesMales = { + "Aadi", "Aadil", "Aahan", "Aarav", "Aarit", "Aarush", "Aaryan", "Aaryav", + "Aayush", "Abeer", "Abhay", "Abhinav", "Abhishek", "Abhiyay", "Adarsh", "Adhvait", + "Aditya", "Advait", "Advay", "Ahaan", "Akash", "Akhil", "Akhilesh", "Akshant", + "Akshat", "Akshay", "Akshaya", "Alok", "Aman", "Amar", "Amardeep", "Amit", + "Amitabh", "Anand", "Aniket", "Anirudh", "Anish", "Ankit", "Ankur", "Ansh", + "Anshul", "Anshuman", "Anupam", "Anurag", "Arin", "Arjun", "Armaan", "Arnav", + "Arpit", "Arun", "Arush", "Arvind", "Arya", "Aryaman", "Aryan", "Aryana", + "Aryaveer", "Ashutosh", "Atharv", "Atul", "Avinash", "Avir", "Ayush", "Baldev", + "Bhavesh", "Bhavya", "Bhushan", "Bhuvan", "Bimal", "Birju", "Brij", "Brijesh", + "Brijmohan", "Chirag", "Darsh", "Darshan", "Deep", "Deepak", "Deepesh", "Dev", + "Devang", "Devansh", "Devendra", "Devesh", "Dhairik", "Dhairya", "Dhaval", "Dheeraj", + "Dhiraj", "Dhriti", "Dhruv", "Dhruva", "Dhruvansh", "Dinesh", "Dipak", "Dipesh", + "Divyansh", "Eshan", "Gagan", "Ganesh", "Gaurav", "Gautam", "Girish", "Gopal", + "Govind", "Harish", "Harsh", "Harshad", "Harshal", "Hemant", "Himanshu", "Hitesh", + "Hridaan", "Hriday", "Hrithik", "Hrithvik", "Hrushi", "Iqbal", "Ishaan", "Ishan", + "Ishant", "Ishwar", "Jagat", "Jagdish", "Jai", "Jatin", "Jatish", "Jay", + "Jayant", "Jitender", "Jitendra", "Kabir", "Kabira", "Kabiraj", "Kailash", "Kairav", + "Kamal", "Kamlesh", "Kapil", "Karan", "Karna", "Karthik", "Karun", "Kashyap", + "Kavish", "Keshav", "Ketan", "Kian", "Kiran", "Kishan", "Kishore", "Krish", + "Krishna", "Krishnaiah", "Kunal", "Kushal", "Lakshay", "Lakshit", "Lalit", "Laxman", + "Lokesh", "Manav", "Manik", "Maninder", "Manish", "Manoj", "Mayank", "Mayur", + "Mohan", "Mohit", "Mukesh", "Mukul", "Mukund", "Nakul", "Nandan", "Nandlal", + "Narayan", "Naveen", "Neeraj", "Nihal", "Nikhil", "Nilesh", "Nimish", "Nirav", + "Nishant", "Nishith", "Nitesh", "Nitin", "Nitish", "Om", "Omkar", "Pankaj", + "Pariket", "Parikshit", "Parth", "Partha", "Parthiv", "Parv", "Parveen", "Pradeep", + "Pramod", "Pranav", "Pranay", "Pranit", "Pranjal", "Pratham", "Pratyush", "Pravin", + "Prayag", "Prithvi", "Raahat", "Raghav", "Rahul", "Rajat", "Rajendra", "Rajesh", + "Rajiv", "Rajkishor", "Rajkumar", "Rajnish", "Rajveer", "Rakshan", "Raman", "Ramesh", + "Ranbir", "Ranjan", "Ranveer", "Rapul", "Ravi", "Revansh", "Reyansh", "Rian", + "Ridhaan", "Rishabh", "Rishi", "Rishit", "Ritesh", "Ritish", "Ritvik", "Rohan", + "Rohant", "Rohit", "Rudransh", "Rupesh", "Rushabh", "Rushil", "Saarthak", "Sachin", + "Sagar", "Sahil", "Sahitya", "Sameer", "Sameet", "Sanjay", "Sanjeev", "Sanket", + "Sarthak", "Sarvesh", "Satish", "Shantanu", "Shardul", "Shashank", "Shaurya", "Shivam", + "Shivansh", "Shlok", "Shourya", "Shresht", "Shubham", "Shyam", "Siddharth", "Subhash", + "Sudhir", "Sumeet", "Sumit", "Sunil", "Sunny", "Suraj", "Surender", "Suresh", + "Surya", "Sushant", "Suvan", "Tanay", "Tanish", "Tanmay", "Tanush", "Tanvik", + "Taran", "Tarun", "Tavish", "Tejas", "Tejus", "Tushar", "Uday", "Umesh", + "Utkarsh", "Vaibhav", "Vansh", "Vanshaj", "Varun", "Ved", "Vedant", "Veer", + "Veerendra", "Vibhav", "Vicky", "Vidit", "Vidyut", "Vihaan", "Vihan", "Vijay", + "Vikas", "Vikram", "Vikrant", "Vimal", "Vinay", "Vinayak", "Vineet", "Vinod", + "Vipul", "Virat", "Virendra", "Viresh", "Vishal", "Vishesh", "Vishnu", "Vishwas", + "Vivaan", "Vivan", "Vivek", "Viyan", "Yaman", "Yash", "Yashas", "Yashith", + "Yashraj", "Yashwant", "Yashwanta", "Yashwardhan", "Yogesh", "Yug", "Yuva", "Yuvan", + "Yuvansh", "Yuvraj", "Yuvraja", "Zaheer", "Zahir", "Zain", "Zayyan", +}; + +const std::vector indianFirstNamesFemales = { + "Aadrika", "Aadya", "Aakriti", "Aanya", "Aanyaya", "Aaradhya", "Aarohi", "Aashi", "Aashika", + "Adhithi", "Aditi", "Aisha", "Akshara", "Alia", "Amaira", "Amara", "Ananya", "Anika", + "Anisha", "Anushka", "Anvi", "Anwaya", "Aria", "Arunima", "Avani", "Avishi", "Avni", + "Banita", "Bhavana", "Bhavisha", "Bhavna", "Bhavya", "Bhavyata", "Bhumi", "Bhumika", "Bhuvitha", + "Chakori", "Chandika", "Chandna", "Chandni", "Chandrika", "Charmika", "Charu", "Charul", "Charvi", + "Chhavi", "Chitra", "Deepika", "Devanshi", "Devika", "Dhanya", "Dhriti", "Disha", "Divisha", + "Divishi", "Divya", "Diya", "Drishti", "Dyuthi", "Eeshaal", "EeshaaniEk", "Esha", "Eshitha", + "Falguni", "Falini", "Faria", "Farida", "Freesha", "Fulki", "Gargee", "Gargi", "Garima", + "Gauri", "Giribala", "Gitali", "Gitanjali", "Grishma", "Harini", "Haritha", "Harshini", "Harshita", + "Himani", "Hina", "Hiral", "Hrishita", "Inaya", "Ira", "Isha", "Ishana", "Ishani", + "Ishika", "Ishiqa", "Ishira", "Ishita", "Ishitha", "Ishmita", "Janvi", "Janya", "Jara", + "Jaswita", "Jia", "Jivana", "Jivika", "Jivisha", "Jiya", "Jyotsna", "Kanya", "Kashvi", + "Kashvii", "Kavya", "Khushi", "Kia", "Kiara", "Kiran", "Kirti", "Kritika", "Kshirja", + "Lasya", "Lavanya", "Lavisha", "Lavitha", "Leah", "Lisha", "Manasvi", "Manika", "Manisha", + "Mannat", "Manvi", "Manvita", "Meenal", "Meera", "Megha", "Mira", "Myra", "Mysha", + "Naina", "Nandita", "Natasha", "Neha", "Nidhi", "Nidhita", "Niharika", "Nishi", "Nitya", + "Nityari", "Nityasha", "Nityashi", "Nyra", "Oishi", "Ojal", "Ojaswi", "Oshin", "Oviya", + "Pankhudi", "Pankhuri", "Pari", "Parinidhi", "Parul", "Pihu", "Praniti", "Pranjal", "Prisha", + "Prishita", "Priyanka", "Qirat", "Queenie", "Quinara", "Quisha", "Rashi", "Rasika", "Rhea", + "Riddhi", "Rishi", "Ritara", "Rithika", "Riya", "Roshni", "Rupali", "Saanvi", "Saesha", + "Saisha", "Sanika", "Sanvi", "Sanya", "Sara", "Saraswati", "Sarita", "Savita", "Shanaya", + "Simran", "Sita", "Siya", "Sneha", "Sonam", "Tamanna", "Tanishi", "Tanvi", "Tishira", + "Tithira", "Trisha", "Ujjwala", "Urisha", "Urvashi", "Urvi", "Utkarsha", "Vaishnavi", "Vanshika", + "Vanya", "Vasundhara", "Vidhi", "Vidulika", "Vinita", "Wansika", "Wisha", "Wynona", "Xandra", + "Xara", "Yashi", "Yashika", "Yashvi", "Yukta", "Yukthi", "Zaina", "Zaira", "Zara", + "Zarika", "Zarna", "Zoya"}; +} \ No newline at end of file diff --git a/src/modules/person/data/indian/IndianLastNames.h b/src/modules/person/data/indian/IndianLastNames.h new file mode 100644 index 000000000..31acbf896 --- /dev/null +++ b/src/modules/person/data/indian/IndianLastNames.h @@ -0,0 +1,36 @@ +#pragma once + +#include +#include + +namespace faker +{ +const std::vector indianLastNames = { + "Acharya", "Agarwal", "Aggarwal", "Ahluwalia", "Ahuja", "Amin", "Anand", + "Arora", "Arvind", "Babu", "Bajaj", "Bajwa", "Banerjee", "Bansal", + "Batra", "Bhagat", "Bhardwaj", "Bhargava", "Bhasin", "Bhat", "Bhatia", + "Bhatnagar", "Bhatt", "Bhattacharya", "Biswas", "Bose", "Chabra", "Chadha", + "Chakrabarti", "Chakrabarty", "Chakraborty", "Chakravarti", "Chandra", "Chatterjee", "Chaturvedi", + "Chauhan", "Chawla", "Chopra", "Choudhary", "Choudhury", "Das", "Deshmukh", + "Deshpande", "Dewan", "Dey", "Dhawan", "Dhillon", "Dixit", "Dube", + "Dutt", "Dutta", "Easwaran", "Edwin", "Ekbote", "Eswaran", "Fadnavis", + "Fernandes", "Gandhi", "Ghosh", "Ghoshal", "Gill", "Gokhale", "Goswami", + "Gupta", "Harikrishnan", "Hegde", "Inamdar", "Iyengar", "Iyer", "Jaiswal", + "Jha", "Joglekar", "Joshi", "Juneja", "Kadam", "Kakkar", "Kamble", + "Kapoor", "Kashyap", "Kaur", "Khan", "Khanna", "Khera", "Khosla", + "Khurana", "Kohli", "Kulkarni", "Kumar", "Lal", "Lalwani", "Luthra", + "Mahajan", "Majumdar", "Malhotra", "Malik", "Mandal", "Mathur", "Mazumdar", + "Mehra", "Mehrotra", "Mehta", "Menon", "Mishra", "Mittal", "Mukherjee", + "Mukhopadhyay", "Mundra", "Nag", "Nagpal", "Nair", "Nambiar", "Nanda", + "Narang", "Narula", "Nayar", "Negi", "Oberoi", "Ojha", "Oza", + "Padmanabhan", "Pandey", "Pandit", "Patil", "Pawar", "Pillai", "Pradhan", + "Prakash", "Puri", "Qazi", "Qureshi", "Raghavan", "Raghunathan", "Rai", + "Raj", "Rajput", "Rana", "Rao", "Rastogi", "Rathore", "Reddy", + "Sabharwal", "Sardar", "Sarin", "Saxena", "Sen", "Sengupta", "Seth", + "Sethi", "Shah", "Sharma", "Shukla", "Singh", "Singhal", "Sinha", + "Soni", "Sood", "Suri", "Talreja", "Talwar", "Thakkar", "Thakur", + "Tiwari", "Trivedi", "Tyagi", "Upadhyay", "Upadhyaya", "Uppal", "Vaid", + "Vaidya", "Varghese", "Varma", "Verma", "Vij", "Vora", "Vyas", + "Wadhwa", "Wagh", "Waghmare", "Wagle", "Walia", "Xavier", "Yadav", + "Zakaria", "Zaveri"}; +} \ No newline at end of file