* Find Duplicate Names Plugin

For users to report plugin bugs and request plugin enhancements; and for authors to test new/new versions of plugins, and to discuss plugin development (in the Programming Technicalities sub-forum). If you want advice on choosing or using a plugin, please ask in General Usage or an appropriate sub-forum.
Post Reply
avatar
shoshk
Superstar
Posts: 280
Joined: 13 May 2015 16:28
Family Historian: V7
Location: Mitzpe Jericho, Israel

Find Duplicate Names Plugin

Post by shoshk »

Hi,

I need a way to generate a list of people who have duplicate names (the same name occurs more than once for the person).

It's a pretty easy plugin to write, but before I spend the time, I wanted to check if something like this already exists. I checked the Plugin Store and didn't see anything, but I could have missed it.

Thanks,
Shosh
Shosh Kalson
User avatar
Jane
Site Admin
Posts: 8507
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Re: Find Duplicate Names Plugin

Post by Jane »

Are you looking for Individual records which have multiple name fields? or multiple records with the same value for the name field?
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
User avatar
tatewise
Megastar
Posts: 28333
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Find Duplicate Names Plugin

Post by tatewise »

I imagine that Find Duplicate Individuals is totally unsuitable. Otherwise, there is nothing else that I am aware of.

I was also thinking along the same lines as Jane. What exactly are you looking for?
  1. Any single Individual record where its Primary/Alternate Name fields contain duplicates?
  2. Multiple Individual records that share the same Primary/Alternate Name field value?
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
shoshk
Superstar
Posts: 280
Joined: 13 May 2015 16:28
Family Historian: V7
Location: Mitzpe Jericho, Israel

Re: Find Duplicate Names Plugin

Post by shoshk »

I am looking for 1) Any single Individual record where its Primary/Alternate Name fields contain duplicates.

I don't think it should be too difficult to write.

Shosh
Shosh Kalson
User avatar
Jane
Site Admin
Posts: 8507
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Re: Find Duplicate Names Plugin

Post by Jane »

If you don't have a lot of people with more that 3 or 4 alternate names you could simply use a query
Adding to the list if
name[1] = name[2]
or
name[1] = name[3]
etc
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
avatar
shoshk
Superstar
Posts: 280
Joined: 13 May 2015 16:28
Family Historian: V7
Location: Mitzpe Jericho, Israel

Re: Find Duplicate Names Plugin

Post by shoshk »

We enter all names found in the records. And there are a lot of variations. So an individual could have quite a few alternate names. I have individuals with upwards of 10 names. That's an awful lot of permutations.

Shosh
Shosh Kalson
User avatar
tatewise
Megastar
Posts: 28333
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Find Duplicate Names Plugin

Post by tatewise »

When writing the Plugin, don't overlook all the various Name subsidiary fields that need comparing.
e.g.
~.NAME = Name
~.NAME.NPFX = Name Prefix
~.NAME.NSFX = Name Suffix
~.NAME.NICK = Nickname
~.NAME._USED = Given Name Used
~.NAME.GIVN = Given Name
~.NAME.SPFX = Surname Prefix
~.NAME.SURN = Surname
The first five relate to the Names & Titles dialogue, and the last three are unlikely to be used.
There are also NOTE and SOUR subsidiary fields possible that need to be considered.

I suggest the easiest technique is to use what I call a dictionary table such as local dicName = { }.
First compose the FullName from all the component fields above for NAME[1].
Then test if dicName[FullName] then to see if an entry already exists and add record to list.
Otherwise, use dicName[FullName] = true to add entry to the dictionary.
Repeat for NAME[2] , NAME[3] , et seq.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
shoshk
Superstar
Posts: 280
Joined: 13 May 2015 16:28
Family Historian: V7
Location: Mitzpe Jericho, Israel

Re: Find Duplicate Names Plugin

Post by shoshk »

I think that the only field which is relevant for us is ¬.NAME.

We do not assign values to any of the sub-fields. Does FH assign values to GIVN and/or SURN?

Shosh
Shosh Kalson
User avatar
tatewise
Megastar
Posts: 28333
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Find Duplicate Names Plugin

Post by tatewise »

No, FH does not perform any such 'hidden' assignments that some other products do.
Those subfields would only get assigned from imported GEDCOM or via the All tab.

Did you see my advice about NOTE and SOUR subfields, and how to use a dictionary table?
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
Post Reply