eljeffeg / SmartCopy

Chrome extension for copying genealogical data into Geni.com.
15 stars 14 forks source link

WikiTree matching - wrong parent gender matching #102

Closed GuyKh closed 10 months ago

GuyKh commented 2 years ago

When trying to match from WikiTree -- the Mother is matched as Male (and so matched to the father in Geni) vice versa.

image

WikiTree profile: https://www.wikitree.com/wiki/Steinmetz-87 Geni Profile: https://www.geni.com/profile/index/6000000182593784821

GuyKh commented 2 years ago

The reason for this behavior is the following:

both parents are listed in the HTML under class parent which is gender-less

  1. The father ( Berl (Yisocher Dov) Steinmetz) is listed as "Berl (bron Yisocher Dov) Steinmetz" and according to this piece of code - https://github.com/eljeffeg/SmartCopy/blob/master/collections/wikitree.js#L189 - any name with "born" means that this is a female (a condition which may suit maiden names, but can't be a rule for everyone).
  2. The mother (Fraida Rivka Kahan) - doesn't have the "born(...) " part - and so marked as male.

What I suggest, and per @eljeffeg approval -- is to match that the name is ending with "(born ...)" instead of matching it in the middle of the line. Which would solve #1

Also - I think that we should match the image for "/images/icons/female.gif" - as it's often the string used (without the domain) [covered in #103]