JuliaText / NameToGender.jl

Guess gender based on first name
Other
2 stars 0 forks source link

Don't throw an error? #1

Closed aviks closed 6 years ago

aviks commented 6 years ago

When applying the classify_gender method against a large dataset, I rather get a nothing or Unknown when a name cannot be found, rather than a KeyError. Currently, I cannot use broadcasting to analyse a list at once.

oxinabox commented 6 years ago

Seems reasonable,, feel free to make a PR. I was very unsure as to the correct action, and I changed it several times, before committing.

It can not be a value that is part of the @enum as otherwise classify_gender.(people) .>= MostlyFemale won't work.

Maybe missing might be the most suitable? I see this mostly as a data-enrichment tool to add a gender field e.g. to a DataFrame. and the people it is used on do have a gender, it is just that we couldn't resolve it.

aviks commented 6 years ago

missing sounds reasonable.