Start a new topic

assigning gender from a dictionary of first names

my names are first name last name in one field  I am using a regex dictionary to parse out first name and last name into separate fields. 

I want to use this new first name field as select F or M according to a dictionary and then a title Ms. or Mr. based on the M or F field...  HELP

bottom line I have first name last name and must end up with 'First Name' 'Last Name' Gender' 'Title' at the end of it all .


Is this possible??

TIA!


Hi Karen,


It is possible.  The first line parses the first name(the example shown is one of many ways to parse first name, so if yours is different that's no problem), then after that you have your long list of names that assigns the gender.  For the title dictionary you would do exactly the same but instead of Male/Female you would have Mr./Ms.


$1 (.+) (.+)TRUE
MaleJohnFALSE
MaleMarkFALSE
FemaleSusanFALSE
FemaleKarenFALSE


Thanks,


John

I have set this up as you recommend. Because my parsed fields are virtual fields( copying from the full name field in my data - column A), when I apply the dictionary to my new gender virtual field and ask it to copy this virtual first name field.I am still getting the full name .I believe it is seeing the pre-parsed value instead of the post - parsed value...  :(

Yes, it will always only see the preparsed value.  That's the reason you need to parse it again in the first line of the dictionary.

ok that makes sense, but am I missing something - Now the parsed first name is appearing.  My dictionary has the parsing line first and then followed by the titles and names. I've attached a print screen of the dictionary


I feel like I'm missing a step? 

Interesting.  It looks like it's leaving a space after the name so it isn't matching.  On the second line of the dictionary, after the name has been parsed put a value to match on of \s with a replacement value of blank.  Then do your big dictionary with all the names.  I just tested and that should work.

I'm still getting just the first name.  I'm on version 3.2.4.11   Could that be a factor?


image

Sorry, you need to have regular expressions turned on for that line as well.

Hi Karen,


It looks like you may have accidentally created a support case as your response.  I've pasted your response below for context.


"Hi John,
I’ve turned it on and still just the first names are appearing..  What the heck am I missing?
Thanks
Karen Bethell"


If you export the dictionary and post it here I can take a look.


Thanks,


John

It is working when I import it into my system.  Perhaps you can try to delete it and re import it?


image


Im still getting first name


image


Login or Signup to post a comment