WinterSummer Posted August 16, 2015 Share Posted August 16, 2015 30k usernames in a .txt file mixed with both guys and females, example of a few usernames: johan92.freak amandaCandy WinAnna .112Johan I was thinking of downloading a big list of most popular female names in USA (most names are american), then I check if the usernames in the .txt file contains a female name. Is this gonna take a long time to go through a list with 30k usernames? Can someone help me with understand exactly how this process will look? >open 30k username list >open female name list >take first username from list and use regex to see if it contains any name from the female list, if it doesn't, save it to an array and go to next username from the 30k username list and loop >save the array to a .txt file with only males as output Quote Link to comment https://forums.phpfreaks.com/topic/297820-30k-usernames-need-to-remove-all-females-is-this-a-good-way/ Share on other sites More sharing options...
scootstah Posted August 16, 2015 Share Posted August 16, 2015 Have you tried testing such a theory to see if it works? That's a huge part of being a programmer you know. We don't just know every solution to every problem, and we don't just know if a solution will even work. We get a problem, we think about it for a bit, and we go "Huh, I wonder if this crazy ass idea might work?" And then we try it out. Quote Link to comment https://forums.phpfreaks.com/topic/297820-30k-usernames-need-to-remove-all-females-is-this-a-good-way/#findComment-1519039 Share on other sites More sharing options...
QuickOldCar Posted August 17, 2015 Share Posted August 17, 2015 Can't you tell the text file there is a big shoe sale? There are names that males and females share. Quote Link to comment https://forums.phpfreaks.com/topic/297820-30k-usernames-need-to-remove-all-females-is-this-a-good-way/#findComment-1519050 Share on other sites More sharing options...
WinterSummer Posted August 18, 2015 Author Share Posted August 18, 2015 Have you tried testing such a theory to see if it works? That's a huge part of being a programmer you know. We don't just know every solution to every problem, and we don't just know if a solution will even work. We get a problem, we think about it for a bit, and we go "Huh, I wonder if this crazy ass idea might work?" And then we try it out. I'm not very good at programming so my ideas might be very inefficient, that's why I am asking you guys if this is a good way to complete the task or if I'm just inventing the wheel again. Can't you tell the text file there is a big shoe sale? There are names that males and females share. It doesn't have to be 100% accurate, I just want to filter out the obvious ones. Some usernames are impossible to set a gender to since there can be usernames with names such as hippolol, nananabatman, awake24.7 etc. Quote Link to comment https://forums.phpfreaks.com/topic/297820-30k-usernames-need-to-remove-all-females-is-this-a-good-way/#findComment-1519150 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.