Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Gender detection testing app (genderPredictor)
import csv
from genderPredictor import genderPredictor
gp = genderPredictor()
def gender(name):
output = 'unknown'
tmp = gp.classify(name)
if tmp == 'F':
output = 'female'
elif tmp == 'M':
output = 'male'
output = 'unknown'
return output
rows = []
with open('output.csv', 'r') as csvfile:
reader = csv.reader(csvfile)
for row in reader:
with open('output.csv', 'w') as csvfile:
writer = csv.writer(csvfile)
for row in rows:

Nice the way from where i can get the separated male and female dataset...!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment